@vibe-agent-toolkit/cli 0.2.0-rc.10 → 0.2.0-rc.12
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 +3 -3
- package/dist/bin/supervise-cli.d.ts +45 -0
- package/dist/bin/supervise-cli.d.ts.map +1 -0
- package/dist/bin/supervise-cli.js +83 -0
- package/dist/bin/supervise-cli.js.map +1 -0
- package/dist/bin/vat +94 -40
- package/dist/bin/vat.d.ts +15 -4
- package/dist/bin/vat.d.ts.map +1 -1
- package/dist/bin/vat.js +94 -40
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +21 -29
- package/dist/bin.js.map +1 -1
- package/dist/command-tree.d.ts +45 -0
- package/dist/command-tree.d.ts.map +1 -0
- package/dist/command-tree.js +60 -0
- package/dist/command-tree.js.map +1 -0
- package/dist/commands/agent/build-schema.d.ts +100 -0
- package/dist/commands/agent/build-schema.d.ts.map +1 -0
- package/dist/commands/agent/build-schema.js +32 -0
- package/dist/commands/agent/build-schema.js.map +1 -0
- package/dist/commands/agent/build.d.ts +1 -0
- package/dist/commands/agent/build.d.ts.map +1 -1
- package/dist/commands/agent/build.js +63 -33
- package/dist/commands/agent/build.js.map +1 -1
- package/dist/commands/agent/import-schema.d.ts +75 -0
- package/dist/commands/agent/import-schema.d.ts.map +1 -0
- package/dist/commands/agent/import-schema.js +25 -0
- package/dist/commands/agent/import-schema.js.map +1 -0
- package/dist/commands/agent/import.d.ts.map +1 -1
- package/dist/commands/agent/import.js +33 -27
- package/dist/commands/agent/import.js.map +1 -1
- package/dist/commands/agent/index.d.ts.map +1 -1
- package/dist/commands/agent/index.js +132 -37
- package/dist/commands/agent/index.js.map +1 -1
- package/dist/commands/agent/install-path.d.ts.map +1 -1
- package/dist/commands/agent/install-path.js +2 -1
- package/dist/commands/agent/install-path.js.map +1 -1
- package/dist/commands/agent/install-schema.d.ts +89 -0
- package/dist/commands/agent/install-schema.d.ts.map +1 -0
- package/dist/commands/agent/install-schema.js +29 -0
- package/dist/commands/agent/install-schema.js.map +1 -0
- package/dist/commands/agent/install.d.ts +7 -1
- package/dist/commands/agent/install.d.ts.map +1 -1
- package/dist/commands/agent/install.js +78 -108
- package/dist/commands/agent/install.js.map +1 -1
- package/dist/commands/agent/installed-schema.d.ts +140 -0
- package/dist/commands/agent/installed-schema.d.ts.map +1 -0
- package/dist/commands/agent/installed-schema.js +36 -0
- package/dist/commands/agent/installed-schema.js.map +1 -0
- package/dist/commands/agent/installed.d.ts +1 -1
- package/dist/commands/agent/installed.d.ts.map +1 -1
- package/dist/commands/agent/installed.js +104 -75
- package/dist/commands/agent/installed.js.map +1 -1
- package/dist/commands/agent/list-schema.d.ts +128 -0
- package/dist/commands/agent/list-schema.d.ts.map +1 -0
- package/dist/commands/agent/list-schema.js +34 -0
- package/dist/commands/agent/list-schema.js.map +1 -0
- package/dist/commands/agent/list.d.ts +4 -3
- package/dist/commands/agent/list.d.ts.map +1 -1
- package/dist/commands/agent/list.js +50 -37
- package/dist/commands/agent/list.js.map +1 -1
- package/dist/commands/agent/run.d.ts +3 -0
- package/dist/commands/agent/run.d.ts.map +1 -1
- package/dist/commands/agent/run.js +8 -3
- package/dist/commands/agent/run.js.map +1 -1
- package/dist/commands/agent/uninstall-schema.d.ts +89 -0
- package/dist/commands/agent/uninstall-schema.d.ts.map +1 -0
- package/dist/commands/agent/uninstall-schema.js +29 -0
- package/dist/commands/agent/uninstall-schema.js.map +1 -0
- package/dist/commands/agent/uninstall.d.ts +5 -1
- package/dist/commands/agent/uninstall.d.ts.map +1 -1
- package/dist/commands/agent/uninstall.js +50 -38
- package/dist/commands/agent/uninstall.js.map +1 -1
- package/dist/commands/agent/validate-schema.d.ts +129 -0
- package/dist/commands/agent/validate-schema.d.ts.map +1 -0
- package/dist/commands/agent/validate-schema.js +35 -0
- package/dist/commands/agent/validate-schema.js.map +1 -0
- package/dist/commands/agent/validate.d.ts +6 -0
- package/dist/commands/agent/validate.d.ts.map +1 -1
- package/dist/commands/agent/validate.js +64 -36
- package/dist/commands/agent/validate.js.map +1 -1
- package/dist/commands/ard/emit-schema.d.ts +108 -0
- package/dist/commands/ard/emit-schema.d.ts.map +1 -0
- package/dist/commands/ard/emit-schema.js +37 -0
- package/dist/commands/ard/emit-schema.js.map +1 -0
- package/dist/commands/ard/emit.d.ts +31 -63
- package/dist/commands/ard/emit.d.ts.map +1 -1
- package/dist/commands/ard/emit.js +124 -68
- package/dist/commands/ard/emit.js.map +1 -1
- package/dist/commands/ard/index.d.ts.map +1 -1
- package/dist/commands/ard/index.js +17 -10
- package/dist/commands/ard/index.js.map +1 -1
- package/dist/commands/audit/compat-lane-findings.d.ts +65 -0
- package/dist/commands/audit/compat-lane-findings.d.ts.map +1 -0
- package/dist/commands/audit/compat-lane-findings.js +72 -0
- package/dist/commands/audit/compat-lane-findings.js.map +1 -0
- package/dist/commands/audit/distributed-tree.d.ts +2 -2
- package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
- package/dist/commands/audit/distributed-tree.js +23 -12
- package/dist/commands/audit/distributed-tree.js.map +1 -1
- package/dist/commands/audit/git-url-clone.d.ts +15 -7
- package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
- package/dist/commands/audit/git-url-clone.js +85 -42
- package/dist/commands/audit/git-url-clone.js.map +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts +28 -4
- package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
- package/dist/commands/audit/hierarchical-output.js +44 -27
- package/dist/commands/audit/hierarchical-output.js.map +1 -1
- package/dist/commands/audit/scan-population.d.ts.map +1 -1
- package/dist/commands/audit/scan-population.js +2 -1
- package/dist/commands/audit/scan-population.js.map +1 -1
- package/dist/commands/audit-schema.d.ts +1247 -0
- package/dist/commands/audit-schema.d.ts.map +1 -0
- package/dist/commands/audit-schema.js +139 -0
- package/dist/commands/audit-schema.js.map +1 -0
- package/dist/commands/audit-settings-schema.d.ts +417 -0
- package/dist/commands/audit-settings-schema.d.ts.map +1 -0
- package/dist/commands/audit-settings-schema.js +77 -0
- package/dist/commands/audit-settings-schema.js.map +1 -0
- package/dist/commands/audit-settings.d.ts +28 -9
- package/dist/commands/audit-settings.d.ts.map +1 -1
- package/dist/commands/audit-settings.js +215 -151
- package/dist/commands/audit-settings.js.map +1 -1
- package/dist/commands/audit.d.ts +72 -33
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +415 -397
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts +61 -4
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +176 -190
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cache/clear-schema.d.ts +111 -0
- package/dist/commands/cache/clear-schema.d.ts.map +1 -0
- package/dist/commands/cache/clear-schema.js +37 -0
- package/dist/commands/cache/clear-schema.js.map +1 -0
- package/dist/commands/cache/clear.d.ts +28 -26
- package/dist/commands/cache/clear.d.ts.map +1 -1
- package/dist/commands/cache/clear.js +108 -103
- package/dist/commands/cache/clear.js.map +1 -1
- package/dist/commands/cache/index.d.ts.map +1 -1
- package/dist/commands/cache/index.js +13 -7
- package/dist/commands/cache/index.js.map +1 -1
- package/dist/commands/claude/claude-config.d.ts +23 -6
- package/dist/commands/claude/claude-config.d.ts.map +1 -1
- package/dist/commands/claude/claude-config.js +29 -15
- package/dist/commands/claude/claude-config.js.map +1 -1
- package/dist/commands/claude/context.d.ts +87 -2
- package/dist/commands/claude/context.d.ts.map +1 -1
- package/dist/commands/claude/context.js +116 -57
- package/dist/commands/claude/context.js.map +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.js +2 -2
- package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts +14 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.js +135 -68
- package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.d.ts +3 -5
- package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.js +16 -7
- package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/publish-schema.d.ts +137 -0
- package/dist/commands/claude/marketplace/publish-schema.d.ts.map +1 -0
- package/dist/commands/claude/marketplace/publish-schema.js +32 -0
- package/dist/commands/claude/marketplace/publish-schema.js.map +1 -0
- package/dist/commands/claude/marketplace/publish-tree.d.ts +6 -0
- package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish-tree.js +75 -17
- package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
- package/dist/commands/claude/marketplace/publish.d.ts +27 -0
- package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish.js +84 -50
- package/dist/commands/claude/marketplace/publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate-schema.d.ts +362 -0
- package/dist/commands/claude/marketplace/validate-schema.d.ts.map +1 -0
- package/dist/commands/claude/marketplace/validate-schema.js +67 -0
- package/dist/commands/claude/marketplace/validate-schema.js.map +1 -0
- package/dist/commands/claude/marketplace/validate.d.ts +40 -53
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +358 -214
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/org/api-keys.d.ts +3 -0
- package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
- package/dist/commands/claude/org/api-keys.js +4 -5
- package/dist/commands/claude/org/api-keys.js.map +1 -1
- package/dist/commands/claude/org/code-analytics.js +1 -1
- package/dist/commands/claude/org/code-analytics.js.map +1 -1
- package/dist/commands/claude/org/cost.d.ts.map +1 -1
- package/dist/commands/claude/org/cost.js +11 -33
- package/dist/commands/claude/org/cost.js.map +1 -1
- package/dist/commands/claude/org/helpers.d.ts +40 -27
- package/dist/commands/claude/org/helpers.d.ts.map +1 -1
- package/dist/commands/claude/org/helpers.js +61 -66
- package/dist/commands/claude/org/helpers.js.map +1 -1
- package/dist/commands/claude/org/index.d.ts.map +1 -1
- package/dist/commands/claude/org/index.js +10 -4
- package/dist/commands/claude/org/index.js.map +1 -1
- package/dist/commands/claude/org/info.d.ts.map +1 -1
- package/dist/commands/claude/org/info.js +2 -3
- package/dist/commands/claude/org/info.js.map +1 -1
- package/dist/commands/claude/org/invites.d.ts +3 -0
- package/dist/commands/claude/org/invites.d.ts.map +1 -1
- package/dist/commands/claude/org/invites.js +5 -7
- package/dist/commands/claude/org/invites.js.map +1 -1
- package/dist/commands/claude/org/skills.d.ts +76 -21
- package/dist/commands/claude/org/skills.d.ts.map +1 -1
- package/dist/commands/claude/org/skills.js +273 -246
- package/dist/commands/claude/org/skills.js.map +1 -1
- package/dist/commands/claude/org/stubs-schema.d.ts +56 -0
- package/dist/commands/claude/org/stubs-schema.d.ts.map +1 -0
- package/dist/commands/claude/org/stubs-schema.js +23 -0
- package/dist/commands/claude/org/stubs-schema.js.map +1 -0
- package/dist/commands/claude/org/stubs.d.ts +8 -3
- package/dist/commands/claude/org/stubs.d.ts.map +1 -1
- package/dist/commands/claude/org/stubs.js +9 -9
- package/dist/commands/claude/org/stubs.js.map +1 -1
- package/dist/commands/claude/org/usage.d.ts.map +1 -1
- package/dist/commands/claude/org/usage.js +1 -2
- package/dist/commands/claude/org/usage.js.map +1 -1
- package/dist/commands/claude/org/users.d.ts +3 -0
- package/dist/commands/claude/org/users.d.ts.map +1 -1
- package/dist/commands/claude/org/users.js +6 -8
- package/dist/commands/claude/org/users.js.map +1 -1
- package/dist/commands/claude/org/workspaces.d.ts +3 -0
- package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
- package/dist/commands/claude/org/workspaces.js +10 -15
- package/dist/commands/claude/org/workspaces.js.map +1 -1
- package/dist/commands/claude/plugin/build-schema.d.ts +642 -0
- package/dist/commands/claude/plugin/build-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/build-schema.js +51 -0
- package/dist/commands/claude/plugin/build-schema.js.map +1 -0
- package/dist/commands/claude/plugin/build.d.ts +220 -45
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +466 -249
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/helpers.d.ts +186 -24
- package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
- package/dist/commands/claude/plugin/helpers.js +110 -68
- package/dist/commands/claude/plugin/helpers.js.map +1 -1
- package/dist/commands/claude/plugin/install-schema.d.ts +144 -0
- package/dist/commands/claude/plugin/install-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/install-schema.js +36 -0
- package/dist/commands/claude/plugin/install-schema.js.map +1 -0
- package/dist/commands/claude/plugin/install.d.ts +191 -11
- package/dist/commands/claude/plugin/install.d.ts.map +1 -1
- package/dist/commands/claude/plugin/install.js +688 -628
- package/dist/commands/claude/plugin/install.js.map +1 -1
- package/dist/commands/claude/plugin/kept-findings.d.ts +19 -0
- package/dist/commands/claude/plugin/kept-findings.d.ts.map +1 -0
- package/dist/commands/claude/plugin/kept-findings.js +24 -0
- package/dist/commands/claude/plugin/kept-findings.js.map +1 -0
- package/dist/commands/claude/plugin/list-schema.d.ts +223 -0
- package/dist/commands/claude/plugin/list-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/list-schema.js +34 -0
- package/dist/commands/claude/plugin/list-schema.js.map +1 -0
- package/dist/commands/claude/plugin/list.d.ts +18 -0
- package/dist/commands/claude/plugin/list.d.ts.map +1 -1
- package/dist/commands/claude/plugin/list.js +53 -45
- package/dist/commands/claude/plugin/list.js.map +1 -1
- package/dist/commands/claude/plugin/npm-pack.d.ts +15 -0
- package/dist/commands/claude/plugin/npm-pack.d.ts.map +1 -0
- package/dist/commands/claude/plugin/npm-pack.js +39 -0
- package/dist/commands/claude/plugin/npm-pack.js.map +1 -0
- package/dist/commands/claude/plugin/plugin-changelog.d.ts +5 -1
- package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-changelog.js +9 -5
- package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.d.ts +21 -2
- package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.js +65 -32
- package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.d.ts +13 -0
- package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.js +64 -16
- package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +63 -37
- package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
- package/dist/commands/claude/plugin/uninstall-schema.d.ts +112 -0
- package/dist/commands/claude/plugin/uninstall-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/uninstall-schema.js +28 -0
- package/dist/commands/claude/plugin/uninstall-schema.js.map +1 -0
- package/dist/commands/claude/plugin/uninstall.d.ts +57 -0
- package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
- package/dist/commands/claude/plugin/uninstall.js +176 -64
- package/dist/commands/claude/plugin/uninstall.js.map +1 -1
- package/dist/commands/consistency-check.d.ts.map +1 -1
- package/dist/commands/consistency-check.js +8 -6
- package/dist/commands/consistency-check.js.map +1 -1
- package/dist/commands/corpus/index.d.ts.map +1 -1
- package/dist/commands/corpus/index.js +26 -10
- package/dist/commands/corpus/index.js.map +1 -1
- package/dist/commands/corpus/report.d.ts +34 -16
- package/dist/commands/corpus/report.d.ts.map +1 -1
- package/dist/commands/corpus/report.js +36 -18
- package/dist/commands/corpus/report.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts +25 -20
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +123 -67
- package/dist/commands/corpus/runner.js.map +1 -1
- package/dist/commands/corpus/scan-schema.d.ts +127 -0
- package/dist/commands/corpus/scan-schema.d.ts.map +1 -0
- package/dist/commands/corpus/scan-schema.js +31 -0
- package/dist/commands/corpus/scan-schema.js.map +1 -0
- package/dist/commands/corpus/scan.d.ts +31 -0
- package/dist/commands/corpus/scan.d.ts.map +1 -1
- package/dist/commands/corpus/scan.js +124 -50
- package/dist/commands/corpus/scan.js.map +1 -1
- package/dist/commands/corpus/seed.d.ts +11 -8
- package/dist/commands/corpus/seed.d.ts.map +1 -1
- package/dist/commands/corpus/seed.js +29 -11
- package/dist/commands/corpus/seed.js.map +1 -1
- package/dist/commands/doctor-render.d.ts +52 -0
- package/dist/commands/doctor-render.d.ts.map +1 -0
- package/dist/commands/doctor-render.js +110 -0
- package/dist/commands/doctor-render.js.map +1 -0
- package/dist/commands/doctor-schema.d.ts +191 -0
- package/dist/commands/doctor-schema.d.ts.map +1 -0
- package/dist/commands/doctor-schema.js +44 -0
- package/dist/commands/doctor-schema.js.map +1 -0
- package/dist/commands/doctor.d.ts +7 -62
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +126 -165
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/inventory-schema.d.ts +7297 -0
- package/dist/commands/inventory-schema.d.ts.map +1 -0
- package/dist/commands/inventory-schema.js +28 -0
- package/dist/commands/inventory-schema.js.map +1 -0
- package/dist/commands/inventory.d.ts +1 -1
- package/dist/commands/inventory.d.ts.map +1 -1
- package/dist/commands/inventory.js +89 -41
- package/dist/commands/inventory.js.map +1 -1
- package/dist/commands/mcp/index.d.ts.map +1 -1
- package/dist/commands/mcp/index.js +15 -0
- package/dist/commands/mcp/index.js.map +1 -1
- package/dist/commands/mcp/list-collections-schema.d.ts +101 -0
- package/dist/commands/mcp/list-collections-schema.d.ts.map +1 -0
- package/dist/commands/mcp/list-collections-schema.js +22 -0
- package/dist/commands/mcp/list-collections-schema.js.map +1 -0
- package/dist/commands/mcp/list-collections.d.ts +1 -1
- package/dist/commands/mcp/list-collections.d.ts.map +1 -1
- package/dist/commands/mcp/list-collections.js +19 -17
- package/dist/commands/mcp/list-collections.js.map +1 -1
- package/dist/commands/mcp/serve.d.ts +5 -0
- package/dist/commands/mcp/serve.d.ts.map +1 -1
- package/dist/commands/mcp/serve.js +29 -15
- package/dist/commands/mcp/serve.js.map +1 -1
- package/dist/commands/okf/index.d.ts.map +1 -1
- package/dist/commands/okf/index.js +13 -10
- package/dist/commands/okf/index.js.map +1 -1
- package/dist/commands/okf/validate-schema.d.ts +171 -0
- package/dist/commands/okf/validate-schema.d.ts.map +1 -0
- package/dist/commands/okf/validate-schema.js +44 -0
- package/dist/commands/okf/validate-schema.js.map +1 -0
- package/dist/commands/okf/validate.d.ts +16 -145
- package/dist/commands/okf/validate.d.ts.map +1 -1
- package/dist/commands/okf/validate.js +63 -52
- package/dist/commands/okf/validate.js.map +1 -1
- package/dist/commands/orchestrator-schema.d.ts +419 -0
- package/dist/commands/orchestrator-schema.d.ts.map +1 -0
- package/dist/commands/orchestrator-schema.js +91 -0
- package/dist/commands/orchestrator-schema.js.map +1 -0
- package/dist/commands/phase-utils.d.ts +188 -220
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +210 -258
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/positional-args.d.ts +13 -11
- package/dist/commands/positional-args.d.ts.map +1 -1
- package/dist/commands/positional-args.js +16 -15
- package/dist/commands/positional-args.js.map +1 -1
- package/dist/commands/rag/admin-schema.d.ts +152 -0
- package/dist/commands/rag/admin-schema.d.ts.map +1 -0
- package/dist/commands/rag/admin-schema.js +31 -0
- package/dist/commands/rag/admin-schema.js.map +1 -0
- package/dist/commands/rag/clear-command.d.ts.map +1 -1
- package/dist/commands/rag/clear-command.js +30 -15
- package/dist/commands/rag/clear-command.js.map +1 -1
- package/dist/commands/rag/command-helpers.d.ts +31 -7
- package/dist/commands/rag/command-helpers.d.ts.map +1 -1
- package/dist/commands/rag/command-helpers.js +41 -21
- package/dist/commands/rag/command-helpers.js.map +1 -1
- package/dist/commands/rag/index-command.d.ts +37 -48
- package/dist/commands/rag/index-command.d.ts.map +1 -1
- package/dist/commands/rag/index-command.js +80 -65
- package/dist/commands/rag/index-command.js.map +1 -1
- package/dist/commands/rag/index-schema.d.ts +107 -0
- package/dist/commands/rag/index-schema.d.ts.map +1 -0
- package/dist/commands/rag/index-schema.js +34 -0
- package/dist/commands/rag/index-schema.js.map +1 -0
- package/dist/commands/rag/index.d.ts.map +1 -1
- package/dist/commands/rag/index.js +88 -41
- package/dist/commands/rag/index.js.map +1 -1
- package/dist/commands/rag/query-command.d.ts +18 -4
- package/dist/commands/rag/query-command.d.ts.map +1 -1
- package/dist/commands/rag/query-command.js +42 -27
- package/dist/commands/rag/query-command.js.map +1 -1
- package/dist/commands/rag/query-schema.d.ts +363 -0
- package/dist/commands/rag/query-schema.d.ts.map +1 -0
- package/dist/commands/rag/query-schema.js +59 -0
- package/dist/commands/rag/query-schema.js.map +1 -0
- package/dist/commands/rag/stats-command.d.ts.map +1 -1
- package/dist/commands/rag/stats-command.js +19 -18
- package/dist/commands/rag/stats-command.js.map +1 -1
- package/dist/commands/resources/check-progress.d.ts +79 -13
- package/dist/commands/resources/check-progress.d.ts.map +1 -1
- package/dist/commands/resources/check-progress.js +112 -11
- package/dist/commands/resources/check-progress.js.map +1 -1
- package/dist/commands/resources/check-schema.d.ts +335 -0
- package/dist/commands/resources/check-schema.d.ts.map +1 -0
- package/dist/commands/resources/check-schema.js +104 -0
- package/dist/commands/resources/check-schema.js.map +1 -0
- package/dist/commands/resources/check-supervisor.d.ts +329 -71
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -1
- package/dist/commands/resources/check-supervisor.js +507 -107
- package/dist/commands/resources/check-supervisor.js.map +1 -1
- package/dist/commands/resources/check.d.ts +88 -254
- package/dist/commands/resources/check.d.ts.map +1 -1
- package/dist/commands/resources/check.js +537 -310
- package/dist/commands/resources/check.js.map +1 -1
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +189 -103
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/query-schema.d.ts +188 -0
- package/dist/commands/resources/query-schema.d.ts.map +1 -0
- package/dist/commands/resources/query-schema.js +48 -0
- package/dist/commands/resources/query-schema.js.map +1 -0
- package/dist/commands/resources/query.d.ts +18 -13
- package/dist/commands/resources/query.d.ts.map +1 -1
- package/dist/commands/resources/query.js +61 -49
- package/dist/commands/resources/query.js.map +1 -1
- package/dist/commands/resources/scan-schema.d.ts +195 -0
- package/dist/commands/resources/scan-schema.d.ts.map +1 -0
- package/dist/commands/resources/scan-schema.js +53 -0
- package/dist/commands/resources/scan-schema.js.map +1 -0
- package/dist/commands/resources/scan.d.ts +26 -3
- package/dist/commands/resources/scan.d.ts.map +1 -1
- package/dist/commands/resources/scan.js +51 -53
- package/dist/commands/resources/scan.js.map +1 -1
- package/dist/commands/resources/validate-schema.d.ts +326 -0
- package/dist/commands/resources/validate-schema.d.ts.map +1 -0
- package/dist/commands/resources/validate-schema.js +60 -0
- package/dist/commands/resources/validate-schema.js.map +1 -0
- package/dist/commands/resources/validate.d.ts +45 -169
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +221 -485
- package/dist/commands/resources/validate.js.map +1 -1
- package/dist/commands/skill/review-checklist.d.ts.map +1 -1
- package/dist/commands/skill/review-checklist.js +0 -1
- package/dist/commands/skill/review-checklist.js.map +1 -1
- package/dist/commands/skill/review-schema.d.ts +278 -0
- package/dist/commands/skill/review-schema.d.ts.map +1 -0
- package/dist/commands/skill/review-schema.js +46 -0
- package/dist/commands/skill/review-schema.js.map +1 -0
- package/dist/commands/skill/review.d.ts +8 -234
- package/dist/commands/skill/review.d.ts.map +1 -1
- package/dist/commands/skill/review.js +54 -77
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/auth-flags.d.ts +3 -0
- package/dist/commands/skill/test/auth-flags.d.ts.map +1 -1
- package/dist/commands/skill/test/auth-flags.js +6 -2
- package/dist/commands/skill/test/auth-flags.js.map +1 -1
- package/dist/commands/skill/test/configure-schema.d.ts +67 -0
- package/dist/commands/skill/test/configure-schema.d.ts.map +1 -0
- package/dist/commands/skill/test/configure-schema.js +27 -0
- package/dist/commands/skill/test/configure-schema.js.map +1 -0
- package/dist/commands/skill/test/configure.d.ts +12 -5
- package/dist/commands/skill/test/configure.d.ts.map +1 -1
- package/dist/commands/skill/test/configure.js +101 -31
- package/dist/commands/skill/test/configure.js.map +1 -1
- package/dist/commands/skill/test/run-schema.d.ts +107 -0
- package/dist/commands/skill/test/run-schema.d.ts.map +1 -0
- package/dist/commands/skill/test/run-schema.js +36 -0
- package/dist/commands/skill/test/run-schema.js.map +1 -0
- package/dist/commands/skill/test/run.d.ts +3 -2
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +316 -155
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build-schema.d.ts +199 -0
- package/dist/commands/skills/build-schema.d.ts.map +1 -0
- package/dist/commands/skills/build-schema.js +55 -0
- package/dist/commands/skills/build-schema.js.map +1 -0
- package/dist/commands/skills/build.d.ts +95 -298
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +415 -818
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/command-helpers.d.ts +5 -11
- package/dist/commands/skills/command-helpers.d.ts.map +1 -1
- package/dist/commands/skills/command-helpers.js +7 -17
- package/dist/commands/skills/command-helpers.js.map +1 -1
- package/dist/commands/skills/index.js +12 -6
- package/dist/commands/skills/index.js.map +1 -1
- package/dist/commands/skills/install-schema.d.ts +153 -0
- package/dist/commands/skills/install-schema.d.ts.map +1 -0
- package/dist/commands/skills/install-schema.js +44 -0
- package/dist/commands/skills/install-schema.js.map +1 -0
- package/dist/commands/skills/install.d.ts +76 -8
- package/dist/commands/skills/install.d.ts.map +1 -1
- package/dist/commands/skills/install.js +230 -194
- package/dist/commands/skills/install.js.map +1 -1
- package/dist/commands/skills/list-schema.d.ts +145 -0
- package/dist/commands/skills/list-schema.d.ts.map +1 -0
- package/dist/commands/skills/list-schema.js +37 -0
- package/dist/commands/skills/list-schema.js.map +1 -0
- package/dist/commands/skills/list.d.ts +39 -8
- package/dist/commands/skills/list.d.ts.map +1 -1
- package/dist/commands/skills/list.js +110 -122
- package/dist/commands/skills/list.js.map +1 -1
- package/dist/commands/skills/package-schema.d.ts +98 -0
- package/dist/commands/skills/package-schema.d.ts.map +1 -0
- package/dist/commands/skills/package-schema.js +32 -0
- package/dist/commands/skills/package-schema.js.map +1 -0
- package/dist/commands/skills/package.d.ts +85 -14
- package/dist/commands/skills/package.d.ts.map +1 -1
- package/dist/commands/skills/package.js +288 -207
- package/dist/commands/skills/package.js.map +1 -1
- package/dist/commands/skills/scope-guard.d.ts +27 -20
- package/dist/commands/skills/scope-guard.d.ts.map +1 -1
- package/dist/commands/skills/scope-guard.js +43 -28
- package/dist/commands/skills/scope-guard.js.map +1 -1
- package/dist/commands/skills/skill-discovery.d.ts +1 -1
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +40 -19
- package/dist/commands/skills/skill-discovery.js.map +1 -1
- package/dist/commands/skills/source-resolvers.d.ts +58 -8
- package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
- package/dist/commands/skills/source-resolvers.js +113 -38
- package/dist/commands/skills/source-resolvers.js.map +1 -1
- package/dist/commands/skills/validate-command.d.ts.map +1 -1
- package/dist/commands/skills/validate-command.js +31 -51
- package/dist/commands/skills/validate-command.js.map +1 -1
- package/dist/commands/skills/validate-schema.d.ts +199 -0
- package/dist/commands/skills/validate-schema.d.ts.map +1 -0
- package/dist/commands/skills/validate-schema.js +44 -0
- package/dist/commands/skills/validate-schema.js.map +1 -0
- package/dist/commands/skills/validate.d.ts +100 -136
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +257 -343
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts +17 -5
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +139 -94
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +121 -110
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +230 -294
- package/dist/commands/verify.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/report-schemas.d.ts +12398 -35
- package/dist/report-schemas.d.ts.map +1 -1
- package/dist/report-schemas.js +624 -66
- package/dist/report-schemas.js.map +1 -1
- package/dist/skill-resolution/packaging-config.js +2 -2
- package/dist/skill-resolution/packaging-config.js.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.js +20 -13
- package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
- package/dist/utils/agent-discovery.d.ts +34 -1
- package/dist/utils/agent-discovery.d.ts.map +1 -1
- package/dist/utils/agent-discovery.js +80 -38
- package/dist/utils/agent-discovery.js.map +1 -1
- package/dist/utils/claude-context-lens.d.ts +13 -6
- package/dist/utils/claude-context-lens.d.ts.map +1 -1
- package/dist/utils/claude-context-lens.js +11 -12
- package/dist/utils/claude-context-lens.js.map +1 -1
- package/dist/utils/command-error-codes.d.ts +12 -0
- package/dist/utils/command-error-codes.d.ts.map +1 -0
- package/dist/utils/command-error-codes.js +12 -0
- package/dist/utils/command-error-codes.js.map +1 -0
- package/dist/utils/command-refusal.d.ts +58 -0
- package/dist/utils/command-refusal.d.ts.map +1 -0
- package/dist/utils/command-refusal.js +170 -0
- package/dist/utils/command-refusal.js.map +1 -0
- package/dist/utils/commander-ending.d.ts +40 -0
- package/dist/utils/commander-ending.d.ts.map +1 -0
- package/dist/utils/commander-ending.js +42 -0
- package/dist/utils/commander-ending.js.map +1 -0
- package/dist/utils/config-loader.d.ts +13 -8
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js +84 -45
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/corpus-target.d.ts +1 -1
- package/dist/utils/corpus-target.d.ts.map +1 -1
- package/dist/utils/corpus-target.js +44 -5
- package/dist/utils/corpus-target.js.map +1 -1
- package/dist/utils/debug-diagnostics.d.ts +18 -0
- package/dist/utils/debug-diagnostics.d.ts.map +1 -0
- package/dist/utils/debug-diagnostics.js +23 -0
- package/dist/utils/debug-diagnostics.js.map +1 -0
- package/dist/utils/document-writer.d.ts +191 -0
- package/dist/utils/document-writer.d.ts.map +1 -0
- package/dist/utils/document-writer.js +319 -0
- package/dist/utils/document-writer.js.map +1 -0
- package/dist/utils/help-loader.d.ts +2 -2
- package/dist/utils/help-loader.js +2 -2
- package/dist/utils/install-plan.d.ts +99 -0
- package/dist/utils/install-plan.d.ts.map +1 -0
- package/dist/utils/install-plan.js +146 -0
- package/dist/utils/install-plan.js.map +1 -0
- package/dist/utils/issue-anchor.d.ts +1 -1
- package/dist/utils/issue-anchor.d.ts.map +1 -1
- package/dist/utils/issue-anchor.js.map +1 -1
- package/dist/utils/issue-rendering.d.ts +8 -3
- package/dist/utils/issue-rendering.d.ts.map +1 -1
- package/dist/utils/issue-rendering.js +4 -0
- package/dist/utils/issue-rendering.js.map +1 -1
- package/dist/utils/lens-population.d.ts +20 -0
- package/dist/utils/lens-population.d.ts.map +1 -0
- package/dist/utils/lens-population.js +15 -0
- package/dist/utils/lens-population.js.map +1 -0
- package/dist/utils/marketplace-io.d.ts +63 -0
- package/dist/utils/marketplace-io.d.ts.map +1 -0
- package/dist/utils/marketplace-io.js +63 -0
- package/dist/utils/marketplace-io.js.map +1 -0
- package/dist/utils/operator-notices.d.ts +97 -0
- package/dist/utils/operator-notices.d.ts.map +1 -0
- package/dist/utils/operator-notices.js +115 -0
- package/dist/utils/operator-notices.js.map +1 -0
- package/dist/utils/optional-backend.d.ts +18 -15
- package/dist/utils/optional-backend.d.ts.map +1 -1
- package/dist/utils/optional-backend.js +22 -33
- package/dist/utils/optional-backend.js.map +1 -1
- package/dist/utils/output.d.ts +5 -43
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +8 -63
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/package-json.d.ts +3 -4
- package/dist/utils/package-json.d.ts.map +1 -1
- package/dist/utils/package-json.js +8 -8
- package/dist/utils/package-json.js.map +1 -1
- package/dist/utils/population-wiring.d.ts +31 -38
- package/dist/utils/population-wiring.d.ts.map +1 -1
- package/dist/utils/population-wiring.js +38 -32
- package/dist/utils/population-wiring.js.map +1 -1
- package/dist/utils/project-root-policy.d.ts +74 -1
- package/dist/utils/project-root-policy.d.ts.map +1 -1
- package/dist/utils/project-root-policy.js +146 -8
- package/dist/utils/project-root-policy.js.map +1 -1
- package/dist/utils/projection-lenses.d.ts +25 -7
- package/dist/utils/projection-lenses.d.ts.map +1 -1
- package/dist/utils/projection-lenses.js +20 -6
- package/dist/utils/projection-lenses.js.map +1 -1
- package/dist/utils/projection-query.d.ts +18 -11
- package/dist/utils/projection-query.d.ts.map +1 -1
- package/dist/utils/projection-query.js +47 -28
- package/dist/utils/projection-query.js.map +1 -1
- package/dist/utils/projection-store.d.ts +2 -2
- package/dist/utils/projection-store.d.ts.map +1 -1
- package/dist/utils/projection-store.js +74 -45
- package/dist/utils/projection-store.js.map +1 -1
- package/dist/utils/rag-database.d.ts +61 -0
- package/dist/utils/rag-database.d.ts.map +1 -0
- package/dist/utils/rag-database.js +178 -0
- package/dist/utils/rag-database.js.map +1 -0
- package/dist/utils/relation-limits.d.ts +7 -2
- package/dist/utils/relation-limits.d.ts.map +1 -1
- package/dist/utils/relation-limits.js +6 -1
- package/dist/utils/relation-limits.js.map +1 -1
- package/dist/utils/relativize-paths.d.ts +23 -0
- package/dist/utils/relativize-paths.d.ts.map +1 -1
- package/dist/utils/relativize-paths.js +32 -1
- package/dist/utils/relativize-paths.js.map +1 -1
- package/dist/utils/resource-loader.d.ts +78 -32
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +134 -66
- package/dist/utils/resource-loader.js.map +1 -1
- package/dist/utils/run-integrity.d.ts +64 -31
- package/dist/utils/run-integrity.d.ts.map +1 -1
- package/dist/utils/run-integrity.js +76 -35
- package/dist/utils/run-integrity.js.map +1 -1
- package/dist/utils/scope-locations.d.ts +7 -5
- package/dist/utils/scope-locations.d.ts.map +1 -1
- package/dist/utils/scope-locations.js +37 -12
- package/dist/utils/scope-locations.js.map +1 -1
- package/dist/utils/staging-dir.d.ts +7 -0
- package/dist/utils/staging-dir.d.ts.map +1 -0
- package/dist/utils/staging-dir.js +12 -0
- package/dist/utils/staging-dir.js.map +1 -0
- package/dist/utils/url-redact.d.ts +9 -0
- package/dist/utils/url-redact.d.ts.map +1 -1
- package/dist/utils/url-redact.js +13 -0
- package/dist/utils/url-redact.js.map +1 -1
- package/dist/utils/user-context-scanner.d.ts +3 -2
- package/dist/utils/user-context-scanner.d.ts.map +1 -1
- package/dist/utils/user-context-scanner.js +24 -4
- package/dist/utils/user-context-scanner.js.map +1 -1
- package/dist/utils/validate-help-files.d.ts.map +1 -1
- package/dist/utils/validate-help-files.js +8 -14
- package/dist/utils/validate-help-files.js.map +1 -1
- package/dist/utils/vat-bin-path.d.ts.map +1 -1
- package/dist/utils/vat-bin-path.js +3 -3
- package/dist/utils/vat-bin-path.js.map +1 -1
- package/dist/utils/verdict-helpers.d.ts.map +1 -1
- package/dist/utils/verdict-helpers.js +5 -5
- package/dist/utils/verdict-helpers.js.map +1 -1
- package/docs/agent.md +347 -2
- package/docs/audit.md +312 -89
- package/docs/doctor.md +65 -19
- package/docs/index.md +571 -20
- package/docs/mcp.md +64 -12
- package/docs/rag.md +176 -48
- package/docs/resources.md +257 -71
- package/docs/skill-test.md +148 -19
- package/docs/skills.md +459 -174
- package/package.json +17 -20
- package/schemas/agent-build.json +268 -0
- package/schemas/agent-import.json +252 -0
- package/schemas/agent-install.json +260 -0
- package/schemas/agent-installed.json +287 -0
- package/schemas/agent-list.json +279 -0
- package/schemas/agent-uninstall.json +260 -0
- package/schemas/agent-validate.json +279 -0
- package/schemas/ard-emit.json +228 -107
- package/schemas/audit-settings.json +472 -0
- package/schemas/audit.json +635 -0
- package/schemas/cache-clear.json +273 -0
- package/schemas/claude-marketplace-publish.json +286 -0
- package/schemas/claude-marketplace-validate.json +352 -0
- package/schemas/claude-org-not-implemented.json +239 -0
- package/schemas/claude-plugin-build.json +446 -0
- package/schemas/claude-plugin-install.json +291 -0
- package/schemas/claude-plugin-list.json +326 -0
- package/schemas/claude-plugin-uninstall.json +272 -0
- package/schemas/corpus-audit.json +635 -0
- package/schemas/corpus-scan.json +293 -0
- package/schemas/doctor.json +299 -0
- package/schemas/inventory.json +982 -0
- package/schemas/mcp-list-collections.json +268 -0
- package/schemas/okf-validate.json +224 -106
- package/schemas/orchestrator.json +299 -0
- package/schemas/rag-clear.json +253 -0
- package/schemas/rag-index.json +273 -0
- package/schemas/rag-query.json +365 -0
- package/schemas/rag-stats.json +269 -0
- package/schemas/resources-check.json +280 -118
- package/schemas/resources-query.json +333 -0
- package/schemas/resources-scan.json +321 -0
- package/schemas/resources-validate.json +332 -0
- package/schemas/skill-review.json +224 -106
- package/schemas/skill-test-configure.json +256 -0
- package/schemas/skill-test-run.json +296 -0
- package/schemas/skills-build.json +325 -0
- package/schemas/skills-install.json +287 -0
- package/schemas/skills-list.json +283 -0
- package/schemas/skills-package.json +270 -0
- package/schemas/skills-validate.json +285 -0
- package/dist/commands/skills/shared.d.ts +0 -29
- package/dist/commands/skills/shared.d.ts.map +0 -1
- package/dist/commands/skills/shared.js +0 -33
- package/dist/commands/skills/shared.js.map +0 -1
- package/dist/utils/command-error.d.ts +0 -189
- package/dist/utils/command-error.d.ts.map +0 -1
- package/dist/utils/command-error.js +0 -230
- package/dist/utils/command-error.js.map +0 -1
|
@@ -3,221 +3,121 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Discovers skills from config yaml skills.include/exclude, validates each
|
|
5
5
|
* using validateSkillForPackaging with merged packaging config.
|
|
6
|
+
*
|
|
7
|
+
* Publishes the `Report<T>` envelope (`validate-schema.ts`): every finding
|
|
8
|
+
* flat with its `location` relative to `data.root`, one `data.skills` row per
|
|
9
|
+
* skill validated, `examined` = skills validated. A run over zero skills is
|
|
10
|
+
* refused by the writer, from the registry's declared denominator — never by
|
|
11
|
+
* a check at this site. `--verbose` decides only how much stderr prints.
|
|
6
12
|
*/
|
|
7
13
|
import { conventionalSuiteProbe, validateSkillForPackaging, } from '@vibe-agent-toolkit/agent-skills';
|
|
8
14
|
import { ResourceRegistry, } from '@vibe-agent-toolkit/resources';
|
|
9
|
-
import { allowUnusedIssues,
|
|
10
|
-
import { findProjectRoot, safePath } from '@vibe-agent-toolkit/utils';
|
|
15
|
+
import { allowUnusedIssues, buildReport, countBySeverity, createAllowUsageLedger, summarizeIssues, toFindings, } from '@vibe-agent-toolkit/schema';
|
|
16
|
+
import { findProjectRoot, mapInOrder, safePath } from '@vibe-agent-toolkit/utils';
|
|
11
17
|
import { gitFindRoot, GitTracker } from '@vibe-agent-toolkit/utils/git';
|
|
12
|
-
import
|
|
13
|
-
import { reportCommandError } from '../../utils/command-error.js';
|
|
18
|
+
import { refusalCodeOf } from '../../utils/command-refusal.js';
|
|
14
19
|
import { loadConfig } from '../../utils/config-loader.js';
|
|
15
|
-
import {
|
|
16
|
-
import { formatIssueLines, formatRunIssueLines, formatSeverityBreakdown, issuesToRenderAtVerbosity, summarizeFindings,
|
|
20
|
+
import { endWithReport, NOTHING_FINISHED, refusalReport } from '../../utils/document-writer.js';
|
|
21
|
+
import { formatIssueLines, formatRunIssueLines, formatSeverityBreakdown, issuesToRenderAtVerbosity, summarizeFindings, } from '../../utils/issue-rendering.js';
|
|
17
22
|
import { requireProjectRoot } from '../../utils/project-root-policy.js';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
23
|
+
import { crawlLaneDebugLine, withResourcePopulationSource } from '../../utils/resource-loader.js';
|
|
24
|
+
import { verdictBanner } from '../../utils/run-integrity.js';
|
|
20
25
|
import { collectDeclaredEvalSuites, mergeSkillPackagingConfig } from '../../utils/skill-packaging-config.js';
|
|
21
26
|
import { renderSkillQualityFooter } from '../../utils/skill-quality-footer.js';
|
|
22
27
|
import { applyConfigVerdicts } from '../../utils/verdict-helpers.js';
|
|
23
|
-
import { finishCommand } from '../phase-utils.js';
|
|
24
28
|
import { filterSkillsByName, setupCommandContext, } from './command-helpers.js';
|
|
29
|
+
import { assertScopableSkillsPath } from './scope-guard.js';
|
|
25
30
|
import { discoverSkillsFromConfig } from './skill-discovery.js';
|
|
31
|
+
/** `vat skills validate` offers no `--strict`: warnings never fail it. */
|
|
32
|
+
const GATE = { strict: false };
|
|
33
|
+
/** This command offers no `--format`: its document is YAML. */
|
|
34
|
+
const FORMAT = 'yaml';
|
|
35
|
+
/**
|
|
36
|
+
* What a mis-scoped `vat skills validate` used to do.
|
|
37
|
+
*
|
|
38
|
+
* In a package where the bare invocation validates 13 skills, one mistyped
|
|
39
|
+
* character rescoped it to nothing and still reported success — the same
|
|
40
|
+
* "went wide / went narrow and reported success" defect
|
|
41
|
+
* `rejectPositionalArguments` was added to `vat verify` / `vat validate` /
|
|
42
|
+
* `vat build` for, arrived at from the opposite direction. `vat skills build`
|
|
43
|
+
* carried the identical hole and is guarded by the same module.
|
|
44
|
+
*/
|
|
45
|
+
const SCOPE_SUBJECT = {
|
|
46
|
+
command: 'vat skills validate',
|
|
47
|
+
silentSuccess: 'nothing to validate',
|
|
48
|
+
};
|
|
26
49
|
/**
|
|
27
|
-
* Every
|
|
50
|
+
* Every finding a skill published: its emitted issues after severity
|
|
51
|
+
* resolution, minus any the adopter resolved to `ignore`.
|
|
28
52
|
*
|
|
29
53
|
* `allErrors` is the full emitted set INCLUDING info despite the name (see the
|
|
30
54
|
* doc comment on `PackagingValidationResult`), and excluding issues suppressed
|
|
31
|
-
* by `validation.allow` — those live in `ignoredErrors`.
|
|
55
|
+
* by `validation.allow` — those live in `ignoredErrors`, counted as `allowed`.
|
|
32
56
|
*/
|
|
33
|
-
function
|
|
34
|
-
return
|
|
57
|
+
function skillFindings(result) {
|
|
58
|
+
return toFindings(result.allErrors);
|
|
35
59
|
}
|
|
36
60
|
/**
|
|
37
|
-
*
|
|
38
|
-
* them when the run validated no skill.
|
|
39
|
-
*
|
|
40
|
-
* 🚨 **Zero skills validated is an ERROR, not a clean run.** `skills.include`
|
|
41
|
-
* globs that discover nothing — a typo, a renamed directory, an `exclude` that
|
|
42
|
-
* swallows every match — used to take an early return that printed one info
|
|
43
|
-
* line and published NO document at exit 0, and `vat validate` folded that into
|
|
44
|
-
* `status: success`: the gate the docs name as THE gate, green forever on a
|
|
45
|
-
* config that checked nothing. `vat verify` refused the identical config in its
|
|
46
|
-
* `packaged-content` phase and its message sent the operator to this command,
|
|
47
|
-
* which then said nothing.
|
|
61
|
+
* Build the report. Pure: no file system, no clock, no `process.exit`.
|
|
48
62
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* shared mechanism in `run-integrity.ts`: one non-overridable
|
|
55
|
-
* `RESOURCE_CHECK_BROKEN` at `error`.
|
|
63
|
+
* Every finding is on the envelope, flat — each skill's, then the run's — so
|
|
64
|
+
* the envelope `summary` is exactly the sum of the `data.skills[].summary`
|
|
65
|
+
* rows plus the run-level findings, by construction. Every validated skill has
|
|
66
|
+
* a row, clean or not: `examined` and `data.skills.length` agree, so a reader
|
|
67
|
+
* never has to guess whether an absent skill was clean or never validated.
|
|
56
68
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* this phase on that config; the phase declines it the same way (no document,
|
|
60
|
-
* exit 0) rather than inventing a refusal for a gate nobody declared.
|
|
69
|
+
* The run-integrity refusal for a run over zero skills is NOT decided here;
|
|
70
|
+
* the writer adds it from the registry's declared denominator.
|
|
61
71
|
*
|
|
62
|
-
* @param
|
|
63
|
-
* @
|
|
64
|
-
* existing run-integrity report is not duplicated
|
|
65
|
-
* @param patterns - The discovery globs, named in the refusal so the operator
|
|
66
|
-
* sees what matched nothing
|
|
67
|
-
* @returns The run-level issues the document and the stderr report publish
|
|
72
|
+
* @param input - The run's results
|
|
73
|
+
* @returns The report, before the writer's run-integrity pass
|
|
68
74
|
*/
|
|
69
|
-
export function
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
...
|
|
73
|
-
|
|
75
|
+
export function buildSkillsValidateReport(input) {
|
|
76
|
+
const skills = input.results.map((result) => ({
|
|
77
|
+
name: result.skillName,
|
|
78
|
+
...summarizeIssues(skillFindings(result)),
|
|
79
|
+
allowed: result.ignoredErrors.length,
|
|
80
|
+
}));
|
|
81
|
+
return buildReport({
|
|
82
|
+
examined: input.results.length,
|
|
83
|
+
findings: [...input.results.flatMap(skillFindings), ...toFindings(input.runIssues)],
|
|
84
|
+
data: { root: input.root, skills },
|
|
85
|
+
gate: GATE,
|
|
86
|
+
durationMs: input.durationMs,
|
|
87
|
+
});
|
|
74
88
|
}
|
|
75
89
|
/** The globs as an operator wrote them, back-quoted and comma-separated. */
|
|
76
90
|
function quoteGlobs(globs) {
|
|
77
91
|
return globs.map((glob) => `\`${glob}\``).join(', ');
|
|
78
92
|
}
|
|
79
|
-
/** What did not run, and what the operator can do — invariant 5 of `run-integrity.ts`. */
|
|
80
|
-
function nothingDiscoveredMessage(patterns) {
|
|
81
|
-
const include = quoteGlobs(patterns.include);
|
|
82
|
-
const exclude = patterns.exclude === undefined || patterns.exclude.length === 0
|
|
83
|
-
? ''
|
|
84
|
-
: ` after \`skills.exclude\` (${quoteGlobs(patterns.exclude)})`;
|
|
85
|
-
return 'vat skills validate validated 0 skills, so this run is not a verdict: nothing was checked,'
|
|
86
|
-
+ ' and the document reads the same as a run over clean skills. The `skills.include` globs in'
|
|
87
|
-
+ ` vibe-agent-toolkit.config.yaml (${include}) matched no SKILL.md${exclude} — usually a typo`
|
|
88
|
-
+ ' in the glob, a renamed directory, or an exclude that swallows every match. Fix the patterns'
|
|
89
|
-
+ ' so they discover the skills this project ships, or remove the `skills:` block if it ships'
|
|
90
|
-
+ ' none.';
|
|
91
|
-
}
|
|
92
93
|
/**
|
|
93
|
-
*
|
|
94
|
-
* its two-valued `status` cannot express.
|
|
94
|
+
* The stderr half of a run over zero skills: WHICH globs matched nothing.
|
|
95
95
|
*
|
|
96
|
-
* The
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* This shape is optimized for `> file` then `grep`, not for reading: on a
|
|
101
|
-
* 90-skill repo it is 17,262 of the 22,156 stdout lines `vat verify` emits.
|
|
96
|
+
* The document's refusal is the registry's generic `whenZero` — the writer
|
|
97
|
+
* cannot see the config — so the globs this run actually used are named here,
|
|
98
|
+
* where the operator reads them.
|
|
102
99
|
*/
|
|
103
|
-
function
|
|
104
|
-
|
|
100
|
+
export function nothingDiscoveredLine(patterns) {
|
|
101
|
+
if (patterns === undefined) {
|
|
102
|
+
return 'vibe-agent-toolkit.config.yaml declares no `skills:` block, so there is nothing to validate.';
|
|
103
|
+
}
|
|
104
|
+
const exclude = patterns.exclude === undefined || patterns.exclude.length === 0
|
|
105
|
+
? ''
|
|
106
|
+
: ` after \`skills.exclude\` (${quoteGlobs(patterns.exclude)})`;
|
|
107
|
+
return `The \`skills.include\` globs (${quoteGlobs(patterns.include)}) matched no SKILL.md${exclude}.`;
|
|
105
108
|
}
|
|
106
|
-
/**
|
|
107
|
-
* Does this skill have anything to say? Emitted findings OR allow-suppressed
|
|
108
|
-
* ones — the same predicate the human report uses, so the two streams cannot
|
|
109
|
-
* disagree about which skills exist.
|
|
110
|
-
*/
|
|
109
|
+
/** Any finding at all, emitted or allow-suppressed — the skills the human report lists. */
|
|
111
110
|
function hasFindings(result) {
|
|
112
111
|
return result.allErrors.length > 0 || result.ignoredErrors.length > 0;
|
|
113
112
|
}
|
|
114
|
-
/**
|
|
115
|
-
* One skill's DEFAULT YAML entry: which asset has problems, how many, of what
|
|
116
|
-
* code — and nothing else.
|
|
117
|
-
*
|
|
118
|
-
* Why the per-code tally is a summary rather than N findings: 1,728 of the 1,897
|
|
119
|
-
* findings on a real 90-skill repo are one code, LINK_DROPPED_BY_DEPTH, and the
|
|
120
|
-
* four remedies its `fix` hint proposes (`linkFollowDepth`, `files:`,
|
|
121
|
-
* `validation.allow`, `excludeReferencesFromBundle`) are all SKILL-level config
|
|
122
|
-
* edits — so 348 findings on one skill propose the same four edits 348 times.
|
|
123
|
-
* The skill is the unit the reader acts on, so the skill is the unit we publish.
|
|
124
|
-
* Aggregating at EMISSION instead would break `validation.allow`'s per-`paths:`
|
|
125
|
-
* matching and per-path severity overrides, both of which need one issue per
|
|
126
|
-
* link; the collapse therefore has to happen here, after allow-filtering.
|
|
127
|
-
* Downgrading the code to `info` was considered and rejected: it would delete
|
|
128
|
-
* the signal the code exists for (a depth-limited walk may silently omit content
|
|
129
|
-
* the author expected to ship) and would contradict PACKAGED_TEST_INPUT, which
|
|
130
|
-
* `docs/validation-codes.md` keeps at `warning` on identical "this is configured
|
|
131
|
-
* behaviour, here is your receipt" reasoning.
|
|
132
|
-
*
|
|
133
|
-
* `allowed` is a scalar, not a list: an allow-suppressed finding is a fact about
|
|
134
|
-
* the skill a reader must not lose, but it is deliberately NOT in `codes`, which
|
|
135
|
-
* summarizes the EMITTED set.
|
|
136
|
-
*/
|
|
137
|
-
function toSummaryYamlResult(result) {
|
|
138
|
-
const { codes, ...counts } = summarizeFindings(result.allErrors);
|
|
139
|
-
const allowedCount = result.ignoredErrors.length;
|
|
140
|
-
return {
|
|
141
|
-
skillName: result.skillName,
|
|
142
|
-
status: result.status,
|
|
143
|
-
...counts,
|
|
144
|
-
...(allowedCount > 0 ? { allowed: allowedCount } : {}),
|
|
145
|
-
codes,
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Build the YAML summary object.
|
|
150
|
-
*
|
|
151
|
-
* `status` is the shared `issues → status` collapse over the WHOLE batch, so it
|
|
152
|
-
* can say `warning`. It previously read
|
|
153
|
-
* `results.some(r => r.status === 'error') ? 'error' : 'success'` — a two-value
|
|
154
|
-
* collapse that could never report the warning case, and so reported 33 active
|
|
155
|
-
* warnings as `success`.
|
|
156
|
-
*
|
|
157
|
-
* The header total counts BOTH the per-skill findings and the run-level ones,
|
|
158
|
-
* because the exit code does too — dropping run issues from the header would
|
|
159
|
-
* divorce the published verdict from the code the process actually returns.
|
|
160
|
-
* That is why `runIssueCounts` exists beside them: on a large real repo the
|
|
161
|
-
* header read 1814 warnings against a per-skill sum of 1800, and the missing 14
|
|
162
|
-
* were run-level ALLOW_UNUSED entries published only as a bare LIST. The
|
|
163
|
-
* identity `issueCounts === Σ results[].issueCounts + runIssueCounts` now holds
|
|
164
|
-
* by construction, so a consumer can reconcile the two numbers instead of
|
|
165
|
-
* hand-counting a list to find out whether anything went missing.
|
|
166
|
-
*
|
|
167
|
-
* That identity survives the default mode dropping every finding-free skill from
|
|
168
|
-
* `results[]`, because a dropped row contributes exactly zero to each bucket —
|
|
169
|
-
* and it survives the default row publishing its counts flat with zero buckets
|
|
170
|
-
* omitted, because an absent bucket reads as zero. Only the per-asset ROWS omit
|
|
171
|
-
* zeros: `issueCounts` and `runIssueCounts` keep their complete
|
|
172
|
-
* `{errors, warnings, info}` shape in both modes, because they are the
|
|
173
|
-
* reconciliation identity rather than something a reader scans.
|
|
174
|
-
*
|
|
175
|
-
* A run over ZERO skills is refused here, not passed — see
|
|
176
|
-
* {@link withRunIntegrity}, which is why the discovery `patterns` are a
|
|
177
|
-
* parameter of a document builder: the refusal names the globs that matched
|
|
178
|
-
* nothing, and the builder is where the refusal is derived.
|
|
179
|
-
*/
|
|
180
|
-
export function buildValidateSummary(results, duration, verbose, runIssues, patterns) {
|
|
181
|
-
const skillIssues = batchIssues(results);
|
|
182
|
-
const published = withRunIntegrity(results, runIssues, patterns);
|
|
183
|
-
const runIssueCounts = countBySeverity(published);
|
|
184
|
-
return {
|
|
185
|
-
status: calculateValidationStatus([...skillIssues, ...published]),
|
|
186
|
-
issueCounts: sumSeverityCounts([countBySeverity(skillIssues), runIssueCounts]),
|
|
187
|
-
runIssueCounts,
|
|
188
|
-
// `skillsValidated` stays the true denominator even though the default
|
|
189
|
-
// `results[]` lists only the skills with something to say.
|
|
190
|
-
//
|
|
191
|
-
// KNOWN, DELIBERATELY NOT FIXED — the denominator and the listing disagree,
|
|
192
|
-
// and nothing in the document explains the gap. A real adopter run published
|
|
193
|
-
// `skillsValidated: 92` beside a `results:` array of 62 rows. Omitting the
|
|
194
|
-
// clean skills is the DESIGN — a report of 92 rows where 30 say nothing is a
|
|
195
|
-
// report nobody reads — but 23 of the omitted were config-DECLARED skills, so
|
|
196
|
-
// a reader reconciling 92 against 62 cannot tell "validated and clean" from
|
|
197
|
-
// "never validated at all". The omission is deliberate; the unexplained
|
|
198
|
-
// difference is the defect. A fix names the omitted population rather than
|
|
199
|
-
// re-listing it (a count of clean skills, or their names on a separate key) —
|
|
200
|
-
// it does not put the empty rows back.
|
|
201
|
-
skillsValidated: results.length,
|
|
202
|
-
results: verbose
|
|
203
|
-
? results.map((r) => toVerboseYamlResult(r))
|
|
204
|
-
: results.filter((r) => hasFindings(r)).map((r) => toSummaryYamlResult(r)),
|
|
205
|
-
runIssues: published,
|
|
206
|
-
durationSecs: formatDurationSecs(duration),
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Output YAML summary to stdout
|
|
211
|
-
*/
|
|
212
|
-
function writeYamlSummary(summary) {
|
|
213
|
-
console.log(yaml.stringify(summary, { indent: 2, lineWidth: 0, aliasDuplicateObjects: false }));
|
|
214
|
-
}
|
|
215
113
|
/**
|
|
216
114
|
* ONE line for one skill: its severity breakdown, its allowed count, and the
|
|
217
115
|
* codes behind it, dominant first.
|
|
218
116
|
*
|
|
219
|
-
* The
|
|
220
|
-
*
|
|
117
|
+
* The skill is the unit the reader acts on: 1,728 of the 1,897 findings on a
|
|
118
|
+
* real 90-skill repo are one code, LINK_DROPPED_BY_DEPTH, whose four remedies
|
|
119
|
+
* are all SKILL-level config edits — so the default stderr report is one row
|
|
120
|
+
* per skill, never one block per finding. The per-issue blocks below are what
|
|
221
121
|
* made this stream 6,261 lines on a 90-skill repo.
|
|
222
122
|
*/
|
|
223
123
|
function skillSummaryLine(result) {
|
|
@@ -230,6 +130,25 @@ function skillSummaryLine(result) {
|
|
|
230
130
|
const codeSuffix = tally === '' ? '' : ` — ${tally}`;
|
|
231
131
|
return ` ${result.skillName}: ${breakdown}${allowed}${codeSuffix}`;
|
|
232
132
|
}
|
|
133
|
+
/** Under `--verbose`: the allow-suppressed records and the references left out of the bundle. */
|
|
134
|
+
function verboseDetailLines(result) {
|
|
135
|
+
const lines = [];
|
|
136
|
+
if (result.ignoredErrors.length > 0) {
|
|
137
|
+
lines.push(` Allowed issues (${result.ignoredErrors.length}):`);
|
|
138
|
+
for (const record of result.ignoredErrors) {
|
|
139
|
+
lines.push(` [${String(record.code)}] ${String(record.location)} (allowed: ${record.reason})`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const excluded = result.metadata.excludedReferences;
|
|
143
|
+
if (excluded.length > 0) {
|
|
144
|
+
lines.push(` Excluded references (${excluded.length}):`);
|
|
145
|
+
for (const reference of excluded) {
|
|
146
|
+
const pattern = reference.matchedPattern === undefined ? '' : `, pattern ${reference.matchedPattern}`;
|
|
147
|
+
lines.push(` ${reference.path} (${reference.reason}${pattern})`);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return lines;
|
|
151
|
+
}
|
|
233
152
|
/**
|
|
234
153
|
* Lines for ONE skill: its summary row, then the findings that render in full
|
|
235
154
|
* beneath it at this verbosity.
|
|
@@ -242,8 +161,8 @@ function skillSummaryLine(result) {
|
|
|
242
161
|
* re-run with `-v` to learn what failed the gate), while `warning`/`info`
|
|
243
162
|
* collapse into the row unless asked for.
|
|
244
163
|
*
|
|
245
|
-
* The allow-suppressed records
|
|
246
|
-
* row's `(+N allowed by config)` is
|
|
164
|
+
* The allow-suppressed records and the excluded references are listed only
|
|
165
|
+
* under `verbose`; by default the row's `(+N allowed by config)` is the receipt.
|
|
247
166
|
*/
|
|
248
167
|
function skillReportLines(result, verbose) {
|
|
249
168
|
const lines = [skillSummaryLine(result)];
|
|
@@ -251,29 +170,27 @@ function skillReportLines(result, verbose) {
|
|
|
251
170
|
for (const issue of rendered) {
|
|
252
171
|
lines.push(...formatIssueLines(issue, ' '));
|
|
253
172
|
}
|
|
254
|
-
const
|
|
255
|
-
|
|
256
|
-
lines.push(` Allowed issues (${result.ignoredErrors.length}):`);
|
|
257
|
-
for (const record of result.ignoredErrors) {
|
|
258
|
-
lines.push(` [${String(record.code)}] ${String(record.location)} (allowed: ${record.reason})`);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
173
|
+
const detail = verbose ? verboseDetailLines(result) : [];
|
|
174
|
+
lines.push(...detail);
|
|
261
175
|
// A trailing blank line only when something was rendered beneath the row —
|
|
262
176
|
// otherwise consecutive one-line rows would be double-spaced.
|
|
263
|
-
if (rendered.length > 0 ||
|
|
177
|
+
if (rendered.length > 0 || detail.length > 0) {
|
|
264
178
|
lines.push('');
|
|
265
179
|
}
|
|
266
180
|
return lines;
|
|
267
181
|
}
|
|
268
182
|
/**
|
|
269
|
-
* One glyph per
|
|
270
|
-
*
|
|
183
|
+
* One glyph per severity outcome. Info never rates a warning: the same rule
|
|
184
|
+
* `statusFromEnvelope` applies to a phase, so an info-only skill is `✅` here
|
|
185
|
+
* and `success` in `vat validate`.
|
|
271
186
|
*/
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
187
|
+
function glyphFor(counts) {
|
|
188
|
+
if (counts.errors > 0)
|
|
189
|
+
return '❌';
|
|
190
|
+
if (counts.warnings > 0)
|
|
191
|
+
return '⚠️ ';
|
|
192
|
+
return '✅';
|
|
193
|
+
}
|
|
277
194
|
/**
|
|
278
195
|
* Banner naming what the run actually found.
|
|
279
196
|
*
|
|
@@ -285,83 +202,71 @@ const STATUS_GLYPHS = {
|
|
|
285
202
|
* directly above `FILES_GLOB_MATCHED_NOTHING`, whose message reads "`vat skills
|
|
286
203
|
* build` fails on a glob that matches nothing, so the build will fail unless
|
|
287
204
|
* that artifact is produced first" — a headline contradicting the single line
|
|
288
|
-
* beneath it.
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
* expected pre-build state and must not fail CI); only the claim was wrong. It
|
|
292
|
-
* is dropped rather than made conditional because the code registry carries no
|
|
293
|
-
* build-blocking fact to condition it on — `CodeRegistryEntry` in
|
|
294
|
-
* schema/src/validation-codes.ts is exactly `defaultSeverity` /
|
|
295
|
-
* `description` / `fix` / `reference` — and keying the claim
|
|
296
|
-
* on a hardcoded list of code names would assert a cause this renderer cannot
|
|
297
|
-
* observe, and would go stale the next time a code is added.
|
|
205
|
+
* beneath it. Keying the claim on a hardcoded list of code names would assert a
|
|
206
|
+
* cause this renderer cannot observe, and would go stale the next time a code
|
|
207
|
+
* is added.
|
|
298
208
|
*/
|
|
299
|
-
function reportBanner(
|
|
300
|
-
if (
|
|
209
|
+
function reportBanner(counts, examined) {
|
|
210
|
+
if (counts.errors > 0) {
|
|
301
211
|
return `\n❌ Validation failed — ${formatSeverityBreakdown(counts)}:\n`;
|
|
302
212
|
}
|
|
303
213
|
if (counts.warnings + counts.info > 0) {
|
|
304
214
|
// Non-blocking (exit 0), which is exactly why this used to print
|
|
305
215
|
// "All validations passed" over the findings.
|
|
306
|
-
return `\n${
|
|
216
|
+
return verdictBanner(examined, `\n${glyphFor(counts)} Validation passed with findings — ${formatSeverityBreakdown(counts)}:\n`);
|
|
307
217
|
}
|
|
308
|
-
return '\n✅ All validations passed';
|
|
218
|
+
return verdictBanner(examined, '\n✅ All validations passed');
|
|
309
219
|
}
|
|
310
220
|
/**
|
|
311
221
|
* Human-readable report lines for the whole batch.
|
|
312
222
|
*
|
|
313
|
-
* Renders every skill with ANY
|
|
314
|
-
*
|
|
223
|
+
* Renders every skill with ANY finding, not just the ones that failed the
|
|
224
|
+
* gate: a warning-only or info-only run used to print the success banner and
|
|
315
225
|
* nothing else, so the findings existed only in the YAML on stdout.
|
|
316
226
|
*
|
|
317
227
|
* Every skill with findings gets its summary row at every verbosity; `verbose`
|
|
318
228
|
* picks only which findings are ALSO rendered in full beneath that row, per
|
|
319
229
|
* {@link issuesToRenderAtVerbosity} — errors always, `warning`/`info` when
|
|
320
|
-
* asked, `ignore` never.
|
|
321
|
-
* run that collapsed the error it exited 1 on into a count line forced the reader
|
|
322
|
-
* to re-run with a flag to learn what broke.
|
|
230
|
+
* asked, `ignore` never.
|
|
323
231
|
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
232
|
+
* `runFindings` are the published run-level findings — the `validation.allow`
|
|
233
|
+
* entries no skill matched, and the writer's run-integrity refusal when the
|
|
234
|
+
* run validated nothing — so the banner counts what the document counts and a
|
|
235
|
+
* run over zero skills cannot print a green banner over a refused document.
|
|
327
236
|
*
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
237
|
+
* @param results - One result per skill validated
|
|
238
|
+
* @param runFindings - The run-level findings the document published
|
|
239
|
+
* @param examined - The published report's `examined`, never recounted
|
|
240
|
+
* @param verbose - Render every finding in full, and the per-skill detail
|
|
331
241
|
*/
|
|
332
|
-
export function formatValidationReportLines(results,
|
|
333
|
-
const
|
|
334
|
-
const
|
|
335
|
-
const counts = countBySeverity(issues);
|
|
336
|
-
const status = calculateValidationStatus(issues);
|
|
337
|
-
const lines = [reportBanner(status, counts)];
|
|
242
|
+
export function formatValidationReportLines(results, runFindings, examined, verbose) {
|
|
243
|
+
const counts = countBySeverity([...results.flatMap(skillFindings), ...toFindings(runFindings)]);
|
|
244
|
+
const lines = [reportBanner(counts, examined)];
|
|
338
245
|
for (const result of results) {
|
|
339
246
|
if (!hasFindings(result))
|
|
340
247
|
continue;
|
|
341
248
|
lines.push(...skillReportLines(result, verbose));
|
|
342
249
|
}
|
|
343
|
-
const runLines = formatRunIssueLines(
|
|
250
|
+
const runLines = formatRunIssueLines(runFindings);
|
|
344
251
|
if (runLines.length > 0) {
|
|
345
252
|
lines.push(...runLines, '');
|
|
346
253
|
}
|
|
347
254
|
return lines;
|
|
348
255
|
}
|
|
349
256
|
/**
|
|
350
|
-
*
|
|
257
|
+
* The human half, on stderr: the report lines and the quality footer.
|
|
351
258
|
*/
|
|
352
|
-
function reportValidationToStderr(results,
|
|
353
|
-
// Collect all emitted codes across skills
|
|
354
|
-
const emittedCodes = new Set(
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
const hasSkillFindings = results.some((r) => calculateValidationStatus(r.allErrors) !== 'success');
|
|
364
|
-
for (const line of formatValidationReportLines(results, runIssues, verbose, patterns)) {
|
|
259
|
+
function reportValidationToStderr(results, runFindings, examined, logger, verbose) {
|
|
260
|
+
// Collect all emitted codes across skills and the run to drive the footer.
|
|
261
|
+
const emittedCodes = new Set([
|
|
262
|
+
...results.flatMap((r) => r.allErrors.map((issue) => issue.code)),
|
|
263
|
+
...runFindings.map((issue) => issue.code),
|
|
264
|
+
]);
|
|
265
|
+
const hasSkillFindings = results.some((r) => {
|
|
266
|
+
const counts = countBySeverity(skillFindings(r));
|
|
267
|
+
return counts.errors + counts.warnings > 0;
|
|
268
|
+
});
|
|
269
|
+
for (const line of formatValidationReportLines(results, runFindings, examined, verbose)) {
|
|
365
270
|
logger.info(line);
|
|
366
271
|
}
|
|
367
272
|
renderSkillQualityFooter(logger, hasSkillFindings, emittedCodes);
|
|
@@ -369,17 +274,15 @@ function reportValidationToStderr(results, logger, verbose, runIssues, patterns)
|
|
|
369
274
|
/**
|
|
370
275
|
* Log validation progress for a single skill.
|
|
371
276
|
*
|
|
372
|
-
* The per-skill glyph follows the
|
|
373
|
-
* skill), and the severity breakdown is always spelled out. A
|
|
374
|
-
* warnings used to print a bare `✅ <name>`, which is the same
|
|
375
|
-
* collapse as the batch banner, one line earlier.
|
|
277
|
+
* The per-skill glyph follows the skill's worst severity (`⚠️` for a
|
|
278
|
+
* warning-only skill), and the severity breakdown is always spelled out. A
|
|
279
|
+
* skill with warnings used to print a bare `✅ <name>`, which is the same
|
|
280
|
+
* reassuring collapse as the batch banner, one line earlier.
|
|
376
281
|
*/
|
|
377
282
|
export function formatSkillProgressLine(skillName, result) {
|
|
378
|
-
const counts = countBySeverity(result
|
|
379
|
-
const
|
|
380
|
-
const
|
|
381
|
-
const detail = result.allErrors.length > 0 ? `: ${formatSeverityBreakdown(counts)}` : '';
|
|
382
|
-
const lines = [` ${glyph} ${skillName}${detail}`];
|
|
283
|
+
const counts = countBySeverity(skillFindings(result));
|
|
284
|
+
const detail = result.allErrors.length > 0 ? `: ${formatSeverityBreakdown(countBySeverity(result.allErrors))}` : '';
|
|
285
|
+
const lines = [` ${glyphFor(counts)} ${skillName}${detail}`];
|
|
383
286
|
if (result.ignoredErrors.length > 0) {
|
|
384
287
|
lines.push(` (${result.ignoredErrors.length} allowed by config)`);
|
|
385
288
|
}
|
|
@@ -411,17 +314,33 @@ function logSkillProgress(skillName, result, logger) {
|
|
|
411
314
|
*/
|
|
412
315
|
export async function buildSkillsValidateRegistry(projectRoot, options = {}) {
|
|
413
316
|
const { config, populationSource } = options;
|
|
414
|
-
const registry = await ResourceRegistry.fromCrawl({
|
|
317
|
+
const { registry } = await ResourceRegistry.fromCrawl({
|
|
415
318
|
baseDir: projectRoot,
|
|
416
319
|
include: ['**/*.md'],
|
|
417
320
|
// `vat skills validate` acts on this registry as the whole population: a
|
|
418
321
|
// directory it cannot list refuses the run by name, exit 2.
|
|
419
322
|
unreadable: 'refuse',
|
|
323
|
+
// It only reads the project.
|
|
324
|
+
outputs: [],
|
|
420
325
|
...(populationSource !== undefined && { populationSource }),
|
|
421
326
|
}, config === undefined ? undefined : { config });
|
|
422
327
|
registry.resolveLinks();
|
|
423
328
|
return registry;
|
|
424
329
|
}
|
|
330
|
+
/**
|
|
331
|
+
* Build a single shared validation context for an entire `vat skills validate`
|
|
332
|
+
* invocation.
|
|
333
|
+
*
|
|
334
|
+
* When every skill in the batch resolves to the same projectRoot (the normal
|
|
335
|
+
* monorepo case), we crawl the resource registry once and hand the same
|
|
336
|
+
* instance to each skill's validation — the per-skill markdown reparse
|
|
337
|
+
* disappears. Similarly, gitignore checks are backed by a single
|
|
338
|
+
* {@link GitTracker} when every skill sits inside the same git repository.
|
|
339
|
+
*
|
|
340
|
+
* When the batch is heterogeneous (e.g. multiple projectRoots), the helper
|
|
341
|
+
* returns an empty context and validators transparently fall back to their
|
|
342
|
+
* legacy per-skill setup — correctness first, perf second.
|
|
343
|
+
*/
|
|
425
344
|
export async function buildSharedValidationContext(skills, projectSkills, config, logger) {
|
|
426
345
|
// The allow-entry ledger is not an optimization like the two below — it is
|
|
427
346
|
// what makes ALLOW_UNUSED true. `validation.allow` is declared once for the
|
|
@@ -449,7 +368,7 @@ export async function buildSharedValidationContext(skills, projectSkills, config
|
|
|
449
368
|
// lane must model a bundle that excludes EVERY declared suite, not just the
|
|
450
369
|
// subject's. Present even for an empty batch, so no early return can drop it.
|
|
451
370
|
if (skills.length === 0) {
|
|
452
|
-
return { allowLedger, projectSkills, suiteProbe, unreadable: 'refuse' };
|
|
371
|
+
return { allowLedger, projectSkills, suiteProbe, unreadable: 'refuse', outputs: [] };
|
|
453
372
|
}
|
|
454
373
|
const projectRoots = new Set();
|
|
455
374
|
const gitRoots = new Set();
|
|
@@ -467,7 +386,8 @@ export async function buildSharedValidationContext(skills, projectSkills, config
|
|
|
467
386
|
gitRoots.add(safePath.resolve(gitRoot));
|
|
468
387
|
}
|
|
469
388
|
}
|
|
470
|
-
|
|
389
|
+
// Validation only reads the project.
|
|
390
|
+
const context = { allowLedger, projectSkills, suiteProbe, unreadable: 'refuse', outputs: [] };
|
|
471
391
|
// One tracker per repo; when the batch spans repos, skip rather than spawn
|
|
472
392
|
// multiple `git ls-files`.
|
|
473
393
|
//
|
|
@@ -500,10 +420,8 @@ export async function buildSharedValidationContext(skills, projectSkills, config
|
|
|
500
420
|
// `include` is unchanged either way — `ResourceRegistry.crawl` re-applies
|
|
501
421
|
// it to whatever the source offers, so this stays a markdown-only registry
|
|
502
422
|
// on both lanes.
|
|
503
|
-
const registry = await withResourcePopulationSource({ root: sharedRoot, gitTracker: context.gitTracker },
|
|
504
|
-
logger.debug(populationSource
|
|
505
|
-
? `Enumerating via the projection lane (${RESOURCES_CRAWL_ENV}=${RESOURCES_CRAWL_PROJECTION})`
|
|
506
|
-
: `Enumerating via the incumbent walk (${RESOURCES_CRAWL_ENV} unset)`);
|
|
423
|
+
const registry = await withResourcePopulationSource({ root: sharedRoot, gitTracker: context.gitTracker }, (populationSource) => {
|
|
424
|
+
logger.debug(crawlLaneDebugLine(populationSource));
|
|
507
425
|
return buildSkillsValidateRegistry(sharedRoot, {
|
|
508
426
|
// The command's OWN config, not a second read of the same file. It
|
|
509
427
|
// governs `sharedRoot` by construction: this command exits early
|
|
@@ -526,108 +444,104 @@ export async function buildSharedValidationContext(skills, projectSkills, config
|
|
|
526
444
|
return context;
|
|
527
445
|
}
|
|
528
446
|
/**
|
|
529
|
-
* Validate every
|
|
530
|
-
*
|
|
447
|
+
* Validate every skill the `skills:` block declares (narrowed by `--skill`).
|
|
448
|
+
*
|
|
449
|
+
* @param skillsConfig - The config's `skills:` block
|
|
450
|
+
* @param cwd - The directory the config was read from; discovery globs resolve against it
|
|
451
|
+
* @param config - The whole config, handed to the shared registry
|
|
452
|
+
* @param options - `--skill`
|
|
453
|
+
* @param logger - Progress on stderr
|
|
454
|
+
*/
|
|
455
|
+
async function validateConfiguredSkills(skillsConfig, cwd, config, options, logger) {
|
|
456
|
+
// `'refuse'`: one fewer skill at exit 0 is the drop this command must not
|
|
457
|
+
// make. A directory the OS will not list is refused by code (INPUT_UNREADABLE).
|
|
458
|
+
const discovered = await discoverSkillsFromConfig(skillsConfig, cwd, 'refuse');
|
|
459
|
+
// No early return on `discovered.length === 0`: the empty batch flows through
|
|
460
|
+
// every step below unchanged — the shared context is built for zero skills
|
|
461
|
+
// (its ledger and probe exist regardless), the loop runs zero times, and the
|
|
462
|
+
// writer refuses the zero denominator.
|
|
463
|
+
const { defaults, config: perSkillConfig } = skillsConfig;
|
|
464
|
+
const validatableSkills = discovered.map(skill => ({
|
|
465
|
+
...skill,
|
|
466
|
+
packagingConfig: mergeSkillPackagingConfig(defaults, perSkillConfig?.[skill.name]),
|
|
467
|
+
}));
|
|
468
|
+
const skillsToValidate = filterSkillsByName(validatableSkills, options.skill);
|
|
469
|
+
logger.info(`🔍 Found ${skillsToValidate.length} skill(s) to validate\n`);
|
|
470
|
+
// Every declared skill, not just `skillsToValidate`: `--skill x` narrows what is
|
|
471
|
+
// REPORTED on, never what counts as some skill's declared test input.
|
|
472
|
+
const projectSkills = collectDeclaredEvalSuites(skillsConfig, discovered);
|
|
473
|
+
const sharedContext = await buildSharedValidationContext(skillsToValidate, projectSkills, config, logger);
|
|
474
|
+
// In order: `sharedContext`'s caches and the per-skill progress lines.
|
|
475
|
+
const results = await mapInOrder(skillsToValidate, async (skill) => {
|
|
476
|
+
logger.info(` Validating: ${skill.name}`);
|
|
477
|
+
logger.debug(` Source: ${skill.sourcePath}`);
|
|
478
|
+
const result = await validateSkillForPackaging(skill.sourcePath, skill.packagingConfig, 'source', sharedContext);
|
|
479
|
+
// `cwd` is the anchor root: config is read from it and discovery globs
|
|
480
|
+
// resolve against it, so every other location in this report is already
|
|
481
|
+
// relative to it.
|
|
482
|
+
applyConfigVerdicts(result, skill.packagingConfig.targets, skill.sourcePath, cwd);
|
|
483
|
+
logSkillProgress(skill.name, result, logger);
|
|
484
|
+
return result;
|
|
485
|
+
});
|
|
486
|
+
// Drain the run's allow ledger AFTER the last skill — an entry matched by
|
|
487
|
+
// any skill in the batch is used, so this is the first point at which
|
|
488
|
+
// "matched nothing" is answerable.
|
|
489
|
+
const runIssues = sharedContext.allowLedger === undefined ? [] : allowUnusedIssues(sharedContext.allowLedger);
|
|
490
|
+
return { results, runIssues };
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Validate every configured skill and hand back the report, printing it
|
|
494
|
+
* nowhere.
|
|
495
|
+
*
|
|
496
|
+
* The phase entry point for `vat validate` and `vat verify`, and the command's
|
|
497
|
+
* own. The report is the one BEFORE the writer's run-integrity pass: inside an
|
|
498
|
+
* orchestrator, `runPhase` applies the same pass to this phase's report, by the
|
|
499
|
+
* declaration this verb gives its own writer.
|
|
531
500
|
*
|
|
532
|
-
*
|
|
533
|
-
*
|
|
534
|
-
* info line
|
|
535
|
-
*
|
|
536
|
-
*
|
|
501
|
+
* A run that validated no skill — globs that discover nothing, or a config
|
|
502
|
+
* with no `skills:` block — is not a clean run. It used to take an early
|
|
503
|
+
* return that printed one info line and published NO document at exit 0, and
|
|
504
|
+
* `vat validate` folded that into success: the gate the docs name as THE gate,
|
|
505
|
+
* green forever on a config that checked nothing. Now it reports zero skills,
|
|
506
|
+
* which the writer refuses with `RESOURCE_CHECK_BROKEN` (exit 1) when this is
|
|
507
|
+
* the whole run; stderr names the globs that matched nothing. Both
|
|
508
|
+
* orchestrators skip this phase for a config with no `skills:` block.
|
|
537
509
|
*
|
|
538
|
-
*
|
|
539
|
-
*
|
|
540
|
-
*
|
|
541
|
-
* builder as a populated batch, which refuses a zero denominator (see
|
|
542
|
-
* {@link withRunIntegrity}): a document with one `RESOURCE_CHECK_BROKEN` at
|
|
543
|
-
* `error`, `status: error`, exit 1. Exit 1 and not 2, deliberately: the run
|
|
544
|
-
* completed and the gate FAILED, which is the class an operator's CI already
|
|
545
|
-
* handles; 2 is for a run that could not answer at all.
|
|
510
|
+
* Every refusal is classified by code: a `[path]` naming nothing, an unknown
|
|
511
|
+
* `--skill`, no project root → `USAGE_INVALID`; an unlistable directory →
|
|
512
|
+
* `INPUT_UNREADABLE`; a config that does not parse → `CONFIG_INVALID`.
|
|
546
513
|
*/
|
|
547
514
|
export async function runSkillsValidatePhase(pathArg, options) {
|
|
548
515
|
const { logger, cwd, startTime } = setupCommandContext(pathArg, options.debug);
|
|
549
516
|
try {
|
|
550
|
-
|
|
551
|
-
//
|
|
552
|
-
//
|
|
553
|
-
// to satisfy the policy contract.
|
|
517
|
+
assertScopableSkillsPath(SCOPE_SUBJECT, pathArg);
|
|
518
|
+
// Spec §7: `vat skills validate` requires a projectRoot. Config is read
|
|
519
|
+
// from `cwd`; the guard exists to satisfy the policy contract.
|
|
554
520
|
requireProjectRoot(cwd, 'vat skills validate');
|
|
555
521
|
// Load config yaml from cwd (not workspace root — config lives next to the package)
|
|
556
|
-
const config = loadConfig(cwd);
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
const { defaults, config: perSkillConfig } = config.skills;
|
|
571
|
-
const validatableSkills = discovered.map(skill => ({
|
|
572
|
-
...skill,
|
|
573
|
-
packagingConfig: mergeSkillPackagingConfig(defaults, perSkillConfig?.[skill.name]),
|
|
574
|
-
}));
|
|
575
|
-
// Filter by name if specified
|
|
576
|
-
const skillsToValidate = filterSkillsByName(validatableSkills, options.skill);
|
|
577
|
-
logger.info(`🔍 Found ${skillsToValidate.length} skill(s) to validate\n`);
|
|
578
|
-
// Build shared context once per invocation. Both the resource registry
|
|
579
|
-
// (for markdown parses) and the git tracker (for gitignore checks) can be
|
|
580
|
-
// shared across every skill whose projectRoot + gitRoot match the derived
|
|
581
|
-
// values, which is the common case for a single-repo `vat skills validate`.
|
|
582
|
-
// Every declared skill, not just `skillsToValidate`: `--skill x` narrows what is
|
|
583
|
-
// REPORTED on, never what counts as some skill's declared test input.
|
|
584
|
-
const projectSkills = collectDeclaredEvalSuites(config.skills, discovered);
|
|
585
|
-
const sharedContext = await buildSharedValidationContext(skillsToValidate, projectSkills, config, logger);
|
|
586
|
-
// Validate each skill
|
|
587
|
-
const results = [];
|
|
588
|
-
for (const skill of skillsToValidate) {
|
|
589
|
-
logger.info(` Validating: ${skill.name}`);
|
|
590
|
-
logger.debug(` Source: ${skill.sourcePath}`);
|
|
591
|
-
const result = await validateSkillForPackaging(skill.sourcePath, skill.packagingConfig, 'source', sharedContext);
|
|
592
|
-
// `cwd` is the anchor root: config is read from it and discovery globs
|
|
593
|
-
// resolve against it, so every other location in this report is already
|
|
594
|
-
// relative to it.
|
|
595
|
-
applyConfigVerdicts(result, skill.packagingConfig.targets, skill.sourcePath, cwd);
|
|
596
|
-
logSkillProgress(skill.name, result, logger);
|
|
597
|
-
results.push(result);
|
|
598
|
-
}
|
|
599
|
-
// Drain the run's allow ledger AFTER the last skill — an entry matched by
|
|
600
|
-
// any skill in the batch is used, so this is the first point at which
|
|
601
|
-
// "matched nothing" is answerable.
|
|
602
|
-
const runIssues = sharedContext.allowLedger === undefined
|
|
603
|
-
? []
|
|
604
|
-
: allowUnusedIssues(sharedContext.allowLedger);
|
|
605
|
-
const duration = Date.now() - startTime;
|
|
606
|
-
const verbose = options.verbose === true;
|
|
607
|
-
const document = buildValidateSummary(results, duration, verbose, runIssues, config.skills);
|
|
608
|
-
reportValidationToStderr(results, logger, verbose, runIssues, config.skills);
|
|
609
|
-
// The exit code is read off the DOCUMENT, not recomputed beside it, so the
|
|
610
|
-
// two cannot disagree: whatever the builder refused, the process refuses.
|
|
611
|
-
// `issueCounts.errors` counts an active error on any skill and every
|
|
612
|
-
// run-level error alike — including the zero-denominator refusal.
|
|
613
|
-
return { document, exitCode: document.issueCounts.errors > 0 ? 1 : 0 };
|
|
522
|
+
const config = loadConfig(cwd, 'source');
|
|
523
|
+
const { results, runIssues } = config?.skills === undefined
|
|
524
|
+
? { results: [], runIssues: [] }
|
|
525
|
+
: await validateConfiguredSkills(config.skills, cwd, config, options, logger);
|
|
526
|
+
const report = buildSkillsValidateReport({
|
|
527
|
+
root: cwd,
|
|
528
|
+
results,
|
|
529
|
+
runIssues,
|
|
530
|
+
durationMs: Date.now() - startTime,
|
|
531
|
+
});
|
|
532
|
+
reportValidationToStderr(results, runIssues, report.examined, logger, options.verbose === true);
|
|
533
|
+
if (report.examined === 0)
|
|
534
|
+
logger.error(nothingDiscoveredLine(config?.skills));
|
|
535
|
+
return { report };
|
|
614
536
|
}
|
|
615
537
|
catch (error) {
|
|
616
|
-
return {
|
|
617
|
-
document: reportCommandError(error, logger, startTime, 'SkillsValidate'),
|
|
618
|
-
exitCode: 2,
|
|
619
|
-
failed: true,
|
|
620
|
-
};
|
|
538
|
+
return { report: refusalReport(refusalCodeOf(error), error, GATE, NOTHING_FINISHED) };
|
|
621
539
|
}
|
|
622
540
|
}
|
|
623
541
|
/**
|
|
624
542
|
* Skills validate command implementation
|
|
625
543
|
*/
|
|
626
544
|
export async function validateCommand(pathArg, options) {
|
|
627
|
-
|
|
628
|
-
// YAML like its report.
|
|
629
|
-
finishCommand(await runSkillsValidatePhase(pathArg, options), (document) => {
|
|
630
|
-
writeYamlSummary(document);
|
|
631
|
-
}, undefined);
|
|
545
|
+
endWithReport('skills validate', (await runSkillsValidatePhase(pathArg, options)).report, FORMAT);
|
|
632
546
|
}
|
|
633
547
|
//# sourceMappingURL=validate.js.map
|