@automatalabs/acp-agents 1.2.7 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -11
- package/dist/acp-client.d.ts +26 -6
- package/dist/acp-client.d.ts.map +1 -1
- package/dist/acp-client.js +30 -7
- package/dist/agent/acp-agent.d.ts +141 -0
- package/dist/agent/acp-agent.d.ts.map +1 -0
- package/dist/agent/acp-agent.js +837 -0
- package/dist/agent/errors.d.ts +17 -0
- package/dist/agent/errors.d.ts.map +1 -0
- package/dist/agent/errors.js +37 -0
- package/dist/agent/events.d.ts +26 -0
- package/dist/agent/events.d.ts.map +1 -0
- package/dist/agent/events.js +165 -0
- package/dist/agent/fork.d.ts +27 -0
- package/dist/agent/fork.d.ts.map +1 -0
- package/dist/agent/fork.js +28 -0
- package/dist/agent/probe.d.ts +14 -0
- package/dist/agent/probe.d.ts.map +1 -0
- package/dist/agent/probe.js +87 -0
- package/dist/agent/process-registry.d.ts +9 -0
- package/dist/agent/process-registry.d.ts.map +1 -0
- package/dist/agent/process-registry.js +28 -0
- package/dist/agent/queue.d.ts +19 -0
- package/dist/agent/queue.d.ts.map +1 -0
- package/dist/agent/queue.js +90 -0
- package/dist/agent/routing.d.ts +27 -0
- package/dist/agent/routing.d.ts.map +1 -0
- package/dist/agent/routing.js +87 -0
- package/dist/agent/structured.d.ts +47 -0
- package/dist/agent/structured.d.ts.map +1 -0
- package/dist/agent/structured.js +90 -0
- package/dist/agent/turn.d.ts +65 -0
- package/dist/agent/turn.d.ts.map +1 -0
- package/dist/agent/turn.js +187 -0
- package/dist/agent/types.d.ts +226 -0
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent/types.js +9 -0
- package/dist/backend.d.ts +18 -5
- package/dist/backend.d.ts.map +1 -1
- package/dist/backends/claude.d.ts +5 -0
- package/dist/backends/claude.d.ts.map +1 -1
- package/dist/backends/claude.js +45 -17
- package/dist/backends/codex.d.ts +4 -0
- package/dist/backends/codex.d.ts.map +1 -1
- package/dist/backends/codex.js +14 -9
- package/dist/backends/custom.d.ts.map +1 -1
- package/dist/backends/custom.js +3 -2
- package/dist/backends/opencode.d.ts +4 -0
- package/dist/backends/opencode.d.ts.map +1 -1
- package/dist/backends/opencode.js +5 -1
- package/dist/backends/pi.d.ts +5 -2
- package/dist/backends/pi.d.ts.map +1 -1
- package/dist/backends/pi.js +15 -3
- package/dist/config-catalog.d.ts +173 -0
- package/dist/config-catalog.d.ts.map +1 -0
- package/dist/config-catalog.js +408 -0
- package/dist/index.d.ts +11 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -1
- package/dist/interactive.d.ts +4 -5
- package/dist/interactive.d.ts.map +1 -1
- package/dist/protocol-coverage.d.ts +82 -0
- package/dist/protocol-coverage.d.ts.map +1 -1
- package/dist/protocol-coverage.js +76 -0
- package/dist/registry.d.ts +12 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +22 -0
- package/dist/routing.d.ts +14 -0
- package/dist/routing.d.ts.map +1 -0
- package/dist/routing.js +53 -0
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +9 -68
- package/dist/session-ref.d.ts +8 -0
- package/dist/session-ref.d.ts.map +1 -0
- package/dist/session-ref.js +21 -0
- package/dist/structured-tool.d.ts +4 -0
- package/dist/structured-tool.d.ts.map +1 -1
- package/dist/structured-tool.js +5 -0
- package/dist/system-prompt.d.ts +13 -0
- package/dist/system-prompt.d.ts.map +1 -0
- package/dist/system-prompt.js +67 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ This is the layer `@automatalabs/workflows` and `@automatalabs/mcp-server` are b
|
|
|
6
6
|
|
|
7
7
|
## Most users want `@automatalabs/workflows`
|
|
8
8
|
|
|
9
|
-
If you are orchestrating a workflow, use [`@automatalabs/workflows`](../workflows) instead — it re-exports `createAcpRunner` and wires it into the engine for you. Reach for this package directly only when you want to drive a **single** ACP agent yourself or need the low-level auth/session lifecycle APIs.
|
|
9
|
+
If you are orchestrating a workflow, use [`@automatalabs/workflows`](../workflows) instead — it re-exports `createAcpRunner` and wires it into the engine for you. Reach for this package directly only when you want to drive a **single** ACP agent yourself (`run()`, or the held-open [`AcpAgent` SDK](#acpagent--the-sdk-front-door)) or need the low-level auth/session lifecycle APIs.
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
npm install @automatalabs/acp-agents
|
|
@@ -48,7 +48,7 @@ try {
|
|
|
48
48
|
}
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
`run()` accepts the full `RunOptions` seam: `schema`, `model`, `mode`, `configOptions`, `tier`, `cwd`, `instructions`, `label`, `signal` (cancellation), `toolNames` / `disallowedToolNames`, `maxSchemaRetries`, `mcpServers`, `images` (see below), `runId`, `backends`, `meta` / `promptMeta`,
|
|
51
|
+
`run()` accepts the full `RunOptions` seam: `schema`, `model`, `mode`, `configOptions`, `tier`, `cwd`, `instructions`, `label`, `signal` (cancellation), `toolNames` / `disallowedToolNames`, `maxSchemaRetries`, `mcpServers`, `images` (see below), `runId`, `backends`, `meta` / `promptMeta`, the backend-neutral `systemPrompt` instructions, session hand-off fields, and telemetry callbacks. See `@automatalabs/shared-types` for the field-by-field contract.
|
|
52
52
|
|
|
53
53
|
Aborting `signal` sends ACP `session/cancel` for that session. If its active turn does not settle
|
|
54
54
|
within five seconds, the client sends `session/close` when the agent advertised it and quarantines
|
|
@@ -95,21 +95,30 @@ await runner.run("What's in this screenshot?", {
|
|
|
95
95
|
});
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
###
|
|
98
|
+
### System prompt instructions (`systemPrompt`)
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
`systemPrompt` (a `SystemPromptOptions` from `@automatalabs/shared-types`) is the one backend-neutral way to shape the agent's system prompt for a session — on `run()`, `openSession()`, and the `AcpAgent` SDK alike. `replace` swaps the backend's built-in system prompt for your text; `append` adds your text on top of it. Each backend carries the two halves on its own session `_meta` channel (`session/new`, and `session/resume` / `session/load` / the reattach of an id-only fork):
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
| backend | `replace` | `append` | wire |
|
|
103
|
+
|---|---|---|---|
|
|
104
|
+
| `codex` | replaces Codex's base system prompt | developer-role instructions on top of it | the bare `baseInstructions` / `developerInstructions` keys on `_meta` → the Codex `thread/start` / `thread/resume` params of the same name ([`@automatalabs/codex-acp`](https://www.npmjs.com/package/@automatalabs/codex-acp)) |
|
|
105
|
+
| `claude` | replaces the whole prompt | appended to the adapter's `claude_code` preset | `_meta.systemPrompt`: a string for `replace`, `{ append }` for `append`; both together are sent as one replacement string (replaced prompt, blank line, appended text) because the adapter has no custom-base-plus-append form |
|
|
106
|
+
| `pi` | pi's custom-prompt slot (the `SYSTEM.md` / `--system-prompt` slot) | one more append entry after the operator's own | `_meta.systemPrompt` `{ replace?, append? }` verbatim ([`@automatalabs/pi-acp`](https://www.npmjs.com/package/@automatalabs/pi-acp) advertises `_meta.systemPrompt: { replace: true, append: true }` at initialize) |
|
|
107
|
+
| `opencode` | — | — | `opencode acp` reads no session `_meta`; system prompts live in OpenCode's own config and agent definitions, so there is no system-prompt channel |
|
|
108
|
+
| custom | — | — | ACP has no standard key; send your agent's own `_meta` through `meta` |
|
|
104
109
|
|
|
105
|
-
|
|
110
|
+
Support is validated **before a session opens**: a field the routed backend cannot carry is a non-recoverable `SCRIPT_VALIDATION_ERROR` naming the backend and the field, never a silent no-op, and so is a non-object, an unknown field, or a blank string. `systemPrompt` is additive (never part of the resume identity) and wins over the same key in the generic `meta` passthrough; a backend's own extras (Claude's `excludeDynamicSections`, say) still travel through `meta` when the option is not used. Note this is distinct from the `instructions` string, which is folded into the prompt text for every backend.
|
|
106
111
|
|
|
107
112
|
```ts
|
|
108
113
|
await runner.run("Cut the release.", {
|
|
109
114
|
model: "codex/gpt-5.6-sol",
|
|
110
115
|
cwd: "/abs/path/to/worktree",
|
|
111
|
-
|
|
112
|
-
|
|
116
|
+
systemPrompt: { replace: "You are a release bot. Only touch CHANGELOG.md.", append: "Prefer conventional-commit summaries." },
|
|
117
|
+
});
|
|
118
|
+
await runner.run("Summarize the diff.", {
|
|
119
|
+
model: "claude/opus",
|
|
120
|
+
cwd: "/abs/path/to/worktree",
|
|
121
|
+
systemPrompt: { append: "Answer in at most three sentences." },
|
|
113
122
|
});
|
|
114
123
|
```
|
|
115
124
|
|
|
@@ -228,6 +237,43 @@ try {
|
|
|
228
237
|
}
|
|
229
238
|
```
|
|
230
239
|
|
|
240
|
+
## AcpAgent — the SDK front door
|
|
241
|
+
|
|
242
|
+
`AcpAgent` is the held-open counterpart of `run()`: one **dedicated** ACP process per agent (and per fork), a lazy constructor that spawns nothing until the first call, turns that serialize in a per-agent FIFO, live `fork()`s that see everything the parent committed so far, and cold reopen of a recorded session from its `AgentSessionRef`. It composes the same primitives as the runner and `InteractiveSession` (`PooledConnection`, `SessionHandle`, the backends, the routing grammar, the structured-output tool host) and owns no pool, so a parent's `close()` never affects its forks. The full reference — options, the turn shape, the abort table, forks, cold reopen, structured output, events, discovery, errors — is [docs/api.md — AcpAgent SDK](../../docs/api.md#acpagent-sdk).
|
|
243
|
+
|
|
244
|
+
```ts
|
|
245
|
+
import { AcpAgent } from "@automatalabs/acp-agents";
|
|
246
|
+
|
|
247
|
+
const catalog = await AcpAgent.probe({ modelFilter: "opus" }); // no-prompt catalog, one process per target
|
|
248
|
+
const primary = new AcpAgent({ cwd: "/abs/path/to/worktree", model: "claude/opus[1m]" }); // spawns nothing yet
|
|
249
|
+
primary.on("agent_message_chunk", (e) => { // this agent's events only
|
|
250
|
+
if (e.content.type === "text") process.stdout.write(e.content.text);
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
const turn = await primary.prompt("Investigate the failing test.");
|
|
254
|
+
turn.response; // the verbatim PromptResponse, `_meta` intact
|
|
255
|
+
turn.updates; turn.raw; turn.toolCalls; // every update / vendor notification / folded tool call of the turn
|
|
256
|
+
turn.usage.turn; turn.usage.session; // this turn's tokens; the agent's running sum
|
|
257
|
+
|
|
258
|
+
const planner = await primary.fork(); // a NEW process seeded with the transcript so far
|
|
259
|
+
const plan = await planner.prompt("Plan the smallest fix.", {
|
|
260
|
+
mode: "plan", // sticky: applies to this and every later turn of `planner`
|
|
261
|
+
meta: { trace: "plan-1" }, // turn `_meta`, passed through verbatim
|
|
262
|
+
});
|
|
263
|
+
await primary.prompt("Meanwhile, list the callers."); // the parent keeps going, unaffected
|
|
264
|
+
|
|
265
|
+
await planner.close();
|
|
266
|
+
await primary.close({ keep: true }); // process disposed; the session stays re-openable
|
|
267
|
+
// The same session on a fresh process: the ref carries no model, so pass the agent's back. `resume` replays
|
|
268
|
+
// nothing (history/text start empty) — `AcpAgent.load(ref)` replays the transcript instead.
|
|
269
|
+
const again = await AcpAgent.resume(primary.sessionRef!, { model: primary.model });
|
|
270
|
+
await again.close();
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
`prompt`, `fork`, `setMode`, `setConfigOptions`, and `close` run FIFO per agent, so a fork always sees a quiescent, fully persisted parent transcript. `steer()` and `cancel()` overlap the queue: `steer()` injects into the turn in flight (`_session/steering`) and rejects when nothing is in flight; `cancel()` sends one `session/cancel` for the turn whose `session/prompt` is on the wire (a turn that has started but is still opening the session or applying its per-turn options is not reached — a per-call `signal` covers that window) and, when the agent ignores it for the grace period, disposes the process **without** a wire `session/close` so `sessionRef` stays re-openable. `prompt()` resolves a turn for every `PromptResponse` the wire returned — no `stopReason` is thrown on — and rejects only on a wire rejection, validation, abort (`signal.reason` untouched), a closed agent, or a typed session failure (then with the complete turn attached as `error.turn`; narrow with `isAcpAgentTurnError`).
|
|
274
|
+
|
|
275
|
+
`fork()` follows the backend's `FORK_SESSION_TRAITS` row ([the table under Session handoff](#what-a-sessionfork-response-is-fork_session_traits)) instead of probing: on the `id-only` backends (Claude, Codex) the child releases the bare fork handle with `keepOpen` and reattaches the new id (`session/resume`, else `session/load`) before its first turn, so the wire order is always `session/fork` < `session/resume` < `session/prompt`; on the `live` backends (pi, OpenCode) the fork handle is the session. Claude forks must keep the source cwd; a custom entry wrapping claude-agent-acp or codex-acp must declare `fork: { disposition: "id-only" }`. A per-turn `schema` is accepted only on Codex (whose schema rides each turn's `_meta.outputSchema`); every other backend binds the schema at session open, so pass it to the constructor. `AcpAgent.probe()` returns the same `HarnessConfigReport` as `probeHarnessConfig` plus a `models` view, and keeps the bare harness catalog next to a failed exact-model probe.
|
|
276
|
+
|
|
231
277
|
## Authentication lifecycle
|
|
232
278
|
|
|
233
279
|
The built-in runner is auth-capable without widening the minimal `AgentRunner` interface.
|
|
@@ -260,6 +306,29 @@ transcript usage is baselined away, so only continuation-turn usage is reported.
|
|
|
260
306
|
never opens the fresh fallback. The runner also exposes `listSessions()` and `deleteSession()` where
|
|
261
307
|
advertised; inspect `reopen` rather than assuming every ACP agent persists state.
|
|
262
308
|
|
|
309
|
+
### What a `session/fork` response is (`FORK_SESSION_TRAITS`)
|
|
310
|
+
|
|
311
|
+
`forkSession()` returns whatever the agent answered, and the answer differs per adapter. `FORK_SESSION_TRAITS`
|
|
312
|
+
pins each built-in's disposition from its source: `id-only` forks (Claude, Codex) name a persisted copy that is
|
|
313
|
+
not live — Claude answers `{ sessionId }` alone and prompting it fails with "Session not found"; Codex installs
|
|
314
|
+
state but unsubscribes the forked thread — so they must be reopened (`session/resume`, else `session/load`)
|
|
315
|
+
before their first turn; `live` forks (pi; OpenCode by live verification) are the session. `fork cwd` says
|
|
316
|
+
whether the fork may re-home (Claude's transcript store is keyed by the source cwd).
|
|
317
|
+
|
|
318
|
+
| agent | `session/fork` disposition | reattach | fork cwd |
|
|
319
|
+
|---|---|---|---|
|
|
320
|
+
| `claude` | `id-only` | `resume-or-load` | `source-only` |
|
|
321
|
+
| `codex` | `id-only` | `resume-or-load` | `free` |
|
|
322
|
+
| `opencode` | `live` | `none` | `free` |
|
|
323
|
+
| `pi` | `live` | `none` | `free` |
|
|
324
|
+
|
|
325
|
+
`forkSessionTrait(agent, declared?)` resolves a row — a built-in's own, the row a custom backend's `fork`
|
|
326
|
+
declaration describes (a declaration always wins over a name that shadows a built-in), else
|
|
327
|
+
`FORK_SESSION_TRAIT_DEFAULT` (`live` / `free`, the plain ACP contract). Custom entries that wrap
|
|
328
|
+
claude-agent-acp or codex-acp must declare `fork: { disposition: "id-only" }`.
|
|
329
|
+
|
|
330
|
+
`PROMPT_USAGE_SCOPES` pins that `PromptResponse.usage` is per-turn on every built-in (the SDK's `Usage` doc says "across session"; the installed adapters report the turn), so a session total is your own running sum of turn reports — `UsageAccumulator.recordPromptUsage` replaces, never sums. `promptUsageScope(agent)` answers `"turn"` for built-ins and custom agents alike. Both tables are probed in the installed Claude/Codex/pi dists by the protocol coverage suite.
|
|
331
|
+
|
|
263
332
|
## Listening in: live ACP events
|
|
264
333
|
|
|
265
334
|
`AcpAgentRunner` is also a typed event bus — `runner.on(name, listener)` bubbles up the live ACP stream of every run (streaming text, tool calls, usage, permissions, elicitations). Event names are the ACP `sessionUpdate` discriminants (`agent_message_chunk`, `tool_call`, `usage_update`, …) plus the cross-cutting `session_update` (catch-all), `permission_pending`, `permission_request`, `elicitation_pending`, `elicitation_request`, `elicitation_complete`, `raw_message`, `steering`, `session_open` / `session_close`, and `backend_error`. Each payload carries a `{ sessionId, backendId, label?, runId?, callIndex?, initializeMeta? }` context envelope (a pooled runner multiplexes many runs at once). `steering` carries `{ response }` with the complete raw server response after a resolved request, never the request prompt content or request metadata. `permission_pending` / `elicitation_pending` are resolver-only and carry `{ request }` before the host resolver is invoked; `permission_request` / `elicitation_request` fire exactly once with the final `{ request, outcome }` returned to the agent; `elicitation_complete` carries `{ notification }` for URL completions. `on()` / `once()` return an unsubscribe thunk; `off()` and `removeAllListeners()` round it out. Listeners are best-effort observers — a throwing listener never affects the run.
|
|
@@ -294,17 +363,21 @@ From [`src/index.ts`](./src/index.ts):
|
|
|
294
363
|
- **Auth/provider lifecycle methods** — `describeAuthMethods()`, `completeAuth()`, `runner.auth`, `authMethods()`, `authenticate()`, `listProviders()`, `setProvider()`, `disableProvider()`, and `logout()`; see [docs/api.md](../../docs/api.md) for capability gating and installed adapter support. A successful `setProvider()` records a durable routing intent (`ProviderStore`) replayed on every fresh connection's `initialize` — provider config is in-process agent state for e.g. codex-acp, so record → recycle → replay is what makes it stick across the pool.
|
|
295
364
|
- **Session lifecycle methods** — `listSessions()`, `deleteSession()`, `loadSession()`, `resumeSession()`, and `forkSession()` for backends that advertise session persistence; see [docs/api.md](../../docs/api.md).
|
|
296
365
|
- **`InteractiveSession` / `InteractiveSessionOptions` / `InteractiveTurn` / `SteeringResponse`** — the held-open multi-turn session surface returned by `openSession()`; `InteractiveSession.steer()` is available only while its original `prompt()` is in flight and returns the raw extension response.
|
|
366
|
+
- **`AcpAgent`** (+ `AcpAgentOptions`, `AcpAgentPromptOptions`, `AcpAgentTurn`, `AcpAgentForkOptions`, `AcpAgentReopenOptions`, `AcpAgentProbeOptions`, `AcpAgentCatalog`, `AcpAgentState`, `AcpAgentTurnError` / `isAcpAgentTurnError`) — the SDK-style front door: one dedicated ACP process per agent, a per-agent FIFO (`prompt`/`fork`/`setMode`/`setConfigOptions`/`close` serialize behind the in-flight turn; `steer`/`cancel` overlap it), verbatim per-turn results (`turn.response` incl. `_meta`, every `updates`/`raw` record, folded `toolCalls`, per-turn `usage`), live `fork()` on a new process following the backend's `FORK_SESSION_TRAITS` row (id-only backends are reattached before their first turn), `close({ keep })`, `Symbol.asyncDispose`, the cold statics `AcpAgent.resume/load/fork(ref)` routed by `ref.backendId` (never the default backend), and `AcpAgent.probe()` — the same catalog `probeHarnessConfig` produces, on one disposed process per target. A typed session failure rejects `prompt()` with the runner's mapped `WorkflowError` carrying the complete turn as `error.turn`. Quick start above; full reference in [docs/api.md](../../docs/api.md#acpagent-sdk). `@automatalabs/workflows` re-exports the class, `isAcpAgentTurnError`, and the types.
|
|
297
367
|
- **`ProbeConfigOptionsOptions` / `ProbedConfigOptions` / `SessionConfigOption`** — the no-prompt probe controls, routed result, and verbatim ACP advertised-option wire shape.
|
|
368
|
+
- **`probeHarnessConfig` / `buildHarnessModelsView` / `buildHarnessConfigSummary`** — the token-free harness config catalog (moved here from `@automatalabs/workflows`, which re-exports it): one no-prompt session per requested harness resolving to a `HarnessConfigReport` (`ValidateHarnessOptions[]` plus the bounded `authoringSummary`), the `--models` view builders (`buildModelFilter`, `selectChoicePairs`, `summarizeSelectChoices`), `formatHarnessConfigSummary`, and the `ValidateProbeRunner` seam a host passes as `probeRunner` to reuse its own live runner.
|
|
298
369
|
- **`BUILTIN_BACKENDS` / `ThoughtLevelDomainSemantics`** — the built-in registry declares whether each backend's thought-level values are an `"ordered"` ladder (Claude, Codex, Pi) or an `"exact-set"` (OpenCode). `builtinThoughtLevelDomainSemantics(id)` performs an exact lookup; an absent row means a custom/unknown backend and must be handled as `"exact-set"`.
|
|
299
370
|
- **`AcpRunnerOptions.onElicitation`** — runner-wide ACP elicitation responder; sessions can override with `InteractiveSessionOptions.onElicitation`.
|
|
300
371
|
- **`selectBackend({ model, tier }, registry?)`** — deterministic first-segment routing; registered custom names take priority, then the four built-ins, otherwise the configured default.
|
|
372
|
+
- **`resolveModelRoute(spec, registry?)` / `ModelRoute`** — the same routing with the verbatim model value kept: `{ backend, modelSpec }`, where `modelSpec` is the text after the routed first segment (`undefined` for a backend-only spec) or the whole spec when nothing routed. `selectBackend` is `resolveModelRoute(model ?? tier).backend`.
|
|
301
373
|
- **`ClaudeBackend` / `CodexBackend` / `OpenCodeBackend` / `PiBackend`** — the four built-in backend strategies (spawn config + per-backend schema/auth wiring). OpenCode is host-resolved rather than bundled; pi uses bundled `@automatalabs/pi-acp`.
|
|
302
|
-
- **`CustomAcpBackend` / `resolveBackendRegistry` / `BACKENDS_ENV`** — the custom-backend registry: run **any** ACP agent as a named backend via `createAcpRunner({ backends: { name: { command, args?, env?, sessionMeta?, structuredOutputTool? } } })` or the `AGENTPRISM_BACKENDS` env var (JSON, same shape; the option wins per name; names may shadow built-ins). Custom backends carry a `schema` as turn-level `_meta.outputSchema` and read the result off the final message as JSON. No host-side vendor capability declaration is required.
|
|
374
|
+
- **`CustomAcpBackend` / `resolveBackendRegistry` / `BACKENDS_ENV`** — the custom-backend registry: run **any** ACP agent as a named backend via `createAcpRunner({ backends: { name: { command, args?, env?, sessionMeta?, structuredOutputTool?, fork? } } })` or the `AGENTPRISM_BACKENDS` env var (JSON, same shape; the option wins per name; names may shadow built-ins). `fork?` (`CustomBackendForkConfig`, `{ disposition: "id-only" | "live", cwd?: "source-only" | "free" }`) declares how the agent answers `session/fork` — see `FORK_SESSION_TRAITS` above; omitted means `live`/`free`. Custom backends carry a `schema` as turn-level `_meta.outputSchema` and read the result off the final message as JSON. No host-side vendor capability declaration is required.
|
|
303
375
|
- **Auth contracts and lifecycle** — `AuthStore`, `BackendAuthMachine`, `buildAuthDescriptors`, the built-in auth profiles, and the `AuthContext` / `AuthResolution` / `AuthMethodDescriptor` / `AuthCapableRunner` types.
|
|
304
376
|
- **Permission APIs** — `PermissionResolver` parks a request for an async host decision; `selectPermissionOption(request, optionId)` validates one exact advertised option. `decidePermission` remains the SDK/headless auto-policy. Provider effects and persistence are never inferred from labels, `kind`, or response metadata.
|
|
305
377
|
- **`clientCapabilitiesFor` + the `ClientHandlers` / `FsHandlers` / `TerminalHandlers` / `AcpSessionContext` types** — the client-side fs/terminal interposition surface (see above).
|
|
306
378
|
- **`negotiateCapabilities` / `adaptPromptContent` / `unsupportedMcpServer` + `NegotiatedCapabilities`** — the standard ACP capability-negotiation primitives; the negotiated record for a live connection is exposed on `PooledConnection.capabilities`, with vendor initialize metadata retained only as raw `initializeMeta`.
|
|
307
379
|
- **`AGENT_METHOD_COVERAGE` / `CLIENT_METHOD_COVERAGE` / `ACP_EXTENSION_SUPPORT_MATRIX`** — manifests classifying the installed ACP SDK method surface and documenting built-in vendor-extension advertisements. The extension matrix is evidence for probes and never routes runtime behavior.
|
|
380
|
+
- **`FORK_SESSION_TRAITS` / `FORK_SESSION_TRAIT_DEFAULT` / `forkSessionTrait(agent, declared?)`** and **`PROMPT_USAGE_SCOPES` / `promptUsageScope(agent)`** — the per-built-in `session/fork` disposition table and the per-turn `PromptResponse.usage` scope pin (see [Session handoff](#session-handoff)); both also ride each `BUILTIN_PROTOCOL_COVERAGE` row as `fork` / `promptUsage`. Executable data probed in the installed adapter dists, never a runtime branch.
|
|
308
381
|
- **`toJsonSchema(schema)` / `toStrictJsonSchema(schema)`** — turn a typebox schema into on-the-wire shapes: plain JSON Schema for Claude and the Pi/OpenCode injected HTTP MCP tool, and an OpenAI-strict-normalized schema for Codex `outputSchema`. Pi retains the common prompt/validated-last-text fallback.
|
|
309
382
|
|
|
310
383
|
Also exported: `AcpAgentPool` / `resolvePoolSize` (including the same deadline-only `forceKill()` emergency path), `PooledConnection` / `SessionHandle`, `decidePermission`, `UsageAccumulator`, `resolveStructuredOutput` / `extractValidated` / `findJsonBlock` / `validateValue`, `errorText` / `mapThrownError`, and the event surface `TypedEventEmitter` / `AcpRunnerEventMap` / `AcpEventName` / `AcpEventListener` / `AcpEventContext` / `AcpSessionUpdate` (+ the per-event payload types, including `AcpPermissionPendingEvent`), plus their associated types.
|
|
@@ -314,7 +387,7 @@ Also exported: `AcpAgentPool` / `resolvePoolSize` (including the same deadline-o
|
|
|
314
387
|
| Variable | Effect |
|
|
315
388
|
| --- | --- |
|
|
316
389
|
| `AGENTPRISM_DEFAULT_BACKEND` | Backend for specs whose first segment is not registered (`claude`, `codex`, `opencode`, `pi`, or a registered custom name; unknown values fall back to Claude). |
|
|
317
|
-
| `AGENTPRISM_BACKENDS` | Custom ACP backends as JSON: `{"<name>": {"command": "…", "args": […], "env": {…}, "sessionMeta": {…}, "structuredOutputTool": true}}
|
|
390
|
+
| `AGENTPRISM_BACKENDS` | Custom ACP backends as JSON: `{"<name>": {"command": "…", "args": […], "env": {…}, "sessionMeta": {…}, "structuredOutputTool": true, "fork": { "disposition": "id-only" }}}` (`fork` optional; declare `id-only` for entries wrapping claude-agent-acp or codex-acp). |
|
|
318
391
|
| `AGENTPRISM_ACP_INIT_TIMEOUT_MS` | Deadline (default `60000`) for a backend's one-time ACP `initialize` handshake — a non-ACP command fails fast instead of hanging. |
|
|
319
392
|
| `AGENTPRISM_ACP_POOL_SIZE` | Long-lived processes to keep per backend (default `1`). |
|
|
320
393
|
| `AGENTPRISM_CLAUDE_ACP_CMD` / `AGENTPRISM_CLAUDE_ACP_ARGS` | Override the command (and args) used to spawn the Claude ACP server. |
|
package/dist/acp-client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AuthenticateRequest, type AuthenticateResponse, type AuthMethod, type CreateElicitationResponse, type ContentBlock, type AgentNotificationMethod, type AgentNotificationParamsByMethod, type AgentRequestMethod, type AgentRequestParamsByMethod, type AgentRequestResponsesByMethod, type DeleteSessionRequest, type DisableProviderRequest, type DisableProviderResponse, type ListSessionsRequest, type ListSessionsResponse, type ListProvidersRequest, type ListProvidersResponse, type LogoutRequest, type LogoutResponse, type PromptRequest, type PromptResponse, type RequestPermissionResponse, type SendRequestOptions, type SessionConfigOption, type SessionModeState, type SessionNotification, type SetProviderRequest, type SetProviderResponse, type SetSessionConfigOptionRequest, type SetSessionConfigOptionResponse, type SetSessionModeRequest, type SetSessionModeResponse } from "@agentclientprotocol/sdk";
|
|
2
2
|
import type { TSchema } from "typebox";
|
|
3
|
-
import { type AgentHistoryEntry, type McpServerConfig } from "@automatalabs/shared-types";
|
|
3
|
+
import { type AgentHistoryEntry, type McpServerConfig, type SystemPromptOptions } from "@automatalabs/shared-types";
|
|
4
4
|
import type { Backend, BackendId, ProviderErrorMetadata, StructuredSource } from "./backend.js";
|
|
5
5
|
import { type NegotiatedCapabilities } from "./capabilities.js";
|
|
6
6
|
import { type AcpEventSink } from "./events.js";
|
|
@@ -174,6 +174,10 @@ declare class SessionState {
|
|
|
174
174
|
/** The turn's assistant text with the §5 message joiner: deltas of one
|
|
175
175
|
* message concatenate verbatim; distinct messages join with "\n\n". */
|
|
176
176
|
foldedTurnText(): string;
|
|
177
|
+
/** The whole retained log folded the same way (`foldedTurnText()` from
|
|
178
|
+
* index 0): every retained assistant message, a replayed transcript
|
|
179
|
+
* included, with distinct messages joined by "\n\n". */
|
|
180
|
+
foldedText(): string;
|
|
177
181
|
private foldedTextFrom;
|
|
178
182
|
private markAssistantMessageBoundary;
|
|
179
183
|
private beginAssistantMessageChunk;
|
|
@@ -324,10 +328,10 @@ export interface AcpSessionOptions {
|
|
|
324
328
|
label?: string;
|
|
325
329
|
/** `RunOptions.callIndex`, propagated onto emitted events as context. NOT sent on the wire. */
|
|
326
330
|
callIndex?: number;
|
|
327
|
-
/**
|
|
328
|
-
* (
|
|
329
|
-
|
|
330
|
-
|
|
331
|
+
/** Backend-neutral system prompt instructions, validated against `Backend.systemPrompt` by the
|
|
332
|
+
* caller (`assertSystemPromptSupported`) before the session opens. The backend folds them into
|
|
333
|
+
* its own `_meta` dialect on new/resume/load/fork. Omitted => the backend's built-in prompt. */
|
|
334
|
+
systemPrompt?: SystemPromptOptions;
|
|
331
335
|
/** Retain accumulated assistant text/tool history for the lifetime of this ACP session.
|
|
332
336
|
* Default true preserves run()'s diagnostic history contract. Held-open interactive sessions
|
|
333
337
|
* pass false because hosts stream live events / keep their own transcript; retaining old turns
|
|
@@ -635,7 +639,18 @@ export declare class SessionHandle implements StructuredSource {
|
|
|
635
639
|
private applyConfigOption;
|
|
636
640
|
/** Switch the session's operating mode through ACP's strict confinement channel. */
|
|
637
641
|
setMode(modeId: string): Promise<void>;
|
|
638
|
-
/**
|
|
642
|
+
/**
|
|
643
|
+
* The wire outcome of a prompt turn: the verbatim `PromptResponse` plus the terminal typed
|
|
644
|
+
* session failure it carried, if any. Never throws for a typed failure — the response (its
|
|
645
|
+
* `_meta`, `usage`, `stopReason`) is handed back alongside the parsed failure so a caller can
|
|
646
|
+
* keep everything the turn produced. `prompt()` is this plus the throw the runner relies on.
|
|
647
|
+
*/
|
|
648
|
+
promptOutcome(content: string | ContentBlock[], promptMeta?: Record<string, unknown>): Promise<{
|
|
649
|
+
response: PromptResponse;
|
|
650
|
+
failure?: TypedSessionFailure;
|
|
651
|
+
}>;
|
|
652
|
+
/** Send a prompt turn and drain it; returns the final PromptResponse. A terminal typed session
|
|
653
|
+
* failure is raised as the mapped `WorkflowError` (see `promptOutcome` for the non-throwing split). */
|
|
639
654
|
prompt(content: string | ContentBlock[], promptMeta?: Record<string, unknown>): Promise<PromptResponse>;
|
|
640
655
|
/**
|
|
641
656
|
* The typed session failure that ended this turn, if any (codex-acp's negotiated extension —
|
|
@@ -667,6 +682,11 @@ export declare class SessionHandle implements StructuredSource {
|
|
|
667
682
|
* assistant MESSAGES join with "\n\n" (the result fold the runner
|
|
668
683
|
* returns; consecutive chunks of one message join with ""). */
|
|
669
684
|
foldedTurnText(): string;
|
|
685
|
+
/** The retained session log's assistant text with the same message
|
|
686
|
+
* joiner as `foldedTurnText()`, over the whole log (a `session/load`
|
|
687
|
+
* replay included). What `AcpAgent.text` reads; `text` stays the raw
|
|
688
|
+
* chunk concatenation. */
|
|
689
|
+
foldedText(): string;
|
|
670
690
|
/** StructuredSource — the latest turn's FINAL assistant message (see SessionState). */
|
|
671
691
|
finalMessageText(): string;
|
|
672
692
|
/** StructuredSource — Claude's raw structured_output for the latest turn, if any. */
|
package/dist/acp-client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acp-client.d.ts","sourceRoot":"","sources":["../src/acp-client.ts"],"names":[],"mappings":"AAyBA,OAAO,EAOL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EAQf,KAAK,yBAAyB,EAC9B,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,EAGlC,KAAK,oBAAoB,EAEzB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAK5B,KAAK,mBA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
|
|
|
325
325
|
foldedTurnText() {
|
|
326
326
|
return this.foldedTextFrom(this.turnStartIndex);
|
|
327
327
|
}
|
|
328
|
+
/** The whole retained log folded the same way (`foldedTurnText()` from
|
|
329
|
+
* index 0): every retained assistant message, a replayed transcript
|
|
330
|
+
* included, with distinct messages joined by "\n\n". */
|
|
331
|
+
foldedText() {
|
|
332
|
+
return this.foldedTextFrom(0);
|
|
333
|
+
}
|
|
328
334
|
foldedTextFrom(startIndex) {
|
|
329
335
|
let folded = "";
|
|
330
336
|
for (let index = startIndex; index < this.textChunks.length; index += 1) {
|
|
@@ -1410,8 +1416,7 @@ export class PooledConnection {
|
|
|
1410
1416
|
}
|
|
1411
1417
|
sessionRequestMeta(opts) {
|
|
1412
1418
|
const inputs = {
|
|
1413
|
-
|
|
1414
|
-
developerInstructions: opts.developerInstructions,
|
|
1419
|
+
systemPrompt: opts.systemPrompt,
|
|
1415
1420
|
runId: opts.runId,
|
|
1416
1421
|
label: opts.label,
|
|
1417
1422
|
};
|
|
@@ -2260,8 +2265,13 @@ export class SessionHandle {
|
|
|
2260
2265
|
}
|
|
2261
2266
|
this.state.modes = modeStateFromConfigOption(modeOption, modeId);
|
|
2262
2267
|
}
|
|
2263
|
-
/**
|
|
2264
|
-
|
|
2268
|
+
/**
|
|
2269
|
+
* The wire outcome of a prompt turn: the verbatim `PromptResponse` plus the terminal typed
|
|
2270
|
+
* session failure it carried, if any. Never throws for a typed failure — the response (its
|
|
2271
|
+
* `_meta`, `usage`, `stopReason`) is handed back alongside the parsed failure so a caller can
|
|
2272
|
+
* keep everything the turn produced. `prompt()` is this plus the throw the runner relies on.
|
|
2273
|
+
*/
|
|
2274
|
+
async promptOutcome(content, promptMeta) {
|
|
2265
2275
|
this.opts.signal?.throwIfAborted();
|
|
2266
2276
|
this.state.beginTurn();
|
|
2267
2277
|
let resolveEnded;
|
|
@@ -2284,9 +2294,7 @@ export class SessionHandle {
|
|
|
2284
2294
|
const response = await this.pooled.prompt(request);
|
|
2285
2295
|
this.state.usage.recordPromptUsage(response.usage);
|
|
2286
2296
|
const failure = this.terminalTypedSessionFailure(response);
|
|
2287
|
-
|
|
2288
|
-
throw this.typedSessionFailureError(failure);
|
|
2289
|
-
return response;
|
|
2297
|
+
return failure ? { response, failure } : { response };
|
|
2290
2298
|
}
|
|
2291
2299
|
finally {
|
|
2292
2300
|
if (this.activeTurn === turn)
|
|
@@ -2294,6 +2302,14 @@ export class SessionHandle {
|
|
|
2294
2302
|
turn.resolveEnded();
|
|
2295
2303
|
}
|
|
2296
2304
|
}
|
|
2305
|
+
/** Send a prompt turn and drain it; returns the final PromptResponse. A terminal typed session
|
|
2306
|
+
* failure is raised as the mapped `WorkflowError` (see `promptOutcome` for the non-throwing split). */
|
|
2307
|
+
async prompt(content, promptMeta) {
|
|
2308
|
+
const { response, failure } = await this.promptOutcome(content, promptMeta);
|
|
2309
|
+
if (failure)
|
|
2310
|
+
throw this.typedSessionFailureError(failure);
|
|
2311
|
+
return response;
|
|
2312
|
+
}
|
|
2297
2313
|
/**
|
|
2298
2314
|
* The typed session failure that ended this turn, if any (codex-acp's negotiated extension —
|
|
2299
2315
|
* see typed-failures.ts). Two channels, in priority order:
|
|
@@ -2355,6 +2371,13 @@ export class SessionHandle {
|
|
|
2355
2371
|
foldedTurnText() {
|
|
2356
2372
|
return this.state.foldedTurnText();
|
|
2357
2373
|
}
|
|
2374
|
+
/** The retained session log's assistant text with the same message
|
|
2375
|
+
* joiner as `foldedTurnText()`, over the whole log (a `session/load`
|
|
2376
|
+
* replay included). What `AcpAgent.text` reads; `text` stays the raw
|
|
2377
|
+
* chunk concatenation. */
|
|
2378
|
+
foldedText() {
|
|
2379
|
+
return this.state.foldedText();
|
|
2380
|
+
}
|
|
2358
2381
|
/** StructuredSource — the latest turn's FINAL assistant message (see SessionState). */
|
|
2359
2382
|
finalMessageText() {
|
|
2360
2383
|
return this.state.finalMessageText();
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { ContentBlock, SessionConfigOption, SessionModeState } from "@agentclientprotocol/sdk";
|
|
2
|
+
import type { AgentHistoryEntry, AgentSessionRef, AgentUsage } from "@automatalabs/shared-types";
|
|
3
|
+
import type { TSchema } from "typebox";
|
|
4
|
+
import { type SteeringResponse } from "../acp-client.js";
|
|
5
|
+
import type { NegotiatedCapabilities } from "../capabilities.js";
|
|
6
|
+
import { type AcpAgentCatalog, type AcpAgentCloseOptions, type AcpAgentEventListener, type AcpAgentEventName, type AcpAgentForkOptions, type AcpAgentOptions, type AcpAgentProbeOptions, type AcpAgentPromptOptions, type AcpAgentReopenOptions, type AcpAgentState, type AcpAgentSteerOptions, type AcpAgentTurn, type AcpAgentUpdateRecord } from "./types.js";
|
|
7
|
+
/** Package-internal test seam for the ignored-cancel escalation grace. Not barrel-exported. */
|
|
8
|
+
export declare function setCancelGraceForTests(ms: number): () => void;
|
|
9
|
+
/**
|
|
10
|
+
* One ACP agent session on its own dedicated backend process.
|
|
11
|
+
*
|
|
12
|
+
* Lazy: the constructor validates (cwd, `configOptions`, the registry, `clientHandlers`) and
|
|
13
|
+
* routes the backend synchronously but spawns nothing; the first queued operation (an explicit
|
|
14
|
+
* `ready()` or an implicit `prompt()`) opens the session. `state` walks
|
|
15
|
+
* `idle → opening → ready ⇄ busy → closed`.
|
|
16
|
+
*/
|
|
17
|
+
export declare class AcpAgent {
|
|
18
|
+
#private;
|
|
19
|
+
/** The session's absolute working directory (sent on session/new|fork|resume|load). */
|
|
20
|
+
readonly cwd: string;
|
|
21
|
+
/** The human label stamped on event contexts and error `agentLabel`; never on the wire. */
|
|
22
|
+
readonly label: string | undefined;
|
|
23
|
+
/** The model this agent selects at open, as a routing spec that leads back to the same backend
|
|
24
|
+
* (`<backendId>/<model id>`, e.g. `"claude/opus[1m]"`), or `undefined` when no model was
|
|
25
|
+
* selected (the backend's default). Inherited by forks. An `AgentSessionRef` carries no model,
|
|
26
|
+
* so a cold reopen keeps it only when told: `AcpAgent.resume(agent.sessionRef!, { model: agent.model })`. */
|
|
27
|
+
readonly model: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Lazy: validates cwd/configOptions/registry/clientHandlers synchronously, routes the backend,
|
|
30
|
+
* spawns nothing. This is the ONLY public constructor signature — seeded agents (forks, cold
|
|
31
|
+
* reopen) are built by the statics through a module-private factory.
|
|
32
|
+
*/
|
|
33
|
+
constructor(options: AcpAgentOptions);
|
|
34
|
+
/** `new AcpAgent(options)` + `ready()`; on failure the agent is closed and the mapped error rethrown. */
|
|
35
|
+
static open(options: AcpAgentOptions): Promise<AcpAgent>;
|
|
36
|
+
/** No-prompt catalog discovery: the same `HarnessConfigReport` the MCP `action:"config"` is
|
|
37
|
+
* projected from, plus the per-harness `models` view. Never throws for a per-harness failure
|
|
38
|
+
* (`probed: false`); one disposed process per target. */
|
|
39
|
+
static probe(options?: AcpAgentProbeOptions): Promise<AcpAgentCatalog>;
|
|
40
|
+
/** `session/resume` of `ref.sessionId` on a fresh dedicated process of `ref.backendId`
|
|
41
|
+
* (routed by name — never the default backend — and pool-key checked). `cwd` defaults to
|
|
42
|
+
* `ref.cwd`; `model` must stay on the ref's backend. */
|
|
43
|
+
static resume(ref: AgentSessionRef, options?: AcpAgentReopenOptions): Promise<AcpAgent>;
|
|
44
|
+
/** `session/load`: the agent replays the transcript before the response; it lands in
|
|
45
|
+
* `history`/`text`/`replay` (the statics return after the fact, so the replay is observable
|
|
46
|
+
* only there, not through `on()`). */
|
|
47
|
+
static load(ref: AgentSessionRef, options?: AcpAgentReopenOptions): Promise<AcpAgent>;
|
|
48
|
+
/** Cold fork of a recorded session: the trait-driven choreography without a history seed
|
|
49
|
+
* (`history` starts empty on id-only backends unless the reattach fell back to `session/load`).
|
|
50
|
+
* To seed the fork with the transcript: `const src = await AcpAgent.load(ref); await src.fork()`. */
|
|
51
|
+
static fork(ref: AgentSessionRef, options?: AcpAgentReopenOptions): Promise<AcpAgent>;
|
|
52
|
+
/** The resolved backend id (built-in id or registered custom name). */
|
|
53
|
+
get backendId(): string;
|
|
54
|
+
/** `idle` → `opening` → `ready` ⇄ `busy` → `closed` (set the instant `close()` is called,
|
|
55
|
+
* the constructor signal aborts, or the process dies). */
|
|
56
|
+
get state(): AcpAgentState;
|
|
57
|
+
/** The ACP session id once open; retained after close. */
|
|
58
|
+
get sessionId(): string | undefined;
|
|
59
|
+
/** The re-attach handle computed at open (drives `AcpAgent.resume/load/fork`); retained after close. */
|
|
60
|
+
get sessionRef(): AgentSessionRef | undefined;
|
|
61
|
+
/** Capabilities negotiated on this agent's dedicated connection. */
|
|
62
|
+
get capabilities(): NegotiatedCapabilities | undefined;
|
|
63
|
+
/** The latest echoed session config-option catalog (verbatim ACP wire shapes). */
|
|
64
|
+
get configOptions(): readonly SessionConfigOption[];
|
|
65
|
+
/** The agent-advertised mode catalog plus the current mode, when supported. */
|
|
66
|
+
get modes(): SessionModeState | null | undefined;
|
|
67
|
+
/** `[...seed, ...session history]` (copies on read). The seed is the parent's snapshot for a
|
|
68
|
+
* live fork; a `session/load` replay lands in the session history itself. */
|
|
69
|
+
get history(): readonly AgentHistoryEntry[];
|
|
70
|
+
/** Verbatim session/update records received before the session was ready (a fork's
|
|
71
|
+
* pre-response replay, a load's replay), adopted from the acquisition buffer. */
|
|
72
|
+
get replay(): ReadonlyArray<AcpAgentUpdateRecord>;
|
|
73
|
+
/** The retained assistant text — the parent's seed (live fork) and this session's messages —
|
|
74
|
+
* folded exactly like `turn.text`: chunks of one message concatenate, distinct messages join
|
|
75
|
+
* with "\n\n". */
|
|
76
|
+
get text(): string;
|
|
77
|
+
/** Running per-field sum of every turn this agent ran; `ZERO_USAGE` before the first turn. */
|
|
78
|
+
get usage(): AgentUsage;
|
|
79
|
+
/** The session-level structured-output contract, if any. */
|
|
80
|
+
get schema(): TSchema | undefined;
|
|
81
|
+
/** Subscribe. `session_open` is sticky: a listener registered after the session opened receives
|
|
82
|
+
* it once (next microtask); a listener that saw it live never sees it twice. Returns the
|
|
83
|
+
* unsubscribe thunk; after close it is a no-op. */
|
|
84
|
+
on<K extends AcpAgentEventName>(name: K, listener: AcpAgentEventListener<K>): () => void;
|
|
85
|
+
once<K extends AcpAgentEventName>(name: K, listener: AcpAgentEventListener<K>): () => void;
|
|
86
|
+
off<K extends AcpAgentEventName>(name: K, listener: AcpAgentEventListener<K>): void;
|
|
87
|
+
/** Spawn + initialize + session/new|resume|load|fork (idempotent; memoized). The implicit
|
|
88
|
+
* open of the first `prompt()` shares the same promise. */
|
|
89
|
+
ready(): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* One prompt turn, FIFO behind every earlier queued operation. Resolves an `AcpAgentTurn` for
|
|
92
|
+
* EVERY `PromptResponse` the wire returned (no `stopReason` is thrown on — refusal, max_tokens,
|
|
93
|
+
* cancelled included). Rejects only on a wire rejection (mapped like the runner), validation,
|
|
94
|
+
* abort (`signal.reason` untouched), a closed agent, or a typed session failure (the mapped
|
|
95
|
+
* `WorkflowError` carrying the complete turn as `error.turn`; see `isAcpAgentTurnError`).
|
|
96
|
+
* `configOptions`/`mode` are applied before the turn and stick for the session. To stop a
|
|
97
|
+
* specific turn use `options.signal`: it rejects while queued or before the turn reached the
|
|
98
|
+
* wire (nothing is sent) and sends one `session/cancel` once in flight — `cancel()` reaches only
|
|
99
|
+
* a turn already on the wire.
|
|
100
|
+
*/
|
|
101
|
+
prompt(content: string | ContentBlock[], options?: AcpAgentPromptOptions): Promise<AcpAgentTurn>;
|
|
102
|
+
/** Inject content into the turn in flight (`_session/steering`). Overlaps the FIFO; requires a
|
|
103
|
+
* `prompt()` in flight (SCRIPT_VALIDATION_ERROR otherwise). The complete raw response is returned. */
|
|
104
|
+
steer(content: string | ContentBlock[], options?: AcpAgentSteerOptions): Promise<SteeringResponse>;
|
|
105
|
+
/** ONE `session/cancel` for the turn whose `session/prompt` is on the wire (no-op otherwise).
|
|
106
|
+
* Resolves at the notify boundary; the in-flight `prompt()` then resolves with
|
|
107
|
+
* `stopReason: "cancelled"` when the agent honors it. A turn that ignores the cancel for the
|
|
108
|
+
* grace period ends in process disposal WITHOUT a wire `session/close` (the session stays
|
|
109
|
+
* re-openable through `sessionRef`); the turn then rejects and the agent is closed. Queued
|
|
110
|
+
* turns are untouched, and so is a turn that has started (`state === "busy"`) but has not
|
|
111
|
+
* reached the wire yet — the lazy first open, or its per-turn `configOptions`/`mode` — a
|
|
112
|
+
* `cancel()` in that window is a no-op the turn never sees. A per-call `signal` covers every
|
|
113
|
+
* window (rejects with the reason before anything is sent; `session/cancel` once in flight). */
|
|
114
|
+
cancel(): Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
* Fork this agent onto a NEW dedicated process (queued: it runs only when no turn is in flight,
|
|
117
|
+
* so the parent's persisted transcript is complete). Inherits every constructor option except
|
|
118
|
+
* `label` (suffixed `/fork-<n>`) and `signal`; `overrides` may change anything but the backend
|
|
119
|
+
* (`backends`, `authStore`, `providerStore`, `clientHandlers` are typed out; a `model` override
|
|
120
|
+
* must route to the same backend; a `cwd` override is rejected on `source-only` backends). The
|
|
121
|
+
* child's `history`/`text` are seeded from the parent's snapshot on backends whose fork response
|
|
122
|
+
* has no replay. The parent keeps going, unaffected; closing either side never affects the other.
|
|
123
|
+
*/
|
|
124
|
+
fork(overrides?: AcpAgentForkOptions): Promise<AcpAgent>;
|
|
125
|
+
/** `session/set_mode` (queued; strict — an unadvertised id is a SCRIPT_VALIDATION_ERROR). */
|
|
126
|
+
setMode(modeId: string): Promise<void>;
|
|
127
|
+
/** `session/set_config_option` per id in ascending order (queued; sticky; `"model"` reserved;
|
|
128
|
+
* unknown ids rejected against the advertised catalog). */
|
|
129
|
+
setConfigOptions(options: Record<string, string | boolean>): Promise<void>;
|
|
130
|
+
/**
|
|
131
|
+
* Close: `state` becomes `closed` immediately (no new work is admitted), the teardown waits
|
|
132
|
+
* behind queued work, releases the session (`keep: true` skips the wire `session/close` so the
|
|
133
|
+
* agent-persisted session stays re-openable via `sessionRef`), disposes the dedicated process,
|
|
134
|
+
* and releases the structured-output tool. Idempotent (same promise); never throws for an
|
|
135
|
+
* already-dead process; rethrows only a `child_cleanup_error` (mapped, non-recoverable).
|
|
136
|
+
*/
|
|
137
|
+
close(options?: AcpAgentCloseOptions): Promise<void>;
|
|
138
|
+
/** `await using agent = …` — equivalent to `close()`. */
|
|
139
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=acp-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acp-agent.d.ts","sourceRoot":"","sources":["../../src/agent/acp-agent.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAOL,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAwBjE,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EAC1B,MAAM,YAAY,CAAC;AA2BpB,+FAA+F;AAC/F,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,IAAI,CAM7D;AAqFD;;;;;;;GAOG;AACH,qBAAa,QAAQ;;IACnB,uFAAuF;IACvF,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,2FAA2F;IAC3F,QAAQ,CAA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