@vibe-agent-toolkit/agent-skills 0.1.42 → 0.2.0-rc.10

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 (322) hide show
  1. package/README.md +5 -5
  2. package/dist/builder.d.ts.map +1 -1
  3. package/dist/builder.js +7 -17
  4. package/dist/builder.js.map +1 -1
  5. package/dist/content-type-routing.d.ts +32 -0
  6. package/dist/content-type-routing.d.ts.map +1 -1
  7. package/dist/content-type-routing.js +23 -0
  8. package/dist/content-type-routing.js.map +1 -1
  9. package/dist/files-config.d.ts +34 -1
  10. package/dist/files-config.d.ts.map +1 -1
  11. package/dist/files-config.js +277 -39
  12. package/dist/files-config.js.map +1 -1
  13. package/dist/fs-attribution.d.ts +45 -0
  14. package/dist/fs-attribution.d.ts.map +1 -0
  15. package/dist/fs-attribution.js +57 -0
  16. package/dist/fs-attribution.js.map +1 -0
  17. package/dist/import.d.ts.map +1 -1
  18. package/dist/import.js +0 -4
  19. package/dist/import.js.map +1 -1
  20. package/dist/index.d.ts +13 -8
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +25 -7
  23. package/dist/index.js.map +1 -1
  24. package/dist/inventory/detectors/declared-but-missing.d.ts +1 -1
  25. package/dist/inventory/detectors/declared-but-missing.d.ts.map +1 -1
  26. package/dist/inventory/detectors/marketplace-source-missing.d.ts +1 -1
  27. package/dist/inventory/detectors/marketplace-source-missing.d.ts.map +1 -1
  28. package/dist/inventory/detectors/present-but-undeclared.d.ts +1 -1
  29. package/dist/inventory/detectors/present-but-undeclared.d.ts.map +1 -1
  30. package/dist/inventory/detectors/reference-target-missing.d.ts +1 -1
  31. package/dist/inventory/detectors/reference-target-missing.d.ts.map +1 -1
  32. package/dist/inventory/index.d.ts +1 -1
  33. package/dist/inventory/index.d.ts.map +1 -1
  34. package/dist/inventory/index.js +1 -1
  35. package/dist/inventory/index.js.map +1 -1
  36. package/dist/inventory/serialize.d.ts +4 -4
  37. package/dist/inventory/serialize.d.ts.map +1 -1
  38. package/dist/inventory/serialize.js +6 -6
  39. package/dist/inventory/serialize.js.map +1 -1
  40. package/dist/inventory/types.d.ts +8 -0
  41. package/dist/inventory/types.d.ts.map +1 -1
  42. package/dist/inventory/types.js.map +1 -1
  43. package/dist/link-graph-members.d.ts +18 -0
  44. package/dist/link-graph-members.d.ts.map +1 -0
  45. package/dist/link-graph-members.js +18 -0
  46. package/dist/link-graph-members.js.map +1 -0
  47. package/dist/parsers/frontmatter-parser.d.ts.map +1 -1
  48. package/dist/parsers/frontmatter-parser.js +30 -6
  49. package/dist/parsers/frontmatter-parser.js.map +1 -1
  50. package/dist/plugin-distribution-layout.d.ts +70 -6
  51. package/dist/plugin-distribution-layout.d.ts.map +1 -1
  52. package/dist/plugin-distribution-layout.js +84 -11
  53. package/dist/plugin-distribution-layout.js.map +1 -1
  54. package/dist/post-build-checks.d.ts +38 -1
  55. package/dist/post-build-checks.d.ts.map +1 -1
  56. package/dist/post-build-checks.js +68 -17
  57. package/dist/post-build-checks.js.map +1 -1
  58. package/dist/projection/skill-extent.d.ts +247 -0
  59. package/dist/projection/skill-extent.d.ts.map +1 -0
  60. package/dist/projection/skill-extent.js +560 -0
  61. package/dist/projection/skill-extent.js.map +1 -0
  62. package/dist/schemas/agent-skill-frontmatter.js +1 -1
  63. package/dist/schemas/agent-skill-frontmatter.js.map +1 -1
  64. package/dist/schemas/allowed-tools.d.ts +31 -0
  65. package/dist/schemas/allowed-tools.d.ts.map +1 -0
  66. package/dist/schemas/allowed-tools.js +88 -0
  67. package/dist/schemas/allowed-tools.js.map +1 -0
  68. package/dist/schemas/index.d.ts +1 -0
  69. package/dist/schemas/index.d.ts.map +1 -1
  70. package/dist/schemas/index.js +1 -0
  71. package/dist/schemas/index.js.map +1 -1
  72. package/dist/schemas/installed-plugins-registry.d.ts.map +1 -1
  73. package/dist/schemas/installed-plugins-registry.js +7 -1
  74. package/dist/schemas/installed-plugins-registry.js.map +1 -1
  75. package/dist/schemas/marketplace-manifest.d.ts.map +1 -1
  76. package/dist/schemas/marketplace-manifest.js +17 -6
  77. package/dist/schemas/marketplace-manifest.js.map +1 -1
  78. package/dist/skill-identity.d.ts +18 -3
  79. package/dist/skill-identity.d.ts.map +1 -1
  80. package/dist/skill-identity.js +25 -6
  81. package/dist/skill-identity.js.map +1 -1
  82. package/dist/skill-packager.d.ts +144 -20
  83. package/dist/skill-packager.d.ts.map +1 -1
  84. package/dist/skill-packager.js +447 -105
  85. package/dist/skill-packager.js.map +1 -1
  86. package/dist/skill-source/content-hash.d.ts.map +1 -1
  87. package/dist/skill-source/content-hash.js +21 -10
  88. package/dist/skill-source/content-hash.js.map +1 -1
  89. package/dist/skill-source/fetch-cache.d.ts.map +1 -1
  90. package/dist/skill-source/fetch-cache.js +0 -5
  91. package/dist/skill-source/fetch-cache.js.map +1 -1
  92. package/dist/skill-source/git-clone.d.ts +1 -1
  93. package/dist/skill-source/git-clone.d.ts.map +1 -1
  94. package/dist/skill-source/git-clone.js +10 -10
  95. package/dist/skill-source/git-clone.js.map +1 -1
  96. package/dist/skill-source/sources/url-source.d.ts.map +1 -1
  97. package/dist/skill-source/sources/url-source.js +2 -2
  98. package/dist/skill-source/sources/url-source.js.map +1 -1
  99. package/dist/skill-source/stage.d.ts.map +1 -1
  100. package/dist/skill-source/stage.js +0 -6
  101. package/dist/skill-source/stage.js.map +1 -1
  102. package/dist/skill-test/baseline-delta.d.ts +1575 -0
  103. package/dist/skill-test/baseline-delta.d.ts.map +1 -0
  104. package/dist/skill-test/baseline-delta.js +272 -0
  105. package/dist/skill-test/baseline-delta.js.map +1 -0
  106. package/dist/skill-test/baseline-integrity.d.ts +944 -0
  107. package/dist/skill-test/baseline-integrity.d.ts.map +1 -0
  108. package/dist/skill-test/baseline-integrity.js +3090 -0
  109. package/dist/skill-test/baseline-integrity.js.map +1 -0
  110. package/dist/skill-test/build-hook.d.ts +3 -2
  111. package/dist/skill-test/build-hook.d.ts.map +1 -1
  112. package/dist/skill-test/build-hook.js +4 -5
  113. package/dist/skill-test/build-hook.js.map +1 -1
  114. package/dist/skill-test/configure-writer.js +1 -1
  115. package/dist/skill-test/configure-writer.js.map +1 -1
  116. package/dist/skill-test/declared-env.d.ts +5 -4
  117. package/dist/skill-test/declared-env.d.ts.map +1 -1
  118. package/dist/skill-test/declared-env.js +8 -9
  119. package/dist/skill-test/declared-env.js.map +1 -1
  120. package/dist/skill-test/eval-executor.d.ts +21 -5
  121. package/dist/skill-test/eval-executor.d.ts.map +1 -1
  122. package/dist/skill-test/eval-executor.js +6 -6
  123. package/dist/skill-test/eval-executor.js.map +1 -1
  124. package/dist/skill-test/eval-fragment.d.ts +106 -28
  125. package/dist/skill-test/eval-fragment.d.ts.map +1 -1
  126. package/dist/skill-test/eval-fragment.js +78 -16
  127. package/dist/skill-test/eval-fragment.js.map +1 -1
  128. package/dist/skill-test/eval-grader.d.ts +65 -7
  129. package/dist/skill-test/eval-grader.d.ts.map +1 -1
  130. package/dist/skill-test/eval-grader.js +263 -64
  131. package/dist/skill-test/eval-grader.js.map +1 -1
  132. package/dist/skill-test/eval-inputs.d.ts +110 -8
  133. package/dist/skill-test/eval-inputs.d.ts.map +1 -1
  134. package/dist/skill-test/eval-inputs.js +177 -22
  135. package/dist/skill-test/eval-inputs.js.map +1 -1
  136. package/dist/skill-test/eval-lint.d.ts +17 -4
  137. package/dist/skill-test/eval-lint.d.ts.map +1 -1
  138. package/dist/skill-test/eval-lint.js +22 -9
  139. package/dist/skill-test/eval-lint.js.map +1 -1
  140. package/dist/skill-test/eval-suite-isolation.d.ts.map +1 -1
  141. package/dist/skill-test/eval-suite-isolation.js +8 -5
  142. package/dist/skill-test/eval-suite-isolation.js.map +1 -1
  143. package/dist/skill-test/evals-template.d.ts +1 -1
  144. package/dist/skill-test/evals-template.d.ts.map +1 -1
  145. package/dist/skill-test/evals-template.js +1 -3
  146. package/dist/skill-test/evals-template.js.map +1 -1
  147. package/dist/skill-test/executor-prompt.d.ts +15 -7
  148. package/dist/skill-test/executor-prompt.d.ts.map +1 -1
  149. package/dist/skill-test/executor-prompt.js +10 -7
  150. package/dist/skill-test/executor-prompt.js.map +1 -1
  151. package/dist/skill-test/failure-reason.d.ts +113 -0
  152. package/dist/skill-test/failure-reason.d.ts.map +1 -0
  153. package/dist/skill-test/failure-reason.js +124 -0
  154. package/dist/skill-test/failure-reason.js.map +1 -0
  155. package/dist/skill-test/fragment-merge.d.ts +3 -20
  156. package/dist/skill-test/fragment-merge.d.ts.map +1 -1
  157. package/dist/skill-test/fragment-merge.js +67 -8
  158. package/dist/skill-test/fragment-merge.js.map +1 -1
  159. package/dist/skill-test/grader-prompt.d.ts +29 -9
  160. package/dist/skill-test/grader-prompt.d.ts.map +1 -1
  161. package/dist/skill-test/grader-prompt.js +264 -68
  162. package/dist/skill-test/grader-prompt.js.map +1 -1
  163. package/dist/skill-test/grader-text.d.ts +145 -0
  164. package/dist/skill-test/grader-text.d.ts.map +1 -0
  165. package/dist/skill-test/grader-text.js +410 -0
  166. package/dist/skill-test/grader-text.js.map +1 -0
  167. package/dist/skill-test/grading-adapter.d.ts +38 -2
  168. package/dist/skill-test/grading-adapter.d.ts.map +1 -1
  169. package/dist/skill-test/grading-adapter.js +57 -9
  170. package/dist/skill-test/grading-adapter.js.map +1 -1
  171. package/dist/skill-test/grading-schema.d.ts +160 -5
  172. package/dist/skill-test/grading-schema.d.ts.map +1 -1
  173. package/dist/skill-test/grading-schema.js +66 -7
  174. package/dist/skill-test/grading-schema.js.map +1 -1
  175. package/dist/skill-test/harness-location.d.ts +3 -2
  176. package/dist/skill-test/harness-location.d.ts.map +1 -1
  177. package/dist/skill-test/harness-location.js +5 -16
  178. package/dist/skill-test/harness-location.js.map +1 -1
  179. package/dist/skill-test/index.d.ts +2 -2
  180. package/dist/skill-test/index.d.ts.map +1 -1
  181. package/dist/skill-test/index.js +2 -2
  182. package/dist/skill-test/index.js.map +1 -1
  183. package/dist/skill-test/lock.d.ts +58 -1
  184. package/dist/skill-test/lock.d.ts.map +1 -1
  185. package/dist/skill-test/lock.js +78 -6
  186. package/dist/skill-test/lock.js.map +1 -1
  187. package/dist/skill-test/pipeline.d.ts +19 -1
  188. package/dist/skill-test/pipeline.d.ts.map +1 -1
  189. package/dist/skill-test/pipeline.js +21 -10
  190. package/dist/skill-test/pipeline.js.map +1 -1
  191. package/dist/skill-test/preflight.d.ts +1 -1
  192. package/dist/skill-test/preflight.d.ts.map +1 -1
  193. package/dist/skill-test/preflight.js +59 -16
  194. package/dist/skill-test/preflight.js.map +1 -1
  195. package/dist/skill-test/prompt-invariants.d.ts +4 -2
  196. package/dist/skill-test/prompt-invariants.d.ts.map +1 -1
  197. package/dist/skill-test/prompt-invariants.js +5 -4
  198. package/dist/skill-test/prompt-invariants.js.map +1 -1
  199. package/dist/skill-test/run-harness.d.ts +665 -85
  200. package/dist/skill-test/run-harness.d.ts.map +1 -1
  201. package/dist/skill-test/run-harness.js +1522 -237
  202. package/dist/skill-test/run-harness.js.map +1 -1
  203. package/dist/skill-test/staging.d.ts +20 -8
  204. package/dist/skill-test/staging.d.ts.map +1 -1
  205. package/dist/skill-test/staging.js +25 -18
  206. package/dist/skill-test/staging.js.map +1 -1
  207. package/dist/skill-test/tier-plan.d.ts +1 -1
  208. package/dist/skill-test/tier-plan.js +1 -1
  209. package/dist/skill-test/tool-eval-schema.d.ts +6 -6
  210. package/dist/skill-test/tool-eval-schema.js +2 -2
  211. package/dist/skill-test/vendor-manifest.d.ts +2 -1
  212. package/dist/skill-test/vendor-manifest.d.ts.map +1 -1
  213. package/dist/skill-test/vendor-manifest.js +10 -10
  214. package/dist/skill-test/vendor-manifest.js.map +1 -1
  215. package/dist/test-input.d.ts +59 -8
  216. package/dist/test-input.d.ts.map +1 -1
  217. package/dist/test-input.js +64 -19
  218. package/dist/test-input.js.map +1 -1
  219. package/dist/validators/agent-instruction-presence.d.ts +1 -1
  220. package/dist/validators/agent-instruction-presence.d.ts.map +1 -1
  221. package/dist/validators/agent-instruction-presence.js +45 -2
  222. package/dist/validators/agent-instruction-presence.js.map +1 -1
  223. package/dist/validators/bundled-resource-link-detection.d.ts +6 -4
  224. package/dist/validators/bundled-resource-link-detection.d.ts.map +1 -1
  225. package/dist/validators/bundled-resource-link-detection.js +39 -39
  226. package/dist/validators/bundled-resource-link-detection.js.map +1 -1
  227. package/dist/validators/compat-detectors.d.ts +18 -1
  228. package/dist/validators/compat-detectors.d.ts.map +1 -1
  229. package/dist/validators/compat-detectors.js +47 -20
  230. package/dist/validators/compat-detectors.js.map +1 -1
  231. package/dist/validators/cross-skill-dependency-detection.d.ts +1 -1
  232. package/dist/validators/cross-skill-dependency-detection.d.ts.map +1 -1
  233. package/dist/validators/cross-skill-dependency-detection.js +1 -1
  234. package/dist/validators/cross-skill-dependency-detection.js.map +1 -1
  235. package/dist/validators/description-style-detection.d.ts +1 -1
  236. package/dist/validators/description-style-detection.d.ts.map +1 -1
  237. package/dist/validators/description-style-detection.js +1 -1
  238. package/dist/validators/description-style-detection.js.map +1 -1
  239. package/dist/validators/format-detection.d.ts +3 -0
  240. package/dist/validators/format-detection.d.ts.map +1 -1
  241. package/dist/validators/format-detection.js +41 -26
  242. package/dist/validators/format-detection.js.map +1 -1
  243. package/dist/validators/frontmatter-validation.d.ts +1 -1
  244. package/dist/validators/frontmatter-validation.d.ts.map +1 -1
  245. package/dist/validators/frontmatter-validation.js +2 -2
  246. package/dist/validators/frontmatter-validation.js.map +1 -1
  247. package/dist/validators/imperative-body-detection.d.ts +1 -1
  248. package/dist/validators/imperative-body-detection.d.ts.map +1 -1
  249. package/dist/validators/imperative-body-detection.js +1 -1
  250. package/dist/validators/imperative-body-detection.js.map +1 -1
  251. package/dist/validators/index.d.ts +1 -1
  252. package/dist/validators/index.d.ts.map +1 -1
  253. package/dist/validators/kebab-case-detection.d.ts +1 -1
  254. package/dist/validators/kebab-case-detection.d.ts.map +1 -1
  255. package/dist/validators/kebab-case-detection.js +1 -1
  256. package/dist/validators/kebab-case-detection.js.map +1 -1
  257. package/dist/validators/marketplace-validator.d.ts.map +1 -1
  258. package/dist/validators/marketplace-validator.js +7 -2
  259. package/dist/validators/marketplace-validator.js.map +1 -1
  260. package/dist/validators/mcp-tool-qualification.d.ts +158 -0
  261. package/dist/validators/mcp-tool-qualification.d.ts.map +1 -0
  262. package/dist/validators/mcp-tool-qualification.js +467 -0
  263. package/dist/validators/mcp-tool-qualification.js.map +1 -0
  264. package/dist/validators/packaged-size-limit.d.ts +296 -0
  265. package/dist/validators/packaged-size-limit.d.ts.map +1 -0
  266. package/dist/validators/packaged-size-limit.js +492 -0
  267. package/dist/validators/packaged-size-limit.js.map +1 -0
  268. package/dist/validators/packaging-validator.d.ts +149 -10
  269. package/dist/validators/packaging-validator.d.ts.map +1 -1
  270. package/dist/validators/packaging-validator.js +371 -55
  271. package/dist/validators/packaging-validator.js.map +1 -1
  272. package/dist/validators/plugin-hosted-shape.d.ts +4 -2
  273. package/dist/validators/plugin-hosted-shape.d.ts.map +1 -1
  274. package/dist/validators/plugin-hosted-shape.js +6 -7
  275. package/dist/validators/plugin-hosted-shape.js.map +1 -1
  276. package/dist/validators/plugin-recommended-fields.d.ts +1 -1
  277. package/dist/validators/plugin-recommended-fields.d.ts.map +1 -1
  278. package/dist/validators/plugin-recommended-fields.js +1 -1
  279. package/dist/validators/plugin-recommended-fields.js.map +1 -1
  280. package/dist/validators/referenced-path-missing.d.ts +211 -0
  281. package/dist/validators/referenced-path-missing.d.ts.map +1 -0
  282. package/dist/validators/referenced-path-missing.js +378 -0
  283. package/dist/validators/referenced-path-missing.js.map +1 -0
  284. package/dist/validators/registry-validator.d.ts.map +1 -1
  285. package/dist/validators/registry-validator.js +1 -2
  286. package/dist/validators/registry-validator.js.map +1 -1
  287. package/dist/validators/rule-engine/index.d.ts +1 -1
  288. package/dist/validators/rule-engine/rule-context.d.ts +20 -3
  289. package/dist/validators/rule-engine/rule-context.d.ts.map +1 -1
  290. package/dist/validators/rule-engine/rule-context.js +3 -1
  291. package/dist/validators/rule-engine/rule-context.js.map +1 -1
  292. package/dist/validators/rule-engine/rule-engine.d.ts +2 -2
  293. package/dist/validators/rule-engine/rule-engine.d.ts.map +1 -1
  294. package/dist/validators/rule-engine/rule-engine.js +52 -13
  295. package/dist/validators/rule-engine/rule-engine.js.map +1 -1
  296. package/dist/validators/skill-validator.d.ts.map +1 -1
  297. package/dist/validators/skill-validator.js +91 -54
  298. package/dist/validators/skill-validator.js.map +1 -1
  299. package/dist/validators/source-only-codes.js +1 -1
  300. package/dist/validators/source-only-codes.js.map +1 -1
  301. package/dist/validators/types.d.ts +21 -1
  302. package/dist/validators/types.d.ts.map +1 -1
  303. package/dist/validators/unified-validator.d.ts.map +1 -1
  304. package/dist/validators/unified-validator.js +4 -5
  305. package/dist/validators/unified-validator.js.map +1 -1
  306. package/dist/validators/validation-rules.d.ts +4 -4
  307. package/dist/validators/validation-rules.d.ts.map +1 -1
  308. package/dist/validators/validation-rules.js +9 -38
  309. package/dist/validators/validation-rules.js.map +1 -1
  310. package/dist/validators/walker-to-issues.d.ts +9 -3
  311. package/dist/validators/walker-to-issues.d.ts.map +1 -1
  312. package/dist/validators/walker-to-issues.js +64 -19
  313. package/dist/validators/walker-to-issues.js.map +1 -1
  314. package/dist/walk-link-graph.d.ts +64 -5
  315. package/dist/walk-link-graph.d.ts.map +1 -1
  316. package/dist/walk-link-graph.js +376 -92
  317. package/dist/walk-link-graph.js.map +1 -1
  318. package/package.json +14 -22
  319. package/dist/skill-test/exit-codes.d.ts +0 -97
  320. package/dist/skill-test/exit-codes.d.ts.map +0 -1
  321. package/dist/skill-test/exit-codes.js +0 -141
  322. package/dist/skill-test/exit-codes.js.map +0 -1
