@automatalabs/acp-agents 2.0.0 → 3.0.1
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 +53 -17
- package/dist/acp-client.d.ts +10 -4
- package/dist/acp-client.d.ts.map +1 -1
- package/dist/acp-client.js +11 -8
- package/dist/agent/acp-agent.d.ts +84 -26
- package/dist/agent/acp-agent.d.ts.map +1 -1
- package/dist/agent/acp-agent.js +458 -170
- package/dist/agent/errors.d.ts +12 -2
- package/dist/agent/errors.d.ts.map +1 -1
- package/dist/agent/errors.js +38 -9
- package/dist/agent/fork.d.ts +7 -5
- package/dist/agent/fork.d.ts.map +1 -1
- package/dist/agent/fork.js +7 -5
- package/dist/agent/messages.d.ts +42 -0
- package/dist/agent/messages.d.ts.map +1 -0
- package/dist/agent/messages.js +225 -0
- package/dist/agent/probe.d.ts +1 -1
- package/dist/agent/probe.d.ts.map +1 -1
- package/dist/agent/probe.js +5 -1
- package/dist/agent/queue.js +2 -2
- package/dist/agent/routing.d.ts +19 -1
- package/dist/agent/routing.d.ts.map +1 -1
- package/dist/agent/routing.js +41 -4
- package/dist/agent/stream.d.ts +21 -0
- package/dist/agent/stream.d.ts.map +1 -0
- package/dist/agent/stream.js +93 -0
- package/dist/agent/structured.d.ts +7 -3
- package/dist/agent/structured.d.ts.map +1 -1
- package/dist/agent/structured.js +24 -14
- package/dist/agent/tool-host.d.ts +34 -0
- package/dist/agent/tool-host.d.ts.map +1 -0
- package/dist/agent/tool-host.js +138 -0
- package/dist/agent/tools.d.ts +26 -0
- package/dist/agent/tools.d.ts.map +1 -0
- package/dist/agent/tools.js +62 -0
- package/dist/agent/turn.d.ts +6 -3
- package/dist/agent/turn.d.ts.map +1 -1
- package/dist/agent/turn.js +15 -67
- package/dist/agent/types.d.ts +174 -25
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/backend.d.ts +4 -3
- package/dist/backend.d.ts.map +1 -1
- package/dist/backends/codex.d.ts +2 -1
- package/dist/backends/codex.d.ts.map +1 -1
- package/dist/backends/codex.js +3 -2
- package/dist/config-catalog.d.ts +4 -0
- package/dist/config-catalog.d.ts.map +1 -1
- package/dist/config-catalog.js +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/local-mcp-host.d.ts +30 -0
- package/dist/local-mcp-host.d.ts.map +1 -0
- package/dist/local-mcp-host.js +151 -0
- package/dist/protocol-coverage.d.ts +8 -6
- package/dist/protocol-coverage.d.ts.map +1 -1
- package/dist/protocol-coverage.js +3 -2
- package/dist/registry.d.ts +3 -3
- package/dist/registry.d.ts.map +1 -1
- package/dist/runner.d.ts +5 -0
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +7 -4
- package/dist/structured-output.d.ts +18 -0
- package/dist/structured-output.d.ts.map +1 -1
- package/dist/structured-output.js +19 -1
- package/dist/structured-tool.d.ts +7 -9
- package/dist/structured-tool.d.ts.map +1 -1
- package/dist/structured-tool.js +14 -102
- package/dist/traits.d.ts +51 -0
- package/dist/traits.d.ts.map +1 -0
- package/dist/traits.js +88 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -101,13 +101,13 @@ await runner.run("What's in this screenshot?", {
|
|
|
101
101
|
|
|
102
102
|
| backend | `replace` | `append` | wire |
|
|
103
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) |
|
|
104
|
+
| `codex` | replaces Codex's base system prompt; its other instruction layers survive — developer instructions, `AGENTS.md` project instructions, environment context — per the app-server protocol's field semantics (documented, not source-verified here) | developer-role instructions on top of it | the bare `baseInstructions` / `developerInstructions` keys on `_meta` → the Codex `thread/start` / `thread/resume` / `thread/fork` params of the same name ([`@automatalabs/codex-acp`](https://www.npmjs.com/package/@automatalabs/codex-acp)); a live Codex fork carries them from its own `session/fork` request (observed live: `replace` takes effect on the forked thread; `append` reaches `thread/fork` but the fork answered from its source thread's developer instructions — Codex behavior) |
|
|
105
|
+
| `claude` | replaces the whole prompt; nothing of the `claude_code` preset survives, its dynamic sections included (tool schemas still reach the model as API tools) | 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); the append entries, project context files (`AGENTS.md` and friends), the skills block, and the cwd line survive, while pi's default tool list, guidelines, and docs paths are dropped | 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
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
108
|
| custom | — | — | ACP has no standard key; send your agent's own `_meta` through `meta` |
|
|
109
109
|
|
|
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.
|
|
110
|
+
Support is validated **before a session opens**: a field the routed backend cannot carry is a non-recoverable `SCRIPT_VALIDATION_ERROR` from `run()` / `openSession()` (`INVALID_ARGUMENT` from the `AcpAgent` SDK) 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.
|
|
111
111
|
|
|
112
112
|
```ts
|
|
113
113
|
await runner.run("Cut the release.", {
|
|
@@ -239,10 +239,11 @@ try {
|
|
|
239
239
|
|
|
240
240
|
## AcpAgent — the SDK front door
|
|
241
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).
|
|
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), adds a per-agent host for client-side function tools, 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, function tools, events, discovery, errors — is [docs/api.md — AcpAgent SDK](../../docs/api.md#acpagent-sdk).
|
|
243
243
|
|
|
244
244
|
```ts
|
|
245
|
-
import { AcpAgent } from "@automatalabs/acp-agents";
|
|
245
|
+
import { AcpAgent, defineTool } from "@automatalabs/acp-agents";
|
|
246
|
+
import { Type } from "typebox";
|
|
246
247
|
|
|
247
248
|
const catalog = await AcpAgent.probe({ modelFilter: "opus" }); // no-prompt catalog, one process per target
|
|
248
249
|
const primary = new AcpAgent({ cwd: "/abs/path/to/worktree", model: "claude/opus[1m]" }); // spawns nothing yet
|
|
@@ -253,14 +254,22 @@ primary.on("agent_message_chunk", (e) => { // this agent's
|
|
|
253
254
|
const turn = await primary.prompt("Investigate the failing test.");
|
|
254
255
|
turn.response; // the verbatim PromptResponse, `_meta` intact
|
|
255
256
|
turn.updates; turn.raw; turn.toolCalls; // every update / vendor notification / folded tool call of the turn
|
|
257
|
+
turn.messages; // the turn per message: text blocks, tool calls, thoughts (agent.messages: the transcript)
|
|
256
258
|
turn.usage.turn; turn.usage.session; // this turn's tokens; the agent's running sum
|
|
257
259
|
|
|
260
|
+
for await (const event of primary.stream("Now fix it.")) { // the same turn as prompt(), as an async iterable
|
|
261
|
+
if (event.type === "agent_message_chunk" && event.content.type === "text") process.stdout.write(event.content.text);
|
|
262
|
+
else if (event.type === "tool_call") console.error(`\n→ ${event.title}`);
|
|
263
|
+
else if (event.type === "turn") console.error("\n", event.turn.stopReason); // the terminal event carries the AcpAgentTurn
|
|
264
|
+
} // `break` cancels the turn (session/cancel) before the loop exits
|
|
265
|
+
|
|
258
266
|
const planner = await primary.fork(); // a NEW process seeded with the transcript so far
|
|
259
267
|
const plan = await planner.prompt("Plan the smallest fix.", {
|
|
260
268
|
mode: "plan", // sticky: applies to this and every later turn of `planner`
|
|
261
269
|
meta: { trace: "plan-1" }, // turn `_meta`, passed through verbatim
|
|
262
270
|
});
|
|
263
271
|
await primary.prompt("Meanwhile, list the callers."); // the parent keeps going, unaffected
|
|
272
|
+
await primary.setModel("claude/sonnet"); // mid-session switch (same backend, sticky); primary.model follows
|
|
264
273
|
|
|
265
274
|
await planner.close();
|
|
266
275
|
await primary.close({ keep: true }); // process disposed; the session stays re-openable
|
|
@@ -268,11 +277,36 @@ await primary.close({ keep: true }); // process disposed
|
|
|
268
277
|
// nothing (history/text start empty) — `AcpAgent.load(ref)` replays the transcript instead.
|
|
269
278
|
const again = await AcpAgent.resume(primary.sessionRef!, { model: primary.model });
|
|
270
279
|
await again.close();
|
|
280
|
+
|
|
281
|
+
// Client-side function tools: hosted by the SDK over HTTP MCP (`agent_tools`), called by the agent mid-turn.
|
|
282
|
+
const lookupTicket = defineTool({
|
|
283
|
+
name: "lookup_ticket", // ^[A-Za-z0-9_-]{1,64}$, unique per agent
|
|
284
|
+
description: "Fetch one ticket from the tracker by id.",
|
|
285
|
+
inputSchema: Type.Object({ id: Type.String({ minLength: 1 }) }),
|
|
286
|
+
async execute({ id }, ctx) { // `id` typed from the schema; ctx.signal aborts with the turn
|
|
287
|
+
const res = await fetch(`https://tracker.internal/api/tickets/${id}`, { signal: ctx.signal });
|
|
288
|
+
if (!res.ok) throw new Error(`ticket ${id}: HTTP ${res.status}`); // → an isError result the agent can read
|
|
289
|
+
return await res.text();
|
|
290
|
+
},
|
|
291
|
+
});
|
|
292
|
+
const tooled = new AcpAgent({
|
|
293
|
+
cwd: "/abs/path/to/worktree",
|
|
294
|
+
model: "pi",
|
|
295
|
+
tools: [lookupTicket], // refused at open (INVALID_ARGUMENT) if the agent has no HTTP MCP
|
|
296
|
+
permissions: { deny: ["Bash"] }, // the headless allow/deny auto-policy
|
|
297
|
+
});
|
|
298
|
+
tooled.on("tool_call", (e) => console.error(e.title)); // pi: mcp__agent_tools__lookup_ticket
|
|
299
|
+
await tooled.prompt("Summarize ticket T-1042.");
|
|
300
|
+
await tooled.close(); // the tool host closes with the agent
|
|
271
301
|
```
|
|
272
302
|
|
|
273
|
-
|
|
303
|
+
Every misuse of the SDK — a bad option, an unadvertised id, a call after `close()` — is a `WorkflowError` with code `INVALID_ARGUMENT` (the runner and `InteractiveSession` keep `SCRIPT_VALIDATION_ERROR`). `agent.traits` (and the spawn-free static `AcpAgent.traits(spec?, { backends? })`) describes the backend as an `AcpAgentTraits`: `custom`, `defaultModeId`, the `fork` row, the `systemPrompt` channel with its `source` (`table` / `advertised` / `none`), `steering` / `loadedTurn`, the `structuredOutput` channel, and `promptUsage` — the tables before open, the agent's own initialize advertisements once the connection is up, and the same object on every probed harness of `AcpAgent.probe()` (`traits`).
|
|
304
|
+
|
|
305
|
+
`prompt`, `stream`, `fork`, `setModel`, `setMode`, `setConfigOptions`, and `close` run FIFO per agent, so a fork always sees a quiescent, fully persisted parent transcript. `setModel(spec)` — and the per-turn `prompt(…, { model })`, applied ahead of that turn's `configOptions` and `mode` — switches the session's model in place: the spec must route to the agent's own backend (`"<backendId>/<model id>"`; otherwise `INVALID_ARGUMENT` naming both backends, before anything is sent) and is applied exactly like open's selection, `session/set_config_option { configId: "model" }` with the routed remainder verbatim (no aliases, catalog matching, or fallback; a wire rejection maps through the normal error path and moves nothing). `agent.model` follows, so a later `fork()` and a cold `AcpAgent.resume(ref, { model: agent.model })` inherit the switch. `stream(content, options?)` is `prompt()` observed as an async iterable of **this turn's** events (each bus event tagged `type`, an update once under its kind, a concurrent `steer()`'s `steering` included, then the terminal `{ type: "turn", turn }`); its observer is attached the instant the turn is dequeued, so a queued stream never sees the previous turn, and leaving it early (`break`, `return()`, `throw()`) cancels the turn and waits for it to settle. `turn.messages` / `agent.messages` fold the same chunks `text` folds into `AcpAgentMessage`s — one assistant message per `text` boundary (tool call, thought, plan, user chunk, changed `messageId`), each with the tool calls it issued and the thoughts that led it; a run of `user_message_chunk`s is a user message. `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`). A schema miss is a result, not an error: `prompt()` is one turn unless `schemaRetries` (constructor or per turn, default `0`) buys repair turns — the runner's own repair prompt (the StructuredOutput-tool variant when the injected tool is active, else the JSON variant) with the validation error, re-sent on the same session inside the same operation with the same turn `_meta`, every repair a real turn (`stream()` yields it, `usage` counts it, `cancel()` reaches it) — and the resolved turn is the final attempt's plus `structuredAttempts`; only an `end_turn` miss is repaired.
|
|
306
|
+
|
|
307
|
+
`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` backend (Claude) 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 (Codex — the workspace fork keeps the forked thread subscribed and publishes its startup state like a resumed session — pi, and OpenCode) the fork handle is the session. The cold `AcpAgent.fork(ref)` prefers `session/load` for its reattach so the child carries the recorded transcript (resume only when load is not advertised). Claude forks must keep the source cwd; a custom entry wrapping claude-agent-acp (or upstream codex-acp, which unsubscribes its forks) 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.
|
|
274
308
|
|
|
275
|
-
`
|
|
309
|
+
`tools` are client-side function tools (`AcpAgentToolDefinition`: `name`, `description`, a typebox object `inputSchema`, `execute(input, ctx)` returning a string, MCP content blocks, or `{ content, isError? }`; `defineTool()` infers the input type). Every agent with tools runs its own local tool host — an in-process Streamable HTTP MCP server on `127.0.0.1` behind a token path — injected into `mcpServers` as `agent_tools` (`agent_tools_2`, … on a name collision) on `session/new|resume|load|fork` and the id-only reattach, next to and separate from the `structured_output` host. Arguments are validated against the schema (typebox Convert + Check) before `execute` runs; a validation failure or a thrown `execute` reaches the agent as an `isError: true` result with the message, never a transport error. Names are validated in the constructor (`INVALID_ARGUMENT` before any spawn); an agent that does not advertise `mcpCapabilities.http` fails the open with `INVALID_ARGUMENT` naming the backend — tools are never silently dropped. `ctx.signal` aborts with the turn (`cancel()`, a per-call signal, the agent's signal, close); forks inherit the tools on a host of their own; the backend surfaces the calls through the normal `tool_call` / `tool_call_update` events (pi: `mcp__agent_tools__<name>`). `permissions` is the headless allow/deny `ToolPolicy`, consulted only when no `onPermissionRequest` resolver is installed.
|
|
276
310
|
|
|
277
311
|
## Authentication lifecycle
|
|
278
312
|
|
|
@@ -309,23 +343,25 @@ advertised; inspect `reopen` rather than assuming every ACP agent persists state
|
|
|
309
343
|
### What a `session/fork` response is (`FORK_SESSION_TRAITS`)
|
|
310
344
|
|
|
311
345
|
`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`
|
|
313
|
-
not live — Claude answers `{ sessionId }` alone and prompting it fails with "Session not found"
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
346
|
+
pins each built-in's disposition from its source: an `id-only` fork (Claude) names a persisted copy that is
|
|
347
|
+
not live — Claude answers `{ sessionId }` alone and prompting it fails with "Session not found" — so it must be
|
|
348
|
+
reopened (`session/resume`, else `session/load`) before its first turn; `live` forks (Codex — the workspace
|
|
349
|
+
fork keeps the forked thread subscribed, `thread/fork` subscribing the connection exactly like `thread/resume`,
|
|
350
|
+
and publishes the fork's available commands and MCP startup status like a resumed session; pi; OpenCode by
|
|
351
|
+
live verification) are the session. `fork cwd` says whether the fork may re-home (Claude's transcript store is
|
|
352
|
+
keyed by the source cwd).
|
|
317
353
|
|
|
318
354
|
| agent | `session/fork` disposition | reattach | fork cwd |
|
|
319
355
|
|---|---|---|---|
|
|
320
356
|
| `claude` | `id-only` | `resume-or-load` | `source-only` |
|
|
321
|
-
| `codex` | `
|
|
357
|
+
| `codex` | `live` | `none` | `free` |
|
|
322
358
|
| `opencode` | `live` | `none` | `free` |
|
|
323
359
|
| `pi` | `live` | `none` | `free` |
|
|
324
360
|
|
|
325
361
|
`forkSessionTrait(agent, declared?)` resolves a row — a built-in's own, the row a custom backend's `fork`
|
|
326
362
|
declaration describes (a declaration always wins over a name that shadows a built-in), else
|
|
327
363
|
`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" }`.
|
|
364
|
+
claude-agent-acp (or upstream codex-acp, which unsubscribes its forks) must declare `fork: { disposition: "id-only" }`.
|
|
329
365
|
|
|
330
366
|
`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
367
|
|
|
@@ -363,7 +399,7 @@ From [`src/index.ts`](./src/index.ts):
|
|
|
363
399
|
- **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.
|
|
364
400
|
- **Session lifecycle methods** — `listSessions()`, `deleteSession()`, `loadSession()`, `resumeSession()`, and `forkSession()` for backends that advertise session persistence; see [docs/api.md](../../docs/api.md).
|
|
365
401
|
- **`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.
|
|
402
|
+
- **`AcpAgent`** (+ `AcpAgentOptions`, `AcpAgentPromptOptions`, `AcpAgentTurn`, `AcpAgentMessage`, `AcpAgentStream` / `AcpAgentStreamEvent`, `AcpAgentForkOptions`, `AcpAgentReopenOptions`, `AcpAgentProbeOptions`, `AcpAgentCatalog`, `AcpAgentState`, `AcpAgentTraits` / `describeBackendTraits`, `AcpAgentTurnError` / `isAcpAgentTurnError`, the function-tool surface `AcpAgentToolDefinition` / `AcpAgentToolContext` / `AcpAgentToolResult` / `defineTool` / `AGENT_TOOLS_SERVER_NAME` / `AGENT_TOOL_NAME_PATTERN`) — the SDK-style front door: one dedicated ACP process per agent, a per-agent FIFO (`prompt`/`stream`/`fork`/`setModel`/`setMode`/`setConfigOptions`/`close` serialize behind the in-flight turn; `steer`/`cancel` overlap it), mid-session model switching (`setModel(spec)` / a per-turn `model`, same backend, sticky, inherited by later forks), verbatim per-turn results (`turn.response` incl. `_meta`, every `updates`/`raw` record, folded `toolCalls`, the per-message `messages` fold, per-turn `usage`), an opt-in `schemaRetries` structured repair ladder (`turn.structuredAttempts`), `stream()` (the turn as an async iterable of its own events plus the terminal turn; an early exit cancels it), live `fork()` on a new process following the backend's `FORK_SESSION_TRAITS` row (id-only backends are reattached before their first turn), client-side function `tools` served from a per-agent HTTP MCP host (`agent_tools`, HTTP-MCP-gated at open), the headless `permissions` policy, `close({ keep })`, `Symbol.asyncDispose`, the cold statics `AcpAgent.resume/load/fork(ref)` routed by `ref.backendId` (never the default backend; `fork(ref)` prefers `session/load` so the child carries the transcript), 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.
|
|
367
403
|
- **`ProbeConfigOptionsOptions` / `ProbedConfigOptions` / `SessionConfigOption`** — the no-prompt probe controls, routed result, and verbatim ACP advertised-option wire shape.
|
|
368
404
|
- **`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.
|
|
369
405
|
- **`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"`.
|
|
@@ -387,7 +423,7 @@ Also exported: `AcpAgentPool` / `resolvePoolSize` (including the same deadline-o
|
|
|
387
423
|
| Variable | Effect |
|
|
388
424
|
| --- | --- |
|
|
389
425
|
| `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). |
|
|
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). |
|
|
426
|
+
| `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 upstream codex-acp). |
|
|
391
427
|
| `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. |
|
|
392
428
|
| `AGENTPRISM_ACP_POOL_SIZE` | Long-lived processes to keep per backend (default `1`). |
|
|
393
429
|
| `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
|
@@ -294,6 +294,10 @@ declare class SessionState {
|
|
|
294
294
|
* release/cancel/death after its ACP session is gone. */
|
|
295
295
|
settlePendingElicitations(): void;
|
|
296
296
|
}
|
|
297
|
+
/** Which reopen method a reattach should take when the agent advertises both: `resume` (no
|
|
298
|
+
* replay — the runner's continuation and the live fork hand-off) or `load` (the transcript is
|
|
299
|
+
* replayed into the handle — the cold `AcpAgent.fork(ref)`). The other is the fallback. */
|
|
300
|
+
export type ReattachPreference = "resume" | "load";
|
|
297
301
|
/** Internal typed sentinel for the continuation path. It is deliberately thrown only after
|
|
298
302
|
* initialize completes and before any session/load or session/resume wire request is sent. */
|
|
299
303
|
export declare class ReattachCapabilityUnavailable extends Error {
|
|
@@ -511,11 +515,13 @@ export declare class PooledConnection {
|
|
|
511
515
|
/** Reserve a session slot before initialize, then let the caller shape session/new with
|
|
512
516
|
* negotiated capabilities in hand. */
|
|
513
517
|
openPreparedSession(prepare: (connection: PooledConnection) => AcpSessionOptions | Promise<AcpSessionOptions>, onReleased?: () => void): Promise<SessionHandle>;
|
|
514
|
-
/** Reserve one connection slot, await initialize, choose the
|
|
515
|
-
*
|
|
516
|
-
|
|
518
|
+
/** Reserve one connection slot, await initialize, choose the reopen method — the preferred one
|
|
519
|
+
* when the agent advertises it (`resume` by default: no replay; `load` when the caller wants the
|
|
520
|
+
* transcript replayed into the handle), else the other, else `ReattachCapabilityUnavailable` —
|
|
521
|
+
* prepare against that same ready connection, and reattach under the single reservation. */
|
|
522
|
+
openPreparedReattachedSession(sessionId: string, prepare: (connection: PooledConnection) => AcpSessionOptions | Promise<AcpSessionOptions>, onReleased?: () => void, prefer?: ReattachPreference): Promise<{
|
|
517
523
|
handle: SessionHandle;
|
|
518
|
-
method:
|
|
524
|
+
method: ReattachPreference;
|
|
519
525
|
}>;
|
|
520
526
|
private openReadySession;
|
|
521
527
|
/** Reopen an existing session and replay its transcript through the router before resolving. */
|
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,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D;IAC7D,oBAAoB,IAAI;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GAAG,IAAI;IAIjG;;;;0BAIsB;IACtB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAI1D;iGAC6F;IACvF,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAU7B,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,qBAAqB;YAOf,iBAAiB;YAKjB,mBAAmB;IAOjC;;sFAEkF;IAClF,OAAO,CAAC,OAAO,GAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,OAAO,CAAC,IAAI,CAAC;YAK9C,YAAY;CAU3B"}
|
package/dist/acp-client.js
CHANGED
|
@@ -1703,18 +1703,21 @@ export class PooledConnection {
|
|
|
1703
1703
|
throw error;
|
|
1704
1704
|
}
|
|
1705
1705
|
}
|
|
1706
|
-
/** Reserve one connection slot, await initialize, choose the
|
|
1707
|
-
*
|
|
1708
|
-
|
|
1706
|
+
/** Reserve one connection slot, await initialize, choose the reopen method — the preferred one
|
|
1707
|
+
* when the agent advertises it (`resume` by default: no replay; `load` when the caller wants the
|
|
1708
|
+
* transcript replayed into the handle), else the other, else `ReattachCapabilityUnavailable` —
|
|
1709
|
+
* prepare against that same ready connection, and reattach under the single reservation. */
|
|
1710
|
+
async openPreparedReattachedSession(sessionId, prepare, onReleased, prefer = "resume") {
|
|
1709
1711
|
this._activeSessions += 1;
|
|
1710
1712
|
try {
|
|
1711
1713
|
await this.ready;
|
|
1712
1714
|
const caps = this.negotiated;
|
|
1713
|
-
const
|
|
1714
|
-
|
|
1715
|
-
: caps?.supportsLoadSession
|
|
1716
|
-
|
|
1717
|
-
|
|
1715
|
+
const advertised = {
|
|
1716
|
+
resume: caps?.supportsResumeSession === true,
|
|
1717
|
+
load: caps?.supportsLoadSession === true,
|
|
1718
|
+
};
|
|
1719
|
+
const order = prefer === "load" ? ["load", "resume"] : ["resume", "load"];
|
|
1720
|
+
const method = order.find((candidate) => advertised[candidate]);
|
|
1718
1721
|
if (method === undefined)
|
|
1719
1722
|
throw new ReattachCapabilityUnavailable(this.backendId, sessionId);
|
|
1720
1723
|
const opts = await prepare(this);
|
|
@@ -3,16 +3,18 @@ import type { AgentHistoryEntry, AgentSessionRef, AgentUsage } from "@automatala
|
|
|
3
3
|
import type { TSchema } from "typebox";
|
|
4
4
|
import { type SteeringResponse } from "../acp-client.js";
|
|
5
5
|
import type { NegotiatedCapabilities } from "../capabilities.js";
|
|
6
|
-
import
|
|
6
|
+
import type { CustomBackendConfig } from "../registry.js";
|
|
7
|
+
import { type AcpAgentTraits } from "../traits.js";
|
|
8
|
+
import { type AcpAgentCatalog, type AcpAgentCloseOptions, type AcpAgentEventListener, type AcpAgentEventName, type AcpAgentForkOptions, type AcpAgentMessage, type AcpAgentOptions, type AcpAgentProbeOptions, type AcpAgentPromptOptions, type AcpAgentReopenOptions, type AcpAgentState, type AcpAgentSteerOptions, type AcpAgentStream, type AcpAgentTurn, type AcpAgentUpdateRecord } from "./types.js";
|
|
7
9
|
/** Package-internal test seam for the ignored-cancel escalation grace. Not barrel-exported. */
|
|
8
10
|
export declare function setCancelGraceForTests(ms: number): () => void;
|
|
9
11
|
/**
|
|
10
12
|
* One ACP agent session on its own dedicated backend process.
|
|
11
13
|
*
|
|
12
|
-
* Lazy: the constructor validates (cwd, `configOptions`, the registry, `clientHandlers
|
|
13
|
-
* routes the backend synchronously but spawns nothing; the first
|
|
14
|
-
* `ready()` or an implicit `prompt()`) opens the session. `state`
|
|
15
|
-
* `idle → opening → ready ⇄ busy → closed`.
|
|
14
|
+
* Lazy: the constructor validates (cwd, `configOptions`, the registry, `clientHandlers`, the
|
|
15
|
+
* function-tool definitions, `schemaRetries`) and routes the backend synchronously but spawns nothing; the first
|
|
16
|
+
* queued operation (an explicit `ready()` or an implicit `prompt()`) opens the session. `state`
|
|
17
|
+
* walks `idle → opening → ready ⇄ busy → closed`.
|
|
16
18
|
*/
|
|
17
19
|
export declare class AcpAgent {
|
|
18
20
|
#private;
|
|
@@ -20,15 +22,10 @@ export declare class AcpAgent {
|
|
|
20
22
|
readonly cwd: string;
|
|
21
23
|
/** The human label stamped on event contexts and error `agentLabel`; never on the wire. */
|
|
22
24
|
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
25
|
/**
|
|
29
|
-
* Lazy: validates cwd/configOptions/registry/clientHandlers synchronously,
|
|
30
|
-
* spawns nothing. This is the ONLY public constructor signature — seeded agents (forks,
|
|
31
|
-
* reopen) are built by the statics through a module-private factory.
|
|
26
|
+
* Lazy: validates cwd/configOptions/registry/clientHandlers/tools/schemaRetries synchronously,
|
|
27
|
+
* routes the backend, spawns nothing. This is the ONLY public constructor signature — seeded agents (forks,
|
|
28
|
+
* cold reopen) are built by the statics through a module-private factory.
|
|
32
29
|
*/
|
|
33
30
|
constructor(options: AcpAgentOptions);
|
|
34
31
|
/** `new AcpAgent(options)` + `ready()`; on failure the agent is closed and the mapped error rethrown. */
|
|
@@ -37,6 +34,13 @@ export declare class AcpAgent {
|
|
|
37
34
|
* projected from, plus the per-harness `models` view. Never throws for a per-harness failure
|
|
38
35
|
* (`probed: false`); one disposed process per target. */
|
|
39
36
|
static probe(options?: AcpAgentProbeOptions): Promise<AcpAgentCatalog>;
|
|
37
|
+
/** The table-based traits of the backend `spec` routes to — exactly the constructor's routing
|
|
38
|
+
* (`backends` merged over `AGENTPRISM_BACKENDS`, a registered name wins, an unrouted spec goes
|
|
39
|
+
* to the default backend) — without spawning anything. The instance getter refines the same
|
|
40
|
+
* shape with the live initialize advertisements once the agent is open. */
|
|
41
|
+
static traits(spec?: string, options?: {
|
|
42
|
+
backends?: Record<string, CustomBackendConfig>;
|
|
43
|
+
}): AcpAgentTraits;
|
|
40
44
|
/** `session/resume` of `ref.sessionId` on a fresh dedicated process of `ref.backendId`
|
|
41
45
|
* (routed by name — never the default backend — and pool-key checked). `cwd` defaults to
|
|
42
46
|
* `ref.cwd`; `model` must stay on the ref's backend. */
|
|
@@ -45,12 +49,21 @@ export declare class AcpAgent {
|
|
|
45
49
|
* `history`/`text`/`replay` (the statics return after the fact, so the replay is observable
|
|
46
50
|
* only there, not through `on()`). */
|
|
47
51
|
static load(ref: AgentSessionRef, options?: AcpAgentReopenOptions): Promise<AcpAgent>;
|
|
48
|
-
/** Cold fork of a recorded session: the trait-driven choreography
|
|
49
|
-
*
|
|
50
|
-
*
|
|
52
|
+
/** Cold fork of a recorded session: the trait-driven choreography with no parent to seed from,
|
|
53
|
+
* so on an id-only backend the reattach PREFERS `session/load` — the agent replays the forked
|
|
54
|
+
* transcript and it lands in the child's `history`/`text`/`messages`/`replay` — and takes
|
|
55
|
+
* `session/resume` (an empty transcript) only when load is not advertised. On a live backend the
|
|
56
|
+
* fork handle is the session and the child's transcript is whatever the agent streams. */
|
|
51
57
|
static fork(ref: AgentSessionRef, options?: AcpAgentReopenOptions): Promise<AcpAgent>;
|
|
52
58
|
/** The resolved backend id (built-in id or registered custom name). */
|
|
53
59
|
get backendId(): string;
|
|
60
|
+
/** The model this agent is on, as a routing spec that leads back to the same backend
|
|
61
|
+
* (`<backendId>/<model id>`, e.g. `"claude/opus[1m]"`): the constructor's `model` until a
|
|
62
|
+
* `setModel()` or a per-turn `model` applied, then the switched one; `undefined` when nothing
|
|
63
|
+
* was ever selected (the backend's default). Inherited by forks taken after the switch. An
|
|
64
|
+
* `AgentSessionRef` carries no model, so a cold reopen keeps it only when told:
|
|
65
|
+
* `AcpAgent.resume(agent.sessionRef!, { model: agent.model })`. */
|
|
66
|
+
get model(): string | undefined;
|
|
54
67
|
/** `idle` → `opening` → `ready` ⇄ `busy` → `closed` (set the instant `close()` is called,
|
|
55
68
|
* the constructor signal aborts, or the process dies). */
|
|
56
69
|
get state(): AcpAgentState;
|
|
@@ -60,6 +73,10 @@ export declare class AcpAgent {
|
|
|
60
73
|
get sessionRef(): AgentSessionRef | undefined;
|
|
61
74
|
/** Capabilities negotiated on this agent's dedicated connection. */
|
|
62
75
|
get capabilities(): NegotiatedCapabilities | undefined;
|
|
76
|
+
/** This backend's traits (`describeBackendTraits`): the tables before open, refined by the live
|
|
77
|
+
* initialize advertisements once the connection is up (retained after close). A fresh frozen
|
|
78
|
+
* object per read. */
|
|
79
|
+
get traits(): AcpAgentTraits;
|
|
63
80
|
/** The latest echoed session config-option catalog (verbatim ACP wire shapes). */
|
|
64
81
|
get configOptions(): readonly SessionConfigOption[];
|
|
65
82
|
/** The agent-advertised mode catalog plus the current mode, when supported. */
|
|
@@ -74,6 +91,11 @@ export declare class AcpAgent {
|
|
|
74
91
|
* folded exactly like `turn.text`: chunks of one message concatenate, distinct messages join
|
|
75
92
|
* with "\n\n". */
|
|
76
93
|
get text(): string;
|
|
94
|
+
/** The retained transcript as messages (`AcpAgentMessage`, copies on read): `[...seed, ...this
|
|
95
|
+
* session's messages]` — the same retained log `history`/`text` describe, folded per message
|
|
96
|
+
* with the turn fold's boundary, a `load` replay included, seeded from the parent's snapshot on
|
|
97
|
+
* a live fork, and holding only the latest turn under `retainHistory: false`. */
|
|
98
|
+
get messages(): readonly AcpAgentMessage[];
|
|
77
99
|
/** Running per-field sum of every turn this agent ran; `ZERO_USAGE` before the first turn. */
|
|
78
100
|
get usage(): AgentUsage;
|
|
79
101
|
/** The session-level structured-output contract, if any. */
|
|
@@ -93,14 +115,33 @@ export declare class AcpAgent {
|
|
|
93
115
|
* cancelled included). Rejects only on a wire rejection (mapped like the runner), validation,
|
|
94
116
|
* abort (`signal.reason` untouched), a closed agent, or a typed session failure (the mapped
|
|
95
117
|
* `WorkflowError` carrying the complete turn as `error.turn`; see `isAcpAgentTurnError`).
|
|
96
|
-
* `configOptions`/`mode` are applied before the turn and stick for the
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
118
|
+
* `model`/`configOptions`/`mode` are applied before the turn, in that order, and stick for the
|
|
119
|
+
* session. With a schema active and a `schemaRetries` budget > 0 (constructor or per turn), an
|
|
120
|
+
* `end_turn` that left `structured` absent is followed by up to that many repair turns inside
|
|
121
|
+
* this same operation; the resolved turn is the final attempt's with `structuredAttempts`. To
|
|
122
|
+
* stop a specific turn use `options.signal`: it rejects while queued or before the turn reached
|
|
123
|
+
* the wire (nothing is sent) and sends one `session/cancel` once in flight — `cancel()` reaches
|
|
124
|
+
* only a turn already on the wire (a repair turn included).
|
|
100
125
|
*/
|
|
101
126
|
prompt(content: string | ContentBlock[], options?: AcpAgentPromptOptions): Promise<AcpAgentTurn>;
|
|
127
|
+
/**
|
|
128
|
+
* The same turn as `prompt()`, observed as an async iterable of this turn's events: every bus
|
|
129
|
+
* event emitted while the turn's operation runs — from the instant it is dequeued (a lazy
|
|
130
|
+
* open's `session_open`, a per-turn `mode`'s `current_mode_update` included) until the wire
|
|
131
|
+
* settles — each tagged `{ type: <event name>, ...payload }` (an update once, under its kind;
|
|
132
|
+
* never the `session_update` catch-all; a concurrent `steer()`'s `steering` event and the
|
|
133
|
+
* permission / elicitation / raw_message events included), then the terminal
|
|
134
|
+
* `{ type: "turn", turn }` with exactly the `AcpAgentTurn` `prompt()` would have resolved.
|
|
135
|
+
* The turn is queued (FIFO) by this call, exactly like `prompt()`; events are buffered without
|
|
136
|
+
* dropping until consumed. When the turn rejects, the iterator yields the buffered events, then
|
|
137
|
+
* throws that same error. Leaving early — `break`, `return()`, `throw()` — aborts the turn's
|
|
138
|
+
* per-call signal: a turn still queued or not yet on the wire is dropped with nothing sent, a
|
|
139
|
+
* turn in flight gets the one `session/cancel` (and the agent's escalation), and the call
|
|
140
|
+
* resolves only once the turn settled, so no turn keeps running unobserved.
|
|
141
|
+
*/
|
|
142
|
+
stream(content: string | ContentBlock[], options?: AcpAgentPromptOptions): AcpAgentStream;
|
|
102
143
|
/** Inject content into the turn in flight (`_session/steering`). Overlaps the FIFO; requires a
|
|
103
|
-
* `prompt()` in flight (
|
|
144
|
+
* `prompt()` in flight (INVALID_ARGUMENT otherwise). The complete raw response is returned. */
|
|
104
145
|
steer(content: string | ContentBlock[], options?: AcpAgentSteerOptions): Promise<SteeringResponse>;
|
|
105
146
|
/** ONE `session/cancel` for the turn whose `session/prompt` is on the wire (no-op otherwise).
|
|
106
147
|
* Resolves at the notify boundary; the in-flight `prompt()` then resolves with
|
|
@@ -108,8 +149,8 @@ export declare class AcpAgent {
|
|
|
108
149
|
* grace period ends in process disposal WITHOUT a wire `session/close` (the session stays
|
|
109
150
|
* re-openable through `sessionRef`); the turn then rejects and the agent is closed. Queued
|
|
110
151
|
* 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` —
|
|
112
|
-
* `cancel()` in that window is a no-op the turn never sees. A per-call `signal` covers every
|
|
152
|
+
* reached the wire yet — the lazy first open, or its per-turn `model`/`configOptions`/`mode` —
|
|
153
|
+
* a `cancel()` in that window is a no-op the turn never sees. A per-call `signal` covers every
|
|
113
154
|
* window (rejects with the reason before anything is sent; `session/cancel` once in flight). */
|
|
114
155
|
cancel(): Promise<void>;
|
|
115
156
|
/**
|
|
@@ -122,7 +163,23 @@ export declare class AcpAgent {
|
|
|
122
163
|
* has no replay. The parent keeps going, unaffected; closing either side never affects the other.
|
|
123
164
|
*/
|
|
124
165
|
fork(overrides?: AcpAgentForkOptions): Promise<AcpAgent>;
|
|
125
|
-
/**
|
|
166
|
+
/**
|
|
167
|
+
* Switch the session's model (queued, FIFO like `setMode`; sticky). `spec` is resolved with the
|
|
168
|
+
* fork rule — the runner's routing grammar, and it must land on this agent's backend and poolKey
|
|
169
|
+
* (`"<backendId>/<model id>"`; an unrouted spec goes to the default backend and passes only when
|
|
170
|
+
* that is this one) — otherwise INVALID_ARGUMENT naming both backends. The route is checked
|
|
171
|
+
* BEFORE the operation is queued, so a refused spec sends nothing and, on an agent that has not
|
|
172
|
+
* opened yet, spawns nothing (the agent stays `idle`). A backend-only spec is INVALID_ARGUMENT
|
|
173
|
+
* too: there is no wire form for "unselect". Applied exactly like open's selection —
|
|
174
|
+
* `session/set_config_option { configId: "model" }` with the routed remainder verbatim; no
|
|
175
|
+
* aliases, coercion, catalog matching, or fallback; the agent's catalog and validation are
|
|
176
|
+
* authoritative and a wire rejection maps through the normal error path with `model` unchanged.
|
|
177
|
+
* On success `model` becomes the routed spec, so later forks and a cold reopen passing
|
|
178
|
+
* `agent.model` back inherit the switch. `"model"` stays reserved in `configOptions`; this is
|
|
179
|
+
* the one way to move it after open.
|
|
180
|
+
*/
|
|
181
|
+
setModel(spec: string): Promise<void>;
|
|
182
|
+
/** `session/set_mode` (queued; strict — an unadvertised id is INVALID_ARGUMENT). */
|
|
126
183
|
setMode(modeId: string): Promise<void>;
|
|
127
184
|
/** `session/set_config_option` per id in ascending order (queued; sticky; `"model"` reserved;
|
|
128
185
|
* unknown ids rejected against the advertised catalog). */
|
|
@@ -131,8 +188,9 @@ export declare class AcpAgent {
|
|
|
131
188
|
* Close: `state` becomes `closed` immediately (no new work is admitted), the teardown waits
|
|
132
189
|
* behind queued work, releases the session (`keep: true` skips the wire `session/close` so the
|
|
133
190
|
* agent-persisted session stays re-openable via `sessionRef`), disposes the dedicated process,
|
|
134
|
-
*
|
|
135
|
-
* already-dead process; rethrows
|
|
191
|
+
* releases the structured-output tool, and closes the function-tool host (aborting any running
|
|
192
|
+
* `execute`). Idempotent (same promise); never throws for an already-dead process; rethrows
|
|
193
|
+
* only a `child_cleanup_error` (mapped, non-recoverable).
|
|
136
194
|
*/
|
|
137
195
|
close(options?: AcpAgentCloseOptions): Promise<void>;
|
|
138
196
|
/** `await using agent = …` — equivalent to `close()`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acp-agent.d.ts","sourceRoot":"","sources":["../../src/agent/acp-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"acp-agent.d.ts","sourceRoot":"","sources":["../../src/agent/acp-agent.ts"],"names":[],"mappings":"AAkCA,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,EAQL,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAKjE,OAAO,KAAK,EAAmB,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAM3E,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AA6B1E,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EAGnB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EAC1B,MAAM,YAAY,CAAC;AA+BpB,+FAA+F;AAC/F,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,IAAI,CAM7D;AAqFD;;;;;;;GAOG;AACH,qBA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