@2kw/ai 6.2.0-dev.14 → 6.2.0-dev.25

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.
Files changed (40) hide show
  1. package/README.md +2 -2
  2. package/dist/agent-config/export.d.ts +31 -0
  3. package/dist/agent-config/export.js +87 -0
  4. package/dist/agent-config/file.d.ts +20 -0
  5. package/dist/agent-config/file.js +137 -0
  6. package/dist/agent-config/plan.d.ts +33 -0
  7. package/dist/agent-config/plan.js +100 -0
  8. package/dist/agent-config/schema.d.ts +420 -0
  9. package/dist/agent-config/schema.js +222 -0
  10. package/dist/agent-config/template.d.ts +6 -0
  11. package/dist/agent-config/template.js +59 -0
  12. package/dist/agent-config/validate.d.ts +29 -0
  13. package/dist/agent-config/validate.js +123 -0
  14. package/dist/commands/agent-apply.d.ts +9 -0
  15. package/dist/commands/agent-apply.js +176 -0
  16. package/dist/commands/agent-export.d.ts +3 -0
  17. package/dist/commands/agent-export.js +100 -0
  18. package/dist/commands/agent-init.d.ts +4 -0
  19. package/dist/commands/agent-init.js +54 -0
  20. package/dist/commands/agent-run.d.ts +5 -0
  21. package/dist/commands/agent-run.js +187 -0
  22. package/dist/commands/agent-versions.js +12 -7
  23. package/dist/commands/agents.js +24 -9
  24. package/dist/commands/ai.d.ts +5 -37
  25. package/dist/commands/ai.js +29 -136
  26. package/dist/lib/agent-decide.d.ts +40 -0
  27. package/dist/lib/agent-decide.js +128 -0
  28. package/dist/lib/agent-lookup.d.ts +14 -0
  29. package/dist/lib/agent-lookup.js +70 -0
  30. package/dist/lib/agent-models.d.ts +28 -0
  31. package/dist/lib/agent-models.js +53 -0
  32. package/dist/lib/agent-run.d.ts +83 -0
  33. package/dist/lib/agent-run.js +170 -0
  34. package/dist/lib/approval-prompt.d.ts +18 -0
  35. package/dist/lib/approval-prompt.js +84 -0
  36. package/dist/lib/client.d.ts +2 -0
  37. package/dist/lib/client.js +13 -2
  38. package/dist/lib/errors.d.ts +21 -2
  39. package/dist/lib/errors.js +46 -2
  40. package/package.json +5 -2
