Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2ba4a34
refactor(subagents): separate provider instances from drivers
Waishnav Oct 3, 2026
55cd9ae
docs(subagents): document provider instances
Waishnav Oct 3, 2026
b246d4e
fix(deps): pin koffi for package installs
Waishnav Oct 3, 2026
6944735
fix(subagents): keep profile instructions when a profile shares its p…
Waishnav Oct 25, 2026
3a15397
build(opencode): add v2 client
Waishnav Oct 3, 2026
a84c48c
refactor(opencode): add runtime generation foundation
Waishnav Oct 3, 2026
11aff46
feat(opencode): support v2 runtime
Waishnav Oct 3, 2026
33b0f32
docs(opencode): document runtime version routing
Waishnav Oct 3, 2026
be77f88
fix(opencode): probe the executable version on every runtime creation
Waishnav Oct 25, 2026
28679a7
fix(opencode): report a failed v2 turn instead of a missing assistant…
Waishnav Oct 25, 2026
3df63b0
feat(subagents): add capabilities and turn cancellation
Waishnav Oct 3, 2026
b0b2d3a
feat(subagents): expose agent stop command
Waishnav Oct 3, 2026
2889608
fix(subagents): make stop bounded and never start work after a stop
Waishnav Oct 25, 2026
bafce8b
refactor(subagents): make driver runtime policy declarative
Waishnav Oct 3, 2026
801d0ae
test(subagents): assert runtime independence without counting runtimes
Waishnav Oct 25, 2026
32392d3
feat(pi): add rpc transport
Waishnav Oct 3, 2026
9e75976
refactor(subagents): normalize ACP provider identity
Waishnav Oct 3, 2026
5bc8262
refactor(pi): run agent through native rpc cli
Waishnav Oct 3, 2026
143eb3a
refactor(acp): support generic provider instances
Waishnav Oct 3, 2026
8ae91bd
docs(pi): describe native rpc sessions
Waishnav Oct 3, 2026
eb7dadf
docs(acp): document generic driver configuration
Waishnav Oct 3, 2026
dc8be67
fix(pi): isolate cancelled turns and harden the RPC process
Waishnav Oct 25, 2026
7e558b9
fix(acp): keep flavor for named ACP instances and align preflight wit…
Waishnav Oct 25, 2026
254fa3d
build(pi): require a Pi release that emits agent_settled
Waishnav Oct 25, 2026
175fce5
test(acp): describe cancel tests with flavor options
Waishnav Oct 25, 2026
d9fd25b
fix(pi): check availability against the executable the runtime launches
Waishnav Oct 25, 2026
2eb50b7
fix(subagents): apply a continuation profile only for its provider in…
Waishnav Oct 26, 2026
3991199
Merge branch 'refactor/subagent-provider-instances' into feat/opencod…
Waishnav Oct 26, 2026
c12954f
Merge branch 'feat/opencode-v1-v2' into refactor/subagent-driver-regi…
Waishnav Oct 26, 2026
30dd94a
Merge branch 'refactor/subagent-driver-registry' into feat/subagent-c…
Waishnav Oct 26, 2026
c2cce4f
Merge branch 'feat/subagent-capabilities-cancel' into refactor/generi…
Waishnav Oct 26, 2026
18cd1c9
Merge branch 'refactor/generic-acp' into refactor/pi-rpc
Waishnav Oct 26, 2026
a6b66ff
fix(opencode): ignore stale assistant messages and drain probe output
Waishnav Oct 26, 2026
a2af679
Merge remote-tracking branch 'origin/feat/opencode-v1-v2' into feat/s…
Waishnav Oct 26, 2026
ddbcad7
fix(acp): scope ACP runtimes to one agent
Waishnav Oct 26, 2026
a0767cd
fix(opencode): report stopped only after OpenCode confirms the interrupt
Waishnav Oct 26, 2026
b9c9736
Merge remote-tracking branch 'origin/feat/opencode-v1-v2' into refact…
Waishnav Oct 26, 2026
6d901c2
Merge remote-tracking branch 'origin/refactor/subagent-driver-registr…
Waishnav Oct 26, 2026
9e21569
Merge remote-tracking branch 'origin/feat/subagent-capabilities-cance…
Waishnav Oct 26, 2026
06faf8f
fix(acp): reject config.args for built-in ACP flavors
Waishnav Oct 26, 2026
a4770bd
fix(acp): run generic ACP providers only with full_access
Waishnav Oct 26, 2026
f7bcefd
Merge remote-tracking branch 'origin/refactor/generic-acp' into refac…
Waishnav Oct 26, 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
41 changes: 24 additions & 17 deletions docs/agent-profile-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ model can choose the right profile.

