@vibe-agent-toolkit/agent-skills 0.1.41-rc.7 → 0.1.41

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 (104) hide show
  1. package/dist/content-type-routing.d.ts +18 -1
  2. package/dist/content-type-routing.d.ts.map +1 -1
  3. package/dist/content-type-routing.js +17 -0
  4. package/dist/content-type-routing.js.map +1 -1
  5. package/dist/evidence/build-evidence.d.ts +38 -0
  6. package/dist/evidence/build-evidence.d.ts.map +1 -0
  7. package/dist/evidence/build-evidence.js +60 -0
  8. package/dist/evidence/build-evidence.js.map +1 -0
  9. package/dist/evidence/index.d.ts +1 -0
  10. package/dist/evidence/index.d.ts.map +1 -1
  11. package/dist/evidence/index.js +1 -0
  12. package/dist/evidence/index.js.map +1 -1
  13. package/dist/files-config.d.ts +225 -31
  14. package/dist/files-config.d.ts.map +1 -1
  15. package/dist/files-config.js +445 -123
  16. package/dist/files-config.js.map +1 -1
  17. package/dist/index.d.ts +8 -6
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +10 -4
  20. package/dist/index.js.map +1 -1
  21. package/dist/post-build-checks.d.ts +10 -1
  22. package/dist/post-build-checks.d.ts.map +1 -1
  23. package/dist/post-build-checks.js +55 -6
  24. package/dist/post-build-checks.js.map +1 -1
  25. package/dist/schemas/index.d.ts +3 -2
  26. package/dist/schemas/index.d.ts.map +1 -1
  27. package/dist/schemas/index.js +2 -2
  28. package/dist/schemas/index.js.map +1 -1
  29. package/dist/schemas/installed-plugins-registry.d.ts +137 -63
  30. package/dist/schemas/installed-plugins-registry.d.ts.map +1 -1
  31. package/dist/schemas/installed-plugins-registry.js +94 -6
  32. package/dist/schemas/installed-plugins-registry.js.map +1 -1
  33. package/dist/schemas/known-marketplaces-registry.d.ts +165 -100
  34. package/dist/schemas/known-marketplaces-registry.d.ts.map +1 -1
  35. package/dist/schemas/known-marketplaces-registry.js +108 -21
  36. package/dist/schemas/known-marketplaces-registry.js.map +1 -1
  37. package/dist/schemas/registry-drift.d.ts +53 -0
  38. package/dist/schemas/registry-drift.d.ts.map +1 -0
  39. package/dist/schemas/registry-drift.js +50 -0
  40. package/dist/schemas/registry-drift.js.map +1 -0
  41. package/dist/skill-packager.d.ts +75 -5
  42. package/dist/skill-packager.d.ts.map +1 -1
  43. package/dist/skill-packager.js +304 -50
  44. package/dist/skill-packager.js.map +1 -1
  45. package/dist/skill-source/git-clone.d.ts.map +1 -1
  46. package/dist/skill-source/git-clone.js +32 -11
  47. package/dist/skill-source/git-clone.js.map +1 -1
  48. package/dist/skill-test/eval-inputs.js +2 -2
  49. package/dist/skill-test/eval-inputs.js.map +1 -1
  50. package/dist/skill-test/eval-lint.js +2 -2
  51. package/dist/skill-test/eval-lint.js.map +1 -1
  52. package/dist/skill-test/grader-prompt.js +2 -2
  53. package/dist/skill-test/grader-prompt.js.map +1 -1
  54. package/dist/test-input.d.ts +59 -24
  55. package/dist/test-input.d.ts.map +1 -1
  56. package/dist/test-input.js +77 -16
  57. package/dist/test-input.js.map +1 -1
  58. package/dist/validators/agent-instruction-presence.d.ts +41 -0
  59. package/dist/validators/agent-instruction-presence.d.ts.map +1 -0
  60. package/dist/validators/agent-instruction-presence.js +79 -0
  61. package/dist/validators/agent-instruction-presence.js.map +1 -0
  62. package/dist/validators/bundled-resource-link-detection.d.ts +20 -3
  63. package/dist/validators/bundled-resource-link-detection.d.ts.map +1 -1
  64. package/dist/validators/bundled-resource-link-detection.js +78 -34
  65. package/dist/validators/bundled-resource-link-detection.js.map +1 -1
  66. package/dist/validators/compat-detectors.d.ts +9 -4
  67. package/dist/validators/compat-detectors.d.ts.map +1 -1
  68. package/dist/validators/compat-detectors.js +18 -30
  69. package/dist/validators/compat-detectors.js.map +1 -1
  70. package/dist/validators/index.d.ts +1 -0
  71. package/dist/validators/index.d.ts.map +1 -1
  72. package/dist/validators/index.js +1 -0
  73. package/dist/validators/index.js.map +1 -1
  74. package/dist/validators/packaging-validator.d.ts +68 -10
  75. package/dist/validators/packaging-validator.d.ts.map +1 -1
  76. package/dist/validators/packaging-validator.js +51 -10
  77. package/dist/validators/packaging-validator.js.map +1 -1
  78. package/dist/validators/registry-validator.d.ts.map +1 -1
  79. package/dist/validators/registry-validator.js +28 -7
  80. package/dist/validators/registry-validator.js.map +1 -1
  81. package/dist/validators/rule-engine/rule-context.d.ts +4 -2
  82. package/dist/validators/rule-engine/rule-context.d.ts.map +1 -1
  83. package/dist/validators/rule-engine/rule-context.js.map +1 -1
  84. package/dist/validators/rule-engine/rule-engine.d.ts.map +1 -1
  85. package/dist/validators/rule-engine/rule-engine.js +15 -3
  86. package/dist/validators/rule-engine/rule-engine.js.map +1 -1
  87. package/dist/validators/skill-validator.d.ts.map +1 -1
  88. package/dist/validators/skill-validator.js +16 -10
  89. package/dist/validators/skill-validator.js.map +1 -1
  90. package/dist/validators/source-only-codes.d.ts.map +1 -1
  91. package/dist/validators/source-only-codes.js +1 -0
  92. package/dist/validators/source-only-codes.js.map +1 -1
  93. package/dist/validators/validation-rules.d.ts +135 -17
  94. package/dist/validators/validation-rules.d.ts.map +1 -1
  95. package/dist/validators/validation-rules.js +192 -38
  96. package/dist/validators/validation-rules.js.map +1 -1
  97. package/dist/validators/walker-to-issues.d.ts.map +1 -1
  98. package/dist/validators/walker-to-issues.js +20 -7
  99. package/dist/validators/walker-to-issues.js.map +1 -1
  100. package/dist/walk-link-graph.d.ts +10 -1
  101. package/dist/walk-link-graph.d.ts.map +1 -1
  102. package/dist/walk-link-graph.js +124 -39
  103. package/dist/walk-link-graph.js.map +1 -1
  104. package/package.json +5 -5