@@ -0,0 +1,88 @@
1
+ /**
2
+ * The declarations an `allowed-tools:` frontmatter VALUE carries.
3
+ *
4
+ * Claude Code documents the field as space-separated (`Bash(git add:*)
5
+ * Bash(git status:*)`), `AgentSkillFrontmatterSchema` says the same, many
6
+ * authors write commas, and a YAML sequence (flow or block) is accepted by
7
+ * every reader. This is the ONE place that turns any of those into a list —
8
+ * the settings-compat checker and the compat detectors both read through it,
9
+ * so a spelling cannot be visible to one and invisible to the other.
10
+ */
11
+ /**
12
+ * Split the STRING form of `allowed-tools:` into declarations.
13
+ *
14
+ * Commas and whitespace are both separators, but only at parenthesis depth
15
+ * zero — `Bash(rm -rf /)` is one declaration, and the whitespace inside its
16
+ * parentheses is part of the command pattern the matcher is handed. A `(` or
17
+ * `)` inside a quoted argument — `Bash(git commit -m "a) b")` — is part of the
18
+ * argument, not of the depth: the split used to count it, and the declaration
19
+ * ended at the quoted paren, handing the matcher `Bash(git commit -m "a)` and
20
+ * two stray tokens. Consecutive separators and edge padding produce no empty
21
+ * declaration.
22
+ */
23
+ export function splitAllowedToolsList(value) {
24
+ const declarations = [];
25
+ const nesting = new Nesting();
26
+ let current = '';
27
+ for (const char of value) {
28
+ nesting.advance(char);
29
+ if (nesting.inside || !(char === ',' || /\s/.test(char))) {
30
+ current += char;
31
+ continue;
32
+ }
33
+ if (current !== '')
34
+ declarations.push(current);
35
+ current = '';
36
+ }
37
+ if (current !== '')
38
+ declarations.push(current);
39
+ return declarations;
40
+ }
41
+ /**
42
+ * Where the split is inside a declaration's parentheses — and, within them,
43
+ * inside a quoted argument, where a paren is text rather than nesting.
44
+ */
45
+ class Nesting {
46
+ depth = 0;
47
+ quote;
48
+ /** Whether the character just consumed sits inside a parenthesised argument. */
49
+ get inside() {
50
+ return this.depth > 0;
51
+ }
52
+ advance(char) {
53
+ if (this.quote !== undefined) {
54
+ if (char === this.quote)
55
+ this.quote = undefined;
56
+ }
57
+ else if (this.depth > 0 && (char === '"' || char === "'")) {
58
+ this.quote = char;
59
+ }
60
+ else if (char === '(') {
61
+ this.depth += 1;
62
+ }
63
+ else if (char === ')' && this.depth > 0) {
64
+ this.depth -= 1;
65
+ }
66
+ }
67
+ }
68
+ /**
69
+ * The declarations an `allowed-tools:` VALUE carries, whatever YAML shape the
70
+ * author gave it: a block or flow sequence (each string item, trimmed), or a
71
+ * scalar (split per {@link splitAllowedToolsList}). Anything else — absent,
72
+ * `null`, a mapping — declares nothing.
73
+ */
74
+ export function allowedToolsOf(value) {
75
+ if (typeof value === 'string') {
76
+ const declarations = splitAllowedToolsList(value);
77
+ return declarations.length > 0 ? declarations : undefined;
78
+ }
79
+ if (Array.isArray(value)) {
80
+ const declarations = value
81
+ .filter((item) => typeof item === 'string')
82
+ .map((item) => item.trim())
83
+ .filter((item) => item !== '');
84
+ return declarations.length > 0 ? declarations : undefined;
85
+ }
86
+ return undefined;
87
+ }
88
+ //# sourceMappingURL=allowed-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allowed-tools.js","sourceRoot":"","sources":["../../src/schemas/allowed-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAa;IACjD,MAAM,YAAY,GAAa,EAAE,CAAC;IAClC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9B,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YACzD,OAAO,IAAI,IAAI,CAAC;YAChB,SAAS;QACX,CAAC;QACD,IAAI,OAAO,KAAK,EAAE;YAAE,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/C,OAAO,GAAG,EAAE,CAAC;IACf,CAAC;IACD,IAAI,OAAO,KAAK,EAAE;QAAE,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/C,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;GAGG;AACH,MAAM,OAAO;IACH,KAAK,GAAG,CAAC,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AAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;QACjC,OAAO,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5D,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -2,6 +2,7 @@
2
2
  * Schema exports for agent-skills package
