@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.
- package/README.md +5 -5
- package/dist/builder.d.ts.map +1 -1
- package/dist/builder.js +7 -17
- package/dist/builder.js.map +1 -1
- package/dist/content-type-routing.d.ts +32 -0
- package/dist/content-type-routing.d.ts.map +1 -1
- package/dist/content-type-routing.js +23 -0
- package/dist/content-type-routing.js.map +1 -1
- package/dist/files-config.d.ts +34 -1
- package/dist/files-config.d.ts.map +1 -1
- package/dist/files-config.js +277 -39
- package/dist/files-config.js.map +1 -1
- package/dist/fs-attribution.d.ts +45 -0
- package/dist/fs-attribution.d.ts.map +1 -0
- package/dist/fs-attribution.js +57 -0
- package/dist/fs-attribution.js.map +1 -0
- package/dist/import.d.ts.map +1 -1
- package/dist/import.js +0 -4
- package/dist/import.js.map +1 -1
- package/dist/index.d.ts +13 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -7
- package/dist/index.js.map +1 -1
- package/dist/inventory/detectors/declared-but-missing.d.ts +1 -1
- package/dist/inventory/detectors/declared-but-missing.d.ts.map +1 -1
- package/dist/inventory/detectors/marketplace-source-missing.d.ts +1 -1
- package/dist/inventory/detectors/marketplace-source-missing.d.ts.map +1 -1
- package/dist/inventory/detectors/present-but-undeclared.d.ts +1 -1
- package/dist/inventory/detectors/present-but-undeclared.d.ts.map +1 -1
- package/dist/inventory/detectors/reference-target-missing.d.ts +1 -1
- package/dist/inventory/detectors/reference-target-missing.d.ts.map +1 -1
- package/dist/inventory/index.d.ts +1 -1
- package/dist/inventory/index.d.ts.map +1 -1
- package/dist/inventory/index.js +1 -1
- package/dist/inventory/index.js.map +1 -1
- package/dist/inventory/serialize.d.ts +4 -4
- package/dist/inventory/serialize.d.ts.map +1 -1
- package/dist/inventory/serialize.js +6 -6
- package/dist/inventory/serialize.js.map +1 -1
- package/dist/inventory/types.d.ts +8 -0
- package/dist/inventory/types.d.ts.map +1 -1
- package/dist/inventory/types.js.map +1 -1
- package/dist/link-graph-members.d.ts +18 -0
- package/dist/link-graph-members.d.ts.map +1 -0
- package/dist/link-graph-members.js +18 -0
- package/dist/link-graph-members.js.map +1 -0
- package/dist/parsers/frontmatter-parser.d.ts.map +1 -1
- package/dist/parsers/frontmatter-parser.js +30 -6
- package/dist/parsers/frontmatter-parser.js.map +1 -1
- package/dist/plugin-distribution-layout.d.ts +70 -6
- package/dist/plugin-distribution-layout.d.ts.map +1 -1
- package/dist/plugin-distribution-layout.js +84 -11
- package/dist/plugin-distribution-layout.js.map +1 -1
- package/dist/post-build-checks.d.ts +38 -1
- package/dist/post-build-checks.d.ts.map +1 -1
- package/dist/post-build-checks.js +68 -17
- package/dist/post-build-checks.js.map +1 -1
- package/dist/projection/skill-extent.d.ts +247 -0
- package/dist/projection/skill-extent.d.ts.map +1 -0
- package/dist/projection/skill-extent.js +560 -0
- package/dist/projection/skill-extent.js.map +1 -0
- package/dist/schemas/agent-skill-frontmatter.js +1 -1
- package/dist/schemas/agent-skill-frontmatter.js.map +1 -1
- package/dist/schemas/allowed-tools.d.ts +31 -0
- package/dist/schemas/allowed-tools.d.ts.map +1 -0
- package/dist/schemas/allowed-tools.js +88 -0
- package/dist/schemas/allowed-tools.js.map +1 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/installed-plugins-registry.d.ts.map +1 -1
- package/dist/schemas/installed-plugins-registry.js +7 -1
- package/dist/schemas/installed-plugins-registry.js.map +1 -1
- package/dist/schemas/marketplace-manifest.d.ts.map +1 -1
- package/dist/schemas/marketplace-manifest.js +17 -6
- package/dist/schemas/marketplace-manifest.js.map +1 -1
- package/dist/skill-identity.d.ts +18 -3
- package/dist/skill-identity.d.ts.map +1 -1
- package/dist/skill-identity.js +25 -6
- package/dist/skill-identity.js.map +1 -1
- package/dist/skill-packager.d.ts +144 -20
- package/dist/skill-packager.d.ts.map +1 -1
- package/dist/skill-packager.js +447 -105
- package/dist/skill-packager.js.map +1 -1
- package/dist/skill-source/content-hash.d.ts.map +1 -1
- package/dist/skill-source/content-hash.js +21 -10
- package/dist/skill-source/content-hash.js.map +1 -1
- package/dist/skill-source/fetch-cache.d.ts.map +1 -1
- package/dist/skill-source/fetch-cache.js +0 -5
- package/dist/skill-source/fetch-cache.js.map +1 -1
- package/dist/skill-source/git-clone.d.ts +1 -1
- package/dist/skill-source/git-clone.d.ts.map +1 -1
- package/dist/skill-source/git-clone.js +10 -10
- package/dist/skill-source/git-clone.js.map +1 -1
- package/dist/skill-source/sources/url-source.d.ts.map +1 -1
- package/dist/skill-source/sources/url-source.js +2 -2
- package/dist/skill-source/sources/url-source.js.map +1 -1
- package/dist/skill-source/stage.d.ts.map +1 -1
- package/dist/skill-source/stage.js +0 -6
- package/dist/skill-source/stage.js.map +1 -1
- package/dist/skill-test/baseline-delta.d.ts +1575 -0
- package/dist/skill-test/baseline-delta.d.ts.map +1 -0
- package/dist/skill-test/baseline-delta.js +272 -0
- package/dist/skill-test/baseline-delta.js.map +1 -0
- package/dist/skill-test/baseline-integrity.d.ts +944 -0
- package/dist/skill-test/baseline-integrity.d.ts.map +1 -0
- package/dist/skill-test/baseline-integrity.js +3090 -0
- package/dist/skill-test/baseline-integrity.js.map +1 -0
- package/dist/skill-test/build-hook.d.ts +3 -2
- package/dist/skill-test/build-hook.d.ts.map +1 -1
- package/dist/skill-test/build-hook.js +4 -5
- package/dist/skill-test/build-hook.js.map +1 -1
- package/dist/skill-test/configure-writer.js +1 -1
- package/dist/skill-test/configure-writer.js.map +1 -1
- package/dist/skill-test/declared-env.d.ts +5 -4
- package/dist/skill-test/declared-env.d.ts.map +1 -1
- package/dist/skill-test/declared-env.js +8 -9
- package/dist/skill-test/declared-env.js.map +1 -1
- package/dist/skill-test/eval-executor.d.ts +21 -5
- package/dist/skill-test/eval-executor.d.ts.map +1 -1
- package/dist/skill-test/eval-executor.js +6 -6
- package/dist/skill-test/eval-executor.js.map +1 -1
- package/dist/skill-test/eval-fragment.d.ts +106 -28
- package/dist/skill-test/eval-fragment.d.ts.map +1 -1
- package/dist/skill-test/eval-fragment.js +78 -16
- package/dist/skill-test/eval-fragment.js.map +1 -1
- package/dist/skill-test/eval-grader.d.ts +65 -7
- package/dist/skill-test/eval-grader.d.ts.map +1 -1
- package/dist/skill-test/eval-grader.js +263 -64
- package/dist/skill-test/eval-grader.js.map +1 -1
- package/dist/skill-test/eval-inputs.d.ts +110 -8
- package/dist/skill-test/eval-inputs.d.ts.map +1 -1
- package/dist/skill-test/eval-inputs.js +177 -22
- package/dist/skill-test/eval-inputs.js.map +1 -1
- package/dist/skill-test/eval-lint.d.ts +17 -4
- package/dist/skill-test/eval-lint.d.ts.map +1 -1
- package/dist/skill-test/eval-lint.js +22 -9
- package/dist/skill-test/eval-lint.js.map +1 -1
- package/dist/skill-test/eval-suite-isolation.d.ts.map +1 -1
- package/dist/skill-test/eval-suite-isolation.js +8 -5
- package/dist/skill-test/eval-suite-isolation.js.map +1 -1
- package/dist/skill-test/evals-template.d.ts +1 -1
- package/dist/skill-test/evals-template.d.ts.map +1 -1
- package/dist/skill-test/evals-template.js +1 -3
- package/dist/skill-test/evals-template.js.map +1 -1
- package/dist/skill-test/executor-prompt.d.ts +15 -7
- package/dist/skill-test/executor-prompt.d.ts.map +1 -1
- package/dist/skill-test/executor-prompt.js +10 -7
- package/dist/skill-test/executor-prompt.js.map +1 -1
- package/dist/skill-test/failure-reason.d.ts +113 -0
- package/dist/skill-test/failure-reason.d.ts.map +1 -0
- package/dist/skill-test/failure-reason.js +124 -0
- package/dist/skill-test/failure-reason.js.map +1 -0
- package/dist/skill-test/fragment-merge.d.ts +3 -20
- package/dist/skill-test/fragment-merge.d.ts.map +1 -1
- package/dist/skill-test/fragment-merge.js +67 -8
- package/dist/skill-test/fragment-merge.js.map +1 -1
- package/dist/skill-test/grader-prompt.d.ts +29 -9
- package/dist/skill-test/grader-prompt.d.ts.map +1 -1
- package/dist/skill-test/grader-prompt.js +264 -68
- package/dist/skill-test/grader-prompt.js.map +1 -1
- package/dist/skill-test/grader-text.d.ts +145 -0
- package/dist/skill-test/grader-text.d.ts.map +1 -0
- package/dist/skill-test/grader-text.js +410 -0
- package/dist/skill-test/grader-text.js.map +1 -0
- package/dist/skill-test/grading-adapter.d.ts +38 -2
- package/dist/skill-test/grading-adapter.d.ts.map +1 -1
- package/dist/skill-test/grading-adapter.js +57 -9
- package/dist/skill-test/grading-adapter.js.map +1 -1
- package/dist/skill-test/grading-schema.d.ts +160 -5
- package/dist/skill-test/grading-schema.d.ts.map +1 -1
- package/dist/skill-test/grading-schema.js +66 -7
- package/dist/skill-test/grading-schema.js.map +1 -1
- package/dist/skill-test/harness-location.d.ts +3 -2
- package/dist/skill-test/harness-location.d.ts.map +1 -1
- package/dist/skill-test/harness-location.js +5 -16
- package/dist/skill-test/harness-location.js.map +1 -1
- package/dist/skill-test/index.d.ts +2 -2
- package/dist/skill-test/index.d.ts.map +1 -1
- package/dist/skill-test/index.js +2 -2
- package/dist/skill-test/index.js.map +1 -1
- package/dist/skill-test/lock.d.ts +58 -1
- package/dist/skill-test/lock.d.ts.map +1 -1
- package/dist/skill-test/lock.js +78 -6
- package/dist/skill-test/lock.js.map +1 -1
- package/dist/skill-test/pipeline.d.ts +19 -1
- package/dist/skill-test/pipeline.d.ts.map +1 -1
- package/dist/skill-test/pipeline.js +21 -10
- package/dist/skill-test/pipeline.js.map +1 -1
- package/dist/skill-test/preflight.d.ts +1 -1
- package/dist/skill-test/preflight.d.ts.map +1 -1
- package/dist/skill-test/preflight.js +59 -16
- package/dist/skill-test/preflight.js.map +1 -1
- package/dist/skill-test/prompt-invariants.d.ts +4 -2
- package/dist/skill-test/prompt-invariants.d.ts.map +1 -1
- package/dist/skill-test/prompt-invariants.js +5 -4
- package/dist/skill-test/prompt-invariants.js.map +1 -1
- package/dist/skill-test/run-harness.d.ts +665 -85
- package/dist/skill-test/run-harness.d.ts.map +1 -1
- package/dist/skill-test/run-harness.js +1522 -237
- package/dist/skill-test/run-harness.js.map +1 -1
- package/dist/skill-test/staging.d.ts +20 -8
- package/dist/skill-test/staging.d.ts.map +1 -1
- package/dist/skill-test/staging.js +25 -18
- package/dist/skill-test/staging.js.map +1 -1
- package/dist/skill-test/tier-plan.d.ts +1 -1
- package/dist/skill-test/tier-plan.js +1 -1
- package/dist/skill-test/tool-eval-schema.d.ts +6 -6
- package/dist/skill-test/tool-eval-schema.js +2 -2
- package/dist/skill-test/vendor-manifest.d.ts +2 -1
- package/dist/skill-test/vendor-manifest.d.ts.map +1 -1
- package/dist/skill-test/vendor-manifest.js +10 -10
- package/dist/skill-test/vendor-manifest.js.map +1 -1
- package/dist/test-input.d.ts +59 -8
- package/dist/test-input.d.ts.map +1 -1
- package/dist/test-input.js +64 -19
- package/dist/test-input.js.map +1 -1
- package/dist/validators/agent-instruction-presence.d.ts +1 -1
- package/dist/validators/agent-instruction-presence.d.ts.map +1 -1
- package/dist/validators/agent-instruction-presence.js +45 -2
- package/dist/validators/agent-instruction-presence.js.map +1 -1
- package/dist/validators/bundled-resource-link-detection.d.ts +6 -4
- package/dist/validators/bundled-resource-link-detection.d.ts.map +1 -1
- package/dist/validators/bundled-resource-link-detection.js +39 -39
- package/dist/validators/bundled-resource-link-detection.js.map +1 -1
- package/dist/validators/compat-detectors.d.ts +18 -1
- package/dist/validators/compat-detectors.d.ts.map +1 -1
- package/dist/validators/compat-detectors.js +47 -20
- package/dist/validators/compat-detectors.js.map +1 -1
- package/dist/validators/cross-skill-dependency-detection.d.ts +1 -1
- package/dist/validators/cross-skill-dependency-detection.d.ts.map +1 -1
- package/dist/validators/cross-skill-dependency-detection.js +1 -1
- package/dist/validators/cross-skill-dependency-detection.js.map +1 -1
- package/dist/validators/description-style-detection.d.ts +1 -1
- package/dist/validators/description-style-detection.d.ts.map +1 -1
- package/dist/validators/description-style-detection.js +1 -1
- package/dist/validators/description-style-detection.js.map +1 -1
- package/dist/validators/format-detection.d.ts +3 -0
- package/dist/validators/format-detection.d.ts.map +1 -1
- package/dist/validators/format-detection.js +41 -26
- package/dist/validators/format-detection.js.map +1 -1
- package/dist/validators/frontmatter-validation.d.ts +1 -1
- package/dist/validators/frontmatter-validation.d.ts.map +1 -1
- package/dist/validators/frontmatter-validation.js +2 -2
- package/dist/validators/frontmatter-validation.js.map +1 -1
- package/dist/validators/imperative-body-detection.d.ts +1 -1
- package/dist/validators/imperative-body-detection.d.ts.map +1 -1
- package/dist/validators/imperative-body-detection.js +1 -1
- package/dist/validators/imperative-body-detection.js.map +1 -1
- package/dist/validators/index.d.ts +1 -1
- package/dist/validators/index.d.ts.map +1 -1
- package/dist/validators/kebab-case-detection.d.ts +1 -1
- package/dist/validators/kebab-case-detection.d.ts.map +1 -1
- package/dist/validators/kebab-case-detection.js +1 -1
- package/dist/validators/kebab-case-detection.js.map +1 -1
- package/dist/validators/marketplace-validator.d.ts.map +1 -1
- package/dist/validators/marketplace-validator.js +7 -2
- package/dist/validators/marketplace-validator.js.map +1 -1
- package/dist/validators/mcp-tool-qualification.d.ts +158 -0
- package/dist/validators/mcp-tool-qualification.d.ts.map +1 -0
- package/dist/validators/mcp-tool-qualification.js +467 -0
- package/dist/validators/mcp-tool-qualification.js.map +1 -0
- package/dist/validators/packaged-size-limit.d.ts +296 -0
- package/dist/validators/packaged-size-limit.d.ts.map +1 -0
- package/dist/validators/packaged-size-limit.js +492 -0
- package/dist/validators/packaged-size-limit.js.map +1 -0
- package/dist/validators/packaging-validator.d.ts +149 -10
- package/dist/validators/packaging-validator.d.ts.map +1 -1
- package/dist/validators/packaging-validator.js +371 -55
- package/dist/validators/packaging-validator.js.map +1 -1
- package/dist/validators/plugin-hosted-shape.d.ts +4 -2
- package/dist/validators/plugin-hosted-shape.d.ts.map +1 -1
- package/dist/validators/plugin-hosted-shape.js +6 -7
- package/dist/validators/plugin-hosted-shape.js.map +1 -1
- package/dist/validators/plugin-recommended-fields.d.ts +1 -1
- package/dist/validators/plugin-recommended-fields.d.ts.map +1 -1
- package/dist/validators/plugin-recommended-fields.js +1 -1
- package/dist/validators/plugin-recommended-fields.js.map +1 -1
- package/dist/validators/referenced-path-missing.d.ts +211 -0
- package/dist/validators/referenced-path-missing.d.ts.map +1 -0
- package/dist/validators/referenced-path-missing.js +378 -0
- package/dist/validators/referenced-path-missing.js.map +1 -0
- package/dist/validators/registry-validator.d.ts.map +1 -1
- package/dist/validators/registry-validator.js +1 -2
- package/dist/validators/registry-validator.js.map +1 -1
- package/dist/validators/rule-engine/index.d.ts +1 -1
- package/dist/validators/rule-engine/rule-context.d.ts +20 -3
- package/dist/validators/rule-engine/rule-context.d.ts.map +1 -1
- package/dist/validators/rule-engine/rule-context.js +3 -1
- package/dist/validators/rule-engine/rule-context.js.map +1 -1
- package/dist/validators/rule-engine/rule-engine.d.ts +2 -2
- package/dist/validators/rule-engine/rule-engine.d.ts.map +1 -1
- package/dist/validators/rule-engine/rule-engine.js +52 -13
- package/dist/validators/rule-engine/rule-engine.js.map +1 -1
- package/dist/validators/skill-validator.d.ts.map +1 -1
- package/dist/validators/skill-validator.js +91 -54
- package/dist/validators/skill-validator.js.map +1 -1
- package/dist/validators/source-only-codes.js +1 -1
- package/dist/validators/source-only-codes.js.map +1 -1
- package/dist/validators/types.d.ts +21 -1
- package/dist/validators/types.d.ts.map +1 -1
- package/dist/validators/unified-validator.d.ts.map +1 -1
- package/dist/validators/unified-validator.js +4 -5
- package/dist/validators/unified-validator.js.map +1 -1
- package/dist/validators/validation-rules.d.ts +4 -4
- package/dist/validators/validation-rules.d.ts.map +1 -1
- package/dist/validators/validation-rules.js +9 -38
- package/dist/validators/validation-rules.js.map +1 -1
- package/dist/validators/walker-to-issues.d.ts +9 -3
- package/dist/validators/walker-to-issues.d.ts.map +1 -1
- package/dist/validators/walker-to-issues.js +64 -19
- package/dist/validators/walker-to-issues.js.map +1 -1
- package/dist/walk-link-graph.d.ts +64 -5
- package/dist/walk-link-graph.d.ts.map +1 -1
- package/dist/walk-link-graph.js +376 -92
- package/dist/walk-link-graph.js.map +1 -1
- package/package.json +14 -22
- package/dist/skill-test/exit-codes.d.ts +0 -97
- package/dist/skill-test/exit-codes.d.ts.map +0 -1
- package/dist/skill-test/exit-codes.js +0 -141
- package/dist/skill-test/exit-codes.js.map +0 -1
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PACKAGED_REFERENCED_PATH_MISSING — the inverse of PACKAGED_UNREFERENCED_FILE.
|
|
3
|
+
*
|
|
4
|
+
* `PACKAGED_UNREFERENCED_FILE` asks "is every shipped file mentioned somewhere?"
|
|
5
|
+
* and answers it by searching FROM a known filename INTO the text, which needs no
|
|
6
|
+
* parsing and is why it can be an error. This module asks the opposite question —
|
|
7
|
+
* "is every mentioned path actually shipped?" — which requires extracting path
|
|
8
|
+
* tokens from prose and code, and is therefore a warning.
|
|
9
|
+
*
|
|
10
|
+
* ## Why it is worth having anyway
|
|
11
|
+
*
|
|
12
|
+
* It is the only check that can see a BUILD DROP: a reference that is correct in
|
|
13
|
+
* the source repo and whose target did not survive into the packaged output. The
|
|
14
|
+
* source looks right, so neither human review nor an agent reading the source can
|
|
15
|
+
* catch it. Measured instance in a live adopter marketplace: a skill names
|
|
16
|
+
* `references/<setup-guide>.md` four times, that file is present at the matching
|
|
17
|
+
* path in the source repository, and it is absent from the published bundle.
|
|
18
|
+
*
|
|
19
|
+
* ## The two rules, and why each exists
|
|
20
|
+
*
|
|
21
|
+
* Fire rates measured over **684 skills across two corpora** (one of them a live
|
|
22
|
+
* marketplace). ⚠️ The heading and the prose here used to say "three rules" over
|
|
23
|
+
* "691 skills across three corpora" above a table listing two that sum to 684 —
|
|
24
|
+
* and to add that "dropping any one of them makes the check unusable" thirteen
|
|
25
|
+
* lines above the note that rule 3 has no production caller. Rule 3 IS dropped,
|
|
26
|
+
* the check ships anyway, and both of those sentences are gone rather than
|
|
27
|
+
* re-dated.
|
|
28
|
+
*
|
|
29
|
+
* | Rule | adopter A, 52 built skills | 632-skill install corpus |
|
|
30
|
+
* |---|---|---|
|
|
31
|
+
* | candidates only | 65.4% | 52.1% |
|
|
32
|
+
* | + literal (rule 1) | 46.2% | 47.5% |
|
|
33
|
+
* | + bundled-subdir prefix (rule 2) | **3.8%** | **10.4%** |
|
|
34
|
+
*
|
|
35
|
+
* Both rules ship, and the shipped rule pair is the bottom row: **3.8% on the
|
|
36
|
+
* 52-skill adopter marketplace and 10.4% on the 632-skill installed corpus**.
|
|
37
|
+
* ⚠️ QUOTE BOTH, ALWAYS. The headline here used to quote 3.8% alone — the lower
|
|
38
|
+
* of two numbers measured on the SAME shipped rule — which reads as a single
|
|
39
|
+
* measured misfire rate rather than as the flattering end of a 2.7x spread.
|
|
40
|
+
* Neither corpus is privileged: the marketplace is BUILT output (what this check
|
|
41
|
+
* actually runs on) and the install corpus is bigger and more varied, so a
|
|
42
|
+
* reader deciding whether to enable this needs the range, not the better half.
|
|
43
|
+
*
|
|
44
|
+
* 1. **Literal paths only.** A glob or a placeholder (`docs/**\/*.md`,
|
|
45
|
+
* `docs/product/<component>/prd.md`) is not a claim that a file exists.
|
|
46
|
+
* 2. **First segment must be a bundled subdirectory.** This is the rule that
|
|
47
|
+
* earns the precision — 17x on the marketplace corpus, 5x on the install
|
|
48
|
+
* corpus (65.4%→3.8% and 52.1%→10.4%) — and it is the only *semantic* one.
|
|
49
|
+
* The lexer deliberately refuses this judgement: it emits `docs/product/prd.md`
|
|
50
|
+
* and `dist/bin/arc-cli.mjs` as equal candidates because whether a token refers
|
|
51
|
+
* to the skill's own bundle or to the USER'S repository is a lens's property,
|
|
52
|
+
* not a lexical one. Until `edges`/`edge_resolutions` have producers, this
|
|
53
|
+
* prefix test IS that lens, and its measured precision is recorded above so a
|
|
54
|
+
* future lens can be held to it.
|
|
55
|
+
*
|
|
56
|
+
* A third rule — a plugin-wide **sibling search root**, measured at 1.9%
|
|
57
|
+
* (marketplace) and 8.9% (install corpus) — was built and then DELETED, because
|
|
58
|
+
* nothing could call it. The rejected
|
|
59
|
+
* wiring and why a dead seam is not a head start are on
|
|
60
|
+
* {@link detectMissingReferencedPaths}. The sibling population is real: one
|
|
61
|
+
* measured skill points at a sibling's `resources/*.md`, another at a plugin-root
|
|
62
|
+
* `scripts/cli.py`, and both are false positives here. A plugin-aware lens that
|
|
63
|
+
* wants them should measure its own rule.
|
|
64
|
+
*
|
|
65
|
+
* ## Why this runs at the BUILT phase only
|
|
66
|
+
*
|
|
67
|
+
* A `files:` config entry materializes `scripts/` at build time, so a VAT source
|
|
68
|
+
* skill directory legitimately lacks the subdirectory its body references —
|
|
69
|
+
* a measured skill ships no `scripts/` in source and gets `scripts/<cli>.mjs`
|
|
70
|
+
* injected. Running this at source phase fired on it; running it at built phase
|
|
71
|
+
* does not. Measured: 15.0% source vs 9.6% built for the same naive rule.
|
|
72
|
+
*
|
|
73
|
+
* ## A path VAT'S OWN PACKAGER moved is not a missing path
|
|
74
|
+
*
|
|
75
|
+
* Routing relocates a bundled file, so an authored `resources/setup.sh` ships as
|
|
76
|
+
* `scripts/setup.sh` under `claude-code` and as `references/setup.sh` under
|
|
77
|
+
* `claude-web`. Markdown links are rewritten to follow it; bare tokens in fences
|
|
78
|
+
* and code spans — this check's only input — are not. A candidate is therefore
|
|
79
|
+
* only missing if it is absent under BOTH its authored spelling and its routed
|
|
80
|
+
* one.
|
|
81
|
+
*
|
|
82
|
+
* ⛔ Routing is a function of the TARGET, not of the extension alone, so this
|
|
83
|
+
* check takes the target as a required argument and asks
|
|
84
|
+
* `getResourceSubdirForFile` — the same function the packager asks. It used to
|
|
85
|
+
* ask the extension-only half and answer for `claude-code` whatever it was
|
|
86
|
+
* packaging, which false-positived the entire `claude-web` target. See
|
|
87
|
+
* {@link routedSpelling}.
|
|
88
|
+
*
|
|
89
|
+
* ## Deliberately NOT handled here
|
|
90
|
+
*
|
|
91
|
+
* Markdown links. `LINK_BROKEN_FILE` / `PACKAGED_BROKEN_LINK` already cover a
|
|
92
|
+
* link whose target is missing, at error severity. Emitting here as well would
|
|
93
|
+
* double-report the same defect with a weaker severity.
|
|
94
|
+
*
|
|
95
|
+
* That exclusion is enforced UPSTREAM, in the lexer, and not by anything in this
|
|
96
|
+
* module: `codeContextRangesFrom` puts `inline-link`, `reference-link`,
|
|
97
|
+
* `link-definition` and `image` spans into `excluded`, and `emitToken` refuses to
|
|
98
|
+
* emit any token falling inside one. So an inline link, a `[text][label]`
|
|
99
|
+
* reference AND its `[label]: path` definition all produce zero candidates here —
|
|
100
|
+
* verified by the `does not double-report` cases in this module's unit test,
|
|
101
|
+
* which assert on `bundledPathCandidates` rather than on the issue list so that
|
|
102
|
+
* silence is attributed to the exclusion rather than to a missing candidate.
|
|
103
|
+
*
|
|
104
|
+
* The `syntacticForm !== 'bare-token'` guard below is NOT that exclusion and must
|
|
105
|
+
* not be read as it. What it does is drop `env-anchored` and `at-prefixed` tokens
|
|
106
|
+
* — and it is load-bearing for exactly one shape that would otherwise slip
|
|
107
|
+
* through the literal test: `scripts/$VAR/x.mjs`, whose first segment IS a
|
|
108
|
+
* bundled subdirectory and which carries no glob character.
|
|
109
|
+
*/
|
|
110
|
+
import { existsSync } from 'node:fs';
|
|
111
|
+
import { parseMarkdown } from '@vibe-agent-toolkit/resources';
|
|
112
|
+
import { CODE_REGISTRY } from '@vibe-agent-toolkit/schema';
|
|
113
|
+
import { safePath, toForwardSlashAnyPlatform } from '@vibe-agent-toolkit/utils';
|
|
114
|
+
import { CLAUDE_WEB_REFERENCES_SUBDIR, getResourceSubdirForFile, TARGET_SUBDIR_CATEGORIES, } from '../content-type-routing.js';
|
|
115
|
+
/**
|
|
116
|
+
* Subdirectories a packaged skill may bundle resources into.
|
|
117
|
+
*
|
|
118
|
+
* Derived from the content-type routing categories rather than re-listed, for the
|
|
119
|
+
* same reason `bundled-resource-link-detection.ts` derives its copy: a hardcoded
|
|
120
|
+
* list drifts from the routing table, and a category missing from it makes this
|
|
121
|
+
* detector structurally unable to fire on that subdirectory.
|
|
122
|
+
*/
|
|
123
|
+
const BUNDLED_SUBDIRS = new Set([
|
|
124
|
+
...TARGET_SUBDIR_CATEGORIES,
|
|
125
|
+
CLAUDE_WEB_REFERENCES_SUBDIR,
|
|
126
|
+
]);
|
|
127
|
+
/** Glob and placeholder syntax — a token carrying any of it is not a literal path. */
|
|
128
|
+
const NON_LITERAL = /[*?<>{}[\]]/u;
|
|
129
|
+
/**
|
|
130
|
+
* `token` as bundle-relative segments, or `null` if it is not a bundle-relative
|
|
131
|
+
* literal path at all.
|
|
132
|
+
*
|
|
133
|
+
* Two spellings reach here and only one used to be recognized: `scripts/x.mjs`
|
|
134
|
+
* and `./scripts/x.mjs` (the lexer admits a leading `./` unconditionally).
|
|
135
|
+
* Reading the first segment off the RAW token gave `.` for the second, so it was
|
|
136
|
+
* dropped — and a build drop referenced as `./scripts/setup.mjs` is the very case
|
|
137
|
+
* this module exists for.
|
|
138
|
+
*
|
|
139
|
+
* ⚠️ The `toForwardSlashAnyPlatform` call also normalizes `scripts\x.mjs`, and this comment
|
|
140
|
+
* used to claim that as a third recognized spelling. It is UNREACHABLE from the
|
|
141
|
+
* shipped lexer, which only emits a run containing one of `/ $ % @` — a
|
|
142
|
+
* backslash-only path never becomes a candidate, so no Windows-authored token
|
|
143
|
+
* arrives here in that form. The normalization stays because it costs nothing and
|
|
144
|
+
* a mixed `scripts/sub\x.mjs` does arrive; the CLAIM does not. The module's unit
|
|
145
|
+
* test is honest about this; the comment was not.
|
|
146
|
+
*
|
|
147
|
+
* `null` for anything that is not a relative path INSIDE the bundle: an absolute
|
|
148
|
+
* path, an empty segment (`scripts//x`), a `.` segment, or — the one that
|
|
149
|
+
* matters for what happens downstream — any `..`. A token carrying `..` is not a
|
|
150
|
+
* claim about the bundle's contents, and it is the segment that would otherwise
|
|
151
|
+
* turn verbatim markdown content into a traversal by the time it reaches
|
|
152
|
+
* `existsSync`.
|
|
153
|
+
*/
|
|
154
|
+
function bundleRelativeSegments(token) {
|
|
155
|
+
if (NON_LITERAL.test(token))
|
|
156
|
+
return null;
|
|
157
|
+
const segments = toForwardSlashAnyPlatform(token).split('/');
|
|
158
|
+
if (segments[0] === '.')
|
|
159
|
+
segments.shift();
|
|
160
|
+
if (segments.length < 2)
|
|
161
|
+
return null;
|
|
162
|
+
if (segments.some(segment => segment === '' || segment === '.' || segment === '..'))
|
|
163
|
+
return null;
|
|
164
|
+
return segments;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Whether `token` is a literal path rooted at a bundled subdirectory.
|
|
168
|
+
*
|
|
169
|
+
* Exported for tests: these two predicates are the whole precision argument, and
|
|
170
|
+
* pinning them directly is cheaper than reconstructing a corpus to observe them.
|
|
171
|
+
*
|
|
172
|
+
* ⚠️ It is also the SHIPPED rule, and that is load-bearing rather than tidiness.
|
|
173
|
+
* `bundledPathCandidates` used to re-derive the same two steps inline — a
|
|
174
|
+
* `bundleRelativeSegments` call followed by its own `BUNDLED_SUBDIRS.has(…)` —
|
|
175
|
+
* so every assertion in this module's `isBundledSubdirPath` describe block
|
|
176
|
+
* pinned a COPY of the rule. Lower-casing the lookup in the production line left
|
|
177
|
+
* all eight of them green. This lane has already shipped that exact defect once
|
|
178
|
+
* (a filter whose only caller was a unit test ran at double its documented
|
|
179
|
+
* misfire rate), so there is ONE definition and production calls it.
|
|
180
|
+
*/
|
|
181
|
+
export function isBundledSubdirPath(token) {
|
|
182
|
+
const segments = bundleRelativeSegments(token);
|
|
183
|
+
return segments !== null && BUNDLED_SUBDIRS.has(segments[0] ?? '');
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Every bare-token path candidate in the document at `filePath` that is rooted at
|
|
187
|
+
* a bundled subdirectory, NORMALIZED to its bundle-relative spelling.
|
|
188
|
+
*
|
|
189
|
+
* Normalizing here rather than at each use is what makes `./scripts/x.mjs`,
|
|
190
|
+
* `scripts\x.mjs` and `scripts/x.mjs` one finding with one `link` anchor, so a
|
|
191
|
+
* single allow glob waives all three spellings of the same reference.
|
|
192
|
+
*
|
|
193
|
+
* Goes through `parseMarkdown` rather than reaching for the lexer directly, for
|
|
194
|
+
* two reasons. It keeps ONE definition of "path-shaped token" in the codebase —
|
|
195
|
+
* `isCandidate` in `reference-lexer.ts` already requires a slash and a file
|
|
196
|
+
* extension, which is this check's admission rule too, so re-deriving it here
|
|
197
|
+
* would be a second matcher to drift. And `parseMarkdown` is the package's lazy
|
|
198
|
+
* wrapper: a value import of the lexer would pull the remark stack into the eager
|
|
199
|
+
* module graph of every `@vibe-agent-toolkit/resources` consumer (~730ms on
|
|
200
|
+
* Windows), which `module-load-budget.integration.test.ts` exists to prevent.
|
|
201
|
+
*/
|
|
202
|
+
export async function bundledPathCandidates(filePath) {
|
|
203
|
+
const parsed = await parseMarkdown(filePath);
|
|
204
|
+
const out = new Set();
|
|
205
|
+
for (const ref of parsed.lexicalReferences ?? []) {
|
|
206
|
+
// NOT the markdown-link exclusion — see the module docstring. This drops
|
|
207
|
+
// `env-anchored` and `at-prefixed` tokens, and the shape it actually saves
|
|
208
|
+
// us from is `scripts/$VAR/x.mjs`, which passes the literal test.
|
|
209
|
+
if (ref.syntacticForm !== 'bare-token')
|
|
210
|
+
continue;
|
|
211
|
+
// `hasExtension` is the lexer's own fact and stays. Its `slashCount` does
|
|
212
|
+
// not: it counts FORWARD slashes only, and `bundleRelativeSegments` already
|
|
213
|
+
// refuses anything that does not split into at least two segments.
|
|
214
|
+
if (!ref.hasExtension)
|
|
215
|
+
continue;
|
|
216
|
+
// `bundleRelativeSegments` runs here for the NORMALIZATION it does
|
|
217
|
+
// (`./scripts/x.mjs` and `scripts\x.mjs` collapse onto one spelling, so one
|
|
218
|
+
// allow glob waives all of them). The bundled-subdir JUDGEMENT is
|
|
219
|
+
// `isBundledSubdirPath`'s and is CALLED, never re-derived — see that
|
|
220
|
+
// function for why re-deriving it made its whole test block vacuous.
|
|
221
|
+
const segments = bundleRelativeSegments(ref.raw);
|
|
222
|
+
if (segments === null || !isBundledSubdirPath(ref.raw))
|
|
223
|
+
continue;
|
|
224
|
+
out.add(segments.join('/'));
|
|
225
|
+
}
|
|
226
|
+
return [...out];
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Existence-only probe for one bundle-relative path.
|
|
230
|
+
*
|
|
231
|
+
* `rel` IS document content — the least trusted input in this module — so it is
|
|
232
|
+
* constrained before it gets here rather than trusted: it reached this line only
|
|
233
|
+
* by passing `bundleRelativeSegments`, which admits a relative path with no
|
|
234
|
+
* empty, `.` or `..` segment and refuses every glob and placeholder character,
|
|
235
|
+
* and by being rooted at one of the five known bundled subdirectory names.
|
|
236
|
+
* `skillDir` is the caller's own directory. Nothing is read, nothing is written,
|
|
237
|
+
* and a `true` merely suppresses a warning.
|
|
238
|
+
*
|
|
239
|
+
* {@link routedSpelling}'s output is derived from the same constrained value —
|
|
240
|
+
* a basename of it, under a name from the routing table — so it inherits the
|
|
241
|
+
* argument rather than needing its own.
|
|
242
|
+
*/
|
|
243
|
+
function bundleHas(skillDir, rel) {
|
|
244
|
+
return existsSync(safePath.join(skillDir, rel));
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Where the packager would actually put a file with this basename, FOR THIS
|
|
248
|
+
* TARGET.
|
|
249
|
+
*
|
|
250
|
+
* 🚨 **VAT's own packaging manufactures this finding, and this is the guard.**
|
|
251
|
+
* Content-type routing relocates an auto-discovered bundled file, discarding the
|
|
252
|
+
* subdirectory its author chose: under `claude-code` by EXTENSION, so source
|
|
253
|
+
* `resources/setup.sh` ships as `scripts/setup.sh`, `scripts/config.json` as
|
|
254
|
+
* `templates/config.json`, `assets/runtime.wasm` as `resources/runtime.wasm`;
|
|
255
|
+
* under `claude-web` by flattening every resource into `references/`. The
|
|
256
|
+
* packager rewrites markdown LINKS to the routed destination, so those stay
|
|
257
|
+
* correct — but a bare token in a code fence or code span is deliberately NOT
|
|
258
|
+
* rewritten, and bare tokens are precisely what {@link bundledPathCandidates}
|
|
259
|
+
* reads. So a skill that says ``bash resources/setup.sh`` in a fenced block, and
|
|
260
|
+
* links `resources/setup.sh` in prose, gets one rewritten reference that
|
|
261
|
+
* resolves and one unrewritten one that reports a file which DID ship.
|
|
262
|
+
*
|
|
263
|
+
* That misfire is unfixable by the author: the registered remedy ("Ship the
|
|
264
|
+
* file, correct the path…") names no action that resolves it, because writing
|
|
265
|
+
* the packaged spelling into the source breaks the source repo, where the file
|
|
266
|
+
* really is under the authored subdirectory.
|
|
267
|
+
*
|
|
268
|
+
* 🚩 The guard used to call `getTargetSubdir` — the EXTENSION half — while the
|
|
269
|
+
* packager routed through `getResourceSubdirForFile(file, target)`. Two routing
|
|
270
|
+
* answers for one question, and the half this file happened to hold was the
|
|
271
|
+
* `claude-code` one, so the whole `claude-web` target false-positived: the same
|
|
272
|
+
* fixture was clean under `--target claude-code` and raised
|
|
273
|
+
* `PACKAGED_REFERENCED_PATH_MISSING` under `--target claude-web`, on a file that
|
|
274
|
+
* did ship. Reachable from the shipped `vat skills package --target claude-web`.
|
|
275
|
+
* `target` is a REQUIRED parameter all the way up to `packageSkill` for that
|
|
276
|
+
* reason: a default here would let the next caller re-acquire the wrong answer
|
|
277
|
+
* by saying nothing.
|
|
278
|
+
*
|
|
279
|
+
* So a candidate is only missing if it is absent under BOTH its authored
|
|
280
|
+
* spelling and its routed one. The suppression is deliberately narrow — a
|
|
281
|
+
* basename-for-basename relocation, which is exactly the shape routing produces
|
|
282
|
+
* — and it costs one extra `existsSync` on a path that already failed one.
|
|
283
|
+
*/
|
|
284
|
+
function routedSpelling(rel, target) {
|
|
285
|
+
const basename = rel.slice(rel.lastIndexOf('/') + 1);
|
|
286
|
+
return `${getResourceSubdirForFile(basename, target)}/${basename}`;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Emit one `PACKAGED_REFERENCED_PATH_MISSING` per missing path.
|
|
290
|
+
*
|
|
291
|
+
* One issue PER MISSING PATH, not one per document — and each carries the missing
|
|
292
|
+
* path as `link`.
|
|
293
|
+
*
|
|
294
|
+
* This is what makes a single misfire waivable without disabling the rule for the
|
|
295
|
+
* file. `applyAllowFilter` matches an allow glob against `location` OR `link`, so
|
|
296
|
+
* an adopter can silence exactly one illustrative path:
|
|
297
|
+
*
|
|
298
|
+
* ```yaml
|
|
299
|
+
* validation:
|
|
300
|
+
* allow:
|
|
301
|
+
* PACKAGED_REFERENCED_PATH_MISSING:
|
|
302
|
+
* - paths: ["resources/gates.md"]
|
|
303
|
+
* reason: "Illustrative path in a skill that teaches link syntax."
|
|
304
|
+
* ```
|
|
305
|
+
*
|
|
306
|
+
* …while a DIFFERENT missing path in that same document still fires. Waiving by
|
|
307
|
+
* `location` (`**\/some-skill/SKILL.md`) remains available and is the coarser
|
|
308
|
+
* choice — it suppresses future real findings in that file, which is precisely
|
|
309
|
+
* what the per-path form avoids.
|
|
310
|
+
*
|
|
311
|
+
* The three anchors are three different things, the same split
|
|
312
|
+
* `REFERENCE_TARGET_MISSING` documents: `location` is the file you open, `field`
|
|
313
|
+
* is not used here, and `link` is the target that does not exist — emphatically
|
|
314
|
+
* NOT the location, since naming a nonexistent path as "where to look" is advice
|
|
315
|
+
* you cannot follow.
|
|
316
|
+
*
|
|
317
|
+
* ⚠️ ONE lane, not two. This code is emitted from `packageSkill` and nowhere
|
|
318
|
+
* else, so `vat skills validate` — which calls `validateSkillForPackaging(…,
|
|
319
|
+
* 'source')` and never `packageSkill` — cannot produce it. This note used to tell
|
|
320
|
+
* adopters to give a single allow entry BOTH the authored and packaged spellings
|
|
321
|
+
* "so a waiver survives both lanes", two bullets after the same file said "built
|
|
322
|
+
* phase only". Following it earns an `ALLOW_UNUSED` for the spelling that can
|
|
323
|
+
* never match. A `link` glob is still the better choice, for its own reason: the
|
|
324
|
+
* missing path is skill-relative, so it does not depend on where the bundle sits.
|
|
325
|
+
*
|
|
326
|
+
* @param docFiles Absolute paths of packaged markdown documents to scan
|
|
327
|
+
* (SKILL.md and any bundled reference files).
|
|
328
|
+
* @param skillDir Absolute path to the packaged skill output — the base every
|
|
329
|
+
* candidate resolves against, and the base issue locations are relative to.
|
|
330
|
+
*
|
|
331
|
+
* 🚨 **SKILL-LOCAL, and there is no wider root to pass.** This function used to
|
|
332
|
+
* take a `siblingSearchRoot` and a `searchBudget`, with a ~90-line breadth-first
|
|
333
|
+
* mount-point walk behind them and a caveat string for a truncated search. NO
|
|
334
|
+
* production caller ever passed either: the only caller is the packager, via
|
|
335
|
+
* `checkMissingReferencedPaths`, and it genuinely does not know the plugin root
|
|
336
|
+
* — it packages one skill into its own output directory before any plugin is
|
|
337
|
+
* assembled. `vat build`'s `validateShippedPluginSkillLinks` does walk a whole
|
|
338
|
+
* plugin tree, and wiring this there was considered and REJECTED: it runs only
|
|
339
|
+
* `checkBrokenPackagedLinks`, its documented stance is the opposite one (a skill
|
|
340
|
+
* is a self-contained portable unit, so an escape from its own directory is a
|
|
341
|
+
* defect rather than a resolution), and it would report every finding twice.
|
|
342
|
+
*
|
|
343
|
+
* So the subsystem was deleted rather than kept as a seam. `complete` was always
|
|
344
|
+
* `true`, the truncated-search caveat could never ship, and the tests that
|
|
345
|
+
* covered the walk covered a path production does not take — while attributing
|
|
346
|
+
* real coverage to it. The measured fire rates that ship are the skill-local
|
|
347
|
+
* **3.8% (marketplace) / 10.4% (install corpus)**; the 1.9% / 8.9% pair
|
|
348
|
+
* describes a check VAT does not run. If a plugin-aware lens is ever built, it
|
|
349
|
+
* can grow its own resolution rule with its own measurement; a dead parameter
|
|
350
|
+
* is not a head start.
|
|
351
|
+
*/
|
|
352
|
+
export async function detectMissingReferencedPaths(docFiles, skillDir, target) {
|
|
353
|
+
const registryEntry = CODE_REGISTRY.PACKAGED_REFERENCED_PATH_MISSING;
|
|
354
|
+
const issues = [];
|
|
355
|
+
for (const docFile of docFiles) {
|
|
356
|
+
const candidates = await bundledPathCandidates(docFile);
|
|
357
|
+
const missing = candidates.filter(rel => !bundleHas(skillDir, rel) && !bundleHas(skillDir, routedSpelling(rel, target)));
|
|
358
|
+
if (missing.length === 0)
|
|
359
|
+
continue;
|
|
360
|
+
const location = safePath.relative(skillDir, docFile);
|
|
361
|
+
for (const rel of missing) {
|
|
362
|
+
issues.push({
|
|
363
|
+
severity: registryEntry.defaultSeverity,
|
|
364
|
+
code: 'PACKAGED_REFERENCED_PATH_MISSING',
|
|
365
|
+
message: `References "${rel}", which is not in the packaged output`,
|
|
366
|
+
location,
|
|
367
|
+
// The missing path, so an allow glob can waive THIS reference without
|
|
368
|
+
// silencing the whole document. Never the location: a path that does not
|
|
369
|
+
// exist is not somewhere a reader can look.
|
|
370
|
+
link: rel,
|
|
371
|
+
fix: registryEntry.fix,
|
|
372
|
+
reference: registryEntry.reference,
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return issues;
|
|
377
|
+
}
|
|
378
|
+
//# sourceMappingURL=referenced-path-missing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"referenced-path-missing.js","sourceRoot":"","sources":["../../src/validators/referenced-path-missing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAwB,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEhF,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EAExB,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,eAAe,GAAwB,IAAI,GAAG,CAAS;IAC3D,GAAG,wBAAwB;IAC3B,4BAA4B;CAC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AC;IAErC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,UAAU,GAAG,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACxD,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAC/B,GAAG,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CACtF,CAAC;QACF,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAEnC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACtD,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;YAC1B,MAAM,CAAC,IAAI,CAAC;gBACV,QAAQ,EAAE,aAAa,CAAC,eAAe;gBACvC,IAAI,EAAE,kCAAkC;gBACxC,OAAO,EAAE,eAAe,GAAG,wCAAwC;gBACnE,QAAQ;gBACR,sEAAsE;gBACtE,yEAAyE;gBACzE,4CAA4C;gBAC5C,IAAI,EAAE,GAAG;gBACT,GAAG,EAAE,aAAa,CAAC,GAAG;gBACtB,SAAS,EAAE,aAAa,CAAC,SAAS;aACnC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-validator.d.ts","sourceRoot":"","sources":["../../src/validators/registry-validator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry-validator.d.ts","sourceRoot":"","sources":["../../src/validators/registry-validator.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,iBAAiB,EAAqB,MAAM,kBAAkB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAiHnD;;;;;;GAMG;AACH,wBAAsB,gCAAgC,CACrD,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,gBAAgB,CAAC,CAQ3B;AAED;;;;;;GAMG;AACH,wBAAsB,iCAAiC,CACtD,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,gBAAgB,CAAC,CAQ3B"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/* eslint-disable security/detect-non-literal-fs-filename -- File paths are validated before use */
|
|
2
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
2
|
import { dirname } from 'node:path';
|
|
4
|
-
import { CODE_REGISTRY, calculateValidationStatus, countBySeverity } from '@vibe-agent-toolkit/
|
|
3
|
+
import { CODE_REGISTRY, calculateValidationStatus, countBySeverity } from '@vibe-agent-toolkit/schema';
|
|
5
4
|
import { issueLocation } from '@vibe-agent-toolkit/utils';
|
|
6
5
|
import { detectInstalledPluginsRegistryDrift, InstalledPluginsRegistrySchema, } from '../schemas/installed-plugins-registry.js';
|
|
7
6
|
import { detectKnownMarketplacesRegistryDrift, KnownMarketplacesRegistrySchema, } from '../schemas/known-marketplaces-registry.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-validator.js","sourceRoot":"","sources":["../../src/validators/registry-validator.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"registry-validator.js","sourceRoot":"","sources":["../../src/validators/registry-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,eAAe,EAAwB,MAAM,4BAA4B,CAAC;AAC7H,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,OAAO,EACN,mCAAmC,EACnC,8BAA8B,GAE9B,MAAM,0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,QAAQ;gBACR,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;gBAC9B,GAAG,EAAE,qBAAqB,CAAC,QAAQ,CAAC;aACpC,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;IAED,MAAM,MAAM,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;IAEjD,OAAO;QACN,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,aAAa;QACnB,MAAM;QACN,OAAO,EACN,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,WAAW;QAC1E,MAAM;QACN,WAAW,EAAE,eAAe,CAAC,MAAM,CAAC;KACpC,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,gCAAgC,CACrD,QAAgB,EAChB,OAA2B;IAE3B,OAAO,oBAAoB,CAC1B,QAAQ,EACR,8BAA8B,EAC9B,kCAAkC,EAClC,OAAO,EAAE,YAAY,EACrB,mCAAmC,CACnC,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iCAAiC,CACtD,QAAgB,EAChB,OAA2B;IAE3B,OAAO,oBAAoB,CAC1B,QAAQ,EACR,+BAA+B,EAC/B,mCAAmC,EACnC,OAAO,EAAE,YAAY,EACrB,oCAAoC,CACpC,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Intent-aware skill-resource verdict engine
|
|
2
|
+
* Intent-aware skill-resource verdict engine.
|
|
3
3
|
*
|
|
4
4
|
* Public surface: the {@link RuleContext} description, the pure {@link evaluate}
|
|
5
5
|
* engine, and the registry-sourced {@link materializeIssue} constructor.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* RuleContext — the intent-aware input to the skill-resource verdict engine.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* VAT used to decide "is this skill resource OK?" across three
|
|
5
5
|
* diverged code paths (built / live-audit / wild-fallback), none of which
|
|
6
6
|
* encoded the *intent* behind a file's inclusion. This module replaces the
|
|
7
7
|
* per-path `excludeReason` mechanism with a description of the resource (or the
|
|
@@ -34,7 +34,7 @@ export type FileCopyRole = 'skill-bundled' | 'plugin-artifact';
|
|
|
34
34
|
export type RuleScope = 'base-resource' | 'skill' | 'plugin';
|
|
35
35
|
/**
|
|
36
36
|
* Coarse classification of *what kind of thing* a resource is. `directory` is
|
|
37
|
-
* the post-`stat` realization of
|
|
37
|
+
* the post-`stat` realization of the source-level `local_directory` link
|
|
38
38
|
* shape; `nav` is a navigation file (README.md, index.md, …) excluded from
|
|
39
39
|
* bundles; `agent-instruction` is a repo-internal agent-guidance file
|
|
40
40
|
* (CLAUDE.md, AGENTS.md, GEMINI.md), likewise excluded, but because it is not
|
|
@@ -87,10 +87,17 @@ export interface RuleContext {
|
|
|
87
87
|
outsideProject: boolean;
|
|
88
88
|
/** Edge target is gitignored (only meaningful when it exists on disk). */
|
|
89
89
|
gitignored: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Edge target exists but could not be stat'ed (permissions, a race, or
|
|
92
|
+
* similar) — so nothing else about the target is knowable. Distinct from
|
|
93
|
+
* `!existsAtSource`: the file IS there, which is why it reports as unreadable
|
|
94
|
+
* rather than as a broken link.
|
|
95
|
+
*/
|
|
96
|
+
unreadable: boolean;
|
|
90
97
|
/**
|
|
91
98
|
* The edge is a **typed single-file slot** (e.g. a packaging `files:` source
|
|
92
99
|
* entry) — a directory target is an error here, whereas a navigational edge
|
|
93
|
-
* accepts a directory.
|
|
100
|
+
* accepts a directory.
|
|
94
101
|
*/
|
|
95
102
|
typedSingleFileSlot: boolean;
|
|
96
103
|
/** Edge targets another skill's SKILL.md (duplicate-definition risk). */
|
|
@@ -99,6 +106,16 @@ export interface RuleContext {
|
|
|
99
106
|
droppedByDepth: boolean;
|
|
100
107
|
/** Edge target was excluded by an excludeReferencesFromBundle pattern. */
|
|
101
108
|
patternExcluded: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* The edge ORIGINATES in a bundled file the walker does not route through
|
|
111
|
+
* (HTML — see `isRoutable` in `walk-link-graph.ts`), so its target was never
|
|
112
|
+
* enqueued.
|
|
113
|
+
*
|
|
114
|
+
* A source-side property, unlike every other field here: the target may be a
|
|
115
|
+
* perfectly ordinary file that simply had no markdown referrer. That is why
|
|
116
|
+
* it cannot be expressed as a `fileKind` on the target.
|
|
117
|
+
*/
|
|
118
|
+
nonRoutableSource: boolean;
|
|
102
119
|
}
|
|
103
120
|
/**
|
|
104
121
|
* Build a RuleContext with sensible defaults, overriding only the fields a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-context.d.ts","sourceRoot":"","sources":["../../../src/validators/rule-engine/rule-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG,iBAAiB,CAAC;AAE/D,oEAAoE;AACpE,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE7D;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,GAChB,KAAK,GACL,YAAY,GACZ,OAAO,GACP,MAAM,GACN,QAAQ,GACR,KAAK,GACL,mBAAmB,GACnB,WAAW,GACX,SAAS,CAAC;AAEd,yDAAyD;AACzD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAExD;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAE1B,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC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,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAE1B,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,aAAa,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACpC,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IAGxB,oDAAoD;IACpD,KAAK,EAAE,SAAS,CAAC;IACjB,4EAA4E;IAC5E,OAAO,EAAE,WAAW,CAAC;IACrB,8DAA8D;IAC9D,cAAc,EAAE,OAAO,CAAC;IACxB,0EAA0E;IAC1E,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,mBAAmB,EAAE,OAAO,CAAC;IAC7B,yEAAyE;IACzE,oBAAoB,EAAE,OAAO,CAAC;IAC9B,6EAA6E;IAC7E,cAAc,EAAE,OAAO,CAAC;IACxB,0EAA0E;IAC1E,eAAe,EAAE,OAAO,CAAC;IACzB;;;;;;;;OAQG;IACH,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,CAuBjF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* RuleContext — the intent-aware input to the skill-resource verdict engine.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* VAT used to decide "is this skill resource OK?" across three
|
|
5
5
|
* diverged code paths (built / live-audit / wild-fallback), none of which
|
|
6
6
|
* encoded the *intent* behind a file's inclusion. This module replaces the
|
|
7
7
|
* per-path `excludeReason` mechanism with a description of the resource (or the
|
|
@@ -34,10 +34,12 @@ export function makeRuleContext(overrides = {}) {
|
|
|
34
34
|
subject: 'edge',
|
|
35
35
|
outsideProject: false,
|
|
36
36
|
gitignored: false,
|
|
37
|
+
unreadable: false,
|
|
37
38
|
typedSingleFileSlot: false,
|
|
38
39
|
crossSkillDefinition: false,
|
|
39
40
|
droppedByDepth: false,
|
|
40
41
|
patternExcluded: false,
|
|
42
|
+
nonRoutableSource: false,
|
|
41
43
|
...overrides,
|
|
42
44
|
};
|
|
43
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-context.js","sourceRoot":"","sources":["../../../src/validators/rule-engine/rule-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"rule-context.js","sourceRoot":"","sources":["../../../src/validators/rule-engine/rule-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA4HH;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,YAAkC,EAAE;IAClE,OAAO;QACL,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,SAAS;QACnB,oBAAoB,EAAE,KAAK;QAC3B,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,SAAS;QACnB,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,IAAI;QACpB,kBAAkB,EAAE,KAAK;QACzB,cAAc,EAAE,IAAI;QACpB,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE,MAAM;QACf,cAAc,EAAE,KAAK;QACrB,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,KAAK;QACjB,mBAAmB,EAAE,KAAK;QAC1B,oBAAoB,EAAE,KAAK;QAC3B,cAAc,EAAE,KAAK;QACrB,eAAe,EAAE,KAAK;QACtB,iBAAiB,EAAE,KAAK;QACxB,GAAG,SAAS;KACb,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The skill-resource verdict engine
|
|
2
|
+
* The skill-resource verdict engine.
|
|
3
3
|
*
|
|
4
4
|
* `evaluate(ctx)` is a **pure** function: it takes an intent-aware
|
|
5
5
|
* {@link RuleContext} and returns at most one validation code (or `null` when
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* constructed context maps to exactly one expected code, and no two distinct
|
|
15
15
|
* intents may share a context signature while expecting different codes.
|
|
16
16
|
*/
|
|
17
|
-
import { type IssueCode, type ValidationIssue } from '@vibe-agent-toolkit/
|
|
17
|
+
import { type IssueCode, type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
18
18
|
import type { RuleContext } from './rule-context.js';
|
|
19
19
|
/**
|
|
20
20
|
* Evaluate a single intent-aware context to at most one validation code.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-engine.d.ts","sourceRoot":"","sources":["../../../src/validators/rule-engine/rule-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAiB,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"rule-engine.d.ts","sourceRoot":"","sources":["../../../src/validators/rule-engine/rule-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAiB,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAEjG,OAAO,KAAK,EAAY,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAgI/D;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAE3D;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,GAAE,eAAoB,GAAG,eAAe,CAwB7F"}
|