Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
d347ec8
feat: add Prime Agent harness literals (PAN-3668)
Aug 12, 2026
59a1eb3
feat: define Prime Agent harness behavior (PAN-3668)
Aug 12, 2026
b0e506f
test: verify Prime Agent behavior record (PAN-3668)
Aug 12, 2026
c319ce7
feat: enumerate Prime Agent in contracts (PAN-3668)
Aug 12, 2026
ef99614
feat: advertise Prime Agent in CLI help (PAN-3668)
Aug 12, 2026
309d8d0
feat: configure Prime Agent RPC startup (PAN-3668)
Aug 12, 2026
ffb3690
chore: audit Prime config schema growth (PAN-3668)
Aug 12, 2026
b46cee9
feat: map Prime Agent providers and models (PAN-3668)
Aug 12, 2026
26e611c
feat: resolve Prime Agent binary (PAN-3668)
Aug 12, 2026
ba3db2f
feat: frame Prime Agent RPC JSONL (PAN-3668)
Aug 12, 2026
3a83837
feat: correlate Prime Agent RPC requests (PAN-3668)
Aug 12, 2026
bd3acca
Merge remote-tracking branch 'origin/main' into feature/pan-3668
Aug 12, 2026
781ddc4
feat: diagnose Prime Agent compatibility (PAN-3668)
Aug 12, 2026
0980f91
refactor: isolate Prime doctor checks (PAN-3668)
Aug 12, 2026
02343af
chore: keep doctor within size guard (PAN-3668)
Aug 12, 2026
5c51e21
feat: register Prime Agent runtime adapter (PAN-3668)
Aug 13, 2026
24bdfa9
feat: verify Prime Agent session resume (PAN-3668)
Aug 13, 2026
ab0982d
feat: enforce Prime managed-session policy (PAN-3668)
Aug 13, 2026
795b8d4
feat: launch Prime work agents through RPC (PAN-3668)
Aug 13, 2026
b5d9ba1
refactor: extract Prime launch command builder (PAN-3668)
Aug 13, 2026
6216792
feat: launch Prime supervised conversations (PAN-3668)
Aug 13, 2026
ae77ca7
feat: route Prime messages through RPC control (PAN-3668)
Aug 13, 2026
2ad13e5
feat: adapt Prime session transcripts (PAN-3668)
Aug 13, 2026
4d180b7
feat: map Prime usage and costs (PAN-3668)
Aug 13, 2026
ea1160d
feat: render Prime managed context (PAN-3668)
Aug 13, 2026
5e9185c
feat: project Prime sessions in dashboard APIs (PAN-3668)
Aug 13, 2026
5839e41
docs: document managed Prime harness setup (PAN-3668)
Aug 13, 2026
4834e94
feat: expose Prime harness in dashboard UI (PAN-3668)
Aug 13, 2026
64a5b73
test: enforce Prime harness no-loss audit (PAN-3668)
Aug 13, 2026
a85fc48
test: verify Prime Agent end to end (PAN-3668)
Aug 13, 2026
ad27d6c
Merge remote-tracking branch 'origin/main' into feature/pan-3668
Aug 13, 2026
bbe2818
fix: connect Prime Agent production RPC host
Aug 13, 2026
2202e2b
fix: keep Codex runtime within size gate
Aug 13, 2026
026bd01
Merge remote-tracking branch 'origin/main' into feature/pan-3668
Aug 13, 2026
3b60cfa
fix: allow Prime readiness marker cleanup (PAN-3668)
Aug 13, 2026
b3e89f0
fix: break Prime delivery import cycle (PAN-3668)
Aug 13, 2026
07bb08a
Merge remote-tracking branch 'origin/main' into feature/pan-3668
Aug 13, 2026
2212cbf
fix: isolate reviewer session classification (PAN-3668)
Aug 13, 2026
3ba6687
fix: harden Prime host lifecycle (PAN-3668)
Aug 13, 2026
f9d82a1
Merge remote-tracking branch 'origin/main' into feature/pan-3668
Aug 13, 2026
e348f2f
Merge remote-tracking branch 'origin/main' into feature/pan-3668
Aug 13, 2026
b8bffc9
fix: harden Prime Agent host lifecycle
Aug 13, 2026
e4a4b77
fix: require durable Prime conversation resume
Aug 13, 2026
b7775a0
test: preserve verification worker follow-up coverage (PAN-3668)
Aug 17, 2026
5caa78a
Merge remote-tracking branch 'origin/main' into feature/pan-3668
Aug 17, 2026
e580f71
Merge origin/main into feature/pan-3668
Aug 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion configuration/context-layers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ harness; spawn-time plumbing delivers it:
| **Claude Code** | managed region of `~/.claude/CLAUDE.md` | Claude Code natively reads `~/.claude/CLAUDE.md` at session start |
| **Codex** | `~/.overdeck/context/codex-global.md` | At spawn, Overdeck seeds the agent's `$CODEX_HOME/AGENTS.md` from this file — Codex natively reads `AGENTS.md`, never the render artifact itself |
| **Pi** | `~/.overdeck/context/pi-global.md` | Injected into the session's system-prompt context at spawn. Pi does natively support a global `~/.pi/agent/AGENTS.md`; Overdeck deliberately does not write there — the global layer is delivered per-spawn instead, leaving `~/.pi/agent/` entirely yours |
| **Prime Agent** | `~/.overdeck/context/prime-agent-global.md` | Injected into the root RPC session's supplemental system prompt at spawn; Overdeck never writes `~/.prime/agent` |

