@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
|
@@ -0,0 +1,178 @@
|
|
|
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 { accessSync, constants, readdirSync } from 'node:fs';
|
|
7
|
+
import { foreignDatabaseEntries, linkedDatabasePath } from '@vibe-agent-toolkit/rag-lancedb';
|
|
8
|
+
import { classifyFsFault, isFileInTheWayError, isPathAbsentError, isVatError, mkdirSyncReal, RAG_INDEX_EMPTY_CODE, requireFollowedStatSync, TREE_DEST_NOT_OWNED_CODE, VatError, withFsFaultSync } from '@vibe-agent-toolkit/utils';
|
|
9
|
+
import { CommandRefusalError } from './command-refusal.js';
|
|
10
|
+
/** How many foreign entries a refusal names before it summarises the rest. */
|
|
11
|
+
const NAMED_ENTRIES = 5;
|
|
12
|
+
/**
|
|
13
|
+
* How a database path's filesystem fault is classified: on the verb's side (`source` for
|
|
14
|
+
* the verbs that read it, `destination` for `index` and `clear`, which write and remove
|
|
15
|
+
* it), named by `--db` (`argument`) or the project's own default (`content`).
|
|
16
|
+
*/
|
|
17
|
+
function databaseFault(dbPath, side, explicit, action) {
|
|
18
|
+
return { side, origin: explicit ? 'argument' : 'content', action, path: dbPath };
|
|
19
|
+
}
|
|
20
|
+
function probe(fault, read) {
|
|
21
|
+
try {
|
|
22
|
+
return { found: read() };
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
if (isFileInTheWayError(error))
|
|
26
|
+
return { missing: 'file-in-the-way' };
|
|
27
|
+
if (isPathAbsentError(error))
|
|
28
|
+
return { missing: 'absent' };
|
|
29
|
+
throw classifyFsFault(error, fault);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* `stat` the database path. It is the operator's own (`--db`, or the project's default location
|
|
34
|
+
* the operator runs the verb on): its own `within`.
|
|
35
|
+
*/
|
|
36
|
+
function statDatabasePath(dbPath) {
|
|
37
|
+
return requireFollowedStatSync(dbPath, dbPath);
|
|
38
|
+
}
|
|
39
|
+
/** Whether a probe met a file in the way. */
|
|
40
|
+
const fileInTheWay = (probed) => 'missing' in probed && probed.missing === 'file-in-the-way';
|
|
41
|
+
/**
|
|
42
|
+
* Why a path that would not list is not a directory: it is a file itself, or
|
|
43
|
+
* something above it is (`readdir` says ENOTDIR for both).
|
|
44
|
+
*
|
|
45
|
+
* @param dbPath - The path `readdir` refused with ENOTDIR
|
|
46
|
+
* @param fault - How a `stat` the OS refuses is classified
|
|
47
|
+
* @returns The sentence naming which
|
|
48
|
+
*/
|
|
49
|
+
function notADirectory(dbPath, fault) {
|
|
50
|
+
return fileInTheWay(probe(fault, () => statDatabasePath(dbPath))) ? `a path above ${dbPath} is not a directory` : `${dbPath} is not a directory`;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* List the database directory, refusing a path that is not one.
|
|
54
|
+
*
|
|
55
|
+
* @param dbPath - The resolved database path
|
|
56
|
+
* @param explicit - Whether `--db` named it
|
|
57
|
+
* @param side - The verb's side of the database
|
|
58
|
+
* @returns Its typed entries
|
|
59
|
+
*/
|
|
60
|
+
function listDatabase(dbPath, explicit, side) {
|
|
61
|
+
const fault = databaseFault(dbPath, side, explicit, 'list the RAG database');
|
|
62
|
+
const listed = probe(fault, () => readdirSync(dbPath, { withFileTypes: true }));
|
|
63
|
+
if ('found' in listed)
|
|
64
|
+
return listed.found;
|
|
65
|
+
if (fileInTheWay(listed)) {
|
|
66
|
+
// A --db naming a file is the invocation's mistake; the project's own `.rag-db` being one is its state.
|
|
67
|
+
throw new CommandRefusalError(explicit ? 'USAGE_INVALID' : 'INPUT_UNREADABLE', `Not a RAG database: ${notADirectory(dbPath, fault)}.`);
|
|
68
|
+
}
|
|
69
|
+
// A --db naming nothing is the invocation's mistake; the project's own default missing means nothing was indexed.
|
|
70
|
+
throw explicit
|
|
71
|
+
? new CommandRefusalError('USAGE_INVALID', `Path does not exist: ${dbPath}`)
|
|
72
|
+
: new VatError(RAG_INDEX_EMPTY_CODE, `No data indexed yet: there is no RAG database at ${dbPath}. Run vat rag index first.`);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Refuse a path that is not a RAG database, before anything opens or removes it.
|
|
76
|
+
*
|
|
77
|
+
* `stats`, `query` and `clear` act on a database `vat rag index` made. Opening
|
|
78
|
+
* a path creates it, so a mistyped `--db` used to leave a new directory behind
|
|
79
|
+
* and publish `ok`; and `clear` removes recursively, so a `--db` naming any
|
|
80
|
+
* other directory — the project, `$HOME` — used to be deleted with
|
|
81
|
+
* `cleared: true`. A database is a directory holding only VAT's LanceDB tables
|
|
82
|
+
* (or nothing, after an index of nothing); anything else is refused.
|
|
83
|
+
*
|
|
84
|
+
* @param dbPath - The resolved database path
|
|
85
|
+
* @param explicit - Whether `--db` named it; otherwise it is the project default
|
|
86
|
+
* @param side - The verb's side of the database: `source` for `stats` and `query`,
|
|
87
|
+
* which read it; `destination` for `clear`, which removes it
|
|
88
|
+
* @throws {CommandRefusalError} `USAGE_INVALID` for a `--db` that names nothing
|
|
89
|
+
* or a file, and for a `--db` directory holding anything but a RAG database
|
|
90
|
+
* (operating-system litter such as `.DS_Store` aside); `INPUT_UNREADABLE` for
|
|
91
|
+
* a project `.rag-db` that is a file or holds anything else
|
|
92
|
+
* @throws {FsFaultError} for a path the OS will not list, classified on `side`
|
|
93
|
+
* @throws {VatError} `RAG_INDEX_EMPTY` (`INPUT_UNREADABLE`) when the project
|
|
94
|
+
* default is absent: nothing has been indexed, the same refusal a query over
|
|
95
|
+
* an empty index gets
|
|
96
|
+
*/
|
|
97
|
+
export function requireExistingDatabase(dbPath, explicit, side) {
|
|
98
|
+
refuseForeignEntries(dbPath, listDatabase(dbPath, explicit, side), explicit, 'Nothing was read or removed', 'the directory vat rag index wrote');
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Refuse a database directory listing anything a database `vat rag index` made
|
|
102
|
+
* would not hold.
|
|
103
|
+
*
|
|
104
|
+
* @param dbPath - The resolved database path
|
|
105
|
+
* @param entries - Its typed listing
|
|
106
|
+
* @param explicit - Whether `--db` named it; otherwise it is the project default
|
|
107
|
+
* @param untouched - What the refusal left alone, the sentence that opens its fix
|
|
108
|
+
* @param wanted - What a `--db` should name instead
|
|
109
|
+
* @throws {CommandRefusalError} `USAGE_INVALID` for a `--db`, `INPUT_UNREADABLE`
|
|
110
|
+
* for the project's own `.rag-db`
|
|
111
|
+
*/
|
|
112
|
+
function refuseForeignEntries(dbPath, entries, explicit, untouched, wanted) {
|
|
113
|
+
const foreign = foreignDatabaseEntries(dbPath, entries);
|
|
114
|
+
if (foreign.length === 0)
|
|
115
|
+
return;
|
|
116
|
+
const named = foreign.slice(0, NAMED_ENTRIES).join(', ');
|
|
117
|
+
const more = foreign.length > NAMED_ENTRIES ? ` and ${foreign.length - NAMED_ENTRIES} more` : '';
|
|
118
|
+
// A --db naming the wrong directory is the invocation's mistake; the project's own
|
|
119
|
+
// `.rag-db` holding something else is the project's state — no --db was given to fix.
|
|
120
|
+
throw new CommandRefusalError(explicit ? 'USAGE_INVALID' : 'INPUT_UNREADABLE', `Not a RAG database: ${dbPath} holds ${named}${more}, which no database vat rag index made would hold. ` +
|
|
121
|
+
(explicit
|
|
122
|
+
? `${untouched}; point --db at ${wanted}.`
|
|
123
|
+
: `${untouched}; move those entries out of the project's .rag-db, or name another database with --db.`));
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* The refusal a database `vat rag clear` will not remove is — a link (removing it would leave
|
|
127
|
+
* the database it names in place), or a directory holding anything a database does not, as
|
|
128
|
+
* `removeRagDatabase`'s plan judged it (`TREE_DEST_NOT_OWNED`): the invocation's to fix for a
|
|
129
|
+
* `--db`, the project's state for its own `.rag-db`, as {@link refuseForeignEntries} decides.
|
|
130
|
+
*
|
|
131
|
+
* A link's refusal ends with the command that clears the database it leads to.
|
|
132
|
+
*
|
|
133
|
+
* @param error - What the removal threw
|
|
134
|
+
* @param dbPath - The database path the removal was given
|
|
135
|
+
* @param explicit - Whether `--db` named the database; otherwise it is the project default
|
|
136
|
+
* @returns The refusal for a not-owned database; any other error as it is
|
|
137
|
+
*/
|
|
138
|
+
export function notRemovableRefusal(error, dbPath, explicit) {
|
|
139
|
+
if (!isVatError(error, TREE_DEST_NOT_OWNED_CODE))
|
|
140
|
+
return error;
|
|
141
|
+
const real = linkedDatabasePath(dbPath);
|
|
142
|
+
const remedy = real === undefined ? '' : ` Run vat rag clear --db ${real} to clear the database itself.`;
|
|
143
|
+
return new CommandRefusalError(explicit ? 'USAGE_INVALID' : 'INPUT_UNREADABLE', `Not removed: ${error.message}.${remedy}`, { cause: error });
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Make sure `vat rag index` can write its database at `dbPath`, before LanceDB
|
|
147
|
+
* is handed the path: one that cannot hold a database is the caller's input, and
|
|
148
|
+
* one the OS will not let the run write is the run not finishing — neither is a
|
|
149
|
+
* defect in VAT, which is what LanceDB's own failure for either read as.
|
|
150
|
+
*
|
|
151
|
+
* @param dbPath - The resolved database path
|
|
152
|
+
* @param explicit - Whether `--db` named it; otherwise it is the project default
|
|
153
|
+
* @throws {CommandRefusalError} `USAGE_INVALID` for a `--db` that is (or lies
|
|
154
|
+
* under) a file or a directory holding anything a RAG database does not,
|
|
155
|
+
* `INPUT_UNREADABLE` for a project `.rag-db` that is either
|
|
156
|
+
* @throws {FsFaultError} a `destination` fault for a path the OS will not examine
|
|
157
|
+
* or list, and for a database directory the run cannot create or write
|
|
158
|
+
* (`RUN_INCOMPLETE`): the database is what `vat rag index` writes
|
|
159
|
+
*/
|
|
160
|
+
export function requireWritableDatabase(dbPath, explicit) {
|
|
161
|
+
const inputRefusal = explicit ? 'USAGE_INVALID' : 'INPUT_UNREADABLE';
|
|
162
|
+
const fault = databaseFault(dbPath, 'destination', explicit, 'examine the RAG database directory');
|
|
163
|
+
const stats = probe(fault, () => statDatabasePath(dbPath));
|
|
164
|
+
if (fileInTheWay(stats)) {
|
|
165
|
+
throw new CommandRefusalError(inputRefusal, `Cannot index into ${dbPath}: a path above it is not a directory.`);
|
|
166
|
+
}
|
|
167
|
+
if (!('found' in stats)) {
|
|
168
|
+
withFsFaultSync({ ...fault, action: 'create the RAG database directory' }, () => mkdirSyncReal(dbPath, { recursive: true }));
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (!stats.found.isDirectory()) {
|
|
172
|
+
throw new CommandRefusalError(inputRefusal, `Cannot index into ${dbPath}: it is not a directory, so it cannot hold a RAG database.`);
|
|
173
|
+
}
|
|
174
|
+
// LanceDB writes its tables into whatever directory it is handed: `--db .` filled the project root.
|
|
175
|
+
refuseForeignEntries(dbPath, listDatabase(dbPath, explicit, 'destination'), explicit, 'Nothing was indexed', 'a RAG database, an empty directory or a path that does not exist yet');
|
|
176
|
+
withFsFaultSync({ ...fault, action: 'write into the RAG database directory' }, () => accessSync(dbPath, constants.W_OK));
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=rag-database.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rag-database.js","sourceRoot":"","sources":["../../src/utils/rag-database.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAc,MAAM,SAAS,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAA+B,MAAM,iCAAiC,CAAC;AAC1H,OAAO,EAAE,eAAe,EAAoC,mBAAmB,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAErQ,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,8EAA8E;AAC9E,MAAM,aAAa,GAAG,CAAC,CAAC;A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e,CAAC,CAAC,CAAC,kBAAkB,CAAC;IACrE,MAAM,KAAK,GAAG,aAAa,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,oCAAoC,CAAC,CAAC;IACnG,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3D,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,mBAAmB,CAAC,YAAY,EAAE,qBAAqB,MAAM,uCAAuC,CAAC,CAAC;IAClH,CAAC;IACD,IAAI,CAAC,CAAC,OAAO,IAAI,KAAK,CAAC,EAAE,CAAC;QACxB,eAAe,CAAC,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,mCAAmC,EAAE,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAC7H,OAAO;IACT,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;QAC/B,MAAM,IAAI,mBAAmB,CAAC,YAAY,EAAE,qBAAqB,MAAM,4DAA4D,CAAC,CAAC;IACvI,CAAC;IACD,oGAAoG;IACpG,oBAAoB,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,EAAE,QAAQ,EAAE,qBAAqB,EAAE,sEAAsE,CAAC,CAAC;IACrL,eAAe,CAAC,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,uCAAuC,EAAE,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3H,CAAC"}
|
|
@@ -30,9 +30,9 @@ import { type StatedLimit } from '@vibe-agent-toolkit/resources';
|
|
|
30
30
|
/** What a report carries when a lens with stated bounds was evaluated. */
|
|
31
31
|
interface RelationBounds {
|
|
32
32
|
/** The prose frame the limits are read under, stated once. */
|
|
33
|
-
|
|
33
|
+
boundsStatement?: string;
|
|
34
34
|
/** The signed, directional list — what the rows do NOT settle. */
|
|
35
|
-
|
|
35
|
+
limits?: StatedLimit[];
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* The bounds to publish beside an answer, given the lenses the run evaluated.
|
|
@@ -42,6 +42,11 @@ interface RelationBounds {
|
|
|
42
42
|
* `limits: []` would read as "nothing bounds this answer", which is a stronger
|
|
43
43
|
* claim than "this answer contains no row anything bounds".
|
|
44
44
|
*
|
|
45
|
+
* The limits are COPIED out of the readonly registry list: the answer is
|
|
46
|
+
* spread into a published document, and a published document owns no
|
|
47
|
+
* reference into module state a later render could mutate. `vat resources
|
|
48
|
+
* check` and `vat resources query` both publish it, through this one function.
|
|
49
|
+
*
|
|
45
50
|
* @param lensesEvaluated - The run's `lensesEvaluated`, as the provenance names them
|
|
46
51
|
* @returns The bounds keys, or an empty object
|
|
47
52
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relation-limits.d.ts","sourceRoot":"","sources":["../../src/utils/relation-limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;AAIvC,0EAA0E;AAC1E,UAAU,cAAc;IACtB,8DAA8D;IAC9D,
|
|
1
|
+
{"version":3,"file":"relation-limits.d.ts","sourceRoot":"","sources":["../../src/utils/relation-limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;AAIvC,0EAA0E;AAC1E,UAAU,cAAc;IACtB,8DAA8D;IAC9D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kEAAkE;IAClE,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;CACxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,GAAG,cAAc,CAMpF"}
|
|
@@ -36,6 +36,11 @@ import { CLAUDE_CONTEXT_LENS } from './projection-lenses.js';
|
|
|
36
36
|
* `limits: []` would read as "nothing bounds this answer", which is a stronger
|
|
37
37
|
* claim than "this answer contains no row anything bounds".
|
|
38
38
|
*
|
|
39
|
+
* The limits are COPIED out of the readonly registry list: the answer is
|
|
40
|
+
* spread into a published document, and a published document owns no
|
|
41
|
+
* reference into module state a later render could mutate. `vat resources
|
|
42
|
+
* check` and `vat resources query` both publish it, through this one function.
|
|
43
|
+
*
|
|
39
44
|
* @param lensesEvaluated - The run's `lensesEvaluated`, as the provenance names them
|
|
40
45
|
* @returns The bounds keys, or an empty object
|
|
41
46
|
*/
|
|
@@ -44,7 +49,7 @@ export function relationBoundsFor(lensesEvaluated) {
|
|
|
44
49
|
return {};
|
|
45
50
|
return {
|
|
46
51
|
boundsStatement: CLAUDE_CONTEXT_BOUNDS_STATEMENT,
|
|
47
|
-
limits: CLAUDE_CONTEXT_RELATION_LIMITS,
|
|
52
|
+
limits: CLAUDE_CONTEXT_RELATION_LIMITS.map((limit) => ({ ...limit })),
|
|
48
53
|
};
|
|
49
54
|
}
|
|
50
55
|
//# sourceMappingURL=relation-limits.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relation-limits.js","sourceRoot":"","sources":["../../src/utils/relation-limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EACL,+BAA+B,EAC/B,8BAA8B,GAE/B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAU7D
|
|
1
|
+
{"version":3,"file":"relation-limits.js","sourceRoot":"","sources":["../../src/utils/relation-limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EACL,+BAA+B,EAC/B,8BAA8B,GAE/B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAU7D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,iBAAiB,CAAC,eAAkC;IAClE,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACnE,OAAO;QACL,eAAe,EAAE,+BAA+B;QAChD,MAAM,EAAE,8BAA8B,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;KACtE,CAAC;AACJ,CAAC"}
|
|
@@ -42,4 +42,27 @@ export declare function relativizePath(absolutePath: string, root: string): stri
|
|
|
42
42
|
* coordinate systems — so a producer that adds a carrier must name it here.
|
|
43
43
|
*/
|
|
44
44
|
export declare function relativizePathEntries<T extends PathEntry>(entries: readonly T[], root: string, nestedKeys?: readonly string[]): T[];
|
|
45
|
+
/**
|
|
46
|
+
* A relativized location, or `undefined` when it has no relative spelling.
|
|
47
|
+
*
|
|
48
|
+
* On Windows a target on another drive than its root has no path relative to
|
|
49
|
+
* it: `path.relative` hands back the absolute one, which a published finding's
|
|
50
|
+
* `location` refuses — so a run that let it through died on its own document.
|
|
51
|
+
* The lanes that can meet a cross-drive path ask here and degrade (omit the
|
|
52
|
+
* location) or refuse ({@link relativeLocationOrRefuse}).
|
|
53
|
+
*
|
|
54
|
+
* @param location - What `issueLocation` / `safePath.relative` returned
|
|
55
|
+
* @returns The location, unchanged, when it is relative
|
|
56
|
+
*/
|
|
57
|
+
export declare function relativeLocationOrUndefined(location: string): string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* A relativized location, or the invocation's refusal when it has none.
|
|
60
|
+
*
|
|
61
|
+
* @param location - What `issueLocation` / `safePath.relative` returned
|
|
62
|
+
* @param root - What it is relative to, for the message
|
|
63
|
+
* @param verb - The command, for the message (`vat agent validate`)
|
|
64
|
+
* @returns The location, unchanged, when it is relative
|
|
65
|
+
* @throws {CommandRefusalError} `USAGE_INVALID` when it is absolute (another drive)
|
|
66
|
+
*/
|
|
67
|
+
export declare function relativeLocationOrRefuse(location: string, root: string, verb: string): string;
|
|
45
68
|
//# sourceMappingURL=relativize-paths.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relativize-paths.d.ts","sourceRoot":"","sources":["../../src/utils/relativize-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"relativize-paths.d.ts","sourceRoot":"","sources":["../../src/utils/relativize-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,0EAA0E;AAC1E,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAGzE;AA+BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,SAAS,EACvD,OAAO,EAAE,SAAS,CAAC,EAAE,EACrB,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,SAAS,MAAM,EAAO,GACjC,CAAC,EAAE,CAEL;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEhF;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAO7F"}
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
* which values are absolute would silently corrupt an already-relative one.
|
|
16
16
|
* The caller names the nested carriers it owns instead.
|
|
17
17
|
*/
|
|
18
|
-
import { issueLocation } from '@vibe-agent-toolkit/utils';
|
|
18
|
+
import { isAbsoluteAnyPlatform, issueLocation } from '@vibe-agent-toolkit/utils';
|
|
19
|
+
import { CommandRefusalError } from './command-refusal.js';
|
|
19
20
|
/**
|
|
20
21
|
* Re-base one absolute path onto `root`, as a forward-slashed relative path.
|
|
21
22
|
*
|
|
@@ -64,4 +65,34 @@ function relativizeEntry(entry, root, nestedKeys) {
|
|
|
64
65
|
export function relativizePathEntries(entries, root, nestedKeys = []) {
|
|
65
66
|
return entries.map((entry) => relativizeEntry(entry, root, nestedKeys));
|
|
66
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* A relativized location, or `undefined` when it has no relative spelling.
|
|
70
|
+
*
|
|
71
|
+
* On Windows a target on another drive than its root has no path relative to
|
|
72
|
+
* it: `path.relative` hands back the absolute one, which a published finding's
|
|
73
|
+
* `location` refuses — so a run that let it through died on its own document.
|
|
74
|
+
* The lanes that can meet a cross-drive path ask here and degrade (omit the
|
|
75
|
+
* location) or refuse ({@link relativeLocationOrRefuse}).
|
|
76
|
+
*
|
|
77
|
+
* @param location - What `issueLocation` / `safePath.relative` returned
|
|
78
|
+
* @returns The location, unchanged, when it is relative
|
|
79
|
+
*/
|
|
80
|
+
export function relativeLocationOrUndefined(location) {
|
|
81
|
+
return isAbsoluteAnyPlatform(location) ? undefined : location;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* A relativized location, or the invocation's refusal when it has none.
|
|
85
|
+
*
|
|
86
|
+
* @param location - What `issueLocation` / `safePath.relative` returned
|
|
87
|
+
* @param root - What it is relative to, for the message
|
|
88
|
+
* @param verb - The command, for the message (`vat agent validate`)
|
|
89
|
+
* @returns The location, unchanged, when it is relative
|
|
90
|
+
* @throws {CommandRefusalError} `USAGE_INVALID` when it is absolute (another drive)
|
|
91
|
+
*/
|
|
92
|
+
export function relativeLocationOrRefuse(location, root, verb) {
|
|
93
|
+
const relative = relativeLocationOrUndefined(location);
|
|
94
|
+
if (relative !== undefined)
|
|
95
|
+
return relative;
|
|
96
|
+
throw new CommandRefusalError('USAGE_INVALID', `${verb} reports locations relative to ${root}, and ${location} has no path relative to it (it is on another drive). Run from that drive.`);
|
|
97
|
+
}
|
|
67
98
|
//# sourceMappingURL=relativize-paths.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relativize-paths.js","sourceRoot":"","sources":["../../src/utils/relativize-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"relativize-paths.js","sourceRoot":"","sources":["../../src/utils/relativize-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAO3D;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,YAAoB,EAAE,IAAY;IAC/D,MAAM,QAAQ,GAAG,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IACnD,OAAO,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC1C,CAAC;AAED,iFAAiF;AACjF,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,OAAQ,KAA4B,CAAC,IAAI,KAAK,QAAQ,CACvD,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CACtB,KAAQ,EACR,IAAY,EACZ,UAA6B;IAE7B,MAAM,GAAG,GAAG,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;IACjE,4EAA4E;IAC5E,2EAA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@
|
|
|
1
1
|
/**
|
|
2
2
|
* Utilities for loading and crawling resources
|
|
3
3
|
*/
|
|
4
|
-
import { ResourceRegistry, type CrawlSourceKind, type ProjectConfig, type ResourcePopulationSource } from '@vibe-agent-toolkit/resources';
|
|
4
|
+
import { ResourceRegistry, type CrawlPopulation, type CrawlSourceKind, type PopulationOutcome, type ProjectConfig, type ResourcePopulationSource } from '@vibe-agent-toolkit/resources';
|
|
5
5
|
import { GitTracker } from '@vibe-agent-toolkit/utils/git';
|
|
6
6
|
import type { Logger } from './logger.js';
|
|
7
7
|
/**
|
|
@@ -10,7 +10,37 @@ import type { Logger } from './logger.js';
|
|
|
10
10
|
* `walk` is the incumbent `crawlDirectory` route; `projection` is the
|
|
11
11
|
* projection lane behind {@link RESOURCES_CRAWL_ENV}.
|
|
12
12
|
*/
|
|
13
|
-
export type ResourceCrawlLane = '
|
|
13
|
+
export type ResourceCrawlLane = CrawlPopulation['lane'];
|
|
14
|
+
/**
|
|
15
|
+
* The published `population` an observation implies: `null` for the walk —
|
|
16
|
+
* offered no source, or declined the one it was offered — because nothing was
|
|
17
|
+
* populated from or into the store.
|
|
18
|
+
*
|
|
19
|
+
* @param observation - The load's one observation
|
|
20
|
+
* @returns `'store'`, `'derived'` or `null`
|
|
21
|
+
*/
|
|
22
|
+
export declare function publishedPopulation(observation: CrawlPopulation): PopulationOutcome['population'] | null;
|
|
23
|
+
/**
|
|
24
|
+
* Which enumerator the projection lane used, or `null` when the walk ran and
|
|
25
|
+
* there was no extent to source.
|
|
26
|
+
*
|
|
27
|
+
* Reported for the same reason the lane is, one level down. The lane
|
|
28
|
+
* distinguishes the walk from the projection; it does NOT distinguish the
|
|
29
|
+
* projection's two enumerators, and `VAT_EXTENT_SOURCE` is exactly the axis a
|
|
30
|
+
* flip decision turns on. Without this, both arms of that A/B report
|
|
31
|
+
* `projection` and two identical populations mean either "the enumerators
|
|
32
|
+
* agree" or "the switch was ignored" — indistinguishable, and the second is
|
|
33
|
+
* reachable, because `crawlSourceFor` falls back to the walk without saying so
|
|
34
|
+
* when the root is not in a repository.
|
|
35
|
+
*
|
|
36
|
+
* 🪤 NOT a cache-hit marker: on a hit no enumerator runs and it still names the
|
|
37
|
+
* one this process selected, because the source is chosen before the store is
|
|
38
|
+
* asked.
|
|
39
|
+
*
|
|
40
|
+
* @param population - The load's population
|
|
41
|
+
* @returns The enumerator, or `null` for the walk
|
|
42
|
+
*/
|
|
43
|
+
export declare function extentSourceOf(population: CrawlPopulation): CrawlSourceKind | null;
|
|
14
44
|
export interface ResourceLoadResult {
|
|
15
45
|
scanPath: string;
|
|
16
46
|
projectRoot: string;
|
|
@@ -18,30 +48,20 @@ export interface ResourceLoadResult {
|
|
|
18
48
|
registry: ResourceRegistry;
|
|
19
49
|
gitTracker: GitTracker | undefined;
|
|
20
50
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* the same tree that disagree are only interpretable if each says which
|
|
26
|
-
* enumerator produced it. Reading the env var back instead would prove what
|
|
27
|
-
* was ASKED for, never what happened — a distinction that has already voided
|
|
28
|
-
* one whole A/B on this codebase, where both arms silently ran the incumbent.
|
|
29
|
-
*/
|
|
30
|
-
lane: ResourceCrawlLane;
|
|
31
|
-
/**
|
|
32
|
-
* Which enumerator the projection lane used, or `null` when the walk ran and
|
|
33
|
-
* there was no extent to source.
|
|
51
|
+
* Where the population came from: the `CrawlPopulation` the crawl itself
|
|
52
|
+
* returned, carried here unchanged — the one channel, so a load cannot report
|
|
53
|
+
* a lane its crawl did not take. `{ lane: 'walk' }` both when the projection
|
|
54
|
+
* lane is not selected and when the crawl declined the source.
|
|
34
55
|
*
|
|
35
|
-
* Reported
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* so when the root is not in a repository.
|
|
56
|
+
* Reported as a fact about the run rather than about the environment that
|
|
57
|
+
* requested it: two scans of the same tree that disagree are only
|
|
58
|
+
* interpretable if each says which enumerator produced it. Reading the env var
|
|
59
|
+
* back instead would prove what was ASKED for, never what happened — a
|
|
60
|
+
* distinction that has already voided one whole A/B on this codebase, where
|
|
61
|
+
* both arms silently ran the incumbent. See {@link publishedPopulation} and
|
|
62
|
+
* {@link extentSourceOf} for the two views callers publish.
|
|
43
63
|
*/
|
|
44
|
-
|
|
64
|
+
population: CrawlPopulation;
|
|
45
65
|
}
|
|
46
66
|
/**
|
|
47
67
|
* Scope resource include patterns to a subdirectory of the crawl base.
|
|
@@ -55,6 +75,21 @@ export interface ResourceLoadResult {
|
|
|
55
75
|
* `docs/**\/*.md` still matches `docs/a.md`.
|
|
56
76
|
*/
|
|
57
77
|
export declare function scopeIncludeToSubtree(include: readonly string[], relDir: string): string[];
|
|
78
|
+
/**
|
|
79
|
+
* Refuse a `--collection` that names no collection the project declares.
|
|
80
|
+
*
|
|
81
|
+
* A typo'd filter used to run the verb over zero resources and answer with a
|
|
82
|
+
* run-integrity finding (or, in `scan`, a zero count under the typo'd name) —
|
|
83
|
+
* a report about a collection that does not exist. It is the invocation's
|
|
84
|
+
* mistake, and `resources validate` and `resources scan` refuse it the same way.
|
|
85
|
+
* A declared collection that matched no file is NOT refused here: that is a run
|
|
86
|
+
* over nothing, and the writer's run-integrity refusal says so.
|
|
87
|
+
*
|
|
88
|
+
* @param config - The loaded project config, when there is one
|
|
89
|
+
* @param collection - The `--collection` value, when one was passed
|
|
90
|
+
* @throws {CommandRefusalError} `USAGE_INVALID` naming the declared collections
|
|
91
|
+
*/
|
|
92
|
+
export declare function assertDeclaredCollection(config: ProjectConfig | undefined, collection: string | undefined): void;
|
|
58
93
|
/**
|
|
59
94
|
* The env var that selects the crawler behind every resources-crawling verb —
|
|
60
95
|
* `vat resources scan`/`validate`, `vat rag index`, the pipeline oracles, and
|
|
@@ -80,6 +115,17 @@ export declare const RESOURCES_CRAWL_PROJECTION = "projection";
|
|
|
80
115
|
* name it explicitly keep working and keep MEANING the same thing.
|
|
81
116
|
*/
|
|
82
117
|
export declare const RESOURCES_CRAWL_WALK = "walk";
|
|
118
|
+
/**
|
|
119
|
+
* The debug line naming the lane a crawl was offered, for every verb that
|
|
120
|
+
* offers one. Each lane says it — a marker only one lane emitted would make the
|
|
121
|
+
* other identifiable by ABSENCE, which is indistinguishable from a build too
|
|
122
|
+
* old to have either lane — and there is no source only when the walk was
|
|
123
|
+
* selected, so the walk's line names {@link RESOURCES_CRAWL_WALK}.
|
|
124
|
+
*
|
|
125
|
+
* @param populationSource - The source offered to the crawl, if any
|
|
126
|
+
* @returns The line to log
|
|
127
|
+
*/
|
|
128
|
+
export declare function crawlLaneDebugLine(populationSource: ResourcePopulationSource | undefined): string;
|
|
83
129
|
/**
|
|
84
130
|
* Whether this process should source the resources population from a projection.
|
|
85
131
|
*
|
|
@@ -98,9 +144,12 @@ export declare const RESOURCES_CRAWL_WALK = "walk";
|
|
|
98
144
|
* `LINK_BROKEN_FILE` is not reported on this lane.** That is a real loss, it is
|
|
99
145
|
* known, and it is the cost this default was accepted at; closing it is its own
|
|
100
146
|
* change (teaching an extent to admit `120000` entries as their own paths).
|
|
101
|
-
* The omission is no longer SILENT — each declined link is an `info`
|
|
102
|
-
*
|
|
103
|
-
*
|
|
147
|
+
* The omission is no longer SILENT — each declined link is an `info` row under
|
|
148
|
+
* one of the four declined-link codes (`EXTENT_SYMLINK_NOT_REALIZED`,
|
|
149
|
+
* `EXTENT_SYMLINK_TARGET_OUTSIDE_ROOT`, `EXTENT_SYMLINK_TARGET_UNRESOLVED` for a
|
|
150
|
+
* dangling in-root target, `EXTENT_SYMLINK_TARGET_UNREADABLE` for one the OS
|
|
151
|
+
* would not resolve) — but no such row is a `LINK_BROKEN_FILE`
|
|
152
|
+
* finding.
|
|
104
153
|
* {@link RESOURCES_CRAWL_WALK} is the one-value escape hatch meanwhile.
|
|
105
154
|
*
|
|
106
155
|
* Read from the environment at each call rather than memoized at module load:
|
|
@@ -142,16 +191,12 @@ export declare function resourcesProjectionCrawlSelected(): boolean;
|
|
|
142
191
|
* @param options.gitTracker - An already-initialized tracker to reuse. Omit to
|
|
143
192
|
* have one built, which costs a `git ls-files` spawn — and only when the lane
|
|
144
193
|
* is actually selected
|
|
145
|
-
* @param options.observeExtentSource - Called with the enumerator that ran, once
|
|
146
|
-
* per enumerated root. 🪤 NOT a cache-hit marker: on a hit no enumerator runs
|
|
147
|
-
* and this still reports the one this process selected
|
|
148
194
|
* @param work - Given the source, or `undefined` when the walk stays selected
|
|
149
195
|
* @returns Whatever `work` returned
|
|
150
196
|
*/
|
|
151
197
|
export declare function withResourcePopulationSource<T>(options: {
|
|
152
198
|
root: string;
|
|
153
199
|
gitTracker?: GitTracker | undefined;
|
|
154
|
-
observeExtentSource?: ((kind: CrawlSourceKind) => void) | undefined;
|
|
155
200
|
}, work: (populationSource: ResourcePopulationSource | undefined) => Promise<T>): Promise<T>;
|
|
156
201
|
/**
|
|
157
202
|
* Load resources from a path with config support
|
|
@@ -179,7 +224,8 @@ export declare function withResourcePopulationSource<T>(options: {
|
|
|
179
224
|
* @param pathArg - Path argument from CLI (optional)
|
|
180
225
|
* @param projectRoot - Pre-resolved project root from the CLI boundary
|
|
181
226
|
* @param logger - Logger instance
|
|
182
|
-
* @returns Resource load result with registry and
|
|
227
|
+
* @returns Resource load result with registry, metadata and the population the
|
|
228
|
+
* crawl returned
|
|
183
229
|
*/
|
|
184
230
|
export declare function loadResourcesWithConfig(pathArg: string | undefined, projectRoot: string, logger: Logger): Promise<ResourceLoadResult>;
|
|
185
231
|
//# sourceMappingURL=resource-loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-loader.d.ts","sourceRoot":"","sources":["../../src/utils/resource-loader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAKL,gBAAgB,EAEhB,KAAK,eAAe,EAEpB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAE9B,MAAM,+BAA+B,CAAC;A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