@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendor-manifest.js","sourceRoot":"","sources":["../../src/skill-test/vendor-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEzF,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8EAA8E;AAC9E,wCAAwC;AACxC,8EAA8E;AAE9E,qDAAqD;AACrD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC;KACpC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;KACnD,MAAM,EAAE,CAAC;AAIZ,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,iBAAiB,GAAG,wBAAwB,CAAC;AAEnD,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E;;;GAGG;AACH,SAAS,YAAY,CAAC,GAAW,EAAE,OAAe;IAChD,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,MAAM,IAAI,GAAG,CAAC,OAAe,EAAQ,EAAE;QACrC,
|
|
1
|
+
{"version":3,"file":"vendor-manifest.js","sourceRoot":"","sources":["../../src/skill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E,wEAAwE;IACxE,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAClD,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,IAAI,GAAG,KAAK,iBAAiB;YAAE,SAAS;QACxC,IAAI,CAAC,CAAC,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/test-input.d.ts
CHANGED
|
@@ -25,9 +25,51 @@
|
|
|
25
25
|
* This module is the ONE definition of where a skill's test input lives, shared by
|
|
26
26
|
* every packaging lane, so no lane can answer the question differently.
|
|
27
27
|
*/
|
|
28
|
-
import { type ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
|
|
29
28
|
import type { SkillPackagingConfig } from '@vibe-agent-toolkit/resources';
|
|
29
|
+
import { type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
30
30
|
import { type SkillFileEntry } from './files-config.js';
|
|
31
|
+
/**
|
|
32
|
+
* Answers "does this skill root carry the conventional suite at
|
|
33
|
+
* `<skill-root>/evals/evals.json`?" — see {@link conventionalSuiteProbe} for the
|
|
34
|
+
* one that memoizes, and for why its lifetime is the RUN and not longer.
|
|
35
|
+
*/
|
|
36
|
+
export type ConventionalSuiteProbe = (skillDir: string) => boolean;
|
|
37
|
+
/**
|
|
38
|
+
* A probe for "does this skill carry the conventional suite at
|
|
39
|
+
* `<skill-root>/evals/evals.json`?", answering each directory from the filesystem
|
|
40
|
+
* at most once.
|
|
41
|
+
*
|
|
42
|
+
* The one filesystem touch in this module, and the reason the default convention can
|
|
43
|
+
* be honored without guessing from a directory name. Everything else here is pure
|
|
44
|
+
* path math over a config.
|
|
45
|
+
*
|
|
46
|
+
* Deduplicated because {@link resolveTestInputDirs} asks the question once for the
|
|
47
|
+
* subject and once per entry in `projectSkills` — and a package that keeps its
|
|
48
|
+
* skills in ONE directory (VAT's own `vat-development-agents` keeps thirteen there)
|
|
49
|
+
* makes every one of those the same question about the same path.
|
|
50
|
+
*
|
|
51
|
+
* SCOPE: one RUN, not one call. Every lane here loops over the project's skills and
|
|
52
|
+
* hands each of them the same project-wide `projectSkills`, so a probe scoped to the
|
|
53
|
+
* CALL re-asks S questions per skill and S² per run about the same S paths — and the
|
|
54
|
+
* memo hides that inside one call while doing nothing across the loop. Measured with
|
|
55
|
+
* the lab on a 103-skill adopter, `vat resources validate`: 10,815 probes over 103
|
|
56
|
+
* distinct paths, ~105 repeats each, and exactly 50% of that command's 21,648 user
|
|
57
|
+
* filesystem calls. Run-scoped it is ~103, and the command's total ~10,900.
|
|
58
|
+
*
|
|
59
|
+
* It survived because VAT's own tree cannot show it: measured on `vat audit .`, 14
|
|
60
|
+
* probes over 2 DISTINCT paths — 2² = 4 is invisible next to the constant factor, and
|
|
61
|
+
* "14 probes" reads like a rounding error rather than a complexity class. Only a tree
|
|
62
|
+
* with a large S separates O(S) from O(S²) here.
|
|
63
|
+
*
|
|
64
|
+
* The memo is created per run and dies with it. It deliberately is NOT module-level,
|
|
65
|
+
* and widening it to the run does not weaken that: this module's answer is a snapshot
|
|
66
|
+
* of the filesystem, and a run is the longest window over which the lanes already
|
|
67
|
+
* assume one snapshot — they take `projectSkills` (the project's whole skill set and
|
|
68
|
+
* its configs) once per run and answer every skill from it. A cache outliving the run
|
|
69
|
+
* would keep answering for a tree that has since changed — in a long-lived process,
|
|
70
|
+
* and across every later test in the same worker.
|
|
71
|
+
*/
|
|
72
|
+
export declare function conventionalSuiteProbe(): ConventionalSuiteProbe;
|
|
31
73
|
/** One skill's eval-suite declaration, as the PROJECT config states it. */
|
|
32
74
|
export interface DeclaredEvalSuite {
|
|
33
75
|
/** Absolute path to that skill's root directory (the dir holding its SKILL.md). */
|
|
@@ -46,7 +88,7 @@ export interface DeclaredEvalSuite {
|
|
|
46
88
|
* the walker bundled it — with no exclusion and no `PACKAGED_TEST_INPUT` receipt,
|
|
47
89
|
* because nothing under the subject's config named that path.
|
|
48
90
|
*
|
|
49
|
-
* Observed ACTIVE on a 90-skill adopter (
|
|
91
|
+
* Observed ACTIVE on a 90-skill adopter (`vat skills build`): a built
|
|
50
92
|
* bundle contained a file byte-identical to a DIFFERENT skill's real eval suite,
|
|
51
93
|
* carried under that bundle's own subtree. The answer key shipped. A basename
|
|
52
94
|
* collision between two such suites does not save anyone — a FILENAME_COLLISION is
|
|
@@ -69,12 +111,18 @@ export interface DeclaredEvalSuite {
|
|
|
69
111
|
* SCOPE OF THE CROSS-SKILL HALF — another skill's suite dir travels to this build only
|
|
70
112
|
* when it lies INSIDE that skill's own directory. A `test.evals` pointing at a SHARED
|
|
71
113
|
* directory already strips that whole directory from the declaring skill's bundle
|
|
72
|
-
* (
|
|
114
|
+
* (by design); honouring it project-wide would turn one skill's over-broad
|
|
73
115
|
* declaration into a project-wide strip of a directory no single skill owns. The
|
|
74
116
|
* declaring skill's own build is unchanged — the `config`/`skillDir` pair above is
|
|
75
117
|
* still taken at face value — so this narrows nothing that worked before.
|
|
118
|
+
*
|
|
119
|
+
* `hasConventionalSuite` is the RUN's probe (see {@link conventionalSuiteProbe}),
|
|
120
|
+
* and it is REQUIRED for the same reason `projectSkills` is: a defaulted `probe?`
|
|
121
|
+
* would let every existing caller keep the per-call scope silently, which is the
|
|
122
|
+
* exact no-op this file already shipped once. A lane with no run to scope to calls
|
|
123
|
+
* `conventionalSuiteProbe()` at its own call site, where the narrowing is visible.
|
|
76
124
|
*/
|
|
77
|
-
export declare function resolveTestInputDirs(config: Pick<SkillPackagingConfig, 'test'>, skillDir: string, projectSkills: readonly DeclaredEvalSuite[]): string[];
|
|
125
|
+
export declare function resolveTestInputDirs(config: Pick<SkillPackagingConfig, 'test'>, skillDir: string, projectSkills: readonly DeclaredEvalSuite[], hasConventionalSuite: ConventionalSuiteProbe): string[];
|
|
78
126
|
/**
|
|
79
127
|
* Exclude rules that drop any link into declared test input from the bundle.
|
|
80
128
|
*
|
|
@@ -116,11 +164,14 @@ export declare function partitionTestInputFileEntries(filesConfig: readonly Skil
|
|
|
116
164
|
* agree. The packager is the authority on what ships; this is how the read-only
|
|
117
165
|
* lanes borrow its answer instead of guessing.
|
|
118
166
|
*
|
|
119
|
-
* `projectSkills`
|
|
120
|
-
* pointing at ANOTHER skill's
|
|
121
|
-
*
|
|
167
|
+
* `projectSkills` and `hasConventionalSuite` are forwarded to
|
|
168
|
+
* {@link resolveTestInputDirs}, so a `files:` entry pointing at ANOTHER skill's
|
|
169
|
+
* declared suite is dropped here too. Both are required for the same reason they are
|
|
170
|
+
* required there — see that function's note on the no-op default. This is the seam
|
|
171
|
+
* the measured quadratic ran through: `vat resources validate` calls this once per
|
|
172
|
+
* discovered skill, so the run's probe has to arrive from the caller's loop.
|
|
122
173
|
*/
|
|
123
|
-
export declare function packagedFileEntries(config: Pick<SkillPackagingConfig, 'files' | 'test'>, skillDir: string, projectRoot: string, projectSkills: readonly DeclaredEvalSuite[]): SkillFileEntry[];
|
|
174
|
+
export declare function packagedFileEntries(config: Pick<SkillPackagingConfig, 'files' | 'test'>, skillDir: string, projectRoot: string, projectSkills: readonly DeclaredEvalSuite[], hasConventionalSuite: ConventionalSuiteProbe): SkillFileEntry[];
|
|
124
175
|
/** A `PACKAGED_TEST_INPUT` receipt per dropped `files:` entry — a warning, not a failure. */
|
|
125
176
|
export declare function testInputFileEntryIssues(dropped: readonly SkillFileEntry[]): ValidationIssue[];
|
|
126
177
|
/** The shape of a walker exclusion this module needs: where it pointed, and from what link. */
|
package/dist/test-input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-input.d.ts","sourceRoot":"","sources":["../src/test-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"test-input.d.ts","sourceRoot":"","sources":["../src/test-input.ts"],"names":[],"mappings":"AAAA;;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A;CAAE,CAWvD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,MAAM,CAAC,EACpD,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,SAAS,iBAAiB,EAAE,EAC3C,oBAAoB,EAAE,sBAAsB,GAC3C,cAAc,EAAE,CAMlB;AAED,6FAA6F;AAC7F,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,GAAG,eAAe,EAAE,CAU9F;AAED,+FAA+F;AAC/F,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,SAAS,eAAe,EAAE,EACpC,aAAa,EAAE,SAAS,MAAM,EAAE,EAChC,WAAW,EAAE,MAAM,EACnB,YAAY,GAAE,MAAoB,GACjC,eAAe,EAAE,CAsBnB;AAED,MAAM,WAAW,2BAA2B;IAC1C,2EAA2E;IAC3E,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,+EAA+E;IAC/E,UAAU,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,GAAG,eAAe,EAAE,CAW5F"}
|
package/dist/test-input.js
CHANGED
|
@@ -27,19 +27,55 @@
|
|
|
27
27
|
*/
|
|
28
28
|
import { existsSync } from 'node:fs';
|
|
29
29
|
import { dirname } from 'node:path';
|
|
30
|
-
import { isGlob, issueLocation, safePath, staticGlobBase, toForwardSlash } from '@vibe-agent-toolkit/utils';
|
|
30
|
+
import { isGlob, issueLocation, relativeEscapesRoot, safePath, staticGlobBase, toForwardSlash, toForwardSlashAnyPlatform } from '@vibe-agent-toolkit/utils';
|
|
31
31
|
import { DEFAULT_EVALS_SUBPATH } from './skill-test/eval-suite-isolation.js';
|
|
32
32
|
import { materializeIssue } from './validators/rule-engine/index.js';
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* A probe for "does this skill carry the conventional suite at
|
|
35
|
+
* `<skill-root>/evals/evals.json`?", answering each directory from the filesystem
|
|
36
|
+
* at most once.
|
|
35
37
|
*
|
|
36
38
|
* The one filesystem touch in this module, and the reason the default convention can
|
|
37
39
|
* be honored without guessing from a directory name. Everything else here is pure
|
|
38
40
|
* path math over a config.
|
|
41
|
+
*
|
|
42
|
+
* Deduplicated because {@link resolveTestInputDirs} asks the question once for the
|
|
43
|
+
* subject and once per entry in `projectSkills` — and a package that keeps its
|
|
44
|
+
* skills in ONE directory (VAT's own `vat-development-agents` keeps thirteen there)
|
|
45
|
+
* makes every one of those the same question about the same path.
|
|
46
|
+
*
|
|
47
|
+
* SCOPE: one RUN, not one call. Every lane here loops over the project's skills and
|
|
48
|
+
* hands each of them the same project-wide `projectSkills`, so a probe scoped to the
|
|
49
|
+
* CALL re-asks S questions per skill and S² per run about the same S paths — and the
|
|
50
|
+
* memo hides that inside one call while doing nothing across the loop. Measured with
|
|
51
|
+
* the lab on a 103-skill adopter, `vat resources validate`: 10,815 probes over 103
|
|
52
|
+
* distinct paths, ~105 repeats each, and exactly 50% of that command's 21,648 user
|
|
53
|
+
* filesystem calls. Run-scoped it is ~103, and the command's total ~10,900.
|
|
54
|
+
*
|
|
55
|
+
* It survived because VAT's own tree cannot show it: measured on `vat audit .`, 14
|
|
56
|
+
* probes over 2 DISTINCT paths — 2² = 4 is invisible next to the constant factor, and
|
|
57
|
+
* "14 probes" reads like a rounding error rather than a complexity class. Only a tree
|
|
58
|
+
* with a large S separates O(S) from O(S²) here.
|
|
59
|
+
*
|
|
60
|
+
* The memo is created per run and dies with it. It deliberately is NOT module-level,
|
|
61
|
+
* and widening it to the run does not weaken that: this module's answer is a snapshot
|
|
62
|
+
* of the filesystem, and a run is the longest window over which the lanes already
|
|
63
|
+
* assume one snapshot — they take `projectSkills` (the project's whole skill set and
|
|
64
|
+
* its configs) once per run and answer every skill from it. A cache outliving the run
|
|
65
|
+
* would keep answering for a tree that has since changed — in a long-lived process,
|
|
66
|
+
* and across every later test in the same worker.
|
|
39
67
|
*/
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
return
|
|
68
|
+
export function conventionalSuiteProbe() {
|
|
69
|
+
const answers = new Map();
|
|
70
|
+
return (skillDir) => {
|
|
71
|
+
const suitePath = safePath.resolve(skillDir, DEFAULT_EVALS_SUBPATH);
|
|
72
|
+
const cached = answers.get(suitePath);
|
|
73
|
+
if (cached !== undefined)
|
|
74
|
+
return cached;
|
|
75
|
+
const found = existsSync(suitePath);
|
|
76
|
+
answers.set(suitePath, found);
|
|
77
|
+
return found;
|
|
78
|
+
};
|
|
43
79
|
}
|
|
44
80
|
/** True when `candidate` is inside (or equal to) `dir`. Both are absolute. */
|
|
45
81
|
function isInside(candidate, dir) {
|
|
@@ -69,7 +105,7 @@ function isInside(candidate, dir) {
|
|
|
69
105
|
* root `evals/` holding no `evals.json`. Guessing from the name alone would silently
|
|
70
106
|
* drop an author's unrelated directory out of their own bundle.
|
|
71
107
|
*/
|
|
72
|
-
function declaredTestInputDirs(config, skillDir) {
|
|
108
|
+
function declaredTestInputDirs(config, skillDir, hasConventionalSuite) {
|
|
73
109
|
if (config.test === undefined && !hasConventionalSuite(skillDir))
|
|
74
110
|
return [];
|
|
75
111
|
const subpath = config.test?.evals ?? DEFAULT_EVALS_SUBPATH;
|
|
@@ -91,7 +127,7 @@ function declaredTestInputDirs(config, skillDir) {
|
|
|
91
127
|
* the walker bundled it — with no exclusion and no `PACKAGED_TEST_INPUT` receipt,
|
|
92
128
|
* because nothing under the subject's config named that path.
|
|
93
129
|
*
|
|
94
|
-
* Observed ACTIVE on a 90-skill adopter (
|
|
130
|
+
* Observed ACTIVE on a 90-skill adopter (`vat skills build`): a built
|
|
95
131
|
* bundle contained a file byte-identical to a DIFFERENT skill's real eval suite,
|
|
96
132
|
* carried under that bundle's own subtree. The answer key shipped. A basename
|
|
97
133
|
* collision between two such suites does not save anyone — a FILENAME_COLLISION is
|
|
@@ -114,15 +150,21 @@ function declaredTestInputDirs(config, skillDir) {
|
|
|
114
150
|
* SCOPE OF THE CROSS-SKILL HALF — another skill's suite dir travels to this build only
|
|
115
151
|
* when it lies INSIDE that skill's own directory. A `test.evals` pointing at a SHARED
|
|
116
152
|
* directory already strips that whole directory from the declaring skill's bundle
|
|
117
|
-
* (
|
|
153
|
+
* (by design); honouring it project-wide would turn one skill's over-broad
|
|
118
154
|
* declaration into a project-wide strip of a directory no single skill owns. The
|
|
119
155
|
* declaring skill's own build is unchanged — the `config`/`skillDir` pair above is
|
|
120
156
|
* still taken at face value — so this narrows nothing that worked before.
|
|
157
|
+
*
|
|
158
|
+
* `hasConventionalSuite` is the RUN's probe (see {@link conventionalSuiteProbe}),
|
|
159
|
+
* and it is REQUIRED for the same reason `projectSkills` is: a defaulted `probe?`
|
|
160
|
+
* would let every existing caller keep the per-call scope silently, which is the
|
|
161
|
+
* exact no-op this file already shipped once. A lane with no run to scope to calls
|
|
162
|
+
* `conventionalSuiteProbe()` at its own call site, where the narrowing is visible.
|
|
121
163
|
*/
|
|
122
|
-
export function resolveTestInputDirs(config, skillDir, projectSkills) {
|
|
123
|
-
const dirs = new Set(declaredTestInputDirs(config, skillDir));
|
|
164
|
+
export function resolveTestInputDirs(config, skillDir, projectSkills, hasConventionalSuite) {
|
|
165
|
+
const dirs = new Set(declaredTestInputDirs(config, skillDir, hasConventionalSuite));
|
|
124
166
|
for (const skill of projectSkills) {
|
|
125
|
-
for (const dir of declaredTestInputDirs(skill.config, skill.skillDir)) {
|
|
167
|
+
for (const dir of declaredTestInputDirs(skill.config, skill.skillDir, hasConventionalSuite)) {
|
|
126
168
|
if (isInside(dir, skill.skillDir))
|
|
127
169
|
dirs.add(dir);
|
|
128
170
|
}
|
|
@@ -145,7 +187,7 @@ function projectRelativeTestInputDirs(testInputDirs, projectRoot) {
|
|
|
145
187
|
const inside = [];
|
|
146
188
|
for (const dir of testInputDirs) {
|
|
147
189
|
const rel = toForwardSlash(safePath.relative(projectRoot, dir));
|
|
148
|
-
if (rel === '' || rel
|
|
190
|
+
if (rel === '' || relativeEscapesRoot(rel))
|
|
149
191
|
continue;
|
|
150
192
|
inside.push(dir);
|
|
151
193
|
}
|
|
@@ -208,18 +250,21 @@ export function partitionTestInputFileEntries(filesConfig, projectRoot, testInpu
|
|
|
208
250
|
* agree. The packager is the authority on what ships; this is how the read-only
|
|
209
251
|
* lanes borrow its answer instead of guessing.
|
|
210
252
|
*
|
|
211
|
-
* `projectSkills`
|
|
212
|
-
* pointing at ANOTHER skill's
|
|
213
|
-
*
|
|
253
|
+
* `projectSkills` and `hasConventionalSuite` are forwarded to
|
|
254
|
+
* {@link resolveTestInputDirs}, so a `files:` entry pointing at ANOTHER skill's
|
|
255
|
+
* declared suite is dropped here too. Both are required for the same reason they are
|
|
256
|
+
* required there — see that function's note on the no-op default. This is the seam
|
|
257
|
+
* the measured quadratic ran through: `vat resources validate` calls this once per
|
|
258
|
+
* discovered skill, so the run's probe has to arrive from the caller's loop.
|
|
214
259
|
*/
|
|
215
|
-
export function packagedFileEntries(config, skillDir, projectRoot, projectSkills) {
|
|
216
|
-
return partitionTestInputFileEntries(config.files ?? [], projectRoot, resolveTestInputDirs(config, skillDir, projectSkills)).kept;
|
|
260
|
+
export function packagedFileEntries(config, skillDir, projectRoot, projectSkills, hasConventionalSuite) {
|
|
261
|
+
return partitionTestInputFileEntries(config.files ?? [], projectRoot, resolveTestInputDirs(config, skillDir, projectSkills, hasConventionalSuite)).kept;
|
|
217
262
|
}
|
|
218
263
|
/** A `PACKAGED_TEST_INPUT` receipt per dropped `files:` entry — a warning, not a failure. */
|
|
219
264
|
export function testInputFileEntryIssues(dropped) {
|
|
220
265
|
return dropped.map((entry) => materializeIssue('PACKAGED_TEST_INPUT', {
|
|
221
|
-
location:
|
|
222
|
-
message: `files: entry "${
|
|
266
|
+
location: toForwardSlashAnyPlatform(entry.dest),
|
|
267
|
+
message: `files: entry "${toForwardSlashAnyPlatform(entry.source)} -> ${toForwardSlashAnyPlatform(entry.dest)}" points into ` +
|
|
223
268
|
`declared test input (some skill's test.evals) and was NOT packaged — test input, ` +
|
|
224
269
|
`including the expected_output answer key, never ships to consumers.`,
|
|
225
270
|
}));
|
package/dist/test-input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-input.js","sourceRoot":"","sources":["../src/test-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"test-input.js","sourceRoot":"","sources":["../src/test-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAG5J,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AASrE;;;;;;;;;;;;;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AAE,QAAQ,EAAE,CAAC,CACxE,CAAC;AACJ,CAAC"}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* tree-copies are three routes into a bundle, and only the first is visible to
|
|
15
15
|
* the walker.
|
|
16
16
|
*/
|
|
17
|
-
import { type ValidationIssue } from '@vibe-agent-toolkit/
|
|
17
|
+
import { type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
18
18
|
/**
|
|
19
19
|
* Report every repo-internal agent-instruction file present in a distributed
|
|
20
20
|
* tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-instruction-presence.d.ts","sourceRoot":"","sources":["../../src/validators/agent-instruction-presence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"agent-instruction-presence.d.ts","sourceRoot":"","sources":["../../src/validators/agent-instruction-presence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAelE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,mCAAmC,CACjD,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,SAAS,MAAM,EAAE,GAC/B,eAAe,EAAE,CA0CnB"}
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
* the walker.
|
|
16
16
|
*/
|
|
17
17
|
import { existsSync } from 'node:fs';
|
|
18
|
-
import {
|
|
18
|
+
import { issueLocation, safePath, transientRefusalClause } from '@vibe-agent-toolkit/utils';
|
|
19
|
+
import { crawlDirectorySync } from '@vibe-agent-toolkit/utils/crawl';
|
|
19
20
|
import { normalizeRelPath } from '../files-config.js';
|
|
20
21
|
import { materializeIssue } from './rule-engine/index.js';
|
|
21
22
|
import { AGENT_INSTRUCTION_FILE_PATTERNS, toAnyDepthGlobs } from './validation-rules.js';
|
|
@@ -47,7 +48,6 @@ const INCLUDE_GLOBS = toAnyDepthGlobs(AGENT_INSTRUCTION_FILE_PATTERNS);
|
|
|
47
48
|
* dest must not launder its whole subtree (see {@link explicitFilesConfigDests}).
|
|
48
49
|
*/
|
|
49
50
|
export function detectPackagedAgentInstructionFiles(rootDir, locationRoot, declaredDests) {
|
|
50
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- rootDir is a validated build-output path
|
|
51
51
|
if (!existsSync(rootDir))
|
|
52
52
|
return [];
|
|
53
53
|
const declared = new Set(declaredDests.map((d) => normalizeRelPath(d)));
|
|
@@ -55,6 +55,15 @@ export function detectPackagedAgentInstructionFiles(rootDir, locationRoot, decla
|
|
|
55
55
|
// subject is BUILT output, which normally lives under a gitignored `dist/`
|
|
56
56
|
// that the crawler's defaults would skip entirely — the scan would pass by
|
|
57
57
|
// scanning nothing.
|
|
58
|
+
//
|
|
59
|
+
// `unreadable` DEGRADES rather than stops: this detector is a backstop
|
|
60
|
+
// appended to a larger report (audit, verify, build), and one directory it
|
|
61
|
+
// cannot list must not destroy every finding beside it. The gap is not
|
|
62
|
+
// dropped either — each refusal becomes a `SCAN_PATH_UNREADABLE` finding
|
|
63
|
+
// below, anchored like the others, so a reader sees exactly which subtree
|
|
64
|
+
// this pass never saw. The crawler used to hand back the shorter list here
|
|
65
|
+
// with nothing said; that was the defect, not the throw.
|
|
66
|
+
const refusals = [];
|
|
58
67
|
const files = crawlDirectorySync({
|
|
59
68
|
baseDir: rootDir,
|
|
60
69
|
include: INCLUDE_GLOBS,
|
|
@@ -62,6 +71,7 @@ export function detectPackagedAgentInstructionFiles(rootDir, locationRoot, decla
|
|
|
62
71
|
absolute: true,
|
|
63
72
|
filesOnly: true,
|
|
64
73
|
respectGitignore: false,
|
|
74
|
+
unreadable: { degrade: (refusal) => refusals.push(refusal) },
|
|
65
75
|
});
|
|
66
76
|
const issues = [];
|
|
67
77
|
for (const file of files) {
|
|
@@ -74,6 +84,39 @@ export function detectPackagedAgentInstructionFiles(rootDir, locationRoot, decla
|
|
|
74
84
|
const location = issueLocation(file, locationRoot);
|
|
75
85
|
issues.push(materializeIssue('PACKAGED_AGENT_INSTRUCTION_FILE', { location, detail: location }));
|
|
76
86
|
}
|
|
87
|
+
for (const refusal of refusals) {
|
|
88
|
+
issues.push(unlistableDirectoryIssue(refusal, locationRoot));
|
|
89
|
+
}
|
|
77
90
|
return issues;
|
|
78
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* The finding for one directory this pass could not list.
|
|
94
|
+
*
|
|
95
|
+
* `SCAN_PATH_UNREADABLE` is the registry's existing code for exactly this shape
|
|
96
|
+
* ("was not scanned; findings from every readable sibling are still reported"),
|
|
97
|
+
* kept at its default `warning` — a second code for the same gap on a second
|
|
98
|
+
* lane would only split the count a reader greps for. The detail names the
|
|
99
|
+
* errno, which is what distinguishes a permissions problem from a descriptor
|
|
100
|
+
* shortage, and the location is anchored against `locationRoot` like every
|
|
101
|
+
* other finding here — `.` rather than `''` when the scanned tree itself
|
|
102
|
+
* refused, for the same reason `unreadablePathResult` in the audit command
|
|
103
|
+
* gives: an empty location reached the report as `location: ""` and rendered
|
|
104
|
+
* the detail as a bare `": EACCES …"`.
|
|
105
|
+
*
|
|
106
|
+
* ⚠️ Callers that ALSO walk this tree themselves (the audit command's
|
|
107
|
+
* directory scan) will meet the same refusal twice. That overlap is theirs to
|
|
108
|
+
* collapse, keyed on what this issue carries — code and location — because
|
|
109
|
+
* only the caller knows which of its lanes reached the directory; see
|
|
110
|
+
* `dedupeUnreadablePathResults` in the audit command.
|
|
111
|
+
*/
|
|
112
|
+
function unlistableDirectoryIssue(refusal, locationRoot) {
|
|
113
|
+
const location = issueLocation(refusal.directory, locationRoot) || '.';
|
|
114
|
+
const clause = refusal.transient
|
|
115
|
+
? `${transientRefusalClause(refusal.code)} — re-run before investigating anything`
|
|
116
|
+
: `listing was refused with ${refusal.code}`;
|
|
117
|
+
return materializeIssue('SCAN_PATH_UNREADABLE', {
|
|
118
|
+
location,
|
|
119
|
+
detail: `${location}: ${clause}; every agent-instruction file beneath it is unreported`,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
79
122
|
//# sourceMappingURL=agent-instruction-presence.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-instruction-presence.js","sourceRoot":"","sources":["../../src/validators/agent-instruction-presence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"agent-instruction-presence.js","sourceRoot":"","sources":["../../src/validators/agent-instruction-presence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAyB,MAAM,iCAAiC,CAAC;AAE5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,+BAA+B,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEzF;;;GAGG;AACH,MAAM,aAAa,GAAG,eAAe,CAAC,+BAA+B,CAAC,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,mCAAmC,CACjD,OAAe,EACf,YAAoB,EACpB,aAAgC;IAEhC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,EAAE,CAAC;IAEpC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAExE,8EAA8E;IAC9E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YAAoB;IAC/E,MAAM,QAAQ,GAAG,aAAa,CAAC,OAAO,CAAC,SAAS,EAAE,YAAY,CAAC,IAAI,GAAG,CAAC;IACvE,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS;QAC9B,CAAC,CAAC,GAAG,sBAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,yCAAyC;QAClF,CAAC,CAAC,4BAA4B,OAAO,CAAC,IAAI,EAAE,CAAC;IAC/C,OAAO,gBAAgB,CAAC,sBAAsB,EAAE;QAC9C,QAAQ;QACR,MAAM,EAAE,GAAG,QAAQ,KAAK,MAAM,yDAAyD;KACxF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -27,12 +27,14 @@
|
|
|
27
27
|
* or when link traversal reached it. Fenced code blocks are deliberately NOT
|
|
28
28
|
* parsed out: that approach was tried and rejected as too fragile.
|
|
29
29
|
*/
|
|
30
|
-
import { type ValidationIssue } from '@vibe-agent-toolkit/
|
|
30
|
+
import { type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
31
31
|
/**
|
|
32
|
-
* @param
|
|
33
|
-
*
|
|
32
|
+
* @param body The SKILL.md text the caller already holds — the validator read it
|
|
33
|
+
* once at its entry, and a second best-effort read here used to turn a refused
|
|
34
|
+
* read into an empty body, i.e. into "nothing mentions these files"
|
|
35
|
+
* @param skillDir Absolute path to the skill directory
|
|
34
36
|
* @param linkedFiles Absolute paths of files reached during BFS link traversal
|
|
35
37
|
* @param locationRoot Root the emitted `location` is expressed relative to
|
|
36
38
|
*/
|
|
37
|
-
export declare function detectBundledResourceWithoutLinks(
|
|
39
|
+
export declare function detectBundledResourceWithoutLinks(body: string, skillDir: string, linkedFiles: readonly string[], locationRoot: string): ValidationIssue[];
|
|
38
40
|
//# sourceMappingURL=bundled-resource-link-detection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundled-resource-link-detection.d.ts","sourceRoot":"","sources":["../../src/validators/bundled-resource-link-detection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;
|
|
1
|
+
{"version":3,"file":"bundled-resource-link-detection.d.ts","sourceRoot":"","sources":["../../src/validators/bundled-resource-link-detection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAKH,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AA6EjF;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,YAAY,EAAE,MAAM,GACnB,eAAe,EAAE,CA8BnB"}
|
|
@@ -27,11 +27,9 @@
|
|
|
27
27
|
* or when link traversal reached it. Fenced code blocks are deliberately NOT
|
|
28
28
|
* parsed out: that approach was tried and rejected as too fragile.
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { CODE_REGISTRY } from '@vibe-agent-toolkit/agent-schema';
|
|
34
|
-
import { issueLocation, safePath } from '@vibe-agent-toolkit/utils';
|
|
30
|
+
import { readdirSync } from 'node:fs';
|
|
31
|
+
import { CODE_REGISTRY } from '@vibe-agent-toolkit/schema';
|
|
32
|
+
import { direntKindFollowingSync, FollowedWalk, isPathAbsentError, issueLocation, safePath } from '@vibe-agent-toolkit/utils';
|
|
35
33
|
import { CLAUDE_WEB_REFERENCES_SUBDIR, TARGET_SUBDIR_CATEGORIES } from '../content-type-routing.js';
|
|
36
34
|
/**
|
|
37
35
|
* Subdirectories a packaged skill may bundle resources into.
|
|
@@ -46,37 +44,39 @@ const BUNDLED_SUBDIRS = [
|
|
|
46
44
|
];
|
|
47
45
|
/** How many dead file names the message spells out before summarising. */
|
|
48
46
|
const MAX_LISTED_FILES = 5;
|
|
49
|
-
/** Read SKILL.md content (best-effort) — empty string if unreadable. */
|
|
50
|
-
function readSkillContent(skillPath) {
|
|
51
|
-
try {
|
|
52
|
-
return readFileSync(skillPath, 'utf-8');
|
|
53
|
-
}
|
|
54
|
-
catch {
|
|
55
|
-
return '';
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
47
|
/**
|
|
59
48
|
* Every file under `dir`, recursively, as paths relative to `baseDir`
|
|
60
|
-
* (forward-slash normalised by safePath). Empty when `dir` is absent
|
|
61
|
-
*
|
|
49
|
+
* (forward-slash normalised by safePath). Empty when `dir` is absent or
|
|
50
|
+
* contains no files. A directory that is there and REFUSED throws: `[]` is
|
|
51
|
+
* this check's "nothing bundled, nothing to say", and a listing the OS would
|
|
52
|
+
* not hand over has not established that.
|
|
62
53
|
*/
|
|
63
|
-
function listFilesRelative(dir, baseDir) {
|
|
64
|
-
|
|
65
|
-
return [];
|
|
66
|
-
const found = [];
|
|
54
|
+
function listFilesRelative(dir, baseDir, walk) {
|
|
55
|
+
let entries;
|
|
67
56
|
try {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
found.push(...listFilesRelative(child, baseDir));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
57
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
if (isPathAbsentError(error))
|
|
61
|
+
return [];
|
|
62
|
+
throw error;
|
|
77
63
|
}
|
|
78
|
-
|
|
79
|
-
|
|
64
|
+
const guard = walk ?? new FollowedWalk();
|
|
65
|
+
if (walk === undefined)
|
|
66
|
+
guard.enter(dir);
|
|
67
|
+
const found = [];
|
|
68
|
+
for (const entry of entries) {
|
|
69
|
+
const child = safePath.join(dir, entry.name);
|
|
70
|
+
// Followed: a linked resource is a bundled resource for link purposes. A
|
|
71
|
+
// link back into the tree is refused by the walk guard, not recursed.
|
|
72
|
+
const kind = direntKindFollowingSync(dir, entry);
|
|
73
|
+
if (kind === 'file') {
|
|
74
|
+
found.push(safePath.relative(baseDir, child));
|
|
75
|
+
}
|
|
76
|
+
else if (kind === 'directory') {
|
|
77
|
+
guard.enter(child);
|
|
78
|
+
found.push(...listFilesRelative(child, baseDir, guard));
|
|
79
|
+
}
|
|
80
80
|
}
|
|
81
81
|
return found;
|
|
82
82
|
}
|
|
@@ -102,22 +102,22 @@ function summariseFiles(relPaths) {
|
|
|
102
102
|
return hidden > 0 ? `${shown} (and ${hidden} more)` : shown;
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
|
-
* @param
|
|
106
|
-
*
|
|
105
|
+
* @param body The SKILL.md text the caller already holds — the validator read it
|
|
106
|
+
* once at its entry, and a second best-effort read here used to turn a refused
|
|
107
|
+
* read into an empty body, i.e. into "nothing mentions these files"
|
|
108
|
+
* @param skillDir Absolute path to the skill directory
|
|
107
109
|
* @param linkedFiles Absolute paths of files reached during BFS link traversal
|
|
108
110
|
* @param locationRoot Root the emitted `location` is expressed relative to
|
|
109
111
|
*/
|
|
110
|
-
export function detectBundledResourceWithoutLinks(
|
|
112
|
+
export function detectBundledResourceWithoutLinks(body, skillDir, linkedFiles, locationRoot) {
|
|
111
113
|
const issues = [];
|
|
112
|
-
const body = readSkillContent(skillPath);
|
|
113
|
-
const baseDir = skillDir.length > 0 ? skillDir : dirname(skillPath);
|
|
114
114
|
const linked = new Set(linkedFiles.map((f) => safePath.resolve(f)));
|
|
115
115
|
for (const sub of BUNDLED_SUBDIRS) {
|
|
116
|
-
const subPath = safePath.join(
|
|
117
|
-
const bundled = listFilesRelative(subPath,
|
|
116
|
+
const subPath = safePath.join(skillDir, sub);
|
|
117
|
+
const bundled = listFilesRelative(subPath, skillDir);
|
|
118
118
|
if (bundled.length === 0)
|
|
119
119
|
continue;
|
|
120
|
-
const unreferenced = bundled.filter((rel) => !bodyMentionsFile(body, rel) && !linkedFilesCoverFile(linked, safePath.join(
|
|
120
|
+
const unreferenced = bundled.filter((rel) => !bodyMentionsFile(body, rel) && !linkedFilesCoverFile(linked, safePath.join(skillDir, rel)));
|
|
121
121
|
if (unreferenced.length === 0)
|
|
122
122
|
continue;
|
|
123
123
|
const entry = CODE_REGISTRY.SKILL_REFERENCES_BUT_NO_LINKS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundled-resource-link-detection.js","sourceRoot":"","sources":["../../src/validators/bundled-resource-link-detection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;
|
|
1
|
+
{"version":3,"file":"bundled-resource-link-detection.js","sourceRoot":"","sources":["../../src/validators/bundled-resource-link-detection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAwB,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE9H,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEpG;;;;;;;GAOG;AACH,MAAM,eAAe,GAAsB;IACzC,GAAG,IAAI,GAAG,CAAS,CAAC,GAAG,wBAAwB,EAAE,4BAA4B,CAAC,CAAC;CAChF,CAAC;AAEF,0EAA0E;AAC1E,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAE3B;;;;;;GAMG;AACH,SAAS,iBAAiB,CAAC,GAAW,EAAE,OAAe,EAAE,IAAmB;IAC1E,IAAI,OAAO,CAAC;IACZ,IAAI,CAAC;QACH,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,iBAAiB,CAAC,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACxC,MAAM,KAAK,CAAC;IACd,CAAC;IACD,MAAM,KAAK,GAAG,I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AM,GAAG;gBACtF,kEAAkE;gBAClE,GAAG,cAAc,CAAC,YAAY,CAAC,GAAG;YACpC,QAAQ,EAAE,aAAa,CAAC,OAAO,EAAE,YAAY,CAAC;YAC9C,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,SAAS,EAAE,KAAK,CAAC,SAAS;SAC3B,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -9,12 +9,29 @@
|
|
|
9
9
|
* Pattern IDs MUST be registered in PATTERN_REGISTRY (assertPatternRegistered
|
|
10
10
|
* is called against every emitted record).
|
|
11
11
|
*/
|
|
12
|
-
import { type ValidationIssue } from '@vibe-agent-toolkit/
|
|
12
|
+
import { type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
13
13
|
import type { EvidenceRecord, Observation } from '../evidence/index.js';
|
|
14
14
|
export interface DetectorOutput {
|
|
15
15
|
evidence: EvidenceRecord[];
|
|
16
16
|
observations: Observation[];
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* The `allowed-tools:` declarations a SKILL.md carries and the 1-based line of
|
|
20
|
+
* the key; `{ tools: [], line: 0 }` when the key is absent or the frontmatter
|
|
21
|
+
* does not parse (the skill validator names that file
|
|
22
|
+
* `SKILL_MISSING_FRONTMATTER` on the same run — nothing is read out of it here).
|
|
23
|
+
*
|
|
24
|
+
* 🚩 This used to be a hand parser that saw ONLY the `[…]` flow form and split
|
|
25
|
+
* it on commas. Claude Code's documented spelling is space-separated, and a
|
|
26
|
+
* block sequence is valid YAML, so `allowed-tools: Read Bash` and a `- Bash`
|
|
27
|
+
* list both read as NO declaration and the local-shell capability reported
|
|
28
|
+
* clean over them. The value now goes through the same `parseFrontmatter` the
|
|
29
|
+
* validator uses and the same `allowedToolsOf` the settings-compat checker uses.
|
|
30
|
+
*/
|
|
31
|
+
export declare function allowedToolsDeclarations(content: string): {
|
|
32
|
+
tools: string[];
|
|
33
|
+
line: number;
|
|
34
|
+
};
|
|
18
35
|
export declare function collectLocalShellEvidence(content: string, filePath: string, locationRoot: string): EvidenceRecord[];
|
|
19
36
|
export declare function collectExternalCLIEvidence(content: string, filePath: string, locationRoot: string): EvidenceRecord[];
|
|
20
37
|
export declare function collectBrowserAuthEvidence(content: string, filePath: string, locationRoot: string): EvidenceRecord[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compat-detectors.d.ts","sourceRoot":"","sources":["../../src/validators/compat-detectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAiC,KAAK,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"compat-detectors.d.ts","sourceRoot":"","sources":["../../src/validators/compat-detectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAiC,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAEjG,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AA8BxE,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B;AA6BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAgB3F;AAYD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,GACnB,cAAc,EAAE,CAkDlB;AASD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,GACnB,cAAc,EAAE,CA6BlB;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,GACnB,cAAc,E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