feat(grok-build): host Grok Build as a Cindy harness like Claude Code - #3967
feat(grok-build): host Grok Build as a Cindy harness like Claude Code#3967yuchenlin wants to merge 40 commits into
Conversation
Replay the hosted-harness work onto current main. Grok Build is a fourth Cindy harness (kind grok-build) on the Pi loop: SuperGrok / gateway auth, exclusive Grok catalog models, MCP / rewind / fork / plan. It is not grok agent stdio and does not use grok login. Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
|
| Filename | Overview |
|---|---|
| packages/maker-core/src/agents/grok-build/index.ts | Defines Grok Build as a Pi-hosted agent with a distinct kind and disabled Fast mode; inherited capabilities conflict with host-level fork and rewind rejection. |
| apps/desktop/src/main/maker-host/grok-build-host.ts | Registers the harness through the managed Pi loop and isolates its session home from ordinary Pi sessions. |
| apps/desktop/src/main/maker-host/model-route-guard.ts | Pins exclusive Grok routes to xAI but accepts a connected provider even when the selected model copy is absent. |
| packages/model-providers/src/registry.ts | Adds shared Grok Build source readiness, but the special case ignores per-model availability. |
| apps/desktop/src/main/maker-orchestration/fork.ts | Unconditionally rejects Grok Build despite the runtime advertising fork support. |
| apps/desktop/src/main/maker-orchestration/rewind.ts | Unconditionally rejects Grok Build despite the runtime advertising rewind support. |
| apps/desktop/src/main/maker-host/index.ts | Wires Grok Build into the desktop Maker registry with catalog-derived Grok models and shared hosted-loop dependencies. |
| packages/model-providers/src/unifiedSelection.ts | Attaches Grok Build as a harness candidate to exclusive Grok model rows without creating a synthetic model or provider row. |
| apps/desktop/src/renderer/components/new-chat/ChatInput.tsx | Extends unified selection and send readiness to Grok Build while gating exposure on runtime registration. |
| apps/mobile/src/session/newSession.ts | Adds remotely registered Grok Build as an opt-in mobile session choice. |
| README.md | Documents an obsolete PATH-based availability requirement that contradicts the hosted implementation. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
UI[Desktop or mobile selector] --> Gate[Runtime and source readiness]
Gate --> Catalog[Exclusive Grok catalog slug]
Catalog --> Guard[Model route guard]
Guard --> XAI[SuperGrok / xAI route]
XAI --> Host[GrokBuildAgent]
Host --> Pi[Cindy-hosted Pi loop]
Pi --> Tools[MCP / Orca / Ghost tools]
Pi --> Session[Session events and persistence]
Prompt To Fix All With AI
### Issue 1
apps/desktop/src/main/maker-orchestration/fork.ts:697-702
**Advertised actions always fail**
Grok Build inherits Pi's `fork` and `rewind` capabilities as supported, and the capability test explicitly requires both. The UI therefore exposes these actions, but this guard rejects every Grok Build fork before the Pi-compatible path runs; the matching guard in `rewind.ts:187-192` does the same for rewind. Users who click either advertised action always receive an unsupported-history error. Grok Build should either use the hosted Pi implementations or report both capabilities as unsupported.
### Issue 2
packages/model-providers/src/registry.ts:321-325
**Readiness ignores model availability**
For Grok Build, this branch ignores `modelId` and treats any connected xAI provider as a usable source. The route guard in `apps/desktop/src/main/maker-host/model-route-guard.ts:128-137` likewise pins xAI when the selected model has no catalog copy. A stale or default Grok slug that the connected account does not offer can therefore pass the picker and send gates, then fail during route resolution or upstream invocation instead of being rejected or reconciled to an available model.
### Issue 3
README.md:26
**README states wrong prerequisite**
This says Grok Build is available when the `grok` CLI is on PATH, but the implementation registers it from Cindy's managed Pi runtime and does not consult that CLI. Users without `grok` can still receive the harness, while installing `grok` does not ensure that the hosted runtime is available. Update this line and the matching Chinese text in `README.zh-CN.md:29` to describe the hosted-loop and SuperGrok requirements.
### Issue 4
apps/desktop/src/renderer/i18n/locales/en/common.json:7327-7338
**Permission copy describes ACP**
These new descriptions tell users that Grok Build uses ACP prompts, ACP interception, and ACP-style always-approve behavior, although this PR replaces ACP execution with the Cindy-hosted Pi loop. That describes a permission boundary the runtime does not use and can mislead users choosing between Default permissions, Auto-review, and Full access. Update this text and the corresponding Japanese, Korean, Simplified Chinese, and Traditional Chinese entries to describe the actual hosted-loop approval behavior.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(grok-build): host Grok Build on the..." | Re-trigger Greptile
GrokBuildAgent advertises rewind/fork. The ACP-era host guards still rejected every grok-build session and would have fallen through to Claude checkpoints. Route them through the Pi tail-turn path instead. Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
|
@yuchenlin 👋 这个 PR 还有 4 条 review conversation 没 resolve(apps/desktop/src/main/maker-orchestration/fork.ts / packages/model-providers/src/registry.ts / README.md / apps/desktop/src/renderer/i18n/locales/en/common.json),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
Route exclusive Grok readiness through SuperGrok plus a real catalog copy. Reject grok-build routes with no xAI model copy. Update README, permission copy, IM merge snapshot, color freeze, and fail-open source assertions. Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
|
四条 Greptile conversation 已改完并 resolve:
另外补了 CI: |
|
这条 PR 需要维护者确认后才能合并,自动审查不会代为放行。 原因:
请维护者直接在本 PR 上 Approve;若要改,请 Request Changes,作者改完后再 Approve。讨论 issue:#3969 另外,Description 还缺「这次改了什么 / 怎么验证的 / 风险」三段,界面改动也还没有效果证据(截图、录屏或 HTML)。这些会另开格式打回,不代替本次维护者确认。 |
|
命中 UI 路径(模型选择、设置、侧栏图标、用量等)但 description 未附界面效果证据。建议补充改动后效果:截图/录屏,或改动后界面的 HTML 页面(```html 代码块、.html 附件或在线预览链接),便于确认界面符合 DESIGN.md。 |
MagicLizi
left a comment
There was a problem hiding this comment.
格式门仍未通过,请按仓库 PR 模板补全 Description 后再请求审查。
- Description 缺段落:怎么验证的 / 风险
当前正文有 Why / What,但仍对不上.github/PULL_REQUEST_TEMPLATE.md要求的三段。请明确写出:- 怎么验证的(实际跑过的命令、平台、关键回归);
- 风险(插件基座
errandPrefsStore.ts、存量插件兼容、核心路径/大 diff、模型面与计费)。
…shot Regenerate classification.json from the desktop color freeze so the new Grok Build harness badge is counted (521) and classification.test.ts matches disk. Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
|
Description 已按模板补全:
design-tokens 分类快照也已 regenerate: |
The glossary gate requires 「Agent」 in zh-CN / zh-TW. Lowercase agent failed verify-checks. Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
Annotate hosted-loop opts, accept null agent-home ids, and include grok-build in IM/Ghost/errand Record unions and test fixtures. Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
CI merge-ref includes main's workspaceKind field on the preference store. The grok-build persist assertion must match that shape. Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
SessionUsageSummary indexed a 3-harness label map with RemoteSession.agentKind, which now includes grok-build. Use the existing mobileAgentLabel helper. Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
Windows unit tests (1/2) timed out in cindySubagentRunner "refuses to forward an approval once a stop is already waiting" (30s wait for stopped; runner published completed). This PR does not touch that test; retrigger only. Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
e8011a8 to
eb6e949
Compare
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Keep hosted-loop deps object for Pi and Grok Build, and take main's resolveModelContextLimit plus PiModelApi protocol fields. Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
makecindy#3987 added Record<AgentKind> color/label/mark tables that omit the fourth harness. Desktop typecheck fails verify-checks. Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
|
@yuchenlin 👋 这个 PR 目前与 请在本地 merge 最新的 |
Keep grok-build host registration and AgentKind unions while taking upstream Bot runtime deps, remoteHostId skill params, and bot IPC types. Refresh design-token fixture counts for the merged palette. Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
BotModelChainEditor only hosts claude/codex/pi. SelectableVendor now includes grok-build, so ignore that engine on unified select instead of passing it into BotHarness. Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
这些问题已在当前 head 的后续 commit 中修复(格式门/安全门已通过),自动 dismiss 旧的 CHANGES_REQUESTED 以解除合并阻塞。
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
Windows unit tests (1/2) timed out in windowsPackagedInstanceBarrier "holds the packaged startup mutex until release and allows a later retry". This PR does not touch that test; retrigger only. Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
f7980d6 to
695819d
Compare
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
…d-harness Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
这次改了什么
摘要
把 Grok Build 做成和 Claude Code / Pi 同级的 Cindy 托管 harness:走 Cindy Pi loop + SuperGrok / 网关,独占 Grok catalog slug,不要独立 ACP /
grok login通道。本 PR 从当前main重放,替代 #3479。变更类型
feat新功能范围
UI 变化
engine-badge-grok-build中性石墨灰,与 cc/codex/pi 徽标可区分,light/dark 同值)。权限档文案对齐 Pi 托管循环的 ask / auto / bypass,不再描述 ACP。改动后界面效果(统一选择器独占 Grok 行的 Grok Build harness chip + 权限档):
怎么验证的
自动验证
平台:macOS arm64 本地 worktree
/Users/yuchenlin/cindy-hosted-pr,基于当前origin/main。手工验证
Cindy Electron 隔离沙箱
CindyGlobal-dev2-dev(CDP 9222):新建会话,Grok Build only + Grok 4.6,发送Reply with exactly: PONG-HOSTED-GROK-BUILD。会话aa769416回了PONG-HOSTED-GROK-BUILD。无 grok-login 弹窗,无 default-gateway SuperGrok 报错。DBagent_kind=grok-build。未执行的验证
风险
风险分类
影响与回滚
errandPrefsStore.ts把GHOST_ERRAND_AGENT_KINDS从cc|codex|pi扩成含grok-build。已装 Ghost / errand 插件读这份词汇表时会多一个合法 agent;旧偏好 JSON 没有该键时仍按原三档解析,不改存量批准状态或指纹。回滚:还原该数组并撤回 harness 注册即可,无需 migration。feat/grok-build-hosted-harness;不改 schema。ACP 文件仍在树里但 host 不 spawn。Why
MagicLizi 的条是:Grok Build 必须是 Cindy 一等 harness,坐在模型面 / 计费上,带 MCP / Orca / Ghost 和 rewind / fork / steer / plan。独立 ACP +
grok login不是这个产品。What
GrokBuildAgent继承 Cindy hosted Pi loop。kind仍是grok-build。grok。grok login,不读~/.grok/auth.json。grok-build模型行。exclusive-source-unavailable。ACP client / detect / stdio 文件还在树里,host 不 spawn
grok agent stdio。Supersedes #3479.