3
3
  */
4
4
  export { AgentSkillFrontmatterJsonSchema, AgentSkillFrontmatterSchema, VATAgentSkillFrontmatterSchema, type AgentSkillFrontmatter, type VATAgentSkillFrontmatter, } from './agent-skill-frontmatter.js';
5
+ export { allowedToolsOf, splitAllowedToolsList } from './allowed-tools.js';
5
6
  export { detectInstalledPluginsRegistryDrift, InstalledPluginsRegistryJsonSchema, InstalledPluginsRegistrySchema, KNOWN_INSTALLATION_SCOPES, type InstalledPluginsRegistry, type PluginInstallation, } from './installed-plugins-registry.js';
6
7
  export { detectKnownMarketplacesRegistryDrift, KNOWN_MARKETPLACE_SOURCE_KINDS, KnownMarketplacesRegistryJsonSchema, KnownMarketplacesRegistrySchema, type KnownMarketplacesRegistry, type MarketplaceEntry, type MarketplaceSource, } from './known-marketplaces-registry.js';
7
8
  export type { RegistryShapeDrift } from './registry-drift.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,EAC3B,8BAA8B,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,GAC9B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,8BAA8B,EAC9B,yBAAyB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,GACxB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,oCAAoC,EACpC,8BAA8B,EAC9B,mCAAmC,EACnC,+BAA+B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,kCAAkC,CAAC;AAE1C,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,KAAK,mBAAmB,GACzB,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,EAC3B,8BAA8B,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,GAC9B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3E,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,8BAA8B,EAC9B,yBAAyB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,GACxB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,oCAAoC,EACpC,8BAA8B,EAC9B,mCAAmC,EACnC,+BAA+B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,kCAAkC,CAAC;AAE1C,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,KAAK,mBAAmB,GACzB,MAAM,2BAA2B,CAAC"}
