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.
Files changed (32) hide show
  1. package/dist/core/agent/AgentBuilder.js +85 -0
  2. package/dist/core/agent/AgentBuilder.js.map +1 -1
  3. package/dist/core/agent/buildToolRegistry.js +7 -0
  4. package/dist/core/agent/buildToolRegistry.js.map +1 -1
  5. package/dist/core/agent/toolsFromActiveSkill.js +79 -0
  6. package/dist/core/agent/toolsFromActiveSkill.js.map +1 -0
  7. package/dist/esm/core/agent/AgentBuilder.d.ts +62 -0
  8. package/dist/esm/core/agent/AgentBuilder.js +85 -0
  9. package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
  10. package/dist/esm/core/agent/buildToolRegistry.js +7 -0
  11. package/dist/esm/core/agent/buildToolRegistry.js.map +1 -1
  12. package/dist/esm/core/agent/toolsFromActiveSkill.d.ts +55 -0
  13. package/dist/esm/core/agent/toolsFromActiveSkill.js +75 -0
  14. package/dist/esm/core/agent/toolsFromActiveSkill.js.map +1 -0
  15. package/dist/esm/lib/injection-engine/factories/defineSkill.d.ts +7 -0
  16. package/dist/esm/lib/injection-engine/factories/defineSkill.js.map +1 -1
  17. package/dist/esm/lib/injection-engine/skillsFromDir.d.ts +80 -17
  18. package/dist/esm/lib/injection-engine/skillsFromDir.js +348 -46
  19. package/dist/esm/lib/injection-engine/skillsFromDir.js.map +1 -1
  20. package/dist/lib/injection-engine/factories/defineSkill.js.map +1 -1
  21. package/dist/lib/injection-engine/skillsFromDir.js +348 -46
  22. package/dist/lib/injection-engine/skillsFromDir.js.map +1 -1
  23. package/dist/types/core/agent/AgentBuilder.d.ts +62 -0
  24. package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
  25. package/dist/types/core/agent/buildToolRegistry.d.ts.map +1 -1
  26. package/dist/types/core/agent/toolsFromActiveSkill.d.ts +56 -0
  27. package/dist/types/core/agent/toolsFromActiveSkill.d.ts.map +1 -0
  28. package/dist/types/lib/injection-engine/factories/defineSkill.d.ts +7 -0
  29. package/dist/types/lib/injection-engine/factories/defineSkill.d.ts.map +1 -1
  30. package/dist/types/lib/injection-engine/skillsFromDir.d.ts +80 -17
  31. package/dist/types/lib/injection-engine/skillsFromDir.d.ts.map +1 -1
  32. package/package.json +1 -1
@@ -30,21 +30,56 @@
30
30
  * body (what it reads after deciding). That is the same file convention Claude
31
31
  * Code made familiar, so a skill folder is portable between the two.
32
32
  *
33
- * ── What a SKILL.md can and cannot carry ─────────────────────────────────────
34
- * `name`, `description`, the body. That is the whole per-file surface, and the
35
- * limits follow from it rather than from an oversight:
33
+ * ── What a SKILL.md can carry (9.36.0: the whole runbook) ────────────────────
34
+ * A runbook you already have on disk is three things — what to do (prose),
35
+ * what to do it WITH (tools), and in what order (steps). This door used to
36
+ * carry the first and drop the other two, so the one thing the library exists
37
+ * to say ("extract the workflow you already have") arrived two-thirds empty.
38
+ * All three now cross:
36
39
  *