### `provider`

Required built-in provider id:
Required provider instance id. The default instance ids are:

```yaml
provider: codex
Expand All @@ -76,22 +76,29 @@ provider: copilot
provider: grok
```

Unsupported or custom providers are rejected. DevSpace maps providers to their
native integration:
Profiles may also reference named provider instances configured under
`subagents.providers`, such as `provider: codex-work`. Provider instances map
to one of these built-in driver integrations:

- `codex`: the host-installed `codex app-server` command
- `claude`: Claude Code SDK
- `opencode`: OpenCode SDK
- `pi`: the installed Pi coding-agent SDK, one in-process session per DevSpace agent
- `cursor`: ACP
- `copilot`: ACP
- `grok`: Grok Build ACP (`grok agent stdio`)

Codex is resolved from the user's environment rather than bundled with
DevSpace. Run `codex login` normally before using it; set `CODEX_COMMAND` when
the executable is not on the normal PATH. OpenCode, Cursor, and Copilot
runtimes are started and reused by the daemon internally, while Pi is embedded
through its Node SDK.
- `opencode`: the host-installed OpenCode CLI; DevSpace probes its major version
and uses the matching 1.x or 2.x protocol internally
- `pi`: Pi's normal `--mode rpc` CLI process. DevSpace preserves Pi's native
auth, settings, extensions, skills, context files, and session store.
- `acp`: generic Agent Client Protocol integration. Cursor, Copilot, and Grok
are default provider instances using this driver; other ACP agents can be
configured without adding a DevSpace driver.

Codex and OpenCode are resolved from the user's environment rather than bundled
as executables. Run their normal login/setup flows before using them; set
`CODEX_COMMAND` when Codex is not on the normal PATH. OpenCode is discovered as
`opencode`, and DevSpace automatically routes OpenCode 1.x and 2.x to their
matching runtime implementations. OpenCode, Cursor, and Copilot runtimes are
started and reused by the daemon internally. Pi is launched in RPC mode and
uses its native persisted session file as DevSpace's continuation identity;
`PI_COMMAND` selects another Pi executable (otherwise `pi` on `PATH`, then the
bundled package). Pi 0.80.5 or newer is required for the `agent_settled` event.

### `model`

Expand All @@ -118,10 +125,10 @@ DevSpace passes this through to providers that expose a matching control:

- `claude`: SDK effort with adaptive thinking.
- `codex`: app-server model reasoning effort.
- `pi`: the AgentSession thinking-level control.
- `pi`: RPC `set_thinking_level`.
- `opencode`: model variant.
- `cursor` and `copilot`: ACP thought-level config when supported.
- `grok`: `--reasoning-effort` on startup and xAI's ACP model metadata for resumed sessions.
- ACP: standard model/thought-level config when advertised by the agent. The
Grok flavor also understands xAI's typed model metadata and startup effort.

### `disabled`

