@vibe-agent-toolkit/cli 0.2.0-rc.7 â 0.2.0-rc.9
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 +0 -1
- 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 +5 -2
- package/dist/bin.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 +72 -23
- package/dist/commands/ard/emit.d.ts.map +1 -1
- package/dist/commands/ard/emit.js +109 -56
- package/dist/commands/ard/emit.js.map +1 -1
- package/dist/commands/ard/index.d.ts +1 -1
- package/dist/commands/ard/index.d.ts.map +1 -1
- package/dist/commands/ard/index.js +4 -3
- package/dist/commands/ard/index.js.map +1 -1
- 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/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 +16 -14
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +304 -389
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +25 -24
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cache/clear.d.ts +17 -3
- package/dist/commands/cache/clear.d.ts.map +1 -1
- package/dist/commands/cache/clear.js +34 -13
- package/dist/commands/cache/clear.js.map +1 -1
- package/dist/commands/cache/index.d.ts.map +1 -1
- package/dist/commands/cache/index.js +19 -10
- package/dist/commands/cache/index.js.map +1 -1
- package/dist/commands/claude/context.d.ts +2 -2
- package/dist/commands/claude/context.d.ts.map +1 -1
- package/dist/commands/claude/context.js +7 -6
- package/dist/commands/claude/context.js.map +1 -1
- package/dist/commands/claude/index.d.ts +12 -11
- package/dist/commands/claude/index.d.ts.map +1 -1
- package/dist/commands/claude/index.js +14 -16
- 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 +22 -12
- 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.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +26 -16
- 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 +19 -1
- package/dist/commands/claude/org/skills.d.ts.map +1 -1
- package/dist/commands/claude/org/skills.js +147 -111
- 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.map +1 -1
- package/dist/commands/claude/plugin/build.js +23 -52
- 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 +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 +2 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +15 -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 +149 -104
- package/dist/commands/consistency-check.js.map +1 -1
- package/dist/commands/corpus/report.d.ts.map +1 -1
- package/dist/commands/corpus/report.js +1 -2
- package/dist/commands/corpus/report.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +2 -6
- 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 -3
- 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.map +1 -1
- package/dist/commands/doctor.js +55 -37
- 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.map +1 -1
- package/dist/commands/okf/index.js +14 -2
- package/dist/commands/okf/index.js.map +1 -1
- package/dist/commands/okf/validate.d.ts +157 -48
- package/dist/commands/okf/validate.d.ts.map +1 -1
- package/dist/commands/okf/validate.js +109 -76
- package/dist/commands/okf/validate.js.map +1 -1
- package/dist/commands/phase-utils.d.ts +11 -10
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +30 -14
- 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.map +1 -1
- package/dist/commands/rag/index-command.js +4 -1
- package/dist/commands/rag/index-command.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 +6 -0
- package/dist/commands/resources/check-progress.d.ts.map +1 -1
- package/dist/commands/resources/check-progress.js +15 -4
- 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 +315 -205
- package/dist/commands/resources/check.d.ts.map +1 -1
- package/dist/commands/resources/check.js +368 -327
- 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 +159 -39
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/query.d.ts +2 -2
- package/dist/commands/resources/query.d.ts.map +1 -1
- package/dist/commands/resources/query.js +24 -18
- 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 +1 -1
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +0 -1
- 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 +90 -60
- 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 +120 -65
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build.d.ts +83 -3
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +162 -40
- 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.map +1 -1
- package/dist/commands/skills/list.js +14 -18
- 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 +15 -13
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +23 -5
- 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/validate.d.ts +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +39 -14
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +17 -5
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +161 -104
- 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/resolve-skill-reference.d.ts.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.js +50 -55
- 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/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 +63 -62
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +80 -76
- 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/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/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.map +1 -1
- package/dist/utils/optional-backend.js +2 -1
- 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.map +1 -1
- package/dist/utils/project-root-policy.js +0 -2
- 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 +38 -14
- package/dist/utils/projection-query.d.ts.map +1 -1
- package/dist/utils/projection-query.js +78 -17
- package/dist/utils/projection-query.js.map +1 -1
- package/dist/utils/projection-store.d.ts +61 -42
- package/dist/utils/projection-store.d.ts.map +1 -1
- package/dist/utils/projection-store.js +155 -59
- package/dist/utils/projection-store.js.map +1 -1
- 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/resource-loader.js +2 -2
- package/dist/utils/resource-loader.js.map +1 -1
- 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/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.map +1 -1
- package/dist/utils/user-context-scanner.js +0 -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 +3 -4
- 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 +44 -53
- package/docs/doctor.md +1 -0
- package/docs/index.md +18 -10
- package/docs/rag.md +0 -1
- package/docs/resources.md +0 -1
- package/docs/skill-test.md +10 -9
- package/docs/skills.md +6 -7
- package/package.json +23 -28
- package/schemas/ard-emit.json +149 -0
- package/schemas/okf-validate.json +170 -0
- package/schemas/resources-check.json +229 -0
- package/schemas/skill-review.json +230 -0
- package/dist/commands/claude/budget.d.ts +0 -170
- package/dist/commands/claude/budget.d.ts.map +0 -1
- package/dist/commands/claude/budget.js +0 -464
- package/dist/commands/claude/budget.js.map +0 -1
- package/dist/utils/context-budget-issues.d.ts +0 -108
- package/dist/utils/context-budget-issues.d.ts.map +0 -1
- package/dist/utils/context-budget-issues.js +0 -280
- package/dist/utils/context-budget-issues.js.map +0 -1
|
@@ -1,168 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `vat resources check` â run the project's own
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* `
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* The same class one level further out, and the one that shipped. `checksRun` is
|
|
32
|
-
* the denominator of RULES; nothing counted the ROWS, so a repository whose
|
|
33
|
-
* enumeration came back empty â a broad `.gitignore`, a shallow or sparse CI
|
|
34
|
-
* checkout, a root that resolved somewhere else â ran every declared check over
|
|
35
|
-
* nothing and reported `status: success` on exit 0 with empty stderr. Population
|
|
36
|
-
* declines ignored members rather than flagging them, so the tables held no
|
|
37
|
-
* trace of it either.
|
|
38
|
-
*
|
|
39
|
-
* So the population's size is published (`membersEnumerated`), and a run whose
|
|
40
|
-
* checks executed over zero members is an ERROR under the same non-overridable
|
|
41
|
-
* code as a broken statement â see {@link emptyCorpusFinding}. A gate that
|
|
42
|
-
* asserts nothing over nothing has not passed.
|
|
43
|
-
*
|
|
44
|
-
* ## ð An unknown `--check` name is a refusal, not an empty pass
|
|
45
|
-
*
|
|
46
|
-
* The same failure class one flag over: a filter that matched nothing ran nothing
|
|
47
|
-
* and exited 0. `requireDeclaredCheck` refuses it before the crawl, naming the
|
|
48
|
-
* declared set. A gate that cannot fail is worse than no gate.
|
|
49
|
-
*
|
|
50
|
-
* ## ð NO checks at all is the same refusal, and the one that shipped longest
|
|
51
|
-
*
|
|
52
|
-
* A project with a valid config and no `checks:` block reported `status:
|
|
53
|
-
* success`, `checksRun: 0`, exit 0 â so DELETING the `checks:` block silently
|
|
54
|
-
* deleted the gate and nothing anywhere said so. A gate that checked nothing is
|
|
55
|
-
* indistinguishable from a gate that was removed, and the entire argument for
|
|
56
|
-
* having these gates is that you never let those two look alike. It is now a
|
|
57
|
-
* `RESOURCE_CHECK_BROKEN` error like the other three â see
|
|
58
|
-
* {@link noCheckRanFinding}, and `RUN_INTEGRITY_CODE` for why one code
|
|
59
|
-
* covers all four. Declaring no checks is a legitimate CHOICE; running a gate
|
|
60
|
-
* that can only pass is not, so the remedy is to take the command out of the
|
|
61
|
-
* pipeline.
|
|
62
|
-
*
|
|
63
|
-
* ## ð SQL is the surface a user OPTED IN to, so no BUILT-IN check may be SQL
|
|
64
|
-
*
|
|
65
|
-
* Every check this verb runs is adopter-declared: {@link checkCommand} reads
|
|
66
|
-
* `config?.resources?.checks` and nothing else, and warns loudly when a project
|
|
67
|
-
* declares none. There are no built-ins, and the one way to end that quietly is
|
|
68
|
-
* to author the first one as SQL. A default-on rule written as a statement makes
|
|
69
|
-
* the engine, the projection and the population mandatory for everyone who
|
|
70
|
-
* inherits it, without anybody deciding that. So: **built-ins are TypeScript
|
|
71
|
-
* predicates over the projection's row model.** SQL stays the two places a user
|
|
72
|
-
* asked for it â this verb's declared checks, and `vat resources query`.
|
|
73
|
-
*
|
|
74
|
-
* â ïļ The engine today is `node:sqlite`, built into Node, so the thing at stake is
|
|
75
|
-
* not an install â it is the POPULATION. On an ~11,700-member adopter tree
|
|
76
|
-
* building the projection is **>99.9%** of a check run (16.5 s cold, ~1.3 s from
|
|
77
|
-
* the store) against **0.0008â0.004 s** for the statements themselves; see
|
|
78
|
-
* `vat-knowledge-resources.md`, which carries that measurement. That is exactly
|
|
79
|
-
* the cost "What this does NOT do" below refuses to put on every adopter's
|
|
80
|
-
* pre-commit path, and a default-on SQL check would put it there without the
|
|
81
|
-
* decision. The INSTALL cost is deferred rather than gone: the open question
|
|
82
|
-
* about a columnar engine is a 108 MB platform binding on a published toolkit,
|
|
83
|
-
* and this invariant is what keeps that question still answerable either way.
|
|
84
|
-
*
|
|
85
|
-
* ## ð The DEFAULT check set belongs to the pipeline, not to the config file
|
|
86
|
-
*
|
|
87
|
-
* A directory with no `vibe-agent-toolkit.config.yaml` must run exactly the same
|
|
88
|
-
* default-on checks as one with a config; config only ADDS to that set or
|
|
89
|
-
* OVERRIDES a severity in it. This is load-bearing rather than a convenience:
|
|
90
|
-
* *"'default-on error' is meaningless as a category if being default-on requires
|
|
91
|
-
* a config file to say so."*
|
|
92
|
-
*
|
|
93
|
-
* It is therefore a constraint on WHERE the defaults live in code, not only on
|
|
94
|
-
* what they are. They cannot be defaulted into the parsed config object, because
|
|
95
|
-
* an absent config is `undefined` and every default would vanish with it â for
|
|
96
|
-
* the project that never wrote one, which is the population the category exists
|
|
97
|
-
* for. The rest of VAT already behaves this way and is the shape to match:
|
|
98
|
-
* `vat audit` completes its entire scan first and reads config only to apply
|
|
99
|
-
* severity overrides, warning and CONTINUING when the file cannot be read; and
|
|
100
|
-
* `loadResourcesWithConfig` hands `vat resources validate` a registry whose
|
|
101
|
-
* built-in validators run whether `loadConfig` returned a config or nothing.
|
|
102
|
-
* This verb has no defaults yet, so the invariant is a rule for the first one â
|
|
103
|
-
* and the day it is written is the easiest day to break it.
|
|
104
|
-
*
|
|
105
|
-
* ## Keeping a TypeScript check and its SQL twin: two good reasons, one trap
|
|
106
|
-
*
|
|
107
|
-
* The proposal was "write the predicate twice, in TypeScript and in SQL, and run
|
|
108
|
-
* whichever is faster". Two thirds of it are worth having.
|
|
109
|
-
*
|
|
110
|
-
* â
**As documentation.** An SQL twin is executable documentation of the row
|
|
111
|
-
* model, and strictly better than prose about it: prose can describe a column
|
|
112
|
-
* that no longer exists and never say so, while a statement stops compiling â
|
|
113
|
-
* which this verb reports as `RESOURCE_CHECK_BROKEN` rather than as a skip.
|
|
114
|
-
*
|
|
115
|
-
* â
**As a differential oracle.** Run both over the frozen corpus and assert
|
|
116
|
-
* IDENTICAL findings. That is the only thing which makes a dual implementation
|
|
117
|
-
* better than a single one rather than worse: two implementations with no
|
|
118
|
-
* mandatory differential test are simply two places for one rule to be wrong.
|
|
119
|
-
* Apply it selectively, to genuinely relational checks â done by default, every
|
|
120
|
-
* new rule costs three artifacts instead of one.
|
|
121
|
-
*
|
|
122
|
-
* â **As a runtime optimizer â rejected, on two INDEPENDENT grounds.** It would
|
|
123
|
-
* essentially never choose SQL: `buildResourceProjection` hands the rows back in
|
|
124
|
-
* memory before the ephemeral database exists at all, so the TypeScript arm is a
|
|
125
|
-
* for-loop over data already in hand, and the SQL arm's whole measured share of a
|
|
126
|
-
* run is the 0.0008â0.004 s above. A scheduler would be choosing between two
|
|
127
|
-
* arms of the 0.1%. And it reintroduces the dependency through the back door: an
|
|
128
|
-
* optimizer that MAY choose SQL means SQL MAY be needed at check time, which for
|
|
129
|
-
* anyone shipping the thing is the same as needed. **Optionality is not a
|
|
130
|
-
* property you can keep while also letting a scheduler reach for the optional
|
|
131
|
-
* thing.**
|
|
132
|
-
*
|
|
133
|
-
* ## ð Adopter SQL runs UNSANDBOXED on purpose â and contributed SQL is not adopter SQL
|
|
134
|
-
*
|
|
135
|
-
* What a statement may BE is gated hard, and documented where it is enforced:
|
|
136
|
-
* `assertIsQuery` and `detachForeignSchemas` in
|
|
137
|
-
* `packages/projection-sqlite/src/store.ts` refuse `ATTACH` and `PRAGMA`, with
|
|
138
|
-
* the measured cross-repository leak that motivated both, and CHANGELOG.md's
|
|
139
|
-
* `--budget` entry carries why nothing inside this process can interrupt a
|
|
140
|
-
* runaway statement. Read those; do not restate them here.
|
|
141
|
-
*
|
|
142
|
-
* What is written down nowhere else is that everything PAST those gates is
|
|
143
|
-
* unsandboxed deliberately. A `.sql` file the adopter points their own config at
|
|
144
|
-
* is adopter code, at the same trust boundary as their eslint config: they wrote
|
|
145
|
-
* it or they chose to inherit it, and VAT is not the thing standing between a
|
|
146
|
-
* project and its own repository.
|
|
147
|
-
*
|
|
148
|
-
* ðĻ That reasoning covers exactly ONE trust domain, and the rule scoping it is
|
|
149
|
-
* the other half: **contributed SQL is a reviewed EXAMPLE, never an
|
|
150
|
-
* auto-executed check.** A contribution channel is third-party text, and a
|
|
151
|
-
* statement arriving through one has none of the "they chose it" the paragraph
|
|
152
|
-
* above rests on. Ship it as documentation an adopter copies into their own
|
|
153
|
-
* `resources.checks` deliberately. One paragraph must not be stretched to cover
|
|
154
|
-
* both domains.
|
|
155
|
-
*
|
|
156
|
-
* ## What this does NOT do
|
|
157
|
-
*
|
|
158
|
-
* It does not fold into `vat resources validate`. That command is on every
|
|
159
|
-
* adopter's pre-commit path, and adding a store-backed population to it is a
|
|
160
|
-
* cost and a risk that deserves its own decision with its own evidence. Wiring
|
|
161
|
-
* this into CI is one line in a workflow; making it unavoidable is not this
|
|
162
|
-
* change's call to make.
|
|
2
|
+
* `vat resources check` â run the project's own assertions over its resource
|
|
3
|
+
* projection, as a gate.
|
|
4
|
+
*
|
|
5
|
+
* The invariants this file implements are written down once, in
|
|
6
|
+
* `docs/architecture/cli.md` under "`vat resources check [path]`". Read that
|
|
7
|
+
* before changing anything here; the headlines, so a reader knows when to:
|
|
8
|
+
*
|
|
9
|
+
* - ð **Four ways to check nothing are all refusals**, at error severity under
|
|
10
|
+
* the non-overridable `RESOURCE_CHECK_BROKEN`: a statement that will not run
|
|
11
|
+
* (the `catch` in `runUnits`), a corpus that enumerated empty
|
|
12
|
+
* ({@link emptyCorpusFinding}), a `--check` name nothing declares
|
|
13
|
+
* (`requireKnownCheck`), and not one check executed at all
|
|
14
|
+
* ({@link noCheckRanFinding}, derived in {@link buildCheckOutputData} so an
|
|
15
|
+
* emptied `BUILTIN_CHECKS` cannot publish a clean document).
|
|
16
|
+
* - â ïļ That last one does NOT make the step always able to fail: the only
|
|
17
|
+
* built-in ships at `info`. Do not invent a second refusal for it â that
|
|
18
|
+
* would refuse the no-config run the default set exists to serve.
|
|
19
|
+
* - ð **No built-in check may be SQL.** {@link checkCommand} reads
|
|
20
|
+
* `config?.resources?.checks` and nothing else for statements; built-ins are
|
|
21
|
+
* TypeScript predicates over the row model, and a built-in's `sqlTwin` is
|
|
22
|
+
* documentation an adopter copies, never executed here.
|
|
23
|
+
* - ð **The default set belongs to the pipeline, not the config file.**
|
|
24
|
+
* `BUILTIN_CHECKS` reaches {@link runProjectChecks} as a REQUIRED `builtins`
|
|
25
|
+
* argument via {@link runOutcome}; nothing on that path reads `config`.
|
|
26
|
+
* - ðĻ **Adopter SQL runs unsandboxed on purpose, and contributed SQL is not
|
|
27
|
+
* adopter SQL** â a contributed statement ships as a reviewed example.
|
|
28
|
+
* - â A TypeScript/SQL twin is documentation and a differential oracle, never
|
|
29
|
+
* a runtime optimizer to schedule between.
|
|
163
30
|
*/
|
|
164
|
-
import { type ResourceCheck } from '@vibe-agent-toolkit/resources';
|
|
165
|
-
import { type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
31
|
+
import { type BoundBuiltinCheck, type ResourceCheck } from '@vibe-agent-toolkit/resources';
|
|
32
|
+
import { type Report, type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
33
|
+
import { z } from 'zod';
|
|
166
34
|
import { type SeverityOverrides } from '../../utils/issue-severity.js';
|
|
167
35
|
import { type Logger } from '../../utils/logger.js';
|
|
168
36
|
import { type AskProjection, type PopulationExtent, type ProjectionProvenance } from '../../utils/projection-query.js';
|
|
@@ -198,33 +66,27 @@ interface CheckOptions {
|
|
|
198
66
|
/**
|
|
199
67
|
* What one declared check cost, and what it found.
|
|
200
68
|
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
* check in the run, so folding that shared setup into each rule would make N
|
|
206
|
-
* cheap rules look expensive and make the per-rule numbers sum to N times a cost
|
|
207
|
-
* paid once. It is published separately instead â `populationSecs` beside
|
|
208
|
-
* `population` in the document â so a reader can reconcile the parts against
|
|
209
|
-
* `durationSecs` rather than inferring the remainder and attributing it to
|
|
210
|
-
* whichever rule they happen to be reading.
|
|
211
|
-
*
|
|
212
|
-
* ðŠĪ This repo has already shipped the opposite mistake once, in another
|
|
213
|
-
* instrument: `parse ab` reported a pooled arm BACKWARDS because its estimate
|
|
214
|
-
* was thread-summed, and the report surfaced no caveat that would have told the
|
|
215
|
-
* reader. A shared cost silently attributed to one participant is the same
|
|
216
|
-
* defect wearing different clothes. If you ever want the population inside these
|
|
217
|
-
* numbers, divide it out explicitly and say so in the field name.
|
|
69
|
+
* ðĻ **The population is charged to NOBODY, and that is deliberate.**
|
|
70
|
+
* {@link durationMs} is the STATEMENT alone; the shared setup is published as
|
|
71
|
+
* `populationSecs`. Why, and the pooled-arm defect this avoids:
|
|
72
|
+
* `docs/architecture/cli.md`, "The population is charged to NOBODY".
|
|
218
73
|
*/
|
|
219
74
|
export interface CheckCost {
|
|
220
|
-
/** The check's key in `resources.checks
|
|
75
|
+
/** The check's key in `resources.checks`, or a built-in's name. */
|
|
221
76
|
readonly name: string;
|
|
222
|
-
/** Wall time of this check's
|
|
77
|
+
/** Wall time of this check's selection, and of nothing it shares with others. */
|
|
223
78
|
readonly durationMs: number;
|
|
224
|
-
/** Rows the
|
|
79
|
+
/** Rows the selection returned â the violations it found. Absent when it did not run. */
|
|
225
80
|
readonly rows?: number;
|
|
226
|
-
/** Set when the
|
|
81
|
+
/** Set when the check threw. One that did not complete has no row count. */
|
|
227
82
|
readonly broken?: true;
|
|
83
|
+
/**
|
|
84
|
+
* Set when VAT supplied this check rather than the project. ð Without it a
|
|
85
|
+
* reader whose config declares nothing finds a rule they never wrote in
|
|
86
|
+
* `checks[]` with no way to tell a default from a stale declaration â or, when
|
|
87
|
+
* a project declares a check of the same name, to tell the two entries apart.
|
|
88
|
+
*/
|
|
89
|
+
readonly builtin?: true;
|
|
228
90
|
}
|
|
229
91
|
/** What one run of the checks produced. */
|
|
230
92
|
interface CheckOutcome extends ProjectionProvenance, PopulationExtent {
|
|
@@ -245,6 +107,229 @@ export interface CheckPayloadInput extends CheckOutcome {
|
|
|
245
107
|
root: string;
|
|
246
108
|
durationMs: number;
|
|
247
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* What the check run reports beyond its findings.
|
|
112
|
+
*
|
|
113
|
+
* The envelope's `examined` is `membersEnumerated` â what the rules ran
|
|
114
|
+
* AGAINST. `checksRun` is the other denominator, the number of RULES, and both
|
|
115
|
+
* are needed: zero findings is the pass condition and either number at zero
|
|
116
|
+
* makes that pass vacuous.
|
|
117
|
+
*/
|
|
118
|
+
export declare const CheckDataSchema: z.ZodObject<{
|
|
119
|
+
root: z.ZodString;
|
|
120
|
+
/** Whether the projection was derived this run or read from the store. */
|
|
121
|
+
population: z.ZodEnum<["derived", "store"]>;
|
|
122
|
+
/** What the population cost â charged to no check, see `CheckCost`. */
|
|
123
|
+
populationSecs: z.ZodNumber;
|
|
124
|
+
/** What evaluating the lenses cost, paid before the first statement ran. */
|
|
125
|
+
lensSecs: z.ZodNumber;
|
|
126
|
+
/**
|
|
127
|
+
* Which lenses that covers â the derived relations this run's checks could
|
|
128
|
+
* actually read. ð An empty list says "no check asked for a derived relation"
|
|
129
|
+
* rather than "a lens stopped running"; without it `lensSecs: 0` is the same
|
|
130
|
+
* document either way, and a gate whose rules silently read empty relations is
|
|
131
|
+
* a gate that cannot fail.
|
|
132
|
+
*/
|
|
133
|
+
lensesEvaluated: z.ZodArray<z.ZodString, "many">;
|
|
134
|
+
/**
|
|
135
|
+
* The prose frame {@link CheckDataSchema.limits} is read under. Present
|
|
136
|
+
* exactly when a lens with stated bounds was evaluated.
|
|
137
|
+
*/
|
|
138
|
+
boundsStatement: z.ZodOptional<z.ZodString>;
|
|
139
|
+
/**
|
|
140
|
+
* What the derived rows this run could read do NOT settle â signed and
|
|
141
|
+
* directional, the same list `vat claude context` publishes beside its own
|
|
142
|
+
* answer. Absent when no bounded lens ran: an empty list would claim nothing
|
|
143
|
+
* bounds the answer, which is stronger than "the answer holds no such row".
|
|
144
|
+
*/
|
|
145
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
146
|
+
id: z.ZodString;
|
|
147
|
+
direction: z.ZodEnum<["over-report", "under-report", "scope", "assumption"]>;
|
|
148
|
+
statement: z.ZodString;
|
|
149
|
+
}, "strict", z.ZodTypeAny, {
|
|
150
|
+
id: string;
|
|
151
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
152
|
+
statement: string;
|
|
153
|
+
}, {
|
|
154
|
+
id: string;
|
|
155
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
156
|
+
statement: string;
|
|
157
|
+
}>, "many">>;
|
|
158
|
+
/** The number of rules that EXECUTED. Derived from `checks`, never carried beside it. */
|
|
159
|
+
checksRun: z.ZodNumber;
|
|
160
|
+
/** What each rule cost, directly under the denominator it is the breakdown of. */
|
|
161
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
162
|
+
name: z.ZodString;
|
|
163
|
+
/** Three significant figures, so a 0.4 ms rule serializes as 0.0004 rather than a zero that reads as "not measured". */
|
|
164
|
+
durationSecs: z.ZodNumber;
|
|
165
|
+
/** Rows the statement returned. ABSENT, never 0, when the statement did not complete. */
|
|
166
|
+
rows: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
broken: z.ZodOptional<z.ZodLiteral<true>>;
|
|
168
|
+
/** Present and `true` only for a rule VAT supplied â see {@link CheckCost.builtin}. */
|
|
169
|
+
builtin: z.ZodOptional<z.ZodLiteral<true>>;
|
|
170
|
+
}, "strict", z.ZodTypeAny, {
|
|
171
|
+
name: string;
|
|
172
|
+
durationSecs: number;
|
|
173
|
+
rows?: number | undefined;
|
|
174
|
+
broken?: true | undefined;
|
|
175
|
+
builtin?: true | undefined;
|
|
176
|
+
}, {
|
|
177
|
+
name: string;
|
|
178
|
+
durationSecs: number;
|
|
179
|
+
rows?: number | undefined;
|
|
180
|
+
broken?: true | undefined;
|
|
181
|
+
builtin?: true | undefined;
|
|
182
|
+
}>, "many">;
|
|
183
|
+
}, "strict", z.ZodTypeAny, {
|
|
184
|
+
root: string;
|
|
185
|
+
population: "derived" | "store";
|
|
186
|
+
lensesEvaluated: string[];
|
|
187
|
+
populationSecs: number;
|
|
188
|
+
lensSecs: number;
|
|
189
|
+
checksRun: number;
|
|
190
|
+
checks: {
|
|
191
|
+
name: string;
|
|
192
|
+
durationSecs: number;
|
|
193
|
+
rows?: number | undefined;
|
|
194
|
+
broken?: true | undefined;
|
|
195
|
+
builtin?: true | undefined;
|
|
196
|
+
}[];
|
|
197
|
+
boundsStatement?: string | undefined;
|
|
198
|
+
limits?: {
|
|
199
|
+
id: string;
|
|
200
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
201
|
+
statement: string;
|
|
202
|
+
}[] | undefined;
|
|
203
|
+
}, {
|
|
204
|
+
root: string;
|
|
205
|
+
population: "derived" | "store";
|
|
206
|
+
lensesEvaluated: string[];
|
|
207
|
+
populationSecs: number;
|
|
208
|
+
lensSecs: number;
|
|
209
|
+
checksRun: number;
|
|
210
|
+
checks: {
|
|
211
|
+
name: string;
|
|
212
|
+
durationSecs: number;
|
|
213
|
+
rows?: number | undefined;
|
|
214
|
+
broken?: true | undefined;
|
|
215
|
+
builtin?: true | undefined;
|
|
216
|
+
}[];
|
|
217
|
+
boundsStatement?: string | undefined;
|
|
218
|
+
limits?: {
|
|
219
|
+
id: string;
|
|
220
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
221
|
+
statement: string;
|
|
222
|
+
}[] | undefined;
|
|
223
|
+
}>;
|
|
224
|
+
export type CheckData = z.infer<typeof CheckDataSchema>;
|
|
225
|
+
/** The document this command publishes. */
|
|
226
|
+
export declare const CHECK_REPORT_SCHEMA: import("@vibe-agent-toolkit/schema").ReportZodSchema<z.ZodObject<{
|
|
227
|
+
root: z.ZodString;
|
|
228
|
+
/** Whether the projection was derived this run or read from the store. */
|
|
229
|
+
population: z.ZodEnum<["derived", "store"]>;
|
|
230
|
+
/** What the population cost â charged to no check, see `CheckCost`. */
|
|
231
|
+
populationSecs: z.ZodNumber;
|
|
232
|
+
/** What evaluating the lenses cost, paid before the first statement ran. */
|
|
233
|
+
lensSecs: z.ZodNumber;
|
|
234
|
+
/**
|
|
235
|
+
* Which lenses that covers â the derived relations this run's checks could
|
|
236
|
+
* actually read. ð An empty list says "no check asked for a derived relation"
|
|
237
|
+
* rather than "a lens stopped running"; without it `lensSecs: 0` is the same
|
|
238
|
+
* document either way, and a gate whose rules silently read empty relations is
|
|
239
|
+
* a gate that cannot fail.
|
|
240
|
+
*/
|
|
241
|
+
lensesEvaluated: z.ZodArray<z.ZodString, "many">;
|
|
242
|
+
/**
|
|
243
|
+
* The prose frame {@link CheckDataSchema.limits} is read under. Present
|
|
244
|
+
* exactly when a lens with stated bounds was evaluated.
|
|
245
|
+
*/
|
|
246
|
+
boundsStatement: z.ZodOptional<z.ZodString>;
|
|
247
|
+
/**
|
|
248
|
+
* What the derived rows this run could read do NOT settle â signed and
|
|
249
|
+
* directional, the same list `vat claude context` publishes beside its own
|
|
250
|
+
* answer. Absent when no bounded lens ran: an empty list would claim nothing
|
|
251
|
+
* bounds the answer, which is stronger than "the answer holds no such row".
|
|
252
|
+
*/
|
|
253
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
254
|
+
id: z.ZodString;
|
|
255
|
+
direction: z.ZodEnum<["over-report", "under-report", "scope", "assumption"]>;
|
|
256
|
+
statement: z.ZodString;
|
|
257
|
+
}, "strict", z.ZodTypeAny, {
|
|
258
|
+
id: string;
|
|
259
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
260
|
+
statement: string;
|
|
261
|
+
}, {
|
|
262
|
+
id: string;
|
|
263
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
264
|
+
statement: string;
|
|
265
|
+
}>, "many">>;
|
|
266
|
+
/** The number of rules that EXECUTED. Derived from `checks`, never carried beside it. */
|
|
267
|
+
checksRun: z.ZodNumber;
|
|
268
|
+
/** What each rule cost, directly under the denominator it is the breakdown of. */
|
|
269
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
270
|
+
name: z.ZodString;
|
|
271
|
+
/** Three significant figures, so a 0.4 ms rule serializes as 0.0004 rather than a zero that reads as "not measured". */
|
|
272
|
+
durationSecs: z.ZodNumber;
|
|
273
|
+
/** Rows the statement returned. ABSENT, never 0, when the statement did not complete. */
|
|
274
|
+
rows: z.ZodOptional<z.ZodNumber>;
|
|
275
|
+
broken: z.ZodOptional<z.ZodLiteral<true>>;
|
|
276
|
+
/** Present and `true` only for a rule VAT supplied â see {@link CheckCost.builtin}. */
|
|
277
|
+
builtin: z.ZodOptional<z.ZodLiteral<true>>;
|
|
278
|
+
}, "strict", z.ZodTypeAny, {
|
|
279
|
+
name: string;
|
|
280
|
+
durationSecs: number;
|
|
281
|
+
rows?: number | undefined;
|
|
282
|
+
broken?: true | undefined;
|
|
283
|
+
builtin?: true | undefined;
|
|
284
|
+
}, {
|
|
285
|
+
name: string;
|
|
286
|
+
durationSecs: number;
|
|
287
|
+
rows?: number | undefined;
|
|
288
|
+
broken?: true | undefined;
|
|
289
|
+
builtin?: true | undefined;
|
|
290
|
+
}>, "many">;
|
|
291
|
+
}, "strict", z.ZodTypeAny, {
|
|
292
|
+
root: string;
|
|
293
|
+
population: "derived" | "store";
|
|
294
|
+
lensesEvaluated: string[];
|
|
295
|
+
populationSecs: number;
|
|
296
|
+
lensSecs: number;
|
|
297
|
+
checksRun: number;
|
|
298
|
+
checks: {
|
|
299
|
+
name: string;
|
|
300
|
+
durationSecs: number;
|
|
301
|
+
rows?: number | undefined;
|
|
302
|
+
broken?: true | undefined;
|
|
303
|
+
builtin?: true | undefined;
|
|
304
|
+
}[];
|
|
305
|
+
boundsStatement?: string | undefined;
|
|
306
|
+
limits?: {
|
|
307
|
+
id: string;
|
|
308
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
309
|
+
statement: string;
|
|
310
|
+
}[] | undefined;
|
|
311
|
+
}, {
|
|
312
|
+
root: string;
|
|
313
|
+
population: "derived" | "store";
|
|
314
|
+
lensesEvaluated: string[];
|
|
315
|
+
populationSecs: number;
|
|
316
|
+
lensSecs: number;
|
|
317
|
+
checksRun: number;
|
|
318
|
+
checks: {
|
|
319
|
+
name: string;
|
|
320
|
+
durationSecs: number;
|
|
321
|
+
rows?: number | undefined;
|
|
322
|
+
broken?: true | undefined;
|
|
323
|
+
builtin?: true | undefined;
|
|
324
|
+
}[];
|
|
325
|
+
boundsStatement?: string | undefined;
|
|
326
|
+
limits?: {
|
|
327
|
+
id: string;
|
|
328
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
329
|
+
statement: string;
|
|
330
|
+
}[] | undefined;
|
|
331
|
+
}>>;
|
|
332
|
+
export type CheckReport = Report<CheckData>;
|
|
248
333
|
/**
|
|
249
334
|
* Build the check report.
|
|
250
335
|
*
|
|
@@ -260,7 +345,7 @@ export interface CheckPayloadInput extends CheckOutcome {
|
|
|
260
345
|
* account for it cannot disagree.
|
|
261
346
|
*
|
|
262
347
|
* ðĻ `populationSecs` and the per-check `durationSecs` do not overlap and do not
|
|
263
|
-
* sum to `
|
|
348
|
+
* sum to `durationMs`. The population is paid once and shared by every check;
|
|
264
349
|
* see {@link CheckCost} for why it is charged to none of them.
|
|
265
350
|
*
|
|
266
351
|
* ð A denominator of zero is refused HERE rather than published â see
|
|
@@ -268,39 +353,54 @@ export interface CheckPayloadInput extends CheckOutcome {
|
|
|
268
353
|
* passes through, so deriving the refusal in it is what makes "checked nothing,
|
|
269
354
|
* status clean" unrepresentable rather than merely unwritten.
|
|
270
355
|
*
|
|
356
|
+
* ðŠĪ The findings are NOT run through `relativizePathEntries`. Every other
|
|
357
|
+
* payload builder re-bases here because its producer keeps absolute paths
|
|
358
|
+
* internally; these arrive project-relative instead, and re-basing an
|
|
359
|
+
* already-relative path would resolve it against the wrong base and silently
|
|
360
|
+
* corrupt it. The guarantee is `locationOf` in `sql-checks.ts` â the one place
|
|
361
|
+
* a projection column becomes a finding's `location`, and which refuses an
|
|
362
|
+
* absolute or backslashed value there. Nothing on this path parses findings
|
|
363
|
+
* through the schema at runtime, and do not "fix" that by parsing at this
|
|
364
|
+
* boundary: it would convert a slip in `locationOf` from "this finding loses
|
|
365
|
+
* its anchor" into "the whole run throws", which is strictly worse for a gate.
|
|
366
|
+
*
|
|
271
367
|
* @param input - The findings and the provenance of the run behind them
|
|
272
368
|
* @returns The document to serialize
|
|
273
369
|
*/
|
|
274
|
-
export declare function buildCheckOutputData(input: CheckPayloadInput):
|
|
370
|
+
export declare function buildCheckOutputData(input: CheckPayloadInput): CheckReport;
|
|
275
371
|
/**
|
|
276
|
-
* Refuse a `--check` name
|
|
372
|
+
* Refuse a `--check` name that names neither a built-in nor a declared check.
|
|
277
373
|
*
|
|
278
|
-
* ð **An unknown name
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
* That is not a hypothetical typo: `vat resources check --check orphan-skills`
|
|
286
|
-
* is the example in this command's own help text. Rename or delete that check
|
|
287
|
-
* and the CI step keeps passing forever while asserting nothing.
|
|
374
|
+
* ð **An unknown name is otherwise a silent green.** With nothing comparing the
|
|
375
|
+
* flag against the known names, `--check nope` filters every check away, runs
|
|
376
|
+
* none, and exits 0 with `checksRun: 0` and `issues: []` on empty stderr â and
|
|
377
|
+
* the "no checks are declared" warning does not fire, because it asks whether
|
|
378
|
+
* the `checks` MAP is empty, never whether the FILTER matched anything. Not a
|
|
379
|
+
* hypothetical typo: rename or delete a check and the CI step keeps passing
|
|
380
|
+
* forever while asserting nothing.
|
|
288
381
|
*
|
|
289
382
|
* Thrown rather than reported as a finding, because it is an OPERATOR error and
|
|
290
383
|
* not a content violation â the two have different exit codes in this command's
|
|
291
384
|
* contract (2 versus 1) and different audiences. Thrown before the projection is
|
|
292
385
|
* populated, so a mistyped flag costs no crawl.
|
|
293
386
|
*
|
|
387
|
+
* ð **A built-in is nameable here exactly like a declared one.** A guard that
|
|
388
|
+
* only knew the config would refuse the very rules that run when there is no
|
|
389
|
+
* config at all. The refusal names both sets.
|
|
390
|
+
*
|
|
391
|
+
* @param builtinNames - The default set's names â {@link BUILTIN_CHECK_NAMES} in
|
|
392
|
+
* production, and passed in rather than imported here so a test can prove the
|
|
393
|
+
* guard rather than restate the constant
|
|
294
394
|
* @param checks - The project's `resources.checks`
|
|
295
395
|
* @param only - The `--check` value, or undefined
|
|
296
|
-
* @throws When `only` names no
|
|
396
|
+
* @throws When `only` names no check this run would attempt
|
|
297
397
|
*/
|
|
298
|
-
export declare function
|
|
398
|
+
export declare function requireKnownCheck(builtinNames: readonly string[], checks: Readonly<Record<string, ResourceCheck>>, only: string | undefined): void;
|
|
299
399
|
/**
|
|
300
400
|
* Name every `CUSTOM:` severity override that overrides nothing.
|
|
301
401
|
*
|
|
302
402
|
* ð **The same silent-green shape as an unknown `--check` name, one surface
|
|
303
|
-
* over.** {@link
|
|
403
|
+
* over.** {@link requireKnownCheck} refuses `--check nope` because a filter
|
|
304
404
|
* that matched nothing ran nothing and exited 0. A `validation.severity` entry
|
|
305
405
|
* keyed `CUSTOM:<name>` for a check that is not declared is the mirror image: it
|
|
306
406
|
* parses (the schema validates the KEY's shape and cannot see
|
|
@@ -386,7 +486,7 @@ export declare const NODE_FATAL_ABORT_EXIT_CODE = 134;
|
|
|
386
486
|
* honest value â and inventing `membersEnumerated: 0` would be worse than a
|
|
387
487
|
* blank, because that value already MEANS "this gate ran over an empty corpus",
|
|
388
488
|
* which is a different and wrong claim. The throw becomes an operator error
|
|
389
|
-
* (exit 2) through the same `
|
|
489
|
+
* (exit 2) through the same `handleReportCommandError` path everything else here uses.
|
|
390
490
|
*
|
|
391
491
|
* @param options - The wreckage
|
|
392
492
|
* @param options.entries - What `parseProgressLog` recovered
|
|
@@ -403,8 +503,14 @@ export declare function buildInterruptedCheckInput(options: {
|
|
|
403
503
|
durationMs: number;
|
|
404
504
|
}): CheckPayloadInput;
|
|
405
505
|
/**
|
|
406
|
-
* Run
|
|
407
|
-
* verb's logic, with
|
|
506
|
+
* Run this project's checks â VAT's default set plus whatever the project
|
|
507
|
+
* declared â and resolve their severities: the whole of this verb's logic, with
|
|
508
|
+
* the database taken out.
|
|
509
|
+
*
|
|
510
|
+
* ð **`builtins` is a required argument beside `checks`, never a default inside
|
|
511
|
+
* this function.** That is what makes "the default set belongs to the pipeline,
|
|
512
|
+
* not to the config file" a property of the signature â nobody can get the
|
|
513
|
+
* defaults by omitting an argument or lose them by supplying no config.
|
|
408
514
|
*
|
|
409
515
|
* Exported and pure so the loop is provable without a spawn. It was not: every
|
|
410
516
|
* spawned case declared ONE check (the `--check` case declares two and filters
|
|
@@ -417,8 +523,11 @@ export declare function buildInterruptedCheckInput(options: {
|
|
|
417
523
|
* trust.
|
|
418
524
|
*
|
|
419
525
|
* @param options - The run
|
|
526
|
+
* @param options.builtins - The default set, already bound to this run's
|
|
527
|
+
* projection. Required, and `[]` is a deliberate statement rather than an
|
|
528
|
+
* omission
|
|
420
529
|
* @param options.checks - The declared checks
|
|
421
|
-
* @param options.only - A single check
|
|
530
|
+
* @param options.only - A single check name, or undefined for all
|
|
422
531
|
* @param options.ask - Runs one statement against the populated projection
|
|
423
532
|
* @param options.validation - The project's severity overrides, or undefined
|
|
424
533
|
* @param options.membersEnumerated - How many members the population enumerated.
|
|
@@ -433,7 +542,8 @@ export declare function buildInterruptedCheckInput(options: {
|
|
|
433
542
|
* unit case run with nobody watching
|
|
434
543
|
* @returns The resolved findings, and one cost record per check that ran
|
|
435
544
|
*/
|
|
436
|
-
export declare function
|
|
545
|
+
export declare function runProjectChecks(options: {
|
|
546
|
+
builtins: readonly BoundBuiltinCheck[];
|
|
437
547
|
checks: Readonly<Record<string, ResourceCheck>>;
|
|
438
548
|
only: string | undefined;
|
|
439
549
|
ask: AskProjection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/check.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAIH,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,aAAa,EACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAOL,KAAK,MAAM,EACX,KAAK,eAAe,EACrB,MAAM,4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