@vibe-agent-toolkit/agent-skills 0.2.0-rc.5 → 0.2.0-rc.7

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 (79) hide show
  1. package/dist/content-type-routing.d.ts +32 -0
  2. package/dist/content-type-routing.d.ts.map +1 -1
  3. package/dist/content-type-routing.js +23 -0
  4. package/dist/content-type-routing.js.map +1 -1
  5. package/dist/index.d.ts +7 -4
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +14 -3
  8. package/dist/index.js.map +1 -1
  9. package/dist/parsers/frontmatter-parser.d.ts.map +1 -1
  10. package/dist/parsers/frontmatter-parser.js +30 -6
  11. package/dist/parsers/frontmatter-parser.js.map +1 -1
  12. package/dist/plugin-distribution-layout.d.ts.map +1 -1
  13. package/dist/plugin-distribution-layout.js +13 -0
  14. package/dist/plugin-distribution-layout.js.map +1 -1
  15. package/dist/post-build-checks.d.ts +37 -0
  16. package/dist/post-build-checks.d.ts.map +1 -1
  17. package/dist/post-build-checks.js +40 -0
  18. package/dist/post-build-checks.js.map +1 -1
  19. package/dist/schemas/allowed-tools.d.ts +31 -0
  20. package/dist/schemas/allowed-tools.d.ts.map +1 -0
  21. package/dist/schemas/allowed-tools.js +88 -0
  22. package/dist/schemas/allowed-tools.js.map +1 -0
  23. package/dist/schemas/index.d.ts +1 -0
  24. package/dist/schemas/index.d.ts.map +1 -1
  25. package/dist/schemas/index.js +1 -0
  26. package/dist/schemas/index.js.map +1 -1
  27. package/dist/schemas/marketplace-manifest.d.ts.map +1 -1
  28. package/dist/schemas/marketplace-manifest.js +17 -6
  29. package/dist/schemas/marketplace-manifest.js.map +1 -1
  30. package/dist/skill-identity.d.ts +10 -0
  31. package/dist/skill-identity.d.ts.map +1 -1
  32. package/dist/skill-identity.js +12 -0
  33. package/dist/skill-identity.js.map +1 -1
  34. package/dist/skill-packager.d.ts +85 -13
  35. package/dist/skill-packager.d.ts.map +1 -1
  36. package/dist/skill-packager.js +178 -32
  37. package/dist/skill-packager.js.map +1 -1
  38. package/dist/skill-test/eval-fragment.d.ts +31 -29
  39. package/dist/skill-test/eval-fragment.d.ts.map +1 -1
  40. package/dist/skill-test/eval-fragment.js +5 -3
  41. package/dist/skill-test/eval-fragment.js.map +1 -1
  42. package/dist/skill-test/eval-grader.d.ts +8 -2
  43. package/dist/skill-test/eval-grader.d.ts.map +1 -1
  44. package/dist/skill-test/eval-grader.js +3 -6
  45. package/dist/skill-test/eval-grader.js.map +1 -1
  46. package/dist/validators/agent-instruction-presence.d.ts.map +1 -1
  47. package/dist/validators/agent-instruction-presence.js +44 -1
  48. package/dist/validators/agent-instruction-presence.js.map +1 -1
  49. package/dist/validators/compat-detectors.d.ts +17 -0
  50. package/dist/validators/compat-detectors.d.ts.map +1 -1
  51. package/dist/validators/compat-detectors.js +46 -19
  52. package/dist/validators/compat-detectors.js.map +1 -1
  53. package/dist/validators/marketplace-validator.d.ts.map +1 -1
  54. package/dist/validators/marketplace-validator.js +6 -0
  55. package/dist/validators/marketplace-validator.js.map +1 -1
  56. package/dist/validators/mcp-tool-qualification.d.ts +158 -0
  57. package/dist/validators/mcp-tool-qualification.d.ts.map +1 -0
  58. package/dist/validators/mcp-tool-qualification.js +467 -0
  59. package/dist/validators/mcp-tool-qualification.js.map +1 -0
  60. package/dist/validators/packaged-size-limit.d.ts +296 -0
  61. package/dist/validators/packaged-size-limit.d.ts.map +1 -0
  62. package/dist/validators/packaged-size-limit.js +494 -0
  63. package/dist/validators/packaged-size-limit.js.map +1 -0
  64. package/dist/validators/packaging-validator.d.ts +41 -2
  65. package/dist/validators/packaging-validator.d.ts.map +1 -1
  66. package/dist/validators/packaging-validator.js +159 -15
  67. package/dist/validators/packaging-validator.js.map +1 -1
  68. package/dist/validators/referenced-path-missing.d.ts +211 -0
  69. package/dist/validators/referenced-path-missing.d.ts.map +1 -0
  70. package/dist/validators/referenced-path-missing.js +379 -0
  71. package/dist/validators/referenced-path-missing.js.map +1 -0
  72. package/dist/validators/skill-validator.d.ts.map +1 -1
  73. package/dist/validators/skill-validator.js +29 -0
  74. package/dist/validators/skill-validator.js.map +1 -1
  75. package/dist/validators/types.d.ts +14 -0
  76. package/dist/validators/types.d.ts.map +1 -1
  77. package/dist/walk-link-graph.js +26 -7
  78. package/dist/walk-link-graph.js.map +1 -1
  79. package/package.json +7 -7
