From 3f96acdb2c3005dce0e75e892db8f992e63b40fd Mon Sep 17 00:00:00 2001
From: Nigel Bazzeghin
Date: Sun, 15 Nov 2026 23:24:54 -0600
Subject: [PATCH] Merge tmc-plan-pr
---
.github/workflows/ci.yml | 3 +
AGENTS.md | 5 +-
MANUAL_TEST_PLAN.md | 4 +-
README.md | 211 +++++++++-
SACRIFICIAL_PLAN_PR_TEST.md | 1 +
bun.lock | 551 ++++++++++++++++++++++++-
package.json | 31 +-
src/commands.ts | 324 +++++++--------
src/hooks/auto-status.ts | 7 +-
src/hooks/awareness.ts | 3 +-
src/hooks/compaction.ts | 4 +-
src/hooks/notifications.ts | 82 ++--
src/index.ts | 372 +++++++++--------
src/lib/job-state.ts | 8 +-
src/lib/monitor.ts | 221 +++++++---
src/lib/omo.ts | 34 +-
src/lib/orchestrator-singleton.ts | 20 +-
src/lib/orchestrator.ts | 47 ++-
src/lib/plan-state.ts | 8 +
src/lib/plan-types.ts | 10 +-
src/lib/prompt-file.ts | 9 +-
src/lib/question-relay.ts | 193 ++++++---
src/lib/reports.ts | 12 +-
src/lib/schemas.ts | 3 +
src/lib/sdk-client.ts | 64 +--
src/rpc.ts | 50 +++
src/tools/answer.ts | 25 +-
src/tools/attach.ts | 23 +-
src/tools/capture.ts | 27 +-
src/tools/cleanup.ts | 32 +-
src/tools/diff.ts | 24 +-
src/tools/jobs.ts | 20 +-
src/tools/kill.ts | 26 +-
src/tools/launch.ts | 73 ++--
src/tools/merge.ts | 23 +-
src/tools/overview.ts | 11 +-
src/tools/plan-approve.ts | 81 ++--
src/tools/plan-cancel.ts | 19 +-
src/tools/plan-status.ts | 13 +-
src/tools/plan.ts | 99 ++---
src/tools/pr.ts | 39 +-
src/tools/report.ts | 40 +-
src/tools/status.ts | 17 +-
src/tools/sync.ts | 29 +-
src/tui.ts | 37 ++
tests/hooks/notifications.test.ts | 110 ++---
tests/integration/z-workflows.test.ts | 76 ++--
tests/lib/orchestrator-modes.test.ts | 58 +++
tests/lib/question-relay-forms.test.ts | 119 ++++++
tests/lib/sdk-client.test.ts | 309 +++++++-------
tests/plugin-init.test.ts | 289 +++++++------
tests/rpc-tui.test.ts | 92 +++++
tests/tools/attach.test.ts | 28 +-
tests/tools/capture.test.ts | 24 +-
tests/tools/cleanup.test.ts | 26 +-
tests/tools/diff.test.ts | 4 +-
tests/tools/jobs.test.ts | 90 ++--
tests/tools/kill.test.ts | 22 +-
tests/tools/launch.test.ts | 39 +-
tests/tools/merge.test.ts | 12 +-
tests/tools/overview.test.ts | 84 ++--
tests/tools/plan-approve.test.ts | 61 ++-
tests/tools/plan-cancel.test.ts | 8 +-
tests/tools/plan-status.test.ts | 22 +-
tests/tools/plan.test.ts | 28 +-
tests/tools/pr.test.ts | 8 +-
tests/tools/status.test.ts | 100 ++---
tests/tools/sync.test.ts | 40 +-
68 files changed, 3001 insertions(+), 1583 deletions(-)
create mode 100644 SACRIFICIAL_PLAN_PR_TEST.md
create mode 100644 src/rpc.ts
create mode 100644 src/tui.ts
create mode 100644 tests/lib/question-relay-forms.test.ts
create mode 100644 tests/rpc-tui.test.ts
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b0d718a..2d239ea 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -25,6 +25,9 @@ jobs:
- name: Build
run: bun run build
+ - name: Typecheck
+ run: bun run typecheck
+
- name: Test
shell: bash
run: |
diff --git a/AGENTS.md b/AGENTS.md
index ade1578..f258725 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -31,8 +31,9 @@ Guide for coding agents working on `opencode-mission-control` in ULW mode.
Run these before marking work complete:
```bash
+bun run typecheck
bun run build
-bun test
+bun run test
```
If tests fail, identify whether failures are pre-existing vs introduced by your change.
@@ -46,7 +47,7 @@ If tests fail, identify whether failures are pre-existing vs introduced by your
## CI & GitHub Workflows
-- **CI** (`.github/workflows/ci.yml`) — Runs `bun run build` and `bun test` on PRs and pushes to `main`.
+- **CI** (`.github/workflows/ci.yml`) — Runs `bun run build`, `bun run typecheck` and `bun test` on PRs and pushes to `main`.
- **Conventional Commits** (`.github/workflows/conventional-commits.yml`) — Validates PR titles follow the convention.
- **CodeQL** (`.github/workflows/codeql.yml`) — Static analysis for TypeScript; runs on PRs, pushes to `main`, and weekly.
- **Publish** (`.github/workflows/publish.yml`) — semantic-release to npm on `main`.
diff --git a/MANUAL_TEST_PLAN.md b/MANUAL_TEST_PLAN.md
index f9ec92b..0bafa89 100644
--- a/MANUAL_TEST_PLAN.md
+++ b/MANUAL_TEST_PLAN.md
@@ -1417,7 +1417,7 @@ done
## Key Risks
-1. **Dogfooding paradox**: We're testing Mission Control from within a Mission Control-managed session. Launching jobs will create worktrees of this repo, and those agents will also have MC loaded (via `.opencode/plugins/mission-control.ts` -> `../../dist/index.js`). Our simple prompts and quick kills mitigate recursive chaos.
+1. **Dogfooding paradox**: We're testing Mission Control from within a Mission Control-managed session. Launching jobs will create worktrees of this repo, and those agents will also have MC loaded (via the `plugins` entry in `opencode.jsonc` or `.opencode/plugins/`). Our simple prompts and quick kills mitigate recursive chaos.
2. **Merge pollution (Phases 4 & 6)**: The merge tests temporarily bring test commits into main. We immediately `git reset --hard $SAVED_SHA` to undo. If anything goes wrong, these are the highest-risk steps. **NEVER use `HEAD~N`** — always use saved SHAs.
3. **State file corruption**: If we crash mid-test, `jobs.json` and `plan.json` may have orphaned entries. The Nuclear Cleanup script (top of document) handles this.
4. **tmux session leak**: If `mc_kill` fails, tmux sessions persist. Phase 12 force-kills all `mc-tmc-*` sessions.
@@ -1430,7 +1430,7 @@ done
11. **TouchSet testing on feature branches**: When running Phase 5G on a non-main branch, job worktrees inherit the feature branch's uncommitted changes. TouchSet validation compares the job branch against the integration branch, so feature branch source files show up as spurious violations alongside the actual test violations (e.g., `rogue.txt`). This is a testing artifact — in production, both branches share the same base so only the job's own changes appear.
12. **Port exhaustion (v1.5)**: The default port range is 14100–14199 (100 ports). If cleanup fails to release ports, the `port.lock` file accumulates stale entries. Symptoms: "No available ports" error on launch. Fix: delete `port.lock` from the state directory.
13. **Serve-mode server leak (v1.5)**: If `mc_kill` or `mc_cleanup` fails to terminate the `opencode serve` process, ports stay bound. Symptoms: next launch on the same port fails. Fix: `lsof -ti:14100-14199 | xargs kill` or use the Nuclear Cleanup script.
-14. **SDK availability (v1.5)**: Serve-mode tests (Phases 13–15) require `@opencode-ai/sdk` to be installed and the OpenCode serve endpoint to be functional. If the SDK is not available, serve-mode launches will fail at the "waiting for server" step — this is expected, not a plugin bug.
+14. **SDK availability (v1.5)**: Serve-mode tests (Phases 13–15) require `@opencode/client` to be installed and the OpenCode serve endpoint to be functional. If the SDK is not available, serve-mode launches will fail at the "waiting for server" step — this is expected, not a plugin bug.
15. **Title annotation timing (v1.5)**: Session title annotations (Phase 16) are fire-and-forget. If the SDK session API is slow or the session has already been compacted, annotations may not appear. A missing annotation is not a test failure — check the decision log in unit tests instead.
16. **Permission policy non-determinism (v1.5)**: Permission evaluation during live agent execution depends on the agent triggering permission prompts (file edits, shell commands). Simple test prompts may not trigger any prompts at all, making live permission testing unreliable. Unit tests are the source of truth for policy evaluation logic.
diff --git a/README.md b/README.md
index ca548bf..4945902 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,11 @@
+> [!IMPORTANT]
+> **Migrated fork — OpenCode V2.** This version has been ported to the OpenCode V2 plugin API (`@opencode/plugin` 2.x) and **is not compatible with OpenCode V1**. The migration is functional but **partial**: see [Migration status](#migration-status) for what is validated, what is not, and what is not migrated yet.
+
+ Migration status •
Quick Start •
Examples •
Launch vs Plan •
@@ -33,7 +37,7 @@ AI coding is fast, but context switching is slow. Running multiple agents in a s
## The Solution
-Mission Control orchestrates **isolated environments** for your AI agents. Each job gets its own git worktree and tmux session — complete filesystem isolation. You can monitor progress, capture output, or attach to any session at any time. When the work is done, sync changes back or create a PR with a single command.
+Mission Control orchestrates **isolated environments** for your AI agents. In this migrated version, each job gets its own git worktree, a local `opencode serve` process, and a tmux session — complete filesystem isolation. You can monitor progress, capture output, or attach to any session at any time. When the work is done, sync changes back or create a PR with a single command.
For complex multi-task workflows, the **Plan System** handles dependency graphs, merge ordering, automated testing, and PR creation — all orchestrated automatically. Less herding cats, more shipping code.
@@ -52,7 +56,7 @@ For complex multi-task workflows, the **Plan System** handles dependency graphs,
┌──────┴──────┐ ┌──────┴──────┐ ┌──────┴──────┐
│ Job A │ │ Job B │ │ Job C │
│ Worktree │ │ Worktree │ │ Worktree │
- │ + tmux │ │ + tmux │ │ + tmux │
+ │ tmux+serve │ │ tmux+serve │ │ tmux+serve │
└──────┬──────┘ └──────┬──────┘ └──────┬──────┘
│ │ │
└───────────────────┼───────────────────┘
@@ -66,25 +70,176 @@ For complex multi-task workflows, the **Plan System** handles dependency graphs,
└─────────────────┘
```
-1. **Launch** — `mc_launch` creates a git worktree + tmux session and starts an AI agent inside it
-2. **Monitor** — The background monitor polls every 10s, tracking output, idle state, and pane death
+1. **Launch** — `mc_launch` creates a git worktree and starts a local `opencode serve` inside a tmux session, then prompts the agent
+2. **Monitor** — The monitor subscribes to each serve job's SSE stream; TUI jobs are polled for pane state and exit status
3. **Observe** — Use `mc_status`, `mc_capture`, or `mc_attach` to check on progress
4. **Integrate** — Use `mc_diff` to review, `mc_pr` to create a PR, `mc_merge` to merge, or `mc_sync` to rebase
---
+## Migration status
+
+This repository is a **migration of Mission Control to OpenCode V2**. It targets
+`@opencode/plugin` / `@opencode/client` 2.x and has been validated with OpenCode
+**2.2.5** on Linux/WSL2. It does **not** work with OpenCode V1.
+
+The port is functional, but not every V1 feature could be carried over as-is and
+not every path has been validated end-to-end yet.
+
+### What had to be replaced (not available in OpenCode V2)
+
+| V1 behavior | V2 reality | What this version does |
+|---|---|---|
+| Server-side toast notifications | No server-side toast API | Toasts are emitted over the plugin RPC channel and rendered by a companion TUI plugin (`src/tui.ts`) |
+| Question tool with prompt/answer | V2 uses first-class forms | `mc_answer` relays answers through `session.form.list` / `session.form.reply` |
+| `noReply` on a prompt | Removed | Uses `session.synthetic({ resume: false })`; the message stays in the pending inbox until the next turn |
+| `session.idle` as the completion signal | Serve-mode runs emit `session.execution.succeeded` / `.failed` / `.interrupted` | The monitor uses execution events for serve jobs; TUI jobs poll the pane and trust an exit code of 0 or an explicit `mc_report` |
+| `opencode -m ` in the TUI | `-m/--model` only exists on `opencode run` | Vanilla plan jobs run through `opencode run -m`; OMO modes keep the TUI and its default model |
+| Unauthenticated local server | `opencode serve` always requires auth | Each job gets a random password and uses Basic auth (`opencode:`) |
+| Tool context exposes the directory/worktree | V2 `Tool.Context` has no directory | The plugin location is bound into `mc_report` at registration; cwd is threaded through job state and reports |
+| Permission action `bash` | Permission action is `shell` | Permission relay and auto-approval use the V2 action names |
+| V1 hooks/plugin shape | V2 plugin API | `Plugin.define`, `ctx.tool.transform`, `ctx.event.subscribe`, `ctx.rpc.register` |
+
+### Validated live (end-to-end)
+
+- Plugin loading, tool and command registration
+- Direct slash commands
+- Serve-mode job launch: worktree, per-job `opencode serve`, per-job password, tmux session
+- Job completion through `session.execution.succeeded`
+- `mc_report` writing to the correct project data directory (shared-server case)
+- `mc_diff`, `mc_status`, `mc_capture`, `mc_cleanup`, `mc_kill`
+- Multiple locations / plugin instances
+- V2 question forms + `mc_answer`
+- `session.synthetic({ resume: false })` (V1 `noReply` equivalent)
+- Permission auto-approval
+- Plan flow: `mc_plan` (copilot) → `mc_plan_approve` → `opencode run` job → commit → report → squash merge into the integration branch → `mc_plan_cancel` cleanup
+- Supervisor checkpoints `pre_merge` and `pre_pr` (including persisted approvals across processes)
+- Multi-job plans: parallel launch, `dependsOn` ordering, real merge conflict + `on_error` retry, `touchSet` violation + `relaunch`
+- Real TUI toast rendering (auto-status toast observed in a live TUI session)
+
+### Not validated, not migrated, or known gaps
+
+- **Real PR creation is not validated.** `gh` and a git remote were not available in the test environment. Execution reaches `git push origin` and stops there; the `gh pr create` path is covered by unit tests only. A failed PR stage currently does not persist its error reason on the plan.
+- **Supervisor `retry` / `relaunch` was not live-tested.** Retry and relaunch were validated on normal plans; the supervisor variants are covered by unit tests.
+- **OMO modes (`plan`, `ralph`, `ulw`) were not live-tested.** They require Oh-My-OpenCode to be installed; the launcher path is preserved but unverified in a real session.
+- **Large plans and saturation were not stress-tested.** Live tests used at most three jobs; `maxParallel`, merge-train contention, and many concurrent worktrees are not exercised.
+- **Remote workflows are untested.** Push, PR, branch protection, and CI integration are not validated.
+- **Windows native is not supported/tested.** Only Linux and WSL2 were validated.
+- **V1 → V2 data migration is not guaranteed.** Existing V1 jobs/sessions are not resumed; start from a clean Mission Control state.
+- **Toasts:** the auto-status toast was validated visually; other toast types (checkpoints, errors) use the same channel but were not individually observed.
+- **Native V2 backend is not implemented (Phase 2).** This version still uses tmux + one local `opencode serve` per job. Native V2 worktrees/sessions are planned but not done.
+- **Packaging/publishing is not done.** There is no npm release, no `.d.ts`, and the package has not been tested as an installed tarball. Repository metadata still points to the upstream project.
+- **Compaction, model tracking, and notification edge cases** are covered by unit tests only.
+
+### Local installation (WSL2 / Linux)
+
+#### 1. Prerequisites
+
+| Tool | Required | Purpose |
+|---|---|---|
+| OpenCode **2.x** | Yes | Plugin host (validated with 2.2.5) |
+| git | Yes | Worktrees |
+| tmux | Yes, for the current backend | Hosts each job's local server |
+| Bun (or npm) | For dependency install | `bun install` in the plugin directory |
+| gh | Only for `mc_pr` | PR creation (not validated here) |
+
+```bash
+sudo apt install tmux git
+opencode --version # must be 2.x
+```
+
+#### 2. Clone and install
+
+Clone **inside the WSL filesystem**, not under `/mnt/c`:
+
+```bash
+git clone ~/opencode-mission-control
+cd ~/opencode-mission-control
+bun install
+```
+
+No build step is required: OpenCode loads the TypeScript sources directly.
+
+#### 3. Declare the plugin in your project
+
+In the project where you want to use Mission Control (`opencode.jsonc` or `opencode.json`):
+
+```json
+{
+ "$schema": "https://opencode.ai/config.json",
+ "plugins": ["/home//opencode-mission-control"]
+}
+```
+
+The path must point to the plugin **directory**, not to a file.
+
+#### 4. Optional: TUI toast notifications
+
+Server plugins and TUI plugins are configured separately. Add Mission Control to the
+global CLI config (`~/.config/opencode/cli.json`, or `$XDG_CONFIG_HOME/opencode/cli.json`)
+using the **singular** `plugin` key:
+
+```json
+{
+ "$schema": "https://opencode.ai/v2/cli.json",
+ "plugin": ["/home//opencode-mission-control"]
+}
+```
+
+Everything works without this entry; only in-TUI toasts require it.
+
+#### 5. Use it
+
+Restart OpenCode, then run `mc_status` (or `/mc-status`). On the first `mc_launch`,
+Mission Control creates a worktree, starts a local `opencode serve` on
+`127.0.0.1:14100-14199` inside a tmux session, and prompts the agent.
+
+State is stored under:
+
+```
+~/.local/share/opencode-mission-control//
+├── state/jobs.json
+├── state/plan.json
+└── reports/
+```
+
+### Architecture in this migrated version
+
+```
+mc_launch
+ └─ git worktree
+ └─ tmux session
+ └─ opencode serve (127.0.0.1, random port + password)
+ └─ OpenCode session + agent
+```
+
+- The monitor subscribes to each serve job's SSE stream and reacts to
+ `session.execution.succeeded` / `.failed` / `.interrupted`.
+- Plan jobs run in their worktree through `opencode run -m `.
+- Toasts go from the server plugin to the TUI companion plugin over the RPC channel.
+
+Phase 2 (not implemented) would replace tmux + per-job `opencode serve` with native
+V2 worktrees and sessions on the shared server.
+
+---
+
## Quick Start
### Prerequisites
| Tool | Required | Purpose |
|------|----------|---------|
-| **[tmux](https://github.com/tmux/tmux)** | Yes | Session isolation and monitoring |
+| **[OpenCode 2.x](https://opencode.ai/)** | Yes | Plugin host (validated with 2.2.5) |
+| **[tmux](https://github.com/tmux/tmux)** | Yes, for the current backend | Hosts each job's local server |
| **[git](https://git-scm.com/)** | Yes | Worktree management |
-| **[gh](https://cli.github.com/)** | For `mc_pr` | GitHub PR creation |
+| **Bun or npm** | For installation | Install the plugin's dependencies |
+| **[gh](https://cli.github.com/)** | For `mc_pr` | GitHub PR creation (not validated here) |
### Installation (OpenCode Plugin)
+> **Requires OpenCode V2** (plugin API `@opencode/plugin` 2.x). This version is a
+> partial migration: see [Migration status](#migration-status).
+
Most OpenCode setups install plugins listed in `opencode.json` automatically, so you usually **do not** run `npm install` manually.
Add this plugin entry:
@@ -99,6 +254,21 @@ Add this plugin entry:
If you are developing this repository itself, use the local dev flow in [Development](#development).
+#### TUI notifications (optional)
+
+Mission Control's toast notifications are rendered by a companion TUI plugin, which OpenCode V2 configures separately
+from server plugins. Add Mission Control to the global CLI config (`~/.config/opencode/cli.json`, or
+`$XDG_CONFIG_HOME/opencode/cli.json`) using the `plugin` array:
+
+```json
+{
+ "$schema": "https://opencode.ai/v2/cli.json",
+ "plugin": ["opencode-mission-control"]
+}
+```
+
+Everything else works without this entry; only the in-TUI toasts require it.
+
### Your First Job
```
@@ -336,11 +506,11 @@ Launch a new parallel AI coding session in an isolated worktree.
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
-| `name` | `string` | Yes | — | Job name (used for branch name and tmux target) |
+| `name` | `string` | Yes | — | Job name (used for branch name and tmux/SSE identity) |
| `prompt` | `string` | Yes | — | Task prompt for the spawned AI agent |
| `branch` | `string` | No | `mc/{name}` | Git branch name |
| `baseBranch` | `string` | No | Default branch | Branch or ref to start from (e.g. `"develop"`) |
-| `placement` | `"session"` \| `"window"` | No | Config default | `session` creates a new tmux session; `window` adds a window to the current session |
+| `placement` | `"session"` \| `"window"` | No | Config default | `session` creates a new tmux session; `window` adds a window to the current session (current backend) |
| `mode` | `"vanilla"` \| `"plan"` \| `"ralph"` \| `"ulw"` | No | Config default | Execution mode (see [OMO Integration](#omo-integration)) |
| `planFile` | `string` | No | — | Plan file path (for `plan` mode) |
| `copyFiles` | `string[]` | No | — | Files to copy from main worktree (e.g. `[".env", ".env.local"]`) |
@@ -350,10 +520,10 @@ Launch a new parallel AI coding session in an isolated worktree.
**What happens on launch:**
1. Creates a new git worktree on a dedicated branch
2. Runs post-create hooks (copy files, create symlinks, run commands)
-3. Spins up a tmux session or window
-4. Starts `opencode --prompt '...'` inside the tmux pane
-5. Sets up pane-died hook for completion detection
-6. Registers the job for background monitoring
+3. Spins up a tmux session or window (current backend)
+4. Starts a local `opencode serve` on a random port with a per-job password
+5. Creates an OpenCode session in the worktree and sends the prompt
+6. Sets up the pane-died hook and SSE monitoring for the job
#### `mc_jobs`
@@ -373,7 +543,7 @@ Get detailed status of a specific job including branch, worktree path, tmux targ
#### `mc_capture`
-Capture the last N lines of terminal output from a job's tmux pane.
+Capture the last N lines of terminal output from a job's tmux pane (current backend).
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
@@ -382,7 +552,7 @@ Capture the last N lines of terminal output from a job's tmux pane.
#### `mc_attach`
-Get the tmux command to attach to a job's terminal session.
+Get the tmux command to attach to a job's terminal session (current backend).
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
@@ -390,7 +560,7 @@ Get the tmux command to attach to a job's terminal session.
#### `mc_kill`
-Stop a running job by terminating its tmux session/window.
+Stop a running job by terminating its tmux session/window (current backend).
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
@@ -696,7 +866,8 @@ Mission Control runs an active background monitor — not a passive wrapper.
| Mechanism | Interval | What It Does |
|-----------|----------|--------------|
-| **Polling** | Every `pollInterval` (default 10s) | Checks if each job's tmux pane is still running |
+| **SSE subscription** | Continuous | Serve jobs: subscribes to the job's `opencode serve` event stream and reacts to execution events |
+| **Polling** | Every `pollInterval` (default 10s) | TUI jobs: checks whether the tmux pane is still running |
| **Pane death detection** | Immediate | tmux `pane-died` hook fires when a pane closes, capturing exit status |
| **Idle detection** | `idleThreshold` (default 5min) | Hashes terminal output; if unchanged for the threshold period and the session shows the idle prompt (`ctrl+p commands`), marks the job as completed |
| **Exit code capture** | On pane death | Exit code `0` → completed. Non-zero → failed. |
@@ -706,6 +877,7 @@ Mission Control runs an active background monitor — not a passive wrapper.
| Hook | Trigger | Behavior |
|------|---------|----------|
+| `session.execution.succeeded` | A job's agent turn completes | Marks the serve job completed and updates job state |
| `session.idle` | User's main session goes quiet | Shows toast notification with running job summary (rate-limited to once per 5 minutes) |
| `session.compacting` | OpenCode compacts context | Injects current job state into the AI's memory so it stays aware of background work |
| `pane-died` | tmux pane closes | Immediately captures exit status and updates job state |
@@ -796,7 +968,9 @@ By default in `~/.local/share/opencode-mission-control/{project}/`. They are rea
Can I use this without tmux?
-No. tmux is the backbone of session isolation, monitoring, idle detection, and output capture. It's a hard requirement.
+Not in this migrated version. tmux hosts the per-job local server and remains a hard
+requirement for the current backend. A native V2 backend (worktrees + sessions on the
+shared server) is planned for Phase 2.
@@ -896,8 +1070,9 @@ If your commit messages are vague, semantic-release gets moody.
```bash
bun install
+bun run typecheck
bun run build
-bun test
+bun run test
```
## Contributing
diff --git a/SACRIFICIAL_PLAN_PR_TEST.md b/SACRIFICIAL_PLAN_PR_TEST.md
new file mode 100644
index 0000000..312640c
--- /dev/null
+++ b/SACRIFICIAL_PLAN_PR_TEST.md
@@ -0,0 +1 @@
+Sacrificial PR created by a Mission Control 2.0 plan to verify plan PR creation. Safe to close.
diff --git a/bun.lock b/bun.lock
index e186d85..2584375 100644
--- a/bun.lock
+++ b/bun.lock
@@ -5,15 +5,22 @@
"": {
"name": "opencode-mission-control",
"dependencies": {
- "@opencode-ai/plugin": "^1.0.85",
- "@opencode-ai/sdk": "^1.1.53",
+ "@opencode/client": "^2.2.5",
+ "@opencode/plugin": "^2.2.5",
"zod": "^4.3.6",
},
"devDependencies": {
"@types/bun": "latest",
"semantic-release": "^25.0.3",
+ "solid-js": "^1.9.0",
"typescript": "^5.0.0",
},
+ "peerDependencies": {
+ "solid-js": ">=1.9.0",
+ },
+ "optionalPeers": [
+ "solid-js",
+ ],
},
},
"packages": {
@@ -25,12 +32,110 @@
"@actions/io": ["@actions/io@3.0.2", "", {}, "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw=="],
+ "@ai-sdk/provider": ["@ai-sdk/provider@3.0.8", "", { "dependencies": { "json-schema": "^0.4.0" } }, "sha512-oGMAgGoQdBXbZqNG0Ze56CHjDZ1IDYOwGYxYjO5KLSlz5HiNQ9udIXsPZ61VWaHGZ5XW/jyjmr6t2xz2jGVwbQ=="],
+
+ "@aws-crypto/crc32": ["@aws-crypto/crc32@5.2.0", "", { "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" } }, "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg=="],
+
+ "@aws-crypto/sha256-browser": ["@aws-crypto/sha256-browser@5.2.0", "", { "dependencies": { "@aws-crypto/sha256-js": "^5.2.0", "@aws-crypto/supports-web-crypto": "^5.2.0", "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "@aws-sdk/util-locate-window": "^3.0.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" } }, "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw=="],
+
+ "@aws-crypto/sha256-js": ["@aws-crypto/sha256-js@5.2.0", "", { "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" } }, "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA=="],
+
+ "@aws-crypto/supports-web-crypto": ["@aws-crypto/supports-web-crypto@5.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg=="],
+
+ "@aws-crypto/util": ["@aws-crypto/util@5.2.0", "", { "dependencies": { "@aws-sdk/types": "^3.222.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" } }, "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ=="],
+
+ "@aws-sdk/client-cognito-identity": ["@aws-sdk/client-cognito-identity@3.1057.0", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.974.15", "@aws-sdk/credential-provider-node": "^3.972.47", "@aws-sdk/types": "^3.973.9", "@smithy/core": "^3.24.5", "@smithy/fetch-http-handler": "^5.4.5", "@smithy/node-http-handler": "^4.7.5", "@smithy/types": "^4.14.2", "tslib": "^2.6.2" } }, "sha512-5MliYkp2u0+2arTp5fZIaxl+xmm90LEKv/VeSxhfNQW4t0fvWJrNO429/jchWQenNoDRrOGE59VfbuZUfwFujg=="],
+
+ "@aws-sdk/core": ["@aws-sdk/core@3.980.1", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-W7jDWUPucezIUjFZpr8MudQQtz/m6yPMyAFrOyyQcHjuF4UrZdcCdP8eV1js06U9sH3dxp0AbhN+s9uHwQyXzQ=="],
+
+ "@aws-sdk/credential-provider-cognito-identity": ["@aws-sdk/credential-provider-cognito-identity@3.972.81", "", { "dependencies": { "@aws-sdk/nested-clients": "^3.998.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WS8AKP5qS6SzDN7bNZBd3ECmjeHkBbHgBmZjtFvHo7zdnSn5v+U9hSRuQLDQ9aueU2/ToH0x56mC7UgtLueBiA=="],
+
+ "@aws-sdk/credential-provider-env": ["@aws-sdk/credential-provider-env@3.972.82", "", { "dependencies": { "@aws-sdk/core": "^3.980.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-sAfysgoFWKg/CJvufYM7lhvMUfJpTsuwjCLzp843Vtw8NlQh2PW9/+upUFrsoQK46pJcv3u1a+st7qJ4jfSODw=="],
+
+ "@aws-sdk/credential-provider-http": ["@aws-sdk/credential-provider-http@3.972.84", "", { "dependencies": { "@aws-sdk/core": "^3.980.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.14.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-6xFe7tGPZedfak01TLUxuExU2Xhqw0VtoVvcS/+1OLjPB8If5vulTpCaR0TKTA/J6sAhTOjZHb6+4R1e1KRMKg=="],
+
+ "@aws-sdk/credential-provider-ini": ["@aws-sdk/credential-provider-ini@3.973.27", "", { "dependencies": { "@aws-sdk/core": "^3.980.1", "@aws-sdk/credential-provider-env": "^3.972.82", "@aws-sdk/credential-provider-http": "^3.972.84", "@aws-sdk/credential-provider-login": "^3.972.89", "@aws-sdk/credential-provider-process": "^3.972.82", "@aws-sdk/credential-provider-sso": "^3.973.26", "@aws-sdk/credential-provider-web-identity": "^3.972.88", "@aws-sdk/nested-clients": "^3.998.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/credential-provider-imds": "^4.5.2", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-geyao3+s46HIo8C0vyLz7cQ1qaOM1H6wrP/nNWTr5SoR4r97qlWrubi+a7Sg128KmvRZIFbwXTvkbKawBeysqg=="],
+
+ "@aws-sdk/credential-provider-login": ["@aws-sdk/credential-provider-login@3.972.89", "", { "dependencies": { "@aws-sdk/core": "^3.980.1", "@aws-sdk/nested-clients": "^3.998.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-5kcIZkMMs6eYvU6psqZkmeWsS3EGES53S6xUJFCC6eoJak3BQCCaF8yLU1bN6LTAOr2a9RWw+m1XBGen7Jcq+Q=="],
+
+ "@aws-sdk/credential-provider-node": ["@aws-sdk/credential-provider-node@3.972.94", "", { "dependencies": { "@aws-sdk/credential-provider-env": "^3.972.82", "@aws-sdk/credential-provider-http": "^3.972.84", "@aws-sdk/credential-provider-ini": "^3.973.27", "@aws-sdk/credential-provider-process": "^3.972.82", "@aws-sdk/credential-provider-sso": "^3.973.26", "@aws-sdk/credential-provider-web-identity": "^3.972.88", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/credential-provider-imds": "^4.5.2", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-qZzjRq45j0S0rI4XjHKGL63gGSFGPDYRe18Crp7l4Zk3Yr6PG4PjIixZEtsGIliOjtZ/h+ATExgjE54JQJeZMQ=="],
+
+ "@aws-sdk/credential-provider-process": ["@aws-sdk/credential-provider-process@3.972.82", "", { "dependencies": { "@aws-sdk/core": "^3.980.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-VsFOXU7gYDWqYwRis7Rif3CrE+c7xMNxp0L3XqGPuvF6JO2K93FYjhLlEphW5uEMpHEXkOOutZ5USGErgfKaog=="],
+
+ "@aws-sdk/credential-provider-sso": ["@aws-sdk/credential-provider-sso@3.973.26", "", { "dependencies": { "@aws-sdk/core": "^3.980.1", "@aws-sdk/nested-clients": "^3.998.1", "@aws-sdk/token-providers": "3.1164.0", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-IIrqv0iFNwO8Cd5EigbwILsnsvmprCAw5/BPfRvP/EiLQtBfv3PI9KpyUj2+qsJhYcpmKad+ugaS0+izle8OqQ=="],
+
+ "@aws-sdk/credential-provider-web-identity": ["@aws-sdk/credential-provider-web-identity@3.972.88", "", { "dependencies": { "@aws-sdk/core": "^3.980.1", "@aws-sdk/nested-clients": "^3.998.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-RmeE04naP7gWzux9l1vqNQPzuo2OkH0Ca9WDtX5Zf4NERoBLeWZNU2g1ka7aJ4Fc9fqBxBLtGL89vYEfFP1LHw=="],
+
+ "@aws-sdk/credential-providers": ["@aws-sdk/credential-providers@3.1057.0", "", { "dependencies": { "@aws-sdk/client-cognito-identity": "3.1057.0", "@aws-sdk/core": "^3.974.15", "@aws-sdk/credential-provider-cognito-identity": "^3.972.38", "@aws-sdk/credential-provider-env": "^3.972.41", "@aws-sdk/credential-provider-http": "^3.972.43", "@aws-sdk/credential-provider-ini": "^3.972.46", "@aws-sdk/credential-provider-login": "^3.972.45", "@aws-sdk/credential-provider-node": "^3.972.47", "@aws-sdk/credential-provider-process": "^3.972.41", "@aws-sdk/credential-provider-sso": "^3.972.45", "@aws-sdk/credential-provider-web-identity": "^3.972.45", "@aws-sdk/nested-clients": "^3.997.13", "@aws-sdk/types": "^3.973.9", "@smithy/core": "^3.24.5", "@smithy/credential-provider-imds": "^4.3.6", "@smithy/types": "^4.14.2", "tslib": "^2.6.2" } }, "sha512-rbrEHtz11g0kxsSkYr3fx2HABNNblp4AhB2MgPvJHgYOWfJ2eBviU7Mvoaef0PW8QH6lbZDfJcnM7eKvtvz3sw=="],
+
+ "@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.998.1", "", { "dependencies": { "@aws-sdk/core": "^3.980.1", "@aws-sdk/signature-v4-multi-region": "^3.996.51", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.14.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-KPw5W6LN3waUskfDCRXRcyBEHAev5PVlMOjMq74OIivFYbgPvq39QeFege7IOFPncO425/AQK0qxdfaoeGejYQ=="],
+
+ "@aws-sdk/signature-v4-multi-region": ["@aws-sdk/signature-v4-multi-region@3.996.51", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-+aHvUugVBuMPXxgkPfWnTMyGdE/yWS8GHi5+qQ37HowS0YqzrbuaDLznj+Dtmtu5jgCdqz36gXmujOToUhNNWw=="],
+
+ "@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.1164.0", "", { "dependencies": { "@aws-sdk/core": "^3.980.1", "@aws-sdk/nested-clients": "^3.998.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-9LPRWfev5QZH1EnNn9O/Y++iCRpfxrJs4EIsJuOAKYZ0DY/kZ3aOx0qWzmN1OUOd8JlUk6Mjy1tJ8b7ul5tuVw=="],
+
+ "@aws-sdk/types": ["@aws-sdk/types@3.975.0", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw=="],
+
+ "@aws-sdk/util-locate-window": ["@aws-sdk/util-locate-window@3.965.10", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-ycwH6Zd2GhuSqdXX9ihbCjeGTB6xOJs+O3+Jb8/zDG9978XU80qs75dfkPJRMNKe5MvBZPuNeFpd4JZKPoUF4g=="],
+
+ "@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.42", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="],
+
+ "@aws/lambda-invoke-store": ["@aws/lambda-invoke-store@0.3.0", "", {}, "sha512-sl4Bm6yiMNYrZKkqqDFWN0UfnWhlS8ivKxrYl+6t0gCLrqr8y3B2IqZZbFRkfaVVp7C/baApyh71P+LeE1A2sQ=="],
+
"@babel/code-frame": ["@babel/code-frame@7.29.0", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw=="],
"@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.28.5", "", {}, "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q=="],
"@colors/colors": ["@colors/colors@1.5.0", "", {}, "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ=="],
+ "@effect/opentelemetry": ["@effect/opentelemetry@4.1.0", "", { "peerDependencies": { "@opentelemetry/api": ">=1.9.0 <2.0.0", "@opentelemetry/api-logs": ">=0.203.0 <0.300.0", "@opentelemetry/resources": ">=2.0.0 <3.0.0", "@opentelemetry/sdk-logs": ">=0.203.0 <0.300.0", "@opentelemetry/sdk-metrics": ">=2.0.0 <3.0.0", "@opentelemetry/sdk-trace-base": ">=2.0.0 <3.0.0", "@opentelemetry/sdk-trace-node": ">=2.0.0 <3.0.0", "@opentelemetry/sdk-trace-web": ">=2.0.0 <3.0.0", "@opentelemetry/semantic-conventions": ">=1.33.0 <2.0.0", "effect": "^4.1.0" }, "optionalPeers": ["@opentelemetry/api", "@opentelemetry/api-logs", "@opentelemetry/resources", "@opentelemetry/sdk-logs", "@opentelemetry/sdk-metrics", "@opentelemetry/sdk-trace-base", "@opentelemetry/sdk-trace-node", "@opentelemetry/sdk-trace-web"] }, "sha512-j9bNzQaoQvcnimBFMG0i3piEW20E8HjkXAQHTJN/XqG2e4uJ9zCv53/HCNzD7+ooFn5S4nwQy/BOXeNReMIe+A=="],
+
+ "@effect/platform-node": ["@effect/platform-node@4.1.0", "", { "dependencies": { "@effect/platform-node-shared": "^4.1.0", "undici": "^8.12.2" }, "peerDependencies": { "effect": "^4.1.0", "redis": ">=5.0.0 <7.0.0" } }, "sha512-v+X7moGVF9k5oMVvz0slA+NgtEod+W+oygeI285MDJgSlUCW3JcqElj+cD3rlijFZtpKhC7RLkU1GuCxjGHTpA=="],
+
+ "@effect/platform-node-shared": ["@effect/platform-node-shared@4.1.0", "", { "dependencies": { "@types/ws": "^8.18.2", "ws": "^8.22.0" }, "peerDependencies": { "effect": "^4.1.0" } }, "sha512-uYQfFRoxWLo8fIhiSeBcmz/R1ooOfE3HF3cWHFgxz82tZMk2Wn02BGABcdLmaAch9VpDLbtWnuhSxNyBsGMUFg=="],
+
+ "@gar/promise-retry": ["@gar/promise-retry@1.0.3", "", {}, "sha512-GmzA9ckNokPypTg10pgpeHNQe7ph+iIKKmhKu3Ob9ANkswreCx7R3cKmY781K8QK3AqVL3xVh9A42JvIAbkkSA=="],
+
+ "@isaacs/balanced-match": ["@isaacs/balanced-match@4.0.1", "", {}, "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ=="],
+
+ "@isaacs/brace-expansion": ["@isaacs/brace-expansion@5.0.1", "", { "dependencies": { "@isaacs/balanced-match": "^4.0.1" } }, "sha512-WMz71T1JS624nWj2n2fnYAuPovhv7EUhk69R6i9dsVyzxt5eM3bjwvgk9L+APE1TRscGysAVMANkB0jh0LQZrQ=="],
+
+ "@isaacs/cliui": ["@isaacs/cliui@8.0.2", "", { "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" } }, "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA=="],
+
+ "@isaacs/fs-minipass": ["@isaacs/fs-minipass@4.0.1", "", { "dependencies": { "minipass": "^7.0.4" } }, "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w=="],
+
+ "@isaacs/string-locale-compare": ["@isaacs/string-locale-compare@1.1.0", "", {}, "sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ=="],
+
+ "@npmcli/agent": ["@npmcli/agent@4.0.0", "", { "dependencies": { "agent-base": "^7.1.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.1", "lru-cache": "^11.2.1", "socks-proxy-agent": "^8.0.3" } }, "sha512-kAQTcEN9E8ERLVg5AsGwLNoFb+oEG6engbqAU2P43gD4JEIkNGMHdVQ096FsOAAYpZPB0RSt0zgInKIAS1l5QA=="],
+
+ "@npmcli/arborist": ["@npmcli/arborist@9.4.0", "", { "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/fs": "^5.0.0", "@npmcli/installed-package-contents": "^4.0.0", "@npmcli/map-workspaces": "^5.0.0", "@npmcli/metavuln-calculator": "^9.0.2", "@npmcli/name-from-folder": "^4.0.0", "@npmcli/node-gyp": "^5.0.0", "@npmcli/package-json": "^7.0.0", "@npmcli/query": "^5.0.0", "@npmcli/redact": "^4.0.0", "@npmcli/run-script": "^10.0.0", "bin-links": "^6.0.0", "cacache": "^20.0.1", "common-ancestor-path": "^2.0.0", "hosted-git-info": "^9.0.0", "json-stringify-nice": "^1.1.4", "lru-cache": "^11.2.1", "minimatch": "^10.0.3", "nopt": "^9.0.0", "npm-install-checks": "^8.0.0", "npm-package-arg": "^13.0.0", "npm-pick-manifest": "^11.0.1", "npm-registry-fetch": "^19.0.0", "pacote": "^21.0.2", "parse-conflict-json": "^5.0.1", "proc-log": "^6.0.0", "proggy": "^4.0.0", "promise-all-reject-late": "^1.0.0", "promise-call-limit": "^3.0.1", "semver": "^7.3.7", "ssri": "^13.0.0", "treeverse": "^3.0.0", "walk-up-path": "^4.0.0" }, "bin": { "arborist": "bin/index.js" } }, "sha512-4Bm8hNixJG/sii1PMnag0V9i/sGOX9VRzFrUiZMSBJpGlLR38f+Btl85d07G9GL56xO0l0OZjvrGNYsDYp0xKA=="],
+
+ "@npmcli/config": ["@npmcli/config@10.8.1", "", { "dependencies": { "@npmcli/map-workspaces": "^5.0.0", "@npmcli/package-json": "^7.0.0", "ci-info": "^4.0.0", "ini": "^6.0.0", "nopt": "^9.0.0", "proc-log": "^6.0.0", "semver": "^7.3.5", "walk-up-path": "^4.0.0" } }, "sha512-MAYk9IlIGiyC0c9fnjdBSQfIFPZT0g1MfeSiD1UXTq2zJOLX55jS9/sETJHqw/7LN18JjITrhYfgCfapbmZHiQ=="],
+
+ "@npmcli/fs": ["@npmcli/fs@5.0.0", "", { "dependencies": { "semver": "^7.3.5" } }, "sha512-7OsC1gNORBEawOa5+j2pXN9vsicaIOH5cPXxoR6fJOmH6/EXpJB2CajXOu1fPRFun2m1lktEFX11+P89hqO/og=="],
+
+ "@npmcli/git": ["@npmcli/git@7.0.1", "", { "dependencies": { "@npmcli/promise-spawn": "^9.0.0", "ini": "^6.0.0", "lru-cache": "^11.2.1", "npm-pick-manifest": "^11.0.1", "proc-log": "^6.0.0", "promise-retry": "^2.0.1", "semver": "^7.3.5", "which": "^6.0.0" } }, "sha512-+XTFxK2jJF/EJJ5SoAzXk3qwIDfvFc5/g+bD274LZ7uY7LE8sTfG6Z8rOanPl2ZEvZWqNvmEdtXC25cE54VcoA=="],
+
+ "@npmcli/installed-package-contents": ["@npmcli/installed-package-contents@4.0.0", "", { "dependencies": { "npm-bundled": "^5.0.0", "npm-normalize-package-bin": "^5.0.0" }, "bin": { "installed-package-contents": "bin/index.js" } }, "sha512-yNyAdkBxB72gtZ4GrwXCM0ZUedo9nIbOMKfGjt6Cu6DXf0p8y1PViZAKDC8q8kv/fufx0WTjRBdSlyrvnP7hmA=="],
+
+ "@npmcli/map-workspaces": ["@npmcli/map-workspaces@5.0.3", "", { "dependencies": { "@npmcli/name-from-folder": "^4.0.0", "@npmcli/package-json": "^7.0.0", "glob": "^13.0.0", "minimatch": "^10.0.3" } }, "sha512-o2grssXo1e774E5OtEwwrgoszYRh0lqkJH+Pb9r78UcqdGJRDRfhpM8DvZPjzNLLNYeD/rNbjOKM3Ss5UABROw=="],
+
+ "@npmcli/metavuln-calculator": ["@npmcli/metavuln-calculator@9.0.3", "", { "dependencies": { "cacache": "^20.0.0", "json-parse-even-better-errors": "^5.0.0", "pacote": "^21.0.0", "proc-log": "^6.0.0", "semver": "^7.3.5" } }, "sha512-94GLSYhLXF2t2LAC7pDwLaM4uCARzxShyAQKsirmlNcpidH89VA4/+K1LbJmRMgz5gy65E/QBBWQdUvGLe2Frg=="],
+
+ "@npmcli/name-from-folder": ["@npmcli/name-from-folder@4.0.0", "", {}, "sha512-qfrhVlOSqmKM8i6rkNdZzABj8MKEITGFAY+4teqBziksCQAOLutiAxM1wY2BKEd8KjUSpWmWCYxvXr0y4VTlPg=="],
+
+ "@npmcli/node-gyp": ["@npmcli/node-gyp@5.0.0", "", {}, "sha512-uuG5HZFXLfyFKqg8QypsmgLQW7smiRjVc45bqD/ofZZcR/uxEjgQU8qDPv0s9TEeMUiAAU/GC5bR6++UdTirIQ=="],
+
+ "@npmcli/package-json": ["@npmcli/package-json@7.0.4", "", { "dependencies": { "@npmcli/git": "^7.0.0", "glob": "^13.0.0", "hosted-git-info": "^9.0.0", "json-parse-even-better-errors": "^5.0.0", "proc-log": "^6.0.0", "semver": "^7.5.3", "validate-npm-package-license": "^3.0.4" } }, "sha512-0wInJG3j/K40OJt/33ax47WfWMzZTm6OQxB9cDhTt5huCP2a9g2GnlsxmfN+PulItNPIpPrZ+kfwwUil7eHcZQ=="],
+
+ "@npmcli/promise-spawn": ["@npmcli/promise-spawn@9.0.1", "", { "dependencies": { "which": "^6.0.0" } }, "sha512-OLUaoqBuyxeTqUvjA3FZFiXUfYC1alp3Sa99gW3EUDz3tZ3CbXDdcZ7qWKBzicrJleIgucoWamWH1saAmH/l2Q=="],
+
+ "@npmcli/query": ["@npmcli/query@5.0.0", "", { "dependencies": { "postcss-selector-parser": "^7.0.0" } }, "sha512-8TZWfTQOsODpLqo9SVhVjHovmKXNpevHU0gO9e+y4V4fRIOneiXy0u0sMP9LmS71XivrEWfZWg50ReH4WRT4aQ=="],
+
+ "@npmcli/redact": ["@npmcli/redact@4.0.0", "", {}, "sha512-gOBg5YHMfZy+TfHArfVogwgfBeQnKbbGo3pSUyK/gSI0AVu+pEiDVcKlQb0D8Mg1LNRZILZ6XG8I5dJ4KuAd9Q=="],
+
+ "@npmcli/run-script": ["@npmcli/run-script@10.0.3", "", { "dependencies": { "@npmcli/node-gyp": "^5.0.0", "@npmcli/package-json": "^7.0.0", "@npmcli/promise-spawn": "^9.0.0", "node-gyp": "^12.1.0", "proc-log": "^6.0.0", "which": "^6.0.0" } }, "sha512-ER2N6itRkzWbbtVmZ9WKaWxVlKlOeBFF1/7xx+KA5J1xKa4JjUwBdb6tDpk0v1qA+d+VDwHI9qmLcXSWcmi+Rw=="],
+
"@octokit/auth-token": ["@octokit/auth-token@6.0.0", "", {}, "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w=="],
"@octokit/core": ["@octokit/core@7.0.6", "", { "dependencies": { "@octokit/auth-token": "^6.0.0", "@octokit/graphql": "^9.0.3", "@octokit/request": "^10.0.6", "@octokit/request-error": "^7.0.2", "@octokit/types": "^16.0.0", "before-after-hook": "^4.0.0", "universal-user-agent": "^7.0.0" } }, "sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q=="],
@@ -53,9 +158,45 @@
"@octokit/types": ["@octokit/types@16.0.0", "", { "dependencies": { "@octokit/openapi-types": "^27.0.0" } }, "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg=="],
- "@opencode-ai/plugin": ["@opencode-ai/plugin@1.1.53", "", { "dependencies": { "@opencode-ai/sdk": "1.1.53", "zod": "4.1.8" } }, "sha512-9ye7Wz2kESgt02AUDaMea4hXxj6XhWwKAG8NwFhrw09Ux54bGaMJFt1eIS8QQGIMaD+Lp11X4QdyEg96etEBJw=="],
+ "@opencode/ai": ["@opencode/ai@2.2.6", "", { "dependencies": { "@aws-sdk/credential-providers": "3.1057.0", "@opencode/schema": "2.2.6", "@smithy/eventstream-codec": "4.2.14", "@smithy/util-utf8": "4.2.2", "aws4fetch": "1.0.20", "effect": "4.1.0", "google-auth-library": "10.5.0" } }, "sha512-VRes4ACJj1Lw8tpAgWwOy8+QPeXTko/KkJA8NDGVgVtl+MmzV/J5tlrpnpAI6zAgUARYV3GDFYj6EHn1V5ndLQ=="],
+
+ "@opencode/client": ["@opencode/client@2.2.6", "", { "dependencies": { "@opencode/protocol": "2.2.6", "@opencode/schema": "2.2.6" }, "peerDependencies": { "effect": "4.1.0", "solid-js": ">=1.9.0" }, "optionalPeers": ["effect", "solid-js"] }, "sha512-o90b8Z6tk62U3MiRK1g6r7WmNWLzHzIHme75/MCWa9/XmOREMzY4W1N01wAuHwU3J6UH/PlUDNKvLkeX5qCyeA=="],
+
+ "@opencode/plugin": ["@opencode/plugin@2.2.6", "", { "dependencies": { "@ai-sdk/provider": "3.0.8", "@opencode/ai": "2.2.6", "@opencode/client": "2.2.6", "@opencode/protocol": "2.2.6", "@opencode/schema": "2.2.6", "@opencode/util": "2.2.6", "effect": "4.1.0" }, "peerDependencies": { "@opencode/theme": "2.2.6", "@opentui/core": ">=0.8.1", "@opentui/solid": ">=0.8.1", "electron": "*", "solid-js": ">=1.9.0", "vite": ">=6", "vite-plugin-solid": ">=2.11" }, "optionalPeers": ["@opencode/theme", "@opentui/core", "@opentui/solid", "electron", "solid-js", "vite", "vite-plugin-solid"] }, "sha512-PbQD4aN8YJ8w3gM5L9h2msXppxEAUVj8Ejbaj6MMNb+99jPm7/XM+g2ugZomSNs1XXuab2IlrIKDgbiI49VfLw=="],
+
+ "@opencode/protocol": ["@opencode/protocol@2.2.6", "", { "dependencies": { "@opencode/schema": "2.2.6", "effect": "4.1.0" } }, "sha512-XBAgz2qnhFS/EI4P3pgC9A6HJTHnFiaQXkqux3liXwE7hZh5wEzRZ551nQZD95rkrH00EnryUSaKI2y/O2Bt6w=="],
+
+ "@opencode/schema": ["@opencode/schema@2.2.6", "", { "dependencies": { "@standard-schema/spec": "1.1.0", "effect": "4.1.0" } }, "sha512-TaLr30ktFFVsuReorFNbqYvybTVxV/4M44qm5XzRjUqq6deR0jH4h4Wt1gB0NTkXDFL0LMH+Ul1oVBnp5w9TRg=="],
+
+ "@opencode/util": ["@opencode/util@2.2.6", "", { "dependencies": { "@effect/opentelemetry": "4.1.0", "@effect/platform-node": "4.1.0", "@effect/platform-node-shared": "4.1.0", "@npmcli/arborist": "9.4.0", "@npmcli/config": "10.8.1", "@opentelemetry/api": "1.9.0", "@opentelemetry/api-logs": "0.219.0", "@opentelemetry/context-async-hooks": "2.8.0", "@opentelemetry/exporter-trace-otlp-http": "0.219.0", "@opentelemetry/resources": "2.8.0", "@opentelemetry/sdk-logs": "0.219.0", "@opentelemetry/sdk-metrics": "2.8.0", "@opentelemetry/sdk-trace-base": "2.8.0", "@opentelemetry/sdk-trace-node": "2.8.0", "cross-spawn": "7.0.6", "effect": "4.1.0", "glob": "13.0.5", "mime-types": "3.0.2", "minimatch": "10.2.5", "npm-package-arg": "13.0.2", "open": "11.0.4", "pacote": "21.5.1" } }, "sha512-mOj2x3Aqw66sYzXq8MrypJVksFiO7GmFoSi5zi65TLtePbZCxvS/2TMbjgfa5MfWQp8YOl2327iv4W2rg6QQag=="],
+
+ "@opentelemetry/api": ["@opentelemetry/api@1.9.0", "", {}, "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg=="],
+
+ "@opentelemetry/api-logs": ["@opentelemetry/api-logs@0.219.0", "", { "dependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-FFx7YnaYJlIjqWW/AG/yAZ0L/NEY724PipXXXQLdtZPbLwBGbUMTGL1i/esI56TWfTUXxhLfpgrnWJCG8aUJyg=="],
+
+ "@opentelemetry/context-async-hooks": ["@opentelemetry/context-async-hooks@2.8.0", "", { "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-/3FIraneMcng67SUJCxvyInk/oxzwsxyadufk0wwfOBLf5wqtAGX4MoQASwSbndBPeARzBryUM9Azr5kHIdWLw=="],
+
+ "@opentelemetry/core": ["@opentelemetry/core@2.8.0", "", { "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-hd1Lfh8p545nNz+jq1Ejfz+Mn1hyLuxYn1YzTfFNrxr8urEWMNQLPf1Th8kjOH+HxwawCrtgBp8JpBUR4ZSgww=="],
+
+ "@opentelemetry/exporter-trace-otlp-http": ["@opentelemetry/exporter-trace-otlp-http@0.219.0", "", { "dependencies": { "@opentelemetry/core": "2.8.0", "@opentelemetry/otlp-exporter-base": "0.219.0", "@opentelemetry/otlp-transformer": "0.219.0", "@opentelemetry/resources": "2.8.0", "@opentelemetry/sdk-trace-base": "2.8.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-9t6SvBXXBEjOBcIzgozvBbd3jWrv3Gt3ngGhl1fhdZ/zRc7oZDVOFEqbi2zlBpW9BXhgDMKv422J0DL/3iQWfw=="],
+
+ "@opentelemetry/otlp-exporter-base": ["@opentelemetry/otlp-exporter-base@0.219.0", "", { "dependencies": { "@opentelemetry/core": "2.8.0", "@opentelemetry/otlp-transformer": "0.219.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-zvIxQX/AZUVKDU+hCuYx+7UkiP7GRdnk1ZbFQRYzHvYp47cAWR4j3IhoPhV9KaeXEv2xdGq3IA6PnpzDmLcmSA=="],
+
+ "@opentelemetry/otlp-transformer": ["@opentelemetry/otlp-transformer@0.219.0", "", { "dependencies": { "@opentelemetry/api-logs": "0.219.0", "@opentelemetry/core": "2.8.0", "@opentelemetry/resources": "2.8.0", "@opentelemetry/sdk-logs": "0.219.0", "@opentelemetry/sdk-metrics": "2.8.0", "@opentelemetry/sdk-trace-base": "2.8.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-aaYKAyXhw9VchKZVGOopD3Gw/kPsyrX2c6IQ0AW32mTjqmZOh5Y6Gf5OYqTNqVktAeBjmFinhyFaCwW6GYK9YQ=="],
+
+ "@opentelemetry/resources": ["@opentelemetry/resources@2.8.0", "", { "dependencies": { "@opentelemetry/core": "2.8.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-qmXQ27ilDbUK/vGMqwL8D4/rhn76C+sherM4wTbjlfknR8Nvfc/hCxjRJPhkzZzUsPiNg16SA31NxMabwttRjg=="],
+
+ "@opentelemetry/sdk-logs": ["@opentelemetry/sdk-logs@0.219.0", "", { "dependencies": { "@opentelemetry/api-logs": "0.219.0", "@opentelemetry/core": "2.8.0", "@opentelemetry/resources": "2.8.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.4.0 <1.10.0" } }, "sha512-s6lTKRakaPClvKoWHRChxnXjDMkM/TQ30ff78jN6EBGf7MI7VzANE5PU3f4z9qDUudWjvZjOLHG0rBnBKYvoXA=="],
+
+ "@opentelemetry/sdk-metrics": ["@opentelemetry/sdk-metrics@2.8.0", "", { "dependencies": { "@opentelemetry/core": "2.8.0", "@opentelemetry/resources": "2.8.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.9.0 <1.10.0" } }, "sha512-UDBGaj6W0Rgy5rTTaoxs8gVGF/aGkAKyjurJv7se6wjRxJu7FoquTLT/vt54DZfo4crbprYfhX/SOK9+BPw1qg=="],
+
+ "@opentelemetry/sdk-trace-base": ["@opentelemetry/sdk-trace-base@2.8.0", "", { "dependencies": { "@opentelemetry/core": "2.8.0", "@opentelemetry/resources": "2.8.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-mhU4jp+vW0mGbFRd+GeXHvmfA4aDqWjBjLC3pE5XMpLs0IE2ryYb019Ts2AQrOq67gaTF25D91+fgvEHDZEnuQ=="],
+
+ "@opentelemetry/sdk-trace-node": ["@opentelemetry/sdk-trace-node@2.8.0", "", { "dependencies": { "@opentelemetry/context-async-hooks": "2.8.0", "@opentelemetry/core": "2.8.0", "@opentelemetry/sdk-trace-base": "2.8.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-nZt9OGufioAc3AfoLTqA9bsAeaMJAictYDdI2VcNQ+PmT+3rfKjAZDZvgPfd8VPX0O5Bw1hdQF6kDK8VSpZiWg=="],
- "@opencode-ai/sdk": ["@opencode-ai/sdk@1.1.53", "", {}, "sha512-RUIVnPOP1CyyU32FrOOYuE7Ge51lOBuhaFp2NSX98ncApT7ffoNetmwzqrhOiJQgZB1KrbCHLYOCK6AZfacxag=="],
+ "@opentelemetry/semantic-conventions": ["@opentelemetry/semantic-conventions@1.45.0", "", {}, "sha512-aOP45mbcOKbQVvFWfQmgoOPT8R2iwbbbgl83k4CujGV9BrJhFr3qG55MFpwFs4YLabpuW3HhzUY9eQxPlDqaZw=="],
+
+ "@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="],
"@pnpm/config.env-replace": ["@pnpm/config.env-replace@1.1.0", "", {}, "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w=="],
@@ -63,6 +204,16 @@
"@pnpm/npm-conf": ["@pnpm/npm-conf@3.0.2", "", { "dependencies": { "@pnpm/config.env-replace": "^1.1.0", "@pnpm/network.ca-file": "^1.0.1", "config-chain": "^1.1.11" } }, "sha512-h104Kh26rR8tm+a3Qkc5S4VLYint3FE48as7+/5oCEcKR2idC/pF1G6AhIXKI+eHPJa/3J9i5z0Al47IeGHPkA=="],
+ "@redis/bloom": ["@redis/bloom@6.3.1", "", { "peerDependencies": { "@redis/client": "^6.3.1" } }, "sha512-dpF9j2yJDoPzSCaZn0MSB3xzmnXQVJeTSAWJcQVcgbmluwhpFeemmII0cF1t+WYfoVS+shEFq79+MmUItgzJLg=="],
+
+ "@redis/client": ["@redis/client@6.3.1", "", { "peerDependencies": { "@node-rs/xxhash": "^1.1.0", "@opentelemetry/api": ">=1 <2" }, "optionalPeers": ["@node-rs/xxhash", "@opentelemetry/api"] }, "sha512-masbfVKULdoAofwddepZxRhWa4w6zvBHn6TRn90TRPrRkVIlGCur3pFqwWaCbMxtYI9twepkz63e/T/tEH8GjA=="],
+
+ "@redis/json": ["@redis/json@6.3.1", "", { "peerDependencies": { "@redis/client": "^6.3.1" } }, "sha512-fMz4kUwJzEftcU9EMaqsjZcUwzpTQLOYRqhQsAD6uKvZWeamblK13ZhgO5SzVSZVk31jmwLeTRpU5GAl5egfUw=="],
+
+ "@redis/search": ["@redis/search@6.3.1", "", { "peerDependencies": { "@redis/client": "^6.3.1" } }, "sha512-T67pvPUpW82VrZLvihO8O2DFMC7eY2oMAzMzapCbiPZn7mdWqHMEIlohYim12gIawT5kn6qT/Cvmm4WulKB+kQ=="],
+
+ "@redis/time-series": ["@redis/time-series@6.3.1", "", { "peerDependencies": { "@redis/client": "^6.3.1" } }, "sha512-MNDgrm+i63M/1a+XA+HcDsScwt4uBh/fGGJ84swTQZTFK5K5wMmxdlTRa4ZgmNJzjxMaszW/ipPScMUGV3aAMg=="],
+
"@sec-ant/readable-stream": ["@sec-ant/readable-stream@0.4.1", "", {}, "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg=="],
"@semantic-release/commit-analyzer": ["@semantic-release/commit-analyzer@13.0.1", "", { "dependencies": { "conventional-changelog-angular": "^8.0.0", "conventional-changelog-writer": "^8.0.0", "conventional-commits-filter": "^5.0.0", "conventional-commits-parser": "^6.0.0", "debug": "^4.0.0", "import-from-esm": "^2.0.0", "lodash-es": "^4.17.21", "micromatch": "^4.0.2" }, "peerDependencies": { "semantic-release": ">=20.1.0" } }, "sha512-wdnBPHKkr9HhNhXOhZD5a2LNl91+hs8CC2vsAVYxtZH3y0dV3wKn+uZSN61rdJQZ8EGxzWB3inWocBHV9+u/CQ=="],
@@ -75,16 +226,60 @@
"@semantic-release/release-notes-generator": ["@semantic-release/release-notes-generator@14.1.0", "", { "dependencies": { "conventional-changelog-angular": "^8.0.0", "conventional-changelog-writer": "^8.0.0", "conventional-commits-filter": "^5.0.0", "conventional-commits-parser": "^6.0.0", "debug": "^4.0.0", "get-stream": "^7.0.0", "import-from-esm": "^2.0.0", "into-stream": "^7.0.0", "lodash-es": "^4.17.21", "read-package-up": "^11.0.0" }, "peerDependencies": { "semantic-release": ">=20.1.0" } }, "sha512-CcyDRk7xq+ON/20YNR+1I/jP7BYKICr1uKd1HHpROSnnTdGqOTburi4jcRiTYz0cpfhxSloQO3cGhnoot7IEkA=="],
+ "@sigstore/bundle": ["@sigstore/bundle@4.0.0", "", { "dependencies": { "@sigstore/protobuf-specs": "^0.5.0" } }, "sha512-NwCl5Y0V6Di0NexvkTqdoVfmjTaQwoLM236r89KEojGmq/jMls8S+zb7yOwAPdXvbwfKDlP+lmXgAL4vKSQT+A=="],
+
+ "@sigstore/core": ["@sigstore/core@3.1.0", "", {}, "sha512-o5cw1QYhNQ9IroioJxpzexmPjfCe7gzafd2RY3qnMpxr4ZEja+Jad/U8sgFpaue6bOaF+z7RVkyKVV44FN+N8A=="],
+
+ "@sigstore/protobuf-specs": ["@sigstore/protobuf-specs@0.5.0", "", {}, "sha512-MM8XIwUjN2bwvCg1QvrMtbBmpcSHrkhFSCu1D11NyPvDQ25HEc4oG5/OcQfd/Tlf/OxmKWERDj0zGE23jQaMwA=="],
+
+ "@sigstore/sign": ["@sigstore/sign@4.1.0", "", { "dependencies": { "@sigstore/bundle": "^4.0.0", "@sigstore/core": "^3.1.0", "@sigstore/protobuf-specs": "^0.5.0", "make-fetch-happen": "^15.0.3", "proc-log": "^6.1.0", "promise-retry": "^2.0.1" } }, "sha512-Vx1RmLxLGnSUqx/o5/VsCjkuN5L7y+vxEEwawvc7u+6WtX2W4GNa7b9HEjmcRWohw/d6BpATXmvOwc78m+Swdg=="],
+
+ "@sigstore/tuf": ["@sigstore/tuf@4.0.1", "", { "dependencies": { "@sigstore/protobuf-specs": "^0.5.0", "tuf-js": "^4.1.0" } }, "sha512-OPZBg8y5Vc9yZjmWCHrlWPMBqW5yd8+wFNl+thMdtcWz3vjVSoJQutF8YkrzI0SLGnkuFof4HSsWUhXrf219Lw=="],
+
+ "@sigstore/verify": ["@sigstore/verify@3.1.0", "", { "dependencies": { "@sigstore/bundle": "^4.0.0", "@sigstore/core": "^3.1.0", "@sigstore/protobuf-specs": "^0.5.0" } }, "sha512-mNe0Iigql08YupSOGv197YdHpPPr+EzDZmfCgMc7RPNaZTw5aLN01nBl6CHJOh3BGtnMIj83EeN4butBchc8Ag=="],
+
"@sindresorhus/is": ["@sindresorhus/is@4.6.0", "", {}, "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="],
"@sindresorhus/merge-streams": ["@sindresorhus/merge-streams@4.0.0", "", {}, "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ=="],
+ "@smithy/core": ["@smithy/core@3.39.0", "", { "dependencies": { "@smithy/types": "^4.20.0", "tslib": "^2.6.2" } }, "sha512-JJ/46AWQ4ipS1N2eZmUj7yzIhH8NhQIfAE+dce7NSB6dmFh+7hvD4pbofcoT4I0Xzfy/LNhZx3V2QhwYyAiqdg=="],
+
+ "@smithy/credential-provider-imds": ["@smithy/credential-provider-imds@4.5.2", "", { "dependencies": { "@smithy/core": "^3.33.2", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-A9uSdn72ozbRUSit0eib0TW7nXuNPlaeM0zcGkJ+nE6tFcSDbnmtwoxbTCFBukVQcszDAyvsd7+rTduPTXpygg=="],
+
+ "@smithy/eventstream-codec": ["@smithy/eventstream-codec@4.2.14", "", { "dependencies": { "@aws-crypto/crc32": "5.2.0", "@smithy/types": "^4.14.1", "@smithy/util-hex-encoding": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-erZq0nOIpzfeZdCyzZjdJb4nVSKLUmSkaQUVkRGQTXs30gyUGeKnrYEg+Xe1W5gE3aReS7IgsvANwVPxSzY6Pw=="],
+
+ "@smithy/fetch-http-handler": ["@smithy/fetch-http-handler@5.8.1", "", { "dependencies": { "@smithy/core": "^3.39.0", "@smithy/types": "^4.20.0", "tslib": "^2.6.2" } }, "sha512-h8BdMUrUBhMhMaeK7QqAdINRZezCGuYOCpcOZZ1ewxbHST9rdTd09xwNpvLTYfzDRehxQiReK4SKbdYZxBA+ew=="],
+
+ "@smithy/is-array-buffer": ["@smithy/is-array-buffer@2.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA=="],
+
+ "@smithy/node-http-handler": ["@smithy/node-http-handler@4.14.2", "", { "dependencies": { "@smithy/core": "^3.39.0", "@smithy/types": "^4.20.0", "tslib": "^2.6.2" } }, "sha512-i1uORV1v3qBqP43ayRKzIdm1q5x14tf8N4Dd06/QUX1Szm6VxHMrTsu20X5E63UFsaNZCRjI4SXG0jDmqYa+3w=="],
+
+ "@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
+
+ "@smithy/types": ["@smithy/types@4.20.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-lCA6QG22dPk9ecHbv91jDQZsmtPUjdS1aE2Il6NNPqe7DrYc0dZQi6DhcESk2KYXH2sp5xbAcGdYMZDFnuzA2A=="],
+
+ "@smithy/util-buffer-from": ["@smithy/util-buffer-from@4.5.2", "", { "dependencies": { "@smithy/core": "^3.33.2", "tslib": "^2.6.2" } }, "sha512-nxu3SgmAw9JXT2CtkU0m/XNLWpP9MsaBx1zAGAypCbYj15tIFlmcYwpF+Oh18le83d+IM9PT7ENdXnE4C+d5mA=="],
+
+ "@smithy/util-hex-encoding": ["@smithy/util-hex-encoding@4.5.2", "", { "dependencies": { "@smithy/core": "^3.33.2", "tslib": "^2.6.2" } }, "sha512-iq+cW3mAb7vfcxEEpYi3zXKpDtbrIFyanWjQl4zBq4seWD4OSxXDWSfespZxenX6aEaighn+NR3u1nU1DSvs3w=="],
+
+ "@smithy/util-utf8": ["@smithy/util-utf8@4.2.2", "", { "dependencies": { "@smithy/util-buffer-from": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-75MeYpjdWRe8M5E3AW0O4Cx3UadweS+cwdXjwYGBW5h/gxxnbeZ877sLPX/ZJA9GVTlL/qG0dXP29JWFCD1Ayw=="],
+
+ "@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="],
+
+ "@tufjs/canonical-json": ["@tufjs/canonical-json@2.0.0", "", {}, "sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA=="],
+
+ "@tufjs/models": ["@tufjs/models@4.1.0", "", { "dependencies": { "@tufjs/canonical-json": "2.0.0", "minimatch": "^10.1.1" } }, "sha512-Y8cK9aggNRsqJVaKUlEYs4s7CvQ1b1ta2DVPyAimb0I2qhzjNk+A+mxvll/klL0RlfuIUei8BF7YWiua4kQqww=="],
+
"@types/bun": ["@types/bun@1.3.8", "", { "dependencies": { "bun-types": "1.3.8" } }, "sha512-3LvWJ2q5GerAXYxO2mffLTqOzEu5qnhEAlh48Vnu8WQfnmSwbgagjGZV6BoHKJztENYEDn6QmVd949W4uESRJA=="],
"@types/node": ["@types/node@25.2.1", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-CPrnr8voK8vC6eEtyRzvMpgp3VyVRhgclonE7qYi6P9sXwYb59ucfrnmFBTaP0yUi8Gk4yZg/LlTJULGxvTNsg=="],
"@types/normalize-package-data": ["@types/normalize-package-data@2.4.4", "", {}, "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA=="],
+ "@types/ws": ["@types/ws@8.18.2", "", { "dependencies": { "@types/node": "*" } }, "sha512-67MQl+fpWKVTT1NYdnmo3U4sc/xPo/zQBncVnI74qmQa0z/b+1g6iYqNmGCPbxO+zz2aklb08a0oHfegiVd0/w=="],
+
+ "abbrev": ["abbrev@4.0.0", "", {}, "sha512-a1wflyaL0tHtJSmLSOVybYhy22vRih4eduhhrkcjgrWGnRfrZtovJ2FRjxuTtkkj47O/baf0R86QU5OuYpz8fA=="],
+
"agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="],
"aggregate-error": ["aggregate-error@5.0.0", "", { "dependencies": { "clean-stack": "^5.2.0", "indent-string": "^5.0.0" } }, "sha512-gOsf2YwSlleG6IjRYG2A7k0HmBMEo6qVNk9Bp/EaLgAJT5ngH6PXbqa4ItvnEwCm/velL5jAnQgsHsWnjhGmvw=="],
@@ -103,20 +298,44 @@
"array-ify": ["array-ify@1.0.0", "", {}, "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng=="],
+ "aws4fetch": ["aws4fetch@1.0.20", "", {}, "sha512-/djoAN709iY65ETD6LKCtyyEI04XIBP5xVvfmNxsEP0uJB5tyaGBztSryRr4HqMStr9R06PisQE7m9zDTXKu6g=="],
+
+ "balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="],
+
+ "base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="],
+
"before-after-hook": ["before-after-hook@4.0.0", "", {}, "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ=="],
+ "bignumber.js": ["bignumber.js@9.3.1", "", {}, "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ=="],
+
+ "bin-links": ["bin-links@6.0.0", "", { "dependencies": { "cmd-shim": "^8.0.0", "npm-normalize-package-bin": "^5.0.0", "proc-log": "^6.0.0", "read-cmd-shim": "^6.0.0", "write-file-atomic": "^7.0.0" } }, "sha512-X4CiKlcV2GjnCMwnKAfbVWpHa++65th9TuzAEYtZoATiOE2DQKhSp4CJlyLoTqdhBKlXjpXjCTYPNNFS33Fi6w=="],
+
"bottleneck": ["bottleneck@2.19.5", "", {}, "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="],
+ "bowser": ["bowser@2.15.0", "", {}, "sha512-xic6KSZglg/I4ymp45fdM4GWfYpBK79Fxd/TOvJktlaPgQqqDxvmGwOPZl2V0dyeS3Lj5c180bLhXF43iyAjZQ=="],
+
+ "brace-expansion": ["brace-expansion@5.0.12", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ=="],
+
"braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],
+ "buffer-equal-constant-time": ["buffer-equal-constant-time@1.0.1", "", {}, "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="],
+
"bun-types": ["bun-types@1.3.8", "", { "dependencies": { "@types/node": "*" } }, "sha512-fL99nxdOWvV4LqjmC+8Q9kW3M4QTtTR1eePs94v5ctGqU8OeceWrSUaRw3JYb7tU3FkMIAjkueehrHPPPGKi5Q=="],
+ "bundle-name": ["bundle-name@4.1.1", "", { "dependencies": { "run-applescript": "^7.0.0" } }, "sha512-DdH81/zPLVS11EUgWq3tEu/xn+EzljlMYooDNdzWEnFha3R3NBMpMV1UqYIpjYHV/SgpFKMIX1Oh7o06SjM/oA=="],
+
+ "cacache": ["cacache@20.0.3", "", { "dependencies": { "@npmcli/fs": "^5.0.0", "fs-minipass": "^3.0.0", "glob": "^13.0.0", "lru-cache": "^11.1.0", "minipass": "^7.0.3", "minipass-collect": "^2.0.1", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "p-map": "^7.0.2", "ssri": "^13.0.0", "unique-filename": "^5.0.0" } }, "sha512-3pUp4e8hv07k1QlijZu6Kn7c9+ZpWWk4j3F8N3xPuCExULobqJydKYOTj1FTq58srkJsXvO7LbGAH4C0ZU3WGw=="],
+
"callsites": ["callsites@3.1.0", "", {}, "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="],
"chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="],
"char-regex": ["char-regex@1.0.2", "", {}, "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw=="],
+ "chownr": ["chownr@3.0.0", "", {}, "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g=="],
+
+ "ci-info": ["ci-info@4.4.0", "", {}, "sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg=="],
+
"clean-stack": ["clean-stack@5.3.0", "", { "dependencies": { "escape-string-regexp": "5.0.0" } }, "sha512-9ngPTOhYGQqNVSfeJkYXHmF7AGWp4/nN5D/QqNQs3Dvxd1Kk/WpjHfNujKHYUQ/5CoGyOyFNoWSPk5afzP0QVg=="],
"cli-highlight": ["cli-highlight@2.1.11", "", { "dependencies": { "chalk": "^4.0.0", "highlight.js": "^10.7.1", "mz": "^2.4.0", "parse5": "^5.1.1", "parse5-htmlparser2-tree-adapter": "^6.0.0", "yargs": "^16.0.0" }, "bin": { "highlight": "bin/highlight" } }, "sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg=="],
@@ -125,10 +344,14 @@
"cliui": ["cliui@9.0.1", "", { "dependencies": { "string-width": "^7.2.0", "strip-ansi": "^7.1.0", "wrap-ansi": "^9.0.0" } }, "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w=="],
+ "cmd-shim": ["cmd-shim@8.0.0", "", {}, "sha512-Jk/BK6NCapZ58BKUxlSI+ouKRbjH1NLZCgJkYoab+vEHUY3f6OzpNBN9u7HFSv9J6TRDGs4PLOHezoKGaFRSCA=="],
+
"color-convert": ["color-convert@1.9.3", "", { "dependencies": { "color-name": "1.1.3" } }, "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg=="],
"color-name": ["color-name@1.1.3", "", {}, "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="],
+ "common-ancestor-path": ["common-ancestor-path@2.0.0", "", {}, "sha512-dnN3ibLeoRf2HNC+OlCiNc5d2zxbLJXOtiZUudNFSXZrNSydxcCsSpRzXwfu7BBWCIfHPw+xTayeBvJCP/D8Ng=="],
+
"compare-func": ["compare-func@2.0.0", "", { "dependencies": { "array-ify": "^1.0.0", "dot-prop": "^5.1.0" } }, "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA=="],
"config-chain": ["config-chain@1.1.13", "", { "dependencies": { "ini": "^1.3.4", "proto-list": "~1.2.1" } }, "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ=="],
@@ -151,26 +374,48 @@
"crypto-random-string": ["crypto-random-string@4.0.0", "", { "dependencies": { "type-fest": "^1.0.1" } }, "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA=="],
+ "cssesc": ["cssesc@3.0.0", "", { "bin": { "cssesc": "bin/cssesc" } }, "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg=="],
+
+ "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="],
+
+ "data-uri-to-buffer": ["data-uri-to-buffer@4.0.1", "", {}, "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A=="],
+
"debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="],
"deep-extend": ["deep-extend@0.6.0", "", {}, "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="],
+ "default-browser": ["default-browser@5.5.1", "", { "dependencies": { "bundle-name": "^4.1.0", "default-browser-id": "^5.0.0" } }, "sha512-m1pAzaJgZ/gssEqlOhJkPJp8Xly7QyW6xcrkUa2KKcDeDSEMP7X8xipU3snUcfisTQx0w1AGae+9UtJSfVnXGw=="],
+
+ "default-browser-id": ["default-browser-id@5.0.1", "", {}, "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q=="],
+
+ "define-lazy-prop": ["define-lazy-prop@3.0.0", "", {}, "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg=="],
+
"dir-glob": ["dir-glob@3.0.1", "", { "dependencies": { "path-type": "^4.0.0" } }, "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA=="],
"dot-prop": ["dot-prop@5.3.0", "", { "dependencies": { "is-obj": "^2.0.0" } }, "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q=="],
"duplexer2": ["duplexer2@0.1.4", "", { "dependencies": { "readable-stream": "^2.0.2" } }, "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA=="],
+ "eastasianwidth": ["eastasianwidth@0.2.0", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="],
+
+ "ecdsa-sig-formatter": ["ecdsa-sig-formatter@1.0.11", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ=="],
+
+ "effect": ["effect@4.1.0", "", {}, "sha512-lGx2MJJyrXA8RZb2UpQ/0Nkb5Utaimby7oD92+18noBxLPE85IFOvptdzau8dvcxAOwfwHo9iqapbKeFzqQM/Q=="],
+
"emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="],
"emojilib": ["emojilib@2.4.0", "", {}, "sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw=="],
+ "encoding": ["encoding@0.1.13", "", { "dependencies": { "iconv-lite": "^0.6.2" } }, "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A=="],
+
"env-ci": ["env-ci@11.2.0", "", { "dependencies": { "execa": "^8.0.0", "java-properties": "^1.0.2" } }, "sha512-D5kWfzkmaOQDioPmiviWAVtKmpPT4/iJmMVQxWxMPJTFyTkdc5JQUfc5iXEeWxcOdsYTKSAiA/Age4NUOqKsRA=="],
"env-paths": ["env-paths@2.2.1", "", {}, "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A=="],
"environment": ["environment@1.1.0", "", {}, "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q=="],
+ "err-code": ["err-code@2.0.3", "", {}, "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA=="],
+
"error-ex": ["error-ex@1.3.4", "", { "dependencies": { "is-arrayish": "^0.2.1" } }, "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ=="],
"escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="],
@@ -179,10 +424,16 @@
"execa": ["execa@9.6.1", "", { "dependencies": { "@sindresorhus/merge-streams": "^4.0.0", "cross-spawn": "^7.0.6", "figures": "^6.1.0", "get-stream": "^9.0.0", "human-signals": "^8.0.1", "is-plain-obj": "^4.1.0", "is-stream": "^4.0.1", "npm-run-path": "^6.0.0", "pretty-ms": "^9.2.0", "signal-exit": "^4.1.0", "strip-final-newline": "^4.0.0", "yoctocolors": "^2.1.1" } }, "sha512-9Be3ZoN4LmYR90tUoVu2te2BsbzHfhJyfEiAVfz7N5/zv+jduIfLrV2xdQXOHbaD6KgpGdO9PRPM1Y4Q9QkPkA=="],
+ "exponential-backoff": ["exponential-backoff@3.1.3", "", {}, "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA=="],
+
+ "extend": ["extend@3.0.2", "", {}, "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="],
+
"fast-content-type-parse": ["fast-content-type-parse@3.0.0", "", {}, "sha512-ZvLdcY8P+N8mGQJahJV5G4U88CSvT1rP8ApL6uETe88MBXrBHAkZlSEySdUlyztF7ccb+Znos3TFqaepHxdhBg=="],
"fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
+ "fetch-blob": ["fetch-blob@3.2.0", "", { "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" } }, "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ=="],
+
"figures": ["figures@6.1.0", "", { "dependencies": { "is-unicode-supported": "^2.0.0" } }, "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg=="],
"fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="],
@@ -193,12 +444,22 @@
"find-versions": ["find-versions@6.0.0", "", { "dependencies": { "semver-regex": "^4.0.5", "super-regex": "^1.0.0" } }, "sha512-2kCCtc+JvcZ86IGAz3Z2Y0A1baIz9fL31pH/0S1IqZr9Iwnjq8izfPtrCyQKO6TLMPELLsQMre7VDqeIKCsHkA=="],
+ "foreground-child": ["foreground-child@3.3.1", "", { "dependencies": { "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" } }, "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw=="],
+
+ "formdata-polyfill": ["formdata-polyfill@4.0.10", "", { "dependencies": { "fetch-blob": "^3.1.2" } }, "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g=="],
+
"from2": ["from2@2.3.0", "", { "dependencies": { "inherits": "^2.0.1", "readable-stream": "^2.0.0" } }, "sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g=="],
"fs-extra": ["fs-extra@11.3.3", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg=="],
+ "fs-minipass": ["fs-minipass@3.0.3", "", { "dependencies": { "minipass": "^7.0.3" } }, "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw=="],
+
"function-timeout": ["function-timeout@1.0.2", "", {}, "sha512-939eZS4gJ3htTHAldmyyuzlrD58P03fHG49v2JfFXbV6OhvZKRC9j2yAtdHw/zrp2zXHuv05zMIy40F0ge7spA=="],
+ "gaxios": ["gaxios@7.1.3", "", { "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", "node-fetch": "^3.3.2", "rimraf": "^5.0.1" } }, "sha512-YGGyuEdVIjqxkxVH1pUTMY/XtmmsApXrCVv5EU25iX6inEPbV+VakJfLealkBtJN69AQmh1eGOdCl9Sm1UP6XQ=="],
+
+ "gcp-metadata": ["gcp-metadata@8.1.4", "", { "dependencies": { "gaxios": "7.1.3", "google-logging-utils": "1.1.3", "json-bigint": "^1.0.0" } }, "sha512-iJ9KMsiu+xKtNRX0PmGLSaIU3bUBAyzWTyqKemKPzNPsmmsBCQYmlNg+brEbES7IHSXtdVwzBPzx1vz3FAaipw=="],
+
"get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="],
"get-east-asian-width": ["get-east-asian-width@1.4.0", "", {}, "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q=="],
@@ -207,8 +468,16 @@
"git-log-parser": ["git-log-parser@1.2.1", "", { "dependencies": { "argv-formatter": "~1.0.0", "spawn-error-forwarder": "~1.0.0", "split2": "~1.0.0", "stream-combiner2": "~1.1.1", "through2": "~2.0.0", "traverse": "0.6.8" } }, "sha512-PI+sPDvHXNPl5WNOErAK05s3j0lgwUzMN6o8cyQrDaKfT3qd7TmNJKeXX+SknI5I0QhG5fVPAEwSY4tRGDtYoQ=="],
+ "glob": ["glob@13.0.5", "", { "dependencies": { "minimatch": "^10.2.1", "minipass": "^7.1.2", "path-scurry": "^2.0.0" } }, "sha512-BzXxZg24Ibra1pbQ/zE7Kys4Ua1ks7Bn6pKLkVPZ9FZe4JQS6/Q7ef3LG1H+k7lUf5l4T3PLSyYyYJVYUvfgTw=="],
+
+ "google-auth-library": ["google-auth-library@10.5.0", "", { "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", "gaxios": "^7.0.0", "gcp-metadata": "^8.0.0", "google-logging-utils": "^1.0.0", "gtoken": "^8.0.0", "jws": "^4.0.0" } }, "sha512-7ABviyMOlX5hIVD60YOfHw4/CxOfBhyduaYB+wbFWCWoni4N7SLcV46hrVRktuBbZjFC9ONyqamZITN7q3n32w=="],
+
+ "google-logging-utils": ["google-logging-utils@1.1.3", "", {}, "sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA=="],
+
"graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="],
+ "gtoken": ["gtoken@8.0.0", "", { "dependencies": { "gaxios": "^7.0.0", "jws": "^4.0.0" } }, "sha512-+CqsMbHPiSTdtSO14O51eMNlrp9N79gmeqmXeouJOhfucAedHw9noVe/n5uJk3tbKE6a+6ZCQg3RPhVhHByAIw=="],
+
"handlebars": ["handlebars@4.7.8", "", { "dependencies": { "minimist": "^1.2.5", "neo-async": "^2.6.2", "source-map": "^0.6.1", "wordwrap": "^1.0.0" }, "optionalDependencies": { "uglify-js": "^3.1.4" }, "bin": { "handlebars": "bin/handlebars" } }, "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ=="],
"has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="],
@@ -219,18 +488,26 @@
"hosted-git-info": ["hosted-git-info@9.0.2", "", { "dependencies": { "lru-cache": "^11.1.0" } }, "sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg=="],
+ "http-cache-semantics": ["http-cache-semantics@4.2.0", "", {}, "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ=="],
+
"http-proxy-agent": ["http-proxy-agent@7.0.2", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="],
"https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
"human-signals": ["human-signals@8.0.1", "", {}, "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ=="],
+ "iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="],
+
+ "ignore-walk": ["ignore-walk@8.0.0", "", { "dependencies": { "minimatch": "^10.0.3" } }, "sha512-FCeMZT4NiRQGh+YkeKMtWrOmBgWjHjMJ26WQWrRQyoyzqevdaGSakUaJW5xQYmjLlUVk2qUnCjYVBax9EKKg8A=="],
+
"import-fresh": ["import-fresh@3.3.1", "", { "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ=="],
"import-from-esm": ["import-from-esm@2.0.0", "", { "dependencies": { "debug": "^4.3.4", "import-meta-resolve": "^4.0.0" } }, "sha512-YVt14UZCgsX1vZQ3gKjkWVdBdHQ6eu3MPU1TBgL1H5orXe2+jWD006WCPPtOuwlQm10NuzOW5WawiF1Q9veW8g=="],
"import-meta-resolve": ["import-meta-resolve@4.2.0", "", {}, "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg=="],
+ "imurmurhash": ["imurmurhash@0.1.4", "", {}, "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="],
+
"indent-string": ["indent-string@5.0.0", "", {}, "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg=="],
"index-to-position": ["index-to-position@1.2.0", "", {}, "sha512-Yg7+ztRkqslMAS2iFaU+Oa4KTSidr63OsFGlOrJoW981kIYO3CGCS3wA95P1mUi/IVSJkn0D479KTJpVpvFNuw=="],
@@ -241,10 +518,18 @@
"into-stream": ["into-stream@7.0.0", "", { "dependencies": { "from2": "^2.3.0", "p-is-promise": "^3.0.0" } }, "sha512-2dYz766i9HprMBasCMvHMuazJ7u4WzhJwo5kb3iPSiW/iRYV6uPari3zHoqZlnuaR7V1bEiNMxikhp37rdBXbw=="],
+ "ip-address": ["ip-address@10.1.0", "", {}, "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q=="],
+
"is-arrayish": ["is-arrayish@0.2.1", "", {}, "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="],
+ "is-docker": ["is-docker@3.0.0", "", { "bin": { "is-docker": "cli.js" } }, "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ=="],
+
"is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
+ "is-in-ssh": ["is-in-ssh@1.0.0", "", {}, "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw=="],
+
+ "is-inside-container": ["is-inside-container@1.0.0", "", { "dependencies": { "is-docker": "^3.0.0" }, "bin": { "is-inside-container": "cli.js" } }, "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA=="],
+
"is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="],
"is-obj": ["is-obj@2.0.0", "", {}, "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w=="],
@@ -255,24 +540,44 @@
"is-unicode-supported": ["is-unicode-supported@2.1.0", "", {}, "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ=="],
+ "is-wsl": ["is-wsl@3.1.1", "", { "dependencies": { "is-inside-container": "^1.0.0" } }, "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw=="],
+
"isarray": ["isarray@1.0.0", "", {}, "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="],
"isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],
"issue-parser": ["issue-parser@7.0.1", "", { "dependencies": { "lodash.capitalize": "^4.2.1", "lodash.escaperegexp": "^4.1.2", "lodash.isplainobject": "^4.0.6", "lodash.isstring": "^4.0.1", "lodash.uniqby": "^4.7.0" } }, "sha512-3YZcUUR2Wt1WsapF+S/WiA2WmlW0cWAoPccMqne7AxEBhCdFeTPjfv/Axb8V2gyCgY3nRw+ksZ3xSUX+R47iAg=="],
+ "jackspeak": ["jackspeak@3.4.3", "", { "dependencies": { "@isaacs/cliui": "^8.0.2" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw=="],
+
"java-properties": ["java-properties@1.0.2", "", {}, "sha512-qjdpeo2yKlYTH7nFdK0vbZWuTCesk4o63v5iVOlhMQPfuIZQfW/HI35SjfhA+4qpg36rnFSvUK5b1m+ckIblQQ=="],
"js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="],
"js-yaml": ["js-yaml@4.1.1", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA=="],
+ "json-bigint": ["json-bigint@1.0.0", "", { "dependencies": { "bignumber.js": "^9.0.0" } }, "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ=="],
+
"json-parse-better-errors": ["json-parse-better-errors@1.0.2", "", {}, "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw=="],
"json-parse-even-better-errors": ["json-parse-even-better-errors@2.3.1", "", {}, "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="],
+ "json-schema": ["json-schema@0.4.0", "", {}, "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA=="],
+
+ "json-stringify-nice": ["json-stringify-nice@1.1.4", "", {}, "sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw=="],
+
"jsonfile": ["jsonfile@6.2.0", "", { "dependencies": { "universalify": "^2.0.0" }, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg=="],
+ "jsonparse": ["jsonparse@1.3.1", "", {}, "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg=="],
+
+ "just-diff": ["just-diff@6.0.2", "", {}, "sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA=="],
+
+ "just-diff-apply": ["just-diff-apply@5.5.0", "", {}, "sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw=="],
+
+ "jwa": ["jwa@2.0.1", "", { "dependencies": { "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg=="],
+
+ "jws": ["jws@4.0.1", "", { "dependencies": { "jwa": "^2.0.1", "safe-buffer": "^5.0.1" } }, "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA=="],
+
"lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="],
"load-json-file": ["load-json-file@4.0.0", "", { "dependencies": { "graceful-fs": "^4.1.2", "parse-json": "^4.0.0", "pify": "^3.0.0", "strip-bom": "^3.0.0" } }, "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw=="],
@@ -295,6 +600,8 @@
"make-asynchronous": ["make-asynchronous@1.0.1", "", { "dependencies": { "p-event": "^6.0.0", "type-fest": "^4.6.0", "web-worker": "1.2.0" } }, "sha512-T9BPOmEOhp6SmV25SwLVcHK4E6JyG/coH3C6F1NjNXSziv/fd4GmsqMk8YR6qpPOswfaOCApSNkZv6fxoaYFcQ=="],
+ "make-fetch-happen": ["make-fetch-happen@15.0.3", "", { "dependencies": { "@npmcli/agent": "^4.0.0", "cacache": "^20.0.1", "http-cache-semantics": "^4.1.1", "minipass": "^7.0.2", "minipass-fetch": "^5.0.0", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^1.0.0", "proc-log": "^6.0.0", "promise-retry": "^2.0.1", "ssri": "^13.0.0" } }, "sha512-iyyEpDty1mwW3dGlYXAJqC/azFn5PPvgKVwXayOGBSmKLxhKZ9fg4qIan2ePpp1vJIwfFiO34LAPZgq9SZW9Aw=="],
+
"marked": ["marked@15.0.12", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA=="],
"marked-terminal": ["marked-terminal@7.3.0", "", { "dependencies": { "ansi-escapes": "^7.0.0", "ansi-regex": "^6.1.0", "chalk": "^5.4.1", "cli-highlight": "^2.1.11", "cli-table3": "^0.6.5", "node-emoji": "^2.2.0", "supports-hyperlinks": "^3.1.0" }, "peerDependencies": { "marked": ">=1 <16" } }, "sha512-t4rBvPsHc57uE/2nJOLmMbZCQ4tgAccAED3ngXQqW6g+TxA488JzJ+FK3lQkzBQOI1mRV/r/Kq+1ZlJ4D0owQw=="],
@@ -307,32 +614,78 @@
"mime": ["mime@4.1.0", "", { "bin": { "mime": "bin/cli.js" } }, "sha512-X5ju04+cAzsojXKes0B/S4tcYtFAJ6tTMuSPBEn9CPGlrWr8Fiw7qYeLT0XyH80HSoAoqWCaz+MWKh22P7G1cw=="],
+ "mime-db": ["mime-db@1.54.0", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="],
+
+ "mime-types": ["mime-types@3.0.2", "", { "dependencies": { "mime-db": "^1.54.0" } }, "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A=="],
+
"mimic-fn": ["mimic-fn@4.0.0", "", {}, "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw=="],
+ "minimatch": ["minimatch@10.2.5", "", { "dependencies": { "brace-expansion": "^5.0.5" } }, "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg=="],
+
"minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
+ "minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="],
+
+ "minipass-collect": ["minipass-collect@2.0.1", "", { "dependencies": { "minipass": "^7.0.3" } }, "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw=="],
+
+ "minipass-fetch": ["minipass-fetch@5.0.1", "", { "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^2.0.0", "minizlib": "^3.0.1" }, "optionalDependencies": { "encoding": "^0.1.13" } }, "sha512-yHK8pb0iCGat0lDrs/D6RZmCdaBT64tULXjdxjSMAqoDi18Q3qKEUTHypHQZQd9+FYpIS+lkvpq6C/R6SbUeRw=="],
+
+ "minipass-flush": ["minipass-flush@1.0.5", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw=="],
+
+ "minipass-pipeline": ["minipass-pipeline@1.2.4", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A=="],
+
+ "minipass-sized": ["minipass-sized@2.0.0", "", { "dependencies": { "minipass": "^7.1.2" } }, "sha512-zSsHhto5BcUVM2m1LurnXY6M//cGhVaegT71OfOXoprxT6o780GZd792ea6FfrQkuU4usHZIUczAQMRUE2plzA=="],
+
+ "minizlib": ["minizlib@3.1.0", "", { "dependencies": { "minipass": "^7.1.2" } }, "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw=="],
+
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
"mz": ["mz@2.7.0", "", { "dependencies": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", "thenify-all": "^1.0.0" } }, "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q=="],
+ "negotiator": ["negotiator@1.0.0", "", {}, "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg=="],
+
"neo-async": ["neo-async@2.6.2", "", {}, "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="],
"nerf-dart": ["nerf-dart@1.0.0", "", {}, "sha512-EZSPZB70jiVsivaBLYDCyntd5eH8NTSMOn3rB+HxwdmKThGELLdYv8qVIMWvZEFy9w8ZZpW9h9OB32l1rGtj7g=="],
+ "node-domexception": ["node-domexception@1.0.0", "", {}, "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="],
+
"node-emoji": ["node-emoji@2.2.0", "", { "dependencies": { "@sindresorhus/is": "^4.6.0", "char-regex": "^1.0.2", "emojilib": "^2.4.0", "skin-tone": "^2.0.0" } }, "sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw=="],
+ "node-fetch": ["node-fetch@3.3.2", "", { "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", "formdata-polyfill": "^4.0.10" } }, "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA=="],
+
+ "node-gyp": ["node-gyp@12.2.0", "", { "dependencies": { "env-paths": "^2.2.0", "exponential-backoff": "^3.1.1", "graceful-fs": "^4.2.6", "make-fetch-happen": "^15.0.0", "nopt": "^9.0.0", "proc-log": "^6.0.0", "semver": "^7.3.5", "tar": "^7.5.4", "tinyglobby": "^0.2.12", "which": "^6.0.0" }, "bin": { "node-gyp": "bin/node-gyp.js" } }, "sha512-q23WdzrQv48KozXlr0U1v9dwO/k59NHeSzn6loGcasyf0UnSrtzs8kRxM+mfwJSf0DkX0s43hcqgnSO4/VNthQ=="],
+
+ "nopt": ["nopt@9.0.0", "", { "dependencies": { "abbrev": "^4.0.0" }, "bin": { "nopt": "bin/nopt.js" } }, "sha512-Zhq3a+yFKrYwSBluL4H9XP3m3y5uvQkB/09CwDruCiRmR/UJYnn9W4R48ry0uGC70aeTPKLynBtscP9efFFcPw=="],
+
"normalize-package-data": ["normalize-package-data@8.0.0", "", { "dependencies": { "hosted-git-info": "^9.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" } }, "sha512-RWk+PI433eESQ7ounYxIp67CYuVsS1uYSonX3kA6ps/3LWfjVQa/ptEg6Y3T6uAMq1mWpX9PQ+qx+QaHpsc7gQ=="],
"normalize-url": ["normalize-url@8.1.1", "", {}, "sha512-JYc0DPlpGWB40kH5g07gGTrYuMqV653k3uBKY6uITPWds3M0ov3GaWGp9lbE3Bzngx8+XkfzgvASb9vk9JDFXQ=="],
"npm": ["npm@11.9.0", "", { "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/arborist": "^9.2.0", "@npmcli/config": "^10.6.0", "@npmcli/fs": "^5.0.0", "@npmcli/map-workspaces": "^5.0.3", "@npmcli/metavuln-calculator": "^9.0.3", "@npmcli/package-json": "^7.0.4", "@npmcli/promise-spawn": "^9.0.1", "@npmcli/redact": "^4.0.0", "@npmcli/run-script": "^10.0.3", "@sigstore/tuf": "^4.0.1", "abbrev": "^4.0.0", "archy": "~1.0.0", "cacache": "^20.0.3", "chalk": "^5.6.2", "ci-info": "^4.4.0", "cli-columns": "^4.0.0", "fastest-levenshtein": "^1.0.16", "fs-minipass": "^3.0.3", "glob": "^13.0.0", "graceful-fs": "^4.2.11", "hosted-git-info": "^9.0.2", "ini": "^6.0.0", "init-package-json": "^8.2.4", "is-cidr": "^6.0.1", "json-parse-even-better-errors": "^5.0.0", "libnpmaccess": "^10.0.3", "libnpmdiff": "^8.1.0", "libnpmexec": "^10.2.0", "libnpmfund": "^7.0.14", "libnpmorg": "^8.0.1", "libnpmpack": "^9.1.0", "libnpmpublish": "^11.1.3", "libnpmsearch": "^9.0.1", "libnpmteam": "^8.0.2", "libnpmversion": "^8.0.3", "make-fetch-happen": "^15.0.3", "minimatch": "^10.1.1", "minipass": "^7.1.1", "minipass-pipeline": "^1.2.4", "ms": "^2.1.2", "node-gyp": "^12.2.0", "nopt": "^9.0.0", "npm-audit-report": "^7.0.0", "npm-install-checks": "^8.0.0", "npm-package-arg": "^13.0.2", "npm-pick-manifest": "^11.0.3", "npm-profile": "^12.0.1", "npm-registry-fetch": "^19.1.1", "npm-user-validate": "^4.0.0", "p-map": "^7.0.4", "pacote": "^21.1.0", "parse-conflict-json": "^5.0.1", "proc-log": "^6.1.0", "qrcode-terminal": "^0.12.0", "read": "^5.0.1", "semver": "^7.7.3", "spdx-expression-parse": "^4.0.0", "ssri": "^13.0.0", "supports-color": "^10.2.2", "tar": "^7.5.7", "text-table": "~0.2.0", "tiny-relative-date": "^2.0.2", "treeverse": "^3.0.0", "validate-npm-package-name": "^7.0.2", "which": "^6.0.0" }, "bin": { "npm": "bin/npm-cli.js", "npx": "bin/npx-cli.js" } }, "sha512-BBZoU926FCypj4b7V7ElinxsWcy4Kss88UG3ejFYmKyq7Uc5XnT34Me2nEhgCOaL5qY4HvGu5aI92C4OYd7NaA=="],
+ "npm-bundled": ["npm-bundled@5.0.0", "", { "dependencies": { "npm-normalize-package-bin": "^5.0.0" } }, "sha512-JLSpbzh6UUXIEoqPsYBvVNVmyrjVZ1fzEFbqxKkTJQkWBO3xFzFT+KDnSKQWwOQNbuWRwt5LSD6HOTLGIWzfrw=="],
+
+ "npm-install-checks": ["npm-install-checks@8.0.0", "", { "dependencies": { "semver": "^7.1.1" } }, "sha512-ScAUdMpyzkbpxoNekQ3tNRdFI8SJ86wgKZSQZdUxT+bj0wVFpsEMWnkXP0twVe1gJyNF5apBWDJhhIbgrIViRA=="],
+
+ "npm-normalize-package-bin": ["npm-normalize-package-bin@5.0.0", "", {}, "sha512-CJi3OS4JLsNMmr2u07OJlhcrPxCeOeP/4xq67aWNai6TNWWbTrlNDgl8NcFKVlcBKp18GPj+EzbNIgrBfZhsag=="],
+
+ "npm-package-arg": ["npm-package-arg@13.0.2", "", { "dependencies": { "hosted-git-info": "^9.0.0", "proc-log": "^6.0.0", "semver": "^7.3.5", "validate-npm-package-name": "^7.0.0" } }, "sha512-IciCE3SY3uE84Ld8WZU23gAPPV9rIYod4F+rc+vJ7h7cwAJt9Vk6TVsK60ry7Uj3SRS3bqRRIGuTp9YVlk6WNA=="],
+
+ "npm-packlist": ["npm-packlist@10.0.3", "", { "dependencies": { "ignore-walk": "^8.0.0", "proc-log": "^6.0.0" } }, "sha512-zPukTwJMOu5X5uvm0fztwS5Zxyvmk38H/LfidkOMt3gbZVCyro2cD/ETzwzVPcWZA3JOyPznfUN/nkyFiyUbxg=="],
+
+ "npm-pick-manifest": ["npm-pick-manifest@11.0.3", "", { "dependencies": { "npm-install-checks": "^8.0.0", "npm-normalize-package-bin": "^5.0.0", "npm-package-arg": "^13.0.0", "semver": "^7.3.5" } }, "sha512-buzyCfeoGY/PxKqmBqn1IUJrZnUi1VVJTdSSRPGI60tJdUhUoSQFhs0zycJokDdOznQentgrpf8LayEHyyYlqQ=="],
+
+ "npm-registry-fetch": ["npm-registry-fetch@19.1.1", "", { "dependencies": { "@npmcli/redact": "^4.0.0", "jsonparse": "^1.3.1", "make-fetch-happen": "^15.0.0", "minipass": "^7.0.2", "minipass-fetch": "^5.0.0", "minizlib": "^3.0.1", "npm-package-arg": "^13.0.0", "proc-log": "^6.0.0" } }, "sha512-TakBap6OM1w0H73VZVDf44iFXsOS3h+L4wVMXmbWOQroZgFhMch0juN6XSzBNlD965yIKvWg2dfu7NSiaYLxtw=="],
+
"npm-run-path": ["npm-run-path@6.0.0", "", { "dependencies": { "path-key": "^4.0.0", "unicorn-magic": "^0.3.0" } }, "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA=="],
"object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="],
"onetime": ["onetime@6.0.0", "", { "dependencies": { "mimic-fn": "^4.0.0" } }, "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ=="],
+ "open": ["open@11.0.4", "", { "dependencies": { "default-browser": "^5.5.1", "define-lazy-prop": "^3.0.0", "is-in-ssh": "^1.0.0", "is-inside-container": "^1.0.0", "powershell-utils": "^0.2.1", "wsl-utils": "^1.0.0" } }, "sha512-++Zlftm0kVLPmzC06t6epuWmcRMDbI4z5P3NNX979WA/k23+NtSOynEGzsVfZwguKw2mi5umVgnBlJQMwRz4Pg=="],
+
"p-each-series": ["p-each-series@3.0.0", "", {}, "sha512-lastgtAdoH9YaLyDa5i5z64q+kzOcQHsQ5SsZJD3q0VEyI8mq872S3geuNbRUQLVAE9siMfgKrpj7MloKFHruw=="],
"p-event": ["p-event@6.0.1", "", { "dependencies": { "p-timeout": "^6.1.2" } }, "sha512-Q6Bekk5wpzW5qIyUP4gdMEujObYstZl6DMMOSenwBvV0BlE5LkDwkjs5yHbZmdCEq2o4RJx4tE1vwxFVf2FG1w=="],
@@ -353,8 +706,14 @@
"p-try": ["p-try@1.0.0", "", {}, "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww=="],
+ "package-json-from-dist": ["package-json-from-dist@1.0.1", "", {}, "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="],
+
+ "pacote": ["pacote@21.5.1", "", { "dependencies": { "@gar/promise-retry": "^1.0.0", "@npmcli/git": "^7.0.0", "@npmcli/installed-package-contents": "^4.0.0", "@npmcli/package-json": "^7.0.0", "@npmcli/promise-spawn": "^9.0.0", "@npmcli/run-script": "^10.0.0", "cacache": "^20.0.0", "fs-minipass": "^3.0.0", "minipass": "^7.0.2", "npm-package-arg": "^13.0.0", "npm-packlist": "^10.0.1", "npm-pick-manifest": "^11.0.1", "npm-registry-fetch": "^19.0.0", "proc-log": "^6.0.0", "sigstore": "^4.0.0", "ssri": "^13.0.0", "tar": "^7.4.3" }, "bin": { "pacote": "bin/index.js" } }, "sha512-KvcJ9iy3crysCsgqc4+PknH/w6jkrp8JN36mpZBPwNaDRwTfMZD37YzRazNstiZUOhuF5pno9f78n9mEJBavwg=="],
+
"parent-module": ["parent-module@1.0.1", "", { "dependencies": { "callsites": "^3.0.0" } }, "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g=="],
+ "parse-conflict-json": ["parse-conflict-json@5.0.1", "", { "dependencies": { "json-parse-even-better-errors": "^5.0.0", "just-diff": "^6.0.0", "just-diff-apply": "^5.2.0" } }, "sha512-ZHEmNKMq1wyJXNwLxyHnluPfRAFSIliBvbK/UiOceROt4Xh9Pz0fq49NytIaeaCUf5VR86hwQ/34FCcNU5/LKQ=="],
+
"parse-json": ["parse-json@5.2.0", "", { "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", "json-parse-even-better-errors": "^2.3.0", "lines-and-columns": "^1.1.6" } }, "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg=="],
"parse-ms": ["parse-ms@4.0.0", "", {}, "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw=="],
@@ -367,6 +726,8 @@
"path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],
+ "path-scurry": ["path-scurry@2.0.1", "", { "dependencies": { "lru-cache": "^11.0.0", "minipass": "^7.1.2" } }, "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA=="],
+
"path-type": ["path-type@4.0.0", "", {}, "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="],
"picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
@@ -377,34 +738,64 @@
"pkg-conf": ["pkg-conf@2.1.0", "", { "dependencies": { "find-up": "^2.0.0", "load-json-file": "^4.0.0" } }, "sha512-C+VUP+8jis7EsQZIhDYmS5qlNtjv2yP4SNtjXK9AP1ZcTRlnSfuumaTnRfYZnYgUUYVIKqL0fRvmUGDV2fmp6g=="],
+ "postcss-selector-parser": ["postcss-selector-parser@7.1.1", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg=="],
+
+ "powershell-utils": ["powershell-utils@0.2.1", "", {}, "sha512-C+y9x90UElAddDZmV4qOx9W53B61PO7cIqWz2dQsWlwswuq4mr8NEwytdGKboYbQlGZ3awrkTeNvcZiZNHnQ8A=="],
+
"pretty-ms": ["pretty-ms@9.3.0", "", { "dependencies": { "parse-ms": "^4.0.0" } }, "sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ=="],
+ "proc-log": ["proc-log@6.1.0", "", {}, "sha512-iG+GYldRf2BQ0UDUAd6JQ/RwzaQy6mXmsk/IzlYyal4A4SNFw54MeH4/tLkF4I5WoWG9SQwuqWzS99jaFQHBuQ=="],
+
"process-nextick-args": ["process-nextick-args@2.0.1", "", {}, "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="],
+ "proggy": ["proggy@4.0.0", "", {}, "sha512-MbA4R+WQT76ZBm/5JUpV9yqcJt92175+Y0Bodg3HgiXzrmKu7Ggq+bpn6y6wHH+gN9NcyKn3yg1+d47VaKwNAQ=="],
+
+ "promise-all-reject-late": ["promise-all-reject-late@1.0.1", "", {}, "sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw=="],
+
+ "promise-call-limit": ["promise-call-limit@3.0.2", "", {}, "sha512-mRPQO2T1QQVw11E7+UdCJu7S61eJVWknzml9sC1heAdj1jxl0fWMBypIt9ZOcLFf8FkG995ZD7RnVk7HH72fZw=="],
+
+ "promise-retry": ["promise-retry@2.0.1", "", { "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" } }, "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g=="],
+
"proto-list": ["proto-list@1.2.4", "", {}, "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA=="],
"rc": ["rc@1.2.8", "", { "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" }, "bin": { "rc": "./cli.js" } }, "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw=="],
+ "read-cmd-shim": ["read-cmd-shim@6.0.0", "", {}, "sha512-1zM5HuOfagXCBWMN83fuFI/x+T/UhZ7k+KIzhrHXcQoeX5+7gmaDYjELQHmmzIodumBHeByBJT4QYS7ufAgs7A=="],
+
"read-package-up": ["read-package-up@12.0.0", "", { "dependencies": { "find-up-simple": "^1.0.1", "read-pkg": "^10.0.0", "type-fest": "^5.2.0" } }, "sha512-Q5hMVBYur/eQNWDdbF4/Wqqr9Bjvtrw2kjGxxBbKLbx8bVCL8gcArjTy8zDUuLGQicftpMuU0riQNcAsbtOVsw=="],
"read-pkg": ["read-pkg@10.1.0", "", { "dependencies": { "@types/normalize-package-data": "^2.4.4", "normalize-package-data": "^8.0.0", "parse-json": "^8.3.0", "type-fest": "^5.4.4", "unicorn-magic": "^0.4.0" } }, "sha512-I8g2lArQiP78ll51UeMZojewtYgIRCKCWqZEgOO8c/uefTI+XDXvCSXu3+YNUaTNvZzobrL5+SqHjBrByRRTdg=="],
"readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
+ "redis": ["redis@6.3.1", "", { "dependencies": { "@redis/bloom": "6.3.1", "@redis/client": "6.3.1", "@redis/json": "6.3.1", "@redis/search": "6.3.1", "@redis/time-series": "6.3.1" } }, "sha512-mV96ZKxQ4CGn3SyEGaY0Lb9YA443mdVey3c+mdr0NAUaBxiOZGoYCWX8PoM55kictSOmxlJRtZJxIsmZm3jL+w=="],
+
"registry-auth-token": ["registry-auth-token@5.1.1", "", { "dependencies": { "@pnpm/npm-conf": "^3.0.2" } }, "sha512-P7B4+jq8DeD2nMsAcdfaqHbssgHtZ7Z5+++a5ask90fvmJ8p5je4mOa+wzu+DB4vQ5tdJV/xywY+UnVFeQLV5Q=="],
"require-directory": ["require-directory@2.1.1", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="],
"resolve-from": ["resolve-from@5.0.0", "", {}, "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw=="],
+ "retry": ["retry@0.12.0", "", {}, "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow=="],
+
+ "rimraf": ["rimraf@5.0.10", "", { "dependencies": { "glob": "^10.3.7" }, "bin": { "rimraf": "dist/esm/bin.mjs" } }, "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ=="],
+
+ "run-applescript": ["run-applescript@7.1.0", "", {}, "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q=="],
+
"safe-buffer": ["safe-buffer@5.1.2", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="],
+ "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],
+
"semantic-release": ["semantic-release@25.0.3", "", { "dependencies": { "@semantic-release/commit-analyzer": "^13.0.1", "@semantic-release/error": "^4.0.0", "@semantic-release/github": "^12.0.0", "@semantic-release/npm": "^13.1.1", "@semantic-release/release-notes-generator": "^14.1.0", "aggregate-error": "^5.0.0", "cosmiconfig": "^9.0.0", "debug": "^4.0.0", "env-ci": "^11.0.0", "execa": "^9.0.0", "figures": "^6.0.0", "find-versions": "^6.0.0", "get-stream": "^6.0.0", "git-log-parser": "^1.2.0", "hook-std": "^4.0.0", "hosted-git-info": "^9.0.0", "import-from-esm": "^2.0.0", "lodash-es": "^4.17.21", "marked": "^15.0.0", "marked-terminal": "^7.3.0", "micromatch": "^4.0.2", "p-each-series": "^3.0.0", "p-reduce": "^3.0.0", "read-package-up": "^12.0.0", "resolve-from": "^5.0.0", "semver": "^7.3.2", "signale": "^1.2.1", "yargs": "^18.0.0" }, "bin": { "semantic-release": "bin/semantic-release.js" } }, "sha512-WRgl5GcypwramYX4HV+eQGzUbD7UUbljVmS+5G1uMwX/wLgYuJAxGeerXJDMO2xshng4+FXqCgyB5QfClV6WjA=="],
"semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="],
"semver-regex": ["semver-regex@4.0.5", "", {}, "sha512-hunMQrEy1T6Jr2uEVjrAIqjwWcQTgOAcIM52C8MY1EZSD3DDNft04XzvYKPqjED65bNVVko0YI38nYeEHCX3yw=="],
+ "seroval": ["seroval@1.6.12", "", {}, "sha512-CqbIVfk/7GL3ITwZI55lcPbpQbjHZ2DD5cUj4iH7E9YsCfHNJV1mx7yNp86Z84w5IpmkZZS/2s5vPOWmVWSdQg=="],
+
+ "seroval-plugins": ["seroval-plugins@1.6.12", "", { "peerDependencies": { "seroval": "^1.0" } }, "sha512-+reiwp/lYxiyctSrdvX7OQ1YLrcbWYgBiZrhSFL+V43b0/DGRLNVSDyZINbQe+tWplPOI2fw2dPrdv6hcc09kQ=="],
+
"shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="],
"shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="],
@@ -413,8 +804,18 @@
"signale": ["signale@1.4.0", "", { "dependencies": { "chalk": "^2.3.2", "figures": "^2.0.0", "pkg-conf": "^2.1.0" } }, "sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w=="],
+ "sigstore": ["sigstore@4.1.0", "", { "dependencies": { "@sigstore/bundle": "^4.0.0", "@sigstore/core": "^3.1.0", "@sigstore/protobuf-specs": "^0.5.0", "@sigstore/sign": "^4.1.0", "@sigstore/tuf": "^4.0.1", "@sigstore/verify": "^3.1.0" } }, "sha512-/fUgUhYghuLzVT/gaJoeVehLCgZiUxPCPMcyVNY0lIf/cTCz58K/WTI7PefDarXxp9nUKpEwg1yyz3eSBMTtgA=="],
+
"skin-tone": ["skin-tone@2.0.0", "", { "dependencies": { "unicode-emoji-modifier-base": "^1.0.0" } }, "sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA=="],
+ "smart-buffer": ["smart-buffer@4.2.0", "", {}, "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="],
+
+ "socks": ["socks@2.8.7", "", { "dependencies": { "ip-address": "^10.0.1", "smart-buffer": "^4.2.0" } }, "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A=="],
+
+ "socks-proxy-agent": ["socks-proxy-agent@8.0.5", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "socks": "^2.8.3" } }, "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw=="],
+
+ "solid-js": ["solid-js@1.9.18", "", { "dependencies": { "csstype": "^3.1.0", "seroval": "~1.6.11", "seroval-plugins": "~1.6.8" } }, "sha512-CHGO5YFk6Y9m/1YSxVtKnXfrW7JD3Tmof8HmR4z6TmCPsS8efo8LnzIR8CQh3cUvffqYm6DWyBFfk8dQw1CNQQ=="],
+
"source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
"spawn-error-forwarder": ["spawn-error-forwarder@1.0.0", "", {}, "sha512-gRjMgK5uFjbCvdibeGJuy3I5OYz6VLoVdsOJdA6wV0WlfQVLFueoqMxwwYD9RODdgb6oUIvlRlsyFSiQkMKu0g=="],
@@ -429,14 +830,20 @@
"split2": ["split2@1.0.0", "", { "dependencies": { "through2": "~2.0.0" } }, "sha512-NKywug4u4pX/AZBB1FCPzZ6/7O+Xhz1qMVbzTvvKvikjO99oPN87SkK08mEY9P63/5lWjK+wgOOgApnTg5r6qg=="],
+ "ssri": ["ssri@13.0.1", "", { "dependencies": { "minipass": "^7.0.3" } }, "sha512-QUiRf1+u9wPTL/76GTYlKttDEBWV1ga9ZXW8BG6kfdeyyM8LGPix9gROyg9V2+P0xNyF3X2Go526xKFdMZrHSQ=="],
+
"stream-combiner2": ["stream-combiner2@1.1.1", "", { "dependencies": { "duplexer2": "~0.1.0", "readable-stream": "^2.0.2" } }, "sha512-3PnJbYgS56AeWgtKF5jtJRT6uFJe56Z0Hc5Ngg/6sI6rIt8iiMBTa9cvdyFfpMQjaVHr8dusbNeFGIIonxOvKw=="],
"string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="],
+ "string-width-cjs": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
+
"string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="],
"strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="],
+ "strip-ansi-cjs": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
"strip-bom": ["strip-bom@3.0.0", "", {}, "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA=="],
"strip-final-newline": ["strip-final-newline@4.0.0", "", {}, "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw=="],
@@ -451,6 +858,8 @@
"tagged-tag": ["tagged-tag@1.0.0", "", {}, "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng=="],
+ "tar": ["tar@7.5.7", "", { "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", "minizlib": "^3.1.0", "yallist": "^5.0.0" } }, "sha512-fov56fJiRuThVFXD6o6/Q354S7pnWMJIVlDBYijsTNx6jKSE4pvrDTs6lUnmGvNyfJwFQQwWy3owKz1ucIhveQ=="],
+
"temp-dir": ["temp-dir@3.0.0", "", {}, "sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw=="],
"tempy": ["tempy@3.2.0", "", { "dependencies": { "is-stream": "^3.0.0", "temp-dir": "^3.0.0", "type-fest": "^2.12.2", "unique-string": "^3.0.0" } }, "sha512-d79HhZya5Djd7am0q+W4RTsSU+D/aJzM+4Y4AGJGuGlgM2L6sx5ZvOYTmZjqPhrDrV6xJTtRSm1JCLj6V6LHLQ=="],
@@ -469,6 +878,12 @@
"traverse": ["traverse@0.6.8", "", {}, "sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA=="],
+ "treeverse": ["treeverse@3.0.0", "", {}, "sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ=="],
+
+ "tslib": ["tslib@2.9.1", "", {}, "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA=="],
+
+ "tuf-js": ["tuf-js@4.1.0", "", { "dependencies": { "@tufjs/models": "4.1.0", "debug": "^4.4.3", "make-fetch-happen": "^15.0.1" } }, "sha512-50QV99kCKH5P/Vs4E2Gzp7BopNV+KzTXqWeaxrfu5IQJBOULRsTIS9seSsOVT8ZnGXzCyx55nYWAi4qJzpZKEQ=="],
+
"tunnel": ["tunnel@0.0.6", "", {}, "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="],
"type-fest": ["type-fest@5.4.4", "", { "dependencies": { "tagged-tag": "^1.0.0" } }, "sha512-JnTrzGu+zPV3aXIUhnyWJj4z/wigMsdYajGLIYakqyOW1nPllzXEJee0QQbHj+CTIQtXGlAjuK0UY+2xTyjVAw=="],
@@ -485,6 +900,10 @@
"unicorn-magic": ["unicorn-magic@0.4.0", "", {}, "sha512-wH590V9VNgYH9g3lH9wWjTrUoKsjLF6sGLjhR4sH1LWpLmCOH0Zf7PukhDA8BiS7KHe4oPNkcTHqYkj7SOGUOw=="],
+ "unique-filename": ["unique-filename@5.0.0", "", { "dependencies": { "unique-slug": "^6.0.0" } }, "sha512-2RaJTAvAb4owyjllTfXzFClJ7WsGxlykkPvCr9pA//LD9goVq+m4PPAeBgNodGZ7nSrntT/auWpJ6Y5IFXcfjg=="],
+
+ "unique-slug": ["unique-slug@6.0.0", "", { "dependencies": { "imurmurhash": "^0.1.4" } }, "sha512-4Lup7Ezn8W3d52/xBhZBVdx323ckxa7DEvd9kPQHppTkLoJXw6ltrBCyj5pnrxj0qKDxYMJ56CoxNuFCscdTiw=="],
+
"unique-string": ["unique-string@3.0.0", "", { "dependencies": { "crypto-random-string": "^4.0.0" } }, "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ=="],
"universal-user-agent": ["universal-user-agent@7.0.3", "", {}, "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A=="],
@@ -497,6 +916,12 @@
"validate-npm-package-license": ["validate-npm-package-license@3.0.4", "", { "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew=="],
+ "validate-npm-package-name": ["validate-npm-package-name@7.0.2", "", {}, "sha512-hVDIBwsRruT73PbK7uP5ebUt+ezEtCmzZz3F59BSr2F6OVFnJ/6h8liuvdLrQ88Xmnk6/+xGGuq+pG9WwTuy3A=="],
+
+ "walk-up-path": ["walk-up-path@4.0.0", "", {}, "sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A=="],
+
+ "web-streams-polyfill": ["web-streams-polyfill@3.3.3", "", {}, "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="],
+
"web-worker": ["web-worker@1.2.0", "", {}, "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA=="],
"which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
@@ -505,10 +930,20 @@
"wrap-ansi": ["wrap-ansi@9.0.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww=="],
+ "wrap-ansi-cjs": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],
+
+ "write-file-atomic": ["write-file-atomic@7.0.0", "", { "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^4.0.1" } }, "sha512-YnlPC6JqnZl6aO4uRc+dx5PHguiR9S6WeoLtpxNT9wIG+BDya7ZNE1q7KOjVgaA73hKhKLpVPgJ5QA9THQ5BRg=="],
+
+ "ws": ["ws@8.22.1", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-oyL6OPYme/CmiFvNuGzeoxCJ4nOrZE2O1FwM9MWM1AsGri6nLXB2pg+lNA8aLeXMSav0J6eIVS1j6vUPzUtK9g=="],
+
+ "wsl-utils": ["wsl-utils@1.0.1", "", { "dependencies": { "is-wsl": "^3.1.0", "powershell-utils": "^0.2.0" } }, "sha512-c16PKLIRxBYpR3jSWsdS7SFp0COm5SOQdiFjY818dYFHJbMGuLBszpF07LBWmOS1uzrHa9VGdynsEgoeKy0oOQ=="],
+
"xtend": ["xtend@4.0.2", "", {}, "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="],
"y18n": ["y18n@5.0.8", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="],
+ "yallist": ["yallist@5.0.0", "", {}, "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw=="],
+
"yargs": ["yargs@18.0.0", "", { "dependencies": { "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "string-width": "^7.2.0", "y18n": "^5.0.5", "yargs-parser": "^22.0.0" } }, "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg=="],
"yargs-parser": ["yargs-parser@22.0.0", "", {}, "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw=="],
@@ -519,7 +954,41 @@
"@actions/http-client/undici": ["undici@6.23.0", "", {}, "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g=="],
- "@opencode-ai/plugin/zod": ["zod@4.1.8", "", {}, "sha512-5R1P+WwQqmmMIEACyzSvo4JXHY5WiAFHRMg+zBZKgKS+Q1viRa0C1hmUKtHltoIFKtIdki3pRxkmpP74jnNYHQ=="],
+ "@aws-crypto/sha256-browser/@smithy/util-utf8": ["@smithy/util-utf8@2.3.0", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="],
+
+ "@aws-crypto/util/@smithy/util-utf8": ["@smithy/util-utf8@2.3.0", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="],
+
+ "@effect/platform-node/undici": ["undici@8.12.4", "", {}, "sha512-8Mx+uNKKER2bA4AdtedkqRbwUCIJFr2nJckXRe5yrDqzePqwLP7VNcctN8/XdmDSbF7mS+jJKIszlL+vbam1VA=="],
+
+ "@isaacs/cliui/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="],
+
+ "@isaacs/cliui/wrap-ansi": ["wrap-ansi@8.1.0", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="],
+
+ "@npmcli/arborist/minimatch": ["minimatch@10.1.2", "", { "dependencies": { "@isaacs/brace-expansion": "^5.0.1" } }, "sha512-fu656aJ0n2kcXwsnwnv9g24tkU5uSmOlTjd6WyyaKm2Z+h1qmY6bAjrcaIxF/BslFqbZ8UBtbJi7KgQOZD2PTw=="],
+
+ "@npmcli/arborist/pacote": ["pacote@21.3.1", "", { "dependencies": { "@npmcli/git": "^7.0.0", "@npmcli/installed-package-contents": "^4.0.0", "@npmcli/package-json": "^7.0.0", "@npmcli/promise-spawn": "^9.0.0", "@npmcli/run-script": "^10.0.0", "cacache": "^20.0.0", "fs-minipass": "^3.0.0", "minipass": "^7.0.2", "npm-package-arg": "^13.0.0", "npm-packlist": "^10.0.1", "npm-pick-manifest": "^11.0.1", "npm-registry-fetch": "^19.0.0", "proc-log": "^6.0.0", "promise-retry": "^2.0.1", "sigstore": "^4.0.0", "ssri": "^13.0.0", "tar": "^7.4.3" }, "bin": { "pacote": "bin/index.js" } }, "sha512-O0EDXi85LF4AzdjG74GUwEArhdvawi/YOHcsW6IijKNj7wm8IvEWNF5GnfuxNpQ/ZpO3L37+v8hqdVh8GgWYhg=="],
+
+ "@npmcli/config/ini": ["ini@6.0.0", "", {}, "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ=="],
+
+ "@npmcli/git/ini": ["ini@6.0.0", "", {}, "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ=="],
+
+ "@npmcli/git/which": ["which@6.0.1", "", { "dependencies": { "isexe": "^4.0.0" }, "bin": { "node-which": "bin/which.js" } }, "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg=="],
+
+ "@npmcli/map-workspaces/glob": ["glob@13.0.2", "", { "dependencies": { "minimatch": "^10.1.2", "minipass": "^7.1.2", "path-scurry": "^2.0.0" } }, "sha512-035InabNu/c1lW0tzPhAgapKctblppqsKKG9ZaNzbr+gXwWMjXoiyGSyB9sArzrjG7jY+zntRq5ZSUYemrnWVQ=="],
+
+ "@npmcli/map-workspaces/minimatch": ["minimatch@10.1.2", "", { "dependencies": { "@isaacs/brace-expansion": "^5.0.1" } }, "sha512-fu656aJ0n2kcXwsnwnv9g24tkU5uSmOlTjd6WyyaKm2Z+h1qmY6bAjrcaIxF/BslFqbZ8UBtbJi7KgQOZD2PTw=="],
+
+ "@npmcli/metavuln-calculator/json-parse-even-better-errors": ["json-parse-even-better-errors@5.0.0", "", {}, "sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ=="],
+
+ "@npmcli/metavuln-calculator/pacote": ["pacote@21.3.1", "", { "dependencies": { "@npmcli/git": "^7.0.0", "@npmcli/installed-package-contents": "^4.0.0", "@npmcli/package-json": "^7.0.0", "@npmcli/promise-spawn": "^9.0.0", "@npmcli/run-script": "^10.0.0", "cacache": "^20.0.0", "fs-minipass": "^3.0.0", "minipass": "^7.0.2", "npm-package-arg": "^13.0.0", "npm-packlist": "^10.0.1", "npm-pick-manifest": "^11.0.1", "npm-registry-fetch": "^19.0.0", "proc-log": "^6.0.0", "promise-retry": "^2.0.1", "sigstore": "^4.0.0", "ssri": "^13.0.0", "tar": "^7.4.3" }, "bin": { "pacote": "bin/index.js" } }, "sha512-O0EDXi85LF4AzdjG74GUwEArhdvawi/YOHcsW6IijKNj7wm8IvEWNF5GnfuxNpQ/ZpO3L37+v8hqdVh8GgWYhg=="],
+
+ "@npmcli/package-json/glob": ["glob@13.0.2", "", { "dependencies": { "minimatch": "^10.1.2", "minipass": "^7.1.2", "path-scurry": "^2.0.0" } }, "sha512-035InabNu/c1lW0tzPhAgapKctblppqsKKG9ZaNzbr+gXwWMjXoiyGSyB9sArzrjG7jY+zntRq5ZSUYemrnWVQ=="],
+
+ "@npmcli/package-json/json-parse-even-better-errors": ["json-parse-even-better-errors@5.0.0", "", {}, "sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ=="],
+
+ "@npmcli/promise-spawn/which": ["which@6.0.1", "", { "dependencies": { "isexe": "^4.0.0" }, "bin": { "node-which": "bin/which.js" } }, "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg=="],
+
+ "@npmcli/run-script/which": ["which@6.0.1", "", { "dependencies": { "isexe": "^4.0.0" }, "bin": { "node-which": "bin/which.js" } }, "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg=="],
"@pnpm/network.ca-file/graceful-fs": ["graceful-fs@4.2.10", "", {}, "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="],
@@ -527,6 +996,10 @@
"@semantic-release/release-notes-generator/read-package-up": ["read-package-up@11.0.0", "", { "dependencies": { "find-up-simple": "^1.0.0", "read-pkg": "^9.0.0", "type-fest": "^4.6.0" } }, "sha512-MbgfoNPANMdb4oRBNg5eqLbB2t2r+o5Ua1pNt8BqGp4I0FJZhuVSOj3PaBPni4azWuSzEdNn2evevzVmEk1ohQ=="],
+ "@tufjs/models/minimatch": ["minimatch@10.1.2", "", { "dependencies": { "@isaacs/brace-expansion": "^5.0.1" } }, "sha512-fu656aJ0n2kcXwsnwnv9g24tkU5uSmOlTjd6WyyaKm2Z+h1qmY6bAjrcaIxF/BslFqbZ8UBtbJi7KgQOZD2PTw=="],
+
+ "cacache/glob": ["glob@13.0.2", "", { "dependencies": { "minimatch": "^10.1.2", "minipass": "^7.1.2", "path-scurry": "^2.0.0" } }, "sha512-035InabNu/c1lW0tzPhAgapKctblppqsKKG9ZaNzbr+gXwWMjXoiyGSyB9sArzrjG7jY+zntRq5ZSUYemrnWVQ=="],
+
"cli-highlight/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
"cli-highlight/yargs": ["yargs@16.2.0", "", { "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" } }, "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw=="],
@@ -541,12 +1014,20 @@
"fdir/picomatch": ["picomatch@4.0.3", "", {}, "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q=="],
+ "ignore-walk/minimatch": ["minimatch@10.1.2", "", { "dependencies": { "@isaacs/brace-expansion": "^5.0.1" } }, "sha512-fu656aJ0n2kcXwsnwnv9g24tkU5uSmOlTjd6WyyaKm2Z+h1qmY6bAjrcaIxF/BslFqbZ8UBtbJi7KgQOZD2PTw=="],
+
"import-fresh/resolve-from": ["resolve-from@4.0.0", "", {}, "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="],
"load-json-file/parse-json": ["parse-json@4.0.0", "", { "dependencies": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" } }, "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw=="],
"make-asynchronous/type-fest": ["type-fest@4.41.0", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="],
+ "minipass-flush/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
+
+ "minipass-pipeline/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
+
+ "node-gyp/which": ["which@6.0.1", "", { "dependencies": { "isexe": "^4.0.0" }, "bin": { "node-which": "bin/which.js" } }, "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg=="],
+
"npm/@isaacs/balanced-match": ["@isaacs/balanced-match@4.0.1", "", {}, "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ=="],
"npm/@isaacs/brace-expansion": ["@isaacs/brace-expansion@5.0.1", "", { "dependencies": { "@isaacs/balanced-match": "^4.0.1" } }, "sha512-WMz71T1JS624nWj2n2fnYAuPovhv7EUhk69R6i9dsVyzxt5eM3bjwvgk9L+APE1TRscGysAVMANkB0jh0LQZrQ=="],
@@ -861,14 +1342,24 @@
"npm-run-path/unicorn-magic": ["unicorn-magic@0.3.0", "", {}, "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA=="],
+ "parse-conflict-json/json-parse-even-better-errors": ["json-parse-even-better-errors@5.0.0", "", {}, "sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ=="],
+
"parse5-htmlparser2-tree-adapter/parse5": ["parse5@6.0.1", "", {}, "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw=="],
"read-pkg/parse-json": ["parse-json@8.3.0", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "index-to-position": "^1.1.0", "type-fest": "^4.39.1" } }, "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ=="],
+ "rimraf/glob": ["glob@10.5.0", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg=="],
+
"signale/chalk": ["chalk@2.4.2", "", { "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ=="],
"signale/figures": ["figures@2.0.0", "", { "dependencies": { "escape-string-regexp": "^1.0.5" } }, "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA=="],
+ "string-width-cjs/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
+
+ "string-width-cjs/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
+ "strip-ansi-cjs/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
"tempy/is-stream": ["is-stream@3.0.0", "", {}, "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA=="],
"tempy/type-fest": ["type-fest@2.19.0", "", {}, "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA=="],
@@ -877,10 +1368,34 @@
"wrap-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="],
+ "wrap-ansi-cjs/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
+
+ "wrap-ansi-cjs/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
+
+ "wrap-ansi-cjs/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
+ "@aws-crypto/sha256-browser/@smithy/util-utf8/@smithy/util-buffer-from": ["@smithy/util-buffer-from@2.2.0", "", { "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA=="],
+
+ "@aws-crypto/util/@smithy/util-utf8/@smithy/util-buffer-from": ["@smithy/util-buffer-from@2.2.0", "", { "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA=="],
+
+ "@isaacs/cliui/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="],
+
+ "@isaacs/cliui/wrap-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="],
+
+ "@npmcli/git/which/isexe": ["isexe@4.0.0", "", {}, "sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw=="],
+
+ "@npmcli/package-json/glob/minimatch": ["minimatch@10.1.2", "", { "dependencies": { "@isaacs/brace-expansion": "^5.0.1" } }, "sha512-fu656aJ0n2kcXwsnwnv9g24tkU5uSmOlTjd6WyyaKm2Z+h1qmY6bAjrcaIxF/BslFqbZ8UBtbJi7KgQOZD2PTw=="],
+
+ "@npmcli/promise-spawn/which/isexe": ["isexe@4.0.0", "", {}, "sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw=="],
+
+ "@npmcli/run-script/which/isexe": ["isexe@4.0.0", "", {}, "sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw=="],
+
"@semantic-release/release-notes-generator/read-package-up/read-pkg": ["read-pkg@9.0.1", "", { "dependencies": { "@types/normalize-package-data": "^2.4.3", "normalize-package-data": "^6.0.0", "parse-json": "^8.0.0", "type-fest": "^4.6.0", "unicorn-magic": "^0.1.0" } }, "sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA=="],
"@semantic-release/release-notes-generator/read-package-up/type-fest": ["type-fest@4.41.0", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="],
+ "cacache/glob/minimatch": ["minimatch@10.1.2", "", { "dependencies": { "@isaacs/brace-expansion": "^5.0.1" } }, "sha512-fu656aJ0n2kcXwsnwnv9g24tkU5uSmOlTjd6WyyaKm2Z+h1qmY6bAjrcaIxF/BslFqbZ8UBtbJi7KgQOZD2PTw=="],
+
"cli-highlight/chalk/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
"cli-highlight/yargs/cliui": ["cliui@7.0.4", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^7.0.0" } }, "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ=="],
@@ -903,6 +1418,12 @@
"env-ci/execa/strip-final-newline": ["strip-final-newline@3.0.0", "", {}, "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw=="],
+ "minipass-flush/minipass/yallist": ["yallist@4.0.0", "", {}, "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="],
+
+ "minipass-pipeline/minipass/yallist": ["yallist@4.0.0", "", {}, "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="],
+
+ "node-gyp/which/isexe": ["isexe@4.0.0", "", {}, "sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw=="],
+
"npm/minipass-flush/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
"npm/minipass-pipeline/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
@@ -913,12 +1434,24 @@
"read-pkg/parse-json/type-fest": ["type-fest@4.41.0", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="],
+ "rimraf/glob/minimatch": ["minimatch@9.0.9", "", { "dependencies": { "brace-expansion": "^2.0.2" } }, "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg=="],
+
+ "rimraf/glob/path-scurry": ["path-scurry@1.11.1", "", { "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" } }, "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA=="],
+
"signale/chalk/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="],
"signale/chalk/supports-color": ["supports-color@5.5.0", "", { "dependencies": { "has-flag": "^3.0.0" } }, "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow=="],
"signale/figures/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="],
+ "string-width-cjs/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
+ "wrap-ansi-cjs/ansi-styles/color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],
+
+ "wrap-ansi-cjs/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
+
+ "wrap-ansi-cjs/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
"@semantic-release/release-notes-generator/read-package-up/read-pkg/normalize-package-data": ["normalize-package-data@6.0.2", "", { "dependencies": { "hosted-git-info": "^7.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" } }, "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g=="],
"@semantic-release/release-notes-generator/read-package-up/read-pkg/parse-json": ["parse-json@8.3.0", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "index-to-position": "^1.1.0", "type-fest": "^4.39.1" } }, "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ=="],
@@ -943,8 +1476,14 @@
"npm/minipass-pipeline/minipass/yallist": ["yallist@4.0.0", "", {}, "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="],
+ "rimraf/glob/minimatch/brace-expansion": ["brace-expansion@2.1.7", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g=="],
+
+ "rimraf/glob/path-scurry/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],
+
"signale/chalk/supports-color/has-flag": ["has-flag@3.0.0", "", {}, "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="],
+ "wrap-ansi-cjs/ansi-styles/color-convert/color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
+
"@semantic-release/release-notes-generator/read-package-up/read-pkg/normalize-package-data/hosted-git-info": ["hosted-git-info@7.0.2", "", { "dependencies": { "lru-cache": "^10.0.1" } }, "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w=="],
"cli-highlight/chalk/ansi-styles/color-convert/color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
@@ -955,6 +1494,8 @@
"cli-highlight/yargs/string-width/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+ "rimraf/glob/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
+
"@semantic-release/release-notes-generator/read-package-up/read-pkg/normalize-package-data/hosted-git-info/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],
"cli-highlight/yargs/cliui/wrap-ansi/ansi-styles/color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],
diff --git a/package.json b/package.json
index e8553e4..906578b 100644
--- a/package.json
+++ b/package.json
@@ -3,33 +3,42 @@
"version": "0.1.0",
"description": "OpenCode plugin for parallel AI coding sessions in isolated git worktrees",
"type": "module",
- "main": "./dist/index.js",
- "types": "./dist/index.d.ts",
+ "main": "./src/index.ts",
+ "types": "./src/index.ts",
"exports": {
- ".": {
- "types": "./dist/index.d.ts",
- "default": "./dist/index.js"
- }
+ ".": "./src/index.ts",
+ "./tui": "./src/tui.ts",
+ "./rpc": "./src/rpc.ts"
},
"publishConfig": {
"access": "public",
"provenance": true
},
- "files": ["dist"],
+ "files": ["src", "dist"],
"scripts": {
- "build": "bun build ./src/index.ts --outdir ./dist --target bun",
- "test": "bun test",
+ "build": "bun build ./src/index.ts ./src/tui.ts ./src/rpc.ts --outdir ./dist --target bun",
+ "typecheck": "tsc --noEmit",
+ "test": "bun test --parallel",
"release": "semantic-release",
"prepublishOnly": "bun run build"
},
"dependencies": {
- "@opencode-ai/plugin": "^1.0.85",
- "@opencode-ai/sdk": "^1.1.53",
+ "@opencode/client": "^2.2.5",
+ "@opencode/plugin": "^2.2.5",
"zod": "^4.3.6"
},
+ "peerDependencies": {
+ "solid-js": ">=1.9.0"
+ },
+ "peerDependenciesMeta": {
+ "solid-js": {
+ "optional": true
+ }
+ },
"devDependencies": {
"@types/bun": "latest",
"semantic-release": "^25.0.3",
+ "solid-js": "^1.9.0",
"typescript": "^5.0.0"
},
"author": "Nigel Bazzeghin ",
diff --git a/src/commands.ts b/src/commands.ts
index 5117930..cce6154 100644
--- a/src/commands.ts
+++ b/src/commands.ts
@@ -1,185 +1,165 @@
-import type { PluginInput, ToolContext } from '@opencode-ai/plugin';
+import type { Plugin } from '@opencode/plugin';
-type Client = PluginInput['client'];
+type Client = Plugin.Context;
-// Minimal context for programmatic tool invocation from commands
-const dummyContext: ToolContext = {
- sessionID: '',
- messageID: '',
- agent: '',
- directory: process.cwd(),
- worktree: process.cwd(),
- abort: new AbortController().signal,
- metadata: () => {},
- ask: async () => {},
-};
+const DIRECT_COMMANDS = [
+ 'mc',
+ 'mc-jobs',
+ 'mc-status',
+ 'mc-attach',
+ 'mc-cleanup',
+ 'mc-capture',
+ 'mc-diff',
+ 'mc-approve',
+] as const;
-// Helper to send output to user without triggering LLM
-async function sendMessage(client: Client, sessionID: string, text: string) {
- await client.session.prompt({
- path: { id: sessionID },
- body: {
- noReply: true,
- parts: [{ type: 'text' as const, text, ignored: true }],
- },
- });
-}
+const TEMPLATE_COMMANDS: Record = {
+ 'mc-launch':
+ 'Launch a new Mission Control parallel coding session with these instructions: $ARGUMENTS',
+ 'mc-plan':
+ 'Create and execute a Mission Control orchestrated plan for: $ARGUMENTS',
+};
-// Register commands in config hook
-export function registerCommands(config: any) {
- if (!config.command) config.command = {};
+const COMMAND_DESCRIPTIONS: Record = {
+ 'mc-jobs': 'List all Mission Control jobs and their status',
+ mc: 'Show Mission Control dashboard overview',
+ 'mc-launch': 'Launch a new parallel AI agent job',
+ 'mc-status': 'Get detailed status of a specific job',
+ 'mc-attach': 'Get the tmux attach command for a job',
+ 'mc-cleanup': 'Clean up finished job worktrees and metadata',
+ 'mc-capture': 'Capture terminal output from a running job',
+ 'mc-diff': "Show changes in a job's branch compared to base",
+ 'mc-approve': 'Approve a pending plan or clear a supervisor checkpoint',
+ 'mc-plan': 'Create a multi-job orchestrated plan',
+};
- config.command['mc-jobs'] = {
- template: '',
- description: 'List all Mission Control jobs and their status',
- };
- config.command['mc'] = {
- template: '',
- description: 'Show Mission Control dashboard overview',
- };
- config.command['mc-launch'] = {
- template:
- 'Launch a new Mission Control parallel coding session with these instructions: $ARGUMENTS',
- description: 'Launch a new parallel AI agent job',
- };
- config.command['mc-status'] = {
- template: '',
- description: 'Get detailed status of a specific job',
- };
- config.command['mc-attach'] = {
- template: '',
- description: 'Get the tmux attach command for a job',
- };
- config.command['mc-cleanup'] = {
- template: '',
- description: 'Clean up finished job worktrees and metadata',
- };
- config.command['mc-capture'] = {
- template: '',
- description: 'Capture terminal output from a running job',
- };
- config.command['mc-diff'] = {
- template: '',
- description: 'Show changes in a job\'s branch compared to base',
- };
- config.command['mc-approve'] = {
- template: '',
- description: 'Approve a pending plan or clear a supervisor checkpoint',
- };
- config.command['mc-plan'] = {
- template:
- 'Create and execute a Mission Control orchestrated plan for: $ARGUMENTS',
- description: 'Create a multi-job orchestrated plan',
- };
+function isCheckpoint(
+ value: string,
+): value is 'pre_merge' | 'on_error' | 'pre_pr' {
+ return value === 'pre_merge' || value === 'on_error' || value === 'pre_pr';
}
-// Handle command execution for direct commands
-export function createCommandHandler(client: Client) {
- return async (
- input: { command: string; sessionID: string; arguments: string },
- _output: { parts: any[] }
- ) => {
- // Only handle our direct commands (not mc-launch which is template-based)
- const ourCommands = ['mc', 'mc-jobs', 'mc-status', 'mc-attach', 'mc-cleanup', 'mc-capture', 'mc-diff', 'mc-approve'];
- if (!ourCommands.includes(input.command)) return;
-
- try {
- let result: string;
- const args = input.arguments.trim();
+async function runDirectCommand(
+ ctx: Client,
+ sessionID: string,
+ command: string,
+ args: string,
+): Promise {
+ let content: string;
- switch (input.command) {
- case 'mc': {
- const { mc_overview } = await import('./tools/overview');
- result = await mc_overview.execute({}, dummyContext);
- break;
- }
- case 'mc-jobs': {
- const { mc_jobs } = await import('./tools/jobs');
- result = await mc_jobs.execute({}, dummyContext);
- break;
- }
- case 'mc-status': {
- if (!args) {
- const { mc_jobs } = await import('./tools/jobs');
- const jobList = await mc_jobs.execute({}, dummyContext);
- result =
- 'No job name provided. Here are your current jobs:\n\n' + jobList;
- break;
- }
- const { mc_status } = await import('./tools/status');
- result = await mc_status.execute({ name: args }, dummyContext);
- break;
- }
- case 'mc-attach': {
- if (!args) {
- const { mc_jobs } = await import('./tools/jobs');
- const jobList = await mc_jobs.execute({}, dummyContext);
- result =
- 'No job name provided. Here are your current jobs:\n\n' + jobList;
- break;
- }
- const { mc_attach } = await import('./tools/attach');
- result = await mc_attach.execute({ name: args }, dummyContext);
- break;
- }
- case 'mc-cleanup': {
- const { mc_cleanup } = await import('./tools/cleanup');
- if (args) {
- result = await mc_cleanup.execute({ name: args }, dummyContext);
- } else {
- result = await mc_cleanup.execute({ all: true }, dummyContext);
- }
- break;
- }
- case 'mc-capture': {
- if (!args) {
- const { mc_jobs } = await import('./tools/jobs');
- const jobList = await mc_jobs.execute({}, dummyContext);
- result =
- 'No job name provided. Here are your current jobs:\n\n' + jobList;
- break;
- }
- const { mc_capture } = await import('./tools/capture');
- result = await mc_capture.execute({ name: args }, dummyContext);
- break;
- }
- case 'mc-diff': {
- if (!args) {
- const { mc_jobs } = await import('./tools/jobs');
- const jobList = await mc_jobs.execute({}, dummyContext);
- result =
- 'No job name provided. Here are your current jobs:\n\n' + jobList;
- break;
- }
- const { mc_diff } = await import('./tools/diff');
- result = await mc_diff.execute({ name: args }, dummyContext);
- break;
- }
- case 'mc-approve': {
- const { mc_plan_approve } = await import('./tools/plan-approve');
- result = await mc_plan_approve.execute(
- args ? { checkpoint: args as any } : {},
- dummyContext
- );
- break;
- }
- default:
- return; // Not our command
+ switch (command) {
+ case 'mc': {
+ const { mc_overview } = await import('./tools/overview');
+ content = (await mc_overview.execute()).content;
+ break;
+ }
+ case 'mc-jobs': {
+ const { mc_jobs } = await import('./tools/jobs');
+ content = (await mc_jobs.execute({})).content;
+ break;
+ }
+ case 'mc-status': {
+ if (!args) {
+ const { mc_jobs } = await import('./tools/jobs');
+ const jobList = (await mc_jobs.execute({})).content;
+ content =
+ 'No job name provided. Here are your current jobs:\n\n' + jobList;
+ break;
}
+ const { mc_status } = await import('./tools/status');
+ content = (await mc_status.execute({ name: args })).content;
+ break;
+ }
+ case 'mc-attach': {
+ if (!args) {
+ const { mc_jobs } = await import('./tools/jobs');
+ const jobList = (await mc_jobs.execute({})).content;
+ content =
+ 'No job name provided. Here are your current jobs:\n\n' + jobList;
+ break;
+ }
+ const { mc_attach } = await import('./tools/attach');
+ content = (await mc_attach.execute({ name: args })).content;
+ break;
+ }
+ case 'mc-cleanup': {
+ const { mc_cleanup } = await import('./tools/cleanup');
+ content = args
+ ? (await mc_cleanup.execute({ name: args })).content
+ : (await mc_cleanup.execute({ all: true })).content;
+ break;
+ }
+ case 'mc-capture': {
+ if (!args) {
+ const { mc_jobs } = await import('./tools/jobs');
+ const jobList = (await mc_jobs.execute({})).content;
+ content =
+ 'No job name provided. Here are your current jobs:\n\n' + jobList;
+ break;
+ }
+ const { mc_capture } = await import('./tools/capture');
+ content = (await mc_capture.execute({ name: args })).content;
+ break;
+ }
+ case 'mc-diff': {
+ if (!args) {
+ const { mc_jobs } = await import('./tools/jobs');
+ const jobList = (await mc_jobs.execute({})).content;
+ content =
+ 'No job name provided. Here are your current jobs:\n\n' + jobList;
+ break;
+ }
+ const { mc_diff } = await import('./tools/diff');
+ content = (await mc_diff.execute({ name: args })).content;
+ break;
+ }
+ case 'mc-approve': {
+ const { mc_plan_approve } = await import('./tools/plan-approve');
+ content =
+ args && isCheckpoint(args)
+ ? (await mc_plan_approve.execute({ checkpoint: args })).content
+ : (await mc_plan_approve.execute({})).content;
+ break;
+ }
+ default:
+ return;
+ }
+
+ await ctx.session.synthetic({ sessionID, text: content, resume: false });
+}
- await sendMessage(client, input.sessionID, result);
- } catch (err: any) {
- // If it's our marker, rethrow
- if (err?.message === '__MC_HANDLED__') throw err;
- // Otherwise, display the error to the user
- await sendMessage(
- client,
- input.sessionID,
- `Error: ${err?.message || 'Unknown error'}`
- );
+export async function registerCommands(ctx: Client): Promise {
+ await ctx.command.transform((editor) => {
+ for (const name of DIRECT_COMMANDS) {
+ editor.add({
+ name,
+ description: COMMAND_DESCRIPTIONS[name],
+ execute: async (input) => {
+ const args = input.prompt.text.trim();
+ try {
+ await runDirectCommand(ctx, input.sessionID, name, args);
+ } catch (error) {
+ const message = error instanceof Error ? error.message : String(error);
+ await ctx.session.synthetic({
+ sessionID: input.sessionID,
+ text: `Error: ${message || 'Unknown error'}`,
+ resume: false,
+ });
+ }
+ },
+ });
}
- // Prevent LLM from processing this command
- throw new Error('__MC_HANDLED__');
- };
+ for (const [name, template] of Object.entries(TEMPLATE_COMMANDS)) {
+ editor.add({
+ name,
+ description: COMMAND_DESCRIPTIONS[name],
+ execute: async (input) => {
+ const args = input.prompt.text.trim();
+ const expanded = template.replace('$ARGUMENTS', args);
+ await ctx.session.prompt({ sessionID: input.sessionID, text: expanded });
+ },
+ });
+ }
+ });
}
diff --git a/src/hooks/auto-status.ts b/src/hooks/auto-status.ts
index 00904f1..068767a 100644
--- a/src/hooks/auto-status.ts
+++ b/src/hooks/auto-status.ts
@@ -14,10 +14,10 @@ const LAST_STATUS_FILE = 'last-status-time';
* 3. Running jobs > 0
* 4. 5+ minutes since last status
*/
-export async function shouldShowAutoStatus(): Promise {
+export async function shouldShowAutoStatus(cwd?: string): Promise {
try {
// Guard 1: Check if we're in the command center (not in a managed worktree)
- const isCommandCenter = await checkIsCommandCenter();
+ const isCommandCenter = await checkIsCommandCenter(cwd);
if (!isCommandCenter) {
return false;
}
@@ -80,8 +80,7 @@ export async function getAutoStatusMessage(): Promise {
/**
* Check if current directory is the command center (not in a managed worktree)
*/
-async function checkIsCommandCenter(): Promise {
- const cwd = process.cwd();
+async function checkIsCommandCenter(cwd: string = process.cwd()): Promise {
const result = await isInManagedWorktree(cwd);
return !result.isManaged;
}
diff --git a/src/hooks/awareness.ts b/src/hooks/awareness.ts
index 315e0a5..6c90193 100644
--- a/src/hooks/awareness.ts
+++ b/src/hooks/awareness.ts
@@ -8,8 +8,7 @@ export interface WorktreeContext {
mode?: string;
}
-export async function getWorktreeContext(): Promise {
- const cwd = process.cwd();
+export async function getWorktreeContext(cwd: string = process.cwd()): Promise {
const { isManaged, worktreePath } = await isInManagedWorktree(cwd);
if (!isManaged) {
diff --git a/src/hooks/compaction.ts b/src/hooks/compaction.ts
index 565a949..9b593fc 100644
--- a/src/hooks/compaction.ts
+++ b/src/hooks/compaction.ts
@@ -88,8 +88,8 @@ export async function getCompactionContext(): Promise {
return lines.join('\n');
}
-export async function getJobCompactionContext(): Promise {
- const context = await getWorktreeContext();
+export async function getJobCompactionContext(cwd: string = process.cwd()): Promise {
+ const context = await getWorktreeContext(cwd);
if (context.isInJob && context.jobName) {
const mode = context.mode || 'unknown';
diff --git a/src/hooks/notifications.ts b/src/hooks/notifications.ts
index 90d1302..243fd99 100644
--- a/src/hooks/notifications.ts
+++ b/src/hooks/notifications.ts
@@ -1,10 +1,11 @@
-import type { PluginInput } from '@opencode-ai/plugin';
+import type { Plugin } from '@opencode/plugin';
import type { Job } from '../lib/job-state';
import { readReport } from '../lib/reports';
import { formatElapsed } from '../lib/utils';
import { type PendingQuestion, buildQuestionRelayMessage } from '../lib/question-relay';
+import { showToast } from '../rpc';
-type Client = PluginInput['client'];
+type Client = Plugin.Context;
type NotificationEvent = 'complete' | 'failed' | 'blocked' | 'needs_review' | 'awaiting_input' | 'question';
// Tracks when we last annotated a title per session. Resets are suppressed
@@ -39,19 +40,10 @@ interface SessionTitleState {
const titleState = new Map();
-function extractSessionTitle(response: unknown): string | undefined {
- if (!response || typeof response !== 'object') return undefined;
- const obj = response as Record;
-
- // SDK may wrap in { data: { ... } } or return flat
- if (obj.data && typeof obj.data === 'object') {
- const data = obj.data as Record;
- if (typeof data.title === 'string') return data.title;
- }
-
- if (typeof obj.title === 'string') return obj.title;
-
- return undefined;
+function extractSessionTitle(session: unknown): string | undefined {
+ if (!session || typeof session !== 'object') return undefined;
+ const title = (session as { title?: unknown }).title;
+ return typeof title === 'string' ? title : undefined;
}
const STATUS_ICONS: Record = {
@@ -84,7 +76,7 @@ export async function annotateSessionTitle(
try {
if (!titleState.has(sessionID)) {
- const session = await client.session.get({ path: { id: sessionID } });
+ const session = await client.session.get({ sessionID });
let originalTitle = extractSessionTitle(session) ?? '';
if (originalTitle.startsWith('[MC] ')) {
originalTitle = originalTitle.slice(5);
@@ -99,10 +91,7 @@ export async function annotateSessionTitle(
state.annotations.set(jobName, statusText);
const annotatedTitle = buildAnnotatedTitle(state, sessionID);
- await client.session.update({
- path: { id: sessionID },
- body: { title: annotatedTitle },
- });
+ await client.session.update({ sessionID, title: annotatedTitle });
lastAnnotationTime.set(sessionID, Date.now());
} catch {
// Fire-and-forget: don't block on title update failures
@@ -118,10 +107,7 @@ export async function resetSessionTitle(client: Client, sessionID: string): Prom
titleState.delete(sessionID);
try {
- await client.session.update({
- path: { id: sessionID },
- body: { title: resetTitle },
- });
+ await client.session.update({ sessionID, title: resetTitle });
} catch {
// Fire-and-forget: don't block on title reset failures
}
@@ -141,21 +127,16 @@ export async function ensureMCPrefix(client: Client, sessionID: string | undefin
if (titleState.has(sessionID)) {
const state = titleState.get(sessionID)!;
const annotatedTitle = buildAnnotatedTitle(state, sessionID);
- await client.session.update({
- path: { id: sessionID },
- body: { title: annotatedTitle },
- });
+ await client.session.update({ sessionID, title: annotatedTitle });
} else {
- const session = await client.session.get({ path: { id: sessionID } });
+ const session = await client.session.get({ sessionID });
const currentTitle = extractSessionTitle(session) ?? '';
if (currentTitle.startsWith('[MC]')) return;
- await client.session.update({
- path: { id: sessionID },
- body: { title: `[MC] ${currentTitle}` },
- });
+ await client.session.update({ sessionID, title: `[MC] ${currentTitle}` });
}
} catch {
+ // Fire-and-forget: don't block on title prefix failures
}
}
@@ -169,13 +150,11 @@ export function _getMCPrefixedSessionsForTesting(): Set {
}
async function sendMessage(client: Client, sessionID: string, text: string, expectReply = false): Promise {
- await client.session.prompt({
- path: { id: sessionID },
- body: {
- noReply: !expectReply,
- parts: [{ type: 'text' as const, text, ...(!expectReply && { ignored: true }) }],
- },
- });
+ if (expectReply) {
+ await client.session.prompt({ sessionID, text });
+ } else {
+ await client.session.synthetic({ sessionID, text, resume: false });
+ }
}
function getDedupKey(event: NotificationEvent, job: Job, reportTimestamp?: string): string {
@@ -236,9 +215,8 @@ export function setupNotifications(options: SetupNotificationsOptions): void {
let sessionLabel = sessionID;
try {
- const sessionInfo = await client.session.get({ path: { id: sessionID } });
- const data = (sessionInfo as any)?.data ?? sessionInfo;
- sessionLabel = data?.title ?? data?.slug ?? sessionID;
+ const sessionInfo = await client.session.get({ sessionID });
+ sessionLabel = sessionInfo?.title ?? sessionID;
} catch {
// Fall back to raw session ID
}
@@ -260,18 +238,12 @@ export function setupNotifications(options: SetupNotificationsOptions): void {
};
const toast = toastMap[event];
if (toast) {
- try {
- await client.tui.showToast({
- body: {
- title: toast.title,
- message: `Switch to session "${sessionLabel}" to respond`,
- variant: toast.variant,
- duration: event === 'question' ? 10000 : 5000,
- },
- });
- } catch {
- // Toast may not be available in all environments
- }
+ await showToast({
+ title: toast.title,
+ message: `Switch to session "${sessionLabel}" to respond`,
+ variant: toast.variant,
+ duration: event === 'question' ? 10000 : 5000,
+ });
}
await sendMessage(client, sessionID, message, event === 'question');
diff --git a/src/index.ts b/src/index.ts
index bb1ccc5..4c9e9cc 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,15 +1,16 @@
-import type { Plugin } from '@opencode-ai/plugin';
-import { getSharedMonitor, setSharedNotifyCallback, getSharedNotifyCallback, setSharedOrchestrator } from './lib/orchestrator-singleton';
+import { Plugin } from '@opencode/plugin';
+import { getSharedMonitor, setSharedNotifyCallback, getSharedOrchestratorCallbacks, setSharedOrchestrator } from './lib/orchestrator-singleton';
import { getCompactionContext, getJobCompactionContext } from './hooks/compaction';
import { shouldShowAutoStatus, getAutoStatusMessage } from './hooks/auto-status';
import { setupNotifications, hasAnnotation, resetSessionTitle, isTitleResetSuppressed, ensureMCPrefix } from './hooks/notifications';
-import { registerCommands, createCommandHandler } from './commands';
+import { registerCommands } from './commands';
import { isTmuxAvailable } from './lib/tmux';
import { loadPlan } from './lib/plan-state';
import { Orchestrator } from './lib/orchestrator';
import { loadConfig } from './lib/config';
-import { setCurrentModel, setConfigFallbackModel } from './lib/model-tracker';
+import { setCurrentModelFromSDK, setConfigFallbackModel } from './lib/model-tracker';
import { isInManagedWorktree } from './lib/worktree';
+import { missionControlRpc, setToastEmitter, showToast } from './rpc';
import { mc_launch } from './tools/launch';
import { mc_jobs } from './tools/jobs';
import { mc_status } from './tools/status';
@@ -46,6 +47,7 @@ function extractSessionIDFromEvent(event: unknown): string | undefined {
sessionID?: string;
sessionId?: string;
session?: SessionWithID;
+ data?: { sessionID?: string; sessionId?: string };
properties?: {
sessionID?: string;
info?: SessionWithID;
@@ -60,6 +62,15 @@ function extractSessionIDFromEvent(event: unknown): string | undefined {
return candidate.sessionId;
}
+ if (candidate.data) {
+ if (typeof candidate.data.sessionID === 'string' && isValidSessionID(candidate.data.sessionID)) {
+ return candidate.data.sessionID;
+ }
+ if (typeof candidate.data.sessionId === 'string' && isValidSessionID(candidate.data.sessionId)) {
+ return candidate.data.sessionId;
+ }
+ }
+
if (candidate.properties) {
if (typeof candidate.properties.sessionID === 'string' && isValidSessionID(candidate.properties.sessionID)) {
return candidate.properties.sessionID;
@@ -116,200 +127,225 @@ function extractSessionIDFromListResult(listResult: unknown): string | undefined
return undefined;
}
-let tmuxAvailable = false;
+export default Plugin.define({
+ id: 'opencode-mission-control',
+ async setup(ctx) {
+ // In V2 the plugin runs inside the OpenCode server, whose process cwd is not
+ // guaranteed to match the project. Use the plugin instance location instead.
+ const cwd = ctx.location?.directory ?? process.cwd();
+ const worktreeInfo = await isInManagedWorktree(cwd);
+ const isJobAgent = worktreeInfo.isManaged;
-export const MissionControl: Plugin = async ({ client }) => {
- const cwd = process.cwd();
- const worktreeInfo = await isInManagedWorktree(cwd);
- const isJobAgent = worktreeInfo.isManaged;
-
- tmuxAvailable = await isTmuxAvailable();
- if (!tmuxAvailable) {
- console.warn('[Mission Control] tmux is not installed or not in PATH. Job launching will be unavailable.');
- }
+ const tmuxAvailable = await isTmuxAvailable();
+ if (!tmuxAvailable) {
+ console.warn('[Mission Control] tmux is not installed or not in PATH. Job launching will be unavailable.');
+ }
- const monitor = getSharedMonitor();
- let activeSessionID: string | undefined;
+ const monitor = getSharedMonitor();
+ let activeSessionID: string | undefined;
- const getActiveSessionID = async (): Promise => {
- if (activeSessionID) {
- return activeSessionID;
- }
+ const getActiveSessionID = async (): Promise => {
+ if (activeSessionID) {
+ return activeSessionID;
+ }
- try {
- const listResult = await client.session.list();
- activeSessionID = extractSessionIDFromListResult(listResult);
- return activeSessionID;
- } catch {
- return undefined;
- }
- };
+ try {
+ const listResult = await ctx.session.list(
+ ctx.location?.directory ? { directory: ctx.location.directory } : undefined,
+ );
+ activeSessionID = extractSessionIDFromListResult(listResult);
+ return activeSessionID;
+ } catch {
+ return undefined;
+ }
+ };
- // Detect if we're a subagent spawned by another OpenCode session
- let _isSubagentCached: boolean | null = null;
- const isSubagent = async (): Promise => {
- if (_isSubagentCached !== null) return _isSubagentCached;
- try {
- const sessionID = await getActiveSessionID();
- if (!sessionID) {
- _isSubagentCached = false;
+ // Detect if we're a subagent spawned by another OpenCode session
+ let isSubagentCached: boolean | null = null;
+ const isSubagent = async (): Promise => {
+ if (isSubagentCached !== null) return isSubagentCached;
+ try {
+ const sessionID = await getActiveSessionID();
+ if (!sessionID) {
+ isSubagentCached = false;
+ return false;
+ }
+ const session = await ctx.session.get({ sessionID });
+ isSubagentCached = !!session?.parentID;
+ return isSubagentCached;
+ } catch {
+ isSubagentCached = false;
return false;
}
- const session = await client.session.get({ path: { id: sessionID } });
- const data = (session as any)?.data ?? session;
- _isSubagentCached = !!(data?.parentID || data?.parentId);
- return _isSubagentCached;
- } catch {
- _isSubagentCached = false;
- return false;
- }
- };
+ };
- if (!isJobAgent) {
- setupNotifications({
- client,
- monitor,
- getActiveSessionID,
- isSubagent,
- });
- }
+ if (!isJobAgent) {
+ setupNotifications({
+ client: ctx,
+ monitor,
+ getActiveSessionID,
+ isSubagent,
+ });
+ }
- let notifyPending: Promise = Promise.resolve();
- if (!isJobAgent) {
- setSharedNotifyCallback((message: string, targetSessionID?: string) => {
- notifyPending = notifyPending.then(async () => {
- const sessionID = targetSessionID ?? await getActiveSessionID();
- if (!sessionID || !sessionID.startsWith('ses')) return;
- await client.session.prompt({
- path: { id: sessionID },
- body: {
- noReply: true,
- parts: [{ type: 'text' as const, text: message }],
- },
+ if (!isJobAgent) {
+ let notifyPending: Promise = Promise.resolve();
+ setSharedNotifyCallback((message: string, targetSessionID?: string) => {
+ notifyPending = notifyPending.then(async () => {
+ const sessionID = targetSessionID ?? await getActiveSessionID();
+ if (!sessionID || !isValidSessionID(sessionID)) return;
+ await ctx.session.synthetic({ sessionID, text: message, resume: false }).catch(() => {});
}).catch(() => {});
- }).catch(() => {});
- });
- }
+ });
+ }
- if (!isJobAgent) {
- monitor.start();
- }
+ const rpcRegistration = await ctx.rpc.register(missionControlRpc, {});
+ setToastEmitter(async (options) => {
+ await rpcRegistration.events.emit('toast', {
+ title: options.title ?? 'Mission Control',
+ message: options.message,
+ variant: options.variant ?? 'info',
+ duration: options.duration ?? 5000,
+ });
+ });
- client.config.get().then((result) => {
- const config = result.data;
- if (config?.model) {
- setConfigFallbackModel(config.model);
+ if (!isJobAgent) {
+ monitor.start();
}
- }).catch(() => {});
-
- if (!isJobAgent) {
- loadPlan().then(async (plan) => {
- if (plan && (plan.status === 'running' || plan.status === 'paused')) {
- const config = await loadConfig();
- const orchestrator = new Orchestrator(monitor, config, { notify: getSharedNotifyCallback() ?? undefined });
- setSharedOrchestrator(orchestrator);
- await orchestrator.resumePlan();
+
+ ctx.model.default().then((result) => {
+ const model = result.data;
+ if (model?.providerID && model?.modelID) {
+ setConfigFallbackModel(`${model.providerID}/${model.modelID}`);
}
}).catch(() => {});
- }
- return {
- config: async (configInput: any) => {
- if (!isJobAgent) {
- registerCommands(configInput);
- }
- },
- 'command.execute.before': (input: { command: string; sessionID: string; arguments: string }, output: { parts: unknown[] }) => {
- if (isValidSessionID(input.sessionID)) {
- activeSessionID = input.sessionID;
- if (hasAnnotation(input.sessionID) && !isTitleResetSuppressed(input.sessionID)) {
- resetSessionTitle(client, input.sessionID).catch(() => {});
+ if (!isJobAgent) {
+ loadPlan().then(async (plan) => {
+ if (plan && (plan.status === 'running' || plan.status === 'paused')) {
+ const config = await loadConfig();
+ const orchestrator = new Orchestrator(monitor, config, getSharedOrchestratorCallbacks());
+ setSharedOrchestrator(orchestrator);
+ await orchestrator.resumePlan();
}
+ }).catch(() => {});
+ }
+
+ // Register slash commands
+ if (!isJobAgent) {
+ await registerCommands(ctx);
+ }
+
+ // Bind the plugin's location into mc_report. V2 tool execution does not
+ // expose the session directory, and `opencode run` executes plugins in the
+ // shared background service whose process.cwd() is not the job worktree.
+ const reportTool = {
+ ...mc_report,
+ execute: (input: Parameters[0]) =>
+ mc_report.execute(input, cwd),
+ };
+
+ // Register tools
+ await ctx.tool.transform((editor) => {
+ if (isJobAgent) {
+ editor.add(reportTool);
+ editor.add(mc_status);
+ } else {
+ editor.add(mc_launch);
+ editor.add(mc_jobs);
+ editor.add(mc_status);
+ editor.add(mc_diff);
+ editor.add(mc_pr);
+ editor.add(mc_merge);
+ editor.add(mc_sync);
+ editor.add(mc_cleanup);
+ editor.add(mc_kill);
+ editor.add(mc_attach);
+ editor.add(mc_capture);
+ editor.add(mc_plan);
+ editor.add(mc_plan_status);
+ editor.add(mc_plan_cancel);
+ editor.add(mc_plan_approve);
+ editor.add(reportTool);
+ editor.add(mc_overview);
+ editor.add(mc_answer);
}
- return createCommandHandler(client)(input, output);
- },
- 'tool.execute.before': async (input: { tool: string; sessionID: string; callID: string }) => {
- if (input.sessionID && isValidSessionID(input.sessionID)) {
- activeSessionID = input.sessionID;
- if (hasAnnotation(input.sessionID) && !isTitleResetSuppressed(input.sessionID)) {
- resetSessionTitle(client, input.sessionID).catch(() => {});
+ });
+
+ // Track session and reset annotated titles before tool execution
+ await ctx.tool.hook('execute.before', async (hook) => {
+ if (hook.sessionID && isValidSessionID(hook.sessionID)) {
+ activeSessionID = hook.sessionID;
+ if (hasAnnotation(hook.sessionID) && !isTitleResetSuppressed(hook.sessionID)) {
+ resetSessionTitle(ctx, hook.sessionID).catch(() => {});
}
}
- if (input.tool?.startsWith('mc_')) {
- const sessionID = input.sessionID ?? await getActiveSessionID();
- ensureMCPrefix(client, sessionID).catch(() => {});
+ if (hook.tool?.startsWith('mc_')) {
+ const sessionID = hook.sessionID ?? await getActiveSessionID();
+ ensureMCPrefix(ctx, sessionID).catch(() => {});
}
- },
- 'chat.message': async (input) => {
+ });
+
+ // Track session and reset annotated titles on prompt
+ await ctx.session.hook('prompt', async (input) => {
if (input.sessionID && isValidSessionID(input.sessionID)) {
activeSessionID = input.sessionID;
if (hasAnnotation(input.sessionID) && !isTitleResetSuppressed(input.sessionID)) {
- resetSessionTitle(client, input.sessionID).catch(() => {});
+ resetSessionTitle(ctx, input.sessionID).catch(() => {});
}
}
- if (input.model) {
- setCurrentModel(input.model, input.sessionID);
- }
- },
- 'chat.params': async (input) => {
- if (input.sessionID && isValidSessionID(input.sessionID)) {
- activeSessionID = input.sessionID;
- }
- // chat.params fires for background LLM calls too (title gen, summarization)
- // which use smaller models — do not track model here, chat.message is authoritative
- },
- tool: isJobAgent
- ? { mc_report, mc_status } as any
- : { mc_launch, mc_jobs, mc_status, mc_diff, mc_pr, mc_merge, mc_sync, mc_cleanup, mc_kill, mc_attach, mc_capture, mc_plan, mc_plan_status, mc_plan_cancel, mc_plan_approve, mc_report, mc_overview, mc_answer },
- event: async ({ event }) => {
- const sessionID = extractSessionIDFromEvent(event);
- if (sessionID) {
- activeSessionID = sessionID;
- }
+ });
- if (event.type === 'message.updated') {
- const messageEvent = event as {
- properties?: {
- info?: {
- role?: string;
- model?: { providerID: string; modelID: string };
- providerID?: string;
- modelID?: string;
- };
- };
- };
- const info = messageEvent.properties?.info;
- if (info?.model) {
- setCurrentModel(info.model, sessionID);
- } else if (info?.providerID && info?.modelID) {
- setCurrentModel({ providerID: info.providerID, modelID: info.modelID }, sessionID);
+ // Track the exact model used for each session (covers sessions where no
+ // model-selected event was observed, e.g. the first request after load).
+ await ctx.session.hook('context', (event) => {
+ setCurrentModelFromSDK(event.model, event.sessionID);
+ });
+
+ // Track model + show auto-status via events
+ const abortController = new AbortController();
+ const subscription = (async () => {
+ for await (const event of ctx.event.subscribe({ signal: abortController.signal })) {
+ const sessionID = extractSessionIDFromEvent(event);
+ if (sessionID) {
+ activeSessionID = sessionID;
}
- }
- if (event.type === 'session.idle') {
- const shouldShow = await shouldShowAutoStatus();
- if (shouldShow) {
- const message = await getAutoStatusMessage();
- if (message) {
- await client.tui.showToast({
- body: {
- title: 'Mission Control',
- message,
- variant: 'info',
- duration: 8000,
- },
- }).catch(() => {});
+ const type = (event as { type?: string }).type;
+
+ if (type === 'session.model.selected') {
+ const data = (event as { data?: { sessionID?: string; model?: { id: string; providerID: string } } }).data;
+ if (data?.model) {
+ setCurrentModelFromSDK(data.model, data.sessionID);
+ }
+ }
+
+ // V2 emits `session.execution.succeeded` when a turn finishes; the
+ // V1 `session.idle` event is not emitted by current V2 servers.
+ if (type === 'session.idle' || type === 'session.execution.succeeded') {
+ const shouldShow = await shouldShowAutoStatus(cwd);
+ if (shouldShow) {
+ const message = await getAutoStatusMessage();
+ if (message) {
+ await showToast({ title: 'Mission Control', message, variant: 'info', duration: 8000 });
+ }
}
}
}
- },
- // SDK uses proxies on hook output objects — must use in-place mutation
- // (push/splice). Direct reassignment (e.g. output.context = [...]) is
- // silently ignored. See: opencode Plugin.trigger() proxy semantics.
- 'experimental.session.compacting': async (_input, output) => {
- output.context.push(await (isJobAgent ? getJobCompactionContext() : getCompactionContext()));
- },
- };
-};
+ })();
+ subscription.catch(() => {});
-export default MissionControl;
+ // Inject job context into compaction
+ await ctx.session.hook('compaction', async (event) => {
+ const context = await (isJobAgent
+ ? getJobCompactionContext(cwd)
+ : getCompactionContext());
+ event.system.push({ type: 'text' as const, text: context });
+ });
+
+ return () => {
+ abortController.abort();
+ setToastEmitter(null);
+ };
+ },
+});
diff --git a/src/lib/job-state.ts b/src/lib/job-state.ts
index bd30f9d..88e928f 100644
--- a/src/lib/job-state.ts
+++ b/src/lib/job-state.ts
@@ -62,15 +62,15 @@ const STATE_FILE = 'jobs.json';
*/
const stateMutex = new GitMutex();
-async function getStateFilePath(): Promise {
- const dataDir = await getDataDir();
+async function getStateFilePath(cwd?: string): Promise {
+ const dataDir = await getDataDir(cwd);
return join(dataDir, STATE_FILE);
}
-export async function loadJobState(): Promise {
- const filePath = await getStateFilePath();
+export async function loadJobState(cwd?: string): Promise {
+ const filePath = await getStateFilePath(cwd);
const file = Bun.file(filePath);
const exists = await file.exists();
diff --git a/src/lib/monitor.ts b/src/lib/monitor.ts
index f21e5ad..7755a5b 100644
--- a/src/lib/monitor.ts
+++ b/src/lib/monitor.ts
@@ -16,7 +16,15 @@ import {
} from './question-relay.js';
import { loadPlan } from './plan-state.js';
import { PermissionPolicy, type PermissionPolicyConfig } from './permission-policy.js';
-import type { OpencodeClient } from '@opencode-ai/sdk';
+import type { OpencodeClient } from './sdk-client.js';
+import type { V2Event } from '@opencode/client';
+
+type PermissionAskedData = Extract['data'];
+
+interface QuestionToolPart {
+ id: string;
+ state: { status: string; input?: Record };
+}
type JobEventType = 'complete' | 'failed' | 'blocked' | 'needs_review' | 'awaiting_input' | 'agent_report' | 'question';
@@ -213,7 +221,7 @@ export class JobMonitor extends EventEmitter {
}
const abortController = new AbortController();
- const client = createJobClient(job.port);
+ const client = createJobClient(job.port, job.serverPassword);
this.sseSubscriptions.set(job.id, {
abortController,
@@ -222,26 +230,65 @@ export class JobMonitor extends EventEmitter {
});
this.backfillPendingQuestions(job, client).catch(() => {});
+ this.backfillPendingPermissions(job, client).catch(() => {});
+ this.reconcileJobOutcome(job).catch(() => {});
this.processSSEStream(job, client, abortController).catch((error) => {
console.error(`[Monitor] SSE stream error for job ${job.name}:`, error);
});
}
+ private async backfillPendingPermissions(job: Job, client: OpencodeClient): Promise {
+ if (!job.remoteSessionID) return;
+
+ try {
+ const pending = await client.permission.list({ sessionID: job.remoteSessionID });
+ for (const request of pending) {
+ await this.handlePermissionUpdate(job, request);
+ }
+ } catch {
+ // Non-fatal: the live event stream may still deliver the request
+ }
+ }
+
+ private async reconcileJobOutcome(job: Job): Promise {
+ if (!job.remoteSessionID || !job.port) return;
+
+ try {
+ const client = createJobClient(job.port, job.serverPassword);
+ const session = await client.session.get({ sessionID: job.remoteSessionID });
+
+ if (session.outcome === 'succeeded') {
+ await this.completeJob(job);
+ return;
+ }
+
+ if (session.outcome === 'failed' || session.outcome === 'interrupted') {
+ const now = new Date().toISOString();
+ this.cleanupSSEForJob(job.id);
+ await updateJob(job.id, { status: 'failed', completedAt: now });
+ this.emit('failed', { ...job, status: 'failed', completedAt: now });
+ }
+ } catch {
+ // Non-fatal: the SSE stream remains the primary completion signal
+ }
+ }
+
private async backfillPendingQuestions(job: Job, client: OpencodeClient): Promise {
if (!job.remoteSessionID) return;
try {
- const result = await client.session.messages({ path: { id: job.remoteSessionID } });
- const messages = (result.data ?? result) as Array<{ parts?: Array> }>;
- if (!Array.isArray(messages)) return;
+ const messages = await client.session.context({ sessionID: job.remoteSessionID });
for (const msg of messages) {
- for (const part of msg.parts ?? []) {
- if (part.type === 'tool' && part.tool === 'question') {
- const state = part.state as { status?: string } | undefined;
- if (state?.status === 'running') {
- this.handleQuestionToolUpdate(job, part);
+ if (msg.type !== 'assistant') continue;
+ for (const part of msg.content) {
+ if (part.type === 'tool' && part.name === 'question') {
+ if (part.state.status === 'running') {
+ this.handleQuestionToolUpdate(job, {
+ id: part.id,
+ state: { status: 'running', input: part.state.input },
+ });
}
}
}
@@ -265,7 +312,7 @@ export class JobMonitor extends EventEmitter {
const events = await client.event.subscribe();
- for await (const event of events.stream) {
+ for await (const event of events) {
if (abortController.signal.aborted) {
break;
}
@@ -297,30 +344,40 @@ export class JobMonitor extends EventEmitter {
}
}
- private async handleSSEEvent(job: Job, event: any): Promise {
- const eventType = event.type || event.event;
+ private async completeJob(job: Job): Promise {
+ const now = new Date().toISOString();
+ this.cleanupSSEForJob(job.id);
+ await updateJob(job.id, { status: 'completed', completedAt: now });
+ this.emit('complete', { ...job, status: 'completed', completedAt: now });
+ }
- switch (eventType) {
+ private async handleSSEEvent(job: Job, event: V2Event): Promise {
+ // A job server can also run child/subagent sessions. Only events from the
+ // job's root session should drive completion, failures and questions.
+ const eventSessionID = (event.data as { sessionID?: string } | undefined)?.sessionID;
+ if (job.remoteSessionID && eventSessionID && eventSessionID !== job.remoteSessionID) {
+ return;
+ }
+
+ switch (event.type) {
case 'session.status': {
- const statusPayload = event.properties?.status;
- if (statusPayload?.type === 'idle') {
- const now = new Date().toISOString();
- this.cleanupSSEForJob(job.id);
- await updateJob(job.id, { status: 'completed', completedAt: now });
- this.emit('complete', { ...job, status: 'completed', completedAt: now });
+ if (event.data.status.type === 'idle') {
+ await this.completeJob(job);
}
break;
}
case 'session.idle': {
- const now = new Date().toISOString();
- this.cleanupSSEForJob(job.id);
- await updateJob(job.id, { status: 'completed', completedAt: now });
- this.emit('complete', { ...job, status: 'completed', completedAt: now });
+ await this.completeJob(job);
+ break;
+ }
+
+ case 'session.execution.succeeded': {
+ await this.completeJob(job);
break;
}
- case 'session.error': {
+ case 'session.execution.failed': {
const now = new Date().toISOString();
this.cleanupSSEForJob(job.id);
await updateJob(job.id, { status: 'failed', completedAt: now });
@@ -328,34 +385,46 @@ export class JobMonitor extends EventEmitter {
break;
}
- case 'message.part.updated': {
- const part = event.properties?.part;
- if (part?.type === 'tool' && part.tool === 'question') {
- this.handleQuestionToolUpdate(job, part);
+ case 'session.tool.called': {
+ const input = event.data.input as Record | undefined;
+ if (input && Array.isArray(input.questions)) {
+ this.handleQuestionToolUpdate(job, {
+ id: event.data.id,
+ state: { status: 'running', input },
+ });
+ }
+ this.updateEventAccumulator(job.id, { currentTool: 'streaming' });
+ break;
+ }
+
+ case 'session.tool.progress':
+ case 'session.tool.success':
+ case 'session.tool.failed': {
+ if (event.type === 'session.tool.success' || event.type === 'session.tool.failed') {
+ removePendingQuestion(job.id, event.data.id);
}
this.updateEventAccumulator(job.id, { currentTool: 'streaming' });
break;
}
- case 'file.edited': {
- const filePath = event.properties?.path || event.path;
- if (filePath) {
+ case 'filesystem.changed': {
+ if (event.data.event !== 'unlink') {
this.updateEventAccumulator(job.id, {
- filesEdited: [filePath],
- currentFile: filePath,
+ filesEdited: [event.data.file],
+ currentFile: event.data.file,
});
}
break;
}
- case 'permission.updated': {
- void this.handlePermissionUpdate(job, event);
+ case 'permission.asked': {
+ void this.handlePermissionUpdate(job, event.data);
break;
}
}
}
- private handleQuestionToolUpdate(job: Job, part: any): void {
+ private handleQuestionToolUpdate(job: Job, part: QuestionToolPart): void {
const state = part.state;
if (!state) return;
@@ -377,9 +446,10 @@ export class JobMonitor extends EventEmitter {
jobName: job.name,
taskSummary: buildTaskSummary(job.prompt),
partId: part.id,
- callID: part.callID,
+ callID: part.id,
remoteSessionID: job.remoteSessionID,
port: job.port,
+ serverPassword: job.serverPassword,
question: first.question ?? '',
options: first.options ?? [],
header: first.header,
@@ -396,10 +466,9 @@ export class JobMonitor extends EventEmitter {
}
}
- private inferPermissionType(event: any): PermissionRequest['type'] {
- const eventData = event.properties || event;
- const metadata = eventData.metadata ?? {};
- const typeHint = String(eventData.type || eventData.permissionType || metadata.type || '').toLowerCase();
+ private inferPermissionType(data: PermissionAskedData): PermissionRequest['type'] {
+ const metadata = data.metadata ?? {};
+ const typeHint = String(data.action || metadata.type || '').toLowerCase();
if (typeHint.includes('mcp') || typeHint.includes('tool')) {
return 'mcp';
@@ -421,40 +490,51 @@ export class JobMonitor extends EventEmitter {
return typeof value === 'string' && value.length > 0 ? value : undefined;
}
- private extractPermissionPath(event: any): string | undefined {
- const eventData = event.properties || event;
- const metadata = eventData.metadata;
-
- const directPath = this.extractString(eventData.path)
- ?? this.extractString(eventData.file)
- ?? this.extractString(event.path);
- if (directPath) {
- return directPath;
+ private extractPermissionPath(data: PermissionAskedData): string | undefined {
+ const firstResource = data.resources?.[0];
+ if (typeof firstResource === 'string' && this.looksLikePath(firstResource)) {
+ return firstResource;
}
+ const metadata = data.metadata;
if (metadata && typeof metadata === 'object') {
- const metadataPath = (metadata as Record).path;
- return this.extractString(metadataPath);
+ const metadataPath = this.extractString((metadata as Record).path);
+ if (metadataPath) {
+ return metadataPath;
+ }
}
return undefined;
}
- private buildPermissionRequest(event: any): PermissionRequest {
- const eventData = event.properties || event;
- const rawType = this.extractString(eventData.type) || this.extractString(eventData.permissionType) || 'unknown';
- const path = this.extractPermissionPath(event);
- const description = this.extractString(eventData.description)
- || this.extractString(eventData.title)
- || this.extractString(event.description)
- || 'Unknown permission request';
+ private looksLikePath(value: string): boolean {
+ // V2 `resources` carries the command string for shell permissions and the
+ // target path for file permissions. Only treat whitespace-free strings
+ // containing a path separator (or a home/relative prefix) as paths.
+ if (/\s/.test(value)) {
+ return false;
+ }
+ return (
+ value.startsWith('/') ||
+ value.startsWith('./') ||
+ value.startsWith('../') ||
+ value.startsWith('~') ||
+ value.includes('/')
+ );
+ }
+
+ private buildPermissionRequest(data: PermissionAskedData): PermissionRequest {
+ const rawType = this.extractString(data.action) || 'unknown';
+ const path = this.extractPermissionPath(data);
+ const description = this.extractString(data.message)
+ || `Permission request: ${rawType}`;
return {
- id: this.extractString(eventData.id) || this.extractString(event.id) || 'unknown',
- type: this.inferPermissionType(event),
+ id: String(data.id),
+ type: this.inferPermissionType(data),
path,
target: path,
- action: this.extractString(eventData.title) || rawType,
+ action: rawType,
rawType,
description,
};
@@ -482,9 +562,9 @@ export class JobMonitor extends EventEmitter {
});
}
- private async handlePermissionUpdate(job: Job, event: any): Promise {
+ private async handlePermissionUpdate(job: Job, data: PermissionAskedData): Promise {
try {
- const permission = this.buildPermissionRequest(event);
+ const permission = this.buildPermissionRequest(data);
const accumulator = this.getOrCreateEventAccumulator(job.id);
const policy = await this.resolvePolicyForJob(job);
const decision = policy.evaluate(permission, { worktreePath: job.worktreePath });
@@ -562,6 +642,7 @@ export class JobMonitor extends EventEmitter {
try {
if (this.isServeModeJob(job)) {
await this.subscribeToSSE(job);
+ await this.reconcileJobOutcome(job);
continue;
}
@@ -582,7 +663,13 @@ export class JobMonitor extends EventEmitter {
const now = new Date().toISOString();
const exitCode = await captureExitStatus(job.tmuxTarget);
- const isFailed = exitCode !== undefined && exitCode !== 0;
+ const report = await readReport(job.id);
+ const reportedComplete =
+ report?.status === 'completed' || report?.status === 'needs_review';
+ // If the pane vanished without an exit status (tmux server died or
+ // the launcher failed to start), do not assume success. Only a clean
+ // exit code or an explicit completion report counts as completed.
+ const isFailed = exitCode !== undefined ? exitCode !== 0 : !reportedComplete;
if (isFailed) {
await updateJob(job.id, { status: 'failed', completedAt: now });
diff --git a/src/lib/omo.ts b/src/lib/omo.ts
index 86a8fa5..30b9869 100644
--- a/src/lib/omo.ts
+++ b/src/lib/omo.ts
@@ -47,7 +47,9 @@ export async function detectOMO(
}
/**
- * Check if a config file contains "oh-my-opencode" in the plugin array
+ * Check if a config file contains "oh-my-opencode" in the plugin array.
+ * Supports both the V2 `plugins` key and the legacy V1 `plugin` key.
+ * V2 entries may be strings ("pkg", "-pkg" to disable) or objects ({ package, options }).
*/
async function checkConfigFile(filePath: string): Promise<{ detected: boolean }> {
try {
@@ -61,18 +63,36 @@ async function checkConfigFile(filePath: string): Promise<{ detected: boolean }>
const content = await file.text();
const config = JSON.parse(content);
- if (!config.plugin || !Array.isArray(config.plugin)) {
- return { detected: false };
- }
-
- const hasOMO = config.plugin.includes('oh-my-opencode');
- return { detected: hasOMO };
+ return { detected: hasOMOPlugin(config.plugins) || hasOMOPlugin(config.plugin) };
} catch {
// File doesn't exist or is invalid JSON
return { detected: false };
}
}
+function hasOMOPlugin(entries: unknown): boolean {
+ if (!Array.isArray(entries)) {
+ return false;
+ }
+
+ return entries.some((entry) => {
+ if (typeof entry === 'string') {
+ // A leading "-" disables a plugin in V2 config.
+ if (entry.startsWith('-')) {
+ return false;
+ }
+ return entry === 'oh-my-opencode' || entry.startsWith('oh-my-opencode@');
+ }
+
+ if (entry && typeof entry === 'object' && 'package' in entry) {
+ const pkg = (entry as { package?: unknown }).package;
+ return typeof pkg === 'string' && (pkg === 'oh-my-opencode' || pkg.startsWith('oh-my-opencode@'));
+ }
+
+ return false;
+ });
+}
+
/**
* Get the .sisyphus path if it exists in the current directory
*/
diff --git a/src/lib/orchestrator-singleton.ts b/src/lib/orchestrator-singleton.ts
index 3e6dec5..16265a5 100644
--- a/src/lib/orchestrator-singleton.ts
+++ b/src/lib/orchestrator-singleton.ts
@@ -1,5 +1,6 @@
import { JobMonitor } from './monitor';
-import type { NotifyCallback, Orchestrator } from './orchestrator';
+import type { NotifyCallback, Orchestrator, ToastCallback } from './orchestrator';
+import { showToast } from '../rpc';
let sharedMonitor: JobMonitor | null = null;
let sharedNotifyCallback: NotifyCallback | null = null;
@@ -20,6 +21,23 @@ export function getSharedNotifyCallback(): NotifyCallback | null {
return sharedNotifyCallback;
}
+/**
+ * Callbacks for Orchestrator instances created by tools. Besides the
+ * notification callback, route toasts through the plugin RPC so they reach the
+ * TUI (the orchestrator otherwise has no toast sink).
+ */
+export function getSharedOrchestratorCallbacks(): {
+ toast: ToastCallback;
+ notify?: NotifyCallback;
+} {
+ return {
+ toast: (title, message, variant, duration) => {
+ void showToast({ title, message, variant, duration });
+ },
+ notify: sharedNotifyCallback ?? undefined,
+ };
+}
+
export function setSharedOrchestrator(orchestrator: Orchestrator | null): void {
sharedOrchestrator = orchestrator;
}
diff --git a/src/lib/orchestrator.ts b/src/lib/orchestrator.ts
index 85b4b48..fd4745e 100644
--- a/src/lib/orchestrator.ts
+++ b/src/lib/orchestrator.ts
@@ -2,7 +2,7 @@ import { randomUUID } from 'crypto';
import type { MCConfig } from './config';
import type { PlanSpec, JobSpec, PlanStatus, CheckpointType, CheckpointContext, AuditLogEntry } from './plan-types';
import { loadPlan, savePlan, updatePlanJob, updatePlanFields, clearPlan, validateGhAuth } from './plan-state';
-import { getDefaultBranch } from './git';
+import { getDefaultBranch, gitCommand } from './git';
import { createIntegrationBranch, deleteIntegrationBranch } from './integration';
import { MergeTrain, checkMergeability, type MergeTestReport, validateTouchSet } from './merge-train';
import { addJob, getRunningJobs, updateJob, loadJobState, removeJob, type Job } from './job-state';
@@ -295,6 +295,7 @@ export class Orchestrator {
);
}
const wasPreMerge = this.checkpoint === 'pre_merge';
+ const wasPrePr = this.checkpoint === 'pre_pr';
this.checkpoint = null;
const plan = await loadPlan();
@@ -311,6 +312,10 @@ export class Orchestrator {
status: 'running',
checkpoint: null,
checkpointContext: null,
+ ...(wasPreMerge
+ ? { approvedMergeJobs: plan.jobs.filter((j) => j.status === 'ready_to_merge').map((j) => j.name) }
+ : {}),
+ ...(wasPrePr ? { approvedPrePr: true } : {}),
});
this.showToast('Mission Control', 'Checkpoint cleared, resuming execution.', 'info');
@@ -598,11 +603,24 @@ export class Orchestrator {
}
}
- if (this.isSupervisor(plan) && !this.approvedForMerge.has(job.name)) {
+ const persistedMergeApproval = plan.approvedMergeJobs ?? [];
+ const approvedForMerge =
+ this.approvedForMerge.has(job.name) ||
+ persistedMergeApproval.includes(job.name);
+
+ if (this.isSupervisor(plan) && !approvedForMerge) {
await this.setCheckpoint('pre_merge', plan);
return;
}
+ if (persistedMergeApproval.includes(job.name)) {
+ // Consume the persisted approval so a later retry does not silently
+ // bypass the supervisor checkpoint again.
+ await updatePlanFields(plan.id, {
+ approvedMergeJobs: persistedMergeApproval.filter((name) => name !== job.name),
+ });
+ }
+
this.mergeTrain ??= new MergeTrain(plan.integrationWorktree!, this.getMergeTrainConfig());
this.mergeTrain.enqueue(job);
await updatePlanJob(plan.id, job.name, { status: 'merging' });
@@ -685,12 +703,15 @@ export class Orchestrator {
this.showToast('Mission Control', 'All jobs merged. Creating PR...', 'info');
this.notify(`🎯 All ${latestPlan.jobs.length} jobs merged. Creating PR...`);
- if (this.isSupervisor(latestPlan)) {
+ if (this.isSupervisor(latestPlan) && !latestPlan.approvedPrePr) {
await this.setCheckpoint('pre_pr', latestPlan);
return;
}
- await updatePlanFields(latestPlan.id, { status: 'creating_pr' });
+ await updatePlanFields(latestPlan.id, {
+ status: 'creating_pr',
+ ...(this.isSupervisor(latestPlan) ? { approvedPrePr: false } : {}),
+ });
try {
const prUrl = await this.createPR();
@@ -821,7 +842,9 @@ If your work needs human review before it can proceed: mc_report(status: "needs_
}
promptFilePath = await writePromptFile(worktreePath, jobPrompt);
const model = this.planModelSnapshot ?? getCurrentModel();
- const launcherPath = await writeLauncherScript(worktreePath, promptFilePath, model);
+ const launcherPath = await writeLauncherScript(worktreePath, promptFilePath, model, {
+ run: mode === 'vanilla',
+ });
const initialCommand = `bash '${launcherPath}'`;
if (placement === 'session') {
@@ -1011,7 +1034,9 @@ If your work needs human review before it can proceed: mc_report(status: "needs_
try {
promptFilePath = await writePromptFile(worktreePath, fullPrompt);
const model = this.planModelSnapshot ?? getCurrentModel();
- const launcherPath = await writeLauncherScript(worktreePath, promptFilePath, model);
+ const launcherPath = await writeLauncherScript(worktreePath, promptFilePath, model, {
+ run: mode === 'vanilla',
+ });
const initialCommand = `bash '${launcherPath}'`;
if (placement === 'session') {
@@ -1190,6 +1215,16 @@ If your work needs human review before it can proceed: mc_report(status: "needs_
} catch {}
}
+ const state = await loadJobState();
+ const planJobs = state.jobs.filter((job) => job.planId === plan.id);
+ for (const job of planJobs) {
+ if (job.worktreePath) {
+ await removeWorktree(job.worktreePath, true).catch(() => {});
+ }
+ if (job.branch) {
+ await gitCommand(['branch', '-D', job.branch]).catch(() => {});
+ }
+ }
await deleteIntegrationBranch(plan.id);
await clearPlan();
}
diff --git a/src/lib/plan-state.ts b/src/lib/plan-state.ts
index feea703..8f6f04a 100644
--- a/src/lib/plan-state.ts
+++ b/src/lib/plan-state.ts
@@ -121,6 +121,8 @@ export interface PlanFieldUpdates {
completedAt?: string;
prUrl?: string;
auditLog?: PlanSpec['auditLog'];
+ approvedMergeJobs?: string[];
+ approvedPrePr?: boolean;
}
/**
@@ -166,6 +168,12 @@ export async function updatePlanFields(
if (updates.prUrl !== undefined) {
plan.prUrl = updates.prUrl;
}
+ if (updates.approvedMergeJobs !== undefined) {
+ plan.approvedMergeJobs = updates.approvedMergeJobs;
+ }
+ if (updates.approvedPrePr !== undefined) {
+ plan.approvedPrePr = updates.approvedPrePr;
+ }
const ghAuthenticated = await validateGhAuth();
const planToSave = { ...plan, ghAuthenticated };
diff --git a/src/lib/plan-types.ts b/src/lib/plan-types.ts
index e37f0c6..2cb991b 100644
--- a/src/lib/plan-types.ts
+++ b/src/lib/plan-types.ts
@@ -64,6 +64,14 @@ export interface PlanSpec {
launchSessionID?: string;
auditLog?: AuditLogEntry[];
permissionPolicy?: PermissionPolicyConfig;
+ ghAuthenticated?: boolean;
+ /**
+ * Supervisor-mode approvals persisted across orchestrator instances.
+ * `mc_plan_approve` runs in a fresh process, so in-memory approval sets are
+ * lost between checkpoints; these fields keep the decision on disk.
+ */
+ approvedMergeJobs?: string[];
+ approvedPrePr?: boolean;
}
export interface JobSpec {
@@ -93,7 +101,7 @@ export interface JobSpec {
export const VALID_PLAN_TRANSITIONS: Record = {
pending: ['running', 'failed', 'canceled'],
- running: ['paused', 'merging', 'failed', 'canceled'],
+ running: ['paused', 'merging', 'creating_pr', 'completed', 'failed', 'canceled'],
paused: ['running', 'failed', 'canceled'],
merging: ['running', 'paused', 'creating_pr', 'failed', 'canceled'],
creating_pr: ['completed', 'failed', 'canceled'],
diff --git a/src/lib/prompt-file.ts b/src/lib/prompt-file.ts
index 4824895..7d6efaa 100644
--- a/src/lib/prompt-file.ts
+++ b/src/lib/prompt-file.ts
@@ -34,11 +34,18 @@ export async function writeLauncherScript(
worktreePath: string,
promptFilePath: string,
model?: string,
+ options: { run?: boolean } = {},
): Promise {
const launcherPath = join(worktreePath, LAUNCHER_FILENAME);
const opencodeBin = resolveOpencodePath();
const modelFlag = model ? ` -m "${model}"` : '';
- const script = `#!/bin/bash\nexec ${opencodeBin}${modelFlag} --prompt "$(cat '${promptFilePath}')"\n`;
+ // V2 has no top-level `--model` flag for the interactive TUI; `-m` only
+ // exists on the non-interactive `run` subcommand. Use `run` when the job
+ // does not need an interactive TUI (vanilla plan jobs), otherwise use the
+ // TUI with its configured default model.
+ const script = options.run
+ ? `#!/bin/bash\nexec ${opencodeBin} run${modelFlag} "$(cat '${promptFilePath}')"\n`
+ : `#!/bin/bash\nexec ${opencodeBin} --prompt "$(cat '${promptFilePath}')"\n`;
await writeFile(launcherPath, script, { mode: 0o755 });
return launcherPath;
}
diff --git a/src/lib/question-relay.ts b/src/lib/question-relay.ts
index f0051ae..4bb9bf2 100644
--- a/src/lib/question-relay.ts
+++ b/src/lib/question-relay.ts
@@ -1,4 +1,5 @@
-import type { OpencodeClient } from '@opencode-ai/sdk';
+import type { FormField, FormInfo, FormOption, FormValue } from '@opencode/client';
+import type { OpencodeClient } from './sdk-client.js';
import type { Job } from './job-state.js';
import { createJobClient, sendPrompt } from './sdk-client.js';
@@ -14,6 +15,7 @@ export interface PendingQuestion {
callID: string;
remoteSessionID: string;
port: number;
+ serverPassword?: string;
question: string;
options: Array<{ label: string; description?: string }>;
header?: string;
@@ -93,17 +95,120 @@ export function getPendingQuestionCount(): number {
return pendingQuestions.size;
}
+function getFormToolId(form: FormInfo): string | undefined {
+ const tool = form.metadata?.tool;
+ if (tool && typeof tool === 'object' && 'id' in tool) {
+ const id = (tool as { id?: unknown }).id;
+ if (typeof id === 'string') return id;
+ }
+ return undefined;
+}
+
+function getFormKind(form: FormInfo): string | undefined {
+ const kind = form.metadata?.kind;
+ return typeof kind === 'string' ? kind : undefined;
+}
+
/**
- * Answer a pending question by sending a user message to the job's session.
- * This unblocks the agent waiting on the mcp_question tool call.
+ * Locate the form backing a question tool call. V2 renders the `question` tool
+ * as a session form, so the tool call id is stored in form metadata.
+ */
+export function findQuestionForm(forms: readonly FormInfo[], partId: string): FormInfo | undefined {
+ const exact = forms.find((form) => getFormToolId(form) === partId);
+ if (exact) return exact;
+
+ const questions = forms.filter((form) => getFormKind(form) === 'question');
+ return questions.length === 1 ? questions[0] : undefined;
+}
+
+function matchOptionValue(options: readonly FormOption[] | undefined, raw: string): string {
+ const text = raw.trim();
+ if (!options) return text;
+ const match = options.find(
+ (option) =>
+ option.value.toLowerCase() === text.toLowerCase() ||
+ option.label.toLowerCase() === text.toLowerCase(),
+ );
+ return match ? match.value : text;
+}
+
+function coerceFormField(field: FormField, raw: string): FormValue {
+ switch (field.type) {
+ case 'multiselect': {
+ const parts = raw
+ .split(/[,\n;]+/)
+ .map((part) => part.trim())
+ .filter(Boolean);
+ return parts.map((part) => matchOptionValue(field.options, part));
+ }
+ case 'boolean':
+ return /^(true|yes|y|1|on)$/i.test(raw.trim());
+ case 'number':
+ case 'integer': {
+ const value = Number(raw.trim());
+ return Number.isFinite(value) ? value : raw.trim();
+ }
+ case 'string':
+ return field.options && field.options.length > 0
+ ? matchOptionValue(field.options, raw)
+ : raw;
+ default:
+ return raw;
+ }
+}
+
+export function buildFormAnswer(
+ fields: readonly FormField[],
+ response: string,
+): Record {
+ const answer: Record = {};
+ const lines = response.split(/\r?\n/).map((line) => line.trim());
+ const linePerField = fields.length > 1 && lines.length >= fields.length;
+
+ fields.forEach((field, index) => {
+ const raw = fields.length === 1
+ ? response
+ : linePerField
+ ? lines[index]
+ : index === 0
+ ? response
+ : '';
+ answer[field.key] = coerceFormField(field, raw);
+ });
+
+ return answer;
+}
+
+/**
+ * Answer a pending question by replying to the question form on the job's
+ * session. V2's `question` tool is implemented as a session form; posting a
+ * prompt does not unblock it. Fall back to a prompt for compatibility.
*/
export async function answerPendingQuestion(
question: PendingQuestion,
response: string,
password?: string,
): Promise {
- const client = createJobClient(question.port, password);
- await sendPrompt(client, question.remoteSessionID, response);
+ const client = createJobClient(question.port, question.serverPassword ?? password);
+
+ let form: FormInfo | undefined;
+ try {
+ const forms = await client.session.form.list({ sessionID: question.remoteSessionID });
+ form = findQuestionForm(forms, question.partId);
+ } catch {
+ // Form listing may fail on older servers; fall back to a prompt below.
+ }
+
+ if (form) {
+ await client.session.form.reply({
+ sessionID: question.remoteSessionID,
+ formID: form.id,
+ answer: buildFormAnswer(form.fields, response),
+ });
+ } else {
+ await sendPrompt(client, question.remoteSessionID, response);
+ }
+
pendingQuestions.delete(pendingKey(question.jobId, question.partId));
}
@@ -316,7 +421,7 @@ export function buildQuestionPrompt(context: QuestionContext): string {
export class QuestionRelay {
private config: QuestionRelayConfig;
private pendingResponses: Map = new Map();
- private clients: Map = new Map();
+ private clients: Map = new Map();
constructor(config: Partial = {}) {
this.config = { ...DEFAULT_CONFIG, ...config };
@@ -326,7 +431,7 @@ export class QuestionRelay {
* Get or create a client for a job's port
*/
private getClient(port: number, password?: string): OpencodeClient {
- const key = port;
+ const key = `${port}:${password ?? ''}`;
if (!this.clients.has(key)) {
this.clients.set(key, createJobClient(port, password));
}
@@ -346,10 +451,10 @@ export class QuestionRelay {
if (result.autoApproved) {
// Auto-approve the permission
- if (job.port) {
+ if (job.port && job.remoteSessionID) {
try {
- const client = this.getClient(job.port);
- await this.replyToPermission(client, permission.id, true);
+ const client = this.getClient(job.port, job.serverPassword);
+ await this.replyToPermission(client, job.remoteSessionID, permission.id, true);
} catch (error) {
console.error(`[QuestionRelay] Failed to auto-approve permission for job ${job.name}:`, error);
}
@@ -371,12 +476,12 @@ export class QuestionRelay {
approved: boolean,
message?: string,
): Promise {
- if (!job.port) {
+ if (!job.port || !job.remoteSessionID) {
return;
}
- const client = this.getClient(job.port);
- await this.replyToPermission(client, permissionId, approved, message);
+ const client = this.getClient(job.port, job.serverPassword);
+ await this.replyToPermission(client, job.remoteSessionID, permissionId, approved, message);
}
/**
@@ -387,8 +492,8 @@ export class QuestionRelay {
permission: PermissionRequest,
currentFile?: string,
): Promise {
- if (!job.launchSessionID || !job.port) {
- console.warn(`[QuestionRelay] Cannot relay: missing launchSessionID or port for job ${job.name}`);
+ if (!job.launchSessionID || !job.remoteSessionID || !job.port) {
+ console.warn(`[QuestionRelay] Cannot relay: missing launchSessionID, remoteSessionID or port for job ${job.name}`);
return;
}
@@ -402,17 +507,22 @@ export class QuestionRelay {
const prompt = buildQuestionPrompt(context);
try {
- const client = this.getClient(job.port);
- await client.session.prompt({
- path: { id: job.launchSessionID },
- body: {
- parts: [{ type: 'text', text: prompt }],
- noReply: false,
- },
- });
+ // The launching session belongs to the control-center server, not the
+ // job's server. Relay through the shared notifier instead of the job
+ // client, which would raise SessionNotFoundError.
+ const { getSharedNotifyCallback } = await import('./orchestrator-singleton.js');
+ const notify = getSharedNotifyCallback();
+ if (notify) {
+ notify(prompt, job.launchSessionID);
+ } else {
+ console.warn(
+ `[QuestionRelay] No control-center notifier available; permission request for job ${job.name} was not relayed.`,
+ );
+ }
- // Set up auto-response timeout
- this.setupAutoResponse(job.id, permission.id, client);
+ // Auto-response always targets the job server.
+ const client = this.getClient(job.port, job.serverPassword);
+ this.setupAutoResponse(job.id, permission.id, job.remoteSessionID, client);
} catch (error) {
console.error(`[QuestionRelay] Failed to relay question for job ${job.name}:`, error);
}
@@ -424,6 +534,7 @@ export class QuestionRelay {
private setupAutoResponse(
jobId: string,
permissionId: string,
+ sessionID: string,
client: OpencodeClient,
): void {
// Clear any existing timeout for this permission
@@ -435,7 +546,7 @@ export class QuestionRelay {
// Set new timeout
const timeoutId = setTimeout(async () => {
try {
- await this.replyToPermission(client, permissionId, true, this.config.defaultResponse);
+ await this.replyToPermission(client, sessionID, permissionId, true, this.config.defaultResponse);
console.log(`[QuestionRelay] Auto-responded to permission ${permissionId} for job ${jobId}`);
} catch (error) {
console.error(`[QuestionRelay] Failed to auto-respond for job ${jobId}:`, error);
@@ -452,30 +563,18 @@ export class QuestionRelay {
*/
private async replyToPermission(
client: OpencodeClient,
+ sessionID: string,
permissionId: string,
approved: boolean,
message?: string,
): Promise {
- // Note: The actual SDK endpoint for replying to permissions may vary
- // This is a placeholder based on typical SDK patterns
- // The SDK might have client.permission.reply or similar
try {
- // Using a generic approach - actual implementation depends on SDK
- const response = await fetch(`${(client as any).baseUrl}/permission/${permissionId}/reply`, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- ...((client as any).headers || {}),
- },
- body: JSON.stringify({
- approved,
- message: message || (approved ? 'Approved' : 'Denied'),
- }),
+ await client.permission.reply({
+ sessionID,
+ requestID: permissionId,
+ decision: approved ? "once" : "reject",
+ message: message || (approved ? "Approved" : "Denied"),
});
-
- if (!response.ok) {
- throw new Error(`HTTP ${response.status}: ${await response.text()}`);
- }
} catch (error) {
console.error(`[QuestionRelay] Failed to reply to permission ${permissionId}:`, error);
throw error;
@@ -498,7 +597,7 @@ export class QuestionRelay {
this.pendingResponses.delete(key);
}
- if (!job.port) {
+ if (!job.port || !job.remoteSessionID) {
return;
}
@@ -523,8 +622,8 @@ export class QuestionRelay {
}
try {
- const client = this.getClient(job.port);
- await this.replyToPermission(client, permissionId, approved, message);
+ const client = this.getClient(job.port, job.serverPassword);
+ await this.replyToPermission(client, job.remoteSessionID, permissionId, approved, message);
} catch (error) {
console.error(`[QuestionRelay] Failed to send user response for job ${job.name}:`, error);
}
diff --git a/src/lib/reports.ts b/src/lib/reports.ts
index 9e66b19..98655e2 100644
--- a/src/lib/reports.ts
+++ b/src/lib/reports.ts
@@ -12,8 +12,8 @@ export interface AgentReport {
timestamp: string;
}
-async function getReportsDir(): Promise {
- const dataDir = await getDataDir();
+async function getReportsDir(cwd?: string): Promise {
+ const dataDir = await getDataDir(cwd);
const reportsDir = join(dataDir, '..', 'reports');
const fs = await import('fs');
fs.mkdirSync(reportsDir, { recursive: true });
@@ -24,8 +24,8 @@ function getReportFilePath(reportsDir: string, jobId: string): string {
return join(reportsDir, `${jobId}.json`);
}
-export async function writeReport(report: AgentReport): Promise {
- const reportsDir = await getReportsDir();
+export async function writeReport(report: AgentReport, cwd?: string): Promise {
+ const reportsDir = await getReportsDir(cwd);
const filePath = getReportFilePath(reportsDir, report.jobId);
const tempPath = `${filePath}.tmp`;
const data = JSON.stringify(report, null, 2);
@@ -34,8 +34,8 @@ export async function writeReport(report: AgentReport): Promise {
fs.renameSync(tempPath, filePath);
}
-export async function readReport(jobId: string): Promise {
- const reportsDir = await getReportsDir();
+export async function readReport(jobId: string, cwd?: string): Promise {
+ const reportsDir = await getReportsDir(cwd);
const filePath = getReportFilePath(reportsDir, jobId);
const file = Bun.file(filePath);
const exists = await file.exists();
diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts
index 8cff5d2..9c11523 100644
--- a/src/lib/schemas.ts
+++ b/src/lib/schemas.ts
@@ -19,6 +19,7 @@ export const JobSchema = z.object({
launchSessionID: z.string().optional(),
port: z.number().optional(),
serverUrl: z.string().optional(),
+ serverPassword: z.string().optional(),
remoteSessionID: z.string().optional(),
});
@@ -133,6 +134,8 @@ export const PlanSpecSchema = z.object({
checkpoint: CheckpointTypeSchema.nullable().optional(),
checkpointContext: CheckpointContextSchema.nullable().optional(),
ghAuthenticated: z.boolean().optional(),
+ approvedMergeJobs: z.array(z.string()).optional(),
+ approvedPrePr: z.boolean().optional(),
launchSessionID: z.string().optional(),
auditLog: z.array(AuditLogEntrySchema).optional(),
permissionPolicy: PermissionPolicySchema.optional(),
diff --git a/src/lib/sdk-client.ts b/src/lib/sdk-client.ts
index 7fb6b3a..2bec5bf 100644
--- a/src/lib/sdk-client.ts
+++ b/src/lib/sdk-client.ts
@@ -1,4 +1,6 @@
-import { createOpencodeClient, type OpencodeClient } from '@opencode-ai/sdk';
+import { OpenCode, type OpenCodeClient } from "@opencode/client";
+
+export type OpencodeClient = OpenCodeClient;
export function createJobClient(
port: number,
@@ -8,11 +10,11 @@ export function createJobClient(
const headers: Record = {};
if (password) {
- headers['Authorization'] =
- 'Basic ' + Buffer.from('opencode:' + password).toString('base64');
+ headers["Authorization"] =
+ "Basic " + Buffer.from("opencode:" + password).toString("base64");
}
- return createOpencodeClient({
+ return OpenCode.make({
baseUrl,
headers,
});
@@ -60,7 +62,6 @@ export async function waitForServer(
/**
* Send a prompt to a session via the SDK.
- * Uses promptAsync to return immediately without waiting for completion.
*/
export async function sendPrompt(
client: OpencodeClient,
@@ -70,14 +71,18 @@ export async function sendPrompt(
model?: { providerID: string; modelID: string },
): Promise {
try {
- await client.session.promptAsync({
- path: { id: sessionId },
- body: {
- parts: [{ type: 'text', text: prompt }],
- ...(agent ? { agent } : {}),
- ...(model ? { model } : {}),
- },
- });
+ if (agent) {
+ await client.session.switchAgent({ sessionID: sessionId, agent });
+ }
+
+ if (model) {
+ await client.session.switchModel({
+ sessionID: sessionId,
+ model: { id: model.modelID, providerID: model.providerID },
+ });
+ }
+
+ await client.session.prompt({ sessionID: sessionId, text: prompt });
} catch (error) {
throw new Error(
`Failed to send prompt to session ${sessionId}: ${error instanceof Error ? error.message : String(error)}`,
@@ -91,17 +96,22 @@ export async function createSessionAndPrompt(
agent?: string,
model?: { providerID: string; modelID: string },
): Promise {
- const result = await client.session.create();
-
- if (!result.data) {
+ let session;
+ try {
+ session = await client.session.create({
+ agent: agent ?? undefined,
+ model: model
+ ? { id: model.modelID, providerID: model.providerID }
+ : undefined,
+ });
+ } catch (error) {
throw new Error(
- `Failed to create session: ${result.error ? JSON.stringify(result.error) : 'unknown error'}`,
+ `Failed to create session: ${error instanceof Error ? error.message : String(error)}`,
);
}
- const sessionId = result.data.id;
- await sendPrompt(client, sessionId, prompt, agent, model);
- return sessionId;
+ await sendPrompt(client, session.id, prompt);
+ return session.id;
}
export interface ForkSessionOptions {
@@ -117,18 +127,16 @@ export async function forkJobSession(
sourceSessionId: string,
options: ForkSessionOptions,
): Promise {
- const forkResult = await client.session.fork({
- path: { id: sourceSessionId },
- body: {},
- });
-
- if (!forkResult.data) {
+ let forked;
+ try {
+ forked = await client.session.fork({ sessionID: sourceSessionId });
+ } catch (error) {
throw new Error(
- `Failed to fork session: ${forkResult.error ? JSON.stringify(forkResult.error) : 'unknown error'}`,
+ `Failed to fork session: ${error instanceof Error ? error.message : String(error)}`,
);
}
- const newSessionId = forkResult.data.id;
+ const newSessionId = forked.id;
if (options.additionalPrompt) {
const contextPrompt = `Forked from job "${options.sourceJobName}" as "${options.newJobName}".\n\nAdditional context: ${options.additionalPrompt}`;
diff --git a/src/rpc.ts b/src/rpc.ts
new file mode 100644
index 0000000..94908f9
--- /dev/null
+++ b/src/rpc.ts
@@ -0,0 +1,50 @@
+import { Rpc } from '@opencode/plugin';
+
+export type ToastVariant = 'info' | 'success' | 'warning' | 'error';
+
+export interface ToastOptions {
+ title?: string;
+ message: string;
+ variant?: ToastVariant;
+ duration?: number;
+}
+
+export const missionControlRpc = Rpc.define({
+ id: 'opencode-mission-control',
+ methods: {},
+ events: {
+ toast: {
+ schema: {
+ type: 'object',
+ properties: {
+ title: { type: 'string' },
+ message: { type: 'string' },
+ variant: {
+ type: 'string',
+ enum: ['info', 'success', 'warning', 'error'],
+ },
+ duration: { type: 'number' },
+ },
+ required: ['message'],
+ additionalProperties: false,
+ },
+ },
+ },
+});
+
+type ToastEmitter = (options: ToastOptions) => Promise;
+
+let toastEmitter: ToastEmitter | null = null;
+
+export function setToastEmitter(emitter: ToastEmitter | null): void {
+ toastEmitter = emitter;
+}
+
+export async function showToast(options: ToastOptions): Promise {
+ if (!toastEmitter) return;
+ try {
+ await toastEmitter(options);
+ } catch {
+ // Toasts are best-effort; never block job notification flow on a toast failure.
+ }
+}
diff --git a/src/tools/answer.ts b/src/tools/answer.ts
index 9d54066..cedc922 100644
--- a/src/tools/answer.ts
+++ b/src/tools/answer.ts
@@ -1,4 +1,4 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { getJobByName } from '../lib/job-state';
import {
findPendingQuestionByJobName,
@@ -7,18 +7,15 @@ import {
} from '../lib/question-relay';
import { loadConfig } from '../lib/config';
-export const mc_answer: ToolDefinition = tool({
+export const mc_answer = {
+ name: 'mc_answer',
description:
'Answer a pending question from a background job. When a serve-mode job\'s agent asks a question via mcp_question, it gets relayed to this session. Use this tool to respond and unblock the agent.',
- args: {
- name: tool.schema
- .string()
- .describe('Job name that asked the question'),
- response: tool.schema
- .string()
- .describe('Your answer to the question. For option-based questions, provide the option label(s). For open-ended questions, provide your response text.'),
- },
- async execute(args) {
+ input: z.object({
+ name: z.string().describe('Job name that asked the question'),
+ response: z.string().describe('Your answer to the question. For option-based questions, provide the option label(s). For open-ended questions, provide your response text.'),
+ }).strict(),
+ async execute(args: { name: string; response: string }) {
const job = await getJobByName(args.name);
if (!job) {
throw new Error(`Job "${args.name}" not found.`);
@@ -54,8 +51,8 @@ export const mc_answer: ToolDefinition = tool({
detectedAt: Date.now(),
};
- await answerPendingQuestion(question, args.response, config.serverPassword);
+ await answerPendingQuestion(question, args.response, question.serverPassword ?? config.serverPassword);
- return `Answer sent to job "${args.name}": "${args.response}"`;
+ return { content: `Answer sent to job "${args.name}": "${args.response}"` };
},
-});
+};
diff --git a/src/tools/attach.ts b/src/tools/attach.ts
index 6f26764..7b6cfe2 100644
--- a/src/tools/attach.ts
+++ b/src/tools/attach.ts
@@ -1,13 +1,14 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { getJobByName } from '../lib/job-state';
import { isInsideTmux, createWindow, getCurrentSession, setWindowOption } from '../lib/tmux';
-export const mc_attach: ToolDefinition = tool({
+export const mc_attach = {
+ name: 'mc_attach',
description: 'Get instructions for attaching to a job\'s terminal',
- args: {
- name: tool.schema.string().describe('Job name'),
- },
- async execute(args) {
+ input: z.object({
+ name: z.string().describe('Job name'),
+ }).strict(),
+ async execute(args: { name: string }) {
const job = await getJobByName(args.name);
if (!job) {
@@ -27,7 +28,7 @@ export const mc_attach: ToolDefinition = tool({
const currentSession = getCurrentSession();
if (!currentSession) {
- return `Run: opencode attach ${job.serverUrl}`;
+ return { content: `Run: opencode attach ${job.serverUrl}` };
}
await createWindow({
@@ -43,10 +44,10 @@ export const mc_attach: ToolDefinition = tool({
// Best-effort: tagging failure should not block attach
}
- return `Opened TUI for job '${job.name}' in new tmux window`;
+ return { content: `Opened TUI for job '${job.name}' in new tmux window` };
} else {
// Not inside tmux, return the command to run
- return `Run: opencode attach ${job.serverUrl}`;
+ return { content: `Run: opencode attach ${job.serverUrl}` };
}
}
@@ -67,6 +68,6 @@ export const mc_attach: ToolDefinition = tool({
lines.push('');
lines.push('# To detach: Ctrl+B, D');
- return lines.join('\n');
+ return { content: lines.join('\n') };
},
-});
+};
diff --git a/src/tools/capture.ts b/src/tools/capture.ts
index 9366e6c..e84ae09 100644
--- a/src/tools/capture.ts
+++ b/src/tools/capture.ts
@@ -1,16 +1,17 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { getJobByName } from '../lib/job-state';
import { capturePane } from '../lib/tmux';
import { getSharedMonitor } from '../lib/orchestrator-singleton';
-export const mc_capture: ToolDefinition = tool({
+export const mc_capture = {
+ name: 'mc_capture',
description: 'Capture current terminal output or structured events from a job',
- args: {
- name: tool.schema.string().describe('Job name'),
- lines: tool.schema.number().optional().describe('Number of lines for TUI mode (default: 100)'),
- filter: tool.schema.enum(['file.edited', 'tool', 'error', 'all']).optional().describe('Event filter for serve-mode jobs (default: all)'),
- },
- async execute(args) {
+ input: z.object({
+ name: z.string().describe('Job name'),
+ lines: z.number().describe('Number of lines for TUI mode (default: 100)'),
+ filter: z.enum(['file.edited', 'tool', 'error', 'all']).describe('Event filter for serve-mode jobs (default: all)'),
+ }).strict(),
+ async execute(args: { name: string; lines?: number; filter?: 'file.edited' | 'tool' | 'error' | 'all' }) {
const job = await getJobByName(args.name);
if (!job) {
throw new Error(`Job "${args.name}" not found`);
@@ -24,13 +25,13 @@ export const mc_capture: ToolDefinition = tool({
const filter = args.filter ?? 'all';
if (!accumulator) {
- return JSON.stringify({
+ return { content: JSON.stringify({
job: job.name,
mode: 'serve',
status: job.status,
events: [],
message: 'No events accumulated yet',
- }, null, 2);
+ }, null, 2) };
}
const events: Array<{ type: string; timestamp: string; payload: unknown }> = [];
@@ -68,11 +69,11 @@ export const mc_capture: ToolDefinition = tool({
events,
};
- return JSON.stringify(result, null, 2);
+ return { content: JSON.stringify(result, null, 2) };
}
const lineCount = args.lines ?? 100;
const output = await capturePane(job.tmuxTarget, lineCount);
- return output;
+ return { content: output };
},
-});
+};
diff --git a/src/tools/cleanup.ts b/src/tools/cleanup.ts
index afa9caf..28e2d72 100644
--- a/src/tools/cleanup.ts
+++ b/src/tools/cleanup.ts
@@ -1,4 +1,4 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { getJobByName, removeJob, getRunningJobs, loadJobState } from '../lib/job-state';
import { removeWorktree } from '../lib/worktree';
import { killSession, sessionExists, killTaggedWindows } from '../lib/tmux';
@@ -142,31 +142,23 @@ function formatCleanupOutput(
return output.join('\n');
}
-export const mc_cleanup: ToolDefinition = tool({
+export const mc_cleanup = {
+ name: 'mc_cleanup',
description: 'Remove completed/stopped jobs and their worktrees',
- args: {
- name: tool.schema
- .string()
- .optional()
- .describe('Specific job to cleanup (by name)'),
- all: tool.schema
- .boolean()
- .optional()
- .describe('Cleanup all non-running jobs'),
- deleteBranch: tool.schema
- .boolean()
- .optional()
- .describe('Also delete the git branch'),
- },
- async execute(args) {
+ input: z.object({
+ name: z.string().optional().describe('Specific job to cleanup (by name)'),
+ all: z.boolean().optional().describe('Cleanup all non-running jobs'),
+ deleteBranch: z.boolean().optional().describe('Also delete the git branch'),
+ }).strict(),
+ async execute(args: { name?: string; all?: boolean; deleteBranch?: boolean }) {
validateCleanupArgs(args);
const jobsToClean = await determineJobsToClean(args);
if (jobsToClean.length === 0) {
- return 'No non-running jobs to cleanup.';
+ return { content: 'No non-running jobs to cleanup.' };
}
const { results, errors } = await cleanupJobs(jobsToClean, args.deleteBranch);
- return formatCleanupOutput(results, errors);
+ return { content: formatCleanupOutput(results, errors) };
},
-});
+};
diff --git a/src/tools/diff.ts b/src/tools/diff.ts
index 3e63c73..1a562a9 100644
--- a/src/tools/diff.ts
+++ b/src/tools/diff.ts
@@ -1,4 +1,4 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { getJobByName } from '../lib/job-state';
import { gitCommand } from '../lib/git';
@@ -40,18 +40,14 @@ async function executeGitDiff(
return diffResult.stdout;
}
-export const mc_diff: ToolDefinition = tool({
+export const mc_diff = {
+ name: 'mc_diff',
description: 'Show changes in a job\'s branch compared to base',
- args: {
- name: tool.schema
- .string()
- .describe('Job name'),
- stat: tool.schema
- .boolean()
- .optional()
- .describe('Show diffstat only'),
- },
- async execute(args) {
+ input: z.object({
+ name: z.string().describe('Job name'),
+ stat: z.boolean().optional().describe('Show diffstat only'),
+ }).strict(),
+ async execute(args: { name: string; stat?: boolean }) {
// 1. Get job by name
const job = await getJobByName(args.name);
if (!job) {
@@ -62,6 +58,6 @@ export const mc_diff: ToolDefinition = tool({
const diff = await executeGitDiff(job.worktreePath, job.branch, args.stat, job.baseBranch);
// 3. Return diff output
- return diff || '(no changes)';
+ return { content: diff || '(no changes)' };
},
-});
+};
diff --git a/src/tools/jobs.ts b/src/tools/jobs.ts
index edfdb04..75ae7df 100644
--- a/src/tools/jobs.ts
+++ b/src/tools/jobs.ts
@@ -1,4 +1,4 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { loadJobState, type Job } from '../lib/job-state';
import { formatTimeAgo } from '../lib/utils';
@@ -88,17 +88,15 @@ function formatJobsOutput(grouped: Record): string {
return lines.join('\n');
}
-export const mc_jobs: ToolDefinition = tool({
+export const mc_jobs = {
+ name: 'mc_jobs',
description: 'List all Mission Control jobs with status',
- args: {
- status: tool.schema
- .enum(['all', 'running', 'completed', 'failed'])
- .optional()
- .describe('Filter by status (default: all)'),
- },
- async execute(args) {
+ input: z.object({
+ status: z.enum(['all', 'running', 'completed', 'failed']).optional().describe('Filter by status (default: all)'),
+ }).strict(),
+ async execute(args: { status?: 'all' | 'running' | 'completed' | 'failed' }) {
const state = await loadJobState();
const grouped = groupJobsByStatus(state.jobs, args.status);
- return formatJobsOutput(grouped);
+ return { content: formatJobsOutput(grouped) };
},
-});
+};
diff --git a/src/tools/kill.ts b/src/tools/kill.ts
index 457be4b..9130ebd 100644
--- a/src/tools/kill.ts
+++ b/src/tools/kill.ts
@@ -1,18 +1,16 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { getJobByName, updateJob } from '../lib/job-state';
import { killSession, killWindow } from '../lib/tmux';
import { releasePort } from '../lib/port-allocator';
-export const mc_kill: ToolDefinition = tool({
+export const mc_kill = {
+ name: 'mc_kill',
description: 'Stop a running job',
- args: {
- name: tool.schema.string().describe('Job name'),
- force: tool.schema
- .boolean()
- .optional()
- .describe('Force kill (SIGKILL)'),
- },
- async execute(args) {
+ input: z.object({
+ name: z.string().describe('Job name'),
+ force: z.boolean().optional().describe('Force kill (SIGKILL)'),
+ }).strict(),
+ async execute(args: { name: string; force?: boolean }) {
// 1. Find job by name
const job = await getJobByName(args.name);
if (!job) {
@@ -21,7 +19,7 @@ export const mc_kill: ToolDefinition = tool({
// 2. Check if job is already stopped
if (job.status === 'stopped') {
- return `Job "${args.name}" is already stopped.`;
+ return { content: `Job "${args.name}" is already stopped.` };
}
// 3. Kill tmux session or window
@@ -67,7 +65,7 @@ export const mc_kill: ToolDefinition = tool({
}
// 5. Return success message
- return [
+ return { content: [
`Job "${args.name}" stopped successfully.`,
'',
` ID: ${job.id}`,
@@ -76,6 +74,6 @@ export const mc_kill: ToolDefinition = tool({
` Worktree: ${job.worktreePath}`,
'',
'Note: Worktree is preserved. Use mc_cleanup to remove it.',
- ].join('\n');
+ ].join('\n') };
},
-});
+};
diff --git a/src/tools/launch.ts b/src/tools/launch.ts
index dd5aa23..faf9704 100644
--- a/src/tools/launch.ts
+++ b/src/tools/launch.ts
@@ -1,4 +1,4 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { randomUUID } from 'crypto';
import { getJobByName, addJob, getRunningJobs, type Job } from '../lib/job-state';
import { createWorktree, removeWorktree } from '../lib/worktree';
@@ -74,48 +74,23 @@ function buildFullPrompt(opts: {
}
}
-export const mc_launch: ToolDefinition = tool({
+export const mc_launch = {
+ name: 'mc_launch',
description:
'Launch a new parallel AI coding session in an isolated worktree',
- args: {
- name: tool.schema
- .string()
- .describe('Job name (used for branch and tmux)'),
- prompt: tool.schema.string().describe('Task prompt for the AI agent'),
- branch: tool.schema
- .string()
- .optional()
- .describe('Branch name (defaults to mc/{name})'),
- baseBranch: tool.schema
- .string()
- .optional()
- .describe('Branch or ref to start from (defaults to default branch)'),
- placement: tool.schema
- .enum(['session', 'window'])
- .optional()
- .describe('tmux placement: session (default) or window'),
- mode: tool.schema
- .enum(['vanilla', 'plan', 'ralph', 'ulw'])
- .optional()
- .describe('Execution mode'),
- planFile: tool.schema
- .string()
- .optional()
- .describe('Plan file to use (for plan mode)'),
- copyFiles: tool.schema
- .array(tool.schema.string())
- .optional()
- .describe('Files to copy from main worktree (e.g. [".env", ".env.local"])'),
- symlinkDirs: tool.schema
- .array(tool.schema.string())
- .optional()
- .describe('Directories to symlink from main worktree (e.g. ["node_modules"]). .opencode is always included.'),
- commands: tool.schema
- .array(tool.schema.string())
- .optional()
- .describe('Shell commands to run in worktree after creation (e.g. ["bun install"])'),
- },
- async execute(args, context) {
+ input: z.object({
+ name: z.string().describe('Job name (used for branch and tmux)'),
+ prompt: z.string().describe('Task prompt for the AI agent'),
+ branch: z.string().optional().describe('Branch name (defaults to mc/{name})'),
+ baseBranch: z.string().optional().describe('Branch or ref to start from (defaults to default branch)'),
+ placement: z.enum(['session', 'window']).optional().describe('tmux placement: session (default) or window'),
+ mode: z.enum(['vanilla', 'plan', 'ralph', 'ulw']).optional().describe('Execution mode'),
+ planFile: z.string().optional().describe('Plan file to use (for plan mode)'),
+ copyFiles: z.array(z.string()).optional().describe('Files to copy from main worktree (e.g. [".env", ".env.local"])'),
+ symlinkDirs: z.array(z.string()).optional().describe('Directories to symlink from main worktree (e.g. ["node_modules"]). .opencode is always included.'),
+ commands: z.array(z.string()).optional().describe('Shell commands to run in worktree after creation (e.g. ["bun install"])'),
+ }).strict(),
+ async execute(args: { name: string; prompt: string; branch?: string; baseBranch?: string; placement?: 'session' | 'window'; mode?: 'vanilla' | 'plan' | 'ralph' | 'ulw'; planFile?: string; copyFiles?: string[]; symlinkDirs?: string[]; commands?: string[] }, context?: { sessionID?: string }) {
// 0. Validate tmux is available
const tmuxFound = await isTmuxAvailable();
if (!tmuxFound) {
@@ -210,9 +185,16 @@ export const mc_launch: ToolDefinition = tool({
let allocatedPort: number | undefined;
let serverUrl: string | undefined;
let remoteSessionId: string | undefined;
+ let serverPassword: string | undefined;
if (useServeMode) {
// === SERVE MODE ===
+ // V2's `opencode serve` always requires auth: when no password is
+ // configured it generates a random one and only prints it to its own
+ // stdout. Generate a known per-job password so the launcher and every
+ // client that later connects to this server can authenticate.
+ serverPassword = config.serverPassword ?? randomUUID().replace(/-/g, '');
+
// Allocate port
try {
const activeJobs = await getRunningJobs();
@@ -236,7 +218,7 @@ export const mc_launch: ToolDefinition = tool({
launcherPath = await writeServeLauncherScript(
worktreePath,
allocatedPort,
- config.serverPassword,
+ serverPassword,
);
} catch (error) {
await releasePort(allocatedPort).catch(() => {});
@@ -294,7 +276,7 @@ export const mc_launch: ToolDefinition = tool({
// Wait for server and send prompt via SDK
try {
const client = await waitForServer(allocatedPort, {
- password: config.serverPassword,
+ password: serverPassword,
});
const fullPrompt = buildFullPrompt({
prompt: args.prompt,
@@ -435,6 +417,7 @@ export const mc_launch: ToolDefinition = tool({
launchSessionID: context?.sessionID,
port: allocatedPort,
serverUrl,
+ serverPassword,
remoteSessionID: remoteSessionId,
};
@@ -465,6 +448,6 @@ export const mc_launch: ToolDefinition = tool({
: `Switch with: tmux select-window -t ${tmuxTarget}`,
);
- return infoLines.join('\n');
+ return { content: infoLines.join('\n') };
},
-});
+};
diff --git a/src/tools/merge.ts b/src/tools/merge.ts
index bde6411..24c82d8 100644
--- a/src/tools/merge.ts
+++ b/src/tools/merge.ts
@@ -1,4 +1,4 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { getJobByName } from '../lib/job-state';
import { gitCommand } from '../lib/git';
import { loadPlan } from '../lib/plan-state';
@@ -34,15 +34,16 @@ async function assertCleanWorktree(cwd: string): Promise {
}
}
-export const mc_merge: ToolDefinition = tool({
+export const mc_merge = {
+ name: 'mc_merge',
description: 'Merge a job\'s branch back to main (for non-PR workflows)',
- args: {
- name: tool.schema.string().describe('Job name'),
- squash: tool.schema.boolean().optional().describe('Squash commits (deprecated: use strategy instead)'),
- strategy: tool.schema.enum(['squash', 'ff-only', 'merge']).optional().describe('Merge strategy (default: from config, usually squash)'),
- message: tool.schema.string().optional().describe('Merge commit message'),
- },
- async execute(args) {
+ input: z.object({
+ name: z.string().describe('Job name'),
+ squash: z.boolean().optional().describe('Squash commits (deprecated: use strategy instead)'),
+ strategy: z.enum(['squash', 'ff-only', 'merge']).optional().describe('Merge strategy (default: from config, usually squash)'),
+ message: z.string().optional().describe('Merge commit message'),
+ }).strict(),
+ async execute(args: { name: string; squash?: boolean; strategy?: 'squash' | 'ff-only' | 'merge'; message?: string }) {
// 1. Get job by name
const job = await getJobByName(args.name);
if (!job) {
@@ -183,6 +184,6 @@ export const mc_merge: ToolDefinition = tool({
'Note: Branch was not deleted. Use mc_cleanup to remove the worktree if needed.',
];
- return lines.join('\n');
+ return { content: lines.join('\n') };
},
-});
+};
diff --git a/src/tools/overview.ts b/src/tools/overview.ts
index 398cb34..340e092 100644
--- a/src/tools/overview.ts
+++ b/src/tools/overview.ts
@@ -1,4 +1,4 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { loadJobState, getRunningJobs, type Job } from '../lib/job-state';
import { loadPlan } from '../lib/plan-state';
import { readAllReports, type AgentReport } from '../lib/reports';
@@ -187,10 +187,11 @@ function getSuggestedActions(
return actions.slice(0, 5).map((action) => `- ${action}`);
}
-export const mc_overview: ToolDefinition = tool({
+export const mc_overview = {
+ name: 'mc_overview',
description:
'START HERE — Get a complete overview of all Mission Control activity, jobs, plans, and alerts',
- args: {},
+ input: z.object({}).strict(),
async execute() {
const [jobState, runningJobs, plan, reports] = await Promise.all([
loadJobState(),
@@ -266,6 +267,6 @@ export const mc_overview: ToolDefinition = tool({
lines.push('', 'Suggested Actions', '-----------------');
lines.push(...getSuggestedActions(jobs, plan, reports));
- return lines.join('\n');
+ return { content: lines.join('\n') };
},
-});
+};
diff --git a/src/tools/plan-approve.ts b/src/tools/plan-approve.ts
index acea36a..349ccd5 100644
--- a/src/tools/plan-approve.ts
+++ b/src/tools/plan-approve.ts
@@ -1,7 +1,7 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { loadPlan, savePlan } from '../lib/plan-state';
import { Orchestrator } from '../lib/orchestrator';
-import { getSharedMonitor, getSharedNotifyCallback, setSharedOrchestrator } from '../lib/orchestrator-singleton';
+import { getSharedMonitor, getSharedOrchestratorCallbacks, setSharedOrchestrator } from '../lib/orchestrator-singleton';
import type { CheckpointType } from '../lib/plan-types';
import { loadConfig } from '../lib/config';
import { getCurrentModel } from '../lib/model-tracker';
@@ -9,24 +9,16 @@ import { createIntegrationBranch } from '../lib/integration';
import { resolvePostCreateHook } from '../lib/worktree-setup';
import { validateTouchSet } from '../lib/merge-train';
-export const mc_plan_approve: ToolDefinition = tool({
+export const mc_plan_approve = {
+ name: 'mc_plan_approve',
description:
'Approve a pending copilot plan, clear a supervisor checkpoint, or retry/relaunch a failed job to continue execution',
- args: {
- checkpoint: tool.schema
- .enum(['pre_merge', 'on_error', 'pre_pr'])
- .optional()
- .describe('Specific checkpoint to clear (for supervisor mode)'),
- retry: tool.schema
- .string()
- .optional()
- .describe('Name of a failed, conflict, or needs_rebase job to retry after manual fix (re-validates touchSet)'),
- relaunch: tool.schema
- .string()
- .optional()
- .describe('Name of a touchSet-failed job to relaunch — spawns agent in existing worktree with correction prompt'),
- },
- async execute(args) {
+ input: z.object({
+ checkpoint: z.enum(['pre_merge', 'on_error', 'pre_pr']).optional().describe('Specific checkpoint to clear (for supervisor mode)'),
+ retry: z.string().optional().describe('Name of a failed, conflict, or needs_rebase job to retry after manual fix (re-validates touchSet)'),
+ relaunch: z.string().optional().describe('Name of a touchSet-failed job to relaunch — spawns agent in existing worktree with correction prompt'),
+ }).strict(),
+ async execute(args: { checkpoint?: 'pre_merge' | 'on_error' | 'pre_pr'; retry?: string; relaunch?: string }) {
if (args.retry && args.relaunch) {
throw new Error('Cannot specify both "retry" and "relaunch". Use "retry" for manual fixes (re-validates) or "relaunch" to spawn an agent to fix violations.');
}
@@ -51,6 +43,17 @@ export const mc_plan_approve: ToolDefinition = tool({
const checkpoint = (args.checkpoint ?? plan.checkpoint) as CheckpointType;
const config = await loadConfig();
+ // Supervisor approvals must survive the process boundary: mc_plan_approve
+ // creates a new Orchestrator, so in-memory approval sets are empty on
+ // resume. Persist approvals on the plan before resuming.
+ const mergeApprovals = plan.approvedMergeJobs ?? [];
+ const approveForMerge = (jobName: string) => {
+ if (!mergeApprovals.includes(jobName)) {
+ mergeApprovals.push(jobName);
+ }
+ plan.approvedMergeJobs = mergeApprovals;
+ };
+
if (args.relaunch) {
const ctx = plan.checkpointContext;
if (!ctx || ctx.failureKind !== 'touchset') {
@@ -63,9 +66,10 @@ export const mc_plan_approve: ToolDefinition = tool({
plan.status = 'running';
plan.checkpoint = null;
plan.checkpointContext = null;
+ approveForMerge(args.relaunch);
await savePlan(plan);
- const orchestrator = new Orchestrator(getSharedMonitor(), config, { notify: getSharedNotifyCallback() ?? undefined });
+ const orchestrator = new Orchestrator(getSharedMonitor(), config, getSharedOrchestratorCallbacks());
setSharedOrchestrator(orchestrator);
orchestrator.setPlanModelSnapshot(getCurrentModel());
@@ -76,7 +80,7 @@ export const mc_plan_approve: ToolDefinition = tool({
);
await orchestrator.resumePlan();
- return [
+ return { content: [
`Checkpoint "${checkpoint}" cleared. Job "${args.relaunch}" relaunched with correction prompt.`,
'',
` ID: ${plan.id}`,
@@ -84,7 +88,7 @@ export const mc_plan_approve: ToolDefinition = tool({
'',
'The agent will fix touchSet violations in the existing worktree.',
'Use mc_plan_status to monitor progress.',
- ].join('\n');
+ ].join('\n') };
}
if (args.retry) {
@@ -112,21 +116,22 @@ export const mc_plan_approve: ToolDefinition = tool({
plan.status = 'running';
plan.checkpoint = null;
plan.checkpointContext = null;
+ approveForMerge(args.retry);
await savePlan(plan);
- const orchestrator = new Orchestrator(getSharedMonitor(), config, { notify: getSharedNotifyCallback() ?? undefined });
+ const orchestrator = new Orchestrator(getSharedMonitor(), config, getSharedOrchestratorCallbacks());
setSharedOrchestrator(orchestrator);
orchestrator.setPlanModelSnapshot(getCurrentModel());
await orchestrator.resumePlan();
- return [
+ return { content: [
`Checkpoint "${checkpoint}" cleared. Job "${args.retry}" reset to ready_to_merge.`,
'',
` ID: ${plan.id}`,
` Mode: ${plan.mode}`,
'',
'Use mc_plan_status to monitor progress.',
- ].join('\n');
+ ].join('\n') };
}
const ctx = plan.checkpointContext;
@@ -138,12 +143,26 @@ export const mc_plan_approve: ToolDefinition = tool({
}
}
+ if (plan.mode === 'supervisor') {
+ if (checkpoint === 'pre_merge') {
+ for (const job of plan.jobs) {
+ if (job.status === 'ready_to_merge') {
+ approveForMerge(job.name);
+ }
+ }
+ } else if (checkpoint === 'pre_pr') {
+ plan.approvedPrePr = true;
+ } else if (ctx?.failureKind === 'touchset' && ctx.jobName) {
+ approveForMerge(ctx.jobName);
+ }
+ }
+
plan.status = 'running';
plan.checkpoint = null;
plan.checkpointContext = null;
await savePlan(plan);
- const orchestrator = new Orchestrator(getSharedMonitor(), config, { notify: getSharedNotifyCallback() ?? undefined });
+ const orchestrator = new Orchestrator(getSharedMonitor(), config, getSharedOrchestratorCallbacks());
setSharedOrchestrator(orchestrator);
orchestrator.setPlanModelSnapshot(getCurrentModel());
await orchestrator.resumePlan();
@@ -151,14 +170,14 @@ export const mc_plan_approve: ToolDefinition = tool({
const acceptMsg = ctx?.failureKind === 'touchset'
? ` TouchSet violations for job "${ctx.jobName}" accepted.`
: '';
- return [
+ return { content: [
`Checkpoint "${checkpoint}" cleared.${acceptMsg} Plan "${plan.name}" resuming.`,
'',
` ID: ${plan.id}`,
` Mode: ${plan.mode}`,
'',
'Use mc_plan_status to monitor progress.',
- ].join('\n');
+ ].join('\n') };
}
if (plan.status !== 'pending') {
@@ -177,12 +196,12 @@ export const mc_plan_approve: ToolDefinition = tool({
plan.status = 'running';
await savePlan(plan);
- const orchestrator = new Orchestrator(getSharedMonitor(), config, { notify: getSharedNotifyCallback() ?? undefined });
+ const orchestrator = new Orchestrator(getSharedMonitor(), config, getSharedOrchestratorCallbacks());
setSharedOrchestrator(orchestrator);
orchestrator.setPlanModelSnapshot(getCurrentModel());
await orchestrator.resumePlan();
- return [
+ return { content: [
`Plan "${plan.name}" approved and started.`,
'',
` ID: ${plan.id}`,
@@ -190,6 +209,6 @@ export const mc_plan_approve: ToolDefinition = tool({
` Jobs: ${plan.jobs.length}`,
'',
'Use mc_plan_status to monitor progress.',
- ].join('\n');
+ ].join('\n') };
},
-});
+};
diff --git a/src/tools/plan-cancel.ts b/src/tools/plan-cancel.ts
index a041d97..8f5b850 100644
--- a/src/tools/plan-cancel.ts
+++ b/src/tools/plan-cancel.ts
@@ -1,32 +1,33 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { loadPlan } from '../lib/plan-state';
import { Orchestrator } from '../lib/orchestrator';
-import { getSharedMonitor } from '../lib/orchestrator-singleton';
+import { getSharedMonitor, getSharedOrchestratorCallbacks } from '../lib/orchestrator-singleton';
import { loadConfig } from '../lib/config';
-export const mc_plan_cancel: ToolDefinition = tool({
+export const mc_plan_cancel = {
+ name: 'mc_plan_cancel',
description: 'Cancel the active orchestrated plan and stop all its jobs',
- args: {},
+ input: z.object({}).strict(),
async execute() {
const plan = await loadPlan();
if (!plan) {
- return 'No active plan to cancel.';
+ return { content: 'No active plan to cancel.' };
}
const planName = plan.name;
const planId = plan.id;
const config = await loadConfig();
- const orchestrator = new Orchestrator(getSharedMonitor(), config);
+ const orchestrator = new Orchestrator(getSharedMonitor(), config, getSharedOrchestratorCallbacks());
await orchestrator.cancelPlan();
- return [
+ return { content: [
`Plan "${planName}" canceled.`,
'',
` ID: ${planId}`,
'',
'All running jobs have been stopped.',
'Integration branch and worktrees cleaned up.',
- ].join('\n');
+ ].join('\n') };
},
-});
+};
diff --git a/src/tools/plan-status.ts b/src/tools/plan-status.ts
index 49635af..4344a42 100644
--- a/src/tools/plan-status.ts
+++ b/src/tools/plan-status.ts
@@ -1,4 +1,4 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { loadPlan } from '../lib/plan-state';
import type { JobSpec, PlanSpec } from '../lib/plan-types';
@@ -59,13 +59,14 @@ function getNextActions(plan: PlanSpec): string {
return actions.length > 0 ? actions.join(', ') : 'None';
}
-export const mc_plan_status: ToolDefinition = tool({
+export const mc_plan_status = {
+ name: 'mc_plan_status',
description: 'Show status of the active orchestrated plan',
- args: {},
+ input: z.object({}).strict(),
async execute() {
const plan = await loadPlan();
if (!plan) {
- return 'No active plan.';
+ return { content: 'No active plan.' };
}
const merged = plan.jobs.filter((j) => j.status === 'merged').length;
@@ -89,6 +90,6 @@ export const mc_plan_status: ToolDefinition = tool({
lines.push(`PR: ${plan.prUrl}`);
}
- return lines.join('\n');
+ return { content: lines.join('\n') };
},
-});
+};
diff --git a/src/tools/plan.ts b/src/tools/plan.ts
index 5315c2a..841eded 100644
--- a/src/tools/plan.ts
+++ b/src/tools/plan.ts
@@ -1,64 +1,49 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { randomUUID } from 'crypto';
import type { PlanSpec, JobSpec } from '../lib/plan-types';
import { loadPlan, savePlan, validateGhAuth } from '../lib/plan-state';
import { Orchestrator, hasCircularDependency } from '../lib/orchestrator';
-import { getSharedMonitor, getSharedNotifyCallback, setSharedOrchestrator } from '../lib/orchestrator-singleton';
+import { getSharedMonitor, getSharedOrchestratorCallbacks, setSharedOrchestrator } from '../lib/orchestrator-singleton';
import { loadConfig } from '../lib/config';
import { gitCommand } from '../lib/git';
import { getCurrentModel } from '../lib/model-tracker';
-export const mc_plan: ToolDefinition = tool({
+export const mc_plan = {
+ name: 'mc_plan',
description:
'Create and start a multi-job orchestrated plan with dependency management',
- args: {
- name: tool.schema.string().describe('Plan name — used as the PR title. Use Conventional Commits format (e.g. "feat: add search", "fix: resolve auth bugs").'),
- jobs: tool.schema
- .array(
- tool.schema.object({
- name: tool.schema.string().describe('Unique job name'),
- prompt: tool.schema.string().describe('Task prompt for the AI agent'),
- dependsOn: tool.schema
- .array(tool.schema.string())
- .optional()
- .describe('Names of jobs this depends on'),
- touchSet: tool.schema
- .array(tool.schema.string())
- .optional()
- .describe('File globs this job expects to modify'),
- copyFiles: tool.schema
- .array(tool.schema.string())
- .optional()
- .describe('Files to copy from main worktree (e.g. [".env"])'),
- symlinkDirs: tool.schema
- .array(tool.schema.string())
- .optional()
- .describe('Directories to symlink from main worktree (e.g. ["node_modules"])'),
- commands: tool.schema
- .array(tool.schema.string())
- .optional()
- .describe('Shell commands to run in worktree after creation'),
- mode: tool.schema
- .enum(['vanilla', 'plan', 'ralph', 'ulw'])
- .optional()
- .describe('Execution mode override for this job (defaults to omo.defaultMode config)'),
- }),
- )
- .describe('Array of jobs to execute'),
- mode: tool.schema
- .enum(['autopilot', 'copilot', 'supervisor'])
- .optional()
- .describe('Execution mode (default: autopilot)'),
- placement: tool.schema
- .enum(['session', 'window'])
- .optional()
- .describe('tmux placement for jobs: session (default) or window in current session'),
- baseBranch: tool.schema
- .string()
- .optional()
- .describe('Base branch for the integration branch (defaults to default branch)'),
- },
- async execute(args, context) {
+ input: z.object({
+ name: z.string().describe('Plan name — used as the PR title. Use Conventional Commits format (e.g. "feat: add search", "fix: resolve auth bugs").'),
+ jobs: z.array(z.object({
+ name: z.string().describe('Unique job name'),
+ prompt: z.string().describe('Task prompt for the AI agent'),
+ dependsOn: z.array(z.string()).optional().describe('Names of jobs this depends on'),
+ touchSet: z.array(z.string()).optional().describe('File globs this job expects to modify'),
+ copyFiles: z.array(z.string()).optional().describe('Files to copy from main worktree (e.g. [".env"])'),
+ symlinkDirs: z.array(z.string()).optional().describe('Directories to symlink from main worktree (e.g. ["node_modules"])'),
+ commands: z.array(z.string()).optional().describe('Shell commands to run in worktree after creation'),
+ mode: z.enum(['vanilla', 'plan', 'ralph', 'ulw']).optional().describe('Execution mode override for this job (defaults to omo.defaultMode config)'),
+ }).strict()).describe('Array of jobs to execute'),
+ mode: z.enum(['autopilot', 'copilot', 'supervisor']).optional().describe('Execution mode (default: autopilot)'),
+ placement: z.enum(['session', 'window']).optional().describe('tmux placement for jobs: session (default) or window in current session'),
+ baseBranch: z.string().optional().describe('Base branch for the integration branch (defaults to default branch)'),
+ }).strict(),
+ async execute(args: {
+ name: string;
+ jobs: {
+ name: string;
+ prompt: string;
+ dependsOn?: string[];
+ touchSet?: string[];
+ copyFiles?: string[];
+ symlinkDirs?: string[];
+ commands?: string[];
+ mode?: 'vanilla' | 'plan' | 'ralph' | 'ulw';
+ }[];
+ mode?: 'autopilot' | 'copilot' | 'supervisor';
+ placement?: 'session' | 'window';
+ baseBranch?: string;
+ }, context: { sessionID?: string }) {
const mode = args.mode ?? 'autopilot';
// 1. Validate jobs: unique names
@@ -140,7 +125,7 @@ export const mc_plan: ToolDefinition = tool({
})
.join('\n');
- return [
+ return { content: [
`Plan "${args.name}" created (pending approval).`,
'',
` ID: ${planId}`,
@@ -152,12 +137,12 @@ export const mc_plan: ToolDefinition = tool({
jobSummary,
'',
'Use mc_plan_approve to start execution.',
- ].join('\n');
+ ].join('\n') };
}
// autopilot or supervisor: start immediately
const config = await loadConfig();
- const orchestrator = new Orchestrator(getSharedMonitor(), config, { notify: getSharedNotifyCallback() ?? undefined });
+ const orchestrator = new Orchestrator(getSharedMonitor(), config, getSharedOrchestratorCallbacks());
setSharedOrchestrator(orchestrator);
const modelSnapshot = getCurrentModel(context?.sessionID);
orchestrator.setPlanModelSnapshot(modelSnapshot);
@@ -171,7 +156,7 @@ export const mc_plan: ToolDefinition = tool({
})
.join('\n');
- return [
+ return { content: [
`Plan "${args.name}" started.`,
'',
` ID: ${planId}`,
@@ -183,6 +168,6 @@ export const mc_plan: ToolDefinition = tool({
jobSummary,
'',
'Use mc_plan_status to monitor progress.',
- ].join('\n');
+ ].join('\n') };
},
-});
+};
diff --git a/src/tools/pr.ts b/src/tools/pr.ts
index 7e39c5d..9b8b643 100644
--- a/src/tools/pr.ts
+++ b/src/tools/pr.ts
@@ -1,4 +1,4 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { getDefaultBranch } from '../lib/git';
import { getJobByName, type Job } from '../lib/job-state';
@@ -58,30 +58,17 @@ function buildDefaultBody(job: Job): string {
].join('\n');
}
-export const mc_pr: ToolDefinition = tool({
+export const mc_pr = {
+ name: 'mc_pr',
description: 'Create a pull request from a job\'s branch',
- args: {
- name: tool.schema
- .string()
- .describe('Job name'),
- title: tool.schema
- .string()
- .optional()
- .describe('PR title — use Conventional Commits format (e.g. "feat: add login", "fix: resolve timeout"). Defaults to job name.'),
- body: tool.schema
- .string()
- .optional()
- .describe('PR body (defaults to PR template or generated summary)'),
- draft: tool.schema
- .boolean()
- .optional()
- .describe('Create as draft PR'),
- baseBranch: tool.schema
- .string()
- .optional()
- .describe('Target branch for the PR (defaults to the job\'s base branch, or the repo default branch)'),
- },
- async execute(args) {
+ input: z.object({
+ name: z.string().describe('Job name'),
+ title: z.string().optional().describe('PR title — use Conventional Commits format (e.g. "feat: add login", "fix: resolve timeout"). Defaults to job name.'),
+ body: z.string().optional().describe('PR body (defaults to PR template or generated summary)'),
+ draft: z.boolean().optional().describe('Create as draft PR'),
+ baseBranch: z.string().optional().describe('Target branch for the PR (defaults to the job\'s base branch, or the repo default branch)'),
+ }).strict(),
+ async execute(args: { name: string; title?: string; body?: string; draft?: boolean; baseBranch?: string }) {
// 1. Get job by name
const job = await getJobByName(args.name);
if (!job) {
@@ -132,6 +119,6 @@ export const mc_pr: ToolDefinition = tool({
// 7. Execute gh pr create
const prUrl = await executeGhCommand(ghArgs);
- return prUrl;
+ return { content: prUrl };
},
-});
+};
diff --git a/src/tools/report.ts b/src/tools/report.ts
index 6acb4ca..ea27417 100644
--- a/src/tools/report.ts
+++ b/src/tools/report.ts
@@ -1,29 +1,21 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { isInManagedWorktree } from '../lib/worktree';
import { getJobByName, loadJobState } from '../lib/job-state';
import { writeReport, type ReportStatus } from '../lib/reports';
-export const mc_report: ToolDefinition = tool({
+export const mc_report = {
+ name: 'mc_report',
description:
'Report agent status back to Mission Control. Auto-detects which job is calling based on the current worktree.',
- args: {
- status: tool.schema
- .enum(['working', 'blocked', 'needs_review', 'completed', 'progress'])
- .describe(
- 'Current status: working (actively coding), blocked (waiting/stuck), needs_review (done but needs human review), completed (work finished successfully), progress (milestone update)',
- ),
- message: tool.schema
- .string()
- .describe('Human-readable status message'),
- progress: tool.schema
- .number()
- .min(0)
- .max(100)
- .optional()
- .describe('Completion percentage (0-100)'),
- },
- async execute(args) {
- const cwd = process.cwd();
+ input: z.object({
+ status: z.enum(['working', 'blocked', 'needs_review', 'completed', 'progress']).describe('Current status: working (actively coding), blocked (waiting/stuck), needs_review (done but needs human review), completed (work finished successfully), progress (milestone update)'),
+ message: z.string().describe('Human-readable status message'),
+ progress: z.number().min(0).max(100).optional().describe('Completion percentage (0-100)'),
+ }).strict(),
+ async execute(
+ args: { status: 'working' | 'blocked' | 'needs_review' | 'completed' | 'progress'; message: string; progress?: number },
+ cwd: string = process.env.MC_WORKTREE_PATH ?? process.cwd(),
+ ) {
const managed = await isInManagedWorktree(cwd);
if (!managed.isManaged || !managed.jobName) {
@@ -32,7 +24,7 @@ export const mc_report: ToolDefinition = tool({
);
}
- const state = await loadJobState();
+ const state = await loadJobState(cwd);
// Match only running jobs to avoid picking up stale entries from previous runs
// that share the same name/worktree path
const job = state.jobs.find(
@@ -59,10 +51,10 @@ export const mc_report: ToolDefinition = tool({
message: args.message,
progress: args.progress,
timestamp: new Date().toISOString(),
- });
+ }, cwd);
const progressSuffix =
args.progress !== undefined ? ` (${args.progress}%)` : '';
- return `Report submitted: [${args.status}]${progressSuffix} ${args.message}`;
+ return { content: `Report submitted: [${args.status}]${progressSuffix} ${args.message}` };
},
-});
+};
diff --git a/src/tools/status.ts b/src/tools/status.ts
index f9c196f..bb9e265 100644
--- a/src/tools/status.ts
+++ b/src/tools/status.ts
@@ -1,4 +1,4 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { getJobByName, type Job } from '../lib/job-state';
import { capturePane } from '../lib/tmux';
import { isInManagedWorktree } from '../lib/worktree';
@@ -50,12 +50,13 @@ async function getGitStatus(
-export const mc_status: ToolDefinition = tool({
+export const mc_status = {
+ name: 'mc_status',
description: 'Get detailed status of a specific job',
- args: {
- name: tool.schema.string().describe('Job name'),
- },
- async execute(args) {
+ input: z.object({
+ name: z.string().describe('Job name'),
+ }).strict(),
+ async execute(args: { name: string }) {
// 1. Find job by name
const job = await getJobByName(args.name);
if (!job) {
@@ -164,6 +165,6 @@ export const mc_status: ToolDefinition = tool({
'---',
];
- return lines.join('\n');
+ return { content: lines.join('\n') };
},
-});
+};
diff --git a/src/tools/sync.ts b/src/tools/sync.ts
index 41e23b9..c61a73f 100644
--- a/src/tools/sync.ts
+++ b/src/tools/sync.ts
@@ -1,21 +1,16 @@
-import { tool, type ToolDefinition } from '@opencode-ai/plugin';
+import { z } from 'zod';
import { getJobByName } from '../lib/job-state';
import { syncWorktree } from '../lib/worktree';
-export const mc_sync: ToolDefinition = tool({
+export const mc_sync = {
+ name: 'mc_sync',
description: 'Sync a job\'s branch with the base branch',
- args: {
- name: tool.schema.string().describe('Job name'),
- strategy: tool.schema
- .enum(['rebase', 'merge'])
- .optional()
- .describe('Sync strategy (default: rebase)'),
- source: tool.schema
- .enum(['local', 'origin'])
- .optional()
- .describe('Sync source: local base branch (default) or origin'),
- },
- async execute(args) {
+ input: z.object({
+ name: z.string().describe('Job name'),
+ strategy: z.enum(['rebase', 'merge']).optional().describe('Sync strategy (default: rebase)'),
+ source: z.enum(['local', 'origin']).optional().describe('Sync source: local base branch (default) or origin'),
+ }).strict(),
+ async execute(args: { name: string; strategy?: 'rebase' | 'merge'; source?: 'local' | 'origin' }) {
// 1. Find job by name
const job = await getJobByName(args.name);
if (!job) {
@@ -35,7 +30,7 @@ export const mc_sync: ToolDefinition = tool({
// 4. Format output
if (result.success) {
- return `Successfully synced job "${job.name}" using ${syncStrategy} strategy.`;
+ return { content: `Successfully synced job "${job.name}" using ${syncStrategy} strategy.` };
}
// Sync failed with conflicts
@@ -43,6 +38,6 @@ export const mc_sync: ToolDefinition = tool({
? result.conflicts.map((f) => ` - ${f}`).join('\n')
: ' (no conflict details available)';
- return `Sync failed for job "${job.name}" using ${syncStrategy} strategy.\n\nConflicts:\n${conflictList}\n\nResolve conflicts manually and try again.`;
+ return { content: `Sync failed for job "${job.name}" using ${syncStrategy} strategy.\n\nConflicts:\n${conflictList}\n\nResolve conflicts manually and try again.` };
},
-});
+};
diff --git a/src/tui.ts b/src/tui.ts
new file mode 100644
index 0000000..61358d8
--- /dev/null
+++ b/src/tui.ts
@@ -0,0 +1,37 @@
+import { Plugin as Tui } from '@opencode/plugin/tui';
+import { missionControlRpc, type ToastVariant } from './rpc';
+
+function toVariant(value: unknown): ToastVariant {
+ if (
+ value === 'info' ||
+ value === 'success' ||
+ value === 'warning' ||
+ value === 'error'
+ ) {
+ return value;
+ }
+ return 'info';
+}
+
+function toText(value: unknown): string {
+ return typeof value === 'string' ? value : '';
+}
+
+export default Tui.define({
+ id: 'opencode-mission-control-tui',
+ setup(ctx) {
+ const rpc = ctx.client.rpc(missionControlRpc);
+ const unsubscribe = rpc.events.on('toast', (event) => {
+ const data = event.data;
+ ctx.ui.toast.show({
+ title: toText(data.title) || 'Mission Control',
+ message: toText(data.message),
+ variant: toVariant(data.variant),
+ duration: typeof data.duration === 'number' ? data.duration : 5000,
+ });
+ });
+ return () => {
+ unsubscribe();
+ };
+ },
+});
diff --git a/tests/hooks/notifications.test.ts b/tests/hooks/notifications.test.ts
index 078722c..a355819 100644
--- a/tests/hooks/notifications.test.ts
+++ b/tests/hooks/notifications.test.ts
@@ -14,6 +14,10 @@ vi.mock('../../src/lib/reports', () => ({
readReport: vi.fn().mockResolvedValue(null),
}));
+vi.mock('../../src/rpc', () => ({
+ showToast: vi.fn(async () => {}),
+}));
+
describe('notifications hook', () => {
let mockMonitor: {
handlers: Map void)[]>;
@@ -22,6 +26,7 @@ describe('notifications hook', () => {
let mockClient: {
session: {
prompt: ReturnType;
+ synthetic: ReturnType;
get: ReturnType;
update: ReturnType;
};
@@ -46,7 +51,8 @@ describe('notifications hook', () => {
mockClient = {
session: {
prompt: vi.fn().mockResolvedValue(undefined),
- get: vi.fn().mockResolvedValue({ data: { title: 'Original Title' } }),
+ synthetic: vi.fn().mockResolvedValue(undefined),
+ get: vi.fn().mockResolvedValue({ title: 'Original Title' }),
update: vi.fn().mockResolvedValue(undefined),
},
};
@@ -100,10 +106,10 @@ describe('notifications hook', () => {
await new Promise((resolve) => setTimeout(resolve, 50));
- expect(mockClient.session.prompt).toHaveBeenCalled();
- const callArgs = mockClient.session.prompt.mock.calls[0][0];
- expect(callArgs.body.parts[0].text).toContain("🟢 Job 'feature-auth' completed");
- expect(callArgs.body.parts[0].text).toContain('mc/feature-auth');
+ expect(mockClient.session.synthetic).toHaveBeenCalled();
+ const callArgs = mockClient.session.synthetic.mock.calls[0][0];
+ expect(callArgs.text).toContain("🟢 Job 'feature-auth' completed");
+ expect(callArgs.text).toContain('mc/feature-auth');
});
it('should send notification on job failure', async () => {
@@ -135,10 +141,10 @@ describe('notifications hook', () => {
// Give async handler time to complete
await new Promise((resolve) => setTimeout(resolve, 50));
- expect(mockClient.session.prompt).toHaveBeenCalled();
- const callArgs = mockClient.session.prompt.mock.calls[0][0];
- expect(callArgs.body.parts[0].text).toContain("🔴 Job 'fix-bug-123' failed");
- expect(callArgs.body.parts[0].text).toContain('mc/fix-bug-123');
+ expect(mockClient.session.synthetic).toHaveBeenCalled();
+ const callArgs = mockClient.session.synthetic.mock.calls[0][0];
+ expect(callArgs.text).toContain("🔴 Job 'fix-bug-123' failed");
+ expect(callArgs.text).toContain('mc/fix-bug-123');
});
it('should deduplicate notifications for the same job event', async () => {
@@ -169,13 +175,13 @@ describe('notifications hook', () => {
await new Promise((resolve) => setTimeout(resolve, 50));
- const firstCallCount = mockClient.session.prompt.mock.calls.length;
+ const firstCallCount = mockClient.session.synthetic.mock.calls.length;
handlers[0](job);
await new Promise((resolve) => setTimeout(resolve, 50));
- const secondCallCount = mockClient.session.prompt.mock.calls.length;
+ const secondCallCount = mockClient.session.synthetic.mock.calls.length;
expect(firstCallCount).toBe(1);
expect(secondCallCount).toBe(1);
@@ -210,7 +216,7 @@ describe('notifications hook', () => {
await new Promise((resolve) => setTimeout(resolve, 50));
- expect(mockClient.session.prompt).not.toHaveBeenCalled();
+ expect(mockClient.session.synthetic).not.toHaveBeenCalled();
});
it('should send notification on blocked event', async () => {
@@ -239,9 +245,9 @@ describe('notifications hook', () => {
await new Promise((resolve) => setTimeout(resolve, 50));
- expect(mockClient.session.prompt).toHaveBeenCalled();
- const callArgs = mockClient.session.prompt.mock.calls[0][0];
- expect(callArgs.body.parts[0].text).toContain("⚠️ Job 'blocked-task' is blocked");
+ expect(mockClient.session.synthetic).toHaveBeenCalled();
+ const callArgs = mockClient.session.synthetic.mock.calls[0][0];
+ expect(callArgs.text).toContain("⚠️ Job 'blocked-task' is blocked");
});
it('should send notification on needs_review event', async () => {
@@ -270,9 +276,9 @@ describe('notifications hook', () => {
await new Promise((resolve) => setTimeout(resolve, 50));
- expect(mockClient.session.prompt).toHaveBeenCalled();
- const callArgs = mockClient.session.prompt.mock.calls[0][0];
- expect(callArgs.body.parts[0].text).toContain("👀 Job 'review-task' needs review");
+ expect(mockClient.session.synthetic).toHaveBeenCalled();
+ const callArgs = mockClient.session.synthetic.mock.calls[0][0];
+ expect(callArgs.text).toContain("👀 Job 'review-task' needs review");
});
it('should route notification to launchSessionID when present', async () => {
@@ -303,10 +309,10 @@ describe('notifications hook', () => {
await new Promise((resolve) => setTimeout(resolve, 50));
- expect(mockClient.session.prompt).toHaveBeenCalled();
- const callArgs = mockClient.session.prompt.mock.calls[0][0];
- expect(callArgs.path.id).toBe('ses_launch_abc');
- expect(callArgs.body.parts[0].text).toContain("🟢 Job 'routed-job' completed");
+ expect(mockClient.session.synthetic).toHaveBeenCalled();
+ const callArgs = mockClient.session.synthetic.mock.calls[0][0];
+ expect(callArgs.sessionID).toBe('ses_launch_abc');
+ expect(callArgs.text).toContain("🟢 Job 'routed-job' completed");
});
it('should fallback to activeSessionID when launchSessionID is undefined', async () => {
@@ -338,9 +344,9 @@ describe('notifications hook', () => {
await new Promise((resolve) => setTimeout(resolve, 50));
- expect(mockClient.session.prompt).toHaveBeenCalled();
- const callArgs = mockClient.session.prompt.mock.calls[0][0];
- expect(callArgs.path.id).toBe('ses_active_456');
+ expect(mockClient.session.synthetic).toHaveBeenCalled();
+ const callArgs = mockClient.session.synthetic.mock.calls[0][0];
+ expect(callArgs.sessionID).toBe('ses_active_456');
});
it('should not send notification when launchSessionID is invalid', async () => {
@@ -373,7 +379,7 @@ describe('notifications hook', () => {
await new Promise((resolve) => setTimeout(resolve, 50));
- expect(mockClient.session.prompt).not.toHaveBeenCalled();
+ expect(mockClient.session.synthetic).not.toHaveBeenCalled();
});
@@ -405,8 +411,8 @@ describe('notifications hook', () => {
await new Promise((resolve) => setTimeout(resolve, 50));
expect(mockClient.session.update).toHaveBeenCalledWith({
- path: { id: 'ses_launcher' },
- body: { title: '✅ Original Title' },
+ sessionID: 'ses_launcher',
+ title: '✅ Original Title',
});
});
@@ -437,8 +443,8 @@ describe('notifications hook', () => {
await new Promise((resolve) => setTimeout(resolve, 50));
expect(mockClient.session.update).toHaveBeenCalledWith({
- path: { id: 'ses_launcher' },
- body: { title: '❌ Original Title' },
+ sessionID: 'ses_launcher',
+ title: '❌ Original Title',
});
});
@@ -468,8 +474,8 @@ describe('notifications hook', () => {
await new Promise((resolve) => setTimeout(resolve, 50));
expect(mockClient.session.update).toHaveBeenCalledWith({
- path: { id: 'ses_launcher' },
- body: { title: '❓ Original Title' },
+ sessionID: 'ses_launcher',
+ title: '❓ Original Title',
});
});
@@ -520,8 +526,8 @@ describe('notifications hook', () => {
const calls = mockClient.session.update.mock.calls;
const lastCall = calls[calls.length - 1][0];
expect(lastCall).toEqual({
- path: { id: 'ses_launcher' },
- body: { title: '🔔 Original Title' },
+ sessionID: 'ses_launcher',
+ title: '🔔 Original Title',
});
});
@@ -551,8 +557,8 @@ describe('notifications hook', () => {
await new Promise((resolve) => setTimeout(resolve, 50));
expect(mockClient.session.update).toHaveBeenCalledWith({
- path: { id: 'ses_launcher' },
- body: { title: '🚧 Original Title' },
+ sessionID: 'ses_launcher',
+ title: '🚧 Original Title',
});
});
@@ -591,7 +597,7 @@ describe('notifications hook', () => {
await annotateSessionTitle(mockClient as any, 'ses_test', 'job-b', 'failed');
expect(mockClient.session.get).toHaveBeenCalledTimes(1);
- expect(mockClient.session.get).toHaveBeenCalledWith({ path: { id: 'ses_test' } });
+ expect(mockClient.session.get).toHaveBeenCalledWith({ sessionID: 'ses_test' });
});
});
@@ -603,8 +609,8 @@ describe('notifications hook', () => {
await resetSessionTitle(mockClient as any, 'ses_reset');
expect(mockClient.session.update).toHaveBeenLastCalledWith({
- path: { id: 'ses_reset' },
- body: { title: 'Original Title' },
+ sessionID: 'ses_reset',
+ title: 'Original Title',
});
expect(hasAnnotation('ses_reset')).toBe(false);
});
@@ -637,10 +643,10 @@ describe('notifications hook', () => {
it('should prefix session title with [MC] on first call', async () => {
await ensureMCPrefix(mockClient as any, 'ses_mc1');
- expect(mockClient.session.get).toHaveBeenCalledWith({ path: { id: 'ses_mc1' } });
+ expect(mockClient.session.get).toHaveBeenCalledWith({ sessionID: 'ses_mc1' });
expect(mockClient.session.update).toHaveBeenCalledWith({
- path: { id: 'ses_mc1' },
- body: { title: '[MC] Original Title' },
+ sessionID: 'ses_mc1',
+ title: '[MC] Original Title',
});
});
@@ -666,7 +672,7 @@ describe('notifications hook', () => {
});
it('should not double-prefix when title already starts with [MC]', async () => {
- mockClient.session.get.mockResolvedValueOnce({ data: { title: '[MC] Already Prefixed' } });
+ mockClient.session.get.mockResolvedValueOnce({ title: '[MC] Already Prefixed' });
await ensureMCPrefix(mockClient as any, 'ses_mc3');
expect(mockClient.session.update).not.toHaveBeenCalled();
@@ -679,8 +685,8 @@ describe('notifications hook', () => {
await annotateSessionTitle(mockClient as any, 'ses_mc4', 'my-job', 'complete');
expect(mockClient.session.update).toHaveBeenCalledWith({
- path: { id: 'ses_mc4' },
- body: { title: '[MC] \u2705 Original Title' },
+ sessionID: 'ses_mc4',
+ title: '[MC] \u2705 Original Title',
});
});
@@ -694,8 +700,8 @@ describe('notifications hook', () => {
const calls = mockClient.session.update.mock.calls;
const lastCall = calls[calls.length - 1][0];
expect(lastCall).toEqual({
- path: { id: 'ses_mc5' },
- body: { title: '[MC] \uD83D\uDD14 Original Title' },
+ sessionID: 'ses_mc5',
+ title: '[MC] \uD83D\uDD14 Original Title',
});
});
@@ -707,8 +713,8 @@ describe('notifications hook', () => {
await resetSessionTitle(mockClient as any, 'ses_mc6');
expect(mockClient.session.update).toHaveBeenCalledWith({
- path: { id: 'ses_mc6' },
- body: { title: '[MC] Original Title' },
+ sessionID: 'ses_mc6',
+ title: '[MC] Original Title',
});
});
@@ -719,13 +725,13 @@ describe('notifications hook', () => {
await ensureMCPrefix(mockClient as any, 'ses_mc7');
expect(mockClient.session.update).toHaveBeenCalledWith({
- path: { id: 'ses_mc7' },
- body: { title: '[MC] \u274C Original Title' },
+ sessionID: 'ses_mc7',
+ title: '[MC] \u274C Original Title',
});
});
it('should strip [MC] from fetched title when storing originalTitle', async () => {
- mockClient.session.get.mockResolvedValue({ data: { title: '[MC] My Session' } });
+ mockClient.session.get.mockResolvedValue({ title: '[MC] My Session' });
await annotateSessionTitle(mockClient as any, 'ses_mc8', 'my-job', 'complete');
diff --git a/tests/integration/z-workflows.test.ts b/tests/integration/z-workflows.test.ts
index 5cc8681..92a4966 100644
--- a/tests/integration/z-workflows.test.ts
+++ b/tests/integration/z-workflows.test.ts
@@ -251,7 +251,7 @@ describe('Workflow 1: Basic lifecycle (Launch -> Status -> Capture -> Kill -> Cl
mockContext,
);
- expect(launchResult).toContain('Job "auth-job" launched successfully');
+ expect(launchResult.content).toContain('Job "auth-job" launched successfully');
expect(mockCreateWorktree).toHaveBeenCalledWith({
branch: 'mc/auth-job',
postCreate: expect.objectContaining({
@@ -277,10 +277,10 @@ describe('Workflow 1: Basic lifecycle (Launch -> Status -> Capture -> Kill -> Cl
mockContext,
);
- expect(statusResult).toContain('Job: auth-job');
- expect(statusResult).toContain('Status: running');
- expect(statusResult).toContain('Branch: mc/auth-job');
- expect(statusResult).toContain('Mode: vanilla');
+ expect(statusResult.content).toContain('Job: auth-job');
+ expect(statusResult.content).toContain('Status: running');
+ expect(statusResult.content).toContain('Branch: mc/auth-job');
+ expect(statusResult.content).toContain('Mode: vanilla');
// ---- Step 3: Capture output ----
const captureResult = await mc_capture.execute(
@@ -288,8 +288,8 @@ describe('Workflow 1: Basic lifecycle (Launch -> Status -> Capture -> Kill -> Cl
mockContext,
);
- expect(captureResult).toContain('Working on task');
- expect(captureResult).toContain('Tests passing');
+ expect(captureResult.content).toContain('Working on task');
+ expect(captureResult.content).toContain('Tests passing');
expect(mockCapturePane).toHaveBeenCalledWith('mc-auth-job', 50);
// ---- Step 4: Kill the job ----
@@ -298,7 +298,7 @@ describe('Workflow 1: Basic lifecycle (Launch -> Status -> Capture -> Kill -> Cl
mockContext,
);
- expect(killResult).toContain('Job "auth-job" stopped successfully');
+ expect(killResult.content).toContain('Job "auth-job" stopped successfully');
expect(mockKillSession).toHaveBeenCalledWith('mc-auth-job');
// Verify job is now stopped in state
@@ -312,7 +312,7 @@ describe('Workflow 1: Basic lifecycle (Launch -> Status -> Capture -> Kill -> Cl
mockContext,
);
- expect(cleanupResult).toContain('Cleaned up job "auth-job"');
+ expect(cleanupResult.content).toContain('Cleaned up job "auth-job"');
expect(mockRemoveWorktree).toHaveBeenCalledWith(
'/tmp/mc-worktrees/mc-auth-job',
true,
@@ -335,7 +335,7 @@ describe('Workflow 1: Basic lifecycle (Launch -> Status -> Capture -> Kill -> Cl
{ name: 'tracking-test' },
mockContext,
);
- expect(status1).toContain('Status: running');
+ expect(status1.content).toContain('Status: running');
// Kill
await mc_kill.execute({ name: 'tracking-test' }, mockContext);
@@ -345,7 +345,7 @@ describe('Workflow 1: Basic lifecycle (Launch -> Status -> Capture -> Kill -> Cl
{ name: 'tracking-test' },
mockContext,
);
- expect(status2).toContain('Status: stopped');
+ expect(status2.content).toContain('Status: stopped');
});
it('should prevent duplicate job names across lifecycle', async () => {
@@ -372,7 +372,7 @@ describe('Workflow 1: Basic lifecycle (Launch -> Status -> Capture -> Kill -> Cl
{ name: 'unique-job', prompt: 'Second launch' },
mockContext,
);
- expect(result).toContain('Job "unique-job" launched successfully');
+ expect(result.content).toContain('Job "unique-job" launched successfully');
});
it('should not cleanup a running job', async () => {
@@ -431,8 +431,8 @@ describe('Workflow 2: OMO mode launch with plans', () => {
mockContext,
);
- expect(result).toContain('Job "plan-job" launched successfully');
- expect(result).toContain('Mode: plan');
+ expect(result.content).toContain('Job "plan-job" launched successfully');
+ expect(result.content).toContain('Mode: plan');
// Verify OMO detection was called
expect(mockDetectOMO).toHaveBeenCalled();
@@ -461,7 +461,7 @@ describe('Workflow 2: OMO mode launch with plans', () => {
mockContext,
);
- expect(result).toContain('Job "ralph-job" launched successfully');
+ expect(result.content).toContain('Job "ralph-job" launched successfully');
expect(mockDetectOMO).toHaveBeenCalled();
expect(mockCopyPlans).toHaveBeenCalled();
@@ -481,7 +481,7 @@ describe('Workflow 2: OMO mode launch with plans', () => {
mockContext,
);
- expect(result).toContain('Job "ulw-job" launched successfully');
+ expect(result.content).toContain('Job "ulw-job" launched successfully');
expect(mockDetectOMO).toHaveBeenCalled();
expect(mockCopyPlans).toHaveBeenCalled();
@@ -532,7 +532,7 @@ describe('Workflow 2: OMO mode launch with plans', () => {
mockContext,
);
- expect(result).toContain('Job "no-plans" launched successfully');
+ expect(result.content).toContain('Job "no-plans" launched successfully');
});
it('should verify full OMO lifecycle: launch with plan -> status -> kill -> cleanup', async () => {
@@ -560,7 +560,7 @@ describe('Workflow 2: OMO mode launch with plans', () => {
{ name: 'omo-lifecycle' },
mockContext,
);
- expect(status).toContain('Mode: plan');
+ expect(status.content).toContain('Mode: plan');
// Kill
await mc_kill.execute({ name: 'omo-lifecycle' }, mockContext);
@@ -570,7 +570,7 @@ describe('Workflow 2: OMO mode launch with plans', () => {
{ name: 'omo-lifecycle' },
mockContext,
);
- expect(cleanup).toContain('Cleaned up job "omo-lifecycle"');
+ expect(cleanup.content).toContain('Cleaned up job "omo-lifecycle"');
expect(getJobs()).toHaveLength(0);
});
});
@@ -608,7 +608,7 @@ describe('Workflow 3: Launch -> PR -> Cleanup', () => {
{ name: 'pr-job', prompt: 'Add new feature for PR' },
mockContext,
);
- expect(launchResult).toContain('Job "pr-job" launched successfully');
+ expect(launchResult.content).toContain('Job "pr-job" launched successfully');
// Verify job branch was set
const jobs = getJobs();
@@ -696,7 +696,7 @@ describe('Workflow 3: Launch -> PR -> Cleanup', () => {
{ name: 'full-pr-flow' },
mockContext,
);
- expect(cleanupResult).toContain('Cleaned up job "full-pr-flow"');
+ expect(cleanupResult.content).toContain('Cleaned up job "full-pr-flow"');
expect(getJobs()).toHaveLength(0);
});
});
@@ -776,10 +776,10 @@ describe('Workflow 4: Multiple jobs in parallel', () => {
const jobsResult = await mc_jobs.execute({}, mockContext);
- expect(jobsResult).toContain('Mission Control Jobs');
- expect(jobsResult).toContain('list-job-1');
- expect(jobsResult).toContain('list-job-2');
- expect(jobsResult).toContain('Running (2)');
+ expect(jobsResult.content).toContain('Mission Control Jobs');
+ expect(jobsResult.content).toContain('list-job-1');
+ expect(jobsResult.content).toContain('list-job-2');
+ expect(jobsResult.content).toContain('Running (2)');
});
it('should independently manage job statuses', async () => {
@@ -829,10 +829,10 @@ describe('Workflow 4: Multiple jobs in parallel', () => {
mockContext,
);
- expect(status1).toContain('Job: status-job-1');
- expect(status1).toContain('Branch: mc/status-job-1');
- expect(status2).toContain('Job: status-job-2');
- expect(status2).toContain('Branch: mc/status-job-2');
+ expect(status1.content).toContain('Job: status-job-1');
+ expect(status1.content).toContain('Branch: mc/status-job-1');
+ expect(status2.content).toContain('Job: status-job-2');
+ expect(status2.content).toContain('Branch: mc/status-job-2');
});
it('should capture output from specific jobs', async () => {
@@ -861,8 +861,8 @@ describe('Workflow 4: Multiple jobs in parallel', () => {
mockContext,
);
- expect(outputA).toContain('Output from job A');
- expect(outputB).toContain('Output from job B');
+ expect(outputA.content).toContain('Output from job A');
+ expect(outputB.content).toContain('Output from job B');
});
it('should cleanup all non-running jobs at once', async () => {
@@ -890,9 +890,9 @@ describe('Workflow 4: Multiple jobs in parallel', () => {
mockContext,
);
- expect(cleanupResult).toContain('Cleaned up job "batch-1"');
- expect(cleanupResult).toContain('Cleaned up job "batch-3"');
- expect(cleanupResult).toContain('2 cleaned');
+ expect(cleanupResult.content).toContain('Cleaned up job "batch-1"');
+ expect(cleanupResult.content).toContain('Cleaned up job "batch-3"');
+ expect(cleanupResult.content).toContain('2 cleaned');
// Only running job should remain
const remainingJobs = getJobs();
@@ -921,7 +921,7 @@ describe('Workflow 4: Multiple jobs in parallel', () => {
// All launches should succeed
expect(launches).toHaveLength(3);
launches.forEach((result) => {
- expect(result).toContain('launched successfully');
+ expect(result.content).toContain('launched successfully');
});
// All jobs should be tracked
@@ -948,8 +948,8 @@ describe('Workflow 4: Multiple jobs in parallel', () => {
{ status: 'running' },
mockContext,
);
- expect(runningResult).toContain('filter-running');
- expect(runningResult).not.toContain('filter-stopped');
+ expect(runningResult.content).toContain('filter-running');
+ expect(runningResult.content).not.toContain('filter-stopped');
});
it('should kill and cleanup all jobs sequentially', async () => {
@@ -969,7 +969,7 @@ describe('Workflow 4: Multiple jobs in parallel', () => {
// Cleanup all
const result = await mc_cleanup.execute({ all: true }, mockContext);
- expect(result).toContain('3 cleaned');
+ expect(result.content).toContain('3 cleaned');
expect(getJobs()).toHaveLength(0);
});
});
diff --git a/tests/lib/orchestrator-modes.test.ts b/tests/lib/orchestrator-modes.test.ts
index 2e90cb8..72b46bb 100644
--- a/tests/lib/orchestrator-modes.test.ts
+++ b/tests/lib/orchestrator-modes.test.ts
@@ -88,6 +88,10 @@ describe('orchestrator modes', () => {
if (updates.checkpointContext !== undefined) planState.checkpointContext = updates.checkpointContext;
if (updates.completedAt !== undefined) planState.completedAt = updates.completedAt;
if (updates.prUrl !== undefined) planState.prUrl = updates.prUrl;
+ if (updates.approvedMergeJobs !== undefined) {
+ planState.approvedMergeJobs = updates.approvedMergeJobs;
+ }
+ if (updates.approvedPrePr !== undefined) planState.approvedPrePr = updates.approvedPrePr;
},
);
spyOn(planStateMod, 'clearPlan').mockImplementation(async () => {
@@ -448,6 +452,60 @@ describe('orchestrator modes', () => {
expect(mergeJob?.status).toBe('merged');
});
+ it('honors persisted approvedMergeJobs from a previous process', async () => {
+ planState = makePlan({
+ mode: 'supervisor',
+ status: 'running',
+ approvedMergeJobs: ['merge-me'],
+ jobs: [
+ makeJob('merge-me', { status: 'completed', mergeOrder: 0, branch: 'mc/merge-me' }),
+ ],
+ });
+
+ const fakeTrain = {
+ queue: [] as JobSpec[],
+ enqueue(job: JobSpec) {
+ this.queue.push(job);
+ },
+ getQueue() {
+ return [...this.queue];
+ },
+ async processNext() {
+ this.queue.shift();
+ return { success: true, mergedAt: '2026-01-02T00:00:00.000Z' };
+ },
+ };
+
+ const orchestrator = new Orchestrator(monitor as any, DEFAULT_CONFIG as any, toastCallback);
+ (orchestrator as any).mergeTrain = fakeTrain;
+
+ await (orchestrator as any).reconcile();
+
+ expect(orchestrator.getCheckpoint()).not.toBe('pre_merge');
+ expect(planState?.jobs.find((j) => j.name === 'merge-me')?.status).toBe('merged');
+ expect(planState?.approvedMergeJobs).toEqual([]);
+ });
+
+ it('honors persisted approvedPrePr from a previous process', async () => {
+ planState = makePlan({
+ mode: 'supervisor',
+ status: 'running',
+ approvedPrePr: true,
+ jobs: [makeJob('done', { status: 'merged', mergeOrder: 0 })],
+ });
+
+ const orchestrator = new Orchestrator(monitor as any, DEFAULT_CONFIG as any, toastCallback);
+ const createPRSpy = spyOn(orchestrator as any, 'createPR').mockResolvedValue(
+ 'https://example.com/pr/1',
+ );
+
+ await (orchestrator as any).reconcile();
+
+ expect(createPRSpy).toHaveBeenCalled();
+ expect(planState?.status).toBe('completed');
+ expect(planState?.approvedPrePr).toBe(false);
+ });
+
it('sends checkpoint toast notifications', async () => {
planState = makePlan({
mode: 'supervisor',
diff --git a/tests/lib/question-relay-forms.test.ts b/tests/lib/question-relay-forms.test.ts
new file mode 100644
index 0000000..507f258
--- /dev/null
+++ b/tests/lib/question-relay-forms.test.ts
@@ -0,0 +1,119 @@
+import { describe, it, expect } from 'bun:test';
+import type { FormField, FormInfo } from '@opencode/client';
+import { buildFormAnswer, findQuestionForm } from '../../src/lib/question-relay';
+
+function makeForm(overrides: Partial = {}): FormInfo {
+ return {
+ id: 'frm_1',
+ sessionID: 'ses_1',
+ title: 'Questions',
+ metadata: {},
+ fields: [],
+ ...overrides,
+ };
+}
+
+const stringField: FormField = {
+ key: 'q0',
+ title: 'Color',
+ description: 'Which color?',
+ type: 'string',
+ options: [
+ { value: 'red', label: 'Red' },
+ { value: 'blue', label: 'Blue' },
+ ],
+ custom: true,
+};
+
+describe('findQuestionForm', () => {
+ it('matches the form whose metadata tool id equals the question part id', () => {
+ const matching = makeForm({ id: 'frm_match', metadata: { tool: { id: 'call-1' } } });
+ const other = makeForm({ id: 'frm_other', metadata: { tool: { id: 'call-2' } } });
+
+ expect(findQuestionForm([other, matching], 'call-1')?.id).toBe('frm_match');
+ });
+
+ it('falls back to the single form marked as a question', () => {
+ const question = makeForm({ id: 'frm_question', metadata: { kind: 'question' } });
+
+ expect(findQuestionForm([question], 'missing-call')?.id).toBe('frm_question');
+ });
+
+ it('returns undefined when no exact match and multiple question forms exist', () => {
+ const first = makeForm({ id: 'frm_1', metadata: { kind: 'question' } });
+ const second = makeForm({ id: 'frm_2', metadata: { kind: 'question' } });
+
+ expect(findQuestionForm([first, second], 'missing-call')).toBeUndefined();
+ });
+
+ it('returns undefined when the only form is not a question', () => {
+ const form = makeForm({ id: 'frm_1', metadata: { kind: 'other' } });
+
+ expect(findQuestionForm([form], 'missing-call')).toBeUndefined();
+ });
+});
+
+describe('buildFormAnswer', () => {
+ it('uses the whole response for a single field', () => {
+ expect(buildFormAnswer([stringField], 'blue')).toEqual({ q0: 'blue' });
+ });
+
+ it('matches an option by value or label case-insensitively', () => {
+ expect(buildFormAnswer([stringField], 'BLUE')).toEqual({ q0: 'blue' });
+ expect(buildFormAnswer([stringField], 'Red')).toEqual({ q0: 'red' });
+ });
+
+ it('keeps free text when no option matches', () => {
+ expect(buildFormAnswer([stringField], 'green')).toEqual({ q0: 'green' });
+ });
+
+ it('coerces boolean fields', () => {
+ const field: FormField = { key: 'ok', type: 'boolean' };
+
+ expect(buildFormAnswer([field], 'yes')).toEqual({ ok: true });
+ expect(buildFormAnswer([field], 'no')).toEqual({ ok: false });
+ });
+
+ it('coerces number and integer fields', () => {
+ expect(buildFormAnswer([{ key: 'n', type: 'number' }], '3.5')).toEqual({ n: 3.5 });
+ expect(buildFormAnswer([{ key: 'i', type: 'integer' }], '7')).toEqual({ i: 7 });
+ });
+
+ it('keeps the raw value when a numeric field is not finite', () => {
+ expect(buildFormAnswer([{ key: 'n', type: 'number' }], 'many')).toEqual({ n: 'many' });
+ });
+
+ it('splits multiselect answers and maps them to option values', () => {
+ const field: FormField = {
+ key: 'colors',
+ type: 'multiselect',
+ options: [
+ { value: 'r', label: 'Red' },
+ { value: 'b', label: 'Blue' },
+ ],
+ };
+
+ expect(buildFormAnswer([field], 'Red, blue')).toEqual({ colors: ['r', 'b'] });
+ });
+
+ it('maps one line per field when there are multiple fields', () => {
+ const fields: FormField[] = [
+ { key: 'first', type: 'string' },
+ { key: 'second', type: 'string' },
+ ];
+
+ expect(buildFormAnswer(fields, 'hello\nworld')).toEqual({
+ first: 'hello',
+ second: 'world',
+ });
+ });
+
+ it('uses the first line for the first field when there are fewer lines than fields', () => {
+ const fields: FormField[] = [
+ { key: 'first', type: 'string' },
+ { key: 'second', type: 'string' },
+ ];
+
+ expect(buildFormAnswer(fields, 'only')).toEqual({ first: 'only', second: '' });
+ });
+});
diff --git a/tests/lib/sdk-client.test.ts b/tests/lib/sdk-client.test.ts
index 489562f..dc0796a 100644
--- a/tests/lib/sdk-client.test.ts
+++ b/tests/lib/sdk-client.test.ts
@@ -1,277 +1,289 @@
-import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest';
+import { vi, describe, it, expect, beforeEach } from 'vitest';
+import type { OpencodeClient } from '../../src/lib/sdk-client';
const mockSessionList = vi.fn();
const mockSessionCreate = vi.fn();
-const mockSessionPromptAsync = vi.fn();
+const mockSessionGet = vi.fn();
const mockSessionFork = vi.fn();
+const mockSessionPrompt = vi.fn();
+const mockSessionSwitchAgent = vi.fn();
+const mockSessionSwitchModel = vi.fn();
const mockClient = {
session: {
list: mockSessionList,
create: mockSessionCreate,
- promptAsync: mockSessionPromptAsync,
+ get: mockSessionGet,
fork: mockSessionFork,
+ prompt: mockSessionPrompt,
+ switchAgent: mockSessionSwitchAgent,
+ switchModel: mockSessionSwitchModel,
},
};
-vi.mock('@opencode-ai/sdk', () => ({
- createOpencodeClient: vi.fn(() => mockClient),
+vi.mock('@opencode/client', () => ({
+ OpenCode: { make: vi.fn(() => mockClient) },
}));
-const sdk = await import('@opencode-ai/sdk');
+const mod = await import('@opencode/client');
const { createJobClient, waitForServer, sendPrompt, createSessionAndPrompt, forkJobSession } = await import('../../src/lib/sdk-client');
+const asClient = (client: typeof mockClient): OpencodeClient =>
+ client as unknown as OpencodeClient;
+
describe('sdk-client', () => {
beforeEach(() => {
vi.clearAllMocks();
});
describe('createJobClient', () => {
- it('should create client with correct baseUrl', () => {
+ it('should create client with correct baseUrl and empty headers', () => {
createJobClient(14100);
- expect(sdk.createOpencodeClient).toHaveBeenCalledWith(
- expect.objectContaining({
- baseUrl: 'http://127.0.0.1:14100',
- }),
- );
+ expect(mod.OpenCode.make).toHaveBeenCalledWith({
+ baseUrl: 'http://127.0.0.1:14100',
+ headers: {},
+ });
});
it('should add auth header when password provided', () => {
createJobClient(14100, 'secret');
const expectedAuth = 'Basic ' + Buffer.from('opencode:secret').toString('base64');
- expect(sdk.createOpencodeClient).toHaveBeenCalledWith(
- expect.objectContaining({
- headers: { Authorization: expectedAuth },
- }),
- );
- });
-
- it('should not include auth header when no password', () => {
- createJobClient(14100);
-
- expect(sdk.createOpencodeClient).toHaveBeenCalledWith(
- expect.objectContaining({
- headers: {},
- }),
- );
+ expect(mod.OpenCode.make).toHaveBeenCalledWith({
+ baseUrl: 'http://127.0.0.1:14100',
+ headers: { Authorization: expectedAuth },
+ });
});
});
describe('waitForServer', () => {
it('should return client when server responds immediately', async () => {
- mockSessionList.mockResolvedValue({ data: [] });
+ mockSessionList.mockResolvedValue({ data: [], cursor: {} });
const client = await waitForServer(14100);
- expect(client).toBeDefined();
+ expect(client).toBe(mockClient);
expect(client.session).toBeDefined();
+ expect(mockSessionList).toHaveBeenCalledTimes(1);
});
it('should retry until server responds', async () => {
mockSessionList
.mockRejectedValueOnce(new Error('ECONNREFUSED'))
.mockRejectedValueOnce(new Error('ECONNREFUSED'))
- .mockResolvedValueOnce({ data: [] });
+ .mockResolvedValueOnce({ data: [], cursor: {} });
const client = await waitForServer(14100);
- expect(client).toBeDefined();
+ expect(client).toBe(mockClient);
expect(mockSessionList).toHaveBeenCalledTimes(3);
});
- it('should throw on timeout', async () => {
+ it('should throw exact timeout error', async () => {
mockSessionList.mockRejectedValue(new Error('ECONNREFUSED'));
await expect(
waitForServer(14100, { timeoutMs: 500 }),
- ).rejects.toThrow('did not become ready within 500ms');
+ ).rejects.toThrow('Server on port 14100 did not become ready within 500ms');
});
- it('should pass password to client', async () => {
- mockSessionList.mockResolvedValue({ data: [] });
+ it('should forward password to createJobClient', async () => {
+ mockSessionList.mockResolvedValue({ data: [], cursor: {} });
await waitForServer(14100, { password: 'secret' });
const expectedAuth = 'Basic ' + Buffer.from('opencode:secret').toString('base64');
- expect(sdk.createOpencodeClient).toHaveBeenCalledWith(
- expect.objectContaining({
- headers: { Authorization: expectedAuth },
- }),
- );
+ expect(mod.OpenCode.make).toHaveBeenCalledWith({
+ baseUrl: 'http://127.0.0.1:14100',
+ headers: { Authorization: expectedAuth },
+ });
});
});
describe('sendPrompt', () => {
- it('should call promptAsync with correct parameters', async () => {
- mockSessionPromptAsync.mockResolvedValue({ data: {} });
+ it('should call prompt with sessionID and text only', async () => {
+ mockSessionPrompt.mockResolvedValue({});
- await sendPrompt(mockClient as any, 'session-1', 'Hello');
+ await sendPrompt(asClient(mockClient), 'session-1', 'Hello');
- expect(mockSessionPromptAsync).toHaveBeenCalledWith({
- path: { id: 'session-1' },
- body: {
- parts: [{ type: 'text', text: 'Hello' }],
- },
+ expect(mockSessionSwitchAgent).not.toHaveBeenCalled();
+ expect(mockSessionSwitchModel).not.toHaveBeenCalled();
+ expect(mockSessionPrompt).toHaveBeenCalledWith({
+ sessionID: 'session-1',
+ text: 'Hello',
});
});
- it('should include agent when provided', async () => {
- mockSessionPromptAsync.mockResolvedValue({ data: {} });
+ it('should switch agent when provided', async () => {
+ mockSessionSwitchAgent.mockResolvedValue(undefined);
+ mockSessionPrompt.mockResolvedValue({});
- await sendPrompt(mockClient as any, 'session-1', 'Hello', 'build');
+ await sendPrompt(asClient(mockClient), 'session-1', 'Hello', 'build');
- expect(mockSessionPromptAsync).toHaveBeenCalledWith({
- path: { id: 'session-1' },
- body: {
- parts: [{ type: 'text', text: 'Hello' }],
- agent: 'build',
- },
+ expect(mockSessionSwitchAgent).toHaveBeenCalledWith({
+ sessionID: 'session-1',
+ agent: 'build',
+ });
+ expect(mockSessionPrompt).toHaveBeenCalledWith({
+ sessionID: 'session-1',
+ text: 'Hello',
});
});
- it('should include model when provided', async () => {
- mockSessionPromptAsync.mockResolvedValue({ data: {} });
+ it('should switch model when provided', async () => {
+ mockSessionSwitchModel.mockResolvedValue(undefined);
+ mockSessionPrompt.mockResolvedValue({});
const model = { providerID: 'anthropic', modelID: 'claude-sonnet-4-20250514' };
- await sendPrompt(mockClient as any, 'session-1', 'Hello', undefined, model);
-
- expect(mockSessionPromptAsync).toHaveBeenCalledWith({
- path: { id: 'session-1' },
- body: {
- parts: [{ type: 'text', text: 'Hello' }],
- model,
- },
+ await sendPrompt(asClient(mockClient), 'session-1', 'Hello', undefined, model);
+
+ expect(mockSessionSwitchModel).toHaveBeenCalledWith({
+ sessionID: 'session-1',
+ model: { id: 'claude-sonnet-4-20250514', providerID: 'anthropic' },
+ });
+ expect(mockSessionPrompt).toHaveBeenCalledWith({
+ sessionID: 'session-1',
+ text: 'Hello',
+ });
+ });
+
+ it('should switch agent and model before prompting', async () => {
+ mockSessionSwitchAgent.mockResolvedValue(undefined);
+ mockSessionSwitchModel.mockResolvedValue(undefined);
+ mockSessionPrompt.mockResolvedValue({});
+
+ const model = { providerID: 'anthropic', modelID: 'claude-sonnet-4-20250514' };
+ await sendPrompt(asClient(mockClient), 'session-1', 'Hello', 'build', model);
+
+ expect(mockSessionSwitchAgent).toHaveBeenCalledWith({
+ sessionID: 'session-1',
+ agent: 'build',
+ });
+ expect(mockSessionSwitchModel).toHaveBeenCalledWith({
+ sessionID: 'session-1',
+ model: { id: 'claude-sonnet-4-20250514', providerID: 'anthropic' },
+ });
+ expect(mockSessionPrompt).toHaveBeenCalledWith({
+ sessionID: 'session-1',
+ text: 'Hello',
});
});
- it('should wrap errors with context', async () => {
- mockSessionPromptAsync.mockRejectedValue(new Error('network error'));
+ it('should wrap errors with exact context', async () => {
+ mockSessionPrompt.mockRejectedValue(new Error('network error'));
await expect(
- sendPrompt(mockClient as any, 'session-1', 'Hello'),
- ).rejects.toThrow('Failed to send prompt to session session-1');
+ sendPrompt(asClient(mockClient), 'session-1', 'Hello'),
+ ).rejects.toThrow('Failed to send prompt to session session-1: network error');
});
});
describe('createSessionAndPrompt', () => {
it('should create session and send prompt', async () => {
- mockSessionCreate.mockResolvedValue({
- data: { id: 'new-session-id', title: 'test' },
- });
- mockSessionPromptAsync.mockResolvedValue({ data: {} });
+ mockSessionCreate.mockResolvedValue({ id: 'new-session-id' });
+ mockSessionPrompt.mockResolvedValue({});
- const sessionId = await createSessionAndPrompt(mockClient as any, 'Hello');
+ const sessionId = await createSessionAndPrompt(asClient(mockClient), 'Hello');
expect(sessionId).toBe('new-session-id');
- expect(mockSessionCreate).toHaveBeenCalled();
- expect(mockSessionPromptAsync).toHaveBeenCalledWith(
- expect.objectContaining({
- path: { id: 'new-session-id' },
- }),
- );
+ expect(mockSessionCreate).toHaveBeenCalledWith({
+ agent: undefined,
+ model: undefined,
+ });
+ expect(mockSessionPrompt).toHaveBeenCalledWith({
+ sessionID: 'new-session-id',
+ text: 'Hello',
+ });
});
- it('should throw when session creation fails', async () => {
- mockSessionCreate.mockResolvedValue({
- data: undefined,
- error: { message: 'server error' },
+ it('should pass agent and model to session creation', async () => {
+ mockSessionCreate.mockResolvedValue({ id: 'new-session-id' });
+ mockSessionPrompt.mockResolvedValue({});
+
+ const model = { providerID: 'anthropic', modelID: 'claude-sonnet-4-20250514' };
+ await createSessionAndPrompt(asClient(mockClient), 'Hello', 'build', model);
+
+ expect(mockSessionCreate).toHaveBeenCalledWith({
+ agent: 'build',
+ model: { id: 'claude-sonnet-4-20250514', providerID: 'anthropic' },
});
+ });
+
+ it('should throw exact error when session creation fails', async () => {
+ mockSessionCreate.mockRejectedValue(new Error('server error'));
await expect(
- createSessionAndPrompt(mockClient as any, 'Hello'),
- ).rejects.toThrow('Failed to create session');
+ createSessionAndPrompt(asClient(mockClient), 'Hello'),
+ ).rejects.toThrow('Failed to create session: server error');
});
});
describe('forkJobSession', () => {
it('should call session.fork with source session ID', async () => {
- mockSessionFork.mockResolvedValue({
- data: { id: 'forked-session-id' },
- });
- mockSessionPromptAsync.mockResolvedValue({ data: {} });
+ mockSessionFork.mockResolvedValue({ id: 'forked-session-id' });
- const newId = await forkJobSession(mockClient as any, 'source-session', {
+ const newId = await forkJobSession(asClient(mockClient), 'source-session', {
sourceJobName: 'api-job',
newJobName: 'api-job-v2',
- additionalPrompt: 'Continue the API work',
});
expect(newId).toBe('forked-session-id');
expect(mockSessionFork).toHaveBeenCalledWith({
- path: { id: 'source-session' },
- body: {},
+ sessionID: 'source-session',
});
});
it('should send context prompt to forked session when additionalPrompt provided', async () => {
- mockSessionFork.mockResolvedValue({
- data: { id: 'forked-session-id' },
- });
- mockSessionPromptAsync.mockResolvedValue({ data: {} });
+ mockSessionFork.mockResolvedValue({ id: 'forked-session-id' });
+ mockSessionPrompt.mockResolvedValue({});
- await forkJobSession(mockClient as any, 'source-session', {
+ await forkJobSession(asClient(mockClient), 'source-session', {
sourceJobName: 'db-schema',
newJobName: 'db-schema-v2',
additionalPrompt: 'Add indexes',
});
- expect(mockSessionPromptAsync).toHaveBeenCalledWith({
- path: { id: 'forked-session-id' },
- body: {
- parts: [{
- type: 'text',
- text: expect.stringContaining('Forked from job "db-schema" as "db-schema-v2"'),
- }],
- },
+ expect(mockSessionPrompt).toHaveBeenCalledWith({
+ sessionID: 'forked-session-id',
+ text: expect.stringContaining('Forked from job "db-schema" as "db-schema-v2"'),
});
});
it('should include additional prompt in context message', async () => {
- mockSessionFork.mockResolvedValue({
- data: { id: 'forked-session-id' },
- });
- mockSessionPromptAsync.mockResolvedValue({ data: {} });
+ mockSessionFork.mockResolvedValue({ id: 'forked-session-id' });
+ mockSessionPrompt.mockResolvedValue({});
- await forkJobSession(mockClient as any, 'source-session', {
+ await forkJobSession(asClient(mockClient), 'source-session', {
sourceJobName: 'src',
newJobName: 'dst',
additionalPrompt: 'Focus on error handling',
});
- expect(mockSessionPromptAsync).toHaveBeenCalledWith(
- expect.objectContaining({
- body: {
- parts: [{
- type: 'text',
- text: expect.stringContaining('Focus on error handling'),
- }],
- },
- }),
- );
+ expect(mockSessionPrompt).toHaveBeenCalledWith({
+ sessionID: 'forked-session-id',
+ text: expect.stringContaining('Focus on error handling'),
+ });
});
it('should not send prompt when additionalPrompt is not provided', async () => {
- mockSessionFork.mockResolvedValue({
- data: { id: 'forked-session-id' },
- });
+ mockSessionFork.mockResolvedValue({ id: 'forked-session-id' });
- const newId = await forkJobSession(mockClient as any, 'source-session', {
+ const newId = await forkJobSession(asClient(mockClient), 'source-session', {
sourceJobName: 'src',
newJobName: 'dst',
});
expect(newId).toBe('forked-session-id');
- expect(mockSessionPromptAsync).not.toHaveBeenCalled();
+ expect(mockSessionPrompt).not.toHaveBeenCalled();
});
it('should pass agent and model to sendPrompt when provided', async () => {
- mockSessionFork.mockResolvedValue({
- data: { id: 'forked-session-id' },
- });
- mockSessionPromptAsync.mockResolvedValue({ data: {} });
+ mockSessionFork.mockResolvedValue({ id: 'forked-session-id' });
+ mockSessionSwitchAgent.mockResolvedValue(undefined);
+ mockSessionSwitchModel.mockResolvedValue(undefined);
+ mockSessionPrompt.mockResolvedValue({});
const model = { providerID: 'anthropic', modelID: 'claude-sonnet-4-20250514' };
- await forkJobSession(mockClient as any, 'source-session', {
+ await forkJobSession(asClient(mockClient), 'source-session', {
sourceJobName: 'src',
newJobName: 'dst',
additionalPrompt: 'Continue',
@@ -279,28 +291,29 @@ describe('sdk-client', () => {
model,
});
- expect(mockSessionPromptAsync).toHaveBeenCalledWith({
- path: { id: 'forked-session-id' },
- body: {
- parts: [{ type: 'text', text: expect.any(String) }],
- agent: 'build',
- model,
- },
+ expect(mockSessionSwitchAgent).toHaveBeenCalledWith({
+ sessionID: 'forked-session-id',
+ agent: 'build',
+ });
+ expect(mockSessionSwitchModel).toHaveBeenCalledWith({
+ sessionID: 'forked-session-id',
+ model: { id: 'claude-sonnet-4-20250514', providerID: 'anthropic' },
+ });
+ expect(mockSessionPrompt).toHaveBeenCalledWith({
+ sessionID: 'forked-session-id',
+ text: expect.any(String),
});
});
- it('should throw when fork call fails', async () => {
- mockSessionFork.mockResolvedValue({
- data: undefined,
- error: { message: 'fork not supported' },
- });
+ it('should throw exact error when fork call fails', async () => {
+ mockSessionFork.mockRejectedValue(new Error('fork not supported'));
await expect(
- forkJobSession(mockClient as any, 'source-session', {
+ forkJobSession(asClient(mockClient), 'source-session', {
sourceJobName: 'src',
newJobName: 'dst',
}),
- ).rejects.toThrow('Failed to fork session');
+ ).rejects.toThrow('Failed to fork session: fork not supported');
});
});
});
diff --git a/tests/plugin-init.test.ts b/tests/plugin-init.test.ts
index f4367a1..203bc07 100644
--- a/tests/plugin-init.test.ts
+++ b/tests/plugin-init.test.ts
@@ -1,4 +1,5 @@
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
+import type { Plugin } from '@opencode/plugin';
const mockState = { isManaged: false };
import * as tmux from '../src/lib/tmux';
@@ -12,27 +13,94 @@ const mockMonitor = {
on: vi.fn(),
};
-const createMockClient = () => ({
- session: {
- list: vi.fn().mockResolvedValue([]),
- prompt: vi.fn().mockResolvedValue(undefined),
- },
- config: {
- get: vi.fn().mockResolvedValue({ data: {} }),
- },
- tui: {
- showToast: vi.fn().mockResolvedValue(undefined),
- },
-});
+interface AddedTool {
+ name: string;
+}
+
+interface MockContext {
+ ctx: Plugin.Context;
+ addedTools: AddedTool[];
+ addedCommands: unknown[];
+}
+
+const createMockContext = (): MockContext => {
+ const addedTools: AddedTool[] = [];
+ const addedCommands: unknown[] = [];
+
+ const ctx = {
+ session: {
+ list: vi.fn(async () => ({ data: [], cursor: {} })),
+ get: vi.fn(async () => ({ id: 'ses_test', projectID: 'p' })),
+ synthetic: vi.fn(async () => {}),
+ prompt: vi.fn(async () => {}),
+ update: vi.fn(async () => {}),
+ hook: vi.fn(async () => ({ dispose: async () => {} })),
+ },
+ tool: {
+ transform: vi.fn(
+ async (cb: (editor: { add: (tool: AddedTool) => void }) => void) => {
+ cb({ add: (tool) => addedTools.push(tool) });
+ return { dispose: async () => {} };
+ },
+ ),
+ hook: vi.fn(async () => ({ dispose: async () => {} })),
+ },
+ command: {
+ transform: vi.fn(
+ async (cb: (editor: { add: (command: unknown) => void }) => void) => {
+ cb({ add: (command) => addedCommands.push(command) });
+ return { dispose: async () => {} };
+ },
+ ),
+ },
+ event: {
+ subscribe: vi.fn(() => ({
+ [Symbol.asyncIterator]: async function* () {},
+ })),
+ },
+ model: {
+ default: vi.fn(async () => ({ location: {}, data: null })),
+ },
+ rpc: {
+ register: vi.fn(async () => ({
+ dispose: async () => {},
+ events: { emit: async () => {} },
+ })),
+ },
+ location: { directory: process.cwd(), project: {} },
+ options: {},
+ } as unknown as Plugin.Context;
+
+ return { ctx, addedTools, addedCommands };
+};
+
+const runSetup = async () => {
+ const { default: plugin } = await import('../src/index');
+ expect(plugin.id).toBe('opencode-mission-control');
+
+ const { ctx, addedTools, addedCommands } = createMockContext();
+ const cleanup = await plugin.setup(ctx);
+
+ return { plugin, ctx, addedTools, addedCommands, cleanup };
+};
+
+const runCleanup = async (cleanup: Awaited>['cleanup']) => {
+ if (typeof cleanup === 'function') {
+ await cleanup();
+ }
+};
describe('plugin initialization', () => {
beforeEach(() => {
+ mockState.isManaged = false;
vi.clearAllMocks();
vi.spyOn(tmux, 'isTmuxAvailable').mockResolvedValue(true);
- vi.spyOn(worktree, 'isInManagedWorktree').mockImplementation(() =>
- Promise.resolve({ isManaged: mockState.isManaged }),
+ vi.spyOn(worktree, 'isInManagedWorktree').mockImplementation(async () => ({
+ isManaged: mockState.isManaged,
+ }));
+ vi.spyOn(orchestrator, 'getSharedMonitor').mockReturnValue(
+ mockMonitor as unknown as ReturnType,
);
- vi.spyOn(orchestrator, 'getSharedMonitor').mockReturnValue(mockMonitor as any);
vi.spyOn(orchestrator, 'setSharedNotifyCallback').mockImplementation(() => {});
vi.spyOn(orchestrator, 'getSharedNotifyCallback').mockReturnValue(null);
vi.spyOn(orchestrator, 'setSharedOrchestrator').mockImplementation(() => {});
@@ -45,156 +113,141 @@ describe('plugin initialization', () => {
});
describe('job agent context', () => {
- it('tool object has only mc_report and mc_status', async () => {
+ it('tool editor receives only mc_report and mc_status', async () => {
mockState.isManaged = true;
- vi.spyOn(worktree, 'isInManagedWorktree').mockResolvedValue({ isManaged: true });
-
- const { default: MissionControl } = await import('../src/index');
- const mockClient = createMockClient();
- const plugin = await MissionControl({ client: mockClient } as any);
-
- const toolKeys = Object.keys(plugin.tool || {});
- expect(toolKeys).toHaveLength(2);
- expect(toolKeys).toContain('mc_report');
- expect(toolKeys).toContain('mc_status');
+
+ const { addedTools, cleanup } = await runSetup();
+
+ const toolNames = addedTools.map((tool) => tool.name);
+ expect(toolNames).toHaveLength(2);
+ expect(toolNames).toContain('mc_report');
+ expect(toolNames).toContain('mc_status');
+
+ await runCleanup(cleanup);
});
it('monitor.start() is not called', async () => {
mockState.isManaged = true;
- vi.spyOn(worktree, 'isInManagedWorktree').mockResolvedValue({ isManaged: true });
-
- const { default: MissionControl } = await import('../src/index');
- const mockClient = createMockClient();
- await MissionControl({ client: mockClient } as any);
-
- const mockMonitor = orchestrator.getSharedMonitor();
- expect(mockMonitor.start).not.toHaveBeenCalled();
+
+ const { cleanup } = await runSetup();
+
+ const monitor = orchestrator.getSharedMonitor();
+ expect(monitor.start).not.toHaveBeenCalled();
+
+ await runCleanup(cleanup);
});
it('setupNotifications is not called', async () => {
mockState.isManaged = true;
- vi.spyOn(worktree, 'isInManagedWorktree').mockResolvedValue({ isManaged: true });
-
- const { default: MissionControl } = await import('../src/index');
- const mockClient = createMockClient();
- await MissionControl({ client: mockClient } as any);
-
+
+ const { cleanup } = await runSetup();
+
expect(notifications.setupNotifications).not.toHaveBeenCalled();
+
+ await runCleanup(cleanup);
});
it('setSharedNotifyCallback is not called', async () => {
mockState.isManaged = true;
- vi.spyOn(worktree, 'isInManagedWorktree').mockResolvedValue({ isManaged: true });
-
- const { default: MissionControl } = await import('../src/index');
- const mockClient = createMockClient();
- await MissionControl({ client: mockClient } as any);
-
+
+ const { cleanup } = await runSetup();
+
expect(orchestrator.setSharedNotifyCallback).not.toHaveBeenCalled();
+
+ await runCleanup(cleanup);
});
it('loadPlan is not called', async () => {
mockState.isManaged = true;
- vi.spyOn(worktree, 'isInManagedWorktree').mockResolvedValue({ isManaged: true });
-
- const { default: MissionControl } = await import('../src/index');
- const mockClient = createMockClient();
- await MissionControl({ client: mockClient } as any);
-
+
+ const { cleanup } = await runSetup();
+
expect(planState.loadPlan).not.toHaveBeenCalled();
+
+ await runCleanup(cleanup);
});
- it('registerCommands is not called in config hook', async () => {
+ it('registerCommands is not called', async () => {
mockState.isManaged = true;
- vi.spyOn(worktree, 'isInManagedWorktree').mockResolvedValue({ isManaged: true });
-
- const { default: MissionControl } = await import('../src/index');
- const mockClient = createMockClient();
- const plugin = await MissionControl({ client: mockClient } as any);
-
- const mockConfig = { commands: [] } as any;
- if (plugin.config) {
- await plugin.config(mockConfig);
- }
-
- expect(mockConfig.commands.length).toBe(0);
+
+ const { ctx, addedCommands, cleanup } = await runSetup();
+
+ expect(ctx.command.transform).not.toHaveBeenCalled();
+ expect(addedCommands).toHaveLength(0);
+
+ await runCleanup(cleanup);
});
});
describe('command center context', () => {
- it('tool object has all 19 tools', async () => {
+ it('tool editor receives all 18 tools', async () => {
mockState.isManaged = false;
- vi.spyOn(worktree, 'isInManagedWorktree').mockResolvedValue({ isManaged: false });
-
- const { default: MissionControl } = await import('../src/index');
- const mockClient = createMockClient();
- const plugin = await MissionControl({ client: mockClient } as any);
-
- const toolKeys = Object.keys(plugin.tool || {});
- expect(toolKeys).toHaveLength(18);
- expect(toolKeys).toContain('mc_launch');
- expect(toolKeys).toContain('mc_jobs');
- expect(toolKeys).toContain('mc_status');
- expect(toolKeys).toContain('mc_diff');
- expect(toolKeys).toContain('mc_pr');
- expect(toolKeys).toContain('mc_merge');
- expect(toolKeys).toContain('mc_sync');
- expect(toolKeys).toContain('mc_cleanup');
- expect(toolKeys).toContain('mc_kill');
- expect(toolKeys).toContain('mc_attach');
- expect(toolKeys).toContain('mc_capture');
- expect(toolKeys).toContain('mc_plan');
- expect(toolKeys).toContain('mc_plan_status');
- expect(toolKeys).toContain('mc_plan_cancel');
- expect(toolKeys).toContain('mc_plan_approve');
- expect(toolKeys).toContain('mc_report');
- expect(toolKeys).toContain('mc_overview');
- expect(toolKeys).toContain('mc_answer');
+
+ const { addedTools, cleanup } = await runSetup();
+
+ const toolNames = addedTools.map((tool) => tool.name);
+ expect(toolNames).toHaveLength(18);
+ expect(toolNames).toContain('mc_launch');
+ expect(toolNames).toContain('mc_jobs');
+ expect(toolNames).toContain('mc_status');
+ expect(toolNames).toContain('mc_diff');
+ expect(toolNames).toContain('mc_pr');
+ expect(toolNames).toContain('mc_merge');
+ expect(toolNames).toContain('mc_sync');
+ expect(toolNames).toContain('mc_cleanup');
+ expect(toolNames).toContain('mc_kill');
+ expect(toolNames).toContain('mc_attach');
+ expect(toolNames).toContain('mc_capture');
+ expect(toolNames).toContain('mc_plan');
+ expect(toolNames).toContain('mc_plan_status');
+ expect(toolNames).toContain('mc_plan_cancel');
+ expect(toolNames).toContain('mc_plan_approve');
+ expect(toolNames).toContain('mc_report');
+ expect(toolNames).toContain('mc_overview');
+ expect(toolNames).toContain('mc_answer');
+
+ await runCleanup(cleanup);
});
it('monitor.start() is called', async () => {
mockState.isManaged = false;
- vi.spyOn(worktree, 'isInManagedWorktree').mockResolvedValue({ isManaged: false });
-
- const { default: MissionControl } = await import('../src/index');
- const mockClient = createMockClient();
- await MissionControl({ client: mockClient } as any);
-
- const mockMonitor = orchestrator.getSharedMonitor();
- expect(mockMonitor.start).toHaveBeenCalled();
+
+ const { cleanup } = await runSetup();
+
+ const monitor = orchestrator.getSharedMonitor();
+ expect(monitor.start).toHaveBeenCalled();
+
+ await runCleanup(cleanup);
});
it('setupNotifications is called', async () => {
mockState.isManaged = false;
- vi.spyOn(worktree, 'isInManagedWorktree').mockResolvedValue({ isManaged: false });
-
- const { default: MissionControl } = await import('../src/index');
- const mockClient = createMockClient();
- await MissionControl({ client: mockClient } as any);
-
+
+ const { cleanup } = await runSetup();
+
expect(notifications.setupNotifications).toHaveBeenCalled();
+
+ await runCleanup(cleanup);
});
it('setSharedNotifyCallback is called', async () => {
mockState.isManaged = false;
- vi.spyOn(worktree, 'isInManagedWorktree').mockResolvedValue({ isManaged: false });
-
- const { default: MissionControl } = await import('../src/index');
- const mockClient = createMockClient();
- await MissionControl({ client: mockClient } as any);
-
+
+ const { cleanup } = await runSetup();
+
expect(orchestrator.setSharedNotifyCallback).toHaveBeenCalled();
+
+ await runCleanup(cleanup);
});
it('loadPlan is called', async () => {
mockState.isManaged = false;
- vi.spyOn(worktree, 'isInManagedWorktree').mockResolvedValue({ isManaged: false });
-
- const { default: MissionControl } = await import('../src/index');
- const mockClient = createMockClient();
- await MissionControl({ client: mockClient } as any);
-
+
+ const { cleanup } = await runSetup();
+
expect(planState.loadPlan).toHaveBeenCalled();
+
+ await runCleanup(cleanup);
});
});
});
diff --git a/tests/rpc-tui.test.ts b/tests/rpc-tui.test.ts
new file mode 100644
index 0000000..01ebebd
--- /dev/null
+++ b/tests/rpc-tui.test.ts
@@ -0,0 +1,92 @@
+import { describe, it, expect, vi, afterEach } from 'vitest';
+import { missionControlRpc, setToastEmitter, showToast } from '../src/rpc';
+import tuiPlugin from '../src/tui';
+
+afterEach(() => {
+ setToastEmitter(null);
+});
+
+describe('missionControlRpc', () => {
+ it('defines the toast event with an object schema', () => {
+ expect(missionControlRpc.id).toBe('opencode-mission-control');
+ const toastEvent = (missionControlRpc as unknown as {
+ events: Record;
+ }).events.toast;
+ expect(toastEvent.schema.type).toBe('object');
+ expect(toastEvent.schema.required).toContain('message');
+ });
+});
+
+describe('showToast', () => {
+ it('is a no-op when no emitter is registered', async () => {
+ await expect(showToast({ message: 'hello' })).resolves.toBeUndefined();
+ });
+
+ it('forwards options to the registered emitter', async () => {
+ const emitter = vi.fn().mockResolvedValue(undefined);
+ setToastEmitter(emitter);
+
+ await showToast({ title: 'MC', message: 'done', variant: 'success', duration: 1000 });
+
+ expect(emitter).toHaveBeenCalledWith({
+ title: 'MC',
+ message: 'done',
+ variant: 'success',
+ duration: 1000,
+ });
+ });
+
+ it('swallows emitter failures', async () => {
+ const emitter = vi.fn().mockRejectedValue(new Error('rpc down'));
+ setToastEmitter(emitter);
+
+ await expect(showToast({ message: 'best effort' })).resolves.toBeUndefined();
+ });
+});
+
+describe('tui plugin', () => {
+ interface FakeRpcEvent {
+ data: Record;
+ }
+
+ it('shows a toast when a toast RPC event arrives and unsubscribes on cleanup', () => {
+ let handler: ((event: FakeRpcEvent) => void) | undefined;
+ const unsubscribe = vi.fn();
+ const show = vi.fn();
+ const fakeContext = {
+ client: {
+ rpc: vi.fn().mockReturnValue({
+ events: {
+ on: vi.fn((name: string, cb: (event: FakeRpcEvent) => void) => {
+ expect(name).toBe('toast');
+ handler = cb;
+ return unsubscribe;
+ }),
+ },
+ }),
+ },
+ ui: { toast: { show } },
+ };
+
+ const definition = tuiPlugin as unknown as {
+ id: string;
+ setup: (ctx: unknown) => (() => void) | undefined;
+ };
+
+ expect(definition.id).toBe('opencode-mission-control-tui');
+ const cleanup = definition.setup(fakeContext);
+
+ expect(handler).toBeTypeOf('function');
+ handler?.({ data: { message: 'job finished', variant: 'not-a-variant' } });
+
+ expect(show).toHaveBeenCalledWith({
+ title: 'Mission Control',
+ message: 'job finished',
+ variant: 'info',
+ duration: 5000,
+ });
+
+ cleanup?.();
+ expect(unsubscribe).toHaveBeenCalledTimes(1);
+ });
+});
diff --git a/tests/tools/attach.test.ts b/tests/tools/attach.test.ts
index 7d48777..23a59a7 100644
--- a/tests/tools/attach.test.ts
+++ b/tests/tools/attach.test.ts
@@ -38,7 +38,7 @@ describe('mc_attach', () => {
});
it('should have name arg', () => {
- expect(mc_attach.args.name).toBeDefined();
+ expect(mc_attach.input.shape.name).toBeDefined();
});
});
@@ -71,10 +71,10 @@ describe('mc_attach', () => {
const result = await mc_attach.execute({ name: 'feature-auth' }, mockContext);
- expect(result).toContain('To attach to job "feature-auth":');
- expect(result).toContain('# Session mode:');
- expect(result).toContain('tmux attach -t mc-feature-auth');
- expect(result).toContain('# To detach: Ctrl+B, D');
+ expect(result.content).toContain('To attach to job "feature-auth":');
+ expect(result.content).toContain('# Session mode:');
+ expect(result.content).toContain('tmux attach -t mc-feature-auth');
+ expect(result.content).toContain('# To detach: Ctrl+B, D');
});
});
@@ -97,10 +97,10 @@ describe('mc_attach', () => {
const result = await mc_attach.execute({ name: 'feature-api' }, mockContext);
- expect(result).toContain('To attach to job "feature-api":');
- expect(result).toContain('# Window mode (select window in current session):');
- expect(result).toContain('tmux select-window -t main-session:feature-api');
- expect(result).toContain('# To detach: Ctrl+B, D');
+ expect(result.content).toContain('To attach to job "feature-api":');
+ expect(result.content).toContain('# Window mode (select window in current session):');
+ expect(result.content).toContain('tmux select-window -t main-session:feature-api');
+ expect(result.content).toContain('# To detach: Ctrl+B, D');
});
});
@@ -121,7 +121,7 @@ describe('mc_attach', () => {
mockGetJobByName.mockResolvedValue(jobSession);
const resultSession = await mc_attach.execute({ name: 'test-session' }, mockContext);
- expect(resultSession).toContain('# To detach: Ctrl+B, D');
+ expect(resultSession.content).toContain('# To detach: Ctrl+B, D');
const jobWindow: Job = {
id: 'job-2',
@@ -138,7 +138,7 @@ describe('mc_attach', () => {
mockGetJobByName.mockResolvedValue(jobWindow);
const resultWindow = await mc_attach.execute({ name: 'test-window' }, mockContext);
- expect(resultWindow).toContain('# To detach: Ctrl+B, D');
+ expect(resultWindow.content).toContain('# To detach: Ctrl+B, D');
});
});
@@ -172,7 +172,7 @@ describe('mc_attach', () => {
workdir: '/tmp/mc-worktrees/serve-job',
command: 'opencode attach http://localhost:8080 --dir /tmp/mc-worktrees/serve-job',
});
- expect(result).toBe("Opened TUI for job 'serve-job' in new tmux window");
+ expect(result.content).toBe("Opened TUI for job 'serve-job' in new tmux window");
});
});
@@ -201,7 +201,7 @@ describe('mc_attach', () => {
const result = await mc_attach.execute({ name: 'serve-job' }, mockContext);
expect(mockCreateWindow).not.toHaveBeenCalled();
- expect(result).toBe('Run: opencode attach http://localhost:8080');
+ expect(result.content).toBe('Run: opencode attach http://localhost:8080');
});
});
@@ -229,7 +229,7 @@ describe('mc_attach', () => {
const result = await mc_attach.execute({ name: 'serve-job' }, mockContext);
expect(mockCreateWindow).not.toHaveBeenCalled();
- expect(result).toBe('Run: opencode attach http://localhost:8080');
+ expect(result.content).toBe('Run: opencode attach http://localhost:8080');
});
});
});
diff --git a/tests/tools/capture.test.ts b/tests/tools/capture.test.ts
index 8c0cab1..4d83b19 100644
--- a/tests/tools/capture.test.ts
+++ b/tests/tools/capture.test.ts
@@ -37,11 +37,11 @@ describe('mc_capture', () => {
});
it('should have required arg: name', () => {
- expect(mc_capture.args.name).toBeDefined();
+ expect(mc_capture.input.shape.name).toBeDefined();
});
it('should have optional arg: lines', () => {
- expect(mc_capture.args.lines).toBeDefined();
+ expect(mc_capture.input.shape.lines).toBeDefined();
});
});
@@ -67,7 +67,7 @@ describe('mc_capture', () => {
it('should return captured text', async () => {
const result = await mc_capture.execute({ name: 'test-job' });
- expect(result).toBe('test output\nline 2\nline 3');
+ expect(result.content).toBe('test output\nline 2\nline 3');
});
it('should use job tmuxTarget for capture', async () => {
@@ -135,7 +135,7 @@ describe('mc_capture', () => {
});
const result = await mc_capture.execute({ name: 'serve-job' });
- const parsed = JSON.parse(result);
+ const parsed = JSON.parse(result.content);
expect(parsed.job).toBe('serve-job');
expect(parsed.mode).toBe('serve');
@@ -167,7 +167,7 @@ describe('mc_capture', () => {
});
const result = await mc_capture.execute({ name: 'serve-job', filter: 'file.edited' });
- const parsed = JSON.parse(result);
+ const parsed = JSON.parse(result.content);
expect(parsed.filter).toBe('file.edited');
expect(parsed.events).toHaveLength(2);
@@ -194,7 +194,7 @@ describe('mc_capture', () => {
});
const result = await mc_capture.execute({ name: 'serve-job', filter: 'tool' });
- const parsed = JSON.parse(result);
+ const parsed = JSON.parse(result.content);
expect(parsed.filter).toBe('tool');
expect(parsed.events).toHaveLength(1);
@@ -221,7 +221,7 @@ describe('mc_capture', () => {
});
const result = await mc_capture.execute({ name: 'serve-job', filter: 'file.edited' });
- const parsed = JSON.parse(result);
+ const parsed = JSON.parse(result.content);
expect(parsed.filter).toBe('file.edited');
expect(parsed.events).toHaveLength(0);
@@ -241,7 +241,7 @@ describe('mc_capture', () => {
});
const result = await mc_capture.execute({ name: 'serve-job' });
- const parsed = JSON.parse(result);
+ const parsed = JSON.parse(result.content);
expect(parsed.job).toBe('serve-job');
expect(parsed.mode).toBe('serve');
@@ -259,7 +259,7 @@ describe('mc_capture', () => {
const result = await mc_capture.execute({ name: 'tui-job' });
- expect(result).toBe('test output\nline 2\nline 3');
+ expect(result.content).toBe('test output\nline 2\nline 3');
expect(mockCapturePane).toHaveBeenCalledWith('mc-tui-job', 100);
});
@@ -273,12 +273,12 @@ describe('mc_capture', () => {
const result = await mc_capture.execute({ name: 'tui-job', filter: 'file.edited' });
- expect(result).toBe('test output\nline 2\nline 3');
+ expect(result.content).toBe('test output\nline 2\nline 3');
expect(mockCapturePane).toHaveBeenCalledWith('mc-tui-job', 100);
});
it('should have filter arg in tool schema', () => {
- expect(mc_capture.args.filter).toBeDefined();
+ expect(mc_capture.input.shape.filter).toBeDefined();
});
it('should use default filter "all" when not specified', async () => {
@@ -300,7 +300,7 @@ describe('mc_capture', () => {
});
const result = await mc_capture.execute({ name: 'serve-job' });
- const parsed = JSON.parse(result);
+ const parsed = JSON.parse(result.content);
expect(parsed.filter).toBe('all');
});
diff --git a/tests/tools/cleanup.test.ts b/tests/tools/cleanup.test.ts
index 4ca962a..9a20fec 100644
--- a/tests/tools/cleanup.test.ts
+++ b/tests/tools/cleanup.test.ts
@@ -56,17 +56,17 @@ describe('mc_cleanup', () => {
it('should have optional name arg', async () => {
const { mc_cleanup } = await import('../../src/tools/cleanup');
- expect(mc_cleanup.args.name).toBeDefined();
+ expect(mc_cleanup.input.shape.name).toBeDefined();
});
it('should have optional all arg', async () => {
const { mc_cleanup } = await import('../../src/tools/cleanup');
- expect(mc_cleanup.args.all).toBeDefined();
+ expect(mc_cleanup.input.shape.all).toBeDefined();
});
it('should have optional deleteBranch arg', async () => {
const { mc_cleanup } = await import('../../src/tools/cleanup');
- expect(mc_cleanup.args.deleteBranch).toBeDefined();
+ expect(mc_cleanup.input.shape.deleteBranch).toBeDefined();
});
});
@@ -118,8 +118,8 @@ describe('mc_cleanup', () => {
const result = await mc_cleanup.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Cleanup Results');
- expect(result).toContain('✓ Cleaned up job "test-job" (stopped)');
+ expect(result.content).toContain('Cleanup Results');
+ expect(result.content).toContain('✓ Cleaned up job "test-job" (stopped)');
expect(mockRemoveWorktree).toHaveBeenCalledWith(
stoppedJob.worktreePath,
true,
@@ -136,7 +136,7 @@ describe('mc_cleanup', () => {
const result = await mc_cleanup.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('✓ Cleaned up job "test-job" (completed)');
+ expect(result.content).toContain('✓ Cleaned up job "test-job" (completed)');
});
it('should cleanup failed job successfully', async () => {
@@ -148,7 +148,7 @@ describe('mc_cleanup', () => {
const result = await mc_cleanup.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('✓ Cleaned up job "test-job" (failed)');
+ expect(result.content).toContain('✓ Cleaned up job "test-job" (failed)');
});
});
@@ -163,7 +163,7 @@ describe('mc_cleanup', () => {
const result = await mc_cleanup.execute({ all: true }, mockContext);
- expect(result).toBe('No non-running jobs to cleanup.');
+ expect(result.content).toBe('No non-running jobs to cleanup.');
});
it('should cleanup all non-running jobs', async () => {
@@ -182,9 +182,9 @@ describe('mc_cleanup', () => {
const result = await mc_cleanup.execute({ all: true }, mockContext);
- expect(result).toContain('✓ Cleaned up job "job-1" (stopped)');
- expect(result).toContain('✓ Cleaned up job "job-2" (completed)');
- expect(result).not.toContain('job-3');
+ expect(result.content).toContain('✓ Cleaned up job "job-1" (stopped)');
+ expect(result.content).toContain('✓ Cleaned up job "job-2" (completed)');
+ expect(result.content).not.toContain('job-3');
expect(mockRemoveJob).toHaveBeenCalledTimes(2);
});
});
@@ -212,7 +212,7 @@ describe('mc_cleanup', () => {
const result = await mc_cleanup.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('✓ Cleaned up job "test-job"');
+ expect(result.content).toContain('✓ Cleaned up job "test-job"');
expect(mockRemoveJob).toHaveBeenCalled();
});
});
@@ -227,7 +227,7 @@ describe('mc_cleanup', () => {
const result = await mc_cleanup.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Summary: 1 cleaned, 0 failed');
+ expect(result.content).toContain('Summary: 1 cleaned, 0 failed');
});
it('should show summary with failed cleanups', async () => {
diff --git a/tests/tools/diff.test.ts b/tests/tools/diff.test.ts
index c926d46..67f5ca3 100644
--- a/tests/tools/diff.test.ts
+++ b/tests/tools/diff.test.ts
@@ -47,11 +47,11 @@ describe('mc_diff', () => {
});
it('should have required name arg', () => {
- expect(mc_diff.args.name).toBeDefined();
+ expect(mc_diff.input.shape.name).toBeDefined();
});
it('should have optional stat arg', () => {
- expect(mc_diff.args.stat).toBeDefined();
+ expect(mc_diff.input.shape.stat).toBeDefined();
});
});
diff --git a/tests/tools/jobs.test.ts b/tests/tools/jobs.test.ts
index d3f28f5..aa3bdf7 100644
--- a/tests/tools/jobs.test.ts
+++ b/tests/tools/jobs.test.ts
@@ -31,7 +31,7 @@ describe('mc_jobs', () => {
});
it('should have optional status arg', () => {
- expect(mc_jobs.args.status).toBeDefined();
+ expect(mc_jobs.input.shape.status).toBeDefined();
});
});
@@ -45,8 +45,8 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({}, mockContext);
- expect(result).toContain('Mission Control Jobs');
- expect(result).toContain('No jobs found');
+ expect(result.content).toContain('Mission Control Jobs');
+ expect(result.content).toContain('No jobs found');
});
});
@@ -74,11 +74,11 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({}, mockContext);
- expect(result).toContain('Running (1)');
- expect(result).toContain('feature-auth');
- expect(result).toContain('Add OAuth support');
- expect(result).toContain('mc/feature-auth');
- expect(result).toContain('plan');
+ expect(result.content).toContain('Running (1)');
+ expect(result.content).toContain('feature-auth');
+ expect(result.content).toContain('Add OAuth support');
+ expect(result.content).toContain('mc/feature-auth');
+ expect(result.content).toContain('plan');
});
it('should list completed jobs', async () => {
@@ -106,9 +106,9 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({}, mockContext);
- expect(result).toContain('Completed (1)');
- expect(result).toContain('refactor-api');
- expect(result).toContain('✓');
+ expect(result.content).toContain('Completed (1)');
+ expect(result.content).toContain('refactor-api');
+ expect(result.content).toContain('✓');
});
it('should list failed jobs', async () => {
@@ -135,9 +135,9 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({}, mockContext);
- expect(result).toContain('Failed (1)');
- expect(result).toContain('fix-bug-123');
- expect(result).toContain('✗');
+ expect(result.content).toContain('Failed (1)');
+ expect(result.content).toContain('fix-bug-123');
+ expect(result.content).toContain('✗');
});
it('should group jobs by status', async () => {
@@ -176,10 +176,10 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({}, mockContext);
- expect(result).toContain('Running (1)');
- expect(result).toContain('Completed (1)');
- expect(result).toContain('feature-auth');
- expect(result).toContain('refactor-api');
+ expect(result.content).toContain('Running (1)');
+ expect(result.content).toContain('Completed (1)');
+ expect(result.content).toContain('feature-auth');
+ expect(result.content).toContain('refactor-api');
});
});
@@ -220,9 +220,9 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({ status: 'running' }, mockContext);
- expect(result).toContain('Running (1)');
- expect(result).toContain('feature-auth');
- expect(result).not.toContain('refactor-api');
+ expect(result.content).toContain('Running (1)');
+ expect(result.content).toContain('feature-auth');
+ expect(result.content).not.toContain('refactor-api');
});
it('should filter by completed status', async () => {
@@ -264,9 +264,9 @@ describe('mc_jobs', () => {
mockContext,
);
- expect(result).toContain('Completed (1)');
- expect(result).toContain('refactor-api');
- expect(result).not.toContain('feature-auth');
+ expect(result.content).toContain('Completed (1)');
+ expect(result.content).toContain('refactor-api');
+ expect(result.content).not.toContain('feature-auth');
});
it('should filter by failed status', async () => {
@@ -305,9 +305,9 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({ status: 'failed' }, mockContext);
- expect(result).toContain('Failed (1)');
- expect(result).toContain('fix-bug');
- expect(result).not.toContain('feature-auth');
+ expect(result.content).toContain('Failed (1)');
+ expect(result.content).toContain('fix-bug');
+ expect(result.content).not.toContain('feature-auth');
});
it('should show all jobs when status is all', async () => {
@@ -346,10 +346,10 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({ status: 'all' }, mockContext);
- expect(result).toContain('Running (1)');
- expect(result).toContain('Completed (1)');
- expect(result).toContain('feature-auth');
- expect(result).toContain('refactor-api');
+ expect(result.content).toContain('Running (1)');
+ expect(result.content).toContain('Completed (1)');
+ expect(result.content).toContain('feature-auth');
+ expect(result.content).toContain('refactor-api');
});
});
@@ -379,8 +379,8 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({}, mockContext);
- expect(result).toContain('This is a very long prompt that should be trunc...');
- expect(result).not.toContain(longPrompt);
+ expect(result.content).toContain('This is a very long prompt that should be trunc...');
+ expect(result.content).not.toContain(longPrompt);
});
it('should not truncate short prompts', async () => {
@@ -407,7 +407,7 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({}, mockContext);
- expect(result).toContain(shortPrompt);
+ expect(result.content).toContain(shortPrompt);
});
});
@@ -435,10 +435,10 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({}, mockContext);
- expect(result).toContain('feature-auth');
- expect(result).toContain('[running]');
- expect(result).toContain('mc/feature-auth');
- expect(result).toContain('Mode: plan');
+ expect(result.content).toContain('feature-auth');
+ expect(result.content).toContain('[running]');
+ expect(result.content).toContain('mc/feature-auth');
+ expect(result.content).toContain('Mode: plan');
});
it('should show duration for running jobs', async () => {
@@ -464,7 +464,7 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({}, mockContext);
- expect(result).toContain('Started:');
+ expect(result.content).toContain('Started:');
});
it('should show completion time for completed jobs', async () => {
@@ -492,7 +492,7 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({}, mockContext);
- expect(result).toContain('Completed:');
+ expect(result.content).toContain('Completed:');
});
it('should include status indicators', async () => {
@@ -544,9 +544,9 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({}, mockContext);
- expect(result).toContain('▶');
- expect(result).toContain('✓');
- expect(result).toContain('✗');
+ expect(result.content).toContain('▶');
+ expect(result.content).toContain('✓');
+ expect(result.content).toContain('✗');
});
});
@@ -587,8 +587,8 @@ describe('mc_jobs', () => {
const result = await mc_jobs.execute({}, mockContext);
- expect(result).toContain('Running (1)');
- expect(result).toContain('Completed (1)');
+ expect(result.content).toContain('Running (1)');
+ expect(result.content).toContain('Completed (1)');
});
});
});
diff --git a/tests/tools/kill.test.ts b/tests/tools/kill.test.ts
index 392d018..a8e8768 100644
--- a/tests/tools/kill.test.ts
+++ b/tests/tools/kill.test.ts
@@ -47,11 +47,11 @@ describe('mc_kill', () => {
});
it('should have required arg: name', () => {
- expect(mc_kill.args.name).toBeDefined();
+ expect(mc_kill.input.shape.name).toBeDefined();
});
it('should have optional arg: force', () => {
- expect(mc_kill.args.force).toBeDefined();
+ expect(mc_kill.input.shape.force).toBeDefined();
});
});
@@ -93,7 +93,7 @@ describe('mc_kill', () => {
const result = await mc_kill.execute({ name: 'my-job' }, mockContext);
- expect(result).toContain('already stopped');
+ expect(result.content).toContain('already stopped');
expect(mockKillSession).not.toHaveBeenCalled();
expect(mockUpdateJob).not.toHaveBeenCalled();
});
@@ -256,11 +256,11 @@ describe('mc_kill', () => {
const result = await mc_kill.execute({ name: 'my-job' }, mockContext);
- expect(result).toContain('Job "my-job" stopped successfully');
- expect(result).toContain('job-1');
- expect(result).toContain('stopped');
- expect(result).toContain('session');
- expect(result).toContain('/tmp/worktree');
+ expect(result.content).toContain('Job "my-job" stopped successfully');
+ expect(result.content).toContain('job-1');
+ expect(result.content).toContain('stopped');
+ expect(result.content).toContain('session');
+ expect(result.content).toContain('/tmp/worktree');
});
it('should mention worktree preservation in response', async () => {
@@ -275,8 +275,8 @@ describe('mc_kill', () => {
const result = await mc_kill.execute({ name: 'my-job' }, mockContext);
- expect(result).toContain('Worktree is preserved');
- expect(result).toContain('mc_cleanup');
+ expect(result.content).toContain('Worktree is preserved');
+ expect(result.content).toContain('mc_cleanup');
});
});
@@ -296,7 +296,7 @@ describe('mc_kill', () => {
mockContext,
);
- expect(result).toContain('stopped successfully');
+ expect(result.content).toContain('stopped successfully');
});
});
});
diff --git a/tests/tools/launch.test.ts b/tests/tools/launch.test.ts
index 639f0a4..228724b 100644
--- a/tests/tools/launch.test.ts
+++ b/tests/tools/launch.test.ts
@@ -121,15 +121,15 @@ describe('mc_launch', () => {
});
it('should have required args: name and prompt', () => {
- expect(mc_launch.args.name).toBeDefined();
- expect(mc_launch.args.prompt).toBeDefined();
+ expect(mc_launch.input.shape.name).toBeDefined();
+ expect(mc_launch.input.shape.prompt).toBeDefined();
});
it('should have optional args: branch, placement, mode, planFile', () => {
- expect(mc_launch.args.branch).toBeDefined();
- expect(mc_launch.args.placement).toBeDefined();
- expect(mc_launch.args.mode).toBeDefined();
- expect(mc_launch.args.planFile).toBeDefined();
+ expect(mc_launch.input.shape.branch).toBeDefined();
+ expect(mc_launch.input.shape.placement).toBeDefined();
+ expect(mc_launch.input.shape.mode).toBeDefined();
+ expect(mc_launch.input.shape.planFile).toBeDefined();
});
});
@@ -289,11 +289,11 @@ describe('mc_launch', () => {
mockContext,
);
- expect(result).toContain('Job "feature-auth" launched successfully');
- expect(result).toContain('test-uuid-1234');
- expect(result).toContain('mc/feature-auth');
- expect(result).toContain('mc-feature-auth');
- expect(result).toContain('tmux attach -t mc-feature-auth');
+ expect(result.content).toContain('Job "feature-auth" launched successfully');
+ expect(result.content).toContain('test-uuid-1234');
+ expect(result.content).toContain('mc/feature-auth');
+ expect(result.content).toContain('mc-feature-auth');
+ expect(result.content).toContain('tmux attach -t mc-feature-auth');
});
it('should return window switch instructions for window placement', async () => {
@@ -308,7 +308,7 @@ describe('mc_launch', () => {
mockContext,
);
- expect(result).toContain('tmux select-window');
+ expect(result.content).toContain('tmux select-window');
});
it('should pass copyFiles through to resolvePostCreateHook', async () => {
@@ -567,7 +567,7 @@ describe('mc_launch', () => {
mockContext,
);
- expect(result).toContain('Job "test" launched successfully');
+ expect(result.content).toContain('Job "test" launched successfully');
});
it('should not fail if cleanup itself fails', async () => {
@@ -587,7 +587,7 @@ describe('mc_launch', () => {
mockContext,
);
- expect(result).toContain('launched successfully');
+ expect(result.content).toContain('launched successfully');
expect(mockAddJob).toHaveBeenCalledWith(
expect.objectContaining({ status: 'running' }),
);
@@ -618,7 +618,10 @@ describe('mc_launch', () => {
expect(mockWriteServeLauncherScript).toHaveBeenCalledWith(
'/tmp/mc-worktrees/test-job',
14100,
- undefined,
+ 'testuuid1234',
+ );
+ expect(mockAddJob).toHaveBeenCalledWith(
+ expect.objectContaining({ port: 14100, serverPassword: 'testuuid1234' }),
);
});
@@ -639,7 +642,7 @@ describe('mc_launch', () => {
);
expect(mockWaitForServer).toHaveBeenCalledWith(14100, {
- password: undefined,
+ password: 'testuuid1234',
});
expect(mockCreateSessionAndPrompt).toHaveBeenCalledWith(
expect.anything(),
@@ -669,8 +672,8 @@ describe('mc_launch', () => {
mockContext,
);
- expect(result).toContain('Port: 14100');
- expect(result).toContain('Server: http://127.0.0.1:14100');
+ expect(result.content).toContain('Port: 14100');
+ expect(result.content).toContain('Server: http://127.0.0.1:14100');
});
it('should pass serverPassword to serve launcher and waitForServer', async () => {
diff --git a/tests/tools/merge.test.ts b/tests/tools/merge.test.ts
index fb59805..38d5046 100644
--- a/tests/tools/merge.test.ts
+++ b/tests/tools/merge.test.ts
@@ -72,15 +72,15 @@ describe('mc_merge', () => {
});
it('should have name arg', () => {
- expect(mc_merge.args.name).toBeDefined();
+ expect(mc_merge.input.shape.name).toBeDefined();
});
it('should have optional squash arg', () => {
- expect(mc_merge.args.squash).toBeDefined();
+ expect(mc_merge.input.shape.squash).toBeDefined();
});
it('should have optional message arg', () => {
- expect(mc_merge.args.message).toBeDefined();
+ expect(mc_merge.input.shape.message).toBeDefined();
});
});
@@ -139,17 +139,17 @@ describe('mc_merge', () => {
describe('tool args validation', () => {
it('should have name as required arg', () => {
- const nameArg = mc_merge.args.name;
+ const nameArg = mc_merge.input.shape.name;
expect(nameArg).toBeDefined();
});
it('should have squash as optional boolean arg', () => {
- const squashArg = mc_merge.args.squash;
+ const squashArg = mc_merge.input.shape.squash;
expect(squashArg).toBeDefined();
});
it('should have message as optional string arg', () => {
- const messageArg = mc_merge.args.message;
+ const messageArg = mc_merge.input.shape.message;
expect(messageArg).toBeDefined();
});
});
diff --git a/tests/tools/overview.test.ts b/tests/tools/overview.test.ts
index b8867ee..0119621 100644
--- a/tests/tools/overview.test.ts
+++ b/tests/tools/overview.test.ts
@@ -55,7 +55,7 @@ describe('mc_overview', () => {
});
it('should have no required args', () => {
- expect(Object.keys(mc_overview.args)).toHaveLength(0);
+ expect(Object.keys(mc_overview.input.shape)).toHaveLength(0);
});
});
@@ -63,29 +63,29 @@ describe('mc_overview', () => {
it('should show dashboard header with timestamp', async () => {
const result = await mc_overview.execute({});
- expect(result).toContain('Mission Control Dashboard');
- expect(result).toContain('Timestamp:');
+ expect(result.content).toContain('Mission Control Dashboard');
+ expect(result.content).toContain('Timestamp:');
});
it('should show no active plan', async () => {
const result = await mc_overview.execute({});
- expect(result).toContain('Active Plan');
- expect(result).toContain('- None');
+ expect(result.content).toContain('Active Plan');
+ expect(result.content).toContain('- None');
});
it('should show zero jobs summary', async () => {
const result = await mc_overview.execute({});
- expect(result).toContain('Jobs Summary');
- expect(result).toContain('0 running, 0 completed, 0 failed');
+ expect(result.content).toContain('Jobs Summary');
+ expect(result.content).toContain('0 running, 0 completed, 0 failed');
});
it('should show no running jobs', async () => {
const result = await mc_overview.execute({});
- expect(result).toContain('Running Jobs');
- expect(result).toContain('- None');
+ expect(result.content).toContain('Running Jobs');
+ expect(result.content).toContain('- None');
});
});
@@ -112,8 +112,8 @@ describe('mc_overview', () => {
const result = await mc_overview.execute({});
- expect(result).toContain('serve-job');
- expect(result).toContain('streaming');
+ expect(result.content).toContain('serve-job');
+ expect(result.content).toContain('streaming');
});
it('should show serve-mode jobs as idle when no current tool', async () => {
@@ -136,8 +136,8 @@ describe('mc_overview', () => {
const result = await mc_overview.execute({});
- expect(result).toContain('idle-job');
- expect(result).toContain('idle');
+ expect(result.content).toContain('idle-job');
+ expect(result.content).toContain('idle');
});
it('should show TUI-mode jobs with report info', async () => {
@@ -161,8 +161,8 @@ describe('mc_overview', () => {
const result = await mc_overview.execute({});
- expect(result).toContain('tui-job');
- expect(result).toContain('working: Processing files');
+ expect(result.content).toContain('tui-job');
+ expect(result.content).toContain('working: Processing files');
});
it('should show activity timestamp for serve-mode jobs', async () => {
@@ -187,8 +187,8 @@ describe('mc_overview', () => {
const result = await mc_overview.execute({});
- expect(result).toContain('active-job');
- expect(result).toContain('streaming');
+ expect(result.content).toContain('active-job');
+ expect(result.content).toContain('streaming');
});
it('should handle multiple running jobs with mixed modes', async () => {
@@ -232,10 +232,10 @@ describe('mc_overview', () => {
const result = await mc_overview.execute({});
- expect(result).toContain('serve-job');
- expect(result).toContain('streaming');
- expect(result).toContain('tui-job');
- expect(result).toContain('working: Working hard');
+ expect(result.content).toContain('serve-job');
+ expect(result.content).toContain('streaming');
+ expect(result.content).toContain('tui-job');
+ expect(result.content).toContain('working: Working hard');
});
});
@@ -258,11 +258,11 @@ describe('mc_overview', () => {
const result = await mc_overview.execute({});
- expect(result).toContain('Active Plan');
- expect(result).toContain('Name: test-plan');
- expect(result).toContain('Status: running');
- expect(result).toContain('Progress: 1/3 merged');
- expect(result).toContain('Mode: autopilot');
+ expect(result.content).toContain('Active Plan');
+ expect(result.content).toContain('Name: test-plan');
+ expect(result.content).toContain('Status: running');
+ expect(result.content).toContain('Progress: 1/3 merged');
+ expect(result.content).toContain('Mode: autopilot');
});
it('should show copilot mode pending plan', async () => {
@@ -279,8 +279,8 @@ describe('mc_overview', () => {
const result = await mc_overview.execute({});
- expect(result).toContain('Mode: copilot');
- expect(result).toContain('Plan is pending approval');
+ expect(result.content).toContain('Mode: copilot');
+ expect(result.content).toContain('Plan is pending approval');
});
it('should show supervisor checkpoint', async () => {
@@ -298,7 +298,7 @@ describe('mc_overview', () => {
const result = await mc_overview.execute({});
- expect(result).toContain('Plan paused at pre_merge');
+ expect(result.content).toContain('Plan paused at pre_merge');
});
});
@@ -316,9 +316,9 @@ describe('mc_overview', () => {
const result = await mc_overview.execute({});
- expect(result).toContain('Alerts');
- expect(result).toContain('blocked-job [blocked]:');
- expect(result).toContain('Waiting for user input');
+ expect(result.content).toContain('Alerts');
+ expect(result.content).toContain('blocked-job [blocked]:');
+ expect(result.content).toContain('Waiting for user input');
});
it('should show needs_review alerts', async () => {
@@ -334,7 +334,7 @@ describe('mc_overview', () => {
const result = await mc_overview.execute({});
- expect(result).toContain('review-job [needs_review]:');
+ expect(result.content).toContain('review-job [needs_review]:');
});
it('should suggest actions based on job states', async () => {
@@ -364,11 +364,11 @@ describe('mc_overview', () => {
const result = await mc_overview.execute({});
- expect(result).toContain('Suggested Actions');
- expect(result).toContain('blocked');
- expect(result).toContain('completed');
- expect(result).toContain('failed');
- expect(result).toContain('running');
+ expect(result.content).toContain('Suggested Actions');
+ expect(result.content).toContain('blocked');
+ expect(result.content).toContain('completed');
+ expect(result.content).toContain('failed');
+ expect(result.content).toContain('running');
});
});
@@ -393,8 +393,8 @@ describe('mc_overview', () => {
const result = await mc_overview.execute({});
- expect(result).toContain('Recent Completions');
- expect(result).toContain('completed-job');
+ expect(result.content).toContain('Recent Completions');
+ expect(result.content).toContain('completed-job');
});
it('should show recent failed jobs', async () => {
@@ -413,8 +413,8 @@ describe('mc_overview', () => {
const result = await mc_overview.execute({});
- expect(result).toContain('Recent Failures');
- expect(result).toContain('failed-job');
+ expect(result.content).toContain('Recent Failures');
+ expect(result.content).toContain('failed-job');
});
});
});
diff --git a/tests/tools/plan-approve.test.ts b/tests/tools/plan-approve.test.ts
index bb6596a..4c5cf64 100644
--- a/tests/tools/plan-approve.test.ts
+++ b/tests/tools/plan-approve.test.ts
@@ -101,8 +101,8 @@ describe('mc_plan_approve', () => {
expect.objectContaining({ name: 'bad-job', status: 'ready_to_merge' }),
]),
}));
- expect(result).toContain('bad-job');
- expect(result).toContain('ready_to_merge');
+ expect(result.content).toContain('bad-job');
+ expect(result.content).toContain('ready_to_merge');
expect(mockResumePlan).toHaveBeenCalled();
});
@@ -143,7 +143,7 @@ describe('mc_plan_approve', () => {
]),
}));
expect(mockResumePlan).toHaveBeenCalled();
- expect(result).toContain('TouchSet violations for job "touch-job" accepted');
+ expect(result.content).toContain('TouchSet violations for job "touch-job" accepted');
});
it('should relaunch touchSet-failed job for correction', async () => {
@@ -190,7 +190,7 @@ describe('mc_plan_approve', () => {
}));
expect(relaunchSpy).toHaveBeenCalledWith('touch-job', ['README.md'], ['src/**']);
expect(mockResumePlan).toHaveBeenCalled();
- expect(result).toContain('relaunched with correction prompt');
+ expect(result.content).toContain('relaunched with correction prompt');
});
it('should re-validate touchSet on retry before proceeding', async () => {
@@ -240,8 +240,8 @@ describe('mc_plan_approve', () => {
]),
}));
expect(mockResumePlan).toHaveBeenCalled();
- expect(result).toContain('touch-job');
- expect(result).toContain('ready_to_merge');
+ expect(result.content).toContain('touch-job');
+ expect(result.content).toContain('ready_to_merge');
});
it('should reject retry when touchSet remains violated after manual fix', async () => {
@@ -335,8 +335,8 @@ describe('mc_plan_approve', () => {
expect.objectContaining({ name: 'conflicting-job', status: 'ready_to_merge' }),
]),
}));
- expect(result).toContain('Checkpoint');
- expect(result).toContain('ready_to_merge');
+ expect(result.content).toContain('Checkpoint');
+ expect(result.content).toContain('ready_to_merge');
expect(mockResumePlan).toHaveBeenCalled();
});
@@ -396,10 +396,39 @@ describe('mc_plan_approve', () => {
const result = await mc_plan_approve.execute({ checkpoint: 'pre_merge' }, mockContext);
- expect(result).toContain('Checkpoint "pre_merge" cleared');
- expect(result).toContain('resuming');
- expect(result).not.toContain('ready_to_merge');
- expect(mockSavePlan).toHaveBeenCalled();
+ expect(result.content).toContain('Checkpoint "pre_merge" cleared');
+ expect(result.content).toContain('resuming');
+ expect(result.content).not.toContain('ready_to_merge');
+ expect(mockSavePlan).toHaveBeenCalledWith(expect.objectContaining({
+ approvedMergeJobs: ['merge-job'],
+ }));
+ expect(mockResumePlan).toHaveBeenCalled();
+ });
+
+ it('should persist pre_pr approval so a fresh orchestrator does not re-pause', async () => {
+ spyOn(planState, 'loadPlan').mockResolvedValue({
+ id: 'plan-1',
+ name: 'Pre-PR Plan',
+ mode: 'supervisor',
+ status: 'paused',
+ checkpoint: 'pre_pr',
+ jobs: [{ id: 'j1', name: 'done-job', prompt: 'do merge', status: 'merged' }],
+ integrationBranch: 'mc/integration/plan-1',
+ baseCommit: 'abc123',
+ createdAt: new Date().toISOString(),
+ });
+
+ const mockSavePlan = spyOn(planState, 'savePlan').mockResolvedValue(undefined);
+ const mockResumePlan = mock().mockResolvedValue(undefined);
+ spyOn(orchestrator.Orchestrator.prototype, 'resumePlan').mockImplementation(mockResumePlan);
+ spyOn(orchestrator.Orchestrator.prototype, 'setPlanModelSnapshot').mockImplementation(() => {});
+
+ const result = await mc_plan_approve.execute({ checkpoint: 'pre_pr' }, mockContext);
+
+ expect(result.content).toContain('Checkpoint "pre_pr" cleared');
+ expect(mockSavePlan).toHaveBeenCalledWith(expect.objectContaining({
+ approvedPrePr: true,
+ }));
expect(mockResumePlan).toHaveBeenCalled();
});
});
@@ -431,10 +460,10 @@ describe('mc_plan_approve', () => {
const result = await mc_plan_approve.execute({}, mockContext);
- expect(result).toContain('approved and started');
- expect(result).toContain('plan-1');
- expect(result).toContain('Jobs: 2');
- expect(result).toContain('mc_plan_status');
+ expect(result.content).toContain('approved and started');
+ expect(result.content).toContain('plan-1');
+ expect(result.content).toContain('Jobs: 2');
+ expect(result.content).toContain('mc_plan_status');
expect(mockSavePlan).toHaveBeenCalled();
expect(mockResumePlan).toHaveBeenCalled();
});
diff --git a/tests/tools/plan-cancel.test.ts b/tests/tools/plan-cancel.test.ts
index 7861005..9111c73 100644
--- a/tests/tools/plan-cancel.test.ts
+++ b/tests/tools/plan-cancel.test.ts
@@ -44,7 +44,7 @@ describe('mc_plan_cancel', () => {
const result = await mc_plan_cancel.execute({}, mockContext);
- expect(result).toContain('No active plan to cancel');
+ expect(result.content).toContain('No active plan to cancel');
});
});
@@ -71,9 +71,9 @@ describe('mc_plan_cancel', () => {
const result = await mc_plan_cancel.execute({}, mockContext);
- expect(result).toContain('Plan "Feature Sprint" canceled');
- expect(result).toContain('plan-1');
- expect(result).toContain('All running jobs have been stopped');
+ expect(result.content).toContain('Plan "Feature Sprint" canceled');
+ expect(result.content).toContain('plan-1');
+ expect(result.content).toContain('All running jobs have been stopped');
expect(mockCancelPlan).toHaveBeenCalled();
});
});
diff --git a/tests/tools/plan-status.test.ts b/tests/tools/plan-status.test.ts
index 617e559..fe0c184 100644
--- a/tests/tools/plan-status.test.ts
+++ b/tests/tools/plan-status.test.ts
@@ -32,7 +32,7 @@ describe('mc_plan_status', () => {
const result = await mc_plan_status.execute({}, mockContext);
- expect(result).toBe('No active plan.');
+ expect(result.content).toBe('No active plan.');
});
});
@@ -66,8 +66,8 @@ describe('mc_plan_status', () => {
const result = await mc_plan_status.execute({}, mockContext);
- expect(result).toContain('Plan: Feature Sprint (running)');
- expect(result).toContain('Mode: autopilot');
+ expect(result.content).toContain('Plan: Feature Sprint (running)');
+ expect(result.content).toContain('Mode: autopilot');
});
it('should show progress as merged/total', async () => {
@@ -89,7 +89,7 @@ describe('mc_plan_status', () => {
const result = await mc_plan_status.execute({}, mockContext);
- expect(result).toContain('1/3 merged');
+ expect(result.content).toContain('1/3 merged');
});
it('should show job status indicators', async () => {
@@ -110,8 +110,8 @@ describe('mc_plan_status', () => {
const result = await mc_plan_status.execute({}, mockContext);
- expect(result).toContain('▶ running-job: running');
- expect(result).toContain('○ queued-job: queued');
+ expect(result.content).toContain('▶ running-job: running');
+ expect(result.content).toContain('○ queued-job: queued');
});
it('should show dependency info for jobs', async () => {
@@ -138,7 +138,7 @@ describe('mc_plan_status', () => {
const result = await mc_plan_status.execute({}, mockContext);
- expect(result).toContain('deps: base');
+ expect(result.content).toContain('deps: base');
});
it('should show next actions summary', async () => {
@@ -159,8 +159,8 @@ describe('mc_plan_status', () => {
const result = await mc_plan_status.execute({}, mockContext);
- expect(result).toContain('1 job(s) running');
- expect(result).toContain('1 job(s) queued');
+ expect(result.content).toContain('1 job(s) running');
+ expect(result.content).toContain('1 job(s) queued');
});
it('should show error info for failed jobs', async () => {
@@ -186,7 +186,7 @@ describe('mc_plan_status', () => {
const result = await mc_plan_status.execute({}, mockContext);
- expect(result).toContain('Error: tmux died');
+ expect(result.content).toContain('Error: tmux died');
});
it('should show PR URL when available', async () => {
@@ -205,7 +205,7 @@ describe('mc_plan_status', () => {
const result = await mc_plan_status.execute({}, mockContext);
- expect(result).toContain('PR: https://github.com/org/repo/pull/42');
+ expect(result.content).toContain('PR: https://github.com/org/repo/pull/42');
});
});
});
diff --git a/tests/tools/plan.test.ts b/tests/tools/plan.test.ts
index debf96d..3bb1bc8 100644
--- a/tests/tools/plan.test.ts
+++ b/tests/tools/plan.test.ts
@@ -51,12 +51,12 @@ describe('mc_plan', () => {
});
it('should have required args: name, jobs', () => {
- expect(mc_plan.args.name).toBeDefined();
- expect(mc_plan.args.jobs).toBeDefined();
+ expect(mc_plan.input.shape.name).toBeDefined();
+ expect(mc_plan.input.shape.jobs).toBeDefined();
});
it('should have optional arg: mode', () => {
- expect(mc_plan.args.mode).toBeDefined();
+ expect(mc_plan.input.shape.mode).toBeDefined();
});
});
@@ -140,8 +140,8 @@ describe('mc_plan', () => {
mockContext,
);
- expect(result).toContain('pending approval');
- expect(result).toContain('mc_plan_approve');
+ expect(result.content).toContain('pending approval');
+ expect(result.content).toContain('mc_plan_approve');
expect(planState.savePlan).toHaveBeenCalled();
});
@@ -158,9 +158,9 @@ describe('mc_plan', () => {
mockContext,
);
- expect(result).toContain('job-a');
- expect(result).toContain('job-b');
- expect(result).toContain('depends on: job-a');
+ expect(result.content).toContain('job-a');
+ expect(result.content).toContain('job-b');
+ expect(result.content).toContain('depends on: job-a');
});
});
@@ -183,8 +183,8 @@ describe('mc_plan', () => {
mockContext,
);
- expect(result).toContain('started');
- expect(result).toContain('mc_plan_status');
+ expect(result.content).toContain('started');
+ expect(result.content).toContain('mc_plan_status');
expect(mockStartPlan).toHaveBeenCalled();
});
@@ -206,7 +206,7 @@ describe('mc_plan', () => {
mockContext,
);
- expect(result).toContain('autopilot');
+ expect(result.content).toContain('autopilot');
});
});
@@ -229,8 +229,8 @@ describe('mc_plan', () => {
mockContext,
);
- expect(result).toContain('ID:');
- expect(result).toContain('Jobs:');
+ expect(result.content).toContain('ID:');
+ expect(result.content).toContain('Jobs:');
});
it('should include gh auth status in output', async () => {
@@ -245,7 +245,7 @@ describe('mc_plan', () => {
mockContext,
);
- expect(result).toContain('gh auth: no');
+ expect(result.content).toContain('gh auth: no');
});
});
});
diff --git a/tests/tools/pr.test.ts b/tests/tools/pr.test.ts
index a1ebf51..7c279bb 100644
--- a/tests/tools/pr.test.ts
+++ b/tests/tools/pr.test.ts
@@ -31,19 +31,19 @@ describe('mc_pr', () => {
});
it('should have required name arg', () => {
- expect(mc_pr.args.name).toBeDefined();
+ expect(mc_pr.input.shape.name).toBeDefined();
});
it('should have optional title arg', () => {
- expect(mc_pr.args.title).toBeDefined();
+ expect(mc_pr.input.shape.title).toBeDefined();
});
it('should have optional body arg', () => {
- expect(mc_pr.args.body).toBeDefined();
+ expect(mc_pr.input.shape.body).toBeDefined();
});
it('should have optional draft arg', () => {
- expect(mc_pr.args.draft).toBeDefined();
+ expect(mc_pr.input.shape.draft).toBeDefined();
});
});
diff --git a/tests/tools/status.test.ts b/tests/tools/status.test.ts
index b4f0ecc..79c62ae 100644
--- a/tests/tools/status.test.ts
+++ b/tests/tools/status.test.ts
@@ -56,7 +56,7 @@ describe('mc_status', () => {
});
it('should have required arg: name', () => {
- expect(mc_status.args.name).toBeDefined();
+ expect(mc_status.input.shape.name).toBeDefined();
});
});
@@ -90,54 +90,54 @@ describe('mc_status', () => {
it('should include job name and status', async () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Job: test-job');
- expect(result).toContain('Status: running');
+ expect(result.content).toContain('Job: test-job');
+ expect(result.content).toContain('Status: running');
});
it('should include job ID', async () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('ID: test-job-id');
+ expect(result.content).toContain('ID: test-job-id');
});
it('should include metadata section with branch and mode', async () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Metadata:');
- expect(result).toContain('Branch: mc/test-job');
- expect(result).toContain('Mode: vanilla');
+ expect(result.content).toContain('Metadata:');
+ expect(result.content).toContain('Branch: mc/test-job');
+ expect(result.content).toContain('Mode: vanilla');
});
it('should include placement and creation time', async () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Placement: session');
- expect(result).toContain('Created:');
+ expect(result.content).toContain('Placement: session');
+ expect(result.content).toContain('Created:');
});
it('should include paths section with worktree and tmux target', async () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Paths:');
- expect(result).toContain('Worktree: /tmp/mc-worktrees/test-job');
- expect(result).toContain('tmux Target: mc-test-job');
+ expect(result.content).toContain('Paths:');
+ expect(result.content).toContain('Worktree: /tmp/mc-worktrees/test-job');
+ expect(result.content).toContain('tmux Target: mc-test-job');
});
it('should include git status section', async () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Git Status:');
- expect(result).toContain('Branch:');
- expect(result).toContain('Files Changed:');
- expect(result).toContain('Ahead:');
- expect(result).toContain('Behind:');
+ expect(result.content).toContain('Git Status:');
+ expect(result.content).toContain('Branch:');
+ expect(result.content).toContain('Files Changed:');
+ expect(result.content).toContain('Ahead:');
+ expect(result.content).toContain('Behind:');
});
it('should include recent output section', async () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Recent Output (last 10 lines):');
- expect(result).toContain('Last line of output');
+ expect(result.content).toContain('Recent Output (last 10 lines):');
+ expect(result.content).toContain('Last line of output');
});
});
@@ -150,8 +150,8 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Duration:');
- expect(result).toMatch(/Duration: \d+[hm]/);
+ expect(result.content).toContain('Duration:');
+ expect(result.content).toMatch(/Duration: \d+[hm]/);
});
it('should show duration for completed jobs', async () => {
@@ -169,8 +169,8 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Duration:');
- expect(result).toContain('Completed:');
+ expect(result.content).toContain('Duration:');
+ expect(result.content).toContain('Completed:');
});
it('should show exit code for completed jobs', async () => {
@@ -185,7 +185,7 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Exit Code: 0');
+ expect(result.content).toContain('Exit Code: 0');
});
});
@@ -201,7 +201,7 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Plan File: my-plan.md');
+ expect(result.content).toContain('Plan File: my-plan.md');
});
it('should not include plan file when absent', async () => {
@@ -211,7 +211,7 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).not.toContain('Plan File:');
+ expect(result.content).not.toContain('Plan File:');
});
});
@@ -223,7 +223,7 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('(unable to capture pane output)');
+ expect(result.content).toContain('(unable to capture pane output)');
});
});
@@ -235,7 +235,7 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Managed: true');
+ expect(result.content).toContain('Managed: true');
});
it('should show unmanaged status', async () => {
@@ -245,7 +245,7 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Managed: false');
+ expect(result.content).toContain('Managed: false');
});
});
@@ -257,7 +257,7 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Status: running');
+ expect(result.content).toContain('Status: running');
});
it('should handle completed status', async () => {
@@ -272,7 +272,7 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Status: completed');
+ expect(result.content).toContain('Status: completed');
});
it('should handle failed status', async () => {
@@ -288,8 +288,8 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Status: failed');
- expect(result).toContain('Exit Code: 1');
+ expect(result.content).toContain('Status: failed');
+ expect(result.content).toContain('Exit Code: 1');
});
});
@@ -315,15 +315,15 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Serve Mode Telemetry:');
- expect(result).toContain('Session State: streaming');
- expect(result).toContain('Current File: src/index.ts');
- expect(result).toContain('Files Edited: 2');
- expect(result).toContain('src/index.ts');
- expect(result).toContain('src/utils.ts');
- expect(result).toContain('Events Accumulated: 42');
- expect(result).toContain('Port: 8080');
- expect(result).toContain('Server URL: http://localhost:8080');
+ expect(result.content).toContain('Serve Mode Telemetry:');
+ expect(result.content).toContain('Session State: streaming');
+ expect(result.content).toContain('Current File: src/index.ts');
+ expect(result.content).toContain('Files Edited: 2');
+ expect(result.content).toContain('src/index.ts');
+ expect(result.content).toContain('src/utils.ts');
+ expect(result.content).toContain('Events Accumulated: 42');
+ expect(result.content).toContain('Port: 8080');
+ expect(result.content).toContain('Server URL: http://localhost:8080');
});
it('should handle serve-mode job with no accumulated events', async () => {
@@ -340,8 +340,8 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Port: 8080');
- expect(result).not.toContain('Serve Mode Telemetry:');
+ expect(result.content).toContain('Port: 8080');
+ expect(result.content).not.toContain('Serve Mode Telemetry:');
});
it('should preserve TUI-mode output format for jobs without port', async () => {
@@ -353,10 +353,10 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).not.toContain('Serve Mode Telemetry:');
- expect(result).not.toContain('Port:');
- expect(result).toContain('Recent Output (last 10 lines):');
- expect(result).toContain('TUI output');
+ expect(result.content).not.toContain('Serve Mode Telemetry:');
+ expect(result.content).not.toContain('Port:');
+ expect(result.content).toContain('Recent Output (last 10 lines):');
+ expect(result.content).toContain('TUI output');
});
it('should show idle state when no current tool', async () => {
@@ -377,8 +377,8 @@ describe('mc_status', () => {
const result = await mc_status.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Session State: idle');
- expect(result).toContain('Files Edited: 0');
+ expect(result.content).toContain('Session State: idle');
+ expect(result.content).toContain('Files Edited: 0');
});
});
});
diff --git a/tests/tools/sync.test.ts b/tests/tools/sync.test.ts
index dbb52e1..d550a72 100644
--- a/tests/tools/sync.test.ts
+++ b/tests/tools/sync.test.ts
@@ -48,11 +48,11 @@ describe('mc_sync', () => {
});
it('should have required arg: name', () => {
- expect(mc_sync.args.name).toBeDefined();
+ expect(mc_sync.input.shape.name).toBeDefined();
});
it('should have optional arg: strategy', () => {
- expect(mc_sync.args.strategy).toBeDefined();
+ expect(mc_sync.input.shape.strategy).toBeDefined();
});
});
@@ -120,22 +120,22 @@ describe('mc_sync', () => {
it('should return success message for rebase', async () => {
const result = await mc_sync.execute({ name: 'test-job', strategy: 'rebase' }, mockContext);
- expect(result).toContain('Successfully synced job "test-job"');
- expect(result).toContain('rebase');
+ expect(result.content).toContain('Successfully synced job "test-job"');
+ expect(result.content).toContain('rebase');
});
it('should return success message for merge', async () => {
const result = await mc_sync.execute({ name: 'test-job', strategy: 'merge' }, mockContext);
- expect(result).toContain('Successfully synced job "test-job"');
- expect(result).toContain('merge');
+ expect(result.content).toContain('Successfully synced job "test-job"');
+ expect(result.content).toContain('merge');
});
it('should return success message with default strategy', async () => {
const result = await mc_sync.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Successfully synced job "test-job"');
- expect(result).toContain('rebase');
+ expect(result.content).toContain('Successfully synced job "test-job"');
+ expect(result.content).toContain('rebase');
});
});
@@ -152,10 +152,10 @@ describe('mc_sync', () => {
const result = await mc_sync.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Sync failed for job "test-job"');
- expect(result).toContain('Conflicts:');
- expect(result).toContain('src/file1.ts');
- expect(result).toContain('src/file2.ts');
+ expect(result.content).toContain('Sync failed for job "test-job"');
+ expect(result.content).toContain('Conflicts:');
+ expect(result.content).toContain('src/file1.ts');
+ expect(result.content).toContain('src/file2.ts');
});
it('should handle empty conflicts array', async () => {
@@ -166,8 +166,8 @@ describe('mc_sync', () => {
const result = await mc_sync.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Sync failed for job "test-job"');
- expect(result).toContain('Conflicts:');
+ expect(result.content).toContain('Sync failed for job "test-job"');
+ expect(result.content).toContain('Conflicts:');
});
it('should handle missing conflicts field', async () => {
@@ -177,8 +177,8 @@ describe('mc_sync', () => {
const result = await mc_sync.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Sync failed for job "test-job"');
- expect(result).toContain('(no conflict details available)');
+ expect(result.content).toContain('Sync failed for job "test-job"');
+ expect(result.content).toContain('(no conflict details available)');
});
it('should suggest manual resolution', async () => {
@@ -189,7 +189,7 @@ describe('mc_sync', () => {
const result = await mc_sync.execute({ name: 'test-job' }, mockContext);
- expect(result).toContain('Resolve conflicts manually and try again');
+ expect(result.content).toContain('Resolve conflicts manually and try again');
});
});
@@ -200,7 +200,7 @@ describe('mc_sync', () => {
});
it('should have optional arg: source', () => {
- expect(mc_sync.args.source).toBeDefined();
+ expect(mc_sync.input.shape.source).toBeDefined();
});
it('should pass source=local to syncWorktree', async () => {
@@ -247,7 +247,7 @@ describe('mc_sync', () => {
const result = await mc_sync.execute({ name: 'feature-branch' }, mockContext);
- expect(result).toContain('feature-branch');
+ expect(result.content).toContain('feature-branch');
expect(mockGetJobByName).toHaveBeenCalledWith('feature-branch');
});
});
@@ -260,7 +260,7 @@ describe('mc_sync', () => {
const result = await mc_sync.execute({ name: jobName }, mockContext);
- expect(result).toContain(jobName);
+ expect(result.content).toContain(jobName);
});
it('should pass correct worktree path to syncWorktree', async () => {