37
- * - **no `tools`** — a tool is code with an `execute`, and a markdown file has
38
- * none. Every loaded skill is body-only. To give one tools, define that skill
39
- * with `defineSkill` and mix the lists (`[...loaded, codeAuthored]`), or put
40
- * the tools on the route target you declare in code.
41
- * - **no `autoActivate`** — so a loaded skill never scopes the agent's tool list
42
- * on its own (it has no tools to scope).
43
- * - **no per-file `surfaceMode`, `cache` or `refreshPolicy`** — `surfaceMode` is
44
- * settable for the WHOLE directory via `opts`, all of them or none; the others
45
- * take `defineSkill`'s defaults.
46
- * - unknown frontmatter keys are IGNORED, not rejected, so a file carrying
47
- * another tool's metadata still loads here.
40
+ * ---
41
+ * name: billing
42
+ * description: Use for refunds, charges and billing questions.
43
+ * tools: lookup_order, issue_refund
44
+ * steps:
45
+ * - lookup_order: look up the order before touching money
46
+ * - issue_refund: refund only what the lookup found
47
+ * onSkip: hold
48
+ * ---
49
+ * When handling billing: confirm identity first, then …
50
+ *
51
+ * const skills = await skillsFromDir('./skills', {
52
+ * tools: [lookupOrder, issueRefund], // the real Tools, from YOUR code
53
+ * });
54
+ *
55
+ * The remaining limits, and why each one is a decision rather than an
56
+ * oversight:
57
+ *
58
+ * - **the file names a tool; it never defines one.** A tool is code with an
59
+ * `execute`, and a markdown file has none. `tools:` is a list of NAMES,
60
+ * resolved against the `tools` registry the CALLER passes — so the file
61
+ * can only ever pick from capabilities you already handed in, and reading a
62
+ * directory can never introduce one. See "why this is not a code-execution
63
+ * vector" below.
64
+ * - **a name the registry does not carry is refused BY NAME at load** —
65
+ * never a skill that quietly loads without the tool it asked for, because
66
+ * that skill runs, sounds confident, and cannot do the job.
67
+ * - **no per-step `produces` / `consumes`** — the artifact vocabularies
68
+ * (9.25.0) are a build-time contract between skills, not runbook prose;
69
+ * declare them with `defineSkill` where the rest of the agent is declared.
70
+ * - **no `autoActivate`** — a directory does not decide the agent's tool
71
+ * posture. Say it once on the agent with `.toolsFromActiveSkill()`
72
+ * (9.36.0), which scopes every skill's tools to that skill's activation.
73
+ * Without it, a loaded skill's tools are on the wire from iteration 1, the
74
+ * same as any hand-written `defineSkill({ tools })`.
75
+ * - **no per-file `surfaceMode`, `cache` or `refreshPolicy`** — `surfaceMode`
76
+ * is settable for the WHOLE directory via `opts`, all of them or none; the
77
+ * others take `defineSkill`'s defaults.
78
+ * - unknown frontmatter keys are still IGNORED, not rejected, so a file
79
+ * carrying another tool's metadata still loads here. `name`,
80
+ * `description`, `tools`, `steps` and `onSkip` are the KNOWN keys — a file
81
+ * that used one of those five for something else is the one case this
82
+ * release can change, and it changes it loudly.
48
83
  *
49
84
  * A worked example feeding this into a graph:
50
85
  * `examples/features/47-skills-from-dir-graph.ts`.
@@ -58,6 +93,17 @@
58
93
  * only make about a path on your own disk at build time. Each file is read
59
94
  * ONCE, here; a later edit does not reach a run already in flight.
60
95
  *
96
+ * ── Why carrying tools is not a code-execution vector ───────────────────────
97
+ * Nothing in a SKILL.md is evaluated, imported, required or resolved as a
98
+ * path. `tools:` is a list of strings, and the only thing a string can do here
99
+ * is MATCH — against `tool.schema.name` in a registry the caller constructed in
100
+ * their own source, from their own imports. A hostile file can therefore ask
101
+ * for a tool you already gave the agent (and it would have to guess the name);
102
+ * it can never name a module, widen the agent's capabilities, or cause one byte
103
+ * of new code to run. The set of things this directory can do is a SUBSET of
104
+ * what the calling file already decided to do, which is the same property the
105
+ * local-path rule above buys for bodies.
106
+ *
61
107
  * Node-only. `node:fs/promises` and `node:path` are imported lazily inside the
62
108
  * call, the same gating `lib/tool-lint/cli.ts` uses: this module is reachable
63
109
  * from the `agentfootprint/context` barrel, and a TOP-LEVEL node:fs
