agentfootprint 9.35.0 → 9.36.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/core/agent/AgentBuilder.js +85 -0
- package/dist/core/agent/AgentBuilder.js.map +1 -1
- package/dist/core/agent/buildToolRegistry.js +7 -0
- package/dist/core/agent/buildToolRegistry.js.map +1 -1
- package/dist/core/agent/toolsFromActiveSkill.js +79 -0
- package/dist/core/agent/toolsFromActiveSkill.js.map +1 -0
- package/dist/esm/core/agent/AgentBuilder.d.ts +62 -0
- package/dist/esm/core/agent/AgentBuilder.js +85 -0
- package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
- package/dist/esm/core/agent/buildToolRegistry.js +7 -0
- package/dist/esm/core/agent/buildToolRegistry.js.map +1 -1
- package/dist/esm/core/agent/toolsFromActiveSkill.d.ts +55 -0
- package/dist/esm/core/agent/toolsFromActiveSkill.js +75 -0
- package/dist/esm/core/agent/toolsFromActiveSkill.js.map +1 -0
- package/dist/esm/lib/injection-engine/factories/defineSkill.d.ts +7 -0
- package/dist/esm/lib/injection-engine/factories/defineSkill.js.map +1 -1
- package/dist/esm/lib/injection-engine/skillsFromDir.d.ts +80 -17
- package/dist/esm/lib/injection-engine/skillsFromDir.js +348 -46
- package/dist/esm/lib/injection-engine/skillsFromDir.js.map +1 -1
- package/dist/lib/injection-engine/factories/defineSkill.js.map +1 -1
- package/dist/lib/injection-engine/skillsFromDir.js +348 -46
- package/dist/lib/injection-engine/skillsFromDir.js.map +1 -1
- package/dist/types/core/agent/AgentBuilder.d.ts +62 -0
- package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
- package/dist/types/core/agent/buildToolRegistry.d.ts.map +1 -1
- package/dist/types/core/agent/toolsFromActiveSkill.d.ts +56 -0
- package/dist/types/core/agent/toolsFromActiveSkill.d.ts.map +1 -0
- package/dist/types/lib/injection-engine/factories/defineSkill.d.ts +7 -0
- package/dist/types/lib/injection-engine/factories/defineSkill.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/skillsFromDir.d.ts +80 -17
- package/dist/types/lib/injection-engine/skillsFromDir.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -29,21 +29,56 @@
|
|
|
29
29
|
* body (what it reads after deciding). That is the same file convention Claude
|
|
30
30
|
* Code made familiar, so a skill folder is portable between the two.
|
|
31
31
|
*
|
|
32
|
-
* ── What a SKILL.md can
|
|
33
|
-
*
|
|
34
|
-
*
|
|
32
|
+
* ── What a SKILL.md can carry (9.36.0: the whole runbook) ────────────────────
|
|
33
|
+
* A runbook you already have on disk is three things — what to do (prose),
|
|
34
|
+
* what to do it WITH (tools), and in what order (steps). This door used to
|
|
35
|
+
* carry the first and drop the other two, so the one thing the library exists
|
|
36
|
+
* to say ("extract the workflow you already have") arrived two-thirds empty.
|
|
37
|
+
* All three now cross:
|
|
35
38
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
39
|
+
* ---
|
|
40
|
+
* name: billing
|
|
41
|
+
* description: Use for refunds, charges and billing questions.
|
|
42
|
+
* tools: lookup_order, issue_refund
|
|
43
|
+
* steps:
|
|
44
|
+
* - lookup_order: look up the order before touching money
|
|
45
|
+
* - issue_refund: refund only what the lookup found
|
|
46
|
+
* onSkip: hold
|
|
47
|
+
* ---
|
|
48
|
+
* When handling billing: confirm identity first, then …
|
|
49
|
+
*
|
|
50
|
+
* const skills = await skillsFromDir('./skills', {
|
|
51
|
+
* tools: [lookupOrder, issueRefund], // the real Tools, from YOUR code
|
|
52
|
+
* });
|
|
53
|
+
*
|
|
54
|
+
* The remaining limits, and why each one is a decision rather than an
|
|
55
|
+
* oversight:
|
|
56
|
+
*
|
|
57
|
+
* - **the file names a tool; it never defines one.** A tool is code with an
|
|
58
|
+
* `execute`, and a markdown file has none. `tools:` is a list of NAMES,
|
|
59
|
+
* resolved against the `tools` registry the CALLER passes — so the file
|
|
60
|
+
* can only ever pick from capabilities you already handed in, and reading a
|
|
61
|
+
* directory can never introduce one. See "why this is not a code-execution
|
|
62
|
+
* vector" below.
|
|
63
|
+
* - **a name the registry does not carry is refused BY NAME at load** —
|
|
64
|
+
* never a skill that quietly loads without the tool it asked for, because
|
|
65
|
+
* that skill runs, sounds confident, and cannot do the job.
|
|
66
|
+
* - **no per-step `produces` / `consumes`** — the artifact vocabularies
|
|
67
|
+
* (9.25.0) are a build-time contract between skills, not runbook prose;
|
|
68
|
+
* declare them with `defineSkill` where the rest of the agent is declared.
|
|
69
|
+
* - **no `autoActivate`** — a directory does not decide the agent's tool
|
|
70
|
+
* posture. Say it once on the agent with `.toolsFromActiveSkill()`
|
|
71
|
+
* (9.36.0), which scopes every skill's tools to that skill's activation.
|
|
72
|
+
* Without it, a loaded skill's tools are on the wire from iteration 1, the
|
|
73
|
+
* same as any hand-written `defineSkill({ tools })`.
|
|
74
|
+
* - **no per-file `surfaceMode`, `cache` or `refreshPolicy`** — `surfaceMode`
|
|
75
|
+
* is settable for the WHOLE directory via `opts`, all of them or none; the
|
|
76
|
+
* others take `defineSkill`'s defaults.
|
|
77
|
+
* - unknown frontmatter keys are still IGNORED, not rejected, so a file
|
|
78
|
+
* carrying another tool's metadata still loads here. `name`,
|
|
79
|
+
* `description`, `tools`, `steps` and `onSkip` are the KNOWN keys — a file
|
|
80
|
+
* that used one of those five for something else is the one case this
|
|
81
|
+
* release can change, and it changes it loudly.
|
|
47
82
|
*
|
|
48
83
|
* A worked example feeding this into a graph:
|
|
49
84
|
* `examples/features/47-skills-from-dir-graph.ts`.
|
|
@@ -57,6 +92,17 @@
|
|
|
57
92
|
* only make about a path on your own disk at build time. Each file is read
|
|
58
93
|
* ONCE, here; a later edit does not reach a run already in flight.
|
|
59
94
|
*
|
|
95
|
+
* ── Why carrying tools is not a code-execution vector ───────────────────────
|
|
96
|
+
* Nothing in a SKILL.md is evaluated, imported, required or resolved as a
|
|
97
|
+
* path. `tools:` is a list of strings, and the only thing a string can do here
|
|
98
|
+
* is MATCH — against `tool.schema.name` in a registry the caller constructed in
|
|
99
|
+
* their own source, from their own imports. A hostile file can therefore ask
|
|
100
|
+
* for a tool you already gave the agent (and it would have to guess the name);
|
|
101
|
+
* it can never name a module, widen the agent's capabilities, or cause one byte
|
|
102
|
+
* of new code to run. The set of things this directory can do is a SUBSET of
|
|
103
|
+
* what the calling file already decided to do, which is the same property the
|
|
104
|
+
* local-path rule above buys for bodies.
|
|
105
|
+
*
|
|
60
106
|
* Node-only. `node:fs/promises` and `node:path` are imported lazily inside the
|
|
61
107
|
* call, the same gating `lib/tool-lint/cli.ts` uses: this module is reachable
|
|
62
108
|
* from the `agentfootprint/context` barrel, and a TOP-LEVEL node:fs
|
|
@@ -73,6 +119,9 @@ const SKILL_FILE = 'SKILL.md';
|
|
|
73
119
|
const SKILL_NAME_RE = /^[a-zA-Z0-9_-]{1,64}$/;
|
|
74
120
|
/** Anything of the form `scheme://…` — http, https, s3, git+ssh, file, … */
|
|
75
121
|
const URL_LIKE_RE = /^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//;
|
|
122
|
+
/** How many registry names a refusal lists before it stops. Long enough to
|
|
123
|
+
* spot the typo, short enough that a 200-tool agent's error is still readable. */
|
|
124
|
+
const NAMES_IN_REFUSAL = 20;
|
|
76
125
|
/**
|
|
77
126
|
* Load every `SKILL.md` under `dir` as a Skill Injection.
|
|
78
127
|
*
|
|
@@ -90,8 +139,9 @@ const URL_LIKE_RE = /^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//;
|
|
|
90
139
|
*
|
|
91
140
|
* @throws when `dir` is not a local path, does not exist, is not a directory,
|
|
92
141
|
* or contains no `SKILL.md` at all; when a file's frontmatter is malformed
|
|
93
|
-
* (the message names the file);
|
|
94
|
-
* (the message names both)
|
|
142
|
+
* (the message names the file); when two files claim the same skill name
|
|
143
|
+
* (the message names both); or when a file names a tool the `tools` registry
|
|
144
|
+
* does not carry, or sequences a tool the file itself did not declare.
|
|
95
145
|
*/
|
|
96
146
|
export async function skillsFromDir(dir, opts = {}) {
|
|
97
147
|
assertLocalDirectoryArgument(dir);
|
|
@@ -150,15 +200,26 @@ export async function skillsFromDir(dir, opts = {}) {
|
|
|
150
200
|
}
|
|
151
201
|
byName.set(skill.name, skill);
|
|
152
202
|
}
|
|
203
|
+
// The registry, indexed once for the whole directory. Built even when no file
|
|
204
|
+
// declares tools — an empty Map costs nothing and keeps the resolve path one
|
|
205
|
+
// shape. `undefined` (option omitted) is DISTINCT from an empty registry: the
|
|
206
|
+
// refusals say different things, because the fixes are different.
|
|
207
|
+
const registry = indexToolRegistry(opts.tools);
|
|
153
208
|
return parsed
|
|
154
209
|
.slice()
|
|
155
210
|
.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0))
|
|
156
|
-
.map((skill) =>
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
211
|
+
.map((skill) => {
|
|
212
|
+
const tools = resolveDeclaredTools(skill, opts.tools, registry);
|
|
213
|
+
return defineSkill({
|
|
214
|
+
id: skill.name,
|
|
215
|
+
description: skill.description,
|
|
216
|
+
body: skill.body,
|
|
217
|
+
...(tools !== undefined && { tools }),
|
|
218
|
+
...(skill.steps !== undefined && { steps: skill.steps }),
|
|
219
|
+
...(skill.onSkip !== undefined && { onSkip: skill.onSkip }),
|
|
220
|
+
...(opts.surfaceMode !== undefined && { surfaceMode: opts.surfaceMode }),
|
|
221
|
+
});
|
|
222
|
+
});
|
|
162
223
|
}
|
|
163
224
|
// ─── Authorship guard ──────────────────────────────────────────────
|
|
164
225
|
/**
|
|
@@ -203,16 +264,92 @@ function assertLocalDirectoryArgument(dir) {
|
|
|
203
264
|
`at build time.`);
|
|
204
265
|
}
|
|
205
266
|
}
|
|
206
|
-
// ───
|
|
267
|
+
// ─── Tool resolution (names on disk → Tools from your code) ────────
|
|
268
|
+
/**
|
|
269
|
+
* Index the caller's registry by wire name.
|
|
270
|
+
*
|
|
271
|
+
* `undefined` in, empty Map out — the CALLER's `undefined` is remembered
|
|
272
|
+
* separately by `resolveDeclaredTools`, because "you passed no registry" and
|
|
273
|
+
* "your registry does not carry that one" need different sentences.
|
|
274
|
+
*
|
|
275
|
+
* Two registry entries under one name is refused here rather than resolved by
|
|
276
|
+
* last-wins: which of the two a skill got would depend on array order, and a
|
|
277
|
+
* skill silently running the wrong `execute` is the failure this whole door is
|
|
278
|
+
* supposed to make impossible.
|
|
279
|
+
*/
|
|
280
|
+
function indexToolRegistry(tools) {
|
|
281
|
+
const index = new Map();
|
|
282
|
+
for (const tool of tools ?? []) {
|
|
283
|
+
const name = tool?.schema?.name;
|
|
284
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
285
|
+
throw new Error(`skillsFromDir: the \`tools\` registry contains an entry with no \`schema.name\`. ` +
|
|
286
|
+
`Every entry must be a Tool (defineTool(...) produces one) — a SKILL.md resolves ` +
|
|
287
|
+
`tools BY NAME, so an unnamed one can never be picked.`);
|
|
288
|
+
}
|
|
289
|
+
const prior = index.get(name);
|
|
290
|
+
if (prior !== undefined && prior !== tool) {
|
|
291
|
+
throw new Error(`skillsFromDir: the \`tools\` registry carries two different tools named '${name}'. ` +
|
|
292
|
+
`A SKILL.md names a tool by that string, so which implementation a skill got would ` +
|
|
293
|
+
`depend on array order. Rename one, or pass only the one you mean.`);
|
|
294
|
+
}
|
|
295
|
+
index.set(name, tool);
|
|
296
|
+
}
|
|
297
|
+
return index;
|
|
298
|
+
}
|
|
299
|
+
/** The registry's names, sorted and capped — the material every refusal ends with. */
|
|
300
|
+
function availableNames(registry) {
|
|
301
|
+
if (registry.size === 0)
|
|
302
|
+
return '(the registry you passed is empty)';
|
|
303
|
+
const names = [...registry.keys()].sort();
|
|
304
|
+
const shown = names.slice(0, NAMES_IN_REFUSAL).join(', ');
|
|
305
|
+
return names.length > NAMES_IN_REFUSAL
|
|
306
|
+
? `${shown}, …and ${names.length - NAMES_IN_REFUSAL} more`
|
|
307
|
+
: shown;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Turn one file's declared tool NAMES into real Tools, or refuse by name.
|
|
311
|
+
*
|
|
312
|
+
* Undefined out means the file declared no `tools:` key — a prose-only skill,
|
|
313
|
+
* byte-identical to what this loader has always produced. It never means "the
|
|
314
|
+
* names did not resolve": that throws.
|
|
315
|
+
*/
|
|
316
|
+
function resolveDeclaredTools(skill, passed, registry) {
|
|
317
|
+
if (skill.toolNames === undefined)
|
|
318
|
+
return undefined;
|
|
319
|
+
// The commonest mistake, and the one with the most misleading failure: the
|
|
320
|
+
// file is right, the call site forgot the half a file cannot carry. Refused
|
|
321
|
+
// with the whole list it asked for, so the fix is a copy-paste.
|
|
322
|
+
if (passed === undefined) {
|
|
323
|
+
throw new Error(`skillsFromDir: '${skill.file}' declares tools '${skill.toolNames.join(', ')}', but ` +
|
|
324
|
+
`skillsFromDir was called without a tool registry. A markdown file can NAME a tool; ` +
|
|
325
|
+
`only your code can supply one. Pass them: ` +
|
|
326
|
+
`skillsFromDir(dir, { tools: [${skill.toolNames.join(', ')}] }). ` +
|
|
327
|
+
`(If \`tools\` in this file belongs to another program, rename that key — it is a ` +
|
|
328
|
+
`key this loader now reads.)`);
|
|
329
|
+
}
|
|
330
|
+
const resolved = [];
|
|
331
|
+
for (const name of skill.toolNames) {
|
|
332
|
+
const tool = registry.get(name);
|
|
333
|
+
if (tool === undefined) {
|
|
334
|
+
throw new Error(`skillsFromDir: '${skill.file}' names the tool '${name}', which the \`tools\` registry ` +
|
|
335
|
+
`passed to skillsFromDir does not carry. A skill that loads without the tool it ` +
|
|
336
|
+
`asked for still runs and still sounds sure of itself, so this is refused instead. ` +
|
|
337
|
+
`Add it to the registry, or fix the name — available: ${availableNames(registry)}.`);
|
|
338
|
+
}
|
|
339
|
+
resolved.push(tool);
|
|
340
|
+
}
|
|
341
|
+
return resolved;
|
|
342
|
+
}
|
|
207
343
|
/**
|
|
208
344
|
* Parse one `SKILL.md`. Every refusal names the file — a loader that says
|
|
209
345
|
* "malformed frontmatter" over a directory of forty files has told you nothing.
|
|
210
346
|
*
|
|
211
347
|
* The grammar is deliberately small: an opening `---` line, `key: value` lines
|
|
212
348
|
* (`#` comments and blank lines skipped, single/double quotes stripped), a
|
|
213
|
-
* closing `---` line, then the body.
|
|
214
|
-
*
|
|
215
|
-
*
|
|
349
|
+
* closing `---` line, then the body. A key with NOTHING after the colon opens a
|
|
350
|
+
* block list, whose items are the following `- …` lines. Keys other than the
|
|
351
|
+
* five known ones are IGNORED rather than rejected, so a file carrying extra
|
|
352
|
+
* frontmatter for another tool still loads here.
|
|
216
353
|
*/
|
|
217
354
|
function parseSkillFile(raw, file) {
|
|
218
355
|
// Strip a UTF-8 BOM — an editor artifact, not the author's intent.
|
|
@@ -227,25 +364,9 @@ function parseSkillFile(raw, file) {
|
|
|
227
364
|
throw new Error(`skillsFromDir: '${file}' opens a '---' frontmatter block that is never closed. ` +
|
|
228
365
|
`Add a '---' line after the last frontmatter key.`);
|
|
229
366
|
}
|
|
230
|
-
const fields =
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
if (line.trim().length === 0 || line.trimStart().startsWith('#'))
|
|
234
|
-
continue;
|
|
235
|
-
const separator = line.indexOf(':');
|
|
236
|
-
if (separator === -1) {
|
|
237
|
-
throw new Error(`skillsFromDir: '${file}' frontmatter line ${i + 1} is not 'key: value' — got ` +
|
|
238
|
-
`${JSON.stringify(line)}.`);
|
|
239
|
-
}
|
|
240
|
-
const key = line.slice(0, separator).trim();
|
|
241
|
-
if (key.length === 0) {
|
|
242
|
-
throw new Error(`skillsFromDir: '${file}' frontmatter line ${i + 1} has an empty key — got ` +
|
|
243
|
-
`${JSON.stringify(line)}.`);
|
|
244
|
-
}
|
|
245
|
-
fields.set(key, unquote(line.slice(separator + 1).trim()));
|
|
246
|
-
}
|
|
247
|
-
const name = fields.get('name') ?? '';
|
|
248
|
-
const description = fields.get('description') ?? '';
|
|
367
|
+
const fields = parseFrontmatterFields(lines, closingIndex, file);
|
|
368
|
+
const name = readScalar(fields, 'name', file);
|
|
369
|
+
const description = readScalar(fields, 'description', file);
|
|
249
370
|
const body = lines
|
|
250
371
|
.slice(closingIndex + 1)
|
|
251
372
|
.join('\n')
|
|
@@ -266,7 +387,188 @@ function parseSkillFile(raw, file) {
|
|
|
266
387
|
throw new Error(`skillsFromDir: '${file}' has no body after the closing '---'. The body is what the ` +
|
|
267
388
|
`model reads once it activates the skill.`);
|
|
268
389
|
}
|
|
269
|
-
|
|
390
|
+
const toolNames = readToolNames(fields, file);
|
|
391
|
+
const steps = readSteps(fields, file, toolNames);
|
|
392
|
+
const onSkip = readOnSkip(fields, file, steps);
|
|
393
|
+
return {
|
|
394
|
+
name,
|
|
395
|
+
description,
|
|
396
|
+
body,
|
|
397
|
+
...(toolNames !== undefined && { toolNames }),
|
|
398
|
+
...(steps !== undefined && { steps }),
|
|
399
|
+
...(onSkip !== undefined && { onSkip }),
|
|
400
|
+
file,
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* The frontmatter lines → `key → value` map.
|
|
405
|
+
*
|
|
406
|
+
* A `- …` line is an ITEM only while a list is open (the line above it was a
|
|
407
|
+
* key with an empty value). Anywhere else it falls through to the `key: value`
|
|
408
|
+
* rule exactly as it always did — so a stray dash in somebody's unknown key
|
|
409
|
+
* keeps loading, and only a deliberate block list is read as one.
|
|
410
|
+
*/
|
|
411
|
+
function parseFrontmatterFields(lines, closingIndex, file) {
|
|
412
|
+
const fields = new Map();
|
|
413
|
+
let openList;
|
|
414
|
+
for (let i = 1; i < closingIndex; i++) {
|
|
415
|
+
const line = lines[i] ?? '';
|
|
416
|
+
const trimmed = line.trim();
|
|
417
|
+
if (trimmed.length === 0 || trimmed.startsWith('#'))
|
|
418
|
+
continue;
|
|
419
|
+
if (openList !== undefined && (trimmed === '-' || trimmed.startsWith('- '))) {
|
|
420
|
+
const item = trimmed === '-' ? '' : trimmed.slice(2).trim();
|
|
421
|
+
const separator = item.indexOf(':');
|
|
422
|
+
openList.push(separator === -1
|
|
423
|
+
? { key: item, line: i + 1 }
|
|
424
|
+
: {
|
|
425
|
+
key: item.slice(0, separator).trim(),
|
|
426
|
+
value: unquote(item.slice(separator + 1).trim()),
|
|
427
|
+
line: i + 1,
|
|
428
|
+
});
|
|
429
|
+
continue;
|
|
430
|
+
}
|
|
431
|
+
const separator = line.indexOf(':');
|
|
432
|
+
if (separator === -1) {
|
|
433
|
+
throw new Error(`skillsFromDir: '${file}' frontmatter line ${i + 1} is not 'key: value' — got ` +
|
|
434
|
+
`${JSON.stringify(line)}.`);
|
|
435
|
+
}
|
|
436
|
+
const key = line.slice(0, separator).trim();
|
|
437
|
+
if (key.length === 0) {
|
|
438
|
+
throw new Error(`skillsFromDir: '${file}' frontmatter line ${i + 1} has an empty key — got ` +
|
|
439
|
+
`${JSON.stringify(line)}.`);
|
|
440
|
+
}
|
|
441
|
+
const value = unquote(line.slice(separator + 1).trim());
|
|
442
|
+
if (value.length === 0) {
|
|
443
|
+
// An empty value OPENS a list. With no items after it the field stays an
|
|
444
|
+
// empty list, which every reader below treats exactly as the empty string
|
|
445
|
+
// it used to be — so `name:` with nothing after it still says "missing
|
|
446
|
+
// 'name'", not something new about lists.
|
|
447
|
+
const items = [];
|
|
448
|
+
openList = items;
|
|
449
|
+
fields.set(key, { kind: 'list', items });
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
openList = undefined;
|
|
453
|
+
fields.set(key, { kind: 'scalar', text: value });
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
return fields;
|
|
457
|
+
}
|
|
458
|
+
/** A single-valued key, as it always read. An empty block list reads as '' — a
|
|
459
|
+
* key with nothing under it never carried a value in the first place. */
|
|
460
|
+
function readScalar(fields, key, file) {
|
|
461
|
+
const field = fields.get(key);
|
|
462
|
+
if (field === undefined)
|
|
463
|
+
return '';
|
|
464
|
+
if (field.kind === 'scalar')
|
|
465
|
+
return field.text;
|
|
466
|
+
if (field.items.length === 0)
|
|
467
|
+
return '';
|
|
468
|
+
throw new Error(`skillsFromDir: '${file}' frontmatter '${key}' is a list, and '${key}' takes one value. ` +
|
|
469
|
+
`Write it as '${key}: <value>' on one line.`);
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* `tools:` → the declared names, or undefined when the key is absent.
|
|
473
|
+
*
|
|
474
|
+
* Two spellings, because both read naturally at the size they are for:
|
|
475
|
+
* `tools: a, b` for the two-tool skill, and a block list once there are six.
|
|
476
|
+
*/
|
|
477
|
+
function readToolNames(fields, file) {
|
|
478
|
+
const field = fields.get('tools');
|
|
479
|
+
if (field === undefined)
|
|
480
|
+
return undefined;
|
|
481
|
+
const names = field.kind === 'scalar'
|
|
482
|
+
? field.text
|
|
483
|
+
.split(',')
|
|
484
|
+
.map((n) => unquote(n.trim()))
|
|
485
|
+
.filter((n) => n.length > 0)
|
|
486
|
+
: field.items.map((item) => {
|
|
487
|
+
if (item.value !== undefined) {
|
|
488
|
+
throw new Error(`skillsFromDir: '${file}' line ${item.line}: a 'tools' item is a NAME, not a ` +
|
|
489
|
+
`pair — write '- ${item.key}'. (Did you mean to put this under 'steps', where ` +
|
|
490
|
+
`each item is '- <tool>: <why>'?)`);
|
|
491
|
+
}
|
|
492
|
+
return item.key;
|
|
493
|
+
});
|
|
494
|
+
if (names.length === 0) {
|
|
495
|
+
throw new Error(`skillsFromDir: '${file}' declares 'tools' with no names. Say what you mean and omit ` +
|
|
496
|
+
`the key — a skill with no tools is exactly what this loader has always produced. ` +
|
|
497
|
+
`Otherwise: 'tools: lookup_order, issue_refund', or a '- <name>' block list.`);
|
|
498
|
+
}
|
|
499
|
+
const seen = new Set();
|
|
500
|
+
for (const name of names) {
|
|
501
|
+
if (seen.has(name)) {
|
|
502
|
+
throw new Error(`skillsFromDir: '${file}' lists the tool '${name}' twice in 'tools'. Each tool ` +
|
|
503
|
+
`belongs to a skill once (a skill's tools must be unique within itself); repeat it ` +
|
|
504
|
+
`in 'steps' instead if the procedure runs it twice.`);
|
|
505
|
+
}
|
|
506
|
+
seen.add(name);
|
|
507
|
+
}
|
|
508
|
+
return names;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* `steps:` → the procedure, as data.
|
|
512
|
+
*
|
|
513
|
+
* Validated against the file's OWN `tools` here, ahead of `defineSkill`'s
|
|
514
|
+
* identical check, for one reason: this message can name the FILE and the LINE.
|
|
515
|
+
* `defineSkill` sees a skill id and cannot.
|
|
516
|
+
*/
|
|
517
|
+
function readSteps(fields, file, toolNames) {
|
|
518
|
+
const field = fields.get('steps');
|
|
519
|
+
if (field === undefined)
|
|
520
|
+
return undefined;
|
|
521
|
+
if (field.kind === 'scalar') {
|
|
522
|
+
throw new Error(`skillsFromDir: '${file}' writes 'steps' on one line, and a procedure is an ORDERED ` +
|
|
523
|
+
`list of pairs. Write it as a block:\nsteps:\n - lookup_order: look up the order ` +
|
|
524
|
+
`first\n - issue_refund: refund only what the lookup found`);
|
|
525
|
+
}
|
|
526
|
+
if (field.items.length === 0) {
|
|
527
|
+
throw new Error(`skillsFromDir: '${file}' declares 'steps' with no items. Say what you mean and omit ` +
|
|
528
|
+
`the key — a skill without steps is byte-identical to one that never heard of them.`);
|
|
529
|
+
}
|
|
530
|
+
if (toolNames === undefined) {
|
|
531
|
+
throw new Error(`skillsFromDir: '${file}' declares 'steps' but no 'tools'. Every step runs one of the ` +
|
|
532
|
+
`skill's own tools, so a sequence with nothing to sequence can never engage. Add ` +
|
|
533
|
+
`'tools: …', or drop 'steps'.`);
|
|
534
|
+
}
|
|
535
|
+
const declared = new Set(toolNames);
|
|
536
|
+
return field.items.map((item) => {
|
|
537
|
+
if (item.value === undefined || item.value.length === 0) {
|
|
538
|
+
throw new Error(`skillsFromDir: '${file}' line ${item.line}: every step is '- <tool>: <why>' and ` +
|
|
539
|
+
`this one has no why. The note is the sentence the model reads about why the step ` +
|
|
540
|
+
`exists — a step without one is a force-march instruction, and the note is the ` +
|
|
541
|
+
`whole point.`);
|
|
542
|
+
}
|
|
543
|
+
if (item.key.length === 0) {
|
|
544
|
+
throw new Error(`skillsFromDir: '${file}' line ${item.line}: this step names no tool. Every step is ` +
|
|
545
|
+
`'- <tool>: <why>'.`);
|
|
546
|
+
}
|
|
547
|
+
if (!declared.has(item.key)) {
|
|
548
|
+
throw new Error(`skillsFromDir: '${file}' line ${item.line}: step '${item.key}' is not in this ` +
|
|
549
|
+
`file's 'tools' (${toolNames.join(', ')}). Steps may only sequence the skill's own ` +
|
|
550
|
+
`tools — add it to 'tools', or fix the name. Everything else the agent has stays ` +
|
|
551
|
+
`available as an escape hatch, unsequenced.`);
|
|
552
|
+
}
|
|
553
|
+
return { tool: item.key, note: item.value };
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
/** `onSkip:` → the skip policy. Refused here rather than at `defineSkill` so
|
|
557
|
+
* the message can name the file the author has to open. */
|
|
558
|
+
function readOnSkip(fields, file, steps) {
|
|
559
|
+
if (fields.get('onSkip') === undefined)
|
|
560
|
+
return undefined;
|
|
561
|
+
const raw = readScalar(fields, 'onSkip', file);
|
|
562
|
+
if (steps === undefined) {
|
|
563
|
+
throw new Error(`skillsFromDir: '${file}' declares 'onSkip' with no 'steps'. It says what a SKIPPED ` +
|
|
564
|
+
`step does, and this file declares no steps. Add 'steps:', or drop 'onSkip'.`);
|
|
565
|
+
}
|
|
566
|
+
if (raw !== 'advance' && raw !== 'hold') {
|
|
567
|
+
throw new Error(`skillsFromDir: '${file}' declares onSkip '${raw}', which is not a policy this ` +
|
|
568
|
+
`library has. The two are 'advance' (record the skip and move on — the default) and ` +
|
|
569
|
+
`'hold' (record the skip and keep the step current).`);
|
|
570
|
+
}
|
|
571
|
+
return raw;
|
|
270
572
|
}
|
|
271
573
|
/** Strip one layer of matching single or double quotes from a YAML-ish scalar. */
|
|
272
574
|
function unquote(value) {
|
|
@@ -1 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jB,MAAuC,EACvC,IAAY,EACZ,KAAuC;IAEvC,IAAI,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACzD,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC/C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CACb,mBAAmB,IAAI,8DAA8D;YACnF,6EAA6E,CAChF,CAAC;IACJ,CAAC;IACD,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CACb,mBAAmB,IAAI,sBAAsB,GAAG,gCAAgC;YAC9E,qFAAqF;YACrF,qDAAqD,CACxD,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,kFAAkF;AAClF,SAAS,OAAO,CAAC,KAAa;IAC5B,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;QACtB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACvB,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACvE,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineSkill.js","sourceRoot":"","sources":["../../../../src/lib/injection-engine/factories/defineSkill.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;;;AAEH,6CAAwC;AAGxC,4EAAwE;AAExE,oDAAyF;AACzF,8DAAiE;
|
|
1
|
+
{"version":3,"file":"defineSkill.js","sourceRoot":"","sources":["../../../../src/lib/injection-engine/factories/defineSkill.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;;;AAEH,6CAAwC;AAGxC,4EAAwE;AAExE,oDAAyF;AACzF,8DAAiE;AAsOjE;;;;;;;;;;;GAWG;AACH,SAAgB,kBAAkB,CAAC,QAAgB,EAAE,KAAc;IACjE,MAAM,CAAC,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACjC,IAAI,CAAC,KAAK,WAAW,EAAE,CAAC;QACtB,2CAA2C;QAC3C,4CAA4C;QAC5C,+EAA+E;QAC/E,gFAAgF;QAChF,IAAI,KAAK,IAAI,iEAAiE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3F,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC;AAbD,gDAaC;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAS,mBAAmB,CAAC,KAAa,EAAE,IAAY;IACtD,MAAM,MAAM,GAAI,IAA2C,CAAC,WAAW,CAAC;IACxE,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO;IACjC,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,iFAAiF;QACvF,WAAW,MAAM,CAAC,MAAM,CAAC,gEAAgE;QACzF,uFAAuF;QACvF,yFAAyF;QACzF,yFAAyF;QACzF,wFAAwF,CAC3F,CAAC;AACJ,CAAC;AAED;;6DAE6D;AAC7D,IAAI,6BAA6B,GAAG,KAAK,CAAC;AAE1C;;;GAGG;AACH,SAAS,2BAA2B,CAAC,OAAe;IAClD,IAAI,6BAA6B,IAAI,CAAC,IAAA,uBAAS,GAAE;QAAE,OAAO;IAC1D,6BAA6B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