@@ -5,8 +5,25 @@
5
5
  * file extension. This is the single source of truth for extension→subdirectory
6
6
  * mapping, isolated so it can be replaced with config-driven routing later.
7
7
  */
8
+ /**
9
+ * Target subdirectory categories for packaged skill files.
10
+ *
11
+ * Runtime value, not just a type: every consumer that needs to enumerate the
12
+ * bundled-subdirectory vocabulary (e.g. the bundled-resource link detector)
13
+ * derives it from here so the two can never drift apart.
14
+ */
15
+ export declare const TARGET_SUBDIR_CATEGORIES: readonly ["resources", "scripts", "templates", "assets"];
8
16
  /** Target subdirectory categories for packaged skill files */
9
- export type TargetSubdirCategory = 'resources' | 'scripts' | 'templates' | 'assets';
17
+ export type TargetSubdirCategory = (typeof TARGET_SUBDIR_CATEGORIES)[number];
18
+ /**
19
+ * Subdirectory the `claude-web` packaging target packs every resource into.
20
+ *
21
+ * Target-specific layout name rather than a content-type routing category —
22
+ * claude-web ignores extension routing and flattens everything into
23
+ * `references/`. Consumers enumerating on-disk bundled subdirectories need
24
+ * this alongside {@link TARGET_SUBDIR_CATEGORIES}.
25
+ */
26
+ export declare const CLAUDE_WEB_REFERENCES_SUBDIR = "references";
10
27
  /** Read-only view of the extension→subdirectory map for inspection/testing */
11
28
  export declare const CONTENT_TYPE_ROUTING_MAP: ReadonlyMap<string, TargetSubdirCategory>;
