@demicodes/agent 0.10.1 → 0.10.3

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
@@ -8,8 +8,6 @@ that the REPL and web UI both consume.
8
8
  - `AgentServer` — owns sessions; `server.client()` returns an in-process client.
9
9
  - `AgentClient` — `open` / `send` / `steer` / `abort` / `close` / `subscribe`.
10
10
  - Transports: in-process, stdio (`@demicodes/agent/stdio`), or WebSocket.
11
- - Actions accept caller-defined `metadata` that is available to harness and
12
- tool contexts without becoming transcript or provider content.
13
11
 
14
12
  ```ts
15
13
  import { AgentServer } from '@demicodes/agent'
@@ -1,4 +1,4 @@
1
- import { b as AgentMetadata, d as TranscriptPatch, l as ServerFrame, n as AgentServerTransport, o as ClientFrame, r as AgentTransport, s as ClientSessionEvent, t as AgentClientTransport, u as ShellCommandStatusLike } from "./transport-BZwi2YZL.mjs";
2
- import { a as AgentClient, i as AgentActionOptions, n as createWebSocketClientTransport, o as AgentClientListener, r as createWebSocketServerTransport, t as JsonWebSocket } from "./websocket-transport-CZpGt4Py.mjs";
1
+ import { d as TranscriptPatch, l as ServerFrame, n as AgentServerTransport, o as ClientFrame, r as AgentTransport, s as ClientSessionEvent, t as AgentClientTransport, u as ShellCommandSnapshotLike } from "./transport-Bhf0h9FY.mjs";
2
+ import { a as AgentClientListener, i as AgentClient, n as createWebSocketClientTransport, r as createWebSocketServerTransport, t as JsonWebSocket } from "./websocket-transport-D_Awo7zN.mjs";
3
3
  import { ProviderSelection } from "@demicodes/provider";
4
- export { type AgentActionOptions, AgentClient, type AgentClientListener, type AgentClientTransport, type AgentMetadata, type AgentServerTransport, type AgentTransport, type ClientFrame, type ClientSessionEvent, type JsonWebSocket, type ProviderSelection, type ServerFrame, type ShellCommandStatusLike, type TranscriptPatch, createWebSocketClientTransport, createWebSocketServerTransport };
4
+ export { AgentClient, type AgentClientListener, type AgentClientTransport, type AgentServerTransport, type AgentTransport, type ClientFrame, type ClientSessionEvent, type JsonWebSocket, type ProviderSelection, type ServerFrame, type ShellCommandSnapshotLike, type TranscriptPatch, createWebSocketClientTransport, createWebSocketServerTransport };
@@ -1,2 +1,2 @@
1
- import { n as createWebSocketServerTransport, r as AgentClient, t as createWebSocketClientTransport } from "./websocket-transport-os0mfcLi.mjs";
1
+ import { n as createWebSocketServerTransport, r as AgentClient, t as createWebSocketClientTransport } from "./websocket-transport-Bod0puog.mjs";
2
2
  export { AgentClient, createWebSocketClientTransport, createWebSocketServerTransport };
package/dist/index.d.mts CHANGED
@@ -1,40 +1,9 @@
1
- import { A as AgentToolContext, B as estimateTranscriptBlockTokens, C as AgentSessionCheckpoint, D as AgentSessionStore, E as AgentSessionRestoreParams, F as SessionEventListener, G as retryDelayMs, H as TurnRetryPolicy, I as CompactionWindow, L as DrainedTranscriptPatches, M as AgentToolInvokeResult, N as ExternalMutationReservation, O as AgentSystemPromptContext, P as SessionEvent, R as TranscriptLog, S as AgentReferenceResolveContext, T as AgentSessionParams, U as isRetryableCode, V as DEFAULT_TURN_RETRY_POLICY, W as resolveRetryPolicy, _ as AgentHarnessRuntime, a as createInProcessTransportPair, b as AgentMetadata, c as ConversationSummary, d as TranscriptPatch, f as AbortResult, g as AgentHarnessContext, h as AgentHarness, i as InProcessTransportPair, j as AgentToolInvokeContext, k as AgentTool, l as ServerFrame, m as AgentDisposeContext, n as AgentServerTransport, o as ClientFrame, p as AbortTarget, r as AgentTransport, s as ClientSessionEvent, t as AgentClientTransport, u as ShellCommandStatusLike, v as AgentHostContext, w as AgentSessionOptions, x as AgentPromptContext, y as AgentLifecycleEvent, z as TranscriptOptions } from "./transport-BZwi2YZL.mjs";
2
- import { a as AgentClient, i as AgentActionOptions, n as createWebSocketClientTransport, o as AgentClientListener, r as createWebSocketServerTransport, t as JsonWebSocket } from "./websocket-transport-CZpGt4Py.mjs";
3
- import { BashAuditEvent, BashEnvironment, BashEnvironmentOptions, CommandMetadataRecord, Host, ShellCommandStatus, ShellOutputChunk } from "@demicodes/shell";
1
+ import { A as AgentToolInvokeResult, B as DEFAULT_TURN_RETRY_POLICY, C as AgentSessionRestoreParams, D as AgentTool, E as AgentSystemPromptContext, F as CompactionWindow, H as isRetryableCode, I as DrainedTranscriptPatches, L as Transcript, M as SessionEvent, N as SessionEventListener, O as AgentToolContext, P as ToolContinuation, R as TranscriptOptions, S as AgentSessionParams, T as AgentSessionStore, U as resolveRetryPolicy, V as TurnRetryPolicy, W as retryDelayMs, _ as AgentHarnessRuntime, a as createInProcessTransportPair, b as AgentReferenceResolveContext, c as ConversationSummary, d as TranscriptPatch, f as AbortResult, g as AgentHarnessContext, h as AgentHarness, i as InProcessTransportPair, j as ExternalMutationReservation, k as AgentToolInvokeContext, l as ServerFrame, m as AgentDisposeContext, n as AgentServerTransport, o as ClientFrame, p as AbortTarget, r as AgentTransport, s as ClientSessionEvent, t as AgentClientTransport, u as ShellCommandSnapshotLike, v as AgentLifecycleEvent, w as AgentSessionSnapshot, x as AgentSessionOptions, y as AgentPromptContext, z as estimateTranscriptBlockTokens } from "./transport-Bhf0h9FY.mjs";
2
+ import { a as AgentClientListener, i as AgentClient, n as createWebSocketClientTransport, r as createWebSocketServerTransport, t as JsonWebSocket } from "./websocket-transport-D_Awo7zN.mjs";
3
+ import { BashEnvironment, BashEnvironmentOptions, Host, ShellCommandSnapshot } from "@demicodes/shell";
4
4
  import { AgentProvider, Provider } from "@demicodes/provider";
5
- import { Block, Model, ModelMediaKind, ModelSelection, ProviderErrorDiagnostics, QueuedMessage, SessionPhase, UserContentBlock } from "@demicodes/core";
6
- //#region src/recovery.d.ts
7
- /**
8
- * Where re-inference must restart after a turn failed to finish.
9
- *
10
- * `cut` is the index from which blocks are discardable; `isFullRerun` is true when
11
- * that reaches all the way back to the user turn, meaning the turn produced nothing
12
- * and can simply be run again.
13
- */
14
- interface ResumePoint {
15
- cut: number;
16
- isFullRerun: boolean;
17
- }
18
- /**
19
- * Finds how far back an unfinished turn can be unwound before re-inferring.
20
- *
21
- * This is the single decision behind both recovery paths. A transient provider
22
- * failure and a human asking to continue a dead round ask the same question — how
23
- * do we finish this turn — and the answer depends only on what has already left
24
- * the process, never on which of the two asked or on how the turn died.
25
- */
26
- declare function findResumePoint(blocks: readonly Block[]): ResumePoint;
27
- //#endregion
28
- //#region src/provider-stream-error.d.ts
29
- /** Error carrying a provider stream's normalized code and bounded diagnostics. */
30
- declare class ProviderStreamError extends Error {
31
- readonly code: string | null;
32
- readonly diagnostics: ProviderErrorDiagnostics | undefined;
33
- constructor(message: string, code: string | null, diagnostics?: ProviderErrorDiagnostics);
34
- }
35
- /** Whether an error is a provider stream error reporting the context window was exceeded. */
36
- declare function isContextLengthExceeded(error: unknown): boolean;
37
- //#endregion
5
+ import { Block, ModelSelection, QueuedMessage, SessionPhase, UserContentBlock } from "@demicodes/core";
6
+
38
7
  //#region src/session.d.ts
39
8
  type ActiveTurnPhase = 'provider_streaming' | 'tool_executing' | 'compacting' | 'finalizing';
40
9
  declare class AgentSession<State> {
@@ -51,7 +20,6 @@ declare class AgentSession<State> {
51
20
  private readonly listeners;
52
21
  private readonly pendingActions;
53
22
  private readonly queued;
54
- get modelSelection(): ModelSelection;
55
23
  private readonly transcriptLog;
56
24
  private readonly agentState;
57
25
  private currentPhase;
@@ -61,7 +29,6 @@ declare class AgentSession<State> {
61
29
  private activeTurnId;
62
30
  private activeTurnPhase;
63
31
  private activeProviderRun;
64
- private activeMetadata;
65
32
  private readonly steerQueue;
66
33
  private readonly yields;
67
34
  private readonly compaction;
@@ -73,41 +40,19 @@ declare class AgentSession<State> {
73
40
  private persistTimer;
74
41
  private persistDirty;
75
42
  /**
76
- * Restores a session from a checkpoint. Ownership of the checkpoint (including
43
+ * Restores a session from a snapshot. Ownership of the snapshot (including
77
44
  * `state`) transfers to the session: the caller must not mutate it afterwards.
78
45
  * Passing state by reference — not a clone — lets the caller share the same
79
46
  * object with harness closures (host/commands), keeping one live state.
80
47
  */
81
- static fromCheckpoint<State>(params: AgentSessionRestoreParams<State>, options?: AgentSessionOptions<State>): AgentSession<State>;
48
+ static fromSnapshot<State>(params: AgentSessionRestoreParams<State>, options?: AgentSessionOptions<State>): AgentSession<State>;
82
49
  constructor(params: AgentSessionParams<State>, options?: AgentSessionOptions<State>);
83
50
  send(content: UserContentBlock[], options?: {
84
51
  id?: string;
85
- metadata?: AgentMetadata;
86
- }): Promise<void>;
87
- /**
88
- * Discards the whole latest turn and runs it again from the user's input.
89
- *
90
- * This is "regenerate": it is only meaningful when the caller wants a different
91
- * answer to the same question and knows the turn's effects can be repeated. It is
92
- * NOT the way to recover a failed turn — use `resume`, which unwinds only as far
93
- * as is safe.
94
- */
95
- retry(options?: {
96
- metadata?: AgentMetadata;
97
- }): Promise<void>;
98
- /**
99
- * Finishes a turn that did not finish, after an abort or a terminal provider
100
- * error. Unwinds to the turn's resume point — dropping the failed attempt's
101
- * leftovers, keeping everything that already left the process — and re-infers
102
- * from there. Callers do not choose the granularity and do not need to know how
103
- * the turn died.
104
- */
105
- resume(options?: {
106
- metadata?: AgentMetadata;
107
- }): Promise<void>;
108
- compact(options?: {
109
- metadata?: AgentMetadata;
110
52
  }): Promise<void>;
53
+ retry(): Promise<void>;
54
+ resume(): Promise<void>;
55
+ compact(): Promise<void>;
111
56
  steer(content: UserContentBlock[], options?: {
112
57
  id?: string;
113
58
  }): Promise<void>;
@@ -126,14 +71,14 @@ declare class AgentSession<State> {
126
71
  */
127
72
  updateModel(provider: AgentProvider | null, model: ModelSelection): void;
128
73
  abort(): Promise<AbortResult>;
129
- scheduleYieldWakeup(durationMs: number, metadata?: AgentMetadata | null): AgentToolInvokeResult;
74
+ scheduleYieldWakeup(durationMs: number): AgentToolInvokeResult;
130
75
  waitUntilDone(): Promise<void>;
131
76
  /**
132
77
  * Tears the session down: aborts any in-flight turn and releases provider-held resources
133
78
  * (e.g. a long-lived CLI subprocess). Called when the owning connection closes.
134
79
  */
135
80
  dispose(): Promise<void>;
136
- transcript(): TranscriptLog;
81
+ transcript(): Transcript;
137
82
  state(): State;
138
83
  id(): string;
139
84
  phase(): SessionPhase;
@@ -171,13 +116,6 @@ declare class AgentSession<State> {
171
116
  private executeSend;
172
117
  private resolveReferences;
173
118
  private executeRetry;
174
- /**
175
- * Finishes an unfinished turn. Unwinds to its resume point — dropping the failed
176
- * attempt's leftovers, keeping everything that already left the process — and
177
- * re-infers from there. When the whole turn turns out to be discardable this is
178
- * a plain rerun, which spares the model a continuation boundary attached to a
179
- * stub of its own aborted output.
180
- */
181
119
  private executeResume;
182
120
  private providerEvents;
183
121
  private promptContext;
@@ -196,11 +134,11 @@ declare class AgentSession<State> {
196
134
  /**
197
135
  * Publishes transcript changes: drains the mutation journal into a patch
198
136
  * event (O(changed content), not O(transcript)) and schedules a throttled
199
- * checkpoint write. Boundaries (action end, abort, dispose) flush the write.
137
+ * snapshot write. Boundaries (action end, abort, dispose) flush the write.
200
138
  */
201
139
  private commitTranscript;
202
140
  private schedulePersist;
203
- private persistCheckpoint;
141
+ private persistSnapshot;
204
142
  private flushPersist;
205
143
  private emit;
206
144
  private resolveIdleWaiters;
@@ -226,18 +164,18 @@ interface AgentServerSessionOptions {
226
164
  persistIntervalMs?: number;
227
165
  }
228
166
  /**
229
- * Host-agnostic hook invoked before each resolved Host's BashEnvironment is built.
167
+ * Host-agnostic hook invoked once per `open()` before BashEnvironment is built.
230
168
  * LocalHost uses this to inject PATH / env for the command bridge; AgentServer
231
169
  * itself does not know about UDS, shims, or bin directories.
232
170
  */
233
- interface PrepareShellContext {
171
+ interface PrepareSessionShellContext {
234
172
  agentSessionId: string;
235
173
  host: Host;
236
174
  commandNames: readonly string[];
237
175
  /** Shell options from AgentServer construction (before this hook). */
238
176
  shell: Omit<BashEnvironmentOptions, 'host' | 'commands'>;
239
177
  }
240
- type PrepareShell = (ctx: PrepareShellContext) => Omit<BashEnvironmentOptions, 'host' | 'commands'> | Promise<Omit<BashEnvironmentOptions, 'host' | 'commands'>>;
178
+ type PrepareSessionShell = (ctx: PrepareSessionShellContext) => Omit<BashEnvironmentOptions, 'host' | 'commands'> | Promise<Omit<BashEnvironmentOptions, 'host' | 'commands'>>;
241
179
  interface AgentServerOptions {
242
180
  agent: AgentHarness<unknown>;
243
181
  providers: Provider[];
@@ -247,7 +185,7 @@ interface AgentServerOptions {
247
185
  * Optional host-side shell prep (env, PATH, etc.). Implementation-agnostic —
248
186
  * command bridge wiring lives in `@demicodes/host-local`, not here.
249
187
  */
250
- prepareShell?: PrepareShell;
188
+ prepareSessionShell?: PrepareSessionShell;
251
189
  }
252
190
  interface AgentTransportBinding {
253
191
  close(): Promise<void>;
@@ -261,18 +199,12 @@ interface RunCommandLineOptions {
261
199
  /** Result of {@link AgentServer.runCommandLine}. */
262
200
  interface RunCommandLineResult {
263
201
  exitCode: number;
264
- /** UTF-8 text, or base64 when `stdoutEncoding` is 'base64'. */
265
202
  stdout: string;
266
- stdoutEncoding?: 'base64';
267
203
  stderr: string;
268
204
  }
269
- declare class RunCommandLineShellNotFoundError extends Error {
270
- readonly shellId: string;
271
- constructor(shellId: string);
272
- }
273
- declare class RunCommandLineCommandNotRegisteredError extends Error {
274
- readonly commandName: string;
275
- constructor(commandName: string);
205
+ declare class RunCommandLineSessionNotFoundError extends Error {
206
+ readonly agentSessionId: string;
207
+ constructor(agentSessionId: string);
276
208
  }
277
209
  declare class RunCommandLineTimeoutError extends Error {
278
210
  readonly commandId: string;
@@ -285,7 +217,7 @@ declare class AgentServer {
285
217
  private readonly providers;
286
218
  private readonly shellOptions;
287
219
  private readonly sessionOptions;
288
- private readonly prepareShell;
220
+ private readonly prepareSessionShell;
289
221
  private readonly bindings;
290
222
  private readonly sessionOwnership;
291
223
  constructor(options: AgentServerOptions);
@@ -297,15 +229,12 @@ declare class AgentServer {
297
229
  * Transport-agnostic: callers (e.g. LocalHost command bridge) supply their
298
230
  * own IPC; AgentServer only knows how to exec against the open session shell.
299
231
  */
300
- runCommandLine(shellId: string, name: string, args: string[], opts: RunCommandLineOptions): Promise<RunCommandLineResult>;
232
+ runCommandLine(agentSessionId: string, name: string, args: string[], opts: RunCommandLineOptions): Promise<RunCommandLineResult>;
301
233
  }
302
234
  //#endregion
303
235
  //#region src/tools.d.ts
304
236
  interface StandardAgentToolOptions<State = unknown> {
305
- environment: BashEnvironment | ((ctx: AgentToolInvokeContext<State>, handle: {
306
- shellId?: string;
307
- commandId?: string;
308
- }) => BashEnvironment | Promise<BashEnvironment>);
237
+ environment: BashEnvironment;
309
238
  scheduleYield(ctx: AgentToolInvokeContext<State>, durationMs: number): AgentToolInvokeResult;
310
239
  }
311
240
  declare function createStandardAgentTools<State = unknown>(options: StandardAgentToolOptions<State>): AgentTool<State>[];
@@ -313,56 +242,10 @@ interface ShellToolResultOptions {
313
242
  includePreview?: boolean;
314
243
  previewBudgetTokens?: number;
315
244
  exposeCommandHandle?: boolean;
316
- /** Model receiving this result; gates binary-stream media attachment. */
317
- model?: Model;
318
- /** Per-modality byte caps on attached media; unset modalities keep the defaults. */
319
- maxMediaBytes?: Partial<Record<ModelMediaKind, number>>;
320
245
  }
321
- /**
322
- * How many bytes of each modality a tool may hand to the model.
323
- *
324
- * One number cannot serve both, because bytes buy wildly different amounts of
325
- * context per modality — measured against a frontier model, a KiB of video
326
- * costs ~2 tokens where a KiB of image costs ~50. A cap generous enough to show
327
- * a five-minute clip would let a single still eat a six-figure token budget.
328
- *
329
- * image (4 MiB): well past any sane still — a 4000x3000 PNG lands under it — so
330
- * crossing this line is a mistake, not a use case.
331
- * video (16 MiB): roughly ten minutes at a viewing-grade encoding, and
332
- * deliberately under the ~20 MB inline-payload ceiling the major APIs enforce.
333
- * A larger cap buys no reach, only a rejection further downstream where the
334
- * reason is harder to read.
335
- *
336
- * Bytes are a proxy, not a budget: for video they track cost reasonably at a
337
- * fixed encoding, but an image's real driver is its pixel dimensions.
338
- */
339
- declare const DEFAULT_MAX_MEDIA_BYTES: Record<ModelMediaKind, number>;
340
246
  declare function shellPreviewBudgetTokens(contextWindow: number): number;
341
- declare function toShellToolResult(result: ShellCommandStatus, options?: ShellToolResultOptions): AgentToolInvokeResult;
342
- /** Character budget for a shell view's render window (tail-biased). */
343
- declare const SHELL_VIEW_MAX_CHARS = 32768;
344
- /**
345
- * Bounded UI view of a shell command stored on the tool_call block. Full
346
- * output lives in the command artifact (`/@/commands/<commandId>/…`), keyed by
347
- * `commandId`; the view carries only the tail render window and never embeds
348
- * raw or base64 bytes.
349
- */
350
- interface ShellToolView {
351
- kind: 'shell';
352
- status: 'running' | 'exited' | 'aborted';
353
- shellId: string;
354
- commandId: string;
355
- exitCode?: number;
356
- runningMs: number;
357
- idleMs: number;
358
- /** Tail of the merged output, capped at SHELL_VIEW_MAX_CHARS. */
359
- chunks: ShellOutputChunk[];
360
- /** True when chunks were capped; the artifact has the full output. */
361
- viewTruncated: boolean;
362
- audit?: BashAuditEvent[];
363
- commandMeta?: CommandMetadataRecord[];
364
- }
365
- declare function finishShellToolResult<State>(environment: BashEnvironment, result: ShellCommandStatus, ctx: AgentToolInvokeContext<State>): Promise<AgentToolInvokeResult>;
366
- declare function shellCommandHandleRequired(result: ShellCommandStatus, budgetTokens: number): boolean;
247
+ declare function toShellToolResult(result: ShellCommandSnapshot, toolCallId?: string, options?: ShellToolResultOptions): AgentToolInvokeResult;
248
+ declare function finishShellToolResult<State>(environment: BashEnvironment, result: ShellCommandSnapshot, ctx: AgentToolInvokeContext<State>): Promise<AgentToolInvokeResult>;
249
+ declare function shellCommandHandleRequired(result: ShellCommandSnapshot, budgetTokens: number): boolean;
367
250
  //#endregion
368
- export { AbortResult, AbortTarget, ActiveTurnPhase, AgentActionOptions, AgentClient, AgentClientListener, AgentClientTransport, AgentDisposeContext, AgentHarness, AgentHarnessContext, AgentHarnessRuntime, AgentHostContext, AgentLifecycleEvent, AgentMetadata, AgentPromptContext, AgentReferenceResolveContext, AgentServer, AgentServerOptions, AgentServerSessionOptions, AgentServerTransport, AgentSession, AgentSessionCheckpoint, AgentSessionOptions, AgentSessionParams, AgentSessionRestoreParams, AgentSessionStore, AgentSystemPromptContext, AgentTool, AgentToolContext, AgentToolInvokeContext, AgentToolInvokeResult, AgentTransport, AgentTransportBinding, ClientFrame, ClientSessionEvent, CompactionWindow, ConversationSummary, DEFAULT_MAX_MEDIA_BYTES, DEFAULT_TURN_RETRY_POLICY, DrainedTranscriptPatches, ExternalMutationReservation, InProcessTransportPair, JsonWebSocket, PrepareShell, PrepareShellContext, ProviderStreamError, ResumePoint, RunCommandLineCommandNotRegisteredError, RunCommandLineOptions, RunCommandLineResult, RunCommandLineShellNotFoundError, RunCommandLineTimeoutError, SHELL_VIEW_MAX_CHARS, ServerFrame, SessionEvent, SessionEventListener, ShellCommandStatusLike, ShellToolResultOptions, ShellToolView, StandardAgentToolOptions, TranscriptLog, TranscriptOptions, TranscriptPatch, TurnRetryPolicy, applyTranscriptPatches, cloneBlocks, createInProcessTransportPair, createStandardAgentTools, createWebSocketClientTransport, createWebSocketServerTransport, estimateTranscriptBlockTokens, findResumePoint, finishShellToolResult, isContextLengthExceeded, isRetryableCode, resolveRetryPolicy, retryDelayMs, shellCommandHandleRequired, shellPreviewBudgetTokens, toShellToolResult };
251
+ export { AbortResult, AbortTarget, ActiveTurnPhase, AgentClient, AgentClientListener, AgentClientTransport, AgentDisposeContext, AgentHarness, AgentHarnessContext, AgentHarnessRuntime, AgentLifecycleEvent, AgentPromptContext, AgentReferenceResolveContext, AgentServer, AgentServerOptions, AgentServerSessionOptions, AgentServerTransport, AgentSession, AgentSessionOptions, AgentSessionParams, AgentSessionRestoreParams, AgentSessionSnapshot, AgentSessionStore, AgentSystemPromptContext, AgentTool, AgentToolContext, AgentToolInvokeContext, AgentToolInvokeResult, AgentTransport, AgentTransportBinding, ClientFrame, ClientSessionEvent, CompactionWindow, ConversationSummary, DEFAULT_TURN_RETRY_POLICY, DrainedTranscriptPatches, ExternalMutationReservation, InProcessTransportPair, JsonWebSocket, PrepareSessionShell, PrepareSessionShellContext, RunCommandLineOptions, RunCommandLineResult, RunCommandLineSessionNotFoundError, RunCommandLineTimeoutError, ServerFrame, SessionEvent, SessionEventListener, ShellCommandSnapshotLike, ShellToolResultOptions, StandardAgentToolOptions, ToolContinuation, Transcript, TranscriptOptions, TranscriptPatch, TurnRetryPolicy, applyTranscriptPatches, cloneBlocks, createInProcessTransportPair, createStandardAgentTools, createWebSocketClientTransport, createWebSocketServerTransport, estimateTranscriptBlockTokens, finishShellToolResult, isRetryableCode, resolveRetryPolicy, retryDelayMs, shellCommandHandleRequired, shellPreviewBudgetTokens, toShellToolResult };