@@ -0,0 +1,420 @@
1
+ /**
2
+ * JSON Schema for `agent.yaml` (spec §5.2). Hand-written because `tools`, `skills`,
3
+ * `hitlPolicy` and `options` are untyped JsonNode in the OpenAPI spec (follow-up #670).
4
+ * Mirrored to public-docs/public/schemas/agent.v1.json by `npm run sync:agent-schema`.
5
+ * Kept as a TS constant: package.json `files` publishes only dist JS/d.ts.
6
+ */
7
+ export declare const AGENT_SCHEMA_ID = "https://docs.2kw.ai/schemas/agent.v1.json";
8
+ /** Types the backend injects or cannot execute; authoring them has no effect or breaks the run. */
9
+ export declare const NON_AUTHORABLE_TOOL_TYPES: Record<string, string>;
10
+ export declare const agentSchema: {
11
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
12
+ readonly $id: "https://docs.2kw.ai/schemas/agent.v1.json";
13
+ readonly title: "2kw agent";
14
+ readonly description: "Agent configuration applied with `2kw agents apply -f <file>`.";
15
+ readonly type: "object";
16
+ readonly additionalProperties: false;
17
+ readonly required: readonly ["name"];
18
+ readonly anyOf: readonly [{
19
+ readonly required: readonly ["model"];
20
+ }, {
21
+ readonly required: readonly ["models"];
22
+ }];
23
+ readonly properties: {
24
+ readonly $schema: {
25
+ readonly type: "string";
26
+ };
27
+ readonly name: {
28
+ readonly type: "string";
29
+ readonly minLength: 1;
30
+ readonly maxLength: 255;
31
+ readonly pattern: "^[^#@]+$";
32
+ readonly description: "Unique per organization; apply looks the agent up by this exact name. '#' and '@' are reserved.";
33
+ };
34
+ readonly description: {
35
+ readonly type: "string";
36
+ readonly maxLength: 4000;
37
+ };
38
+ readonly model: {
39
+ readonly description: "provider/model, or a bare model name for the default provider. '#' is reserved. With `models`, must equal its first entry.";
40
+ readonly type: "string";
41
+ readonly minLength: 1;
42
+ readonly maxLength: 255;
43
+ readonly pattern: "^(?:[^/#]+|[A-Za-z0-9-]+/[^#]+)$";
44
+ };
45
+ readonly models: {
46
+ readonly type: "array";
47
+ readonly minItems: 1;
48
+ readonly maxItems: 10;
49
+ readonly uniqueItems: true;
50
+ readonly items: {
51
+ readonly type: "string";
52
+ readonly minLength: 1;
53
+ readonly maxLength: 255;
54
+ readonly pattern: "^(?:[^/#]+|[A-Za-z0-9-]+/[^#]+)$";
55
+ };
56
+ readonly description: "Ordered model list (#591): the first entry is the default, the others can be picked per request with <agent>#<model>. 1-10 unique entries.";
57
+ };
58
+ readonly instructions: {
59
+ readonly type: "string";
60
+ readonly maxLength: 20000;
61
+ };
62
+ readonly tools: {
63
+ readonly type: "array";
64
+ readonly items: {
65
+ readonly $ref: "#/$defs/tool";
66
+ };
67
+ };
68
+ readonly hitlPolicy: {
69
+ readonly $ref: "#/$defs/hitlPolicy";
70
+ };
71
+ readonly options: {
72
+ readonly type: "object";
73
+ readonly description: "Stored with the version; not read by the run engine.";
74
+ };
75
+ readonly skills: {
76
+ readonly type: "array";
77
+ readonly maxItems: 20;
78
+ readonly description: "Skill bindings (#639): each names an org skill and a label or version.";
79
+ readonly items: {
80
+ readonly type: "object";
81
+ readonly additionalProperties: false;
82
+ readonly required: readonly ["name"];
83
+ readonly properties: {
84
+ readonly name: {
85
+ readonly type: "string";
86
+ readonly pattern: "^[a-z0-9]+(-[a-z0-9]+)*$";
87
+ readonly maxLength: 100;
88
+ };
89
+ readonly ref: {
90
+ readonly type: "string";
91
+ readonly pattern: "\\S";
92
+ readonly description: "Label name or version number; default latest.";
93
+ };
94
+ };
95
+ };
96
+ };
97
+ };
98
+ readonly $defs: {
99
+ readonly annotations: {
100
+ readonly type: "object";
101
+ readonly required: readonly ["readOnlyHint", "destructiveHint"];
102
+ readonly properties: {
103
+ readonly readOnlyHint: {
104
+ readonly type: "boolean";
105
+ };
106
+ readonly destructiveHint: {
107
+ readonly type: "boolean";
108
+ };
109
+ };
110
+ };
111
+ readonly fileSearchTool: {
112
+ readonly type: "object";
113
+ readonly additionalProperties: false;
114
+ readonly required: readonly ["type", "config"];
115
+ readonly properties: {
116
+ readonly type: {
117
+ readonly const: "file_search";
118
+ };
119
+ readonly requiresConfirmation: {
120
+ readonly type: "boolean";
121
+ };
122
+ readonly config: {
123
+ readonly type: "object";
124
+ readonly additionalProperties: false;
125
+ readonly required: readonly ["knowledgeBaseIds"];
126
+ readonly properties: {
127
+ readonly knowledgeBaseIds: {
128
+ readonly type: "array";
129
+ readonly items: {
130
+ readonly type: "string";
131
+ readonly minLength: 1;
132
+ };
133
+ };
134
+ };
135
+ };
136
+ };
137
+ };
138
+ readonly extractionTool: {
139
+ readonly type: "object";
140
+ readonly additionalProperties: false;
141
+ readonly required: readonly ["type", "config"];
142
+ readonly properties: {
143
+ readonly type: {
144
+ readonly const: "backbone.extraction";
145
+ };
146
+ readonly requiresConfirmation: {
147
+ readonly type: "boolean";
148
+ };
149
+ readonly config: {
150
+ readonly type: "object";
151
+ readonly additionalProperties: false;
152
+ readonly required: readonly ["schemaIds"];
153
+ readonly properties: {
154
+ readonly schemaIds: {
155
+ readonly type: "array";
156
+ readonly items: {
157
+ readonly type: "string";
158
+ readonly minLength: 1;
159
+ };
160
+ };
161
+ readonly model: {
162
+ readonly type: "string";
163
+ readonly minLength: 1;
164
+ };
165
+ };
166
+ };
167
+ };
168
+ };
169
+ readonly documentConvertTool: {
170
+ readonly type: "object";
171
+ readonly additionalProperties: false;
172
+ readonly required: readonly ["type"];
173
+ readonly properties: {
174
+ readonly type: {
175
+ readonly const: "backbone.document_convert";
176
+ };
177
+ readonly requiresConfirmation: {
178
+ readonly type: "boolean";
179
+ };
180
+ readonly config: {
181
+ readonly type: "object";
182
+ };
183
+ };
184
+ };
185
+ readonly todoTool: {
186
+ readonly type: "object";
187
+ readonly additionalProperties: false;
188
+ readonly required: readonly ["type"];
189
+ readonly properties: {
190
+ readonly type: {
191
+ readonly const: "backbone.todo";
192
+ };
193
+ readonly requiresConfirmation: {
194
+ readonly type: "boolean";
195
+ };
196
+ };
197
+ };
198
+ readonly skillTool: {
199
+ readonly type: "object";
200
+ readonly additionalProperties: false;
201
+ readonly required: readonly ["type", "skills"];
202
+ readonly properties: {
203
+ readonly type: {
204
+ readonly const: "backbone.skill";
205
+ };
206
+ readonly requiresConfirmation: {
207
+ readonly type: "boolean";
208
+ };
209
+ readonly skills: {
210
+ readonly type: "array";
211
+ readonly minItems: 1;
212
+ readonly maxItems: 20;
213
+ readonly uniqueItems: true;
214
+ readonly items: {
215
+ readonly type: "string";
216
+ readonly pattern: "^[a-z0-9]+(-[a-z0-9]+)*(@[A-Za-z0-9._-]+)?$";
217
+ };
218
+ };
219
+ };
220
+ };
221
+ readonly functionTool: {
222
+ readonly type: "object";
223
+ readonly additionalProperties: false;
224
+ readonly required: readonly ["type", "name", "endpoint"];
225
+ readonly properties: {
226
+ readonly type: {
227
+ readonly const: "function";
228
+ };
229
+ readonly name: {
230
+ readonly type: "string";
231
+ readonly minLength: 1;
232
+ };
233
+ readonly description: {
234
+ readonly type: "string";
235
+ };
236
+ readonly parameters: {
237
+ readonly type: "object";
238
+ };
239
+ readonly endpoint: {
240
+ readonly type: "string";
241
+ readonly pattern: "^https?://";
242
+ };
243
+ readonly secret: {
244
+ readonly type: "string";
245
+ };
246
+ readonly annotations: {
247
+ readonly $ref: "#/$defs/annotations";
248
+ };
249
+ };
250
+ };
251
+ readonly namedTool: {
252
+ readonly type: "object";
253
+ readonly required: readonly ["name"];
254
+ readonly properties: {
255
+ readonly type: {
256
+ readonly type: "string";
257
+ };
258
+ readonly name: {
259
+ readonly type: "string";
260
+ readonly minLength: 1;
261
+ };
262
+ readonly description: {
263
+ readonly type: "string";
264
+ };
265
+ readonly parameters: {
266
+ readonly type: "object";
267
+ };
268
+ readonly annotations: {
269
+ readonly $ref: "#/$defs/annotations";
270
+ };
271
+ };
272
+ };
273
+ readonly tool: {
274
+ readonly type: "object";
275
+ readonly allOf: readonly [{
276
+ readonly if: {
277
+ required: string[];
278
+ properties: {
279
+ type: {
280
+ const: string;
281
+ };
282
+ };
283
+ };
284
+ readonly then: {
285
+ readonly $ref: "#/$defs/fileSearchTool";
286
+ };
287
+ }, {
288
+ readonly if: {
289
+ required: string[];
290
+ properties: {
291
+ type: {
292
+ const: string;
293
+ };
294
+ };
295
+ };
296
+ readonly then: {
297
+ readonly $ref: "#/$defs/extractionTool";
298
+ };
299
+ }, {
300
+ readonly if: {
301
+ required: string[];
302
+ properties: {
303
+ type: {
304
+ const: string;
305
+ };
306
+ };
307
+ };
308
+ readonly then: {
309
+ readonly $ref: "#/$defs/documentConvertTool";
310
+ };
311
+ }, {
312
+ readonly if: {
313
+ required: string[];
314
+ properties: {
315
+ type: {
316
+ const: string;
317
+ };
318
+ };
319
+ };
320
+ readonly then: {
321
+ readonly $ref: "#/$defs/todoTool";
322
+ };
323
+ }, {
324
+ readonly if: {
325
+ required: string[];
326
+ properties: {
327
+ type: {
328
+ const: string;
329
+ };
330
+ };
331
+ };
332
+ readonly then: {
333
+ readonly $ref: "#/$defs/skillTool";
334
+ };
335
+ }, {
336
+ readonly if: {
337
+ required: string[];
338
+ properties: {
339
+ type: {
340
+ const: string;
341
+ };
342
+ };
343
+ };
344
+ readonly then: {
345
+ readonly $ref: "#/$defs/functionTool";
346
+ };
347
+ }, {
348
+ readonly if: {
349
+ readonly required: readonly ["type"];
350
+ readonly properties: {
351
+ readonly type: {
352
+ readonly enum: string[];
353
+ };
354
+ };
355
+ };
356
+ readonly then: {
357
+ readonly properties: {
358
+ readonly type: {
359
+ readonly not: {};
360
+ };
361
+ };
362
+ };
363
+ }, {
364
+ readonly if: {
365
+ readonly properties: {
366
+ readonly type: {
367
+ readonly enum: readonly string[];
368
+ };
369
+ };
370
+ readonly required: readonly ["type"];
371
+ };
372
+ readonly else: {
373
+ readonly $ref: "#/$defs/namedTool";
374
+ };
375
+ }];
376
+ };
377
+ readonly hitlPolicy: {
378
+ readonly type: "object";
379
+ readonly additionalProperties: false;
380
+ readonly properties: {
381
+ readonly version: {
382
+ readonly const: 1;
383
+ };
384
+ readonly default: {
385
+ type: string;
386
+ enum: string[];
387
+ };
388
+ readonly classes: {
389
+ readonly type: "object";
390
+ readonly additionalProperties: false;
391
+ readonly properties: {
392
+ readonly read: {
393
+ type: string;
394
+ enum: string[];
395
+ };
396
+ readonly write: {
397
+ type: string;
398
+ enum: string[];
399
+ };
400
+ readonly destructive: {
401
+ type: string;
402
+ enum: string[];
403
+ };
404
+ };
405
+ };
406
+ readonly tools: {
407
+ readonly type: "object";
408
+ readonly propertyNames: {
409
+ readonly pattern: "\\S";
410
+ };
411
+ readonly additionalProperties: {
412
+ readonly type: "string";
413
+ readonly enum: readonly ["read", "write", "destructive", "approve", "auto", "deny"];
414
+ };
415
+ };
416
+ };
417
+ };
418
+ };
419
+ };
420
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1,222 @@
1
+ /**
2
+ * JSON Schema for `agent.yaml` (spec §5.2). Hand-written because `tools`, `skills`,
3
+ * `hitlPolicy` and `options` are untyped JsonNode in the OpenAPI spec (follow-up #670).
4
+ * Mirrored to public-docs/public/schemas/agent.v1.json by `npm run sync:agent-schema`.
5
+ * Kept as a TS constant: package.json `files` publishes only dist JS/d.ts.
6
+ */
7
+ export const AGENT_SCHEMA_ID = "https://docs.2kw.ai/schemas/agent.v1.json";
8
+ const SKILL_NAME = "^[a-z0-9]+(-[a-z0-9]+)*$";
9
+ const SKILL_REF = "^[a-z0-9]+(-[a-z0-9]+)*(@[A-Za-z0-9._-]+)?$";
10
+ const MODEL_REF = {
11
+ type: "string",
12
+ minLength: 1,
13
+ maxLength: 255,
14
+ pattern: "^(?:[^/#]+|[A-Za-z0-9-]+/[^#]+)$",
15
+ };
16
+ const oneOfLowercase = (...values) => ({ type: "string", enum: values });
17
+ /** Types the backend injects or cannot execute; authoring them has no effect or breaks the run. */
18
+ export const NON_AUTHORABLE_TOOL_TYPES = {
19
+ "backbone.tool_search": "the planner adds it automatically",
20
+ "backbone.skill_read": "it is added at run time when skills are pinned",
21
+ web_search: "it has no executor and is skipped",
22
+ };
23
+ const BUILTIN_TYPES = [
24
+ "file_search",
25
+ "backbone.extraction",
26
+ "backbone.document_convert",
27
+ "backbone.todo",
28
+ "backbone.skill",
29
+ "function",
30
+ ];
31
+ const typeIs = (t) => ({ required: ["type"], properties: { type: { const: t } } });
32
+ export const agentSchema = {
33
+ $schema: "https://json-schema.org/draft/2020-12/schema",
34
+ $id: AGENT_SCHEMA_ID,
35
+ title: "2kw agent",
36
+ description: "Agent configuration applied with `2kw agents apply -f <file>`.",
37
+ type: "object",
38
+ additionalProperties: false,
39
+ required: ["name"],
40
+ // A model is required, as `model` (one) or `models` (an ordered list); both may be given when model = models[0].
41
+ anyOf: [{ required: ["model"] }, { required: ["models"] }],
42
+ properties: {
43
+ $schema: { type: "string" },
44
+ name: {
45
+ type: "string",
46
+ minLength: 1,
47
+ maxLength: 255,
48
+ pattern: "^[^#@]+$",
49
+ description: "Unique per organization; apply looks the agent up by this exact name. '#' and '@' are reserved.",
50
+ },
51
+ description: { type: "string", maxLength: 4000 },
52
+ model: {
53
+ ...MODEL_REF,
54
+ description: "provider/model, or a bare model name for the default provider. '#' is reserved. With `models`, must equal its first entry.",
55
+ },
56
+ models: {
57
+ type: "array",
58
+ minItems: 1,
59
+ maxItems: 10,
60
+ uniqueItems: true,
61
+ items: MODEL_REF,
62
+ description: "Ordered model list (#591): the first entry is the default, the others can be picked per request with <agent>#<model>. 1-10 unique entries.",
63
+ },
64
+ instructions: { type: "string", maxLength: 20000 },
65
+ tools: { type: "array", items: { $ref: "#/$defs/tool" } },
66
+ hitlPolicy: { $ref: "#/$defs/hitlPolicy" },
67
+ options: { type: "object", description: "Stored with the version; not read by the run engine." },
68
+ skills: {
69
+ type: "array",
70
+ maxItems: 20,
71
+ description: "Skill bindings (#639): each names an org skill and a label or version.",
72
+ items: {
73
+ type: "object",
74
+ additionalProperties: false,
75
+ required: ["name"],
76
+ properties: {
77
+ name: { type: "string", pattern: SKILL_NAME, maxLength: 100 },
78
+ ref: { type: "string", pattern: "\\S", description: "Label name or version number; default latest." },
79
+ },
80
+ },
81
+ },
82
+ },
83
+ $defs: {
84
+ annotations: {
85
+ type: "object",
86
+ required: ["readOnlyHint", "destructiveHint"],
87
+ properties: { readOnlyHint: { type: "boolean" }, destructiveHint: { type: "boolean" } },
88
+ },
89
+ fileSearchTool: {
90
+ type: "object",
91
+ additionalProperties: false,
92
+ required: ["type", "config"],
93
+ properties: {
94
+ type: { const: "file_search" },
95
+ requiresConfirmation: { type: "boolean" },
96
+ config: {
97
+ type: "object",
98
+ additionalProperties: false,
99
+ required: ["knowledgeBaseIds"],
100
+ // An empty list is a tool the console seeded but nobody configured; the backend stores it and does not advertise it.
101
+ properties: { knowledgeBaseIds: { type: "array", items: { type: "string", minLength: 1 } } },
102
+ },
103
+ },
104
+ },
105
+ extractionTool: {
106
+ type: "object",
107
+ additionalProperties: false,
108
+ required: ["type", "config"],
109
+ properties: {
110
+ type: { const: "backbone.extraction" },
111
+ requiresConfirmation: { type: "boolean" },
112
+ config: {
113
+ type: "object",
114
+ additionalProperties: false,
115
+ required: ["schemaIds"],
116
+ properties: {
117
+ schemaIds: { type: "array", items: { type: "string", minLength: 1 } },
118
+ model: { type: "string", minLength: 1 },
119
+ },
120
+ },
121
+ },
122
+ },
123
+ documentConvertTool: {
124
+ type: "object",
125
+ additionalProperties: false,
126
+ required: ["type"],
127
+ properties: {
128
+ type: { const: "backbone.document_convert" },
129
+ requiresConfirmation: { type: "boolean" },
130
+ config: { type: "object" },
131
+ },
132
+ },
133
+ todoTool: {
134
+ type: "object",
135
+ additionalProperties: false,
136
+ required: ["type"],
137
+ properties: { type: { const: "backbone.todo" }, requiresConfirmation: { type: "boolean" } },
138
+ },
139
+ skillTool: {
140
+ type: "object",
141
+ additionalProperties: false,
142
+ required: ["type", "skills"],
143
+ properties: {
144
+ type: { const: "backbone.skill" },
145
+ requiresConfirmation: { type: "boolean" },
146
+ skills: { type: "array", minItems: 1, maxItems: 20, uniqueItems: true, items: { type: "string", pattern: SKILL_REF } },
147
+ },
148
+ },
149
+ functionTool: {
150
+ type: "object",
151
+ additionalProperties: false,
152
+ required: ["type", "name", "endpoint"],
153
+ properties: {
154
+ type: { const: "function" },
155
+ name: { type: "string", minLength: 1 },
156
+ description: { type: "string" },
157
+ parameters: { type: "object" },
158
+ endpoint: { type: "string", pattern: "^https?://" },
159
+ secret: { type: "string" },
160
+ annotations: { $ref: "#/$defs/annotations" },
161
+ },
162
+ },
163
+ namedTool: {
164
+ type: "object",
165
+ required: ["name"],
166
+ properties: {
167
+ type: { type: "string" },
168
+ name: { type: "string", minLength: 1 },
169
+ description: { type: "string" },
170
+ parameters: { type: "object" },
171
+ annotations: { $ref: "#/$defs/annotations" },
172
+ },
173
+ },
174
+ tool: {
175
+ type: "object",
176
+ allOf: [
177
+ { if: typeIs("file_search"), then: { $ref: "#/$defs/fileSearchTool" } },
178
+ { if: typeIs("backbone.extraction"), then: { $ref: "#/$defs/extractionTool" } },
179
+ { if: typeIs("backbone.document_convert"), then: { $ref: "#/$defs/documentConvertTool" } },
180
+ { if: typeIs("backbone.todo"), then: { $ref: "#/$defs/todoTool" } },
181
+ { if: typeIs("backbone.skill"), then: { $ref: "#/$defs/skillTool" } },
182
+ { if: typeIs("function"), then: { $ref: "#/$defs/functionTool" } },
183
+ {
184
+ // The validator reports these with the reason from NON_AUTHORABLE_TOOL_TYPES; this keeps the published schema honest.
185
+ if: { required: ["type"], properties: { type: { enum: Object.keys(NON_AUTHORABLE_TOOL_TYPES) } } },
186
+ then: { properties: { type: { not: {} } } },
187
+ },
188
+ {
189
+ if: { properties: { type: { enum: [...BUILTIN_TYPES, ...Object.keys(NON_AUTHORABLE_TOOL_TYPES)] } }, required: ["type"] },
190
+ else: { $ref: "#/$defs/namedTool" },
191
+ },
192
+ ],
193
+ },
194
+ hitlPolicy: {
195
+ // The backend reads a missing version as 1. It matches `default`, the `classes` keys and their
196
+ // values case-insensitively; validateAgentConfig lowercases those before checking this schema.
197
+ type: "object",
198
+ additionalProperties: false,
199
+ properties: {
200
+ version: { const: 1 },
201
+ default: oneOfLowercase("allow", "approve", "block", "deny"),
202
+ classes: {
203
+ type: "object",
204
+ additionalProperties: false,
205
+ properties: {
206
+ read: oneOfLowercase("allow", "auto", "approve", "block", "deny"),
207
+ write: oneOfLowercase("auto", "approve", "block", "deny"),
208
+ destructive: oneOfLowercase("block", "deny"),
209
+ },
210
+ },
211
+ tools: {
212
+ // Value is a policy class or an action. Actions (approve, auto, deny) are exact lowercase;
213
+ // classes (read, write, destructive) are case-insensitive and lowercased by the validator.
214
+ type: "object",
215
+ propertyNames: { pattern: "\\S" },
216
+ additionalProperties: { type: "string", enum: ["read", "write", "destructive", "approve", "auto", "deny"] },
217
+ },
218
+ },
219
+ },
220
+ },
221
+ };
222
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Commented starter file. Prose comments start with "# " + an uppercase letter; YAML
3
+ * examples start with "# " + a lowercase key, a space or "-" (the template test relies on it).
4
+ */
5
+ export declare function agentTemplate(name: string): string;
6
+ //# sourceMappingURL=template.d.ts.map