@ai-sdk/harness-acp 1.0.71 → 1.0.73

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,183 +1,185 @@
1
- import { HarnessV1StreamPart, HarnessV1Authentication, HarnessV1RequestTransformation, HarnessV1CredentialForwarding, HarnessV1PermissionMode, HarnessV1MintBridgeTokenCallback, HarnessV1PortEndpoint, HarnessV1, HARNESS_V1_BUILTIN_TOOLS } from '@ai-sdk/harness';
2
- import { SandboxChannelReconnectOptions } from '@ai-sdk/harness/utils';
3
- import { ToolResultPart, ToolSet } from '@ai-sdk/provider-utils';
4
-
1
+ import { HARNESS_V1_BUILTIN_TOOLS, HarnessV1, HarnessV1Authentication, HarnessV1CredentialForwarding, HarnessV1MintBridgeTokenCallback, HarnessV1PermissionMode, HarnessV1PortEndpoint, HarnessV1RequestTransformation, HarnessV1StreamPart, harnessV1BridgeStartBaseSchema } from "@ai-sdk/harness";
2
+ import { z } from "zod/v4";
3
+ import { SandboxChannelReconnectOptions } from "@ai-sdk/harness/utils";
4
+ import { ToolResultPart, ToolSet } from "@ai-sdk/provider-utils";
5
+ //#region src/acp-tool-call.d.ts
5
6
  type ACPMetadata = Record<string, unknown>;
6
7
  type ACPRole = 'assistant' | 'user';
7
8
  type ACPAnnotations = {
8
- audience?: Array<ACPRole> | null;
9
- lastModified?: string | null;
10
- priority?: number | null;
11
- _meta?: ACPMetadata | null;
9
+ audience?: Array<ACPRole> | null;
10
+ lastModified?: string | null;
11
+ priority?: number | null;
12
+ _meta?: ACPMetadata | null;
12
13
  };
13
14
  type ACPTextContent = {
14
- annotations?: ACPAnnotations | null;
15
- text: string;
16
- _meta?: ACPMetadata | null;
15
+ annotations?: ACPAnnotations | null;
16
+ text: string;
17
+ _meta?: ACPMetadata | null;
17
18
  };
18
19
  type ACPImageContent = {
19
- annotations?: ACPAnnotations | null;
20
- data: string;
21
- mimeType: string;
22
- uri?: string | null;
23
- _meta?: ACPMetadata | null;
20
+ annotations?: ACPAnnotations | null;
21
+ data: string;
22
+ mimeType: string;
23
+ uri?: string | null;
24
+ _meta?: ACPMetadata | null;
24
25
  };
25
26
  type ACPAudioContent = {
26
- annotations?: ACPAnnotations | null;
27
- data: string;
28
- mimeType: string;
29
- _meta?: ACPMetadata | null;
27
+ annotations?: ACPAnnotations | null;
28
+ data: string;
29
+ mimeType: string;
30
+ _meta?: ACPMetadata | null;
30
31
  };
31
32
  type ACPResourceLink = {
32
- annotations?: ACPAnnotations | null;
33
- description?: string | null;
34
- mimeType?: string | null;
35
- name: string;
36
- size?: number | null;
37
- title?: string | null;
38
- uri: string;
39
- _meta?: ACPMetadata | null;
33
+ annotations?: ACPAnnotations | null;
34
+ description?: string | null;
35
+ mimeType?: string | null;
36
+ name: string;
37
+ size?: number | null;
38
+ title?: string | null;
39
+ uri: string;
40
+ _meta?: ACPMetadata | null;
40
41
  };
41
42
  type ACPTextResourceContents = {
42
- mimeType?: string | null;
43
- text: string;
44
- uri: string;
45
- _meta?: ACPMetadata | null;
43
+ mimeType?: string | null;
44
+ text: string;
45
+ uri: string;
46
+ _meta?: ACPMetadata | null;
46
47
  };
47
48
  type ACPBlobResourceContents = {
48
- blob: string;
49
- mimeType?: string | null;
50
- uri: string;
51
- _meta?: ACPMetadata | null;
49
+ blob: string;
50
+ mimeType?: string | null;
51
+ uri: string;
52
+ _meta?: ACPMetadata | null;
52
53
  };
53
54
  type ACPEmbeddedResource = {
54
- annotations?: ACPAnnotations | null;
55
- resource: ACPTextResourceContents | ACPBlobResourceContents;
56
- _meta?: ACPMetadata | null;
55
+ annotations?: ACPAnnotations | null;
56
+ resource: ACPTextResourceContents | ACPBlobResourceContents;
57
+ _meta?: ACPMetadata | null;
57
58
  };
