@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
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
* - vat skills build (block build on validation errors)
|
|
13
13
|
* - vat skills audit --user (report issues, exit 0 always)
|
|
14
14
|
*/
|
|
15
|
-
import { type
|
|
16
|
-
import {
|
|
17
|
-
import { type GitTracker } from '@vibe-agent-toolkit/utils';
|
|
15
|
+
import { type RegistryUnreadablePolicy, ResourceRegistry, type ResourcePopulationSource, type SkillExecutableEntry } from '@vibe-agent-toolkit/resources';
|
|
16
|
+
import { type AllowUsageLedger, type AllowRecord, type ValidationConfig, type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
17
|
+
import { type GitTracker } from '@vibe-agent-toolkit/utils/git';
|
|
18
18
|
import type { EvidenceRecord, Observation } from '../evidence/index.js';
|
|
19
|
-
import { type DeclaredEvalSuite } from '../test-input.js';
|
|
19
|
+
import { type ConventionalSuiteProbe, type DeclaredEvalSuite } from '../test-input.js';
|
|
20
20
|
/**
|
|
21
21
|
* Packaging configuration for skill validation.
|
|
22
22
|
* Replaces the old VatSkillMetadata parameter — accepts packaging options directly.
|
|
@@ -48,7 +48,7 @@ export interface SkillPackagingConfig {
|
|
|
48
48
|
targets?: ReadonlyArray<'claude-chat' | 'claude-cowork' | 'claude-code'>;
|
|
49
49
|
/**
|
|
50
50
|
* Declared executables the skill ships (name-stable references for eval
|
|
51
|
-
* `toolExpectations` + launch-guidance linting
|
|
51
|
+
* `toolExpectations` + launch-guidance linting). The
|
|
52
52
|
* config merge (`mergeSkillPackagingConfig`) copies this through generically;
|
|
53
53
|
* declaring it here lets consumers (e.g. `vat skill test run`) read it typed.
|
|
54
54
|
*/
|
|
@@ -66,7 +66,7 @@ export interface SkillPackagingConfig {
|
|
|
66
66
|
/** Excluded reference detail for verbose output */
|
|
67
67
|
export interface ExcludedReferenceDetail {
|
|
68
68
|
path: string;
|
|
69
|
-
reason: 'depth-exceeded' | 'pattern-matched' | 'outside-project' | 'navigation-file' | 'agent-instruction-file' | 'skill-definition' | 'gitignored';
|
|
69
|
+
reason: 'depth-exceeded' | 'pattern-matched' | 'outside-project' | 'navigation-file' | 'agent-instruction-file' | 'skill-definition' | 'gitignored' | 'non-routable-source';
|
|
70
70
|
matchedPattern?: string | undefined;
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
@@ -81,7 +81,7 @@ export interface PackagingValidationResult {
|
|
|
81
81
|
*
|
|
82
82
|
* It therefore says NOTHING about warnings or info. Read {@link
|
|
83
83
|
* PackagingValidationResult.allErrors} for the distribution — via
|
|
84
|
-
* `countBySeverity(result.allErrors)` from `@vibe-agent-toolkit/
|
|
84
|
+
* `countBySeverity(result.allErrors)` from `@vibe-agent-toolkit/schema`,
|
|
85
85
|
* which is the same collapse every other lane uses.
|
|
86
86
|
*/
|
|
87
87
|
status: 'success' | 'error';
|
|
@@ -98,7 +98,7 @@ export interface PackagingValidationResult {
|
|
|
98
98
|
* including its paragraph-length `fix` and `reference` prose — was written to
|
|
99
99
|
* the output document twice. Derive the partition instead:
|
|
100
100
|
* {@link activeErrorsOf} / {@link activeWarningsOf}, or `countBySeverity` /
|
|
101
|
-
* `calculateValidationStatus` from `@vibe-agent-toolkit/
|
|
101
|
+
* `calculateValidationStatus` from `@vibe-agent-toolkit/schema`.
|
|
102
102
|
*/
|
|
103
103
|
allErrors: ValidationIssue[];
|
|
104
104
|
/** Issues suppressed by allow entries */
|
|
@@ -139,13 +139,40 @@ type WithAllErrors = Pick<PackagingValidationResult, 'allErrors'>;
|
|
|
139
139
|
export declare function activeErrorsOf(result: WithAllErrors): ValidationIssue[];
|
|
140
140
|
/** The active warnings: emitted, resolved-severity `warning`. Derived on read. */
|
|
141
141
|
export declare function activeWarningsOf(result: WithAllErrors): ValidationIssue[];
|
|
142
|
+
/**
|
|
143
|
+
* Options for {@link crawlAndResolveRegistry}.
|
|
144
|
+
*/
|
|
145
|
+
export interface CrawlRegistryOptions {
|
|
146
|
+
/**
|
|
147
|
+
* What the crawl does with a directory it cannot list — the caller's ruling,
|
|
148
|
+
* required, no default: `'refuse'` for every verb that acts on the registry as
|
|
149
|
+
* a complete population, `{ degrade }` for `vat audit`. See
|
|
150
|
+
* {@link RegistryUnreadablePolicy} on the registry for the two rulings.
|
|
151
|
+
*
|
|
152
|
+
* NOT part of the memo key: the memo replays the refusals the ONE crawl met
|
|
153
|
+
* into every later caller's policy, so a `'refuse'` caller served a registry
|
|
154
|
+
* that was built under `{ degrade }` still gets its throw — see
|
|
155
|
+
* {@link MemoizedRegistry}.
|
|
156
|
+
*/
|
|
157
|
+
unreadable: RegistryUnreadablePolicy;
|
|
158
|
+
/**
|
|
159
|
+
* Where the file list comes from — omit for the incumbent walk, supply one to
|
|
160
|
+
* source it from a projection instead.
|
|
161
|
+
*
|
|
162
|
+
* Also part of the memo key, by identity: see {@link sourcedRegistryCache}.
|
|
163
|
+
*
|
|
164
|
+
* Selecting the lane stays the CLI's job. This signature takes a source, never
|
|
165
|
+
* an environment, so a library caller that passes nothing keeps the walk.
|
|
166
|
+
*/
|
|
167
|
+
populationSource?: ResourcePopulationSource | undefined;
|
|
168
|
+
}
|
|
142
169
|
/**
|
|
143
170
|
* Build a fresh ResourceRegistry for a single skill's projectRoot and resolve
|
|
144
171
|
* internal links. Extracted so the skill validator can fall back to a private
|
|
145
172
|
* registry when the caller does not supply a shared one.
|
|
146
173
|
*
|
|
147
174
|
* Crawls markdown AND HTML (`.html`/`.htm`) so the live audit/validate path
|
|
148
|
-
* sees the same link graph the built path does
|
|
175
|
+
* sees the same link graph the built path does. The registry
|
|
149
176
|
* parses HTML via parse5 and surfaces its `local_file` links, so the walker
|
|
150
177
|
* traverses HTML references and catches HTML broken links at source time — not
|
|
151
178
|
* just at build time. (Previously the crawl was markdown-only, so source HTML
|
|
@@ -153,8 +180,46 @@ export declare function activeWarningsOf(result: WithAllErrors): ValidationIssue
|
|
|
153
180
|
*
|
|
154
181
|
* Exported so external callers (e.g. the inventory layer) can build a registry
|
|
155
182
|
* once and pass it down rather than re-crawling per skill.
|
|
183
|
+
*
|
|
184
|
+
* ## Why the config is READ here rather than threaded in
|
|
185
|
+
*
|
|
186
|
+
* A collection may declare a `mimeType` that overrides `mime-type.ts`'s
|
|
187
|
+
* extension tables and so decides which parser runs; `ResourceRegistry` honours
|
|
188
|
+
* those declarations only when it was handed a config, and the projection lane
|
|
189
|
+
* behind `populationSource` reads them off the root. A config-less registry
|
|
190
|
+
* therefore disagrees with the population that enumerated it about whether a
|
|
191
|
+
* file is prose, inside a single command.
|
|
192
|
+
*
|
|
193
|
+
* Threading was considered and does not fit this function. Its callers discover
|
|
194
|
+
* `projectRoot` **per skill** (`findProjectRoot` from each SKILL.md's directory,
|
|
195
|
+
* and one `vat audit --user` run reached at least 72 distinct roots), so no
|
|
196
|
+
* caller holds one config that governs them all. Worse, the memo below is keyed
|
|
197
|
+
* on the root ALONE: an optional config argument would let two callers of one
|
|
198
|
+
* root disagree and silently share whichever registry was built first.
|
|
199
|
+
*
|
|
200
|
+
* Reading it here is what `createProjectRegistry` in `skill-packager.ts` already
|
|
201
|
+
* does, with the same `loadConfig`, for the same stated reason — "a registry
|
|
202
|
+
* built without config silently belongs to no collection, so a lane that built
|
|
203
|
+
* its own config-less registry rewrote frontmatter differently from the lane
|
|
204
|
+
* that used this one". One read per root per process, behind the memo, against a
|
|
205
|
+
* crawl that parses every document under it.
|
|
206
|
+
*
|
|
207
|
+
* ## A broken config falls back here, and is reported by the caller
|
|
208
|
+
*
|
|
209
|
+
* Unlike `createProjectRegistry`, this must NOT throw on a config that exists
|
|
210
|
+
* and will not parse. Its principal caller is `vat audit`, whose pinned
|
|
211
|
+
* behaviour is "tolerates, falls back to config-free validation" — a bulk linter
|
|
212
|
+
* over trees VAT does not own must not be aborted by someone else's YAML
|
|
213
|
+
* (`cli/test/integration/config-broken-behavior.integration.test.ts` is the map).
|
|
214
|
+
*
|
|
215
|
+
* The fallback is not the silent conflation that rule normally forbids, because
|
|
216
|
+
* nothing is being hidden: `vat audit` reads the same config at its own layer,
|
|
217
|
+
* catches `ConfigLoadError` there, and reports it. What this does is decline to
|
|
218
|
+
* abort a scan from four frames down. A config that will not parse also gives
|
|
219
|
+
* the projection lane no declarations, so the two lanes still AGREE — which is
|
|
220
|
+
* the property this function exists to hold.
|
|
156
221
|
*/
|
|
157
|
-
export declare function crawlAndResolveRegistry(projectRoot: string): Promise<ResourceRegistry>;
|
|
222
|
+
export declare function crawlAndResolveRegistry(projectRoot: string, options: CrawlRegistryOptions): Promise<ResourceRegistry>;
|
|
158
223
|
/**
|
|
159
224
|
* Drop every memoized registry.
|
|
160
225
|
*
|
|
@@ -181,8 +246,43 @@ export declare function resetPackagingRegistryCache(): void;
|
|
|
181
246
|
* legacy per-skill behavior so one-off callers keep working.
|
|
182
247
|
*/
|
|
183
248
|
export interface SkillValidationSharedContext {
|
|
249
|
+
/**
|
|
250
|
+
* What the validator's OWN registry crawl does with a directory it cannot
|
|
251
|
+
* list, when it has to build one (no `registry` below, or one that does not
|
|
252
|
+
* cover this skill) — the caller's ruling, and the ONE required field here:
|
|
253
|
+
* `'refuse'` for `vat skills validate`/`build`, `vat skill review` and the
|
|
254
|
+
* packager's post-build check, `{ degrade }` for `vat audit`, whose directory
|
|
255
|
+
* lane supplies no registry and reaches {@link crawlAndResolveRegistry} through
|
|
256
|
+
* exactly this seam. See {@link RegistryUnreadablePolicy}.
|
|
257
|
+
*
|
|
258
|
+
* Ignored when `registry` below already covers the skill, for the same reason
|
|
259
|
+
* `populationSource` is: the caller that built it has already ruled.
|
|
260
|
+
*
|
|
261
|
+
* A caller that passes NO shared context at all is a single-skill lane whose
|
|
262
|
+
* result is acted on whole, and is ruled `'refuse'` by
|
|
263
|
+
* {@link validateSkillForPackaging} — said there, once, not defaulted here.
|
|
264
|
+
*/
|
|
265
|
+
unreadable: RegistryUnreadablePolicy;
|
|
184
266
|
/** Pre-built registry that covers the skill's project root. */
|
|
185
267
|
registry?: ResourceRegistry;
|
|
268
|
+
/**
|
|
269
|
+
* Where the file list for the validator's OWN registry comes from, when it has
|
|
270
|
+
* to build one (no `registry` above, or one that does not cover this skill).
|
|
271
|
+
*
|
|
272
|
+
* The lane seam for `vat skills build`, which — unlike `vat skills validate` —
|
|
273
|
+
* supplies no shared registry and so reaches {@link crawlAndResolveRegistry}
|
|
274
|
+
* per skill. Without this, a projection-lane build still enumerated that one
|
|
275
|
+
* registry with the walk, which was the last packaging enumeration on it.
|
|
276
|
+
*
|
|
277
|
+
* Ignored when `registry` above already covers the skill: a caller that built
|
|
278
|
+
* the registry itself has already chosen its lane, and re-deciding it here
|
|
279
|
+
* would let one call carry two answers.
|
|
280
|
+
*
|
|
281
|
+
* Supply the SAME closure for every skill in a run (that is what
|
|
282
|
+
* `withResourcePopulationSource` hands out), or the memo keys each call
|
|
283
|
+
* separately and the run pays a crawl per skill.
|
|
284
|
+
*/
|
|
285
|
+
populationSource?: ResourcePopulationSource;
|
|
186
286
|
/** Pre-populated tracker for the repo that contains the skill. */
|
|
187
287
|
gitTracker?: GitTracker;
|
|
188
288
|
/**
|
|
@@ -242,6 +342,24 @@ export interface SkillValidationSharedContext {
|
|
|
242
342
|
* false for anything that loops over discovered skills.
|
|
243
343
|
*/
|
|
244
344
|
projectSkills?: readonly DeclaredEvalSuite[];
|
|
345
|
+
/**
|
|
346
|
+
* The RUN's conventional-suite probe — the memo behind "does `<skill-root>/evals/
|
|
347
|
+
* evals.json` exist?" for every root in {@link projectSkills}.
|
|
348
|
+
*
|
|
349
|
+
* Scoped to the run for the same reason `projectSkills` is assembled once: the two
|
|
350
|
+
* are the same question asked of the same S paths, and this lane asks it for the
|
|
351
|
+
* SUBJECT and for every entry in `projectSkills`. A probe created per call answers
|
|
352
|
+
* S questions per skill and S² per run — measured at 10,815 filesystem probes over
|
|
353
|
+
* 103 distinct paths on a 103-skill adopter, half of that command's entire fs
|
|
354
|
+
* traffic. Supply the SAME probe for every skill in the run.
|
|
355
|
+
*
|
|
356
|
+
* Omitting it is a positive claim that THIS call is the whole run — true for the
|
|
357
|
+
* single-skill callers (`vat skill review`, `vat audit`, whose shared context is
|
|
358
|
+
* built per skill), where the per-call and run-level answers coincide. False for
|
|
359
|
+
* anything that loops, which is why the fallback below is written at the call site
|
|
360
|
+
* rather than defaulted inside `resolveTestInputDirs`.
|
|
361
|
+
*/
|
|
362
|
+
suiteProbe?: ConventionalSuiteProbe;
|
|
245
363
|
}
|
|
246
364
|
/**
|
|
247
365
|
* Validate a skill for packaging
|
|
@@ -267,5 +385,26 @@ export declare function validateSkillForPackaging(skillPath: string, packagingCo
|
|
|
267
385
|
* with values derived from the skill path.
|
|
268
386
|
*/
|
|
269
387
|
export declare function detectNameMismatchIssue(frontmatterName: unknown, parentDir: string, skillLocation: string): ValidationIssue | null;
|
|
388
|
+
/**
|
|
389
|
+
* Collect NON_PORTABLE_ASSET_REFERENCE issues — scan one skill document for any
|
|
390
|
+
* member of the non-portable asset-reference family.
|
|
391
|
+
*/
|
|
392
|
+
export declare function collectNonPortableAssetReferenceIssues(content: string, docLocation: string, issues: ValidationIssue[]): void;
|
|
393
|
+
/**
|
|
394
|
+
* Collect NON_PORTABLE_COMMAND issues — scan one skill document for any member of
|
|
395
|
+
* the non-portable shell-command family.
|
|
396
|
+
*/
|
|
397
|
+
export declare function collectNonPortableCommandIssues(content: string, docLocation: string, issues: ValidationIssue[]): void;
|
|
398
|
+
/**
|
|
399
|
+
* Process links from parsed markdown and return resolved .md file paths.
|
|
400
|
+
*
|
|
401
|
+
* Exported for unit test: the deduplication contract (one entry, and one existence
|
|
402
|
+
* probe, per DISTINCT target however many times it is linked) is not observable
|
|
403
|
+
* through `validateSkillForPackaging`'s result alone.
|
|
404
|
+
*/
|
|
405
|
+
export declare function getResolvedMarkdownLinks(links: Array<{
|
|
406
|
+
href: string;
|
|
407
|
+
type: string;
|
|
408
|
+
}>, markdownPath: string): string[];
|
|
270
409
|
export {};
|
|
271
410
|
//# sourceMappingURL=packaging-validator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packaging-validator.d.ts","sourceRoot":"","sources":["../../src/validators/packaging-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAEhB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,
|
|
1
|
+
{"version":3,"file":"packaging-validator.d.ts","sourceRoot":"","sources":["../../src/validators/packaging-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,OAAO,EAKL,KAAK,wBAAwB,EAC7B,gBAAgB,EAChB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAEhB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,4BAA4B,CAAC;AAUpC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAML,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAoB1B;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,cAAc,CAAC,EAAE,UAAU,GAAG,aAAa,GAAG,eAAe,CAAC;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,2BAA2B,CAAC,EAAE;QAC5B,KAA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