@ai-sdk/harness-acp 1.0.29 → 1.0.31
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 +23 -0
- package/README.md +10 -0
- package/dist/bridge/host-tool-mcp.mjs +1 -1
- package/dist/bridge/index.mjs +41 -12
- package/dist/bridge/index.mjs.map +1 -1
- package/dist/bridge/package.json +2 -2
- package/dist/bridge/pnpm-lock.yaml +57 -55
- package/dist/index.d.ts +34 -6
- package/dist/index.js +125 -106
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/acp-auth.ts +38 -13
- package/src/acp-harness.ts +8 -2
- package/src/index.ts +3 -2
- package/src/v1/acp-v1-harness.ts +84 -42
- package/src/v1/acp-v1-lifecycle.ts +1 -29
- package/src/v1/acp-v1-prompt.ts +1 -1
- package/src/v1/acp-v1-settings.ts +27 -3
- package/src/v1/acp-v1-skills.ts +15 -56
- package/src/v1/bridge/acp-v1-bridge-environment.ts +8 -0
- package/src/v1/bridge/index.ts +9 -6
- package/src/v1/bridge/package.json +2 -2
- package/src/v1/bridge/pnpm-lock.yaml +57 -55
- package/src/v1/implementation.ts +9 -4
- package/src/v1/index.ts +3 -1
package/src/v1/acp-v1-skills.ts
CHANGED
|
@@ -1,39 +1,12 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import type { HarnessV1Skill } from '@ai-sdk/harness';
|
|
4
|
-
import { writeSkills } from '@ai-sdk/harness/utils';
|
|
4
|
+
import { writeSkills, type WriteSkillsResult } from '@ai-sdk/harness/utils';
|
|
5
5
|
import type { Experimental_SandboxSession } from '@ai-sdk/provider-utils';
|
|
6
6
|
|
|
7
7
|
const ACP_SKILL_NAME_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
8
8
|
export const DEFAULT_ACP_SKILLS_DIRECTORY = '.agents/skills';
|
|
9
9
|
|
|
10
|
-
export function createACPSkillsFingerprint({
|
|
11
|
-
skills,
|
|
12
|
-
}: {
|
|
13
|
-
skills: ReadonlyArray<HarnessV1Skill>;
|
|
14
|
-
}): string {
|
|
15
|
-
const canonicalSkills = skills
|
|
16
|
-
.map(skill => ({
|
|
17
|
-
name: skill.name,
|
|
18
|
-
description: skill.description,
|
|
19
|
-
content: skill.content,
|
|
20
|
-
files: [...(skill.files ?? [])]
|
|
21
|
-
.map(file => ({
|
|
22
|
-
path: path.posix.normalize(file.path),
|
|
23
|
-
content: file.content,
|
|
24
|
-
}))
|
|
25
|
-
.sort((left, right) =>
|
|
26
|
-
compareCanonicalStrings({ left: left.path, right: right.path }),
|
|
27
|
-
),
|
|
28
|
-
}))
|
|
29
|
-
.sort((left, right) =>
|
|
30
|
-
compareCanonicalStrings({ left: left.name, right: right.name }),
|
|
31
|
-
);
|
|
32
|
-
return createHash('sha256')
|
|
33
|
-
.update(JSON.stringify(canonicalSkills))
|
|
34
|
-
.digest('hex');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
10
|
export function resolveACPPrivateSessionDirectory({
|
|
38
11
|
sandboxHomeDir,
|
|
39
12
|
sessionWorkDir,
|
|
@@ -62,34 +35,30 @@ export async function materializeACPSkills({
|
|
|
62
35
|
rootDir,
|
|
63
36
|
sessionWorkDir,
|
|
64
37
|
skills,
|
|
65
|
-
shouldMaterialize,
|
|
66
38
|
abortSignal,
|
|
67
39
|
}: {
|
|
68
40
|
sandbox: Experimental_SandboxSession;
|
|
69
41
|
rootDir: string;
|
|
70
42
|
sessionWorkDir: string;
|
|
71
43
|
skills: ReadonlyArray<HarnessV1Skill>;
|
|
72
|
-
shouldMaterialize: boolean;
|
|
73
44
|
abortSignal?: AbortSignal;
|
|
74
|
-
}): Promise<
|
|
45
|
+
}): Promise<WriteSkillsResult> {
|
|
75
46
|
validateACPSkills({ skills });
|
|
76
47
|
assertOutsideSessionWorkDir({ rootDir, sessionWorkDir });
|
|
77
48
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
});
|
|
92
|
-
}
|
|
49
|
+
return writeSkills({
|
|
50
|
+
sandbox,
|
|
51
|
+
rootDir,
|
|
52
|
+
skills,
|
|
53
|
+
abortSignal,
|
|
54
|
+
skillNamePattern: ACP_SKILL_NAME_PATTERN,
|
|
55
|
+
invalidSkillNameMessage: ({ name }) =>
|
|
56
|
+
`Invalid ACP skill name ${JSON.stringify(name)}: expected a kebab-case slug.`,
|
|
57
|
+
invalidSkillFilePathMessage: ({ skillName, filePath }) =>
|
|
58
|
+
`Invalid ACP skill file path ${JSON.stringify(filePath)} for skill ${JSON.stringify(
|
|
59
|
+
skillName,
|
|
60
|
+
)}: expected a relative POSIX path without traversal.`,
|
|
61
|
+
});
|
|
93
62
|
}
|
|
94
63
|
|
|
95
64
|
export function resolveACPSkillsDirectory({
|
|
@@ -225,13 +194,3 @@ function assertOutsideSessionWorkDir({
|
|
|
225
194
|
);
|
|
226
195
|
}
|
|
227
196
|
}
|
|
228
|
-
|
|
229
|
-
function compareCanonicalStrings({
|
|
230
|
-
left,
|
|
231
|
-
right,
|
|
232
|
-
}: {
|
|
233
|
-
left: string;
|
|
234
|
-
right: string;
|
|
235
|
-
}): number {
|
|
236
|
-
return left < right ? -1 : left > right ? 1 : 0;
|
|
237
|
-
}
|
|
@@ -59,6 +59,8 @@ export type ACPBridgeConfiguration = {
|
|
|
59
59
|
readonly providerAuthentication?: ACPResolvedProviderAuthentication;
|
|
60
60
|
readonly providerEnvironment?: Readonly<Record<string, string>>;
|
|
61
61
|
readonly sessionMeta?: Readonly<Record<string, ACPSerializableValue>>;
|
|
62
|
+
readonly implementationArgs?: ReadonlyArray<string>;
|
|
63
|
+
readonly implementationEnv?: Readonly<Record<string, string>>;
|
|
62
64
|
};
|
|
63
65
|
|
|
64
66
|
const bridgeConfigurationSchema: z.ZodType<ACPBridgeConfiguration> = z.object({
|
|
@@ -66,6 +68,8 @@ const bridgeConfigurationSchema: z.ZodType<ACPBridgeConfiguration> = z.object({
|
|
|
66
68
|
providerAuthentication: providerAuthenticationSchema.optional(),
|
|
67
69
|
providerEnvironment: z.record(z.string(), z.string()).optional(),
|
|
68
70
|
sessionMeta: serializableRecordSchema.optional(),
|
|
71
|
+
implementationArgs: z.array(z.string()).optional(),
|
|
72
|
+
implementationEnv: z.record(z.string(), z.string()).optional(),
|
|
69
73
|
});
|
|
70
74
|
|
|
71
75
|
export function createACPBridgeEnvironment({
|
|
@@ -73,6 +77,8 @@ export function createACPBridgeEnvironment({
|
|
|
73
77
|
providerAuthentication,
|
|
74
78
|
providerEnvironment,
|
|
75
79
|
sessionMeta,
|
|
80
|
+
implementationArgs,
|
|
81
|
+
implementationEnv,
|
|
76
82
|
}: ACPBridgeConfiguration): Record<string, string> {
|
|
77
83
|
return {
|
|
78
84
|
[ACP_BRIDGE_CONFIGURATION_ENV]: JSON.stringify({
|
|
@@ -80,6 +86,8 @@ export function createACPBridgeEnvironment({
|
|
|
80
86
|
...(providerAuthentication == null ? {} : { providerAuthentication }),
|
|
81
87
|
...(providerEnvironment == null ? {} : { providerEnvironment }),
|
|
82
88
|
...(sessionMeta == null ? {} : { sessionMeta }),
|
|
89
|
+
...(implementationArgs == null ? {} : { implementationArgs }),
|
|
90
|
+
...(implementationEnv == null ? {} : { implementationEnv }),
|
|
83
91
|
}),
|
|
84
92
|
};
|
|
85
93
|
}
|
package/src/v1/bridge/index.ts
CHANGED
|
@@ -413,15 +413,18 @@ async function ensureSession({
|
|
|
413
413
|
instructions: start.instructions,
|
|
414
414
|
instructionMapping: start.instructionMapping,
|
|
415
415
|
sessionMeta: bridgeConfiguration.sessionMeta,
|
|
416
|
-
environment:
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
416
|
+
environment: {
|
|
417
|
+
...createChildEnvironment({
|
|
418
|
+
launchEnv,
|
|
419
|
+
implementationDir,
|
|
420
|
+
privateHome: implementation.privateHome,
|
|
421
|
+
}),
|
|
422
|
+
...bridgeConfiguration.implementationEnv,
|
|
423
|
+
},
|
|
421
424
|
});
|
|
422
425
|
child = spawn(
|
|
423
426
|
`${implementationDir}/${implementation.executablePath}`,
|
|
424
|
-
[...implementation.args],
|
|
427
|
+
[...(bridgeConfiguration.implementationArgs ?? implementation.args)],
|
|
425
428
|
{
|
|
426
429
|
cwd: workDir,
|
|
427
430
|
env: instructionConfiguration.environment,
|
|
@@ -9,11 +9,11 @@ importers:
|
|
|
9
9
|
.:
|
|
10
10
|
dependencies:
|
|
11
11
|
'@agentclientprotocol/sdk':
|
|
12
|
-
specifier: 1.
|
|
13
|
-
version: 1.
|
|
12
|
+
specifier: 1.4.0
|
|
13
|
+
version: 1.4.0(zod@4.4.3)
|
|
14
14
|
'@modelcontextprotocol/sdk':
|
|
15
|
-
specifier: 1.
|
|
16
|
-
version: 1.
|
|
15
|
+
specifier: 1.30.0
|
|
16
|
+
version: 1.30.0(zod@4.4.3)
|
|
17
17
|
ws:
|
|
18
18
|
specifier: 8.21.0
|
|
19
19
|
version: 8.21.0
|
|
@@ -23,19 +23,19 @@ importers:
|
|
|
23
23
|
|
|
24
24
|
packages:
|
|
25
25
|
|
|
26
|
-
'@agentclientprotocol/sdk@1.
|
|
27
|
-
resolution: {integrity: sha512
|
|
26
|
+
'@agentclientprotocol/sdk@1.4.0':
|
|
27
|
+
resolution: {integrity: sha512-/eufudw+aFY1LKLolT6yFE6UMmYRl7fMJ/DEONSIyR6wI3slHWITBsANRGqXEY8FRzqUxwh7QEaGiZHcJPVThg==}
|
|
28
28
|
peerDependencies:
|
|
29
29
|
zod: ^3.25.0 || ^4.0.0
|
|
30
30
|
|
|
31
|
-
'@hono/node-server@1.
|
|
32
|
-
resolution: {integrity: sha512-
|
|
33
|
-
engines: {node: '>=
|
|
31
|
+
'@hono/node-server@2.1.1':
|
|
32
|
+
resolution: {integrity: sha512-ELuehkj5VCBdgEw9zs+ivkKwyzzUCSQuE96YmiPvn1ECBoZCczbFXJLeEGMTYjphP6gydh4pHMqEYPVMYUVgQg==}
|
|
33
|
+
engines: {node: '>=20'}
|
|
34
34
|
peerDependencies:
|
|
35
35
|
hono: ^4
|
|
36
36
|
|
|
37
|
-
'@modelcontextprotocol/sdk@1.
|
|
38
|
-
resolution: {integrity: sha512-
|
|
37
|
+
'@modelcontextprotocol/sdk@1.30.0':
|
|
38
|
+
resolution: {integrity: sha512-xKd8OIzlqNzcqcNumGAa6g+PW2kjD5vrpcKOnfldAUPP3j7lnqMPwlTXQm8gF+UwH72z0lqaRbjr9hqGz0eITA==}
|
|
39
39
|
engines: {node: '>=18'}
|
|
40
40
|
peerDependencies:
|
|
41
41
|
'@cfworker/json-schema': ^4.1.1
|
|
@@ -83,8 +83,8 @@ packages:
|
|
|
83
83
|
resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==}
|
|
84
84
|
engines: {node: '>= 0.6'}
|
|
85
85
|
|
|
86
|
-
content-type@2.
|
|
87
|
-
resolution: {integrity: sha512-
|
|
86
|
+
content-type@2.1.0:
|
|
87
|
+
resolution: {integrity: sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==}
|
|
88
88
|
engines: {node: '>=18'}
|
|
89
89
|
|
|
90
90
|
cookie-signature@1.2.2:
|
|
@@ -146,16 +146,16 @@ packages:
|
|
|
146
146
|
resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==}
|
|
147
147
|
engines: {node: '>= 0.6'}
|
|
148
148
|
|
|
149
|
-
eventsource-parser@3.1.
|
|
150
|
-
resolution: {integrity: sha512-
|
|
149
|
+
eventsource-parser@3.1.1:
|
|
150
|
+
resolution: {integrity: sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ==}
|
|
151
151
|
engines: {node: '>=18.0.0'}
|
|
152
152
|
|
|
153
153
|
eventsource@3.0.7:
|
|
154
154
|
resolution: {integrity: sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==}
|
|
155
155
|
engines: {node: '>=18.0.0'}
|
|
156
156
|
|
|
157
|
-
express-rate-limit@8.6.
|
|
158
|
-
resolution: {integrity: sha512-
|
|
157
|
+
express-rate-limit@8.6.2:
|
|
158
|
+
resolution: {integrity: sha512-YH4ru+eOJxQABscKFfRCy9R7x9QFGdezclVMwwgFFndzS2Xnm0uo6B0ABZsLhcpeptGv2qvuJVWlQr9gQZoC3A==}
|
|
159
159
|
engines: {node: '>= 16'}
|
|
160
160
|
peerDependencies:
|
|
161
161
|
express: '>= 4.11'
|
|
@@ -167,8 +167,8 @@ packages:
|
|
|
167
167
|
fast-deep-equal@3.1.3:
|
|
168
168
|
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
|
|
169
169
|
|
|
170
|
-
fast-uri@3.1.
|
|
171
|
-
resolution: {integrity: sha512-
|
|
170
|
+
fast-uri@3.1.6:
|
|
171
|
+
resolution: {integrity: sha512-7Ical1vFEMr0onbVzEDIreM22I4khW+fzyQPwvAFWBp1iwdshSZRsL4jjRvPG9JP1uiqMHRto+YU6R2/CzDz5Q==}
|
|
172
172
|
|
|
173
173
|
finalhandler@2.1.1:
|
|
174
174
|
resolution: {integrity: sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==}
|
|
@@ -205,8 +205,8 @@ packages:
|
|
|
205
205
|
resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==}
|
|
206
206
|
engines: {node: '>= 0.4'}
|
|
207
207
|
|
|
208
|
-
hono@4.
|
|
209
|
-
resolution: {integrity: sha512-
|
|
208
|
+
hono@4.13.4:
|
|
209
|
+
resolution: {integrity: sha512-AGEwKIyRMHRv1t8Wjwa3LHxQ61X5CqrdFT+4BRNTpqS5aJNnpl5WLjADb7vFlJzI/8uK7T5QLVApCMQKNa3LgQ==}
|
|
210
210
|
engines: {node: '>=16.9.0'}
|
|
211
211
|
|
|
212
212
|
http-errors@2.0.1:
|
|
@@ -220,8 +220,8 @@ packages:
|
|
|
220
220
|
inherits@2.0.4:
|
|
221
221
|
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
|
|
222
222
|
|
|
223
|
-
ip-address@10.
|
|
224
|
-
resolution: {integrity: sha512
|
|
223
|
+
ip-address@10.5.0:
|
|
224
|
+
resolution: {integrity: sha512-R5SnVLJmgYYvf2F2ZgwSBnelz5G4q5AxIC277GDfUaNbrZKNANcBC7RHqYYePlszf4kBolVkJauG0ZjHHFh55g==}
|
|
225
225
|
engines: {node: '>= 12'}
|
|
226
226
|
|
|
227
227
|
ipaddr.js@1.9.1:
|
|
@@ -234,8 +234,8 @@ packages:
|
|
|
234
234
|
isexe@2.0.0:
|
|
235
235
|
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
|
|
236
236
|
|
|
237
|
-
jose@6.2.
|
|
238
|
-
resolution: {integrity: sha512-
|
|
237
|
+
jose@6.2.10:
|
|
238
|
+
resolution: {integrity: sha512-iiW7J9qRFlGxvCOIBDBDxFePQSn7ZMAnrYGhrrOo6siO/MIqwfyilLR27pkfDgUk+raLuzADS8A3S/KLBisc0g==}
|
|
239
239
|
|
|
240
240
|
json-schema-traverse@1.0.0:
|
|
241
241
|
resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==}
|
|
@@ -247,8 +247,8 @@ packages:
|
|
|
247
247
|
resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
|
|
248
248
|
engines: {node: '>= 0.4'}
|
|
249
249
|
|
|
250
|
-
media-typer@1.1.
|
|
251
|
-
resolution: {integrity: sha512-
|
|
250
|
+
media-typer@1.1.1:
|
|
251
|
+
resolution: {integrity: sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ==}
|
|
252
252
|
engines: {node: '>= 0.8'}
|
|
253
253
|
|
|
254
254
|
merge-descriptors@2.0.0:
|
|
@@ -266,9 +266,9 @@ packages:
|
|
|
266
266
|
ms@2.1.3:
|
|
267
267
|
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
|
|
268
268
|
|
|
269
|
-
negotiator@1.
|
|
270
|
-
resolution: {integrity: sha512-
|
|
271
|
-
engines: {node: '>=
|
|
269
|
+
negotiator@1.1.0:
|
|
270
|
+
resolution: {integrity: sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==}
|
|
271
|
+
engines: {node: '>=18'}
|
|
272
272
|
|
|
273
273
|
object-assign@4.1.1:
|
|
274
274
|
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
|
|
@@ -412,28 +412,28 @@ packages:
|
|
|
412
412
|
|
|
413
413
|
snapshots:
|
|
414
414
|
|
|
415
|
-
'@agentclientprotocol/sdk@1.
|
|
415
|
+
'@agentclientprotocol/sdk@1.4.0(zod@4.4.3)':
|
|
416
416
|
dependencies:
|
|
417
417
|
zod: 4.4.3
|
|
418
418
|
|
|
419
|
-
'@hono/node-server@1.
|
|
419
|
+
'@hono/node-server@2.1.1(hono@4.13.4)':
|
|
420
420
|
dependencies:
|
|
421
|
-
hono: 4.
|
|
421
|
+
hono: 4.13.4
|
|
422
422
|
|
|
423
|
-
'@modelcontextprotocol/sdk@1.
|
|
423
|
+
'@modelcontextprotocol/sdk@1.30.0(zod@4.4.3)':
|
|
424
424
|
dependencies:
|
|
425
|
-
'@hono/node-server': 1.
|
|
425
|
+
'@hono/node-server': 2.1.1(hono@4.13.4)
|
|
426
426
|
ajv: 8.20.0
|
|
427
427
|
ajv-formats: 3.0.1(ajv@8.20.0)
|
|
428
428
|
content-type: 1.0.5
|
|
429
429
|
cors: 2.8.6
|
|
430
430
|
cross-spawn: 7.0.6
|
|
431
431
|
eventsource: 3.0.7
|
|
432
|
-
eventsource-parser: 3.1.
|
|
432
|
+
eventsource-parser: 3.1.1
|
|
433
433
|
express: 5.2.1
|
|
434
|
-
express-rate-limit: 8.6.
|
|
435
|
-
hono: 4.
|
|
436
|
-
jose: 6.2.
|
|
434
|
+
express-rate-limit: 8.6.2(express@5.2.1)
|
|
435
|
+
hono: 4.13.4
|
|
436
|
+
jose: 6.2.10
|
|
437
437
|
json-schema-typed: 8.0.2
|
|
438
438
|
pkce-challenge: 5.0.1
|
|
439
439
|
raw-body: 3.0.2
|
|
@@ -445,7 +445,7 @@ snapshots:
|
|
|
445
445
|
accepts@2.0.0:
|
|
446
446
|
dependencies:
|
|
447
447
|
mime-types: 3.0.2
|
|
448
|
-
negotiator: 1.
|
|
448
|
+
negotiator: 1.1.0
|
|
449
449
|
|
|
450
450
|
ajv-formats@3.0.1(ajv@8.20.0):
|
|
451
451
|
optionalDependencies:
|
|
@@ -454,14 +454,14 @@ snapshots:
|
|
|
454
454
|
ajv@8.20.0:
|
|
455
455
|
dependencies:
|
|
456
456
|
fast-deep-equal: 3.1.3
|
|
457
|
-
fast-uri: 3.1.
|
|
457
|
+
fast-uri: 3.1.6
|
|
458
458
|
json-schema-traverse: 1.0.0
|
|
459
459
|
require-from-string: 2.0.2
|
|
460
460
|
|
|
461
461
|
body-parser@2.3.0:
|
|
462
462
|
dependencies:
|
|
463
463
|
bytes: 3.1.2
|
|
464
|
-
content-type: 2.
|
|
464
|
+
content-type: 2.1.0
|
|
465
465
|
debug: 4.4.3
|
|
466
466
|
http-errors: 2.0.1
|
|
467
467
|
iconv-lite: 0.7.3
|
|
@@ -488,7 +488,7 @@ snapshots:
|
|
|
488
488
|
|
|
489
489
|
content-type@1.0.5: {}
|
|
490
490
|
|
|
491
|
-
content-type@2.
|
|
491
|
+
content-type@2.1.0: {}
|
|
492
492
|
|
|
493
493
|
cookie-signature@1.2.2: {}
|
|
494
494
|
|
|
@@ -533,17 +533,17 @@ snapshots:
|
|
|
533
533
|
|
|
534
534
|
etag@1.8.1: {}
|
|
535
535
|
|
|
536
|
-
eventsource-parser@3.1.
|
|
536
|
+
eventsource-parser@3.1.1: {}
|
|
537
537
|
|
|
538
538
|
eventsource@3.0.7:
|
|
539
539
|
dependencies:
|
|
540
|
-
eventsource-parser: 3.1.
|
|
540
|
+
eventsource-parser: 3.1.1
|
|
541
541
|
|
|
542
|
-
express-rate-limit@8.6.
|
|
542
|
+
express-rate-limit@8.6.2(express@5.2.1):
|
|
543
543
|
dependencies:
|
|
544
544
|
debug: 4.4.3
|
|
545
545
|
express: 5.2.1
|
|
546
|
-
ip-address: 10.
|
|
546
|
+
ip-address: 10.5.0
|
|
547
547
|
transitivePeerDependencies:
|
|
548
548
|
- supports-color
|
|
549
549
|
|
|
@@ -582,7 +582,7 @@ snapshots:
|
|
|
582
582
|
|
|
583
583
|
fast-deep-equal@3.1.3: {}
|
|
584
584
|
|
|
585
|
-
fast-uri@3.1.
|
|
585
|
+
fast-uri@3.1.6: {}
|
|
586
586
|
|
|
587
587
|
finalhandler@2.1.1:
|
|
588
588
|
dependencies:
|
|
@@ -627,7 +627,7 @@ snapshots:
|
|
|
627
627
|
dependencies:
|
|
628
628
|
function-bind: 1.1.2
|
|
629
629
|
|
|
630
|
-
hono@4.
|
|
630
|
+
hono@4.13.4: {}
|
|
631
631
|
|
|
632
632
|
http-errors@2.0.1:
|
|
633
633
|
dependencies:
|
|
@@ -643,7 +643,7 @@ snapshots:
|
|
|
643
643
|
|
|
644
644
|
inherits@2.0.4: {}
|
|
645
645
|
|
|
646
|
-
ip-address@10.
|
|
646
|
+
ip-address@10.5.0: {}
|
|
647
647
|
|
|
648
648
|
ipaddr.js@1.9.1: {}
|
|
649
649
|
|
|
@@ -651,7 +651,7 @@ snapshots:
|
|
|
651
651
|
|
|
652
652
|
isexe@2.0.0: {}
|
|
653
653
|
|
|
654
|
-
jose@6.2.
|
|
654
|
+
jose@6.2.10: {}
|
|
655
655
|
|
|
656
656
|
json-schema-traverse@1.0.0: {}
|
|
657
657
|
|
|
@@ -659,7 +659,7 @@ snapshots:
|
|
|
659
659
|
|
|
660
660
|
math-intrinsics@1.1.0: {}
|
|
661
661
|
|
|
662
|
-
media-typer@1.1.
|
|
662
|
+
media-typer@1.1.1: {}
|
|
663
663
|
|
|
664
664
|
merge-descriptors@2.0.0: {}
|
|
665
665
|
|
|
@@ -671,7 +671,9 @@ snapshots:
|
|
|
671
671
|
|
|
672
672
|
ms@2.1.3: {}
|
|
673
673
|
|
|
674
|
-
negotiator@1.
|
|
674
|
+
negotiator@1.1.0:
|
|
675
|
+
dependencies:
|
|
676
|
+
content-type: 2.1.0
|
|
675
677
|
|
|
676
678
|
object-assign@4.1.1: {}
|
|
677
679
|
|
|
@@ -793,8 +795,8 @@ snapshots:
|
|
|
793
795
|
|
|
794
796
|
type-is@2.1.0:
|
|
795
797
|
dependencies:
|
|
796
|
-
content-type: 2.
|
|
797
|
-
media-typer: 1.1.
|
|
798
|
+
content-type: 2.1.0
|
|
799
|
+
media-typer: 1.1.1
|
|
798
800
|
mime-types: 3.0.2
|
|
799
801
|
|
|
800
802
|
unpipe@1.0.0: {}
|
package/src/v1/implementation.ts
CHANGED
|
@@ -277,20 +277,25 @@ ${implementation.source.command}
|
|
|
277
277
|
export function resolveImplementationEnvironment({
|
|
278
278
|
implementation,
|
|
279
279
|
env,
|
|
280
|
+
credentialEnv = env,
|
|
280
281
|
}: {
|
|
281
282
|
implementation: ACPImplementation;
|
|
282
283
|
env: Readonly<Record<string, string | undefined>>;
|
|
284
|
+
credentialEnv?: Readonly<Record<string, string | undefined>>;
|
|
283
285
|
}): Record<string, string> {
|
|
284
286
|
const forwardedEnvironment: Record<string, string> = {};
|
|
285
|
-
for (const name of [
|
|
286
|
-
...(implementation.forwardEnv ?? []),
|
|
287
|
-
...(implementation.credentialEnv ?? []),
|
|
288
|
-
]) {
|
|
287
|
+
for (const name of implementation.forwardEnv ?? []) {
|
|
289
288
|
const value = env[name];
|
|
290
289
|
if (value != null && value.length > 0) {
|
|
291
290
|
forwardedEnvironment[name] = value;
|
|
292
291
|
}
|
|
293
292
|
}
|
|
293
|
+
for (const name of implementation.credentialEnv ?? []) {
|
|
294
|
+
const value = credentialEnv[name];
|
|
295
|
+
if (value != null && value.length > 0) {
|
|
296
|
+
forwardedEnvironment[name] = value;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
294
299
|
return {
|
|
295
300
|
...forwardedEnvironment,
|
|
296
301
|
...implementation.env,
|
package/src/v1/index.ts
CHANGED
|
@@ -2,8 +2,11 @@ export { createACPV1 } from './acp-v1-harness';
|
|
|
2
2
|
export type {
|
|
3
3
|
ACPCredentialBrokering,
|
|
4
4
|
ACPAuthentication,
|
|
5
|
+
ACPAuthenticationMode,
|
|
5
6
|
ACPInstallCommandSource,
|
|
6
7
|
ACPInstructionMapping,
|
|
8
|
+
ACPModelResolution,
|
|
9
|
+
ACPModelResolver,
|
|
7
10
|
ACPNpmLockedSource,
|
|
8
11
|
ACPNpmSimpleSource,
|
|
9
12
|
ACPOutputSchemaMapping,
|
|
@@ -11,7 +14,6 @@ export type {
|
|
|
11
14
|
ACPPermissionModeTarget,
|
|
12
15
|
ACPProfileValue,
|
|
13
16
|
ACPProviderAuthentication,
|
|
14
|
-
ACPProviderAuthenticationMode,
|
|
15
17
|
ACPSerializablePrimitive,
|
|
16
18
|
ACPSerializableValue,
|
|
17
19
|
ACPSource,
|