12
29
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"content-type-routing.d.ts","sourceRoot":"","sources":["../src/content-type-routing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,8DAA8D;AAC9D,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AA4DpF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAAC,MAAM,EAAE,oBAAoB,CAAiB,CAAC;AAEjG;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,oBAAoB,CAStE"}
1
+ {"version":3,"file":"content-type-routing.d.ts","sourceRoot":"","sources":["../src/content-type-routing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,0DAA2D,CAAC;AAEjG,8DAA8D;AAC9D,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7E;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,eAAe,CAAC;AA4DzD,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAAC,MAAM,EAAE,oBAAoB,CAAiB,CAAC;AAEjG;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,oBAAoB,CAStE"}
@@ -6,6 +6,23 @@
6
6
  * mapping, isolated so it can be replaced with config-driven routing later.
7
7
  */
8
8
  import { extname } from 'node:path';
9
+ /**
10
+ * Target subdirectory categories for packaged skill files.
11
+ *
12
+ * Runtime value, not just a type: every consumer that needs to enumerate the
13
+ * bundled-subdirectory vocabulary (e.g. the bundled-resource link detector)
14
+ * derives it from here so the two can never drift apart.
15
+ */
16
+ export const TARGET_SUBDIR_CATEGORIES = ['resources', 'scripts', 'templates', 'assets'];
17
+ /**
18
+ * Subdirectory the `claude-web` packaging target packs every resource into.
19
+ *
20
+ * Target-specific layout name rather than a content-type routing category —
21
+ * claude-web ignores extension routing and flattens everything into
22
+ * `references/`. Consumers enumerating on-disk bundled subdirectories need
23
+ * this alongside {@link TARGET_SUBDIR_CATEGORIES}.
24
+ */
25
+ export const CLAUDE_WEB_REFERENCES_SUBDIR = 'references';
9
26
  /**
10
27
  * Static extension→subdirectory mapping.
11
28
  *
@@ -1 +1 @@
1
- {"version":3,"file":"content-type-routing.js","sourceRoot":"","sources":["../src/content-type-routing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC;;;;;GAKG;AACH,MAAM,aAAa,GAAG,IAAI,GAAG,CAA+B;IAC1D,uBAAuB;IACvB,CAAC,KAAK,EAAE,WAAW,CAAC;IAEpB,UAAU;IACV,CAAC,MAAM,EAAE,SAAS,CAAC;IACnB,CAAC,MAAM,EAAE,SAAS,CAAC;IACnB,CAAC,KAAK,EAAE,SAAS,CAAC;IAClB,CAAC,KAAK,EAAE,SAAS,CAAC;IAClB,CAA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AAC;IAClB,CAAC,MAAM,EAAE,QAAQ,CAAC;CACnB,CAAC,CAAC;AAEH,8EAA8E;AAC9E,MAAM,CAAC,MAAM,wBAAwB,GAA8C,aAAa,CAAC;AAEjG;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;IAE5C,kFAAkF;IAClF,IAAI,GAAG,KAAK,UAAU,EAAE,CAAC;QACvB,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,OAAO,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,WAAW,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The ONE construction site for an `EvidenceRecord`.
3
+ *
4
+ * Every evidence producer — the skill-level compat detectors and the
5
+ * plugin-level marketplace scanners alike — routes through {@link buildEvidence}
6
+ * so that an evidence `location` can only ever be a root-relative POSIX path.
7
+ * Two independent copies of this helper previously existed, each taking a
8
+ * pre-formed `filePath` and trusting it: one was handed absolute skill paths and
9
+ * leaked the developer's home directory into audit output, the other was handed
10
+ * plugin-relative paths and silently anchored them at a base the document never
11
+ * stated. Making the root a REQUIRED parameter and relativizing in here makes
12
+ * both shapes unrepresentable.
13
+ */
14
+ import type { EvidenceRecord } from './types.js';
15
+ /**
16
+ * Anchor a file path at `locationRoot`, the way {@link buildEvidence} anchors
17
+ * `location.file`.
18
+ *
19
+ * Exported for the one legitimate second use: a producer whose `matchText` names
20
+ * the file it found, which must be spelled identically to the location rather
21
+ * than leaking an absolute path into the rendered message. Do NOT reach for this
22
+ * to hand `buildEvidence` a pre-relativized path — pass the root and let it
23
+ * anchor.
24
+ */
25
+ export declare function anchorEvidencePath(filePath: string, locationRoot: string): string;
26
+ /**
27
+ * Build one evidence record, anchoring its `location.file` at `locationRoot`.
28
+ *
29
+ * @param patternId - Registered pattern ID; asserted against PATTERN_REGISTRY.
30
+ * @param filePath - The file the pattern was seen in. Absolute, or already
31
+ * relative to `locationRoot` — both resolve to the same anchored location.
32
+ * @param locationRoot - The ONE base this run states. Required: "relative to
33
+ * what?" has no safe default (see `issueLocation`).
34
+ * @param matchText - What the detector saw; truncated for display.
35
+ * @param line - 1-based line number, when the producer knows it.
36
+ */
37
+ export declare function buildEvidence(patternId: string, filePath: string, locationRoot: string, matchText: string, line?: number): EvidenceRecord;
38
+ //# sourceMappingURL=build-evidence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-evidence.d.ts","sourceRoot":"","sources":["../../src/evidence/build-evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAUjD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAIjF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,MAAM,GACZ,cAAc,CAWhB"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * The ONE construction site for an `EvidenceRecord`.
3
+ *
4
+ * Every evidence producer — the skill-level compat detectors and the
5
+ * plugin-level marketplace scanners alike — routes through {@link buildEvidence}
6
+ * so that an evidence `location` can only ever be a root-relative POSIX path.
7
+ * Two independent copies of this helper previously existed, each taking a
8
+ * pre-formed `filePath` and trusting it: one was handed absolute skill paths and
9
+ * leaked the developer's home directory into audit output, the other was handed
10
+ * plugin-relative paths and silently anchored them at a base the document never
11
+ * stated. Making the root a REQUIRED parameter and relativizing in here makes
12
+ * both shapes unrepresentable.
13
+ */
14
+ import { issueLocation, safePath } from '@vibe-agent-toolkit/utils';
15
+ import { assertPatternRegistered, getPatternDefinition } from './pattern-registry.js';
16
+ const SNIPPET_MAX = 120;
17
+ /** Truncate a matched fragment to a display-safe length. */
18
+ function snippet(s) {
19
+ const trimmed = s.trim();
20
+ return trimmed.length <= SNIPPET_MAX ? trimmed : `${trimmed.slice(0, SNIPPET_MAX - 1)}…`;
21
+ }
22
+ /**
23
+ * Anchor a file path at `locationRoot`, the way {@link buildEvidence} anchors
24
+ * `location.file`.
25
+ *
26
+ * Exported for the one legitimate second use: a producer whose `matchText` names
27
+ * the file it found, which must be spelled identically to the location rather
28
+ * than leaking an absolute path into the rendered message. Do NOT reach for this
29
+ * to hand `buildEvidence` a pre-relativized path — pass the root and let it
30
+ * anchor.
31
+ */
32
+ export function anchorEvidencePath(filePath, locationRoot) {
33
+ // resolve() first so an already-relative filePath round-trips unchanged and an
34
+ // absolute one is re-based, rather than each caller guessing which it holds.
35
+ return issueLocation(safePath.resolve(locationRoot, filePath), locationRoot);
36
+ }
37
+ /**
38
+ * Build one evidence record, anchoring its `location.file` at `locationRoot`.
39
+ *
40
+ * @param patternId - Registered pattern ID; asserted against PATTERN_REGISTRY.
41
+ * @param filePath - The file the pattern was seen in. Absolute, or already
42
+ * relative to `locationRoot` — both resolve to the same anchored location.
43
+ * @param locationRoot - The ONE base this run states. Required: "relative to
44
+ * what?" has no safe default (see `issueLocation`).
45
+ * @param matchText - What the detector saw; truncated for display.
46
+ * @param line - 1-based line number, when the producer knows it.
47
+ */
48
+ export function buildEvidence(patternId, filePath, locationRoot, matchText, line) {
49
+ assertPatternRegistered(patternId);
50
+ const def = getPatternDefinition(patternId);
51
+ const file = anchorEvidencePath(filePath, locationRoot);
52
+ return {
53
+ source: 'code',
54
+ patternId,
55
+ location: line === undefined ? { file } : { file, line },
56
+ matchText: snippet(matchText),
57
+ confidence: def?.confidence ?? 'medium',
58
+ };
59
+ }
60
+ //# sourceMappingURL=build-evidence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-evidence.js","sourceRoot":"","sources":["../../src/evidence/build-evidence.ts"],"names":[],"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CAAC;AACJ,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export type { EvidenceRecord, EvidenceSource, EvidenceConfidence, EvidenceLocation, PatternDefinition, Observation, } from './types.js';
2
2
  export { PATTERN_REGISTRY, getPatternDefinition, assertPatternRegistered, } from './pattern-registry.js';
3
+ export { anchorEvidencePath, buildEvidence } from './build-evidence.js';
3
4
  export { deriveObservationsFromEvidence, EXTERNAL_CLI_BINARIES, type DeriveObservationsOptions, type DerivationSubject, } from './derive-observations.js';
4
5
  export { detectInterpreter, extractMcpCommandFromMatchText, } from './interpreter-detection.js';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/evidence/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,8BAA8B,GAC/B,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/evidence/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,8BAA8B,GAC/B,MAAM,4BAA4B,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export { PATTERN_REGISTRY, getPatternDefinition, assertPatternRegistered, } from './pattern-registry.js';
2
+ export { anchorEvidencePath, buildEvidence } from './build-evidence.js';
2
3
  export { deriveObservationsFromEvidence, EXTERNAL_CLI_BINARIES, } from './derive-observations.js';
3
4
  export { detectInterpreter, extractMcpCommandFromMatchText, } from './interpreter-detection.js';
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/evidence/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,GAGtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,8BAA8B,GAC/B,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/evidence/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,GAGtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,8BAA8B,GAC/B,MAAM,4BAA4B,CAAC"}
@@ -7,16 +7,78 @@
7
7
  * - Computing deferred paths for validation
8
8
  * - Copying declared build artifacts into a skill output dir (every build path)
9
9
  */
10
+ import { type ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
10
11
  import type { SkillFileEntry } from '@vibe-agent-toolkit/resources';
11
12
  export type { SkillFileEntry } from '@vibe-agent-toolkit/resources';
12
- export declare function buildArtifactHint(source: string): string;
13
- /** Result of matching a link target against files config */
14
- export interface FilesMatchResult {
15
- /** Whether the link matched source or dest */
16
- match: 'source' | 'dest';
17
- /** The matching files entry */
18
- entry: SkillFileEntry;
13
+ /** One file a GLOB `files:` entry matched and the never-package list refused. */
14
+ export interface DroppedGlobMatch {
15
+ /** The glob `source:` whose net caught it. */
16
+ source: string;
17
+ /**
18
+ * ABSOLUTE path of the refused file, forward-slashed.
19
+ *
20
+ * The reported subject: this is the one path in this record a reader can
21
+ * actually open. `dest` names a path that, by definition, does NOT exist —
22
+ * nothing was written there — so a finding anchored at the dest cannot be
23
+ * traced back to anything. Kept absolute rather than pre-relativized because
24
+ * the run's anchor is the caller's to choose (`locationRoot` may not be the
25
+ * project root when one run spans several projects); every emitter passes it
26
+ * through {@link issueLocation} at emit time.
27
+ */
28
+ absFile: string;
29
+ /**
30
+ * Skill-output-relative dest the file WOULD have had, spelled exactly as a
31
+ * COPIED dest is (see {@link normalizeRelPath}) so consumers can compare the
32
+ * two populations without re-deriving either. `checkBrokenPackagedLinks` keys
33
+ * its never-package remediation on this exact set: a link is "broken because
34
+ * VAT refused to package it" only when its target is one of THESE paths.
35
+ *
36
+ * A SET KEY, not a location: it is the coordinate system the packaged link
37
+ * graph is expressed in, and mixing it into an issue's `location` — which is
38
+ * always a source path to open — is what made one issue list speak two
39
+ * coordinate systems at once.
40
+ */
41
+ dest: string;
42
+ }
43
+ /** What {@link applyFilesConfig} accounted for, and what it deliberately did not. */
44
+ export interface AppliedFilesConfig {
45
+ /**
46
+ * Every skill-output-relative dest this config accounts for, one per FILE
47
+ * (glob entries expanded). See {@link applyFilesConfig} for why the orphan
48
+ * check must be told this list.
49
+ */
50
+ dests: string[];
51
+ /**
52
+ * Files a GLOB matched that the never-package list dropped.
53
+ *
54
+ * Returned rather than written to a `warn` sink because a file vanishing from
55
+ * a bundle is a build FINDING, not a log line: it has to reach the structured
56
+ * report (`issueCounts`), or a CI consumer reads `warnings: 0` for a build
57
+ * that silently shipped less than the config asked for.
58
+ */
59
+ dropped: DroppedGlobMatch[];
19
60
  }
61
+ /**
62
+ * Turn never-package drops into reportable findings.
63
+ *
64
+ * Lives here rather than in the packager because this module owns the concept:
65
+ * the drop and the issue describing it must not be able to disagree.
66
+ *
67
+ * Anchored at the SOURCE file, in ONE coordinate system for both the location
68
+ * and the message. The finding used to name the would-be `dest` in both, which
69
+ * meant the only path it gave you was an output path nothing was ever written to
70
+ * — so the issue list mixed output coordinates (this code) with source
71
+ * coordinates (every other pre-build code) and an adopter could not open the
72
+ * thing that went missing. The glob pattern stays in the message because it
73
+ * answers the second question ("which entry caught this?"), but it is no longer
74
+ * the only identifiable thing in the finding.
75
+ *
76
+ * @param locationRoot The ONE base this run anchors locations at. Required, not
77
+ * defaulted to the project root: a defaulted anchor is how a multi-project run
78
+ * silently emits paths relative to the wrong tree.
79
+ */
80
+ export declare function droppedGlobMatchesToIssues(dropped: readonly DroppedGlobMatch[], locationRoot: string): ValidationIssue[];
81
+ export declare function buildArtifactHint(source: string): string;
20
82
  /**
21
83
  * Normalize a relative path for comparison: forward slashes, no leading `./`.
22
84
  * The path's ROOT is the caller's business; this only fixes the spelling.
@@ -29,6 +91,27 @@ export interface FilesMatchResult {
29
91
  * `files:` config" about a copy VAT performed itself.
30
92
  */
31
93
  export declare function normalizeRelPath(p: string): string;
94
+ /**
95
+ * The skill-output-relative dest a GLOB `files:` entry gives one absolute source
96
+ * path, or `undefined` when the entry's expansion would not include it.
97
+ *
98
+ * Answers, without running the glob, the question the packager must settle BEFORE
99
+ * anything is copied: "does the config already declare where this file goes?" A
100
+ * glob's expansion is late-bound to copy time ({@link copyGlobEntry}), so the path
101
+ * map used to have no entry for its matches — and a match that link traversal ALSO
102
+ * found was therefore dropped at its type-derived location while the glob copied
103
+ * it to the declared dest. Identical bytes shipped twice, the rewritten link
104
+ * pointed at traversal's copy, and the declared `dest:` was dead. One file, one
105
+ * dest: the declaration wins, and this is how the path map learns it.
106
+ *
107
+ * The three gates below are exactly {@link copyGlobEntry}'s own, restated as a
108
+ * predicate so the dest computed here is the dest the copy actually writes:
109
+ * under the static base, matching the magic remainder (`dot: true`, as the copy
110
+ * expands), and not refused by {@link partitionNeverPackaged}. A never-packaged
111
+ * match has NO dest — re-pointing the path map at one would rewrite a link to a
112
+ * file that never arrives.
113
+ */
114
+ export declare function globEntryDest(entry: SkillFileEntry, projectRoot: string, absSource: string): string | undefined;
32
115
  /**
33
116
  * Merge defaults and per-skill files entries.
34
117
  *
@@ -39,22 +122,22 @@ export declare function normalizeRelPath(p: string): string;
39
122
  */
40
123
  export declare function mergeFilesConfig(defaults: SkillFileEntry[] | undefined, perSkill: SkillFileEntry[] | undefined): SkillFileEntry[];
41
124
  /**
42
- * Match a link target path against files config entries.
43
- *
44
- * Returns the matching entry and whether it matched on source or dest.
45
- * Source matches take priority over dest matches.
125
+ * The skill-output-relative dests named by EXPLICIT (non-glob) `files:` entries.
46
126
  *
47
- * For GLOB entries (`isGlob(entry.source)`), matching is by directory prefix:
48
- * - source match: link is equal to or under the glob's static base
49
- * - dest match: link is equal to or under entry.dest
127
+ * THE definition of "the config declared this output path", shared by every lane
128
+ * that has to decide whether a file in a bundle is there on purpose. Naming a
129
+ * `source`/`dest` pair is an unambiguous instruction to ship that file; a GLOB
130
+ * never named the file it caught, so its expansion is deliberately absent from
131
+ * this list — a net is not a declaration. (`walk-link-graph.ts`'s
132
+ * `refusesAgentInstructionFile` draws the same line on the link side, and
133
+ * {@link partitionNeverPackaged} on the copy side; all three must agree or the
134
+ * mechanisms disagree about one bundle.)
50
135
  *
51
- * Single-file entries still match EXACTLY (unchanged).
52
- *
53
- * @param linkTarget - Resolved link target path (relative to project root)
54
- * @param files - Merged files config entries
55
- * @returns Match result or null if no match
136
+ * Spelled via {@link normalizeRelPath}, which is the spelling a packaged file's
137
+ * output-relative path is computed with — so membership can be tested by exact
138
+ * equality, never by a prefix test.
56
139
  */
57
- export declare function matchLinkToFiles(linkTarget: string, files: SkillFileEntry[]): FilesMatchResult | null;
140
+ export declare function explicitFilesConfigDests(files: readonly SkillFileEntry[]): string[];
58
141
  /** Options for {@link applyFilesConfig}. */
59
142
  export interface ApplyFilesConfigOptions {
60
143
  /** Merged `files:` entries to copy. */
@@ -64,8 +147,12 @@ export interface ApplyFilesConfigOptions {
64
147
  /** Absolute skill output dir; each `dest` resolves relative to it. */
65
148
  skillOutputDir: string;
66
149
  /**
67
- * Absolute source paths already materialized by link traversal — skipped so
68
- * a linked-and-copied asset isn't copied twice. Defaults to none (copy all).
150
+ * Absolute source paths already materialized by link traversal.
151
+ *
152
+ * Used only by NON-GLOB entries, where the packager's path map guarantees the
153
+ * bundled copy already sits at `entry.dest`, so re-copying is pure duplication.
154
+ * Glob entries carry no such guarantee and copy unconditionally — see
155
+ * {@link copyGlobEntry}. Defaults to none (copy all).
69
156
  */
70
157
  bundledFiles?: string[];
71
158
  }
@@ -93,19 +180,126 @@ export declare function verifyFilesIntegrity(pairs: {
93
180
  * diffing against the expected rel set is what catches a misrouted rebase, a
94
181
  * stale leftover, or a dropped file.
95
182
  *
96
- * SAFETY ASSUMPTION (why this can't false-positive): a glob entry OWNS its dest
97
- * directory (`skillOutputDir/<entry.dest>`) and the build wipes the skill output
98
- * dir before copying (skill-packager.ts removes `resolvedOutput` recursively
99
- * before any copy). Nothing else writes into this subtree, so any EXTRA file is a
100
- * genuine bug, not a co-tenant. This scoping is what makes the set check safe
101
- * here even though a project-wide "no extra files" check would not be.
183
+ * SAFETY ASSUMPTION (why this can't false-positive): a glob entry does NOT own
184
+ * its dest directory outright — another `files:` entry may legitimately declare a
185
+ * dest inside the same subtree, and that is exactly how the documented escape
186
+ * hatch works (an explicit `source: extras/README.md` re-ships a file the glob
187
+ * refused). So `expectedRel` is the union of what THIS entry copied and every
188
+ * other entry's declared dest under the same subtree, and the caller runs this
189
+ * only after ALL entries have copied — see {@link applyFilesConfig}. What is left
190
+ * over is a file no entry accounts for: a genuine bug, not a co-tenant. (The build
191
+ * wipes the skill output dir before copying — skill-packager.ts removes
192
+ * `resolvedOutput` recursively — so there are no stale files either.)
102
193
  *
103
194
  * @param destDir Absolute path to the glob entry's dest subtree.
104
- * @param expectedRel Forward-slash rel paths (relative to `destDir`) the copy
105
- * step wrote for THIS entry.
195
+ * @param expectedRel Forward-slash rel paths (relative to `destDir`) that the
196
+ * whole `files:` config accounts for inside this subtree.
106
197
  * @param source The entry's `source` (for error messages only).
107
198
  * @throws if the actual subtree omits an expected file or contains an extra one.
108
199
  */
109
200
  export declare function verifyDestSet(destDir: string, expectedRel: string[], source: string): Promise<void>;
110
- export declare function applyFilesConfig(opts: ApplyFilesConfigOptions): Promise<string[]>;
201
+ /** One GLOB `files:` entry that currently expands to nothing at all. */
202
+ export interface UnmatchedGlobEntry {
203
+ /** The glob `source:` that matched no files. */
204
+ source: string;
205
+ /**
206
+ * ABSOLUTE path of the directory it expanded under (the glob's static base),
207
+ * forward-slashed. Absolute for the same reason as
208
+ * {@link DroppedGlobMatch.absFile}: the run's anchor is the emitter's choice.
209
+ * The directory need not exist — "it isn't there yet" is the common case.
210
+ */
211
+ absBase: string;
212
+ }
213
+ /** One GLOB `files:` entry whose every match the never-package list refused. */
214
+ export interface AllRefusedGlobEntry {
215
+ /** The glob `source:` that netted only never-packaged files. */
216
+ source: string;
217
+ /** ABSOLUTE path of the directory it expanded under, forward-slashed. */
218
+ absBase: string;
219
+ /**
220
+ * ABSOLUTE paths of every match, all of them refused. Carried in full because
221
+ * this finding SUPERSEDES the per-file drops for its entry (see
222
+ * {@link collectPreBuildGlobFindings}), so it is the only place those file
223
+ * names are still reported.
224
+ */
225
+ absRefused: string[];
226
+ }
227
+ /**
228
+ * What the project's GLOB `files:` entries look like BEFORE anything is built.
229
+ *
230
+ * The three buckets are MUTUALLY EXCLUSIVE per entry, and they are three of the
231
+ * FOUR verdicts `copyGlobEntry` reaches at copy time — one entry cannot be both
232
+ * "matched nothing" and "matched only refused files", and an entry counted in
233
+ * `allRefused` contributes no `dropped` rows. Overlapping buckets would let one
234
+ * config produce two findings naming two different causes.
235
+ *
236
+ * The fourth verdict has NO bucket: a `..` segment in the glob's magic remainder
237
+ * makes the pattern unexpandable, `expandGlobEntry` throws, and
238
+ * {@link collectPreBuildGlobFindings} skips the entry rather than mislabelling it.
239
+ * So a config certain to fail the build produces no pre-build finding at all —
240
+ * see the skip in that function for why nothing here can honestly carry it.
241
+ */
242
+ export interface PreBuildGlobFindings {
243
+ /**
244
+ * Never-packaged files a glob would catch while still shipping something else.
245
+ * See {@link DroppedGlobMatch}.
246
+ */
247
+ dropped: DroppedGlobMatch[];
248
+ /** Globs that matched, but whose every match was refused — they ship nothing. */
249
+ allRefused: AllRefusedGlobEntry[];
250
+ /** Globs that currently match nothing — the other input the build dies on. */
251
+ unmatched: UnmatchedGlobEntry[];
252
+ }
253
+ /**
254
+ * What the project's GLOB `files:` entries would do, without copying anything.
255
+ *
256
+ * The pre-build half of {@link applyFilesConfig}: `vat skills validate` and
257
+ * `vat audit` can answer "what will this config fail to ship?" before a build
258
+ * exists, and they answer it by running THE expansion the copy runs
259
+ * ({@link expandGlobEntry}) — a second, independently written expansion would be
260
+ * free to disagree with the copy about what ships, which is the whole defect class
261
+ * this module exists to close.
262
+ *
263
+ * Non-throwing by construction, unlike {@link copyGlobEntry}: a pre-build gate runs
264
+ * before the artifact exists, so a glob over an unbuilt `dist/` matching nothing is
265
+ * the expected state, not a failure. `copyGlobEntry` still raises there, where the
266
+ * build HAS run and zero matches is real.
267
+ *
268
+ * That reasoning settles the SEVERITY of a failing expansion, not whether to
269
+ * mention it — and this used to return only `dropped`, so the gate reported the
270
+ * drop that is harmless by design (a glob is a net) and said nothing about either
271
+ * expansion outcome that is certain to fail the very next command. `unmatched`
272
+ * and `allRefused` end that silence, graded `info` and `warning` respectively (see
273
+ * FILES_GLOB_MATCHED_NOTHING / FILES_GLOB_MATCHED_ONLY_NEVER_PACKAGED).
274
+ *
275
+ * The three buckets partition the entries as two of `copyGlobEntry`'s three throws
276
+ * plus its success path do — same predicates, same order, one expansion. Its THIRD
277
+ * throw (`expandGlobEntry` refusing a `..` segment in the magic remainder) has no
278
+ * bucket, and the skip below explains why — but the consequence belongs here: this
279
+ * function's answer to "what will this config fail to ship?" is silent for that one
280
+ * malformed shape, which is the same class of silence `unmatched`/`allRefused` were
281
+ * added to end. Closing it needs a code of its own (a wrong-shaped PATTERN, not an
282
+ * unbuilt or unshippable artifact), or a `source` refine on `SkillFileEntrySchema`
283
+ * that rejects the pattern at config load and makes the skip unreachable.
284
+ *
285
+ * Drops re-shipped by an explicit entry are filtered out for the same reason
286
+ * {@link applyFilesConfig} filters them: reporting "it did not ship" about a file
287
+ * the documented escape hatch puts in the bundle tells an author their remediation
288
+ * failed when it worked. That filter is deliberately NOT applied to `allRefused`:
289
+ * `copyGlobEntry` throws on an entry whose own kept-set is empty no matter what
290
+ * any other entry ships, so filtering it would predict a green build that fails.
291
+ */
292
+ export declare function collectPreBuildGlobFindings(filesConfig: readonly SkillFileEntry[], projectRoot: string): Promise<PreBuildGlobFindings>;
293
+ /**
294
+ * Turn {@link collectPreBuildGlobFindings} into reportable pre-build issues.
295
+ *
296
+ * THE emitter for the pre-build gates, so a lane cannot pick up one half of the
297
+ * findings and quietly drop the other — which is how the zero-match went
298
+ * unreported for as long as it did.
299
+ *
300
+ * @param locationRoot The ONE base this run anchors locations at (see
301
+ * {@link droppedGlobMatchesToIssues}).
302
+ */
303
+ export declare function preBuildGlobFindingsToIssues(findings: PreBuildGlobFindings, locationRoot: string): ValidationIssue[];
304
+ export declare function applyFilesConfig(opts: ApplyFilesConfigOptions): Promise<AppliedFilesConfig>;
111
305
  //# 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;;;;;;;;GAQG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAA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