Conversation
|
Important Review skippedWe couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting You can disable this status message by setting the Use the checkbox below for a quick retry:
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe pull request adds ZCode as a supported agent. It updates shared types, detection, startup behavior, UI catalogs, localization, documentation, and mobile selection. It adds local and remote hook installation with status APIs. It adds SQLite transcript reading through worker-backed native chat and orchestration paths. Worker orchestration now supports deferred ZCode startup, readiness checks, startup-command fallback, provider-session warnings, and one-shot workers. Tests cover these new behaviors. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 698ae131-54f9-459b-9792-1959fa4825fa
📥 Commits
Reviewing files that changed from the base of the PR and between 5ea7df1 and 77a2a5f07c78e8689945a3cad5b8160414d48b93.
📒 Files selected for processing (45)
README.mdconfig/tsconfig.cli.jsondocs/readme/README.es.mddocs/readme/README.fr.mddocs/readme/README.ja.mddocs/readme/README.ko.mddocs/readme/README.pt.mddocs/readme/README.zh-CN.mdmobile/src/tasks/mobile-tui-agents.tssrc/main/agent-hooks/managed-agent-hook-registry.tssrc/main/agent-hooks/managed-hook-local-filesystem.test.tssrc/main/agent-hooks/remote-hook-service-installers.test.tssrc/main/agent-hooks/remote-managed-hook-installers.tssrc/main/ipc/agent-hooks.test.tssrc/main/ipc/agent-hooks.tssrc/main/zcode/hook-service.test.tssrc/main/zcode/hook-service.tssrc/main/zcode/zcode-hook-config.test.tssrc/main/zcode/zcode-hook-config.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/agent-catalog.tsxsrc/renderer/src/lib/agent-status.tssrc/renderer/src/web/web-preload-api.tssrc/shared/agent-hook-listener.test.tssrc/shared/agent-hook-listener.tssrc/shared/agent-hook-relay.tssrc/shared/agent-hook-types.tssrc/shared/agent-kind.tssrc/shared/agent-name-token-match.tssrc/shared/agent-session-resume.tssrc/shared/agent-status-types.tssrc/shared/agent-type-label.tssrc/shared/skills-cli-agent-keys.tssrc/shared/telemetry-events.tssrc/shared/tui-agent-config.tssrc/shared/tui-agent-display-names.tssrc/shared/tui-agent-selection.tssrc/shared/tui-agent-startup.test.tssrc/shared/types.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/main/runtime/orca-runtime.ts (1)
21919-21941: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract the repeated deferred-agent-terminal creation block into a shared helper.
The try/catch block that calls
createDeferredAgentTerminaland records the startup terminal fields repeats three times, once per creation branch (folder-repo, local-git, remote). Each copy differs only in the targetworktreeSelector/worktreePathand in whether the result is stored in astartupTerminalobject or in separatestartupTerminalHandle/startupTerminalTabId/startupTerminalPaneKey/startupTerminalPtyIdvariables.Extract a private helper that takes the worktree id, path, agent, launch preferences, and a warning-message template, and returns either the created terminal or a warning string. Call it from all three sites to keep the failure-warning wording and spawn logic in one place.
♻️ Sketch of a shared helper
private async spawnDeferredAgentTerminal( worktreeSelector: string, worktreePath: string, args: { startupAgent: TuiAgent; startupLaunchPreferences?: AgentLaunchPreferences } ): Promise< | { terminal: RuntimeTerminalCreate; warning?: undefined } | { terminal?: undefined; warning: string } > { try { const terminal = await this.createDeferredAgentTerminal(worktreeSelector, { agent: args.startupAgent, ...(args.startupLaunchPreferences ? { launchPreferences: args.startupLaunchPreferences } : {}), surfaceOwner: false }) return { terminal } } catch (err) { const message = err instanceof Error ? err.message : String(err) return { warning: `Failed to create the deferred agent terminal for ${worktreePath}: ${message}` } } }Also applies to: 22694-22714, 23064-23083
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3e815c5b-fb1e-4d7b-8b3f-d592627e7cc8
📥 Commits
Reviewing files that changed from the base of the PR and between bdb38accf922c2d92c893fca0e9e3f973dc5f3c4 and cd3772b7dcb4febb3c2d07ae46d5a81398b93e29.
📒 Files selected for processing (11)
src/main/ipc/preflight.test.tssrc/main/runtime/orca-runtime.tssrc/main/runtime/orchestration/preamble.test.tssrc/main/runtime/orchestration/preamble.tssrc/main/runtime/rpc/methods/orchestration-worker-topology.tssrc/main/runtime/rpc/methods/orchestration-workers-new-worktree.test.tssrc/main/runtime/rpc/methods/orchestration-workers.tssrc/main/runtime/rpc/methods/orchestration.test.tssrc/shared/local-agent-install-dir-detection.tssrc/shared/tui-agent-config.tssrc/shared/tui-agent-startup.test.ts
1b84643 to
4d51c6a
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai summary |
✅ Action performedSummary regeneration triggered. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/main/runtime/rpc/methods/orchestration-worker-topology.ts (1)
111-113: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueCondense the comment.
Keep the rationale in one concise line.
As per coding guidelines, “Comments must be concise, non-obvious, and brief—prefer one line.”
Source: Coding guidelines
🔇 Additional comments (14)
src/shared/tui-agent-config.ts (1)
33-35: LGTM!Also applies to: 333-353, 356-358
src/main/zcode/interactive-client.test.ts (1)
1-60: LGTM!src/main/zcode/interactive-client.ts (1)
1-38: LGTM!src/main/runtime/orca-runtime.ts (8)
9-9: 🎯 Functional Correctness
⚠️ Unverified finding
Sandbox verification was unavailable.Verify the
isOpenCodeNativeTitlefast-path is symmetric between the pty-based and leaf-based agent-detection paths.
isPtyRunningAgent(used when a liveRuntimePtyWorktreeRecordexists) has an explicit fast path:isOpenCodeNativeTitle(openCodeMarkerTitle) && pty.launchAgent === 'opencode'returnstrueimmediately. The parallel leaf-based branch insideisTerminalRunningAgent(used when the handle only resolves through the renderer graph leaf, not a PTY record) has no equivalent check — it always falls through to the foreground-process probe for an OpenCode-native title.If
RuntimeSyncedLeafcarries a comparablelaunchAgentfield, this is an inconsistency that can make OpenCode-agent detection slower or less reliable on the leaf-based path. If it does not carry that field, the asymmetry is structural and expected — but that should be confirmed, not assumed.Do you want me to check
RuntimeSyncedLeaf's definition insrc/shared/runtime-types.tsto confirm this?Also applies to: 16794-16795, 16821-16831, 31705-31788, 37031-37032
26163-26226: 🗄️ Data Integrity & Integration
⚠️ Unverified finding
Sandbox verification was unavailable.Verify that the deferred ZCode terminal's
launchConfig/launchTokenreflect the eventually-delivered prompt, not the empty-prompt startup plan.
createDeferredAgentTerminalbuilds the startup plan with an empty prompt (buildStartupForAgent(repo, opts.agent, undefined, opts.launchPreferences)) and forwards onlyenv,launchConfig, andlaunchAgenttocreateTerminal. The actual task prompt is delivered later bysendTerminalAgentStartupPrompt, which types the real prompt-embedded launch command as terminal input viasendTerminalAgentPrompt— this path never updatespty.launchConfigorpty.launchToken.Any later reader of
pty.launchConfig(for examplegetAgentStatusLaunchConfigForPaneKey, used by the hook-token exchange, or a sleep/resume flow) sees the empty-prompt launch configuration, not the configuration that actually launched the agent with its task. If ZCode session resume or hook-driven relaunch relies on this storedlaunchConfig, resuming this pane could drop the original task context.Please confirm whether
src/main/zcode/hook-service.tsorsrc/main/zcode/interactive-client.tsreadpty.launchConfig/getAgentStatusLaunchConfigForPaneKeyfor this pane in a way that depends on the prompt being present.
16449-16469: 🩺 Stability & Availability
⚠️ Unverified finding
Sandbox verification was unavailable.Verify that callers handle rejection from worktree/repo resolution in
resolveOrchestrationPromptDelivery.
resolveOrchestrationPromptDeliverycallsthis.resolveWorktreeSelector(id:${worktreeId}), which throws (for exampleselector_not_found) if the worktree no longer exists. This method isasyncand the exception surfaces as a promise rejection to the caller.The orchestration dispatch code that calls this method (for example in
orchestration-workers.tsororchestration-worker-topology.ts) is not part of this file. Please confirm the caller wraps this call so a deleted/renamed worktree during dispatch does not crash the orchestration flow instead of failing that one dispatch gracefully.
37239-37252: 🎯 Functional Correctness
⚠️ Unverified finding
Sandbox verification was unavailable.Fix the stale comment and verify the reused
'codex-interactive-prompt'reason code for the new permission-prompt heuristic.The comment
// Why: preserve the existing remote receipt value for mixed-version clients.does not describe the code below it. That code detects a generic "permission required"/"requires permission" prompt corroborated by two or more decision options ("allow once", "allow always", "reject", "deny"). This looks like a copy-pasted comment left over from an unrelated change.Separately, this new heuristic labels the match with the
'codex-interactive-prompt'reason, but unlike the neighboringinteractivePromptIndexblock, it does not require any Codex-specific context (hasCodexInteractiveContext) before assigning that reason. A permission prompt from a different agent (for example ZCode's own interactive client, which can show comparable "Permission required... Allow once/Allow always" text) would be classified with a reason value named for Codex. If any consumer ofRuntimeTerminalWaitBlockedReasonrenders Codex-specific text for this reason, this misattributes the source agent to the user.Please confirm how
RuntimeTerminalWaitBlockedReasonconsumers render'codex-interactive-prompt', and consider a more neutral reason name for this generic permission-prompt pattern.📝 Proposed fix for the stale comment
if (permissionPromptIndex !== -1) { const permissionSegment = normalized.slice(permissionPromptIndex, permissionPromptIndex + 1_500) const decisionCount = ['allow once', 'allow always', 'reject', 'deny'].filter((choice) => permissionSegment.includes(choice) ).length if (decisionCount >= 2) { - // Why: preserve the existing remote receipt value for mixed-version clients. + // Why: a generic "Permission required" prompt with 2+ decision options is a + // real blocking signal even outside Codex; reuse the interactive-prompt reason + // until a dedicated non-Codex reason value exists. candidates.push({ reason: 'codex-interactive-prompt', index: permissionPromptIndex }) } }
12096-12101: 🎯 Functional Correctness
⚠️ Unverified finding
Sandbox verification was unavailable.Verify
parseTerminalKittyKeyboardFlags's return semantics before relying on the discarded parsed value.This validates
snapshot.modes?.kittyKeyboardFlagsthroughparseTerminalKittyKeyboardFlagsbut then assigns the rawsnapshot.modes.kittyKeyboardFlagsfield instead of the parser's return value. This is safe against a null/undefinedsnapshot.modes(the ternary's condition is falsy first, so the true branch never runs), but ifparseTerminalKittyKeyboardFlagsnormalizes or clamps the value rather than doing a pure pass-through validity check, the storedkittyKeyboardFlagswould not match what was validated.Please confirm
parseTerminalKittyKeyboardFlagsis a pure validity check (returns the input unchanged orundefined). If it normalizes the value, use its return value directly instead of re-reading the raw field.
461-461: LGTM!Also applies to: 16449-16469, 461-461
122-126: LGTM!Also applies to: 2007-2007, 15544-15561
21839-21840: LGTM!Also applies to: 21874-21874, 21996-22019, 22772-22793, 22995-22998, 23144-23164
src/main/runtime/rpc/methods/orchestration-workers.ts (1)
2-2: LGTM!Also applies to: 67-73, 135-135, 158-165, 179-185, 247-257
src/main/runtime/rpc/methods/orchestration.test.ts (1)
2188-2221: LGTM!Also applies to: 2262-2315, 2521-2539
src/main/runtime/rpc/methods/orchestration-workers-new-worktree.test.ts (1)
67-83: LGTM!Also applies to: 195-241
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 12852d17-e1e9-4887-9749-d1b5761b3d2c
📥 Commits
Reviewing files that changed from the base of the PR and between cd3772b7dcb4febb3c2d07ae46d5a81398b93e29 and 4d51c6a3dcc5b065f32d059ab1fb0ed1a9d6d9c8.
📒 Files selected for processing (15)
src/main/runtime/orca-runtime.tssrc/main/runtime/rpc/methods/orchestration-worker-topology.tssrc/main/runtime/rpc/methods/orchestration-workers-new-worktree.test.tssrc/main/runtime/rpc/methods/orchestration-workers.tssrc/main/runtime/rpc/methods/orchestration.test.tssrc/main/zcode/interactive-client.test.tssrc/main/zcode/interactive-client.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/i18n/locales/en.jsonsrc/shared/agent-hook-listener.tssrc/shared/agent-hook-relay.tssrc/shared/tui-agent-config.tssrc/shared/tui-agent-startup.test.tssrc/shared/types.ts
🚧 Files skipped from review as they are similar to previous changes (7)
- src/preload/api-types.ts
- src/preload/index.ts
- src/shared/agent-hook-relay.ts
- src/renderer/src/i18n/locales/en.json
- src/shared/agent-hook-listener.ts
- src/shared/tui-agent-startup.test.ts
- src/shared/types.ts
ed977a9 to
b6d01e0
Compare
|
Rebased onto current
Validation after rebase: Node/CLI/Web typecheck passed, formatting passed, changed-code quality passed with zero new findings, and 23 affected test files passed (890 tests). |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Fresh cross-model review after the latest rebase is clean: native Kiro / Claude Opus 5 High reviewed the full 180,518-byte branch bundle in 5 bounded passes after a clean TruffleHog scan. All 5 passes returned zero accepted/actionable findings; no fallback reviewer was used. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/main/runtime/orca-runtime.ts (1)
22282-22305: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract the duplicated
deferStartupAgentterminal-creation block into a shared helper.The same
createDeferredAgentTerminaland warning-on-failure logic appears at three locations. Extract a shared private helper that accepts the worktree selector, agent options, and warning-message prefix, returning the created terminal or a structured failure. This keeps future fixes consistent across all deferred-agent startup paths.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e4b6b119-f9f3-441e-80fc-20b942cf498a
📥 Commits
Reviewing files that changed from the base of the PR and between b6d36c2 and b6d01e0a93def4d2a7668826a6791dc37f1e926a.
📒 Files selected for processing (90)
README.mdconfig/tsconfig.cli.jsondocs/readme/README.es.mddocs/readme/README.fr.mddocs/readme/README.ja.mddocs/readme/README.ko.mddocs/readme/README.pt.mddocs/readme/README.zh-CN.mdmobile/src/tasks/mobile-tui-agents.tssrc/main/agent-hooks/managed-agent-hook-registry.tssrc/main/agent-hooks/managed-hook-local-filesystem.test.tssrc/main/agent-hooks/remote-hook-service-installers.test.tssrc/main/agent-hooks/remote-managed-hook-installers.tssrc/main/codex-accounts/service.test.tssrc/main/ipc/agent-hooks.test.tssrc/main/ipc/agent-hooks.tssrc/main/ipc/preflight.test.tssrc/main/ipc/zcode-hook-status-ipc.tssrc/main/providers/agent-foreground-process-zcode.test.tssrc/main/rate-limits/service.test.tssrc/main/rate-limits/service.tssrc/main/rate-limits/zcode-usage-fetcher.test.tssrc/main/rate-limits/zcode-usage-fetcher.tssrc/main/runtime/orca-runtime.tssrc/main/runtime/orchestration/preamble.test.tssrc/main/runtime/orchestration/preamble.tssrc/main/runtime/rpc/methods/client-ui-schemas.tssrc/main/runtime/rpc/methods/orchestration-federation-setup.tssrc/main/runtime/rpc/methods/orchestration-worker-lifecycle.tssrc/main/runtime/rpc/methods/orchestration-worker-setup-gate.tssrc/main/runtime/rpc/methods/orchestration-worker-start-receipt.tssrc/main/runtime/rpc/methods/orchestration-worker-topology.tssrc/main/runtime/rpc/methods/orchestration-workers-new-worktree.test.tssrc/main/runtime/rpc/methods/orchestration-workers.tssrc/main/runtime/rpc/methods/orchestration.test.tssrc/main/zcode/hook-service.test.tssrc/main/zcode/hook-service.tssrc/main/zcode/interactive-client.test.tssrc/main/zcode/interactive-client.tssrc/main/zcode/zcode-hook-config.test.tssrc/main/zcode/zcode-hook-config.tssrc/preload/api/agent-hook-api.tssrc/preload/index.tssrc/renderer/src/components/settings/appearance-status-bar-grok-toggle-search.tssrc/renderer/src/components/settings/appearance-status-bar-search.tssrc/renderer/src/components/stats/GrokUsagePane.test.tsxsrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/components/status-bar/status-bar-agent-gating.test.tssrc/renderer/src/components/status-bar/status-bar-agent-gating.tssrc/renderer/src/components/status-bar/status-bar-provider-visibility.test.tssrc/renderer/src/components/status-bar/status-bar-provider-visibility.tssrc/renderer/src/components/status-bar/tooltip.tsxsrc/renderer/src/components/status-bar/usage-error-copy.tssrc/renderer/src/components/status-bar/usage-provider-settings-target.tssrc/renderer/src/components/terminal-pane/title-agent-identity.test.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/agent-catalog.tsxsrc/renderer/src/lib/agent-status.tssrc/renderer/src/store/slices/rate-limits.tssrc/renderer/src/store/slices/ui.test.tssrc/renderer/src/store/slices/ui.tssrc/renderer/src/web/web-preload-api.tssrc/shared/agent-hook-listener.test.tssrc/shared/agent-hook-listener.tssrc/shared/agent-hook-relay.tssrc/shared/agent-hook-types.tssrc/shared/agent-kind.tssrc/shared/agent-name-token-match.tssrc/shared/agent-node-entrypoint-identities.tssrc/shared/agent-process-recognition.test.tssrc/shared/agent-session-resume.tssrc/shared/agent-status-types.tssrc/shared/agent-type-label.tssrc/shared/local-agent-install-dir-detection.tssrc/shared/persisted-ui-state-types.tssrc/shared/rate-limit-types.test.tssrc/shared/rate-limit-types.tssrc/shared/skills-cli-agent-keys.tssrc/shared/status-bar-defaults.tssrc/shared/telemetry-events.tssrc/shared/tui-agent-config.tssrc/shared/tui-agent-display-names.tssrc/shared/tui-agent-selection.tssrc/shared/tui-agent-startup.test.tssrc/shared/tui-agent.tssrc/shared/ui-chrome-types.ts
🚧 Files skipped from review as they are similar to previous changes (75)
- docs/readme/README.fr.md
- src/shared/status-bar-defaults.ts
- docs/readme/README.ja.md
- src/renderer/src/store/slices/ui.test.ts
- src/shared/telemetry-events.ts
- docs/readme/README.ko.md
- docs/readme/README.es.md
- src/shared/agent-hook-listener.test.ts
- src/main/agent-hooks/remote-managed-hook-installers.ts
- src/main/ipc/preflight.test.ts
- src/shared/local-agent-install-dir-detection.ts
- docs/readme/README.pt.md
- src/shared/agent-type-label.ts
- src/renderer/src/i18n/locales/es.json
- src/main/codex-accounts/service.test.ts
- src/shared/agent-status-types.ts
- src/main/agent-hooks/managed-hook-local-filesystem.test.ts
- src/renderer/src/components/status-bar/tooltip.tsx
- src/shared/tui-agent-display-names.ts
- mobile/src/tasks/mobile-tui-agents.ts
- src/renderer/src/components/stats/GrokUsagePane.test.tsx
- README.md
- src/shared/rate-limit-types.test.ts
- src/main/rate-limits/zcode-usage-fetcher.test.ts
- src/renderer/src/components/status-bar/status-bar-agent-gating.ts
- src/main/runtime/rpc/methods/client-ui-schemas.ts
- src/main/zcode/interactive-client.test.ts
- src/shared/agent-hook-types.ts
- src/main/zcode/zcode-hook-config.test.ts
- src/shared/rate-limit-types.ts
- src/shared/tui-agent-selection.ts
- src/renderer/src/store/slices/rate-limits.ts
- src/shared/agent-name-token-match.ts
- src/renderer/src/components/status-bar/status-bar-provider-visibility.test.ts
- src/main/ipc/zcode-hook-status-ipc.ts
- src/shared/agent-session-resume.ts
- src/main/rate-limits/service.test.ts
- src/renderer/src/components/status-bar/status-bar-agent-gating.test.ts
- src/renderer/src/store/slices/ui.ts
- src/renderer/src/components/settings/appearance-status-bar-search.ts
- config/tsconfig.cli.json
- src/main/zcode/interactive-client.ts
- src/main/runtime/orchestration/preamble.ts
- src/renderer/src/components/status-bar/usage-error-copy.ts
- src/renderer/src/components/terminal-pane/title-agent-identity.test.ts
- src/renderer/src/lib/agent-catalog.tsx
- src/shared/tui-agent-startup.test.ts
- src/renderer/src/components/status-bar/StatusBar.tsx
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/components/status-bar/status-bar-provider-visibility.ts
- src/main/ipc/agent-hooks.ts
- src/renderer/src/web/web-preload-api.ts
- src/main/zcode/hook-service.test.ts
- docs/readme/README.zh-CN.md
- src/shared/agent-kind.ts
- src/main/ipc/agent-hooks.test.ts
- src/main/zcode/zcode-hook-config.ts
- src/renderer/src/lib/agent-status.ts
- src/renderer/src/components/status-bar/usage-provider-settings-target.ts
- src/preload/index.ts
- src/main/agent-hooks/remote-hook-service-installers.test.ts
- src/renderer/src/i18n/locales/zh.json
- src/main/runtime/rpc/methods/orchestration-workers-new-worktree.test.ts
- src/main/agent-hooks/managed-agent-hook-registry.ts
- src/shared/tui-agent-config.ts
- src/shared/agent-hook-relay.ts
- src/renderer/src/components/settings/appearance-status-bar-grok-toggle-search.ts
- src/main/rate-limits/zcode-usage-fetcher.ts
- src/main/runtime/rpc/methods/orchestration.test.ts
- src/main/rate-limits/service.ts
- src/shared/agent-hook-listener.ts
- src/shared/skills-cli-agent-keys.ts
- src/renderer/src/i18n/locales/ko.json
- src/main/zcode/hook-service.ts
- src/renderer/src/i18n/locales/ja.json
|
Thanks for triaging this! The open CodeRabbit finding is addressed in c7f6fe0d: setup stages are no longer recorded as settled unless the setup receipt actually reached a terminal state. The branch is on the large side, so if it helps review I'm happy to split it — e.g. (1) ZCode agent catalog/launch + hooks/status and (2) orchestration worker support. Just let me know what shape works best. CI doesn't run from my fork, but the touched suites ( |
|
Added the final ZCode interactive TUI readiness and structured-output bridge in The PR description now includes the full live Orca -> ZCode TUI -> provider session -> SQLite transcript -> Independent review found and we fixed two issues before push: explicit @coderabbitai review |
|
✏️ Learnings added
🧠 Learnings used✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 768fcb67-296d-4324-89bd-38a22000b6e2
📥 Commits
Reviewing files that changed from the base of the PR and between b6d01e0a93def4d2a7668826a6791dc37f1e926a and 7baffe1ea8fce771f6834e07ee72317f6dbdeb0c.
📒 Files selected for processing (29)
src/main/ai-vault/session-scanner-opencode-sqlite-worker-client.tssrc/main/ai-vault/session-scanner-opencode-sqlite-worker-entry.tssrc/main/ai-vault/session-scanner-opencode-sqlite-worker-protocol.tssrc/main/ai-vault/session-scanner-opencode-sqlite-worker-spawn.tssrc/main/ai-vault/zcode-sqlite-transcript.test.tssrc/main/ai-vault/zcode-sqlite-transcript.tssrc/main/native-chat/session-file-resolver.tssrc/main/native-chat/transcript-reader.tssrc/main/native-chat/transcript-tail-reader.tssrc/main/native-chat/transcript-watch.tssrc/main/native-chat/zcode-transcript-watch.tssrc/main/runtime/orca-runtime.test.tssrc/main/runtime/orca-runtime.tssrc/main/runtime/orchestration/worker-transcript-read.tssrc/main/runtime/rpc/methods/orchestration-federation-setup.test.tssrc/main/runtime/rpc/methods/orchestration-federation-setup.tssrc/main/runtime/rpc/methods/orchestration-worker-setup-gate.test.tssrc/main/runtime/rpc/methods/orchestration-worker-setup-gate.tssrc/main/runtime/rpc/methods/orchestration-workers.tssrc/main/runtime/rpc/methods/orchestration.test.tssrc/main/zcode/interactive-client.test.tssrc/main/zcode/interactive-client.tssrc/shared/agent-hook-listener.test.tssrc/shared/agent-hook-listener.tssrc/shared/draft-paste-ready-scanner.test.tssrc/shared/draft-paste-ready-scanner.tssrc/shared/native-chat-agent-support.test.tssrc/shared/native-chat-agent-support.tssrc/shared/tui-agent-config.ts
🚧 Files skipped from review as they are similar to previous changes (5)
- src/shared/agent-hook-listener.test.ts
- src/main/runtime/rpc/methods/orchestration-federation-setup.ts
- src/shared/agent-hook-listener.ts
- src/main/runtime/rpc/methods/orchestration.test.ts
- src/main/runtime/orca-runtime.ts
|
Addressed both latest CodeRabbit findings in
Verification after the fixes: 41 suites passed, 1,318 tests passed, 1 skipped; Node/CLI/Web typecheck passed; targeted native and type-aware lint passed; TruffleHog passed; isolated GLM-5.2 Max review of the review-fix bundle returned clean. Both review threads are resolved. |
|
@coderabbitai review |
Greptile SummaryAdds ZCode as a first-class agent across launch selection, process recognition, permissions, managed local and SSH hooks, lifecycle normalization, presentation, and telemetry.
Confidence Score: 5/5The PR appears safe to merge with no concrete blocking or independently actionable non-blocking defects identified. The ZCode integration keeps its launch, hook transport, event attribution, configuration preservation, and client-facing contracts aligned, and the investigated edge cases did not establish a reachable changed-code failure.
|
| Filename | Overview |
|---|---|
| src/main/zcode/hook-service.ts | Implements local and SSH managed-hook installation, status inspection, script refresh, and local removal with enabled-state restoration. |
| src/main/zcode/zcode-hook-config.ts | Adds idempotent ZCode hook configuration merging and cleanup while retaining unrelated user-authored entries. |
| src/shared/agent-hook-listener/providers/zcode-events.ts | Attributes ZCode’s Claude-compatible lifecycle events to the ZCode agent type. |
| src/shared/agent-hook-listener/provider-event-routing.ts | Adds ZCode new-turn and Claude-compatible tool-field routing. |
| src/shared/tui-agent-config-zcode.ts | Extracts the existing ZCode executable, process identity, and prompt-delivery profile into a dedicated module. |
| src/main/agent-hooks/remote-managed-hook-installers.ts | Registers ZCode’s installer in the allowlisted SSH managed-hook installation flow. |
| src/shared/agent-session-resume.ts | Captures ZCode’s provider session identifier without advertising unsupported resume behavior. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Agent picker] --> B[ZCode launch profile]
B --> C[zcode process]
C --> D[Managed ZCode hooks]
D --> E[Authenticated loopback listener]
E --> F[ZCode event normalizer]
F --> G[Shared agent status]
G --> H[Desktop, web, and mobile presentation]
Reviews (1): Last reviewed commit: "refactor(zcode): keep integration within..." | Re-trigger Greptile
|
Hi @justforyoudear — thank you so much for the offer, and for sharing your Windows setup; that's exactly the platform this PR could use more eyes on. No rush or obligation at all — anything you try helps. Whenever convenient, the current head can be tested without waiting for merge: git clone https://github.com/stablyai/orca.git && cd orca
gh pr checkout 13965
pnpm install && pnpm devYou already know the areas worth a look — detection, process recognition, managed hooks, and status reporting on your setup. Even a quick "works on my machine (Windows + your shell)" is valuable signal, and if anything looks off, just note it here and I'll take it from there. Thanks again for helping push this forward! 🙏 |
|
Windows validation — all three checkpoints from the testing invitation pass. Environment and findings below. Environment
1. Detection & launch — ✅
2. Managed hooks — ✅
3. Status reporting — ✅
One anomaly to look at
Thanks for the branch — happy to test more (Yolo path, relaunch hook dedup, and the follow-up #16227/#16228 once they land). |
|
One more user-side finding from the Windows pass, worth recording for Orca+zcode workflows (not a PR bug — heads-up for docs/testing notes): ZCode uses two config stores that don't auto-sync: the desktop app reads Practical takeaway: for Orca + zcode, configure providers/models in |
|
This would be great if merged, basically giving us 50% more quota if we go by their documentation 👏 |
1dbe685 to
d9500a4
Compare
|
Updated and rebased onto the latest |
|
Hi @justforyoudear — thank you so much for the thorough Windows validation. This is exceptionally helpful, and the detailed environment and hook information makes the result especially actionable. It’s great to have confirmation that detection and launch, managed hooks, and live status transitions all work on Windows. I’ve also noted the The two-config-store finding is also a valuable heads-up. I agree that it should not expand the scope of this core integration PR, but it would make a useful documentation note for Orca + ZCode users. A small follow-up docs PR would be very welcome if you’re interested, but absolutely no obligation—you’ve already contributed a lot here. I’ve since rebased the branch and added a mixed-version SSH relay compatibility fallback. Your results against Thanks again for spending the time on this and for helping move the PR forward! 🙏 |
|
Gentle ping for review when someone has a cycle 🙂 Quick recap since the thread has grown:
@Jinwoo-H is anything blocking review here, or anything you'd like scoped differently (e.g. split further) to make it easier to land? Happy to adjust. |
|
Great addition, looking forward to this. Is there a different way to use zcode in orca today? |
|
Hi @caiolrm — thanks! Unfortunately not today: If you'd like it before review + merge lands, the branch builds locally — same steps as upthread ( |
|
Hey, would love to see this land in Orca. Right now I run GLM through Claude Code pointed at the Z.ai endpoint. It works, but Orca treats it as a plain terminal – no idea if the agent is working, waiting or done. With a few workers running in parallel that gets annoying. This PR fixes exactly that, and since Z.AI Coding Plan limits are already tracked (#18556), ZCode being on the agent list is the obvious next step. @Jinwoo-H any chance this can get a review? Happy to test further builds. |
|
Can't wait... So painful without that |
d9500a4 to
846bb93
Compare
|
Rebased onto current |
Signed-off-by: guanbear <123guan@gmail.com>
846bb93 to
30ecf5f
Compare
|
Refreshed onto current upstream Validation on the refreshed core stack:
|
ZCode harness is green — please try it and comment on #22464Test instructions: #22464 (comment) Build: https://github.com/stablyai/orca-adhoc/releases/tag/v1.4.210-adhoc.20260923230858 CI is now fully green (31/31). Please comment on #22464 with what you find — whether it works or breaks. Include your OS and The two gaps I can't close myself:
|
|
Closing this one — ZCode landed in #22464, now on I want to be straight that your PR got there first on the part that mattered most. You worked out that the install target is What let #22464 finish was timing, not insight: Z.ai open-sourced the CLI in the interim, so I could check the assumptions your PR had to take on faith. The big one was the hooks blocker — You're credited in the PR body and the issue. Thank you for the groundwork — and please do come back for the follow-ups if you're interested; there's more below on #14556. |
|
@nwparker Thank you for the thoughtful closeout and for crediting the earlier work. Your source-backed note about I followed the scope you suggested for the remaining work: #23513 is AI Vault only on current |
Summary
Adds ZCode to Orca's first-class agent contract: catalog selection, launch settings, process recognition, managed hooks, normalized lifecycle status, SSH hook installation, mobile/web labels, and telemetry.
This refreshes #10654 against current
mainand credits @innocarpe's earlier implementation.Fixes #10564.
Scope
This PR is now the reviewable core only. It does not include:
Those pieces are split into draft follow-ups so the first-class agent contract can be reviewed independently.
Follow-ups
What Changed
zcodeacross desktop, web, mobile, selection, labels, telemetry, and resume/status types.zcodelauncher andzcode-cliprocess identity.agentDefaultArgsflow.~/.zcode/cli/config.jsonlocally and over SSH.hooks.enabledvalue when Orca hooks are removed.Runtime Support
zcodeexecutable onPATHVisual Proof
Validation
git diff --checkpass.Security And Compatibility
AI Disclosure
Implemented with OpenAI Codex and validated with focused tests and typechecks.