@tangle-network/agent-interface 0.29.0 → 0.31.0
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/agent-candidate-execution-plan-schema.d.ts +20 -0
- package/dist/agent-candidate-execution-plan-schema.js +1 -0
- package/dist/agent-candidate-outcome-schema.d.ts +4 -4
- package/dist/agent-candidate-profile-schema.d.ts +3 -28
- package/dist/agent-candidate-profile-schema.js +15 -27
- package/dist/agent-candidate-promotion-schema.d.ts +185 -94
- package/dist/agent-candidate-promotion-schema.js +116 -16
- package/dist/agent-candidate-receipt-schema.d.ts +10 -2
- package/dist/agent-candidate-schema.d.ts +1 -14
- package/dist/agent-candidate.d.ts +65 -3
- package/dist/agent-profile.d.ts +33 -9
- package/dist/harness-capabilities.d.ts +2 -2
- package/dist/harness-capabilities.js +23 -14
- package/dist/profile-schema.d.ts +56 -84
- package/dist/profile-schema.js +72 -29
- package/dist/profile-security.js +2 -0
- package/package.json +1 -1
package/dist/profile-schema.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type { AgentProfile } from "./agent-profile.js";
|
|
2
|
+
import type { AgentProfile, AgentProfileMcpServer } from "./agent-profile.js";
|
|
3
3
|
import type { AgentProfileDiff } from "./profile-diff.js";
|
|
4
4
|
import { type SandboxSizePreset } from "./sandbox-size.js";
|
|
5
5
|
export declare const agentProfilePermissionValueSchema: z.ZodEnum<{
|
|
@@ -20,28 +20,28 @@ export declare const agentProfileResourceRefSchema: z.ZodUnion<readonly [z.ZodOb
|
|
|
20
20
|
kind: z.ZodLiteral<"inline">;
|
|
21
21
|
name: z.ZodString;
|
|
22
22
|
content: z.ZodString;
|
|
23
|
-
}, z.core.$
|
|
23
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
24
24
|
kind: z.ZodLiteral<"github">;
|
|
25
25
|
repository: z.ZodOptional<z.ZodString>;
|
|
26
26
|
path: z.ZodString;
|
|
27
27
|
ref: z.ZodOptional<z.ZodString>;
|
|
28
28
|
name: z.ZodOptional<z.ZodString>;
|
|
29
|
-
}, z.core.$
|
|
29
|
+
}, z.core.$strict>]>;
|
|
30
30
|
export declare const agentProfileFileMountSchema: z.ZodObject<{
|
|
31
31
|
path: z.ZodString;
|
|
32
32
|
resource: z.ZodUnion<readonly [z.ZodObject<{
|
|
33
33
|
kind: z.ZodLiteral<"inline">;
|
|
34
34
|
name: z.ZodString;
|
|
35
35
|
content: z.ZodString;
|
|
36
|
-
}, z.core.$
|
|
36
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
37
37
|
kind: z.ZodLiteral<"github">;
|
|
38
38
|
repository: z.ZodOptional<z.ZodString>;
|
|
39
39
|
path: z.ZodString;
|
|
40
40
|
ref: z.ZodOptional<z.ZodString>;
|
|
41
41
|
name: z.ZodOptional<z.ZodString>;
|
|
42
|
-
}, z.core.$
|
|
42
|
+
}, z.core.$strict>]>;
|
|
43
43
|
executable: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
-
}, z.core.$
|
|
44
|
+
}, z.core.$strict>;
|
|
45
45
|
export declare const agentProfileResourcesSchema: z.ZodObject<{
|
|
46
46
|
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
47
47
|
path: z.ZodString;
|
|
@@ -49,72 +49,72 @@ export declare const agentProfileResourcesSchema: z.ZodObject<{
|
|
|
49
49
|
kind: z.ZodLiteral<"inline">;
|
|
50
50
|
name: z.ZodString;
|
|
51
51
|
content: z.ZodString;
|
|
52
|
-
}, z.core.$
|
|
52
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53
53
|
kind: z.ZodLiteral<"github">;
|
|
54
54
|
repository: z.ZodOptional<z.ZodString>;
|
|
55
55
|
path: z.ZodString;
|
|
56
56
|
ref: z.ZodOptional<z.ZodString>;
|
|
57
57
|
name: z.ZodOptional<z.ZodString>;
|
|
58
|
-
}, z.core.$
|
|
58
|
+
}, z.core.$strict>]>;
|
|
59
59
|
executable: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
-
}, z.core.$
|
|
60
|
+
}, z.core.$strict>>>;
|
|
61
61
|
tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
62
62
|
kind: z.ZodLiteral<"inline">;
|
|
63
63
|
name: z.ZodString;
|
|
64
64
|
content: z.ZodString;
|
|
65
|
-
}, z.core.$
|
|
65
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
66
66
|
kind: z.ZodLiteral<"github">;
|
|
67
67
|
repository: z.ZodOptional<z.ZodString>;
|
|
68
68
|
path: z.ZodString;
|
|
69
69
|
ref: z.ZodOptional<z.ZodString>;
|
|
70
70
|
name: z.ZodOptional<z.ZodString>;
|
|
71
|
-
}, z.core.$
|
|
71
|
+
}, z.core.$strict>]>>>;
|
|
72
72
|
skills: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
73
73
|
kind: z.ZodLiteral<"inline">;
|
|
74
74
|
name: z.ZodString;
|
|
75
75
|
content: z.ZodString;
|
|
76
|
-
}, z.core.$
|
|
76
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
77
77
|
kind: z.ZodLiteral<"github">;
|
|
78
78
|
repository: z.ZodOptional<z.ZodString>;
|
|
79
79
|
path: z.ZodString;
|
|
80
80
|
ref: z.ZodOptional<z.ZodString>;
|
|
81
81
|
name: z.ZodOptional<z.ZodString>;
|
|
82
|
-
}, z.core.$
|
|
82
|
+
}, z.core.$strict>]>>>;
|
|
83
83
|
agents: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
84
84
|
kind: z.ZodLiteral<"inline">;
|
|
85
85
|
name: z.ZodString;
|
|
86
86
|
content: z.ZodString;
|
|
87
|
-
}, z.core.$
|
|
87
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
88
88
|
kind: z.ZodLiteral<"github">;
|
|
89
89
|
repository: z.ZodOptional<z.ZodString>;
|
|
90
90
|
path: z.ZodString;
|
|
91
91
|
ref: z.ZodOptional<z.ZodString>;
|
|
92
92
|
name: z.ZodOptional<z.ZodString>;
|
|
93
|
-
}, z.core.$
|
|
93
|
+
}, z.core.$strict>]>>>;
|
|
94
94
|
commands: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
95
95
|
kind: z.ZodLiteral<"inline">;
|
|
96
96
|
name: z.ZodString;
|
|
97
97
|
content: z.ZodString;
|
|
98
|
-
}, z.core.$
|
|
98
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
99
99
|
kind: z.ZodLiteral<"github">;
|
|
100
100
|
repository: z.ZodOptional<z.ZodString>;
|
|
101
101
|
path: z.ZodString;
|
|
102
102
|
ref: z.ZodOptional<z.ZodString>;
|
|
103
103
|
name: z.ZodOptional<z.ZodString>;
|
|
104
|
-
}, z.core.$
|
|
104
|
+
}, z.core.$strict>]>>>;
|
|
105
105
|
instructions: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
106
106
|
kind: z.ZodLiteral<"inline">;
|
|
107
107
|
name: z.ZodString;
|
|
108
108
|
content: z.ZodString;
|
|
109
|
-
}, z.core.$
|
|
109
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
110
110
|
kind: z.ZodLiteral<"github">;
|
|
111
111
|
repository: z.ZodOptional<z.ZodString>;
|
|
112
112
|
path: z.ZodString;
|
|
113
113
|
ref: z.ZodOptional<z.ZodString>;
|
|
114
114
|
name: z.ZodOptional<z.ZodString>;
|
|
115
|
-
}, z.core.$
|
|
115
|
+
}, z.core.$strict>]>]>>;
|
|
116
116
|
failOnError: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
-
}, z.core.$
|
|
117
|
+
}, z.core.$strict>;
|
|
118
118
|
export declare const reasoningEffortSchema: z.ZodEnum<{
|
|
119
119
|
none: "none";
|
|
120
120
|
minimal: "minimal";
|
|
@@ -138,11 +138,11 @@ export declare const agentProfileModelHintsSchema: z.ZodObject<{
|
|
|
138
138
|
ultracode: "ultracode";
|
|
139
139
|
}>>;
|
|
140
140
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
141
|
-
}, z.core.$
|
|
141
|
+
}, z.core.$strict>;
|
|
142
142
|
export declare const agentProfilePromptSchema: z.ZodObject<{
|
|
143
143
|
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
144
144
|
instructions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
145
|
-
}, z.core.$
|
|
145
|
+
}, z.core.$strict>;
|
|
146
146
|
export declare const agentSubagentProfileSchema: z.ZodObject<{
|
|
147
147
|
description: z.ZodOptional<z.ZodString>;
|
|
148
148
|
prompt: z.ZodOptional<z.ZodString>;
|
|
@@ -159,14 +159,14 @@ export declare const agentSubagentProfileSchema: z.ZodObject<{
|
|
|
159
159
|
}>>]>>>;
|
|
160
160
|
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
161
161
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
162
|
-
}, z.core.$
|
|
162
|
+
}, z.core.$strict>;
|
|
163
163
|
export declare const agentProfileHookCommandSchema: z.ZodObject<{
|
|
164
164
|
command: z.ZodString;
|
|
165
165
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
166
166
|
blocking: z.ZodOptional<z.ZodBoolean>;
|
|
167
167
|
matcher: z.ZodOptional<z.ZodString>;
|
|
168
168
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
169
|
-
}, z.core.$
|
|
169
|
+
}, z.core.$strict>;
|
|
170
170
|
export declare const agentProfileModeSchema: z.ZodObject<{
|
|
171
171
|
description: z.ZodOptional<z.ZodString>;
|
|
172
172
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -182,37 +182,23 @@ export declare const agentProfileModeSchema: z.ZodObject<{
|
|
|
182
182
|
deny: "deny";
|
|
183
183
|
}>>]>>>;
|
|
184
184
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
185
|
-
}, z.core.$
|
|
185
|
+
}, z.core.$strict>;
|
|
186
186
|
export declare const agentProfileConfidentialSchema: z.ZodObject<{
|
|
187
187
|
tee: z.ZodOptional<z.ZodString>;
|
|
188
188
|
attestationNonce: z.ZodOptional<z.ZodString>;
|
|
189
189
|
sealed: z.ZodOptional<z.ZodBoolean>;
|
|
190
190
|
attestationRefresh: z.ZodOptional<z.ZodBoolean>;
|
|
191
|
-
}, z.core.$
|
|
192
|
-
export declare const agentProfileMcpServerSchema: z.
|
|
193
|
-
transport: z.ZodOptional<z.ZodEnum<{
|
|
194
|
-
stdio: "stdio";
|
|
195
|
-
sse: "sse";
|
|
196
|
-
http: "http";
|
|
197
|
-
}>>;
|
|
198
|
-
command: z.ZodOptional<z.ZodString>;
|
|
199
|
-
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
200
|
-
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
201
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
202
|
-
url: z.ZodOptional<z.ZodString>;
|
|
203
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
204
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
205
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
206
|
-
}, z.core.$strip>;
|
|
191
|
+
}, z.core.$strict>;
|
|
192
|
+
export declare const agentProfileMcpServerSchema: z.ZodType<AgentProfileMcpServer>;
|
|
207
193
|
export declare const agentProfileConnectionSchema: z.ZodObject<{
|
|
208
194
|
connectionId: z.ZodString;
|
|
209
195
|
capabilities: z.ZodArray<z.ZodString>;
|
|
210
196
|
alias: z.ZodOptional<z.ZodString>;
|
|
211
|
-
}, z.core.$
|
|
197
|
+
}, z.core.$strict>;
|
|
212
198
|
export declare const agentProfilePromptRemovalSchema: z.ZodObject<{
|
|
213
199
|
systemPrompt: z.ZodOptional<z.ZodLiteral<true>>;
|
|
214
200
|
instructions: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
215
|
-
}, z.core.$
|
|
201
|
+
}, z.core.$strict>;
|
|
216
202
|
export declare const agentProfileResourceRemovalSchema: z.ZodObject<{
|
|
217
203
|
files: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
218
204
|
tools: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
@@ -221,14 +207,14 @@ export declare const agentProfileResourceRemovalSchema: z.ZodObject<{
|
|
|
221
207
|
commands: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
222
208
|
instructions: z.ZodOptional<z.ZodLiteral<true>>;
|
|
223
209
|
failOnError: z.ZodOptional<z.ZodLiteral<true>>;
|
|
224
|
-
}, z.core.$
|
|
210
|
+
}, z.core.$strict>;
|
|
225
211
|
export declare const agentProfileDiffRemovalSchema: z.ZodObject<{
|
|
226
212
|
identity: z.ZodOptional<z.ZodLiteral<true>>;
|
|
227
213
|
tags: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
228
214
|
prompt: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
|
|
229
215
|
systemPrompt: z.ZodOptional<z.ZodLiteral<true>>;
|
|
230
216
|
instructions: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
231
|
-
}, z.core.$
|
|
217
|
+
}, z.core.$strict>]>>;
|
|
232
218
|
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
233
219
|
harness: z.ZodOptional<z.ZodLiteral<true>>;
|
|
234
220
|
permissions: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
@@ -244,13 +230,13 @@ export declare const agentProfileDiffRemovalSchema: z.ZodObject<{
|
|
|
244
230
|
commands: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
245
231
|
instructions: z.ZodOptional<z.ZodLiteral<true>>;
|
|
246
232
|
failOnError: z.ZodOptional<z.ZodLiteral<true>>;
|
|
247
|
-
}, z.core.$
|
|
233
|
+
}, z.core.$strict>]>>;
|
|
248
234
|
hooks: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
249
235
|
modes: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
250
236
|
confidential: z.ZodOptional<z.ZodLiteral<true>>;
|
|
251
237
|
metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
252
238
|
extensions: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
253
|
-
}, z.core.$
|
|
239
|
+
}, z.core.$strict>;
|
|
254
240
|
/**
|
|
255
241
|
* The complete provider-neutral agent profile schema — the runtime validator for
|
|
256
242
|
* the canonical {@link AgentProfile} TS contract. Kept structurally in lock-step
|
|
@@ -264,7 +250,7 @@ export declare const agentProfileSchema: z.ZodObject<{
|
|
|
264
250
|
prompt: z.ZodOptional<z.ZodObject<{
|
|
265
251
|
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
266
252
|
instructions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
267
|
-
}, z.core.$
|
|
253
|
+
}, z.core.$strict>>;
|
|
268
254
|
model: z.ZodOptional<z.ZodObject<{
|
|
269
255
|
default: z.ZodOptional<z.ZodString>;
|
|
270
256
|
small: z.ZodOptional<z.ZodString>;
|
|
@@ -279,7 +265,7 @@ export declare const agentProfileSchema: z.ZodObject<{
|
|
|
279
265
|
ultracode: "ultracode";
|
|
280
266
|
}>>;
|
|
281
267
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
282
|
-
}, z.core.$
|
|
268
|
+
}, z.core.$strict>>;
|
|
283
269
|
harness: z.ZodOptional<z.ZodEnum<{
|
|
284
270
|
"claude-code": "claude-code";
|
|
285
271
|
claude: "claude";
|
|
@@ -308,26 +294,12 @@ export declare const agentProfileSchema: z.ZodObject<{
|
|
|
308
294
|
deny: "deny";
|
|
309
295
|
}>>]>>>;
|
|
310
296
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
311
|
-
mcp: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
312
|
-
transport: z.ZodOptional<z.ZodEnum<{
|
|
313
|
-
stdio: "stdio";
|
|
314
|
-
sse: "sse";
|
|
315
|
-
http: "http";
|
|
316
|
-
}>>;
|
|
317
|
-
command: z.ZodOptional<z.ZodString>;
|
|
318
|
-
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
319
|
-
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
320
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
321
|
-
url: z.ZodOptional<z.ZodString>;
|
|
322
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
323
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
324
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
325
|
-
}, z.core.$strip>>>;
|
|
297
|
+
mcp: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AgentProfileMcpServer, unknown, z.core.$ZodTypeInternals<AgentProfileMcpServer, unknown>>>>;
|
|
326
298
|
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
327
299
|
connectionId: z.ZodString;
|
|
328
300
|
capabilities: z.ZodArray<z.ZodString>;
|
|
329
301
|
alias: z.ZodOptional<z.ZodString>;
|
|
330
|
-
}, z.core.$
|
|
302
|
+
}, z.core.$strict>>>;
|
|
331
303
|
subagents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
332
304
|
description: z.ZodOptional<z.ZodString>;
|
|
333
305
|
prompt: z.ZodOptional<z.ZodString>;
|
|
@@ -344,7 +316,7 @@ export declare const agentProfileSchema: z.ZodObject<{
|
|
|
344
316
|
}>>]>>>;
|
|
345
317
|
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
346
318
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
347
|
-
}, z.core.$
|
|
319
|
+
}, z.core.$strict>>>;
|
|
348
320
|
resources: z.ZodOptional<z.ZodObject<{
|
|
349
321
|
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
350
322
|
path: z.ZodString;
|
|
@@ -352,79 +324,79 @@ export declare const agentProfileSchema: z.ZodObject<{
|
|
|
352
324
|
kind: z.ZodLiteral<"inline">;
|
|
353
325
|
name: z.ZodString;
|
|
354
326
|
content: z.ZodString;
|
|
355
|
-
}, z.core.$
|
|
327
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
356
328
|
kind: z.ZodLiteral<"github">;
|
|
357
329
|
repository: z.ZodOptional<z.ZodString>;
|
|
358
330
|
path: z.ZodString;
|
|
359
331
|
ref: z.ZodOptional<z.ZodString>;
|
|
360
332
|
name: z.ZodOptional<z.ZodString>;
|
|
361
|
-
}, z.core.$
|
|
333
|
+
}, z.core.$strict>]>;
|
|
362
334
|
executable: z.ZodOptional<z.ZodBoolean>;
|
|
363
|
-
}, z.core.$
|
|
335
|
+
}, z.core.$strict>>>;
|
|
364
336
|
tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
365
337
|
kind: z.ZodLiteral<"inline">;
|
|
366
338
|
name: z.ZodString;
|
|
367
339
|
content: z.ZodString;
|
|
368
|
-
}, z.core.$
|
|
340
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
369
341
|
kind: z.ZodLiteral<"github">;
|
|
370
342
|
repository: z.ZodOptional<z.ZodString>;
|
|
371
343
|
path: z.ZodString;
|
|
372
344
|
ref: z.ZodOptional<z.ZodString>;
|
|
373
345
|
name: z.ZodOptional<z.ZodString>;
|
|
374
|
-
}, z.core.$
|
|
346
|
+
}, z.core.$strict>]>>>;
|
|
375
347
|
skills: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
376
348
|
kind: z.ZodLiteral<"inline">;
|
|
377
349
|
name: z.ZodString;
|
|
378
350
|
content: z.ZodString;
|
|
379
|
-
}, z.core.$
|
|
351
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
380
352
|
kind: z.ZodLiteral<"github">;
|
|
381
353
|
repository: z.ZodOptional<z.ZodString>;
|
|
382
354
|
path: z.ZodString;
|
|
383
355
|
ref: z.ZodOptional<z.ZodString>;
|
|
384
356
|
name: z.ZodOptional<z.ZodString>;
|
|
385
|
-
}, z.core.$
|
|
357
|
+
}, z.core.$strict>]>>>;
|
|
386
358
|
agents: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
387
359
|
kind: z.ZodLiteral<"inline">;
|
|
388
360
|
name: z.ZodString;
|
|
389
361
|
content: z.ZodString;
|
|
390
|
-
}, z.core.$
|
|
362
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
391
363
|
kind: z.ZodLiteral<"github">;
|
|
392
364
|
repository: z.ZodOptional<z.ZodString>;
|
|
393
365
|
path: z.ZodString;
|
|
394
366
|
ref: z.ZodOptional<z.ZodString>;
|
|
395
367
|
name: z.ZodOptional<z.ZodString>;
|
|
396
|
-
}, z.core.$
|
|
368
|
+
}, z.core.$strict>]>>>;
|
|
397
369
|
commands: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
398
370
|
kind: z.ZodLiteral<"inline">;
|
|
399
371
|
name: z.ZodString;
|
|
400
372
|
content: z.ZodString;
|
|
401
|
-
}, z.core.$
|
|
373
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
402
374
|
kind: z.ZodLiteral<"github">;
|
|
403
375
|
repository: z.ZodOptional<z.ZodString>;
|
|
404
376
|
path: z.ZodString;
|
|
405
377
|
ref: z.ZodOptional<z.ZodString>;
|
|
406
378
|
name: z.ZodOptional<z.ZodString>;
|
|
407
|
-
}, z.core.$
|
|
379
|
+
}, z.core.$strict>]>>>;
|
|
408
380
|
instructions: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
409
381
|
kind: z.ZodLiteral<"inline">;
|
|
410
382
|
name: z.ZodString;
|
|
411
383
|
content: z.ZodString;
|
|
412
|
-
}, z.core.$
|
|
384
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
413
385
|
kind: z.ZodLiteral<"github">;
|
|
414
386
|
repository: z.ZodOptional<z.ZodString>;
|
|
415
387
|
path: z.ZodString;
|
|
416
388
|
ref: z.ZodOptional<z.ZodString>;
|
|
417
389
|
name: z.ZodOptional<z.ZodString>;
|
|
418
|
-
}, z.core.$
|
|
390
|
+
}, z.core.$strict>]>]>>;
|
|
419
391
|
failOnError: z.ZodOptional<z.ZodBoolean>;
|
|
420
|
-
}, z.core.$
|
|
392
|
+
}, z.core.$strict>>;
|
|
421
393
|
hooks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
422
394
|
command: z.ZodString;
|
|
423
395
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
424
396
|
blocking: z.ZodOptional<z.ZodBoolean>;
|
|
425
397
|
matcher: z.ZodOptional<z.ZodString>;
|
|
426
398
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
427
|
-
}, z.core.$
|
|
399
|
+
}, z.core.$strict>>>>;
|
|
428
400
|
modes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
429
401
|
description: z.ZodOptional<z.ZodString>;
|
|
430
402
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -440,16 +412,16 @@ export declare const agentProfileSchema: z.ZodObject<{
|
|
|
440
412
|
deny: "deny";
|
|
441
413
|
}>>]>>>;
|
|
442
414
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
443
|
-
}, z.core.$
|
|
415
|
+
}, z.core.$strict>>>;
|
|
444
416
|
confidential: z.ZodOptional<z.ZodObject<{
|
|
445
417
|
tee: z.ZodOptional<z.ZodString>;
|
|
446
418
|
attestationNonce: z.ZodOptional<z.ZodString>;
|
|
447
419
|
sealed: z.ZodOptional<z.ZodBoolean>;
|
|
448
420
|
attestationRefresh: z.ZodOptional<z.ZodBoolean>;
|
|
449
|
-
}, z.core.$
|
|
421
|
+
}, z.core.$strict>>;
|
|
450
422
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
451
423
|
extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodUndefined]>>>;
|
|
452
|
-
}, z.core.$
|
|
424
|
+
}, z.core.$strict>;
|
|
453
425
|
export declare const agentProfileDiffSchema: z.ZodType<AgentProfileDiff>;
|
|
454
426
|
/**
|
|
455
427
|
* A registered capability: a stable id paired with its canonical
|
package/dist/profile-schema.js
CHANGED
|
@@ -12,12 +12,12 @@ export const agentProfilePermissionSchema = z.union([
|
|
|
12
12
|
]);
|
|
13
13
|
// Mirrors the canonical AgentProfileResourceRef (inline | github), kind-discriminated.
|
|
14
14
|
export const agentProfileResourceRefSchema = z.union([
|
|
15
|
-
z.
|
|
15
|
+
z.strictObject({
|
|
16
16
|
kind: z.literal("inline"),
|
|
17
17
|
name: z.string(),
|
|
18
18
|
content: z.string(),
|
|
19
19
|
}),
|
|
20
|
-
z.
|
|
20
|
+
z.strictObject({
|
|
21
21
|
kind: z.literal("github"),
|
|
22
22
|
repository: z.string().optional(),
|
|
23
23
|
path: z.string(),
|
|
@@ -25,18 +25,20 @@ export const agentProfileResourceRefSchema = z.union([
|
|
|
25
25
|
name: z.string().optional(),
|
|
26
26
|
}),
|
|
27
27
|
]);
|
|
28
|
-
export const agentProfileFileMountSchema = z.
|
|
28
|
+
export const agentProfileFileMountSchema = z.strictObject({
|
|
29
29
|
path: z.string(),
|
|
30
30
|
resource: agentProfileResourceRefSchema,
|
|
31
31
|
executable: z.boolean().optional(),
|
|
32
32
|
});
|
|
33
|
-
export const agentProfileResourcesSchema = z.
|
|
33
|
+
export const agentProfileResourcesSchema = z.strictObject({
|
|
34
34
|
files: z.array(agentProfileFileMountSchema).optional(),
|
|
35
35
|
tools: z.array(agentProfileResourceRefSchema).optional(),
|
|
36
36
|
skills: z.array(agentProfileResourceRefSchema).optional(),
|
|
37
37
|
agents: z.array(agentProfileResourceRefSchema).optional(),
|
|
38
38
|
commands: z.array(agentProfileResourceRefSchema).optional(),
|
|
39
|
-
instructions: z
|
|
39
|
+
instructions: z
|
|
40
|
+
.union([z.string(), agentProfileResourceRefSchema])
|
|
41
|
+
.optional(),
|
|
40
42
|
failOnError: z.boolean().optional(),
|
|
41
43
|
});
|
|
42
44
|
export const reasoningEffortSchema = z.enum([
|
|
@@ -48,18 +50,18 @@ export const reasoningEffortSchema = z.enum([
|
|
|
48
50
|
"xhigh",
|
|
49
51
|
"ultracode",
|
|
50
52
|
]);
|
|
51
|
-
export const agentProfileModelHintsSchema = z.
|
|
53
|
+
export const agentProfileModelHintsSchema = z.strictObject({
|
|
52
54
|
default: z.string().optional(),
|
|
53
55
|
small: z.string().optional(),
|
|
54
56
|
provider: z.string().optional(),
|
|
55
57
|
reasoningEffort: reasoningEffortSchema.optional(),
|
|
56
58
|
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
57
59
|
});
|
|
58
|
-
export const agentProfilePromptSchema = z.
|
|
60
|
+
export const agentProfilePromptSchema = z.strictObject({
|
|
59
61
|
systemPrompt: z.string().optional(),
|
|
60
62
|
instructions: z.array(z.string()).optional(),
|
|
61
63
|
});
|
|
62
|
-
export const agentSubagentProfileSchema = z.
|
|
64
|
+
export const agentSubagentProfileSchema = z.strictObject({
|
|
63
65
|
description: z.string().optional(),
|
|
64
66
|
prompt: z.string().optional(),
|
|
65
67
|
model: z.string().optional(),
|
|
@@ -68,14 +70,14 @@ export const agentSubagentProfileSchema = z.object({
|
|
|
68
70
|
maxSteps: z.number().optional(),
|
|
69
71
|
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
70
72
|
});
|
|
71
|
-
export const agentProfileHookCommandSchema = z.
|
|
73
|
+
export const agentProfileHookCommandSchema = z.strictObject({
|
|
72
74
|
command: z.string(),
|
|
73
75
|
timeoutMs: z.number().positive().optional(),
|
|
74
76
|
blocking: z.boolean().optional(),
|
|
75
77
|
matcher: z.string().optional(),
|
|
76
78
|
env: z.record(z.string(), z.string()).optional(),
|
|
77
79
|
});
|
|
78
|
-
export const agentProfileModeSchema = z.
|
|
80
|
+
export const agentProfileModeSchema = z.strictObject({
|
|
79
81
|
description: z.string().optional(),
|
|
80
82
|
model: z.string().optional(),
|
|
81
83
|
prompt: z.string().optional(),
|
|
@@ -83,34 +85,73 @@ export const agentProfileModeSchema = z.object({
|
|
|
83
85
|
permissions: z.record(z.string(), agentProfilePermissionSchema).optional(),
|
|
84
86
|
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
85
87
|
});
|
|
86
|
-
export const agentProfileConfidentialSchema = z.
|
|
88
|
+
export const agentProfileConfidentialSchema = z.strictObject({
|
|
87
89
|
tee: z.string().optional(),
|
|
88
90
|
attestationNonce: z.string().optional(),
|
|
89
91
|
sealed: z.boolean().optional(),
|
|
90
92
|
attestationRefresh: z.boolean().optional(),
|
|
91
93
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
const nonBlankMcpValueSchema = z
|
|
95
|
+
.string()
|
|
96
|
+
.refine((value) => value.trim().length > 0, "value cannot be blank");
|
|
97
|
+
const remoteMcpUrlSchema = nonBlankMcpValueSchema.refine((value) => {
|
|
98
|
+
try {
|
|
99
|
+
const url = new URL(value);
|
|
100
|
+
return url.protocol === "http:" || url.protocol === "https:";
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
}, "remote MCP url must be an absolute HTTP(S) URL");
|
|
106
|
+
const agentProfileLocalMcpServerSchema = z.strictObject({
|
|
107
|
+
transport: z.literal("stdio").optional(),
|
|
108
|
+
command: nonBlankMcpValueSchema,
|
|
95
109
|
args: z.array(z.string()).optional(),
|
|
96
110
|
env: z.record(z.string(), z.string()).optional(),
|
|
97
111
|
cwd: z.string().optional(),
|
|
98
|
-
url: z.
|
|
112
|
+
url: z.undefined().optional(),
|
|
113
|
+
headers: z.undefined().optional(),
|
|
114
|
+
enabled: z.literal(true).optional(),
|
|
115
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
116
|
+
});
|
|
117
|
+
const agentProfileRemoteMcpServerSchema = z.strictObject({
|
|
118
|
+
transport: z.enum(["sse", "http"]).optional(),
|
|
119
|
+
command: z.undefined().optional(),
|
|
120
|
+
args: z.undefined().optional(),
|
|
121
|
+
env: z.undefined().optional(),
|
|
122
|
+
cwd: z.undefined().optional(),
|
|
123
|
+
url: remoteMcpUrlSchema,
|
|
99
124
|
headers: z.record(z.string(), z.string()).optional(),
|
|
100
|
-
enabled: z.
|
|
125
|
+
enabled: z.literal(true).optional(),
|
|
126
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
127
|
+
});
|
|
128
|
+
const agentProfileDisabledMcpServerSchema = z.strictObject({
|
|
129
|
+
enabled: z.literal(false),
|
|
130
|
+
transport: z.undefined().optional(),
|
|
131
|
+
command: z.undefined().optional(),
|
|
132
|
+
args: z.undefined().optional(),
|
|
133
|
+
env: z.undefined().optional(),
|
|
134
|
+
cwd: z.undefined().optional(),
|
|
135
|
+
url: z.undefined().optional(),
|
|
136
|
+
headers: z.undefined().optional(),
|
|
101
137
|
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
102
138
|
});
|
|
103
|
-
export const
|
|
139
|
+
export const agentProfileMcpServerSchema = z.union([
|
|
140
|
+
agentProfileLocalMcpServerSchema,
|
|
141
|
+
agentProfileRemoteMcpServerSchema,
|
|
142
|
+
agentProfileDisabledMcpServerSchema,
|
|
143
|
+
]);
|
|
144
|
+
export const agentProfileConnectionSchema = z.strictObject({
|
|
104
145
|
connectionId: z.string().min(1),
|
|
105
146
|
capabilities: z.array(z.string().min(1)).min(1),
|
|
106
147
|
alias: z.string().min(1).optional(),
|
|
107
148
|
});
|
|
108
149
|
const removeListSchema = z.union([z.literal(true), z.array(z.string().min(1))]);
|
|
109
|
-
export const agentProfilePromptRemovalSchema = z.
|
|
150
|
+
export const agentProfilePromptRemovalSchema = z.strictObject({
|
|
110
151
|
systemPrompt: z.literal(true).optional(),
|
|
111
152
|
instructions: removeListSchema.optional(),
|
|
112
153
|
});
|
|
113
|
-
export const agentProfileResourceRemovalSchema = z.
|
|
154
|
+
export const agentProfileResourceRemovalSchema = z.strictObject({
|
|
114
155
|
files: removeListSchema.optional(),
|
|
115
156
|
tools: removeListSchema.optional(),
|
|
116
157
|
skills: removeListSchema.optional(),
|
|
@@ -119,10 +160,12 @@ export const agentProfileResourceRemovalSchema = z.object({
|
|
|
119
160
|
instructions: z.literal(true).optional(),
|
|
120
161
|
failOnError: z.literal(true).optional(),
|
|
121
162
|
});
|
|
122
|
-
export const agentProfileDiffRemovalSchema = z.
|
|
163
|
+
export const agentProfileDiffRemovalSchema = z.strictObject({
|
|
123
164
|
identity: z.literal(true).optional(),
|
|
124
165
|
tags: removeListSchema.optional(),
|
|
125
|
-
prompt: z
|
|
166
|
+
prompt: z
|
|
167
|
+
.union([z.literal(true), agentProfilePromptRemovalSchema])
|
|
168
|
+
.optional(),
|
|
126
169
|
model: removeListSchema.optional(),
|
|
127
170
|
harness: z.literal(true).optional(),
|
|
128
171
|
permissions: removeListSchema.optional(),
|
|
@@ -130,7 +173,9 @@ export const agentProfileDiffRemovalSchema = z.object({
|
|
|
130
173
|
mcp: removeListSchema.optional(),
|
|
131
174
|
connections: removeListSchema.optional(),
|
|
132
175
|
subagents: removeListSchema.optional(),
|
|
133
|
-
resources: z
|
|
176
|
+
resources: z
|
|
177
|
+
.union([z.literal(true), agentProfileResourceRemovalSchema])
|
|
178
|
+
.optional(),
|
|
134
179
|
hooks: removeListSchema.optional(),
|
|
135
180
|
modes: removeListSchema.optional(),
|
|
136
181
|
confidential: z.literal(true).optional(),
|
|
@@ -142,7 +187,7 @@ export const agentProfileDiffRemovalSchema = z.object({
|
|
|
142
187
|
* the canonical {@link AgentProfile} TS contract. Kept structurally in lock-step
|
|
143
188
|
* with that interface by the compile-time guard at the bottom of this file.
|
|
144
189
|
*/
|
|
145
|
-
export const agentProfileSchema = z.
|
|
190
|
+
export const agentProfileSchema = z.strictObject({
|
|
146
191
|
name: z.string().optional(),
|
|
147
192
|
description: z.string().optional(),
|
|
148
193
|
version: z.string().optional(),
|
|
@@ -166,15 +211,14 @@ export const agentProfileSchema = z.object({
|
|
|
166
211
|
.record(z.string(), z.union([z.record(z.string(), z.unknown()), z.undefined()]))
|
|
167
212
|
.optional(),
|
|
168
213
|
});
|
|
169
|
-
export const agentProfileDiffSchema = z
|
|
170
|
-
.object({
|
|
214
|
+
export const agentProfileDiffSchema = z.strictObject({
|
|
171
215
|
kind: z.literal("agent-profile-diff"),
|
|
172
216
|
id: z.string().min(1).optional(),
|
|
173
217
|
title: z.string().min(1).optional(),
|
|
174
218
|
description: z.string().optional(),
|
|
175
219
|
rationale: z.string().optional(),
|
|
176
220
|
source: z
|
|
177
|
-
.
|
|
221
|
+
.strictObject({
|
|
178
222
|
kind: z.enum([
|
|
179
223
|
"trace",
|
|
180
224
|
"frontier-author",
|
|
@@ -189,11 +233,10 @@ export const agentProfileDiffSchema = z
|
|
|
189
233
|
set: agentProfileSchema.optional(),
|
|
190
234
|
remove: agentProfileDiffRemovalSchema.optional(),
|
|
191
235
|
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
192
|
-
})
|
|
193
|
-
.strict();
|
|
236
|
+
});
|
|
194
237
|
const _agentProfileSchemaMatchesInterface = true;
|
|
195
238
|
void _agentProfileSchemaMatchesInterface;
|
|
196
|
-
export const capabilitySchema = z.
|
|
239
|
+
export const capabilitySchema = z.strictObject({
|
|
197
240
|
id: z.string().min(1),
|
|
198
241
|
definition: agentProfileSchema,
|
|
199
242
|
recommendedSize: z.enum(SANDBOX_SIZE_PRESET_NAMES).optional(),
|
package/dist/profile-security.js
CHANGED
|
@@ -105,6 +105,8 @@ function isLocalMcpServer(server) {
|
|
|
105
105
|
export function validateAgentProfileSecurity(profile, policy = DEFAULT_CLOUD_AGENT_PROFILE_SECURITY_POLICY) {
|
|
106
106
|
const issues = [];
|
|
107
107
|
for (const [name, server] of Object.entries(profile.mcp ?? {})) {
|
|
108
|
+
if (server.enabled === false)
|
|
109
|
+
continue;
|
|
108
110
|
if (isLocalMcpServer(server)) {
|
|
109
111
|
if (!policy.allowLocalMcp) {
|
|
110
112
|
issues.push({
|