58
59
  type ACPContentBlock = (ACPTextContent & {
59
- type: 'text';
60
+ type: 'text';
60
61
  }) | (ACPImageContent & {
61
- type: 'image';
62
+ type: 'image';
62
63
  }) | (ACPAudioContent & {
63
- type: 'audio';
64
+ type: 'audio';
64
65
  }) | (ACPResourceLink & {
65
- type: 'resource_link';
66
+ type: 'resource_link';
66
67
  }) | (ACPEmbeddedResource & {
67
- type: 'resource';
68
+ type: 'resource';
68
69
  });
69
70
  type ACPToolCallContent = {
70
- type: 'content';
71
- content: ACPContentBlock;
72
- _meta?: ACPMetadata | null;
71
+ type: 'content';
72
+ content: ACPContentBlock;
73
+ _meta?: ACPMetadata | null;
73
74
  } | {
74
- type: 'diff';
75
- path: string;
76
- oldText?: string | null;
77
- newText: string;
78
- _meta?: ACPMetadata | null;
75
+ type: 'diff';
76
+ path: string;
77
+ oldText?: string | null;
78
+ newText: string;
79
+ _meta?: ACPMetadata | null;
79
80
  } | {
80
- type: 'terminal';
81
- terminalId: string;
82
- _meta?: ACPMetadata | null;
81
+ type: 'terminal';
82
+ terminalId: string;
83
+ _meta?: ACPMetadata | null;
83
84
  };
84
85
  type ACPToolKind = 'read' | 'edit' | 'delete' | 'move' | 'search' | 'execute' | 'think' | 'fetch' | 'switch_mode' | 'other';
85
86
  type ACPToolCallStatus = 'pending' | 'in_progress' | 'completed' | 'failed';
86
87
  type ACPToolCallLocation = {
87
- path: string;
88
- line?: number | null;
89
- _meta?: ACPMetadata | null;
88
+ path: string;
89
+ line?: number | null;
90
+ _meta?: ACPMetadata | null;
90
91
  };
91
92
  type ACPToolCall = {
92
- toolCallId: string;
93
- name?: string | null;
94
- title: string;
95
- kind?: ACPToolKind;
96
- status?: ACPToolCallStatus;
97
- content?: Array<ACPToolCallContent>;
98
- locations?: Array<ACPToolCallLocation>;
99
- rawInput?: unknown;
100
- rawOutput?: unknown;
101
- _meta?: ACPMetadata | null;
93
+ toolCallId: string;
94
+ name?: string | null;
95
+ title: string;
96
+ kind?: ACPToolKind;
97
+ status?: ACPToolCallStatus;
98
+ content?: Array<ACPToolCallContent>;
99
+ locations?: Array<ACPToolCallLocation>;
100
+ rawInput?: unknown;
101
+ rawOutput?: unknown;
102
+ _meta?: ACPMetadata | null;
102
103
  };
103
-
104
+ //#endregion
105
+ //#region src/v1/acp-v1-settings.d.ts
104
106
  type ACPSerializablePrimitive = string | number | boolean | null;
105
107
  type ACPSerializableValue = ACPSerializablePrimitive | ReadonlyArray<ACPSerializableValue> | {
106
- readonly [key: string]: ACPSerializableValue;
108
+ readonly [key: string]: ACPSerializableValue;
107
109
  };
108
110
  type ACPValueSource = {
109
- readonly $source: 'gateway-api-key' | 'gateway-base-url' | 'gateway-authorization' | 'client-app' | 'client-app-name' | 'client-app-version';
110
- readonly prefix?: string;
111
- readonly suffix?: string;
112
- readonly ensureSuffix?: string;
111
+ readonly $source: 'gateway-api-key' | 'gateway-base-url' | 'gateway-authorization' | 'client-app' | 'client-app-name' | 'client-app-version';
112
+ readonly prefix?: string;
113
+ readonly suffix?: string;
114
+ readonly ensureSuffix?: string;
113
115
  };
114
116
  type ACPProfileValue = ACPSerializablePrimitive | ACPValueSource | ReadonlyArray<ACPProfileValue> | {
115
- readonly [key: string]: ACPProfileValue;
117
+ readonly [key: string]: ACPProfileValue;
116
118
  };
