@vibe-agent-toolkit/agent-skills 0.1.39-rc.1 → 0.1.39-rc.11

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 (174) hide show
  1. package/dist/files-config.d.ts +137 -7
  2. package/dist/files-config.d.ts.map +1 -1
  3. package/dist/files-config.js +241 -15
  4. package/dist/files-config.js.map +1 -1
  5. package/dist/index.d.ts +5 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +6 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/post-build-checks.d.ts +5 -5
  10. package/dist/post-build-checks.d.ts.map +1 -1
  11. package/dist/post-build-checks.js +119 -61
  12. package/dist/post-build-checks.js.map +1 -1
  13. package/dist/schemas/installed-plugins-registry.d.ts +6 -6
  14. package/dist/skill-packager.d.ts +1 -1
  15. package/dist/skill-packager.d.ts.map +1 -1
  16. package/dist/skill-packager.js +195 -45
  17. package/dist/skill-packager.js.map +1 -1
  18. package/dist/skill-source/content-hash.d.ts +13 -0
  19. package/dist/skill-source/content-hash.d.ts.map +1 -0
  20. package/dist/skill-source/content-hash.js +49 -0
  21. package/dist/skill-source/content-hash.js.map +1 -0
  22. package/dist/skill-source/fetch-cache.d.ts +26 -0
  23. package/dist/skill-source/fetch-cache.d.ts.map +1 -0
  24. package/dist/skill-source/fetch-cache.js +62 -0
  25. package/dist/skill-source/fetch-cache.js.map +1 -0
  26. package/dist/skill-source/git-clone.d.ts +21 -0
  27. package/dist/skill-source/git-clone.d.ts.map +1 -0
  28. package/dist/skill-source/git-clone.js +66 -0
  29. package/dist/skill-source/git-clone.js.map +1 -0
  30. package/dist/skill-source/resolve-skill-source.d.ts +12 -0
  31. package/dist/skill-source/resolve-skill-source.d.ts.map +1 -0
  32. package/dist/skill-source/resolve-skill-source.js +37 -0
  33. package/dist/skill-source/resolve-skill-source.js.map +1 -0
  34. package/dist/skill-source/sources/npm-source.d.ts +22 -0
  35. package/dist/skill-source/sources/npm-source.d.ts.map +1 -0
  36. package/dist/skill-source/sources/npm-source.js +48 -0
  37. package/dist/skill-source/sources/npm-source.js.map +1 -0
  38. package/dist/skill-source/sources/path-source.d.ts +10 -0
  39. package/dist/skill-source/sources/path-source.d.ts.map +1 -0
  40. package/dist/skill-source/sources/path-source.js +17 -0
  41. package/dist/skill-source/sources/path-source.js.map +1 -0
  42. package/dist/skill-source/sources/url-source.d.ts +14 -0
  43. package/dist/skill-source/sources/url-source.d.ts.map +1 -0
  44. package/dist/skill-source/sources/url-source.js +113 -0
  45. package/dist/skill-source/sources/url-source.js.map +1 -0
  46. package/dist/skill-source/sources/vendored-source.d.ts +8 -0
  47. package/dist/skill-source/sources/vendored-source.d.ts.map +1 -0
  48. package/dist/skill-source/sources/vendored-source.js +16 -0
  49. package/dist/skill-source/sources/vendored-source.js.map +1 -0
  50. package/dist/skill-source/sources/workspace-source.d.ts +17 -0
  51. package/dist/skill-source/sources/workspace-source.d.ts.map +1 -0
  52. package/dist/skill-source/sources/workspace-source.js +27 -0
  53. package/dist/skill-source/sources/workspace-source.js.map +1 -0
  54. package/dist/skill-source/stage.d.ts +21 -0
  55. package/dist/skill-source/stage.d.ts.map +1 -0
  56. package/dist/skill-source/stage.js +73 -0
  57. package/dist/skill-source/stage.js.map +1 -0
  58. package/dist/skill-source/types.d.ts +65 -0
  59. package/dist/skill-source/types.d.ts.map +1 -0
  60. package/dist/skill-source/types.js +11 -0
  61. package/dist/skill-source/types.js.map +1 -0
  62. package/dist/skill-test/build-hook.d.ts +58 -0
  63. package/dist/skill-test/build-hook.d.ts.map +1 -0
  64. package/dist/skill-test/build-hook.js +63 -0
  65. package/dist/skill-test/build-hook.js.map +1 -0
  66. package/dist/skill-test/configure-writer.d.ts +31 -0
  67. package/dist/skill-test/configure-writer.d.ts.map +1 -0
  68. package/dist/skill-test/configure-writer.js +39 -0
  69. package/dist/skill-test/configure-writer.js.map +1 -0
  70. package/dist/skill-test/declared-env.d.ts +72 -0
  71. package/dist/skill-test/declared-env.d.ts.map +1 -0
  72. package/dist/skill-test/declared-env.js +85 -0
  73. package/dist/skill-test/declared-env.js.map +1 -0
  74. package/dist/skill-test/evals-template.d.ts +22 -0
  75. package/dist/skill-test/evals-template.d.ts.map +1 -0
  76. package/dist/skill-test/evals-template.js +56 -0
  77. package/dist/skill-test/evals-template.js.map +1 -0
  78. package/dist/skill-test/exit-codes.d.ts +34 -0
  79. package/dist/skill-test/exit-codes.d.ts.map +1 -0
  80. package/dist/skill-test/exit-codes.js +59 -0
  81. package/dist/skill-test/exit-codes.js.map +1 -0
  82. package/dist/skill-test/experimenter-prompt.d.ts +20 -0
  83. package/dist/skill-test/experimenter-prompt.d.ts.map +1 -0
  84. package/dist/skill-test/experimenter-prompt.js +68 -0
  85. package/dist/skill-test/experimenter-prompt.js.map +1 -0
  86. package/dist/skill-test/friction-schema.d.ts +74 -0
  87. package/dist/skill-test/friction-schema.d.ts.map +1 -0
  88. package/dist/skill-test/friction-schema.js +28 -0
  89. package/dist/skill-test/friction-schema.js.map +1 -0
  90. package/dist/skill-test/grading-adapter.d.ts +22 -0
  91. package/dist/skill-test/grading-adapter.d.ts.map +1 -0
  92. package/dist/skill-test/grading-adapter.js +49 -0
  93. package/dist/skill-test/grading-adapter.js.map +1 -0
  94. package/dist/skill-test/grading-schema.d.ts +171 -0
  95. package/dist/skill-test/grading-schema.d.ts.map +1 -0
  96. package/dist/skill-test/grading-schema.js +65 -0
  97. package/dist/skill-test/grading-schema.js.map +1 -0
  98. package/dist/skill-test/harness-location.d.ts +40 -0
  99. package/dist/skill-test/harness-location.d.ts.map +1 -0
  100. package/dist/skill-test/harness-location.js +111 -0
  101. package/dist/skill-test/harness-location.js.map +1 -0
  102. package/dist/skill-test/index.d.ts +16 -0
  103. package/dist/skill-test/index.d.ts.map +1 -0
  104. package/dist/skill-test/index.js +16 -0
  105. package/dist/skill-test/index.js.map +1 -0
  106. package/dist/skill-test/lock.d.ts +16 -0
  107. package/dist/skill-test/lock.d.ts.map +1 -0
  108. package/dist/skill-test/lock.js +42 -0
  109. package/dist/skill-test/lock.js.map +1 -0
  110. package/dist/skill-test/manifest.d.ts +59 -0
  111. package/dist/skill-test/manifest.d.ts.map +1 -0
  112. package/dist/skill-test/manifest.js +34 -0
  113. package/dist/skill-test/manifest.js.map +1 -0
  114. package/dist/skill-test/plugin-env.d.ts +20 -0
  115. package/dist/skill-test/plugin-env.d.ts.map +1 -0
  116. package/dist/skill-test/plugin-env.js +24 -0
  117. package/dist/skill-test/plugin-env.js.map +1 -0
  118. package/dist/skill-test/plugin-layout.d.ts +41 -0
  119. package/dist/skill-test/plugin-layout.d.ts.map +1 -0
  120. package/dist/skill-test/plugin-layout.js +49 -0
  121. package/dist/skill-test/plugin-layout.js.map +1 -0
  122. package/dist/skill-test/preflight.d.ts +31 -0
  123. package/dist/skill-test/preflight.d.ts.map +1 -0
  124. package/dist/skill-test/preflight.js +66 -0
  125. package/dist/skill-test/preflight.js.map +1 -0
  126. package/dist/skill-test/run-harness.d.ts +158 -0
  127. package/dist/skill-test/run-harness.d.ts.map +1 -0
  128. package/dist/skill-test/run-harness.js +446 -0
  129. package/dist/skill-test/run-harness.js.map +1 -0
  130. package/dist/skill-test/staging.d.ts +76 -0
  131. package/dist/skill-test/staging.d.ts.map +1 -0
  132. package/dist/skill-test/staging.js +145 -0
  133. package/dist/skill-test/staging.js.map +1 -0
  134. package/dist/skill-test/vendor-manifest.d.ts +39 -0
  135. package/dist/skill-test/vendor-manifest.d.ts.map +1 -0
  136. package/dist/skill-test/vendor-manifest.js +121 -0
  137. package/dist/skill-test/vendor-manifest.js.map +1 -0
  138. package/dist/validators/packaging-validator.d.ts +7 -0
  139. package/dist/validators/packaging-validator.d.ts.map +1 -1
  140. package/dist/validators/packaging-validator.js +44 -21
  141. package/dist/validators/packaging-validator.js.map +1 -1
  142. package/dist/validators/rule-engine/index.d.ts +10 -0
  143. package/dist/validators/rule-engine/index.d.ts.map +1 -0
  144. package/dist/validators/rule-engine/index.js +3 -0
  145. package/dist/validators/rule-engine/index.js.map +1 -0
  146. package/dist/validators/rule-engine/rule-context.d.ts +107 -0
  147. package/dist/validators/rule-engine/rule-context.d.ts.map +1 -0
  148. package/dist/validators/rule-engine/rule-context.js +44 -0
  149. package/dist/validators/rule-engine/rule-context.js.map +1 -0
  150. package/dist/validators/rule-engine/rule-engine.d.ts +50 -0
  151. package/dist/validators/rule-engine/rule-engine.d.ts.map +1 -0
  152. package/dist/validators/rule-engine/rule-engine.js +117 -0
  153. package/dist/validators/rule-engine/rule-engine.js.map +1 -0
  154. package/dist/validators/skill-validator.js +2 -2
  155. package/dist/validators/skill-validator.js.map +1 -1
  156. package/dist/validators/validation-rules.js +2 -2
  157. package/dist/validators/validation-rules.js.map +1 -1
  158. package/dist/validators/walker-to-issues.d.ts +12 -0
  159. package/dist/validators/walker-to-issues.d.ts.map +1 -1
  160. package/dist/validators/walker-to-issues.js +59 -22
  161. package/dist/validators/walker-to-issues.js.map +1 -1
  162. package/dist/walk-link-graph.d.ts +10 -2
  163. package/dist/walk-link-graph.d.ts.map +1 -1
  164. package/dist/walk-link-graph.js +63 -14
  165. package/dist/walk-link-graph.js.map +1 -1
  166. package/package.json +7 -5
  167. package/schemas/friction-report.json +59 -0
  168. package/vendor/skill-creator/ATTRIBUTION.md +12 -0
  169. package/vendor/skill-creator/LICENSE.txt +202 -0
  170. package/vendor/skill-creator/SKILL.md +485 -0
  171. package/vendor/skill-creator/agents/grader.md +223 -0
  172. package/vendor/skill-creator/plugin.json +8 -0
  173. package/vendor/skill-creator/references/schemas.md +430 -0
  174. package/vendor/skill-creator/vendored.manifest.json +10 -0
