feat: Introduce core application structure, configuration, monitoring, and team management features.

This commit is contained in:
2026-02-03 06:45:54 +08:00
parent 637753ddaa
commit b20399a00a
18 changed files with 961 additions and 631 deletions

View File

@@ -477,11 +477,10 @@ func (c *CodexAPIAuth) ObtainAuthorizationCode() (string, error) {
}
}
c.logStep(StepInputPassword, "邮箱提交响应 pageType=%s, 包含password=%v", pageType, strings.Contains(string(body), "password"))
c.logStep(StepInputPassword, "验证密码...")
if pageType == "password" || strings.Contains(string(body), "password") {
// 5. 验证密码
c.logStep(StepInputPassword, "验证密码...")
if !c.callSentinelReq("authorize_continue__auto") {
return "", fmt.Errorf("Sentinel 请求失败")
}
@@ -493,7 +492,6 @@ func (c *CodexAPIAuth) ObtainAuthorizationCode() (string, error) {
verifyHeaders["OpenAI-Sentinel-Token"] = c.getSentinelHeader("password_verify")
passwordPayload := map[string]string{
"username": c.email,
"password": c.password,
}
@@ -502,7 +500,6 @@ func (c *CodexAPIAuth) ObtainAuthorizationCode() (string, error) {
c.logError(StepInputPassword, "密码验证失败: %d - %s", resp.StatusCode, string(body[:min(200, len(body))]))
return "", fmt.Errorf("密码验证失败: %d", resp.StatusCode)
}
c.logStep(StepInputPassword, "密码验证成功")
// 解析密码验证响应
json.Unmarshal(body, &data)
@@ -520,8 +517,6 @@ func (c *CodexAPIAuth) ObtainAuthorizationCode() (string, error) {
c.logError(StepInputPassword, "账号需要邮箱验证,无法继续 Codex 授权流程")
return "", fmt.Errorf("账号需要邮箱验证,请使用浏览器模式或等待账号状态更新")
}
} else {
c.logStep(StepInputPassword, "跳过密码验证步骤 (服务器未要求)")
}
// 6. 选择工作区