@vibe-agent-toolkit/cli 0.2.0-rc.6 → 0.2.0-rc.8
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 +34 -19
- package/dist/bin/vat.js +34 -19
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +44 -158
- package/dist/bin.js.map +1 -1
- package/dist/command-loaders.d.ts +2 -2
- package/dist/command-loaders.d.ts.map +1 -1
- package/dist/command-loaders.js +4 -2
- package/dist/command-loaders.js.map +1 -1
- 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/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 +22 -10
- 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.map +1 -1
- package/dist/commands/audit/distributed-tree.js +9 -6
- package/dist/commands/audit/distributed-tree.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 +78 -9
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +853 -473
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +24 -24
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cache/clear.d.ts.map +1 -1
- package/dist/commands/cache/clear.js +17 -10
- package/dist/commands/cache/clear.js.map +1 -1
- package/dist/commands/claude/budget.d.ts +136 -24
- package/dist/commands/claude/budget.d.ts.map +1 -1
- package/dist/commands/claude/budget.js +152 -57
- package/dist/commands/claude/budget.js.map +1 -1
- package/dist/commands/claude/context.d.ts.map +1 -1
- package/dist/commands/claude/context.js +4 -3
- package/dist/commands/claude/context.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 +3 -2
- 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 +55 -22
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +392 -77
- 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 +17 -22
- package/dist/commands/claude/org/helpers.d.ts.map +1 -1
- package/dist/commands/claude/org/helpers.js +6 -22
- package/dist/commands/claude/org/helpers.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 +103 -4
- package/dist/commands/claude/org/skills.d.ts.map +1 -1
- package/dist/commands/claude/org/skills.js +331 -123
- 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 +3 -2
- 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 +6 -5
- package/dist/commands/claude/org/workspaces.js.map +1 -1
- package/dist/commands/claude/plugin/build.d.ts +8 -0
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +28 -33
- 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 +0 -6
- 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 +71 -60
- 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/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 +0 -3
- 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 -15
- 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 +9 -13
- package/dist/commands/consistency-check.d.ts.map +1 -1
- package/dist/commands/consistency-check.js +91 -81
- 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 +0 -1
- 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 +92 -21
- 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 +2 -4
- 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 +14 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +147 -51
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/inventory.d.ts.map +1 -1
- package/dist/commands/inventory.js +6 -7
- package/dist/commands/inventory.js.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 +30 -13
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +56 -19
- 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 +2 -1
- 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 +27 -2
- package/dist/commands/rag/index-command.d.ts.map +1 -1
- package/dist/commands/rag/index-command.js +48 -8
- 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 +2 -0
- 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/check-progress.d.ts +3 -0
- package/dist/commands/resources/check-progress.d.ts.map +1 -1
- package/dist/commands/resources/check-progress.js +11 -2
- package/dist/commands/resources/check-progress.js.map +1 -1
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -1
- package/dist/commands/resources/check-supervisor.js +14 -7
- package/dist/commands/resources/check-supervisor.js.map +1 -1
- package/dist/commands/resources/check.d.ts +168 -8
- package/dist/commands/resources/check.d.ts.map +1 -1
- package/dist/commands/resources/check.js +222 -118
- package/dist/commands/resources/check.js.map +1 -1
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +64 -29
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/query.d.ts +18 -1
- package/dist/commands/resources/query.d.ts.map +1 -1
- package/dist/commands/resources/query.js +33 -12
- package/dist/commands/resources/query.js.map +1 -1
- package/dist/commands/resources/scan.d.ts.map +1 -1
- package/dist/commands/resources/scan.js +4 -8
- package/dist/commands/resources/scan.js.map +1 -1
- package/dist/commands/resources/validate.d.ts +30 -1
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +116 -14
- 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 +4 -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 +98 -61
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/configure.d.ts.map +1 -1
- package/dist/commands/skill/test/configure.js +0 -1
- package/dist/commands/skill/test/configure.js.map +1 -1
- package/dist/commands/skill/test/run.d.ts +12 -6
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +137 -67
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build.d.ts +69 -2
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +128 -42
- 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 -30
- 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 +2 -4
- 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 +40 -1
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +32 -4
- 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 +66 -7
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +133 -29
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts +1 -1
- package/dist/commands/validate.js +8 -6
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +102 -5
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +246 -69
- 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 +102 -0
- package/dist/report-schemas.js.map +1 -0
- 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 +8 -6
- 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 +0 -1
- package/dist/utils/agent-runner.js.map +1 -1
- package/dist/utils/command-error.d.ts +87 -55
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +113 -64
- 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 +3 -6
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/context-budget-issues.d.ts +1 -1
- package/dist/utils/context-budget-issues.js +1 -1
- package/dist/utils/corpus-target.d.ts +5 -27
- package/dist/utils/corpus-target.d.ts.map +1 -1
- package/dist/utils/corpus-target.js +7 -33
- package/dist/utils/corpus-target.js.map +1 -1
- 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-rendering.d.ts +2 -2
- package/dist/utils/issue-rendering.js +2 -2
- package/dist/utils/optional-backend.d.ts +5 -4
- package/dist/utils/optional-backend.d.ts.map +1 -1
- package/dist/utils/optional-backend.js +7 -5
- package/dist/utils/optional-backend.js.map +1 -1
- package/dist/utils/output.d.ts +9 -0
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +16 -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/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-query.d.ts +41 -4
- package/dist/utils/projection-query.d.ts.map +1 -1
- package/dist/utils/projection-query.js +44 -10
- package/dist/utils/projection-query.js.map +1 -1
- package/dist/utils/projection-store.d.ts +41 -15
- package/dist/utils/projection-store.d.ts.map +1 -1
- package/dist/utils/projection-store.js +65 -18
- package/dist/utils/projection-store.js.map +1 -1
- 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 +4 -3
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +63 -32
- 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-packaging-config.d.ts +27 -0
- package/dist/utils/skill-packaging-config.d.ts.map +1 -1
- package/dist/utils/skill-packaging-config.js +30 -0
- 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.map +1 -1
- package/dist/utils/vat-bin-path.js +0 -1
- package/dist/utils/vat-bin-path.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/audit.md +141 -37
- package/docs/doctor.md +7 -6
- package/docs/index.md +19 -11
- package/docs/rag.md +3 -2
- package/docs/resources.md +5 -2
- package/docs/skill-test.md +10 -9
- package/docs/skills.md +53 -69
- package/package.json +24 -29
- package/schemas/ard-emit.json +149 -0
- package/schemas/claude-budget.json +197 -0
- package/schemas/okf-validate.json +170 -0
- package/schemas/resources-check.json +186 -0
- package/schemas/skill-review.json +230 -0
|
@@ -50,9 +50,10 @@
|
|
|
50
50
|
* defect this lane already shipped once on the query side, and it is invisible to
|
|
51
51
|
* any assertion that checks presence rather than counting occurrences.
|
|
52
52
|
*/
|
|
53
|
-
import { type BudgetSweep
|
|
54
|
-
import { type
|
|
53
|
+
import { type BudgetSweep } from '@vibe-agent-toolkit/resources';
|
|
54
|
+
import { type Report, type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
55
55
|
import { Command } from 'commander';
|
|
56
|
+
import { z } from 'zod';
|
|
56
57
|
/** How the report is rendered. `text` is for a person; the other two are for a program. */
|
|
57
58
|
export type BudgetOutputFormat = 'text' | 'yaml' | 'json';
|
|
58
59
|
/** Flags `vat claude budget` accepts. */
|
|
@@ -61,31 +62,26 @@ export interface ClaudeBudgetOptions {
|
|
|
61
62
|
debug?: boolean;
|
|
62
63
|
}
|
|
63
64
|
/**
|
|
64
|
-
*
|
|
65
|
+
* What one run reports beyond its findings.
|
|
65
66
|
*
|
|
66
|
-
* The
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
67
|
+
* The sweep counters describe the WHOLE tree, not the scope: a scope narrows
|
|
68
|
+
* what is reported, never what was measured. The envelope's `examined` is the
|
|
69
|
+
* working-location count for the same reason — "9 chains checked, none over
|
|
70
|
+
* budget" and "nothing was checked" are different answers and must not render
|
|
71
|
+
* identically.
|
|
71
72
|
*/
|
|
72
|
-
export
|
|
73
|
-
|
|
73
|
+
export declare const BudgetDataSchema: z.ZodObject<{
|
|
74
|
+
root: z.ZodString;
|
|
74
75
|
/** The budget every chain was measured against, in tokens. */
|
|
75
|
-
|
|
76
|
+
threshold: z.ZodNumber;
|
|
76
77
|
/** The root-relative directories asked about. `''` is the whole tree. */
|
|
77
|
-
|
|
78
|
+
scope: z.ZodArray<z.ZodString, "many">;
|
|
78
79
|
/** Requested paths that named no working location — see `scopeSweepToPaths`. */
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/** Working locations the sweep evaluated, across the whole tree. */
|
|
83
|
-
readonly workingLocations: number;
|
|
84
|
-
/** Distinct instruction chains among them — the queries the sweep really issued. */
|
|
85
|
-
readonly distinctChains: number;
|
|
80
|
+
unmatchedScope: z.ZodArray<z.ZodString, "many">;
|
|
81
|
+
/** Distinct instruction chains among the working locations — the queries the sweep really issued. */
|
|
82
|
+
distinctChains: z.ZodNumber;
|
|
86
83
|
/** Locations whose representative the projection never realized. Counted, never zeroed. */
|
|
87
|
-
|
|
88
|
-
readonly findings: readonly ValidationIssue[];
|
|
84
|
+
skippedUnknownLocations: z.ZodNumber;
|
|
89
85
|
/**
|
|
90
86
|
* What this verdict does not settle, in either direction. Stated ONCE.
|
|
91
87
|
*
|
|
@@ -94,10 +90,119 @@ export interface BudgetReport {
|
|
|
94
90
|
* reads as though that chain had caveats of its own, and repeated across a
|
|
95
91
|
* sweep it is pure byte-identical duplication.
|
|
96
92
|
*/
|
|
97
|
-
|
|
93
|
+
boundsStatement: z.ZodString;
|
|
98
94
|
/** The signed over/under-report bounds on the method. Stated ONCE. */
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
limits: z.ZodArray<z.ZodObject<{
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
direction: z.ZodEnum<["over-report", "under-report", "scope", "assumption"]>;
|
|
98
|
+
statement: z.ZodString;
|
|
99
|
+
}, "strict", z.ZodTypeAny, {
|
|
100
|
+
id: string;
|
|
101
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
102
|
+
statement: string;
|
|
103
|
+
}, {
|
|
104
|
+
id: string;
|
|
105
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
106
|
+
statement: string;
|
|
107
|
+
}>, "many">;
|
|
108
|
+
}, "strict", z.ZodTypeAny, {
|
|
109
|
+
root: string;
|
|
110
|
+
scope: string[];
|
|
111
|
+
threshold: number;
|
|
112
|
+
unmatchedScope: string[];
|
|
113
|
+
distinctChains: number;
|
|
114
|
+
skippedUnknownLocations: number;
|
|
115
|
+
boundsStatement: string;
|
|
116
|
+
limits: {
|
|
117
|
+
id: string;
|
|
118
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
119
|
+
statement: string;
|
|
120
|
+
}[];
|
|
121
|
+
}, {
|
|
122
|
+
root: string;
|
|
123
|
+
scope: string[];
|
|
124
|
+
threshold: number;
|
|
125
|
+
unmatchedScope: string[];
|
|
126
|
+
distinctChains: number;
|
|
127
|
+
skippedUnknownLocations: number;
|
|
128
|
+
boundsStatement: string;
|
|
129
|
+
limits: {
|
|
130
|
+
id: string;
|
|
131
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
132
|
+
statement: string;
|
|
133
|
+
}[];
|
|
134
|
+
}>;
|
|
135
|
+
export type BudgetData = z.infer<typeof BudgetDataSchema>;
|
|
136
|
+
/** The document this command publishes. */
|
|
137
|
+
export declare const BUDGET_REPORT_SCHEMA: import("@vibe-agent-toolkit/schema").ReportZodSchema<z.ZodObject<{
|
|
138
|
+
root: z.ZodString;
|
|
139
|
+
/** The budget every chain was measured against, in tokens. */
|
|
140
|
+
threshold: z.ZodNumber;
|
|
141
|
+
/** The root-relative directories asked about. `''` is the whole tree. */
|
|
142
|
+
scope: z.ZodArray<z.ZodString, "many">;
|
|
143
|
+
/** Requested paths that named no working location — see `scopeSweepToPaths`. */
|
|
144
|
+
unmatchedScope: z.ZodArray<z.ZodString, "many">;
|
|
145
|
+
/** Distinct instruction chains among the working locations — the queries the sweep really issued. */
|
|
146
|
+
distinctChains: z.ZodNumber;
|
|
147
|
+
/** Locations whose representative the projection never realized. Counted, never zeroed. */
|
|
148
|
+
skippedUnknownLocations: z.ZodNumber;
|
|
149
|
+
/**
|
|
150
|
+
* What this verdict does not settle, in either direction. Stated ONCE.
|
|
151
|
+
*
|
|
152
|
+
* ⛔ On the report beside `threshold`, never on a finding. These bound the
|
|
153
|
+
* MEASUREMENT METHOD, not any one chain — a finding carrying its own copy
|
|
154
|
+
* reads as though that chain had caveats of its own, and repeated across a
|
|
155
|
+
* sweep it is pure byte-identical duplication.
|
|
156
|
+
*/
|
|
157
|
+
boundsStatement: z.ZodString;
|
|
158
|
+
/** The signed over/under-report bounds on the method. Stated ONCE. */
|
|
159
|
+
limits: z.ZodArray<z.ZodObject<{
|
|
160
|
+
id: z.ZodString;
|
|
161
|
+
direction: z.ZodEnum<["over-report", "under-report", "scope", "assumption"]>;
|
|
162
|
+
statement: z.ZodString;
|
|
163
|
+
}, "strict", z.ZodTypeAny, {
|
|
164
|
+
id: string;
|
|
165
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
166
|
+
statement: string;
|
|
167
|
+
}, {
|
|
168
|
+
id: string;
|
|
169
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
170
|
+
statement: string;
|
|
171
|
+
}>, "many">;
|
|
172
|
+
}, "strict", z.ZodTypeAny, {
|
|
173
|
+
root: string;
|
|
174
|
+
scope: string[];
|
|
175
|
+
threshold: number;
|
|
176
|
+
unmatchedScope: string[];
|
|
177
|
+
distinctChains: number;
|
|
178
|
+
skippedUnknownLocations: number;
|
|
179
|
+
boundsStatement: string;
|
|
180
|
+
limits: {
|
|
181
|
+
id: string;
|
|
182
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
183
|
+
statement: string;
|
|
184
|
+
}[];
|
|
185
|
+
}, {
|
|
186
|
+
root: string;
|
|
187
|
+
scope: string[];
|
|
188
|
+
threshold: number;
|
|
189
|
+
unmatchedScope: string[];
|
|
190
|
+
distinctChains: number;
|
|
191
|
+
skippedUnknownLocations: number;
|
|
192
|
+
boundsStatement: string;
|
|
193
|
+
limits: {
|
|
194
|
+
id: string;
|
|
195
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
196
|
+
statement: string;
|
|
197
|
+
}[];
|
|
198
|
+
}>>;
|
|
199
|
+
/**
|
|
200
|
+
* The report one run emits: one finding per over-budget chain — plus, ahead of
|
|
201
|
+
* them, the run-integrity refusal when part of what was asked about was never
|
|
202
|
+
* measured. See {@link buildReport}: the second kind is DERIVED there rather
|
|
203
|
+
* than passed in, so no report can carry an unmatched path and a clean status.
|
|
204
|
+
*/
|
|
205
|
+
export type BudgetReport = Report<BudgetData>;
|
|
101
206
|
/**
|
|
102
207
|
* Create the `vat claude budget [paths...]` command.
|
|
103
208
|
*
|
|
@@ -120,6 +225,7 @@ export interface ReportInput {
|
|
|
120
225
|
readonly scoped: {
|
|
121
226
|
readonly unmatchedScope: readonly string[];
|
|
122
227
|
};
|
|
228
|
+
/** The BUDGET findings only. The run-integrity refusal is derived, not passed. */
|
|
123
229
|
readonly findings: readonly ValidationIssue[];
|
|
124
230
|
}
|
|
125
231
|
/**
|
|
@@ -139,6 +245,12 @@ export interface ReportInput {
|
|
|
139
245
|
* block appears exactly once across a MULTI-finding report — and a presence
|
|
140
246
|
* check passes identically with a copy per finding.
|
|
141
247
|
*
|
|
248
|
+
* ⛔ The run-integrity refusal is DERIVED here from `scoped.unmatchedScope`
|
|
249
|
+
* rather than assembled by the caller, which is what makes "a run that checked
|
|
250
|
+
* nothing never reports success" unrepresentable instead of merely observed:
|
|
251
|
+
* there is no pipeline step left in which a later edit could drop it. See
|
|
252
|
+
* {@link nothingCheckedFindings}.
|
|
253
|
+
*
|
|
142
254
|
* @param input - The run's parts
|
|
143
255
|
* @returns The report, ready to serialize
|
|
144
256
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"budget.d.ts","sourceRoot":"","sources":["../../../src/commands/claude/budget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EAML,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"budget.d.ts","sourceRoot":"","sources":["../../../src/commands/claude/budget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EAML,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAKL,KAAK,MAAM,EAGX,KAAK,eAAe,EACrB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuBxB,2FAA2F;AAC3F,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1D,yCAAyC;AACzC,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AASD;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;IAE3B,8DAA8D;;IAE9D,yEAAyE;;IAEzE,gFAAgF;;IAEhF,qGAAqG;;IAErG,2FAA2F;;IAE3F;;;;;;;OAOG;;IAEH,sEAAsE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE7D,CAAC;AAEZ,MAAM,MAAM,UAAU,GAAG,CA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
|
import { ALWAYS_LOADED_BUDGET_LIMITS, buildClaudeContextPopulation, CLAUDE_CONTEXT_BOUNDS_STATEMENT, DEFAULT_ALWAYS_LOADED_CONTEXT_TOKENS, sweepAlwaysLoadedBudgets, } from '@vibe-agent-toolkit/resources';
|
|
54
|
-
import { applyAllowFilter,
|
|
54
|
+
import { applyAllowFilter, buildReport as buildEnvelope, exitCodeForSeverityCounts, reportSchema, toFindings, } from '@vibe-agent-toolkit/schema';
|
|
55
55
|
import { findProjectRoot } from '@vibe-agent-toolkit/utils';
|
|
56
56
|
import { Command, Option } from 'commander';
|
|
57
|
-
import {
|
|
57
|
+
import { z } from 'zod';
|
|
58
|
+
import { handleReportCommandError } from '../../utils/command-error.js';
|
|
58
59
|
import { loadConfig } from '../../utils/config-loader.js';
|
|
59
60
|
import { contextBudgetIssues, scopeSweepToPaths } from '../../utils/context-budget-issues.js';
|
|
60
61
|
import { targetPathWithin } from '../../utils/corpus-target.js';
|
|
@@ -63,11 +64,55 @@ import { createLogger } from '../../utils/logger.js';
|
|
|
63
64
|
import { writeJsonOutput, writeStdoutSync, writeYamlOutput } from '../../utils/output.js';
|
|
64
65
|
import { populationWiring } from '../../utils/population-wiring.js';
|
|
65
66
|
import { withPopulationCache } from '../../utils/projection-store.js';
|
|
67
|
+
import { runIntegrityFinding } from '../../utils/run-integrity.js';
|
|
66
68
|
import { gitTrackerForProjectRoot } from '../audit/distributed-tree.js';
|
|
67
69
|
/** How this command names itself in a refusal. */
|
|
68
70
|
const COMMAND_NAME = 'vat claude budget';
|
|
69
71
|
/** Soft wrap width for the printed limit statements. */
|
|
70
72
|
const WRAP_COLUMNS = 96;
|
|
73
|
+
/** How the corpus root itself is named to a reader — it has no path of its own. */
|
|
74
|
+
const CORPUS_ROOT_LABEL = '<corpus root>';
|
|
75
|
+
/** A signed bound on the measurement method, as `@vibe-agent-toolkit/resources` states it. */
|
|
76
|
+
const StatedLimitSchema = z.object({
|
|
77
|
+
id: z.string(),
|
|
78
|
+
direction: z.enum(['over-report', 'under-report', 'scope', 'assumption']),
|
|
79
|
+
statement: z.string(),
|
|
80
|
+
}).strict();
|
|
81
|
+
/**
|
|
82
|
+
* What one run reports beyond its findings.
|
|
83
|
+
*
|
|
84
|
+
* The sweep counters describe the WHOLE tree, not the scope: a scope narrows
|
|
85
|
+
* what is reported, never what was measured. The envelope's `examined` is the
|
|
86
|
+
* working-location count for the same reason — "9 chains checked, none over
|
|
87
|
+
* budget" and "nothing was checked" are different answers and must not render
|
|
88
|
+
* identically.
|
|
89
|
+
*/
|
|
90
|
+
export const BudgetDataSchema = z.object({
|
|
91
|
+
root: z.string(),
|
|
92
|
+
/** The budget every chain was measured against, in tokens. */
|
|
93
|
+
threshold: z.number().int().nonnegative(),
|
|
94
|
+
/** The root-relative directories asked about. `''` is the whole tree. */
|
|
95
|
+
scope: z.array(z.string()),
|
|
96
|
+
/** Requested paths that named no working location — see `scopeSweepToPaths`. */
|
|
97
|
+
unmatchedScope: z.array(z.string()),
|
|
98
|
+
/** Distinct instruction chains among the working locations — the queries the sweep really issued. */
|
|
99
|
+
distinctChains: z.number().int().nonnegative(),
|
|
100
|
+
/** Locations whose representative the projection never realized. Counted, never zeroed. */
|
|
101
|
+
skippedUnknownLocations: z.number().int().nonnegative(),
|
|
102
|
+
/**
|
|
103
|
+
* What this verdict does not settle, in either direction. Stated ONCE.
|
|
104
|
+
*
|
|
105
|
+
* ⛔ On the report beside `threshold`, never on a finding. These bound the
|
|
106
|
+
* MEASUREMENT METHOD, not any one chain — a finding carrying its own copy
|
|
107
|
+
* reads as though that chain had caveats of its own, and repeated across a
|
|
108
|
+
* sweep it is pure byte-identical duplication.
|
|
109
|
+
*/
|
|
110
|
+
boundsStatement: z.string(),
|
|
111
|
+
/** The signed over/under-report bounds on the method. Stated ONCE. */
|
|
112
|
+
limits: z.array(StatedLimitSchema),
|
|
113
|
+
}).strict();
|
|
114
|
+
/** The document this command publishes. */
|
|
115
|
+
export const BUDGET_REPORT_SCHEMA = reportSchema(BudgetDataSchema);
|
|
71
116
|
/**
|
|
72
117
|
* Create the `vat claude budget [paths...]` command.
|
|
73
118
|
*
|
|
@@ -113,12 +158,16 @@ Configuration (vibe-agent-toolkit.config.yaml):
|
|
|
113
158
|
|
|
114
159
|
Output:
|
|
115
160
|
- threshold: the budget every chain was measured against
|
|
116
|
-
- scope/unmatchedScope: what was asked about, and what matched nothing
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
161
|
+
- scope/unmatchedScope: what was asked about, and what matched nothing.
|
|
162
|
+
A path that matched nothing was NOT checked, so it is
|
|
163
|
+
reported as a RESOURCE_CHECK_BROKEN error rather than
|
|
164
|
+
passing quietly -- and that code is not configurable
|
|
165
|
+
- status/summary: ok, findings, or error; plus the count per severity
|
|
166
|
+
- examined: working locations evaluated across the WHOLE tree,
|
|
167
|
+
so an empty findings list is legible
|
|
120
168
|
- findings: one per over-budget chain, ascending by directory
|
|
121
|
-
-
|
|
169
|
+
- data.distinctChains, data.skippedUnknownLocations: whole-tree facts
|
|
170
|
+
- data.limits/boundsStatement: what this verdict does not settle, signed
|
|
122
171
|
over-report or under-report. On the REPORT, never on a
|
|
123
172
|
finding — they bound the method, not any one chain, so
|
|
124
173
|
they are stated exactly once however many chains flag
|
|
@@ -128,7 +177,8 @@ Output:
|
|
|
128
177
|
|
|
129
178
|
Exit Codes:
|
|
130
179
|
0 - Reported (findings at the default info severity do not gate)
|
|
131
|
-
1 - A finding resolved to error severity via config
|
|
180
|
+
1 - A finding resolved to error severity via config, or a requested path
|
|
181
|
+
matched no working location so nothing was checked there
|
|
132
182
|
2 - System error (a path outside the corpus root, unreadable tree)
|
|
133
183
|
|
|
134
184
|
Example:
|
|
@@ -163,14 +213,17 @@ export async function claudeBudgetCommand(pathArgs, options) {
|
|
|
163
213
|
// gets an error, which is the case that gets forgotten.
|
|
164
214
|
const findings = resolveIssueSeverity(applyAllowFilter(contextBudgetIssues(scoped.sweep), validation ?? {}).emitted, validation);
|
|
165
215
|
warnUnmatched(scoped.unmatchedScope, logger);
|
|
166
|
-
const report = buildReport({ root, threshold, scope, sweep, scoped, findings });
|
|
216
|
+
const report = { ...buildReport({ root, threshold, scope, sweep, scoped, findings }), durationMs: Date.now() - startTime };
|
|
167
217
|
emit(report, options.format ?? 'text');
|
|
168
|
-
//
|
|
169
|
-
//
|
|
170
|
-
|
|
218
|
+
// `error` gates, and it is reachable two ways: an adopter promoted
|
|
219
|
+
// ALWAYS_LOADED_CONTEXT_BUDGET, or the run checked nothing — see
|
|
220
|
+
// {@link nothingCheckedFindings}. At the code's `info` default the first
|
|
221
|
+
// never fires, so the budget cannot fail a build unless an adopter asked it
|
|
222
|
+
// to; the second is not a severity anybody may configure away.
|
|
223
|
+
process.exit(exitCodeForSeverityCounts(report.summary));
|
|
171
224
|
}
|
|
172
225
|
catch (error) {
|
|
173
|
-
|
|
226
|
+
handleReportCommandError(error, logger, startTime, 'claude budget', options.format);
|
|
174
227
|
}
|
|
175
228
|
}
|
|
176
229
|
/**
|
|
@@ -190,25 +243,34 @@ export async function claudeBudgetCommand(pathArgs, options) {
|
|
|
190
243
|
* block appears exactly once across a MULTI-finding report — and a presence
|
|
191
244
|
* check passes identically with a copy per finding.
|
|
192
245
|
*
|
|
246
|
+
* ⛔ The run-integrity refusal is DERIVED here from `scoped.unmatchedScope`
|
|
247
|
+
* rather than assembled by the caller, which is what makes "a run that checked
|
|
248
|
+
* nothing never reports success" unrepresentable instead of merely observed:
|
|
249
|
+
* there is no pipeline step left in which a later edit could drop it. See
|
|
250
|
+
* {@link nothingCheckedFindings}.
|
|
251
|
+
*
|
|
193
252
|
* @param input - The run's parts
|
|
194
253
|
* @returns The report, ready to serialize
|
|
195
254
|
*/
|
|
196
255
|
export function buildReport(input) {
|
|
197
256
|
const { root, threshold, scope, sweep, scoped, findings } = input;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
257
|
+
// The run-integrity report LEADS: every budget finding beneath it is noise
|
|
258
|
+
// until the operator knows part of what they asked about was never measured.
|
|
259
|
+
const reported = [...nothingCheckedFindings(scoped.unmatchedScope), ...findings];
|
|
260
|
+
return buildEnvelope({
|
|
261
|
+
examined: sweep.evaluatedDirectories,
|
|
262
|
+
findings: toFindings(reported),
|
|
263
|
+
data: {
|
|
264
|
+
root,
|
|
265
|
+
threshold,
|
|
266
|
+
scope: [...scope],
|
|
267
|
+
unmatchedScope: [...scoped.unmatchedScope],
|
|
268
|
+
distinctChains: sweep.queriedDirectories,
|
|
269
|
+
skippedUnknownLocations: sweep.skippedUnknownLocations,
|
|
270
|
+
boundsStatement: CLAUDE_CONTEXT_BOUNDS_STATEMENT,
|
|
271
|
+
limits: [...ALWAYS_LOADED_BUDGET_LIMITS],
|
|
272
|
+
},
|
|
273
|
+
});
|
|
212
274
|
}
|
|
213
275
|
/**
|
|
214
276
|
* Resolve the requested scope, defaulting to the whole tree.
|
|
@@ -231,9 +293,9 @@ function scopeWithin(root, pathArgs) {
|
|
|
231
293
|
/**
|
|
232
294
|
* Say so, loudly, when a requested path named no working location.
|
|
233
295
|
*
|
|
234
|
-
* ⛔ `warn` (stderr), never `debug`.
|
|
235
|
-
*
|
|
236
|
-
*
|
|
296
|
+
* ⛔ `warn` (stderr), never `debug`. The human half of
|
|
297
|
+
* {@link nothingCheckedFindings} — the same fact, on the channel a person reads,
|
|
298
|
+
* ahead of the report rather than inside it.
|
|
237
299
|
*
|
|
238
300
|
* @param unmatched - The requested paths that matched nothing
|
|
239
301
|
* @param logger - Where the warning goes
|
|
@@ -244,6 +306,55 @@ function warnUnmatched(unmatched, logger) {
|
|
|
244
306
|
logger.warn(`Warning: no working location matched ${unmatched.join(', ')} — nothing was checked there.`
|
|
245
307
|
+ ' This is NOT a report that those paths are within budget.');
|
|
246
308
|
}
|
|
309
|
+
/**
|
|
310
|
+
* The refusal for a run whose requested paths named no working location.
|
|
311
|
+
*
|
|
312
|
+
* 🔑 **A gate that checked nothing must never answer `success`.** This shipped:
|
|
313
|
+
* `vat claude budget no/such/dir` reported `status: success` on exit 0, because
|
|
314
|
+
* an unmatched scope measures zero chains and zero findings serializes
|
|
315
|
+
* identically to "everything you asked about is within budget". The command
|
|
316
|
+
* already knew — it warned on stderr that nothing had been checked — and then
|
|
317
|
+
* published a document saying the opposite. Only the document gates a build, so
|
|
318
|
+
* the two channels disagreed on the half that matters.
|
|
319
|
+
*
|
|
320
|
+
* 🪤 {@link warnUnmatched} still says the same thing on stderr, and that is not
|
|
321
|
+
* the duplication this file bans elsewhere: stderr is the human channel and
|
|
322
|
+
* stdout is the parsed document, so the two are one statement per audience. What
|
|
323
|
+
* was wrong was never that the warning existed — it was that the DOCUMENT
|
|
324
|
+
* contradicted it, and the exit code was computed from the document.
|
|
325
|
+
*
|
|
326
|
+
* ⛔ Not repeated a THIRD time inside the text rendering, though. That shares a
|
|
327
|
+
* channel with the finding, which {@link renderReportText} already prints.
|
|
328
|
+
*
|
|
329
|
+
* The precedent is `vat resources check`'s `emptyCorpusFinding`, and this
|
|
330
|
+
* follows it through the shared {@link runIntegrityFinding} rather than
|
|
331
|
+
* inventing a third convention — `RESOURCE_CHECK_BROKEN` at `error`, derived in
|
|
332
|
+
* {@link buildReport} rather than assembled in the handler, so it bypasses
|
|
333
|
+
* `applyAllowFilter` and `resolveIssueSeverity` by construction and no report
|
|
334
|
+
* carrying an unmatched path can be built with a clean status. The reasoning
|
|
335
|
+
* behind each of those lives with the mechanism, in `run-integrity.ts`.
|
|
336
|
+
*
|
|
337
|
+
* ⛔ ONE finding however many paths went unmatched. The claim is about the RUN,
|
|
338
|
+
* and one per argument is the per-finding duplication this report is built to
|
|
339
|
+
* make impossible. It is not routed through `nothingCheckedFinding` because the
|
|
340
|
+
* denominator here is not a count but a list of names the message must carry.
|
|
341
|
+
*
|
|
342
|
+
* @param unmatched - The requested paths that matched no working location
|
|
343
|
+
* @returns The finding, or nothing when everything asked about was checked
|
|
344
|
+
*/
|
|
345
|
+
function nothingCheckedFindings(unmatched) {
|
|
346
|
+
if (unmatched.length === 0)
|
|
347
|
+
return [];
|
|
348
|
+
const named = unmatched.map((path) => (path === '' ? CORPUS_ROOT_LABEL : path)).join(', ');
|
|
349
|
+
return [runIntegrityFinding(`No working location matched ${named}, so nothing was checked there and this`
|
|
350
|
+
+ ' report is NOT a statement that those paths are within budget.'
|
|
351
|
+
+ ' A working location is any non-ignored directory holding an enumerated file,'
|
|
352
|
+
+ ' so a path matching none is usually a typo, a directory that is empty, or one'
|
|
353
|
+
+ ' `.gitignore` declines — and the whole corpus root matching none means the'
|
|
354
|
+
+ ' enumeration came back empty, which a broad ignore pattern or a shallow or'
|
|
355
|
+
+ ' sparse checkout produces.'
|
|
356
|
+
+ ' `vat resources scan` over the same path lists what an enumeration finds.')];
|
|
357
|
+
}
|
|
247
358
|
/**
|
|
248
359
|
* Populate the Claude-context lane for one tree and sweep every location.
|
|
249
360
|
*
|
|
@@ -294,15 +405,14 @@ function emit(report, format) {
|
|
|
294
405
|
*/
|
|
295
406
|
export function renderReportText(report) {
|
|
296
407
|
const lines = [
|
|
297
|
-
`Always-loaded context budget at ${report.root}`,
|
|
298
|
-
` budget ${count(report.threshold)} tokens`
|
|
299
|
-
+ ` · ${count(report.
|
|
300
|
-
+ ` · ${count(report.distinctChains)} distinct chains`
|
|
301
|
-
+ ` · ${count(report.skippedUnknownLocations)} unrealized`,
|
|
408
|
+
`Always-loaded context budget at ${report.data.root}`,
|
|
409
|
+
` budget ${count(report.data.threshold)} tokens`
|
|
410
|
+
+ ` · ${count(report.examined)} working locations`
|
|
411
|
+
+ ` · ${count(report.data.distinctChains)} distinct chains`
|
|
412
|
+
+ ` · ${count(report.data.skippedUnknownLocations)} unrealized`,
|
|
302
413
|
'',
|
|
303
414
|
...findingLines(report.findings),
|
|
304
|
-
...
|
|
305
|
-
...limitLines(report),
|
|
415
|
+
...limitLines(report.data),
|
|
306
416
|
];
|
|
307
417
|
return `${lines.join('\n')}\n`;
|
|
308
418
|
}
|
|
@@ -318,12 +428,12 @@ export function renderReportText(report) {
|
|
|
318
428
|
* report types, and the query additionally prints the modelled-behaviour
|
|
319
429
|
* citations that no bound of this verdict rests on.
|
|
320
430
|
*
|
|
321
|
-
* @param
|
|
431
|
+
* @param data - The report's data, carrying the bounds
|
|
322
432
|
* @returns The section's lines
|
|
323
433
|
*/
|
|
324
|
-
function limitLines(
|
|
325
|
-
const lines = ['What this verdict does not settle', ...wrapped(
|
|
326
|
-
for (const limit of
|
|
434
|
+
function limitLines(data) {
|
|
435
|
+
const lines = ['What this verdict does not settle', ...wrapped(data.boundsStatement, ' '), ''];
|
|
436
|
+
for (const limit of data.limits) {
|
|
327
437
|
lines.push(` ${limit.direction}: ${limit.id}`);
|
|
328
438
|
lines.push(...wrapped(limit.statement, ' '));
|
|
329
439
|
}
|
|
@@ -373,7 +483,7 @@ function findingLines(findings) {
|
|
|
373
483
|
return ['Every instruction chain checked is within budget.', ''];
|
|
374
484
|
const lines = [];
|
|
375
485
|
for (const finding of findings) {
|
|
376
|
-
lines.push(`${finding.severity} ${finding.code} at ${finding.location ??
|
|
486
|
+
lines.push(`${finding.severity} ${finding.code} at ${finding.location ?? CORPUS_ROOT_LABEL}`);
|
|
377
487
|
lines.push(` ${finding.message}`);
|
|
378
488
|
if (finding.fix !== undefined)
|
|
379
489
|
lines.push(` Fix: ${finding.fix}`);
|
|
@@ -381,21 +491,6 @@ function findingLines(findings) {
|
|
|
381
491
|
}
|
|
382
492
|
return lines;
|
|
383
493
|
}
|
|
384
|
-
/**
|
|
385
|
-
* The unmatched-scope notice, printed in the document as well as on stderr.
|
|
386
|
-
*
|
|
387
|
-
* @param unmatched - The requested paths that matched nothing
|
|
388
|
-
* @returns The lines, or none
|
|
389
|
-
*/
|
|
390
|
-
function unmatchedLines(unmatched) {
|
|
391
|
-
if (unmatched.length === 0)
|
|
392
|
-
return [];
|
|
393
|
-
return [
|
|
394
|
-
`Matched no working location: ${unmatched.join(', ')}`,
|
|
395
|
-
' Nothing was checked there — this is not a report that they are within budget.',
|
|
396
|
-
'',
|
|
397
|
-
];
|
|
398
|
-
}
|
|
399
494
|
/**
|
|
400
495
|
* A count as a reader reads it.
|
|
401
496
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"budget.js","sourceRoot":"","sources":["../../../src/commands/claude/budget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,+BAA+B,EAC/B,oCAAoC,EACpC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"budget.js","sourceRoot":"","sources":["../../../src/commands/claude/budget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,+BAA+B,EAC/B,oCAAoC,EACpC,wBAAwB,GAEzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,WAAW,IAAI,aAAa,EAC5B,yBAAyB,EAGzB,YAAY,EACZ,UAAU,GAEX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAE,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IAChD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,mDAAmD,EAAE,EAAE,CAAC,CAAC;IAC5F,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,OAAO,OAAO,CAAC,QAAQ,IAAI,iBAAiB,EAAE,CAAC,CAAC;QAC9F,KAAK,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QACnC,IAAI,OAAO,CAAC,GAAG,KAAK,SAAS;YAAE,KAAK,CAAC,IAAI,CAAC,UAAU,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QACnE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/commands/claude/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,OAAO,EAUL,KAAK,YAAY,EAEjB,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,KAAK,mBAAmB,EAExB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAEf,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/commands/claude/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;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wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAmCf;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,mBAAmB,EAC3B,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,OAAO,GACpB,qBAAqB,CA4BvB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,SAAS,CAAC,qBAAqB,GAAG,sBAAsB,CAAC,EAAE,GACnE,eAAe,CASjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,sBAAsB,CAS7F;AA+DD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,CAY7D;AAoeD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAcpD"}
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
* than an empty table.
|
|
61
61
|
*/
|
|
62
62
|
import { account, buildClaudeContextPopulation, buildContextCostMap, CLAUDE_CONTEXT_BOUNDS_STATEMENT, CLAUDE_CONTEXT_LIMITS, CLAUDE_CONTEXT_MODELLED_BEHAVIOURS, CLAUDE_MD_TAG, discoverableFrom, whatLoadsAt, } from '@vibe-agent-toolkit/resources';
|
|
63
|
+
import { ExitCode } from '@vibe-agent-toolkit/schema';
|
|
63
64
|
import { findProjectRoot } from '@vibe-agent-toolkit/utils';
|
|
64
65
|
import { Command, Option } from 'commander';
|
|
65
66
|
import { handleCommandError } from '../../utils/command-error.js';
|
|
@@ -233,10 +234,10 @@ export async function claudeContextCommand(pathArgs, options) {
|
|
|
233
234
|
// to be one — a number that fails a build is a number people learn to stop
|
|
234
235
|
// reading. The explicit exit matches every other leaf here and guarantees the
|
|
235
236
|
// process ends rather than waiting on whatever the population left behind.
|
|
236
|
-
process.exit(
|
|
237
|
+
process.exit(ExitCode.OK);
|
|
237
238
|
}
|
|
238
239
|
catch (error) {
|
|
239
|
-
handleCommandError(error, logger, startTime, 'claude context');
|
|
240
|
+
handleCommandError(error, logger, startTime, 'claude context', options.format);
|
|
240
241
|
}
|
|
241
242
|
}
|
|
242
243
|
/**
|
|
@@ -974,7 +975,7 @@ function describeImport(admission) {
|
|
|
974
975
|
*/
|
|
975
976
|
function conditionLine(condition) {
|
|
976
977
|
const reference = condition.sourceRef === null ? '' : ` [${condition.sourceRef}]`;
|
|
977
|
-
return ` ${condition.severity.padEnd(
|
|
978
|
+
return ` ${condition.severity.padEnd(7)} ${condition.code}`
|
|
978
979
|
+ ` at ${conditionLocation(condition)}${reference}: ${condition.message}`;
|
|
979
980
|
}
|
|
980
981
|
/**
|