@@ -99,6 +145,9 @@ const SKILL_FILE = 'SKILL.md';
99
145
  const SKILL_NAME_RE = /^[a-zA-Z0-9_-]{1,64}$/;
100
146
  /** Anything of the form `scheme://…` — http, https, s3, git+ssh, file, … */
101
147
  const URL_LIKE_RE = /^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//;
148
+ /** How many registry names a refusal lists before it stops. Long enough to
149
+ * spot the typo, short enough that a 200-tool agent's error is still readable. */
150
+ const NAMES_IN_REFUSAL = 20;
102
151
  /**
103
152
  * Load every `SKILL.md` under `dir` as a Skill Injection.
104
153
  *
@@ -116,8 +165,9 @@ const URL_LIKE_RE = /^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//;
116
165
  *
117
166
  * @throws when `dir` is not a local path, does not exist, is not a directory,
118
167
  * or contains no `SKILL.md` at all; when a file's frontmatter is malformed
119
- * (the message names the file); or when two files claim the same skill name
120
- * (the message names both).
168
+ * (the message names the file); when two files claim the same skill name
169
+ * (the message names both); or when a file names a tool the `tools` registry
170
+ * does not carry, or sequences a tool the file itself did not declare.
121
171
  */
122
172
  async function skillsFromDir(dir, opts = {}) {
123
173
  assertLocalDirectoryArgument(dir);
@@ -176,15 +226,26 @@ async function skillsFromDir(dir, opts = {}) {
176
226
  }
177
227
  byName.set(skill.name, skill);
178
228
  }
229
+ // The registry, indexed once for the whole directory. Built even when no file
230
+ // declares tools — an empty Map costs nothing and keeps the resolve path one
231
+ // shape. `undefined` (option omitted) is DISTINCT from an empty registry: the
232
+ // refusals say different things, because the fixes are different.
233
+ const registry = indexToolRegistry(opts.tools);
179
234
  return parsed
180
235
  .slice()
181
236
  .sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0))
182
- .map((skill) => (0, defineSkill_js_1.defineSkill)({
183
- id: skill.name,
184
- description: skill.description,
185
- body: skill.body,
186
- ...(opts.surfaceMode !== undefined && { surfaceMode: opts.surfaceMode }),
187
- }));
237
+ .map((skill) => {
238
+ const tools = resolveDeclaredTools(skill, opts.tools, registry);
239
+ return (0, defineSkill_js_1.defineSkill)({
240
+ id: skill.name,
241
+ description: skill.description,
242
+ body: skill.body,
243
+ ...(tools !== undefined && { tools }),
244
+ ...(skill.steps !== undefined && { steps: skill.steps }),
245
+ ...(skill.onSkip !== undefined && { onSkip: skill.onSkip }),
246
+ ...(opts.surfaceMode !== undefined && { surfaceMode: opts.surfaceMode }),
247
+ });
248
+ });
188
249
  }
189
250
  exports.skillsFromDir = skillsFromDir;
190
251
  // ─── Authorship guard ──────────────────────────────────────────────
@@ -230,16 +291,92 @@ function assertLocalDirectoryArgument(dir) {
230
291
  `at build time.`);
231
292
  }
232
293
  }
