@ai-sdk/harness 1.0.133 → 1.0.134

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/dist/index.d.ts CHANGED
@@ -1,9 +1,7 @@
1
- import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
2
- import { Experimental_SandboxSession, UserModelMessage, ToolResultPart, ProviderOptions, ToolSet, FlexibleSchema, Tool, FunctionTool } from '@ai-sdk/provider-utils';
3
- import { z } from 'zod/v4';
4
- import * as _ai_sdk_provider from '@ai-sdk/provider';
5
- import { JSONSchema7, JSONValue, LanguageModelV4StreamPart, LanguageModelV4ToolCall, LanguageModelV4ToolApprovalRequest, LanguageModelV4ToolResult, LanguageModelV4FinishReason, LanguageModelV4Usage, SharedV4ProviderMetadata, LanguageModelV4TextPart, LanguageModelV4FilePart, LanguageModelV4CustomPart, LanguageModelV4ReasoningPart, LanguageModelV4ReasoningFilePart, LanguageModelV4ToolCallPart, LanguageModelV4ToolResultPart, LanguageModelV4ToolResultOutput, LanguageModelV4ToolApprovalResponsePart, AISDKError } from '@ai-sdk/provider';
6
-
1
+ import { Experimental_SandboxSession, FlexibleSchema, FunctionTool, ProviderOptions, Tool, ToolResultPart, ToolSet, UserModelMessage } from "@ai-sdk/provider-utils";
2
+ import { z } from "zod/v4";
3
+ import { AISDKError, JSONSchema7, JSONValue, LanguageModelV4CustomPart, LanguageModelV4FilePart, LanguageModelV4FinishReason, LanguageModelV4ReasoningFilePart, LanguageModelV4ReasoningPart, LanguageModelV4StreamPart, LanguageModelV4TextPart, LanguageModelV4ToolApprovalRequest, LanguageModelV4ToolApprovalResponsePart, LanguageModelV4ToolCall, LanguageModelV4ToolCallPart, LanguageModelV4ToolResult, LanguageModelV4ToolResultOutput, LanguageModelV4ToolResultPart, LanguageModelV4Usage, SharedV4ProviderMetadata } from "@ai-sdk/provider";
4
+ //#region src/v1/harness-v1-bootstrap.d.ts
7
5
  /**
8
6
  * One file to write into the sandbox as part of an adapter's bootstrap recipe.
9
7
  * Absolute paths are used as-is. Relative paths are resolved against the
@@ -11,8 +9,8 @@ import { JSONSchema7, JSONValue, LanguageModelV4StreamPart, LanguageModelV4ToolC
11
9
  * {@link HarnessV1Bootstrap.bootstrapDir}.
12
10
  */
13
11
  interface HarnessV1BootstrapFile {
14
- readonly path: string;
15
- readonly content: string;
12
+ readonly path: string;
13
+ readonly content: string;
16
14
  }
17
15
  /**
18
16
  * One command to run in the sandbox as part of an adapter's bootstrap recipe.
@@ -20,7 +18,7 @@ interface HarnessV1BootstrapFile {
20
18
  * aborts the bootstrap.
21
19
  */
22
20
  interface HarnessV1BootstrapCommand {
23
- readonly command: string;
21
+ readonly command: string;
24
22
  }
25
23
  /**
26
24
  * Adapter-owned bootstrap recipe. The adapter declares the files and commands
@@ -29,32 +27,33 @@ interface HarnessV1BootstrapCommand {
29
27
  * reuse, and applies the recipe idempotently before the bridge spawns.
30
28
  */
31
29
  interface HarnessV1Bootstrap {
32
- /**
33
- * Stable id of the adapter that owns this recipe. Conventionally matches
34
- * {@link HarnessV1.harnessId}. Contributes to the recipe hash.
35
- */
36
- readonly harnessId: string;
37
- /**
38
- * Path inside the sandbox where this recipe writes its state. Absolute paths
39
- * are used as-is. Relative paths are resolved against the harness state
40
- * directory (`$HOME/.ai-sdk-harness`). The marker file lives directly under
41
- * it. Files declared in {@link files} should also use this prefix so an
42
- * adapter upgrade can sweep stale state by clearing the directory.
43
- */
44
- readonly bootstrapDir: string;
45
- /** Files to write into the sandbox before any command runs. */
46
- readonly files: ReadonlyArray<HarnessV1BootstrapFile>;
47
- /** Commands to run from the bootstrap directory after files are written. */
48
- readonly commands: ReadonlyArray<HarnessV1BootstrapCommand>;
30
+ /**
31
+ * Stable id of the adapter that owns this recipe. Conventionally matches
32
+ * {@link HarnessV1.harnessId}. Contributes to the recipe hash.
33
+ */
34
+ readonly harnessId: string;
35
+ /**
36
+ * Path inside the sandbox where this recipe writes its state. Absolute paths
37
+ * are used as-is. Relative paths are resolved against the harness state
38
+ * directory (`$HOME/.ai-sdk-harness`). The marker file lives directly under
39
+ * it. Files declared in {@link files} should also use this prefix so an
40
+ * adapter upgrade can sweep stale state by clearing the directory.
41
+ */
42
+ readonly bootstrapDir: string;
43
+ /** Files to write into the sandbox before any command runs. */
44
+ readonly files: ReadonlyArray<HarnessV1BootstrapFile>;
45
+ /** Commands to run from the bootstrap directory after files are written. */
46
+ readonly commands: ReadonlyArray<HarnessV1BootstrapCommand>;
49
47
  }
50
-
48
+ //#endregion
49
+ //#region src/v1/harness-v1-network-sandbox-session.d.ts
51
50
  /**
52
51
  * Connection details for a sandbox-exposed port. Headers are scoped to the
53
52
  * returned URL and must be included when opening the connection.
54
53
  */
55
54
  type HarnessV1PortEndpoint = {
56
- readonly url: string;
57
- readonly headers?: Readonly<Record<string, string>>;
55
+ readonly url: string;
56
+ readonly headers?: Readonly<Record<string, string>>;
58
57
  };
59
58
  /**
60
59
  * Fixed, non-configurable path for harness-generated state (bootstrap files,
@@ -65,8 +64,8 @@ type HarnessV1PortEndpoint = {
65
64
  * framework also calls this with a symbolic `$HOME` when hashing bootstrap
66
65
  * recipes, so changes to the state path invalidate existing templates.
67
66
  */
