@vibe-agent-toolkit/cli 0.2.0-rc.10 → 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 +94 -40
- package/dist/bin/vat.d.ts +15 -4
- package/dist/bin/vat.d.ts.map +1 -1
- package/dist/bin/vat.js +94 -40
- 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 +31 -63
- package/dist/commands/ard/emit.d.ts.map +1 -1
- package/dist/commands/ard/emit.js +124 -68
- 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 +17 -10
- 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 +415 -397
- 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 +87 -2
- package/dist/commands/claude/context.d.ts.map +1 -1
- package/dist/commands/claude/context.js +116 -57
- 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 +13 -10
- 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 -145
- package/dist/commands/okf/validate.d.ts.map +1 -1
- package/dist/commands/okf/validate.js +63 -52
- 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 +79 -13
- package/dist/commands/resources/check-progress.d.ts.map +1 -1
- package/dist/commands/resources/check-progress.js +112 -11
- 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 +329 -71
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -1
- package/dist/commands/resources/check-supervisor.js +507 -107
- package/dist/commands/resources/check-supervisor.js.map +1 -1
- package/dist/commands/resources/check.d.ts +88 -254
- package/dist/commands/resources/check.d.ts.map +1 -1
- package/dist/commands/resources/check.js +537 -310
- 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 +189 -103
- 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 +18 -13
- package/dist/commands/resources/query.d.ts.map +1 -1
- package/dist/commands/resources/query.js +61 -49
- 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 -77
- 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 -28
- 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 +44 -5
- 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 +18 -11
- 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 +78 -32
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +134 -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 +17 -20
- 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 +228 -107
- 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 +280 -118
- 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 -189
- package/dist/utils/command-error.d.ts.map +0 -1
- package/dist/utils/command-error.js +0 -230
- package/dist/utils/command-error.js.map +0 -1
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
*/
|
|
48
48
|
import { performance } from 'node:perf_hooks';
|
|
49
49
|
import { allDerivedSpecs, buildResourceProjection, PROJECTION_TABLES, splitProjectionByScope, } from '@vibe-agent-toolkit/resources';
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import { evaluateLens, lensesNamedBy } from './projection-lenses.js';
|
|
50
|
+
import { forEachInOrder, isVatError, VatError } from '@vibe-agent-toolkit/utils';
|
|
51
|
+
import { populateAndReport } from './population-wiring.js';
|
|
52
|
+
import { evaluateLens, lensesNamedBy, lensPopulationOf, } from './projection-lenses.js';
|
|
53
53
|
import { openCompileProbe, openEphemeralQueryStore, withPopulationCache } from './projection-store.js';
|
|
54
54
|
/**
|
|
55
55
|
* The tree hash an in-memory store's one population is filed under.
|
|
@@ -65,6 +65,24 @@ const EPHEMERAL_TREE_HASH = 'ephemeral';
|
|
|
65
65
|
const TABLE_NOT_FOUND = 'no such table:';
|
|
66
66
|
/** What SQLite says when a statement names something the schema does not have. */
|
|
67
67
|
const NAME_NOT_FOUND = [TABLE_NOT_FOUND, 'no such column:'];
|
|
68
|
+
/**
|
|
69
|
+
* A statement's failure, reworded by {@link describeQueryFailure} — keeping
|
|
70
|
+
* the thrown value's `code`.
|
|
71
|
+
*
|
|
72
|
+
* 🔑 The code is what tells the caller WHICH failure this is: the store's
|
|
73
|
+
* `PROJECTION_STATEMENT_REFUSED_CODE` means the statement is wrong (the
|
|
74
|
+
* author's to fix, a `USAGE_INVALID` refusal for `vat resources query`);
|
|
75
|
+
* anything uncoded is a defect. Rewording into a bare `Error` used to drop it,
|
|
76
|
+
* so every refused statement read as VAT's own failure.
|
|
77
|
+
*
|
|
78
|
+
* @param sql - The statement that was submitted
|
|
79
|
+
* @param error - What running or compiling it threw
|
|
80
|
+
* @returns The error to throw in its place
|
|
81
|
+
*/
|
|
82
|
+
function describedFailure(sql, error) {
|
|
83
|
+
const message = describeQueryFailure(sql, error instanceof Error ? error.message : String(error));
|
|
84
|
+
return isVatError(error) ? new VatError(error.code, message, { cause: error }) : new Error(message, { cause: error });
|
|
85
|
+
}
|
|
68
86
|
/**
|
|
69
87
|
* Compile every statement a run intends to ask, against the schema and NO rows,
|
|
70
88
|
* before anything is populated.
|
|
@@ -120,7 +138,7 @@ export async function assertQueriesCompile(statements) {
|
|
|
120
138
|
probe.assertCompiles(sql, parameters);
|
|
121
139
|
}
|
|
122
140
|
catch (error) {
|
|
123
|
-
throw
|
|
141
|
+
throw describedFailure(sql, error);
|
|
124
142
|
}
|
|
125
143
|
}
|
|
126
144
|
}
|
|
@@ -134,8 +152,8 @@ export async function assertQueriesCompile(statements) {
|
|
|
134
152
|
*
|
|
135
153
|
* @param options - The run
|
|
136
154
|
* @param options.root - Absolute corpus root
|
|
137
|
-
* @param options.logger - Where
|
|
138
|
-
* parseable document on stdout stays parseable)
|
|
155
|
+
* @param options.logger - Where the population's refused content is reported
|
|
156
|
+
* (stderr, so a parseable document on stdout stays parseable)
|
|
139
157
|
* @param options.preflight - Every statement this run intends to ask, compiled
|
|
140
158
|
* against the empty schema BEFORE the population starts. See
|
|
141
159
|
* {@link assertQueriesCompile}
|
|
@@ -171,23 +189,12 @@ export async function withQueriedProjection(options, work) {
|
|
|
171
189
|
// fold the caller's statements into a number whose entire purpose is to be
|
|
172
190
|
// read against them. The close is a handle release on an already-open
|
|
173
191
|
// database, not population.
|
|
174
|
-
let contributorRecords = 0;
|
|
175
192
|
const populationStart = performance.now();
|
|
176
193
|
// The file-backed store, when one is selected, and ONLY as a population cache.
|
|
177
194
|
// Its rows are never queried — see the header.
|
|
178
195
|
return withPopulationCache({ root }, async (cache) => {
|
|
179
|
-
// The cache tell
|
|
180
|
-
|
|
181
|
-
// between a served population and a re-derived one. Declared with the clock
|
|
182
|
-
// above rather than here so the two cannot drift apart when one moves.
|
|
183
|
-
const gitTracker = await gitTrackerForProjectRoot(root);
|
|
184
|
-
const projection = await buildResourceProjection({
|
|
185
|
-
root,
|
|
186
|
-
...populationWiring(logger, gitTracker, cache, root),
|
|
187
|
-
onContributorTiming: () => {
|
|
188
|
-
contributorRecords += 1;
|
|
189
|
-
},
|
|
190
|
-
});
|
|
196
|
+
// The cache tell is `populate()`'s own outcome — see `ProjectionProvenance.population`.
|
|
197
|
+
const { projection, outcome } = await populateAndReport({ root, cache, logger, population: 'resources' }, (wiring) => buildResourceProjection({ root, ...wiring }), (result) => result.projection);
|
|
191
198
|
// ONE tree, in a database nothing else can reach, built fresh for this call.
|
|
192
199
|
const store = await openEphemeralQueryStore();
|
|
193
200
|
try {
|
|
@@ -228,12 +235,15 @@ export async function withQueriedProjection(options, work) {
|
|
|
228
235
|
// and this becomes a silent wrong answer: an empty table selecting zero rows.
|
|
229
236
|
const lenses = lensesNamedBy(options.statements);
|
|
230
237
|
const lensStart = performance.now();
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
238
|
+
// Sequential, not `Promise.all`: a lens may populate, and two
|
|
239
|
+
// populations racing for one projection store is the concurrency this
|
|
240
|
+
// lane has no reason to invite.
|
|
241
|
+
const lensPopulations = [];
|
|
242
|
+
await forEachInOrder(lenses, async (lens) => {
|
|
243
|
+
const evaluation = await evaluateLens(lens, { projection, root, cache, logger });
|
|
244
|
+
lensPopulations.push(evaluation.population);
|
|
245
|
+
await store.writeDerived(evaluation.rows);
|
|
246
|
+
});
|
|
237
247
|
const lensMs = performance.now() - lensStart;
|
|
238
248
|
// The shared setup is done. Everything after this line is the caller's.
|
|
239
249
|
const ask = (sql, ...parameters) => {
|
|
@@ -241,11 +251,20 @@ export async function withQueriedProjection(options, work) {
|
|
|
241
251
|
return store.query(sql, ...parameters);
|
|
242
252
|
}
|
|
243
253
|
catch (error) {
|
|
244
|
-
throw
|
|
254
|
+
throw describedFailure(sql, error);
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
const columnsOf = (sql, ...parameters) => {
|
|
258
|
+
try {
|
|
259
|
+
return store.columns(sql, ...parameters);
|
|
260
|
+
}
|
|
261
|
+
catch (error) {
|
|
262
|
+
throw describedFailure(sql, error);
|
|
245
263
|
}
|
|
246
264
|
};
|
|
247
265
|
return await work(ask, {
|
|
248
|
-
population:
|
|
266
|
+
population: outcome.population,
|
|
267
|
+
lensPopulation: lensPopulationOf(lensPopulations),
|
|
249
268
|
populationMs,
|
|
250
269
|
lensMs,
|
|
251
270
|
lensesEvaluated: lenses.map((lens) => lens.name),
|
|
@@ -254,7 +273,7 @@ export async function withQueriedProjection(options, work) {
|
|
|
254
273
|
// a `SELECT COUNT(*)`: a count that travelled through the same `ask` the
|
|
255
274
|
// caller's statements do would be broken by the very schema drift it
|
|
256
275
|
// exists to survive, and it is the population's size either way.
|
|
257
|
-
{ membersEnumerated: projection.resourceRealizations.length }, projection);
|
|
276
|
+
{ membersEnumerated: projection.resourceRealizations.length }, projection, columnsOf);
|
|
258
277
|
}
|
|
259
278
|
finally {
|
|
260
279
|
// Closed however the work ends. An in-memory database is reclaimed with the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection-query.js","sourceRoot":"","sources":["../../src/utils/projection-query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"projection-query.js","sourceRoot":"","sources":["../../src/utils/projection-query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,GAGvB,MAAM,+BAA+B,CAAC;AACvC,O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AI,CAAC,CAAC;IACvD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC;QAC9B,CAAC,CAAC,qDAAqD;QACvD,CAAC,CAAC,iDAAiD,CAAC;IAEtD,OAAO,GAAG,OAAO,OAAO,OAAO,KAAK,OAAO,EAAE,CAAC;AAChD,CAAC"}
|
|
@@ -269,8 +269,8 @@ export declare function openCompileProbe(): Promise<ProjectionSqlite.ProjectionC
|
|
|
269
269
|
* establishes it — but "every default run of those two commands" was a claim
|
|
270
270
|
* nothing had counted.
|
|
271
271
|
*
|
|
272
|
-
* ✅ **VAT's declared floor is now `>=22.
|
|
273
|
-
* SUPPORTED Node.** It used to: the manifests said `>=22.0.0` while these two
|
|
272
|
+
* ✅ **VAT's declared floor is now `>=22.16.0` (raised past 22.13.0 for
|
|
273
|
+
* `StatementSync.columns()`), so this no longer fires on a SUPPORTED Node.** It used to: the manifests said `>=22.0.0` while these two
|
|
274
274
|
* commands could not run below 22.13.0, which meant thirteen Node patch
|
|
275
275
|
* releases were advertised as supported and hard-failed here. The floor was
|
|
276
276
|
* raised to stop advertising what VAT cannot do. The branch stays load-bearing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection-store.d.ts","sourceRoot":"","sources":["../../src/utils/projection-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAIH,OAAO,KAAK,KAAK,gBAAgB,MAAM,uCAAuC,CAAC;AAC/E,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"projection-store.d.ts","sourceRoot":"","sources":["../../src/utils/projection-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAIH,OAAO,KAAK,KAAK,gBAAgB,MAAM,uCAAuC,CAAC;AAC/E,OAAO,KAAK,EAAE,eAAe,EAAmB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C,CAAC,EACnC,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EACzB,IAAI,EAAE,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,GACvD,OAAO,CAAC,CAAC,CAAC,CAmCZ"}
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
48
48
|
import { parseEnvBoolean } from '@vibe-agent-toolkit/utils';
|
|
49
49
|
import { freshGitTreeSnapshot, gitTreeSnapshot, withGitSnapshotCache } from '@vibe-agent-toolkit/utils/git';
|
|
50
|
-
import {
|
|
50
|
+
import { noticeToOperator, withNoticeLedger } from './operator-notices.js';
|
|
51
|
+
import { isModuleMissing, missingBackendError } from './optional-backend.js';
|
|
51
52
|
import { installSqliteWarningFilter } from './sqlite-experimental-warning.js';
|
|
52
53
|
/**
|
|
53
54
|
* The env var that selects — or now, DESELECTS — a projection store for this
|
|
@@ -191,6 +192,33 @@ export function projectionStoreSelected() {
|
|
|
191
192
|
return false;
|
|
192
193
|
return parseEnvBoolean(selector) !== false;
|
|
193
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* The snapshot that keys `root`'s store entry, or `null` — after telling the operator, once per
|
|
197
|
+
* root per command run (the notice scope {@link withPopulationCache} enters), that the run
|
|
198
|
+
* populates without a cache.
|
|
199
|
+
*
|
|
200
|
+
* `gitTreeSnapshot` returns null for every "git could not answer" case — no `git` on PATH, not a
|
|
201
|
+
* repository, a bare or unreadable one — and an empty snapshot of an initialized repository stays
|
|
202
|
+
* distinguishable from it.
|
|
203
|
+
*
|
|
204
|
+
* 🪤 Once per root: `vat validate`'s orchestrator scope and each lane's own scope inside it both ask
|
|
205
|
+
* when the outer one could not key ({@link joinableCache} "asks again" for a root it cannot vouch
|
|
206
|
+
* for), and the answer — and the notice — is the same every time.
|
|
207
|
+
*
|
|
208
|
+
* @param root - The absolute corpus root
|
|
209
|
+
* @returns The snapshot, or `null` when the tree cannot be keyed
|
|
210
|
+
*/
|
|
211
|
+
function storeKeyOrNotice(root) {
|
|
212
|
+
const snapshot = gitTreeSnapshot({ cwd: root });
|
|
213
|
+
if (snapshot === null) {
|
|
214
|
+
// Not "the selector is set": the store is on by default, so most users who
|
|
215
|
+
// see this never wrote the variable.
|
|
216
|
+
noticeToOperator('store', `The projection store is on, but ${root} is not inside a readable git`
|
|
217
|
+
+ ' repository, so there is no deterministic key to store a projection under.'
|
|
218
|
+
+ ` Populating without a cache. Set ${PROJECTION_STORE_ENV}=${PROJECTION_STORE_OFF} to silence this.`, root);
|
|
219
|
+
}
|
|
220
|
+
return snapshot;
|
|
221
|
+
}
|
|
194
222
|
/**
|
|
195
223
|
* Open the projection store this process selected, keyed to one tree.
|
|
196
224
|
*
|
|
@@ -209,18 +237,10 @@ export async function openPopulationCache(options) {
|
|
|
209
237
|
if (!projectionStoreSelected())
|
|
210
238
|
return undefined;
|
|
211
239
|
// Before the import, so a corpus outside a repository costs nothing and says
|
|
212
|
-
// why.
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
const snapshot = gitTreeSnapshot({ cwd: options.root });
|
|
216
|
-
if (snapshot === null) {
|
|
217
|
-
// Not "the selector is set": the store is on by default, so most users who
|
|
218
|
-
// see this never wrote the variable.
|
|
219
|
-
process.stderr.write(`The projection store is on, but ${options.root} is not inside a readable git`
|
|
220
|
-
+ ' repository, so there is no deterministic key to store a projection under.'
|
|
221
|
-
+ ` Populating without a cache. Set ${PROJECTION_STORE_ENV}=${PROJECTION_STORE_OFF} to silence this.\n`);
|
|
240
|
+
// why.
|
|
241
|
+
const snapshot = storeKeyOrNotice(options.root);
|
|
242
|
+
if (snapshot === null)
|
|
222
243
|
return undefined;
|
|
223
|
-
}
|
|
224
244
|
const store = await loadStore();
|
|
225
245
|
const cwd = options.root;
|
|
226
246
|
return {
|
|
@@ -233,7 +253,7 @@ export async function openPopulationCache(options) {
|
|
|
233
253
|
};
|
|
234
254
|
}
|
|
235
255
|
/**
|
|
236
|
-
* Load the selected backend, or
|
|
256
|
+
* Load the selected backend, or throw its `BACKEND_UNAVAILABLE` refusal when it is uninstalled.
|
|
237
257
|
*
|
|
238
258
|
* 🪤 Only `ERR_MODULE_NOT_FOUND` means "not installed". A Node older than
|
|
239
259
|
* 22.13.0 has no `node:sqlite` at all and fails with a *different* code, which
|
|
@@ -285,7 +305,7 @@ export async function openCompileProbe() {
|
|
|
285
305
|
return (await loadBackend()).openProjectionCompileProbe();
|
|
286
306
|
}
|
|
287
307
|
/**
|
|
288
|
-
* Load the selected backend module, or
|
|
308
|
+
* Load the selected backend module, or throw its `BACKEND_UNAVAILABLE` refusal when it is uninstalled.
|
|
289
309
|
*
|
|
290
310
|
* @returns The backend's module namespace
|
|
291
311
|
*/
|
|
@@ -309,7 +329,8 @@ async function loadBackend() {
|
|
|
309
329
|
throw floor;
|
|
310
330
|
if (!isModuleMissing(error))
|
|
311
331
|
throw error;
|
|
312
|
-
|
|
332
|
+
// Thrown into the verb's own catch, which publishes BACKEND_UNAVAILABLE in its shape.
|
|
333
|
+
throw missingBackendError(PROJECTION_STORE_BACKEND);
|
|
313
334
|
}
|
|
314
335
|
finally {
|
|
315
336
|
restoreWarnings();
|
|
@@ -354,8 +375,8 @@ async function loadBackend() {
|
|
|
354
375
|
* establishes it — but "every default run of those two commands" was a claim
|
|
355
376
|
* nothing had counted.
|
|
356
377
|
*
|
|
357
|
-
* ✅ **VAT's declared floor is now `>=22.
|
|
358
|
-
* SUPPORTED Node.** It used to: the manifests said `>=22.0.0` while these two
|
|
378
|
+
* ✅ **VAT's declared floor is now `>=22.16.0` (raised past 22.13.0 for
|
|
379
|
+
* `StatementSync.columns()`), so this no longer fires on a SUPPORTED Node.** It used to: the manifests said `>=22.0.0` while these two
|
|
359
380
|
* commands could not run below 22.13.0, which meant thirteen Node patch
|
|
360
381
|
* releases were advertised as supported and hard-failed here. The floor was
|
|
361
382
|
* raised to stop advertising what VAT cannot do. The branch stays load-bearing
|
|
@@ -386,7 +407,7 @@ export function nodeSqliteFloorFailure(error) {
|
|
|
386
407
|
// the next time the floor moves.
|
|
387
408
|
+ ` \`node:sqlite\` loads unflagged from Node 22.13.0 (added in 22.5.0 behind`
|
|
388
409
|
+ ` \`--experimental-sqlite\`) — you are on ${process.version}.`
|
|
389
|
-
+ ' Upgrade Node to
|
|
410
|
+
+ ' Upgrade Node to the floor `vat doctor` reports. Installing a package will not help:'
|
|
390
411
|
+ ' the module is built into Node, not published to npm.');
|
|
391
412
|
}
|
|
392
413
|
/**
|
|
@@ -490,33 +511,41 @@ async function runOwnedScope(options, work) {
|
|
|
490
511
|
* @param work - Given the cache, or `undefined` when there is none to give
|
|
491
512
|
* @returns Whatever `work` returned
|
|
492
513
|
*/
|
|
493
|
-
export
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
514
|
+
export function withPopulationCache(options, work) {
|
|
515
|
+
try {
|
|
516
|
+
const active = populationScope.getStore();
|
|
517
|
+
if (active !== undefined) {
|
|
518
|
+
const joinable = joinableCache(active.opened, options.root);
|
|
519
|
+
// 🪤 No new git bracket on either path: an inner scope stays inside the
|
|
520
|
+
// outer one's memo, which is where the deduplication lives. A fresh bracket
|
|
521
|
+
// here would start an empty memo and re-snapshot the same repository — a
|
|
522
|
+
// dedupe that does nothing while looking exactly like one that works.
|
|
523
|
+
return joinable === undefined ? runOwnedScope(options, work) : work(joinable.cache);
|
|
524
|
+
}
|
|
525
|
+
// ONE git snapshot for the whole scope, and this is the level that gets it:
|
|
526
|
+
// `openPopulationCache` below takes one to derive the store key, and the crawl
|
|
527
|
+
// that runs inside `work` takes another to enumerate the extent — same
|
|
528
|
+
// repository, sequentially, ~195 ms and ~159 ms measured on a large monorepo.
|
|
529
|
+
//
|
|
530
|
+
// The correctness half matters more than the saving. Taken separately, a
|
|
531
|
+
// working-tree edit landing between them makes the two snapshots DIFFERENT
|
|
532
|
+
// answers, and the extent from the second is then filed under the key from the
|
|
533
|
+
// first: a cache entry whose key does not describe its contents, written
|
|
534
|
+
// silently. The bracket closes that race rather than merely deduplicating.
|
|
535
|
+
//
|
|
536
|
+
// Opened here rather than around either consumer because it must enclose BOTH
|
|
537
|
+
// — a bracket opened deeper than one of them dedupes nothing while looking
|
|
538
|
+
// exactly like a bracket that works. Every CLI entry into the projection lane
|
|
539
|
+
// (`inventory`, `resource-loader`'s two) reaches the store through this scope,
|
|
540
|
+
// and `vat validate`'s orchestrator holds one OUTSIDE all of them, which the
|
|
541
|
+
// nesting above is what makes safe.
|
|
542
|
+
//
|
|
543
|
+
// And the notice scope: the "cannot key this root" notice is printed once per root per
|
|
544
|
+
// command run — this outermost scope's ledger, which every nested scope joins.
|
|
545
|
+
return withNoticeLedger(() => withGitSnapshotCache(() => runOwnedScope(options, work)));
|
|
546
|
+
}
|
|
547
|
+
catch (error) {
|
|
548
|
+
return Promise.reject(error);
|
|
502
549
|
}
|
|
503
|
-
// ONE git snapshot for the whole scope, and this is the level that gets it:
|
|
504
|
-
// `openPopulationCache` below takes one to derive the store key, and the crawl
|
|
505
|
-
// that runs inside `work` takes another to enumerate the extent — same
|
|
506
|
-
// repository, sequentially, ~195 ms and ~159 ms measured on a large monorepo.
|
|
507
|
-
//
|
|
508
|
-
// The correctness half matters more than the saving. Taken separately, a
|
|
509
|
-
// working-tree edit landing between them makes the two snapshots DIFFERENT
|
|
510
|
-
// answers, and the extent from the second is then filed under the key from the
|
|
511
|
-
// first: a cache entry whose key does not describe its contents, written
|
|
512
|
-
// silently. The bracket closes that race rather than merely deduplicating.
|
|
513
|
-
//
|
|
514
|
-
// Opened here rather than around either consumer because it must enclose BOTH
|
|
515
|
-
// — a bracket opened deeper than one of them dedupes nothing while looking
|
|
516
|
-
// exactly like a bracket that works. Every CLI entry into the projection lane
|
|
517
|
-
// (`inventory`, `resource-loader`'s two) reaches the store through this scope,
|
|
518
|
-
// and `vat validate`'s orchestrator holds one OUTSIDE all of them, which the
|
|
519
|
-
// nesting above is what makes safe.
|
|
520
|
-
return withGitSnapshotCache(() => runOwnedScope(options, work));
|
|
521
550
|
}
|
|
522
551
|
//# sourceMappingURL=projection-store.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection-store.js","sourceRoot":"","sources":["../../src/utils/projection-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAIrD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"projection-store.js","sourceRoot":"","sources":["../../src/utils/projection-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAIrD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAwB,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAElI,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAwB,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAAC;AAEhD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C;;;;;;;;;;;;;;;;;;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;IAExD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,EAAE,CAAC;QAC1C,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;YAC5D,wEAAwE;YACxE,4EAA4E;YAC5E,yEAAyE;YACzE,sEAAsE;YACtE,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACtF,CAAC;QACD,4EAA4E;QAC5E,+EAA+E;QAC/E,uEAAuE;QACvE,8EAA8E;QAC9E,EAAE;QACF,yEAAyE;QACzE,2EAA2E;QAC3E,+EAA+E;QAC/E,yEAAyE;QACzE,2EAA2E;QAC3E,EAAE;QACF,8EAA8E;QAC9E,2EAA2E;QAC3E,8EAA8E;QAC9E,+EAA+E;QAC/E,6EAA6E;QAC7E,oCAAoC;QACpC,EAAE;QACF,uFAAuF;QACvF,+EAA+E;QAC/E,OAAO,gBAAgB,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAC1F,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,OAAO,CAAC,MAAM,CAAC,KAAc,CAAC,CAAC;IACxC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one check every `vat rag` verb makes before acting on a database: that it
|
|
3
|
+
* IS a RAG database — and, for `stats`, `query` and `clear`, that it is there.
|
|
4
|
+
* Apart from the command modules, which do not read the filesystem themselves.
|
|
5
|
+
*/
|
|
6
|
+
import { type FsSide } from '@vibe-agent-toolkit/utils';
|
|
7
|
+
/**
|
|
8
|
+
* Refuse a path that is not a RAG database, before anything opens or removes it.
|
|
9
|
+
*
|
|
10
|
+
* `stats`, `query` and `clear` act on a database `vat rag index` made. Opening
|
|
11
|
+
* a path creates it, so a mistyped `--db` used to leave a new directory behind
|
|
12
|
+
* and publish `ok`; and `clear` removes recursively, so a `--db` naming any
|
|
13
|
+
* other directory — the project, `$HOME` — used to be deleted with
|
|
14
|
+
* `cleared: true`. A database is a directory holding only VAT's LanceDB tables
|
|
15
|
+
* (or nothing, after an index of nothing); anything else is refused.
|
|
16
|
+
*
|
|
17
|
+
* @param dbPath - The resolved database path
|
|
18
|
+
* @param explicit - Whether `--db` named it; otherwise it is the project default
|
|
19
|
+
* @param side - The verb's side of the database: `source` for `stats` and `query`,
|
|
20
|
+
* which read it; `destination` for `clear`, which removes it
|
|
21
|
+
* @throws {CommandRefusalError} `USAGE_INVALID` for a `--db` that names nothing
|
|
22
|
+
* or a file, and for a `--db` directory holding anything but a RAG database
|
|
23
|
+
* (operating-system litter such as `.DS_Store` aside); `INPUT_UNREADABLE` for
|
|
24
|
+
* a project `.rag-db` that is a file or holds anything else
|
|
25
|
+
* @throws {FsFaultError} for a path the OS will not list, classified on `side`
|
|
26
|
+
* @throws {VatError} `RAG_INDEX_EMPTY` (`INPUT_UNREADABLE`) when the project
|
|
27
|
+
* default is absent: nothing has been indexed, the same refusal a query over
|
|
28
|
+
* an empty index gets
|
|
29
|
+
*/
|
|
30
|
+
export declare function requireExistingDatabase(dbPath: string, explicit: boolean, side: FsSide): void;
|
|
31
|
+
/**
|
|
32
|
+
* The refusal a database `vat rag clear` will not remove is — a link (removing it would leave
|
|
33
|
+
* the database it names in place), or a directory holding anything a database does not, as
|
|
34
|
+
* `removeRagDatabase`'s plan judged it (`TREE_DEST_NOT_OWNED`): the invocation's to fix for a
|
|
35
|
+
* `--db`, the project's state for its own `.rag-db`, as {@link refuseForeignEntries} decides.
|
|
36
|
+
*
|
|
37
|
+
* A link's refusal ends with the command that clears the database it leads to.
|
|
38
|
+
*
|
|
39
|
+
* @param error - What the removal threw
|
|
40
|
+
* @param dbPath - The database path the removal was given
|
|
41
|
+
* @param explicit - Whether `--db` named the database; otherwise it is the project default
|
|
42
|
+
* @returns The refusal for a not-owned database; any other error as it is
|
|
43
|
+
*/
|
|
44
|
+
export declare function notRemovableRefusal(error: unknown, dbPath: string, explicit: boolean): unknown;
|
|
45
|
+
/**
|
|
46
|
+
* Make sure `vat rag index` can write its database at `dbPath`, before LanceDB
|
|
47
|
+
* is handed the path: one that cannot hold a database is the caller's input, and
|
|
48
|
+
* one the OS will not let the run write is the run not finishing — neither is a
|
|
49
|
+
* defect in VAT, which is what LanceDB's own failure for either read as.
|
|
50
|
+
*
|
|
51
|
+
* @param dbPath - The resolved database path
|
|
52
|
+
* @param explicit - Whether `--db` named it; otherwise it is the project default
|
|
53
|
+
* @throws {CommandRefusalError} `USAGE_INVALID` for a `--db` that is (or lies
|
|
54
|
+
* under) a file or a directory holding anything a RAG database does not,
|
|
55
|
+
* `INPUT_UNREADABLE` for a project `.rag-db` that is either
|
|
56
|
+
* @throws {FsFaultError} a `destination` fault for a path the OS will not examine
|
|
57
|
+
* or list, and for a database directory the run cannot create or write
|
|
58
|
+
* (`RUN_INCOMPLETE`): the database is what `vat rag index` writes
|
|
59
|
+
*/
|
|
60
|
+
export declare function requireWritableDatabase(dbPath: string, explicit: boolean): void;
|
|
61
|
+
//# sourceMappingURL=rag-database.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rag-database.d.ts","sourceRoot":"","sources":["../../src/utils/rag-database.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAwC,KAAK,MAAM,EAAyK,MAAM,2BAA2B,CAAC;AA8ErQ;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAE7F;AA8BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAK9F;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAiB/E"}
|