233
- // ─── Frontmatter ───────────────────────────────────────────────────
294
+ // ─── Tool resolution (names on disk → Tools from your code) ────────
295
+ /**
296
+ * Index the caller's registry by wire name.
297
+ *
298
+ * `undefined` in, empty Map out — the CALLER's `undefined` is remembered
299
+ * separately by `resolveDeclaredTools`, because "you passed no registry" and
300
+ * "your registry does not carry that one" need different sentences.
301
+ *
302
+ * Two registry entries under one name is refused here rather than resolved by
303
+ * last-wins: which of the two a skill got would depend on array order, and a
304
+ * skill silently running the wrong `execute` is the failure this whole door is
305
+ * supposed to make impossible.
306
+ */
307
+ function indexToolRegistry(tools) {
308
+ const index = new Map();
309
+ for (const tool of tools ?? []) {
310
+ const name = tool?.schema?.name;
311
+ if (typeof name !== 'string' || name.length === 0) {
312
+ throw new Error(`skillsFromDir: the \`tools\` registry contains an entry with no \`schema.name\`. ` +
313
+ `Every entry must be a Tool (defineTool(...) produces one) — a SKILL.md resolves ` +
314
+ `tools BY NAME, so an unnamed one can never be picked.`);
315
+ }
316
+ const prior = index.get(name);
317
+ if (prior !== undefined && prior !== tool) {
318
+ throw new Error(`skillsFromDir: the \`tools\` registry carries two different tools named '${name}'. ` +
319
+ `A SKILL.md names a tool by that string, so which implementation a skill got would ` +
320
+ `depend on array order. Rename one, or pass only the one you mean.`);
321
+ }
322
+ index.set(name, tool);
323
+ }
324
+ return index;
325
+ }
326
+ /** The registry's names, sorted and capped — the material every refusal ends with. */
327
+ function availableNames(registry) {
328
+ if (registry.size === 0)
329
+ return '(the registry you passed is empty)';
330
+ const names = [...registry.keys()].sort();
331
+ const shown = names.slice(0, NAMES_IN_REFUSAL).join(', ');
332
+ return names.length > NAMES_IN_REFUSAL
333
+ ? `${shown}, …and ${names.length - NAMES_IN_REFUSAL} more`
334
+ : shown;
335
+ }
336
+ /**
337
+ * Turn one file's declared tool NAMES into real Tools, or refuse by name.
338
+ *
339
+ * Undefined out means the file declared no `tools:` key — a prose-only skill,
340
+ * byte-identical to what this loader has always produced. It never means "the
341
+ * names did not resolve": that throws.
342
+ */
343
+ function resolveDeclaredTools(skill, passed, registry) {
344
+ if (skill.toolNames === undefined)
345
+ return undefined;
346
+ // The commonest mistake, and the one with the most misleading failure: the
347
+ // file is right, the call site forgot the half a file cannot carry. Refused
348
+ // with the whole list it asked for, so the fix is a copy-paste.
349
+ if (passed === undefined) {
350
+ throw new Error(`skillsFromDir: '${skill.file}' declares tools '${skill.toolNames.join(', ')}', but ` +
351
+ `skillsFromDir was called without a tool registry. A markdown file can NAME a tool; ` +
352
+ `only your code can supply one. Pass them: ` +
353
+ `skillsFromDir(dir, { tools: [${skill.toolNames.join(', ')}] }). ` +
354
+ `(If \`tools\` in this file belongs to another program, rename that key — it is a ` +
355
+ `key this loader now reads.)`);
356
+ }
357
+ const resolved = [];
358
+ for (const name of skill.toolNames) {
359
+ const tool = registry.get(name);
360
+ if (tool === undefined) {
361
+ throw new Error(`skillsFromDir: '${skill.file}' names the tool '${name}', which the \`tools\` registry ` +
362
+ `passed to skillsFromDir does not carry. A skill that loads without the tool it ` +
363
+ `asked for still runs and still sounds sure of itself, so this is refused instead. ` +
364
+ `Add it to the registry, or fix the name — available: ${availableNames(registry)}.`);
365
+ }
366
+ resolved.push(tool);
367
+ }
368
+ return resolved;
369
+ }
234
370
  /**
235
371
  * Parse one `SKILL.md`. Every refusal names the file — a loader that says
236
372
  * "malformed frontmatter" over a directory of forty files has told you nothing.
237
373
  *
238
374
  * The grammar is deliberately small: an opening `---` line, `key: value` lines
239
375
  * (`#` comments and blank lines skipped, single/double quotes stripped), a
240
- * closing `---` line, then the body. Keys other than `name` and `description`
241
- * are IGNORED rather than rejected, so a file carrying extra frontmatter for
242
- * another tool still loads here.
376
+ * closing `---` line, then the body. A key with NOTHING after the colon opens a
377
+ * block list, whose items are the following `- …` lines. Keys other than the
378
+ * five known ones are IGNORED rather than rejected, so a file carrying extra
379
+ * frontmatter for another tool still loads here.
243
380
  */