@@ -5,6 +5,7 @@
5
5
  * - Merging defaults + per-skill entries (additive, per-skill wins on dest collision)
6
6
  * - Matching auto-discovered links to files entries
7
7
  * - Computing deferred paths for validation
8
+ * - Copying declared build artifacts into a skill output dir (every build path)
8
9
  */
9
10
  import type { SkillFileEntry } from '@vibe-agent-toolkit/resources';
10
11
  export type { SkillFileEntry } from '@vibe-agent-toolkit/resources';
@@ -30,19 +31,148 @@ export declare function mergeFilesConfig(defaults: SkillFileEntry[] | undefined,
30
31
  * Returns the matching entry and whether it matched on source or dest.
31
32
  * Source matches take priority over dest matches.
32
33
  *
34
+ * For GLOB entries (`isGlob(entry.source)`), matching is by directory prefix:
35
+ * - source match: link is equal to or under the glob's static base
36
+ * - dest match: link is equal to or under entry.dest
37
+ *
38
+ * Single-file entries still match EXACTLY (unchanged).
39
+ *
33
40
  * @param linkTarget - Resolved link target path (relative to project root)
34
41
  * @param files - Merged files config entries
35
42
  * @returns Match result or null if no match
36
43
  */
37
44
  export declare function matchLinkToFiles(linkTarget: string, files: SkillFileEntry[]): FilesMatchResult | null;
38
45
  /**
39
- * Compute the set of paths that should be treated as "deferred" during
40
- * source-time validation. These are paths from files config entries where
41
- * the file may not exist yet (build artifacts).
46
+ * Structured deferred path sets returned by {@link computeDeferredPaths}.
47
+ *
48
+ * - `destPaths` files: dest paths that are always deferred (the target
49
+ * location won't exist until build time).
50
+ * - `sourcePaths` — files: source paths that are deferred ONLY when the
51
+ * target does not yet exist on disk (i.e. genuine build artifacts). A
52
+ * source that already exists on disk and is gitignored is a leak and must
53
+ * NOT be deferred — let it fall through to the gitignore branch.
54
+ */
55
+ export interface DeferredPaths {
56
+ /** files: dest paths — always deferred (won't exist until build). */
57
+ destPaths: Set<string>;
58
+ /** files: source paths — deferred ONLY when the target does not yet exist (build artifact). */
59
+ sourcePaths: Set<string>;
60
+ }
61
+ /**
62
+ * Options for {@link computeDeferredPaths}.
63
+ *
64
+ * - `skillDir` — absolute path to the directory containing SKILL.md.
65
+ * `files:` dest values are authored relative to this dir.
66
+ * - `projectRoot` — absolute path to the project root (git / config root).
67
+ * `files:` source values are authored relative to this dir.
68
+ */
69
+ export interface ComputeDeferredPathsOpts {
70
+ skillDir: string;
71
+ projectRoot: string;
72
+ }
73
+ /**
74
+ * Compute the structured sets of paths that should be treated as "deferred"
75
+ * during source-time validation. These are paths from files config entries
76
+ * where the file may not exist yet (build artifacts).
77
+ *
78
+ * Both sets contain **project-root-relative, forward-slash** paths so they
79
+ * match the `rel` value computed in `checkDeferred()` inside walk-link-graph:
80
+ *
81
+ * ```ts
82
+ * const rel = toForwardSlash(safePath.relative(projectRoot, targetPath));
83
+ * ```
84
+ *
85
+ * - `dest` is authored relative to `skillDir` (mirroring `skill-packager.ts`
86
+ * `resolve(skillDir, entry.dest)`). We resolve it to an absolute path and
87
+ * then make it relative to `projectRoot`.
88
+ * - `source` is authored relative to `projectRoot`. We resolve it with the
89
+ * exact expression `skill-packager.ts` uses —
90
+ * `resolve(join(projectRoot, entry.source))` — so an absolute-looking source
91
+ * is rooted UNDER `projectRoot` identically to what the packager copies.
92
+ * (A bare `resolve(projectRoot, source)` would let a leading slash escape the
93
+ * root, yielding a `../`-prefixed path that never matches the walker's `rel`.)
94
+ * Resolving then re-relativising is a no-op for clean relative paths but
95
+ * correctly strips any leading `./`.
96
+ *
97
+ * - dest paths are always deferred (target won't exist until build)
98
+ * - source paths are deferred only when the target does not yet exist on disk
99
+ */
100
+ export declare function computeDeferredPaths(files: SkillFileEntry[], opts: ComputeDeferredPathsOpts): DeferredPaths;
101
+ /** Options for {@link applyFilesConfig}. */
102
+ export interface ApplyFilesConfigOptions {
103
+ /** Merged `files:` entries to copy. */
104
+ filesConfig: SkillFileEntry[];
105
+ /** Absolute project root; each `source` resolves relative to it. */
106
+ projectRoot: string;
107
+ /** Absolute skill output dir; each `dest` resolves relative to it. */
108
+ skillOutputDir: string;
109
+ /**
110
+ * Absolute source paths already materialized by link traversal — skipped so
111
+ * a linked-and-copied asset isn't copied twice. Defaults to none (copy all).
112
+ */
113
+ bundledFiles?: string[];
114
+ }
115
+ /**
116
+ * Verify that each (absSource, absDest) pair has byte-identical content.
117
+ *
118
+ * Throws with a message naming the offending dest path on any mismatch or
119
+ * missing dest. Intended to be called after a copy operation to assert the
120
+ * copy was faithful. Exported so it can be tested directly without running a
121
+ * full applyFilesConfig round-trip.
122
+ */
123
+ export declare function verifyFilesIntegrity(pairs: {
124
+ absSource: string;
125
+ absDest: string;
126
+ }[]): void;
127
+ /**
128
+ * Verify that the on-disk contents of a glob entry's dest subtree EXACTLY match
129
+ * the set of rel paths the copy step intended to write — no missing, no extra.
130
+ *
131
+ * Why a SET comparison and not just `verifyFilesIntegrity`'s byte check:
132
+ * `verifyFilesIntegrity` hashes the (absSource, absDest) pairs that the SAME copy
133
+ * code computed. If the rebase/glob-mapping logic maps a match to the WRONG dest,
134
+ * that wrong dest rides along in the pair, so `hash(absSource) === hash(absDest)`
135
+ * still passes and the bug slips through. Enumerating the dest subtree and
136
+ * diffing against the expected rel set is what catches a misrouted rebase, a
137
+ * stale leftover, or a dropped file.
138
+ *
139
+ * SAFETY ASSUMPTION (why this can't false-positive): a glob entry OWNS its dest
140
+ * directory (`skillOutputDir/<entry.dest>`) and the build wipes the skill output
141
+ * dir before copying (skill-packager.ts removes `resolvedOutput` recursively
142
+ * before any copy). Nothing else writes into this subtree, so any EXTRA file is a
143
+ * genuine bug, not a co-tenant. This scoping is what makes the set check safe
144
+ * here even though a project-wide "no extra files" check would not be.
145
+ *
146
+ * @param destDir Absolute path to the glob entry's dest subtree.
147
+ * @param expectedRel Forward-slash rel paths (relative to `destDir`) the copy
148
+ * step wrote for THIS entry.
149
+ * @param source The entry's `source` (for error messages only).
150
+ * @throws if the actual subtree omits an expected file or contains an extra one.
151
+ */
152
+ export declare function verifyDestSet(destDir: string, expectedRel: string[], source: string): Promise<void>;
153
+ /**
154
+ * Copy each `files:` entry's `source` → `dest` into the skill output directory.
155
+ *
156
+ * This is the single copy primitive shared by every build path so that
157
+ * build-provided artifacts (a bundled engine, generated data, a catalog) are
158
+ * VAT-managed end-to-end: the shared-pool `vat skills build` packager and the
159
+ * Claude plugin marketplace build both call it, instead of the latter relying on
160
+ * an external inject script VAT can't see. `source` is resolved the same way the
161
+ * packager does (`resolve(join(projectRoot, source))`, so an absolute-looking
162
+ * source roots UNDER the project). Returns the dest paths actually copied.
163
+ *
164
+ * Glob entries (`source` containing `*`, `?`, or `[`) expand late-bound at
165
+ * copy time: all matched files are rebased under `dest` preserving their
166
+ * path relative to the glob's static base. Zero matches → error.
167
+ *
168
+ * When `integrity: true` is set on an entry, `verifyFilesIntegrity` is called
169
+ * after copying to assert byte-identical content. For GLOB entries it ALSO runs
170
+ * `verifyDestSet` to assert the dest subtree contains exactly the copied rels
171
+ * (no missing, no extra) — catching a misrouted rebase the byte check misses.
172
+ * Single-file entries get only the byte check (dest is a file, not a subtree).
42
173
  *
43
- * Both source and dest paths are included because:
44
- * - source may be a build artifact that doesn't exist at validation time
45
- * - dest is the target location that won't exist until build time
174
+ * @throws if a declared `source` does not exist a declared build artifact must
175
+ * be present at copy time (callers that defer existence validate it upstream).
46
176
  */
47
- export declare function computeDeferredPaths(files: SkillFileEntry[]): Set<string>;
177
+ export declare function applyFilesConfig(opts: ApplyFilesConfigOptions): Promise<string[]>;
48
178
  //# sourceMappingURL=files-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"files-config.d.ts","sourceRoot":"","sources":["../src/files-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE,YAAY,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,4DAA4D;AAC5D,MAAM,WAAW,gBAAgB;IAC/B,8CAA8C;IAC9C,KAAK,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,+BAA+B;IAC/B,KAAK,EAAE,cAAc,CAAC;CACvB;AAaD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,cAAc,EAAE,GAAG,SAAS,EACtC,QAAQ,EAAE,cAAc,EAAE,GAAG,SAAS,GACrC,cAAc,EAAE,CA6ClB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,cAAc,EA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CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,uCAAuC;IACvC,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,oEAAoE;IACpE,WAAW,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,GAC9C,IAAI,CAgBN;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EAAE,EACrB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAuBf;AAiFD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAyCvF"}
@@ -5,8 +5,13 @@
5
5
  * - Merging defaults + per-skill entries (additive, per-skill wins on dest collision)
6
6
  * - Matching auto-discovered links to files entries
7
7
  * - Computing deferred paths for validation
8
+ * - Copying declared build artifacts into a skill output dir (every build path)
8
9
  */
9
- import { toForwardSlash } from '@vibe-agent-toolkit/utils';
10
+ import { existsSync, statSync } from 'node:fs';
11
+ import { copyFile, mkdir } from 'node:fs/promises';
12
+ import { dirname } from 'node:path';
13
+ import { fileContentHash, globMagicRemainder, isGlob, safePath, staticGlobBase, toForwardSlash, } from '@vibe-agent-toolkit/utils';
14
+ import { glob } from 'glob';
10
15
  /**
11
16
  * Normalize a path for comparison: strip leading ./ and normalize slashes.
12
17
  */
@@ -70,41 +75,262 @@ export function mergeFilesConfig(defaults, perSkill) {
70
75
  * Returns the matching entry and whether it matched on source or dest.
71
76
  * Source matches take priority over dest matches.
72
77
  *
78
+ * For GLOB entries (`isGlob(entry.source)`), matching is by directory prefix:
79
+ * - source match: link is equal to or under the glob's static base
80
+ * - dest match: link is equal to or under entry.dest
81
+ *
82
+ * Single-file entries still match EXACTLY (unchanged).
83
+ *
73
84
  * @param linkTarget - Resolved link target path (relative to project root)
74
85
  * @param files - Merged files config entries
75
86
  * @returns Match result or null if no match
76
87
  */
77
88
  export function matchLinkToFiles(linkTarget, files) {
78
89
  const normalized = normalizePath(linkTarget);
79
- // Source match has priority
90
+ /** True when `candidate` equals `normalized` or is a path-prefix of it. */
91
+ function isPrefixMatch(candidate) {
92
+ return normalized === candidate || normalized.startsWith(candidate + '/');
93
+ }
94
+ // Source match has priority (checked before dest across all entries)
80
95
  for (const entry of files) {
81
- if (normalizePath(entry.source) === normalized) {
96
+ if (isGlob(entry.source)) {
97
+ const base = normalizePath(staticGlobBase(entry.source));
98
+ if (isPrefixMatch(base)) {
99
+ return { match: 'source', entry };
100
+ }
101
+ }
102
+ else if (normalizePath(entry.source) === normalized) {
82
103
  return { match: 'source', entry };
83
104
  }
84
105
  }
85
106
  // Then check dest match
86
107
  for (const entry of files) {
87
- if (normalizePath(entry.dest) === normalized) {
108
+ if (isGlob(entry.source)) {
109
+ const destBase = normalizePath(entry.dest);
110
+ if (isPrefixMatch(destBase)) {
111
+ return { match: 'dest', entry };
112
+ }
113
+ }
114
+ else if (normalizePath(entry.dest) === normalized) {
88
115
  return { match: 'dest', entry };
89
116
  }
90
117
  }
91
118
  return null;
92
119
  }
93
120
  /**
94
- * Compute the set of paths that should be treated as "deferred" during
95
- * source-time validation. These are paths from files config entries where
96
- * the file may not exist yet (build artifacts).
121
+ * Compute the structured sets of paths that should be treated as "deferred"
122
+ * during source-time validation. These are paths from files config entries
123
+ * where the file may not exist yet (build artifacts).
97
124
  *
98
- * Both source and dest paths are included because:
99
- * - source may be a build artifact that doesn't exist at validation time
100
- * - dest is the target location that won't exist until build time
125
+ * Both sets contain **project-root-relative, forward-slash** paths so they
126
+ * match the `rel` value computed in `checkDeferred()` inside walk-link-graph:
127
+ *
128
+ * ```ts
129
+ * const rel = toForwardSlash(safePath.relative(projectRoot, targetPath));
130
+ * ```
131
+ *
132
+ * - `dest` is authored relative to `skillDir` (mirroring `skill-packager.ts`
133
+ * `resolve(skillDir, entry.dest)`). We resolve it to an absolute path and
134
+ * then make it relative to `projectRoot`.
135
+ * - `source` is authored relative to `projectRoot`. We resolve it with the
136
+ * exact expression `skill-packager.ts` uses —
137
+ * `resolve(join(projectRoot, entry.source))` — so an absolute-looking source
138
+ * is rooted UNDER `projectRoot` identically to what the packager copies.
139
+ * (A bare `resolve(projectRoot, source)` would let a leading slash escape the
140
+ * root, yielding a `../`-prefixed path that never matches the walker's `rel`.)
141
+ * Resolving then re-relativising is a no-op for clean relative paths but
142
+ * correctly strips any leading `./`.
143
+ *
144
+ * - dest paths are always deferred (target won't exist until build)
145
+ * - source paths are deferred only when the target does not yet exist on disk
101
146
  */
102
- export function computeDeferredPaths(files) {
103
- const paths = new Set();
147
+ export function computeDeferredPaths(files, opts) {
148
+ const destPaths = new Set();
149
+ const sourcePaths = new Set();
104
150
  for (const entry of files) {
105
- paths.add(normalizePath(entry.source));
106
- paths.add(normalizePath(entry.dest));
151
+ // dest is authored relative to skillDir (skill-packager: resolve(skillDir, dest))
152
+ destPaths.add(toForwardSlash(safePath.relative(opts.projectRoot, safePath.resolve(opts.skillDir, entry.dest))));
153
+ // source is authored relative to projectRoot. For GLOB entries, register the
154
+ // static base (e.g. 'dist/packs' for 'dist/packs/**/*') so that prefix
155
+ // matching in checkDeferred() can defer links under the glob's expansion tree
156
+ // without executing the glob at validate time (late-bound, pattern-derived).
157
+ // For single-file entries, mirror skill-packager exactly:
158
+ // resolve(join(projectRoot, source)) so absolute-looking sources root under
159
+ // projectRoot rather than escaping it.
160
+ const effectiveSource = isGlob(entry.source) ? staticGlobBase(entry.source) : entry.source;
161
+ sourcePaths.add(toForwardSlash(safePath.relative(opts.projectRoot, safePath.resolve(safePath.join(opts.projectRoot, effectiveSource)))));
162
+ }
163
+ return { destPaths, sourcePaths };
164
+ }
165
+ /**
166
+ * Verify that each (absSource, absDest) pair has byte-identical content.
167
+ *
168
+ * Throws with a message naming the offending dest path on any mismatch or
169
+ * missing dest. Intended to be called after a copy operation to assert the
170
+ * copy was faithful. Exported so it can be tested directly without running a
171
+ * full applyFilesConfig round-trip.
172
+ */
173
+ export function verifyFilesIntegrity(pairs) {
174
+ for (const { absSource, absDest } of pairs) {
175
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- paths from validated config
176
+ if (!existsSync(absDest)) {
177
+ throw new Error(`files: integrity check failed — dest file missing: ${toForwardSlash(absDest)}`);
178
+ }
179
+ const srcHash = fileContentHash(absSource);
180
+ const dstHash = fileContentHash(absDest);
181
+ if (srcHash !== dstHash) {
182
+ throw new Error(`files: integrity check failed — content mismatch at dest: ${toForwardSlash(absDest)}`);
183
+ }
184
+ }
185
+ }
186
+ /**
187
+ * Verify that the on-disk contents of a glob entry's dest subtree EXACTLY match
188
+ * the set of rel paths the copy step intended to write — no missing, no extra.
189
+ *
190
+ * Why a SET comparison and not just `verifyFilesIntegrity`'s byte check:
191
+ * `verifyFilesIntegrity` hashes the (absSource, absDest) pairs that the SAME copy
192
+ * code computed. If the rebase/glob-mapping logic maps a match to the WRONG dest,
193
+ * that wrong dest rides along in the pair, so `hash(absSource) === hash(absDest)`
194
+ * still passes and the bug slips through. Enumerating the dest subtree and
195
+ * diffing against the expected rel set is what catches a misrouted rebase, a
196
+ * stale leftover, or a dropped file.
197
+ *
198
+ * SAFETY ASSUMPTION (why this can't false-positive): a glob entry OWNS its dest
199
+ * directory (`skillOutputDir/<entry.dest>`) and the build wipes the skill output
200
+ * dir before copying (skill-packager.ts removes `resolvedOutput` recursively
201
+ * before any copy). Nothing else writes into this subtree, so any EXTRA file is a
202
+ * genuine bug, not a co-tenant. This scoping is what makes the set check safe
203
+ * here even though a project-wide "no extra files" check would not be.
204
+ *
205
+ * @param destDir Absolute path to the glob entry's dest subtree.
206
+ * @param expectedRel Forward-slash rel paths (relative to `destDir`) the copy
207
+ * step wrote for THIS entry.
208
+ * @param source The entry's `source` (for error messages only).
209
+ * @throws if the actual subtree omits an expected file or contains an extra one.
210
+ */
211
+ export async function verifyDestSet(destDir, expectedRel, source) {
212
+ const actual = (await glob('**/*', { cwd: destDir, nodir: true }))
213
+ .map((m) => toForwardSlash(m))
214
+ .sort((a, b) => a.localeCompare(b));
215
+ const expected = [...expectedRel].sort((a, b) => a.localeCompare(b));
216
+ const expectedSet = new Set(expected);
217
+ const actualSet = new Set(actual);
218
+ for (const rel of actual) {
219
+ if (!expectedSet.has(rel)) {
220
+ throw new Error(`files: integrity check for '${source}' found unexpected file '${rel}' under dest '${toForwardSlash(destDir)}'`);
221
+ }
222
+ }
223
+ for (const rel of expected) {
224
+ if (!actualSet.has(rel)) {
225
+ throw new Error(`files: integrity check for '${source}' missing expected file '${rel}' under dest '${toForwardSlash(destDir)}'`);
226
+ }
227
+ }
228
+ }
229
+ /**
230
+ * Copy a single (non-glob) files entry into the skill output dir.
231
+ *
232
+ * Returns `[destPath]` (the single entry.dest string) on success.
233
+ * Throws on missing source or if source is a directory.
234
+ */
235
+ async function copyNonGlobEntry(entry, absoluteSource, skillOutputDir) {
236
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- source path from validated config
237
+ if (!existsSync(absoluteSource)) {
238
+ throw new Error(`files: source '${entry.source}' does not exist (resolved to ${absoluteSource}).`);
239
+ }
240
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- source path from validated config
241
+ if (statSync(absoluteSource).isDirectory()) {
242
+ throw new Error(`files: source '${entry.source}' is a directory; use a glob like '${entry.source}/**/*' to copy its contents.`);
243
+ }
244
+ const absoluteDest = safePath.join(skillOutputDir, entry.dest);
245
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- dest path from validated config
246
+ await mkdir(dirname(absoluteDest), { recursive: true });
247
+ await copyFile(absoluteSource, absoluteDest);
248
+ return { relDest: entry.dest, absSource: absoluteSource, absDest: absoluteDest };
249
+ }
250
+ /**
251
+ * Expand a glob entry, copy all matched files, and return copied rel-dest paths
252
+ * plus source/dest pairs for optional integrity verification.
253
+ */
254
+ async function copyGlobEntry(entry, projectRoot, skillOutputDir, bundledFileSet) {
255
+ const base = staticGlobBase(entry.source);
256
+ const remainder = globMagicRemainder(entry.source);
257
+ const absoluteBase = safePath.resolve(safePath.join(projectRoot, base));
258
+ const rawMatches = await glob(remainder, { cwd: absoluteBase, nodir: true });
259
+ const matches = rawMatches.map((m) => toForwardSlash(m)).sort((a, b) => a.localeCompare(b));
260
+ if (matches.length === 0) {
261
+ throw new Error(`files: source '${entry.source}' (glob) matched no files under ${absoluteBase} — has your build run?`);
262
+ }
263
+ const copied = [];
264
+ const pairs = [];
265
+ // rels are dest-subtree-relative (relative to skillOutputDir/<entry.dest>),
266
+ // which equals the matched `rel` for files actually copied — the expected set
267
+ // verifyDestSet diffs the on-disk subtree against.
268
+ const rels = [];
269
+ for (const rel of matches) {
270
+ const absSource = safePath.join(absoluteBase, rel);
271
+ if (bundledFileSet.has(toForwardSlash(absSource)))
272
+ continue;
273
+ const relDest = toForwardSlash(safePath.join(entry.dest, rel));
274
+ const absDest = safePath.join(skillOutputDir, entry.dest, rel);
275
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- dest path from validated config
276
+ await mkdir(dirname(absDest), { recursive: true });
277
+ await copyFile(absSource, absDest);
278
+ copied.push(relDest);
279
+ pairs.push({ absSource, absDest });
280
+ rels.push(toForwardSlash(rel));
281
+ }
282
+ return { copied, pairs, rels };
283
+ }
284
+ /**
285
+ * Copy each `files:` entry's `source` → `dest` into the skill output directory.
286
+ *
287
+ * This is the single copy primitive shared by every build path so that
288
+ * build-provided artifacts (a bundled engine, generated data, a catalog) are
289
+ * VAT-managed end-to-end: the shared-pool `vat skills build` packager and the
290
+ * Claude plugin marketplace build both call it, instead of the latter relying on
291
+ * an external inject script VAT can't see. `source` is resolved the same way the
292
+ * packager does (`resolve(join(projectRoot, source))`, so an absolute-looking
293
+ * source roots UNDER the project). Returns the dest paths actually copied.
294
+ *
295
+ * Glob entries (`source` containing `*`, `?`, or `[`) expand late-bound at
296
+ * copy time: all matched files are rebased under `dest` preserving their
297
+ * path relative to the glob's static base. Zero matches → error.
298
+ *
299
+ * When `integrity: true` is set on an entry, `verifyFilesIntegrity` is called
300
+ * after copying to assert byte-identical content. For GLOB entries it ALSO runs
301
+ * `verifyDestSet` to assert the dest subtree contains exactly the copied rels
302
+ * (no missing, no extra) — catching a misrouted rebase the byte check misses.
303
+ * Single-file entries get only the byte check (dest is a file, not a subtree).
304
+ *
305
+ * @throws if a declared `source` does not exist — a declared build artifact must
306
+ * be present at copy time (callers that defer existence validate it upstream).
307
+ */
308
+ export async function applyFilesConfig(opts) {
309
+ const bundledFileSet = new Set((opts.bundledFiles ?? []).map((f) => toForwardSlash(f)));
310
+ const copied = [];
311
+ for (const fileEntry of opts.filesConfig) {
312
+ if (isGlob(fileEntry.source)) {
313
+ const { copied: entryCopied, pairs, rels } = await copyGlobEntry(fileEntry, opts.projectRoot, opts.skillOutputDir, bundledFileSet);
314
+ if (fileEntry.integrity === true) {
315
+ verifyFilesIntegrity(pairs);
316
+ // Scoped set check: the glob entry owns its dest subtree and the build
317
+ // wiped the output dir first, so the on-disk subtree must equal exactly
318
+ // the rels we copied — catches a misrouted rebase the pair-hash misses.
319
+ await verifyDestSet(safePath.join(opts.skillOutputDir, fileEntry.dest), rels, fileEntry.source);
320
+ }
321
+ copied.push(...entryCopied);
322
+ }
323
+ else {
324
+ const absoluteSource = safePath.resolve(safePath.join(opts.projectRoot, fileEntry.source));
325
+ if (bundledFileSet.has(toForwardSlash(absoluteSource)))
326
+ continue;
327
+ const { relDest, absSource, absDest } = await copyNonGlobEntry(fileEntry, absoluteSource, opts.skillOutputDir);
328
+ if (fileEntry.integrity === true) {
329
+ verifyFilesIntegrity([{ absSource, absDest }]);
330
+ }
331
+ copied.push(relDest);
332
+ }
107
333
  }
108
- return paths;
334
+ return copied;
109
335
  }
110
336
  //# sourceMappingURL=files-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"files-config.js","sourceRoot":"","sources":["../src/files-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAY3D;;GAEG;AACH,SAAS,aAAa,CAAC,CAAS;IAC9B,IAAI,UAAU,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IACnC,IAAI,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAC9B,QAAsC,EACtC,QAAsC;IAEtC,wCAAwC;IACxC,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;QAClC,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;YAC7B,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC7C,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CACb,8CAA8C,KAAK,CAAC,IAAI,KAAK;oBAC7D,gEAAgE,CACjE,CAAC;YACJ,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IAED,IAAI,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;QAC3C,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;QACtB,OAAO,QAAQ,IAAI,EAAE,CAAC;IACxB,CAAC;I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9D,SAAS,EACT,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,cAAc,EACnB,cAAc,CACf,CAAC;YACF,IAAI,SAAS,CAAC,SAAS,KAAK,IAAI,EAAE,CAAC;gBACjC,oBAAoB,CAAC,KAAK,CAAC,CAAC;gBAC5B,uEAAuE;gBACvE,wEAAwE;gBACxE,wEAAwE;gBACxE,MAAM,aAAa,CACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,IAAI,CAAC,EAClD,IAAI,EACJ,SAAS,CAAC,MAAM,CACjB,CAAC;YACJ,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;YAC3F,IAAI,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;gBAAE,SAAS;YAEjE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,MAAM,gBAAgB,CAC5D,SAAS,EACT,cAAc,EACd,IAAI,CAAC,cAAc,CACpB,CAAC;YACF,IAAI,SAAS,CAAC,SAAS,KAAK,IAAI,EAAE,CAAC;gBACjC,oBAAoB,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;YACjD,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export { buildAgentSkill, type BuildOptions, type BuildResult } from './builder.
6
6
  export { extractH1Title, packageSkill, packageSkills, ZipSizeLimitError, type PackageSkillOptions, type PackageSkillResult, type PackagingTarget, type SkillBuildSpec, type SkillMetadata, } from './skill-packager.js';
7
7
  export { walkLinkGraph, type ExcludeRule, type LinkGraphResult, type LinkResolution, type WalkableRegistry, type WalkLinkGraphOptions, } from './walk-link-graph.js';
8
8
  export { getTargetSubdir, CONTENT_TYPE_ROUTING_MAP, type TargetSubdirCategory, } from './content-type-routing.js';
9
- export { mergeFilesConfig, matchLinkToFiles, computeDeferredPaths, type FilesMatchResult, } from './files-config.js';
9
+ export { applyFilesConfig, mergeFilesConfig, matchLinkToFiles, computeDeferredPaths, type ApplyFilesConfigOptions, type ComputeDeferredPathsOpts, type DeferredPaths, type FilesMatchResult, } from './files-config.js';
10
10
  export { AgentSkillFrontmatterJsonSchema, AgentSkillFrontmatterSchema, VATAgentSkillFrontmatterSchema, type AgentSkillFrontmatter, type VATAgentSkillFrontmatter, } from './schemas/agent-skill-frontmatter.js';
11
11
  export { MarketplaceManifestJsonSchema, MarketplaceManifestSchema, type MarketplaceManifest } from './schemas/marketplace-manifest.js';
12
12
  export { PluginJsonSchema, type PluginJson } from './schemas/plugin-json.js';
@@ -23,9 +23,13 @@ export { crawlAndResolveRegistry, validateSkillForPackaging, type ExcludedRefere
23
23
  export { createIssue, NAVIGATION_FILE_PATTERNS, VALIDATION_RULES, VALIDATION_THRESHOLDS, type RuleCategory, type ValidationRule, type ValidationRuleCode, } from './validators/validation-rules.js';
24
24
  export type { ValidationResult, ValidateOptions, ResourceFormat, Surface, } from './validators/types.js';
25
25
  export { importSkillToAgent, type ImportOptions, type ImportResult, } from './import.js';
26
+ export { cloneGitSource, type GitCloneResult } from './skill-source/git-clone.js';
27
+ export { resolveSkillSource, type ResolveSkillSourceOptions } from './skill-source/resolve-skill-source.js';
28
+ export type { SkillSource, ResolvedSkillSource, ResolveSkillSourceContext, } from './skill-source/types.js';
26
29
  export type { EvidenceRecord, EvidenceSource, EvidenceConfidence, EvidenceLocation, PatternDefinition, Observation, } from './evidence/index.js';
27
30
  export { PATTERN_REGISTRY, getPatternDefinition, assertPatternRegistered, deriveObservationsFromEvidence, } from './evidence/index.js';
28
31
  export type { DeriveObservationsOptions, DerivationSubject } from './evidence/index.js';
29
32
  export type { AnyInventory, BaseInventory, ComponentRef, DeclaredList, HookRef, InstallInventory, LspRef, MarketplaceInventory, McpRef, ParseError as InventoryParseError, PluginInventory, PluginRef, ResolvedReference, SkillInventory, } from './inventory/index.js';
30
33
  export { isInstallInventory, isMarketplaceInventory, isPluginInventory, isSkillInventory, serializeInventory, serializeInventoryShallow, INVENTORY_SCHEMA_VERSION, detectDeclaredButMissing, detectMarketplacePluginSourceMissing, detectPresentButUndeclared, detectReferenceTargetMissing, } from './inventory/index.js';
34
+ export * from './skill-test/index.js';
31
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAEpF,OAAO,EACL,cAAc,EACd,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,EAC3B,8BAA8B,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB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,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,oCAAoC,EACpC,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,sBAAsB,CAAC;AAE9B,cAAc,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ export { buildAgentSkill } from './builder.js';
6
6
  export { extractH1Title, packageSkill, packageSkills, ZipSizeLimitError, } from './skill-packager.js';
7
7
  export { walkLinkGraph, } from './walk-link-graph.js';
8
8
  export { getTargetSubdir, CONTENT_TYPE_ROUTING_MAP, } from './content-type-routing.js';
9
- export { mergeFilesConfig, matchLinkToFiles, computeDeferredPaths, } from './files-config.js';
9
+ export { applyFilesConfig, mergeFilesConfig, matchLinkToFiles, computeDeferredPaths, } from './files-config.js';
10
10
  export { AgentSkillFrontmatterJsonSchema, AgentSkillFrontmatterSchema, VATAgentSkillFrontmatterSchema, } from './schemas/agent-skill-frontmatter.js';
11
11
  export { MarketplaceManifestJsonSchema, MarketplaceManifestSchema } from './schemas/marketplace-manifest.js';
12
12
  export { PluginJsonSchema } from './schemas/plugin-json.js';
@@ -22,6 +22,11 @@ export { detectResourceFormat, enumerateSurfaces } from './validators/format-det
22
22
  export { crawlAndResolveRegistry, validateSkillForPackaging, } from './validators/packaging-validator.js';
23
23
  export { createIssue, NAVIGATION_FILE_PATTERNS, VALIDATION_RULES, VALIDATION_THRESHOLDS, } from './validators/validation-rules.js';
24
24
  export { importSkillToAgent, } from './import.js';
25
+ // Skill source primitives
26
+ export { cloneGitSource } from './skill-source/git-clone.js';
27
+ // Unified skill-source resolution (spec §11c)
28
+ export { resolveSkillSource } from './skill-source/resolve-skill-source.js';
25
29
  export { PATTERN_REGISTRY, getPatternDefinition, assertPatternRegistered, deriveObservationsFromEvidence, } from './evidence/index.js';
26
30
  export { isInstallInventory, isMarketplaceInventory, isPluginInventory, isSkillInventory, serializeInventory, serializeInventoryShallow, INVENTORY_SCHEMA_VERSION, detectDeclaredButMissing, detectMarketplacePluginSourceMissing, detectPresentButUndeclared, detectReferenceTargetMissing, } from './inventory/index.js';
31
+ export * from './skill-test/index.js';
27
32
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAuC,MAAM,cAAc,CAAC;AAEpF,OAAO,EACL,cAAc,EACd,YAAY,EACZ,aAAa,EACb,iBAAiB,GAMlB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,aAAa,GAMd,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,eAAe,EACf,wBAAwB,GAEzB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,GAErB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,EAC3B,8BAA8B,GAG/B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,6BAA6B,EAAE,yBAAyB,EAA4B,MAAM,mCAAmC,CAAC;AAEvI,OAAO,EAAE,gBAAgB,EAAmB,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EACL,gBAAgB,GAEjB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACpG,OAAO,EAAE,wBAAwB,EAAyB,MAAM,sCAAsC,CAAC;AACvG,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GAEnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,QAAQ,EAA+B,MAAM,mCAAmC,CAAC;AAC1F,OAAO,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type ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
8
8
  /**
9
- * Check that every file in the packaged output is referenced from some markdown file.
9
+ * Check that every file in the packaged output is referenced from some markdown or HTML file.
10
10
  *
11
11
  * Two-pass detection:
12
- * 1. Walk `[text](href)` link graph from SKILL.md (strict, transitive).
12
+ * 1. Walk formal link graph from SKILL.md (strict, transitive, covers .md and .html/.htm).
13
13
  * 2. For files not covered by pass 1, check whether their output-relative path
14
- * is mentioned anywhere in packaged markdown (code blocks, prose, etc.).
14
+ * is mentioned anywhere in packaged content files (markdown or HTML).
15
15
  * Authors often document CLI scripts via invocation examples rather than
16
- * markdown links, and that counts as documented.
16
+ * formal links, and that counts as documented.
17
17
  */
18
18
  export declare function checkUnreferencedFiles(outputDir: string): Promise<ValidationIssue[]>;
19
19
  /**
20
- * Check that every local file link in packaged markdown files resolves to a file
20
+ * Check that every local file link in packaged markdown and HTML files resolves to a file
21
21
  * that exists in the packaged output.
22
22
  */
23
23
  export declare function checkBrokenPackagedLinks(outputDir: string): Promise<ValidationIssue[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"post-build-checks.d.ts","sourceRoot":"","sources":["../src/post-build-checks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,kCAAkC,CAAC;AA4JvF;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CA4B1F;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CA6B5F"}
1
+ {"version":3,"file":"post-build-checks.d.ts","sourceRoot":"","sources":["../src/post-build-checks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,kCAAkC,CAAC;AA0OxE;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAmC1F;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAe5F"}