117
119
  type ACPNpmSimpleSource = {
118
- readonly type: 'npm-simple';
119
- readonly packageName: string;
120
- /**
121
- * Exact version to install. When omitted, the package's `latest` dist-tag is
122
- * installed and no version takes part in the implementation identity, so a
123
- * new upstream release does not invalidate existing lifecycle state.
124
- */
125
- readonly packageVersion?: string;
120
+ readonly type: 'npm-simple';
121
+ readonly packageName: string;
122
+ /**
123
+ * Exact version to install. When omitted, the package's `latest` dist-tag is
124
+ * installed and no version takes part in the implementation identity, so a
125
+ * new upstream release does not invalidate existing lifecycle state.
126
+ */
127
+ readonly packageVersion?: string;
126
128
  };
127
129
  type ACPNpmLockedSource = {
128
- readonly type: 'npm-locked';
129
- readonly packageJson: string;
130
- readonly pnpmLockYaml: string;
131
- /** Optional pnpm workspace configuration required by the locked install. */
132
- readonly pnpmWorkspaceYaml?: string;
130
+ readonly type: 'npm-locked';
131
+ readonly packageJson: string;
132
+ readonly pnpmLockYaml: string;
133
+ /** Optional pnpm workspace configuration required by the locked install. */
134
+ readonly pnpmWorkspaceYaml?: string;
133
135
  };
134
136
  type ACPInstallCommandSource = {
135
- readonly type: 'install-command';
136
- readonly command: string;
137
+ readonly type: 'install-command';
138
+ readonly command: string;
137
139
  };
138
140
  type ACPSource = ACPNpmSimpleSource | ACPNpmLockedSource | ACPInstallCommandSource;
139
141
  type ACPAuthentication = {
140
- readonly methodId: string;
141
- readonly meta?: Readonly<Record<string, ACPSerializableValue>>;
142
- readonly clientCapabilities?: Readonly<Record<string, ACPSerializableValue>>;
142
+ readonly methodId: string;
143
+ readonly meta?: Readonly<Record<string, ACPSerializableValue>>;
144
+ readonly clientCapabilities?: Readonly<Record<string, ACPSerializableValue>>;
143
145
  };
144
146
  type ACPAuthenticationMode$1 = HarnessV1Authentication;
145
147
  type ACPProviderAuthentication = {
146
- readonly gateway: {
147
- readonly env: Readonly<Record<string, ACPProfileValue>>;
148
- };
148
+ readonly gateway: {
149
+ readonly env: Readonly<Record<string, ACPProfileValue>>;
150
+ };
149
151
  };
150
152
  type ACPModelMapping = {
151
- readonly type: 'session-config-option';
152
- readonly path: string;
153
+ readonly type: 'session-config-option';
154
+ readonly path: string;
153
155
  } | {
154
- readonly type: 'session-model';
155
- readonly path: string;
156
+ readonly type: 'session-model';
157
+ readonly path: string;
156
158
  };