244
381
  function parseSkillFile(raw, file) {
245
382
  // Strip a UTF-8 BOM — an editor artifact, not the author's intent.
@@ -254,25 +391,9 @@ function parseSkillFile(raw, file) {
254
391
  throw new Error(`skillsFromDir: '${file}' opens a '---' frontmatter block that is never closed. ` +
255
392
  `Add a '---' line after the last frontmatter key.`);
256
393
  }
257
- const fields = new Map();
258
- for (let i = 1; i < closingIndex; i++) {
259
- const line = lines[i] ?? '';
260
- if (line.trim().length === 0 || line.trimStart().startsWith('#'))
261
- continue;
262
- const separator = line.indexOf(':');
263
- if (separator === -1) {
264
- throw new Error(`skillsFromDir: '${file}' frontmatter line ${i + 1} is not 'key: value' — got ` +
265
- `${JSON.stringify(line)}.`);
266
- }
267
- const key = line.slice(0, separator).trim();
268
- if (key.length === 0) {
269
- throw new Error(`skillsFromDir: '${file}' frontmatter line ${i + 1} has an empty key — got ` +
270
- `${JSON.stringify(line)}.`);
271
- }
272
- fields.set(key, unquote(line.slice(separator + 1).trim()));
273
- }
274
- const name = fields.get('name') ?? '';
275
- const description = fields.get('description') ?? '';
394
+ const fields = parseFrontmatterFields(lines, closingIndex, file);
395
+ const name = readScalar(fields, 'name', file);
396
+ const description = readScalar(fields, 'description', file);
276
397
  const body = lines
277
398
  .slice(closingIndex + 1)
278
399
  .join('\n')
@@ -293,7 +414,188 @@ function parseSkillFile(raw, file) {
293
414
  throw new Error(`skillsFromDir: '${file}' has no body after the closing '---'. The body is what the ` +
294
415
  `model reads once it activates the skill.`);
295
416
  }
296
- return { name, description, body, file };
417
+ const toolNames = readToolNames(fields, file);
418
+ const steps = readSteps(fields, file, toolNames);
419
+ const onSkip = readOnSkip(fields, file, steps);
420
+ return {
421
+ name,
422
+ description,
423
+ body,
424
+ ...(toolNames !== undefined && { toolNames }),
425
+ ...(steps !== undefined && { steps }),
426
+ ...(onSkip !== undefined && { onSkip }),
427
+ file,
428
+ };
429
+ }
430
+ /**
431
+ * The frontmatter lines → `key → value` map.
432
+ *
433
+ * A `- …` line is an ITEM only while a list is open (the line above it was a
434
+ * key with an empty value). Anywhere else it falls through to the `key: value`
435
+ * rule exactly as it always did — so a stray dash in somebody's unknown key
436
+ * keeps loading, and only a deliberate block list is read as one.
437
+ */
438
+ function parseFrontmatterFields(lines, closingIndex, file) {
439
+ const fields = new Map();
440
+ let openList;
441
+ for (let i = 1; i < closingIndex; i++) {
442
+ const line = lines[i] ?? '';
443
+ const trimmed = line.trim();
444
+ if (trimmed.length === 0 || trimmed.startsWith('#'))
445
+ continue;
446
+ if (openList !== undefined && (trimmed === '-' || trimmed.startsWith('- '))) {
447
+ const item = trimmed === '-' ? '' : trimmed.slice(2).trim();
448
+ const separator = item.indexOf(':');
449
+ openList.push(separator === -1
450
+ ? { key: item, line: i + 1 }
451
+ : {
452
+ key: item.slice(0, separator).trim(),
453
+ value: unquote(item.slice(separator + 1).trim()),
454
+ line: i + 1,
455
+ });
456
+ continue;
457
+ }
458
+ const separator = line.indexOf(':');
459
+ if (separator === -1) {
460
+ throw new Error(`skillsFromDir: '${file}' frontmatter line ${i + 1} is not 'key: value' — got ` +
461
+ `${JSON.stringify(line)}.`);
462
+ }
463
+ const key = line.slice(0, separator).trim();
464
+ if (key.length === 0) {
465
+ throw new Error(`skillsFromDir: '${file}' frontmatter line ${i + 1} has an empty key — got ` +
466
+ `${JSON.stringify(line)}.`);
467
+ }
468
+ const value = unquote(line.slice(separator + 1).trim());
469
+ if (value.length === 0) {
470
+ // An empty value OPENS a list. With no items after it the field stays an
471
+ // empty list, which every reader below treats exactly as the empty string
472
+ // it used to be — so `name:` with nothing after it still says "missing
473
+ // 'name'", not something new about lists.
474
+ const items = [];
475
+ openList = items;
476
+ fields.set(key, { kind: 'list', items });
477
+ }
478
+ else {
479
+ openList = undefined;
480
+ fields.set(key, { kind: 'scalar', text: value });
481
+ }
482
+ }
483
+ return fields;
484
+ }
485
+ /** A single-valued key, as it always read. An empty block list reads as '' — a
486
+ * key with nothing under it never carried a value in the first place. */
487
+ function readScalar(fields, key, file) {
488
+ const field = fields.get(key);
489
+ if (field === undefined)
490
+ return '';
491
+ if (field.kind === 'scalar')
492
+ return field.text;
493
+ if (field.items.length === 0)
494
+ return '';
495
+ throw new Error(`skillsFromDir: '${file}' frontmatter '${key}' is a list, and '${key}' takes one value. ` +
496
+ `Write it as '${key}: <value>' on one line.`);
497
+ }
498
+ /**
499
+ * `tools:` → the declared names, or undefined when the key is absent.
500
+ *
501
+ * Two spellings, because both read naturally at the size they are for:
502
+ * `tools: a, b` for the two-tool skill, and a block list once there are six.
503
+ */
504
+ function readToolNames(fields, file) {
505
+ const field = fields.get('tools');
506
+ if (field === undefined)
507
+ return undefined;
508
+ const names = field.kind === 'scalar'
509
+ ? field.text
510
+ .split(',')
511
+ .map((n) => unquote(n.trim()))
512
+ .filter((n) => n.length > 0)
513
+ : field.items.map((item) => {
514
+ if (item.value !== undefined) {
515
+ throw new Error(`skillsFromDir: '${file}' line ${item.line}: a 'tools' item is a NAME, not a ` +
516
+ `pair — write '- ${item.key}'. (Did you mean to put this under 'steps', where ` +
517
+ `each item is '- <tool>: <why>'?)`);
518
+ }
519
+ return item.key;
520
+ });
521
+ if (names.length === 0) {
522
+ throw new Error(`skillsFromDir: '${file}' declares 'tools' with no names. Say what you mean and omit ` +
523
+ `the key — a skill with no tools is exactly what this loader has always produced. ` +
524
+ `Otherwise: 'tools: lookup_order, issue_refund', or a '- <name>' block list.`);
525
+ }
526
+ const seen = new Set();
527
+ for (const name of names) {
528
+ if (seen.has(name)) {
529
+ throw new Error(`skillsFromDir: '${file}' lists the tool '${name}' twice in 'tools'. Each tool ` +
530
+ `belongs to a skill once (a skill's tools must be unique within itself); repeat it ` +
531
+ `in 'steps' instead if the procedure runs it twice.`);
532
+ }
533
+ seen.add(name);
534
+ }
535
+ return names;
536
+ }
537
+ /**
538
+ * `steps:` → the procedure, as data.
539
+ *
540
+ * Validated against the file's OWN `tools` here, ahead of `defineSkill`'s
541
+ * identical check, for one reason: this message can name the FILE and the LINE.
542
+ * `defineSkill` sees a skill id and cannot.
543
+ */
544
+ function readSteps(fields, file, toolNames) {
545
+ const field = fields.get('steps');
546
+ if (field === undefined)
547
+ return undefined;
548
+ if (field.kind === 'scalar') {
549
+ throw new Error(`skillsFromDir: '${file}' writes 'steps' on one line, and a procedure is an ORDERED ` +
550
+ `list of pairs. Write it as a block:\nsteps:\n - lookup_order: look up the order ` +
551
+ `first\n - issue_refund: refund only what the lookup found`);
552
+ }
553
+ if (field.items.length === 0) {
554
+ throw new Error(`skillsFromDir: '${file}' declares 'steps' with no items. Say what you mean and omit ` +
555
+ `the key — a skill without steps is byte-identical to one that never heard of them.`);
556
+ }
557
+ if (toolNames === undefined) {
558
+ throw new Error(`skillsFromDir: '${file}' declares 'steps' but no 'tools'. Every step runs one of the ` +
559
+ `skill's own tools, so a sequence with nothing to sequence can never engage. Add ` +
560
+ `'tools: …', or drop 'steps'.`);
561
+ }
562
+ const declared = new Set(toolNames);
563
+ return field.items.map((item) => {
564
+ if (item.value === undefined || item.value.length === 0) {
565
+ throw new Error(`skillsFromDir: '${file}' line ${item.line}: every step is '- <tool>: <why>' and ` +
566
+ `this one has no why. The note is the sentence the model reads about why the step ` +
567
+ `exists — a step without one is a force-march instruction, and the note is the ` +
568
+ `whole point.`);
569
+ }
570
+ if (item.key.length === 0) {
571
+ throw new Error(`skillsFromDir: '${file}' line ${item.line}: this step names no tool. Every step is ` +
572
+ `'- <tool>: <why>'.`);
573
+ }
574
+ if (!declared.has(item.key)) {
575
+ throw new Error(`skillsFromDir: '${file}' line ${item.line}: step '${item.key}' is not in this ` +
576
+ `file's 'tools' (${toolNames.join(', ')}). Steps may only sequence the skill's own ` +
577
+ `tools — add it to 'tools', or fix the name. Everything else the agent has stays ` +
578
+ `available as an escape hatch, unsequenced.`);
579
+ }
580
+ return { tool: item.key, note: item.value };
581
+ });
582
+ }
583
+ /** `onSkip:` → the skip policy. Refused here rather than at `defineSkill` so
584
+ * the message can name the file the author has to open. */
585
+ function readOnSkip(fields, file, steps) {
586
+ if (fields.get('onSkip') === undefined)
587
+ return undefined;
588
+ const raw = readScalar(fields, 'onSkip', file);
589
+ if (steps === undefined) {
590
+ throw new Error(`skillsFromDir: '${file}' declares 'onSkip' with no 'steps'. It says what a SKIPPED ` +
591
+ `step does, and this file declares no steps. Add 'steps:', or drop 'onSkip'.`);
592
+ }
593
+ if (raw !== 'advance' && raw !== 'hold') {
594
+ throw new Error(`skillsFromDir: '${file}' declares onSkip '${raw}', which is not a policy this ` +
595
+ `library has. The two are 'advance' (record the skip and move on — the default) and ` +
596
+ `'hold' (record the skip and keep the step current).`);
597
+ }
598
+ return raw;
297
599
  }
