feat: add optional ChatGPT agent runtime - #49
Conversation
|
@wimi321 这份 Draft PR 新增了 ChatGPT 登录 / Codex App Server provider,并补上了当前手的 AI 讲解入口。方便时烦请 review,尤其希望确认 provider runtime 边界、旧 API Key 的兼容迁移,以及 OAuth token 的隐私处理。谢谢! |
wimi321
left a comment
There was a problem hiding this comment.
感谢你投入这么多精力完善 ChatGPT 登录、多 provider 架构和当前手入口。方向很有价值,我也在 PR head 上实际跑过 pnpm test(249 项通过)、pnpm typecheck、pnpm build。不过目前有几项发布级阻塞,暂时不能合并:
-
安装包缺少原生 Codex 可执行文件。 我用当前 PR 实际执行了 macOS directory packaging,
GoAgent.app的app.asar里只有@openai/codex/bin/codex.js,Resources与app.asar.unpacked中没有平台codexbinary。当前asarUnpack: node_modules/@openai/codex-*/vendor/**/*没有覆盖 pnpm 的 optional platform package,干净机器会退回全局codex,普通用户因此不可用。需要增加 macOS/Windows/Linux 打包契约和“安装包内启动 app-server”的 smoke。 -
ChatGPT 路径退化成固定预取,不是 GoAgent 的 Tool-first Agent。
activeProviderSupportsTools()对codex-app-server返回 false,随后prefetchEvidenceForManagedProvider()固定执行一组工具;而 onboarding 却把 tools 标为ok: true,并没有真实 tool-call 验证。PR 使用的 App Server schema 已支持dynamicTools与item/tool/call,建议接入同一套 teacher tool loop;若暂时不接入,必须把它明确标记为受限实验 provider,不能宣称工具能力通过。 -
隔离与账号副作用和文档承诺不一致。 当前只设置
sandboxPolicy: { type: readOnly },没有真正限制到临时棋盘目录,也没有禁用 Codex 内置读取/命令工具;“prompt 里要求不要调用工具”不能替代权限隔离。另外进程直接复用默认 Codex home,应用内 logout 会影响用户现有 Codex CLI/Desktop 登录。需要使用 GoAgent 独立的 Codex home,或在 UI 中明确告知共享登录与退出副作用,并用实际 allowlist/permission profile 限制能力。 -
能力探测还不是真实探测。
inputModalities缺失时当前默认按支持图片处理,测试连接也没有真正发送图片或触发一次工具调用。首次引导要求的文字、图片、工具三项应分别用真实请求验证,失败时不能标绿。 -
当前分支已落后 main 并与最新老师/KataGo 修复冲突。 请先 rebase 最新
main,解决katagoRuntime.ts、teacherAgent.ts冲突,并保留 #38 的整盘缓存隔离、取消和实时反馈修复。
建议把上述四项补齐后再转 Ready for review。届时我会继续做完整跨平台与真实账号复测。再次感谢这次高质量探索。
|
已按审核意见补齐并转为 Ready:
|
|
感谢 @DavidDing16 补上跨平台 directory packaging 与包内 App Server smoke,这对干净机器可用性很重要。最终复核时发现,Codex 0.149.0 的正式 App Server schema 并不支持 |
|
发布准备已补到当前 PR:版本提升为 v0.4.21,新增七语言发布说明并更新全部 README 下载链接;同时修复了发布工作流默认 Transformer 选择步骤与 notarization 文档测试中的硬编码版本。 |
wimi321
left a comment
There was a problem hiding this comment.
Real ChatGPT validation passed through the GoAgent Codex App Server adapter: text response, randomized board-image recognition, and dynamic GoAgent tool calling all succeeded. CI, release-quality, teacher-quality, packaged runtime, signing, and protocol checks are green.
Summary
Thanks @DavidDing16 for the original multi-provider exploration and ChatGPT sign-in implementation.
This PR adds ChatGPT sign-in as an optional Codex App Server adapter. It does not replace GoAgent's domain-specific teacher runtime. The existing OpenAI-compatible API path remains the stable default and existing user settings continue to work.
Runtime architecture
AgentRuntimeAdapterboundary for OpenAI-compatible and Codex App Server providers.dynamicToolsto call the same allowlisted Go-domain tools; no fixed evidence prefetch path remains.approvalPolicy=never, a read-only/network-disabled sandbox, and the per-turn temporary workspace inruntimeWorkspaceRootsusing fields supported by the pinned App Server schema.Login and privacy
CODEX_HOMEunder the app data directory.Capability verification
AI readiness is granted only after three real checks pass:
Model discovery comes from the signed-in account. Unknown image metadata is not treated as proof; the real image probe is authoritative.
Packaging
0.149.0.UI
API KeyandChatGPT sign-inas clear alternatives.Verification
pnpm install --frozen-lockfilepnpm test(262/262)pnpm typecheckpnpm buildpnpm checkpnpm check:teacher-quality0.149.0and creates a real threadThe code and automated release gates are complete. Merge remains blocked only on the real-account capability check above.