157
- type ACPCredentialBrokering = ({ env, sandboxEnv, headers, }: {
158
- env: Readonly<Record<string, string>>;
159
- sandboxEnv?: Readonly<Record<string, string>>;
160
- headers?: Readonly<Record<string, string>>;
159
+ type ACPCredentialBrokering = ({ env, sandboxEnv, headers }: {
160
+ env: Readonly<Record<string, string>>;
161
+ sandboxEnv?: Readonly<Record<string, string>>;
162
+ headers?: Readonly<Record<string, string>>;
161
163
  }) => ReadonlyArray<HarnessV1RequestTransformation>;
162
164
  type ACPAuthenticationFile = {
163
- /** Path relative to the ACP implementation's private home directory. */
164
- readonly path: string;
165
- readonly content: string;
165
+ /** Path relative to the ACP implementation's private home directory. */
166
+ readonly path: string;
167
+ readonly content: string;
166
168
  };
167
169
  type ACPAuthenticationFiles = (options: {
168
- /** Host values resolved for the implementation. */
169
- readonly env: Readonly<Record<string, string>>;
170
- /** Values exposed to the sandbox process after credential brokering. */
171
- readonly sandboxEnv: Readonly<Record<string, string>>;
172
- readonly credentialBrokeringAvailable: boolean;
170
+ /** Host values resolved for the implementation. */
171
+ readonly env: Readonly<Record<string, string>>;
172
+ /** Values exposed to the sandbox process after credential brokering. */
173
+ readonly sandboxEnv: Readonly<Record<string, string>>;
174
+ readonly credentialBrokeringAvailable: boolean;
173
175
  }) => ReadonlyArray<ACPAuthenticationFile>;
174
176
  type ACPPermissionModeTarget = {
175
- readonly type: 'session-mode';
176
- readonly modeId: string;
177
+ readonly type: 'session-mode';
178
+ readonly modeId: string;
177
179
  } | {
178
- readonly type: 'session-config-option';
179
- readonly configId: string;
180
- readonly value: string | boolean;
180
+ readonly type: 'session-config-option';
181
+ readonly configId: string;
182
+ readonly value: string | boolean;
181
183
  };
182
184
  type ACPPermissionModeMapping = Readonly<Record<HarnessV1PermissionMode, ACPPermissionModeTarget | null>>;
183
185
  /**
@@ -186,19 +188,19 @@ type ACPPermissionModeMapping = Readonly<Record<HarnessV1PermissionMode, ACPPerm
186
188
  * relative to the parsed JSON object stored in `variable`.
187
189
  */
188
190
  type ACPInstructionMapping = {
189
- readonly type: 'session-meta';
190
- readonly path: ReadonlyArray<string>;
191
+ readonly type: 'session-meta';
192
+ readonly path: ReadonlyArray<string>;
191
193
  } | {
192
- readonly type: 'launch-env-json';
193
- readonly variable: string;
194
- readonly path: ReadonlyArray<string>;
194
+ readonly type: 'launch-env-json';
195
+ readonly variable: string;
196
+ readonly path: ReadonlyArray<string>;
195
197
  } | {
196
- readonly type: 'filesystem';
197
- readonly path: string;
198
+ readonly type: 'filesystem';
199
+ readonly path: string;
198
200
  };
199
201
  type ACPOutputSchemaMapping = {
200
- readonly type: 'session-prompt-meta';
201
- readonly path: ReadonlyArray<string>;
202
+ readonly type: 'session-prompt-meta';
203
+ readonly path: ReadonlyArray<string>;
202
204
  };
203
205
  /**
204
206
  * Transport used for the harness-owned MCP server that exposes host tools to
@@ -206,179 +208,183 @@ type ACPOutputSchemaMapping = {
206
208
  */
207
209
  type ACPHostToolMCPTransport = 'stdio' | 'http';
208
210
  type ACPAskUserQuestionsSettings = {
209
- readonly requestMethod: string;
210
- readonly isNativeToolCall?: (options: {
211
- nativeToolCall: ACPToolCall;
212
- }) => boolean;
213
- readonly fromNativeRequest: (options: {
214
- nativeRequest: unknown;
215
- nativeToolCall?: ACPToolCall;
216
- }) => Extract<HarnessV1StreamPart, {
217
- type: 'tool-call';
218
- }> | null;
219
- readonly toNativeResponse: (options: {
220
- nativeRequest: unknown;
221
- toolResult: ToolResultPart;
222
- }) => unknown;
223
- readonly matchesNativeRequest?: (options: {
224
- previousNativeRequest: unknown;
225
- nativeRequest: unknown;
226
- }) => boolean;
211
+ readonly requestMethod: string;
212
+ readonly isNativeToolCall?: (options: {
213
+ nativeToolCall: ACPToolCall;
214
+ }) => boolean;
215
+ readonly fromNativeRequest: (options: {
216
+ nativeRequest: unknown;
217
+ nativeToolCall?: ACPToolCall;
218
+ }) => Extract<HarnessV1StreamPart, {
219
+ type: 'tool-call';
220
+ }> | null;
221
+ readonly toNativeResponse: (options: {
222
+ nativeRequest: unknown;
223
+ toolResult: ToolResultPart;
224
+ }) => unknown;
225
+ readonly matchesNativeRequest?: (options: {
226
+ previousNativeRequest: unknown;
227
+ nativeRequest: unknown;
228
+ }) => boolean;
227
229
  };
228
230
  type ACPV1Settings = {
229
- readonly version?: 'v1';
230
- readonly harnessId: string;
231
- readonly mcpServers?: Record<string, unknown>;
232
- readonly isMcpToolCall?: (toolCall: ACPToolCall) => boolean;
233
- readonly auth?: ACPAuthenticationMode$1;
234
- /**
235
- * Resolves adapter-owned authentication on the host before any environment
236
- * values are forwarded to the ACP implementation.
237
- */
238
- readonly resolveAuthenticationEnvironment?: (options: {
239
- readonly auth: ACPAuthenticationMode$1 | undefined;
240
- readonly env: Readonly<Record<string, string | undefined>>;
241
- }) => Promise<Readonly<Record<string, string | undefined>>>;
242
- readonly source: ACPSource;
243
- readonly executable: string;
244
- readonly args?: ReadonlyArray<string>;
245
- readonly forwardEnv?: ReadonlyArray<string>;
246
- readonly credentialEnv?: ReadonlyArray<string>;
247
- readonly credentialBrokering?: ACPCredentialBrokering;
248
- /**
249
- * Materializes private authentication files below the ACP implementation's
250
- * home directory before the implementation starts.
251
- */
252
- readonly authenticationFiles?: ACPAuthenticationFiles;
253
- /**
254
- * Customizes each credential value before it is forwarded into a sandbox
255
- * process. This does not restrict which credentials the harness adapter can
256
- * discover, read, or otherwise access in the host process.
257
- */
258
- readonly credentialForwarding?: HarnessV1CredentialForwarding;
259
- /**
260
- * Runtime environment values that are safe to persist in bootstrap and
261
- * lifecycle compatibility identity.
262
- */
263
- readonly env?: Readonly<Record<string, string>>;
264
- readonly authentication?: ACPAuthentication;
265
- readonly clientCapabilities?: Readonly<Record<string, ACPSerializableValue>>;
266
- readonly providerAuthentication?: ACPProviderAuthentication;
267
- /**
268
- * Maps the HarnessAgent model identifier to an ACP session operation.
269
- */
270
- readonly modelMapping: ACPModelMapping;
271
- /**
272
- * Native skills directory relative to the ACP implementation's home
273
- * directory. Defaults to `.agents/skills`.
274
- */
275
- readonly skillsDirectory?: string;
276
- /**
277
- * Routes HarnessAgent instructions to a runtime-native system or developer
278
- * prompt. Changed instructions are prepended to the next user prompt when
279
- * ACP does not expose a native per-turn instruction update.
280
- */
281
- readonly instructionMapping?: ACPInstructionMapping;
282
- /**
283
- * Maps structured output JSON Schema to an implementation-specific path
284
- * below the ACP session prompt's `_meta` field.
285
- */
286
- readonly outputSchemaMapping?: ACPOutputSchemaMapping;
287
- /**
288
- * Transport used for the harness-owned MCP server that exposes host tools to
289
- * the ACP implementation. Defaults to `stdio`. Set this to `http` for
290
- * implementations that only accept HTTP or SSE MCP servers from the client,
291
- * which requires the implementation to advertise
292
- * `agentCapabilities.mcpCapabilities.http`.
293
- */
294
- readonly hostToolMcpTransport?: ACPHostToolMCPTransport;
295
- readonly askUserQuestions?: ACPAskUserQuestionsSettings;
296
- readonly permissionModeMapping?: ACPPermissionModeMapping;
297
- readonly session?: {
298
- readonly meta?: Readonly<Record<string, ACPSerializableValue>>;
299
- };
300
- /**
301
- * Creates the authentication token used by the sandbox bridge. Defaults to
302
- * a random 32-byte hexadecimal token.
303
- */
304
- readonly mintBridgeToken?: HarnessV1MintBridgeTokenCallback;
231
+ readonly version?: 'v1';
232
+ readonly harnessId: string;
233
+ readonly mcpServers?: Record<string, unknown>;
234
+ readonly isMcpToolCall?: (toolCall: ACPToolCall) => boolean;
235
+ readonly auth?: ACPAuthenticationMode$1;
236
+ /**
237
+ * Resolves adapter-owned authentication on the host before any environment
238
+ * values are forwarded to the ACP implementation.
239
+ */
240
+ readonly resolveAuthenticationEnvironment?: (options: {
241
+ readonly auth: ACPAuthenticationMode$1 | undefined;
242
+ readonly env: Readonly<Record<string, string | undefined>>;
243
+ }) => Promise<Readonly<Record<string, string | undefined>>>;
244
+ readonly source: ACPSource;
245
+ readonly executable: string;
246
+ readonly args?: ReadonlyArray<string>;
247
+ readonly forwardEnv?: ReadonlyArray<string>;
248
+ readonly credentialEnv?: ReadonlyArray<string>;
249
+ readonly credentialBrokering?: ACPCredentialBrokering;
250
+ /**
251
+ * Materializes private authentication files below the ACP implementation's
252
+ * home directory before the implementation starts.
253
+ */
254
+ readonly authenticationFiles?: ACPAuthenticationFiles;
255
+ /**
256
+ * Customizes each credential value before it is forwarded into a sandbox
257
+ * process. This does not restrict which credentials the harness adapter can
258
+ * discover, read, or otherwise access in the host process.
259
+ */
260
+ readonly credentialForwarding?: HarnessV1CredentialForwarding;
261
+ /**
262
+ * Runtime environment values that are safe to persist in bootstrap and
263
+ * lifecycle compatibility identity.
264
+ */
265
+ readonly env?: Readonly<Record<string, string>>;
266
+ readonly authentication?: ACPAuthentication;
267
+ readonly clientCapabilities?: Readonly<Record<string, ACPSerializableValue>>;
268
+ readonly providerAuthentication?: ACPProviderAuthentication;
269
+ /**
270
+ * Maps the HarnessAgent model identifier to an ACP session operation.
271
+ */
272
+ readonly modelMapping: ACPModelMapping;
273
+ /**
274
+ * Native skills directory relative to the ACP implementation's home
275
+ * directory. Defaults to `.agents/skills`.
276
+ */
277
+ readonly skillsDirectory?: string;
278
+ /**
279
+ * Routes HarnessAgent instructions to a runtime-native system or developer
280
+ * prompt. Changed instructions are prepended to the next user prompt when
281
+ * ACP does not expose a native per-turn instruction update.
282
+ */
283
+ readonly instructionMapping?: ACPInstructionMapping;
284
+ /**
285
+ * Maps structured output JSON Schema to an implementation-specific path
286
+ * below the ACP session prompt's `_meta` field.
287
+ */
288
+ readonly outputSchemaMapping?: ACPOutputSchemaMapping;
289
+ /**
290
+ * Transport used for the harness-owned MCP server that exposes host tools to
291
+ * the ACP implementation. Defaults to `stdio`. Set this to `http` for
292
+ * implementations that only accept HTTP or SSE MCP servers from the client,
293
+ * which requires the implementation to advertise
294
+ * `agentCapabilities.mcpCapabilities.http`.
295
+ */
296
+ readonly hostToolMcpTransport?: ACPHostToolMCPTransport;
297
+ readonly askUserQuestions?: ACPAskUserQuestionsSettings;
298
+ readonly permissionModeMapping?: ACPPermissionModeMapping;
299
+ readonly session?: {
300
+ readonly meta?: Readonly<Record<string, ACPSerializableValue>>;
301
+ };
302
+ /**
303
+ * Creates the authentication token used by the sandbox bridge. Defaults to
304
+ * a random 32-byte hexadecimal token.
305
+ */
306
+ readonly mintBridgeToken?: HarnessV1MintBridgeTokenCallback;
305
307
  };
306
-
308
+ //#endregion
309
+ //#region src/acp-auth.d.ts
307
310
  type ACPAuthenticationMode = ACPAuthenticationMode$1;
308
311
  type ACPClientApp = {
309
- readonly name: string;
310
- readonly version: string;
312
+ readonly name: string;
313
+ readonly version: string;
311
314
  };
312
-
315
+ //#endregion
316
+ //#region src/acp-harness.d.ts
313
317
  type ACPHarnessSettings<TBuiltinTools extends ToolSet = {}, TAskUserQuestions extends ACPAskUserQuestionsSettings | undefined = ACPAskUserQuestionsSettings | undefined> = {
314
- readonly builtinTools?: TBuiltinTools;
315
- /**
316
- * MCP server definitions keyed by server name. Each definition uses the
317
- * underlying runtime's native MCP server configuration format.
318
- */
319
- readonly mcpServers?: Record<string, unknown>;
320
- readonly isMcpToolCall?: (toolCall: ACPToolCall) => boolean;
321
- readonly port?: number;
322
- /**
323
- * Override the host endpoint used to connect to the sandbox bridge. Required
324
- * together with `port` when using a basic sandbox session.
325
- */
326
- readonly portEndpoint?: HarnessV1PortEndpoint;
327
- readonly startupTimeoutMs?: number;
328
- /**
329
- * Configures reconnection attempts after an established bridge connection
330
- * drops. The reconnect window includes connection establishment and
331
- * backoff delays. Defaults to 30 seconds with exponential backoff from 50
332
- * milliseconds up to 2 seconds.
333
- */
334
- readonly reconnect?: SandboxChannelReconnectOptions;
335
- readonly clientApp?: ACPClientApp;
336
- readonly version?: ACPV1Settings['version'];
337
- readonly harnessId: ACPV1Settings['harnessId'];
338
- readonly auth?: ACPAuthenticationMode;
339
- readonly resolveAuthenticationEnvironment?: ACPV1Settings['resolveAuthenticationEnvironment'];
340
- readonly source: ACPV1Settings['source'];
341
- readonly executable: ACPV1Settings['executable'];
342
- readonly args?: ACPV1Settings['args'];
343
- readonly forwardEnv?: ACPV1Settings['forwardEnv'];
344
- readonly credentialEnv?: ACPV1Settings['credentialEnv'];
345
- readonly credentialBrokering?: ACPV1Settings['credentialBrokering'];
346
- readonly authenticationFiles?: ACPV1Settings['authenticationFiles'];
347
- /**
348
- * Customizes each credential value before it is forwarded into a sandbox
349
- * process. This does not restrict which credentials the harness adapter can
350
- * discover, read, or otherwise access in the host process.
351
- */
352
- readonly credentialForwarding?: HarnessV1CredentialForwarding;
353
- readonly env?: ACPV1Settings['env'];
354
- readonly authentication?: ACPV1Settings['authentication'];
355
- readonly clientCapabilities?: ACPV1Settings['clientCapabilities'];
356
- readonly providerAuthentication?: ACPV1Settings['providerAuthentication'];
357
- /**
358
- * Maps the HarnessAgent model identifier to an ACP session operation.
359
- */
360
- readonly modelMapping: ACPV1Settings['modelMapping'];
361
- readonly skillsDirectory?: ACPV1Settings['skillsDirectory'];
362
- readonly instructionMapping?: ACPV1Settings['instructionMapping'];
363
- readonly outputSchemaMapping?: ACPV1Settings['outputSchemaMapping'];
364
- /**
365
- * Transport used for the harness-owned MCP server that exposes host tools to
366
- * the ACP implementation. Defaults to `stdio`. Set this to `http` for
367
- * implementations that only accept HTTP or SSE MCP servers from the client,
368
- * which requires the implementation to advertise
369
- * `agentCapabilities.mcpCapabilities.http`.
370
- */
371
- readonly hostToolMcpTransport?: ACPV1Settings['hostToolMcpTransport'];
372
- readonly askUserQuestions?: TAskUserQuestions;
373
- readonly permissionModeMapping?: ACPV1Settings['permissionModeMapping'];
374
- readonly session?: ACPV1Settings['session'];
375
- readonly mintBridgeToken?: HarnessV1MintBridgeTokenCallback;
318
+ readonly builtinTools?: TBuiltinTools;
319
+ /**
320
+ * MCP server definitions keyed by server name. Each definition uses the
321
+ * underlying runtime's native MCP server configuration format.
322
+ */
323
+ readonly mcpServers?: Record<string, unknown>;
324
+ readonly isMcpToolCall?: (toolCall: ACPToolCall) => boolean;
325
+ readonly port?: number;
326
+ /**
327
+ * Override the host endpoint used to connect to the sandbox bridge. Required
328
+ * together with `port` when using a basic sandbox session.
329
+ */
330
+ readonly portEndpoint?: HarnessV1PortEndpoint;
331
+ readonly startupTimeoutMs?: number;
332
+ /**
333
+ * Configures reconnection attempts after an established bridge connection
334
+ * drops. The reconnect window includes connection establishment and
335
+ * backoff delays. Defaults to 30 seconds with exponential backoff from 50
336
+ * milliseconds up to 2 seconds.
337
+ */
338
+ readonly reconnect?: SandboxChannelReconnectOptions;
339
+ readonly clientApp?: ACPClientApp;
340
+ readonly version?: ACPV1Settings['version'];
341
+ readonly harnessId: ACPV1Settings['harnessId'];
342
+ readonly auth?: ACPAuthenticationMode;
343
+ readonly resolveAuthenticationEnvironment?: ACPV1Settings['resolveAuthenticationEnvironment'];
344
+ readonly source: ACPV1Settings['source'];
345
+ readonly executable: ACPV1Settings['executable'];
346
+ readonly args?: ACPV1Settings['args'];
347
+ readonly forwardEnv?: ACPV1Settings['forwardEnv'];
348
+ readonly credentialEnv?: ACPV1Settings['credentialEnv'];
349
+ readonly credentialBrokering?: ACPV1Settings['credentialBrokering'];
350
+ readonly authenticationFiles?: ACPV1Settings['authenticationFiles'];
351
+ /**
352
+ * Customizes each credential value before it is forwarded into a sandbox
353
+ * process. This does not restrict which credentials the harness adapter can
354
+ * discover, read, or otherwise access in the host process.
355
+ */
356
+ readonly credentialForwarding?: HarnessV1CredentialForwarding;
357
+ readonly env?: ACPV1Settings['env'];
358
+ readonly authentication?: ACPV1Settings['authentication'];
359
+ readonly clientCapabilities?: ACPV1Settings['clientCapabilities'];
360
+ readonly providerAuthentication?: ACPV1Settings['providerAuthentication'];
361
+ /**
362
+ * Maps the HarnessAgent model identifier to an ACP session operation.
363
+ */
364
+ readonly modelMapping: ACPV1Settings['modelMapping'];
365
+ readonly skillsDirectory?: ACPV1Settings['skillsDirectory'];
366
+ readonly instructionMapping?: ACPV1Settings['instructionMapping'];
367
+ readonly outputSchemaMapping?: ACPV1Settings['outputSchemaMapping'];
368
+ /**
369
+ * Transport used for the harness-owned MCP server that exposes host tools to
370
+ * the ACP implementation. Defaults to `stdio`. Set this to `http` for
371
+ * implementations that only accept HTTP or SSE MCP servers from the client,
372
+ * which requires the implementation to advertise
373
+ * `agentCapabilities.mcpCapabilities.http`.
374
+ */
375
+ readonly hostToolMcpTransport?: ACPV1Settings['hostToolMcpTransport'];
376
+ readonly askUserQuestions?: TAskUserQuestions;
377
+ readonly permissionModeMapping?: ACPV1Settings['permissionModeMapping'];
378
+ readonly session?: ACPV1Settings['session'];
379
+ readonly mintBridgeToken?: HarnessV1MintBridgeTokenCallback;
376
380
  };
377
381
  type ACPHarnessTools<TBuiltinTools extends ToolSet, TAskUserQuestions> = TBuiltinTools & ([TAskUserQuestions] extends [undefined] ? {} : {
378
- askUserQuestions: typeof HARNESS_V1_BUILTIN_TOOLS.askUserQuestions;
382
+ askUserQuestions: typeof HARNESS_V1_BUILTIN_TOOLS.askUserQuestions;
379
383
  });
380
- declare function createACP<TBuiltinTools extends ToolSet = {}, TAskUserQuestions extends ACPAskUserQuestionsSettings | undefined = undefined>(settings: ACPHarnessSettings<TBuiltinTools, TAskUserQuestions>): HarnessV1<ACPHarnessTools<TBuiltinTools, TAskUserQuestions>>;
381
-
382
- declare const VERSION: string;
383
-
384
- export { type ACPAnnotations, type ACPAskUserQuestionsSettings, type ACPAudioContent, type ACPAuthentication, type ACPAuthenticationFile, type ACPAuthenticationFiles, type ACPAuthenticationMode, type ACPBlobResourceContents, type ACPClientApp, type ACPContentBlock, type ACPCredentialBrokering, type ACPEmbeddedResource, type ACPHarnessSettings, type ACPHostToolMCPTransport, type ACPImageContent, type ACPInstallCommandSource, type ACPInstructionMapping, type ACPMetadata, type ACPModelMapping, type ACPNpmLockedSource, type ACPNpmSimpleSource, type ACPOutputSchemaMapping, type ACPPermissionModeMapping, type ACPPermissionModeTarget, type ACPProfileValue, type ACPProviderAuthentication, type ACPResourceLink, type ACPRole, type ACPSerializablePrimitive, type ACPSerializableValue, type ACPSource, type ACPTextContent, type ACPTextResourceContents, type ACPToolCall, type ACPToolCallContent, type ACPToolCallLocation, type ACPToolCallStatus, type ACPToolKind, type ACPV1Settings, type ACPValueSource, VERSION, createACP };
384
+ export declare function createACP<TBuiltinTools extends ToolSet = {}, TAskUserQuestions extends ACPAskUserQuestionsSettings | undefined = undefined>(settings: ACPHarnessSettings<TBuiltinTools, TAskUserQuestions>): HarnessV1<ACPHarnessTools<TBuiltinTools, TAskUserQuestions>>;
385
+ //#endregion
386
+ //#region src/version.d.ts
387
+ export declare const VERSION: string;
388
+ //#endregion
389
+ export type { ACPAnnotations, ACPAskUserQuestionsSettings, ACPAudioContent, ACPAuthentication, ACPAuthenticationFile, ACPAuthenticationFiles, ACPAuthenticationMode, ACPBlobResourceContents, ACPClientApp, ACPContentBlock, ACPCredentialBrokering, ACPEmbeddedResource, ACPHarnessSettings, ACPHostToolMCPTransport, ACPImageContent, ACPInstallCommandSource, ACPInstructionMapping, ACPMetadata, ACPModelMapping, ACPNpmLockedSource, ACPNpmSimpleSource, ACPOutputSchemaMapping, ACPPermissionModeMapping, ACPPermissionModeTarget, ACPProfileValue, ACPProviderAuthentication, ACPResourceLink, ACPRole, ACPSerializablePrimitive, ACPSerializableValue, ACPSource, ACPTextContent, ACPTextResourceContents, ACPToolCall, ACPToolCallContent, ACPToolCallLocation, ACPToolCallStatus, ACPToolKind, ACPV1Settings, ACPValueSource };
390
+ //# sourceMappingURL=index.d.ts.map