The `pi-global.md` / `codex-global.md` files are **Overdeck-owned render
artifacts** — the harnesses do not know about them. They exist so the global
Expand Down Expand Up @@ -133,7 +134,8 @@ Write completion markers via `/pan-done` when ready for review.
{{/harness:pi}}
```

Blocks may be stacked to target several harnesses; `{{#harness:codex}}` is
Use `{{#harness:prime-agent}}...{{/harness:prime-agent}}` for Prime-only
content. Blocks may be stacked to target several harnesses; `{{#harness:codex}}` is
also recognized.

## CLI
Expand Down
36 changes: 35 additions & 1 deletion configuration/harnesses.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ that runs in tmux. The **model** is what the binary calls. They are picked
independently per spawn.

<Info>
**Supported today:** `claude-code` (default), `ohmypi`, `codex`, `acp`, and `kimi-code`. For the wider
**Supported today:** `claude-code` (default), `ohmypi`, `codex`, `acp`, `kimi-code`, and `prime-agent`. For the wider
field of coding-agent harnesses Overdeck could adopt next — and how each one handles
skills, MCP, and AGENTS.md — see the [Harness Landscape](/reference/harness-landscape).
</Info>
Expand All @@ -24,6 +24,7 @@ skills, MCP, and AGENTS.md — see the [Harness Landscape](/reference/harness-la
| `codex` | [OpenAI Codex CLI](https://github.com/openai/codex) (`codex`) | OpenAI-model work | Uses persistent `codex app-server` sessions by default; requires Codex CLI `0.144.0` or newer. |
| `acp` | [Kimi Code CLI](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/getting-started.html) (`kimi`) | Opt-in Kimi work | Uses the open Agent Client Protocol over a persistent authenticated host; Kimi is the first wired ACP agent. |
| `kimi-code` | [Kimi Code CLI](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/getting-started.html) (`kimi`) | Kimi models (built-in default) | Drives Kimi's own native terminal UI directly — no ACP host, no Anthropic-compatibility endpoint. Kimi models only. Set `providerHarnesses.kimi` to `acp` or `claude-code` to opt back out. |
| `prime-agent` | Prime Agent (`prime-agent`) | Opt-in multi-provider RPC work and conversations | Overdeck owns one persistent root RPC process per session; supported versions are `>=0.1.0 <1.0.0`. |

## Composer commands across harnesses

Expand Down Expand Up @@ -60,6 +61,39 @@ Managed Codex sessions use an isolated `CODEX_HOME`. On initialization and resum
receive neither override, so Claude Code's native context behavior remains in
control.

### Prime Agent RPC (alternative)

Install a compatible Prime Agent release with the upstream installer, then verify it:

```bash
curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh
prime-agent --version # must be >=0.1.0 and <1.0.0
prime-agent --help # must list --mode rpc
pan doctor
```

If the binary is outside `PATH`, set `primeAgent.binaryPath` in
`~/.overdeck/config.yaml`. Configure the provider's API credentials through
the provider's normal environment variables or Overdeck provider settings.
Overdeck maps Anthropic models to `anthropic`, OpenAI models to `openai`, and
Google models to `google`; an unknown provider/model pair fails instead of
silently switching harnesses.

Overdeck owns the persistent root RPC process, session directory, resume,
delivery, abort, and termination. A detached session resumes only when its
recorded model, provider, and workspace match. Otherwise Overdeck starts a
fresh session or reports a recovery error. Prime schedules, heartbeats,
observation, autonomous continuation, and cross-agent messaging are disabled
because Cloister owns that lifecycle. RLM children remain internal tool work
attributed to the root session and cannot claim Overdeck tasks.

Prime's worker/kernel separation is an execution boundary, not a security
sandbox. Use the same workspace and credential isolation you use for other
coding harnesses. Overdeck writes managed context only under
`~/.overdeck/context`; it never changes `~/.prime/agent`. To uninstall, stop
Prime sessions, remove `primeAgent` from the Overdeck config, and remove the
upstream `prime-agent` package with the package manager that installed it.

### oh-my-pi / ohmypi (alternative)

- Adds RPC mode (`omp --mode rpc`) so Overdeck can write structured commands to
Expand Down
2 changes: 1 addition & 1 deletion docs/HARNESSES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

| Topic | Where it lives now |
| --- | --- |
| Operational guide — supported harnesses (`claude-code`, `pi`), install, picker locations, ToS rules, troubleshooting | [`configuration/harnesses.mdx`](../configuration/harnesses.mdx) |
| Operational guide — supported harnesses, including managed Prime Agent RPC sessions, install, picker locations, security rules, and troubleshooting | [`configuration/harnesses.mdx`](../configuration/harnesses.mdx) |
| Planning survey — 13 coding-agent harnesses, extensibility mechanisms, adoption implications | [`reference/harness-landscape.mdx`](../reference/harness-landscape.mdx) |
| Proposal — loading curated skill bundles into a single conversation | [`reference/template-conversations.mdx`](../reference/template-conversations.mdx) |
9 changes: 9 additions & 0 deletions docs/MODEL_ROUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ When Overdeck needs to make an LLM call, it resolves the model through this chai

Overdeck supports seven LLM providers:

### Prime Agent provider mapping

The `prime-agent` harness receives an explicit provider and model on every
launch. Anthropic routes to `anthropic`, OpenAI routes to `openai`, and Google
routes to `google`. Unsupported mappings fail loudly; Overdeck does not pick a
different model or harness. Provider authentication remains provider-owned.
Using Claude Pro or Max subscription credentials through Prime Agent bills as
extra API usage and does not consume the Claude plan quota.

| Provider | Auth Method | Notes |
|----------|-------------|-------|
| **Anthropic** | Claude Code subscription login (default, always enabled) | Opus 4.6, Sonnet 4.6, Haiku 4.5 |
Expand Down
2 changes: 1 addition & 1 deletion docs/TELEMETRY.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ the public contract and lists every allowed value.
| `duration_bucket` | `under_100ms`, `100ms-999ms`, `1s-9s`, `10s+` |
| `forge` | `github`, `gitlab` |
| `fork_kind` | `summary`, `handoff`, `plain` |
| `harness` | `claude-code`, `ohmypi`, `codex`, `acp`, `kimi-code` |
| `harness` | `claude-code`, `ohmypi`, `codex`, `acp`, `kimi-code`, `prime-agent` |
| `merge_kind` | `pipeline` |
| `model_family` | `claude`, `gpt`, `gemini`, `kimi`, `minimax`, `glm`, `mimo`, `other` |
| `pipeline_stage` | `work_done`, `review_passed`, `verification_passed`, `merged`, `closed_out` |
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/prime-agent-no-loss-audit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Prime Agent No-Loss Audit

Every existing harness remains present while `prime-agent` gains an explicit home. The mechanical test reads each canonical surface below.

| # | Surface | Canonical location | Prime disposition | Existing harnesses preserved | Verified |
|---|---|---|---|---|---|
| S1 | Harness union and known set | `packages/contracts/src/types.ts` | explicit literal | yes | [x] |
| S2 | Behavior map | `packages/contracts/src/harness-behavior.ts` | `PRIME_AGENT_BEHAVIOR` | yes | [x] |
| S3 | Config harness schema | `src/lib/config-yaml/schema.ts` | accepted role/provider harness | yes | [x] |
| S4 | CLI help and composer manifest | `src/cli/index.ts`, `packages/contracts/src/composer-commands.generated.ts` | listed | yes | [x] |
| S5 | Provider resolution | `src/lib/prime-agent/provider-map.ts` | strict table, no fallback | unchanged | [x] |
| S6 | Runtime registry | `src/lib/runtimes/index.ts` | registered adapter | yes | [x] |
| S7 | Artifact, telemetry, flywheel, context preview | `packages/contracts/src/{artifacts,telemetry,flywheel,context-layers}.ts` | explicit literal | yes | [x] |
| S8 | Transcript registry | `src/lib/conversations/transcript-adapter.ts` | Prime adapter | yes | [x] |
| S9 | Cost source | `src/lib/overdeck/cost.ts` | `prime_agent` source | yes | [x] |
| S10 | Context renderer | `src/lib/context-layers/harness.ts` | Prime marker and artifact | yes | [x] |
| S11 | Work/conversation lifecycle | `src/lib/agents/runtime-command.ts`, `src/lib/overdeck/conversation-runtime.ts` | persistent RPC | yes | [x] |
| S12 | Delivery and recovery | `src/lib/prime-agent/{session-controller,session-resume}.ts` | correlated RPC and strict resume | unchanged | [x] |
| S13 | Dashboard API and frontend | `src/dashboard/` | identity, activity, usage, picker, badges, filters | yes | [x] |
| S14 | Operator documentation | `configuration/harnesses.mdx`, `configuration/context-layers.mdx` | setup and boundary documented | yes | [x] |
35 changes: 35 additions & 0 deletions docs/prime-agent-verification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Prime Agent verification

Verified on 2026-08-12 for PAN-3668 with Prime Agent 0.7.2 and Node.js 22.22.0.

## Automated gates

| Gate | Result |
| --- | --- |
| `npm run build` | Passed, including contracts, CLI, dashboard server, dashboard frontend, and dist-externals checks. |
| `npm run typecheck` | Passed. The dashboard ratchet fell from 30 known errors to 28 after the Prime runtime types were propagated. |
| `npm run lint` | Passed through the focused rerun after removing the new Prime transcript-adapter cycle. |
| `npm test` | 13,664 tests passed and 51 skipped. Two unrelated 5-second setup hooks timed out under full-suite load; both files passed immediately in a focused rerun (5/5 tests). |
| Prime focused and no-loss tests | Passed, including the live smoke, runtime registry, parser, policy, picker, transcript, artifact, telemetry, and canonical-harness matrices. |

The opt-in live test is `tests/integration/prime-agent-smoke.test.ts`. Run it with `OVERDECK_PRIME_AGENT_LIVE=1 npx vitest run tests/integration/prime-agent-smoke.test.ts`. Provider and model overrides are available through `OVERDECK_PRIME_AGENT_PROVIDER` and `OVERDECK_PRIME_AGENT_MODEL`.

## Live Prime Agent smoke

The smoke used a disposable directory and the installed `prime-agent` binary. It verified:

1. RPC launch with an explicit provider, model, working directory, and session directory.
2. Correlated `get_state`, `prompt`, `steer`, `get_session_stats`, `abort`, `get_messages`, and resumed-session requests.
3. A real Bash tool execution that wrote the expected marker inside the disposable directory.
4. Non-zero token accounting, non-negative cost accounting, graceful stop, and resume from the saved session file.
5. The freshly built doctor diagnostic: `Prime Agent: v0.7.2 (RPC mode available)`.

## Dashboard boot and UI

The production dashboard bundle booted under Node.js 22 on isolated port 33668 with an isolated `OVERDECK_HOME`, `OVERDECK_DISABLE_DEACON=1`, and `OVERDECK_NO_RESUME=1`. `/api/health` returned `status: ok`, `mode: peer`, and the feature branch build metadata. The log order confirmed the HTTP listener before boot-cache completion, and Cloister stayed disabled.

Playwright opened the isolated dashboard, enabled the throwaway harness-permutation setting, opened the runtime picker, and confirmed that `Prime Agent` was visible with the description `Managed persistent Prime RPC session`. The inspected screenshot is [the Prime Agent runtime picker](evidence/pan-3668/prime-agent-runtime-picker.png).

## Release decision

The Prime Agent path is verified for managed launch, RPC delivery, tool use, transcript persistence, cost reporting, stop/resume, diagnostics, and operator-facing selection. The only full-suite exceptions were two unrelated setup-hook timeouts that passed outside the saturated run.
2 changes: 1 addition & 1 deletion packages/contracts/src/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type ArtifactHash = typeof ArtifactHash.Type
export const ArtifactAgentRole = Schema.Literals(["plan", "work", "review", "test", "ship", "flywheel", "user"])
export type ArtifactAgentRole = typeof ArtifactAgentRole.Type

export const ArtifactAgentHarness = Schema.Literals(["claude-code", "pi", "ohmypi", "codex", "acp", "kimi-code", "user"])
export const ArtifactAgentHarness = Schema.Literals(["claude-code", "pi", "ohmypi", "codex", "acp", "kimi-code", "prime-agent", "user"])
export type ArtifactAgentHarness = typeof ArtifactAgentHarness.Type

export const ArtifactLifecycleState = Schema.Literals([
Expand Down
Loading
Loading