@@ -2,6 +2,7 @@
2
2
  * Schema exports for agent-skills package
3
3
  */
4
4
  export { AgentSkillFrontmatterJsonSchema, AgentSkillFrontmatterSchema, VATAgentSkillFrontmatterSchema, } from './agent-skill-frontmatter.js';
5
+ export { allowedToolsOf, splitAllowedToolsList } from './allowed-tools.js';
5
6
  export { detectInstalledPluginsRegistryDrift, InstalledPluginsRegistryJsonSchema, InstalledPluginsRegistrySchema, KNOWN_INSTALLATION_SCOPES, } from './installed-plugins-registry.js';
6
7
  export { detectKnownMarketplacesRegistryDrift, KNOWN_MARKETPLACE_SOURCE_KINDS, KnownMarketplacesRegistryJsonSchema, KnownMarketplacesRegistrySchema, } from './known-marketplaces-registry.js';
7
8
  export { MarketplaceManifestJsonSchema, MarketplaceManifestSchema, } from './marketplace-manifest.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,EAC3B,8BAA8B,GAG/B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,8BAA8B,EAC9B,yBAAyB,GAG1B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,oCAAoC,EACpC,8BAA8B,EAC9B,mCAAmC,EACnC,+BAA+B,GAIhC,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,GAE1B,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,EAC3B,8BAA8B,GAG/B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3E,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,8BAA8B,EAC9B,yBAAyB,GAG1B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,oCAAoC,EACpC,8BAA8B,EAC9B,mCAAmC,EACnC,+BAA+B,GAIhC,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,GAE1B,MAAM,2BAA2B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"installed-plugins-registry.d.ts","sourceRoot":"","sources":["../../src/schemas/installed-plugins-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;;;;;;;;;;;GAYG;AAEH;;;GAGG;AACH,eAAO,MAAM,yBAAyB,iDAK5B,CAAC;AAIX;;GAEG;AACH,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA2Cd,CAAC;AAEjB;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAcQ,CAAC;AAEpD,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,kCAAkC;;;;;CAG9C,CAAC;AAkDF;;;;;;;;;GASG;AACH,wBAAgB,mCAAmC,CACjD,IAAI,EAAE,OAAO,GACZ,kBAAkB,EAAE,CA4BtB"}