@@ -11,6 +11,8 @@
11
11
  */
12
12
  import { CODE_REGISTRY } from '@vibe-agent-toolkit/schema';
13
13
  import { buildEvidence, deriveObservationsFromEvidence, EXTERNAL_CLI_BINARIES, } from '../evidence/index.js';
14
+ import { parseFrontmatter } from '../parsers/frontmatter-parser.js';
15
+ import { allowedToolsOf } from '../schemas/allowed-tools.js';
14
16
  const SHELL_LANGUAGES = new Set(['bash', 'sh', 'shell', 'zsh']);
15
17
  const LOCAL_SHELL_TOOLS = ['Bash', 'Edit', 'Write', 'NotebookEdit'];
16
18
  const BROWSER_AUTH_PATTERNS = [
@@ -21,11 +23,13 @@ const BROWSER_AUTH_PATTERNS = [
21
23
  { patternId: 'BROWSER_AUTH_AWS_SSO_LOGIN', re: /(^|[\s;|&])aws\s+sso\s+login\b/m, description: "'aws sso login' in shell" },
22
24
  { patternId: 'BROWSER_AUTH_WEBBROWSER_OPEN', re: /\bwebbrowser\.open\s*\(/, description: 'webbrowser.open() call' },
23
25
  ];
24
- // Minimal frontmatter peek for the allowed-tools list. Skill-validator
25
- // does full YAML parsing elsewhere; here we only need the one field,
26
- // so a narrow regex is cheaper than re-parsing.
26
+ // The frontmatter span, on `\n`-normalized content, used ONLY to locate the
27
+ // line the `allowed-tools:` key sits on. The value is read through
28
+ // `parseFrontmatter`, never from this regex. YAML lets the key be quoted and
29
+ // pads before the colon (`"allowed-tools": …`, `allowed-tools : …`); those
30
+ // parsed fine but the locator missed them, so the evidence went out with no line.
27
31
  const FRONTMATTER_RE = /^---\n([\s\S]*?)\n---/;
28
- const ALLOWED_TOOLS_RE = /^allowed-tools:\s*\[([^\]]*)\]/m;
32
+ const ALLOWED_TOOLS_KEY_RE = /^(?:"allowed-tools"|'allowed-tools'|allowed-tools)\s*:/m;
29
33
  const PROSE_TOOL_RE = /\b(Bash|Edit|Write|NotebookEdit)\s+tool\b/;
30
34
  /**
31
35
  * Locate the line number (1-based) within `content` where `index` falls.
@@ -50,28 +54,51 @@ function* iterCodeBlocks(content) {
50
54
  yield { language, body, line, bodyIndex };
51
55
  }
52
56
  }
53
- function allowedToolsList(content) {
54
- const fm = FRONTMATTER_RE.exec(content);
55
- if (!fm)
57
+ /**
58
+ * The `allowed-tools:` declarations a SKILL.md carries and the 1-based line of
59
+ * the key; `{ tools: [], line: 0 }` when the key is absent or the frontmatter
60
+ * does not parse (the skill validator names that file
61
+ * `SKILL_MISSING_FRONTMATTER` on the same run — nothing is read out of it here).
62
+ *
63
+ * 🚩 This used to be a hand parser that saw ONLY the `[…]` flow form and split
64
+ * it on commas. Claude Code's documented spelling is space-separated, and a
65
+ * block sequence is valid YAML, so `allowed-tools: Read Bash` and a `- Bash`
66
+ * list both read as NO declaration and the local-shell capability reported
67
+ * clean over them. The value now goes through the same `parseFrontmatter` the
68
+ * validator uses and the same `allowedToolsOf` the settings-compat checker uses.
69
+ */
70
+ export function allowedToolsDeclarations(content) {
71
+ // A block that is not a mapping (empty, `~`, a scalar, a sequence) is a parse
72
+ // FAILURE at the seam — `parseFrontmatter` refuses it — so there is no shape
73
+ // left for this reader to guard against on its own.
74
+ const parsed = parseFrontmatter(content);
75
+ if (!parsed.success)
56
76
  return { tools: [], line: 0 };
57
- const fmBody = fm[1] ?? '';
58
- const at = ALLOWED_TOOLS_RE.exec(fmBody);
59
- if (!at)
77
+ const tools = allowedToolsOf(parsed.frontmatter['allowed-tools']) ?? [];
78
+ if (tools.length === 0)
60
79
  return { tools: [], line: 0 };
61
- const raw = at[1] ?? '';
62
- // Locate the line of the allowed-tools entry within the original content.
63
- const fmStart = fm.index;
64
- const atLineInFm = fmBody.slice(0, at.index).split('\n').length - 1;
65
- // +2 to account for the leading '---\n' line of the frontmatter.
66
- const line = lineForIndex(content, fmStart) + atLineInFm + 1;
67
- const tools = raw.split(',').map(s => s.trim()).filter(s => s.length > 0);
80
+ // Locate the line of the key. parseFrontmatter normalized CRLF; do the same.
81
+ const normalized = content.replaceAll('\r\n', '\n');
82
+ const fmBody = FRONTMATTER_RE.exec(normalized)?.[1] ?? '';
83
+ const at = ALLOWED_TOOLS_KEY_RE.exec(fmBody);
84
+ // The opening `---` is line 1, so the key's line is 1 + its line within the body.
85
+ const line = at ? 1 + lineForIndex(fmBody, at.index) : 0;
68
86
  return { tools, line };
69
87
  }
88
+ /**
89
+ * The tool a declaration names: `Bash(git:*)` and `Bash` both declare Bash.
90
+ * The parenthesised part scopes the grant; it does not change which tool the
91
+ * skill needs.
92
+ */
93
+ function toolNameOf(declaration) {
94
+ const paren = declaration.indexOf('(');
95
+ return paren === -1 ? declaration : declaration.slice(0, paren);
96
+ }
70
97
  export function collectLocalShellEvidence(content, filePath, locationRoot) {
71
98
  const out = [];
72
99
  // Frontmatter allowed-tools
73
- const { tools, line: atLine } = allowedToolsList(content);
74
- const matchedTool = tools.find(t => LOCAL_SHELL_TOOLS.includes(t));
100
+ const { tools, line: atLine } = allowedToolsDeclarations(content);
101
+ const matchedTool = tools.find(t => LOCAL_SHELL_TOOLS.includes(toolNameOf(t)));
75
102
  if (matchedTool !== undefined) {
76
103
  out.push(buildEvidence('ALLOWED_TOOLS_LOCAL_SHELL', filePath, locationRoot, `allowed-tools includes ${matchedTool}`, atLine || undefined));
77
104
  }
@@ -1 +1 @@
1
- {"version":3,"file":"compat-detectors.js","sourceRoot":"","sources":["../../src/validators/compat-detectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,aAAa,EAAwC,MAAM,4BAA4B,CAAC;AAGjG,OAAO,EACL,aAAa,EACb,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,eAAe,GAA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ACF,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,6BAA6B,GAAwB,IAAI,GAAG,CAAC;IACjE,2BAA2B;IAC3B,kCAAkC;IAClC,oBAAoB;CACrB,CAAC,CAAC;AAEH,MAAM,UAAU,kBAAkB,CAAC,QAAmC;IACpE,OAAO,8BAA8B,CAAC,QAAQ,EAAE;QAC9C,oBAAoB,EAAE,6BAA6B;QACnD,OAAO,EAAE,OAAO;KACjB,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAgB,EAAE,QAAgB;IACnE,MAAM,IAAI,GAAG,GAAG,CAAC,IAAiB,CAAC;IACnC,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,eAAe;QAC/B,IAAI;QACJ,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,QAAQ;QACR,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,SAAS,EAAE,KAAK,CAAC,SAAS;KAC3B,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAe,EACf,QAAgB,EAChB,YAAoB;IAEpB,MAAM,QAAQ,GAAqB;QACjC,GAAG,yBAAyB,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC;QAC7D,GAAG,0BAA0B,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC;QAC9D,GAAG,0BAA0B,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC;KAC/D,CAAC;IACF,MAAM,YAAY,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAClD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;AACpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"marketplace-validator.d.ts","sourceRoot":"","sources":["../../src/validators/marketplace-validator.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,iBAAiB,EAAqB,MAAM,kBAAkB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAKnD;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACxC,eAAe,EAAE,MAAM,EACvB,OAAO,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,gBAAgB,CAAC,CAsF3B"}
1
+ {"version":3,"file":"marketplace-validator.d.ts","sourceRoot":"","sources":["../../src/validators/marketplace-validator.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,iBAAiB,EAAqB,MAAM,kBAAkB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAKnD;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACxC,eAAe,EAAE,MAAM,EACvB,OAAO,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,gBAAgB,CAAC,CA8F3B"}
@@ -88,6 +88,12 @@ export async function validateMarketplace(marketplacePath, options) {
88
88
  name: result.data.name,
89
89
  ...(result.data.description !== undefined && { description: result.data.description }),
90
90
  ...(result.data.version !== undefined && { version: result.data.version }),
91
+ // The denominator a consumer needs to judge a plugin walk: a string
92
+ // `source` is a relative path into this marketplace's own tree, and the
93
+ // consumer resolves it against the root it chose. Sources, not a count —
94
+ // a count is satisfied by walking the WRONG directories.
95
+ pluginEntries: result.data.plugins.length,
96
+ localPluginSources: result.data.plugins.flatMap((entry) => typeof entry.source === 'string' ? [{ name: entry.name, source: entry.source }] : []),
91
97
  };
92
98
  }
93
99
  return validationResult;
@@ -1 +1 @@
1
- {"version":3,"file":"marketplace-validator.js","sourceRoot":"","sources":["../../src/validators/marketplace-validator.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAwB,MAAM,4BAA4B,CAA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;YACzD,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM;YACzC,kBAAkB,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CACzD,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CACpF;SACD,CAAC;IACH,CAAC;IAED,OAAO,gBAAgB,CAAC;AACzB,CAAC"}
@@ -0,0 +1,158 @@
1
+ /**
2
+ * MCP_TOOL_NAME_UNQUALIFIED — a skill document tells an agent to call an MCP
3
+ * tool by its bare name, in a document that elsewhere spells that same tool
4
+ * fully-qualified.
5
+ *
6
+ * Anthropic's skill-authoring guidance: "Without the server prefix, Claude may
7
+ * fail to locate the tool, especially when multiple MCP servers are available."
8
+ * VAT's own `vat skill review` checklist has carried this as a `[A]` manual item
9
+ * marked "Not enforced by any validation code; a shift-left candidate awaiting
10
+ * corpus evidence per docs/validation-rule-design.md, since a bare identifier in
11
+ * prose is only a defect when the skill actually drives MCP." The reservation is
12
+ * exactly right, and it is what shapes the detector below.
13
+ *
14
+ * ## The document supplies its own vocabulary
15
+ *
16
+ * A bare snake_case identifier is not evidence of anything — `page_size`,
17
+ * `next_page_token` and `whiteboard_id` are all over these documents. What makes
18
+ * an identifier an MCP *tool name* is that the SAME document also writes it
19
+ * fully-qualified, in one of the two spellings a reader will meet:
20
+ *
21
+ * - `mcp__<server>__<tool>` — the Claude Code form, also how `allowed-tools`
22
+ * frontmatter names them.
23
+ * - `ServerName:tool_name` — the API form Anthropic's guidance prescribes.
24
+ *
25
+ * So the detector never guesses. It reads the qualified names the document
26
+ * already contains, and then reports the places that document names one of those
27
+ * same tools bare. A document that does not drive MCP has an empty vocabulary and
28
+ * cannot produce a finding — which dissolves the checklist's reservation rather
29
+ * than arguing with it.
30
+ *
31
+ * ## Prose supplies the vocabulary; frontmatter does not
32
+ *
33
+ * Leading YAML frontmatter is stripped here, in the detector, before anything is
34
+ * read from it. An `allowed-tools:` list of `mcp__…` names is a manifest, not the
35
+ * document contradicting itself, so it must not seed the vocabulary — and a bare
36
+ * name in the body below it is then simply a document that never qualified the
37
+ * tool at all.
38
+ *
39
+ * Enforcing that HERE rather than at each call site is deliberate, and it is the
40
+ * only place it has ever held. ⛔ An earlier version of this paragraph said the
41
+ * SKILL.md lane in `packaging-validator.ts` "happened to pass a
42
+ * frontmatter-stripped slice" while the bundled-`.md` lane passed whole files.
43
+ * It does not and never did: `parseFileCached(...).content` is the raw source
44
+ * verbatim — that file says so itself, 190 lines above the call — so BOTH lanes
45
+ * fed frontmatter to the detector until this stripping landed.
46
+ *
47
+ * ## The uppercase rule in the API form, and why it is load-bearing
48
+ *
49
+ * The server half must be spelled the way Anthropic's own examples spell one —
50
+ * uppercase FIRST, no underscore (`GitHub:create_issue`,
51
+ * `BigQuery:bigquery_schema`). Without that rule the
52
+ * pattern also matches two things that are emphatically not MCP tools:
53
+ *
54
+ * - **Node builtin specifiers** — `node:child_process` yields a "tool" named
55
+ * `child_process`, and VAT's own `packages/utils/README.md` then reports a
56
+ * finding on a table of exported function names.
57
+ * - **OAuth scope strings** — `whiteboard:read:list_whiteboards` and
58
+ * `cloud_recording:read:list_user_recordings`, both live in a partner-built
59
+ * plugin in the install corpus.
60
+ *
61
+ * Neither was visible on the two adopter corpora; both were visible on the
62
+ * authoring project, which is precisely the population check
63
+ * `docs/validation-rule-design.md` requires and the reason it requires it.
64
+ *
65
+ * ## Measured fire rate, re-measured 2026-09-07
66
+ *
67
+ * Population = documents that spell at least one MCP tool fully-qualified.
68
+ *
69
+ * | Corpus | docs | population | firing | occurrences |
70
+ * |---|---|---|---|---|
71
+ * | VAT itself (`packages/**\/*.md`, dist + node_modules excluded) | 206 | 3 | **0** | 0 |
72
+ * | installed skills (`SKILL.md` under `~/.claude/plugins`, `~/.claude/skills`) | 678 | 28 | 7 | 11 |
73
+ *
74
+ * ⛔ **Every number this table used to carry was taken by the camelCase-blind
75
+ * matcher, so re-taking them was not optional.** A corpus measured by a matcher
76
+ * that cannot see a whole family of names has already excluded that family from
77
+ * its own population count, and "zero false positives" over such a corpus is a
78
+ * statement about the blindness as much as about the rule. Both rows above were
79
+ * re-run with the fixed detector, driving the exported functions directly, over
80
+ * a corpus re-enumerated on the day.
81
+ *
82
+ * What moved, A/B on the same files with HEAD's module and this one:
83
+ *
84
+ * - **Authoring project: population 2 → 3.** One document newly enters the
85
+ * population, because it spells two camelCase tools (`generateHaiku`,
86
+ * `generateName`) that the old matcher could not see at all. Firing stays 0.
87
+ * - **Installed skills: nothing moved** — 28 / 7 / 11 before and after,
88
+ * character for character, with no vocabulary entry gained or lost. The
89
+ * installed corpus is snake_case throughout, which is Anthropic's own
90
+ * convention and therefore exactly the population least able to expose this
91
+ * defect. Its silence is not evidence the defect was small.
92
+ * - The corpus itself grew 677 → 678 `SKILL.md` between the two measurement
93
+ * dates; the delta above is A/B on the SAME 678 files, so it is a property of
94
+ * the detector rather than of the corpus.
95
+ *
96
+ * All 11 occurrences were read: every one names a tool bare that the same
97
+ * document qualifies in its own prose. Zero false positives.
98
+ *
99
+ * The SHIPPED command was re-run on the same corpus rather than trusted to
100
+ * agree with the probe — `vat audit --user`, 852 skills scanned, reproducing
101
+ * the installed-skills row occurrence for occurrence and line for line (plus
102
+ * the 4 linked-file occurrences `docs/validation-codes.md` records, which the
103
+ * probe above does not traverse).
104
+ *
105
+ * The frontmatter-including detector, run over the same 678 documents, reports
106
+ * 19 occurrences from the same 7 documents. The extra 8 are four copies of one
107
+ * skill naming `create_repository` and `create_branch` bare, whose only
108
+ * qualified spelling is its `allowed-tools:` frontmatter.
109
+ *
110
+ * ⛔ Those 8 WERE shipped. This paragraph used to claim the SKILL.md lane had
111
+ * "always passed a frontmatter-stripped slice" and that the 19 therefore
112
+ * described the probe rather than the product. `parseFileCached(...).content` is
113
+ * the raw file, frontmatter and all, so the shipped lane emitted every one of
114
+ * them. The 19 → 11 delta is a real behaviour change this detector made, not a
115
+ * correction to a probe.
116
+ *
117
+ * `warning`, not `error`: with a single MCP server mounted the bare name
118
+ * usually resolves, so the skill is degraded rather than broken.
119
+ */
120
+ import { type ValidationIssue } from '@vibe-agent-toolkit/schema';
121
+ /**
122
+ * Every MCP tool name `content` spells fully-qualified in its body, in either
123
+ * spelling. Frontmatter supplies nothing; see the module docstring.
124
+ *
125
+ * Exported for tests: this set IS the detector's premise, and pinning it directly
126
+ * is cheaper and clearer than inferring it from emitted issues.
127
+ */
128
+ export declare function qualifiedMcpToolNames(content: string): Set<string>;
129
+ /**
130
+ * Emit one `MCP_TOOL_NAME_UNQUALIFIED` per (line, bare tool name).
131
+ *
132
+ * Per instance rather than per document, each carrying the bare tool name as
133
+ * `link`, because `applyAllowFilter` matches an allow glob against `location` OR
134
+ * `link`. That is what lets an adopter waive one identifier:
135
+ *
136
+ * ```yaml
137
+ * validation:
138
+ * allow:
139
+ * MCP_TOOL_NAME_UNQUALIFIED:
140
+ * - paths: ["get_me"]
141
+ * reason: "Named bare in the availability-probe step on purpose; the
142
+ * qualified form is three lines above."
143
+ * ```
144
+ *
145
+ * …while a different bare tool name in the same document still fires. Waiver
146
+ * granularity is the emitter's decision, not the allow machinery's.
147
+ *
148
+ * Only inline code spans count. An agent copies what is in a code span; the same
149
+ * word in running prose is discussion of the tool rather than an instruction to
150
+ * call it. This is a design choice, not a measured one — the corpus numbers in
151
+ * the module docstring were all taken with the code-span rule already applied, so
152
+ * nothing here says what admitting prose would have cost.
153
+ *
154
+ * @param content Raw markdown of one skill document, frontmatter and all.
155
+ * @param docLocation Project-relative path of that document, for the anchor.
156
+ */
157
+ export declare function collectUnqualifiedMcpToolIssues(content: string, docLocation: string, issues: ValidationIssue[]): void;
158
+ //# sourceMappingURL=mcp-tool-qualification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-tool-qualification.d.ts","sourceRoot":"","sources":["../../src/validators/mcp-tool-qualification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsHG;AAEH,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAgRjF;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAElE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,eAAe,EAAE,GACxB,IAAI,CA6CN"}