Expand Down
60 changes: 54 additions & 6 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,27 @@ Subagent providers are explicit. Omitted providers are disabled:
}
```

`id` is the provider instance id used by profiles and `devspace agents run`.
For the default built-in instance ids, `driver` is optional and defaults to the
same value. Named instances declare the driver explicitly, which allows
multiple independently configured instances of one integration:

```jsonc
{
"id": "codex-work",
"driver": "codex",
"enabled": true,
"env": {
"CODEX_HOME": "/home/alice/.codex-work",
},
}
```

Profiles can then select that instance with `provider: codex-work`. The driver
is the implementation (`codex`, `claude`, `opencode`, `pi`, or `acp`);
provider-native session ids remain internal to DevSpace. Cursor, Copilot, and
Grok are default ACP provider instances rather than separate drivers.

`subagents.instructions` controls when ChatGPT receives the managed workflow:

| Value | Behavior |
Expand All @@ -171,15 +192,42 @@ does not expand `$NAME` references in these values.
All subagent providers accept `env`. The daemon inherits its startup
environment, then overlays the provider's `env` without mutating the daemon's
process environment. OpenCode receives that environment on its managed server
process; embedded Pi scopes it to its provider requests and command execution.
process; Pi receives it on its managed RPC process.

The `opencode` driver runs `opencode --version` before creating its first
runtime and automatically selects the OpenCode 1.x or 2.x protocol. Both major
versions use the same provider instance and profile configuration; `opencode2`
is not a separate driver.

Codex, Claude, Pi, and ACP instances also accept `command`. OpenCode does not
expose a command override. Cursor, Copilot, and Grok retain their built-in ACP
commands when `command` is omitted. An arbitrary ACP instance declares its
executable and may provide fixed startup arguments under `config.args`:

```jsonc
{
"id": "kiro",
"driver": "acp",
"enabled": true,
"command": "kiro",
"config": { "args": ["acp"] }
}
```

`config.flavor` is reserved for the small built-in protocol quirks currently
needed by `cursor`, `copilot`, and `grok`; generic ACP agents normally omit it.
Those built-in flavors derive their sandbox arguments from the write mode, so
they reject `config.args`. DevSpace cannot enforce `read_only` or `allowed` on an
arbitrary ACP agent, so generic ACP instances run only with `full_access`.

Codex, Claude, Cursor, Copilot, and Grok also accept `command`. OpenCode and Pi
do not expose a command override. For providers that support it, an explicit
`command` wins over both the inherited command override and a command override
placed in `env`.
Pi runs as the normal CLI in `--mode rpc`, so user-installed extensions,
skills, context files, auth, models, and settings load normally. Restricted
DevSpace modes inject a sandbox extension and pin Pi's active built-in tools to
the matching read-only/workspace-safe set; `full_access` leaves Pi's normal
tool configuration untouched.

Existing process-level overrides remain supported: `CODEX_COMMAND`,
`CODEX_HOME`, `CLAUDE_COMMAND`, `CURSOR_COMMAND`, `COPILOT_COMMAND`,
`CODEX_HOME`, `CLAUDE_COMMAND`, `PI_COMMAND`, `CURSOR_COMMAND`, `COPILOT_COMMAND`,
`GROK_COMMAND`, and `GROK_AGENT_PROFILE`. Provider configuration takes
precedence where the same value is set in both places.

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@
"@anthropic-ai/claude-agent-sdk": "0.3.200",
"@anthropic-ai/sandbox-runtime": "0.0.71",
"@clack/prompts": "^1.5.1",
"@earendil-works/pi-coding-agent": "^0.80.3",
"@earendil-works/pi-coding-agent": "^0.80.10",
"@modelcontextprotocol/ext-apps": "^1.7.2",
"@modelcontextprotocol/node": "^2.0.0",
"@modelcontextprotocol/sdk": "^1.29.0",
"@modelcontextprotocol/server": "^2.0.0",
"@opencode-ai/sdk": "1.17.13",
"@opencode/client": "2.0.18",
"@pierre/diffs": "^1.3.6",
"better-result": "^2.10.0",
"better-sqlite3": "^12.10.0",
Expand All @@ -66,7 +67,7 @@
"drizzle-orm": "^0.45.2",
"express": "^5.2.1",
"jsonc-parser": "^3.3.1",
"koffi": "^3.1.2",
"koffi": "3.2.1",
"lucide": "^1.24.0",
"react": "^19.2.6",
"react-dom": "^19.2.6",
Expand Down
Loading
Loading