@vibe-agent-toolkit/cli 0.2.0-rc.1 → 0.2.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -5
- package/dist/bin/vat +97 -28
- package/dist/bin/vat.js +97 -28
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +115 -76
- package/dist/bin.js.map +1 -1
- package/dist/command-loaders.d.ts +44 -0
- package/dist/command-loaders.d.ts.map +1 -0
- package/dist/command-loaders.js +60 -0
- package/dist/command-loaders.js.map +1 -0
- package/dist/commands/agent/build.d.ts.map +1 -1
- package/dist/commands/agent/build.js +2 -1
- package/dist/commands/agent/build.js.map +1 -1
- package/dist/commands/agent/import.d.ts.map +1 -1
- package/dist/commands/agent/import.js +3 -2
- package/dist/commands/agent/import.js.map +1 -1
- package/dist/commands/agent/index.js +1 -1
- package/dist/commands/agent/install-path.d.ts +36 -0
- package/dist/commands/agent/install-path.d.ts.map +1 -0
- package/dist/commands/agent/install-path.js +44 -0
- package/dist/commands/agent/install-path.js.map +1 -0
- package/dist/commands/agent/install.d.ts.map +1 -1
- package/dist/commands/agent/install.js +66 -13
- package/dist/commands/agent/install.js.map +1 -1
- package/dist/commands/agent/installed.d.ts.map +1 -1
- package/dist/commands/agent/installed.js +22 -12
- package/dist/commands/agent/installed.js.map +1 -1
- package/dist/commands/agent/list.d.ts.map +1 -1
- package/dist/commands/agent/list.js +2 -1
- package/dist/commands/agent/list.js.map +1 -1
- package/dist/commands/agent/run.d.ts.map +1 -1
- package/dist/commands/agent/run.js +2 -1
- package/dist/commands/agent/run.js.map +1 -1
- package/dist/commands/agent/uninstall.d.ts.map +1 -1
- package/dist/commands/agent/uninstall.js +13 -6
- package/dist/commands/agent/uninstall.js.map +1 -1
- package/dist/commands/agent/validate.d.ts.map +1 -1
- package/dist/commands/agent/validate.js +3 -2
- package/dist/commands/agent/validate.js.map +1 -1
- package/dist/commands/ard/emit.d.ts +165 -0
- package/dist/commands/ard/emit.d.ts.map +1 -0
- package/dist/commands/ard/emit.js +338 -0
- package/dist/commands/ard/emit.js.map +1 -0
- package/dist/commands/ard/index.d.ts +12 -0
- package/dist/commands/ard/index.d.ts.map +1 -0
- package/dist/commands/ard/index.js +84 -0
- package/dist/commands/ard/index.js.map +1 -0
- package/dist/commands/ard/surfaces.d.ts +56 -0
- package/dist/commands/ard/surfaces.d.ts.map +1 -0
- package/dist/commands/ard/surfaces.js +150 -0
- package/dist/commands/ard/surfaces.js.map +1 -0
- package/dist/commands/audit/distributed-tree.d.ts +2 -2
- package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
- package/dist/commands/audit/distributed-tree.js +11 -7
- package/dist/commands/audit/distributed-tree.js.map +1 -1
- package/dist/commands/audit/git-url-clone.d.ts +1 -1
- package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
- package/dist/commands/audit/git-url-clone.js.map +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
- package/dist/commands/audit/hierarchical-output.js +1 -1
- package/dist/commands/audit/hierarchical-output.js.map +1 -1
- package/dist/commands/audit/provenance.d.ts.map +1 -1
- package/dist/commands/audit/provenance.js +4 -3
- package/dist/commands/audit/provenance.js.map +1 -1
- package/dist/commands/audit/scan-population.d.ts +158 -0
- package/dist/commands/audit/scan-population.d.ts.map +1 -0
- package/dist/commands/audit/scan-population.js +292 -0
- package/dist/commands/audit/scan-population.js.map +1 -0
- package/dist/commands/audit-settings.d.ts.map +1 -1
- package/dist/commands/audit-settings.js +6 -5
- package/dist/commands/audit-settings.js.map +1 -1
- package/dist/commands/audit.d.ts +98 -8
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +1150 -394
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +40 -36
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cache/cache-control.d.ts +82 -0
- package/dist/commands/cache/cache-control.d.ts.map +1 -0
- package/dist/commands/cache/cache-control.js +86 -0
- package/dist/commands/cache/cache-control.js.map +1 -0
- package/dist/commands/cache/clear.d.ts +34 -6
- package/dist/commands/cache/clear.d.ts.map +1 -1
- package/dist/commands/cache/clear.js +101 -15
- package/dist/commands/cache/clear.js.map +1 -1
- package/dist/commands/cache/index.d.ts +13 -63
- package/dist/commands/cache/index.d.ts.map +1 -1
- package/dist/commands/cache/index.js +47 -79
- package/dist/commands/cache/index.js.map +1 -1
- package/dist/commands/claude/claude-config.d.ts.map +1 -1
- package/dist/commands/claude/claude-config.js +6 -0
- package/dist/commands/claude/claude-config.js.map +1 -1
- package/dist/commands/claude/context.d.ts +372 -0
- package/dist/commands/claude/context.d.ts.map +1 -0
- package/dist/commands/claude/context.js +1115 -0
- package/dist/commands/claude/context.js.map +1 -0
- package/dist/commands/claude/index.d.ts +14 -0
- package/dist/commands/claude/index.d.ts.map +1 -1
- package/dist/commands/claude/index.js +22 -2
- package/dist/commands/claude/index.js.map +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.d.ts +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.js +1 -2
- package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.js +40 -31
- package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.js +0 -1
- package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish-tree.js +0 -6
- package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
- package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish.js +2 -1
- package/dist/commands/claude/marketplace/publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate.d.ts +73 -22
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +407 -72
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/org/api-keys.d.ts +0 -3
- package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
- package/dist/commands/claude/org/api-keys.js +2 -1
- package/dist/commands/claude/org/api-keys.js.map +1 -1
- package/dist/commands/claude/org/helpers.d.ts +54 -1
- package/dist/commands/claude/org/helpers.d.ts.map +1 -1
- package/dist/commands/claude/org/helpers.js +42 -7
- package/dist/commands/claude/org/helpers.js.map +1 -1
- package/dist/commands/claude/org/index.d.ts.map +1 -1
- package/dist/commands/claude/org/index.js +24 -16
- package/dist/commands/claude/org/index.js.map +1 -1
- package/dist/commands/claude/org/invites.d.ts +0 -3
- package/dist/commands/claude/org/invites.d.ts.map +1 -1
- package/dist/commands/claude/org/invites.js +3 -2
- package/dist/commands/claude/org/invites.js.map +1 -1
- package/dist/commands/claude/org/skills.d.ts +527 -0
- package/dist/commands/claude/org/skills.d.ts.map +1 -1
- package/dist/commands/claude/org/skills.js +1414 -108
- package/dist/commands/claude/org/skills.js.map +1 -1
- package/dist/commands/claude/org/users.d.ts +0 -3
- package/dist/commands/claude/org/users.d.ts.map +1 -1
- package/dist/commands/claude/org/users.js +6 -3
- package/dist/commands/claude/org/users.js.map +1 -1
- package/dist/commands/claude/org/workspaces.d.ts +0 -3
- package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
- package/dist/commands/claude/org/workspaces.js +11 -7
- package/dist/commands/claude/org/workspaces.js.map +1 -1
- package/dist/commands/claude/plugin/build.d.ts +41 -3
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +147 -80
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
- package/dist/commands/claude/plugin/helpers.js +2 -7
- package/dist/commands/claude/plugin/helpers.js.map +1 -1
- package/dist/commands/claude/plugin/install.d.ts +12 -0
- package/dist/commands/claude/plugin/install.d.ts.map +1 -1
- package/dist/commands/claude/plugin/install.js +93 -62
- package/dist/commands/claude/plugin/install.js.map +1 -1
- package/dist/commands/claude/plugin/list.d.ts.map +1 -1
- package/dist/commands/claude/plugin/list.js +3 -2
- package/dist/commands/claude/plugin/list.js.map +1 -1
- package/dist/commands/claude/plugin/marketplace-json.d.ts +24 -9
- package/dist/commands/claude/plugin/marketplace-json.d.ts.map +1 -1
- package/dist/commands/claude/plugin/marketplace-json.js +10 -9
- package/dist/commands/claude/plugin/marketplace-json.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-changelog.js +0 -2
- package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.js +3 -6
- package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.js +3 -6
- package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts +73 -0
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +221 -14
- package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
- package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
- package/dist/commands/claude/plugin/uninstall.js +4 -4
- package/dist/commands/claude/plugin/uninstall.js.map +1 -1
- package/dist/commands/consistency-check.d.ts +17 -15
- package/dist/commands/consistency-check.d.ts.map +1 -1
- package/dist/commands/consistency-check.js +152 -106
- package/dist/commands/consistency-check.js.map +1 -1
- package/dist/commands/corpus/index.d.ts.map +1 -1
- package/dist/commands/corpus/index.js +3 -0
- package/dist/commands/corpus/index.js.map +1 -1
- package/dist/commands/corpus/report.d.ts +1 -2
- package/dist/commands/corpus/report.d.ts.map +1 -1
- package/dist/commands/corpus/report.js +1 -3
- package/dist/commands/corpus/report.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts +58 -1
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +95 -41
- package/dist/commands/corpus/runner.js.map +1 -1
- package/dist/commands/corpus/scan.d.ts.map +1 -1
- package/dist/commands/corpus/scan.js +20 -12
- package/dist/commands/corpus/scan.js.map +1 -1
- package/dist/commands/corpus/seed.d.ts +4 -4
- package/dist/commands/corpus/seed.d.ts.map +1 -1
- package/dist/commands/corpus/seed.js +1 -3
- package/dist/commands/corpus/seed.js.map +1 -1
- package/dist/commands/doctor.d.ts +50 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +245 -52
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/inventory.d.ts +13 -1
- package/dist/commands/inventory.d.ts.map +1 -1
- package/dist/commands/inventory.js +121 -17
- package/dist/commands/inventory.js.map +1 -1
- package/dist/commands/mcp/collections.d.ts +1 -1
- package/dist/commands/mcp/collections.d.ts.map +1 -1
- package/dist/commands/mcp/list-collections.d.ts.map +1 -1
- package/dist/commands/mcp/list-collections.js +2 -1
- package/dist/commands/mcp/list-collections.js.map +1 -1
- package/dist/commands/mcp/serve.d.ts.map +1 -1
- package/dist/commands/mcp/serve.js +3 -2
- package/dist/commands/mcp/serve.js.map +1 -1
- package/dist/commands/okf/index.d.ts +11 -0
- package/dist/commands/okf/index.d.ts.map +1 -0
- package/dist/commands/okf/index.js +116 -0
- package/dist/commands/okf/index.js.map +1 -0
- package/dist/commands/okf/validate.d.ts +195 -0
- package/dist/commands/okf/validate.d.ts.map +1 -0
- package/dist/commands/okf/validate.js +199 -0
- package/dist/commands/okf/validate.js.map +1 -0
- package/dist/commands/phase-utils.d.ts +182 -114
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +154 -163
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/positional-args.d.ts.map +1 -1
- package/dist/commands/positional-args.js +3 -2
- package/dist/commands/positional-args.js.map +1 -1
- package/dist/commands/rag/clear-command.d.ts.map +1 -1
- package/dist/commands/rag/clear-command.js +2 -1
- package/dist/commands/rag/clear-command.js.map +1 -1
- package/dist/commands/rag/index-command.d.ts +64 -0
- package/dist/commands/rag/index-command.d.ts.map +1 -1
- package/dist/commands/rag/index-command.js +72 -6
- package/dist/commands/rag/index-command.js.map +1 -1
- package/dist/commands/rag/index.d.ts.map +1 -1
- package/dist/commands/rag/index.js +23 -10
- package/dist/commands/rag/index.js.map +1 -1
- package/dist/commands/rag/query-command.d.ts.map +1 -1
- package/dist/commands/rag/query-command.js +2 -1
- package/dist/commands/rag/query-command.js.map +1 -1
- package/dist/commands/rag/stats-command.d.ts.map +1 -1
- package/dist/commands/rag/stats-command.js +2 -1
- package/dist/commands/rag/stats-command.js.map +1 -1
- package/dist/commands/resources/builtin-help.d.ts +27 -0
- package/dist/commands/resources/builtin-help.d.ts.map +1 -0
- package/dist/commands/resources/builtin-help.js +46 -0
- package/dist/commands/resources/builtin-help.js.map +1 -0
- package/dist/commands/resources/check-progress.d.ts +167 -0
- package/dist/commands/resources/check-progress.d.ts.map +1 -0
- package/dist/commands/resources/check-progress.js +250 -0
- package/dist/commands/resources/check-progress.js.map +1 -0
- package/dist/commands/resources/check-supervisor.d.ts +479 -0
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -0
- package/dist/commands/resources/check-supervisor.js +587 -0
- package/dist/commands/resources/check-supervisor.js.map +1 -0
- package/dist/commands/resources/check.d.ts +620 -0
- package/dist/commands/resources/check.d.ts.map +1 -0
- package/dist/commands/resources/check.js +1452 -0
- package/dist/commands/resources/check.js.map +1 -0
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +430 -4
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/query.d.ts +106 -0
- package/dist/commands/resources/query.d.ts.map +1 -0
- package/dist/commands/resources/query.js +177 -0
- package/dist/commands/resources/query.js.map +1 -0
- package/dist/commands/resources/scan.d.ts +24 -0
- package/dist/commands/resources/scan.d.ts.map +1 -1
- package/dist/commands/resources/scan.js +17 -8
- package/dist/commands/resources/scan.js.map +1 -1
- package/dist/commands/resources/validate.d.ts +42 -2
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +208 -55
- package/dist/commands/resources/validate.js.map +1 -1
- package/dist/commands/skill/review-checklist.d.ts +3 -2
- package/dist/commands/skill/review-checklist.d.ts.map +1 -1
- package/dist/commands/skill/review-checklist.js +40 -2
- package/dist/commands/skill/review-checklist.js.map +1 -1
- package/dist/commands/skill/review.d.ts +247 -0
- package/dist/commands/skill/review.d.ts.map +1 -1
- package/dist/commands/skill/review.js +100 -62
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/configure.d.ts +56 -0
- package/dist/commands/skill/test/configure.d.ts.map +1 -1
- package/dist/commands/skill/test/configure.js +75 -16
- package/dist/commands/skill/test/configure.js.map +1 -1
- package/dist/commands/skill/test/run.d.ts +63 -10
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +258 -77
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build.d.ts +94 -4
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +325 -97
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/install.d.ts +2 -1
- package/dist/commands/skills/install.d.ts.map +1 -1
- package/dist/commands/skills/install.js +20 -31
- package/dist/commands/skills/install.js.map +1 -1
- package/dist/commands/skills/list.d.ts +2 -1
- package/dist/commands/skills/list.d.ts.map +1 -1
- package/dist/commands/skills/list.js +44 -26
- package/dist/commands/skills/list.js.map +1 -1
- package/dist/commands/skills/package.d.ts +1 -1
- package/dist/commands/skills/package.d.ts.map +1 -1
- package/dist/commands/skills/package.js +6 -8
- package/dist/commands/skills/package.js.map +1 -1
- package/dist/commands/skills/scope-guard.d.ts.map +1 -1
- package/dist/commands/skills/scope-guard.js +8 -6
- package/dist/commands/skills/scope-guard.js.map +1 -1
- package/dist/commands/skills/shared.d.ts.map +1 -1
- package/dist/commands/skills/shared.js +2 -4
- package/dist/commands/skills/shared.js.map +1 -1
- package/dist/commands/skills/skill-discovery.d.ts +47 -6
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +61 -11
- package/dist/commands/skills/skill-discovery.js.map +1 -1
- package/dist/commands/skills/source-resolvers.d.ts +15 -0
- package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
- package/dist/commands/skills/source-resolvers.js +25 -4
- package/dist/commands/skills/source-resolvers.js.map +1 -1
- package/dist/commands/skills/validate-command.d.ts.map +1 -1
- package/dist/commands/skills/validate-command.js +11 -3
- package/dist/commands/skills/validate-command.js.map +1 -1
- package/dist/commands/skills/validate.d.ts +140 -4
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +224 -67
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +63 -27
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +119 -15
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +357 -142
- package/dist/commands/verify.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/report-schemas.d.ts +45 -0
- package/dist/report-schemas.d.ts.map +1 -0
- package/dist/report-schemas.js +100 -0
- package/dist/report-schemas.js.map +1 -0
- package/dist/skill-resolution/classify.js +2 -2
- package/dist/skill-resolution/classify.js.map +1 -1
- package/dist/skill-resolution/packaging-config.d.ts +49 -5
- package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
- package/dist/skill-resolution/packaging-config.js +59 -19
- package/dist/skill-resolution/packaging-config.js.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.js +55 -57
- package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
- package/dist/utils/agent-discovery.d.ts.map +1 -1
- package/dist/utils/agent-discovery.js +22 -11
- package/dist/utils/agent-discovery.js.map +1 -1
- package/dist/utils/agent-runner.d.ts.map +1 -1
- package/dist/utils/agent-runner.js +7 -4
- package/dist/utils/agent-runner.js.map +1 -1
- package/dist/utils/claude-context-lens.d.ts +34 -0
- package/dist/utils/claude-context-lens.d.ts.map +1 -0
- package/dist/utils/claude-context-lens.js +39 -0
- package/dist/utils/claude-context-lens.js.map +1 -0
- package/dist/utils/command-error.d.ts +143 -20
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +179 -36
- package/dist/utils/command-error.js.map +1 -1
- package/dist/utils/config-loader.d.ts +2 -1
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js +40 -14
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/corpus-target.d.ts +26 -0
- package/dist/utils/corpus-target.d.ts.map +1 -0
- package/dist/utils/corpus-target.js +72 -0
- package/dist/utils/corpus-target.js.map +1 -0
- package/dist/utils/edge-lens-evaluation.d.ts +83 -0
- package/dist/utils/edge-lens-evaluation.d.ts.map +1 -0
- package/dist/utils/edge-lens-evaluation.js +110 -0
- package/dist/utils/edge-lens-evaluation.js.map +1 -0
- package/dist/utils/help-loader.d.ts.map +1 -1
- package/dist/utils/help-loader.js +0 -1
- package/dist/utils/help-loader.js.map +1 -1
- package/dist/utils/issue-anchor.d.ts +2 -2
- package/dist/utils/issue-anchor.d.ts.map +1 -1
- package/dist/utils/issue-anchor.js +1 -1
- package/dist/utils/issue-rendering.d.ts +3 -3
- package/dist/utils/issue-rendering.d.ts.map +1 -1
- package/dist/utils/issue-rendering.js +3 -3
- package/dist/utils/issue-rendering.js.map +1 -1
- package/dist/utils/issue-severity.d.ts +12 -5
- package/dist/utils/issue-severity.d.ts.map +1 -1
- package/dist/utils/issue-severity.js +1 -1
- package/dist/utils/issue-severity.js.map +1 -1
- package/dist/utils/optional-backend.d.ts +78 -0
- package/dist/utils/optional-backend.d.ts.map +1 -0
- package/dist/utils/optional-backend.js +117 -0
- package/dist/utils/optional-backend.js.map +1 -0
- package/dist/utils/output.d.ts +26 -0
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +35 -0
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/package-json.d.ts +24 -0
- package/dist/utils/package-json.d.ts.map +1 -0
- package/dist/utils/package-json.js +49 -0
- package/dist/utils/package-json.js.map +1 -0
- package/dist/utils/population-wiring.d.ts +100 -0
- package/dist/utils/population-wiring.d.ts.map +1 -0
- package/dist/utils/population-wiring.js +98 -0
- package/dist/utils/population-wiring.js.map +1 -0
- package/dist/utils/project-root-policy.d.ts +20 -0
- package/dist/utils/project-root-policy.d.ts.map +1 -1
- package/dist/utils/project-root-policy.js +30 -0
- package/dist/utils/project-root-policy.js.map +1 -1
- package/dist/utils/projection-lenses.d.ts +98 -0
- package/dist/utils/projection-lenses.d.ts.map +1 -0
- package/dist/utils/projection-lenses.js +203 -0
- package/dist/utils/projection-lenses.js.map +1 -0
- package/dist/utils/projection-query.d.ts +324 -0
- package/dist/utils/projection-query.d.ts.map +1 -0
- package/dist/utils/projection-query.js +357 -0
- package/dist/utils/projection-query.js.map +1 -0
- package/dist/utils/projection-store.d.ts +335 -0
- package/dist/utils/projection-store.d.ts.map +1 -0
- package/dist/utils/projection-store.js +522 -0
- package/dist/utils/projection-store.js.map +1 -0
- package/dist/utils/relation-limits.d.ts +50 -0
- package/dist/utils/relation-limits.d.ts.map +1 -0
- package/dist/utils/relation-limits.js +50 -0
- package/dist/utils/relation-limits.js.map +1 -0
- package/dist/utils/repeatable-option.d.ts +37 -0
- package/dist/utils/repeatable-option.d.ts.map +1 -0
- package/dist/utils/repeatable-option.js +39 -0
- package/dist/utils/repeatable-option.js.map +1 -0
- package/dist/utils/resource-loader.d.ts +134 -2
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +290 -27
- package/dist/utils/resource-loader.js.map +1 -1
- package/dist/utils/root-argv.d.ts +53 -0
- package/dist/utils/root-argv.d.ts.map +1 -0
- package/dist/utils/root-argv.js +215 -0
- package/dist/utils/root-argv.js.map +1 -0
- package/dist/utils/run-integrity.d.ts +95 -0
- package/dist/utils/run-integrity.d.ts.map +1 -0
- package/dist/utils/run-integrity.js +102 -0
- package/dist/utils/run-integrity.js.map +1 -0
- package/dist/utils/skill-discovery.d.ts.map +1 -1
- package/dist/utils/skill-discovery.js +2 -1
- package/dist/utils/skill-discovery.js.map +1 -1
- package/dist/utils/skill-packaging-config.d.ts +63 -1
- package/dist/utils/skill-packaging-config.d.ts.map +1 -1
- package/dist/utils/skill-packaging-config.js +56 -1
- package/dist/utils/skill-packaging-config.js.map +1 -1
- package/dist/utils/sqlite-experimental-warning.d.ts +69 -0
- package/dist/utils/sqlite-experimental-warning.d.ts.map +1 -0
- package/dist/utils/sqlite-experimental-warning.js +144 -0
- package/dist/utils/sqlite-experimental-warning.js.map +1 -0
- package/dist/utils/url-redact.d.ts.map +1 -1
- package/dist/utils/url-redact.js +4 -6
- package/dist/utils/url-redact.js.map +1 -1
- package/dist/utils/user-context-scanner.d.ts +8 -0
- package/dist/utils/user-context-scanner.d.ts.map +1 -1
- package/dist/utils/user-context-scanner.js +4 -2
- package/dist/utils/user-context-scanner.js.map +1 -1
- package/dist/utils/validate-help-files.d.ts.map +1 -1
- package/dist/utils/validate-help-files.js +12 -6
- package/dist/utils/validate-help-files.js.map +1 -1
- package/dist/utils/vat-bin-path.d.ts +36 -0
- package/dist/utils/vat-bin-path.d.ts.map +1 -0
- package/dist/utils/vat-bin-path.js +48 -0
- package/dist/utils/vat-bin-path.js.map +1 -0
- package/dist/utils/verdict-helpers.d.ts +1 -1
- package/dist/utils/verdict-helpers.d.ts.map +1 -1
- package/dist/utils/verdict-helpers.js +1 -1
- package/dist/utils/verdict-helpers.js.map +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -3
- package/dist/version.js.map +1 -1
- package/docs/agent.md +2 -2
- package/docs/audit.md +143 -39
- package/docs/doctor.md +7 -6
- package/docs/index.md +19 -11
- package/docs/mcp.md +2 -2
- package/docs/rag.md +3 -2
- package/docs/resources.md +13 -3
- package/docs/skill-test.md +10 -9
- package/docs/skills.md +53 -69
- package/package.json +36 -27
- package/schemas/ard-emit.json +152 -0
- package/schemas/okf-validate.json +170 -0
- package/schemas/resources-check.json +257 -0
- package/schemas/skill-review.json +230 -0
- package/dist/commands/resources/command-helpers.d.ts +0 -5
- package/dist/commands/resources/command-helpers.d.ts.map +0 -1
- package/dist/commands/resources/command-helpers.js +0 -6
- package/dist/commands/resources/command-helpers.js.map +0 -1
|
@@ -1,12 +1,54 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared utilities for top-level phase orchestration commands (vat build, vat verify, vat validate).
|
|
3
3
|
*/
|
|
4
|
-
import { type SeverityCounts } from '@vibe-agent-toolkit/
|
|
4
|
+
import { type ExitCodeValue, type SeverityCounts } from '@vibe-agent-toolkit/schema';
|
|
5
5
|
import { type Command } from 'commander';
|
|
6
6
|
import { createLogger } from '../utils/logger.js';
|
|
7
|
+
/**
|
|
8
|
+
* What one phase produced: the document it publishes, and the exit code it
|
|
9
|
+
* claims for itself.
|
|
10
|
+
*
|
|
11
|
+
* This pair is the whole of what an orchestrator needs from a phase: an exit
|
|
12
|
+
* code, and the document the phase publishes. Naming it as a value is what lets
|
|
13
|
+
* a phase run in the orchestrator's own process — stderr streams directly either
|
|
14
|
+
* way, so nothing else has to cross.
|
|
15
|
+
*
|
|
16
|
+
* `document` is the object the phase PRINTS, not the internal summary it is
|
|
17
|
+
* built from. The distinction is load-bearing: `vat skills build` renders its
|
|
18
|
+
* summary in two pieces and publishes `skillsWithErrors` as a COUNT while the
|
|
19
|
+
* summary object holds an ARRAY under that name.
|
|
20
|
+
*
|
|
21
|
+
* ⚠️ This field is `unknown`, so nothing typechecks it. Handing back the summary
|
|
22
|
+
* object instead of the printed document changes the emitted contract silently.
|
|
23
|
+
*/
|
|
24
|
+
export interface PhaseOutcome {
|
|
25
|
+
document: unknown;
|
|
26
|
+
exitCode: ExitCodeValue;
|
|
27
|
+
/**
|
|
28
|
+
* The phase failed UNEXPECTEDLY, so `document` is the shared error envelope
|
|
29
|
+
* (`{status, error, duration}`) rather than the command's own report.
|
|
30
|
+
*
|
|
31
|
+
* The orchestrated lane does not need this — it folds any document under
|
|
32
|
+
* `phases[].report` the same way. The command-line lane does: each command
|
|
33
|
+
* renders its own report with its own renderer (streamed YAML, `--format
|
|
34
|
+
* json`, a hand-built header), and none of those renderers understand an
|
|
35
|
+
* envelope. Handing one to them silently changes both the channel and the
|
|
36
|
+
* shape of the failure document every `vat … | jq` consumer depends on.
|
|
37
|
+
*/
|
|
38
|
+
failed?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* One orchestrated phase: a name, and the work to run for it.
|
|
42
|
+
*
|
|
43
|
+
* `run` is a bound closure rather than an argv array because the phase executes
|
|
44
|
+
* in this process. An argv array would mean re-entering Commander to
|
|
45
|
+
* parse arguments this process has already parsed — a second, weaker copy of the
|
|
46
|
+
* orchestrator's own options, and the exact seam through which `vat validate`'s
|
|
47
|
+
* `--verbose` could be forwarded to one phase and dropped by another.
|
|
48
|
+
*/
|
|
7
49
|
export interface Phase {
|
|
8
50
|
name: string;
|
|
9
|
-
|
|
51
|
+
run: () => Promise<PhaseOutcome>;
|
|
10
52
|
}
|
|
11
53
|
/**
|
|
12
54
|
* Declare `--only` on a command that has RETIRED it, solely so the command can
|
|
@@ -44,16 +86,18 @@ export declare function rejectRetiredOnly(only: string | undefined, command: str
|
|
|
44
86
|
* Outcome of one orchestrated phase.
|
|
45
87
|
*
|
|
46
88
|
* `system-error` is a value of its own because **a phase that could not RUN is
|
|
47
|
-
* not a phase that found problems.**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
89
|
+
* not a phase that found problems.**
|
|
90
|
+
*
|
|
91
|
+
* ⚠️ Any two-valued mapping — `status === 0 ? 'passed' : 'failed'` and its
|
|
92
|
+
* relatives — collapses it into `error` and makes the documented exit code 2
|
|
93
|
+
* unreachable from every orchestrator, leaving a CI script unable to tell an
|
|
94
|
+
* invalid config from a broken link.
|
|
95
|
+
*
|
|
96
|
+
* `warning` reaches a phase through its own reported `status`, NOT through its
|
|
97
|
+
* exit code — `vat skills validate` exits 0 while reporting `status: warning`,
|
|
98
|
+
* so an exit-code-only mapping answered `success` on the very tree where the
|
|
99
|
+
* phase said otherwise. Phases that hold their own findings (e.g. verify's
|
|
100
|
+
* consistency check) emit it directly.
|
|
57
101
|
*/
|
|
58
102
|
export type PhaseStatus = 'success' | 'warning' | 'error' | 'system-error';
|
|
59
103
|
/** The phase outcome for "we did not learn what this phase would have said". */
|
|
@@ -61,58 +105,44 @@ export declare const SYSTEM_ERROR: PhaseStatus;
|
|
|
61
105
|
export interface PhaseResult {
|
|
62
106
|
name: string;
|
|
63
107
|
status: PhaseStatus;
|
|
64
|
-
/**
|
|
65
|
-
exitCode?:
|
|
66
|
-
/**
|
|
67
|
-
signal?: string;
|
|
68
|
-
/** Why the phase could not run at all (the spawn itself failed). */
|
|
108
|
+
/** The exit code the phase claimed for itself. */
|
|
109
|
+
exitCode?: ExitCodeValue;
|
|
110
|
+
/** Why the phase could not run at all (it threw past its own error handling). */
|
|
69
111
|
error?: string;
|
|
70
112
|
/**
|
|
71
|
-
* Per-severity distribution for
|
|
72
|
-
*
|
|
73
|
-
* and inventing counts here would be a second,
|
|
74
|
-
* are carried verbatim in {@link PhaseResult.report}
|
|
113
|
+
* Per-severity distribution for phases that hold their own findings and
|
|
114
|
+
* publish no document of their own. Absent for phases that DO publish one:
|
|
115
|
+
* those own their findings, and inventing counts here would be a second,
|
|
116
|
+
* weaker answer — theirs are carried verbatim in {@link PhaseResult.report}.
|
|
75
117
|
*/
|
|
76
118
|
issueCounts?: SeverityCounts;
|
|
77
119
|
/**
|
|
78
|
-
* The
|
|
120
|
+
* The phase's own document, folded in under its name.
|
|
121
|
+
*
|
|
122
|
+
* Nested under the phase's own entry so the orchestrator's stdout stays ONE
|
|
123
|
+
* parseable document.
|
|
79
124
|
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* document under its own phase makes the parent's stdout one parseable
|
|
85
|
-
* document again and loses nothing.
|
|
125
|
+
* ⚠️ Phase documents written onto a shared stdout concatenate with no `---`
|
|
126
|
+
* between them: two phases each carrying `status:` and `durationSecs:` become
|
|
127
|
+
* a single map with duplicate keys, and `YAML.parse()` throws "Map keys must
|
|
128
|
+
* be unique".
|
|
86
129
|
*/
|
|
87
130
|
report?: unknown;
|
|
88
131
|
}
|
|
89
|
-
/** The subset of a `spawnSync` return that decides a phase's outcome. */
|
|
90
|
-
export interface PhaseSpawnOutcome {
|
|
91
|
-
status: number | null;
|
|
92
|
-
signal: NodeJS.Signals | null;
|
|
93
|
-
error?: Error | undefined;
|
|
94
|
-
/** The child's captured stdout, when it was piped rather than inherited. */
|
|
95
|
-
stdout?: string | null | undefined;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Resolve the absolute path to the vat binary.
|
|
99
|
-
* This file lives in commands/, one level above bin/.
|
|
100
|
-
*/
|
|
101
|
-
export declare function resolveBinPath(): string;
|
|
102
132
|
export interface PhaseContext {
|
|
103
133
|
logger: ReturnType<typeof createLogger>;
|
|
104
134
|
startTime: number;
|
|
105
|
-
binPath: string;
|
|
106
135
|
}
|
|
107
136
|
/**
|
|
108
137
|
* Create the shared phase command context: logger, startTime, and bin path.
|
|
109
138
|
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
139
|
+
* Total by design: it builds the context and decides nothing.
|
|
140
|
+
*
|
|
141
|
+
* ⚠️ This runs BEFORE the command's try block, so anything that throws here
|
|
142
|
+
* reaches the user as a raw Node stack trace with zero bytes of stdout and an
|
|
143
|
+
* exit 1 indistinguishable from "validation errors". Phase routing therefore
|
|
144
|
+
* belongs to {@link decidePhaseSelection} and {@link applyPhaseSelection}, which
|
|
145
|
+
* emit the command's normal structured document.
|
|
116
146
|
*/
|
|
117
147
|
export declare function createPhaseContext(debugFlag: boolean | undefined): PhaseContext;
|
|
118
148
|
/**
|
|
@@ -156,30 +186,26 @@ export interface PhaseVocabulary {
|
|
|
156
186
|
* Decide what an orchestrator should do with its `--only` value and the phase
|
|
157
187
|
* list its config produced.
|
|
158
188
|
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
* `vat verify --only consistency` against an unparseable config answered the
|
|
171
|
-
* confidently-wrong "no skills: block" instead of reporting the config error.
|
|
172
|
-
* `--only` is gone from verify, `emptyIsValid` went with it, and that ordering
|
|
173
|
-
* hazard cannot recur: nothing short-circuits ahead of the config-error arm.
|
|
189
|
+
* THE single decision site for all three orchestrators, so they cannot answer
|
|
190
|
+
* the same question differently. An orchestrator that builds its phase list
|
|
191
|
+
* without consulting the config exits 0 on `--only skills` in a project with no
|
|
192
|
+
* `skills:` block while another exits 1 — opposite verdicts on one question.
|
|
193
|
+
* `vat verify` has retired `--only` and always passes `only: undefined`;
|
|
194
|
+
* `vat validate` and `vat build` route their own `--only` through here.
|
|
195
|
+
*
|
|
196
|
+
* ⚠️ **Nothing may short-circuit ahead of the config-error arm.** A check
|
|
197
|
+
* evaluated before `unreadableConfig` answers a confident "not configured" for a
|
|
198
|
+
* tree whose config could not be parsed — which is the one answer this function
|
|
199
|
+
* must never give, because it is indistinguishable from a correct one.
|
|
174
200
|
*
|
|
175
201
|
* @param unreadableConfig - The config-load error, when the config exists but
|
|
176
202
|
* could not be parsed. A broken config is NOT "the phase is unconfigured":
|
|
177
203
|
* we do not know what it declares, so we must not answer with a confident
|
|
178
204
|
* "not configured". Only `vat verify` passes it, and only defensively — its
|
|
179
|
-
* phase builder pushes every
|
|
180
|
-
* (so the
|
|
181
|
-
* this arm unreachable by construction today. It is kept because the arm
|
|
182
|
-
* would otherwise catch an empty list is the "not configured" lie.
|
|
205
|
+
* phase builder pushes every configured phase when the config is unreadable
|
|
206
|
+
* (so the phase itself reports the real error), which makes the list non-empty
|
|
207
|
+
* and this arm unreachable by construction today. It is kept because the arm
|
|
208
|
+
* that would otherwise catch an empty list is the "not configured" lie.
|
|
183
209
|
*/
|
|
184
210
|
export declare function decidePhaseSelection(only: string | undefined, phases: Phase[], vocab: PhaseVocabulary, options?: {
|
|
185
211
|
unreadableConfig?: string | undefined;
|
|
@@ -188,46 +214,88 @@ export declare function decidePhaseSelection(only: string | undefined, phases: P
|
|
|
188
214
|
* Act on a {@link PhaseSelection}: return the phases to run, or emit the
|
|
189
215
|
* command's normal structured document and exit.
|
|
190
216
|
*
|
|
191
|
-
* Both terminal arms go through `writeYamlOutput` deliberately
|
|
192
|
-
*
|
|
193
|
-
*
|
|
217
|
+
* Both terminal arms go through `writeYamlOutput` deliberately: the YAML
|
|
218
|
+
* document on stdout is the one output a scripted caller parses, so a routing
|
|
219
|
+
* failure has to publish one rather than throw past it.
|
|
194
220
|
*/
|
|
195
221
|
export declare function applyPhaseSelection(selection: PhaseSelection, logger: ReturnType<typeof createLogger>, startTime: number): Phase[];
|
|
196
222
|
/** The worse of two phase statuses, per {@link PHASE_STATUS_ORDER}. */
|
|
197
223
|
export declare function worseOf(a: PhaseStatus, b: PhaseStatus): PhaseStatus;
|
|
198
224
|
/**
|
|
199
|
-
* Map a
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
* |
|
|
205
|
-
*
|
|
206
|
-
* | `
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
* The
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
225
|
+
* Map what a phase produced to its outcome. The pure core of {@link runPhase}.
|
|
226
|
+
*
|
|
227
|
+
* | exit code | phase status | why |
|
|
228
|
+
* |-----------------------|----------------|-----------------------------------------|
|
|
229
|
+
* | `OK` (0) | `success` | ran, found nothing actionable |
|
|
230
|
+
* | `FINDINGS` (1) | `error` | ran, found validation errors |
|
|
231
|
+
* | `ERROR` (2) | `system-error` | the phase itself reported a system error |
|
|
232
|
+
* | anything else | throws | a defect in the phase, filed by `runPhase` as `system-error` |
|
|
233
|
+
*
|
|
234
|
+
* The exit code is then reconciled with the phase's OWN reported `status`,
|
|
235
|
+
* worst-wins. An exit code has three values and cannot express `warning`:
|
|
236
|
+
* `vat skills validate` exits 0 while reporting `status: warning`, so its exit
|
|
237
|
+
* code alone reads as `success` — including on the tree VAT's CI dogfoods on
|
|
238
|
+
* VAT itself.
|
|
239
|
+
*
|
|
240
|
+
* The table has no row for a signal kill, a missing status code, or a document
|
|
241
|
+
* that fails to parse, and that is the design rather than an omission. A phase
|
|
242
|
+
* runs in this process: there is no serialization step in which to lose a
|
|
243
|
+
* document, and no signal that could take a phase without taking the
|
|
244
|
+
* orchestrator with it.
|
|
245
|
+
*/
|
|
246
|
+
export declare function phaseResultFromOutcome(name: string, outcome: PhaseOutcome): PhaseResult;
|
|
247
|
+
/**
|
|
248
|
+
* End a command-line run from a phase outcome: publish the document, then exit.
|
|
249
|
+
*
|
|
250
|
+
* THE single place the two lanes diverge, so they cannot diverge anywhere else.
|
|
251
|
+
* A phase hands back the same `{ document, exitCode }` either way; this decides
|
|
252
|
+
* what a *command* does with it, while an orchestrator folds it into
|
|
253
|
+
* `phases[].report` instead.
|
|
254
|
+
*
|
|
255
|
+
* Three cases, and the middle one is the one to get right:
|
|
256
|
+
* - an unexpected failure publishes the shared envelope in the format the
|
|
257
|
+
* operator asked for, matching `handleCommandError`;
|
|
258
|
+
* - a command's own report goes through the command's own `render`;
|
|
259
|
+
* - no document at all (an unconfigured run, a dry run) publishes nothing.
|
|
260
|
+
*
|
|
261
|
+
* 🔑 **`format` is REQUIRED, and that is the whole point of it being a
|
|
262
|
+
* parameter.** This arm hardcoded `writeYamlOutput`, and it is `vat resources
|
|
263
|
+
* validate`'s ONLY error exit — so `--format json` silently produced YAML on the
|
|
264
|
+
* one path a scripted consumer most needs to parse. The sibling
|
|
265
|
+
* `handleCommandError` has the same parameter as an OPTIONAL one carrying a
|
|
266
|
+
* docstring that says a caller with a `--format` option must pass it, and two
|
|
267
|
+
* commands added in the same change dropped it anyway: a docstring is not a
|
|
268
|
+
* mechanism. Here the type system asks, so a new caller cannot forget. A command
|
|
269
|
+
* that offers no `--format` passes `undefined` and says so at its call site.
|
|
270
|
+
*
|
|
271
|
+
* ⚠️ It governs the FAILURE envelope only. A command's own report still goes
|
|
272
|
+
* through `render`, which is what a `--format text` lane needs.
|
|
273
|
+
*
|
|
274
|
+
* @param outcome - What the phase produced
|
|
275
|
+
* @param render - How this command publishes its OWN report shape
|
|
276
|
+
* @param format - What the operator asked for: `json`, or anything else (and
|
|
277
|
+
* `undefined`) for YAML — the same two-branch switch `handleCommandError` and
|
|
278
|
+
* every success path use
|
|
219
279
|
*/
|
|
220
|
-
export declare function
|
|
280
|
+
export declare function finishCommand(outcome: PhaseOutcome, render: (document: unknown) => void, format: string | undefined): never;
|
|
221
281
|
/**
|
|
222
|
-
* Run a single phase
|
|
282
|
+
* Run a single phase in THIS process and fold its outcome into a result.
|
|
283
|
+
*
|
|
284
|
+
* In THIS process, because everything an orchestrator reads back from a phase is
|
|
285
|
+
* the {@link PhaseOutcome} pair. A process per phase buys neither half of it and
|
|
286
|
+
* charges, on every phase, a full Node startup and the whole module graph again
|
|
287
|
+
* (~730 ms of remark per isolate), a parse cache whose miss counters restart
|
|
288
|
+
* from zero, and a worker pool built and torn down before the next phase begins.
|
|
289
|
+
* Phases run sequentially, so none of that cost is ever overlapped with work.
|
|
223
290
|
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
*
|
|
291
|
+
* The `catch` is a BACKSTOP, not the error path. Every phase function reports
|
|
292
|
+
* its own failures through `reportCommandError` and returns them as a document.
|
|
293
|
+
*
|
|
294
|
+
* ⚠️ This arm exists for a throw that escaped that handling. Sharing the
|
|
295
|
+
* orchestrator's process is what makes it load-bearing: an escaped throw aborts
|
|
296
|
+
* the orchestrator itself and silently skips every later phase.
|
|
229
297
|
*/
|
|
230
|
-
export declare function runPhase(
|
|
298
|
+
export declare function runPhase(phase: Phase): Promise<PhaseResult>;
|
|
231
299
|
/**
|
|
232
300
|
* Worst-wins aggregate across phases. `system-error` outranks `error`: "we could
|
|
233
301
|
* not determine the answer" must never be filed under "we determined it is bad".
|
|
@@ -236,33 +304,33 @@ export declare function aggregatePhaseStatus(results: readonly PhaseResult[]): P
|
|
|
236
304
|
/**
|
|
237
305
|
* One phase's per-severity distribution, wherever that phase keeps it.
|
|
238
306
|
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
307
|
+
* A phase that holds its own findings publishes {@link PhaseResult.issueCounts}.
|
|
308
|
+
* A phase that publishes its own document deliberately does not — it owns its
|
|
309
|
+
* findings, and its document rides verbatim in {@link PhaseResult.report}.
|
|
310
|
+
*
|
|
311
|
+
* ⚠️ Both places must be read. Reading only `issueCounts` makes an
|
|
312
|
+
* orchestrator's header report `{0, 0, 0}` over phases that just reported 12
|
|
313
|
+
* warnings.
|
|
244
314
|
*
|
|
245
315
|
* Absent or malformed counts read as zero rather than throwing: a phase that
|
|
246
|
-
*
|
|
247
|
-
* answer as before this function existed — just no longer the answer for phases
|
|
248
|
-
* that DID publish one.
|
|
316
|
+
* publishes no distribution contributes nothing to the total.
|
|
249
317
|
*/
|
|
250
318
|
export declare function phaseIssueCounts(result: PhaseResult): SeverityCounts;
|
|
251
319
|
/**
|
|
252
320
|
* Sum every phase's distribution, so an orchestrator's header total reconciles
|
|
253
321
|
* against the phases printed beneath it.
|
|
254
322
|
*
|
|
255
|
-
* The companion to {@link aggregatePhaseStatus}: status
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
* `
|
|
323
|
+
* The companion to {@link aggregatePhaseStatus}: status is worst-wins ACROSS
|
|
324
|
+
* phases, so a header whose `status` can see the phases while its `issueCounts`
|
|
325
|
+
* cannot publishes a contradiction in one document — `status: warning` beside
|
|
326
|
+
* `warnings: 0`.
|
|
259
327
|
*/
|
|
260
328
|
export declare function aggregatePhaseIssueCounts(results: readonly PhaseResult[]): SeverityCounts;
|
|
261
329
|
/**
|
|
262
330
|
* The process exit code for a set of phase outcomes, per the exit-code contract
|
|
263
|
-
* every orchestrator's help text documents:
|
|
264
|
-
*
|
|
265
|
-
* and counts instead.
|
|
331
|
+
* every orchestrator's help text documents: `OK` pass, `FINDINGS` validation
|
|
332
|
+
* failure, `ERROR` system error. Warnings do not fail a run — they are
|
|
333
|
+
* published in the status and counts instead.
|
|
266
334
|
*/
|
|
267
|
-
export declare function exitCodeForPhases(results: readonly PhaseResult[]):
|
|
335
|
+
export declare function exitCodeForPhases(results: readonly PhaseResult[]): ExitCodeValue;
|
|
268
336
|
//# sourceMappingURL=phase-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phase-utils.d.ts","sourceRoot":"","sources":["../../src/commands/phase-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"phase-utils.d.ts","sourceRoot":"","sources":["../../src/commands/phase-utils.ts"],"names":[],"mappings":"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"}
|