@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/CHANGELOG.md +19 -0
- package/dist/bridge/host-tool-mcp.mjs +203 -281
- package/dist/bridge/host-tool-mcp.mjs.map +1 -1
- package/dist/bridge/index.mjs +3543 -4271
- package/dist/bridge/index.mjs.map +1 -1
- package/dist/index.d.ts +298 -292
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2165 -2947
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,183 +1,185 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
audience?: Array<ACPRole> | null;
|
|
10
|
+
lastModified?: string | null;
|
|
11
|
+
priority?: number | null;
|
|
12
|
+
_meta?: ACPMetadata | null;
|
|
12
13
|
};
|
|
13
14
|
type ACPTextContent = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
annotations?: ACPAnnotations | null;
|
|
16
|
+
text: string;
|
|
17
|
+
_meta?: ACPMetadata | null;
|
|
17
18
|
};
|
|
18
19
|
type ACPImageContent = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
annotations?: ACPAnnotations | null;
|
|
28
|
+
data: string;
|
|
29
|
+
mimeType: string;
|
|
30
|
+
_meta?: ACPMetadata | null;
|
|
30
31
|
};
|
|
31
32
|
type ACPResourceLink = {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
mimeType?: string | null;
|
|
44
|
+
text: string;
|
|
45
|
+
uri: string;
|
|
46
|
+
_meta?: ACPMetadata | null;
|
|
46
47
|
};
|
|
47
48
|
type ACPBlobResourceContents = {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
blob: string;
|
|
50
|
+
mimeType?: string | null;
|
|
51
|
+
uri: string;
|
|
52
|
+
_meta?: ACPMetadata | null;
|
|
52
53
|
};
|
|
53
54
|
type ACPEmbeddedResource = {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
annotations?: ACPAnnotations | null;
|
|
56
|
+
resource: ACPTextResourceContents | ACPBlobResourceContents;
|
|
57
|
+
_meta?: ACPMetadata | null;
|
|
57
58
|
};
|
|
58
59
|
type ACPContentBlock = (ACPTextContent & {
|
|
59
|
-
|
|
60
|
+
type: 'text';
|
|
60
61
|
}) | (ACPImageContent & {
|
|
61
|
-
|
|
62
|
+
type: 'image';
|
|
62
63
|
}) | (ACPAudioContent & {
|
|
63
|
-
|
|
64
|
+
type: 'audio';
|
|
64
65
|
}) | (ACPResourceLink & {
|
|
65
|
-
|
|
66
|
+
type: 'resource_link';
|
|
66
67
|
}) | (ACPEmbeddedResource & {
|
|
67
|
-
|
|
68
|
+
type: 'resource';
|
|
68
69
|
});
|
|
69
70
|
type ACPToolCallContent = {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
type: 'content';
|
|
72
|
+
content: ACPContentBlock;
|
|
73
|
+
_meta?: ACPMetadata | null;
|
|
73
74
|
} | {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
type: 'diff';
|
|
76
|
+
path: string;
|
|
77
|
+
oldText?: string | null;
|
|
78
|
+
newText: string;
|
|
79
|
+
_meta?: ACPMetadata | null;
|
|
79
80
|
} | {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
path: string;
|
|
89
|
+
line?: number | null;
|
|
90
|
+
_meta?: ACPMetadata | null;
|
|
90
91
|
};
|
|
91
92
|
type ACPToolCall = {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
-
|
|
108
|
+
readonly [key: string]: ACPSerializableValue;
|
|
107
109
|
};
|
|
108
110
|
type ACPValueSource = {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
-
|
|
117
|
+
readonly [key: string]: ACPProfileValue;
|
|
116
118
|
};
|
|
117
119
|
type ACPNpmSimpleSource = {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
|
|
136
|
-
|
|
137
|
+
readonly type: 'install-command';
|
|
138
|
+
readonly command: string;
|
|
137
139
|
};
|
|
138
140
|
type ACPSource = ACPNpmSimpleSource | ACPNpmLockedSource | ACPInstallCommandSource;
|
|
139
141
|
type ACPAuthentication = {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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
|
-
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
readonly gateway: {
|
|
149
|
+
readonly env: Readonly<Record<string, ACPProfileValue>>;
|
|
150
|
+
};
|
|
149
151
|
};
|
|
150
152
|
type ACPModelMapping = {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
+
readonly type: 'session-config-option';
|
|
154
|
+
readonly path: string;
|
|
153
155
|
} | {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
+
readonly type: 'session-model';
|
|
157
|
+
readonly path: string;
|
|
156
158
|
};
|
|
157
|
-
type ACPCredentialBrokering = ({ env, sandboxEnv, headers
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
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
|
-
|
|
176
|
-
|
|
177
|
+
readonly type: 'session-mode';
|
|
178
|
+
readonly modeId: string;
|
|
177
179
|
} | {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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
|
-
|
|
190
|
-
|
|
191
|
+
readonly type: 'session-meta';
|
|
192
|
+
readonly path: ReadonlyArray<string>;
|
|
191
193
|
} | {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
194
|
+
readonly type: 'launch-env-json';
|
|
195
|
+
readonly variable: string;
|
|
196
|
+
readonly path: ReadonlyArray<string>;
|
|
195
197
|
} | {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
+
readonly type: 'filesystem';
|
|
199
|
+
readonly path: string;
|
|
198
200
|
};
|
|
199
201
|
type ACPOutputSchemaMapping = {
|
|
200
|
-
|
|
201
|
-
|
|
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
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
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
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
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
|
-
|
|
310
|
-
|
|
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
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
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
|
-
|
|
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
|
-
|
|
383
|
-
|
|
384
|
-
|
|
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
|