@lucascouts/claude-agent-tui 0.1.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/LICENSE +191 -0
- package/NOTICE +14 -0
- package/README.md +50 -0
- package/dist/acp-agent.d.ts +594 -0
- package/dist/acp-agent.d.ts.map +1 -0
- package/dist/acp-agent.js +2139 -0
- package/dist/ansi-mirror.d.ts +42 -0
- package/dist/ansi-mirror.d.ts.map +1 -0
- package/dist/ansi-mirror.js +61 -0
- package/dist/besteffort.d.ts +44 -0
- package/dist/besteffort.d.ts.map +1 -0
- package/dist/besteffort.js +100 -0
- package/dist/billing/entrypoint-guard.d.ts +97 -0
- package/dist/billing/entrypoint-guard.d.ts.map +1 -0
- package/dist/billing/entrypoint-guard.js +166 -0
- package/dist/claude-path.d.ts +12 -0
- package/dist/claude-path.d.ts.map +1 -0
- package/dist/claude-path.js +61 -0
- package/dist/diff-enriched-reader.d.ts +41 -0
- package/dist/diff-enriched-reader.d.ts.map +1 -0
- package/dist/diff-enriched-reader.js +106 -0
- package/dist/diff-source.d.ts +104 -0
- package/dist/diff-source.d.ts.map +1 -0
- package/dist/diff-source.js +164 -0
- package/dist/end-of-turn.d.ts +172 -0
- package/dist/end-of-turn.d.ts.map +1 -0
- package/dist/end-of-turn.js +415 -0
- package/dist/engine-lifecycle.d.ts +222 -0
- package/dist/engine-lifecycle.d.ts.map +1 -0
- package/dist/engine-lifecycle.js +236 -0
- package/dist/engine-pty.d.ts +143 -0
- package/dist/engine-pty.d.ts.map +1 -0
- package/dist/engine-pty.js +222 -0
- package/dist/engine-watcher.d.ts +83 -0
- package/dist/engine-watcher.d.ts.map +1 -0
- package/dist/engine-watcher.js +173 -0
- package/dist/engine.d.ts +30 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +34 -0
- package/dist/event-switch.d.ts +164 -0
- package/dist/event-switch.d.ts.map +1 -0
- package/dist/event-switch.js +206 -0
- package/dist/gate/port.d.ts +38 -0
- package/dist/gate/port.d.ts.map +1 -0
- package/dist/gate/port.js +126 -0
- package/dist/gate/settings-writer.d.ts +130 -0
- package/dist/gate/settings-writer.d.ts.map +1 -0
- package/dist/gate/settings-writer.js +349 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +106 -0
- package/dist/jsonl.d.ts +267 -0
- package/dist/jsonl.d.ts.map +1 -0
- package/dist/jsonl.js +527 -0
- package/dist/lib.d.ts +6 -0
- package/dist/lib.d.ts.map +1 -0
- package/dist/lib.js +5 -0
- package/dist/linearize.d.ts +219 -0
- package/dist/linearize.d.ts.map +1 -0
- package/dist/linearize.js +444 -0
- package/dist/live-diff-env.d.ts +7 -0
- package/dist/live-diff-env.d.ts.map +1 -0
- package/dist/live-diff-env.js +18 -0
- package/dist/live-subagent-env.d.ts +7 -0
- package/dist/live-subagent-env.d.ts.map +1 -0
- package/dist/live-subagent-env.js +19 -0
- package/dist/permissions/allow-inject.d.ts +67 -0
- package/dist/permissions/allow-inject.d.ts.map +1 -0
- package/dist/permissions/allow-inject.js +85 -0
- package/dist/permissions/deny.d.ts +60 -0
- package/dist/permissions/deny.d.ts.map +1 -0
- package/dist/permissions/deny.js +81 -0
- package/dist/permissions/gate-wiring.d.ts +112 -0
- package/dist/permissions/gate-wiring.d.ts.map +1 -0
- package/dist/permissions/gate-wiring.js +350 -0
- package/dist/permissions/hook-server.d.ts +72 -0
- package/dist/permissions/hook-server.d.ts.map +1 -0
- package/dist/permissions/hook-server.js +179 -0
- package/dist/permissions/permission-mode.d.ts +67 -0
- package/dist/permissions/permission-mode.d.ts.map +1 -0
- package/dist/permissions/permission-mode.js +100 -0
- package/dist/permissions/request-permission.d.ts +102 -0
- package/dist/permissions/request-permission.d.ts.map +1 -0
- package/dist/permissions/request-permission.js +124 -0
- package/dist/settings.d.ts +68 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +182 -0
- package/dist/stop-reason-map.d.ts +17 -0
- package/dist/stop-reason-map.d.ts.map +1 -0
- package/dist/stop-reason-map.js +33 -0
- package/dist/subagent-source.d.ts +63 -0
- package/dist/subagent-source.d.ts.map +1 -0
- package/dist/subagent-source.js +132 -0
- package/dist/subagent-watcher.d.ts +40 -0
- package/dist/subagent-watcher.d.ts.map +1 -0
- package/dist/subagent-watcher.js +108 -0
- package/dist/tools.d.ts +119 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +729 -0
- package/dist/usage-env.d.ts +7 -0
- package/dist/usage-env.d.ts.map +1 -0
- package/dist/usage-env.js +16 -0
- package/dist/usage.d.ts +54 -0
- package/dist/usage.d.ts.map +1 -0
- package/dist/usage.js +53 -0
- package/dist/utils.d.ts +16 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +83 -0
- package/dist/zed-register.d.ts +26 -0
- package/dist/zed-register.d.ts.map +1 -0
- package/dist/zed-register.js +106 -0
- package/package.json +79 -0
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
import { Agent, AgentSideConnection, AuthenticateRequest, CancelNotification, ClientCapabilities, ForkSessionRequest, ForkSessionResponse, InitializeRequest, InitializeResponse, ListSessionsRequest, ListSessionsResponse, LoadSessionRequest, LoadSessionResponse, NewSessionRequest, NewSessionResponse, PromptRequest, PromptResponse, ReadTextFileRequest, ReadTextFileResponse, ResumeSessionRequest, ResumeSessionResponse, SessionConfigOption, SessionModelState, SessionModeState, SessionNotification, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, SetSessionModelRequest, SetSessionModelResponse, SetSessionModeRequest, SetSessionModeResponse, CloseSessionRequest, CloseSessionResponse, DeleteSessionRequest, DeleteSessionResponse, TerminalHandle, TerminalOutputResponse, WriteTextFileRequest, WriteTextFileResponse } from "@agentclientprotocol/sdk";
|
|
2
|
+
import { ModelInfo, Options, PermissionMode, PermissionUpdate, SDKMessageOrigin, SDKPartialAssistantMessage } from "@anthropic-ai/claude-agent-sdk";
|
|
3
|
+
import { ContentBlockParam } from "@anthropic-ai/sdk/resources";
|
|
4
|
+
import { BetaContentBlock, BetaRawContentBlockDelta } from "@anthropic-ai/sdk/resources/beta.mjs";
|
|
5
|
+
import { SettingsManager } from "./settings.js";
|
|
6
|
+
import { TaskState } from "./tools.js";
|
|
7
|
+
import { type Engine } from "./engine.js";
|
|
8
|
+
import type { IPty } from "node-pty";
|
|
9
|
+
import { SessionEngine } from "./engine-lifecycle.js";
|
|
10
|
+
import type { SessionWatcher } from "./engine-lifecycle.js";
|
|
11
|
+
import type { JsonlWatcher, GetMessages, SessionMessage } from "./engine-watcher.js";
|
|
12
|
+
import type { LocateOptions } from "./jsonl.js";
|
|
13
|
+
import type { DiffEnrichedReaderOptions } from "./diff-enriched-reader.js";
|
|
14
|
+
import type { ListSubagents, GetSubagentMessages } from "./subagent-source.js";
|
|
15
|
+
import type { SubagentWatcher } from "./subagent-watcher.js";
|
|
16
|
+
import type { DetectorSchedule, EndOfTurnDetector } from "./end-of-turn.js";
|
|
17
|
+
import type { SessionGate, SessionGateOptions } from "./permissions/gate-wiring.js";
|
|
18
|
+
export declare const CLAUDE_CONFIG_DIR: string;
|
|
19
|
+
/**
|
|
20
|
+
* Logger interface for customizing logging output
|
|
21
|
+
*/
|
|
22
|
+
export interface Logger {
|
|
23
|
+
log: (...args: any[]) => void;
|
|
24
|
+
error: (...args: any[]) => void;
|
|
25
|
+
}
|
|
26
|
+
type AccumulatedUsage = {
|
|
27
|
+
inputTokens: number;
|
|
28
|
+
outputTokens: number;
|
|
29
|
+
cachedReadTokens: number;
|
|
30
|
+
cachedWriteTokens: number;
|
|
31
|
+
};
|
|
32
|
+
type Session = {
|
|
33
|
+
/** The live PTY handle (story 013/014) running the subscription `claude` TUI for this session. */
|
|
34
|
+
pty: IPty;
|
|
35
|
+
/**
|
|
36
|
+
* The per-session JSONL tail watcher (story 015); the single source of truth for state (§2).
|
|
37
|
+
* OPTIONAL (story 028, sub-task 2.1): a FRESH session returns BEFORE its transcript exists, so the
|
|
38
|
+
* watcher is armed later — out of band — once the transcript appears on the user's first
|
|
39
|
+
* interaction. It is `undefined` between create and that first appearance.
|
|
40
|
+
*/
|
|
41
|
+
watcher?: JsonlWatcher | SessionWatcher;
|
|
42
|
+
/** Emit-once guard: uuids already surfaced to the client (Group 2 wires the pump that fills it). */
|
|
43
|
+
emitted: Set<string>;
|
|
44
|
+
/**
|
|
45
|
+
* Story 041 (R2.3) — emit-once guard for NESTED sub-agent (sidechain) rows, kept PARALLEL to and
|
|
46
|
+
* DECOUPLED from `emitted`. The nested pass dedups per sub-agent row uuid here so a late-arriving
|
|
47
|
+
* sidechain row still emits after its spawning turn's uuid is already in `emitted` (the parent turn
|
|
48
|
+
* was surfaced in an earlier pump). Per-session — sub-agent row uuids are session-scoped.
|
|
49
|
+
*/
|
|
50
|
+
emittedNested: Set<string>;
|
|
51
|
+
/** The managed engine that owns the PTY + watcher; used for idempotent teardown (story 014). */
|
|
52
|
+
engine?: SessionEngine;
|
|
53
|
+
cancelled: boolean;
|
|
54
|
+
cwd: string;
|
|
55
|
+
/** Serialized snapshot of session-defining params (cwd, mcpServers) used to
|
|
56
|
+
* detect when loadSession/resumeSession is called with changed values. */
|
|
57
|
+
sessionFingerprint: string;
|
|
58
|
+
settingsManager: SettingsManager;
|
|
59
|
+
accumulatedUsage: AccumulatedUsage;
|
|
60
|
+
modes: SessionModeState;
|
|
61
|
+
models: SessionModelState;
|
|
62
|
+
modelInfos: ModelInfo[];
|
|
63
|
+
configOptions: SessionConfigOption[];
|
|
64
|
+
/** Context window size of the last top-level assistant model, carried across
|
|
65
|
+
* prompts so mid-stream usage_update notifications report a correct `size`
|
|
66
|
+
* before the turn's first result message arrives. Defaults to
|
|
67
|
+
* DEFAULT_CONTEXT_WINDOW, refreshed from each result's modelUsage, and
|
|
68
|
+
* invalidated when the user switches the session's model. */
|
|
69
|
+
contextWindowSize: number;
|
|
70
|
+
/** Accumulated task list for the session, keyed by task ID. Task IDs are
|
|
71
|
+
* per-session, so this state must not be shared across sessions. */
|
|
72
|
+
taskState: TaskState;
|
|
73
|
+
/** Per-session tool_use cache so the pump's tool_call→tool_call_update lifecycle stays correct
|
|
74
|
+
* across LIVE re-reads (story 023 Groups 2-3). Per-session — tool_use ids are session-scoped. */
|
|
75
|
+
toolUseCache: ToolUseCache;
|
|
76
|
+
/** Set once the §10 billing guard-rail (story 022) has inspected the first batch (Group 4.1). */
|
|
77
|
+
guardChecked: boolean;
|
|
78
|
+
/** Story 025 (R3.3, R8) — latched true once the client rejects a usage_update; suppresses all
|
|
79
|
+
* further usage_update emission for the session (the surrounding stream keeps flowing). */
|
|
80
|
+
usageDisabled: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Story 030 (R5.1) — the in-flight turn's end-of-turn detector for the current `session/prompt`.
|
|
83
|
+
* `prompt()` sets it (via {@link createTurnResolver}) for the duration of one turn so the live pump
|
|
84
|
+
* can feed raw JSONL messages to it and the cancel path can reach it; cleared in `prompt()`'s
|
|
85
|
+
* `finally`. The detector — never the writer — resolves the pending prompt (R5.1).
|
|
86
|
+
*/
|
|
87
|
+
turnDetector?: EndOfTurnDetector;
|
|
88
|
+
/**
|
|
89
|
+
* Story 031 (R2.1, R2.2) — the in-flight turn's cancel handle from {@link createTurnResolver}.
|
|
90
|
+
* `prompt()` sets it for the turn's duration so the cancel path resolves the pending prompt as
|
|
91
|
+
* `cancelled` through the story-024 latch; cleared in `prompt()`'s catch + finally. Undefined when
|
|
92
|
+
* no turn is in flight (cancel is then a no-op).
|
|
93
|
+
*/
|
|
94
|
+
turnCancel?: () => void;
|
|
95
|
+
/**
|
|
96
|
+
* Story 030 (R5.1) — per-session high-water cursor into the monotonic ordered superset
|
|
97
|
+
* {@link readOrderedMessages} returns, so each raw message is fed to {@link turnDetector} exactly
|
|
98
|
+
* once and a prior turn's terminal boundary is never re-observed.
|
|
99
|
+
*/
|
|
100
|
+
detectorCursor?: number;
|
|
101
|
+
/**
|
|
102
|
+
* Story 034 (§9 / R3.3) — the per-session HYBRID permission-gate runtime: loopback `PreToolUse`
|
|
103
|
+
* hook server + scratch `--settings` backup + `tool_use.id` correlator. Present only when the
|
|
104
|
+
* gate is enabled AND the session spawned fresh (resume/replay paths carry no gate). The live
|
|
105
|
+
* pump REGISTERS every JSONL `tool_use` id into `gate.correlator`; `teardownSession` and the PTY
|
|
106
|
+
* `onExit` hook both call `gate.teardown()` (idempotent).
|
|
107
|
+
*/
|
|
108
|
+
gate?: SessionGate;
|
|
109
|
+
/**
|
|
110
|
+
* Story 044 (R2.2/R2.3) — the per-session Option-B sub-agent watcher: polls the story-041 SDK
|
|
111
|
+
* sidechain readers while a `Task`/`Agent` spawn is OPEN on the main chain, feeding turn liveness
|
|
112
|
+
* + the incremental nested render. Armed by the pump ONLY while such a spawn is open AND the
|
|
113
|
+
* `liveSubagentWatch` flag is ON; stopped when every spawn id closes (R2.2), when the turn ends
|
|
114
|
+
* (prompt finally), and on session teardown (R2.3). Undefined whenever no watcher is armed.
|
|
115
|
+
*/
|
|
116
|
+
subagentWatcher?: SubagentWatcher;
|
|
117
|
+
/**
|
|
118
|
+
* Story 044 (R3.1) — the latest main chain the pump read. The watcher's `onActivity` re-emits
|
|
119
|
+
* from it, so an incremental nested render needs NO main-chain re-read: the sidechain rows are
|
|
120
|
+
* sourced fresh inside `emitLinearizedWithNested`; the main chain is whatever the last pump saw.
|
|
121
|
+
*/
|
|
122
|
+
lastMessages?: SessionMessage[];
|
|
123
|
+
};
|
|
124
|
+
/** What {@link StartEngine} returns: the authoritative session id (engine-spawn-generated for a
|
|
125
|
+
* fresh session, the resumed id otherwise), the live PTY, the started watcher, the owning engine,
|
|
126
|
+
* and the runtime cwd discovered from inside the JSONL (may be undefined until the first line). */
|
|
127
|
+
export interface StartedEngine {
|
|
128
|
+
sessionId: string;
|
|
129
|
+
pty: IPty;
|
|
130
|
+
/**
|
|
131
|
+
* The started watcher. OPTIONAL (story 028, sub-task 2.1): the FRESH path now returns BEFORE the
|
|
132
|
+
* transcript exists, so it returns `watcher: undefined` and arms the watcher in the background
|
|
133
|
+
* once the transcript appears (it sets `engine.watcher` then). The RESUME path still returns the
|
|
134
|
+
* armed watcher synchronously.
|
|
135
|
+
*/
|
|
136
|
+
watcher?: JsonlWatcher | SessionWatcher;
|
|
137
|
+
engine?: SessionEngine;
|
|
138
|
+
cwd?: string;
|
|
139
|
+
}
|
|
140
|
+
/** Arguments passed to {@link StartEngine}. `sessionId` is the requested id for resume/fork; for a
|
|
141
|
+
* fresh session it is undefined and the engine's spawn generates the authoritative id. */
|
|
142
|
+
export interface StartEngineArgs {
|
|
143
|
+
/** Requested session id (resume/fork). Undefined for a fresh session (engine generates it). */
|
|
144
|
+
sessionId?: string;
|
|
145
|
+
/** Host working directory the TUI spawns in. */
|
|
146
|
+
cwd: string;
|
|
147
|
+
/** True when reattaching to a prior session (story 014 robust resume argv). */
|
|
148
|
+
resume?: boolean;
|
|
149
|
+
/** Base environment to sanitize (defaults to process.env in the production wiring). */
|
|
150
|
+
baseEnv?: Record<string, string | undefined>;
|
|
151
|
+
/** The live session registry the engine registers into / deletes from on cleanup. */
|
|
152
|
+
sessions?: Map<string, SessionEngine>;
|
|
153
|
+
/**
|
|
154
|
+
* Group 2 pump trigger: invoked with the RESOLVED session id on every watcher signal so the
|
|
155
|
+
* tail-driven update pump re-reads the JSONL and emits. Absent in pure-spawn unit tests.
|
|
156
|
+
*/
|
|
157
|
+
onEvent?: (sessionId: string) => void;
|
|
158
|
+
/**
|
|
159
|
+
* Story 027 (live-acceptance regression): Degrau-1 read-only loadSession path. When true, the
|
|
160
|
+
* engine LOCATES the existing transcript for replay but does NOT spawn a live `claude --resume`
|
|
161
|
+
* (no PTY, no tail watcher, no live engine). A live resume would (a) re-emit the whole history
|
|
162
|
+
* through the tail pump (double render in the Agent Panel) and (b) run with the fork process cwd
|
|
163
|
+
* (≠ the session cwd), writing a duplicate-basename transcript that makes the sessionId glob
|
|
164
|
+
* ambiguous → resourceNotFound on the next load. Default false: fresh/resume spawn is unchanged.
|
|
165
|
+
*/
|
|
166
|
+
replayOnly?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Story 028 (sub-task 2.1): injectable node-pty spawn. Forwarded to {@link createSessionEngine}
|
|
169
|
+
* (fresh) and {@link spawnResumePty} (resume) so a test can drive the REAL {@link
|
|
170
|
+
* defaultStartEngine} without launching a real `claude` TUI. Production passes nothing → the real
|
|
171
|
+
* `pty.spawn`.
|
|
172
|
+
*/
|
|
173
|
+
spawn?: typeof import("node-pty").spawn;
|
|
174
|
+
/**
|
|
175
|
+
* Story 028 (sub-task 2.1): injectable transcript-discovery seams (glob/clock/etc.) forwarded to
|
|
176
|
+
* the internal {@link resolveWatchTarget} calls so a test injects ONLY the `glob` (and, in a Red
|
|
177
|
+
* probe, a finite `watchdogMs`) without re-masking the bug by stubbing discovery wholesale. On the
|
|
178
|
+
* FRESH path the internal `watchdogMs: Infinity` and `signal` are applied AROUND this (signal last,
|
|
179
|
+
* so the cancellation handle always wins). Production passes nothing → real glob + real clock.
|
|
180
|
+
*/
|
|
181
|
+
locateOptions?: LocateOptions;
|
|
182
|
+
/**
|
|
183
|
+
* Story 034 (§9 hybrid gate): the per-session SCRATCH settings file (story-032 `injectHook`)
|
|
184
|
+
* carrying the fork's `PreToolUse` hook, appended to the FRESH spawn as `--settings "<file>"`.
|
|
185
|
+
* Already written BEFORE startEngine is called (blocker c ordering). Absent → ungated spawn.
|
|
186
|
+
* Fresh-path only — mirroring the story-029 `planMode` precedent, the resume argv
|
|
187
|
+
* (`buildResumeArgv`) is NOT extended here; the replay-only load path spawns nothing.
|
|
188
|
+
*/
|
|
189
|
+
settingsFile?: string;
|
|
190
|
+
}
|
|
191
|
+
/** The createSession injection seam: spawn the PTY engine + JSONL watcher + locate the transcript. */
|
|
192
|
+
export type StartEngine = (args: StartEngineArgs) => Promise<StartedEngine> | StartedEngine;
|
|
193
|
+
/** Optional bundle of injectable dependencies for {@link ClaudeAcpAgent} (Degrau-1 PTY engine). */
|
|
194
|
+
export interface AgentDeps {
|
|
195
|
+
/** Override the PTY-engine + JSONL-watcher start (production default: {@link defaultStartEngine}). */
|
|
196
|
+
startEngine?: StartEngine;
|
|
197
|
+
/** Override the live JSONL reader the pump re-reads on each signal (default: SDK getSessionMessages). */
|
|
198
|
+
getMessages?: GetMessages;
|
|
199
|
+
/**
|
|
200
|
+
* Story 041 — override the sidechain readers the pump sources nested sub-agent rows from
|
|
201
|
+
* (defaults: SDK `listSubagents` / `getSubagentMessages` via {@link defaultListSubagents} /
|
|
202
|
+
* {@link defaultGetSubagentMessages}). Injected by the deterministic unit tests as stubs/spies.
|
|
203
|
+
*/
|
|
204
|
+
listSubagents?: ListSubagents;
|
|
205
|
+
getSubagentMessages?: GetSubagentMessages;
|
|
206
|
+
/**
|
|
207
|
+
* Story 025 / Task 3.1 (R3.1) — opt IN to the UNSTABLE `usage_update` notification. Defaults
|
|
208
|
+
* OFF: the pump constructs and emits no usage_update at all, so the session/update stream is
|
|
209
|
+
* byte-for-byte unaffected. Kept OFF in production until the live-Zed acceptance probe
|
|
210
|
+
* (Task 3.3, R8) confirms the user's Zed tolerates it.
|
|
211
|
+
*/
|
|
212
|
+
usageUpdate?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Story 043 (R2.1/R2.2/R5.1) — opt IN to the live Edit/Write diff. When ON, `this.getMessages` is
|
|
215
|
+
* wrapped in the diff-enriched reader (getSessionMessages + uuid→`toolUseResult` hydration), which
|
|
216
|
+
* restores the story-021 structuredPatch diff on BOTH the live pump and the session/load replay
|
|
217
|
+
* (both read `this.getMessages` once). Defaults OFF at THIS constructor seam (the story-038
|
|
218
|
+
* `usageUpdate` two-layer pattern) so directly-constructed test agents get the byte-for-byte pre-043
|
|
219
|
+
* reduced reader for determinism; the entrypoint (index.ts) is what defaults it ON (LIVE_DIFF, ON
|
|
220
|
+
* unless `LIVE_DIFF=0`/`false`). OFF → byte-for-byte the pre-043 reduced reader (R5.1).
|
|
221
|
+
*/
|
|
222
|
+
liveDiff?: boolean;
|
|
223
|
+
/**
|
|
224
|
+
* Story 043 — test seam: the injectable {@link DiffEnrichedReaderOptions} forwarded to the
|
|
225
|
+
* diff-enriched reader when `liveDiff` is ON, so a unit test drives the reader's
|
|
226
|
+
* `findTranscript`/`readRawLines` deterministically WITHOUT touching the real `~/.claude` transcript
|
|
227
|
+
* tree (without it the pump-integration test would hit the real filesystem). Production passes
|
|
228
|
+
* nothing → the reader uses its billing-free `~/.claude` glob + `fs` read defaults.
|
|
229
|
+
*/
|
|
230
|
+
diffEnrichOptions?: DiffEnrichedReaderOptions;
|
|
231
|
+
/**
|
|
232
|
+
* Story 044 (R4.1/R4.2) — opt IN to the live sub-agent watcher: the Option-B 2nd watcher that
|
|
233
|
+
* POLLs the SDK sidechain readers while a turn is in flight, feeding the story-024 detector's
|
|
234
|
+
* `noteActivity()` seam + the incremental nested render so a long-running sub-agent (rows in
|
|
235
|
+
* subagents/*.jsonl, MAIN transcript silent) no longer false-stalls the turn watchdog. Defaults
|
|
236
|
+
* OFF at THIS constructor seam (the story-038 `usageUpdate` two-layer pattern) so
|
|
237
|
+
* directly-constructed test agents arm no 2nd watcher for determinism; the entrypoint (index.ts)
|
|
238
|
+
* is what defaults it ON (FORK_LIVE_SUBAGENT_WATCH, ON unless "0"/"false"). OFF → byte-for-byte
|
|
239
|
+
* today's pull-only path: NO 2nd watcher armed (R4.2).
|
|
240
|
+
*/
|
|
241
|
+
liveSubagentWatch?: boolean;
|
|
242
|
+
/**
|
|
243
|
+
* Story 030 (R1.2, R5.1) — the single timer seam shared by `sendPrompt` (the §8 write→\r delay)
|
|
244
|
+
* and `createTurnResolver` (the detector's Δt + watchdog). Injecting ONE schedule lets a unit test
|
|
245
|
+
* drive both with one fake clock. Defaults to a `setTimeout`/`clearTimeout` wrapper.
|
|
246
|
+
*/
|
|
247
|
+
schedule?: DetectorSchedule;
|
|
248
|
+
/**
|
|
249
|
+
* Story 031 (R1.2) — the short LOCAL escalation window (ms) between cancel-ladder rungs:
|
|
250
|
+
* Ctrl+C → wait → Esc → wait → kill. DISTINCT from the 5583 ms turn watchdog (story 024), which
|
|
251
|
+
* is NOT re-derived here. Injected so a unit test drives the ladder with a fake clock; defaults to
|
|
252
|
+
* a conservative production value. Live in-Zed cancel tuning is out of scope (story 031).
|
|
253
|
+
*/
|
|
254
|
+
cancelEscalationMs?: number;
|
|
255
|
+
/**
|
|
256
|
+
* Story 034 (§9 / R3.3) — enable the per-session HYBRID permission gate wiring: free loopback
|
|
257
|
+
* port + `PreToolUse` hook server + scratch `--settings` inject on every FRESH spawn, with the
|
|
258
|
+
* decider raising ACP `session/request_permission` correlated by `tool_use.id`. Resolved by the
|
|
259
|
+
* production bootstrap (index.ts) from `FORK_GATE` — ON unless `FORK_GATE=off` (the v1 policy is
|
|
260
|
+
* the hybrid gate, PERMISSIONS.md §1; the env var is the diagnostic escape hatch). Defaults OFF
|
|
261
|
+
* at THIS constructor seam (the story-038 `usageUpdate` two-layer pattern) so directly-constructed
|
|
262
|
+
* test agents spin no servers and write no files unless they opt in.
|
|
263
|
+
*/
|
|
264
|
+
gate?: boolean;
|
|
265
|
+
/**
|
|
266
|
+
* Story 034 — gate timing/placement knobs forwarded to {@link setupSessionGate} (correlation
|
|
267
|
+
* wait, #52822 sweep windows, scratch dir, port allocator). `client`/`onWarn` are agent-owned and
|
|
268
|
+
* cannot be overridden. Tests inject short windows here; production passes nothing.
|
|
269
|
+
*/
|
|
270
|
+
gateOptions?: Omit<SessionGateOptions, "client" | "onWarn">;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Production default for the {@link StartEngine} seam. Spawns the subscription `claude` TUI under a
|
|
274
|
+
* managed PTY engine (story 013/014), starts the read-only JSONL tail watcher (story 015) bound to
|
|
275
|
+
* that PTY, then locates the transcript by sessionId glob and reads the runtime cwd from INSIDE it
|
|
276
|
+
* (story 015 jsonl.ts; the cwd→dir encoding is irreversible, so we never decode the dir name).
|
|
277
|
+
*
|
|
278
|
+
* Fresh session: {@link createSessionEngine} spawns the PTY and generates the authoritative session
|
|
279
|
+
* id internally (story 013) — that id becomes the session key. Resume/fork: {@link spawnResumePty}
|
|
280
|
+
* reattaches to the requested id with the §5 robust-resume argv, wrapped in a {@link SessionEngine}.
|
|
281
|
+
*
|
|
282
|
+
* The watcher's `onEvent` is a no-op placeholder in Group 1 — the ACP pump that forwards new JSONL
|
|
283
|
+
* messages to the client is Group 2. NO SDK `query()` is reachable here.
|
|
284
|
+
*/
|
|
285
|
+
export declare function defaultStartEngine(args: StartEngineArgs): Promise<StartedEngine>;
|
|
286
|
+
type BackgroundTerminal = {
|
|
287
|
+
handle: TerminalHandle;
|
|
288
|
+
status: "started";
|
|
289
|
+
lastOutput: TerminalOutputResponse | null;
|
|
290
|
+
} | {
|
|
291
|
+
status: "aborted" | "exited" | "killed" | "timedOut";
|
|
292
|
+
pendingOutput: TerminalOutputResponse;
|
|
293
|
+
};
|
|
294
|
+
export type SDKMessageFilter = {
|
|
295
|
+
type: string;
|
|
296
|
+
subtype?: string;
|
|
297
|
+
origin?: SDKMessageOrigin["kind"];
|
|
298
|
+
};
|
|
299
|
+
/**
|
|
300
|
+
* Extra metadata that can be given when creating a new session.
|
|
301
|
+
*/
|
|
302
|
+
export type NewSessionMeta = {
|
|
303
|
+
claudeCode?: {
|
|
304
|
+
/**
|
|
305
|
+
* Options forwarded to Claude Code when starting a new session.
|
|
306
|
+
* Those parameters will be ignored and managed by ACP:
|
|
307
|
+
* - cwd
|
|
308
|
+
* - includePartialMessages
|
|
309
|
+
* - allowDangerouslySkipPermissions
|
|
310
|
+
* - permissionMode
|
|
311
|
+
* - canUseTool
|
|
312
|
+
* - executable
|
|
313
|
+
* Those parameters will be used and updated to work with ACP:
|
|
314
|
+
* - hooks (merged with ACP's hooks)
|
|
315
|
+
* - mcpServers (merged with ACP's mcpServers)
|
|
316
|
+
* - disallowedTools (merged with ACP's disallowedTools)
|
|
317
|
+
* - tools (passed through; defaults to claude_code preset if not provided)
|
|
318
|
+
*/
|
|
319
|
+
options?: Options;
|
|
320
|
+
/**
|
|
321
|
+
* When set, raw SDK messages are emitted as extNotification("_claude/sdkMessage", message)
|
|
322
|
+
* in addition to normal processing.
|
|
323
|
+
* - true: emit all messages
|
|
324
|
+
* - false/undefined: emit nothing (default)
|
|
325
|
+
* - SDKMessageFilter[]: emit only messages matching at least one filter
|
|
326
|
+
*/
|
|
327
|
+
emitRawSDKMessages?: boolean | SDKMessageFilter[];
|
|
328
|
+
};
|
|
329
|
+
additionalRoots?: string[];
|
|
330
|
+
};
|
|
331
|
+
/**
|
|
332
|
+
* Extra metadata for 'gateway' authentication requests.
|
|
333
|
+
*/
|
|
334
|
+
type GatewayAuthMeta = {
|
|
335
|
+
/**
|
|
336
|
+
* These parameters are mapped to environment variables to:
|
|
337
|
+
* - Redirect API calls via baseUrl
|
|
338
|
+
* - Inject custom headers
|
|
339
|
+
* - Bypass the default Claude login requirement
|
|
340
|
+
*/
|
|
341
|
+
gateway: {
|
|
342
|
+
baseUrl: string;
|
|
343
|
+
headers: Record<string, string>;
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
type GatewayAuthRequest = AuthenticateRequest & {
|
|
347
|
+
_meta?: GatewayAuthMeta;
|
|
348
|
+
};
|
|
349
|
+
/**
|
|
350
|
+
* Extra metadata that the agent provides for each tool_call / tool_update update.
|
|
351
|
+
*/
|
|
352
|
+
export type ToolUpdateMeta = {
|
|
353
|
+
claudeCode?: {
|
|
354
|
+
toolName: string;
|
|
355
|
+
toolResponse?: unknown;
|
|
356
|
+
};
|
|
357
|
+
terminal_info?: {
|
|
358
|
+
terminal_id: string;
|
|
359
|
+
};
|
|
360
|
+
terminal_output?: {
|
|
361
|
+
terminal_id: string;
|
|
362
|
+
data: string;
|
|
363
|
+
};
|
|
364
|
+
terminal_exit?: {
|
|
365
|
+
terminal_id: string;
|
|
366
|
+
exit_code: number;
|
|
367
|
+
signal: string | null;
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
export type ToolUseCache = {
|
|
371
|
+
[key: string]: {
|
|
372
|
+
type: "tool_use" | "server_tool_use" | "mcp_tool_use";
|
|
373
|
+
id: string;
|
|
374
|
+
name: string;
|
|
375
|
+
input: unknown;
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
/**
|
|
379
|
+
* Return user-message content with local-command marker tags removed, or
|
|
380
|
+
* `null` if nothing meaningful remains (caller should skip the message).
|
|
381
|
+
* Preserves real prose that's mixed in alongside the markers — e.g. a
|
|
382
|
+
* message like `<command-name>…</command-name>hi` becomes `hi`.
|
|
383
|
+
*/
|
|
384
|
+
export declare function stripLocalCommandMetadata(content: unknown): unknown | null;
|
|
385
|
+
export declare function isLocalCommandMetadata(content: unknown): boolean;
|
|
386
|
+
export declare function resolvePermissionMode(defaultMode?: unknown, logger?: Logger): PermissionMode;
|
|
387
|
+
/**
|
|
388
|
+
* Builds the label for the "Always Allow" permission option so the user can see
|
|
389
|
+
* the exact scope they are committing to. Uses the SDK-provided suggestions
|
|
390
|
+
* when available (e.g. `Bash(npm test:*)`) and falls back to naming the whole
|
|
391
|
+
* tool so "Always Allow" is never a blank check without disclosure.
|
|
392
|
+
*/
|
|
393
|
+
export declare function describeAlwaysAllow(suggestions: PermissionUpdate[] | undefined, toolName: string): string;
|
|
394
|
+
export declare class ClaudeAcpAgent implements Agent {
|
|
395
|
+
sessions: {
|
|
396
|
+
[key: string]: Session;
|
|
397
|
+
};
|
|
398
|
+
client: AgentSideConnection;
|
|
399
|
+
toolUseCache: ToolUseCache;
|
|
400
|
+
backgroundTerminals: {
|
|
401
|
+
[key: string]: BackgroundTerminal;
|
|
402
|
+
};
|
|
403
|
+
clientCapabilities?: ClientCapabilities;
|
|
404
|
+
logger: Logger;
|
|
405
|
+
gatewayAuthRequest?: GatewayAuthRequest;
|
|
406
|
+
engine: Engine;
|
|
407
|
+
private readonly startEngine;
|
|
408
|
+
/** Override for the live JSONL reader the pump re-reads (default: SDK getSessionMessages). */
|
|
409
|
+
private readonly getMessages?;
|
|
410
|
+
/** Story 041 — the sidechain readers the pump sources nested sub-agent rows from; default to the
|
|
411
|
+
* SDK's pure `listSubagents` / `getSubagentMessages` (tests inject stubs). */
|
|
412
|
+
private readonly listSubagents;
|
|
413
|
+
private readonly getSubagentMessages;
|
|
414
|
+
/** Story 025 (R3.1) — UNSTABLE usage_update feature flag; defaults OFF. */
|
|
415
|
+
private readonly usageUpdate;
|
|
416
|
+
/** Story 044 (R4.1/R4.2) — live sub-agent watcher flag; see {@link AgentDeps.liveSubagentWatch}. */
|
|
417
|
+
private readonly liveSubagentWatch;
|
|
418
|
+
/**
|
|
419
|
+
* Story 030 (R1.2, R5.1) — the single timer seam shared by `sendPrompt` (the §8 write→\r delay)
|
|
420
|
+
* and `createTurnResolver` (Δt + watchdog), so one injected fake clock drives both in unit tests.
|
|
421
|
+
*/
|
|
422
|
+
private readonly schedule;
|
|
423
|
+
/** Story 031 (R1.2) — cancel-ladder escalation window (ms); see {@link AgentDeps.cancelEscalationMs}. */
|
|
424
|
+
private readonly cancelEscalationMs;
|
|
425
|
+
/** Story 034 (§9) — hybrid permission-gate wiring flag; see {@link AgentDeps.gate}. */
|
|
426
|
+
private readonly gateEnabled;
|
|
427
|
+
/** Story 034 — gate tuning knobs forwarded to setupSessionGate; see {@link AgentDeps.gateOptions}. */
|
|
428
|
+
private readonly gateOptions?;
|
|
429
|
+
/** Live PTY-engine registry shared with the per-session engines (story 014 cleanup map). */
|
|
430
|
+
private readonly engines;
|
|
431
|
+
constructor(client: AgentSideConnection, logger?: Logger, engine?: Engine, deps?: AgentDeps);
|
|
432
|
+
initialize(request: InitializeRequest): Promise<InitializeResponse>;
|
|
433
|
+
newSession(params: NewSessionRequest): Promise<NewSessionResponse>;
|
|
434
|
+
unstable_forkSession(params: ForkSessionRequest): Promise<ForkSessionResponse>;
|
|
435
|
+
resumeSession(params: ResumeSessionRequest): Promise<ResumeSessionResponse>;
|
|
436
|
+
loadSession(params: LoadSessionRequest): Promise<LoadSessionResponse>;
|
|
437
|
+
listSessions(params: ListSessionsRequest): Promise<ListSessionsResponse>;
|
|
438
|
+
authenticate(_params: AuthenticateRequest): Promise<void>;
|
|
439
|
+
prompt(params: PromptRequest): Promise<PromptResponse>;
|
|
440
|
+
cancel(params: CancelNotification): Promise<void>;
|
|
441
|
+
/** Cleanly tear down a session: cancel in-flight work, dispose resources,
|
|
442
|
+
* and remove it from the session map. */
|
|
443
|
+
private teardownSession;
|
|
444
|
+
/** Tear down all active sessions. Called when the ACP connection closes. */
|
|
445
|
+
dispose(): Promise<void>;
|
|
446
|
+
closeSession(params: CloseSessionRequest): Promise<CloseSessionResponse>;
|
|
447
|
+
unstable_deleteSession(params: DeleteSessionRequest): Promise<DeleteSessionResponse>;
|
|
448
|
+
unstable_setSessionModel(params: SetSessionModelRequest): Promise<SetSessionModelResponse | void>;
|
|
449
|
+
setSessionMode(params: SetSessionModeRequest): Promise<SetSessionModeResponse>;
|
|
450
|
+
setSessionConfigOption(params: SetSessionConfigOptionRequest): Promise<SetSessionConfigOptionResponse>;
|
|
451
|
+
private applySessionMode;
|
|
452
|
+
private replaySessionHistory;
|
|
453
|
+
/**
|
|
454
|
+
* Shared per-turn ACP emission used by BOTH the `session/load` replay ({@link replaySessionHistory})
|
|
455
|
+
* and the live tail pump ({@link pumpUpdates}). Emits the message's `toAcpNotifications` updates with
|
|
456
|
+
* `registerHooks:false`; when the turn carries a `toolUseResult`, the story-021 structuredPatch diff
|
|
457
|
+
* (`{type:'diff'}`) attached to the open tool call; and finally the optional, default-OFF UNSTABLE
|
|
458
|
+
* `usage_update` (story 025) with its R8 per-session reject latch. Factoring all three here is what
|
|
459
|
+
* guarantees a LOADED thread renders byte-for-byte like a LIVE one (story 026 R3.3/R4.2): the
|
|
460
|
+
* validate-026 gap was the diff-emission block living only in pumpUpdates, so a replay-only load (no
|
|
461
|
+
* live pump) rendered Edit/Write WITHOUT a diff; story 038 moved usage_update HERE for the SAME
|
|
462
|
+
* reason (loaded==live for usage). Only dedup and the billing guard-rail stay with the callers.
|
|
463
|
+
*/
|
|
464
|
+
private emitTurnUpdates;
|
|
465
|
+
/**
|
|
466
|
+
* Story 041 (R2.1, R2.2) — build the ACP `tool_call_update`(s) that render ONE nested sub-agent
|
|
467
|
+
* row UNDER its spawning Task tool_call. The nested row's `parent_tool_use_id` is the SPAWNING
|
|
468
|
+
* Task's `tool_use.id`; Zed merges `tool_call_update`s by `tool_call_id` and APPENDS their content
|
|
469
|
+
* (ZED-CLIENT-STUDY §Q2 ev.6: tool calls correlate by id with field-by-field merge, `ContentBlock::append`
|
|
470
|
+
* is pure concatenation), so emitting on the parent id nests the sub-agent's output under the Task.
|
|
471
|
+
*
|
|
472
|
+
* The block→content mapping is NOT re-implemented here: it REUSES the story-018/019/020 translator
|
|
473
|
+
* `toAcpNotifications` (text → agent_message_chunk, thinking → agent_thought_chunk, the sub-agent's
|
|
474
|
+
* own tool_use → tool_call, its tool_result → tool_call_update). We then RE-TARGET that translated
|
|
475
|
+
* output as `ToolCallContent` items on the PARENT id. Consequently the sub-agent's own tool_use /
|
|
476
|
+
* tool_result render as summarized markdown content WITHIN the parent Task tool_call (the tool's
|
|
477
|
+
* title/translated content), NOT as separate top-level `tool_call`s.
|
|
478
|
+
*
|
|
479
|
+
* Returns `[]` (no emission) when `parent_tool_use_id` is missing/null — there is no parent to nest
|
|
480
|
+
* under (a non-sidechain or malformed row). The caller does the dedup / arrival ordering (story 017's
|
|
481
|
+
* uuid-sorted `Turn.nested`); this is a pure builder.
|
|
482
|
+
*/
|
|
483
|
+
private nestedUpdatesFor;
|
|
484
|
+
/**
|
|
485
|
+
* Story 041 (R2.2) — fold one translated nested update into `ToolCallContent[]` for nesting under
|
|
486
|
+
* the parent Task. Message/thought chunks contribute their ContentBlock directly. The sub-agent's
|
|
487
|
+
* OWN tool_use/tool_result (a `tool_call`/`tool_call_update` from the translator) are SUMMARIZED as
|
|
488
|
+
* markdown content within the parent — never re-emitted as a separate top-level tool_call: we take
|
|
489
|
+
* the tool's human-readable `title` (a bold markdown line) plus any `content` the story-019 translator
|
|
490
|
+
* already produced. `plan` and other non-content updates carry nothing renderable as nested content
|
|
491
|
+
* and are dropped.
|
|
492
|
+
*/
|
|
493
|
+
private toNestedContent;
|
|
494
|
+
/**
|
|
495
|
+
* Tail-driven update pump (story 023 Groups 2-3). Fired on each watcher signal: re-reads the
|
|
496
|
+
* transcript LIVE via getSessionMessages (E5 REUSE-live, billing-free), linearizes via story 017,
|
|
497
|
+
* and emits each not-yet-emitted turn through the reused `toAcpNotifications` (Edit/Write diffs are
|
|
498
|
+
* sourced from `structuredPatch` by tools.ts — story 021). Ordering is the linear order story 017
|
|
499
|
+
* returns (no re-ordering); idempotency across overlapping/prefix re-reads comes from the
|
|
500
|
+
* per-session `emitted` uuid set (R3.3/R3.4). The JSONL tail is the single source of truth — there
|
|
501
|
+
* is NO SDK message stream. The end-of-turn predicate is story 024; this only consumes the signal.
|
|
502
|
+
*/
|
|
503
|
+
private pumpUpdates;
|
|
504
|
+
/**
|
|
505
|
+
* Story 041 (R3.1, R3.2) — the SHARED source+merge+linearize+emit loop run by BOTH the live tail pump
|
|
506
|
+
* ({@link pumpUpdates}) and the `session/load` replay ({@link replaySessionHistory}), so a LOADED
|
|
507
|
+
* thread emits the nested sub-agent rows BYTE-IDENTICALLY to a LIVE one (no replay-only divergence —
|
|
508
|
+
* the validate-026 lesson: any emit path living only in the pump silently diverges on a replay-only
|
|
509
|
+
* load). Steps:
|
|
510
|
+
*
|
|
511
|
+
* 1. `sourceSubagentRows` — GUARDED (R5.2): returns `[]` WITHOUT touching disk when the main chain
|
|
512
|
+
* carries no `Task`/`Agent` `tool_use`, so the common no-subagent turn pays nothing and
|
|
513
|
+
* `forLinearize === messages` (identical-to-pre-change behavior).
|
|
514
|
+
* 2. Merge the sidechain rows onto the main chain ONLY for linearization — story 017 groups each
|
|
515
|
+
* sub-agent row onto its spawning turn's uuid-sorted `Turn.nested`.
|
|
516
|
+
* 3. Per turn: emit the main content behind the UNCHANGED `emitted` gate (a not-yet-emitted
|
|
517
|
+
* top-level turn renders through `emitTurnUpdates` — toAcpNotifications + structuredPatch diff +
|
|
518
|
+
* the optional usage_update); then the DECOUPLED nested pass (per-row `emittedNested` dedup, R2.3)
|
|
519
|
+
* emits each sub-agent row's `tool_call_update`s on the spawning Task's id (R3.1) — this runs EVEN
|
|
520
|
+
* when the parent uuid is already in `emitted`, so a late-arriving sub-agent row still surfaces.
|
|
521
|
+
*
|
|
522
|
+
* The detector / §10 guard / §9 gate feed is NOT part of this helper — it is pump-only and stays on the
|
|
523
|
+
* un-merged main chain in the caller (sub-agent rows must never advance the detector cursor or register
|
|
524
|
+
* as gate tool_uses). The replay caller has no detector/gate feed, so it simply does not run one.
|
|
525
|
+
*/
|
|
526
|
+
private emitLinearizedWithNested;
|
|
527
|
+
readTextFile(params: ReadTextFileRequest): Promise<ReadTextFileResponse>;
|
|
528
|
+
writeTextFile(params: WriteTextFileRequest): Promise<WriteTextFileResponse>;
|
|
529
|
+
private sendAvailableCommandsUpdate;
|
|
530
|
+
private updateConfigOption;
|
|
531
|
+
private applyConfigOptionValue;
|
|
532
|
+
private getOrCreateSession;
|
|
533
|
+
private createSession;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Inline-vs-reference threshold for an embedded `resource` block, in characters
|
|
537
|
+
* of `resource.text`.
|
|
538
|
+
*
|
|
539
|
+
* Content at or above this size is referenced by `@<path>` so the TUI re-reads
|
|
540
|
+
* the file from disk instead of receiving its bytes over the PTY (avoids
|
|
541
|
+
* flooding the terminal with a large paste). Content below it is inlined so a
|
|
542
|
+
* tiny snippet of context is not lost when there is no point round-tripping
|
|
543
|
+
* through the filesystem.
|
|
544
|
+
*
|
|
545
|
+
* This is the SINGLE source of truth: both the `@<path>` and the inline outcomes
|
|
546
|
+
* key off this one constant — no duplicated magic numbers.
|
|
547
|
+
*/
|
|
548
|
+
export declare const EMBEDDED_RESOURCE_INLINE_THRESHOLD = 2048;
|
|
549
|
+
/**
|
|
550
|
+
* Convert an ACP ContentBlock[] (session/prompt) into a PTY text payload string.
|
|
551
|
+
*
|
|
552
|
+
* Reverse-flow (IMPLEMENTACAO-FORK-ACP.md §8): instead of constructing an
|
|
553
|
+
* SDKUserMessage for the core SDK, we assemble the text the TUI should receive
|
|
554
|
+
* over the PTY. Each block yields a fragment; empty fragments are dropped and the
|
|
555
|
+
* survivors are joined with a single space.
|
|
556
|
+
*
|
|
557
|
+
* - text → injected verbatim (with the legacy /mcp: slash-command
|
|
558
|
+
* normalization preserved, since the TUI understands it).
|
|
559
|
+
* - resource_link → `@<path>` for file:// URIs (the TUI re-reads the file), or a
|
|
560
|
+
* `[name](uri)` markdown link for any non-path URI.
|
|
561
|
+
* - resource (text) → large content (≥ EMBEDDED_RESOURCE_INLINE_THRESHOLD) with
|
|
562
|
+
* a file:// path becomes `@<path>` so the TUI re-reads it;
|
|
563
|
+
* anything below the threshold — or large but path-less — is
|
|
564
|
+
* inlined directly so the context is not lost.
|
|
565
|
+
*
|
|
566
|
+
* `resource` (blob) / `image` / `audio` blocks are SILENT no-ops here (R4.1): they
|
|
567
|
+
* emit no PTY bytes and are NOT logged — they are expected-but-unsupported media in
|
|
568
|
+
* v1, not errors. An UNKNOWN block `type` (the `default` branch) and any block whose
|
|
569
|
+
* mapping THROWS are treated as malformed: skipped, recorded via the `logger`, and the
|
|
570
|
+
* remaining valid blocks still map — one bad block never aborts the whole prompt (R1.3).
|
|
571
|
+
*/
|
|
572
|
+
export declare function promptToClaude(prompt: PromptRequest, logger?: Logger): string;
|
|
573
|
+
/**
|
|
574
|
+
* Convert an SDKAssistantMessage (Claude) to a SessionNotification (ACP).
|
|
575
|
+
* Only handles text, image, and thinking chunks for now.
|
|
576
|
+
*/
|
|
577
|
+
export declare function toAcpNotifications(content: string | ContentBlockParam[] | BetaContentBlock[] | BetaRawContentBlockDelta[], role: "assistant" | "user", sessionId: string, toolUseCache: ToolUseCache, client: AgentSideConnection, logger: Logger, options?: {
|
|
578
|
+
registerHooks?: boolean;
|
|
579
|
+
clientCapabilities?: ClientCapabilities;
|
|
580
|
+
parentToolUseId?: string | null;
|
|
581
|
+
cwd?: string;
|
|
582
|
+
taskState?: TaskState;
|
|
583
|
+
}): SessionNotification[];
|
|
584
|
+
export declare function streamEventToAcpNotifications(message: SDKPartialAssistantMessage, sessionId: string, toolUseCache: ToolUseCache, client: AgentSideConnection, logger: Logger, options?: {
|
|
585
|
+
clientCapabilities?: ClientCapabilities;
|
|
586
|
+
cwd?: string;
|
|
587
|
+
taskState?: TaskState;
|
|
588
|
+
}): SessionNotification[];
|
|
589
|
+
export declare function runAcp(deps?: AgentDeps): {
|
|
590
|
+
connection: AgentSideConnection;
|
|
591
|
+
agent: ClaudeAcpAgent;
|
|
592
|
+
};
|
|
593
|
+
export {};
|
|
594
|
+
//# sourceMappingURL=acp-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acp-agent.d.ts","sourceRoot":"","sources":["../src/acp-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,mBAAmB,EACnB,mBAAmB,EAEnB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EAEnB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EAEpB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,6BAA6B,EAC7B,8BAA8B,EAC9B,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EAEtB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO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