People's changes now reach the target branch the same way the agent's do. The IDE credential carries a ref prefix and the Git service runs a pre-receive hook on every push that refuses updates outside it, so the IDE can push only `ide/` branches; the platform's own integration is unaffected. - A wish may name a source branch. The run starts from that branch's head, the agent builds on it, and verification, repair rounds, merging onto a moved target and conflict repair work as before. A missing branch makes the run wait (git_storage) until it is pushed. - Release risk is now computed from the target branch before integration, not from where the run started: a migration committed on the source branch would otherwise have been missed and could have skipped approval. - Clones work on `ide/work`; a plain `git push` publishes it. - The console lists a project's IDE branches with a button to submit a wish that merges one, and the new-wish form has a starting-point field; MCP `submit_wish` accepts `sourceBranch`. The Git service lists branches under a prefix for this (`POST /refs`). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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-apiaudience 都会校验,租户成员资格与工具权限在服务端检查。 - 工具:
list_projects、submit_wish、get_run、get_run_events、answer_question、control_run、get_delivery、request_release。工具与 Web 共用同一套领域逻辑;通过工具做出的修改在审计中记为真实用户。submit_wish可以带sourceBranch(例如在 IDE 中推送的ide/work),运行从这个分支开始,验证后合入目标分支。
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 验收尚未完成。