@vibe-agent-toolkit/cli 0.2.0-rc.1 → 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 +4 -5
- package/dist/bin/vat +95 -28
- package/dist/bin/vat.js +95 -28
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +115 -76
- package/dist/bin.js.map +1 -1
- package/dist/command-loaders.d.ts +44 -0
- package/dist/command-loaders.d.ts.map +1 -0
- package/dist/command-loaders.js +60 -0
- package/dist/command-loaders.js.map +1 -0
- package/dist/commands/agent/build.d.ts.map +1 -1
- package/dist/commands/agent/build.js +2 -1
- package/dist/commands/agent/build.js.map +1 -1
- package/dist/commands/agent/import.d.ts.map +1 -1
- package/dist/commands/agent/import.js +3 -2
- package/dist/commands/agent/import.js.map +1 -1
- package/dist/commands/agent/index.js +1 -1
- package/dist/commands/agent/install-path.d.ts +36 -0
- package/dist/commands/agent/install-path.d.ts.map +1 -0
- package/dist/commands/agent/install-path.js +44 -0
- package/dist/commands/agent/install-path.js.map +1 -0
- package/dist/commands/agent/install.d.ts.map +1 -1
- package/dist/commands/agent/install.js +66 -13
- package/dist/commands/agent/install.js.map +1 -1
- package/dist/commands/agent/installed.d.ts.map +1 -1
- package/dist/commands/agent/installed.js +22 -12
- package/dist/commands/agent/installed.js.map +1 -1
- package/dist/commands/agent/list.d.ts.map +1 -1
- package/dist/commands/agent/list.js +2 -1
- package/dist/commands/agent/list.js.map +1 -1
- package/dist/commands/agent/run.d.ts.map +1 -1
- package/dist/commands/agent/run.js +2 -1
- package/dist/commands/agent/run.js.map +1 -1
- package/dist/commands/agent/uninstall.d.ts.map +1 -1
- package/dist/commands/agent/uninstall.js +13 -6
- package/dist/commands/agent/uninstall.js.map +1 -1
- package/dist/commands/agent/validate.d.ts.map +1 -1
- package/dist/commands/agent/validate.js +3 -2
- package/dist/commands/agent/validate.js.map +1 -1
- package/dist/commands/ard/emit.d.ts +153 -0
- package/dist/commands/ard/emit.d.ts.map +1 -0
- package/dist/commands/ard/emit.js +276 -0
- package/dist/commands/ard/emit.js.map +1 -0
- package/dist/commands/ard/index.d.ts +12 -0
- package/dist/commands/ard/index.d.ts.map +1 -0
- package/dist/commands/ard/index.js +80 -0
- package/dist/commands/ard/index.js.map +1 -0
- package/dist/commands/ard/surfaces.d.ts +56 -0
- package/dist/commands/ard/surfaces.d.ts.map +1 -0
- package/dist/commands/ard/surfaces.js +150 -0
- package/dist/commands/ard/surfaces.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 +11 -7
- package/dist/commands/audit/distributed-tree.js.map +1 -1
- package/dist/commands/audit/git-url-clone.d.ts +1 -1
- package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
- package/dist/commands/audit/git-url-clone.js.map +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
- package/dist/commands/audit/hierarchical-output.js +1 -1
- package/dist/commands/audit/hierarchical-output.js.map +1 -1
- package/dist/commands/audit/provenance.d.ts.map +1 -1
- package/dist/commands/audit/provenance.js +4 -3
- package/dist/commands/audit/provenance.js.map +1 -1
- package/dist/commands/audit/scan-population.d.ts +158 -0
- package/dist/commands/audit/scan-population.d.ts.map +1 -0
- package/dist/commands/audit/scan-population.js +292 -0
- package/dist/commands/audit/scan-population.js.map +1 -0
- package/dist/commands/audit-settings.d.ts.map +1 -1
- package/dist/commands/audit-settings.js +6 -5
- package/dist/commands/audit-settings.js.map +1 -1
- package/dist/commands/audit.d.ts +98 -8
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +1126 -394
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +40 -36
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cache/cache-control.d.ts +82 -0
- package/dist/commands/cache/cache-control.d.ts.map +1 -0
- package/dist/commands/cache/cache-control.js +86 -0
- package/dist/commands/cache/cache-control.js.map +1 -0
- package/dist/commands/cache/clear.d.ts +34 -6
- package/dist/commands/cache/clear.d.ts.map +1 -1
- package/dist/commands/cache/clear.js +101 -15
- package/dist/commands/cache/clear.js.map +1 -1
- package/dist/commands/cache/index.d.ts +13 -63
- package/dist/commands/cache/index.d.ts.map +1 -1
- package/dist/commands/cache/index.js +47 -79
- package/dist/commands/cache/index.js.map +1 -1
- package/dist/commands/claude/claude-config.d.ts.map +1 -1
- package/dist/commands/claude/claude-config.js +6 -0
- package/dist/commands/claude/claude-config.js.map +1 -1
- package/dist/commands/claude/context.d.ts +340 -0
- package/dist/commands/claude/context.d.ts.map +1 -0
- package/dist/commands/claude/context.js +1080 -0
- package/dist/commands/claude/context.js.map +1 -0
- package/dist/commands/claude/index.d.ts +14 -0
- package/dist/commands/claude/index.d.ts.map +1 -1
- package/dist/commands/claude/index.js +22 -2
- package/dist/commands/claude/index.js.map +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.d.ts +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.js +1 -2
- package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.js +40 -31
- package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.js +0 -1
- package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish-tree.js +0 -6
- package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
- package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish.js +2 -1
- package/dist/commands/claude/marketplace/publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate.d.ts +73 -22
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +407 -72
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/org/api-keys.d.ts +0 -3
- package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
- package/dist/commands/claude/org/api-keys.js +2 -1
- package/dist/commands/claude/org/api-keys.js.map +1 -1
- package/dist/commands/claude/org/helpers.d.ts +54 -1
- package/dist/commands/claude/org/helpers.d.ts.map +1 -1
- package/dist/commands/claude/org/helpers.js +42 -7
- 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 +24 -16
- package/dist/commands/claude/org/index.js.map +1 -1
- package/dist/commands/claude/org/invites.d.ts +0 -3
- package/dist/commands/claude/org/invites.d.ts.map +1 -1
- package/dist/commands/claude/org/invites.js +3 -2
- package/dist/commands/claude/org/invites.js.map +1 -1
- package/dist/commands/claude/org/skills.d.ts +527 -0
- package/dist/commands/claude/org/skills.d.ts.map +1 -1
- package/dist/commands/claude/org/skills.js +1414 -108
- package/dist/commands/claude/org/skills.js.map +1 -1
- package/dist/commands/claude/org/users.d.ts +0 -3
- package/dist/commands/claude/org/users.d.ts.map +1 -1
- package/dist/commands/claude/org/users.js +6 -3
- package/dist/commands/claude/org/users.js.map +1 -1
- package/dist/commands/claude/org/workspaces.d.ts +0 -3
- package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
- package/dist/commands/claude/org/workspaces.js +11 -7
- package/dist/commands/claude/org/workspaces.js.map +1 -1
- package/dist/commands/claude/plugin/build.d.ts +41 -3
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +147 -80
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
- package/dist/commands/claude/plugin/helpers.js +2 -7
- package/dist/commands/claude/plugin/helpers.js.map +1 -1
- package/dist/commands/claude/plugin/install.d.ts +12 -0
- package/dist/commands/claude/plugin/install.d.ts.map +1 -1
- package/dist/commands/claude/plugin/install.js +93 -62
- package/dist/commands/claude/plugin/install.js.map +1 -1
- package/dist/commands/claude/plugin/list.d.ts.map +1 -1
- package/dist/commands/claude/plugin/list.js +3 -2
- package/dist/commands/claude/plugin/list.js.map +1 -1
- package/dist/commands/claude/plugin/marketplace-json.d.ts +24 -9
- package/dist/commands/claude/plugin/marketplace-json.d.ts.map +1 -1
- package/dist/commands/claude/plugin/marketplace-json.js +10 -9
- package/dist/commands/claude/plugin/marketplace-json.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-changelog.js +0 -2
- package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.js +3 -6
- package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.js +3 -6
- package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts +73 -0
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +221 -14
- package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
- package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
- package/dist/commands/claude/plugin/uninstall.js +4 -4
- package/dist/commands/claude/plugin/uninstall.js.map +1 -1
- package/dist/commands/consistency-check.d.ts +17 -15
- package/dist/commands/consistency-check.d.ts.map +1 -1
- package/dist/commands/consistency-check.js +152 -106
- 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 +3 -0
- package/dist/commands/corpus/index.js.map +1 -1
- package/dist/commands/corpus/report.d.ts +1 -2
- package/dist/commands/corpus/report.d.ts.map +1 -1
- package/dist/commands/corpus/report.js +1 -3
- package/dist/commands/corpus/report.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts +58 -1
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +95 -41
- package/dist/commands/corpus/runner.js.map +1 -1
- package/dist/commands/corpus/scan.d.ts.map +1 -1
- package/dist/commands/corpus/scan.js +20 -12
- package/dist/commands/corpus/scan.js.map +1 -1
- package/dist/commands/corpus/seed.d.ts +4 -4
- package/dist/commands/corpus/seed.d.ts.map +1 -1
- package/dist/commands/corpus/seed.js +1 -3
- package/dist/commands/corpus/seed.js.map +1 -1
- package/dist/commands/doctor.d.ts +50 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +245 -52
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/inventory.d.ts +13 -1
- package/dist/commands/inventory.d.ts.map +1 -1
- package/dist/commands/inventory.js +121 -17
- package/dist/commands/inventory.js.map +1 -1
- package/dist/commands/mcp/collections.d.ts +1 -1
- package/dist/commands/mcp/collections.d.ts.map +1 -1
- package/dist/commands/mcp/list-collections.d.ts.map +1 -1
- package/dist/commands/mcp/list-collections.js +2 -1
- package/dist/commands/mcp/list-collections.js.map +1 -1
- package/dist/commands/mcp/serve.d.ts.map +1 -1
- package/dist/commands/mcp/serve.js +3 -2
- package/dist/commands/mcp/serve.js.map +1 -1
- package/dist/commands/okf/index.d.ts +11 -0
- package/dist/commands/okf/index.d.ts.map +1 -0
- package/dist/commands/okf/index.js +114 -0
- package/dist/commands/okf/index.js.map +1 -0
- package/dist/commands/okf/validate.d.ts +191 -0
- package/dist/commands/okf/validate.d.ts.map +1 -0
- package/dist/commands/okf/validate.js +190 -0
- package/dist/commands/okf/validate.js.map +1 -0
- package/dist/commands/phase-utils.d.ts +182 -114
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +154 -163
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/positional-args.d.ts.map +1 -1
- package/dist/commands/positional-args.js +3 -2
- package/dist/commands/positional-args.js.map +1 -1
- package/dist/commands/rag/clear-command.d.ts.map +1 -1
- package/dist/commands/rag/clear-command.js +2 -1
- package/dist/commands/rag/clear-command.js.map +1 -1
- package/dist/commands/rag/index-command.d.ts +64 -0
- package/dist/commands/rag/index-command.d.ts.map +1 -1
- package/dist/commands/rag/index-command.js +72 -6
- package/dist/commands/rag/index-command.js.map +1 -1
- package/dist/commands/rag/index.d.ts.map +1 -1
- package/dist/commands/rag/index.js +23 -10
- package/dist/commands/rag/index.js.map +1 -1
- package/dist/commands/rag/query-command.d.ts.map +1 -1
- package/dist/commands/rag/query-command.js +2 -1
- package/dist/commands/rag/query-command.js.map +1 -1
- package/dist/commands/rag/stats-command.d.ts.map +1 -1
- package/dist/commands/rag/stats-command.js +2 -1
- package/dist/commands/rag/stats-command.js.map +1 -1
- package/dist/commands/resources/builtin-help.d.ts +27 -0
- package/dist/commands/resources/builtin-help.d.ts.map +1 -0
- package/dist/commands/resources/builtin-help.js +46 -0
- package/dist/commands/resources/builtin-help.js.map +1 -0
- package/dist/commands/resources/check-progress.d.ts +154 -0
- package/dist/commands/resources/check-progress.d.ts.map +1 -0
- package/dist/commands/resources/check-progress.js +222 -0
- package/dist/commands/resources/check-progress.js.map +1 -0
- package/dist/commands/resources/check-supervisor.d.ts +465 -0
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -0
- package/dist/commands/resources/check-supervisor.js +573 -0
- package/dist/commands/resources/check-supervisor.js.map +1 -0
- package/dist/commands/resources/check.d.ts +593 -0
- package/dist/commands/resources/check.d.ts.map +1 -0
- package/dist/commands/resources/check.js +1365 -0
- package/dist/commands/resources/check.js.map +1 -0
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +418 -4
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/query.d.ts +106 -0
- package/dist/commands/resources/query.d.ts.map +1 -0
- package/dist/commands/resources/query.js +177 -0
- package/dist/commands/resources/query.js.map +1 -0
- package/dist/commands/resources/scan.d.ts +24 -0
- package/dist/commands/resources/scan.d.ts.map +1 -1
- package/dist/commands/resources/scan.js +17 -8
- package/dist/commands/resources/scan.js.map +1 -1
- package/dist/commands/resources/validate.d.ts +42 -2
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +208 -55
- package/dist/commands/resources/validate.js.map +1 -1
- package/dist/commands/skill/review-checklist.d.ts +3 -2
- package/dist/commands/skill/review-checklist.d.ts.map +1 -1
- package/dist/commands/skill/review-checklist.js +40 -2
- package/dist/commands/skill/review-checklist.js.map +1 -1
- package/dist/commands/skill/review.d.ts +247 -0
- package/dist/commands/skill/review.d.ts.map +1 -1
- package/dist/commands/skill/review.js +99 -62
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/configure.d.ts +56 -0
- package/dist/commands/skill/test/configure.d.ts.map +1 -1
- package/dist/commands/skill/test/configure.js +75 -16
- package/dist/commands/skill/test/configure.js.map +1 -1
- package/dist/commands/skill/test/run.d.ts +63 -10
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +258 -77
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build.d.ts +94 -4
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +325 -97
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/install.d.ts +2 -1
- package/dist/commands/skills/install.d.ts.map +1 -1
- package/dist/commands/skills/install.js +20 -31
- package/dist/commands/skills/install.js.map +1 -1
- package/dist/commands/skills/list.d.ts +2 -1
- package/dist/commands/skills/list.d.ts.map +1 -1
- package/dist/commands/skills/list.js +44 -26
- package/dist/commands/skills/list.js.map +1 -1
- package/dist/commands/skills/package.d.ts +1 -1
- package/dist/commands/skills/package.d.ts.map +1 -1
- package/dist/commands/skills/package.js +6 -8
- package/dist/commands/skills/package.js.map +1 -1
- package/dist/commands/skills/scope-guard.d.ts.map +1 -1
- package/dist/commands/skills/scope-guard.js +3 -5
- package/dist/commands/skills/scope-guard.js.map +1 -1
- package/dist/commands/skills/shared.d.ts.map +1 -1
- package/dist/commands/skills/shared.js +2 -4
- package/dist/commands/skills/shared.js.map +1 -1
- package/dist/commands/skills/skill-discovery.d.ts +47 -6
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +61 -11
- package/dist/commands/skills/skill-discovery.js.map +1 -1
- package/dist/commands/skills/source-resolvers.d.ts +15 -0
- package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
- package/dist/commands/skills/source-resolvers.js +25 -4
- 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 +11 -3
- package/dist/commands/skills/validate-command.js.map +1 -1
- package/dist/commands/skills/validate.d.ts +140 -4
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +224 -67
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +63 -27
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +119 -15
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +357 -142
- package/dist/commands/verify.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/report-schemas.d.ts +45 -0
- package/dist/report-schemas.d.ts.map +1 -0
- package/dist/report-schemas.js +100 -0
- package/dist/report-schemas.js.map +1 -0
- package/dist/skill-resolution/classify.js +2 -2
- package/dist/skill-resolution/classify.js.map +1 -1
- package/dist/skill-resolution/packaging-config.d.ts +49 -5
- package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
- package/dist/skill-resolution/packaging-config.js +59 -19
- 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 +55 -57
- package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
- package/dist/utils/agent-discovery.d.ts.map +1 -1
- package/dist/utils/agent-discovery.js +22 -11
- package/dist/utils/agent-discovery.js.map +1 -1
- package/dist/utils/agent-runner.d.ts.map +1 -1
- package/dist/utils/agent-runner.js +7 -4
- package/dist/utils/agent-runner.js.map +1 -1
- package/dist/utils/claude-context-lens.d.ts +34 -0
- package/dist/utils/claude-context-lens.d.ts.map +1 -0
- package/dist/utils/claude-context-lens.js +39 -0
- package/dist/utils/claude-context-lens.js.map +1 -0
- package/dist/utils/command-error.d.ts +138 -20
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +172 -36
- package/dist/utils/command-error.js.map +1 -1
- package/dist/utils/config-loader.d.ts +2 -1
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js +40 -14
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/corpus-target.d.ts +26 -0
- package/dist/utils/corpus-target.d.ts.map +1 -0
- package/dist/utils/corpus-target.js +35 -0
- package/dist/utils/corpus-target.js.map +1 -0
- package/dist/utils/edge-lens-evaluation.d.ts +83 -0
- package/dist/utils/edge-lens-evaluation.d.ts.map +1 -0
- package/dist/utils/edge-lens-evaluation.js +110 -0
- package/dist/utils/edge-lens-evaluation.js.map +1 -0
- package/dist/utils/help-loader.d.ts.map +1 -1
- package/dist/utils/help-loader.js +0 -1
- package/dist/utils/help-loader.js.map +1 -1
- package/dist/utils/issue-anchor.d.ts +2 -2
- package/dist/utils/issue-anchor.d.ts.map +1 -1
- package/dist/utils/issue-anchor.js +1 -1
- package/dist/utils/issue-rendering.d.ts +3 -3
- package/dist/utils/issue-rendering.d.ts.map +1 -1
- package/dist/utils/issue-rendering.js +3 -3
- package/dist/utils/issue-rendering.js.map +1 -1
- package/dist/utils/issue-severity.d.ts +12 -5
- package/dist/utils/issue-severity.d.ts.map +1 -1
- package/dist/utils/issue-severity.js +1 -1
- package/dist/utils/issue-severity.js.map +1 -1
- package/dist/utils/optional-backend.d.ts +78 -0
- package/dist/utils/optional-backend.d.ts.map +1 -0
- package/dist/utils/optional-backend.js +117 -0
- package/dist/utils/optional-backend.js.map +1 -0
- package/dist/utils/output.d.ts +26 -0
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +35 -0
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/package-json.d.ts +24 -0
- package/dist/utils/package-json.d.ts.map +1 -0
- package/dist/utils/package-json.js +49 -0
- package/dist/utils/package-json.js.map +1 -0
- package/dist/utils/population-wiring.d.ts +100 -0
- package/dist/utils/population-wiring.d.ts.map +1 -0
- package/dist/utils/population-wiring.js +98 -0
- package/dist/utils/population-wiring.js.map +1 -0
- package/dist/utils/project-root-policy.d.ts +20 -0
- package/dist/utils/project-root-policy.d.ts.map +1 -1
- package/dist/utils/project-root-policy.js +30 -0
- package/dist/utils/project-root-policy.js.map +1 -1
- package/dist/utils/projection-lenses.d.ts +98 -0
- package/dist/utils/projection-lenses.d.ts.map +1 -0
- package/dist/utils/projection-lenses.js +203 -0
- package/dist/utils/projection-lenses.js.map +1 -0
- package/dist/utils/projection-query.d.ts +324 -0
- package/dist/utils/projection-query.d.ts.map +1 -0
- package/dist/utils/projection-query.js +357 -0
- package/dist/utils/projection-query.js.map +1 -0
- package/dist/utils/projection-store.d.ts +335 -0
- package/dist/utils/projection-store.d.ts.map +1 -0
- package/dist/utils/projection-store.js +522 -0
- package/dist/utils/projection-store.js.map +1 -0
- package/dist/utils/relation-limits.d.ts +50 -0
- package/dist/utils/relation-limits.d.ts.map +1 -0
- package/dist/utils/relation-limits.js +50 -0
- package/dist/utils/relation-limits.js.map +1 -0
- package/dist/utils/repeatable-option.d.ts +37 -0
- package/dist/utils/repeatable-option.d.ts.map +1 -0
- package/dist/utils/repeatable-option.js +39 -0
- package/dist/utils/repeatable-option.js.map +1 -0
- package/dist/utils/resource-loader.d.ts +132 -2
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +288 -27
- package/dist/utils/resource-loader.js.map +1 -1
- package/dist/utils/root-argv.d.ts +53 -0
- package/dist/utils/root-argv.d.ts.map +1 -0
- package/dist/utils/root-argv.js +215 -0
- package/dist/utils/root-argv.js.map +1 -0
- package/dist/utils/run-integrity.d.ts +95 -0
- package/dist/utils/run-integrity.d.ts.map +1 -0
- package/dist/utils/run-integrity.js +102 -0
- package/dist/utils/run-integrity.js.map +1 -0
- package/dist/utils/skill-discovery.d.ts.map +1 -1
- package/dist/utils/skill-discovery.js +2 -1
- package/dist/utils/skill-discovery.js.map +1 -1
- package/dist/utils/skill-packaging-config.d.ts +63 -1
- package/dist/utils/skill-packaging-config.d.ts.map +1 -1
- package/dist/utils/skill-packaging-config.js +56 -1
- package/dist/utils/skill-packaging-config.js.map +1 -1
- package/dist/utils/sqlite-experimental-warning.d.ts +69 -0
- package/dist/utils/sqlite-experimental-warning.d.ts.map +1 -0
- package/dist/utils/sqlite-experimental-warning.js +144 -0
- package/dist/utils/sqlite-experimental-warning.js.map +1 -0
- package/dist/utils/url-redact.d.ts.map +1 -1
- package/dist/utils/url-redact.js +4 -6
- package/dist/utils/url-redact.js.map +1 -1
- package/dist/utils/user-context-scanner.d.ts +8 -0
- package/dist/utils/user-context-scanner.d.ts.map +1 -1
- package/dist/utils/user-context-scanner.js +4 -2
- 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 +12 -6
- package/dist/utils/validate-help-files.js.map +1 -1
- package/dist/utils/vat-bin-path.d.ts +36 -0
- package/dist/utils/vat-bin-path.d.ts.map +1 -0
- package/dist/utils/vat-bin-path.js +48 -0
- package/dist/utils/vat-bin-path.js.map +1 -0
- package/dist/utils/verdict-helpers.d.ts +1 -1
- package/dist/utils/verdict-helpers.d.ts.map +1 -1
- package/dist/utils/verdict-helpers.js +1 -1
- package/dist/utils/verdict-helpers.js.map +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -3
- package/dist/version.js.map +1 -1
- package/docs/agent.md +2 -2
- package/docs/audit.md +141 -37
- package/docs/doctor.md +7 -6
- package/docs/index.md +19 -11
- package/docs/mcp.md +2 -2
- package/docs/rag.md +3 -2
- package/docs/resources.md +13 -3
- package/docs/skill-test.md +10 -9
- package/docs/skills.md +53 -69
- package/package.json +35 -26
- package/schemas/ard-emit.json +149 -0
- package/schemas/okf-validate.json +170 -0
- package/schemas/resources-check.json +229 -0
- package/schemas/skill-review.json +230 -0
- package/dist/commands/resources/command-helpers.d.ts +0 -5
- package/dist/commands/resources/command-helpers.d.ts.map +0 -1
- package/dist/commands/resources/command-helpers.js +0 -6
- package/dist/commands/resources/command-helpers.js.map +0 -1
package/dist/commands/verify.js
CHANGED
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
* 5. packaged-content (in-process; built bundles carry nothing that must not ship)
|
|
10
10
|
* 6. consistency check (in-process; skill distribution integrity — package.json, plugin assignment)
|
|
11
11
|
*
|
|
12
|
-
* 1–3
|
|
13
|
-
* are chosen by
|
|
14
|
-
* are
|
|
12
|
+
* 1–3 delegate to a whole `vat` command and nest that command's own report under
|
|
13
|
+
* `report`; they are chosen by {@link selectVerifyPhases}. 4–6 exist only here and
|
|
14
|
+
* are chosen by `selectInProcessVerifyPhases`. Every phase runs in this process.
|
|
15
|
+
* Both sets are config-gated, and both are announced on startup.
|
|
15
16
|
*/
|
|
16
|
-
import { existsSync } from 'node:fs';
|
|
17
|
-
import {
|
|
18
|
-
import { calculateValidationStatus, countBySeverity, } from '@vibe-agent-toolkit/
|
|
19
|
-
import {
|
|
20
|
-
import { safePath } from '@vibe-agent-toolkit/utils';
|
|
17
|
+
import { existsSync, statSync } from 'node:fs';
|
|
18
|
+
import { detectPackagedAgentInstructionFiles, explicitFilesConfigDests, indexPluginLocalSkills, } from '@vibe-agent-toolkit/agent-skills';
|
|
19
|
+
import { calculateValidationStatus, countBySeverity, } from '@vibe-agent-toolkit/schema';
|
|
20
|
+
import { isPathAbsentError, safePath, toForwardSlash } from '@vibe-agent-toolkit/utils';
|
|
21
21
|
import { Command } from 'commander';
|
|
22
22
|
import { handleCommandError } from '../utils/command-error.js';
|
|
23
23
|
import { loadConfig } from '../utils/config-loader.js';
|
|
@@ -25,11 +25,15 @@ import { formatIssueLines } from '../utils/issue-rendering.js';
|
|
|
25
25
|
import { resolveIssueSeverity } from '../utils/issue-severity.js';
|
|
26
26
|
import { writeYamlOutput } from '../utils/output.js';
|
|
27
27
|
import { requireProjectRoot } from '../utils/project-root-policy.js';
|
|
28
|
-
import {
|
|
28
|
+
import { nothingCheckedFinding, runIntegrityFinding } from '../utils/run-integrity.js';
|
|
29
|
+
import { isSkillPublished, mergeSkillPackagingConfig, pluginLocalSkillConfigEntry, publishScope } from '../utils/skill-packaging-config.js';
|
|
30
|
+
import { runMarketplaceValidatePhase } from './claude/marketplace/validate.js';
|
|
29
31
|
import { runConsistencyChecks, } from './consistency-check.js';
|
|
30
32
|
import { addRetiredOnlyOption, aggregatePhaseStatus, applyPhaseSelection, createPhaseContext, decidePhaseSelection, exitCodeForPhases, rejectRetiredOnly, runPhase, } from './phase-utils.js';
|
|
31
33
|
import { rejectPositionalArguments } from './positional-args.js';
|
|
32
|
-
import {
|
|
34
|
+
import { runResourcesValidatePhase } from './resources/validate.js';
|
|
35
|
+
import { discoverSkillsFromConfig, readPluginLocalSkillNames } from './skills/skill-discovery.js';
|
|
36
|
+
import { runSkillsValidatePhase } from './skills/validate.js';
|
|
33
37
|
/**
|
|
34
38
|
* Measured full-run duration on the 90-skill / 1,041-document adopter, cited by
|
|
35
39
|
* the retired-`--only` message: resources 12.5s + skills 15.6s + marketplace
|
|
@@ -58,12 +62,12 @@ Description:
|
|
|
58
62
|
about as long as its slowest two phases, so a CI gate cannot lose coverage
|
|
59
63
|
by naming a phase whose config key was renamed out from under it.
|
|
60
64
|
|
|
61
|
-
Phases (
|
|
65
|
+
Phases (delegated to a whole vat command):
|
|
62
66
|
resources → link integrity, collection frontmatter schemas (when 'resources:' configured)
|
|
63
67
|
skills → SKILL.md frontmatter and packaging validation (when 'skills:' configured)
|
|
64
68
|
marketplace → strict marketplace validation (when 'claude.marketplaces:' configured)
|
|
65
69
|
|
|
66
|
-
Phases (
|
|
70
|
+
Phases (verify's own, run after the above, when 'skills:' is configured):
|
|
67
71
|
files-config-dests → every 'files:' dest exists in the built output. Appears
|
|
68
72
|
in the document only when a dest is missing.
|
|
69
73
|
packaged-content → built skill bundles carry no repo-internal agent-instruction
|
|
@@ -81,32 +85,48 @@ Description:
|
|
|
81
85
|
|
|
82
86
|
Output:
|
|
83
87
|
ONE YAML document → stdout
|
|
84
|
-
per phase: status (success | warning | error | system-error). A
|
|
88
|
+
per phase: status (success | warning | error | system-error). A delegated
|
|
85
89
|
phase's own report is captured and nested under 'report', so the whole run
|
|
86
90
|
is a single parseable document (a phase's stdout is never streamed
|
|
87
|
-
through). A phase's status comes from
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
through). A phase's status comes from its own REPORTED status, not from its
|
|
92
|
+
exit code — an exit code cannot express 'warning'. Verify's own phases also
|
|
93
|
+
publish issueCounts {errors, warnings, info}; 'consistency' and
|
|
90
94
|
'packaged-content' carry their findings into the document too, while
|
|
91
95
|
'files-config-dests' publishes counts only and lists the missing dests on
|
|
92
|
-
stderr.
|
|
96
|
+
stderr. 'packaged-content' also publishes bundlesInspected — the built
|
|
97
|
+
bundles it crawled — beside bundlesExpected (the bundles 'vat build'
|
|
98
|
+
produces for the skills this run discovered) and bundlesMissing (expected
|
|
99
|
+
bundles absent from dist/, by path). Zero inspected, or any missing, is
|
|
100
|
+
refused as RESOURCE_CHECK_BROKEN at error (exit 1) rather than reported as
|
|
101
|
+
a pass: a run that found none of the build (dist/ not built, or a
|
|
102
|
+
skills.include glob that matched nothing) or only part of it (a bundle
|
|
103
|
+
deleted, a skill added since the last build) is not a verdict on what ships.
|
|
104
|
+
A skill whose merged config says publish: false is IN-PLACE — never
|
|
105
|
+
bundled by 'vat build', so no pool bundle is expected for it (a stale one
|
|
106
|
+
in dist/skills is still inspected); bundlesInPlace counts them, and a run
|
|
107
|
+
whose every discovered skill is in place passes with nothing to inspect. A
|
|
108
|
+
plugin-local skill (a git-tracked skill dir under a plugin's skills/) is
|
|
109
|
+
never in place: it is expected in its plugin tree whatever publish says,
|
|
110
|
+
and never counted in bundlesInPlace. Declare
|
|
111
|
+
skills.defaults.publish: false for a project that builds with --only claude
|
|
112
|
+
and uses its other skills from the repo.
|
|
93
113
|
Progress and validation errors → stderr (streamed live)
|
|
94
114
|
|
|
95
|
-
By default each
|
|
96
|
-
that have findings. '--verbose' is forwarded to every
|
|
115
|
+
By default each delegated phase reports a per-asset summary plus the assets
|
|
116
|
+
that have findings. '--verbose' is forwarded to every delegated phase, which
|
|
97
117
|
then also lists the assets it inspected and found nothing to report.
|
|
98
118
|
|
|
99
119
|
Exit Codes:
|
|
100
120
|
0 - All phases passed (a warning does not fail the run — read status/issueCounts)
|
|
101
121
|
1 - Validation errors found
|
|
102
122
|
2 - System error (this command's own, or propagated from a phase that could
|
|
103
|
-
not run: exited 2,
|
|
104
|
-
|
|
123
|
+
not run: it exited 2, or reported 'system-error' for itself), or a usage
|
|
124
|
+
error such as passing a path
|
|
105
125
|
|
|
106
126
|
Arguments:
|
|
107
127
|
None. Scope comes from vibe-agent-toolkit.config.yaml, never from the command
|
|
108
128
|
line — a path argument is rejected (exit 2) rather than discarded. To inspect
|
|
109
|
-
ONE skill or bundle by path, use 'vat
|
|
129
|
+
ONE skill or bundle by path, use 'vat skill review <path>'.
|
|
110
130
|
|
|
111
131
|
Requirements:
|
|
112
132
|
projectRoot: required (errors if no vibe-agent-toolkit.config.yaml or .git/ ancestor)
|
|
@@ -131,11 +151,34 @@ function filesOf(entry) {
|
|
|
131
151
|
return entry.packaging.files ?? [];
|
|
132
152
|
}
|
|
133
153
|
/**
|
|
134
|
-
*
|
|
154
|
+
* Whether `dir` is a directory — `false` for a file and for nothing. Both are
|
|
155
|
+
* "no bundle here": a bundle is a tree, and a regular FILE sitting where one
|
|
156
|
+
* should be passed `existsSync`, was counted as built, and the packaged-content
|
|
157
|
+
* crawl then threw `Base path is not a directory: /abs/…` out of the whole
|
|
158
|
+
* command — exit 2, no document, an absolute path on stderr — where the
|
|
159
|
+
* missing-bundle lane names it at exit 1.
|
|
160
|
+
*
|
|
161
|
+
* A path the process cannot stat is NOT "no bundle here" and throws: reading a
|
|
162
|
+
* refused `dist/skills/x` as missing would name it under `missing` with a
|
|
163
|
+
* remedy ("run vat build") that cannot help.
|
|
164
|
+
*/
|
|
165
|
+
function isDirectory(dir) {
|
|
166
|
+
try {
|
|
167
|
+
return statSync(dir).isDirectory();
|
|
168
|
+
}
|
|
169
|
+
catch (error) {
|
|
170
|
+
if (isPathAbsentError(error))
|
|
171
|
+
return false;
|
|
172
|
+
throw error;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Register a (skillName, outputDir, packaging) candidate.
|
|
135
177
|
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
178
|
+
* A candidate whose output dir IS A DIRECTORY lands in `built` (deduplicated by
|
|
179
|
+
* key). An `expected` candidate is counted whether or not it exists, and one
|
|
180
|
+
* that is not a directory is named in `missing` — that absence is the finding,
|
|
181
|
+
* not a skip (see {@link isDirectory} for why "exists" is not enough).
|
|
139
182
|
*
|
|
140
183
|
* An EMPTY `files:` block is registered, not skipped: {@link checkFilesConfigDests}
|
|
141
184
|
* has nothing to verify for such a skill and filters it out itself, but
|
|
@@ -143,27 +186,33 @@ function filesOf(entry) {
|
|
|
143
186
|
* with no `files:` block is exactly the one whose agent-instruction file arrived by
|
|
144
187
|
* some other route, and dropping it here would make the crawl blind to it.
|
|
145
188
|
*/
|
|
146
|
-
function
|
|
147
|
-
|
|
148
|
-
if (
|
|
189
|
+
function addCheckCandidate(outputs, seen, cwd, candidate, expected) {
|
|
190
|
+
const key = `${candidate.skillName}\0${candidate.outputDir}`;
|
|
191
|
+
if (seen.has(key))
|
|
149
192
|
return;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
193
|
+
seen.add(key);
|
|
194
|
+
const exists = isDirectory(candidate.outputDir);
|
|
195
|
+
if (exists)
|
|
196
|
+
outputs.built.push(candidate);
|
|
197
|
+
if (!expected)
|
|
198
|
+
return;
|
|
199
|
+
outputs.expected += 1;
|
|
200
|
+
if (!exists)
|
|
201
|
+
outputs.missing.push(toForwardSlash(safePath.relative(cwd, candidate.outputDir)));
|
|
154
202
|
}
|
|
155
203
|
/**
|
|
156
|
-
* Every built skill bundle this project's config accounts for
|
|
157
|
-
*
|
|
204
|
+
* Every built skill bundle this project's config accounts for, with the `files:`
|
|
205
|
+
* entries that govern it — those that EXIST on disk, and the coverage of those
|
|
206
|
+
* the build should have produced (see {@link BuiltSkillOutputs}).
|
|
158
207
|
*
|
|
159
208
|
* ONE enumeration of "where did `vat build` write this skill", shared by every
|
|
160
209
|
* in-process verify phase, in the two locations the build actually uses:
|
|
161
210
|
* - Pool skills: `dist/skills/<fsName>/`
|
|
162
211
|
* - Tree-copy skills: `dist/.claude/plugins/.../skills/<name>/`
|
|
163
212
|
*
|
|
164
|
-
* Returns
|
|
165
|
-
* phases report the real config error, and
|
|
166
|
-
* with a second, worse diagnosis.
|
|
213
|
+
* Returns an empty enumeration (never throws) for an unreadable config: `vat
|
|
214
|
+
* verify`'s delegated phases report the real config error, and one of verify's
|
|
215
|
+
* own phases must not race them with a second, worse diagnosis.
|
|
167
216
|
*
|
|
168
217
|
* The pool arm enumerates the skills the run DISCOVERED, unioned with the keys of
|
|
169
218
|
* `skills.config`. It used to be the config keys alone, which made both in-process
|
|
@@ -185,6 +234,11 @@ function tryAddCheckEntry(checks, skillName, outputDir, packaging) {
|
|
|
185
234
|
* crawls the whole project, `vat verify` already needs the same list for its
|
|
186
235
|
* consistency phase, and an optional parameter here would let a call site quietly
|
|
187
236
|
* re-crawl (or, worse, skip discovery and reinstate the blindness above).
|
|
237
|
+
* `pluginLocal` is required for the same reason: listing plugin-local skills crawls
|
|
238
|
+
* every plugin, and `vat verify` builds that index ONCE for all three in-process phases.
|
|
239
|
+
* `pluginLocalNames` — every location's declared name, read once per run by
|
|
240
|
+
* `readPluginLocalSkillNames` — is required too: without it a plugin-local skill's config
|
|
241
|
+
* would be looked up by something other than the name the plugin build packaged it under.
|
|
188
242
|
*
|
|
189
243
|
* The merge goes through {@link mergeSkillPackagingConfig} — the ONE helper every
|
|
190
244
|
* lane uses — so `vat verify` and `vat build` cannot disagree about a skill's
|
|
@@ -192,39 +246,55 @@ function tryAddCheckEntry(checks, skillName, outputDir, packaging) {
|
|
|
192
246
|
* unread is what made `severity.PACKAGED_AGENT_INSTRUCTION_FILE: ignore` a no-op in
|
|
193
247
|
* this command.
|
|
194
248
|
*/
|
|
195
|
-
function collectBuiltSkillOutputs(cwd, discovered) {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
249
|
+
function collectBuiltSkillOutputs(cwd, discovered, pluginLocal, pluginLocalNames) {
|
|
250
|
+
const outputs = { built: [], expected: 0, inPlace: 0, missing: [] };
|
|
251
|
+
// No `try`, deliberately. The config was already loaded by the command (see
|
|
252
|
+
// `loadConfigTolerant`) and the in-process phases run only when it loaded, so
|
|
253
|
+
// `loadConfig` here answers from cache. The `catch { return outputs }` that
|
|
254
|
+
// used to wrap this whole body could only ever absorb a DEFECT — and it
|
|
255
|
+
// absorbed it into an empty candidate list, which every phase below then
|
|
256
|
+
// verified against: zero bundles, zero findings, exit 0.
|
|
257
|
+
const config = loadConfig(cwd);
|
|
258
|
+
if (!config)
|
|
259
|
+
return outputs;
|
|
260
|
+
const skillsConfig = config.skills;
|
|
261
|
+
const defaults = skillsConfig?.defaults;
|
|
262
|
+
// Dedup guard: key = `skillName\0outputDir`
|
|
263
|
+
const seen = new Set();
|
|
264
|
+
const packagingOf = (skillName) => mergeSkillPackagingConfig(defaults, skillsConfig?.config?.[skillName]);
|
|
265
|
+
// A plugin-local skill is never in place, whatever `publish` says: its plugin copy
|
|
266
|
+
// is expected below. Counted per discovered SKILL, not per name — a repo-only skill
|
|
267
|
+
// may share its declared name with a plugin-local one.
|
|
268
|
+
outputs.inPlace = discovered.filter((skill) => publishScope(skill, packagingOf(skill.name), pluginLocal) === 'in-place').length;
|
|
269
|
+
// --- Pool skills: candidate dir is dist/skills/<fsName> ---
|
|
270
|
+
// Expected only when discovered AND published (see BuiltSkillOutputs.expected).
|
|
271
|
+
// An in-place skill's stale bundle in dist/ is still inspected, just not demanded.
|
|
272
|
+
const discoveredNames = new Set(discovered.map((skill) => skill.name));
|
|
273
|
+
const poolNames = new Set([...discoveredNames, ...Object.keys(skillsConfig?.config ?? {})]);
|
|
274
|
+
for (const skillName of poolNames) {
|
|
275
|
+
const outputDir = safePath.resolve(cwd, 'dist', 'skills', skillNameToFsPath(skillName));
|
|
276
|
+
const packaging = packagingOf(skillName);
|
|
277
|
+
addCheckCandidate(outputs, seen, cwd, { skillName, outputDir, packaging }, discoveredNames.has(skillName) && isSkillPublished(packaging));
|
|
224
278
|
}
|
|
225
|
-
|
|
226
|
-
|
|
279
|
+
// --- Tree-copy skills: candidate dirs are plugin output skill dirs ---
|
|
280
|
+
// Always expected, whatever `publish` says: every location here is a
|
|
281
|
+
// plugin-local skill the claude build phase packages into the plugin tree —
|
|
282
|
+
// `publish` scopes the pool only (see `isSkillPublished`).
|
|
283
|
+
// Per-skill config goes through `pluginLocalSkillConfigEntry` — the plugin build's own
|
|
284
|
+
// lookup — under the declared name the build reads (`pluginLocalNames`).
|
|
285
|
+
for (const loc of pluginLocal.locations) {
|
|
286
|
+
const declaredName = pluginLocalNames.get(safePath.resolve(loc.skillSourceDir));
|
|
287
|
+
if (declaredName === undefined) {
|
|
288
|
+
throw new Error(`vat verify defect: no declared name was read for the plugin-local skill at ${loc.skillSourceDir}`);
|
|
289
|
+
}
|
|
290
|
+
const perSkill = pluginLocalSkillConfigEntry(skillsConfig?.config, { skillName: declaredName, skillDirPath: loc.skillDirPath });
|
|
291
|
+
addCheckCandidate(outputs, seen, cwd, {
|
|
292
|
+
skillName: loc.skillDirPath,
|
|
293
|
+
outputDir: loc.skillOutputDir,
|
|
294
|
+
packaging: mergeSkillPackagingConfig(defaults, perSkill),
|
|
295
|
+
}, true);
|
|
227
296
|
}
|
|
297
|
+
return outputs;
|
|
228
298
|
}
|
|
229
299
|
/**
|
|
230
300
|
* Check that all dest paths from the merged files config exist in the built output.
|
|
@@ -234,11 +304,13 @@ function collectBuiltSkillOutputs(cwd, discovered) {
|
|
|
234
304
|
*
|
|
235
305
|
* @param discovered - The skills this run discovered from `skills.include`. See
|
|
236
306
|
* {@link collectBuiltSkillOutputs} for why it is required rather than optional.
|
|
307
|
+
* @param pluginLocal - The run's plugin-local index — required for the same reason.
|
|
308
|
+
* @param pluginLocalNames - The declared name of every location in `pluginLocal` — required for the same reason.
|
|
237
309
|
* @returns One result per (skill, outputDir) pair where dests are absent.
|
|
238
310
|
*/
|
|
239
|
-
export function checkFilesConfigDests(cwd, discovered) {
|
|
311
|
+
export function checkFilesConfigDests(cwd, discovered, pluginLocal, pluginLocalNames) {
|
|
240
312
|
const results = [];
|
|
241
|
-
for (const check of collectBuiltSkillOutputs(cwd, discovered)) {
|
|
313
|
+
for (const check of collectBuiltSkillOutputs(cwd, discovered, pluginLocal, pluginLocalNames).built) {
|
|
242
314
|
const { skillName, outputDir } = check;
|
|
243
315
|
const mergedFiles = filesOf(check);
|
|
244
316
|
if (mergedFiles.length === 0)
|
|
@@ -246,7 +318,6 @@ export function checkFilesConfigDests(cwd, discovered) {
|
|
|
246
318
|
const missing = [];
|
|
247
319
|
for (const entry of mergedFiles) {
|
|
248
320
|
const destPath = safePath.resolve(outputDir, entry.dest);
|
|
249
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- destPath resolved from config
|
|
250
321
|
if (!existsSync(destPath)) {
|
|
251
322
|
missing.push(entry.dest);
|
|
252
323
|
}
|
|
@@ -290,20 +361,33 @@ export function checkFilesConfigDests(cwd, discovered) {
|
|
|
290
361
|
* whose usage is only answerable across a whole run, and this phase would have to
|
|
291
362
|
* drain a ledger it is not the run of — reporting ALLOW_UNUSED for every entry the
|
|
292
363
|
* project declares for other lanes. Severity is answerable per unit of work; allow
|
|
293
|
-
* is not. See `AllowUsageLedger` in `@vibe-agent-toolkit/
|
|
364
|
+
* is not. See `AllowUsageLedger` in `@vibe-agent-toolkit/schema`.
|
|
294
365
|
*
|
|
295
366
|
* Locations anchor at `cwd`, the run's stated root, so a reader can open them.
|
|
296
367
|
*
|
|
368
|
+
* Returns the count of bundles crawled beside the findings, because the phase
|
|
369
|
+
* that publishes them needs the denominator: zero findings over zero bundles is
|
|
370
|
+
* not a pass — see {@link buildPackagedContentPhase}.
|
|
371
|
+
*
|
|
297
372
|
* @param discovered - The skills this run discovered from `skills.include`. See
|
|
298
373
|
* {@link collectBuiltSkillOutputs} for why it is required rather than optional.
|
|
374
|
+
* @param pluginLocal - The run's plugin-local index — required for the same reason.
|
|
375
|
+
* @param pluginLocalNames - The declared name of every location in `pluginLocal` — required for the same reason.
|
|
299
376
|
*/
|
|
300
|
-
export function checkPackagedAgentInstructionFiles(cwd, discovered) {
|
|
377
|
+
export function checkPackagedAgentInstructionFiles(cwd, discovered, pluginLocal, pluginLocalNames) {
|
|
301
378
|
const issues = [];
|
|
302
|
-
|
|
379
|
+
const outputs = collectBuiltSkillOutputs(cwd, discovered, pluginLocal, pluginLocalNames);
|
|
380
|
+
for (const check of outputs.built) {
|
|
303
381
|
const raw = detectPackagedAgentInstructionFiles(check.outputDir, cwd, explicitFilesConfigDests(filesOf(check)));
|
|
304
382
|
issues.push(...resolveIssueSeverity(raw, check.packaging.validation));
|
|
305
383
|
}
|
|
306
|
-
return
|
|
384
|
+
return {
|
|
385
|
+
bundlesInspected: outputs.built.length,
|
|
386
|
+
bundlesExpected: outputs.expected,
|
|
387
|
+
bundlesInPlace: outputs.inPlace,
|
|
388
|
+
bundlesMissing: outputs.missing,
|
|
389
|
+
issues,
|
|
390
|
+
};
|
|
307
391
|
}
|
|
308
392
|
/**
|
|
309
393
|
* Load the project config without letting a broken one abort the command.
|
|
@@ -407,31 +491,35 @@ const VERIFY_VOCABULARY = {
|
|
|
407
491
|
* `vat build`).
|
|
408
492
|
*
|
|
409
493
|
* @param configError - The config-load failure, when the config could not be
|
|
410
|
-
* read. Every
|
|
411
|
-
*
|
|
412
|
-
* @param verbose - Forwarded to each
|
|
413
|
-
*
|
|
494
|
+
* read. Every delegated phase still runs so THE PHASE reports the real config
|
|
495
|
+
* error (exit 2) instead of this command guessing.
|
|
496
|
+
* @param verbose - Forwarded to each delegated phase. Each phase owns its own
|
|
497
|
+
* summarization; this command only relays the request.
|
|
414
498
|
*/
|
|
415
499
|
export function selectVerifyPhases(config, configError, verbose) {
|
|
416
500
|
const phases = [];
|
|
417
501
|
const unreadable = configError !== undefined;
|
|
418
|
-
const detail = verbose === true
|
|
502
|
+
const detail = verbose === true;
|
|
419
503
|
if (unreadable || config?.resources) {
|
|
420
|
-
phases.push({
|
|
504
|
+
phases.push({
|
|
505
|
+
name: 'resources',
|
|
506
|
+
run: () => runResourcesValidatePhase(undefined, { verbose: detail }),
|
|
507
|
+
});
|
|
421
508
|
}
|
|
422
509
|
if (unreadable || config?.skills) {
|
|
423
|
-
phases.push({
|
|
510
|
+
phases.push({
|
|
511
|
+
name: 'skills',
|
|
512
|
+
run: () => runSkillsValidatePhase(undefined, { verbose: detail }),
|
|
513
|
+
});
|
|
424
514
|
}
|
|
425
515
|
for (const name of Object.keys(config?.claude?.marketplaces ?? {})) {
|
|
516
|
+
// Bound per marketplace, so each phase closes over its OWN name. This is a
|
|
517
|
+
// loop over the adopter's config, which is why verify's phase count is
|
|
518
|
+
// `2 + n` and never the constant four its help text once implied.
|
|
519
|
+
const marketplacePath = `dist/.claude/plugins/marketplaces/${name}`;
|
|
426
520
|
phases.push({
|
|
427
521
|
name: `marketplace:${name}`,
|
|
428
|
-
|
|
429
|
-
'claude',
|
|
430
|
-
'marketplace',
|
|
431
|
-
'validate',
|
|
432
|
-
`dist/.claude/plugins/marketplaces/${name}`,
|
|
433
|
-
...detail,
|
|
434
|
-
],
|
|
522
|
+
run: () => runMarketplaceValidatePhase(marketplacePath, { verbose: detail }),
|
|
435
523
|
});
|
|
436
524
|
}
|
|
437
525
|
return decidePhaseSelection(undefined, phases, VERIFY_VOCABULARY, {
|
|
@@ -446,7 +534,7 @@ const PACKAGED_CONTENT = 'packaged-content';
|
|
|
446
534
|
* The SINGLE source for that question: {@link verifyTopLevelCommand} gates
|
|
447
535
|
* execution on this list and {@link formatVerifyAnnouncement} announces the same
|
|
448
536
|
* list, so the printed phase list cannot drift from the phases that run. It used
|
|
449
|
-
* to be announced from the
|
|
537
|
+
* to be announced from the delegated phases alone while these two were gated by
|
|
450
538
|
* hand-written conditions further down, so a run printed '(phases: skills)' and
|
|
451
539
|
* then also ran `consistency`, which put a second entry in the emitted document.
|
|
452
540
|
* A status that under-reports what it did is the same defect class as
|
|
@@ -479,8 +567,8 @@ function selectInProcessVerifyPhases(config) {
|
|
|
479
567
|
* The startup announcement: every phase this run will inspect something with,
|
|
480
568
|
* in order. A phase that would consult nothing is not named.
|
|
481
569
|
*/
|
|
482
|
-
export function formatVerifyAnnouncement(
|
|
483
|
-
const all = [...
|
|
570
|
+
export function formatVerifyAnnouncement(delegatedPhaseNames, config) {
|
|
571
|
+
const all = [...delegatedPhaseNames, ...selectInProcessVerifyPhases(config)];
|
|
484
572
|
return `🔍 vat verify (phases: ${all.join(' → ')})`;
|
|
485
573
|
}
|
|
486
574
|
/**
|
|
@@ -509,11 +597,89 @@ export function toPublishedIssue(issue) {
|
|
|
509
597
|
...(issue.reference === undefined ? {} : { reference: issue.reference }),
|
|
510
598
|
};
|
|
511
599
|
}
|
|
600
|
+
/**
|
|
601
|
+
* The refusal for a crawl that found only PART of the build.
|
|
602
|
+
*
|
|
603
|
+
* Mirrors `unresolvedLocalPluginsFinding` in `claude/marketplace/validate.ts`:
|
|
604
|
+
* the count declared, the count checked, and the missing ones BY NAME — the
|
|
605
|
+
* operator's next move is to look at those paths, so the message carries them.
|
|
606
|
+
* ONE finding however many are missing (run-integrity invariant 4).
|
|
607
|
+
*
|
|
608
|
+
* @param crawl - What the crawl found, over what
|
|
609
|
+
* @returns The one finding, or nothing when every expected bundle was inspected
|
|
610
|
+
*/
|
|
611
|
+
function missingBundlesFinding(crawl) {
|
|
612
|
+
if (crawl.bundlesMissing.length === 0)
|
|
613
|
+
return [];
|
|
614
|
+
const named = crawl.bundlesMissing.map((dir) => `\`${dir}\``).join(', ');
|
|
615
|
+
return [runIntegrityFinding(`This run discovered skills that \`vat build\` produces ${crawl.bundlesExpected} bundle(s) for and`
|
|
616
|
+
+ ` the packaged-content phase inspected ${crawl.bundlesInspected}, so this phase is not a verdict`
|
|
617
|
+
+ ' on the build: a bundle that was never crawled reads the same as a clean one. Expected'
|
|
618
|
+
+ ` bundle(s) not found on disk: ${named}. Usually \`vat build\` has not run since a skill was`
|
|
619
|
+
+ ' added, failed part-way, or wrote somewhere other than dist/ — or the bundle was deleted.'
|
|
620
|
+
+ ' Run `vat build` first, then re-run `vat verify`.')];
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Build the `packaged-content` phase result from what the crawl found.
|
|
624
|
+
*
|
|
625
|
+
* 🚨 **Zero bundles is an ERROR, not a clean phase — and so is a MISSING one.**
|
|
626
|
+
* The phase is pushed unconditionally whenever `skills:` exists and it feeds the
|
|
627
|
+
* real exit code; `discoverSkillsFromConfig` returning `[]` on a typo'd glob —
|
|
628
|
+
* or `dist/` not having been built at all, or built somewhere else — gave the
|
|
629
|
+
* crawl nothing to walk, and nothing walked was zero findings was `success`,
|
|
630
|
+
* with no count in the document to say the phase had looked at nothing. `vat
|
|
631
|
+
* verify` exists to check the BUILT tree; a run that found none of it is not a
|
|
632
|
+
* verdict on it. Nor is a run that found half of it: with `bundlesInspected` as
|
|
633
|
+
* the only denominator, two discovered skills and one deleted bundle published
|
|
634
|
+
* `success` beside `bundlesInspected: 1`. The crawl now also carries what it
|
|
635
|
+
* should have found, and the document publishes both counts.
|
|
636
|
+
*
|
|
637
|
+
* One zero IS a verdict: nothing expected because every discovered skill is in
|
|
638
|
+
* place (`bundlesInPlace > 0`). Zero discovered skills stays refused.
|
|
639
|
+
*
|
|
640
|
+
* Derived here, in the one function that produces this phase's document, and
|
|
641
|
+
* not in the command body, so no path through the orchestrator can publish
|
|
642
|
+
* `status: success` beside `bundlesInspected: 0` or beside a non-empty
|
|
643
|
+
* `bundlesMissing`. Through the shared mechanism in `run-integrity.ts`: one
|
|
644
|
+
* non-overridable `RESOURCE_CHECK_BROKEN` at `error`, which
|
|
645
|
+
* {@link exitCodeForPhases} then turns into exit 1. ONE, not two, when both
|
|
646
|
+
* apply: the missing-bundle refusal is derived first because it names paths,
|
|
647
|
+
* and {@link nothingCheckedFinding} stands down behind an existing
|
|
648
|
+
* run-integrity finding.
|
|
649
|
+
*
|
|
650
|
+
* Pure, and exported so the refusal is pinned without a project on disk.
|
|
651
|
+
*/
|
|
652
|
+
export function buildPackagedContentPhase(crawl) {
|
|
653
|
+
const { bundlesInspected, bundlesExpected, bundlesInPlace, bundlesMissing, issues: found } = crawl;
|
|
654
|
+
const missing = missingBundlesFinding(crawl);
|
|
655
|
+
const accountedFor = bundlesExpected === 0 ? bundlesInspected + bundlesInPlace : bundlesInspected;
|
|
656
|
+
const issues = [
|
|
657
|
+
...missing,
|
|
658
|
+
...nothingCheckedFinding(accountedFor, [...missing, ...found], () => 'The packaged-content phase inspected 0 built skill bundles, so this phase is not a'
|
|
659
|
+
+ ' verdict: nothing was crawled for files that must not ship, and the document reads'
|
|
660
|
+
+ ' the same as a run over clean bundles. Either `vat build` has not run (or wrote'
|
|
661
|
+
+ ' somewhere other than dist/), or `skills.include` in vibe-agent-toolkit.config.yaml'
|
|
662
|
+
+ ' matched no SKILL.md — usually a typo in the glob. Run `vat build` first; `vat skills'
|
|
663
|
+
+ ' validate` lists what the globs discover.'),
|
|
664
|
+
...found,
|
|
665
|
+
];
|
|
666
|
+
return {
|
|
667
|
+
name: PACKAGED_CONTENT,
|
|
668
|
+
status: calculateValidationStatus(issues),
|
|
669
|
+
// The denominator, beside the counts it qualifies — and what it should have been.
|
|
670
|
+
bundlesInspected,
|
|
671
|
+
bundlesExpected,
|
|
672
|
+
bundlesInPlace,
|
|
673
|
+
bundlesMissing,
|
|
674
|
+
issueCounts: countBySeverity(issues),
|
|
675
|
+
issues: issues.map(toPublishedIssue),
|
|
676
|
+
};
|
|
677
|
+
}
|
|
512
678
|
/**
|
|
513
679
|
* `ConsistencyIssue` speaks the same severity vocabulary as `ValidationIssue`
|
|
514
680
|
* but carries a free-form `code`, so it is counted through this projection —
|
|
515
681
|
* there must be exactly ONE issues→status/counts collapse in the codebase, and
|
|
516
|
-
* it lives in `@vibe-agent-toolkit/
|
|
682
|
+
* it lives in `@vibe-agent-toolkit/schema`.
|
|
517
683
|
*/
|
|
518
684
|
function asValidationIssues(issues) {
|
|
519
685
|
return issues.map((issue) => ({
|
|
@@ -521,8 +687,42 @@ function asValidationIssues(issues) {
|
|
|
521
687
|
severity: issue.severity,
|
|
522
688
|
message: issue.message,
|
|
523
689
|
fix: issue.fix,
|
|
690
|
+
...(issue.location === undefined ? {} : { location: issue.location }),
|
|
691
|
+
...(issue.line === undefined ? {} : { line: issue.line }),
|
|
524
692
|
}));
|
|
525
693
|
}
|
|
694
|
+
/**
|
|
695
|
+
* Run the `packaged-content` phase: crawl, derive the phase document, and
|
|
696
|
+
* report THAT document's issues on stderr.
|
|
697
|
+
*
|
|
698
|
+
* 🚨 **The stderr report used to be gated on the crawl, one line before the
|
|
699
|
+
* refusal was derived.** `if (crawl.issues.length > 0) report(crawl.issues)`
|
|
700
|
+
* ran ahead of {@link buildPackagedContentPhase}, which is where the
|
|
701
|
+
* zero-bundle refusal is added — so on an unbuilt project the crawl found
|
|
702
|
+
* nothing, nothing was logged, the skills phase's `✅ All validations passed`
|
|
703
|
+
* stayed the last line on stderr, and the process exited 1 on a refusal that
|
|
704
|
+
* existed only in the YAML. Reporting from the phase result makes what stderr
|
|
705
|
+
* says and what the exit code is computed from one list, which is
|
|
706
|
+
* `run-integrity.ts` invariant 6.
|
|
707
|
+
*
|
|
708
|
+
* The round trip through `asValidationIssues` is deliberate rather than
|
|
709
|
+
* reporting the crawl's list plus a second derivation of the refusal: the
|
|
710
|
+
* document is the artifact of record, and stderr should render exactly what it
|
|
711
|
+
* carries, not a parallel computation that can drift from it.
|
|
712
|
+
*/
|
|
713
|
+
export function runPackagedContentPhase(projectRoot, discoveredSkills, pluginLocal, pluginLocalNames, logger) {
|
|
714
|
+
const phase = buildPackagedContentPhase(checkPackagedAgentInstructionFiles(projectRoot, discoveredSkills, pluginLocal, pluginLocalNames));
|
|
715
|
+
reportPackagedContentPhase(phase, logger);
|
|
716
|
+
return phase;
|
|
717
|
+
}
|
|
718
|
+
export function reportPackagedContentPhase(phase, logger) {
|
|
719
|
+
if (phase.issues.length > 0) {
|
|
720
|
+
reportPackagedContentIssues(asValidationIssues(phase.issues), logger);
|
|
721
|
+
}
|
|
722
|
+
else if (phase.bundlesExpected === 0 && phase.bundlesInspected === 0) {
|
|
723
|
+
logger.info(`\n▶ Phase: ${PACKAGED_CONTENT} — nothing to inspect: all ${phase.bundlesInPlace} discovered skill(s) are in place (publish: false)`);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
526
726
|
/**
|
|
527
727
|
* Run the in-process consistency check phase and record its outcome.
|
|
528
728
|
*
|
|
@@ -535,7 +735,7 @@ function asValidationIssues(issues) {
|
|
|
535
735
|
* and the packaged-content and files-config-dests phases need the same list. One
|
|
536
736
|
* crawl per run, one answer to "which skills does this project have".
|
|
537
737
|
*/
|
|
538
|
-
function runConsistencyPhase(logger, phaseResults, config, projectRoot, discoveredSkills) {
|
|
738
|
+
function runConsistencyPhase(logger, phaseResults, config, projectRoot, discoveredSkills, pluginLocal) {
|
|
539
739
|
if (!config?.skills) {
|
|
540
740
|
// Nothing to cross-reference, so nothing to report: a run without a
|
|
541
741
|
// `skills:` block is a genuine no-op, and {@link selectInProcessVerifyPhases}
|
|
@@ -549,7 +749,7 @@ function runConsistencyPhase(logger, phaseResults, config, projectRoot, discover
|
|
|
549
749
|
// defensively (and narrows `config.skills` for the call below).
|
|
550
750
|
return;
|
|
551
751
|
}
|
|
552
|
-
const consistencyResult = runConsistencyChecks([...discoveredSkills], config, projectRoot);
|
|
752
|
+
const consistencyResult = runConsistencyChecks([...discoveredSkills], config, projectRoot, pluginLocal);
|
|
553
753
|
const issues = consistencyResult.issues;
|
|
554
754
|
if (issues.length > 0) {
|
|
555
755
|
reportConsistencyIssues(issues, logger);
|
|
@@ -563,6 +763,55 @@ function runConsistencyPhase(logger, phaseResults, config, projectRoot, discover
|
|
|
563
763
|
};
|
|
564
764
|
phaseResults.push(result);
|
|
565
765
|
}
|
|
766
|
+
/**
|
|
767
|
+
* The in-process half of `vat verify`: `files-config-dests`, `packaged-content` and
|
|
768
|
+
* `consistency`, each where `inProcess` names it.
|
|
769
|
+
*/
|
|
770
|
+
async function runInProcessPhases(run) {
|
|
771
|
+
const { inProcess, config, projectRoot, logger, phaseResults } = run;
|
|
772
|
+
// ONE discovery for the whole in-process half of the run. Every phase below
|
|
773
|
+
// asks the same question — "which skills does this project have" — and each
|
|
774
|
+
// answer used to be a different one: `consistency` crawled, while
|
|
775
|
+
// `files-config-dests` and `packaged-content` read `skills.config` keys and
|
|
776
|
+
// were therefore blind to every skill discovered by a glob.
|
|
777
|
+
// `'refuse'`: a verify over a population it could not see is the
|
|
778
|
+
// green-without-checking shape this command exists to refuse. The throw
|
|
779
|
+
// lands in the command's catch → `handleCommandError`, exit 2, with the
|
|
780
|
+
// crawl's own root-relative sentence.
|
|
781
|
+
const discoveredSkills = await discoverSkillsFromConfig(run.skills, projectRoot, 'refuse');
|
|
782
|
+
// ONE plugin-local index likewise: listing it crawls every plugin, and every phase
|
|
783
|
+
// below asks it (in-place vs plugin-only, plugin-tree bundles, plugin assignment).
|
|
784
|
+
const pluginLocal = indexPluginLocalSkills(config, projectRoot);
|
|
785
|
+
// …and the declared name of each plugin-local skill, which keys its config exactly as
|
|
786
|
+
// the plugin build keyed it.
|
|
787
|
+
const pluginLocalNames = await readPluginLocalSkillNames(pluginLocal);
|
|
788
|
+
// Post-build files config check: verify all dest paths exist in built output
|
|
789
|
+
if (inProcess.includes(FILES_CONFIG_DESTS)) {
|
|
790
|
+
const filesDestResults = checkFilesConfigDests(projectRoot, discoveredSkills, pluginLocal, pluginLocalNames);
|
|
791
|
+
if (filesDestResults.length > 0) {
|
|
792
|
+
reportFilesDestErrors(filesDestResults, logger);
|
|
793
|
+
phaseResults.push({
|
|
794
|
+
name: FILES_CONFIG_DESTS,
|
|
795
|
+
status: 'error',
|
|
796
|
+
issueCounts: { errors: filesDestResults.length, warnings: 0, info: 0 },
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
// Packaged-content check: crawl each built skill bundle for repo-internal
|
|
801
|
+
// agent-instruction files. Publishes its findings INTO the document rather
|
|
802
|
+
// than only logging them — a file that must not ship has to be visible in
|
|
803
|
+
// `issueCounts`, or a CI consumer reads a clean report for a bundle carrying
|
|
804
|
+
// one. Warnings do not fail the run; the exit code still comes from errors.
|
|
805
|
+
// The zero-bundle refusal is derived inside the builder and logged from the
|
|
806
|
+
// built phase, so stderr, the document and the exit code carry one list.
|
|
807
|
+
if (inProcess.includes(PACKAGED_CONTENT)) {
|
|
808
|
+
phaseResults.push(runPackagedContentPhase(projectRoot, discoveredSkills, pluginLocal, pluginLocalNames, logger));
|
|
809
|
+
}
|
|
810
|
+
// Consistency check: cross-reference discovered skills vs package.json and plugin assignments
|
|
811
|
+
if (inProcess.includes('consistency')) {
|
|
812
|
+
runConsistencyPhase(logger, phaseResults, config, projectRoot, discoveredSkills, pluginLocal);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
566
815
|
async function verifyTopLevelCommand(options, command) {
|
|
567
816
|
// First, and before requireProjectRoot: `vat verify dist/skills/demo` used to
|
|
568
817
|
// be accepted, have its path discarded, run wide over the whole project and
|
|
@@ -572,13 +821,15 @@ async function verifyTopLevelCommand(options, command) {
|
|
|
572
821
|
// with "no vibe-agent-toolkit.config.yaml found" would diagnose the wrong
|
|
573
822
|
// problem for anyone running the old invocation outside a project.
|
|
574
823
|
rejectRetiredOnly(options.only, COMMAND_NAME, VERIFY_FULL_RUN_SECONDS);
|
|
575
|
-
|
|
576
|
-
const projectRoot = requireProjectRoot(process.cwd(), COMMAND_NAME);
|
|
577
|
-
const { logger, startTime, binPath } = createPhaseContext(options.debug);
|
|
824
|
+
const { logger, startTime } = createPhaseContext(options.debug);
|
|
578
825
|
try {
|
|
579
826
|
// Inside the try, deliberately: phase selection used to throw from out here
|
|
580
827
|
// (on an unroutable `--only`), so the user got a raw Node stack trace and
|
|
581
|
-
// zero bytes of the structured document a scripted caller parses
|
|
828
|
+
// zero bytes of the structured document a scripted caller parses — and so
|
|
829
|
+
// did "no project here", at Node's default exit 1, which the contract reads
|
|
830
|
+
// as FINDINGS.
|
|
831
|
+
// Spec §7: `vat verify` requires a projectRoot.
|
|
832
|
+
const projectRoot = requireProjectRoot(process.cwd(), COMMAND_NAME);
|
|
582
833
|
const { config, error: configError } = loadConfigTolerant(projectRoot);
|
|
583
834
|
const phases = applyPhaseSelection(selectVerifyPhases(config, configError, options.verbose), logger, startTime);
|
|
584
835
|
// Announced from the same list the in-process gates below read, so the
|
|
@@ -588,49 +839,13 @@ async function verifyTopLevelCommand(options, command) {
|
|
|
588
839
|
const phaseResults = [];
|
|
589
840
|
for (const phase of phases) {
|
|
590
841
|
logger.info(`\n▶ Phase: ${phase.name}`);
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
// answer used to be a different one: `consistency` crawled, while
|
|
596
|
-
// `files-config-dests` and `packaged-content` read `skills.config` keys and
|
|
597
|
-
// were therefore blind to every skill discovered by a glob.
|
|
598
|
-
const discoveredSkills = inProcess.length > 0 && config?.skills
|
|
599
|
-
? await discoverSkillsFromConfig(config.skills, projectRoot)
|
|
600
|
-
: [];
|
|
601
|
-
// Post-build files config check: verify all dest paths exist in built output
|
|
602
|
-
if (inProcess.includes(FILES_CONFIG_DESTS)) {
|
|
603
|
-
const filesDestResults = checkFilesConfigDests(projectRoot, discoveredSkills);
|
|
604
|
-
if (filesDestResults.length > 0) {
|
|
605
|
-
reportFilesDestErrors(filesDestResults, logger);
|
|
606
|
-
phaseResults.push({
|
|
607
|
-
name: FILES_CONFIG_DESTS,
|
|
608
|
-
status: 'error',
|
|
609
|
-
issueCounts: { errors: filesDestResults.length, warnings: 0, info: 0 },
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
// Packaged-content check: crawl each built skill bundle for repo-internal
|
|
614
|
-
// agent-instruction files. Publishes its findings INTO the document rather
|
|
615
|
-
// than only logging them — a file that must not ship has to be visible in
|
|
616
|
-
// `issueCounts`, or a CI consumer reads a clean report for a bundle carrying
|
|
617
|
-
// one. Warnings do not fail the run; the exit code still comes from errors.
|
|
618
|
-
if (inProcess.includes(PACKAGED_CONTENT)) {
|
|
619
|
-
const packagedIssues = checkPackagedAgentInstructionFiles(projectRoot, discoveredSkills);
|
|
620
|
-
if (packagedIssues.length > 0) {
|
|
621
|
-
reportPackagedContentIssues(packagedIssues, logger);
|
|
622
|
-
}
|
|
623
|
-
const packagedResult = {
|
|
624
|
-
name: PACKAGED_CONTENT,
|
|
625
|
-
status: calculateValidationStatus(packagedIssues),
|
|
626
|
-
issueCounts: countBySeverity(packagedIssues),
|
|
627
|
-
issues: packagedIssues.map(toPublishedIssue),
|
|
628
|
-
};
|
|
629
|
-
phaseResults.push(packagedResult);
|
|
842
|
+
// Awaited in the loop, deliberately: phases are announced in a fixed order
|
|
843
|
+
// and their stderr streams live, so overlapping them would interleave two
|
|
844
|
+
// running reports into one unreadable channel.
|
|
845
|
+
phaseResults.push(await runPhase(phase));
|
|
630
846
|
}
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
runConsistencyPhase(logger, phaseResults, config, projectRoot, discoveredSkills);
|
|
847
|
+
if (inProcess.length > 0 && config?.skills) {
|
|
848
|
+
await runInProcessPhases({ inProcess, config, skills: config.skills, projectRoot, logger, phaseResults });
|
|
634
849
|
}
|
|
635
850
|
const duration = Date.now() - startTime;
|
|
636
851
|
// Worst-wins across phases, with `system-error` outranking `error`: a phase
|