Repository navigation
Conversation
|
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:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 10e8c52c28c39b7afcba5bcd278d6bebc5fe2482 and c65f59ce8264024f3304da30784540e93d95922c. 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughAdds Mistral Vibe as a supported local agent. The change installs and manages Vibe Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: 🔵 Low · up to Linux users following the unpaired troubleshooting command may invoke a binary that cannot start the server. Correct the example before merge or ensure affected users are informed. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 0e662573-f109-4ed0-8eb7-aae044b94ba7
📥 Commits
Reviewing files that changed from the base of the PR and between 9927edd and 2e0c381a8d57d1190fc5ff4a46a1c580e1283e29.
📒 Files selected for processing (20)
config/tsconfig.cli.jsonsrc/main/agent-hooks/managed-agent-hook-registry.tssrc/main/agent-hooks/remote-hook-service-installers.test.tssrc/main/agent-hooks/server-retired-pane-new-turn.test.tssrc/main/vibe/hook-config-toml.test.tssrc/main/vibe/hook-config-toml.tssrc/main/vibe/hook-script-source.tssrc/main/vibe/hook-service.test.tssrc/main/vibe/hook-service.tssrc/renderer/src/runtime/agent-resume-host-authority-capability.tssrc/shared/agent-hook-listener/provider-dispatch.tssrc/shared/agent-hook-listener/provider-event-routing.tssrc/shared/agent-hook-listener/providers/vibe-events.test.tssrc/shared/agent-hook-listener/providers/vibe-events.tssrc/shared/agent-hook-listener/providers/vibe-tool-fields.tssrc/shared/agent-hook-listener/source-routing.tssrc/shared/agent-hook-relay.tssrc/shared/agent-hook-types.tssrc/shared/agent-session-resume.tssrc/shared/protocol-version.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
Important
Vibe's hook installer is registered unconditionally, so a Windows machine with vibe on PATH installs a POSIX-only /bin/sh command into ~/.vibe/hooks.toml — a hook Vibe (via cmd.exe) can't execute. Gate the service on non-win32 (details inline).
Reviewed changes
- Managed hook transport (
src/main/vibe/): a marker-delimited[[hooks]]block written into~/.vibe/hooks.tomlplus a read-only POSIX observer script, modeled on Kimi's TOML install and Codex'spost_*_hookscript. - Event normalization (
src/shared/agent-hook-listener/providers/vibe-*.ts): mapspre_tool/post_tool→working(with tool fields/output) andpost_agent→done, which also doubles as the new-turn boundary. - Registries & switches:
AgentHookSource/AgentHookTargetgainmistral-vibe,/hook/mistral-viberoute, and the exhaustive dispatch/tool-field/new-turn switches are extended. - Session resume:
mistral-vibejoinsRESUMABLE_TUI_AGENTS, resolvesvibe --resume <id>, gated behind a newagent-session.vibe-resume.v1capability. - Tests: three new suites (16 tests) covering the TOML block, the service, and event normalization, plus the remote-installer guard test.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
On the docstring coverage warning (41.67%, threshold 80%) — declining. This repo's project convention ( |
There was a problem hiding this comment.
ℹ️ No critical issues — the Windows-gating fix lands cleanly; one minor cross-platform test suggestion inline.
Reviewed changes
- Gated Vibe hooks on non-win32:
VibeHookService.install()/getStatus()/remove()now return askippedstatus (skipReason: "platform_unsupported") andrefreshManagedScripts()no-ops on Windows, so Orca no longer writes a POSIX-only/bin/shlauncher into~/.vibe/hooks.tomlthatcmd.execan't execute. - Coverage-test exemption: a new
MANAGED_HOOK_POSIX_ONLY_AGENTSallowlist letsmanaged-hook-script-refresh.test.tsskip the reverse refresher→file check for Vibe under a forced win32 platform. - New skip reason:
platform_unsupportedadded toAgentHookInstallSkipReason, plus four Windows-path tests inhook-service.test.ts.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 5e66b3c0-4bc0-46f1-b3a9-db0f03eb6c87
📥 Commits
Reviewing files that changed from the base of the PR and between 2e0c381a8d57d1190fc5ff4a46a1c580e1283e29 and eb5e3a5bb77a23c12ced7d74e61312ff44349357.
📒 Files selected for processing (5)
src/main/agent-hooks/managed-agent-hook-registry.tssrc/main/agent-hooks/managed-hook-script-refresh.test.tssrc/main/vibe/hook-service.test.tssrc/main/vibe/hook-service.tssrc/shared/agent-hook-types.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — one follow-up commit addressing the prior test-platform-gating thread, plus a Windows stale-hook cleanup.
- POSIX test enforcement: the outer
beforeEachnow forcessetPlatform('darwin')so the non-Windows tests run POSIX regardless of host platform (restored inafterEach), matching theantigravity/hook-service.test.tsprecedent. - Stale-block cleanup on Windows:
stripStaleManagedBlock()strips a managed block left by a prior macOS/Linux install beforeinstall()/remove()returnskipped, so a reused home dir can't leave Vibe a POSIXpre_toolcommandcmd.execan't execute. Idempotent — no write when the block is absent. - New tests: two Windows-path tests assert install/remove strip a POSIX-inherited block.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 088d9079-b85a-4ac4-bf90-e850f87a0a99
📥 Commits
Reviewing files that changed from the base of the PR and between eb5e3a5bb77a23c12ced7d74e61312ff44349357 and 6acb06b1ed451626bf4e2b777a9f77a89189eed3.
📒 Files selected for processing (7)
.github/workflows/cloud-deploy-relay-production-director.ymlconfig/scripts/verify-localization-catalog.mjsdocs/reference/windows-edr-posture.mddocs/site/content/docs/install.mdxdocs/site/content/docs/remote-servers.mdxsrc/main/vibe/hook-service.test.tssrc/main/vibe/hook-service.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
6acb06b to
9af4d08
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Dropped unrelated doc/workflow noise: the formatter churn (
cloud-deploy-relay-production-director.yml,verify-localization-catalog.mjs,windows-edr-posture.md,install.mdx,remote-servers.mdx) bundled into the prior revision is gone — the branch now touches only Vibe-hook files. - Rebased the stale-block + POSIX-test fix:
9af4d08is a clean two-file commit.stripStaleManagedBlock()(idempotent cleanup of a macOS/Linux-managed block on the win32 install/remove path) and the outersetPlatform('darwin')beforeEachare unchanged from the previously approved version.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Heads-up from #20148 (fixes #18861) — this is not a review of the feature, just one file that will collide.
const MANAGED_BLOCK_RE = new RegExp(
`\\n*${escapeRegex(BLOCK_START)}[\\s\\S]*?(?:${escapeRegex(BLOCK_END)}[^\\n]*|$)`,
'g'
)The #20148 replaced that approach with Credit to @cat-xierluo, who flagged this lockstep risk on #19033 before either PR landed. No action needed if #20148 merges first and this branch rebases onto the shared module — flagging so the copy does not ship as-is. |
|
Following up now that #20148 has merged (
const MANAGED_BLOCK_RE = new RegExp(
`\\n*${escapeRegex(BLOCK_START)}[\\s\\S]*?(?:${escapeRegex(BLOCK_END)}[^\\n]*|$)`,
'g'
)The What to use instead —
Credit to @cat-xierluo, who flagged this lockstep risk on #19033 before either PR landed. Happy to review the swap if that's useful — no other comment on the feature itself. |
|
Adopted. |
9af4d08 to
10e8c52
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: f4d2e9c4-a01a-49f7-b57d-0a92aeb5b995
📥 Commits
Reviewing files that changed from the base of the PR and between 6acb06b1ed451626bf4e2b777a9f77a89189eed3 and 10e8c52c28c39b7afcba5bcd278d6bebc5fe2482.
📒 Files selected for processing (11)
config/tsconfig.cli.jsonsrc/main/agent-hooks/managed-agent-hook-registry.tssrc/main/agent-hooks/managed-hook-command-contract.test.tssrc/main/agent-hooks/remote-hook-service-installers.test.tssrc/main/vibe/hook-config-toml.test.tssrc/main/vibe/hook-config-toml.tssrc/main/vibe/hook-service.tssrc/shared/agent-hook-listener/provider-event-routing.tssrc/shared/agent-hook-relay.tssrc/shared/agent-session-resume.tssrc/shared/protocol-version.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — the #18861 ownership port lands cleanly; one minor test-ratchet suggestion inline.
Reviewed changes — incremental delta since the prior pullfrog review (9af4d08): commit 10e8c52 rebuilds Vibe's TOML ownership on the shared managed-toml-ownership module.
- Adopted shared TOML ownership:
hook-config-toml.tsdrops its verbatim Kimi marker regex forfindManagedTomlBlocks+findRecognizedManagedTables+stripManagedTomlRegions, so install/remove/status share one ownership matcher and an orphaned start marker owns only its stray marker line (#18861). - Strict table recognizer:
matchManagedHookTableparses the[[hooks]]key run and fails closed on unknown extent;readManagedVibeHookTypescounts managed tables wherever they sit. - CRLF-preserving writes:
buildManagedVibeHooksBlock/apply/removethread the config's EOL through, so a Windows-edited config round-trips verbatim. - Ported #18861 regression suite: orphaned block with a user tail, stray marker, user
[[hooks]]table, customized managed table, and CRLF round-trip. - Registered
mistral-vibein the command contract as a local-only POSIX builder, plus a remote-direction exception for local-only agents.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — incremental delta since the prior pullfrog review (10e8c52, #5196238668): commit c65f59c addresses the one open inline thread and hardens the config write.
- Narrowed the contract-test remote skip: the
#7253reverse ratchet inmanaged-hook-command-contract.test.tsnow only skips agents that have a local builder, so exemption-only agents (amp,hermes) are asserted present in the remote registry again while Vibe's local-only exemption still holds. - Pinned the atomic
hooks.tomlwrite mode:writeConfigTomlnow uses0600for a new file and preserves the existing file'sstatSync().mode & 0o777, so therenameSyncthat replaces the inode can no longer promote a umask-derived temp-file mode onto the user's config.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Mistral Vibe was registered as a launchable agent but had no integration with Orca's hook, status, or resume systems. Vibe now supports hooks (TOML [[hooks]] blocks: pre_tool, post_tool, post_agent), so this closes the gap at parity with Kimi/Claude. Wired: managed hook install into ~/.vibe/hooks.toml, HTTP route /hook/mistral-vibe with event normalization, and session resume via vibe --resume <id> (gated behind agent-session.vibe-resume.v1 capability). Local-only.
Vibe spawns hook commands via asyncio.create_subprocess_shell, which is cmd.exe on Windows. The managed launcher is POSIX /bin/sh, so installing it on win32 writes a hook Vibe cannot execute — and a failed pre_tool could gate tools instead of passing through. Skip the whole service on win32 until a .cmd launcher exists. Adds a 'platform_unsupported' skip reason and a POSIX-only allowlist the managed-hook-script-refresh coverage test reads to exempt Vibe under a forced win32 platform.
The non-Windows hook-service tests assumed POSIX but ran against the real process.platform, so they would fail on a Windows host where the service now returns 'skipped'. Force darwin in the outer beforeEach (the on-Windows block overrides to win32), mirroring antigravity/hook-service.test.ts. Also strip any existing managed Vibe block on the win32 install/remove path. A home dir reused after a macOS/Linux install can still hold the managed POSIX pre_tool command, which Vibe runs via cmd.exe on Windows and fails before tool calls. The strip is idempotent (no write when the block is absent).
…ck data loss (stablyai#18861) The Vibe TOML module carried a verbatim copy of the Kimi marker-block regex whose |$ fallback treated everything from an orphaned start marker to EOF as Orca-owned. Rebuild it on managed-toml-ownership.ts: a marker pair proves extent, and any [[hooks]] table whose command invokes the managed script is reclaimed by recognition wherever it sits. Install, remove and status share one ownership matcher; unknown table extent fails closed; CRLF round-trips verbatim. Ports the stablyai#18861 regression suite from Kimi and registers mistral-vibe in the managed-hook command contract (local-only, POSIX-only).
…te mode The contract-test skip for local-only agents also matched exemption-only agents (amp, hermes), silencing the stablyai#7253 remote-registry ratchet for them; narrow it to agents with a builder entry. And pin the atomic config write: renameSync replaces the inode, so the umask-derived temp mode became the config's mode — use 0600 for new files and preserve the existing mode on update.
c65f59c to
e2a9be9
Compare

Summary
Mistral Vibe was registered as a launchable agent but had no integration with Orca's hook, status, or resume systems. Vibe now supports hooks (TOML
[[hooks]]blocks: pre_tool, post_tool, post_agent), so this brings it to parity with Kimi and Claude.Wired: managed hook install into ~/.vibe/hooks.toml, HTTP route
/hook/mistral-vibewith event normalization, and session resume viavibe --resume <id>(gated behindagent-session.vibe-resume.v1capability). Local-only, and install is skipped on Windows where Vibe runs hooks through cmd.exe.ELI5
Orca is a terminal app that watches coding agents (like Claude Code or Codex) and shows their live status in a sidebar (what tool they're running, when they're done) and lets you resume a past session. To do this, the agent must emit lifecycle events Orca can listen to.
Mistral Vibe was launchable from Orca but emitted nothing Orca understood, so its sidebar stayed blank and you couldn't resume its sessions. Vibe recently added a hook system (lifecycle events), so this PR plugs Vibe into Orca's existing listener, same pattern as Kimi, giving Vibe live status, tool display, and resume.
What Changed
src/main/vibe/: managed hook service modeled on Kimi. Writes a marker-delimited block of three[[hooks]]entries (orca-pre-tool,orca-post-tool,orca-post-agent) into~/.vibe/hooks.toml, plus a POSIX launcher script that captures stdin, POSTs to Orca's local hook server, and spools on failure. Orca is a read-only observer: the script always exits 0 with empty stdout and never denies or rewrites Vibe's tool decisions.vibe-events.tsnormalizespre_tool/post_tooltoworking,post_agenttodone;vibe-tool-fields.tsextractstool_name/tool_input/tool_output/tool_error.AgentHookTarget,AgentHookSource,/hook/mistral-viberoute, provider dispatch,isNewTurnEvent/extractToolFieldsexhaustive switches, all four managed-hook-registry arrays,RESUMABLE_TUI_AGENTS+getAgentResumeArgv(vibe --resume <id>).agent-session.vibe-resume.v1: gates the resume path so an older remote host answers the unknown enum member safely instead of dying.VibeHookServiceskips install on win32 (returnsskipReason: "platform_unsupported") because Vibe runs hooks via cmd.exe and cannot execute a/bin/shscript.install()andremove()also strip any stale managed block left by a prior macOS/Linux install, so a reused home directory does not leave Vibe a broken hook. Addedplatform_unsupportedtoAgentHookInstallSkipReasonand aMANAGED_HOOK_POSIX_ONLY_AGENTSallowlist the managed-hook-script-refresh coverage test reads to exempt Vibe under a forced win32 platform.Why
Vibe is in Orca's catalog and process recognition, but without hook/status/resume integration it had no live status, no tool visibility, and no session continuity. Vibe's new hook contract is structurally identical to Claude's (stdin JSON + exit-code/stdout) but TOML-configured like Kimi, so the Kimi marker-block template is the right fit: simple, local-only, no trust system needed. The read-only-observer discipline matters because Vibe's
pre_toolcan gate or rewrite tools, so Orca must never interfere, only observe.The Windows gate exists because, unlike Kimi (whose shell is Git Bash on Windows and accepts a forward-slashed
.sh), Vibe has no working shell for.shon win32. Installing anyway would write a hook Vibe cannot run, and a failedpre_toolcould gate tools instead of passing through.Linked Issue
Fixes #19261
Visual Proof
Testing
Manual: local
vibe2.24.3 on macOS. Confirmed~/.vibe/hooks.tomlgets threeorca-*blocks, the managed script exists and POSTs, the sidebar showsworking+ tool name/input during tool calls anddoneat turn end, andvibe --resume <id>relaunches the session.Automated: 3 new test files (22 tests):
vibe/hook-config-toml.test.ts,vibe/hook-service.test.ts,providers/vibe-events.test.ts.pnpm tcclean;pnpm test agent-hook1139 pass; coverage gatemanaged-hook-script-refreshpasses; oxlint clean. Platforms tested: macOS. Windows not tested on-device, but the win32 skip and stale-block cleanup are covered by forced-platform unit tests. Remote SSH not tested (local-only scope by design).AI Disclosure
I used vibe (obviously) and zAI GLM 5.2.
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Security: Managed script is read-only/exit-0 and cannot influence Vibe's tool decisions. No user input flows into the shell; the endpoint file is sourced with errors suppressed. Config writes are atomic (temp+rename).
Cross-platform: POSIX
/bin/shonly. Windows is skipped (platform_unsupported), andinstall()/remove()strip any stale managed block from a prior POSIX install so Vibe does not inherit a hook cmd.exe cannot run. macOS and Linux fully covered.Remote SSH: Not wired (no
installRemote), local-only by design. Theremote-hook-service-installers.test.tsguard now lists Vibe (cast as local-only). Remote is future work.Mobile: No mobile-specific change; the resume path mirrors existing resumable agents.
Backwards compatibility: New optional
AgentHookSourcemember; the new capability is additive and probed before use, so mixed client/host versions degrade safely. No wire or opcode changes to existing agents.Performance: Hook events are infrequent (per-tool, per-turn) with no hot-path impact. Config write is atomic with a rolling
.bak.Known limitation: Vibe appears in the sidebar only at the first
pre_tool/post_agentevent, not on TUI start, because Vibe has nosession_starthook (upstream gap).Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)