298
600
  /** Strip one layer of matching single or double quotes from a YAML-ish scalar. */
299
601
  function unquote(value) {
@@ -1 +1 @@
1
- {"version":3,"file":"skillsFromDir.js","sourceRoot":"","sources":["../../../src/lib/injection-engine/skillsFromDir.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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"}
@@ -197,6 +197,11 @@ export declare class AgentBuilder {
197
197
  * Undefined for every agent that did not ask for it, which is what makes
198
198
  * the feature byte-identical when unused. */
199
199
  private evidenceGate?;
200
+ /** The tool posture (9.36.0) — set by `.toolsFromActiveSkill()`. False for
201
+ * every agent that did not ask for it, and the stamp it gates is the ONLY
202
+ * thing it does, which is what makes the feature byte-identical when
203
+ * unused. */
204
+ private toolsFromActiveSkillValue;
200
205
  private outputSchemaRetries;
201
206
  private outputSchemaStrategy;
202
207
  private outputSchemaJson?;
@@ -924,6 +929,63 @@ export declare class AgentBuilder {
924
929
  * .build();
925
930
  */
926
931
  namesAndNumbersFromEvidence(opts?: NamesAndNumbersOptions): this;
932
+ /**
933
+ * Offer a skill's tools **only while that skill is active** (9.36.0). One
934
+ * line, for every skill on the agent.
935
+ *
936
+ * ## What it fixes
937
+ *
938
+ * By default a skill's `tools` go into the agent's STATIC tool list at build
939
+ * time, so the model can see and call them from iteration 1 — activated or
940
+ * not. Narrowing that was a per-skill field (`defineSkill({ autoActivate:
941
+ * 'currentSkill' })`) you had to remember on every skill; the one you forgot
942
+ * kept its tools on the wire for the life of the agent, and nothing said so.
943
+ * This says it once, for all of them.
944
+ *
945
+ * With it on, a skill's tools enter the request on the iterations where the
946
+ * skill is active — through the same readmission path `autoActivate` has used
947
+ * since v2.5 — and nowhere else. Everything else is untouched: `read_skill`,
948
+ * `list_skills`, your `.tool()` registry, provider tools and every other
949
+ * active skill's tools stay offered, because a scoped agent still has to
950
+ * handle the input nobody imagined.
951
+ *
952
+ * ## Not a posture dial, and why
953
+ *
954
+ * `.skillGraph({ strictness })` and `.namesAndNumbersFromEvidence({ posture })`
955
+ * take three values because there is a real middle there — record it, revise
956
+ * it, refuse it. The wire has no middle: a tool's schema is either in the
957
+ * request or it is not, and "record that we sent it" is just sending it. A
958
+ * three-value dial here would ship one behaviour under two names.
959
+ *
960
+ * ## What it does NOT do
961
+ *
962
+ * It governs the OFFER, not dispatch. A tool stays resolvable by name so an
963
+ * active skill's call lands — the split `autoActivate` has always had. If you
964
+ * need execution itself gated (an inactive skill's tool refused even when the
965
+ * model names it from a restored transcript), that is a `PermissionChecker`
966
+ * or a `gatedTools` provider, and it is a different question: authority to
967
+ * run, not what the model was shown.
968
+ *
969
+ * ## Interaction with the per-skill flag and with `scopeTools`
970
+ *
971
+ * All three stamp the same field, and none can contradict another:
972
+ * `autoActivate` has one legal value, so a skill can ask to be scoped and can
973
+ * never ask to be exempt. A skill that declared its own keeps it; the graph's
974
+ * `scopeTools: true` fills in the skills it wires; this fills in the rest.
975
+ * Turning it on can only remove tools from the static list, never add one.
976
+ *
977
+ * **Opt-in in 9.x.** The default is unchanged — an agent that never calls
978
+ * this builds byte-identical bytes and emits byte-identical events. The
979
+ * default flips in 10.0.0, the same ledger `skillGraph({ scopeTools })` is on.
980
+ *
981
+ * @example
982
+ * const skills = await skillsFromDir('./skills', { tools: [lookupOrder, issueRefund] });
983
+ * const agent = Agent.create({ provider, model })
984
+ * .skills({ list: () => skills })
985
+ * .toolsFromActiveSkill() // billing's tools appear when billing does
986
+ * .build();
987
+ */
988
+ toolsFromActiveSkill(): this;
927
989
  outputSchema<T>(parser: OutputSchemaParser<T>, opts?: OutputSchemaOptions): this;
928
990
  /**
929
991
  * 3-tier degradation for output-schema validation failures. Pairs
@@ -1 +1 @@
1
- {"version":3,"file":"AgentBuilder.d.ts","sourceRoot":"","sources":["../../../../src/core/agent/AgentBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAExB,MAAM,oBAAoB,CAAC;AAQ5B,OAAO,KAAK,EAAE,sBAAsB,EAAwB,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,EAEL,KAAK,UAAU,EAEf,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAkB1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,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