@ai-sdk/harness-acp 1.0.41 → 1.0.42
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 +8 -0
- package/README.md +1 -1
- package/dist/bridge/host-tool-mcp.mjs +1 -1
- package/dist/bridge/index.mjs +1 -1
- package/dist/index.d.ts +5 -13
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/acp-harness.ts +6 -8
- package/src/v1/acp-v1-harness.ts +1 -5
- package/src/v1/acp-v1-settings.ts +2 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/harness-acp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.42",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@ai-sdk/harness": "1.0.
|
|
29
|
+
"@ai-sdk/harness": "1.0.104",
|
|
30
30
|
"@ai-sdk/provider-utils": "5.0.37",
|
|
31
31
|
"ws": "^8.21.0"
|
|
32
32
|
},
|
package/src/acp-harness.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HARNESS_V1_BUILTIN_TOOLS,
|
|
3
3
|
type HarnessV1,
|
|
4
|
+
type HarnessV1CredentialForwarding,
|
|
5
|
+
type HarnessV1MintBridgeTokenCallback,
|
|
4
6
|
type HarnessV1PortEndpoint,
|
|
5
7
|
} from '@ai-sdk/harness';
|
|
6
8
|
import type { ToolSet } from '@ai-sdk/provider-utils';
|
|
7
9
|
import { z } from 'zod/v4';
|
|
8
|
-
import type { ACPClientApp } from './acp-auth';
|
|
10
|
+
import type { ACPAuthenticationMode, ACPClientApp } from './acp-auth';
|
|
9
11
|
import type { ACPToolCall } from './acp-tool-call';
|
|
10
12
|
import {
|
|
11
13
|
createACPV1,
|
|
@@ -46,7 +48,7 @@ export type ACPHarnessSettings<
|
|
|
46
48
|
readonly clientApp?: ACPClientApp;
|
|
47
49
|
readonly version?: ACPV1Settings['version'];
|
|
48
50
|
readonly harnessId: ACPV1Settings['harnessId'];
|
|
49
|
-
readonly auth?:
|
|
51
|
+
readonly auth?: ACPAuthenticationMode;
|
|
50
52
|
readonly source: ACPV1Settings['source'];
|
|
51
53
|
readonly executable: ACPV1Settings['executable'];
|
|
52
54
|
readonly args?: ACPV1Settings['args'];
|
|
@@ -58,7 +60,7 @@ export type ACPHarnessSettings<
|
|
|
58
60
|
* process. This does not restrict which credentials the harness adapter can
|
|
59
61
|
* discover, read, or otherwise access in the host process.
|
|
60
62
|
*/
|
|
61
|
-
readonly credentialForwarding?:
|
|
63
|
+
readonly credentialForwarding?: HarnessV1CredentialForwarding;
|
|
62
64
|
readonly env?: ACPV1Settings['env'];
|
|
63
65
|
readonly authentication?: ACPV1Settings['authentication'];
|
|
64
66
|
readonly clientCapabilities?: ACPV1Settings['clientCapabilities'];
|
|
@@ -67,10 +69,6 @@ export type ACPHarnessSettings<
|
|
|
67
69
|
* Maps the HarnessAgent model identifier to an ACP session operation.
|
|
68
70
|
*/
|
|
69
71
|
readonly modelMapping: ACPV1Settings['modelMapping'];
|
|
70
|
-
/**
|
|
71
|
-
* @deprecated Use `model` on `HarnessAgent` instead.
|
|
72
|
-
*/
|
|
73
|
-
readonly modelId?: ACPV1Settings['modelId'];
|
|
74
72
|
readonly skillsDirectory?: ACPV1Settings['skillsDirectory'];
|
|
75
73
|
readonly instructionMapping?: ACPV1Settings['instructionMapping'];
|
|
76
74
|
readonly outputSchemaMapping?: ACPV1Settings['outputSchemaMapping'];
|
|
@@ -85,7 +83,7 @@ export type ACPHarnessSettings<
|
|
|
85
83
|
readonly askUserQuestions?: TAskUserQuestions;
|
|
86
84
|
readonly permissionModeMapping?: ACPV1Settings['permissionModeMapping'];
|
|
87
85
|
readonly session?: ACPV1Settings['session'];
|
|
88
|
-
readonly mintBridgeToken?:
|
|
86
|
+
readonly mintBridgeToken?: HarnessV1MintBridgeTokenCallback;
|
|
89
87
|
};
|
|
90
88
|
|
|
91
89
|
const ACP_BUILTIN_TOOLS = {} as const satisfies ToolSet;
|
package/src/v1/acp-v1-harness.ts
CHANGED
|
@@ -448,7 +448,6 @@ export function createACPV1<TBuiltinTools extends ToolSet = {}>({
|
|
|
448
448
|
channel: attachChannel,
|
|
449
449
|
proc: undefined,
|
|
450
450
|
modelMapping: settings.modelMapping,
|
|
451
|
-
defaultModelId: settings.modelId,
|
|
452
451
|
sessionMeta: settings.session?.meta,
|
|
453
452
|
instructionMapping: settings.instructionMapping,
|
|
454
453
|
outputSchemaMapping: settings.outputSchemaMapping,
|
|
@@ -743,7 +742,6 @@ export function createACPV1<TBuiltinTools extends ToolSet = {}>({
|
|
|
743
742
|
channel,
|
|
744
743
|
proc,
|
|
745
744
|
modelMapping: settings.modelMapping,
|
|
746
|
-
defaultModelId: settings.modelId,
|
|
747
745
|
sessionMeta: settings.session?.meta,
|
|
748
746
|
instructionMapping: settings.instructionMapping,
|
|
749
747
|
outputSchemaMapping: settings.outputSchemaMapping,
|
|
@@ -1058,7 +1056,6 @@ function createSession({
|
|
|
1058
1056
|
channel,
|
|
1059
1057
|
proc,
|
|
1060
1058
|
modelMapping,
|
|
1061
|
-
defaultModelId,
|
|
1062
1059
|
sessionMeta,
|
|
1063
1060
|
instructionMapping,
|
|
1064
1061
|
outputSchemaMapping,
|
|
@@ -1096,7 +1093,6 @@ function createSession({
|
|
|
1096
1093
|
channel: ACPChannel;
|
|
1097
1094
|
proc: Experimental_SandboxProcess | undefined;
|
|
1098
1095
|
modelMapping: ACPModelMapping;
|
|
1099
|
-
defaultModelId: string | undefined;
|
|
1100
1096
|
sessionMeta: Readonly<Record<string, ACPSerializableValue>> | undefined;
|
|
1101
1097
|
instructionMapping: ACPInstructionMapping | undefined;
|
|
1102
1098
|
outputSchemaMapping: ACPOutputSchemaMapping | undefined;
|
|
@@ -1660,7 +1656,7 @@ function createSession({
|
|
|
1660
1656
|
prompt: options.prompt,
|
|
1661
1657
|
harnessId,
|
|
1662
1658
|
});
|
|
1663
|
-
const model = options.model
|
|
1659
|
+
const model = options.model;
|
|
1664
1660
|
const turnStartConfig = createACPTurnStartConfig({
|
|
1665
1661
|
prompt,
|
|
1666
1662
|
tools: options.tools ?? [],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
HarnessV1Authentication,
|
|
3
3
|
HarnessV1CredentialForwarding,
|
|
4
|
+
HarnessV1MintBridgeTokenCallback,
|
|
4
5
|
HarnessV1PermissionMode,
|
|
5
6
|
HarnessV1RequestTransformation,
|
|
6
7
|
HarnessV1StreamPart,
|
|
@@ -192,10 +193,6 @@ export type ACPV1Settings = {
|
|
|
192
193
|
* Maps the HarnessAgent model identifier to an ACP session operation.
|
|
193
194
|
*/
|
|
194
195
|
readonly modelMapping: ACPModelMapping;
|
|
195
|
-
/**
|
|
196
|
-
* @deprecated Use `model` on `HarnessAgent` instead.
|
|
197
|
-
*/
|
|
198
|
-
readonly modelId?: string;
|
|
199
196
|
/**
|
|
200
197
|
* Native skills directory relative to the ACP implementation's home
|
|
201
198
|
* directory. Defaults to `.agents/skills`.
|
|
@@ -229,5 +226,5 @@ export type ACPV1Settings = {
|
|
|
229
226
|
* Creates the authentication token used by the sandbox bridge. Defaults to
|
|
230
227
|
* a random 32-byte hexadecimal token.
|
|
231
228
|
*/
|
|
232
|
-
readonly mintBridgeToken?:
|
|
229
|
+
readonly mintBridgeToken?: HarnessV1MintBridgeTokenCallback;
|
|
233
230
|
};
|