@vibe-agent-toolkit/cli 0.2.0-rc.1 → 0.2.0-rc.10
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 +95 -28
- package/dist/bin/vat.js +95 -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 +153 -0
- package/dist/commands/ard/emit.d.ts.map +1 -0
- package/dist/commands/ard/emit.js +276 -0
- package/dist/commands/ard/emit.js.map +1 -0
- package/dist/commands/ard/index.d.ts +12 -0
- package/dist/commands/ard/index.d.ts.map +1 -0
- package/dist/commands/ard/index.js +80 -0
- package/dist/commands/ard/index.js.map +1 -0
- package/dist/commands/ard/surfaces.d.ts +56 -0
- package/dist/commands/ard/surfaces.d.ts.map +1 -0
- package/dist/commands/ard/surfaces.js +150 -0
- package/dist/commands/ard/surfaces.js.map +1 -0
- package/dist/commands/audit/distributed-tree.d.ts +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 +1126 -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 +340 -0
- package/dist/commands/claude/context.d.ts.map +1 -0
- package/dist/commands/claude/context.js +1080 -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 +114 -0
- package/dist/commands/okf/index.js.map +1 -0
- package/dist/commands/okf/validate.d.ts +191 -0
- package/dist/commands/okf/validate.d.ts.map +1 -0
- package/dist/commands/okf/validate.js +190 -0
- package/dist/commands/okf/validate.js.map +1 -0
- package/dist/commands/phase-utils.d.ts +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 +154 -0
- package/dist/commands/resources/check-progress.d.ts.map +1 -0
- package/dist/commands/resources/check-progress.js +222 -0
- package/dist/commands/resources/check-progress.js.map +1 -0
- package/dist/commands/resources/check-supervisor.d.ts +465 -0
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -0
- package/dist/commands/resources/check-supervisor.js +573 -0
- package/dist/commands/resources/check-supervisor.js.map +1 -0
- package/dist/commands/resources/check.d.ts +593 -0
- package/dist/commands/resources/check.d.ts.map +1 -0
- package/dist/commands/resources/check.js +1365 -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 +418 -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 +99 -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 +3 -5
- 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 +138 -20
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +172 -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 +35 -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 +132 -2
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +288 -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 +141 -37
- 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 +35 -26
- package/schemas/ard-emit.json +149 -0
- package/schemas/okf-validate.json +170 -0
- package/schemas/resources-check.json +229 -0
- package/schemas/skill-review.json +230 -0
- package/dist/commands/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
package/README.md
CHANGED
|
@@ -85,7 +85,7 @@ vat doctor --verbose
|
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
**What it checks:**
|
|
88
|
-
- Node.js version (>=
|
|
88
|
+
- Node.js version (>=22.13.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.13.0 (meets requirement: >=22.13.0)
|
|
107
107
|
|
|
108
108
|
✅ Git installed
|
|
109
109
|
git version 2.43.0
|
|
@@ -131,8 +131,8 @@ If checks fail, doctor provides specific suggestions:
|
|
|
131
131
|
|
|
132
132
|
```
|
|
133
133
|
❌ Node.js version
|
|
134
|
-
|
|
135
|
-
💡
|
|
134
|
+
v22.4.0 does not satisfy the required range. Node.js >=22.13.0 required.
|
|
135
|
+
💡 Install a Node.js version in that range: https://nodejs.org/ or use nvm
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
### Configuration
|
|
@@ -140,7 +140,6 @@ If checks fail, doctor provides specific suggestions:
|
|
|
140
140
|
Create `vibe-agent-toolkit.config.yaml` at project root:
|
|
141
141
|
|
|
142
142
|
```yaml
|
|
143
|
-
version: 1
|
|
144
143
|
resources:
|
|
145
144
|
include:
|
|
146
145
|
- "docs/**/*.md"
|
package/dist/bin/vat
CHANGED
|
@@ -16,9 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { spawnSync } from 'node:child_process';
|
|
18
18
|
import { existsSync, readFileSync } from 'node:fs';
|
|
19
|
+
import { createRequire } from 'node:module';
|
|
19
20
|
import { dirname } from 'node:path';
|
|
20
21
|
import { fileURLToPath } from 'node:url';
|
|
21
|
-
import {
|
|
22
|
+
import { ExitCode, installLastResortExit } from '@vibe-agent-toolkit/schema';
|
|
23
|
+
import { findNodeWorkspaceRoot, isPathAbsentError, safePath, } from '@vibe-agent-toolkit/utils';
|
|
24
|
+
import { describeStdioBlocking, makeStdioBlocking, } from '@vibe-agent-toolkit/utils/process';
|
|
22
25
|
// Before ANY output. This file — not bin.ts — is what package.json maps `vat` to,
|
|
23
26
|
// so it is the CLI entry point in every installed copy, and `makeStdioBlocking`
|
|
24
27
|
// is documented as belonging first thing in one. The delegated child applies it
|
|
@@ -39,6 +42,8 @@ function reportStdioBlocking(debug) {
|
|
|
39
42
|
console.error(`[vat debug] ${describeStdioBlocking(stdioBlocking)}`);
|
|
40
43
|
}
|
|
41
44
|
}
|
|
45
|
+
// A throw nothing below caught ends on ExitCode.ERROR, never Node's default 1.
|
|
46
|
+
installLastResortExit();
|
|
42
47
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
43
48
|
function spawnCli(binPath, context, contextPath) {
|
|
44
49
|
const env = {
|
|
@@ -46,12 +51,14 @@ function spawnCli(binPath, context, contextPath) {
|
|
|
46
51
|
VAT_CONTEXT: context,
|
|
47
52
|
VAT_CONTEXT_PATH: contextPath,
|
|
48
53
|
};
|
|
49
|
-
//
|
|
50
|
-
|
|
54
|
+
// The node running this wrapper, never a PATH lookup: the child must be the
|
|
55
|
+
// same binary, and `node` by name is whatever PATH says first.
|
|
56
|
+
const result = spawnSync(process.execPath, [binPath, ...process.argv.slice(2)], {
|
|
51
57
|
stdio: 'inherit',
|
|
52
58
|
env,
|
|
53
59
|
});
|
|
54
|
-
|
|
60
|
+
// A child that died of a signal has no status; that is not a finding.
|
|
61
|
+
process.exit(result.status ?? ExitCode.ERROR);
|
|
55
62
|
}
|
|
56
63
|
/**
|
|
57
64
|
* Check if we're in vibe-agent-toolkit repo (developer mode)
|
|
@@ -64,42 +71,99 @@ function getDevModeBinary(projectRoot) {
|
|
|
64
71
|
const wrapperPath = safePath.join(projectRoot, 'packages/cli/dist/bin/vat.js');
|
|
65
72
|
const binPath = safePath.join(projectRoot, 'packages/cli/dist/bin.js');
|
|
66
73
|
if (process.env['VAT_DEBUG'] === '1') {
|
|
67
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- checking project structure files for debug
|
|
68
74
|
console.error(`[vat debug] Dev check - wrapper: ${wrapperPath} (${existsSync(wrapperPath)})`);
|
|
69
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- checking project structure files for debug
|
|
70
75
|
console.error(`[vat debug] Dev check - bin: ${binPath} (${existsSync(binPath)})`);
|
|
71
76
|
}
|
|
72
77
|
// Both files must exist to confirm we're in vibe-agent-toolkit repo
|
|
73
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- checking project structure files
|
|
74
78
|
if (existsSync(wrapperPath) && existsSync(binPath)) {
|
|
75
79
|
return binPath;
|
|
76
80
|
}
|
|
77
81
|
return null;
|
|
78
82
|
}
|
|
79
83
|
/**
|
|
80
|
-
* Find
|
|
81
|
-
* Walks up directory tree from project root
|
|
84
|
+
* Find the CLI the adopter's lockfile pinned, wherever their package manager put it.
|
|
82
85
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
86
|
+
* Resolved through Node's OWN resolver rather than by probing a path, because the
|
|
87
|
+
* path this used to probe —
|
|
88
|
+
* `<dir>/node_modules/@vibe-agent-toolkit/cli/dist/bin.js` — assumes npm's flat
|
|
89
|
+
* layout and **does not exist under pnpm**. An adopter depending on
|
|
90
|
+
* the umbrella `vibe-agent-toolkit` package gets no top-level
|
|
91
|
+
* `node_modules/@vibe-agent-toolkit/` directory at all; the real CLI lives under
|
|
92
|
+
* `node_modules/.pnpm/@vibe-agent-toolkit+cli@<ver>_<hash>/…`. So priority 3 never
|
|
93
|
+
* fired for them, resolution fell through to priority 4, and whichever copy of
|
|
94
|
+
* `vat.js` happened to be invoked won — silently ignoring the version they pinned.
|
|
95
|
+
* That is the exact failure `findLocalInstall` exists to prevent, and it was
|
|
96
|
+
* invisible on npm/bun, where the flat layout makes the probe succeed.
|
|
97
|
+
*
|
|
98
|
+
* `createRequire` resolution walks the ancestor `node_modules` chain itself, which
|
|
99
|
+
* is what the hand-rolled loop here used to do — and it does so correctly for
|
|
100
|
+
* npm, bun, pnpm and yarn PnP without enumerating any of their layouts.
|
|
101
|
+
*
|
|
102
|
+
* It asks for `package.json` (exported by this package precisely so it can be
|
|
103
|
+
* located) and derives the binary from the package DIRECTORY rather than from the
|
|
104
|
+
* manifest's `bin` field. `bin.vat` names `dist/bin/vat.js` — THIS wrapper — so
|
|
105
|
+
* honouring it would make the wrapper delegate to itself and spawn forever. The
|
|
106
|
+
* target is the real CLI entry, `dist/bin.js`, exactly as before; only the way it
|
|
107
|
+
* is located has changed.
|
|
108
|
+
*
|
|
109
|
+
* TWO resolution bases are tried, and the second is not redundant. Under pnpm's
|
|
110
|
+
* isolated layout only DIRECT dependencies are symlinked into the adopter's
|
|
111
|
+
* top-level `node_modules`, so when the adopter depends on the umbrella
|
|
112
|
+
* `vibe-agent-toolkit` package — the documented way to adopt VAT — the CLI is a
|
|
113
|
+
* TRANSITIVE dependency and is deliberately unreachable from the adopter root.
|
|
114
|
+
* Resolving from the adopter alone would still miss it, which is the umbrella case
|
|
115
|
+
* adopters actually hit. It IS reachable from the umbrella package's own
|
|
116
|
+
* directory, so that package is resolved first (it is a direct dependency, hence
|
|
117
|
+
* visible) and used as the base for the second hop.
|
|
118
|
+
*
|
|
119
|
+
* @param projectRoot - Directory to resolve from; ancestors are searched too.
|
|
120
|
+
* @returns Path to the local `dist/bin.js` if one is installed and built, else null.
|
|
85
121
|
*/
|
|
86
122
|
function findLocalInstall(projectRoot) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
123
|
+
// The base need not exist — `createRequire` treats it purely as the directory
|
|
124
|
+
// to resolve relative to.
|
|
125
|
+
const fromProject = safePath.join(projectRoot, 'noop.js');
|
|
126
|
+
const umbrellaManifest = tryResolve(fromProject, 'vibe-agent-toolkit/package.json');
|
|
127
|
+
const bases = umbrellaManifest === null ? [fromProject] : [fromProject, umbrellaManifest];
|
|
128
|
+
for (const base of bases) {
|
|
129
|
+
const manifestPath = tryResolve(base, '@vibe-agent-toolkit/cli/package.json');
|
|
130
|
+
if (manifestPath === null)
|
|
131
|
+
continue;
|
|
132
|
+
const localBin = safePath.join(dirname(manifestPath), 'dist', 'bin.js');
|
|
133
|
+
// Still existence-checked: a dependency can be installed without having been
|
|
134
|
+
// built (a fresh workspace checkout, a partial install), and spawning a
|
|
135
|
+
// missing file would fail far from its cause.
|
|
136
|
+
if (existsSync(localBin))
|
|
92
137
|
return localBin;
|
|
93
|
-
}
|
|
94
|
-
const parent = dirname(current);
|
|
95
|
-
if (parent === current) {
|
|
96
|
-
// Reached filesystem root
|
|
97
|
-
break;
|
|
98
|
-
}
|
|
99
|
-
current = parent;
|
|
100
138
|
}
|
|
101
139
|
return null;
|
|
102
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* `require.resolve` reduced to "found it, or didn't".
|
|
143
|
+
*
|
|
144
|
+
* A NOT-FOUND is priority 3's ordinary "not applicable" answer — no local
|
|
145
|
+
* install on this base — so it falls through to the next base and ultimately to
|
|
146
|
+
* the global install rather than failing the run. Two codes spell it: the
|
|
147
|
+
* package is not installed (`MODULE_NOT_FOUND`), or it is installed but too old
|
|
148
|
+
* to export its manifest (`ERR_PACKAGE_PATH_NOT_EXPORTED`) — either way no
|
|
149
|
+
* usable local install. Anything else (`ERR_INVALID_ARG_VALUE` from a bad
|
|
150
|
+
* `fromPath`, a loader fault) is not "absent" and stays loud.
|
|
151
|
+
*/
|
|
152
|
+
function tryResolve(fromPath, specifier) {
|
|
153
|
+
try {
|
|
154
|
+
return createRequire(fromPath).resolve(specifier);
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
if (isResolutionNotFound(error))
|
|
158
|
+
return null;
|
|
159
|
+
throw error;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/** The two `require.resolve` codes that mean "nothing usable here". */
|
|
163
|
+
function isResolutionNotFound(error) {
|
|
164
|
+
const code = error?.code;
|
|
165
|
+
return code === 'MODULE_NOT_FOUND' || code === 'ERR_PACKAGE_PATH_NOT_EXPORTED';
|
|
166
|
+
}
|
|
103
167
|
/**
|
|
104
168
|
* Read version from package.json
|
|
105
169
|
* @param packageJsonPath - Path to package.json file
|
|
@@ -107,17 +171,21 @@ function findLocalInstall(projectRoot) {
|
|
|
107
171
|
*/
|
|
108
172
|
function readVersion(packageJsonPath) {
|
|
109
173
|
try {
|
|
110
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- reading version from package.json
|
|
111
174
|
if (!existsSync(packageJsonPath)) {
|
|
112
175
|
return null;
|
|
113
176
|
}
|
|
114
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- reading version from package.json
|
|
115
177
|
const content = readFileSync(packageJsonPath, 'utf-8');
|
|
116
178
|
const pkg = JSON.parse(content);
|
|
117
179
|
return pkg.version ?? null;
|
|
118
180
|
}
|
|
119
|
-
catch {
|
|
120
|
-
|
|
181
|
+
catch (error) {
|
|
182
|
+
// The existence check above is not atomic with the read: a manifest removed
|
|
183
|
+
// between the two is "not found". A manifest the OS refuses, or one that is
|
|
184
|
+
// not JSON, is not — this wrapper is about to dispatch to that very install,
|
|
185
|
+
// and a broken manifest is the first fact worth seeing.
|
|
186
|
+
if (isPathAbsentError(error))
|
|
187
|
+
return null;
|
|
188
|
+
throw error;
|
|
121
189
|
}
|
|
122
190
|
}
|
|
123
191
|
/**
|
|
@@ -137,7 +205,6 @@ function main() {
|
|
|
137
205
|
// Priority 1: Explicit override via VAT_ROOT_DIR
|
|
138
206
|
if (process.env['VAT_ROOT_DIR']) {
|
|
139
207
|
const binPath = safePath.join(process.env['VAT_ROOT_DIR'], 'packages/cli/dist/bin.js');
|
|
140
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- dynamic path from env is expected
|
|
141
208
|
if (existsSync(binPath)) {
|
|
142
209
|
if (debug) {
|
|
143
210
|
console.error('[vat debug] Using VAT_ROOT_DIR override');
|
package/dist/bin/vat.js
CHANGED
|
@@ -16,9 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { spawnSync } from 'node:child_process';
|
|
18
18
|
import { existsSync, readFileSync } from 'node:fs';
|
|
19
|
+
import { createRequire } from 'node:module';
|
|
19
20
|
import { dirname } from 'node:path';
|
|
20
21
|
import { fileURLToPath } from 'node:url';
|
|
21
|
-
import {
|
|
22
|
+
import { ExitCode, installLastResortExit } from '@vibe-agent-toolkit/schema';
|
|
23
|
+
import { findNodeWorkspaceRoot, isPathAbsentError, safePath, } from '@vibe-agent-toolkit/utils';
|
|
24
|
+
import { describeStdioBlocking, makeStdioBlocking, } from '@vibe-agent-toolkit/utils/process';
|
|
22
25
|
// Before ANY output. This file — not bin.ts — is what package.json maps `vat` to,
|
|
23
26
|
// so it is the CLI entry point in every installed copy, and `makeStdioBlocking`
|
|
24
27
|
// is documented as belonging first thing in one. The delegated child applies it
|
|
@@ -39,6 +42,8 @@ function reportStdioBlocking(debug) {
|
|
|
39
42
|
console.error(`[vat debug] ${describeStdioBlocking(stdioBlocking)}`);
|
|
40
43
|
}
|
|
41
44
|
}
|
|
45
|
+
// A throw nothing below caught ends on ExitCode.ERROR, never Node's default 1.
|
|
46
|
+
installLastResortExit();
|
|
42
47
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
43
48
|
function spawnCli(binPath, context, contextPath) {
|
|
44
49
|
const env = {
|
|
@@ -46,12 +51,14 @@ function spawnCli(binPath, context, contextPath) {
|
|
|
46
51
|
VAT_CONTEXT: context,
|
|
47
52
|
VAT_CONTEXT_PATH: contextPath,
|
|
48
53
|
};
|
|
49
|
-
//
|
|
50
|
-
|
|
54
|
+
// The node running this wrapper, never a PATH lookup: the child must be the
|
|
55
|
+
// same binary, and `node` by name is whatever PATH says first.
|
|
56
|
+
const result = spawnSync(process.execPath, [binPath, ...process.argv.slice(2)], {
|
|
51
57
|
stdio: 'inherit',
|
|
52
58
|
env,
|
|
53
59
|
});
|
|
54
|
-
|
|
60
|
+
// A child that died of a signal has no status; that is not a finding.
|
|
61
|
+
process.exit(result.status ?? ExitCode.ERROR);
|
|
55
62
|
}
|
|
56
63
|
/**
|
|
57
64
|
* Check if we're in vibe-agent-toolkit repo (developer mode)
|
|
@@ -64,42 +71,99 @@ function getDevModeBinary(projectRoot) {
|
|
|
64
71
|
const wrapperPath = safePath.join(projectRoot, 'packages/cli/dist/bin/vat.js');
|
|
65
72
|
const binPath = safePath.join(projectRoot, 'packages/cli/dist/bin.js');
|
|
66
73
|
if (process.env['VAT_DEBUG'] === '1') {
|
|
67
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- checking project structure files for debug
|
|
68
74
|
console.error(`[vat debug] Dev check - wrapper: ${wrapperPath} (${existsSync(wrapperPath)})`);
|
|
69
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- checking project structure files for debug
|
|
70
75
|
console.error(`[vat debug] Dev check - bin: ${binPath} (${existsSync(binPath)})`);
|
|
71
76
|
}
|
|
72
77
|
// Both files must exist to confirm we're in vibe-agent-toolkit repo
|
|
73
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- checking project structure files
|
|
74
78
|
if (existsSync(wrapperPath) && existsSync(binPath)) {
|
|
75
79
|
return binPath;
|
|
76
80
|
}
|
|
77
81
|
return null;
|
|
78
82
|
}
|
|
79
83
|
/**
|
|
80
|
-
* Find
|
|
81
|
-
* Walks up directory tree from project root
|
|
84
|
+
* Find the CLI the adopter's lockfile pinned, wherever their package manager put it.
|
|
82
85
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
86
|
+
* Resolved through Node's OWN resolver rather than by probing a path, because the
|
|
87
|
+
* path this used to probe —
|
|
88
|
+
* `<dir>/node_modules/@vibe-agent-toolkit/cli/dist/bin.js` — assumes npm's flat
|
|
89
|
+
* layout and **does not exist under pnpm**. An adopter depending on
|
|
90
|
+
* the umbrella `vibe-agent-toolkit` package gets no top-level
|
|
91
|
+
* `node_modules/@vibe-agent-toolkit/` directory at all; the real CLI lives under
|
|
92
|
+
* `node_modules/.pnpm/@vibe-agent-toolkit+cli@<ver>_<hash>/…`. So priority 3 never
|
|
93
|
+
* fired for them, resolution fell through to priority 4, and whichever copy of
|
|
94
|
+
* `vat.js` happened to be invoked won — silently ignoring the version they pinned.
|
|
95
|
+
* That is the exact failure `findLocalInstall` exists to prevent, and it was
|
|
96
|
+
* invisible on npm/bun, where the flat layout makes the probe succeed.
|
|
97
|
+
*
|
|
98
|
+
* `createRequire` resolution walks the ancestor `node_modules` chain itself, which
|
|
99
|
+
* is what the hand-rolled loop here used to do — and it does so correctly for
|
|
100
|
+
* npm, bun, pnpm and yarn PnP without enumerating any of their layouts.
|
|
101
|
+
*
|
|
102
|
+
* It asks for `package.json` (exported by this package precisely so it can be
|
|
103
|
+
* located) and derives the binary from the package DIRECTORY rather than from the
|
|
104
|
+
* manifest's `bin` field. `bin.vat` names `dist/bin/vat.js` — THIS wrapper — so
|
|
105
|
+
* honouring it would make the wrapper delegate to itself and spawn forever. The
|
|
106
|
+
* target is the real CLI entry, `dist/bin.js`, exactly as before; only the way it
|
|
107
|
+
* is located has changed.
|
|
108
|
+
*
|
|
109
|
+
* TWO resolution bases are tried, and the second is not redundant. Under pnpm's
|
|
110
|
+
* isolated layout only DIRECT dependencies are symlinked into the adopter's
|
|
111
|
+
* top-level `node_modules`, so when the adopter depends on the umbrella
|
|
112
|
+
* `vibe-agent-toolkit` package — the documented way to adopt VAT — the CLI is a
|
|
113
|
+
* TRANSITIVE dependency and is deliberately unreachable from the adopter root.
|
|
114
|
+
* Resolving from the adopter alone would still miss it, which is the umbrella case
|
|
115
|
+
* adopters actually hit. It IS reachable from the umbrella package's own
|
|
116
|
+
* directory, so that package is resolved first (it is a direct dependency, hence
|
|
117
|
+
* visible) and used as the base for the second hop.
|
|
118
|
+
*
|
|
119
|
+
* @param projectRoot - Directory to resolve from; ancestors are searched too.
|
|
120
|
+
* @returns Path to the local `dist/bin.js` if one is installed and built, else null.
|
|
85
121
|
*/
|
|
86
122
|
function findLocalInstall(projectRoot) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
123
|
+
// The base need not exist — `createRequire` treats it purely as the directory
|
|
124
|
+
// to resolve relative to.
|
|
125
|
+
const fromProject = safePath.join(projectRoot, 'noop.js');
|
|
126
|
+
const umbrellaManifest = tryResolve(fromProject, 'vibe-agent-toolkit/package.json');
|
|
127
|
+
const bases = umbrellaManifest === null ? [fromProject] : [fromProject, umbrellaManifest];
|
|
128
|
+
for (const base of bases) {
|
|
129
|
+
const manifestPath = tryResolve(base, '@vibe-agent-toolkit/cli/package.json');
|
|
130
|
+
if (manifestPath === null)
|
|
131
|
+
continue;
|
|
132
|
+
const localBin = safePath.join(dirname(manifestPath), 'dist', 'bin.js');
|
|
133
|
+
// Still existence-checked: a dependency can be installed without having been
|
|
134
|
+
// built (a fresh workspace checkout, a partial install), and spawning a
|
|
135
|
+
// missing file would fail far from its cause.
|
|
136
|
+
if (existsSync(localBin))
|
|
92
137
|
return localBin;
|
|
93
|
-
}
|
|
94
|
-
const parent = dirname(current);
|
|
95
|
-
if (parent === current) {
|
|
96
|
-
// Reached filesystem root
|
|
97
|
-
break;
|
|
98
|
-
}
|
|
99
|
-
current = parent;
|
|
100
138
|
}
|
|
101
139
|
return null;
|
|
102
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* `require.resolve` reduced to "found it, or didn't".
|
|
143
|
+
*
|
|
144
|
+
* A NOT-FOUND is priority 3's ordinary "not applicable" answer — no local
|
|
145
|
+
* install on this base — so it falls through to the next base and ultimately to
|
|
146
|
+
* the global install rather than failing the run. Two codes spell it: the
|
|
147
|
+
* package is not installed (`MODULE_NOT_FOUND`), or it is installed but too old
|
|
148
|
+
* to export its manifest (`ERR_PACKAGE_PATH_NOT_EXPORTED`) — either way no
|
|
149
|
+
* usable local install. Anything else (`ERR_INVALID_ARG_VALUE` from a bad
|
|
150
|
+
* `fromPath`, a loader fault) is not "absent" and stays loud.
|
|
151
|
+
*/
|
|
152
|
+
function tryResolve(fromPath, specifier) {
|
|
153
|
+
try {
|
|
154
|
+
return createRequire(fromPath).resolve(specifier);
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
if (isResolutionNotFound(error))
|
|
158
|
+
return null;
|
|
159
|
+
throw error;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/** The two `require.resolve` codes that mean "nothing usable here". */
|
|
163
|
+
function isResolutionNotFound(error) {
|
|
164
|
+
const code = error?.code;
|
|
165
|
+
return code === 'MODULE_NOT_FOUND' || code === 'ERR_PACKAGE_PATH_NOT_EXPORTED';
|
|
166
|
+
}
|
|
103
167
|
/**
|
|
104
168
|
* Read version from package.json
|
|
105
169
|
* @param packageJsonPath - Path to package.json file
|
|
@@ -107,17 +171,21 @@ function findLocalInstall(projectRoot) {
|
|
|
107
171
|
*/
|
|
108
172
|
function readVersion(packageJsonPath) {
|
|
109
173
|
try {
|
|
110
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- reading version from package.json
|
|
111
174
|
if (!existsSync(packageJsonPath)) {
|
|
112
175
|
return null;
|
|
113
176
|
}
|
|
114
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- reading version from package.json
|
|
115
177
|
const content = readFileSync(packageJsonPath, 'utf-8');
|
|
116
178
|
const pkg = JSON.parse(content);
|
|
117
179
|
return pkg.version ?? null;
|
|
118
180
|
}
|
|
119
|
-
catch {
|
|
120
|
-
|
|
181
|
+
catch (error) {
|
|
182
|
+
// The existence check above is not atomic with the read: a manifest removed
|
|
183
|
+
// between the two is "not found". A manifest the OS refuses, or one that is
|
|
184
|
+
// not JSON, is not — this wrapper is about to dispatch to that very install,
|
|
185
|
+
// and a broken manifest is the first fact worth seeing.
|
|
186
|
+
if (isPathAbsentError(error))
|
|
187
|
+
return null;
|
|
188
|
+
throw error;
|
|
121
189
|
}
|
|
122
190
|
}
|
|
123
191
|
/**
|
|
@@ -137,7 +205,6 @@ function main() {
|
|
|
137
205
|
// Priority 1: Explicit override via VAT_ROOT_DIR
|
|
138
206
|
if (process.env['VAT_ROOT_DIR']) {
|
|
139
207
|
const binPath = safePath.join(process.env['VAT_ROOT_DIR'], 'packages/cli/dist/bin.js');
|
|
140
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- dynamic path from env is expected
|
|
141
208
|
if (existsSync(binPath)) {
|
|
142
209
|
if (debug) {
|
|
143
210
|
console.error('[vat debug] Using VAT_ROOT_DIR override');
|
package/dist/bin/vat.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vat.js","sourceRoot":"","sources":["../../src/bin/vat.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,E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