@vibe-agent-toolkit/cli 0.2.0-rc.11 → 0.2.0-rc.12
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 +3 -3
- package/dist/bin/supervise-cli.d.ts +45 -0
- package/dist/bin/supervise-cli.d.ts.map +1 -0
- package/dist/bin/supervise-cli.js +83 -0
- package/dist/bin/supervise-cli.js.map +1 -0
- package/dist/bin/vat +95 -43
- package/dist/bin/vat.d.ts +15 -4
- package/dist/bin/vat.d.ts.map +1 -1
- package/dist/bin/vat.js +95 -43
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +21 -29
- package/dist/bin.js.map +1 -1
- package/dist/command-tree.d.ts +45 -0
- package/dist/command-tree.d.ts.map +1 -0
- package/dist/command-tree.js +60 -0
- package/dist/command-tree.js.map +1 -0
- package/dist/commands/agent/build-schema.d.ts +100 -0
- package/dist/commands/agent/build-schema.d.ts.map +1 -0
- package/dist/commands/agent/build-schema.js +32 -0
- package/dist/commands/agent/build-schema.js.map +1 -0
- package/dist/commands/agent/build.d.ts +1 -0
- package/dist/commands/agent/build.d.ts.map +1 -1
- package/dist/commands/agent/build.js +63 -33
- package/dist/commands/agent/build.js.map +1 -1
- package/dist/commands/agent/import-schema.d.ts +75 -0
- package/dist/commands/agent/import-schema.d.ts.map +1 -0
- package/dist/commands/agent/import-schema.js +25 -0
- package/dist/commands/agent/import-schema.js.map +1 -0
- package/dist/commands/agent/import.d.ts.map +1 -1
- package/dist/commands/agent/import.js +33 -27
- package/dist/commands/agent/import.js.map +1 -1
- package/dist/commands/agent/index.d.ts.map +1 -1
- package/dist/commands/agent/index.js +132 -37
- package/dist/commands/agent/index.js.map +1 -1
- package/dist/commands/agent/install-path.d.ts.map +1 -1
- package/dist/commands/agent/install-path.js +2 -1
- package/dist/commands/agent/install-path.js.map +1 -1
- package/dist/commands/agent/install-schema.d.ts +89 -0
- package/dist/commands/agent/install-schema.d.ts.map +1 -0
- package/dist/commands/agent/install-schema.js +29 -0
- package/dist/commands/agent/install-schema.js.map +1 -0
- package/dist/commands/agent/install.d.ts +7 -1
- package/dist/commands/agent/install.d.ts.map +1 -1
- package/dist/commands/agent/install.js +78 -108
- package/dist/commands/agent/install.js.map +1 -1
- package/dist/commands/agent/installed-schema.d.ts +140 -0
- package/dist/commands/agent/installed-schema.d.ts.map +1 -0
- package/dist/commands/agent/installed-schema.js +36 -0
- package/dist/commands/agent/installed-schema.js.map +1 -0
- package/dist/commands/agent/installed.d.ts +1 -1
- package/dist/commands/agent/installed.d.ts.map +1 -1
- package/dist/commands/agent/installed.js +104 -75
- package/dist/commands/agent/installed.js.map +1 -1
- package/dist/commands/agent/list-schema.d.ts +128 -0
- package/dist/commands/agent/list-schema.d.ts.map +1 -0
- package/dist/commands/agent/list-schema.js +34 -0
- package/dist/commands/agent/list-schema.js.map +1 -0
- package/dist/commands/agent/list.d.ts +4 -3
- package/dist/commands/agent/list.d.ts.map +1 -1
- package/dist/commands/agent/list.js +50 -37
- package/dist/commands/agent/list.js.map +1 -1
- package/dist/commands/agent/run.d.ts +3 -0
- package/dist/commands/agent/run.d.ts.map +1 -1
- package/dist/commands/agent/run.js +8 -3
- package/dist/commands/agent/run.js.map +1 -1
- package/dist/commands/agent/uninstall-schema.d.ts +89 -0
- package/dist/commands/agent/uninstall-schema.d.ts.map +1 -0
- package/dist/commands/agent/uninstall-schema.js +29 -0
- package/dist/commands/agent/uninstall-schema.js.map +1 -0
- package/dist/commands/agent/uninstall.d.ts +5 -1
- package/dist/commands/agent/uninstall.d.ts.map +1 -1
- package/dist/commands/agent/uninstall.js +50 -38
- package/dist/commands/agent/uninstall.js.map +1 -1
- package/dist/commands/agent/validate-schema.d.ts +129 -0
- package/dist/commands/agent/validate-schema.d.ts.map +1 -0
- package/dist/commands/agent/validate-schema.js +35 -0
- package/dist/commands/agent/validate-schema.js.map +1 -0
- package/dist/commands/agent/validate.d.ts +6 -0
- package/dist/commands/agent/validate.d.ts.map +1 -1
- package/dist/commands/agent/validate.js +64 -36
- package/dist/commands/agent/validate.js.map +1 -1
- package/dist/commands/ard/emit-schema.d.ts +108 -0
- package/dist/commands/ard/emit-schema.d.ts.map +1 -0
- package/dist/commands/ard/emit-schema.js +37 -0
- package/dist/commands/ard/emit-schema.js.map +1 -0
- package/dist/commands/ard/emit.d.ts +21 -65
- package/dist/commands/ard/emit.d.ts.map +1 -1
- package/dist/commands/ard/emit.js +68 -74
- package/dist/commands/ard/emit.js.map +1 -1
- package/dist/commands/ard/index.d.ts.map +1 -1
- package/dist/commands/ard/index.js +14 -11
- package/dist/commands/ard/index.js.map +1 -1
- package/dist/commands/audit/compat-lane-findings.d.ts +65 -0
- package/dist/commands/audit/compat-lane-findings.d.ts.map +1 -0
- package/dist/commands/audit/compat-lane-findings.js +72 -0
- package/dist/commands/audit/compat-lane-findings.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 +23 -12
- package/dist/commands/audit/distributed-tree.js.map +1 -1
- package/dist/commands/audit/git-url-clone.d.ts +15 -7
- package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
- package/dist/commands/audit/git-url-clone.js +85 -42
- package/dist/commands/audit/git-url-clone.js.map +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts +28 -4
- package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
- package/dist/commands/audit/hierarchical-output.js +44 -27
- package/dist/commands/audit/hierarchical-output.js.map +1 -1
- package/dist/commands/audit/scan-population.d.ts.map +1 -1
- package/dist/commands/audit/scan-population.js +2 -1
- package/dist/commands/audit/scan-population.js.map +1 -1
- package/dist/commands/audit-schema.d.ts +1247 -0
- package/dist/commands/audit-schema.d.ts.map +1 -0
- package/dist/commands/audit-schema.js +139 -0
- package/dist/commands/audit-schema.js.map +1 -0
- package/dist/commands/audit-settings-schema.d.ts +417 -0
- package/dist/commands/audit-settings-schema.d.ts.map +1 -0
- package/dist/commands/audit-settings-schema.js +77 -0
- package/dist/commands/audit-settings-schema.js.map +1 -0
- package/dist/commands/audit-settings.d.ts +28 -9
- package/dist/commands/audit-settings.d.ts.map +1 -1
- package/dist/commands/audit-settings.js +215 -151
- package/dist/commands/audit-settings.js.map +1 -1
- package/dist/commands/audit.d.ts +72 -33
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +405 -411
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts +61 -4
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +176 -190
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cache/clear-schema.d.ts +111 -0
- package/dist/commands/cache/clear-schema.d.ts.map +1 -0
- package/dist/commands/cache/clear-schema.js +37 -0
- package/dist/commands/cache/clear-schema.js.map +1 -0
- package/dist/commands/cache/clear.d.ts +28 -26
- package/dist/commands/cache/clear.d.ts.map +1 -1
- package/dist/commands/cache/clear.js +108 -103
- 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 +13 -7
- package/dist/commands/cache/index.js.map +1 -1
- package/dist/commands/claude/claude-config.d.ts +23 -6
- package/dist/commands/claude/claude-config.d.ts.map +1 -1
- package/dist/commands/claude/claude-config.js +29 -15
- package/dist/commands/claude/claude-config.js.map +1 -1
- package/dist/commands/claude/context.d.ts +55 -2
- package/dist/commands/claude/context.d.ts.map +1 -1
- package/dist/commands/claude/context.js +74 -50
- package/dist/commands/claude/context.js.map +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.js +2 -2
- package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts +14 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.js +135 -68
- package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.d.ts +3 -5
- package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.js +16 -7
- package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/publish-schema.d.ts +137 -0
- package/dist/commands/claude/marketplace/publish-schema.d.ts.map +1 -0
- package/dist/commands/claude/marketplace/publish-schema.js +32 -0
- package/dist/commands/claude/marketplace/publish-schema.js.map +1 -0
- package/dist/commands/claude/marketplace/publish-tree.d.ts +6 -0
- package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish-tree.js +75 -17
- package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
- package/dist/commands/claude/marketplace/publish.d.ts +27 -0
- package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish.js +84 -50
- package/dist/commands/claude/marketplace/publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate-schema.d.ts +362 -0
- package/dist/commands/claude/marketplace/validate-schema.d.ts.map +1 -0
- package/dist/commands/claude/marketplace/validate-schema.js +67 -0
- package/dist/commands/claude/marketplace/validate-schema.js.map +1 -0
- package/dist/commands/claude/marketplace/validate.d.ts +40 -53
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +358 -214
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/org/api-keys.d.ts +3 -0
- package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
- package/dist/commands/claude/org/api-keys.js +4 -5
- package/dist/commands/claude/org/api-keys.js.map +1 -1
- package/dist/commands/claude/org/code-analytics.js +1 -1
- package/dist/commands/claude/org/code-analytics.js.map +1 -1
- package/dist/commands/claude/org/cost.d.ts.map +1 -1
- package/dist/commands/claude/org/cost.js +11 -33
- package/dist/commands/claude/org/cost.js.map +1 -1
- package/dist/commands/claude/org/helpers.d.ts +40 -27
- package/dist/commands/claude/org/helpers.d.ts.map +1 -1
- package/dist/commands/claude/org/helpers.js +61 -66
- 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 +10 -4
- package/dist/commands/claude/org/index.js.map +1 -1
- package/dist/commands/claude/org/info.d.ts.map +1 -1
- package/dist/commands/claude/org/info.js +2 -3
- package/dist/commands/claude/org/info.js.map +1 -1
- package/dist/commands/claude/org/invites.d.ts +3 -0
- package/dist/commands/claude/org/invites.d.ts.map +1 -1
- package/dist/commands/claude/org/invites.js +5 -7
- package/dist/commands/claude/org/invites.js.map +1 -1
- package/dist/commands/claude/org/skills.d.ts +76 -21
- package/dist/commands/claude/org/skills.d.ts.map +1 -1
- package/dist/commands/claude/org/skills.js +273 -246
- package/dist/commands/claude/org/skills.js.map +1 -1
- package/dist/commands/claude/org/stubs-schema.d.ts +56 -0
- package/dist/commands/claude/org/stubs-schema.d.ts.map +1 -0
- package/dist/commands/claude/org/stubs-schema.js +23 -0
- package/dist/commands/claude/org/stubs-schema.js.map +1 -0
- package/dist/commands/claude/org/stubs.d.ts +8 -3
- package/dist/commands/claude/org/stubs.d.ts.map +1 -1
- package/dist/commands/claude/org/stubs.js +9 -9
- package/dist/commands/claude/org/stubs.js.map +1 -1
- package/dist/commands/claude/org/usage.d.ts.map +1 -1
- package/dist/commands/claude/org/usage.js +1 -2
- package/dist/commands/claude/org/usage.js.map +1 -1
- package/dist/commands/claude/org/users.d.ts +3 -0
- package/dist/commands/claude/org/users.d.ts.map +1 -1
- package/dist/commands/claude/org/users.js +6 -8
- package/dist/commands/claude/org/users.js.map +1 -1
- package/dist/commands/claude/org/workspaces.d.ts +3 -0
- package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
- package/dist/commands/claude/org/workspaces.js +10 -15
- package/dist/commands/claude/org/workspaces.js.map +1 -1
- package/dist/commands/claude/plugin/build-schema.d.ts +642 -0
- package/dist/commands/claude/plugin/build-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/build-schema.js +51 -0
- package/dist/commands/claude/plugin/build-schema.js.map +1 -0
- package/dist/commands/claude/plugin/build.d.ts +220 -45
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +466 -249
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/helpers.d.ts +186 -24
- package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
- package/dist/commands/claude/plugin/helpers.js +110 -68
- package/dist/commands/claude/plugin/helpers.js.map +1 -1
- package/dist/commands/claude/plugin/install-schema.d.ts +144 -0
- package/dist/commands/claude/plugin/install-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/install-schema.js +36 -0
- package/dist/commands/claude/plugin/install-schema.js.map +1 -0
- package/dist/commands/claude/plugin/install.d.ts +191 -11
- package/dist/commands/claude/plugin/install.d.ts.map +1 -1
- package/dist/commands/claude/plugin/install.js +688 -628
- package/dist/commands/claude/plugin/install.js.map +1 -1
- package/dist/commands/claude/plugin/kept-findings.d.ts +19 -0
- package/dist/commands/claude/plugin/kept-findings.d.ts.map +1 -0
- package/dist/commands/claude/plugin/kept-findings.js +24 -0
- package/dist/commands/claude/plugin/kept-findings.js.map +1 -0
- package/dist/commands/claude/plugin/list-schema.d.ts +223 -0
- package/dist/commands/claude/plugin/list-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/list-schema.js +34 -0
- package/dist/commands/claude/plugin/list-schema.js.map +1 -0
- package/dist/commands/claude/plugin/list.d.ts +18 -0
- package/dist/commands/claude/plugin/list.d.ts.map +1 -1
- package/dist/commands/claude/plugin/list.js +53 -45
- package/dist/commands/claude/plugin/list.js.map +1 -1
- package/dist/commands/claude/plugin/npm-pack.d.ts +15 -0
- package/dist/commands/claude/plugin/npm-pack.d.ts.map +1 -0
- package/dist/commands/claude/plugin/npm-pack.js +39 -0
- package/dist/commands/claude/plugin/npm-pack.js.map +1 -0
- package/dist/commands/claude/plugin/plugin-changelog.d.ts +5 -1
- package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-changelog.js +9 -5
- package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.d.ts +21 -2
- package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.js +65 -32
- package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.d.ts +13 -0
- package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.js +64 -16
- package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +63 -37
- package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
- package/dist/commands/claude/plugin/uninstall-schema.d.ts +112 -0
- package/dist/commands/claude/plugin/uninstall-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/uninstall-schema.js +28 -0
- package/dist/commands/claude/plugin/uninstall-schema.js.map +1 -0
- package/dist/commands/claude/plugin/uninstall.d.ts +57 -0
- package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
- package/dist/commands/claude/plugin/uninstall.js +176 -64
- package/dist/commands/claude/plugin/uninstall.js.map +1 -1
- package/dist/commands/consistency-check.d.ts.map +1 -1
- package/dist/commands/consistency-check.js +8 -6
- 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 +26 -10
- package/dist/commands/corpus/index.js.map +1 -1
- package/dist/commands/corpus/report.d.ts +34 -16
- package/dist/commands/corpus/report.d.ts.map +1 -1
- package/dist/commands/corpus/report.js +36 -18
- package/dist/commands/corpus/report.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts +25 -20
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +123 -67
- package/dist/commands/corpus/runner.js.map +1 -1
- package/dist/commands/corpus/scan-schema.d.ts +127 -0
- package/dist/commands/corpus/scan-schema.d.ts.map +1 -0
- package/dist/commands/corpus/scan-schema.js +31 -0
- package/dist/commands/corpus/scan-schema.js.map +1 -0
- package/dist/commands/corpus/scan.d.ts +31 -0
- package/dist/commands/corpus/scan.d.ts.map +1 -1
- package/dist/commands/corpus/scan.js +124 -50
- package/dist/commands/corpus/scan.js.map +1 -1
- package/dist/commands/corpus/seed.d.ts +11 -8
- package/dist/commands/corpus/seed.d.ts.map +1 -1
- package/dist/commands/corpus/seed.js +29 -11
- package/dist/commands/corpus/seed.js.map +1 -1
- package/dist/commands/doctor-render.d.ts +52 -0
- package/dist/commands/doctor-render.d.ts.map +1 -0
- package/dist/commands/doctor-render.js +110 -0
- package/dist/commands/doctor-render.js.map +1 -0
- package/dist/commands/doctor-schema.d.ts +191 -0
- package/dist/commands/doctor-schema.d.ts.map +1 -0
- package/dist/commands/doctor-schema.js +44 -0
- package/dist/commands/doctor-schema.js.map +1 -0
- package/dist/commands/doctor.d.ts +7 -62
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +126 -165
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/inventory-schema.d.ts +7297 -0
- package/dist/commands/inventory-schema.d.ts.map +1 -0
- package/dist/commands/inventory-schema.js +28 -0
- package/dist/commands/inventory-schema.js.map +1 -0
- package/dist/commands/inventory.d.ts +1 -1
- package/dist/commands/inventory.d.ts.map +1 -1
- package/dist/commands/inventory.js +89 -41
- package/dist/commands/inventory.js.map +1 -1
- package/dist/commands/mcp/index.d.ts.map +1 -1
- package/dist/commands/mcp/index.js +15 -0
- package/dist/commands/mcp/index.js.map +1 -1
- package/dist/commands/mcp/list-collections-schema.d.ts +101 -0
- package/dist/commands/mcp/list-collections-schema.d.ts.map +1 -0
- package/dist/commands/mcp/list-collections-schema.js +22 -0
- package/dist/commands/mcp/list-collections-schema.js.map +1 -0
- package/dist/commands/mcp/list-collections.d.ts +1 -1
- package/dist/commands/mcp/list-collections.d.ts.map +1 -1
- package/dist/commands/mcp/list-collections.js +19 -17
- package/dist/commands/mcp/list-collections.js.map +1 -1
- package/dist/commands/mcp/serve.d.ts +5 -0
- package/dist/commands/mcp/serve.d.ts.map +1 -1
- package/dist/commands/mcp/serve.js +29 -15
- 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 +6 -5
- package/dist/commands/okf/index.js.map +1 -1
- package/dist/commands/okf/validate-schema.d.ts +171 -0
- package/dist/commands/okf/validate-schema.d.ts.map +1 -0
- package/dist/commands/okf/validate-schema.js +44 -0
- package/dist/commands/okf/validate-schema.js.map +1 -0
- package/dist/commands/okf/validate.d.ts +16 -149
- package/dist/commands/okf/validate.d.ts.map +1 -1
- package/dist/commands/okf/validate.js +64 -62
- package/dist/commands/okf/validate.js.map +1 -1
- package/dist/commands/orchestrator-schema.d.ts +419 -0
- package/dist/commands/orchestrator-schema.d.ts.map +1 -0
- package/dist/commands/orchestrator-schema.js +91 -0
- package/dist/commands/orchestrator-schema.js.map +1 -0
- package/dist/commands/phase-utils.d.ts +188 -220
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +210 -258
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/positional-args.d.ts +13 -11
- package/dist/commands/positional-args.d.ts.map +1 -1
- package/dist/commands/positional-args.js +16 -15
- package/dist/commands/positional-args.js.map +1 -1
- package/dist/commands/rag/admin-schema.d.ts +152 -0
- package/dist/commands/rag/admin-schema.d.ts.map +1 -0
- package/dist/commands/rag/admin-schema.js +31 -0
- package/dist/commands/rag/admin-schema.js.map +1 -0
- package/dist/commands/rag/clear-command.d.ts.map +1 -1
- package/dist/commands/rag/clear-command.js +30 -15
- package/dist/commands/rag/clear-command.js.map +1 -1
- package/dist/commands/rag/command-helpers.d.ts +31 -7
- package/dist/commands/rag/command-helpers.d.ts.map +1 -1
- package/dist/commands/rag/command-helpers.js +41 -21
- package/dist/commands/rag/command-helpers.js.map +1 -1
- package/dist/commands/rag/index-command.d.ts +37 -48
- package/dist/commands/rag/index-command.d.ts.map +1 -1
- package/dist/commands/rag/index-command.js +80 -65
- package/dist/commands/rag/index-command.js.map +1 -1
- package/dist/commands/rag/index-schema.d.ts +107 -0
- package/dist/commands/rag/index-schema.d.ts.map +1 -0
- package/dist/commands/rag/index-schema.js +34 -0
- package/dist/commands/rag/index-schema.js.map +1 -0
- package/dist/commands/rag/index.d.ts.map +1 -1
- package/dist/commands/rag/index.js +88 -41
- package/dist/commands/rag/index.js.map +1 -1
- package/dist/commands/rag/query-command.d.ts +18 -4
- package/dist/commands/rag/query-command.d.ts.map +1 -1
- package/dist/commands/rag/query-command.js +42 -27
- package/dist/commands/rag/query-command.js.map +1 -1
- package/dist/commands/rag/query-schema.d.ts +363 -0
- package/dist/commands/rag/query-schema.d.ts.map +1 -0
- package/dist/commands/rag/query-schema.js +59 -0
- package/dist/commands/rag/query-schema.js.map +1 -0
- package/dist/commands/rag/stats-command.d.ts.map +1 -1
- package/dist/commands/rag/stats-command.js +19 -18
- package/dist/commands/rag/stats-command.js.map +1 -1
- package/dist/commands/resources/check-progress.d.ts +64 -11
- package/dist/commands/resources/check-progress.d.ts.map +1 -1
- package/dist/commands/resources/check-progress.js +77 -4
- package/dist/commands/resources/check-progress.js.map +1 -1
- package/dist/commands/resources/check-schema.d.ts +335 -0
- package/dist/commands/resources/check-schema.d.ts.map +1 -0
- package/dist/commands/resources/check-schema.js +104 -0
- package/dist/commands/resources/check-schema.js.map +1 -0
- package/dist/commands/resources/check-supervisor.d.ts +315 -71
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -1
- package/dist/commands/resources/check-supervisor.js +493 -107
- package/dist/commands/resources/check-supervisor.js.map +1 -1
- package/dist/commands/resources/check.d.ts +56 -249
- package/dist/commands/resources/check.d.ts.map +1 -1
- package/dist/commands/resources/check.js +416 -276
- 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 +165 -91
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/query-schema.d.ts +188 -0
- package/dist/commands/resources/query-schema.d.ts.map +1 -0
- package/dist/commands/resources/query-schema.js +48 -0
- package/dist/commands/resources/query-schema.js.map +1 -0
- package/dist/commands/resources/query.d.ts +17 -12
- package/dist/commands/resources/query.d.ts.map +1 -1
- package/dist/commands/resources/query.js +60 -48
- package/dist/commands/resources/query.js.map +1 -1
- package/dist/commands/resources/scan-schema.d.ts +195 -0
- package/dist/commands/resources/scan-schema.d.ts.map +1 -0
- package/dist/commands/resources/scan-schema.js +53 -0
- package/dist/commands/resources/scan-schema.js.map +1 -0
- package/dist/commands/resources/scan.d.ts +26 -3
- package/dist/commands/resources/scan.d.ts.map +1 -1
- package/dist/commands/resources/scan.js +51 -53
- package/dist/commands/resources/scan.js.map +1 -1
- package/dist/commands/resources/validate-schema.d.ts +326 -0
- package/dist/commands/resources/validate-schema.d.ts.map +1 -0
- package/dist/commands/resources/validate-schema.js +60 -0
- package/dist/commands/resources/validate-schema.js.map +1 -0
- package/dist/commands/resources/validate.d.ts +45 -169
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +221 -485
- package/dist/commands/resources/validate.js.map +1 -1
- package/dist/commands/skill/review-checklist.d.ts.map +1 -1
- package/dist/commands/skill/review-checklist.js +0 -1
- package/dist/commands/skill/review-checklist.js.map +1 -1
- package/dist/commands/skill/review-schema.d.ts +278 -0
- package/dist/commands/skill/review-schema.d.ts.map +1 -0
- package/dist/commands/skill/review-schema.js +46 -0
- package/dist/commands/skill/review-schema.js.map +1 -0
- package/dist/commands/skill/review.d.ts +8 -234
- package/dist/commands/skill/review.d.ts.map +1 -1
- package/dist/commands/skill/review.js +54 -78
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/auth-flags.d.ts +3 -0
- package/dist/commands/skill/test/auth-flags.d.ts.map +1 -1
- package/dist/commands/skill/test/auth-flags.js +6 -2
- package/dist/commands/skill/test/auth-flags.js.map +1 -1
- package/dist/commands/skill/test/configure-schema.d.ts +67 -0
- package/dist/commands/skill/test/configure-schema.d.ts.map +1 -0
- package/dist/commands/skill/test/configure-schema.js +27 -0
- package/dist/commands/skill/test/configure-schema.js.map +1 -0
- package/dist/commands/skill/test/configure.d.ts +12 -5
- package/dist/commands/skill/test/configure.d.ts.map +1 -1
- package/dist/commands/skill/test/configure.js +101 -31
- package/dist/commands/skill/test/configure.js.map +1 -1
- package/dist/commands/skill/test/run-schema.d.ts +107 -0
- package/dist/commands/skill/test/run-schema.d.ts.map +1 -0
- package/dist/commands/skill/test/run-schema.js +36 -0
- package/dist/commands/skill/test/run-schema.js.map +1 -0
- package/dist/commands/skill/test/run.d.ts +3 -2
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +316 -155
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build-schema.d.ts +199 -0
- package/dist/commands/skills/build-schema.d.ts.map +1 -0
- package/dist/commands/skills/build-schema.js +55 -0
- package/dist/commands/skills/build-schema.js.map +1 -0
- package/dist/commands/skills/build.d.ts +95 -298
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +415 -818
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/command-helpers.d.ts +5 -11
- package/dist/commands/skills/command-helpers.d.ts.map +1 -1
- package/dist/commands/skills/command-helpers.js +7 -17
- package/dist/commands/skills/command-helpers.js.map +1 -1
- package/dist/commands/skills/index.js +12 -6
- package/dist/commands/skills/index.js.map +1 -1
- package/dist/commands/skills/install-schema.d.ts +153 -0
- package/dist/commands/skills/install-schema.d.ts.map +1 -0
- package/dist/commands/skills/install-schema.js +44 -0
- package/dist/commands/skills/install-schema.js.map +1 -0
- package/dist/commands/skills/install.d.ts +76 -8
- package/dist/commands/skills/install.d.ts.map +1 -1
- package/dist/commands/skills/install.js +230 -194
- package/dist/commands/skills/install.js.map +1 -1
- package/dist/commands/skills/list-schema.d.ts +145 -0
- package/dist/commands/skills/list-schema.d.ts.map +1 -0
- package/dist/commands/skills/list-schema.js +37 -0
- package/dist/commands/skills/list-schema.js.map +1 -0
- package/dist/commands/skills/list.d.ts +39 -8
- package/dist/commands/skills/list.d.ts.map +1 -1
- package/dist/commands/skills/list.js +110 -122
- package/dist/commands/skills/list.js.map +1 -1
- package/dist/commands/skills/package-schema.d.ts +98 -0
- package/dist/commands/skills/package-schema.d.ts.map +1 -0
- package/dist/commands/skills/package-schema.js +32 -0
- package/dist/commands/skills/package-schema.js.map +1 -0
- package/dist/commands/skills/package.d.ts +85 -14
- package/dist/commands/skills/package.d.ts.map +1 -1
- package/dist/commands/skills/package.js +288 -207
- package/dist/commands/skills/package.js.map +1 -1
- package/dist/commands/skills/scope-guard.d.ts +27 -20
- package/dist/commands/skills/scope-guard.d.ts.map +1 -1
- package/dist/commands/skills/scope-guard.js +43 -32
- package/dist/commands/skills/scope-guard.js.map +1 -1
- package/dist/commands/skills/skill-discovery.d.ts +1 -1
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +40 -19
- package/dist/commands/skills/skill-discovery.js.map +1 -1
- package/dist/commands/skills/source-resolvers.d.ts +58 -8
- package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
- package/dist/commands/skills/source-resolvers.js +113 -38
- 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 +31 -51
- package/dist/commands/skills/validate-command.js.map +1 -1
- package/dist/commands/skills/validate-schema.d.ts +199 -0
- package/dist/commands/skills/validate-schema.d.ts.map +1 -0
- package/dist/commands/skills/validate-schema.js +44 -0
- package/dist/commands/skills/validate-schema.js.map +1 -0
- package/dist/commands/skills/validate.d.ts +100 -136
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +257 -343
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts +17 -5
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +139 -94
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +121 -110
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +230 -294
- package/dist/commands/verify.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/report-schemas.d.ts +12398 -35
- package/dist/report-schemas.d.ts.map +1 -1
- package/dist/report-schemas.js +624 -66
- package/dist/report-schemas.js.map +1 -1
- package/dist/skill-resolution/packaging-config.js +2 -2
- 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 +20 -13
- package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
- package/dist/utils/agent-discovery.d.ts +34 -1
- package/dist/utils/agent-discovery.d.ts.map +1 -1
- package/dist/utils/agent-discovery.js +80 -38
- package/dist/utils/agent-discovery.js.map +1 -1
- package/dist/utils/claude-context-lens.d.ts +13 -6
- package/dist/utils/claude-context-lens.d.ts.map +1 -1
- package/dist/utils/claude-context-lens.js +11 -12
- package/dist/utils/claude-context-lens.js.map +1 -1
- package/dist/utils/command-error-codes.d.ts +12 -0
- package/dist/utils/command-error-codes.d.ts.map +1 -0
- package/dist/utils/command-error-codes.js +12 -0
- package/dist/utils/command-error-codes.js.map +1 -0
- package/dist/utils/command-refusal.d.ts +58 -0
- package/dist/utils/command-refusal.d.ts.map +1 -0
- package/dist/utils/command-refusal.js +170 -0
- package/dist/utils/command-refusal.js.map +1 -0
- package/dist/utils/commander-ending.d.ts +40 -0
- package/dist/utils/commander-ending.d.ts.map +1 -0
- package/dist/utils/commander-ending.js +42 -0
- package/dist/utils/commander-ending.js.map +1 -0
- package/dist/utils/config-loader.d.ts +13 -8
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js +84 -45
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/corpus-target.d.ts +1 -1
- package/dist/utils/corpus-target.d.ts.map +1 -1
- package/dist/utils/corpus-target.js +6 -4
- package/dist/utils/corpus-target.js.map +1 -1
- package/dist/utils/debug-diagnostics.d.ts +18 -0
- package/dist/utils/debug-diagnostics.d.ts.map +1 -0
- package/dist/utils/debug-diagnostics.js +23 -0
- package/dist/utils/debug-diagnostics.js.map +1 -0
- package/dist/utils/document-writer.d.ts +191 -0
- package/dist/utils/document-writer.d.ts.map +1 -0
- package/dist/utils/document-writer.js +319 -0
- package/dist/utils/document-writer.js.map +1 -0
- package/dist/utils/help-loader.d.ts +2 -2
- package/dist/utils/help-loader.js +2 -2
- package/dist/utils/install-plan.d.ts +99 -0
- package/dist/utils/install-plan.d.ts.map +1 -0
- package/dist/utils/install-plan.js +146 -0
- package/dist/utils/install-plan.js.map +1 -0
- package/dist/utils/issue-anchor.d.ts +1 -1
- package/dist/utils/issue-anchor.d.ts.map +1 -1
- package/dist/utils/issue-anchor.js.map +1 -1
- package/dist/utils/issue-rendering.d.ts +8 -3
- package/dist/utils/issue-rendering.d.ts.map +1 -1
- package/dist/utils/issue-rendering.js +4 -0
- package/dist/utils/issue-rendering.js.map +1 -1
- package/dist/utils/lens-population.d.ts +20 -0
- package/dist/utils/lens-population.d.ts.map +1 -0
- package/dist/utils/lens-population.js +15 -0
- package/dist/utils/lens-population.js.map +1 -0
- package/dist/utils/marketplace-io.d.ts +63 -0
- package/dist/utils/marketplace-io.d.ts.map +1 -0
- package/dist/utils/marketplace-io.js +63 -0
- package/dist/utils/marketplace-io.js.map +1 -0
- package/dist/utils/operator-notices.d.ts +97 -0
- package/dist/utils/operator-notices.d.ts.map +1 -0
- package/dist/utils/operator-notices.js +115 -0
- package/dist/utils/operator-notices.js.map +1 -0
- package/dist/utils/optional-backend.d.ts +18 -15
- package/dist/utils/optional-backend.d.ts.map +1 -1
- package/dist/utils/optional-backend.js +22 -33
- package/dist/utils/optional-backend.js.map +1 -1
- package/dist/utils/output.d.ts +5 -43
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +8 -63
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/package-json.d.ts +3 -4
- package/dist/utils/package-json.d.ts.map +1 -1
- package/dist/utils/package-json.js +8 -8
- package/dist/utils/package-json.js.map +1 -1
- package/dist/utils/population-wiring.d.ts +31 -38
- package/dist/utils/population-wiring.d.ts.map +1 -1
- package/dist/utils/population-wiring.js +38 -32
- package/dist/utils/population-wiring.js.map +1 -1
- package/dist/utils/project-root-policy.d.ts +74 -1
- package/dist/utils/project-root-policy.d.ts.map +1 -1
- package/dist/utils/project-root-policy.js +146 -8
- package/dist/utils/project-root-policy.js.map +1 -1
- package/dist/utils/projection-lenses.d.ts +25 -7
- package/dist/utils/projection-lenses.d.ts.map +1 -1
- package/dist/utils/projection-lenses.js +20 -6
- package/dist/utils/projection-lenses.js.map +1 -1
- package/dist/utils/projection-query.d.ts +17 -10
- package/dist/utils/projection-query.d.ts.map +1 -1
- package/dist/utils/projection-query.js +47 -28
- package/dist/utils/projection-query.js.map +1 -1
- package/dist/utils/projection-store.d.ts +2 -2
- package/dist/utils/projection-store.d.ts.map +1 -1
- package/dist/utils/projection-store.js +74 -45
- package/dist/utils/projection-store.js.map +1 -1
- package/dist/utils/rag-database.d.ts +61 -0
- package/dist/utils/rag-database.d.ts.map +1 -0
- package/dist/utils/rag-database.js +178 -0
- package/dist/utils/rag-database.js.map +1 -0
- package/dist/utils/relation-limits.d.ts +7 -2
- package/dist/utils/relation-limits.d.ts.map +1 -1
- package/dist/utils/relation-limits.js +6 -1
- package/dist/utils/relation-limits.js.map +1 -1
- package/dist/utils/relativize-paths.d.ts +23 -0
- package/dist/utils/relativize-paths.d.ts.map +1 -1
- package/dist/utils/relativize-paths.js +32 -1
- package/dist/utils/relativize-paths.js.map +1 -1
- package/dist/utils/resource-loader.d.ts +76 -32
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +132 -66
- package/dist/utils/resource-loader.js.map +1 -1
- package/dist/utils/run-integrity.d.ts +64 -31
- package/dist/utils/run-integrity.d.ts.map +1 -1
- package/dist/utils/run-integrity.js +76 -35
- package/dist/utils/run-integrity.js.map +1 -1
- package/dist/utils/scope-locations.d.ts +7 -5
- package/dist/utils/scope-locations.d.ts.map +1 -1
- package/dist/utils/scope-locations.js +37 -12
- package/dist/utils/scope-locations.js.map +1 -1
- package/dist/utils/staging-dir.d.ts +7 -0
- package/dist/utils/staging-dir.d.ts.map +1 -0
- package/dist/utils/staging-dir.js +12 -0
- package/dist/utils/staging-dir.js.map +1 -0
- package/dist/utils/url-redact.d.ts +9 -0
- package/dist/utils/url-redact.d.ts.map +1 -1
- package/dist/utils/url-redact.js +13 -0
- package/dist/utils/url-redact.js.map +1 -1
- package/dist/utils/user-context-scanner.d.ts +3 -2
- package/dist/utils/user-context-scanner.d.ts.map +1 -1
- package/dist/utils/user-context-scanner.js +24 -4
- 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 +8 -14
- 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 +3 -3
- package/dist/utils/vat-bin-path.js.map +1 -1
- package/dist/utils/verdict-helpers.d.ts.map +1 -1
- package/dist/utils/verdict-helpers.js +5 -5
- package/dist/utils/verdict-helpers.js.map +1 -1
- package/docs/agent.md +347 -2
- package/docs/audit.md +312 -89
- package/docs/doctor.md +65 -19
- package/docs/index.md +571 -20
- package/docs/mcp.md +64 -12
- package/docs/rag.md +176 -48
- package/docs/resources.md +257 -71
- package/docs/skill-test.md +148 -19
- package/docs/skills.md +459 -174
- package/package.json +16 -19
- package/schemas/agent-build.json +268 -0
- package/schemas/agent-import.json +252 -0
- package/schemas/agent-install.json +260 -0
- package/schemas/agent-installed.json +287 -0
- package/schemas/agent-list.json +279 -0
- package/schemas/agent-uninstall.json +260 -0
- package/schemas/agent-validate.json +279 -0
- package/schemas/ard-emit.json +224 -106
- package/schemas/audit-settings.json +472 -0
- package/schemas/audit.json +635 -0
- package/schemas/cache-clear.json +273 -0
- package/schemas/claude-marketplace-publish.json +286 -0
- package/schemas/claude-marketplace-validate.json +352 -0
- package/schemas/claude-org-not-implemented.json +239 -0
- package/schemas/claude-plugin-build.json +446 -0
- package/schemas/claude-plugin-install.json +291 -0
- package/schemas/claude-plugin-list.json +326 -0
- package/schemas/claude-plugin-uninstall.json +272 -0
- package/schemas/corpus-audit.json +635 -0
- package/schemas/corpus-scan.json +293 -0
- package/schemas/doctor.json +299 -0
- package/schemas/inventory.json +982 -0
- package/schemas/mcp-list-collections.json +268 -0
- package/schemas/okf-validate.json +224 -106
- package/schemas/orchestrator.json +299 -0
- package/schemas/rag-clear.json +253 -0
- package/schemas/rag-index.json +273 -0
- package/schemas/rag-query.json +365 -0
- package/schemas/rag-stats.json +269 -0
- package/schemas/resources-check.json +242 -108
- package/schemas/resources-query.json +333 -0
- package/schemas/resources-scan.json +321 -0
- package/schemas/resources-validate.json +332 -0
- package/schemas/skill-review.json +224 -106
- package/schemas/skill-test-configure.json +256 -0
- package/schemas/skill-test-run.json +296 -0
- package/schemas/skills-build.json +325 -0
- package/schemas/skills-install.json +287 -0
- package/schemas/skills-list.json +283 -0
- package/schemas/skills-package.json +270 -0
- package/schemas/skills-validate.json +285 -0
- package/dist/commands/skills/shared.d.ts +0 -29
- package/dist/commands/skills/shared.d.ts.map +0 -1
- package/dist/commands/skills/shared.js +0 -33
- package/dist/commands/skills/shared.js.map +0 -1
- package/dist/utils/command-error.d.ts +0 -194
- package/dist/utils/command-error.d.ts.map +0 -1
- package/dist/utils/command-error.js +0 -237
- package/dist/utils/command-error.js.map +0 -1
package/README.md
CHANGED
|
@@ -85,7 +85,7 @@ vat doctor --verbose
|
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
**What it checks:**
|
|
88
|
-
- Node.js version (>=22.
|
|
88
|
+
- Node.js version (>=22.16.0 required — the range comes from the CLI's own `engines.node`)
|
|
89
89
|
- Git installation and repository
|
|
90
90
|
- Configuration file exists and is valid
|
|
91
91
|
- VAT version (checks for updates)
|
|
@@ -103,7 +103,7 @@ report and states how many it hid):
|
|
|
103
103
|
Running diagnostic checks...
|
|
104
104
|
|
|
105
105
|
✅ Node.js version
|
|
106
|
-
v22.
|
|
106
|
+
v22.16.0 (meets requirement: >=22.16.0)
|
|
107
107
|
|
|
108
108
|
✅ Git installed
|
|
109
109
|
git version 2.43.0
|
|
@@ -131,7 +131,7 @@ If checks fail, doctor provides specific suggestions:
|
|
|
131
131
|
|
|
132
132
|
```
|
|
133
133
|
❌ Node.js version
|
|
134
|
-
v22.4.0 does not satisfy the required range. Node.js >=22.
|
|
134
|
+
v22.4.0 does not satisfy the required range. Node.js >=22.16.0 required.
|
|
135
135
|
💡 Install a Node.js version in that range: https://nodejs.org/ or use nvm
|
|
136
136
|
```
|
|
137
137
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the `vat` wrapper (`vat.ts`) waits on the CLI it spawned, and ends the way the CLI ended.
|
|
3
|
+
*
|
|
4
|
+
* Its own module so the decisions are reachable by a unit test with a stand-in child: `vat.ts`
|
|
5
|
+
* runs `main()` on import.
|
|
6
|
+
*/
|
|
7
|
+
import type { ChildProcess } from 'node:child_process';
|
|
8
|
+
/**
|
|
9
|
+
* Wait on the CLI child, and end this process the way it ended.
|
|
10
|
+
*
|
|
11
|
+
* ## 🚨 This wrapper is the `vat` an operator, a CI runner and `timeout(1)` start
|
|
12
|
+
*
|
|
13
|
+
* So `kill <pid>` lands HERE, not on the CLI. While the CLI runs, every terminating signal is
|
|
14
|
+
* guarded (`handleTerminatingSignals`) so this process never dies before it: it waits for the
|
|
15
|
+
* CLI's `exit`, then ends the same way — dying of the same signal when the CLI died of a
|
|
16
|
+
* terminating one (re-raised; exit 2 where the raise cannot kill this process, and always on
|
|
17
|
+
* Windows), otherwise with its exit code. A repeat within `REPEAT_SIGNAL_WINDOW_MS` is
|
|
18
|
+
* swallowed (a terminal's group Ctrl-C reaches this process and the CLI both).
|
|
19
|
+
*
|
|
20
|
+
* - **A repeat after that window FORCES the ending**: the CLI is SIGKILLed — on Windows with its
|
|
21
|
+
* whole tree (`taskkill /T /F`) — and this process dies of the repeat at once. An operator whose
|
|
22
|
+
* first Ctrl-C or kill met a cleanup that hung can always end the run with a second.
|
|
23
|
+
*
|
|
24
|
+
* - **POSIX: the first signal is FORWARDED** to the CLI, because a signal sent to this pid alone
|
|
25
|
+
* reaches nothing else. A terminal Ctrl-C signals the whole foreground group, so the CLI then
|
|
26
|
+
* receives SIGINT twice — once from the terminal, once forwarded. That is safe only because
|
|
27
|
+
* every handler the CLI has goes through `handleTerminatingSignals`, which swallows a repeat
|
|
28
|
+
* that arrives with the first.
|
|
29
|
+
* - **Windows: NOTHING is forwarded.** The only signals delivered there are console events
|
|
30
|
+
* (Ctrl-C, Ctrl-Break, the console closing), which the console already sends to every attached
|
|
31
|
+
* process, the CLI included; and `child.kill` there is `TerminateProcess`, which would PRE-EMPT
|
|
32
|
+
* the CLI's own cleanup (a progress directory, a clone, the MCP shutdown line). The guard still
|
|
33
|
+
* keeps this process waiting for the CLI, so it ends as the CLI ended.
|
|
34
|
+
* - **A SIGKILL of this wrapper** (POSIX) runs none of this: the CLI (and anything it supervises)
|
|
35
|
+
* runs on to its own end, bounded by its own watchdog. The CLI's stdin is this process's,
|
|
36
|
+
* inherited — a pipe here would break every interactive command — so it never reads end-of-file.
|
|
37
|
+
* - **An outside kill of this wrapper on Windows** (`TerminateProcess`, `taskkill /F`) runs none
|
|
38
|
+
* of this either, but ends the CLI with it: libuv spawns the CLI (not `detached`) into a
|
|
39
|
+
* kill-on-close job object whose only handle this process holds, and the CLI's own children
|
|
40
|
+
* go the same way with it.
|
|
41
|
+
*
|
|
42
|
+
* @param child - The spawned CLI
|
|
43
|
+
*/
|
|
44
|
+
export declare function superviseCli(child: ChildProcess): void;
|
|
45
|
+
//# sourceMappingURL=supervise-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supervise-cli.d.ts","sourceRoot":"","sources":["../../src/bin/supervise-cli.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAUvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAmCtD"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the `vat` wrapper (`vat.ts`) waits on the CLI it spawned, and ends the way the CLI ended.
|
|
3
|
+
*
|
|
4
|
+
* Its own module so the decisions are reachable by a unit test with a stand-in child: `vat.ts`
|
|
5
|
+
* runs `main()` on import.
|
|
6
|
+
*/
|
|
7
|
+
import { ExitCode, exitCodeOfChild } from '@vibe-agent-toolkit/schema';
|
|
8
|
+
import { handleTerminatingSignals, isTerminatingSignal, killProcessTree, reRaiseSignal, } from '@vibe-agent-toolkit/utils/process';
|
|
9
|
+
/**
|
|
10
|
+
* Wait on the CLI child, and end this process the way it ended.
|
|
11
|
+
*
|
|
12
|
+
* ## 🚨 This wrapper is the `vat` an operator, a CI runner and `timeout(1)` start
|
|
13
|
+
*
|
|
14
|
+
* So `kill <pid>` lands HERE, not on the CLI. While the CLI runs, every terminating signal is
|
|
15
|
+
* guarded (`handleTerminatingSignals`) so this process never dies before it: it waits for the
|
|
16
|
+
* CLI's `exit`, then ends the same way — dying of the same signal when the CLI died of a
|
|
17
|
+
* terminating one (re-raised; exit 2 where the raise cannot kill this process, and always on
|
|
18
|
+
* Windows), otherwise with its exit code. A repeat within `REPEAT_SIGNAL_WINDOW_MS` is
|
|
19
|
+
* swallowed (a terminal's group Ctrl-C reaches this process and the CLI both).
|
|
20
|
+
*
|
|
21
|
+
* - **A repeat after that window FORCES the ending**: the CLI is SIGKILLed — on Windows with its
|
|
22
|
+
* whole tree (`taskkill /T /F`) — and this process dies of the repeat at once. An operator whose
|
|
23
|
+
* first Ctrl-C or kill met a cleanup that hung can always end the run with a second.
|
|
24
|
+
*
|
|
25
|
+
* - **POSIX: the first signal is FORWARDED** to the CLI, because a signal sent to this pid alone
|
|
26
|
+
* reaches nothing else. A terminal Ctrl-C signals the whole foreground group, so the CLI then
|
|
27
|
+
* receives SIGINT twice — once from the terminal, once forwarded. That is safe only because
|
|
28
|
+
* every handler the CLI has goes through `handleTerminatingSignals`, which swallows a repeat
|
|
29
|
+
* that arrives with the first.
|
|
30
|
+
* - **Windows: NOTHING is forwarded.** The only signals delivered there are console events
|
|
31
|
+
* (Ctrl-C, Ctrl-Break, the console closing), which the console already sends to every attached
|
|
32
|
+
* process, the CLI included; and `child.kill` there is `TerminateProcess`, which would PRE-EMPT
|
|
33
|
+
* the CLI's own cleanup (a progress directory, a clone, the MCP shutdown line). The guard still
|
|
34
|
+
* keeps this process waiting for the CLI, so it ends as the CLI ended.
|
|
35
|
+
* - **A SIGKILL of this wrapper** (POSIX) runs none of this: the CLI (and anything it supervises)
|
|
36
|
+
* runs on to its own end, bounded by its own watchdog. The CLI's stdin is this process's,
|
|
37
|
+
* inherited — a pipe here would break every interactive command — so it never reads end-of-file.
|
|
38
|
+
* - **An outside kill of this wrapper on Windows** (`TerminateProcess`, `taskkill /F`) runs none
|
|
39
|
+
* of this either, but ends the CLI with it: libuv spawns the CLI (not `detached`) into a
|
|
40
|
+
* kill-on-close job object whose only handle this process holds, and the CLI's own children
|
|
41
|
+
* go the same way with it.
|
|
42
|
+
*
|
|
43
|
+
* @param child - The spawned CLI
|
|
44
|
+
*/
|
|
45
|
+
export function superviseCli(child) {
|
|
46
|
+
let cliEnded = () => undefined;
|
|
47
|
+
const ended = new Promise((resolve) => {
|
|
48
|
+
cliEnded = resolve;
|
|
49
|
+
});
|
|
50
|
+
const guard = handleTerminatingSignals({
|
|
51
|
+
fallbackExitCode: ExitCode.ERROR,
|
|
52
|
+
cleanup: (signal, forced) => {
|
|
53
|
+
// Not a group leader (a terminal's signals must reach it, and it reads the terminal): its pid.
|
|
54
|
+
forced.addEventListener('abort', () => {
|
|
55
|
+
killProcessTree(child, { groupLeader: false, throughChild: false });
|
|
56
|
+
}, { once: true });
|
|
57
|
+
if (process.platform !== 'win32')
|
|
58
|
+
child.kill(signal);
|
|
59
|
+
// Wait for the CLI: its `exit` below is what ends this process.
|
|
60
|
+
return ended;
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
// A child that never started has no status, which is not a verdict: exit 2. A failed FORWARD
|
|
64
|
+
// (a signal the platform cannot send) also lands here, with the child running — it is ignored,
|
|
65
|
+
// and the child's own `exit` still ends this process.
|
|
66
|
+
child.on('error', () => {
|
|
67
|
+
if (child.pid !== undefined)
|
|
68
|
+
return;
|
|
69
|
+
guard.release();
|
|
70
|
+
process.exit(ExitCode.ERROR);
|
|
71
|
+
});
|
|
72
|
+
child.on('exit', (code, signal) => {
|
|
73
|
+
cliEnded();
|
|
74
|
+
guard.release();
|
|
75
|
+
if (signal !== null && isTerminatingSignal(signal))
|
|
76
|
+
reRaiseSignal(signal, ExitCode.ERROR);
|
|
77
|
+
// The child derived its code from its own document. Any other signal death has no status, and
|
|
78
|
+
// a code off the contract (an older build's, Node's abort) is not a verdict the child
|
|
79
|
+
// published, so neither is forwarded verbatim.
|
|
80
|
+
process.exit(exitCodeOfChild(code));
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=supervise-cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supervise-cli.js","sourceRoot":"","sources":["../../src/bin/supervise-cli.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,aAAa,GACd,MAAM,mCAAmC,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,UAAU,YAAY,CAAC,KAAmB;IAC9C,IAAI,QAAQ,GAAe,GAAG,EAAE,CAAC,SAAS,CAAC;IAC3C,MAAM,KAAK,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QAC1C,QAAQ,GAAG,OAAO,CAAC;IACrB,CAAC,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,wBAAwB,CAAC;QACrC,gBAAgB,EAAE,QAAQ,CAAC,KAAK;QAChC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;YAC1B,+FAA+F;YAC/F,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;gBACpC,eAAe,CAAC,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;YACtE,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;YACnB,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO;gBAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrD,gEAAgE;YAChE,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC,CAAC;IAEH,6FAA6F;IAC7F,+FAA+F;IAC/F,sDAAsD;IACtD,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;QACrB,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS;YAAE,OAAO;QACpC,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;QAChC,QAAQ,EAAE,CAAC;QACX,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,MAAM,KAAK,IAAI,IAAI,mBAAmB,CAAC,MAAM,CAAC;YAAE,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC1F,8FAA8F;QAC9F,sFAAsF;QACtF,+CAA+C;QAC/C,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/bin/vat
CHANGED
|
@@ -2,10 +2,21 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Smart vat wrapper with context-aware execution
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* -
|
|
5
|
+
* Resolution precedence:
|
|
6
|
+
* 1. `VAT_BIN` — an explicit `dist/bin.js` path, highest precedence. A path
|
|
7
|
+
* that does not exist, or that names this wrapper itself (`dist/bin/vat.js`,
|
|
8
|
+
* which would re-resolve and spawn itself forever), is a hard error
|
|
9
|
+
* (exit 2) — never a silent fall-through to a lower priority.
|
|
10
|
+
* 2. `VAT_ROOT_DIR` — a monorepo checkout root; `<root>/packages/cli/dist/bin.js`
|
|
11
|
+
* must already be built, or this is a hard error (exit 2).
|
|
12
|
+
* 3. Dev mode: Inside vibe-agent-toolkit repo → packages/cli/dist/bin.js (unpackaged dev build)
|
|
13
|
+
* 4. Local install: Project has vibe-agent-toolkit → node_modules version (packaged)
|
|
14
|
+
* 5. Global install: Fallback → globally installed version (packaged)
|
|
15
|
+
*
|
|
16
|
+
* `VAT_TEST_ROOT` is separate from the above: it only changes the directory
|
|
17
|
+
* project-root detection (priorities 3–5) starts from — it never names a
|
|
18
|
+
* binary. For every `VAT_*` variable above, an empty string is treated as
|
|
19
|
+
* unset (`if (process.env[...])`), matching the historical behaviour.
|
|
9
20
|
*
|
|
10
21
|
* Features:
|
|
11
22
|
* - Version detection and comparison
|
|
@@ -14,14 +25,15 @@
|
|
|
14
25
|
*
|
|
15
26
|
* Works in both git and non-git directories.
|
|
16
27
|
*/
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
28
|
+
import { spawn } from 'node:child_process';
|
|
29
|
+
import { readFileSync } from 'node:fs';
|
|
19
30
|
import { createRequire } from 'node:module';
|
|
20
|
-
import { dirname } from 'node:path';
|
|
31
|
+
import { basename, dirname } from 'node:path';
|
|
21
32
|
import { fileURLToPath } from 'node:url';
|
|
22
|
-
import {
|
|
23
|
-
import { findNodeWorkspaceRoot, isPathAbsentError, safePath, } from '@vibe-agent-toolkit/utils';
|
|
24
|
-
import { describeStdioBlocking, makeStdioBlocking
|
|
33
|
+
import { ExitCode, installLastResortExit } from '@vibe-agent-toolkit/schema';
|
|
34
|
+
import { findNodeWorkspaceRoot, followedKindSync, isPathAbsentError, safePath, } from '@vibe-agent-toolkit/utils';
|
|
35
|
+
import { describeStdioBlocking, makeStdioBlocking } from '@vibe-agent-toolkit/utils/process';
|
|
36
|
+
import { superviseCli } from './supervise-cli.js';
|
|
25
37
|
// Before ANY output. This file — not bin.ts — is what package.json maps `vat` to,
|
|
26
38
|
// so it is the CLI entry point in every installed copy, and `makeStdioBlocking`
|
|
27
39
|
// is documented as belonging first thing in one. The delegated child applies it
|
|
@@ -45,6 +57,18 @@ function reportStdioBlocking(debug) {
|
|
|
45
57
|
// A throw nothing below caught ends on ExitCode.ERROR, never Node's default 1.
|
|
46
58
|
installLastResortExit();
|
|
47
59
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
60
|
+
/**
|
|
61
|
+
* Run the CLI as a child of this process, and end the way it ended.
|
|
62
|
+
*
|
|
63
|
+
* Asynchronous, never `spawnSync`: this wrapper is the `vat` an operator and a CI runner start, so
|
|
64
|
+
* `kill <pid>` lands here, and a synchronous spawn died of it at once while the CLI — with any
|
|
65
|
+
* `resources check` child it supervises — ran on, reparented. How a signal is handled meanwhile
|
|
66
|
+
* (forwarded on POSIX, never on Windows) and how this process then ends: {@link superviseCli}.
|
|
67
|
+
*
|
|
68
|
+
* @param binPath - The CLI entry (`dist/bin.js`) to run
|
|
69
|
+
* @param context - How it was found, for `VAT_CONTEXT`
|
|
70
|
+
* @param contextPath - Where it was found, for `VAT_CONTEXT_PATH`
|
|
71
|
+
*/
|
|
48
72
|
function spawnCli(binPath, context, contextPath) {
|
|
49
73
|
const env = {
|
|
50
74
|
...process.env,
|
|
@@ -53,14 +77,42 @@ function spawnCli(binPath, context, contextPath) {
|
|
|
53
77
|
};
|
|
54
78
|
// The node running this wrapper, never a PATH lookup: the child must be the
|
|
55
79
|
// same binary, and `node` by name is whatever PATH says first.
|
|
56
|
-
|
|
80
|
+
superviseCli(spawn(process.execPath, [binPath, ...process.argv.slice(2)], {
|
|
57
81
|
stdio: 'inherit',
|
|
58
82
|
env,
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The explicit overrides, in precedence order. A named target that cannot be
|
|
87
|
+
* run is an error, never a fall-through — see the header docstring.
|
|
88
|
+
*/
|
|
89
|
+
function explicitOverride(env) {
|
|
90
|
+
const vatBin = env['VAT_BIN'];
|
|
91
|
+
if (vatBin) {
|
|
92
|
+
const binPath = safePath.resolve(vatBin);
|
|
93
|
+
if (basename(binPath) === 'vat.js' && basename(dirname(binPath)) === 'bin') {
|
|
94
|
+
refuseOverride('VAT_BIN', binPath, 'names the context-detecting wrapper, which would re-resolve and run itself; point it at dist/bin.js');
|
|
95
|
+
}
|
|
96
|
+
// The operator's own variable: its own `within`.
|
|
97
|
+
if (followedKindSync(binPath, binPath) === 'absent')
|
|
98
|
+
refuseOverride('VAT_BIN', binPath, 'does not exist');
|
|
99
|
+
// <root>/packages/cli/dist/bin.js: dist → cli → packages → <root> is FOUR hops.
|
|
100
|
+
return { binPath, contextPath: dirname(dirname(dirname(dirname(binPath)))), variable: 'VAT_BIN' };
|
|
101
|
+
}
|
|
102
|
+
const rootDir = env['VAT_ROOT_DIR'];
|
|
103
|
+
if (rootDir) {
|
|
104
|
+
const binPath = safePath.join(rootDir, 'packages/cli/dist/bin.js');
|
|
105
|
+
// Beneath the directory the operator named: its links are read before followed.
|
|
106
|
+
if (followedKindSync(binPath, rootDir) === 'absent')
|
|
107
|
+
refuseOverride('VAT_ROOT_DIR', binPath, 'has no built CLI (run `bun run build` there)');
|
|
108
|
+
return { binPath, contextPath: rootDir, variable: 'VAT_ROOT_DIR' };
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
/** Print why the named override was refused and exit with {@link ExitCode.ERROR}. */
|
|
113
|
+
function refuseOverride(variable, path, why) {
|
|
114
|
+
process.stderr.write(`vat: ${variable} ${why}: ${path}\nUnset ${variable} to use normal resolution.\n`);
|
|
115
|
+
process.exit(ExitCode.ERROR);
|
|
64
116
|
}
|
|
65
117
|
/**
|
|
66
118
|
* Check if we're in vibe-agent-toolkit repo (developer mode)
|
|
@@ -72,12 +124,14 @@ function spawnCli(binPath, context, contextPath) {
|
|
|
72
124
|
function getDevModeBinary(projectRoot) {
|
|
73
125
|
const wrapperPath = safePath.join(projectRoot, 'packages/cli/dist/bin/vat.js');
|
|
74
126
|
const binPath = safePath.join(projectRoot, 'packages/cli/dist/bin.js');
|
|
127
|
+
// Beneath the project root found from the operator's cwd: its links are read before followed.
|
|
128
|
+
const present = (path) => followedKindSync(path, projectRoot) !== 'absent';
|
|
75
129
|
if (process.env['VAT_DEBUG'] === '1') {
|
|
76
|
-
console.error(`[vat debug] Dev check - wrapper: ${wrapperPath} (${
|
|
77
|
-
console.error(`[vat debug] Dev check - bin: ${binPath} (${
|
|
130
|
+
console.error(`[vat debug] Dev check - wrapper: ${wrapperPath} (${present(wrapperPath)})`);
|
|
131
|
+
console.error(`[vat debug] Dev check - bin: ${binPath} (${present(binPath)})`);
|
|
78
132
|
}
|
|
79
133
|
// Both files must exist to confirm we're in vibe-agent-toolkit repo
|
|
80
|
-
if (
|
|
134
|
+
if (present(wrapperPath) && present(binPath)) {
|
|
81
135
|
return binPath;
|
|
82
136
|
}
|
|
83
137
|
return null;
|
|
@@ -91,8 +145,8 @@ function getDevModeBinary(projectRoot) {
|
|
|
91
145
|
* layout and **does not exist under pnpm**. An adopter depending on
|
|
92
146
|
* the umbrella `vibe-agent-toolkit` package gets no top-level
|
|
93
147
|
* `node_modules/@vibe-agent-toolkit/` directory at all; the real CLI lives under
|
|
94
|
-
* `node_modules/.pnpm/@vibe-agent-toolkit+cli@<ver>_<hash>/…`. So priority
|
|
95
|
-
* fired for them, resolution fell through to priority
|
|
148
|
+
* `node_modules/.pnpm/@vibe-agent-toolkit+cli@<ver>_<hash>/…`. So priority 4 never
|
|
149
|
+
* fired for them, resolution fell through to priority 5, and whichever copy of
|
|
96
150
|
* `vat.js` happened to be invoked won — silently ignoring the version they pinned.
|
|
97
151
|
* That is the exact failure `findLocalInstall` exists to prevent, and it was
|
|
98
152
|
* invisible on npm/bun, where the flat layout makes the probe succeed.
|
|
@@ -135,7 +189,8 @@ function findLocalInstall(projectRoot) {
|
|
|
135
189
|
// Still existence-checked: a dependency can be installed without having been
|
|
136
190
|
// built (a fresh workspace checkout, a partial install), and spawning a
|
|
137
191
|
// missing file would fail far from its cause.
|
|
138
|
-
|
|
192
|
+
// Beneath the package directory Node's resolver found: its links are read before followed.
|
|
193
|
+
if (followedKindSync(localBin, dirname(manifestPath)) !== 'absent')
|
|
139
194
|
return localBin;
|
|
140
195
|
}
|
|
141
196
|
return null;
|
|
@@ -143,7 +198,7 @@ function findLocalInstall(projectRoot) {
|
|
|
143
198
|
/**
|
|
144
199
|
* `require.resolve` reduced to "found it, or didn't".
|
|
145
200
|
*
|
|
146
|
-
* A NOT-FOUND is priority
|
|
201
|
+
* A NOT-FOUND is priority 4's ordinary "not applicable" answer — no local
|
|
147
202
|
* install on this base — so it falls through to the next base and ultimately to
|
|
148
203
|
* the global install rather than failing the run. Two codes spell it: the
|
|
149
204
|
* package is not installed (`MODULE_NOT_FOUND`), or it is installed but too old
|
|
@@ -173,18 +228,14 @@ function isResolutionNotFound(error) {
|
|
|
173
228
|
*/
|
|
174
229
|
function readVersion(packageJsonPath) {
|
|
175
230
|
try {
|
|
176
|
-
if (!existsSync(packageJsonPath)) {
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
231
|
const content = readFileSync(packageJsonPath, 'utf-8');
|
|
180
232
|
const pkg = JSON.parse(content);
|
|
181
233
|
return pkg.version ?? null;
|
|
182
234
|
}
|
|
183
235
|
catch (error) {
|
|
184
|
-
//
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
// and a broken manifest is the first fact worth seeing.
|
|
236
|
+
// No existence probe: the read's own absence is "not found". A manifest the
|
|
237
|
+
// OS refuses, or one that is not JSON, is not — this wrapper is about to
|
|
238
|
+
// dispatch to that very install, and a broken manifest is the first fact worth seeing.
|
|
188
239
|
if (isPathAbsentError(error))
|
|
189
240
|
return null;
|
|
190
241
|
throw error;
|
|
@@ -202,18 +253,19 @@ function main() {
|
|
|
202
253
|
const args = process.argv.slice(2);
|
|
203
254
|
const debug = process.env['VAT_DEBUG'] === '1';
|
|
204
255
|
// Reported here rather than in the block further down because every dispatch
|
|
205
|
-
// path below ends in `spawnCli
|
|
256
|
+
// path below ends in `spawnCli`.
|
|
206
257
|
reportStdioBlocking(debug);
|
|
207
|
-
// Priority 1: Explicit override via VAT_ROOT_DIR
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
spawnCli(binPath, 'dev', process.env['VAT_ROOT_DIR']);
|
|
258
|
+
// Priority 1 & 2: Explicit override via VAT_BIN or VAT_ROOT_DIR. A named
|
|
259
|
+
// target that cannot be run exits here (ExitCode.ERROR) — it never falls
|
|
260
|
+
// through to dev/local/global resolution below.
|
|
261
|
+
const override = explicitOverride(process.env);
|
|
262
|
+
if (override) {
|
|
263
|
+
if (debug) {
|
|
264
|
+
console.error(`[vat debug] Using ${override.variable} override`);
|
|
265
|
+
console.error(`[vat debug] Binary: ${override.binPath}`);
|
|
216
266
|
}
|
|
267
|
+
spawnCli(override.binPath, 'dev', override.contextPath);
|
|
268
|
+
return;
|
|
217
269
|
}
|
|
218
270
|
// Find the Node monorepo workspace root from the current working directory.
|
|
219
271
|
// bin/vat.ts uses this to locate packages/cli/dist/bin.js in dev mode —
|
|
@@ -222,14 +274,14 @@ function main() {
|
|
|
222
274
|
let binPath;
|
|
223
275
|
let context;
|
|
224
276
|
let binDir;
|
|
225
|
-
// Priority
|
|
277
|
+
// Priority 3: Check for developer mode (inside vibe-agent-toolkit repo)
|
|
226
278
|
const devBin = getDevModeBinary(projectRoot);
|
|
227
279
|
if (devBin) {
|
|
228
280
|
binPath = devBin;
|
|
229
281
|
context = 'dev';
|
|
230
282
|
binDir = dirname(dirname(devBin)); // packages/cli/dist -> packages/cli
|
|
231
283
|
}
|
|
232
|
-
// Priority
|
|
284
|
+
// Priority 4: Check for local install (node_modules)
|
|
233
285
|
else {
|
|
234
286
|
const localBin = findLocalInstall(projectRoot);
|
|
235
287
|
if (localBin) {
|
|
@@ -237,7 +289,7 @@ function main() {
|
|
|
237
289
|
context = 'local';
|
|
238
290
|
binDir = dirname(dirname(localBin)); // node_modules/@vibe-agent-toolkit/cli/dist -> node_modules/@vibe-agent-toolkit/cli
|
|
239
291
|
}
|
|
240
|
-
// Priority
|
|
292
|
+
// Priority 5: Use global install (this script's location)
|
|
241
293
|
else {
|
|
242
294
|
binPath = safePath.resolve(__dirname, '../bin.js');
|
|
243
295
|
context = 'global';
|
package/dist/bin/vat.d.ts
CHANGED
|
@@ -2,10 +2,21 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Smart vat wrapper with context-aware execution
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* -
|
|
5
|
+
* Resolution precedence:
|
|
6
|
+
* 1. `VAT_BIN` — an explicit `dist/bin.js` path, highest precedence. A path
|
|
7
|
+
* that does not exist, or that names this wrapper itself (`dist/bin/vat.js`,
|
|
8
|
+
* which would re-resolve and spawn itself forever), is a hard error
|
|
9
|
+
* (exit 2) — never a silent fall-through to a lower priority.
|
|
10
|
+
* 2. `VAT_ROOT_DIR` — a monorepo checkout root; `<root>/packages/cli/dist/bin.js`
|
|
11
|
+
* must already be built, or this is a hard error (exit 2).
|
|
12
|
+
* 3. Dev mode: Inside vibe-agent-toolkit repo → packages/cli/dist/bin.js (unpackaged dev build)
|
|
13
|
+
* 4. Local install: Project has vibe-agent-toolkit → node_modules version (packaged)
|
|
14
|
+
* 5. Global install: Fallback → globally installed version (packaged)
|
|
15
|
+
*
|
|
16
|
+
* `VAT_TEST_ROOT` is separate from the above: it only changes the directory
|
|
17
|
+
* project-root detection (priorities 3–5) starts from — it never names a
|
|
18
|
+
* binary. For every `VAT_*` variable above, an empty string is treated as
|
|
19
|
+
* unset (`if (process.env[...])`), matching the historical behaviour.
|
|
9
20
|
*
|
|
10
21
|
* Features:
|
|
11
22
|
* - Version detection and comparison
|
package/dist/bin/vat.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vat.d.ts","sourceRoot":"","sources":["../../src/bin/vat.ts"],"names":[],"mappings":";AAEA
|
|
1
|
+
{"version":3,"file":"vat.d.ts","sourceRoot":"","sources":["../../src/bin/vat.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"}
|