@anureo/adapter-acp 0.2.0 → 0.3.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 CHANGED
@@ -2,19 +2,26 @@
2
2
 
3
3
  Adapter connecting the Anureo SDK to agents implementing the [Agent Client Protocol](https://agentclientprotocol.com) (ACP), using the official `@agentclientprotocol/sdk` 1.4.0. ACP is an editor↔agent protocol; this adapter brings any standard ACP agent behind the AHP session model — the interoperability proof that AHP is a host-side semantic layer, not a competing agent protocol.
4
4
 
5
- > Part of the [Anureo SDK workspace](../../README.md). Install with `npm install @anureo/adapter-acp`.
5
+ > Part of the [Anureo SDK workspace](../../../README.md). Install with `npm install @anureo/adapter-acp`.
6
6
 
7
7
  ## Usage
8
8
 
9
+ This shows the revised workspace API, not the published 0.2.0 API. Root migration and local
10
+ validation are complete.
11
+
9
12
  ```typescript
10
- import { createHarnessRuntime } from '@anureo/sdk'
13
+ import { createClient } from '@anureo/sdk'
11
14
  import { createAcpAdapter } from '@anureo/adapter-acp'
12
15
 
13
- const runtime = createHarnessRuntime(createAcpAdapter({
14
- command: 'my-acp-agent', // spawn over stdio; or use connect() below
15
- args: ['--stdio'],
16
- cwd: '/workspace',
17
- }))
16
+ const client = await createClient({
17
+ adapter: createAcpAdapter({
18
+ command: 'my-acp-agent', // spawn over stdio; or use connect() below
19
+ args: ['--stdio'],
20
+ cwd: '/workspace',
21
+ }),
22
+ identity: { adapterId: 'acp', runtimeConfigId: 'local' },
23
+ })
24
+ // Use client.sessions.create(...) and session.submit(...); dispose in finally.
18
25
 
19
26
  // Remote or custom transports inject an official v1 message stream:
20
27
  // createAcpAdapter({ connect: () => openMyStream() })
@@ -28,10 +35,16 @@ ACP's core protocol covers sessions, turns, messages, and permission requests. A
28
35
  - **Client requests** — `userInput` (`_ahp/user_input`) and `dynamicTool` (`_ahp/dynamic_tool`) interactions
29
36
  - **Features** — nested subagent events and custom instructions
30
37
 
31
- Agents that do not advertise the extension still work: the adapter publishes only the standard ACP baseline (interrupt, approval interactions, text/image/file input). fs and terminal capabilities are announced **only** when the host injects the corresponding ports — connecting an adapter never grants filesystem or terminal permission by itself.
38
+ Agents that do not advertise the extension still work: the adapter publishes only the standard ACP baseline (session-scoped interrupt, approval interactions, text/image/file input). fs and terminal capabilities are announced **only** when the host injects the corresponding ports — connecting an adapter never grants filesystem or terminal permission by itself.
32
39
 
33
40
  Session snapshots loaded via ACP `session/load` have no turn boundaries; they are handed to the host through `onLoadSnapshot` instead of being replayed as realtime events.
34
41
 
42
+ Configuration patches apply one field at a time. Each confirmed field updates
43
+ the session state immediately. If a later field fails, `CONFIG_PARTIAL` reports
44
+ `details.appliedKeys`, `details.failedKey` and the underlying `details.cause.code`;
45
+ confirmed changes remain applied. `outcomeUnknown` describes uncertainty about
46
+ the failed field and requires recovery when true.
47
+
35
48
  ## Options
36
49
 
37
50
  | Option | Purpose |
@@ -40,22 +53,55 @@ Session snapshots loaded via ACP `session/load` have no turn boundaries; they ar
40
53
  | `connect` | Provide an official `acp.Stream` factory for remote transports or deterministic wire tests |
41
54
  | `fs` (`AcpFileSystemPort`) | Host-implemented read/write text-file callbacks |
42
55
  | `terminal` (`AcpTerminalPort`) | Host-implemented terminal lifecycle callbacks |
43
- | `requestTimeoutMs`, `maxFrameBytes` | Bound each request and every line (default 8 MiB; oversized frames fail with `BACKPRESSURE_EXCEEDED`) |
56
+ | `requestTimeoutMs` | Timeout in milliseconds for ACP requests other than `session/prompt` (default 30,000; DSH preset 120,000) |
57
+ | `maxFrameBytes` | Maximum bytes per incoming or outgoing stdio line (default 8 MiB; oversized frames fail with `BACKPRESSURE_EXCEEDED`) |
44
58
  | `onLoadSnapshot` | Receive `session/load` snapshot updates separately from the realtime event stream |
59
+ | `stderrTailLines`, `onStderr` | Set the retained stderr line limit (default 200) and receive redacted lines; `0` disables capture and callbacks |
60
+ | `autoRespondPermission` | Answer `session/request_permission` without an AHP interaction; undecided or unoffered kinds fall back to the human path |
61
+
62
+ ACP JSON-RPC error codes map to typed SDK errors (`-32601` → `CAPABILITY_UNSUPPORTED`, `-32602` → `INVALID_PARAMS`, `-32000` → `AUTH_REQUIRED`, `-32002` → `RESOURCE_NOT_FOUND`); a dropped connection surfaces as `ACP_CONNECTION_CLOSED` with `outcomeUnknown`, never as a silent success.
63
+
64
+ For spawned agents, stderr is never forwarded raw: the adapter redacts `sk-…`, bearer tokens, `key=value` secrets, and URL credentials. `stderrTailLines` controls the retained line limit (default 200; `0` disables capture and `onStderr` callbacks). The retained tail is also limited to 32,768 UTF-16 code units, counting each redacted line's length plus one for a separator, so fewer lines may be retained. The adapter attaches that tail to startup and disconnect failures as `details.diagnostics.stderrTail`.
65
+
66
+ `session/prompt` stop reasons map explicitly: `end_turn` and `cancelled` keep their existing meaning, `max_tokens` / `max_turn_requests` complete the turn with an `ACP_STOP_MAX_TOKENS` / `ACP_STOP_MAX_TURN_REQUESTS` notice, `refusal` fails it, and any unclassified reason fails closed with `ACP_STOP_UNKNOWN`. A backend that stops for an unknown reason is never reported as clean success.
67
+
68
+ Automatic approval decisions emit an `ACP_PERMISSION_AUTO_ANSWERED` notice carrying only the tool-call id and chosen option; the request's raw input never reaches the notice. Policies never fabricate an option id: when the agent does not offer the requested kind, the request falls back to `interaction/requested`.
69
+
70
+ ## Driving DeepSeek Harness
45
71
 
46
- ACP JSON-RPC error codes map to typed SDK errors (`-32601` → `CAPABILITY_UNSUPPORTED`, `-32602` → `INVALID_PARAMS`, `-32000` → `AUTH_REQUIRED`, `-32002` → `RESOURCE_NOT_FOUND`); a dropped connection surfaces as `ACP_CONNECTION_CLOSED` with `outcomeUnknown`, never as a silent success. Stderr from the agent is drained and discarded — raw provider output and credentials are not retained in diagnostics.
72
+ `createDshAcpAdapter()` presets the one-liner for `dsh --profile acp` (DSH 0.2.2+, Node.js ≥ 24.9):
73
+
74
+ ```typescript
75
+ import { createClient } from '@anureo/sdk'
76
+ import { createDshAcpAdapter } from '@anureo/adapter-acp'
77
+
78
+ const client = await createClient({
79
+ adapter: createDshAcpAdapter({ cwd: workspace, autoApprove: true }),
80
+ identity: { adapterId: 'dsh-acp', runtimeConfigId: 'local' },
81
+ })
82
+ const session = await client.sessions.create({ cwd: workspace, model: 'deepseek-v4-flash' })
83
+ ```
84
+
85
+ DSH advertises the standard ACP v1 baseline only — no `_ahp` extension, no modes, `embeddedContext: false` — so `fork`, `revert`, `steer`, `history`, `goal`, `compact`, `review` and `file` prompt blocks stay unavailable, and `permissionMode` must not be passed. Model values resolve against the advertised `provider/model` enum, so a bare `deepseek-v4-flash` becomes `deepseek-official/deepseek-v4-flash` before it reaches the backend. Auto-approval is opt-in because DSH offers only `allow_once` / `reject_once`; the policy is the only way to run unattended.
47
86
 
48
87
  ## Development
49
88
 
50
89
  ```sh
51
- cd packages/acp
90
+ cd packages/adapter/acp
52
91
  bun run typecheck
53
92
  bun test tests
54
93
  ```
55
94
 
56
- The conformance tests spawn a scripted ACP agent (implementing the standard wire protocol) as a real child process over stdio; `bun run verify:pack` at the workspace root repeats the full text, approval-rejection, and interrupt flows against clean npm installs.
95
+ The conformance tests spawn a scripted ACP agent (implementing the standard wire protocol) as a real child process over stdio.
57
96
 
58
97
  ## Documentation
59
98
 
60
- - [Architecture](../../docs/architecture.md) — adapters' role in the SDK (currently in Chinese)
61
- - [AHP v1 protocol](../../spec/ahp-v1.md)
99
+ - [Architecture](../../../docs/architecture.md) — adapters' role in the SDK (currently in Chinese)
100
+ - [AHP v1 protocol](../../../spec/ahp-v1.md)
101
+
102
+ ## AHP v1 lifecycle revision
103
+
104
+ The lifecycle design updates AHP v1 and package root entries in place.
105
+ The root implementation and tests use the revised lifecycle; parallel versioned
106
+ entries have been removed. Local conformance and clean-install checks have passed. Standard ACP remains limited to guarantees it can prove; overlapping input requires an explicit correlation extension, and session cancellation must not masquerade as exact-turn interrupt.
107
+ See the [design and implementation plan](../../../docs/native-harness-lifecycle.md).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@anureo/adapter-acp",
3
- "version": "0.2.0",
4
3
  "description": "Anureo SDK adapter for standard Agent Client Protocol (ACP) agents",
4
+ "version": "0.3.0",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
7
7
  "anureo",
@@ -15,7 +15,7 @@
15
15
  "repository": {
16
16
  "type": "git",
17
17
  "url": "git+https://github.com/hi-youichi/anureo-sdk.git",
18
- "directory": "packages/acp"
18
+ "directory": "packages/adapter/acp"
19
19
  },
20
20
  "bugs": {
21
21
  "url": "https://github.com/hi-youichi/anureo-sdk/issues"
@@ -26,25 +26,24 @@
26
26
  "type": "module",
27
27
  "exports": {
28
28
  ".": {
29
- "types": "./dist/index.d.ts",
30
- "import": "./dist/index.js",
31
- "default": "./dist/index.js"
29
+ "types": "./src/index.d.ts",
30
+ "import": "./src/index.js",
31
+ "default": "./src/index.js"
32
32
  }
33
33
  },
34
- "files": [
35
- "dist",
36
- "schema",
37
- "protocol",
38
- "examples",
39
- "README.md",
40
- "LICENSE"
41
- ],
42
34
  "dependencies": {
43
- "@anureo/sdk": "0.2.0",
44
- "@anureo/protocol": "0.2.0",
35
+ "@anureo/sdk": "0.3.0",
36
+ "@anureo/protocol": "0.3.0",
45
37
  "@agentclientprotocol/sdk": "1.4.0"
46
38
  },
47
39
  "engines": {
48
40
  "node": ">=22"
49
- }
41
+ },
42
+ "files": [
43
+ "src",
44
+ "bin",
45
+ "schema",
46
+ "protocol",
47
+ "examples"
48
+ ]
50
49
  }
@@ -0,0 +1,214 @@
1
+ import * as acp from '@agentclientprotocol/sdk';
2
+ import { type HarnessAdapter, type BackendSession, type SessionEventSink, type SessionMethod } from '@anureo/sdk';
3
+ import { type Capabilities, type SessionBinding, type SessionOpenParams, type SessionState, type InitializeParams, type InitializeResult, type AhpRequestMap, type AhpResultMap, type JsonObject } from '@anureo/protocol';
4
+ import { type Extensions } from "./extensions.js";
5
+ import type { AcpAdapterOptions } from "./options.js";
6
+ /** Connect an ACP agent to the SDK adapter port. Hosts normally pass a factory result to createClient,
7
+ * which orders initialization, session acquisition and disposal through its output wrapper.
8
+ * Direct adapter users must initialize before opening and await disposal even after setup failure. */
9
+ export declare class AcpAdapter implements HarnessAdapter {
10
+ readonly options: AcpAdapterOptions;
11
+ /** Construct the adapter without I/O; initialize acquires the transport and negotiates capabilities. */
12
+ constructor(options: AcpAdapterOptions);
13
+ /** OutputSession.open queries this after negotiation to select a locally reachable MCP output bridge.
14
+ * Injected transports cannot attest reachability and return undefined. */
15
+ outputBridgeTransport(): 'http' | 'stdio' | undefined;
16
+ /** Native capabilities from the initialize response when available, or an empty descriptor before negotiation. */
17
+ get nativeCapabilities(): acp.AgentCapabilities;
18
+ /** Access the connected native request context; throws ACP_CONNECTION_CLOSED before connection setup. */
19
+ get agent(): acp.ClientContext;
20
+ /** Whether the adapter has installed a connection and has yet to observe transport loss. */
21
+ get connected(): boolean;
22
+ /** Negotiate ACP and return detached AHP capabilities. Calls after a successful handshake reuse its result.
23
+ * Client.initialize awaits this through withStructuredOutput and retains the capabilities for later opens.
24
+ * Handshake request failures include a redacted stderr tail when available. Direct callers must dispose
25
+ * after setup failure and should finish initialization before opening sessions. */
26
+ initialize(params: InitializeParams): Promise<InitializeResult>;
27
+ /** Issue a native request with requestTimeoutMs (30 seconds by default). Rejections are translated
28
+ * to SDK errors. A timeout ends this wait while native work may continue. The adapter's normal
29
+ * session prompt path uses the native context directly because its reply may be terminal. */
30
+ call<M extends acp.AgentRequestMethod>(method: M, params: acp.AgentRequestParamsByMethod[M]): Promise<acp.AgentRequestResponsesByMethod[M]>;
31
+ /** Send a custom native method under the same deadline and error translation as standard methods. */
32
+ call(method: string, params: unknown): Promise<unknown>;
33
+ /** Open, resume/load or fork one native session. Opens run one at a time so early updates
34
+ * can establish the native identity. OutputSession.open supplies the sink and awaits the configured
35
+ * backend before attachment. Supply protocol-valid parameters, including the fork source and boundary
36
+ * in fork mode. Dispatch or attachment failures remove local indexes and release the open slot.
37
+ * Successful backends remain adapter-tracked until teardown. Their owner must dispose them. */
38
+ openSession(params: SessionOpenParams, sink: SessionEventSink): Promise<BackendSession>;
39
+ /** Attempt all tracked session releases, then close the native connection and channel, and clear indexes.
40
+ * Reject RESOURCE_RELEASE_FAILED after all attempts if any fail. Repeated calls after closing begins
41
+ * return immediately; disposal does not prove native executions stopped. */
42
+ dispose(): Promise<void>;
43
+ private connection;
44
+ private channel;
45
+ private info;
46
+ /** Adapter's AHP session index. Disposed sessions remain indexed until adapter teardown. */
47
+ readonly sessions: Map<string, AcpBackendSession>;
48
+ private nativeSessions;
49
+ private openingSession;
50
+ private sessionOpenQueueTail;
51
+ private readonly deliveries;
52
+ private closing;
53
+ private connectionLost;
54
+ private sourceFailure?;
55
+ /** Peer-negotiated features. Backend requests can withdraw a method the peer rejects as unsupported. */
56
+ extension: Extensions;
57
+ /** Negotiated baseline. Each backend clones it before applying session configuration. */
58
+ capabilities: Capabilities;
59
+ /** Install initialize's transport and handlers before sending the handshake. When the SDK reports
60
+ * closure, reject outstanding response deliveries and fail live sessions unless disposal is underway. */
61
+ private installConnection;
62
+ /** Return detached negotiated capabilities so callers can retain their initialization result. */
63
+ private initializedResult;
64
+ /** Notify currently indexed sessions of observation loss. A rejected sink must not stop fan-out. */
65
+ private failSessions;
66
+ /** Build openSession's native request. For resume/load, register the known ID and begin snapshot
67
+ * capture before dispatch so updates received before the reply reach the correct backend. */
68
+ private prepareSessionOpen;
69
+ /** Reconcile the reply with any early notification identity before openSession applies overrides.
70
+ * Index the backend and finish snapshot capture before invoking the host's snapshot callback. */
71
+ private acceptOpenResponse;
72
+ /** Remove the indexes that openSession may have populated before failure, including through early updates. */
73
+ private forgetFailedOpen;
74
+ /** Attach redacted channel diagnostics before initialize rejects a handshake failure or the
75
+ * SDK closure handler reports observation loss. Preserve the error when no tail is available. */
76
+ private withDiagnostics;
77
+ /** Resolve the native ID for SDK callbacks and routeNotification. Only a session/update may
78
+ * identify the current opening backend. Reject other unknown IDs as invalid native parameters. */
79
+ private backend;
80
+ /** Register a native request with the session sink after establishing standard turn correlation.
81
+ * The sink invokes the responder with an answer or cancellation. Resolve the native response first,
82
+ * but keep the responder pending until wrapStream confirms its write, so settlement cannot claim early delivery. */
83
+ private interaction;
84
+ /** Consume session updates and negotiated lifecycle events before the official SDK handles remaining frames.
85
+ * Await sink publication to preserve source order; routing failures end stream observation in wrapStream. */
86
+ private routeNotification;
87
+ /** Route notifications in read order before forwarding other frames to the SDK. A successful
88
+ * response write acknowledges delivery to the interaction responder. Stream errors fail observation. */
89
+ private wrapStream;
90
+ /** Configure the ACP SDK callbacks for installConnection before initialize advertises their
91
+ * capabilities. The SDK invokes them for incoming peer requests and notifications. */
92
+ private createClientApplication;
93
+ /** Handle the ACP SDK's elicitation callback. Cancel unsupported scopes or modes immediately.
94
+ * For a session request, keep URL details in the private payload and return the sink's answer to the peer. */
95
+ private requestElicitation;
96
+ /** Answer the ACP SDK's permission request with an offered option after publishing the policy
97
+ * notice. If policy declines or has no matching option, await the interactive session response. */
98
+ private requestPermission;
99
+ /** Register the filesystem and terminal callbacks supplied by the host. The ACP SDK handler
100
+ * validates session and terminal ownership before returning the port's response to the peer. */
101
+ private registerPorts;
102
+ /** After initialize validates the peer version, store the baseline capability projection and
103
+ * negotiated extension methods. Session construction clones the baseline before applying overrides. */
104
+ private configureCapabilities;
105
+ /** Handle registered _ahp user-input/tool requests only after negotiation; validate before sink registration.
106
+ * Native callers receive a response or cancellation; unavailable extensions reject as method-not-found. */
107
+ private extensionInteraction;
108
+ }
109
+ /** Native session implementation returned by AcpAdapter.openSession and adopted by OutputSession.open.
110
+ * Execution receipts and sink lifecycle events are separate observations; disposal releases handles
111
+ * without asserting that native execution stopped. Routing/state methods support adapter collaboration. */
112
+ export declare class AcpBackendSession implements BackendSession {
113
+ readonly adapter: AcpAdapter;
114
+ private readonly params;
115
+ readonly sink: SessionEventSink;
116
+ /** Create session-local projection and configuration state. AcpAdapter.openSession assigns the
117
+ * native identity. The mapper reads this backend's current turn and applies peer metadata/config
118
+ * updates through configure before publishing snapshots to the supplied sink. */
119
+ constructor(adapter: AcpAdapter, params: SessionOpenParams, sink: SessionEventSink);
120
+ /** Attach the native ACP identity to the requested AHP binding; identity is established before openSession returns. */
121
+ get binding(): SessionBinding;
122
+ /** Expose the current attachment snapshot to OutputSession.open; collection fields are session-owned. */
123
+ get state(): SessionState;
124
+ /** Build state for attachment and sink publication. Configuration and capabilities are session-owned references. */
125
+ snapshot(): SessionState;
126
+ /** AcpAdapter.routeNotification forwards negotiated v2 events here. Bind submissions through the sink,
127
+ * flush a turn's mapper before its terminal event, and reject invalid payloads instead of publishing them. */
128
+ nativeEvent(raw: unknown, scope: Record<string, unknown>): Promise<void>;
129
+ /** Publish legacy _ahp events from AcpAdapter.routeNotification, binding review/input on native start.
130
+ * Release matching terminal admission before publication; conflicting execution identities reject routing. */
131
+ extensionEvent(raw: unknown, scope: Record<string, unknown>): Promise<void>;
132
+ /** Publish a standard turn start before update, interaction registration or terminal prompt handling
133
+ * continues. Bind after start publication, setting the guard before either await to prevent duplicate starts. */
134
+ ensureStandardStarted(): Promise<void>;
135
+ /** Merge native configuration or a session-title patch from open responses and AcpUpdateMapper callbacks.
136
+ * Configuration changes refresh descriptors and revision; title-only changes leave the revision unchanged. */
137
+ configure(data: Record<string, unknown>): void;
138
+ /** AcpAdapter routes session/update here: retain bounded load snapshots without replay, or await live projection.
139
+ * Correlated updates require an observed start; unsupported uncorrelated execution updates reject routing. */
140
+ update(data: Record<string, unknown>): Promise<void>;
141
+ /** Reject peer operations on terminal IDs not successfully created for this session or already released. */
142
+ requireTerminal(id: string): void;
143
+ /** Apply a configuration patch in key order and return the resulting session state. Reject unknown
144
+ * keys before dispatch. AcpAdapter.openSession awaits initial overrides before attachment, and execute
145
+ * returns this state for host patches. Publish each confirmed field. A later native failure rejects
146
+ * with CONFIG_PARTIAL and the confirmed keys, whose changes remain applied. */
147
+ setConfiguration(patch: JsonObject): Promise<SessionState>;
148
+ /** OutputSession.execute dispatches validated session operations here and consumes the native result/failure.
149
+ * Session cancellation only acknowledges notification delivery; completion comes from the prompt/event.
150
+ * Close reports executionStopped=unconfirmed, and unsupported exact-turn operations reject. */
151
+ execute<M extends SessionMethod>(method: M, params: AhpRequestMap[M]): Promise<AhpResultMap[M]>;
152
+ /**
153
+ * Share one cleanup promise across calls. Mark closed before attempting every retained terminal
154
+ * release and optional native close; clear local handles and reject aggregated release failures.
155
+ * OutputSession.dispose awaits this during teardown. OutputSession.open also awaits it when a
156
+ * backend arrives after teardown, and AcpAdapter.dispose calls it for every tracked backend.
157
+ */
158
+ dispose(): Promise<void>;
159
+ private readonly nativeMappers;
160
+ private readonly nativeStartedTurnIds;
161
+ private standardTurnStarted;
162
+ private standardSubmissionId?;
163
+ /** Standard/legacy lane identity; v2 executions are tracked independently. */
164
+ activeTurn: string | undefined;
165
+ private readonly mapper;
166
+ private releasing?;
167
+ private nativeClosed;
168
+ /** Native identity assigned by openSession, including early update correlation. */
169
+ nativeId: string;
170
+ /** While resume/load is pending, historical updates are captured instead of published. */
171
+ hydrating: boolean;
172
+ /** Bounded historical updates delivered to onLoadSnapshot after opening. */
173
+ readonly loadedSnapshot: JsonObject[];
174
+ /** Successfully created terminal IDs awaiting explicit or disposal release. */
175
+ readonly terminals: Set<string>;
176
+ /** Session-local negotiated capabilities, refreshed by native configuration and extension failures. */
177
+ readonly capabilities: Capabilities;
178
+ private config;
179
+ private configKeys;
180
+ private configurationData;
181
+ private capabilityRevision;
182
+ private sessionTitle?;
183
+ private closed;
184
+ private snapshotBytes;
185
+ /** Save pre-attachment updates for the host snapshot callback. Capture title as attachment metadata
186
+ * and bound the remaining history by count and estimated size before retaining its safe projection. */
187
+ private captureLoadedUpdate;
188
+ /** Return the per-turn mapper used by update. A native start must have been observed before
189
+ * projection. nativeEvent flushes and removes the mapper on completion. */
190
+ private correlatedMapper;
191
+ /** Dispatch a legacy review in the single execution lane. The receipt confirms dispatch.
192
+ * Native start notifications establish binding. Definite pre-start rejection releases admission;
193
+ * unknown outcome retains it, and method-not-found withdraws review capability before rejecting. */
194
+ private submitReview;
195
+ /** Reserve the uncorrelated ACP lane before review or prompt dispatch; reject overlapping submissions. */
196
+ private beginStandardSubmission;
197
+ /** Release only this prompt's lane: terminal observers may already have admitted its successor. */
198
+ private releaseStandardTurn;
199
+ /** Reject closed/unsupported delivery before choosing negotiated native correlation or the single standard ACP lane. */
200
+ private submitInput;
201
+ /** Return the peer's validated acceptance; v2 lifecycle notifications independently bind and complete turns. */
202
+ private submitCorrelatedInput;
203
+ /** Await the uncorrelated prompt's terminal response and publish mapped completion before returning acceptance. */
204
+ private submitStandardInput;
205
+ /** Dispatch a negotiated extension, enrich history tool file changes, and validate the native result.
206
+ * Method-not-found withdraws the affected live capability and publishes state before rejecting. */
207
+ private extension;
208
+ /** Remove the rejected method for future dispatch and update this session's advertised capability.
209
+ * The caller publishes the revised session state before surfacing the native rejection. */
210
+ private withdrawExtension;
211
+ }
212
+ /** Create an ACP adapter without starting I/O. Pass it to createClient for negotiation and owned cleanup,
213
+ * or initialize/open/dispose it directly in that order; connect takes precedence over command. */
214
+ export declare function createAcpAdapter(options: AcpAdapterOptions): AcpAdapter;