68
- declare function harnessStateDirectoryPath({ sandboxHomeDir, }: {
69
- sandboxHomeDir: string;
67
+ export declare function harnessStateDirectoryPath({ sandboxHomeDir }: {
68
+ sandboxHomeDir: string;
70
69
  }): string;
71
70
  /**
72
71
  * Network sandbox session returned by sandbox adapter creation and resume
@@ -80,94 +79,94 @@ declare function harnessStateDirectoryPath({ sandboxHomeDir, }: {
80
79
  * network access, or transform requests.
81
80
  */
82
81
  interface HarnessV1NetworkSandboxSession extends Experimental_SandboxSession {
83
- /**
84
- * Identifier for the sandbox session. Persist this separately from the
85
- * harness session ID and resume state when reattaching across processes.
86
- */
87
- readonly id: string;
88
- /**
89
- * The sandbox's default working directory — the absolute path that
90
- * `run`/`spawn` resolve relative commands against when no `workingDirectory`
91
- * is given. Read from the live sandbox, never hardcoded.
92
- *
93
- * The framework composes each session's working directory underneath this
94
- * path (`<defaultWorkingDirectory>/<harnessId>-<sessionId>`) so adapters do
95
- * not bake a provider-specific base into their own paths.
96
- */
97
- readonly defaultWorkingDirectory: string;
98
- /** Ports the sandbox exposes; resolvable via `getPortEndpoint`. */
99
- readonly ports: ReadonlyArray<number>;
100
- /**
101
- * Resolve the connection details for a sandbox-exposed port. Bridge-backed
102
- * adapters call this to open their WebSocket to the in-sandbox bridge.
103
- */
104
- readonly getPortEndpoint: (options: {
105
- port: number;
106
- protocol?: 'http' | 'https' | 'ws';
107
- }) => PromiseLike<HarnessV1PortEndpoint>;
108
- /**
109
- * Resolve a publicly-reachable URL for a sandbox-exposed port.
110
- *
111
- * @deprecated Use `getPortEndpoint` instead.
112
- */
113
- readonly getPortUrl: (options: {
114
- port: number;
115
- protocol?: 'http' | 'https' | 'ws';
116
- }) => PromiseLike<string>;
117
- /** Stop the sandbox. Idempotent. */
118
- readonly stop: () => PromiseLike<void>;
119
- /**
120
- * Stop the sandbox session, then perform any additional cleanup necessary
121
- * to destroy it, such as deleting its backing resource or freeing resources.
122
- * Implementations with no cleanup beyond stopping may delegate to `stop()`.
123
- * Implementations must handle both a still-running sandbox and a previously
124
- * stopped sandbox.
125
- */
126
- readonly destroy: () => PromiseLike<void>;
127
- /**
128
- * Update the sandbox's outbound network policy. Optional — implementations
129
- * without a local enforcement primitive omit this. Callers
130
- * use optional-call (`sandboxSession.setNetworkPolicy?.(policy)`); a
131
- * missing implementation is a no-op.
132
- */
133
- readonly setNetworkPolicy?: (policy: HarnessV1NetworkPolicy) => PromiseLike<void>;
134
- /**
135
- * Replace the sandbox's outbound request-transformation rules. Optional —
136
- * implementations expose this only when credentials can be injected outside
137
- * the sandbox security boundary. Calling this method assumes authority over
138
- * the complete transformation set; harness adapters should normally use
139
- * `addRequestTransformations` instead. Adapters may preserve legacy
140
- * credential-forwarding behavior when additive request transformations are
141
- * unavailable.
142
- */
143
- readonly setRequestTransformations?: (transformations: ReadonlyArray<HarnessV1RequestTransformation>) => PromiseLike<void>;
144
- /**
145
- * Add outbound request-transformation rules without replacing rules already
146
- * managed by the sandbox session. Optional for the same reason as
147
- * `setRequestTransformations`. Harness adapters should use this additive
148
- * capability unless they explicitly own the complete transformation set.
149
- */
150
- readonly addRequestTransformations?: (transformations: ReadonlyArray<HarnessV1RequestTransformation>) => PromiseLike<void>;
151
- /**
152
- * Replace the set of ports exposed by the sandbox. Full-replacement
153
- * semantics: ports omitted from the array are deregistered. Optional —
154
- * implementations that cannot expose ports omit this.
155
- */
156
- readonly setPorts?: (ports: ReadonlyArray<number>, options?: {
157
- abortSignal?: AbortSignal;
158
- }) => PromiseLike<void>;
159
- /**
160
- * Reduced view of this session, typed as the bare {@link SandboxSession}
161
- * (file I/O, exec, spawn) — nothing that could stop the sandbox or change
162
- * its network policy. Pass this to user-tool `execute()` calls and other
163
- * code that must not reach the infra surface.
164
- *
165
- * The returned object points at exactly the same underlying sandbox
166
- * resource as the network sandbox session it was produced from; it is only a
167
- * narrower surface over the same resource, not a separate sandbox. In
168
- * particular, it cannot mutate network access or request transformations.
169
- */
170
- readonly restricted: () => Experimental_SandboxSession;
82
+ /**
83
+ * Identifier for the sandbox session. Persist this separately from the
84
+ * harness session ID and resume state when reattaching across processes.
85
+ */
86
+ readonly id: string;
87
+ /**
88
+ * The sandbox's default working directory — the absolute path that
89
+ * `run`/`spawn` resolve relative commands against when no `workingDirectory`
90
+ * is given. Read from the live sandbox, never hardcoded.
91
+ *
92
+ * The framework composes each session's working directory underneath this
93
+ * path (`<defaultWorkingDirectory>/<harnessId>-<sessionId>`) so adapters do
94
+ * not bake a provider-specific base into their own paths.
95
+ */
96
+ readonly defaultWorkingDirectory: string;
97
+ /** Ports the sandbox exposes; resolvable via `getPortEndpoint`. */
98
+ readonly ports: ReadonlyArray<number>;
99
+ /**
100
+ * Resolve the connection details for a sandbox-exposed port. Bridge-backed
101
+ * adapters call this to open their WebSocket to the in-sandbox bridge.
102
+ */
103
+ readonly getPortEndpoint: (options: {
104
+ port: number;
105
+ protocol?: 'http' | 'https' | 'ws';
106
+ }) => PromiseLike<HarnessV1PortEndpoint>;
107
+ /**
108
+ * Resolve a publicly-reachable URL for a sandbox-exposed port.
109
+ *
110
+ * @deprecated Use `getPortEndpoint` instead.
111
+ */
112
+ readonly getPortUrl: (options: {
113
+ port: number;
114
+ protocol?: 'http' | 'https' | 'ws';
115
+ }) => PromiseLike<string>;
116
+ /** Stop the sandbox. Idempotent. */
117
+ readonly stop: () => PromiseLike<void>;
118
+ /**
119
+ * Stop the sandbox session, then perform any additional cleanup necessary
120
+ * to destroy it, such as deleting its backing resource or freeing resources.
121
+ * Implementations with no cleanup beyond stopping may delegate to `stop()`.
122
+ * Implementations must handle both a still-running sandbox and a previously
123
+ * stopped sandbox.
124
+ */
125
+ readonly destroy: () => PromiseLike<void>;
126
+ /**
127
+ * Update the sandbox's outbound network policy. Optional — implementations
128
+ * without a local enforcement primitive omit this. Callers
129
+ * use optional-call (`sandboxSession.setNetworkPolicy?.(policy)`); a
130
+ * missing implementation is a no-op.
131
+ */
132
+ readonly setNetworkPolicy?: (policy: HarnessV1NetworkPolicy) => PromiseLike<void>;
133
+ /**
134
+ * Replace the sandbox's outbound request-transformation rules. Optional —
135
+ * implementations expose this only when credentials can be injected outside
136
+ * the sandbox security boundary. Calling this method assumes authority over
137
+ * the complete transformation set; harness adapters should normally use
138
+ * `addRequestTransformations` instead. Adapters may preserve legacy
139
+ * credential-forwarding behavior when additive request transformations are
140
+ * unavailable.
141
+ */
142
+ readonly setRequestTransformations?: (transformations: ReadonlyArray<HarnessV1RequestTransformation>) => PromiseLike<void>;
143
+ /**
144
+ * Add outbound request-transformation rules without replacing rules already
145
+ * managed by the sandbox session. Optional for the same reason as
146
+ * `setRequestTransformations`. Harness adapters should use this additive
147
+ * capability unless they explicitly own the complete transformation set.
148
+ */
149
+ readonly addRequestTransformations?: (transformations: ReadonlyArray<HarnessV1RequestTransformation>) => PromiseLike<void>;
150
+ /**
151
+ * Replace the set of ports exposed by the sandbox. Full-replacement
152
+ * semantics: ports omitted from the array are deregistered. Optional —
153
+ * implementations that cannot expose ports omit this.
154
+ */
155
+ readonly setPorts?: (ports: ReadonlyArray<number>, options?: {
156
+ abortSignal?: AbortSignal;
157
+ }) => PromiseLike<void>;
158
+ /**
159
+ * Reduced view of this session, typed as the bare {@link SandboxSession}
160
+ * (file I/O, exec, spawn) — nothing that could stop the sandbox or change
161
+ * its network policy. Pass this to user-tool `execute()` calls and other
162
+ * code that must not reach the infra surface.
163
+ *
164
+ * The returned object points at exactly the same underlying sandbox
165
+ * resource as the network sandbox session it was produced from; it is only a
166
+ * narrower surface over the same resource, not a separate sandbox. In
167
+ * particular, it cannot mutate network access or request transformations.
168
+ */
169
+ readonly restricted: () => Experimental_SandboxSession;
171
170
  }
172
171
  /**
173
172
  * Outbound network policy applied by the sandbox runtime.
@@ -185,37 +184,37 @@ interface HarnessV1NetworkSandboxSession extends Experimental_SandboxSession {
185
184
  * equivalent to `'deny-all'`.
186
185
  */
187
186
  type HarnessV1NetworkPolicy = {
188
- mode: 'allow-all';
187
+ mode: 'allow-all';
189
188
  } | {
190
- mode: 'deny-all';
189
+ mode: 'deny-all';
191
190
  } | {
192
- mode: 'custom';
193
- allowedHosts: ReadonlyArray<string>;
194
- allowedCIDRs?: ReadonlyArray<string>;
195
- deniedCIDRs?: ReadonlyArray<string>;
191
+ mode: 'custom';
192
+ allowedHosts: ReadonlyArray<string>;
193
+ allowedCIDRs?: ReadonlyArray<string>;
194
+ deniedCIDRs?: ReadonlyArray<string>;
196
195
  } | {
197
- mode: 'custom';
198
- allowedHosts?: ReadonlyArray<string>;
199
- allowedCIDRs: ReadonlyArray<string>;
200
- deniedCIDRs?: ReadonlyArray<string>;
196
+ mode: 'custom';
197
+ allowedHosts?: ReadonlyArray<string>;
198
+ allowedCIDRs: ReadonlyArray<string>;
199
+ deniedCIDRs?: ReadonlyArray<string>;
201
200
  };
202
201
  type HarnessV1RequestTransformationPathMatcher = {
203
- exact: string;
202
+ exact: string;
204
203
  } | {
205
- startsWith: string;
204
+ startsWith: string;
206
205
  } | {
207
- regex: string;
206
+ regex: string;
208
207
  };
209
208
  type HarnessV1RequestTransformationKeyValuePartMatcher = {
210
- exact: string;
209
+ exact: string;
211
210
  } | {
212
- startsWith: string;
211
+ startsWith: string;
213
212
  } | {
214
- regex: string;
213
+ regex: string;
215
214
  };
216
215
  type HarnessV1RequestTransformationKeyValueMatcher = {
217
- readonly key?: HarnessV1RequestTransformationKeyValuePartMatcher;
218
- readonly value?: HarnessV1RequestTransformationKeyValuePartMatcher;
216
+ readonly key?: HarnessV1RequestTransformationKeyValuePartMatcher;
217
+ readonly value?: HarnessV1RequestTransformationKeyValuePartMatcher;
219
218
  };
220
219
  /**
221
220
  * Outbound HTTPS request transformation applied outside the sandbox security
@@ -229,30 +228,31 @@ type HarnessV1RequestTransformationKeyValueMatcher = {
229
228
  * making transformed values available inside it.
230
229
  */
231
230
  type HarnessV1RequestTransformation = {
232
- readonly match: {
233
- readonly host: string;
234
- readonly path?: HarnessV1RequestTransformationPathMatcher;
235
- readonly method?: ReadonlyArray<string>;
236
- readonly queryString?: ReadonlyArray<HarnessV1RequestTransformationKeyValueMatcher>;
237
- readonly headers?: ReadonlyArray<HarnessV1RequestTransformationKeyValueMatcher>;
238
- };
239
- readonly transform: {
240
- readonly headers: Readonly<Record<string, string>>;
241
- };
231
+ readonly match: {
232
+ readonly host: string;
233
+ readonly path?: HarnessV1RequestTransformationPathMatcher;
234
+ readonly method?: ReadonlyArray<string>;
235
+ readonly queryString?: ReadonlyArray<HarnessV1RequestTransformationKeyValueMatcher>;
236
+ readonly headers?: ReadonlyArray<HarnessV1RequestTransformationKeyValueMatcher>;
237
+ };
238
+ readonly transform: {
239
+ readonly headers: Readonly<Record<string, string>>;
240
+ };
242
241
  };
243
242
  type HarnessV1RequestTransformationSources<AuthenticationMode> = {
244
- env: Record<string, string>;
245
- sandboxEnv: Record<string, string>;
246
- auth: AuthenticationMode;
243
+ env: Record<string, string>;
244
+ sandboxEnv: Record<string, string>;
245
+ auth: AuthenticationMode;
247
246
  };
248
-
247
+ //#endregion
248
+ //#region src/v1/harness-v1-diagnostic.d.ts
249
249
  /** Severity of a diagnostic, ordered most → least severe. */
250
- declare const harnessV1DebugLevelSchema: z.ZodEnum<{
251
- error: "error";
252
- warn: "warn";
253
- info: "info";
254
- debug: "debug";
255
- trace: "trace";
250
+ export declare const harnessV1DebugLevelSchema: z.ZodEnum<{
251
+ error: "error";
252
+ warn: "warn";
253
+ info: "info";
254
+ debug: "debug";
255
+ trace: "trace";
256
256
  }>;
257
257
  type HarnessV1DebugLevel = z.infer<typeof harnessV1DebugLevelSchema>;
258
258
  /**
@@ -261,16 +261,16 @@ type HarnessV1DebugLevel = z.infer<typeof harnessV1DebugLevelSchema>;
261
261
  * captures and emits nothing. `subsystems` filters structured events by dotted
262
262
  * prefix; console capture is independent of the subsystem filter.
263
263
  */
264
- declare const harnessV1DebugConfigSchema: z.ZodObject<{
265
- enabled: z.ZodOptional<z.ZodBoolean>;
266
- level: z.ZodOptional<z.ZodEnum<{
267
- error: "error";
268
- warn: "warn";
269
- info: "info";
270
- debug: "debug";
271
- trace: "trace";
272
- }>>;
273
- subsystems: z.ZodOptional<z.ZodArray<z.ZodString>>;
264
+ export declare const harnessV1DebugConfigSchema: z.ZodObject<{
265
+ enabled: z.ZodOptional<z.ZodBoolean>;
266
+ level: z.ZodOptional<z.ZodEnum<{
267
+ error: "error";
268
+ warn: "warn";
269
+ info: "info";
270
+ debug: "debug";
271
+ trace: "trace";
272
+ }>>;
273
+ subsystems: z.ZodOptional<z.ZodArray<z.ZodString>>;
274
274
  }, z.core.$strip>;
275
275
  type HarnessV1DebugConfig = z.infer<typeof harnessV1DebugConfigSchema>;
276
276
  /**
@@ -279,32 +279,33 @@ type HarnessV1DebugConfig = z.infer<typeof harnessV1DebugConfigSchema>;
279
279
  * emission shape, that is the external consumption shape.
280
280
  */
281
281
  type HarnessV1Diagnostic = {
282
- /** Severity. */
283
- readonly level: HarnessV1DebugLevel;
284
- /** Human-readable line (console capture) or message (structured event). */
285
- readonly message: string;
286
- /** Dotted subsystem (`sandbox.log.<source>` for console capture). */
287
- readonly subsystem: string;
288
- /** `'log'` = captured console line; `'event'` = structured emission. */
289
- readonly kind: 'log' | 'event';
290
- /** Originating source label (console capture). */
291
- readonly source?: string;
292
- /** Which standard stream the line came from (console capture). */
293
- readonly stream?: 'stdout' | 'stderr';
294
- /** Structured attributes (structured events only). */
295
- readonly attrs?: Record<string, unknown>;
296
- /** Error payload (structured events only). */
297
- readonly error?: {
298
- name?: string;
299
- message: string;
300
- stack?: string;
301
- };
302
- /** The harness session this diagnostic originated from. */
303
- readonly sessionId?: string;
304
- /** Emission time (epoch ms). */
305
- readonly timestamp: number;
282
+ /** Severity. */
283
+ readonly level: HarnessV1DebugLevel;
284
+ /** Human-readable line (console capture) or message (structured event). */
285
+ readonly message: string;
286
+ /** Dotted subsystem (`sandbox.log.<source>` for console capture). */
287
+ readonly subsystem: string;
288
+ /** `'log'` = captured console line; `'event'` = structured emission. */
289
+ readonly kind: 'log' | 'event';
290
+ /** Originating source label (console capture). */
291
+ readonly source?: string;
292
+ /** Which standard stream the line came from (console capture). */
293
+ readonly stream?: 'stdout' | 'stderr';
294
+ /** Structured attributes (structured events only). */
295
+ readonly attrs?: Record<string, unknown>;
296
+ /** Error payload (structured events only). */
297
+ readonly error?: {
298
+ name?: string;
299
+ message: string;
300
+ stack?: string;
301
+ };
302
+ /** The harness session this diagnostic originated from. */
303
+ readonly sessionId?: string;
304
+ /** Emission time (epoch ms). */
305
+ readonly timestamp: number;
306
306
  };
307
-
307
+ //#endregion
308
+ //#region src/v1/harness-v1-observability.d.ts
308
309
  /**
309
310
  * Diagnostics wiring the framework hands to an adapter's `doStart`. `report` is
310
311
  * the general emission sink: a bridge adapter normalizes each wire frame into a
@@ -314,12 +315,13 @@ type HarnessV1Diagnostic = {
314
315
  * Absent when the consumer has not enabled diagnostics.
315
316
  */
316
317
  type HarnessV1Observability = {
317
- /** Per-session debug config gating what the adapter captures/emits. */
318
- readonly debug?: HarnessV1DebugConfig;
319
- /** General emission sink — any adapter reports a `HarnessV1Diagnostic` here. */
320
- readonly report?: (diagnostic: HarnessV1Diagnostic) => void;
318
+ /** Per-session debug config gating what the adapter captures/emits. */
319
+ readonly debug?: HarnessV1DebugConfig;
320
+ /** General emission sink — any adapter reports a `HarnessV1Diagnostic` here. */
321
+ readonly report?: (diagnostic: HarnessV1Diagnostic) => void;
321
322
  };
322
-
323
+ //#endregion
324
+ //#region src/v1/harness-v1-permission-mode.d.ts
323
325
  /**
324
326
  * Baseline permission mode for adapter-native built-in tools.
325
327
  *
@@ -328,7 +330,8 @@ type HarnessV1Observability = {
328
330
  * status map.
329
331
  */
330
332
  type HarnessV1PermissionMode = 'allow-reads' | 'allow-edits' | 'allow-all';
331
-
333
+ //#endregion
334
+ //#region src/v1/harness-v1-prompt.d.ts
332
335
  /**
333
336
  * Prompt shape passed to `HarnessV1Session.doPromptTurn`.
334
337
  *
@@ -338,7 +341,8 @@ type HarnessV1PermissionMode = 'allow-reads' | 'allow-edits' | 'allow-all';
338
341
  * `UserModelMessage`.
339
342
  */
340
343
  type HarnessV1Prompt = string | UserModelMessage;
341
-
344
+ //#endregion
345
+ //#region src/v1/harness-v1-prompt-control.d.ts
342
346
  /**
343
347
  * Bidirectional control surface returned by `doPromptTurn`.
344
348
  *
@@ -349,41 +353,41 @@ type HarnessV1Prompt = string | UserModelMessage;
349
353
  * messages require `submitUserMessage`).
350
354
  */
351
355
  type HarnessV1PromptControl = {
352
- /**
353
- * Provide a result for a `tool-call` the adapter emitted. The adapter
354
- * forwards the result to the underlying runtime so the model can continue.
355
- */
356
- submitToolResult(input: {
357
- toolCallId: string;
358
- output: unknown;
359
- isError?: boolean;
360
- toolResult?: ToolResultPart;
361
- }): PromiseLike<void>;
362
- /**
363
- * Respond to a `tool-approval-request` the adapter emitted.
364
- */
365
- submitToolApproval?(input: {
366
- approvalId: string;
367
- approved: boolean;
368
- reason?: string;
369
- }): PromiseLike<void>;
370
- /**
371
- * Inject a fresh user message into a turn that is still in flight.
372
- * Supported only by runtimes that accept interactive input.
373
- */
374
- submitUserMessage?(text: string): PromiseLike<void>;
375
- /**
376
- * Resolves when the adapter has finished the turn (success or failure).
377
- * Rejects with the underlying error when the turn fails.
378
- */
379
- readonly done: PromiseLike<void>;
356
+ /**
357
+ * Provide a result for a `tool-call` the adapter emitted. The adapter
358
+ * forwards the result to the underlying runtime so the model can continue.
359
+ */
360
+ submitToolResult(input: {
361
+ toolCallId: string;
362
+ output: unknown;
363
+ isError?: boolean;
364
+ toolResult?: ToolResultPart;
365
+ }): PromiseLike<void>;
366
+ /**
367
+ * Respond to a `tool-approval-request` the adapter emitted.
368
+ */
369
+ submitToolApproval?(input: {
370
+ approvalId: string;
371
+ approved: boolean;
372
+ reason?: string;
373
+ }): PromiseLike<void>;
374
+ /**
375
+ * Inject a fresh user message into a turn that is still in flight.
376
+ * Supported only by runtimes that accept interactive input.
377
+ */
378
+ submitUserMessage?(text: string): PromiseLike<void>;
379
+ /**
380
+ * Resolves when the adapter has finished the turn (success or failure).
381
+ * Rejects with the underlying error when the turn fails.
382
+ */
383
+ readonly done: PromiseLike<void>;
380
384
  };
381
-
385
+ //#endregion
386
+ //#region src/v1/harness-v1-response-format.d.ts
382
387
  type HarnessV1JSONValue = null | boolean | number | string | HarnessV1JSONArray | HarnessV1JSONObject;
383
- interface HarnessV1JSONArray extends Array<HarnessV1JSONValue> {
384
- }
388
+ interface HarnessV1JSONArray extends Array<HarnessV1JSONValue> {}
385
389
  interface HarnessV1JSONObject {
386
- [key: string]: HarnessV1JSONValue | undefined;
390
+ [key: string]: HarnessV1JSONValue | undefined;
387
391
  }
388
392
  type HarnessV1JSONSchema = HarnessV1JSONObject;
389
393
  /**
@@ -395,46 +399,48 @@ type HarnessV1JSONSchema = HarnessV1JSONObject;
395
399
  * contract can cross process and package boundaries.
396
400
  */
397
401
  type HarnessV1ResponseFormat = {
398
- readonly type: 'text';
402
+ readonly type: 'text';
399
403
  } | {
400
- readonly type: 'json';
401
- readonly schema?: HarnessV1JSONSchema;
402
- readonly name?: string;
403
- readonly description?: string;
404
+ readonly type: 'json';
405
+ readonly schema?: HarnessV1JSONSchema;
406
+ readonly name?: string;
407
+ readonly description?: string;
404
408
  };
405
-
409
+ //#endregion
410
+ //#region src/v1/harness-v1-skill.d.ts
406
411
  /**
407
412
  * A self-contained instruction bundle the underlying runtime can load into
408
413
  * its context. Adapters decide how to surface skills to the runtime.
409
414
  */
410
415
  type HarnessV1Skill = {
411
- /** Stable identifier for the skill (kebab-case slug). */
412
- readonly name: string;
413
- /**
414
- * Short, model-facing description. This is what the runtime sees to
415
- * decide whether the skill is relevant.
416
- */
417
- readonly description: string;
418
- /** Full skill content the model loads when the skill is active. */
419
- readonly content: string;
420
- /**
421
- * Additional files that belong to this skill. Adapters with native skill
422
- * directories materialize these next to `SKILL.md`; adapters without native
423
- * skill files include them with the skill content.
424
- */
425
- readonly files?: ReadonlyArray<HarnessV1SkillFile>;
416
+ /** Stable identifier for the skill (kebab-case slug). */
417
+ readonly name: string;
418
+ /**
419
+ * Short, model-facing description. This is what the runtime sees to
420
+ * decide whether the skill is relevant.
421
+ */
422
+ readonly description: string;
423
+ /** Full skill content the model loads when the skill is active. */
424
+ readonly content: string;
425
+ /**
426
+ * Additional files that belong to this skill. Adapters with native skill
427
+ * directories materialize these next to `SKILL.md`; adapters without native
428
+ * skill files include them with the skill content.
429
+ */
430
+ readonly files?: ReadonlyArray<HarnessV1SkillFile>;
426
431
  };
427
432
  type HarnessV1SkillFile = {
428
- /**
429
- * Skill-relative POSIX path, for example `reference.md` or
430
- * `references/codes.md`. Absolute paths and `..` segments are rejected by
431
- * adapters before writing.
432
- */
433
- readonly path: string;
434
- /** UTF-8 text content for the file. */
435
- readonly content: string;
433
+ /**
434
+ * Skill-relative POSIX path, for example `reference.md` or
435
+ * `references/codes.md`. Absolute paths and `..` segments are rejected by
436
+ * adapters before writing.
437
+ */
438
+ readonly path: string;
439
+ /** UTF-8 text content for the file. */
440
+ readonly content: string;
436
441
  };
437
-
442
+ //#endregion
443
+ //#region src/v1/harness-v1-tool-spec.d.ts
438
444
  /**
439
445
  * Description of a host-defined tool that the harness should make available
440
446
  * to the underlying agent runtime.
@@ -446,43 +452,44 @@ type HarnessV1SkillFile = {
446
452
  * `submitToolResult` from the caller.
447
453
  */
448
454
  type HarnessV1ToolSpec = {
449
- /**
450
- * Tool name the agent runtime sees. Must match the name on incoming
451
- * `tool-call` events.
452
- */
453
- readonly name: string;
454
- /**
455
- * Human-readable description handed to the runtime, used to help the model
456
- * decide when to call the tool.
457
- */
458
- readonly description?: string;
459
- /**
460
- * JSON Schema describing the expected input for the tool. Optional because
461
- * some runtimes accept tools without schemas (free-form arguments).
462
- */
463
- readonly inputSchema?: JSONSchema7;
455
+ /**
456
+ * Tool name the agent runtime sees. Must match the name on incoming
457
+ * `tool-call` events.
458
+ */
459
+ readonly name: string;
460
+ /**
461
+ * Human-readable description handed to the runtime, used to help the model
462
+ * decide when to call the tool.
463
+ */
464
+ readonly description?: string;
465
+ /**
466
+ * JSON Schema describing the expected input for the tool. Optional because
467
+ * some runtimes accept tools without schemas (free-form arguments).
468
+ */
469
+ readonly inputSchema?: JSONSchema7;
464
470
  };
465
-
471
+ //#endregion
472
+ //#region src/v1/harness-v1-lifecycle-state.d.ts
466
473
  type HarnessV1PendingToolApproval = {
467
- readonly approvalId: string;
468
- readonly toolCallId: string;
469
- readonly toolName: string;
470
- readonly input: string;
471
- readonly kind: 'builtin' | 'custom';
472
- readonly providerExecuted?: boolean;
473
- readonly nativeName?: string;
474
+ readonly approvalId: string;
475
+ readonly toolCallId: string;
476
+ readonly toolName: string;
477
+ readonly input: string;
478
+ readonly kind: 'builtin' | 'custom';
479
+ readonly providerExecuted?: boolean;
480
+ readonly nativeName?: string;
474
481
  };
475
482
  type HarnessV1PendingToolResult = {
476
- readonly toolCallId: string;
477
- readonly toolName: string;
478
- readonly input: string;
479
- readonly providerOptions?: ProviderOptions;
480
- /** Executed while suspending; submit on resume without running the tool again. */
481
- readonly completedResult?: {
482
- readonly output: unknown;
483
- readonly isError?: boolean;
484
- readonly toolResult?: ToolResultPart;
485
- };
483
+ readonly toolCallId: string;
484
+ readonly toolName: string;
485
+ readonly input: string;
486
+ readonly providerOptions?: ProviderOptions;
487
+ /** Executed while suspending; submit on resume without running the tool again. */
488
+ readonly completedResult?: {
489
+ readonly output: unknown;
490
+ readonly isError?: boolean;
491
+ readonly toolResult?: ToolResultPart;
492
+ };
486
493
  };
487
494
  /**
488
495
  * Framework-owned settings captured when a turn begins. The same settings are
@@ -490,47 +497,47 @@ type HarnessV1PendingToolResult = {
490
497
  * so a resumed continuation cannot pick up configuration from a later turn.
491
498
  */
492
499
  type HarnessV1TurnSettings = {
493
- /**
494
- * Model identifier selected for this turn. Adapters interpret this value
495
- * according to the underlying harness runtime. Rerun-based continuations
496
- * reuse it when reconstructing the turn.
497
- */
498
- readonly model?: string;
499
- /**
500
- * Skills made available to the underlying runtime for this turn. Adapters
501
- * must replace skills from the preceding completed turn before starting a
502
- * fresh turn. Rerun-based continuations use them to reconstruct the turn.
503
- */
504
- readonly skills: ReadonlyArray<HarnessV1Skill>;
505
- /**
506
- * Free-form instructions for this turn. Adapters should apply them through
507
- * the runtime's native system or developer instruction mechanism when
508
- * supported. Rerun-based continuations use them to reconstruct the turn.
509
- */
510
- readonly instructions?: string;
511
- /**
512
- * Host-defined tools made available to the underlying runtime for this turn.
513
- * The harness emits `tool-call` events when the runtime calls one and waits
514
- * for `submitToolResult`. Rerun-based continuations use them to reconstruct
515
- * the turn.
516
- */
517
- readonly tools: ReadonlyArray<HarnessV1ToolSpec>;
500
+ /**
501
+ * Model identifier selected for this turn. Adapters interpret this value
502
+ * according to the underlying harness runtime. Rerun-based continuations
503
+ * reuse it when reconstructing the turn.
504
+ */
505
+ readonly model?: string;
506
+ /**
507
+ * Skills made available to the underlying runtime for this turn. Adapters
508
+ * must replace skills from the preceding completed turn before starting a
509
+ * fresh turn. Rerun-based continuations use them to reconstruct the turn.
510
+ */
511
+ readonly skills: ReadonlyArray<HarnessV1Skill>;
512
+ /**
513
+ * Free-form instructions for this turn. Adapters should apply them through
514
+ * the runtime's native system or developer instruction mechanism when
515
+ * supported. Rerun-based continuations use them to reconstruct the turn.
516
+ */
517
+ readonly instructions?: string;
518
+ /**
519
+ * Host-defined tools made available to the underlying runtime for this turn.
520
+ * The harness emits `tool-call` events when the runtime calls one and waits
521
+ * for `submitToolResult`. Rerun-based continuations use them to reconstruct
522
+ * the turn.
523
+ */
524
+ readonly tools: ReadonlyArray<HarnessV1ToolSpec>;
518
525
  };
519
526
  type HarnessV1LifecycleStateBase = {
520
- /**
521
- * Identifier of the harness that produced this state. Used by adapters to
522
- * refuse mismatched payloads.
523
- */
524
- readonly harnessId: string;
525
- /**
526
- * Spec version of the harness that produced this state.
527
- */
528
- readonly specificationVersion: 'harness-v1';
529
- /**
530
- * Adapter-defined payload. May be persisted as JSON; the adapter is
531
- * responsible for any necessary encoding.
532
- */
533
- readonly data: JSONValue;
527
+ /**
528
+ * Identifier of the harness that produced this state. Used by adapters to
529
+ * refuse mismatched payloads.
530
+ */
531
+ readonly harnessId: string;
532
+ /**
533
+ * Spec version of the harness that produced this state.
534
+ */
535
+ readonly specificationVersion: 'harness-v1';
536
+ /**
537
+ * Adapter-defined payload. May be persisted as JSON; the adapter is
538
+ * responsible for any necessary encoding.
539
+ */
540
+ readonly data: JSONValue;
534
541
  };
535
542
  /**
536
543
  * Opaque payload returned by between-turn session lifecycle methods and
@@ -538,12 +545,12 @@ type HarnessV1LifecycleStateBase = {
538
545
  * underlying session before starting a new turn.
539
546
  */
540
547
  type HarnessV1ResumeSessionState = HarnessV1LifecycleStateBase & {
541
- readonly type: 'resume-session';
542
- /**
543
- * Optional unfinished-turn state. When present, the session must be resumed
544
- * before the turn is continued.
545
- */
546
- readonly continueFrom?: HarnessV1ContinueTurnState;
548
+ readonly type: 'resume-session';
549
+ /**
550
+ * Optional unfinished-turn state. When present, the session must be resumed
551
+ * before the turn is continued.
552
+ */
553
+ readonly continueFrom?: HarnessV1ContinueTurnState;
547
554
  };
548
555
  /**
549
556
  * Opaque payload returned by `doSuspendTurn` and accepted by a future
@@ -551,27 +558,28 @@ type HarnessV1ResumeSessionState = HarnessV1LifecycleStateBase & {
551
558
  * continuing the suspended turn.
552
559
  */
553
560
  type HarnessV1ContinueTurnState = HarnessV1LifecycleStateBase & {
554
- readonly type: 'continue-turn';
555
- /**
556
- * Framework-owned pending approval records. These are intentionally outside
557
- * adapter-defined `data` so callers can persist the entire lifecycle payload
558
- * without the harness framework owning storage.
559
- */
560
- readonly pendingToolApprovals?: readonly HarnessV1PendingToolApproval[];
561
- /**
562
- * Framework-owned client tool calls that are waiting for a caller-provided
563
- * result before the underlying turn can continue.
564
- */
565
- readonly pendingToolResults?: readonly HarnessV1PendingToolResult[];
566
- /**
567
- * Framework-owned settings captured when the unfinished turn began. They
568
- * are persisted outside adapter data so a resumed continuation cannot pick
569
- * up settings prepared for a later turn.
570
- */
571
- readonly turnSettings?: HarnessV1TurnSettings;
561
+ readonly type: 'continue-turn';
562
+ /**
563
+ * Framework-owned pending approval records. These are intentionally outside
564
+ * adapter-defined `data` so callers can persist the entire lifecycle payload
565
+ * without the harness framework owning storage.
566
+ */
567
+ readonly pendingToolApprovals?: readonly HarnessV1PendingToolApproval[];
568
+ /**
569
+ * Framework-owned client tool calls that are waiting for a caller-provided
570
+ * result before the underlying turn can continue.
571
+ */
572
+ readonly pendingToolResults?: readonly HarnessV1PendingToolResult[];
573
+ /**
574
+ * Framework-owned settings captured when the unfinished turn began. They
575
+ * are persisted outside adapter data so a resumed continuation cannot pick
576
+ * up settings prepared for a later turn.
577
+ */
578
+ readonly turnSettings?: HarnessV1TurnSettings;
572
579
  };
573
580
  type HarnessV1LifecycleState = HarnessV1ResumeSessionState | HarnessV1ContinueTurnState;
574
-
581
+ //#endregion
582
+ //#region src/v1/harness-v1-call-warning.d.ts
575
583
  /**
576
584
  * Warning emitted by a harness adapter during a call.
577
585
  *
@@ -580,18 +588,19 @@ type HarnessV1LifecycleState = HarnessV1ResumeSessionState | HarnessV1ContinueTu
580
588
  * in the harness namespace.
581
589
  */
582
590
  type HarnessV1CallWarning = {
583
- type: 'unsupported-setting';
584
- setting: string;
585
- details?: string;
591
+ type: 'unsupported-setting';
592
+ setting: string;
593
+ details?: string;
586
594
  } | {
587
- type: 'unsupported-tool';
588
- tool: string;
589
- details?: string;
595
+ type: 'unsupported-tool';
596
+ tool: string;
597
+ details?: string;
590
598
  } | {
591
- type: 'other';
592
- message: string;
599
+ type: 'other';
600
+ message: string;
593
601
  };
594
-
602
+ //#endregion
603
+ //#region src/v1/harness-v1-metadata.d.ts
595
604
  /**
596
605
  * Adapter-namespaced opaque data attached to harness events.
597
606
  *
@@ -603,7 +612,8 @@ type HarnessV1CallWarning = {
603
612
  * JSON-serializable data the adapter chooses to surface to callers.
604
613
  */
605
614
  type HarnessV1Metadata = Record<string, Record<string, JSONValue>>;
606
-
615
+ //#endregion
616
+ //#region src/v1/harness-v1-stream-part.d.ts
607
617
  /**
608
618
  * One event emitted by a harness adapter during a prompt turn.
609
619
  *
@@ -619,176 +629,176 @@ type HarnessV1Metadata = Record<string, Record<string, JSONValue>>;
619
629
  * agent rebinds it when forwarding to AI SDK consumers.
620
630
  */
621
631
  type HarnessV1StreamPart = {
622
- type: 'stream-start';
623
- warnings?: ReadonlyArray<HarnessV1CallWarning>;
624
- /**
625
- * The model the runtime actually resolved to for this turn, when the
626
- * adapter learns it at stream start (e.g. Claude Code's `init` message
627
- * reports the resolved/default model). Surfaced into telemetry as
628
- * `gen_ai.request.model`. Omitted when the adapter doesn't know it here.
629
- */
630
- modelId?: string;
632
+ type: 'stream-start';
633
+ warnings?: ReadonlyArray<HarnessV1CallWarning>;
634
+ /**
635
+ * The model the runtime actually resolved to for this turn, when the
636
+ * adapter learns it at stream start (e.g. Claude Code's `init` message
637
+ * reports the resolved/default model). Surfaced into telemetry as
638
+ * `gen_ai.request.model`. Omitted when the adapter doesn't know it here.
639
+ */
640
+ modelId?: string;
631
641
  } | {
632
- type: 'text-start';
633
- id: string;
634
- harnessMetadata?: HarnessV1Metadata;
642
+ type: 'text-start';
643
+ id: string;
644
+ harnessMetadata?: HarnessV1Metadata;
635
645
  } | {
636
- type: 'text-delta';
637
- id: string;
638
- delta: string;
639
- harnessMetadata?: HarnessV1Metadata;
646
+ type: 'text-delta';
647
+ id: string;
648
+ delta: string;
649
+ harnessMetadata?: HarnessV1Metadata;
640
650
  } | {
641
- type: 'text-end';
642
- id: string;
643
- harnessMetadata?: HarnessV1Metadata;
651
+ type: 'text-end';
652
+ id: string;
653
+ harnessMetadata?: HarnessV1Metadata;
644
654
  } | {
645
- type: 'reasoning-start';
646
- id: string;
647
- harnessMetadata?: HarnessV1Metadata;
655
+ type: 'reasoning-start';
656
+ id: string;
657
+ harnessMetadata?: HarnessV1Metadata;
648
658
  } | {
649
- type: 'reasoning-delta';
650
- id: string;
651
- delta: string;
652
- harnessMetadata?: HarnessV1Metadata;
659
+ type: 'reasoning-delta';
660
+ id: string;
661
+ delta: string;
662
+ harnessMetadata?: HarnessV1Metadata;
653
663
  } | {
654
- type: 'reasoning-end';
655
- id: string;
656
- harnessMetadata?: HarnessV1Metadata;
664
+ type: 'reasoning-end';
665
+ id: string;
666
+ harnessMetadata?: HarnessV1Metadata;
657
667
  } | Extract<LanguageModelV4StreamPart, {
658
- type: 'tool-input-start';
668
+ type: 'tool-input-start';
659
669
  }> | Extract<LanguageModelV4StreamPart, {
660
- type: 'tool-input-delta';
670
+ type: 'tool-input-delta';
661
671
  }> | Extract<LanguageModelV4StreamPart, {
662
- type: 'tool-input-end';
672
+ type: 'tool-input-end';
663
673
  }> | (LanguageModelV4ToolCall & {
664
- nativeName?: string;
665
- /**
666
- * Total tool calls in the current model step, when known before tool
667
- * execution begins. Populate this on every tool call in the step.
668
- */
669
- stepToolCallCount?: number;
674
+ nativeName?: string;
675
+ /**
676
+ * Total tool calls in the current model step, when known before tool
677
+ * execution begins. Populate this on every tool call in the step.
678
+ */
679
+ stepToolCallCount?: number;
670
680
  }) | LanguageModelV4ToolApprovalRequest | LanguageModelV4ToolResult | {
671
- type: 'finish-step';
672
- finishReason: LanguageModelV4FinishReason;
673
- usage: LanguageModelV4Usage;
674
- harnessMetadata?: HarnessV1Metadata;
681
+ type: 'finish-step';
682
+ finishReason: LanguageModelV4FinishReason;
683
+ usage: LanguageModelV4Usage;
684
+ harnessMetadata?: HarnessV1Metadata;
675
685
  } | {
676
- type: 'finish';
677
- finishReason: LanguageModelV4FinishReason;
678
- totalUsage: LanguageModelV4Usage;
679
- harnessMetadata?: HarnessV1Metadata;
686
+ type: 'finish';
687
+ finishReason: LanguageModelV4FinishReason;
688
+ totalUsage: LanguageModelV4Usage;
689
+ harnessMetadata?: HarnessV1Metadata;
680
690
  } | {
681
- type: 'file-change';
682
- event: 'create' | 'modify' | 'delete';
683
- path: string;
684
- harnessMetadata?: HarnessV1Metadata;
691
+ type: 'file-change';
692
+ event: 'create' | 'modify' | 'delete';
693
+ path: string;
694
+ harnessMetadata?: HarnessV1Metadata;
685
695
  } | {
686
- type: 'compaction';
687
- trigger: 'manual' | 'auto';
688
- summary: string;
689
- tokensBefore?: number;
690
- tokensAfter?: number;
691
- harnessMetadata?: HarnessV1Metadata;
696
+ type: 'compaction';
697
+ trigger: 'manual' | 'auto';
698
+ summary: string;
699
+ tokensBefore?: number;
700
+ tokensAfter?: number;
701
+ harnessMetadata?: HarnessV1Metadata;
692
702
  } | {
693
- type: 'error';
694
- error: unknown;
703
+ type: 'error';
704
+ error: unknown;
695
705
  } | {
696
- type: 'raw';
697
- rawValue: unknown;
706
+ type: 'raw';
707
+ rawValue: unknown;
698
708
  };
699
- declare const harnessV1StreamStartPartSchema: z.ZodObject<{
700
- type: z.ZodLiteral<"stream-start">;
701
- warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodType<HarnessV1CallWarning, unknown, z.core.$ZodTypeInternals<HarnessV1CallWarning, unknown>>>>>;
702
- modelId: z.ZodOptional<z.ZodString>;
709
+ export declare const harnessV1StreamStartPartSchema: z.ZodObject<{
710
+ type: z.ZodLiteral<"stream-start">;
711
+ warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodType<HarnessV1CallWarning, unknown, z.core.$ZodTypeInternals<HarnessV1CallWarning, unknown>>>>>;
712
+ modelId: z.ZodOptional<z.ZodString>;
703
713
  }, z.core.$strip>;
704
- declare const harnessV1TextStartPartSchema: z.ZodObject<{
705
- type: z.ZodLiteral<"text-start">;
706
- id: z.ZodString;
707
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
714
+ export declare const harnessV1TextStartPartSchema: z.ZodObject<{
715
+ type: z.ZodLiteral<"text-start">;
716
+ id: z.ZodString;
717
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
708
718
  }, z.core.$strip>;
709
- declare const harnessV1TextDeltaPartSchema: z.ZodObject<{
710
- type: z.ZodLiteral<"text-delta">;
711
- id: z.ZodString;
712
- delta: z.ZodString;
713
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
719
+ export declare const harnessV1TextDeltaPartSchema: z.ZodObject<{
720
+ type: z.ZodLiteral<"text-delta">;
721
+ id: z.ZodString;
722
+ delta: z.ZodString;
723
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
714
724
  }, z.core.$strip>;
715
- declare const harnessV1TextEndPartSchema: z.ZodObject<{
716
- type: z.ZodLiteral<"text-end">;
717
- id: z.ZodString;
718
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
725
+ export declare const harnessV1TextEndPartSchema: z.ZodObject<{
726
+ type: z.ZodLiteral<"text-end">;
727
+ id: z.ZodString;
728
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
719
729
  }, z.core.$strip>;
720
- declare const harnessV1ReasoningStartPartSchema: z.ZodObject<{
721
- type: z.ZodLiteral<"reasoning-start">;
722
- id: z.ZodString;
723
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
730
+ export declare const harnessV1ReasoningStartPartSchema: z.ZodObject<{
731
+ type: z.ZodLiteral<"reasoning-start">;
732
+ id: z.ZodString;
733
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
724
734
  }, z.core.$strip>;
725
- declare const harnessV1ReasoningDeltaPartSchema: z.ZodObject<{
726
- type: z.ZodLiteral<"reasoning-delta">;
727
- id: z.ZodString;
728
- delta: z.ZodString;
729
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
735
+ export declare const harnessV1ReasoningDeltaPartSchema: z.ZodObject<{
736
+ type: z.ZodLiteral<"reasoning-delta">;
737
+ id: z.ZodString;
738
+ delta: z.ZodString;
739
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
730
740
  }, z.core.$strip>;
731
- declare const harnessV1ReasoningEndPartSchema: z.ZodObject<{
732
- type: z.ZodLiteral<"reasoning-end">;
733
- id: z.ZodString;
734
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
741
+ export declare const harnessV1ReasoningEndPartSchema: z.ZodObject<{
742
+ type: z.ZodLiteral<"reasoning-end">;
743
+ id: z.ZodString;
744
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
735
745
  }, z.core.$strip>;
736
- declare const harnessV1ToolCallPartSchema: z.ZodObject<{
737
- type: z.ZodLiteral<"tool-call">;
738
- toolCallId: z.ZodString;
739
- toolName: z.ZodString;
740
- input: z.ZodString;
741
- providerExecuted: z.ZodOptional<z.ZodBoolean>;
742
- dynamic: z.ZodOptional<z.ZodBoolean>;
743
- providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
744
- nativeName: z.ZodOptional<z.ZodString>;
745
- stepToolCallCount: z.ZodOptional<z.ZodNumber>;
746
+ export declare const harnessV1ToolCallPartSchema: z.ZodObject<{
747
+ type: z.ZodLiteral<"tool-call">;
748
+ toolCallId: z.ZodString;
749
+ toolName: z.ZodString;
750
+ input: z.ZodString;
751
+ providerExecuted: z.ZodOptional<z.ZodBoolean>;
752
+ dynamic: z.ZodOptional<z.ZodBoolean>;
753
+ providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
754
+ nativeName: z.ZodOptional<z.ZodString>;
755
+ stepToolCallCount: z.ZodOptional<z.ZodNumber>;
746
756
  }, z.core.$strip>;
747
- declare const harnessV1ToolApprovalRequestPartSchema: z.ZodObject<{
748
- type: z.ZodLiteral<"tool-approval-request">;
749
- approvalId: z.ZodString;
750
- toolCallId: z.ZodString;
751
- providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
757
+ export declare const harnessV1ToolApprovalRequestPartSchema: z.ZodObject<{
758
+ type: z.ZodLiteral<"tool-approval-request">;
759
+ approvalId: z.ZodString;
760
+ toolCallId: z.ZodString;
761
+ providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
752
762
  }, z.core.$strip>;
753
- declare const harnessV1ToolResultPartSchema: z.ZodObject<{
754
- type: z.ZodLiteral<"tool-result">;
755
- toolCallId: z.ZodString;
756
- toolName: z.ZodString;
757
- result: z.ZodType<NonNullable<JSONValue>, unknown, z.core.$ZodTypeInternals<NonNullable<JSONValue>, unknown>>;
758
- isError: z.ZodOptional<z.ZodBoolean>;
759
- preliminary: z.ZodOptional<z.ZodBoolean>;
760
- dynamic: z.ZodOptional<z.ZodBoolean>;
761
- providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
763
+ export declare const harnessV1ToolResultPartSchema: z.ZodObject<{
764
+ type: z.ZodLiteral<"tool-result">;
765
+ toolCallId: z.ZodString;
766
+ toolName: z.ZodString;
767
+ result: z.ZodType<NonNullable<JSONValue>, unknown, z.core.$ZodTypeInternals<NonNullable<JSONValue>, unknown>>;
768
+ isError: z.ZodOptional<z.ZodBoolean>;
769
+ preliminary: z.ZodOptional<z.ZodBoolean>;
770
+ dynamic: z.ZodOptional<z.ZodBoolean>;
771
+ providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
762
772
  }, z.core.$strip>;
763
- declare const harnessV1FinishStepPartSchema: z.ZodObject<{
764
- type: z.ZodLiteral<"finish-step">;
765
- finishReason: z.ZodType<LanguageModelV4FinishReason, unknown, z.core.$ZodTypeInternals<LanguageModelV4FinishReason, unknown>>;
766
- usage: z.ZodType<LanguageModelV4Usage, unknown, z.core.$ZodTypeInternals<LanguageModelV4Usage, unknown>>;
767
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
773
+ export declare const harnessV1FinishStepPartSchema: z.ZodObject<{
774
+ type: z.ZodLiteral<"finish-step">;
775
+ finishReason: z.ZodType<LanguageModelV4FinishReason, unknown, z.core.$ZodTypeInternals<LanguageModelV4FinishReason, unknown>>;
776
+ usage: z.ZodType<LanguageModelV4Usage, unknown, z.core.$ZodTypeInternals<LanguageModelV4Usage, unknown>>;
777
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
768
778
  }, z.core.$strip>;
769
- declare const harnessV1FinishPartSchema: z.ZodObject<{
770
- type: z.ZodLiteral<"finish">;
771
- finishReason: z.ZodType<LanguageModelV4FinishReason, unknown, z.core.$ZodTypeInternals<LanguageModelV4FinishReason, unknown>>;
772
- totalUsage: z.ZodType<LanguageModelV4Usage, unknown, z.core.$ZodTypeInternals<LanguageModelV4Usage, unknown>>;
773
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
779
+ export declare const harnessV1FinishPartSchema: z.ZodObject<{
780
+ type: z.ZodLiteral<"finish">;
781
+ finishReason: z.ZodType<LanguageModelV4FinishReason, unknown, z.core.$ZodTypeInternals<LanguageModelV4FinishReason, unknown>>;
782
+ totalUsage: z.ZodType<LanguageModelV4Usage, unknown, z.core.$ZodTypeInternals<LanguageModelV4Usage, unknown>>;
783
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
774
784
  }, z.core.$strip>;
775
- declare const harnessV1FileChangePartSchema: z.ZodObject<{
776
- type: z.ZodLiteral<"file-change">;
777
- event: z.ZodEnum<{
778
- create: "create";
779
- modify: "modify";
780
- delete: "delete";
781
- }>;
782
- path: z.ZodString;
783
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
785
+ export declare const harnessV1FileChangePartSchema: z.ZodObject<{
786
+ type: z.ZodLiteral<"file-change">;
787
+ event: z.ZodEnum<{
788
+ create: "create";
789
+ modify: "modify";
790
+ delete: "delete";
791
+ }>;
792
+ path: z.ZodString;
793
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
784
794
  }, z.core.$strip>;
785
- declare const harnessV1ErrorPartSchema: z.ZodObject<{
786
- type: z.ZodLiteral<"error">;
787
- error: z.ZodUnknown;
795
+ export declare const harnessV1ErrorPartSchema: z.ZodObject<{
796
+ type: z.ZodLiteral<"error">;
797
+ error: z.ZodUnknown;
788
798
  }, z.core.$strip>;
789
- declare const harnessV1RawPartSchema: z.ZodObject<{
790
- type: z.ZodLiteral<"raw">;
791
- rawValue: z.ZodUnknown;
799
+ export declare const harnessV1RawPartSchema: z.ZodObject<{
800
+ type: z.ZodLiteral<"raw">;
801
+ rawValue: z.ZodUnknown;
792
802
  }, z.core.$strip>;
793
803
  /**
794
804
  * Assembled discriminated union over every `HarnessV1StreamPart` variant. Left
@@ -796,116 +806,117 @@ declare const harnessV1RawPartSchema: z.ZodObject<{
796
806
  * composes the individual member schemas, and the type test asserts the
797
807
  * inferred union equals `HarnessV1StreamPart`.
798
808
  */
799
- declare const harnessV1StreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
800
- type: z.ZodLiteral<"stream-start">;
801
- warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodType<HarnessV1CallWarning, unknown, z.core.$ZodTypeInternals<HarnessV1CallWarning, unknown>>>>>;
802
- modelId: z.ZodOptional<z.ZodString>;
809
+ export declare const harnessV1StreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
810
+ type: z.ZodLiteral<"stream-start">;
811
+ warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodType<HarnessV1CallWarning, unknown, z.core.$ZodTypeInternals<HarnessV1CallWarning, unknown>>>>>;
812
+ modelId: z.ZodOptional<z.ZodString>;
803
813
  }, z.core.$strip>, z.ZodObject<{
804
- type: z.ZodLiteral<"text-start">;
805
- id: z.ZodString;
806
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
814
+ type: z.ZodLiteral<"text-start">;
815
+ id: z.ZodString;
816
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
807
817
  }, z.core.$strip>, z.ZodObject<{
808
- type: z.ZodLiteral<"text-delta">;
809
- id: z.ZodString;
810
- delta: z.ZodString;
811
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
818
+ type: z.ZodLiteral<"text-delta">;
819
+ id: z.ZodString;
820
+ delta: z.ZodString;
821
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
812
822
  }, z.core.$strip>, z.ZodObject<{
813
- type: z.ZodLiteral<"text-end">;
814
- id: z.ZodString;
815
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
823
+ type: z.ZodLiteral<"text-end">;
824
+ id: z.ZodString;
825
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
816
826
  }, z.core.$strip>, z.ZodObject<{
817
- type: z.ZodLiteral<"reasoning-start">;
818
- id: z.ZodString;
819
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
827
+ type: z.ZodLiteral<"reasoning-start">;
828
+ id: z.ZodString;
829
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
820
830
  }, z.core.$strip>, z.ZodObject<{
821
- type: z.ZodLiteral<"reasoning-delta">;
822
- id: z.ZodString;
823
- delta: z.ZodString;
824
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
831
+ type: z.ZodLiteral<"reasoning-delta">;
832
+ id: z.ZodString;
833
+ delta: z.ZodString;
834
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
825
835
  }, z.core.$strip>, z.ZodObject<{
826
- type: z.ZodLiteral<"reasoning-end">;
827
- id: z.ZodString;
828
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
836
+ type: z.ZodLiteral<"reasoning-end">;
837
+ id: z.ZodString;
838
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
829
839
  }, z.core.$strip>, z.ZodObject<{
830
- type: z.ZodLiteral<"tool-input-start">;
831
- id: z.ZodString;
832
- toolName: z.ZodString;
833
- providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
834
- providerExecuted: z.ZodOptional<z.ZodBoolean>;
835
- dynamic: z.ZodOptional<z.ZodBoolean>;
836
- title: z.ZodOptional<z.ZodString>;
840
+ type: z.ZodLiteral<"tool-input-start">;
841
+ id: z.ZodString;
842
+ toolName: z.ZodString;
843
+ providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
844
+ providerExecuted: z.ZodOptional<z.ZodBoolean>;
845
+ dynamic: z.ZodOptional<z.ZodBoolean>;
846
+ title: z.ZodOptional<z.ZodString>;
837
847
  }, z.core.$strip>, z.ZodObject<{
838
- type: z.ZodLiteral<"tool-input-delta">;
839
- id: z.ZodString;
840
- delta: z.ZodString;
841
- providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
848
+ type: z.ZodLiteral<"tool-input-delta">;
849
+ id: z.ZodString;
850
+ delta: z.ZodString;
851
+ providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
842
852
  }, z.core.$strip>, z.ZodObject<{
843
- type: z.ZodLiteral<"tool-input-end">;
844
- id: z.ZodString;
845
- providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
853
+ type: z.ZodLiteral<"tool-input-end">;
854
+ id: z.ZodString;
855
+ providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
846
856
  }, z.core.$strip>, z.ZodObject<{
847
- type: z.ZodLiteral<"tool-call">;
848
- toolCallId: z.ZodString;
849
- toolName: z.ZodString;
850
- input: z.ZodString;
851
- providerExecuted: z.ZodOptional<z.ZodBoolean>;
852
- dynamic: z.ZodOptional<z.ZodBoolean>;
853
- providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
854
- nativeName: z.ZodOptional<z.ZodString>;
855
- stepToolCallCount: z.ZodOptional<z.ZodNumber>;
857
+ type: z.ZodLiteral<"tool-call">;
858
+ toolCallId: z.ZodString;
859
+ toolName: z.ZodString;
860
+ input: z.ZodString;
861
+ providerExecuted: z.ZodOptional<z.ZodBoolean>;
862
+ dynamic: z.ZodOptional<z.ZodBoolean>;
863
+ providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
864
+ nativeName: z.ZodOptional<z.ZodString>;
865
+ stepToolCallCount: z.ZodOptional<z.ZodNumber>;
856
866
  }, z.core.$strip>, z.ZodObject<{
857
- type: z.ZodLiteral<"tool-approval-request">;
858
- approvalId: z.ZodString;
859
- toolCallId: z.ZodString;
860
- providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
867
+ type: z.ZodLiteral<"tool-approval-request">;
868
+ approvalId: z.ZodString;
869
+ toolCallId: z.ZodString;
870
+ providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
861
871
  }, z.core.$strip>, z.ZodObject<{
862
- type: z.ZodLiteral<"tool-result">;
863
- toolCallId: z.ZodString;
864
- toolName: z.ZodString;
865
- result: z.ZodType<NonNullable<JSONValue>, unknown, z.core.$ZodTypeInternals<NonNullable<JSONValue>, unknown>>;
866
- isError: z.ZodOptional<z.ZodBoolean>;
867
- preliminary: z.ZodOptional<z.ZodBoolean>;
868
- dynamic: z.ZodOptional<z.ZodBoolean>;
869
- providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
872
+ type: z.ZodLiteral<"tool-result">;
873
+ toolCallId: z.ZodString;
874
+ toolName: z.ZodString;
875
+ result: z.ZodType<NonNullable<JSONValue>, unknown, z.core.$ZodTypeInternals<NonNullable<JSONValue>, unknown>>;
876
+ isError: z.ZodOptional<z.ZodBoolean>;
877
+ preliminary: z.ZodOptional<z.ZodBoolean>;
878
+ dynamic: z.ZodOptional<z.ZodBoolean>;
879
+ providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
870
880
  }, z.core.$strip>, z.ZodObject<{
871
- type: z.ZodLiteral<"finish-step">;
872
- finishReason: z.ZodType<LanguageModelV4FinishReason, unknown, z.core.$ZodTypeInternals<LanguageModelV4FinishReason, unknown>>;
873
- usage: z.ZodType<LanguageModelV4Usage, unknown, z.core.$ZodTypeInternals<LanguageModelV4Usage, unknown>>;
874
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
881
+ type: z.ZodLiteral<"finish-step">;
882
+ finishReason: z.ZodType<LanguageModelV4FinishReason, unknown, z.core.$ZodTypeInternals<LanguageModelV4FinishReason, unknown>>;
883
+ usage: z.ZodType<LanguageModelV4Usage, unknown, z.core.$ZodTypeInternals<LanguageModelV4Usage, unknown>>;
884
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
875
885
  }, z.core.$strip>, z.ZodObject<{
876
- type: z.ZodLiteral<"finish">;
877
- finishReason: z.ZodType<LanguageModelV4FinishReason, unknown, z.core.$ZodTypeInternals<LanguageModelV4FinishReason, unknown>>;
878
- totalUsage: z.ZodType<LanguageModelV4Usage, unknown, z.core.$ZodTypeInternals<LanguageModelV4Usage, unknown>>;
879
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
886
+ type: z.ZodLiteral<"finish">;
887
+ finishReason: z.ZodType<LanguageModelV4FinishReason, unknown, z.core.$ZodTypeInternals<LanguageModelV4FinishReason, unknown>>;
888
+ totalUsage: z.ZodType<LanguageModelV4Usage, unknown, z.core.$ZodTypeInternals<LanguageModelV4Usage, unknown>>;
889
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
880
890
  }, z.core.$strip>, z.ZodObject<{
881
- type: z.ZodLiteral<"file-change">;
882
- event: z.ZodEnum<{
883
- create: "create";
884
- modify: "modify";
885
- delete: "delete";
886
- }>;
887
- path: z.ZodString;
888
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
891
+ type: z.ZodLiteral<"file-change">;
892
+ event: z.ZodEnum<{
893
+ create: "create";
894
+ modify: "modify";
895
+ delete: "delete";
896
+ }>;
897
+ path: z.ZodString;
898
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
889
899
  }, z.core.$strip>, z.ZodObject<{
890
- type: z.ZodLiteral<"compaction">;
891
- trigger: z.ZodEnum<{
892
- manual: "manual";
893
- auto: "auto";
894
- }>;
895
- summary: z.ZodString;
896
- tokensBefore: z.ZodOptional<z.ZodNumber>;
897
- tokensAfter: z.ZodOptional<z.ZodNumber>;
898
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
900
+ type: z.ZodLiteral<"compaction">;
901
+ trigger: z.ZodEnum<{
902
+ manual: "manual";
903
+ auto: "auto";
904
+ }>;
905
+ summary: z.ZodString;
906
+ tokensBefore: z.ZodOptional<z.ZodNumber>;
907
+ tokensAfter: z.ZodOptional<z.ZodNumber>;
908
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
899
909
  }, z.core.$strip>, z.ZodObject<{
900
- type: z.ZodLiteral<"error">;
901
- error: z.ZodUnknown;
910
+ type: z.ZodLiteral<"error">;
911
+ error: z.ZodUnknown;
902
912
  }, z.core.$strip>, z.ZodObject<{
903
- type: z.ZodLiteral<"raw">;
904
- rawValue: z.ZodUnknown;
913
+ type: z.ZodLiteral<"raw">;
914
+ rawValue: z.ZodUnknown;
905
915
  }, z.core.$strip>]>;
906
-
916
+ //#endregion
917
+ //#region src/v1/harness-v1-message.d.ts
907
918
  type LanguageModelV4ToolResultContentPart = Extract<LanguageModelV4ToolResultOutput, {
908
- type: 'content';
919
+ type: 'content';
909
920
  }>['value'][number];
910
921
  type HarnessV1TextPart = Omit<LanguageModelV4TextPart, 'providerOptions'>;
911
922
  type HarnessV1FilePart = Omit<LanguageModelV4FilePart, 'providerOptions'>;
@@ -913,72 +924,74 @@ type HarnessV1CustomPart = Omit<LanguageModelV4CustomPart, 'providerOptions'>;
913
924
  type HarnessV1ReasoningPart = Omit<LanguageModelV4ReasoningPart, 'providerOptions'>;
914
925
  type HarnessV1ReasoningFilePart = Omit<LanguageModelV4ReasoningFilePart, 'providerOptions'>;
915
926
  type HarnessV1ToolCallPart = Omit<LanguageModelV4ToolCallPart, 'providerOptions'> & {
916
- nativeName?: string;
927
+ nativeName?: string;
917
928
  };
918
929
  type HarnessV1ToolResultOutput = Omit<Extract<LanguageModelV4ToolResultOutput, {
919
- type: 'text';
930
+ type: 'text';
920
931
  }>, 'providerOptions'> | Omit<Extract<LanguageModelV4ToolResultOutput, {
921
- type: 'json';
932
+ type: 'json';
922
933
  }>, 'providerOptions'> | Omit<Extract<LanguageModelV4ToolResultOutput, {
923
- type: 'execution-denied';
934
+ type: 'execution-denied';
924
935
  }>, 'providerOptions'> | Omit<Extract<LanguageModelV4ToolResultOutput, {
925
- type: 'error-text';
936
+ type: 'error-text';
926
937
  }>, 'providerOptions'> | Omit<Extract<LanguageModelV4ToolResultOutput, {
927
- type: 'error-json';
938
+ type: 'error-json';
928
939
  }>, 'providerOptions'> | {
929
- type: 'content';
930
- value: Array<Omit<Extract<LanguageModelV4ToolResultContentPart, {
931
- type: 'text';
932
- }>, 'providerOptions'> | Omit<Extract<LanguageModelV4ToolResultContentPart, {
933
- type: 'file';
934
- }>, 'providerOptions'> | Omit<Extract<LanguageModelV4ToolResultContentPart, {
935
- type: 'custom';
936
- }>, 'providerOptions'>>;
940
+ type: 'content';
941
+ value: Array<Omit<Extract<LanguageModelV4ToolResultContentPart, {
942
+ type: 'text';
943
+ }>, 'providerOptions'> | Omit<Extract<LanguageModelV4ToolResultContentPart, {
944
+ type: 'file';
945
+ }>, 'providerOptions'> | Omit<Extract<LanguageModelV4ToolResultContentPart, {
946
+ type: 'custom';
947
+ }>, 'providerOptions'>>;
937
948
  };
938
949
  type HarnessV1ToolResultPart = Omit<LanguageModelV4ToolResultPart, 'output' | 'providerOptions'> & {
939
- output: HarnessV1ToolResultOutput;
950
+ output: HarnessV1ToolResultOutput;
940
951
  };
941
952
  type HarnessV1ToolApprovalResponsePart = Omit<LanguageModelV4ToolApprovalResponsePart, 'providerOptions'>;
942
953
  type HarnessV1MessagePart = HarnessV1TextPart | HarnessV1FilePart | HarnessV1CustomPart | HarnessV1ReasoningPart | HarnessV1ReasoningFilePart | HarnessV1ToolCallPart | HarnessV1ToolResultPart | HarnessV1ToolApprovalResponsePart;
943
954
  type HarnessV1UserMessage = {
944
- readonly role: 'user';
945
- readonly content: Array<HarnessV1TextPart | HarnessV1FilePart>;
946
- readonly at?: string;
947
- readonly harnessMetadata?: HarnessV1Metadata;
955
+ readonly role: 'user';
956
+ readonly content: Array<HarnessV1TextPart | HarnessV1FilePart>;
957
+ readonly at?: string;
958
+ readonly harnessMetadata?: HarnessV1Metadata;
948
959
  };
949
960
  type HarnessV1AssistantMessage = {
950
- readonly role: 'assistant';
951
- readonly content: Array<HarnessV1TextPart | HarnessV1FilePart | HarnessV1CustomPart | HarnessV1ReasoningPart | HarnessV1ReasoningFilePart | HarnessV1ToolCallPart | HarnessV1ToolResultPart>;
952
- readonly at?: string;
953
- readonly harnessMetadata?: HarnessV1Metadata;
961
+ readonly role: 'assistant';
962
+ readonly content: Array<HarnessV1TextPart | HarnessV1FilePart | HarnessV1CustomPart | HarnessV1ReasoningPart | HarnessV1ReasoningFilePart | HarnessV1ToolCallPart | HarnessV1ToolResultPart>;
963
+ readonly at?: string;
964
+ readonly harnessMetadata?: HarnessV1Metadata;
954
965
  };
955
966
  type HarnessV1ToolMessage = {
956
- readonly role: 'tool';
957
- readonly content: Array<HarnessV1ToolResultPart | HarnessV1ToolApprovalResponsePart>;
958
- readonly at?: string;
959
- readonly harnessMetadata?: HarnessV1Metadata;
967
+ readonly role: 'tool';
968
+ readonly content: Array<HarnessV1ToolResultPart | HarnessV1ToolApprovalResponsePart>;
969
+ readonly at?: string;
970
+ readonly harnessMetadata?: HarnessV1Metadata;
960
971
  };
961
972
  /**
962
973
  * A persisted harness message using V4 prompt content shapes and metadata
963
974
  * scoped to the adapter that produced it.
964
975
  */
965
976
  type HarnessV1Message = HarnessV1UserMessage | HarnessV1AssistantMessage | HarnessV1ToolMessage;
966
-
977
+ //#endregion
978
+ //#region src/v1/harness-v1-tool-filtering.d.ts
967
979
  type HarnessV1BuiltinToolFiltering = {
968
- mode: 'allow';
969
- toolNames: string[];
980
+ mode: 'allow';
981
+ toolNames: string[];
970
982
  } | {
971
- mode: 'deny';
972
- toolNames: string[];
983
+ mode: 'deny';
984
+ toolNames: string[];
973
985
  };
974
- declare function isHarnessV1BuiltinToolIncluded(input: {
975
- toolName: string;
976
- toolFiltering: HarnessV1BuiltinToolFiltering | undefined;
986
+ export declare function isHarnessV1BuiltinToolIncluded(input: {
987
+ toolName: string;
988
+ toolFiltering: HarnessV1BuiltinToolFiltering | undefined;
977
989
  }): boolean;
978
- declare function getHarnessV1BuiltinToolFilteringDenialReason(input: {
979
- toolName: string;
990
+ export declare function getHarnessV1BuiltinToolFilteringDenialReason(input: {
991
+ toolName: string;
980
992
  }): string;
981
-
993
+ //#endregion
994
+ //#region src/v1/harness-v1-session.d.ts
982
995
  /**
983
996
  * Options passed to `HarnessV1.doStart`.
984
997
  *
@@ -987,101 +1000,101 @@ declare function getHarnessV1BuiltinToolFilteringDenialReason(input: {
987
1000
  * calling the adapter, so adapters never need to derive provider-specific paths.
988
1001
  */
989
1002
  type HarnessV1StartOptions = {
990
- /**
991
- * Additional normalized HTTP headers to send with model requests.
992
- */
993
- readonly headers?: Readonly<Record<string, string>>;
994
- /**
995
- * Stable identifier for this harness session. Used as the underlying
996
- * resource name where the adapter has a notion of a named session
997
- * (sandbox name, native session id, …).
998
- */
999
- readonly sessionId: string;
1000
- /**
1001
- * Optional resume payload returned by a prior session lifecycle method. When
1002
- * provided, the adapter should resume the existing session before accepting a
1003
- * new prompt or continuing a nested unfinished turn.
1004
- */
1005
- readonly resumeFrom?: HarnessV1ResumeSessionState;
1006
- /**
1007
- * Optional continuation payload returned by `doSuspendTurn`, or nested in
1008
- * `resumeFrom`. When provided, the adapter should resume the existing session
1009
- * in a shape ready for `doContinueTurn` rather than for a fresh prompt.
1010
- */
1011
- readonly continueFrom?: HarnessV1ContinueTurnState;
1012
- /**
1013
- * Approval policy for built-in adapter-native tool use. Custom host-executed
1014
- * tools are approved by the framework before results are submitted back to
1015
- * the adapter.
1016
- */
1017
- readonly permissionMode?: HarnessV1PermissionMode;
1018
- /**
1019
- * Adapter-native built-in tools that should be available for this session.
1020
- * Custom host-executed tools are filtered by the framework before they reach
1021
- * the adapter.
1022
- */
1023
- readonly builtinToolFiltering?: HarnessV1BuiltinToolFiltering;
1024
- /**
1025
- * Signal that aborts startup. The adapter must propagate cancellation to
1026
- * any spawned processes or network calls.
1027
- */
1028
- readonly abortSignal?: AbortSignal;
1029
- /**
1030
- * Diagnostics wiring. The framework populates this; the adapter only
1031
- * forwards `observability.onDiagnostic` into its `SandboxChannel` and
1032
- * `observability.debug` into the bridge `start` message. Absent when the
1033
- * consumer has not enabled diagnostics.
1034
- */
1035
- readonly observability?: HarnessV1Observability;
1036
- /**
1037
- * Sandbox session the adapter operates against. Network sandbox sessions
1038
- * expose optional infrastructure capabilities for bridge wiring; caller-
1039
- * provided basic sandbox sessions expose only filesystem and process APIs.
1040
- * Adapters must not stop or destroy the sandbox themselves.
1041
- */
1042
- readonly sandboxSession: HarnessV1NetworkSandboxSession | Experimental_SandboxSession;
1043
- /**
1044
- * Absolute path the adapter runs the agent in for this session. Composed
1045
- * underneath the sandbox's resolved default working directory and created
1046
- * before `doStart`.
1047
- */
1048
- readonly sessionWorkDir: string;
1003
+ /**
1004
+ * Additional normalized HTTP headers to send with model requests.
1005
+ */
1006
+ readonly headers?: Readonly<Record<string, string>>;
1007
+ /**
1008
+ * Stable identifier for this harness session. Used as the underlying
1009
+ * resource name where the adapter has a notion of a named session
1010
+ * (sandbox name, native session id, …).
1011
+ */
1012
+ readonly sessionId: string;
1013
+ /**
1014
+ * Optional resume payload returned by a prior session lifecycle method. When
1015
+ * provided, the adapter should resume the existing session before accepting a
1016
+ * new prompt or continuing a nested unfinished turn.
1017
+ */
1018
+ readonly resumeFrom?: HarnessV1ResumeSessionState;
1019
+ /**
1020
+ * Optional continuation payload returned by `doSuspendTurn`, or nested in
1021
+ * `resumeFrom`. When provided, the adapter should resume the existing session
1022
+ * in a shape ready for `doContinueTurn` rather than for a fresh prompt.
1023
+ */
1024
+ readonly continueFrom?: HarnessV1ContinueTurnState;
1025
+ /**
1026
+ * Approval policy for built-in adapter-native tool use. Custom host-executed
1027
+ * tools are approved by the framework before results are submitted back to
1028
+ * the adapter.
1029
+ */
1030
+ readonly permissionMode?: HarnessV1PermissionMode;
1031
+ /**
1032
+ * Adapter-native built-in tools that should be available for this session.
1033
+ * Custom host-executed tools are filtered by the framework before they reach
1034
+ * the adapter.
1035
+ */
1036
+ readonly builtinToolFiltering?: HarnessV1BuiltinToolFiltering;
1037
+ /**
1038
+ * Signal that aborts startup. The adapter must propagate cancellation to
1039
+ * any spawned processes or network calls.
1040
+ */
1041
+ readonly abortSignal?: AbortSignal;
1042
+ /**
1043
+ * Diagnostics wiring. The framework populates this; the adapter only
1044
+ * forwards `observability.onDiagnostic` into its `SandboxChannel` and
1045
+ * `observability.debug` into the bridge `start` message. Absent when the
1046
+ * consumer has not enabled diagnostics.
1047
+ */
1048
+ readonly observability?: HarnessV1Observability;
1049
+ /**
1050
+ * Sandbox session the adapter operates against. Network sandbox sessions
1051
+ * expose optional infrastructure capabilities for bridge wiring; caller-
1052
+ * provided basic sandbox sessions expose only filesystem and process APIs.
1053
+ * Adapters must not stop or destroy the sandbox themselves.
1054
+ */
1055
+ readonly sandboxSession: HarnessV1NetworkSandboxSession | Experimental_SandboxSession;
1056
+ /**
1057
+ * Absolute path the adapter runs the agent in for this session. Composed
1058
+ * underneath the sandbox's resolved default working directory and created
1059
+ * before `doStart`.
1060
+ */
1061
+ readonly sessionWorkDir: string;
1049
1062
  };
1050
1063
  /**
1051
1064
  * Result of `HarnessV1Session.doReadHistory`.
1052
1065
  */
1053
1066
  type HarnessV1ReadHistoryResult = {
1054
- readonly messages: ReadonlyArray<HarnessV1Message>;
1055
- /** Opaque position; pass back as `since` to read only what follows. */
1056
- readonly cursor: string;
1067
+ readonly messages: ReadonlyArray<HarnessV1Message>;
1068
+ /** Opaque position; pass back as `since` to read only what follows. */
1069
+ readonly cursor: string;
1057
1070
  };
1058
1071
  /**
1059
1072
  * Options passed to `HarnessV1Session.doPromptTurn`.
1060
1073
  */
1061
1074
  type HarnessV1PromptTurnOptions = HarnessV1TurnSettings & {
1062
- /**
1063
- * Fresh input for this turn — either a plain string or a single
1064
- * `ModelMessage`. The harness session owns its own conversation history,
1065
- * so prior turns are never replayed across the contract.
1066
- */
1067
- readonly prompt: HarnessV1Prompt;
1068
- /**
1069
- * Response format requested for this turn. Adapters that cannot honor a
1070
- * JSON response format must throw `HarnessCapabilityUnsupportedError`.
1071
- */
1072
- readonly responseFormat?: HarnessV1ResponseFormat;
1073
- /**
1074
- * Signal that aborts the in-flight turn. The adapter must cancel any
1075
- * underlying work and resolve `done` (with an error if appropriate).
1076
- */
1077
- readonly abortSignal?: AbortSignal;
1078
- /**
1079
- * Callback invoked once for each event the adapter produces during the
1080
- * turn. The adapter is responsible for the ordering and completeness of
1081
- * events. `done` resolves once the adapter has emitted all events for the
1082
- * turn (success or failure).
1083
- */
1084
- readonly emit: (event: HarnessV1StreamPart) => void;
1075
+ /**
1076
+ * Fresh input for this turn — either a plain string or a single
1077
+ * `ModelMessage`. The harness session owns its own conversation history,
1078
+ * so prior turns are never replayed across the contract.
1079
+ */
1080
+ readonly prompt: HarnessV1Prompt;
1081
+ /**
1082
+ * Response format requested for this turn. Adapters that cannot honor a
1083
+ * JSON response format must throw `HarnessCapabilityUnsupportedError`.
1084
+ */
1085
+ readonly responseFormat?: HarnessV1ResponseFormat;
1086
+ /**
1087
+ * Signal that aborts the in-flight turn. The adapter must cancel any
1088
+ * underlying work and resolve `done` (with an error if appropriate).
1089
+ */
1090
+ readonly abortSignal?: AbortSignal;
1091
+ /**
1092
+ * Callback invoked once for each event the adapter produces during the
1093
+ * turn. The adapter is responsible for the ordering and completeness of
1094
+ * events. `done` resolves once the adapter has emitted all events for the
1095
+ * turn (success or failure).
1096
+ */
1097
+ readonly emit: (event: HarnessV1StreamPart) => void;
1085
1098
  };
1086
1099
  /**
1087
1100
  * Options passed to `HarnessV1Session.doContinueTurn`.
@@ -1091,21 +1104,21 @@ type HarnessV1PromptTurnOptions = HarnessV1TurnSettings & {
1091
1104
  * that was previously suspended temporarily, e.g. by the workflow slice loop.
1092
1105
  */
1093
1106
  type HarnessV1ContinueTurnOptions = HarnessV1TurnSettings & {
1094
- /**
1095
- * Response format of the in-flight turn. Rerun-based adapters use this when
1096
- * reconstructing the turn; attach-based adapters may ignore it.
1097
- */
1098
- readonly responseFormat?: HarnessV1ResponseFormat;
1099
- /**
1100
- * Signal that aborts the continued turn. The adapter must cancel any
1101
- * underlying work and resolve `done` (with an error if appropriate).
1102
- */
1103
- readonly abortSignal?: AbortSignal;
1104
- /**
1105
- * Callback invoked once for each event the adapter produces while the
1106
- * continued turn runs. Same contract as `doPromptTurn`'s `emit`.
1107
- */
1108
- readonly emit: (event: HarnessV1StreamPart) => void;
1107
+ /**
1108
+ * Response format of the in-flight turn. Rerun-based adapters use this when
1109
+ * reconstructing the turn; attach-based adapters may ignore it.
1110
+ */
1111
+ readonly responseFormat?: HarnessV1ResponseFormat;
1112
+ /**
1113
+ * Signal that aborts the continued turn. The adapter must cancel any
1114
+ * underlying work and resolve `done` (with an error if appropriate).
1115
+ */
1116
+ readonly abortSignal?: AbortSignal;
1117
+ /**
1118
+ * Callback invoked once for each event the adapter produces while the
1119
+ * continued turn runs. Same contract as `doPromptTurn`'s `emit`.
1120
+ */
1121
+ readonly emit: (event: HarnessV1StreamPart) => void;
1109
1122
  };
1110
1123
  /**
1111
1124
  * Active harness session, returned by `HarnessV1.doStart`.
@@ -1116,121 +1129,122 @@ type HarnessV1ContinueTurnOptions = HarnessV1TurnSettings & {
1116
1129
  * instance via `doDetach`, `doStop`, or `doDestroy`.
1117
1130
  */
1118
1131
  type HarnessV1Session = {
1119
- /**
1120
- * Stable identifier for this session. Same value the host passed in via
1121
- * `HarnessV1StartOptions.sessionId`.
1122
- */
1123
- readonly sessionId: string;
1124
- /**
1125
- * Whether this session was created from `resumeFrom` or `continueFrom`. Fresh
1126
- * sessions report `false`; resumed sessions report `true`.
1127
- */
1128
- readonly isResume: boolean;
1129
- /**
1130
- * Run one prompt turn. Returns a control handle the host uses to feed
1131
- * tool results, approvals, and user messages back into the turn while it
1132
- * is in flight. The handle's `done` promise resolves when the turn ends.
1133
- */
1134
- doPromptTurn(options: HarnessV1PromptTurnOptions): PromiseLike<HarnessV1PromptControl>;
1135
- /**
1136
- * Request that the underlying runtime compact its context. The runtime owns
1137
- * the compaction — the harness neither implements nor schedules it; this is
1138
- * only the trigger. When compaction completes, the adapter surfaces a
1139
- * `compaction` stream part on the next/active turn.
1140
- *
1141
- * Required, but not every runtime can honour it: adapters whose transport
1142
- * exposes no manual compaction (e.g. Codex over `codex exec`, which still
1143
- * auto-compacts on its own) throw `HarnessCapabilityUnsupportedError`.
1144
- * `customInstructions`, when supported, steer the compaction summary.
1145
- */
1146
- doCompact(customInstructions?: string): PromiseLike<void>;
1147
- /**
1148
- * Read the conversation history the runtime itself persisted, normalized
1149
- * to `HarnessV1Message`.
1150
- *
1151
- * The session's history can grow outside the harness contract: the same
1152
- * runtime conversation may be continued interactively (`claude --resume`),
1153
- * by another process, or before this session attached. Hosts that render a
1154
- * continuous record of the conversation — not just the turns they drove —
1155
- * need to read that history back, and the runtime's own store is the only
1156
- * source that has it. The adapter owns its runtime's persistence format,
1157
- * so the read belongs here rather than in every host.
1158
- *
1159
- * `since` is the `cursor` from a previous read; the result then contains
1160
- * only messages recorded after it. The cursor is adapter-owned and opaque
1161
- * to the host.
1162
- *
1163
- * Optional capability: adapters that cannot read their runtime's store
1164
- * omit the method entirely, and the agent surfaces that as
1165
- * `HarnessCapabilityUnsupportedError`. An adapter that implements it but
1166
- * cannot reach the store from the current environment (e.g. it lives
1167
- * inside a remote sandbox) throws `HarnessHistoryUnavailableError`. A
1168
- * conversation with no recorded messages yet is not an error — it resolves
1169
- * to an empty `messages` array.
1170
- */
1171
- doReadHistory?(options: {
1172
- readonly since?: string;
1173
- }): PromiseLike<HarnessV1ReadHistoryResult>;
1174
- /**
1175
- * Continue the in-flight turn **without a new user prompt**, returning the
1176
- * same control surface as `doPromptTurn`. Used to keep consuming a turn that
1177
- * was suspended at a process boundary (the workflow slice loop), after the
1178
- * session itself has been resumed via `doStart({ continueFrom })`:
1179
- *
1180
- * - When the runtime's turn is still live and reachable (bridge `attach` /
1181
- * `replay`), the adapter subscribes to its events and resolves `done` on
1182
- * the turn's `finish` — **without** re-driving it. Lossless.
1183
- * - When the live turn is gone (bridge respawned `rerun`, or a host-resident
1184
- * runtime like Pi whose turn cannot survive its process), the adapter
1185
- * re-drives the runtime's own thread from its persisted state. Lossy: work
1186
- * in flight at the suspension is recomputed.
1187
- *
1188
- * Required on every adapter. The behaviour an adapter can guarantee follows
1189
- * from its architecture; the contract is uniform.
1190
- */
1191
- doContinueTurn(options: HarnessV1ContinueTurnOptions): PromiseLike<HarnessV1PromptControl>;
1192
- /**
1193
- * Gracefully freeze the active turn **at a precise cursor while keeping the
1194
- * runtime alive**, returning the continuation payload.
1195
- *
1196
- * This is the slice-boundary primitive. The adapter stops host-side
1197
- * consumption of the in-flight turn without telling the runtime to stop:
1198
- * for a bridge adapter it closes the host socket (the bridge keeps the turn
1199
- * running and accumulates events for replay) and resolves the active
1200
- * `doPromptTurn`/`doContinueTurn` `done` **cleanly** (not as an error) once buffered
1201
- * events have drained, so the cursor in the returned state equals the last
1202
- * event delivered to the host — guaranteeing the next slice's attach replays
1203
- * with no gap and no duplicate. A host-resident adapter (Pi) cannot keep its
1204
- * turn alive, so it persists what it can and the in-flight tail is recomputed
1205
- * on continue.
1206
- *
1207
- * Like `doDetach`, the sandbox/runtime is left running. Unlike `doDetach`,
1208
- * this is for an active turn at a slice boundary rather than a between-turn
1209
- * session handoff. Required on every adapter.
1210
- */
1211
- doSuspendTurn(): PromiseLike<HarnessV1ContinueTurnState>;
1212
- /**
1213
- * Detach from the underlying runtime without tearing it down, returning a
1214
- * payload the host can later pass to
1215
- * `HarnessV1.doStart({ resumeFrom })` to reconnect before a new turn. After
1216
- * `doDetach`, no further methods on this session instance may be called.
1217
- *
1218
- * Required. Adapters that cannot keep a live runtime parked still return the
1219
- * best resume session state they can while leaving the sandbox running.
1220
- */
1221
- doDetach(): PromiseLike<HarnessV1ResumeSessionState>;
1222
- /**
1223
- * Persist enough state to resume later, then stop the underlying runtime.
1224
- * After `doStop`, no further methods on this session instance may be called.
1225
- */
1226
- doStop(): PromiseLike<HarnessV1ResumeSessionState>;
1227
- /**
1228
- * Stop the underlying runtime without returning lifecycle state. After
1229
- * `doDestroy`, no further methods on this session instance may be called.
1230
- */
1231
- doDestroy(): PromiseLike<void>;
1132
+ /**
1133
+ * Stable identifier for this session. Same value the host passed in via
1134
+ * `HarnessV1StartOptions.sessionId`.
1135
+ */
1136
+ readonly sessionId: string;
1137
+ /**
1138
+ * Whether this session was created from `resumeFrom` or `continueFrom`. Fresh
1139
+ * sessions report `false`; resumed sessions report `true`.
1140
+ */
1141
+ readonly isResume: boolean;
1142
+ /**
1143
+ * Run one prompt turn. Returns a control handle the host uses to feed
1144
+ * tool results, approvals, and user messages back into the turn while it
1145
+ * is in flight. The handle's `done` promise resolves when the turn ends.
1146
+ */
1147
+ doPromptTurn(options: HarnessV1PromptTurnOptions): PromiseLike<HarnessV1PromptControl>;
1148
+ /**
1149
+ * Request that the underlying runtime compact its context. The runtime owns
1150
+ * the compaction — the harness neither implements nor schedules it; this is
1151
+ * only the trigger. When compaction completes, the adapter surfaces a
1152
+ * `compaction` stream part on the next/active turn.
1153
+ *
1154
+ * Required, but not every runtime can honour it: adapters whose transport
1155
+ * exposes no manual compaction (e.g. Codex over `codex exec`, which still
1156
+ * auto-compacts on its own) throw `HarnessCapabilityUnsupportedError`.
1157
+ * `customInstructions`, when supported, steer the compaction summary.
1158
+ */
1159
+ doCompact(customInstructions?: string): PromiseLike<void>;
1160
+ /**
1161
+ * Read the conversation history the runtime itself persisted, normalized
1162
+ * to `HarnessV1Message`.
1163
+ *
1164
+ * The session's history can grow outside the harness contract: the same
1165
+ * runtime conversation may be continued interactively (`claude --resume`),
1166
+ * by another process, or before this session attached. Hosts that render a
1167
+ * continuous record of the conversation — not just the turns they drove —
1168
+ * need to read that history back, and the runtime's own store is the only
1169
+ * source that has it. The adapter owns its runtime's persistence format,
1170
+ * so the read belongs here rather than in every host.
1171
+ *
1172
+ * `since` is the `cursor` from a previous read; the result then contains
1173
+ * only messages recorded after it. The cursor is adapter-owned and opaque
1174
+ * to the host.
1175
+ *
1176
+ * Optional capability: adapters that cannot read their runtime's store
1177
+ * omit the method entirely, and the agent surfaces that as
1178
+ * `HarnessCapabilityUnsupportedError`. An adapter that implements it but
1179
+ * cannot reach the store from the current environment (e.g. it lives
1180
+ * inside a remote sandbox) throws `HarnessHistoryUnavailableError`. A
1181
+ * conversation with no recorded messages yet is not an error — it resolves
1182
+ * to an empty `messages` array.
1183
+ */
1184
+ doReadHistory?(options: {
1185
+ readonly since?: string;
1186
+ }): PromiseLike<HarnessV1ReadHistoryResult>;
1187
+ /**
1188
+ * Continue the in-flight turn **without a new user prompt**, returning the
1189
+ * same control surface as `doPromptTurn`. Used to keep consuming a turn that
1190
+ * was suspended at a process boundary (the workflow slice loop), after the
1191
+ * session itself has been resumed via `doStart({ continueFrom })`:
1192
+ *
1193
+ * - When the runtime's turn is still live and reachable (bridge `attach` /
1194
+ * `replay`), the adapter subscribes to its events and resolves `done` on
1195
+ * the turn's `finish` — **without** re-driving it. Lossless.
1196
+ * - When the live turn is gone (bridge respawned `rerun`, or a host-resident
1197
+ * runtime like Pi whose turn cannot survive its process), the adapter
1198
+ * re-drives the runtime's own thread from its persisted state. Lossy: work
1199
+ * in flight at the suspension is recomputed.
1200
+ *
1201
+ * Required on every adapter. The behaviour an adapter can guarantee follows
1202
+ * from its architecture; the contract is uniform.
1203
+ */
1204
+ doContinueTurn(options: HarnessV1ContinueTurnOptions): PromiseLike<HarnessV1PromptControl>;
1205
+ /**
1206
+ * Gracefully freeze the active turn **at a precise cursor while keeping the
1207
+ * runtime alive**, returning the continuation payload.
1208
+ *
1209
+ * This is the slice-boundary primitive. The adapter stops host-side
1210
+ * consumption of the in-flight turn without telling the runtime to stop:
1211
+ * for a bridge adapter it closes the host socket (the bridge keeps the turn
1212
+ * running and accumulates events for replay) and resolves the active
1213
+ * `doPromptTurn`/`doContinueTurn` `done` **cleanly** (not as an error) once buffered
1214
+ * events have drained, so the cursor in the returned state equals the last
1215
+ * event delivered to the host — guaranteeing the next slice's attach replays
1216
+ * with no gap and no duplicate. A host-resident adapter (Pi) cannot keep its
1217
+ * turn alive, so it persists what it can and the in-flight tail is recomputed
1218
+ * on continue.
1219
+ *
1220
+ * Like `doDetach`, the sandbox/runtime is left running. Unlike `doDetach`,
1221
+ * this is for an active turn at a slice boundary rather than a between-turn
1222
+ * session handoff. Required on every adapter.
1223
+ */
1224
+ doSuspendTurn(): PromiseLike<HarnessV1ContinueTurnState>;
1225
+ /**
1226
+ * Detach from the underlying runtime without tearing it down, returning a
1227
+ * payload the host can later pass to
1228
+ * `HarnessV1.doStart({ resumeFrom })` to reconnect before a new turn. After
1229
+ * `doDetach`, no further methods on this session instance may be called.
1230
+ *
1231
+ * Required. Adapters that cannot keep a live runtime parked still return the
1232
+ * best resume session state they can while leaving the sandbox running.
1233
+ */
1234
+ doDetach(): PromiseLike<HarnessV1ResumeSessionState>;
1235
+ /**
1236
+ * Persist enough state to resume later, then stop the underlying runtime.
1237
+ * After `doStop`, no further methods on this session instance may be called.
1238
+ */
1239
+ doStop(): PromiseLike<HarnessV1ResumeSessionState>;
1240
+ /**
1241
+ * Stop the underlying runtime without returning lifecycle state. After
1242
+ * `doDestroy`, no further methods on this session instance may be called.
1243
+ */
1244
+ doDestroy(): PromiseLike<void>;
1232
1245
  };
1233
-
1246
+ //#endregion
1247
+ //#region src/v1/harness-v1.d.ts
1234
1248
  /**
1235
1249
  * Versioned specification for a harness adapter — the integration point for
1236
1250
  * one third-party coding-agent runtime (Claude Code, Codex, …).
@@ -1245,73 +1259,74 @@ type HarnessV1Session = {
1245
1259
  * capability.
1246
1260
  */
1247
1261
  type HarnessV1<TBuiltinTools extends ToolSet = ToolSet> = {
1248
- /**
1249
- * Spec version this adapter implements. Always the literal `'harness-v1'`.
1250
- */
1251
- readonly specificationVersion: 'harness-v1';
1252
- /**
1253
- * Stable identifier for this harness, used as the key inside
1254
- * `HarnessV1Metadata` objects. Conventionally a kebab-case slug matching
1255
- * the package name (`'claude-code'`, `'codex'`).
1256
- */
1257
- readonly harnessId: string;
1258
- /**
1259
- * Tools the adapter's underlying runtime exposes natively, as a `ToolSet`
1260
- * keyed by what the bridge emits on `tool-call` events
1261
- * (`commonName ?? nativeName`). Each entry is a `HarnessV1BuiltinTool`
1262
- * (a `Tool` plus harness-specific `nativeName` / `commonName` metadata).
1263
- *
1264
- * The agent merges this with consumer-supplied user tools when validating
1265
- * inbound tool calls and when typing the consumer-facing stream.
1266
- */
1267
- readonly builtinTools: TBuiltinTools;
1268
- /**
1269
- * Whether the adapter can emit approval requests for built-in tools when
1270
- * `permissionMode` is not `'allow-all'`.
1271
- *
1272
- * Custom host-executed tool approvals are handled by `HarnessAgent`, so this
1273
- * only describes adapter-native tool approval support.
1274
- */
1275
- readonly supportsBuiltinToolApprovals?: boolean;
1276
- /**
1277
- * Whether the adapter can prevent its underlying runtime from seeing or
1278
- * calling inactive built-in tools for every tool in `builtinTools`.
1279
- *
1280
- * Adapters without native filtering can still support `activeTools` and
1281
- * `inactiveTools` for built-ins when `supportsBuiltinToolApprovals` is
1282
- * `true`: the framework routes inactive built-in tool calls through the
1283
- * approval path and auto-denies them before they execute.
1284
- */
1285
- readonly supportsBuiltinToolFiltering?: boolean;
1286
- /**
1287
- * Optional schema for the adapter-defined `data` payload returned by session
1288
- * lifecycle methods. When present, the adapter promises that exported state
1289
- * validated by this schema can be re-imported in a future
1290
- * `doStart({ resumeFrom })` or `doStart({ continueFrom })` call.
1291
- */
1292
- readonly lifecycleStateSchema?: FlexibleSchema<unknown>;
1293
- /**
1294
- * Optional bootstrap recipe. When defined, the harness session manager
1295
- * computes a stable identity from the recipe, passes it (along with a
1296
- * one-time recipe-application hook) to the sandbox provider, and applies
1297
- * the recipe idempotently after the provider returns the handle.
1298
- *
1299
- * Adapters with no bootstrap needs omit this. Adapters that need to install
1300
- * deps or ship bridge files into the sandbox declare them here so the
1301
- * provider can cache the result across sessions via snapshots when
1302
- * supported.
1303
- */
1304
- readonly getBootstrap?: (options?: {
1305
- abortSignal?: AbortSignal;
1306
- }) => PromiseLike<HarnessV1Bootstrap>;
1307
- /**
1308
- * Start a fresh session, resume a parked session via `resumeFrom`, or resume
1309
- * a suspended turn via `continueFrom`. The host then issues prompts against
1310
- * the returned session, ending with `doDetach`, `doStop`, or `doDestroy`.
1311
- */
1312
- doStart(options: HarnessV1StartOptions): PromiseLike<HarnessV1Session>;
1262
+ /**
1263
+ * Spec version this adapter implements. Always the literal `'harness-v1'`.
1264
+ */
1265
+ readonly specificationVersion: 'harness-v1';
1266
+ /**
1267
+ * Stable identifier for this harness, used as the key inside
1268
+ * `HarnessV1Metadata` objects. Conventionally a kebab-case slug matching
1269
+ * the package name (`'claude-code'`, `'codex'`).
1270
+ */
1271
+ readonly harnessId: string;
1272
+ /**
1273
+ * Tools the adapter's underlying runtime exposes natively, as a `ToolSet`
1274
+ * keyed by what the bridge emits on `tool-call` events
1275
+ * (`commonName ?? nativeName`). Each entry is a `HarnessV1BuiltinTool`
1276
+ * (a `Tool` plus harness-specific `nativeName` / `commonName` metadata).
1277
+ *
1278
+ * The agent merges this with consumer-supplied user tools when validating
1279
+ * inbound tool calls and when typing the consumer-facing stream.
1280
+ */
1281
+ readonly builtinTools: TBuiltinTools;
1282
+ /**
1283
+ * Whether the adapter can emit approval requests for built-in tools when
1284
+ * `permissionMode` is not `'allow-all'`.
1285
+ *
1286
+ * Custom host-executed tool approvals are handled by `HarnessAgent`, so this
1287
+ * only describes adapter-native tool approval support.
1288
+ */
1289
+ readonly supportsBuiltinToolApprovals?: boolean;
1290
+ /**
1291
+ * Whether the adapter can prevent its underlying runtime from seeing or
1292
+ * calling inactive built-in tools for every tool in `builtinTools`.
1293
+ *
1294
+ * Adapters without native filtering can still support `activeTools` and
1295
+ * `inactiveTools` for built-ins when `supportsBuiltinToolApprovals` is
1296
+ * `true`: the framework routes inactive built-in tool calls through the
1297
+ * approval path and auto-denies them before they execute.
1298
+ */
1299
+ readonly supportsBuiltinToolFiltering?: boolean;
1300
+ /**
1301
+ * Optional schema for the adapter-defined `data` payload returned by session
1302
+ * lifecycle methods. When present, the adapter promises that exported state
1303
+ * validated by this schema can be re-imported in a future
1304
+ * `doStart({ resumeFrom })` or `doStart({ continueFrom })` call.
1305
+ */
1306
+ readonly lifecycleStateSchema?: FlexibleSchema<unknown>;
1307
+ /**
1308
+ * Optional bootstrap recipe. When defined, the harness session manager
1309
+ * computes a stable identity from the recipe, passes it (along with a
1310
+ * one-time recipe-application hook) to the sandbox provider, and applies
1311
+ * the recipe idempotently after the provider returns the handle.
1312
+ *
1313
+ * Adapters with no bootstrap needs omit this. Adapters that need to install
1314
+ * deps or ship bridge files into the sandbox declare them here so the
1315
+ * provider can cache the result across sessions via snapshots when
1316
+ * supported.
1317
+ */
1318
+ readonly getBootstrap?: (options?: {
1319
+ abortSignal?: AbortSignal;
1320
+ }) => PromiseLike<HarnessV1Bootstrap>;
1321
+ /**
1322
+ * Start a fresh session, resume a parked session via `resumeFrom`, or resume
1323
+ * a suspended turn via `continueFrom`. The host then issues prompts against
1324
+ * the returned session, ending with `doDetach`, `doStop`, or `doDestroy`.
1325
+ */
1326
+ doStart(options: HarnessV1StartOptions): PromiseLike<HarnessV1Session>;
1313
1327
  };
1314
-
1328
+ //#endregion
1329
+ //#region src/v1/harness-authentication.d.ts
1315
1330
  /**
1316
1331
  * Authentication-related environment variables supplied directly to a harness.
1317
1332
  *
@@ -1323,10 +1338,9 @@ type HarnessV1AuthenticationEnvironment = Readonly<Record<string, string>>;
1323
1338
  * Authentication options shared by harness adapters. Adapter choices must be
1324
1339
  * a non-empty union of concrete string values.
1325
1340
  */
1326
- type HarnessV1Authentication<ADAPTER_CHOICES extends string = 'direct'> = [
1327
- ADAPTER_CHOICES
1328
- ] extends [never] ? never : string extends ADAPTER_CHOICES ? never : 'auto' | 'ai-gateway' | ADAPTER_CHOICES | HarnessV1AuthenticationEnvironment;
1329
-
1341
+ type HarnessV1Authentication<ADAPTER_CHOICES extends string = 'direct'> = [ADAPTER_CHOICES] extends [never] ? never : string extends ADAPTER_CHOICES ? never : 'auto' | 'ai-gateway' | ADAPTER_CHOICES | HarnessV1AuthenticationEnvironment;
1342
+ //#endregion
1343
+ //#region src/v1/harness-v1-credential-forwarding.d.ts
1330
1344
  /**
1331
1345
  * Customizes a credential value immediately before a harness adapter forwards
1332
1346
  * it into a sandbox process.
@@ -1336,24 +1350,26 @@ type HarnessV1Authentication<ADAPTER_CHOICES extends string = 'direct'> = [
1336
1350
  * otherwise access in the host process.
1337
1351
  */
1338
1352
  type HarnessV1CredentialForwarding = (options: {
1339
- /**
1340
- * The credential value that the adapter would otherwise forward. This is a
1341
- * generated sandbox placeholder when credential brokering is available and
1342
- * the real credential otherwise. Use `isSandboxCredentialPlaceholder` from
1343
- * `@ai-sdk/harness/utils` to distinguish generated placeholders.
1344
- */
1345
- readonly credential: string;
1346
- /** The environment variable name used to expose the value in the sandbox. */
1347
- readonly environmentVariableName: string;
1353
+ /**
1354
+ * The credential value that the adapter would otherwise forward. This is a
1355
+ * generated sandbox placeholder when credential brokering is available and
1356
+ * the real credential otherwise. Use `isSandboxCredentialPlaceholder` from
1357
+ * `@ai-sdk/harness/utils` to distinguish generated placeholders.
1358
+ */
1359
+ readonly credential: string;
1360
+ /** The environment variable name used to expose the value in the sandbox. */
1361
+ readonly environmentVariableName: string;
1348
1362
  }) => string | PromiseLike<string>;
1349
-
1363
+ //#endregion
1364
+ //#region src/v1/harness-v1-mint-bridge-token.d.ts
1350
1365
  /**
1351
1366
  * Creates the authentication token a bridge-backed harness adapter uses to
1352
1367
  * secure its sandbox bridge channel for one session. Defaults to a random
1353
1368
  * 32-byte hexadecimal token when omitted.
1354
1369
  */
1355
1370
  type HarnessV1MintBridgeTokenCallback = (sandboxId: string) => string;
1356
-
1371
+ //#endregion
1372
+ //#region src/v1/harness-v1-builtin-tool.d.ts
1357
1373
  /**
1358
1374
  * Cross-harness vocabulary of common built-in tool names with their baseline
1359
1375
  * input schemas. Adapters that declare a built-in with one of these
@@ -1363,68 +1379,68 @@ type HarnessV1MintBridgeTokenCallback = (sandboxId: string) => string;
1363
1379
  * Used both as runtime values (spread into `ToolSet`s for inspection) and as
1364
1380
  * a vocabulary source — `HarnessV1BuiltinToolName` is derived from its keys.
1365
1381
  */
1366
- declare const HARNESS_V1_BUILTIN_TOOLS: {
1367
- readonly read: Tool<{
1368
- file_path: string;
1369
- }, unknown, _ai_sdk_provider_utils.Context>;
1370
- readonly write: Tool<{
1371
- file_path: string;
1372
- content: string;
1373
- }, unknown, _ai_sdk_provider_utils.Context>;
1374
- readonly edit: Tool<{
1375
- file_path: string;
1376
- old_string: string;
1377
- new_string: string;
1378
- }, unknown, _ai_sdk_provider_utils.Context>;
1379
- readonly bash: Tool<{
1380
- command: string;
1381
- }, unknown, _ai_sdk_provider_utils.Context>;
1382
- readonly grep: Tool<{
1383
- pattern: string;
1384
- }, unknown, _ai_sdk_provider_utils.Context>;
1385
- readonly glob: Tool<{
1386
- pattern: string;
1387
- }, unknown, _ai_sdk_provider_utils.Context>;
1388
- readonly webSearch: Tool<{
1389
- query: string;
1390
- }, unknown, _ai_sdk_provider_utils.Context>;
1391
- readonly askUserQuestions: _ai_sdk_provider_utils.FunctionTool<{
1392
- allowPartialAnswers: boolean;
1393
- questions: {
1394
- id: string;
1395
- question: string;
1396
- header?: string | undefined;
1397
- options?: {
1398
- id: string;
1399
- label: string;
1400
- description?: string | undefined;
1401
- preview?: string | undefined;
1402
- }[] | undefined;
1403
- allowMultiple?: boolean | undefined;
1404
- allowFreeForm?: boolean | {
1405
- secret: boolean;
1406
- } | undefined;
1407
- }[];
1408
- }, {
1409
- action: "answered";
1410
- answers: Record<string, {
1411
- optionIds: string[];
1412
- freeform?: string | undefined;
1413
- }>;
1414
- } | {
1415
- action: "partially-answered";
1416
- answers: Record<string, {
1417
- optionIds: string[];
1418
- freeform?: string | undefined;
1419
- }>;
1420
- } | {
1421
- action: "declined";
1422
- } | {
1423
- action: "cancelled";
1382
+ export declare const HARNESS_V1_BUILTIN_TOOLS: {
1383
+ readonly read: Tool<{
1384
+ file_path: string;
1385
+ }, unknown, import("@ai-sdk/provider-utils").Context>;
1386
+ readonly write: Tool<{
1387
+ file_path: string;
1388
+ content: string;
1389
+ }, unknown, import("@ai-sdk/provider-utils").Context>;
1390
+ readonly edit: Tool<{
1391
+ file_path: string;
1392
+ old_string: string;
1393
+ new_string: string;
1394
+ }, unknown, import("@ai-sdk/provider-utils").Context>;
1395
+ readonly bash: Tool<{
1396
+ command: string;
1397
+ }, unknown, import("@ai-sdk/provider-utils").Context>;
1398
+ readonly grep: Tool<{
1399
+ pattern: string;
1400
+ }, unknown, import("@ai-sdk/provider-utils").Context>;
1401
+ readonly glob: Tool<{
1402
+ pattern: string;
1403
+ }, unknown, import("@ai-sdk/provider-utils").Context>;
1404
+ readonly webSearch: Tool<{
1405
+ query: string;
1406
+ }, unknown, import("@ai-sdk/provider-utils").Context>;
1407
+ readonly askUserQuestions: import("@ai-sdk/provider-utils").FunctionTool<{
1408
+ allowPartialAnswers: boolean;
1409
+ questions: {
1410
+ id: string;
1411
+ question: string;
1412
+ header?: string | undefined;
1413
+ options?: {
1414
+ id: string;
1415
+ label: string;
1416
+ description?: string | undefined;
1417
+ preview?: string | undefined;
1418
+ }[] | undefined;
1419
+ allowMultiple?: boolean | undefined;
1420
+ allowFreeForm?: boolean | {
1421
+ secret: boolean;
1422
+ } | undefined;
1423
+ }[];
1424
+ }, {
1425
+ action: "answered";
1426
+ answers: Record<string, {
1427
+ optionIds: string[];
1428
+ freeform?: string | undefined;
1429
+ }>;
1430
+ } | {
1431
+ action: "partially-answered";
1432
+ answers: Record<string, {
1433
+ optionIds: string[];
1434
+ freeform?: string | undefined;
1424
1435
  }>;
1436
+ } | {
1437
+ action: "declined";
1438
+ } | {
1439
+ action: "cancelled";
1440
+ }>;
1425
1441
  };
1426
1442
  type HarnessV1BuiltinToolName = keyof typeof HARNESS_V1_BUILTIN_TOOLS;
1427
- declare const HARNESS_V1_BUILTIN_TOOL_NAMES: ReadonlyArray<HarnessV1BuiltinToolName>;
1443
+ export declare const HARNESS_V1_BUILTIN_TOOL_NAMES: ReadonlyArray<HarnessV1BuiltinToolName>;
1428
1444
  type HarnessV1BuiltinToolUseKind = 'readonly' | 'edit' | 'bash';
1429
1445
  /**
1430
1446
  * A tool that the adapter's underlying runtime exposes natively. Extends the
@@ -1445,19 +1461,16 @@ type HarnessV1BuiltinToolUseKind = 'readonly' | 'edit' | 'bash';
1445
1461
  * (declare the tool with the AI SDK's `tool()` directly).
1446
1462
  */
1447
1463
  type HarnessV1BuiltinTool<INPUT = unknown, OUTPUT = unknown> = Tool<INPUT, OUTPUT, any> & {
1448
- readonly nativeName?: string;
1449
- readonly commonName?: HarnessV1BuiltinToolName;
1450
- readonly toolUseKind?: HarnessV1BuiltinToolUseKind;
1464
+ readonly nativeName?: string;
1465
+ readonly commonName?: HarnessV1BuiltinToolName;
1466
+ readonly toolUseKind?: HarnessV1BuiltinToolUseKind;
1451
1467
  };
1452
1468
  type InputOf<T> = T extends Tool<infer I, any, any> ? I : never;
1453
1469
  type StandardInputOf<N extends HarnessV1BuiltinToolName> = InputOf<(typeof HARNESS_V1_BUILTIN_TOOLS)[N]>;
1454
- type SupersetCheck<TStandard, TAdapter, TOk> = TStandard extends TAdapter ? TOk : [
1455
- 'ERROR: adapter input schema must be a superset of the standard schema',
1456
- {
1457
- expected: TStandard;
1458
- got: TAdapter;
1459
- }
1460
- ];
1470
+ type SupersetCheck<TStandard, TAdapter, TOk> = TStandard extends TAdapter ? TOk : ['ERROR: adapter input schema must be a superset of the standard schema', {
1471
+ expected: TStandard;
1472
+ got: TAdapter;
1473
+ }];
1461
1474
  /**
1462
1475
  * Declare a built-in tool that maps to a cross-harness common name. The
1463
1476
  * adapter's input schema must accept every input the standard schema for
@@ -1468,53 +1481,55 @@ type SupersetCheck<TStandard, TAdapter, TOk> = TStandard extends TAdapter ? TOk
1468
1481
  * which fails the surrounding `as const satisfies ToolSet` assignment and
1469
1482
  * surfaces a readable TypeScript error at the offending entry.
1470
1483
  */
1471
- declare function commonTool<TName extends HarnessV1BuiltinToolName, TInput>(commonName: TName, opts: {
1472
- readonly nativeName: string;
1473
- readonly toolUseKind?: HarnessV1BuiltinToolUseKind;
1474
- readonly description?: string;
1475
- readonly inputSchema: FlexibleSchema<TInput>;
1484
+ export declare function commonTool<TName extends HarnessV1BuiltinToolName, TInput>(commonName: TName, opts: {
1485
+ readonly nativeName: string;
1486
+ readonly toolUseKind?: HarnessV1BuiltinToolUseKind;
1487
+ readonly description?: string;
1488
+ readonly inputSchema: FlexibleSchema<TInput>;
1476
1489
  }): SupersetCheck<StandardInputOf<TName>, TInput, HarnessV1BuiltinTool<TInput>>;
1477
-
1478
- declare const harnessV1QuestionsToolInputSchema: z.ZodObject<{
1479
- allowPartialAnswers: z.ZodBoolean;
1480
- questions: z.ZodArray<z.ZodObject<{
1481
- id: z.ZodString;
1482
- question: z.ZodString;
1483
- header: z.ZodOptional<z.ZodString>;
1484
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
1485
- id: z.ZodString;
1486
- label: z.ZodString;
1487
- description: z.ZodOptional<z.ZodString>;
1488
- preview: z.ZodOptional<z.ZodString>;
1489
- }, z.core.$strip>>>;
1490
- allowMultiple: z.ZodOptional<z.ZodBoolean>;
1491
- allowFreeForm: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
1492
- secret: z.ZodBoolean;
1493
- }, z.core.$strip>]>>;
1494
- }, z.core.$strip>>;
1490
+ //#endregion
1491
+ //#region src/v1/harness-v1-questions-tool.d.ts
1492
+ export declare const harnessV1QuestionsToolInputSchema: z.ZodObject<{
1493
+ allowPartialAnswers: z.ZodBoolean;
1494
+ questions: z.ZodArray<z.ZodObject<{
1495
+ id: z.ZodString;
1496
+ question: z.ZodString;
1497
+ header: z.ZodOptional<z.ZodString>;
1498
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
1499
+ id: z.ZodString;
1500
+ label: z.ZodString;
1501
+ description: z.ZodOptional<z.ZodString>;
1502
+ preview: z.ZodOptional<z.ZodString>;
1503
+ }, z.core.$strip>>>;
1504
+ allowMultiple: z.ZodOptional<z.ZodBoolean>;
1505
+ allowFreeForm: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
1506
+ secret: z.ZodBoolean;
1507
+ }, z.core.$strip>]>>;
1508
+ }, z.core.$strip>>;
1495
1509
  }, z.core.$strip>;
1496
- declare const harnessV1QuestionsToolOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1497
- action: z.ZodLiteral<"answered">;
1498
- answers: z.ZodRecord<z.ZodString, z.ZodObject<{
1499
- optionIds: z.ZodArray<z.ZodString>;
1500
- freeform: z.ZodOptional<z.ZodString>;
1501
- }, z.core.$strip>>;
1510
+ export declare const harnessV1QuestionsToolOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1511
+ action: z.ZodLiteral<"answered">;
1512
+ answers: z.ZodRecord<z.ZodString, z.ZodObject<{
1513
+ optionIds: z.ZodArray<z.ZodString>;
1514
+ freeform: z.ZodOptional<z.ZodString>;
1515
+ }, z.core.$strip>>;
1502
1516
  }, z.core.$strip>, z.ZodObject<{
1503
- action: z.ZodLiteral<"partially-answered">;
1504
- answers: z.ZodRecord<z.ZodString, z.ZodObject<{
1505
- optionIds: z.ZodArray<z.ZodString>;
1506
- freeform: z.ZodOptional<z.ZodString>;
1507
- }, z.core.$strip>>;
1517
+ action: z.ZodLiteral<"partially-answered">;
1518
+ answers: z.ZodRecord<z.ZodString, z.ZodObject<{
1519
+ optionIds: z.ZodArray<z.ZodString>;
1520
+ freeform: z.ZodOptional<z.ZodString>;
1521
+ }, z.core.$strip>>;
1508
1522
  }, z.core.$strip>, z.ZodObject<{
1509
- action: z.ZodLiteral<"declined">;
1523
+ action: z.ZodLiteral<"declined">;
1510
1524
  }, z.core.$strip>, z.ZodObject<{
1511
- action: z.ZodLiteral<"cancelled">;
1525
+ action: z.ZodLiteral<"cancelled">;
1512
1526
  }, z.core.$strip>]>;
1513
1527
  type HarnessV1QuestionsToolInput = z.infer<typeof harnessV1QuestionsToolInputSchema>;
1514
1528
  type HarnessV1QuestionsToolOutput = z.infer<typeof harnessV1QuestionsToolOutputSchema>;
1515
1529
  declare const harnessV1QuestionsTool: FunctionTool<HarnessV1QuestionsToolInput, HarnessV1QuestionsToolOutput>;
1516
1530
  type HarnessV1QuestionsTool = typeof harnessV1QuestionsTool;
1517
-
1531
+ //#endregion
1532
+ //#region src/v1/harness-v1-sandbox-provider.d.ts
1518
1533
  /**
1519
1534
  * Provider that produces network sandbox sessions for harness sessions. Lives at
1520
1535
  * module scope as a stable, synchronous object — analogous to
@@ -1523,126 +1538,131 @@ type HarnessV1QuestionsTool = typeof harnessV1QuestionsTool;
1523
1538
  */
1524
1539
  /** @deprecated Supply a sandbox session to `HarnessAgent.createSession()` instead. */
1525
1540
  interface HarnessV1SandboxProvider {
1526
- readonly specificationVersion: 'harness-sandbox-v1';
1527
- readonly providerId: string;
1541
+ readonly specificationVersion: 'harness-sandbox-v1';
1542
+ readonly providerId: string;
1543
+ /**
1544
+ * Providers should throw `HarnessSandboxAuthenticationError` when sandbox
1545
+ * acquisition fails because credentials are missing, invalid, or not
1546
+ * authorized. This lets framework integrations distinguish configuration
1547
+ * failures from general sandbox infrastructure errors.
1548
+ */
1549
+ readonly createSession: (options?: {
1550
+ /**
1551
+ * Stable per-session identifier. When supplied, the provider names the
1552
+ * underlying resource deterministically so a future call to `resume`
1553
+ * (potentially from a different process) can find the same sandbox.
1554
+ * Omitted from prewarm and other paths that don't need a resumable
1555
+ * resource — in that case the provider falls back to its native
1556
+ * auto-naming.
1557
+ */
1558
+ sessionId?: string;
1559
+ abortSignal?: AbortSignal;
1528
1560
  /**
1529
- * Providers should throw `HarnessSandboxAuthenticationError` when sandbox
1530
- * acquisition fails because credentials are missing, invalid, or not
1531
- * authorized. This lets framework integrations distinguish configuration
1532
- * failures from general sandbox infrastructure errors.
1561
+ * Stable identity for snapshot-based reuse. Providers that support
1562
+ * persistence/snapshots use this as part of the persistent sandbox
1563
+ * name; subsequent calls with the same identity resume from snapshot.
1564
+ *
1565
+ * Ignored when the provider is wrapping a caller-provided sandbox.
1533
1566
  */
1534
- readonly createSession: (options?: {
1535
- /**
1536
- * Stable per-session identifier. When supplied, the provider names the
1537
- * underlying resource deterministically so a future call to `resume`
1538
- * (potentially from a different process) can find the same sandbox.
1539
- * Omitted from prewarm and other paths that don't need a resumable
1540
- * resource — in that case the provider falls back to its native
1541
- * auto-naming.
1542
- */
1543
- sessionId?: string;
1544
- abortSignal?: AbortSignal;
1545
- /**
1546
- * Stable identity for snapshot-based reuse. Providers that support
1547
- * persistence/snapshots use this as part of the persistent sandbox
1548
- * name; subsequent calls with the same identity resume from snapshot.
1549
- *
1550
- * Ignored when the provider is wrapping a caller-provided sandbox.
1551
- */
1552
- identity?: string;
1553
- /**
1554
- * Called exactly once per identity, on fresh creation. Snapshot-capable
1555
- * providers wire this into the platform's one-time-setup hook so the
1556
- * side effects are baked into the snapshot. Providers without snapshot
1557
- * support run it immediately after fresh create.
1558
- *
1559
- * Not called when the provider is wrapping a caller-provided sandbox
1560
- * (the caller owns the sandbox; the framework applies its own
1561
- * idempotent bootstrap post-create instead).
1562
- */
1563
- onFirstCreate?: (session: Experimental_SandboxSession, opts: {
1564
- abortSignal?: AbortSignal;
1565
- }) => Promise<void>;
1566
- }) => PromiseLike<HarnessV1NetworkSandboxSession>;
1567
+ identity?: string;
1567
1568
  /**
1568
- * Reattach to an existing sandbox previously created with the same
1569
- * `sessionId`. Optional — providers that cannot rehydrate by id omit
1570
- * this; the harness throws
1571
- * `HarnessCapabilityUnsupportedError` when resume is attempted against
1572
- * them.
1569
+ * Called exactly once per identity, on fresh creation. Snapshot-capable
1570
+ * providers wire this into the platform's one-time-setup hook so the
1571
+ * side effects are baked into the snapshot. Providers without snapshot
1572
+ * support run it immediately after fresh create.
1573
1573
  *
1574
- * The provider derives the sandbox identifier from `sessionId` using the
1575
- * same deterministic naming scheme it used in `createSession`. Returns a
1576
- * network sandbox session bound to the existing resource.
1574
+ * Not called when the provider is wrapping a caller-provided sandbox
1575
+ * (the caller owns the sandbox; the framework applies its own
1576
+ * idempotent bootstrap post-create instead).
1577
1577
  */
1578
- readonly resumeSession?: (options: {
1579
- sessionId: string;
1580
- abortSignal?: AbortSignal;
1581
- }) => PromiseLike<HarnessV1NetworkSandboxSession>;
1578
+ onFirstCreate?: (session: Experimental_SandboxSession, opts: {
1579
+ abortSignal?: AbortSignal;
1580
+ }) => Promise<void>;
1581
+ }) => PromiseLike<HarnessV1NetworkSandboxSession>;
1582
+ /**
1583
+ * Reattach to an existing sandbox previously created with the same
1584
+ * `sessionId`. Optional — providers that cannot rehydrate by id omit
1585
+ * this; the harness throws
1586
+ * `HarnessCapabilityUnsupportedError` when resume is attempted against
1587
+ * them.
1588
+ *
1589
+ * The provider derives the sandbox identifier from `sessionId` using the
1590
+ * same deterministic naming scheme it used in `createSession`. Returns a
1591
+ * network sandbox session bound to the existing resource.
1592
+ */
1593
+ readonly resumeSession?: (options: {
1594
+ sessionId: string;
1595
+ abortSignal?: AbortSignal;
1596
+ }) => PromiseLike<HarnessV1NetworkSandboxSession>;
1582
1597
  }
1583
-
1598
+ //#endregion
1599
+ //#region src/v1/harness-v1-sandbox-template.d.ts
1584
1600
  type HarnessV1SandboxTemplate = {
1585
- readonly identity: string;
1586
- readonly prepare: (options: {
1587
- readonly session: Experimental_SandboxSession;
1588
- readonly abortSignal?: AbortSignal;
1589
- }) => Promise<void>;
1601
+ readonly identity: string;
1602
+ readonly prepare: (options: {
1603
+ readonly session: Experimental_SandboxSession;
1604
+ readonly abortSignal?: AbortSignal;
1605
+ }) => Promise<void>;
1590
1606
  };
1591
-
1607
+ //#endregion
1608
+ //#region src/v1/harness-v1-sandbox-session-create-options.d.ts
1592
1609
  type HarnessV1SandboxSessionCreateOptions<TProviderOptions extends object> = TProviderOptions & {
1593
- /**
1594
- * Manually assign the ID of a newly created sandbox session. Creation never
1595
- * looks up or resumes an existing session. An existing sandbox resource with
1596
- * the same ID is a creation conflict.
1597
- */
1598
- readonly sandboxId?: string;
1599
- readonly template?: HarnessV1SandboxTemplate;
1600
- readonly abortSignal?: AbortSignal;
1610
+ /**
1611
+ * Manually assign the ID of a newly created sandbox session. Creation never
1612
+ * looks up or resumes an existing session. An existing sandbox resource with
1613
+ * the same ID is a creation conflict.
1614
+ */
1615
+ readonly sandboxId?: string;
1616
+ readonly template?: HarnessV1SandboxTemplate;
1617
+ readonly abortSignal?: AbortSignal;
1601
1618
  };
1602
-
1619
+ //#endregion
1620
+ //#region src/v1/harness-v1-sandbox-session-resume-options.d.ts
1603
1621
  type HarnessV1SandboxSessionResumeOptions<TProviderOptions extends object> = TProviderOptions & {
1604
- /**
1605
- * ID of the existing sandbox session to reattach. Resume never creates a
1606
- * sandbox when the ID cannot be found.
1607
- */
1608
- readonly sandboxId: string;
1609
- readonly abortSignal?: AbortSignal;
1622
+ /**
1623
+ * ID of the existing sandbox session to reattach. Resume never creates a
1624
+ * sandbox when the ID cannot be found.
1625
+ */
1626
+ readonly sandboxId: string;
1627
+ readonly abortSignal?: AbortSignal;
1610
1628
  };
1611
-
1629
+ //#endregion
1630
+ //#region src/v1/harness-session-data-directory-path.d.ts
1612
1631
  /**
1613
1632
  * Return the per-session harness state path under `.agent-runs`. Session IDs
1614
1633
  * occupy one encoded path segment, so path separators and parent-directory
1615
1634
  * references cannot move session data outside the harness state directory.
1616
1635
  */
1617
- declare function harnessSessionDataDirectoryPath({ stateDirectory, sessionId, }: {
1618
- stateDirectory: string;
1619
- sessionId: string;
1636
+ export declare function harnessSessionDataDirectoryPath({ stateDirectory, sessionId }: {
1637
+ stateDirectory: string;
1638
+ sessionId: string;
1620
1639
  }): string;
1621
-
1640
+ //#endregion
1641
+ //#region src/v1/harness-v1-bridge-protocol.d.ts
1622
1642
  /**
1623
1643
  * The subset of a host-defined tool that travels on the `start` message. The
1624
1644
  * runtime only needs the name, description, and JSON-Schema input to surface
1625
1645
  * the tool; `execute` stays on the host.
1626
1646
  */
1627
- declare const harnessV1BridgeToolWireSchema: z.ZodObject<{
1628
- name: z.ZodString;
1629
- description: z.ZodOptional<z.ZodString>;
1630
- inputSchema: z.ZodOptional<z.ZodUnknown>;
1647
+ export declare const harnessV1BridgeToolWireSchema: z.ZodObject<{
1648
+ name: z.ZodString;
1649
+ description: z.ZodOptional<z.ZodString>;
1650
+ inputSchema: z.ZodOptional<z.ZodUnknown>;
1631
1651
  }, z.core.$strip>;
1632
1652
  type HarnessV1BridgeToolWire = z.infer<typeof harnessV1BridgeToolWireSchema>;
1633
- declare const harnessV1BridgePermissionModeSchema: z.ZodEnum<{
1634
- "allow-all": "allow-all";
1635
- "allow-reads": "allow-reads";
1636
- "allow-edits": "allow-edits";
1653
+ export declare const harnessV1BridgePermissionModeSchema: z.ZodEnum<{
1654
+ "allow-reads": "allow-reads";
1655
+ "allow-edits": "allow-edits";
1656
+ "allow-all": "allow-all";
1637
1657
  }>;
1638
- declare const harnessV1BridgeBuiltinToolFilteringSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1639
- mode: z.ZodLiteral<"allow">;
1640
- toolNames: z.ZodArray<z.ZodString>;
1658
+ export declare const harnessV1BridgeBuiltinToolFilteringSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1659
+ mode: z.ZodLiteral<"allow">;
1660
+ toolNames: z.ZodArray<z.ZodString>;
1641
1661
  }, z.core.$strip>, z.ZodObject<{
1642
- mode: z.ZodLiteral<"deny">;
1643
- toolNames: z.ZodArray<z.ZodString>;
1662
+ mode: z.ZodLiteral<"deny">;
1663
+ toolNames: z.ZodArray<z.ZodString>;
1644
1664
  }, z.core.$strip>]>;
1645
- declare const harnessV1BridgeResponseFormatSchema: z.ZodType<HarnessV1ResponseFormat>;
1665
+ export declare const harnessV1BridgeResponseFormatSchema: z.ZodType<HarnessV1ResponseFormat>;
1646
1666
  /**
1647
1667
  * Common fields of the inbound `start` message. Each adapter extends this with
1648
1668
  * its runtime-specific configuration (e.g. `thinking`/`continue` for Claude
@@ -1653,39 +1673,39 @@ declare const harnessV1BridgeResponseFormatSchema: z.ZodType<HarnessV1ResponseFo
1653
1673
  * a bridge concept, it just happens to ride the `start` frame for bridge-backed
1654
1674
  * adapters.
1655
1675
  */
1656
- declare const harnessV1BridgeStartBaseSchema: z.ZodObject<{
1657
- type: z.ZodLiteral<"start">;
1658
- prompt: z.ZodString;
1659
- tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1660
- name: z.ZodString;
1661
- description: z.ZodOptional<z.ZodString>;
1662
- inputSchema: z.ZodOptional<z.ZodUnknown>;
1663
- }, z.core.$strip>>>;
1664
- model: z.ZodOptional<z.ZodString>;
1665
- debug: z.ZodOptional<z.ZodObject<{
1666
- enabled: z.ZodOptional<z.ZodBoolean>;
1667
- level: z.ZodOptional<z.ZodEnum<{
1668
- error: "error";
1669
- warn: "warn";
1670
- info: "info";
1671
- debug: "debug";
1672
- trace: "trace";
1673
- }>>;
1674
- subsystems: z.ZodOptional<z.ZodArray<z.ZodString>>;
1675
- }, z.core.$strip>>;
1676
- permissionMode: z.ZodOptional<z.ZodEnum<{
1677
- "allow-all": "allow-all";
1678
- "allow-reads": "allow-reads";
1679
- "allow-edits": "allow-edits";
1676
+ export declare const harnessV1BridgeStartBaseSchema: z.ZodObject<{
1677
+ type: z.ZodLiteral<"start">;
1678
+ prompt: z.ZodString;
1679
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1680
+ name: z.ZodString;
1681
+ description: z.ZodOptional<z.ZodString>;
1682
+ inputSchema: z.ZodOptional<z.ZodUnknown>;
1683
+ }, z.core.$strip>>>;
1684
+ model: z.ZodOptional<z.ZodString>;
1685
+ debug: z.ZodOptional<z.ZodObject<{
1686
+ enabled: z.ZodOptional<z.ZodBoolean>;
1687
+ level: z.ZodOptional<z.ZodEnum<{
1688
+ error: "error";
1689
+ warn: "warn";
1690
+ info: "info";
1691
+ debug: "debug";
1692
+ trace: "trace";
1680
1693
  }>>;
1681
- builtinToolFiltering: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1682
- mode: z.ZodLiteral<"allow">;
1683
- toolNames: z.ZodArray<z.ZodString>;
1684
- }, z.core.$strip>, z.ZodObject<{
1685
- mode: z.ZodLiteral<"deny">;
1686
- toolNames: z.ZodArray<z.ZodString>;
1687
- }, z.core.$strip>]>>;
1688
- responseFormat: z.ZodOptional<z.ZodType<HarnessV1ResponseFormat, unknown, z.core.$ZodTypeInternals<HarnessV1ResponseFormat, unknown>>>;
1694
+ subsystems: z.ZodOptional<z.ZodArray<z.ZodString>>;
1695
+ }, z.core.$strip>>;
1696
+ permissionMode: z.ZodOptional<z.ZodEnum<{
1697
+ "allow-reads": "allow-reads";
1698
+ "allow-edits": "allow-edits";
1699
+ "allow-all": "allow-all";
1700
+ }>>;
1701
+ builtinToolFiltering: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1702
+ mode: z.ZodLiteral<"allow">;
1703
+ toolNames: z.ZodArray<z.ZodString>;
1704
+ }, z.core.$strip>, z.ZodObject<{
1705
+ mode: z.ZodLiteral<"deny">;
1706
+ toolNames: z.ZodArray<z.ZodString>;
1707
+ }, z.core.$strip>]>>;
1708
+ responseFormat: z.ZodOptional<z.ZodType<HarnessV1ResponseFormat, unknown, z.core.$ZodTypeInternals<HarnessV1ResponseFormat, unknown>>>;
1689
1709
  }, z.core.$strip>;
1690
1710
  /**
1691
1711
  * Sent the instant the bridge accepts an authenticated WS connection. The host
@@ -1694,230 +1714,230 @@ declare const harnessV1BridgeStartBaseSchema: z.ZodObject<{
1694
1714
  * the bridge process — anything sent in that gap is dropped. Carries the
1695
1715
  * bridge's lifecycle `state` and highest emitted `seq` for reconnect.
1696
1716
  */
1697
- declare const harnessV1BridgeHelloSchema: z.ZodObject<{
1698
- type: z.ZodLiteral<"bridge-hello">;
1699
- state: z.ZodOptional<z.ZodString>;
1700
- lastSeq: z.ZodOptional<z.ZodNumber>;
1701
- capabilities: z.ZodOptional<z.ZodObject<{
1702
- experimental_userMessageResponses: z.ZodOptional<z.ZodBoolean>;
1703
- }, z.core.$strip>>;
1717
+ export declare const harnessV1BridgeHelloSchema: z.ZodObject<{
1718
+ type: z.ZodLiteral<"bridge-hello">;
1719
+ state: z.ZodOptional<z.ZodString>;
1720
+ lastSeq: z.ZodOptional<z.ZodNumber>;
1721
+ capabilities: z.ZodOptional<z.ZodObject<{
1722
+ experimental_userMessageResponses: z.ZodOptional<z.ZodBoolean>;
1723
+ }, z.core.$strip>>;
1704
1724
  }, z.core.$strip>;
1705
- declare const experimental_harnessV1BridgeUserMessageResponseSchema: z.ZodObject<{
1706
- type: z.ZodLiteral<"user-message-response">;
1707
- messageId: z.ZodString;
1708
- accepted: z.ZodBoolean;
1709
- error: z.ZodOptional<z.ZodObject<{
1710
- message: z.ZodString;
1711
- }, z.core.$strip>>;
1725
+ export declare const experimental_harnessV1BridgeUserMessageResponseSchema: z.ZodObject<{
1726
+ type: z.ZodLiteral<"user-message-response">;
1727
+ messageId: z.ZodString;
1728
+ accepted: z.ZodBoolean;
1729
+ error: z.ZodOptional<z.ZodObject<{
1730
+ message: z.ZodString;
1731
+ }, z.core.$strip>>;
1712
1732
  }, z.core.$strip>;
1713
1733
  /**
1714
1734
  * The bridge's reply to an inbound `stop`. Carries the adapter-specific
1715
1735
  * payload the host serializes into lifecycle state `data`.
1716
1736
  */
1717
- declare const harnessV1BridgeStopSchema: z.ZodObject<{
1718
- type: z.ZodLiteral<"bridge-stop">;
1719
- data: z.ZodUnknown;
1737
+ export declare const harnessV1BridgeStopSchema: z.ZodObject<{
1738
+ type: z.ZodLiteral<"bridge-stop">;
1739
+ data: z.ZodUnknown;
1720
1740
  }, z.core.$strip>;
1721
1741
  /**
1722
1742
  * A resume coordinate the bridge proactively announces (e.g. Codex's thread id)
1723
1743
  * so the host can cache it for a later resume without waiting for `stop`.
1724
1744
  */
1725
- declare const harnessV1BridgeThreadSchema: z.ZodObject<{
1726
- type: z.ZodLiteral<"bridge-thread">;
1727
- threadId: z.ZodString;
1745
+ export declare const harnessV1BridgeThreadSchema: z.ZodObject<{
1746
+ type: z.ZodLiteral<"bridge-thread">;
1747
+ threadId: z.ZodString;
1728
1748
  }, z.core.$strip>;
1729
1749
  /**
1730
1750
  * One captured console line from inside the sandbox. The bridge line-buffers
1731
1751
  * `process.stdout`/`process.stderr` and emits one of these per complete line.
1732
1752
  * Routed host-side to the diagnostics sink, never to the consumer stream.
1733
1753
  */
1734
- declare const harnessV1BridgeSandboxLogSchema: z.ZodObject<{
1735
- type: z.ZodLiteral<"sandbox-log">;
1736
- source: z.ZodString;
1737
- stream: z.ZodEnum<{
1738
- stdout: "stdout";
1739
- stderr: "stderr";
1740
- }>;
1741
- line: z.ZodString;
1754
+ export declare const harnessV1BridgeSandboxLogSchema: z.ZodObject<{
1755
+ type: z.ZodLiteral<"sandbox-log">;
1756
+ source: z.ZodString;
1757
+ stream: z.ZodEnum<{
1758
+ stdout: "stdout";
1759
+ stderr: "stderr";
1760
+ }>;
1761
+ line: z.ZodString;
1742
1762
  }, z.core.$strip>;
1743
1763
  /**
1744
1764
  * A structured diagnostic an adapter emits from inside the bridge via
1745
1765
  * `turn.bridgeLog(...)`. Gated by the session's debug level + subsystem filter.
1746
1766
  */
1747
- declare const harnessV1BridgeDebugEventSchema: z.ZodObject<{
1748
- type: z.ZodLiteral<"debug-event">;
1749
- level: z.ZodEnum<{
1750
- error: "error";
1751
- warn: "warn";
1752
- info: "info";
1753
- debug: "debug";
1754
- trace: "trace";
1755
- }>;
1756
- subsystem: z.ZodString;
1767
+ export declare const harnessV1BridgeDebugEventSchema: z.ZodObject<{
1768
+ type: z.ZodLiteral<"debug-event">;
1769
+ level: z.ZodEnum<{
1770
+ error: "error";
1771
+ warn: "warn";
1772
+ info: "info";
1773
+ debug: "debug";
1774
+ trace: "trace";
1775
+ }>;
1776
+ subsystem: z.ZodString;
1777
+ message: z.ZodString;
1778
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1779
+ error: z.ZodOptional<z.ZodObject<{
1780
+ name: z.ZodOptional<z.ZodString>;
1757
1781
  message: z.ZodString;
1758
- attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1759
- error: z.ZodOptional<z.ZodObject<{
1760
- name: z.ZodOptional<z.ZodString>;
1761
- message: z.ZodString;
1762
- stack: z.ZodOptional<z.ZodString>;
1763
- }, z.core.$strip>>;
1782
+ stack: z.ZodOptional<z.ZodString>;
1783
+ }, z.core.$strip>>;
1764
1784
  }, z.core.$strip>;
1765
1785
  /**
1766
1786
  * Every frame a bridge can send to the host: the stream-part events plus the
1767
1787
  * transport/control frames. This is the schema the host `SandboxChannel`
1768
1788
  * validates inbound frames against.
1769
1789
  */
1770
- declare const harnessV1BridgeOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1771
- type: z.ZodLiteral<"stream-start">;
1772
- warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodType<HarnessV1CallWarning, unknown, z.core.$ZodTypeInternals<HarnessV1CallWarning, unknown>>>>>;
1773
- modelId: z.ZodOptional<z.ZodString>;
1790
+ export declare const harnessV1BridgeOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1791
+ type: z.ZodLiteral<"stream-start">;
1792
+ warnings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodType<HarnessV1CallWarning, unknown, z.core.$ZodTypeInternals<HarnessV1CallWarning, unknown>>>>>;
1793
+ modelId: z.ZodOptional<z.ZodString>;
1774
1794
  }, z.core.$strip>, z.ZodObject<{
1775
- type: z.ZodLiteral<"text-start">;
1776
- id: z.ZodString;
1777
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1795
+ type: z.ZodLiteral<"text-start">;
1796
+ id: z.ZodString;
1797
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1778
1798
  }, z.core.$strip>, z.ZodObject<{
1779
- type: z.ZodLiteral<"text-delta">;
1780
- id: z.ZodString;
1781
- delta: z.ZodString;
1782
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1799
+ type: z.ZodLiteral<"text-delta">;
1800
+ id: z.ZodString;
1801
+ delta: z.ZodString;
1802
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1783
1803
  }, z.core.$strip>, z.ZodObject<{
1784
- type: z.ZodLiteral<"text-end">;
1785
- id: z.ZodString;
1786
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1804
+ type: z.ZodLiteral<"text-end">;
1805
+ id: z.ZodString;
1806
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1787
1807
  }, z.core.$strip>, z.ZodObject<{
1788
- type: z.ZodLiteral<"reasoning-start">;
1789
- id: z.ZodString;
1790
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1808
+ type: z.ZodLiteral<"reasoning-start">;
1809
+ id: z.ZodString;
1810
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1791
1811
  }, z.core.$strip>, z.ZodObject<{
1792
- type: z.ZodLiteral<"reasoning-delta">;
1793
- id: z.ZodString;
1794
- delta: z.ZodString;
1795
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1812
+ type: z.ZodLiteral<"reasoning-delta">;
1813
+ id: z.ZodString;
1814
+ delta: z.ZodString;
1815
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1796
1816
  }, z.core.$strip>, z.ZodObject<{
1797
- type: z.ZodLiteral<"reasoning-end">;
1798
- id: z.ZodString;
1799
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1817
+ type: z.ZodLiteral<"reasoning-end">;
1818
+ id: z.ZodString;
1819
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1800
1820
  }, z.core.$strip>, z.ZodObject<{
1801
- type: z.ZodLiteral<"tool-input-start">;
1802
- id: z.ZodString;
1803
- toolName: z.ZodString;
1804
- providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV4ProviderMetadata, unknown>>>;
1805
- providerExecuted: z.ZodOptional<z.ZodBoolean>;
1806
- dynamic: z.ZodOptional<z.ZodBoolean>;
1807
- title: z.ZodOptional<z.ZodString>;
1821
+ type: z.ZodLiteral<"tool-input-start">;
1822
+ id: z.ZodString;
1823
+ toolName: z.ZodString;
1824
+ providerMetadata: z.ZodOptional<z.ZodType<import("@ai-sdk/provider").SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<import("@ai-sdk/provider").SharedV4ProviderMetadata, unknown>>>;
1825
+ providerExecuted: z.ZodOptional<z.ZodBoolean>;
1826
+ dynamic: z.ZodOptional<z.ZodBoolean>;
1827
+ title: z.ZodOptional<z.ZodString>;
1808
1828
  }, z.core.$strip>, z.ZodObject<{
1809
- type: z.ZodLiteral<"tool-input-delta">;
1810
- id: z.ZodString;
1811
- delta: z.ZodString;
1812
- providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV4ProviderMetadata, unknown>>>;
1829
+ type: z.ZodLiteral<"tool-input-delta">;
1830
+ id: z.ZodString;
1831
+ delta: z.ZodString;
1832
+ providerMetadata: z.ZodOptional<z.ZodType<import("@ai-sdk/provider").SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<import("@ai-sdk/provider").SharedV4ProviderMetadata, unknown>>>;
1813
1833
  }, z.core.$strip>, z.ZodObject<{
1814
- type: z.ZodLiteral<"tool-input-end">;
1815
- id: z.ZodString;
1816
- providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV4ProviderMetadata, unknown>>>;
1834
+ type: z.ZodLiteral<"tool-input-end">;
1835
+ id: z.ZodString;
1836
+ providerMetadata: z.ZodOptional<z.ZodType<import("@ai-sdk/provider").SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<import("@ai-sdk/provider").SharedV4ProviderMetadata, unknown>>>;
1817
1837
  }, z.core.$strip>, z.ZodObject<{
1818
- type: z.ZodLiteral<"tool-call">;
1819
- toolCallId: z.ZodString;
1820
- toolName: z.ZodString;
1821
- input: z.ZodString;
1822
- providerExecuted: z.ZodOptional<z.ZodBoolean>;
1823
- dynamic: z.ZodOptional<z.ZodBoolean>;
1824
- providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV4ProviderMetadata, unknown>>>;
1825
- nativeName: z.ZodOptional<z.ZodString>;
1826
- stepToolCallCount: z.ZodOptional<z.ZodNumber>;
1838
+ type: z.ZodLiteral<"tool-call">;
1839
+ toolCallId: z.ZodString;
1840
+ toolName: z.ZodString;
1841
+ input: z.ZodString;
1842
+ providerExecuted: z.ZodOptional<z.ZodBoolean>;
1843
+ dynamic: z.ZodOptional<z.ZodBoolean>;
1844
+ providerMetadata: z.ZodOptional<z.ZodType<import("@ai-sdk/provider").SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<import("@ai-sdk/provider").SharedV4ProviderMetadata, unknown>>>;
1845
+ nativeName: z.ZodOptional<z.ZodString>;
1846
+ stepToolCallCount: z.ZodOptional<z.ZodNumber>;
1827
1847
  }, z.core.$strip>, z.ZodObject<{
1828
- type: z.ZodLiteral<"tool-approval-request">;
1829
- approvalId: z.ZodString;
1830
- toolCallId: z.ZodString;
1831
- providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV4ProviderMetadata, unknown>>>;
1848
+ type: z.ZodLiteral<"tool-approval-request">;
1849
+ approvalId: z.ZodString;
1850
+ toolCallId: z.ZodString;
1851
+ providerMetadata: z.ZodOptional<z.ZodType<import("@ai-sdk/provider").SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<import("@ai-sdk/provider").SharedV4ProviderMetadata, unknown>>>;
1832
1852
  }, z.core.$strip>, z.ZodObject<{
1833
- type: z.ZodLiteral<"tool-result">;
1834
- toolCallId: z.ZodString;
1835
- toolName: z.ZodString;
1836
- result: z.ZodType<NonNullable<_ai_sdk_provider.JSONValue>, unknown, z.core.$ZodTypeInternals<NonNullable<_ai_sdk_provider.JSONValue>, unknown>>;
1837
- isError: z.ZodOptional<z.ZodBoolean>;
1838
- preliminary: z.ZodOptional<z.ZodBoolean>;
1839
- dynamic: z.ZodOptional<z.ZodBoolean>;
1840
- providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV4ProviderMetadata, unknown>>>;
1853
+ type: z.ZodLiteral<"tool-result">;
1854
+ toolCallId: z.ZodString;
1855
+ toolName: z.ZodString;
1856
+ result: z.ZodType<NonNullable<import("@ai-sdk/provider").JSONValue>, unknown, z.core.$ZodTypeInternals<NonNullable<import("@ai-sdk/provider").JSONValue>, unknown>>;
1857
+ isError: z.ZodOptional<z.ZodBoolean>;
1858
+ preliminary: z.ZodOptional<z.ZodBoolean>;
1859
+ dynamic: z.ZodOptional<z.ZodBoolean>;
1860
+ providerMetadata: z.ZodOptional<z.ZodType<import("@ai-sdk/provider").SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<import("@ai-sdk/provider").SharedV4ProviderMetadata, unknown>>>;
1841
1861
  }, z.core.$strip>, z.ZodObject<{
1842
- type: z.ZodLiteral<"finish-step">;
1843
- finishReason: z.ZodType<_ai_sdk_provider.LanguageModelV4FinishReason, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.LanguageModelV4FinishReason, unknown>>;
1844
- usage: z.ZodType<_ai_sdk_provider.LanguageModelV4Usage, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.LanguageModelV4Usage, unknown>>;
1845
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1862
+ type: z.ZodLiteral<"finish-step">;
1863
+ finishReason: z.ZodType<import("@ai-sdk/provider").LanguageModelV4FinishReason, unknown, z.core.$ZodTypeInternals<import("@ai-sdk/provider").LanguageModelV4FinishReason, unknown>>;
1864
+ usage: z.ZodType<import("@ai-sdk/provider").LanguageModelV4Usage, unknown, z.core.$ZodTypeInternals<import("@ai-sdk/provider").LanguageModelV4Usage, unknown>>;
1865
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1846
1866
  }, z.core.$strip>, z.ZodObject<{
1847
- type: z.ZodLiteral<"finish">;
1848
- finishReason: z.ZodType<_ai_sdk_provider.LanguageModelV4FinishReason, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.LanguageModelV4FinishReason, unknown>>;
1849
- totalUsage: z.ZodType<_ai_sdk_provider.LanguageModelV4Usage, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.LanguageModelV4Usage, unknown>>;
1850
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1867
+ type: z.ZodLiteral<"finish">;
1868
+ finishReason: z.ZodType<import("@ai-sdk/provider").LanguageModelV4FinishReason, unknown, z.core.$ZodTypeInternals<import("@ai-sdk/provider").LanguageModelV4FinishReason, unknown>>;
1869
+ totalUsage: z.ZodType<import("@ai-sdk/provider").LanguageModelV4Usage, unknown, z.core.$ZodTypeInternals<import("@ai-sdk/provider").LanguageModelV4Usage, unknown>>;
1870
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1851
1871
  }, z.core.$strip>, z.ZodObject<{
1852
- type: z.ZodLiteral<"file-change">;
1853
- event: z.ZodEnum<{
1854
- create: "create";
1855
- modify: "modify";
1856
- delete: "delete";
1857
- }>;
1858
- path: z.ZodString;
1859
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1872
+ type: z.ZodLiteral<"file-change">;
1873
+ event: z.ZodEnum<{
1874
+ create: "create";
1875
+ modify: "modify";
1876
+ delete: "delete";
1877
+ }>;
1878
+ path: z.ZodString;
1879
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1860
1880
  }, z.core.$strip>, z.ZodObject<{
1861
- type: z.ZodLiteral<"compaction">;
1862
- trigger: z.ZodEnum<{
1863
- manual: "manual";
1864
- auto: "auto";
1865
- }>;
1866
- summary: z.ZodString;
1867
- tokensBefore: z.ZodOptional<z.ZodNumber>;
1868
- tokensAfter: z.ZodOptional<z.ZodNumber>;
1869
- harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1881
+ type: z.ZodLiteral<"compaction">;
1882
+ trigger: z.ZodEnum<{
1883
+ manual: "manual";
1884
+ auto: "auto";
1885
+ }>;
1886
+ summary: z.ZodString;
1887
+ tokensBefore: z.ZodOptional<z.ZodNumber>;
1888
+ tokensAfter: z.ZodOptional<z.ZodNumber>;
1889
+ harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1870
1890
  }, z.core.$strip>, z.ZodObject<{
1871
- type: z.ZodLiteral<"error">;
1872
- error: z.ZodUnknown;
1891
+ type: z.ZodLiteral<"error">;
1892
+ error: z.ZodUnknown;
1873
1893
  }, z.core.$strip>, z.ZodObject<{
1874
- type: z.ZodLiteral<"raw">;
1875
- rawValue: z.ZodUnknown;
1894
+ type: z.ZodLiteral<"raw">;
1895
+ rawValue: z.ZodUnknown;
1876
1896
  }, z.core.$strip>, z.ZodObject<{
1877
- type: z.ZodLiteral<"bridge-hello">;
1878
- state: z.ZodOptional<z.ZodString>;
1879
- lastSeq: z.ZodOptional<z.ZodNumber>;
1880
- capabilities: z.ZodOptional<z.ZodObject<{
1881
- experimental_userMessageResponses: z.ZodOptional<z.ZodBoolean>;
1882
- }, z.core.$strip>>;
1897
+ type: z.ZodLiteral<"bridge-hello">;
1898
+ state: z.ZodOptional<z.ZodString>;
1899
+ lastSeq: z.ZodOptional<z.ZodNumber>;
1900
+ capabilities: z.ZodOptional<z.ZodObject<{
1901
+ experimental_userMessageResponses: z.ZodOptional<z.ZodBoolean>;
1902
+ }, z.core.$strip>>;
1883
1903
  }, z.core.$strip>, z.ZodObject<{
1884
- type: z.ZodLiteral<"user-message-response">;
1885
- messageId: z.ZodString;
1886
- accepted: z.ZodBoolean;
1887
- error: z.ZodOptional<z.ZodObject<{
1888
- message: z.ZodString;
1889
- }, z.core.$strip>>;
1904
+ type: z.ZodLiteral<"user-message-response">;
1905
+ messageId: z.ZodString;
1906
+ accepted: z.ZodBoolean;
1907
+ error: z.ZodOptional<z.ZodObject<{
1908
+ message: z.ZodString;
1909
+ }, z.core.$strip>>;
1890
1910
  }, z.core.$strip>, z.ZodObject<{
1891
- type: z.ZodLiteral<"bridge-stop">;
1892
- data: z.ZodUnknown;
1911
+ type: z.ZodLiteral<"bridge-stop">;
1912
+ data: z.ZodUnknown;
1893
1913
  }, z.core.$strip>, z.ZodObject<{
1894
- type: z.ZodLiteral<"bridge-thread">;
1895
- threadId: z.ZodString;
1914
+ type: z.ZodLiteral<"bridge-thread">;
1915
+ threadId: z.ZodString;
1896
1916
  }, z.core.$strip>, z.ZodObject<{
1897
- type: z.ZodLiteral<"sandbox-log">;
1898
- source: z.ZodString;
1899
- stream: z.ZodEnum<{
1900
- stdout: "stdout";
1901
- stderr: "stderr";
1902
- }>;
1903
- line: z.ZodString;
1917
+ type: z.ZodLiteral<"sandbox-log">;
1918
+ source: z.ZodString;
1919
+ stream: z.ZodEnum<{
1920
+ stdout: "stdout";
1921
+ stderr: "stderr";
1922
+ }>;
1923
+ line: z.ZodString;
1904
1924
  }, z.core.$strip>, z.ZodObject<{
1905
- type: z.ZodLiteral<"debug-event">;
1906
- level: z.ZodEnum<{
1907
- error: "error";
1908
- warn: "warn";
1909
- info: "info";
1910
- debug: "debug";
1911
- trace: "trace";
1912
- }>;
1913
- subsystem: z.ZodString;
1925
+ type: z.ZodLiteral<"debug-event">;
1926
+ level: z.ZodEnum<{
1927
+ error: "error";
1928
+ warn: "warn";
1929
+ info: "info";
1930
+ debug: "debug";
1931
+ trace: "trace";
1932
+ }>;
1933
+ subsystem: z.ZodString;
1934
+ message: z.ZodString;
1935
+ attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1936
+ error: z.ZodOptional<z.ZodObject<{
1937
+ name: z.ZodOptional<z.ZodString>;
1914
1938
  message: z.ZodString;
1915
- attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1916
- error: z.ZodOptional<z.ZodObject<{
1917
- name: z.ZodOptional<z.ZodString>;
1918
- message: z.ZodString;
1919
- stack: z.ZodOptional<z.ZodString>;
1920
- }, z.core.$strip>>;
1939
+ stack: z.ZodOptional<z.ZodString>;
1940
+ }, z.core.$strip>>;
1921
1941
  }, z.core.$strip>]>;
1922
1942
  type HarnessV1BridgeOutboundMessage = z.infer<typeof harnessV1BridgeOutboundMessageSchema>;
1923
1943
  type Experimental_HarnessV1BridgeUserMessageResponse = z.infer<typeof experimental_harnessV1BridgeUserMessageResponseSchema>;
@@ -1930,109 +1950,111 @@ type HarnessV1BridgeDebugEvent = z.infer<typeof harnessV1BridgeDebugEventSchema>
1930
1950
  * its fields through. This is the seam where the bridge's serialization is
1931
1951
  * lifted into the general emission shape every harness shares.
1932
1952
  */
1933
- declare function harnessV1DiagnosticFromBridgeFrame(frame: HarnessV1BridgeSandboxLog | HarnessV1BridgeDebugEvent, context: {
1934
- sessionId?: string;
1935
- timestamp: number;
1953
+ export declare function harnessV1DiagnosticFromBridgeFrame(frame: HarnessV1BridgeSandboxLog | HarnessV1BridgeDebugEvent, context: {
1954
+ sessionId?: string;
1955
+ timestamp: number;
1936
1956
  }): HarnessV1Diagnostic;
1937
- declare const harnessV1BridgeToolResultInboundSchema: z.ZodObject<{
1938
- type: z.ZodLiteral<"tool-result">;
1939
- toolCallId: z.ZodString;
1940
- output: z.ZodUnknown;
1941
- isError: z.ZodOptional<z.ZodBoolean>;
1942
- toolResult: z.ZodOptional<z.ZodUnknown>;
1957
+ export declare const harnessV1BridgeToolResultInboundSchema: z.ZodObject<{
1958
+ type: z.ZodLiteral<"tool-result">;
1959
+ toolCallId: z.ZodString;
1960
+ output: z.ZodUnknown;
1961
+ isError: z.ZodOptional<z.ZodBoolean>;
1962
+ toolResult: z.ZodOptional<z.ZodUnknown>;
1943
1963
  }, z.core.$strip>;
1944
- declare const harnessV1BridgeToolApprovalResponseInboundSchema: z.ZodObject<{
1945
- type: z.ZodLiteral<"tool-approval-response">;
1946
- approvalId: z.ZodString;
1947
- approved: z.ZodBoolean;
1948
- reason: z.ZodOptional<z.ZodString>;
1964
+ export declare const harnessV1BridgeToolApprovalResponseInboundSchema: z.ZodObject<{
1965
+ type: z.ZodLiteral<"tool-approval-response">;
1966
+ approvalId: z.ZodString;
1967
+ approved: z.ZodBoolean;
1968
+ reason: z.ZodOptional<z.ZodString>;
1949
1969
  }, z.core.$strip>;
1950
- declare const harnessV1BridgeUserMessageInboundSchema: z.ZodObject<{
1951
- type: z.ZodLiteral<"user-message">;
1952
- messageId: z.ZodOptional<z.ZodString>;
1953
- text: z.ZodString;
1970
+ export declare const harnessV1BridgeUserMessageInboundSchema: z.ZodObject<{
1971
+ type: z.ZodLiteral<"user-message">;
1972
+ messageId: z.ZodOptional<z.ZodString>;
1973
+ text: z.ZodString;
1954
1974
  }, z.core.$strip>;
1955
- declare const experimental_harnessV1BridgeUserMessageInboundSchema: z.ZodObject<{
1956
- type: z.ZodLiteral<"user-message">;
1957
- text: z.ZodString;
1958
- messageId: z.ZodString;
1975
+ export declare const experimental_harnessV1BridgeUserMessageInboundSchema: z.ZodObject<{
1976
+ type: z.ZodLiteral<"user-message">;
1977
+ text: z.ZodString;
1978
+ messageId: z.ZodString;
1959
1979
  }, z.core.$strip>;
1960
- declare const harnessV1BridgeAbortInboundSchema: z.ZodObject<{
1961
- type: z.ZodLiteral<"abort">;
1980
+ export declare const harnessV1BridgeAbortInboundSchema: z.ZodObject<{
1981
+ type: z.ZodLiteral<"abort">;
1962
1982
  }, z.core.$strip>;
1963
- declare const harnessV1BridgeDestroyInboundSchema: z.ZodObject<{
1964
- type: z.ZodLiteral<"destroy">;
1983
+ export declare const harnessV1BridgeDestroyInboundSchema: z.ZodObject<{
1984
+ type: z.ZodLiteral<"destroy">;
1965
1985
  }, z.core.$strip>;
1966
1986
  /**
1967
1987
  * Reconnect: after re-establishing the socket the host asks the bridge to
1968
1988
  * replay every buffered event with `seq > lastSeenEventId`.
1969
1989
  */
1970
- declare const harnessV1BridgeResumeInboundSchema: z.ZodObject<{
1971
- type: z.ZodLiteral<"resume">;
1972
- lastSeenEventId: z.ZodNumber;
1990
+ export declare const harnessV1BridgeResumeInboundSchema: z.ZodObject<{
1991
+ type: z.ZodLiteral<"resume">;
1992
+ lastSeenEventId: z.ZodNumber;
1973
1993
  }, z.core.$strip>;
1974
1994
  /**
1975
1995
  * The bridge replies with `bridge-stop` carrying any runtime resume data,
1976
1996
  * then exits.
1977
1997
  */
1978
- declare const harnessV1BridgeStopInboundSchema: z.ZodObject<{
1979
- type: z.ZodLiteral<"stop">;
1998
+ export declare const harnessV1BridgeStopInboundSchema: z.ZodObject<{
1999
+ type: z.ZodLiteral<"stop">;
1980
2000
  }, z.core.$strip>;
1981
2001
  /**
1982
2002
  * The inbound command members shared by every bridge adapter. Spread these
1983
2003
  * alongside the adapter's own `start` schema to build the final inbound union:
1984
2004
  * `z.discriminatedUnion('type', [adapterStartSchema, ...harnessV1BridgeInboundCommandSchemas])`.
1985
2005
  */
1986
- declare const harnessV1BridgeInboundCommandSchemas: readonly [z.ZodObject<{
1987
- type: z.ZodLiteral<"tool-result">;
1988
- toolCallId: z.ZodString;
1989
- output: z.ZodUnknown;
1990
- isError: z.ZodOptional<z.ZodBoolean>;
1991
- toolResult: z.ZodOptional<z.ZodUnknown>;
2006
+ export declare const harnessV1BridgeInboundCommandSchemas: readonly [z.ZodObject<{
2007
+ type: z.ZodLiteral<"tool-result">;
2008
+ toolCallId: z.ZodString;
2009
+ output: z.ZodUnknown;
2010
+ isError: z.ZodOptional<z.ZodBoolean>;
2011
+ toolResult: z.ZodOptional<z.ZodUnknown>;
1992
2012
  }, z.core.$strip>, z.ZodObject<{
1993
- type: z.ZodLiteral<"tool-approval-response">;
1994
- approvalId: z.ZodString;
1995
- approved: z.ZodBoolean;
1996
- reason: z.ZodOptional<z.ZodString>;
2013
+ type: z.ZodLiteral<"tool-approval-response">;
2014
+ approvalId: z.ZodString;
2015
+ approved: z.ZodBoolean;
2016
+ reason: z.ZodOptional<z.ZodString>;
1997
2017
  }, z.core.$strip>, z.ZodObject<{
1998
- type: z.ZodLiteral<"user-message">;
1999
- messageId: z.ZodOptional<z.ZodString>;
2000
- text: z.ZodString;
2018
+ type: z.ZodLiteral<"user-message">;
2019
+ messageId: z.ZodOptional<z.ZodString>;
2020
+ text: z.ZodString;
2001
2021
  }, z.core.$strip>, z.ZodObject<{
2002
- type: z.ZodLiteral<"abort">;
2022
+ type: z.ZodLiteral<"abort">;
2003
2023
  }, z.core.$strip>, z.ZodObject<{
2004
- type: z.ZodLiteral<"destroy">;
2024
+ type: z.ZodLiteral<"destroy">;
2005
2025
  }, z.core.$strip>, z.ZodObject<{
2006
- type: z.ZodLiteral<"resume">;
2007
- lastSeenEventId: z.ZodNumber;
2026
+ type: z.ZodLiteral<"resume">;
2027
+ lastSeenEventId: z.ZodNumber;
2008
2028
  }, z.core.$strip>, z.ZodObject<{
2009
- type: z.ZodLiteral<"stop">;
2029
+ type: z.ZodLiteral<"stop">;
2010
2030
  }, z.core.$strip>];
2011
2031
  /**
2012
2032
  * The JSON line the bridge writes to stdout once its WebSocket server is bound,
2013
2033
  * announcing the port the host should connect to.
2014
2034
  */
2015
- declare const harnessV1BridgeReadySchema: z.ZodObject<{
2016
- type: z.ZodLiteral<"bridge-ready">;
2017
- port: z.ZodNumber;
2035
+ export declare const harnessV1BridgeReadySchema: z.ZodObject<{
2036
+ type: z.ZodLiteral<"bridge-ready">;
2037
+ port: z.ZodNumber;
2018
2038
  }, z.core.$strip>;
2019
2039
  type HarnessV1BridgeReady = z.infer<typeof harnessV1BridgeReadySchema>;
2020
-
2040
+ //#endregion
2041
+ //#region src/errors/harness-error.d.ts
2021
2042
  declare const symbol$3: unique symbol;
2022
2043
  /**
2023
2044
  * Base error type for failures originating in or signalled by a harness
2024
2045
  * adapter. Specific failure modes (e.g. unsupported capability) extend this
2025
2046
  * class.
2026
2047
  */
2027
- declare class HarnessError extends AISDKError {
2028
- private readonly [symbol$3];
2029
- constructor({ message, cause }: {
2030
- message: string;
2031
- cause?: unknown;
2032
- });
2033
- static isInstance(error: unknown): error is HarnessError;
2048
+ export declare class HarnessError extends AISDKError {
2049
+ private readonly [symbol$3];
2050
+ constructor({ message, cause }: {
2051
+ message: string;
2052
+ cause?: unknown;
2053
+ });
2054
+ static isInstance(error: unknown): error is HarnessError;
2034
2055
  }
2035
-
2056
+ //#endregion
2057
+ //#region src/errors/harness-capability-unsupported-error.d.ts
2036
2058
  declare const symbol$2: unique symbol;
2037
2059
  /**
2038
2060
  * Thrown when a caller asks the harness to do something the adapter (or the
@@ -2043,17 +2065,18 @@ declare const symbol$2: unique symbol;
2043
2065
  * The caller supplies the full human-readable message. Optional `harnessId`
2044
2066
  * is recorded as structured context for tooling.
2045
2067
  */
2046
- declare class HarnessCapabilityUnsupportedError extends HarnessError {
2047
- private readonly [symbol$2];
2048
- readonly harnessId?: string;
2049
- constructor({ message, harnessId, cause, }: {
2050
- message: string;
2051
- harnessId?: string;
2052
- cause?: unknown;
2053
- });
2054
- static isInstance(error: unknown): error is HarnessCapabilityUnsupportedError;
2068
+ export declare class HarnessCapabilityUnsupportedError extends HarnessError {
2069
+ private readonly [symbol$2];
2070
+ readonly harnessId?: string;
2071
+ constructor({ message, harnessId, cause }: {
2072
+ message: string;
2073
+ harnessId?: string;
2074
+ cause?: unknown;
2075
+ });
2076
+ static isInstance(error: unknown): error is HarnessCapabilityUnsupportedError;
2055
2077
  }
2056
-
2078
+ //#endregion
2079
+ //#region src/errors/harness-history-unavailable-error.d.ts
2057
2080
  declare const symbol$1: unique symbol;
2058
2081
  /**
2059
2082
  * Thrown by `readHistory` when the adapter supports history reads but cannot
@@ -2066,17 +2089,18 @@ declare const symbol$1: unique symbol;
2066
2089
  * A conversation with no recorded messages yet is not an error; it resolves
2067
2090
  * to an empty result instead.
2068
2091
  */
2069
- declare class HarnessHistoryUnavailableError extends HarnessError {
2070
- private readonly [symbol$1];
2071
- readonly harnessId?: string;
2072
- constructor({ message, harnessId, cause, }: {
2073
- message: string;
2074
- harnessId?: string;
2075
- cause?: unknown;
2076
- });
2077
- static isInstance(error: unknown): error is HarnessHistoryUnavailableError;
2092
+ export declare class HarnessHistoryUnavailableError extends HarnessError {
2093
+ private readonly [symbol$1];
2094
+ readonly harnessId?: string;
2095
+ constructor({ message, harnessId, cause }: {
2096
+ message: string;
2097
+ harnessId?: string;
2098
+ cause?: unknown;
2099
+ });
2100
+ static isInstance(error: unknown): error is HarnessHistoryUnavailableError;
2078
2101
  }
2079
-
2102
+ //#endregion
2103
+ //#region src/errors/harness-sandbox-authentication-error.d.ts
2080
2104
  declare const symbol: unique symbol;
2081
2105
  /**
2082
2106
  * Thrown when a sandbox provider cannot authenticate or authorize the
@@ -2084,15 +2108,16 @@ declare const symbol: unique symbol;
2084
2108
  * preserve the underlying SDK failure as `cause` and supply a message that
2085
2109
  * explains how the consumer can configure credentials.
2086
2110
  */
2087
- declare class HarnessSandboxAuthenticationError extends HarnessError {
2088
- private readonly [symbol];
2089
- readonly sandboxProviderId: string;
2090
- constructor({ message, sandboxProviderId, cause, }: {
2091
- message: string;
2092
- sandboxProviderId: string;
2093
- cause?: unknown;
2094
- });
2095
- static isInstance(error: unknown): error is HarnessSandboxAuthenticationError;
2111
+ export declare class HarnessSandboxAuthenticationError extends HarnessError {
2112
+ private readonly [symbol];
2113
+ readonly sandboxProviderId: string;
2114
+ constructor({ message, sandboxProviderId, cause }: {
2115
+ message: string;
2116
+ sandboxProviderId: string;
2117
+ cause?: unknown;
2118
+ });
2119
+ static isInstance(error: unknown): error is HarnessSandboxAuthenticationError;
2096
2120
  }
2097
-
2098
- export { type Experimental_HarnessV1BridgeUserMessageResponse, HARNESS_V1_BUILTIN_TOOLS, HARNESS_V1_BUILTIN_TOOL_NAMES, HarnessCapabilityUnsupportedError, HarnessError, HarnessHistoryUnavailableError, HarnessSandboxAuthenticationError, type HarnessV1, type HarnessV1AssistantMessage, type HarnessV1Authentication, type HarnessV1AuthenticationEnvironment, type HarnessV1Bootstrap, type HarnessV1BootstrapCommand, type HarnessV1BootstrapFile, type HarnessV1BridgeDebugEvent, type HarnessV1BridgeOutboundMessage, type HarnessV1BridgeReady, type HarnessV1BridgeSandboxLog, type HarnessV1BridgeToolWire, type HarnessV1BuiltinTool, type HarnessV1BuiltinToolFiltering, type HarnessV1BuiltinToolName, type HarnessV1BuiltinToolUseKind, type HarnessV1CallWarning, type HarnessV1ContinueTurnOptions, type HarnessV1ContinueTurnState, type HarnessV1CredentialForwarding, type HarnessV1CustomPart, type HarnessV1DebugConfig, type HarnessV1DebugLevel, type HarnessV1Diagnostic, type HarnessV1FilePart, type HarnessV1JSONArray, type HarnessV1JSONObject, type HarnessV1JSONSchema, type HarnessV1JSONValue, type HarnessV1LifecycleState, type HarnessV1Message, type HarnessV1MessagePart, type HarnessV1Metadata, type HarnessV1MintBridgeTokenCallback, type HarnessV1NetworkPolicy, type HarnessV1NetworkSandboxSession, type HarnessV1Observability, type HarnessV1PendingToolApproval, type HarnessV1PendingToolResult, type HarnessV1PermissionMode, type HarnessV1PortEndpoint, type HarnessV1Prompt, type HarnessV1PromptControl, type HarnessV1PromptTurnOptions, type HarnessV1QuestionsTool, type HarnessV1QuestionsToolInput, type HarnessV1QuestionsToolOutput, type HarnessV1ReadHistoryResult, type HarnessV1ReasoningFilePart, type HarnessV1ReasoningPart, type HarnessV1RequestTransformation, type HarnessV1RequestTransformationSources, type HarnessV1ResponseFormat, type HarnessV1ResumeSessionState, type HarnessV1SandboxProvider, type HarnessV1SandboxSessionCreateOptions, type HarnessV1SandboxSessionResumeOptions, type HarnessV1SandboxTemplate, type HarnessV1Session, type HarnessV1Skill, type HarnessV1StartOptions, type HarnessV1StreamPart, type HarnessV1TextPart, type HarnessV1ToolApprovalResponsePart, type HarnessV1ToolCallPart, type HarnessV1ToolMessage, type HarnessV1ToolResultOutput, type HarnessV1ToolResultPart, type HarnessV1ToolSpec, type HarnessV1TurnSettings, type HarnessV1UserMessage, commonTool, experimental_harnessV1BridgeUserMessageInboundSchema, experimental_harnessV1BridgeUserMessageResponseSchema, getHarnessV1BuiltinToolFilteringDenialReason, harnessSessionDataDirectoryPath, harnessStateDirectoryPath, harnessV1BridgeAbortInboundSchema, harnessV1BridgeBuiltinToolFilteringSchema, harnessV1BridgeDebugEventSchema, harnessV1BridgeDestroyInboundSchema, harnessV1BridgeHelloSchema, harnessV1BridgeInboundCommandSchemas, harnessV1BridgeOutboundMessageSchema, harnessV1BridgePermissionModeSchema, harnessV1BridgeReadySchema, harnessV1BridgeResponseFormatSchema, harnessV1BridgeResumeInboundSchema, harnessV1BridgeSandboxLogSchema, harnessV1BridgeStartBaseSchema, harnessV1BridgeStopInboundSchema, harnessV1BridgeStopSchema, harnessV1BridgeThreadSchema, harnessV1BridgeToolApprovalResponseInboundSchema, harnessV1BridgeToolResultInboundSchema, harnessV1BridgeToolWireSchema, harnessV1BridgeUserMessageInboundSchema, harnessV1DebugConfigSchema, harnessV1DebugLevelSchema, harnessV1DiagnosticFromBridgeFrame, harnessV1ErrorPartSchema, harnessV1FileChangePartSchema, harnessV1FinishPartSchema, harnessV1FinishStepPartSchema, harnessV1QuestionsToolInputSchema, harnessV1QuestionsToolOutputSchema, harnessV1RawPartSchema, harnessV1ReasoningDeltaPartSchema, harnessV1ReasoningEndPartSchema, harnessV1ReasoningStartPartSchema, harnessV1StreamPartSchema, harnessV1StreamStartPartSchema, harnessV1TextDeltaPartSchema, harnessV1TextEndPartSchema, harnessV1TextStartPartSchema, harnessV1ToolApprovalRequestPartSchema, harnessV1ToolCallPartSchema, harnessV1ToolResultPartSchema, isHarnessV1BuiltinToolIncluded };
2121
+ //#endregion
2122
+ export type { Experimental_HarnessV1BridgeUserMessageResponse, HarnessV1, HarnessV1AssistantMessage, HarnessV1Authentication, HarnessV1AuthenticationEnvironment, HarnessV1Bootstrap, HarnessV1BootstrapCommand, HarnessV1BootstrapFile, HarnessV1BridgeDebugEvent, HarnessV1BridgeOutboundMessage, HarnessV1BridgeReady, HarnessV1BridgeSandboxLog, HarnessV1BridgeToolWire, HarnessV1BuiltinTool, HarnessV1BuiltinToolFiltering, HarnessV1BuiltinToolName, HarnessV1BuiltinToolUseKind, HarnessV1CallWarning, HarnessV1ContinueTurnOptions, HarnessV1ContinueTurnState, HarnessV1CredentialForwarding, HarnessV1CustomPart, HarnessV1DebugConfig, HarnessV1DebugLevel, HarnessV1Diagnostic, HarnessV1FilePart, HarnessV1JSONArray, HarnessV1JSONObject, HarnessV1JSONSchema, HarnessV1JSONValue, HarnessV1LifecycleState, HarnessV1Message, HarnessV1MessagePart, HarnessV1Metadata, HarnessV1MintBridgeTokenCallback, HarnessV1NetworkPolicy, HarnessV1NetworkSandboxSession, HarnessV1Observability, HarnessV1PendingToolApproval, HarnessV1PendingToolResult, HarnessV1PermissionMode, HarnessV1PortEndpoint, HarnessV1Prompt, HarnessV1PromptControl, HarnessV1PromptTurnOptions, HarnessV1QuestionsTool, HarnessV1QuestionsToolInput, HarnessV1QuestionsToolOutput, HarnessV1ReadHistoryResult, HarnessV1ReasoningFilePart, HarnessV1ReasoningPart, HarnessV1RequestTransformation, HarnessV1RequestTransformationSources, HarnessV1ResponseFormat, HarnessV1ResumeSessionState, HarnessV1SandboxProvider, HarnessV1SandboxSessionCreateOptions, HarnessV1SandboxSessionResumeOptions, HarnessV1SandboxTemplate, HarnessV1Session, HarnessV1Skill, HarnessV1StartOptions, HarnessV1StreamPart, HarnessV1TextPart, HarnessV1ToolApprovalResponsePart, HarnessV1ToolCallPart, HarnessV1ToolMessage, HarnessV1ToolResultOutput, HarnessV1ToolResultPart, HarnessV1ToolSpec, HarnessV1TurnSettings, HarnessV1UserMessage };
2123
+ //# sourceMappingURL=index.d.ts.map