1
+ {"version":3,"file":"installed-plugins-registry.d.ts","sourceRoot":"","sources":["../../src/schemas/installed-plugins-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;;;;;;;;;;;GAYG;AAEH;;;GAGG;AACH,eAAO,MAAM,yBAAyB,iDAK5B,CAAC;AAIX;;GAEG;AACH,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA2Cd,CAAC;AAEjB;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAoBQ,CAAC;AAEpD,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,kCAAkC;;;;;CAG9C,CAAC;AAkDF;;;;;;;;;GASG;AACH,wBAAgB,mCAAmC,CACjD,IAAI,EAAE,OAAO,GACZ,kBAAkB,EAAE,CA4BtB"}
@@ -71,7 +71,13 @@ const PluginInstallationSchema = z
71
71
  */
72
72
  export const InstalledPluginsRegistrySchema = z
73
73
  .object({
74
- version: z.literal(2).describe('Registry format version (currently 2)'),
74
+ // Claude Code's file, Claude Code's number: `installed_plugins.json` is
75
+ // written by another vendor and declares its own format version. Reading
76
+ // it is an external fact, like `ANTHROPIC_VERSION`, not a VAT version
77
+ // constant — a registry at a format VAT has never seen should be refused
78
+ // by name rather than parsed on hope.
79
+ // eslint-disable-next-line local/no-version-literal -- external format version declared by Claude Code's own file, not a VAT constant
80
+ version: z.literal(2).describe('Registry format version as Claude Code writes it (currently 2)'),
75
81
  plugins: z
76
82
  .record(z
77
83
  .string()
@@ -1 +1 @@
1
- {"version":3,"file":"installed-plugins-registry.js","sourceRoot":"","sources":["../../src/schemas/installed-plugins-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EACL,QAAQ,EACR,WAAW,EACX,iBAAiB,GAGlB,MAAM,qBAAqB,CAAC;AAI7B;;;;;;;;;;;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M,UAAU,mCAAmC,CACjD,IAAa;IAEb,MAAM,KAAK,GAAwB,IAAI,GAAG,EAAE,CAAC;IAE7C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,iBAAiB,CACf,IAAI,EACJ,mBAAmB,EACnB,EAAE,EACF,CAAC,GAAG,EAAE,EAAE,CAAC,kDAAkD,GAAG,GAAG,EACjE,KAAK,CACN,CAAC;IAEF,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;IAChC,IAAI,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACtB,KAAK,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC5B,SAAS;YACX,CAAC;YACD,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;gBAC/C,iBAAiB,CAAC,KAAK,EAAE,WAAW,SAAS,IAAI,KAAK,EAAE,EAAE,KAAK,CAAC,CAAC;YACnE,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;AAC7B,CAAC"}
1
+ {"version":3,"file":"installed-plugins-registry.js","sourceRoot":"","sources":["../../src/schemas/installed-plugins-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EACL,QAAQ,EACR,WAAW,EACX,iBAAiB,GAGlB,MAAM,qBAAqB,CAAC;AAI7B;;;;;;;;;;;;GAYG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA0B0C,CAAC;AAEjF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,6BAA6B;;;;;CAMzC,CAAC"}
1
+ {"version":3,"file":"marketplace-manifest.d.ts","sourceRoot":"","sources":["../../src/schemas/marketplace-manifest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwExB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA0B0C,CAAC;AAEjF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,6BAA6B;;;;;CAMzC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { hasParentTraversalSegment, isAbsoluteAnyPlatform } from '@vibe-agent-toolkit/utils';
1
2
  import { z } from 'zod';
2
3
  import { zodToJsonSchema } from 'zod-to-json-schema';
3
4
  /**
@@ -26,17 +27,27 @@ const OwnerSchema = z
26
27
  * We validate the discriminant (`source` field on objects) but use
27
28
  * .passthrough() for provider-specific fields (repo, url, package, etc.).
28
29
  *
29
- * String paths must not use .. directory traversal — Claude Code rejects
30
- * source paths that resolve outside the marketplace directory.
30
+ * A string `source` is a path the consumer resolves against the marketplace
31
+ * root and WALKS, so this refine is the first containment gate. It refuses
32
+ * every spelling that leaves the root on some platform: an absolute path
33
+ * (POSIX root, drive letter, UNC) and a `..` segment behind EITHER separator.
34
+ * Claude Code's installer rejects a source that resolves outside the
35
+ * marketplace directory, so such an entry cannot ship either way.
36
+ *
37
+ * 🪤 The check used to split on `/` alone — `plugins\..\..\x` passed it and
38
+ * `path.resolve` walked it out of the root on every platform; `/etc` passed it
39
+ * outright — and the consumer entered whatever it named.
31
40
  */
32
41
  const PluginSourceSchema = z.union([
33
42
  z
34
43
  .string()
35
44
  .min(1)
36
- // eslint-disable-next-line local/no-hardcoded-path-split -- source is a URL-style path, not a filesystem path; forward-slash split is correct
37
- .refine((s) => !s.split('/').includes('..'), {
38
- message: 'source path must not use .. directory traversal',
39
- }),
45
+ .refine((s) => !isAbsoluteAnyPlatform(s) && !hasParentTraversalSegment(s), (s) => ({
46
+ // Names the value: the reader's next move is to fix THIS entry.
47
+ message: `source path "${s}" must be relative to the marketplace directory and stay inside it`
48
+ + ' (no absolute path, no `..` segment) — Claude Code rejects a plugin source that'
49
+ + ' resolves outside the marketplace, so this entry cannot be installed',
50
+ })),
40
51
  z.object({ source: z.string() }).passthrough(),
41
52
  ]);
42
53
  const MarketplacePluginEntrySchema = z
@@ -1 +1 @@
1
- {"version":3,"file":"marketplace-manifest.js","sourceRoot":"","sources":["../../src/schemas/marketplace-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,GAAG,CAAC;KACnB,MAAM,CAAC;IACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC;IACjD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QA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C;IAEhE,IAAI,EAAE,CAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,8BAA8B,CAAC;SACtC,QAAQ,CAAC,wBAAwB,CAAC;IAEpC,WAAW,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,+CAA+C,CAAC;IAE3D,OAAO,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,8BAA8B,CAAC;IAE1C,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IAE5D,OAAO,EAAE,CAAC;SACR,KAAK,CAAC,4BAA4B,CAAC;SACnC,QAAQ,CAAC,+CAA+C,CAAC;CAC3D,CAAC;KACD,WAAW,EAAE;KACb,QAAQ,CAAC,oEAAoE,CAAC,CAAC;AAIjF;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,eAAe,CAC3D,yBAAyB,EACzB;IACC,IAAI,EAAE,qBAAqB;IAC3B,YAAY,EAAE,MAAM;CACpB,CACD,CAAC"}
@@ -13,9 +13,24 @@
13
13
  /**
14
14
  * Read the name a SKILL.md declares for itself.
15
15
  *
16
- * Returns `undefined` when the file is unreadable, has no frontmatter, or
17
- * declares no usable `name` — callers decide whether that is fatal or whether
18
- * some fallback (typically the directory leaf) applies.
16
+ * Returns `undefined` when there is no file at the path, it has no frontmatter,
17
+ * or it declares no usable `name` — callers decide whether that is fatal or
18
+ * whether some fallback (typically the directory leaf) applies.
19
+ *
20
+ * A file that IS there but could not be read (a permission refusal, a path
21
+ * component that is a directory) throws: `undefined` means "declares no name",
22
+ * and a refusal has not established that — a caller falling back to the
23
+ * directory leaf would otherwise rename the skill on the operator's behalf.
19
24
  */
20
25
  export declare function readDeclaredSkillName(skillMdPath: string): string | undefined;
26
+ /**
27
+ * The same answer, for a SKILL.md whose BYTES a caller already holds and whose
28
+ * path may not exist on disk at all — an entry read out of a ZIP's central
29
+ * directory being the case this was split out for.
30
+ *
31
+ * Deliberately the same function as the path-taking reader above rather than a
32
+ * second parse beside it: two spellings of "what name does this declare" is
33
+ * exactly how one lane starts answering differently from another.
34
+ */
35
+ export declare function declaredSkillNameIn(content: string): string | undefined;
21
36
  //# sourceMappingURL=skill-identity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill-identity.d.ts","sourceRoot":"","sources":["../src/skill-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAiB7E"}
1
+ {"version":3,"file":"skill-identity.d.ts","sourceRoot":"","sources":["../src/skill-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAQH;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAS7E;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASvE"}
@@ -11,23 +11,42 @@
11
11
  * a path, so every lane answers the question the same way.
12
12
  */
13
13
  import { readFileSync } from 'node:fs';
14
+ import { isPathAbsentError } from '@vibe-agent-toolkit/utils';
14
15
  import { parseFrontmatter } from './parsers/frontmatter-parser.js';
15
16
  /**
16
17
  * Read the name a SKILL.md declares for itself.
17
18
  *
18
- * Returns `undefined` when the file is unreadable, has no frontmatter, or
19
- * declares no usable `name` — callers decide whether that is fatal or whether
20
- * some fallback (typically the directory leaf) applies.
19
+ * Returns `undefined` when there is no file at the path, it has no frontmatter,
20
+ * or it declares no usable `name` — callers decide whether that is fatal or
21
+ * whether some fallback (typically the directory leaf) applies.
22
+ *
23
+ * A file that IS there but could not be read (a permission refusal, a path
24
+ * component that is a directory) throws: `undefined` means "declares no name",
25
+ * and a refusal has not established that — a caller falling back to the
26
+ * directory leaf would otherwise rename the skill on the operator's behalf.
21
27
  */
22
28
  export function readDeclaredSkillName(skillMdPath) {
23
29
  let content;
24
30
  try {
25
- // eslint-disable-next-line security/detect-non-literal-fs-filename -- caller-supplied skill path
26
31
  content = readFileSync(skillMdPath, 'utf-8');
27
32
  }
28
- catch {
29
- return undefined;
33
+ catch (error) {
34
+ if (isPathAbsentError(error))
35
+ return undefined;
36
+ throw error;
30
37
  }
38
+ return declaredSkillNameIn(content);
39
+ }
40
+ /**
41
+ * The same answer, for a SKILL.md whose BYTES a caller already holds and whose
42
+ * path may not exist on disk at all — an entry read out of a ZIP's central
43
+ * directory being the case this was split out for.
44
+ *
45
+ * Deliberately the same function as the path-taking reader above rather than a
46
+ * second parse beside it: two spellings of "what name does this declare" is
47
+ * exactly how one lane starts answering differently from another.
48
+ */
49
+ export function declaredSkillNameIn(content) {
31
50
  const parsed = parseFrontmatter(content);
32
51
  if (!parsed.success)
33
52
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"skill-identity.js","sourceRoot":"","sources":["../src/skill-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,WAAmB;IACvD,IAAI,OAAe,CAAC;IACpB,IAAI,CAAC;QACH,iGAAiG;QACjG,OAAO,GAAG,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACzC,IAAI,CAAC,MAAM,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAEtC,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5C,IAAI,OAAO,QAAQ,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C,CAAC,OAAO,CAAC;AAC9C,CAAC"}
@@ -14,22 +14,18 @@
14
14
  * Uses ResourceRegistry + transformContent() from @vibe-agent-toolkit/resources
15
15
  * for link resolution and rewriting (replacing the previous inline regex approach).
16
16
  */
17
- import { type AllowUsageLedger, type ValidationConfig, type ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
18
- import { ResourceRegistry } from '@vibe-agent-toolkit/resources';
19
- import { type GitTracker } from '@vibe-agent-toolkit/utils';
17
+ import { ResourceRegistry, type ResourceLink, type ResourcePopulationSource } from '@vibe-agent-toolkit/resources';
18
+ import { type AllowUsageLedger, type ValidationConfig, type ValidationIssue } from '@vibe-agent-toolkit/schema';
19
+ import { VatError } from '@vibe-agent-toolkit/utils';
20
+ import { type GitTracker } from '@vibe-agent-toolkit/utils/git';
21
+ import { type PackagingTarget } from './content-type-routing.js';
20
22
  import { type SkillFileEntry } from './files-config.js';
21
- import { type DeclaredEvalSuite } from './test-input.js';
23
+ import { type ConventionalSuiteProbe, type DeclaredEvalSuite } from './test-input.js';
22
24
  import { type PackagingValidationResult, type SkillPackagingConfig } from './validators/packaging-validator.js';
23
25
  /**
24
26
  * Resource naming strategy type
25
27
  */
26
28
  export type ResourceNamingStrategy = 'basename' | 'resource-id' | 'preserve-path';
27
- /**
28
- * Packaging target: determines ZIP directory structure
29
- * - 'claude-code': Standard VAT format with resources/ subdirectory (default)
30
- * - 'claude-web': Claude.ai web upload format with references/, scripts/, assets/ subdirectories
31
- */
32
- export type PackagingTarget = 'claude-code' | 'claude-web';
33
29
  export interface PackageSkillOptions {
34
30
  /**
35
31
  * Output directory for packaged skill
@@ -111,8 +107,10 @@ export interface PackageSkillOptions {
111
107
  /**
112
108
  * Packaging target — controls the ZIP directory structure produced.
113
109
  *
114
- * - 'claude-code' (default): Standard VAT layout with resources/ subdirectory
115
- * - 'claude-web': Claude.ai web upload layout with references/, scripts/, assets/ subdirectories
110
+ * - 'claude-code' (default): Standard VAT layout, routed by extension into
111
+ * resources/, scripts/, templates/, assets/
112
+ * - 'claude-web': Claude.ai web upload layout — every resource flattened into
113
+ * references/, extensions ignored (see `PackagingTarget`)
116
114
  *
117
115
  * Default: 'claude-code'
118
116
  */
@@ -167,11 +165,19 @@ export interface PackageSkillOptions {
167
165
  * repo has been bitten by). It is required rather than defaulted because the test-input
168
166
  * rule is project-wide: omitting it silently packages another skill's eval answer key.
169
167
  * A lane with genuinely no project to enumerate passes `[]` explicitly.
168
+ *
169
+ * `hasConventionalSuite` is the RUN's conventional-suite probe, and travels with
170
+ * `projectSkills` for the same reason and on the same schedule: this conversion runs
171
+ * once per skill and asks the filesystem about every root in `projectSkills`, so a
172
+ * per-call probe makes a build of S skills cost S² probes over S paths. Required, not
173
+ * defaulted — a `probe?` would let every existing caller keep the quadratic silently,
174
+ * which is precisely how the `projectSkills` rule above once shipped as a no-op. A
175
+ * lane packaging a single skill calls `conventionalSuiteProbe()` at its own call site.
170
176
  */
171
177
  export declare function packagingConfigToPackageOptions(config: SkillPackagingConfig, anchors: {
172
178
  skillPath: string;
173
179
  outputPath: string;
174
- }, projectSkills: readonly DeclaredEvalSuite[]): PackageSkillOptions;
180
+ }, projectSkills: readonly DeclaredEvalSuite[], hasConventionalSuite: ConventionalSuiteProbe): PackageSkillOptions;
175
181
  export interface SkillMetadata {
176
182
  name: string;
177
183
  description?: string;
@@ -279,6 +285,11 @@ export type SkillPackageOutcome = {
279
285
  * (`vat build` also validates the SOURCE tree, whose matches count too).
280
286
  * Containment does not change that: a skill that threw may still have matched
281
287
  * allow entries before it threw, and those matches count for the run.
288
+ * @param runOptions - Registry-build options for the RUN. Named apart from the
289
+ * per-skill `options` destructured in the loop below, which it is not: it
290
+ * configures the ONE shared registry {@link createProjectRegistry} builds here.
291
+ * It does NOT reach the per-skill post-build validation, which builds a private
292
+ * registry over the BUILT tree — see {@link runPostBuildValidation}
282
293
  * @returns One outcome per input spec, in input order
283
294
  *
284
295
  * @example
@@ -292,7 +303,7 @@ export type SkillPackageOutcome = {
292
303
  * const runIssues = allowUnusedIssues(ledger);
293
304
  * ```
294
305
  */
295
- export declare function packageSkills(skills: SkillBuildSpec[], projectRoot: string, allowLedger: AllowUsageLedger): Promise<SkillPackageOutcome[]>;
306
+ export declare function packageSkills(skills: SkillBuildSpec[], projectRoot: string, allowLedger: AllowUsageLedger, runOptions?: ProjectRegistryOptions): Promise<SkillPackageOutcome[]>;
296
307
  /**
297
308
  * Package a skill with all its dependencies
298
309
  *
@@ -312,6 +323,19 @@ export declare function packageSkills(skills: SkillBuildSpec[], projectRoot: str
312
323
  * ```
313
324
  */
314
325
  export declare function packageSkill(skillPath: string, options?: PackageSkillOptions): Promise<PackageSkillResult>;
326
+ /**
327
+ * Options for {@link createProjectRegistry}.
328
+ */
329
+ export interface ProjectRegistryOptions {
330
+ /**
331
+ * Where the file list comes from — omit for the incumbent walk, supply one to
332
+ * source it from a projection instead.
333
+ *
334
+ * See {@link createProjectRegistry}'s docstring: the source answers
335
+ * enumeration only, and this builder's markdown-only scoping survives it.
336
+ */
337
+ populationSource?: ResourcePopulationSource | undefined;
338
+ }
315
339
  /**
316
340
  * Build THE project registry: every markdown file under `projectRoot`, parsed,
317
341
  * with links resolved and the project config attached.
@@ -329,8 +353,33 @@ export declare function packageSkill(skillPath: string, options?: PackageSkillOp
329
353
  * so a lane that built its own config-less registry rewrote frontmatter
330
354
  * differently from the lane that used this one — which is why there is now only
331
355
  * one builder rather than two that happened to differ in one argument.
356
+ *
357
+ * ## Why the include set is markdown-only, unlike `crawlAndResolveRegistry`'s
358
+ *
359
+ * The difference is deliberate and is NOT a hole that leaves HTML unrewritten.
360
+ * A bundled HTML file joins this registry later, on demand, via
361
+ * {@link registerBundledAssets} — which parses it and resolves its links before
362
+ * the copy step, so `rewriteHtmlLinks` reaches it. Crawling every `.html` under
363
+ * the project up front would parse generated output the build never bundles,
364
+ * and would move `page.md` vs `page.html` id collisions from the narrow
365
+ * bundled-asset path onto the whole-project crawl.
366
+ *
367
+ * Widening this glob would NOT widen what the walker follows: routing is
368
+ * markdown-only regardless — see `isRoutable` in `walk-link-graph.ts`.
369
+ *
370
+ * ## The optional population source, and why it cannot widen that glob
371
+ *
372
+ * `populationSource` replaces the ENUMERATION only. `ResourceRegistry.crawl`
373
+ * re-applies this function's `include` — and the crawl's default `exclude` —
374
+ * to whatever the source offers, through the same compiled matcher the walk
375
+ * itself uses, so a source that enumerates a whole tree still yields exactly
376
+ * the project's markdown here. That is what makes handing this builder a
377
+ * projection a cost change rather than a scope change.
378
+ *
379
+ * Selecting the lane stays the CLI's job: this signature takes a source, never
380
+ * an environment. A library caller that passes nothing keeps the walk.
332
381
  */
333
- export declare function createProjectRegistry(projectRoot: string): Promise<ResourceRegistry>;
382
+ export declare function createProjectRegistry(projectRoot: string, options?: ProjectRegistryOptions): Promise<ResourceRegistry>;
334
383
  /**
335
384
  * Generate a synthetic resource ID for a non-markdown asset that collides with an
336
385
  * existing markdown resource. Uses the absolute asset path prefixed with `asset::`
@@ -339,12 +388,87 @@ export declare function createProjectRegistry(projectRoot: string): Promise<Reso
339
388
  */
340
389
  export declare function synthesizeAssetId(assetPath: string): string;
341
390
  /**
342
- * Determine the resource subdirectory for a file.
391
+ * Copy a single file, optionally rewriting markdown links using transformContent().
392
+ *
393
+ * For markdown files with rewriteLinks enabled:
394
+ * 1. Reads the source file
395
+ * 2. Finds the corresponding resource in the "from" registry
396
+ * 3. Calls transformContent() with the resource's links, unified rules, and "to" registry
397
+ * 4. Writes the result
398
+ *
399
+ * All link rewriting (bundled, excluded, inline, reference-style definitions)
400
+ * is handled by a single transformContent() call with ordered rules.
401
+ *
402
+ * For non-markdown files, performs a plain binary copy.
403
+ */
404
+ /**
405
+ * Re-base a resource's link spans onto the frontmatter-stripped body.
406
+ *
407
+ * ## 🚨 Why this exists: the span rewrite was INERT here, and could mis-splice
408
+ *
409
+ * `transformContent` identifies each link by its parsed `[startOffset,
410
+ * endOffset)` span rather than by replaying a regex and correlating on href —
411
+ * which is the whole point, because the two grammars disagree about what the
412
+ * href IS. Its docstring states the precondition outright: *links must come from
413
+ * the same bytes as content*.
414
+ *
415
+ * This call site violated it. `resource.links` are parsed from the WHOLE FILE,
416
+ * and `editor.body` has the frontmatter block removed — so every offset was off
417
+ * by the frontmatter's length. Measured on a four-line skill: span `[45, 77)`
418
+ * against a body shifted by 40, where `body.slice(45, 81)` is `"ails.\n"`. Every
419
+ * splice declined and every link fell back to the pre-fix regex path, so the
420
+ * headline defect (`[![alt](img)](url)` silently not rewritten) was still
421
+ * shipping. Worse, a stale span can land on a *different*, structurally valid
422
+ * link and rewrite ITS href to the first link's target.
423
+ *
424
+ * ## The re-base is VERIFIED, not assumed
425
+ *
426
+ * Subtracting `content.length - body.length` is correct if and only if `body` is
427
+ * a literal SUFFIX of `content` — that is exactly the statement "every body index
428
+ * `i` is content index `i + offset`". `String.endsWith` decides it outright, so
429
+ * the arithmetic is checked rather than argued, and a body that is not a suffix
430
+ * comes back with its spans REMOVED instead of with coordinates nothing verified.
431
+ * `openFrontmatter` does yield a suffix today, across CRLF, a commented block, an
432
+ * absent block and empty input; the check is what keeps that a fact rather than a
433
+ * comment that outlives the code it describes.
434
+ *
435
+ * ⛔ **This used to claim `splicableFrom` as its backstop, and that claim was
436
+ * false.** The words were: "`splicableFrom` refuses any span whose destination is
437
+ * not exactly the parser's href, so a misalignment that survives this degrades to
438
+ * *no rewrite* rather than to a wrong one." It does not. That comparison is keyed
439
+ * on the HREF, which two links in one document routinely share, so a stale span
440
+ * landing on a same-href neighbour passes it and the neighbour is rewritten
441
+ * through the first link's metadata. Constructed and pinned in
442
+ * `packages/resources/test/content-transform.test.ts` › *two links sharing an
443
+ * href defeat the destination comparison*, where a tuned frontmatter length makes
444
+ * two labels swap places. A mitigation keyed on a value the two candidates have
445
+ * in common cannot be a guarantee, and a guard resting on one is resting on
446
+ * nothing.
447
+ *
448
+ * 🔑 What holds instead, in full, because the precondition has two halves:
449
+ *
450
+ * 1. *The spans address `content`* — discharged by the reader, not by this
451
+ * function. `resource.links` and `content` must come from the same decode of
452
+ * the same file, which is why the caller's read is pinned to
453
+ * `readTextContent` with a 🚨 of its own. A second reader is the one way this
454
+ * half fails, and it fails invisibly.
455
+ * 2. *The subtraction maps `content` onto `body`* — discharged here, by
456
+ * `endsWith`.
457
+ *
458
+ * `splicableFrom`'s destination check remains a useful mitigation for the
459
+ * residue. It is not counted on, and nothing here degrades gracefully because of
460
+ * it.
343
461
  *
344
- * For claude-web target: uses the existing references directory.
345
- * For claude-code target: uses content-type routing based on file extension.
462
+ * @param content - The file as read, which the links were parsed from
463
+ * @param body - The frontmatter-stripped body the rewrite will run over
464
+ * @param links - The resource's links, carrying whole-file offsets
465
+ * @param onUnverifiable - Called when `body` is not a suffix of `content`, so the
466
+ * caller can say which file lost its span-driven rewrite. Never called on the
467
+ * normal path.
468
+ * @returns The same links with offsets stated against `body`, or with no offsets
469
+ * at all when the re-base could not be verified
346
470
  */
347
- export declare function getResourceSubdirForFile(filePath: string, target: PackagingTarget): string;
471
+ export declare function bodyRelativeLinks(content: string, body: string, links: readonly ResourceLink[], onUnverifiable: () => void): ResourceLink[];
348
472
  /**
349
473
  * Extract H1 title from markdown content
350
474
  *
@@ -373,7 +497,7 @@ export declare function generateTargetPath(filePath: string, basePath: string, s
373
497
  * Thrown when a claude-web ZIP exceeds the 8MB Claude.ai upload limit.
374
498
  * The CLI catches this and exits with code 1.
375
499
  */
376
- export declare class ZipSizeLimitError extends Error {
500
+ export declare class ZipSizeLimitError extends VatError {
377
501
  readonly sizeBytes: number;
378
502
  readonly limitBytes: number;
379
503
  constructor(sizeBytes: number, limitBytes: number);
@@ -1 +1 @@
1
- {"version":3,"file":"skill-packager.d.ts","sourceRoot":"","sources":["../src/skill-packager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,EAIL,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,gBA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