@vibe-agent-toolkit/cli 0.2.0-rc.1 → 0.2.0-rc.11
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 +97 -28
- package/dist/bin/vat.js +97 -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 +165 -0
- package/dist/commands/ard/emit.d.ts.map +1 -0
- package/dist/commands/ard/emit.js +338 -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 +84 -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 +1150 -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 +372 -0
- package/dist/commands/claude/context.d.ts.map +1 -0
- package/dist/commands/claude/context.js +1115 -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 +116 -0
- package/dist/commands/okf/index.js.map +1 -0
- package/dist/commands/okf/validate.d.ts +195 -0
- package/dist/commands/okf/validate.d.ts.map +1 -0
- package/dist/commands/okf/validate.js +199 -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 +167 -0
- package/dist/commands/resources/check-progress.d.ts.map +1 -0
- package/dist/commands/resources/check-progress.js +250 -0
- package/dist/commands/resources/check-progress.js.map +1 -0
- package/dist/commands/resources/check-supervisor.d.ts +479 -0
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -0
- package/dist/commands/resources/check-supervisor.js +587 -0
- package/dist/commands/resources/check-supervisor.js.map +1 -0
- package/dist/commands/resources/check.d.ts +620 -0
- package/dist/commands/resources/check.d.ts.map +1 -0
- package/dist/commands/resources/check.js +1452 -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 +430 -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 +100 -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 +8 -6
- 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 +143 -20
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +179 -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 +72 -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 +134 -2
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +290 -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 +143 -39
- 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 +36 -27
- package/schemas/ard-emit.json +152 -0
- package/schemas/okf-validate.json +170 -0
- package/schemas/resources-check.json +257 -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
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `vat okf validate [bundle]` — conformance for the OKF bundles a project declares.
|
|
3
|
+
*
|
|
4
|
+
* Producer-side, and the exit code says so: OKF §11 tells CONSUMERS not to
|
|
5
|
+
* reject a bundle over broken cross-links or unknown keys, but VAT is tooling
|
|
6
|
+
* for the publisher — the one party who can fix them — so a finding at `error`
|
|
7
|
+
* severity fails the command. An adopter who wants a softer gate lowers
|
|
8
|
+
* `okf.bundles.<name>.severity`; the finding is still reported either way.
|
|
9
|
+
*/
|
|
10
|
+
import { type OkfBundleReport } from '@vibe-agent-toolkit/resources';
|
|
11
|
+
import { type Report } from '@vibe-agent-toolkit/schema';
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
export interface OkfValidateOptions {
|
|
14
|
+
format?: 'yaml' | 'json';
|
|
15
|
+
specVersion?: string;
|
|
16
|
+
debug?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** One checked bundle's `data` row: what was read, never the findings (those are the envelope's). */
|
|
19
|
+
export declare const OkfBundleSummarySchema: z.ZodObject<{
|
|
20
|
+
/** The `okf.bundles.<name>` key. */
|
|
21
|
+
bundle: z.ZodString;
|
|
22
|
+
/** The root as the config file wrote it — never the resolved absolute path. */
|
|
23
|
+
root: z.ZodString;
|
|
24
|
+
/** Every non-reserved `.md` beneath the root, bundle-relative and sorted. */
|
|
25
|
+
conceptDocuments: z.ZodArray<z.ZodString, "many">;
|
|
26
|
+
/** Every `index.md` / `log.md` beneath the root, bundle-relative and sorted. */
|
|
27
|
+
reservedDocuments: z.ZodArray<z.ZodString, "many">;
|
|
28
|
+
/** What the root `index.md` declares, when it declares a well-formed one. Reported, never obeyed. */
|
|
29
|
+
declaredOkfVersion: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, "strict", z.ZodTypeAny, {
|
|
31
|
+
root: string;
|
|
32
|
+
bundle: string;
|
|
33
|
+
conceptDocuments: string[];
|
|
34
|
+
reservedDocuments: string[];
|
|
35
|
+
declaredOkfVersion?: string | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
root: string;
|
|
38
|
+
bundle: string;
|
|
39
|
+
conceptDocuments: string[];
|
|
40
|
+
reservedDocuments: string[];
|
|
41
|
+
declaredOkfVersion?: string | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
export declare const OkfValidateDataSchema: z.ZodObject<{
|
|
44
|
+
bundles: z.ZodArray<z.ZodObject<{
|
|
45
|
+
/** The `okf.bundles.<name>` key. */
|
|
46
|
+
bundle: z.ZodString;
|
|
47
|
+
/** The root as the config file wrote it — never the resolved absolute path. */
|
|
48
|
+
root: z.ZodString;
|
|
49
|
+
/** Every non-reserved `.md` beneath the root, bundle-relative and sorted. */
|
|
50
|
+
conceptDocuments: z.ZodArray<z.ZodString, "many">;
|
|
51
|
+
/** Every `index.md` / `log.md` beneath the root, bundle-relative and sorted. */
|
|
52
|
+
reservedDocuments: z.ZodArray<z.ZodString, "many">;
|
|
53
|
+
/** What the root `index.md` declares, when it declares a well-formed one. Reported, never obeyed. */
|
|
54
|
+
declaredOkfVersion: z.ZodOptional<z.ZodString>;
|
|
55
|
+
}, "strict", z.ZodTypeAny, {
|
|
56
|
+
root: string;
|
|
57
|
+
bundle: string;
|
|
58
|
+
conceptDocuments: string[];
|
|
59
|
+
reservedDocuments: string[];
|
|
60
|
+
declaredOkfVersion?: string | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
root: string;
|
|
63
|
+
bundle: string;
|
|
64
|
+
conceptDocuments: string[];
|
|
65
|
+
reservedDocuments: string[];
|
|
66
|
+
declaredOkfVersion?: string | undefined;
|
|
67
|
+
}>, "many">;
|
|
68
|
+
/**
|
|
69
|
+
* Present only when there was nothing to check, and says what to declare or
|
|
70
|
+
* which root to look at.
|
|
71
|
+
*
|
|
72
|
+
* 🪤 The command used to print `status: passed`, `bundles: []`, exit 0 when a
|
|
73
|
+
* project declared no `okf.bundles` at all — a report indistinguishable from
|
|
74
|
+
* a bundle read in full and found conformant, so a mistyped key
|
|
75
|
+
* (`okf.bundle:`, `okf.Bundles:`) read as a clean bill of health. The
|
|
76
|
+
* envelope's REQUIRED `examined` now says `0` in that case, this sentence
|
|
77
|
+
* says why, and the run is refused (`RESOURCE_CHECK_BROKEN`, exit 1): a gate
|
|
78
|
+
* that examined nothing must not read as a pass to a consumer gating on the
|
|
79
|
+
* status or the exit code. A project that declares no bundles has no reason
|
|
80
|
+
* to run this verb.
|
|
81
|
+
*/
|
|
82
|
+
notice: z.ZodOptional<z.ZodString>;
|
|
83
|
+
}, "strict", z.ZodTypeAny, {
|
|
84
|
+
bundles: {
|
|
85
|
+
root: string;
|
|
86
|
+
bundle: string;
|
|
87
|
+
conceptDocuments: string[];
|
|
88
|
+
reservedDocuments: string[];
|
|
89
|
+
declaredOkfVersion?: string | undefined;
|
|
90
|
+
}[];
|
|
91
|
+
notice?: string | undefined;
|
|
92
|
+
}, {
|
|
93
|
+
bundles: {
|
|
94
|
+
root: string;
|
|
95
|
+
bundle: string;
|
|
96
|
+
conceptDocuments: string[];
|
|
97
|
+
reservedDocuments: string[];
|
|
98
|
+
declaredOkfVersion?: string | undefined;
|
|
99
|
+
}[];
|
|
100
|
+
notice?: string | undefined;
|
|
101
|
+
}>;
|
|
102
|
+
export type OkfBundleSummary = z.infer<typeof OkfBundleSummarySchema>;
|
|
103
|
+
export type OkfValidateData = z.infer<typeof OkfValidateDataSchema>;
|
|
104
|
+
/** The document this command publishes. */
|
|
105
|
+
export declare const OKF_VALIDATE_REPORT_SCHEMA: import("@vibe-agent-toolkit/schema").ReportZodSchema<z.ZodObject<{
|
|
106
|
+
bundles: z.ZodArray<z.ZodObject<{
|
|
107
|
+
/** The `okf.bundles.<name>` key. */
|
|
108
|
+
bundle: z.ZodString;
|
|
109
|
+
/** The root as the config file wrote it — never the resolved absolute path. */
|
|
110
|
+
root: z.ZodString;
|
|
111
|
+
/** Every non-reserved `.md` beneath the root, bundle-relative and sorted. */
|
|
112
|
+
conceptDocuments: z.ZodArray<z.ZodString, "many">;
|
|
113
|
+
/** Every `index.md` / `log.md` beneath the root, bundle-relative and sorted. */
|
|
114
|
+
reservedDocuments: z.ZodArray<z.ZodString, "many">;
|
|
115
|
+
/** What the root `index.md` declares, when it declares a well-formed one. Reported, never obeyed. */
|
|
116
|
+
declaredOkfVersion: z.ZodOptional<z.ZodString>;
|
|
117
|
+
}, "strict", z.ZodTypeAny, {
|
|
118
|
+
root: string;
|
|
119
|
+
bundle: string;
|
|
120
|
+
conceptDocuments: string[];
|
|
121
|
+
reservedDocuments: string[];
|
|
122
|
+
declaredOkfVersion?: string | undefined;
|
|
123
|
+
}, {
|
|
124
|
+
root: string;
|
|
125
|
+
bundle: string;
|
|
126
|
+
conceptDocuments: string[];
|
|
127
|
+
reservedDocuments: string[];
|
|
128
|
+
declaredOkfVersion?: string | undefined;
|
|
129
|
+
}>, "many">;
|
|
130
|
+
/**
|
|
131
|
+
* Present only when there was nothing to check, and says what to declare or
|
|
132
|
+
* which root to look at.
|
|
133
|
+
*
|
|
134
|
+
* 🪤 The command used to print `status: passed`, `bundles: []`, exit 0 when a
|
|
135
|
+
* project declared no `okf.bundles` at all — a report indistinguishable from
|
|
136
|
+
* a bundle read in full and found conformant, so a mistyped key
|
|
137
|
+
* (`okf.bundle:`, `okf.Bundles:`) read as a clean bill of health. The
|
|
138
|
+
* envelope's REQUIRED `examined` now says `0` in that case, this sentence
|
|
139
|
+
* says why, and the run is refused (`RESOURCE_CHECK_BROKEN`, exit 1): a gate
|
|
140
|
+
* that examined nothing must not read as a pass to a consumer gating on the
|
|
141
|
+
* status or the exit code. A project that declares no bundles has no reason
|
|
142
|
+
* to run this verb.
|
|
143
|
+
*/
|
|
144
|
+
notice: z.ZodOptional<z.ZodString>;
|
|
145
|
+
}, "strict", z.ZodTypeAny, {
|
|
146
|
+
bundles: {
|
|
147
|
+
root: string;
|
|
148
|
+
bundle: string;
|
|
149
|
+
conceptDocuments: string[];
|
|
150
|
+
reservedDocuments: string[];
|
|
151
|
+
declaredOkfVersion?: string | undefined;
|
|
152
|
+
}[];
|
|
153
|
+
notice?: string | undefined;
|
|
154
|
+
}, {
|
|
155
|
+
bundles: {
|
|
156
|
+
root: string;
|
|
157
|
+
bundle: string;
|
|
158
|
+
conceptDocuments: string[];
|
|
159
|
+
reservedDocuments: string[];
|
|
160
|
+
declaredOkfVersion?: string | undefined;
|
|
161
|
+
}[];
|
|
162
|
+
notice?: string | undefined;
|
|
163
|
+
}>>;
|
|
164
|
+
export type OkfValidateReport = Report<OkfValidateData>;
|
|
165
|
+
/** One bundle's report beside the absolute root it was read from. */
|
|
166
|
+
export interface CheckedOkfBundle {
|
|
167
|
+
readonly report: OkfBundleReport;
|
|
168
|
+
/** The resolved absolute root, so a finding can name a project-relative file. */
|
|
169
|
+
readonly root: string;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Assemble the report for a set of checked bundles. Pure, so the status rule
|
|
173
|
+
* and the denominator are unit-testable.
|
|
174
|
+
*
|
|
175
|
+
* `examined` counts every document that was opened and judged — concept and
|
|
176
|
+
* reserved alike — across every bundle. A declared-but-empty bundle and an
|
|
177
|
+
* empty declaration both examine zero, and the notice tells them apart.
|
|
178
|
+
*
|
|
179
|
+
* @param checked - One report per bundle that was actually checked, with its root
|
|
180
|
+
* @param projectRoot - What every finding's `location` is relative to
|
|
181
|
+
* @returns The report
|
|
182
|
+
*/
|
|
183
|
+
export declare function summarizeOkfBundles(checked: readonly CheckedOkfBundle[], projectRoot: string): OkfValidateReport;
|
|
184
|
+
/**
|
|
185
|
+
* Check every selected bundle and assemble the report.
|
|
186
|
+
*
|
|
187
|
+
* Separate from the action so the shape is testable without a process exit.
|
|
188
|
+
*
|
|
189
|
+
* @param bundleArg - A single declared bundle name, or undefined for all of them
|
|
190
|
+
* @param options - Output format and the optional revision to cross-check against
|
|
191
|
+
*/
|
|
192
|
+
export declare function okfValidateReport(bundleArg: string | undefined, options: OkfValidateOptions): Promise<OkfValidateReport>;
|
|
193
|
+
/** Action handler for `vat okf validate [bundle]`. */
|
|
194
|
+
export declare function okfValidateCommand(bundleArg: string | undefined, options: OkfValidateOptions): Promise<void>;
|
|
195
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/okf/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAML,KAAK,MAAM,EACZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;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wBAAsB,kBAAkB,CACtC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAaf"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `vat okf validate [bundle]` — conformance for the OKF bundles a project declares.
|
|
3
|
+
*
|
|
4
|
+
* Producer-side, and the exit code says so: OKF §11 tells CONSUMERS not to
|
|
5
|
+
* reject a bundle over broken cross-links or unknown keys, but VAT is tooling
|
|
6
|
+
* for the publisher — the one party who can fix them — so a finding at `error`
|
|
7
|
+
* severity fails the command. An adopter who wants a softer gate lowers
|
|
8
|
+
* `okf.bundles.<name>.severity`; the finding is still reported either way.
|
|
9
|
+
*/
|
|
10
|
+
import { dirname } from 'node:path';
|
|
11
|
+
import { okfBundleRuns, parseConfigFile, validateOkfBundle, } from '@vibe-agent-toolkit/resources';
|
|
12
|
+
import { buildReport, exitCodeForReport, reportSchema, toFindings, } from '@vibe-agent-toolkit/schema';
|
|
13
|
+
import { findConfigFile, issueLocation, safePath } from '@vibe-agent-toolkit/utils';
|
|
14
|
+
import { z } from 'zod';
|
|
15
|
+
import { handleReportCommandError } from '../../utils/command-error.js';
|
|
16
|
+
import { createLogger } from '../../utils/logger.js';
|
|
17
|
+
import { writeStructuredOutput } from '../../utils/output.js';
|
|
18
|
+
import { nothingCheckedFinding } from '../../utils/run-integrity.js';
|
|
19
|
+
/** One checked bundle's `data` row: what was read, never the findings (those are the envelope's). */
|
|
20
|
+
export const OkfBundleSummarySchema = z.object({
|
|
21
|
+
/** The `okf.bundles.<name>` key. */
|
|
22
|
+
bundle: z.string(),
|
|
23
|
+
/** The root as the config file wrote it — never the resolved absolute path. */
|
|
24
|
+
root: z.string(),
|
|
25
|
+
/** Every non-reserved `.md` beneath the root, bundle-relative and sorted. */
|
|
26
|
+
conceptDocuments: z.array(z.string()),
|
|
27
|
+
/** Every `index.md` / `log.md` beneath the root, bundle-relative and sorted. */
|
|
28
|
+
reservedDocuments: z.array(z.string()),
|
|
29
|
+
/** What the root `index.md` declares, when it declares a well-formed one. Reported, never obeyed. */
|
|
30
|
+
declaredOkfVersion: z.string().optional(),
|
|
31
|
+
}).strict();
|
|
32
|
+
export const OkfValidateDataSchema = z.object({
|
|
33
|
+
bundles: z.array(OkfBundleSummarySchema),
|
|
34
|
+
/**
|
|
35
|
+
* Present only when there was nothing to check, and says what to declare or
|
|
36
|
+
* which root to look at.
|
|
37
|
+
*
|
|
38
|
+
* 🪤 The command used to print `status: passed`, `bundles: []`, exit 0 when a
|
|
39
|
+
* project declared no `okf.bundles` at all — a report indistinguishable from
|
|
40
|
+
* a bundle read in full and found conformant, so a mistyped key
|
|
41
|
+
* (`okf.bundle:`, `okf.Bundles:`) read as a clean bill of health. The
|
|
42
|
+
* envelope's REQUIRED `examined` now says `0` in that case, this sentence
|
|
43
|
+
* says why, and the run is refused (`RESOURCE_CHECK_BROKEN`, exit 1): a gate
|
|
44
|
+
* that examined nothing must not read as a pass to a consumer gating on the
|
|
45
|
+
* status or the exit code. A project that declares no bundles has no reason
|
|
46
|
+
* to run this verb.
|
|
47
|
+
*/
|
|
48
|
+
notice: z.string().optional(),
|
|
49
|
+
}).strict();
|
|
50
|
+
/** The document this command publishes. */
|
|
51
|
+
export const OKF_VALIDATE_REPORT_SCHEMA = reportSchema(OkfValidateDataSchema);
|
|
52
|
+
/**
|
|
53
|
+
* The bundles whose root was read successfully and held not one markdown file.
|
|
54
|
+
*
|
|
55
|
+
* 🪤 The same green-without-running shape the `notice` exists for, one level
|
|
56
|
+
* down. A `root:` typo that lands on a real-but-wrong directory, or a root
|
|
57
|
+
* written one level too deep, produces zero findings and an `examined` that
|
|
58
|
+
* only THIS bundle's rows explain — so the run says so in words too.
|
|
59
|
+
*
|
|
60
|
+
* A bundle carrying findings is excluded even when its document lists are empty:
|
|
61
|
+
* that is the unreadable-root case, which already says the truthful thing in its
|
|
62
|
+
* own finding, and "contains no .md files" would be a second, wronger sentence
|
|
63
|
+
* about a directory that does not exist.
|
|
64
|
+
*
|
|
65
|
+
* @param bundles - Every bundle report in the run
|
|
66
|
+
* @returns The names of the vacuous ones, in report order
|
|
67
|
+
*/
|
|
68
|
+
function vacuousBundles(bundles) {
|
|
69
|
+
return bundles
|
|
70
|
+
.filter((report) => report.findings.length === 0 &&
|
|
71
|
+
report.conceptDocuments.length === 0 &&
|
|
72
|
+
report.reservedDocuments.length === 0)
|
|
73
|
+
.map((report) => report.bundle);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The sentence a run with one or more vacuous bundles carries.
|
|
77
|
+
*
|
|
78
|
+
* @param vacuous - Names of the bundles whose root held no markdown at all
|
|
79
|
+
* @returns A notice naming each of them and the config key to check
|
|
80
|
+
*/
|
|
81
|
+
function vacuousNotice(vacuous) {
|
|
82
|
+
const named = vacuous.map((bundle) => `'${bundle}'`).join(', ');
|
|
83
|
+
const subject = vacuous.length === 1 ? 'it' : 'them';
|
|
84
|
+
return `${named} contains no .md files, so nothing was checked in ${subject}. A root pointing one level too deep, or at a real-but-wrong directory, reads exactly like this — check \`okf.bundles.<name>.root\`.`;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The sentence a run carries when it examined less than a reader would assume.
|
|
88
|
+
*
|
|
89
|
+
* @param bundles - Every bundle report in the run
|
|
90
|
+
* @returns The notice, or nothing when every declared bundle held documents
|
|
91
|
+
*/
|
|
92
|
+
function noticeFor(bundles) {
|
|
93
|
+
if (bundles.length === 0)
|
|
94
|
+
return NO_BUNDLES_NOTICE;
|
|
95
|
+
const vacuous = vacuousBundles(bundles);
|
|
96
|
+
return vacuous.length > 0 ? vacuousNotice(vacuous) : undefined;
|
|
97
|
+
}
|
|
98
|
+
const NO_BUNDLES_NOTICE = 'No OKF bundles are declared, so nothing was checked. Declare one under `okf.bundles.<name>.root` in vibe-agent-toolkit.config.yaml; every non-reserved .md beneath that root is then checked for frontmatter carrying a non-empty `type`.';
|
|
99
|
+
/**
|
|
100
|
+
* A bundle's finding as the envelope publishes it: the same code, severity and
|
|
101
|
+
* message, with `location` the project-relative path of the document — the
|
|
102
|
+
* file you would open — rather than a bundle-relative `document` a reader had
|
|
103
|
+
* to join with the bundle's root by hand.
|
|
104
|
+
*
|
|
105
|
+
* @param finding - The lane's finding
|
|
106
|
+
* @param root - The bundle's absolute root
|
|
107
|
+
* @param projectRoot - What `location` is relative to
|
|
108
|
+
* @returns The published finding
|
|
109
|
+
*/
|
|
110
|
+
function toFinding(finding, root, projectRoot) {
|
|
111
|
+
return {
|
|
112
|
+
code: finding.code,
|
|
113
|
+
severity: finding.severity,
|
|
114
|
+
message: finding.message,
|
|
115
|
+
location: issueLocation(safePath.join(root, finding.document), projectRoot),
|
|
116
|
+
...(finding.link === undefined ? {} : { link: finding.link }),
|
|
117
|
+
...(finding.line === undefined ? {} : { line: finding.line }),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Assemble the report for a set of checked bundles. Pure, so the status rule
|
|
122
|
+
* and the denominator are unit-testable.
|
|
123
|
+
*
|
|
124
|
+
* `examined` counts every document that was opened and judged — concept and
|
|
125
|
+
* reserved alike — across every bundle. A declared-but-empty bundle and an
|
|
126
|
+
* empty declaration both examine zero, and the notice tells them apart.
|
|
127
|
+
*
|
|
128
|
+
* @param checked - One report per bundle that was actually checked, with its root
|
|
129
|
+
* @param projectRoot - What every finding's `location` is relative to
|
|
130
|
+
* @returns The report
|
|
131
|
+
*/
|
|
132
|
+
export function summarizeOkfBundles(checked, projectRoot) {
|
|
133
|
+
const bundles = checked.map((entry) => entry.report);
|
|
134
|
+
const findings = checked.flatMap((entry) => entry.report.findings.map((finding) => toFinding(finding, entry.root, projectRoot)));
|
|
135
|
+
const examined = bundles.reduce((sum, report) => sum + report.conceptDocuments.length + report.reservedDocuments.length, 0);
|
|
136
|
+
const notice = noticeFor(bundles);
|
|
137
|
+
// A run that examined nothing is refused through the shared run-integrity
|
|
138
|
+
// mechanism. It stands down when the run already carries a finding: the only
|
|
139
|
+
// way to examine zero AND find something is an unreadable root, whose own
|
|
140
|
+
// `error` finding already fails the run and says the truer thing.
|
|
141
|
+
const refusal = findings.length > 0
|
|
142
|
+
? []
|
|
143
|
+
: toFindings(nothingCheckedFinding(examined, [], () => notice ?? NO_BUNDLES_NOTICE));
|
|
144
|
+
return buildReport({
|
|
145
|
+
examined,
|
|
146
|
+
findings: [...refusal, ...findings],
|
|
147
|
+
data: {
|
|
148
|
+
bundles: bundles.map((report) => ({
|
|
149
|
+
bundle: report.bundle,
|
|
150
|
+
root: report.root,
|
|
151
|
+
conceptDocuments: report.conceptDocuments,
|
|
152
|
+
reservedDocuments: report.reservedDocuments,
|
|
153
|
+
...(report.declaredOkfVersion === undefined ? {} : { declaredOkfVersion: report.declaredOkfVersion }),
|
|
154
|
+
})),
|
|
155
|
+
...(notice === undefined ? {} : { notice }),
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Check every selected bundle and assemble the report.
|
|
161
|
+
*
|
|
162
|
+
* Separate from the action so the shape is testable without a process exit.
|
|
163
|
+
*
|
|
164
|
+
* @param bundleArg - A single declared bundle name, or undefined for all of them
|
|
165
|
+
* @param options - Output format and the optional revision to cross-check against
|
|
166
|
+
*/
|
|
167
|
+
export async function okfValidateReport(bundleArg, options) {
|
|
168
|
+
const configPath = findConfigFile(process.cwd());
|
|
169
|
+
if (!configPath) {
|
|
170
|
+
throw new Error('No vibe-agent-toolkit.config.yaml found. Run from a project directory.');
|
|
171
|
+
}
|
|
172
|
+
const config = await parseConfigFile(configPath);
|
|
173
|
+
const projectRoot = dirname(configPath);
|
|
174
|
+
const runs = okfBundleRuns(config.okf, projectRoot, {
|
|
175
|
+
...(bundleArg !== undefined && { bundle: bundleArg }),
|
|
176
|
+
...(options.specVersion !== undefined && { specVersion: options.specVersion }),
|
|
177
|
+
});
|
|
178
|
+
const checked = [];
|
|
179
|
+
for (const run of runs) {
|
|
180
|
+
checked.push({ report: await validateOkfBundle(run), root: run.root });
|
|
181
|
+
}
|
|
182
|
+
return summarizeOkfBundles(checked, projectRoot);
|
|
183
|
+
}
|
|
184
|
+
/** Action handler for `vat okf validate [bundle]`. */
|
|
185
|
+
export async function okfValidateCommand(bundleArg, options) {
|
|
186
|
+
const logger = createLogger(options.debug === true ? { debug: true } : {});
|
|
187
|
+
const startTime = Date.now();
|
|
188
|
+
try {
|
|
189
|
+
const report = { ...(await okfValidateReport(bundleArg, options)), durationMs: Date.now() - startTime };
|
|
190
|
+
writeStructuredOutput(report, options.format);
|
|
191
|
+
// Derived from the report it just PUBLISHED: an adopter who promotes or
|
|
192
|
+
// lowers a bundle's severity then gates on exactly the number a reader sees.
|
|
193
|
+
process.exit(exitCodeForReport(report));
|
|
194
|
+
}
|
|
195
|
+
catch (error) {
|
|
196
|
+
handleReportCommandError(error, logger, startTime, 'OKF validate', options.format);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/commands/okf/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,aAAa,EACb,eAAe,EACf,iBAAiB,GAGlB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,UAAU,GAGX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,qB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