Add OpenCode Navigator session orchestration - #111
Conversation
- add native session and managed worktree tools - enforce project scope, limits, and lifecycle safety - document configuration and cover runtime behavior
- register all Navigator tools on compatible OpenCode runtimes - retain feature-level and per-tool opt-out controls - update bundled config, generated artifacts, tests, and docs
- detect and route sessions through the compatible OpenCode protocol - add legacy session handling for prompts, reads, status, and interrupts - replace V2 wait calls with local active-session polling - remove queued delivery from the Navigator send tool surface - update Navigator tests and docs for protocol-aware behavior
There was a problem hiding this comment.
★★★★☆
Solid implementation: ownership checks, worktree guards, self-target rejection, partial-failure resource reporting, and poll-based wait are all consistently handled and well-tested. One medium edge-case finding inline on navigator.ts — legacy (V1) errored tool outputs are silently dropped because the projected error shape does not match what summarizeMessages reads.
- add optional agent and model overrides to session_send - map V1 sends to promptAsync agent/model fields - switch V2 session agent or model before steering prompts - document wait timeout defaults and caps - cover V2 context switching in Navigator tests
- register a bundled Rift workspace adapter for OpenCode experimental workspaces - prefer Rift for new Navigator workspaces when available and use Git worktrees as fallback - use Rift copy-all snapshots and default storage to avoid filtered APFS copy failures - document Rift behavior and cover adapter/list/remove paths in tests
There was a problem hiding this comment.
★★★★☆
Solid follow-up: the previously raised legacy errored-tool-output issue is fixed and tested, and the Rift workspace adapter integrates cleanly with listing, creation, and removal. One medium edge-case inline on navigator.ts — on the V1 protocol path, active-session tracking does not enumerate Rift workspace directories, so an active session running in a Rift workspace is invisible to session_wait, the worktree_remove active-session guard, and the session_create concurrency cap.
- retry Rift workspace removal once when OpenCode re-discovers the path - fail if Navigator cannot confirm the workspace disappeared - cover stale-list retry behavior in Navigator tests
There was a problem hiding this comment.
★★★★☆
The new Rift removal retry/verification logic in worktree_remove is sound and well-covered by the updated navigator.test.ts (stale-list re-discovery path is exercised, failure fails closed).
The outstanding concern from the open thread on navigator.ts:176 is not addressed by this commit: on the V1 protocol branch, activeSessionIDs calls listManagedWorktrees(client, navigator.checkout) without navigator.projectID, so listRiftWorkspaces is never consulted. A session running in a Rift workspace therefore stays invisible to session_wait polling, the worktree_remove active-session guard, and the session_create maxConcurrentSessions cap. Smallest fix remains passing navigator.projectID so Rift workspace directories are enumerated. No new inline findings beyond that open thread.
|
Handled the duplicate review-body concern from the latest bot review in |
Ticket
SKIPPED
Description
Adds opt-in OpenCode-native orchestration for creating, inspecting, continuing, waiting for, interrupting, and cleaning up sessions across the current checkout and managed worktrees. Navigator remains disabled by default, enforces project and worktree boundaries, and recovers state directly from OpenCode after plugin restarts.
Checklist
Native Orchestration
Configuration And Safety
Documentation And Distribution
Validation