eust-w da1cfcea13 🔥 Remove the cloud IDE
The cluster never ran Theia or the IDE gateway, so every workspace stayed
"未配置" forever. The feature is gone instead of half-present:

- API: workspace, launch and lifecycle endpoints, the gateway identity and
  its internal routes, the dispatcher's workspace provisioning and the
  lifecycle worker. Migration 003 deletes stored workspaces and settles
  their pending outbox items.
- Provisioner: workspace provisioning and lifecycle for both backends.
- Web: the 云 IDE panel, the launch route, the start-branch picker that
  listed IDE branches, and the workspace count on usage.
- apps/ide, infra/oct, dev:ide and the CI job; IDE parts of local k3s,
  network policies, RBAC, docs and the architecture diagram.

A wish can still start from a pushed branch through the API (sourceBranch).
Plan files and stored entitlements may still carry maxWorkspaces; it is
accepted and ignored.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-04 12:43:02 +08:00
..
2026-11-04 12:43:02 +08:00

Agent 客户端接入(MCP)

WorkBuddy、Codex 等客户端通过 MCP(Streamable HTTP)接入,以登录用户的身份调用 WishForge,权限不超过该用户,也不能代替人完成审批。

  • 地址:本地为 http://127.0.0.1:4000/mcp,生产为 API 的 HTTPS 地址加 /mcp(不是 /api/mcp)。
  • 认证:OAuth(授权码 + PKCE)。未认证请求返回 401,WWW-Authenticate 中给出受保护资源元数据地址 /.well-known/oauth-protected-resource,其中列出授权服务器。本地授权服务器是 Keycloak:http://127.0.0.1:4100/realms/wishforge(发现文档在 /realms/wishforge/.well-known/openid-configuration)。令牌的 issuer、有效期与 wishforge-api audience 都会校验,租户成员资格与工具权限在服务端检查。
  • 工具:list_projects、submit_wish、get_run、get_run_events、answer_question、control_run、get_delivery、request_release。工具与 Web 共用同一套领域逻辑;通过工具做出的修改在审计中记为真实用户。submit_wish 可以带 sourceBranch(例如自己推送到项目仓库的分支),运行从这个分支开始,验证后合入目标分支。

Codex

把 codex/config.toml.example 合并到受信任项目的 .codex/config.toml 或用户配置中,然后执行 codex mcp login wishforge。本地 Keycloak 中已注册公共客户端 wishforge-codex(PKCE,回调 http://127.0.0.1:45555/callback,与配置中的端口一致)。用 codex mcp list 与 codex mcp get wishforge 检查结果。生产需要单独注册实际的回调与客户端,本仓库不包含任何凭据。参见 Codex MCP 文档。

WorkBuddy

在设置 → MCP 中添加 /mcp 地址并完成 OAuth。workbuddy/.mcp.json 是可分发的 HTTP 配置(含显示名与认证元数据),workbuddy/skills/wishforge/SKILL.md 描述使用流程。本地 Keycloak 中还没有 WorkBuddy 客户端:请按所安装的 WorkBuddy 版本显示的回调注册客户端,或启用单独审阅过的动态注册策略,不要为了跑通测试开放不受限的动态注册。参见 WorkBuddy MCP 指南。

验收

tests/mcp.test.ts 用内存传输验证工具清单、按项目名找到项目、提交与跟踪愿望、补充需求、暂停、查询交付、发布前置条件以及权限范围。它不覆盖 OAuth。每个真实客户端都需要手动走一遍:未认证挑战 → 发现 → PKCE 登录 → 工具列表 → 用幂等键提交一个愿望 → 轮询事件 → 查看交付 → 请求一次高风险发布并确认客户端不能自己审批;另外检查令牌过期与刷新、错误的 audience、错误的租户、撤销成员资格与重复投递。WorkBuddy 与 Codex 的真实 OAuth 验收尚未完成。