@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
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
* `.action(...)` callbacks). Inner library functions should take the resolved
|
|
13
13
|
* root as a parameter â never call `findProjectRoot` themselves.
|
|
14
14
|
*/
|
|
15
|
+
import { type Stats } from 'node:fs';
|
|
16
|
+
import { type SideOfPath, type SourceOrigin } from '@vibe-agent-toolkit/utils';
|
|
15
17
|
import type { Logger } from './logger.js';
|
|
16
18
|
/**
|
|
17
19
|
* `required` policy â refuse to run if no projectRoot can be discovered.
|
|
@@ -47,7 +49,78 @@ export declare function projectRootOrNull(startDir: string): string | null;
|
|
|
47
49
|
*
|
|
48
50
|
* @param pathArg - The argument as typed, relative to cwd or absolute
|
|
49
51
|
* @returns The resolved absolute path
|
|
50
|
-
* @throws
|
|
52
|
+
* @throws {CommandRefusalError} `USAGE_INVALID` when it is not a directory
|
|
53
|
+
* @throws {FsFaultError} a `source` fault named by an argument when the `stat` throws:
|
|
54
|
+
* absent is the table's `USAGE_INVALID`, a refusal (an `EACCES` parent) `INPUT_UNREADABLE`
|
|
51
55
|
*/
|
|
52
56
|
export declare function assertDirectoryArgument(pathArg: string): string;
|
|
57
|
+
/**
|
|
58
|
+
* What an absent input means at its call site: who named it â the refusal table decides
|
|
59
|
+
* the code from that â and the sentence naming the remedy.
|
|
60
|
+
*/
|
|
61
|
+
interface AbsentInput {
|
|
62
|
+
readonly origin: SourceOrigin;
|
|
63
|
+
readonly message: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The refusal for an input the CONFIG, an earlier step or the command line names whose
|
|
67
|
+
* `stat` or read threw: classified as a `source` fault of the input's origin. An absence
|
|
68
|
+
* keeps the caller's sentence â a `files[].source` nothing built, a `publish.changelog`
|
|
69
|
+
* naming no file â under the refusal the table owes that origin, carrying the classified
|
|
70
|
+
* fault as its cause; anything else is the classified fault itself.
|
|
71
|
+
*/
|
|
72
|
+
export declare function classifyInputFault(resolved: string, error: unknown, absent: AbsentInput): unknown;
|
|
73
|
+
/** A config key naming a file that is not there: the config's mistake. */
|
|
74
|
+
export declare function configNamedFileAbsent(key: string, named: string): AbsentInput;
|
|
75
|
+
/**
|
|
76
|
+
* Refuse unless `resolved` can be stat'ed.
|
|
77
|
+
*
|
|
78
|
+
* @param within - The tree `resolved` is read in, whose links are read before the kernel follows
|
|
79
|
+
* them (a project root); `resolved` itself when it IS the operator's own argument
|
|
80
|
+
* @param sideOf - The side of each path the `stat` touches â `resolved`, and each component walked beneath
|
|
81
|
+
* `within`: a refusal is charged to the side of the path the OS refused
|
|
82
|
+
* @returns What the `stat` found
|
|
83
|
+
* @throws {CommandRefusalError} `absent` when nothing is there (the refusal its origin owes)
|
|
84
|
+
* @throws {FsFaultError} when the OS refuses the `stat`, or the chain names a network or device path
|
|
85
|
+
*/
|
|
86
|
+
export declare function requireInputPath(resolved: string, within: string, absent: AbsentInput, sideOf: SideOfPath): Stats;
|
|
87
|
+
/**
|
|
88
|
+
* Read a UTF-8 input file, refusing like {@link requireInputPath}.
|
|
89
|
+
*
|
|
90
|
+
* @throws {CommandRefusalError} `absent` when nothing is there (the refusal its origin owes)
|
|
91
|
+
* @throws {FsFaultError} when it cannot be read
|
|
92
|
+
*/
|
|
93
|
+
export declare function readInputFile(resolved: string, absent: AbsentInput): string;
|
|
94
|
+
/**
|
|
95
|
+
* Why a DIRECTORY argument cannot be read, or `undefined` when it can be.
|
|
96
|
+
*
|
|
97
|
+
* A probe, not a listing: the verb's own walk owns enumeration; this only asks
|
|
98
|
+
* whether it can start. A directory the OS will not let the process list or
|
|
99
|
+
* enter is an input that exists and cannot be read â `INPUT_UNREADABLE`, never
|
|
100
|
+
* "not found" and never a finding about a tree nothing was read from.
|
|
101
|
+
*
|
|
102
|
+
* @param dir - The resolved argument, known to be a directory
|
|
103
|
+
* @returns The classified `source` fault (origin `argument`), or `undefined`
|
|
104
|
+
*/
|
|
105
|
+
export declare function unlistableDirectoryRefusal(dir: string): unknown;
|
|
106
|
+
/**
|
|
107
|
+
* {@link assertDirectoryArgument}, plus the one more way a directory argument
|
|
108
|
+
* can leave nothing to examine: the OS will not let the process read it.
|
|
109
|
+
*
|
|
110
|
+
* @param pathArg - The argument as typed, relative to cwd or absolute
|
|
111
|
+
* @returns The resolved absolute path
|
|
112
|
+
* @throws {CommandRefusalError} `USAGE_INVALID` when it is not a directory
|
|
113
|
+
* @throws {FsFaultError} when it does not exist (`USAGE_INVALID`) or cannot be listed
|
|
114
|
+
*/
|
|
115
|
+
export declare function assertReadableDirectoryArgument(pathArg: string): string;
|
|
116
|
+
/**
|
|
117
|
+
* Why `resolved` cannot be read as a directory â absent (a classified argument fault,
|
|
118
|
+
* `USAGE_INVALID`) or not a directory (`USAGE_INVALID`), or refused by the OS (a
|
|
119
|
+
* classified fault, `INPUT_UNREADABLE`) â or `undefined`. The one judgement behind
|
|
120
|
+
* {@link assertReadableDirectoryArgument} and the skills scope guard.
|
|
121
|
+
*
|
|
122
|
+
* @param resolved - The resolved argument
|
|
123
|
+
*/
|
|
124
|
+
export declare function readableDirectoryRefusal(resolved: string): unknown;
|
|
125
|
+
export {};
|
|
53
126
|
//# sourceMappingURL=project-root-policy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-root-policy.d.ts","sourceRoot":"","sources":["../../src/utils/project-root-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"project-root-policy.d.ts","sourceRoot":"","sources":["../../src/utils/project-root-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAuC,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAG1E,OAAO,EAAwI,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGrN,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAA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|
|
12
12
|
* `.action(...)` callbacks). Inner library functions should take the resolved
|
|
13
13
|
* root as a parameter â never call `findProjectRoot` themselves.
|
|
14
14
|
*/
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { accessSync, constants, readFileSync } from 'node:fs';
|
|
16
|
+
import { fsFaultRefusal } from '@vibe-agent-toolkit/schema';
|
|
17
|
+
import { classifyFsFault, findProjectRoot, isFsFaultError, refusedPathOf, requireFollowedStatSync, safePath } from '@vibe-agent-toolkit/utils';
|
|
18
|
+
import { CommandRefusalError } from './command-refusal.js';
|
|
17
19
|
/**
|
|
18
20
|
* `required` policy â refuse to run if no projectRoot can be discovered.
|
|
19
21
|
*
|
|
@@ -22,7 +24,7 @@ import { findProjectRoot, safePath } from '@vibe-agent-toolkit/utils';
|
|
|
22
24
|
export function requireProjectRoot(startDir, commandName) {
|
|
23
25
|
const root = findProjectRoot(startDir);
|
|
24
26
|
if (root === null) {
|
|
25
|
-
throw new
|
|
27
|
+
throw new CommandRefusalError('USAGE_INVALID', `${commandName} requires a vibe-agent-toolkit.config.yaml or .git/ ancestor. ` +
|
|
26
28
|
`Run from inside a VAT project or initialize one.`);
|
|
27
29
|
}
|
|
28
30
|
return root;
|
|
@@ -64,16 +66,152 @@ export function projectRootOrNull(startDir) {
|
|
|
64
66
|
*
|
|
65
67
|
* @param pathArg - The argument as typed, relative to cwd or absolute
|
|
66
68
|
* @returns The resolved absolute path
|
|
67
|
-
* @throws
|
|
69
|
+
* @throws {CommandRefusalError} `USAGE_INVALID` when it is not a directory
|
|
70
|
+
* @throws {FsFaultError} a `source` fault named by an argument when the `stat` throws:
|
|
71
|
+
* absent is the table's `USAGE_INVALID`, a refusal (an `EACCES` parent) `INPUT_UNREADABLE`
|
|
68
72
|
*/
|
|
69
73
|
export function assertDirectoryArgument(pathArg) {
|
|
70
74
|
const resolved = safePath.resolve(pathArg);
|
|
71
|
-
|
|
72
|
-
|
|
75
|
+
const refusal = directoryRefusal(resolved);
|
|
76
|
+
if (refusal !== undefined)
|
|
77
|
+
throw refusal;
|
|
78
|
+
return resolved;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* How a `stat`, `lstat` or read of a path the command line named is classified: a
|
|
82
|
+
* `source` fault of origin `argument`. Only an ABSENCE is the invocation's mistake (the
|
|
83
|
+
* table's `USAGE_INVALID`); any other error â an `EACCES` parent the process may not
|
|
84
|
+
* traverse, an `ELOOP` â means whether the path exists is unknown: the INPUT's refusal,
|
|
85
|
+
* never "does not exist" and never a scan that starts anyway. Never classify with
|
|
86
|
+
* `existsSync`: it answers `false` for both.
|
|
87
|
+
*
|
|
88
|
+
* @param path - The resolved path that was examined
|
|
89
|
+
*/
|
|
90
|
+
function argumentPath(path) {
|
|
91
|
+
return { side: 'source', origin: 'argument', action: 'read the path', path };
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The refusal for an input the CONFIG, an earlier step or the command line names whose
|
|
95
|
+
* `stat` or read threw: classified as a `source` fault of the input's origin. An absence
|
|
96
|
+
* keeps the caller's sentence â a `files[].source` nothing built, a `publish.changelog`
|
|
97
|
+
* naming no file â under the refusal the table owes that origin, carrying the classified
|
|
98
|
+
* fault as its cause; anything else is the classified fault itself.
|
|
99
|
+
*/
|
|
100
|
+
export function classifyInputFault(resolved, error, absent) {
|
|
101
|
+
return classifyInputFaultOn('source', resolved, error, absent);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* {@link classifyInputFault}, the refusal charged to `side`: the side of the path the OS refused, which for a
|
|
105
|
+
* walked input may be a directory above it on another side (`<project>/dist`, the tree a build writes), or the
|
|
106
|
+
* input itself when it is the run's own output (`dist/skills` under `vat build`). An absence keeps the caller's
|
|
107
|
+
* sentence, under the refusal the table owes THAT side: nothing is there to read, whoever's directory said so.
|
|
108
|
+
*/
|
|
109
|
+
function classifyInputFaultOn(side, resolved, error, absent) {
|
|
110
|
+
const fault = classifyFsFault(error, { side, origin: absent.origin, action: 'read the input', path: resolved });
|
|
111
|
+
if (!isFsFaultError(fault) || fault.faultClass !== 'absent')
|
|
112
|
+
return fault;
|
|
113
|
+
return new CommandRefusalError(fsFaultRefusal(side, 'absent', absent.origin).refusal, absent.message, { cause: fault });
|
|
114
|
+
}
|
|
115
|
+
/** A config key naming a file that is not there: the config's mistake. */
|
|
116
|
+
export function configNamedFileAbsent(key, named) {
|
|
117
|
+
return { origin: 'config', message: `${key} names ${named}, which does not exist.` };
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Refuse unless `resolved` can be stat'ed.
|
|
121
|
+
*
|
|
122
|
+
* @param within - The tree `resolved` is read in, whose links are read before the kernel follows
|
|
123
|
+
* them (a project root); `resolved` itself when it IS the operator's own argument
|
|
124
|
+
* @param sideOf - The side of each path the `stat` touches â `resolved`, and each component walked beneath
|
|
125
|
+
* `within`: a refusal is charged to the side of the path the OS refused
|
|
126
|
+
* @returns What the `stat` found
|
|
127
|
+
* @throws {CommandRefusalError} `absent` when nothing is there (the refusal its origin owes)
|
|
128
|
+
* @throws {FsFaultError} when the OS refuses the `stat`, or the chain names a network or device path
|
|
129
|
+
*/
|
|
130
|
+
export function requireInputPath(resolved, within, absent, sideOf) {
|
|
131
|
+
try {
|
|
132
|
+
return requireFollowedStatSync(resolved, within);
|
|
73
133
|
}
|
|
74
|
-
|
|
75
|
-
throw
|
|
134
|
+
catch (error) {
|
|
135
|
+
throw classifyInputFaultOn(sideOf(refusedPathOf(error, resolved)), resolved, error, absent);
|
|
76
136
|
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Read a UTF-8 input file, refusing like {@link requireInputPath}.
|
|
140
|
+
*
|
|
141
|
+
* @throws {CommandRefusalError} `absent` when nothing is there (the refusal its origin owes)
|
|
142
|
+
* @throws {FsFaultError} when it cannot be read
|
|
143
|
+
*/
|
|
144
|
+
export function readInputFile(resolved, absent) {
|
|
145
|
+
try {
|
|
146
|
+
return readFileSync(resolved, 'utf-8');
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
throw classifyInputFault(resolved, error, absent);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Why `resolved` is not a usable directory, or `undefined` when it is one.
|
|
154
|
+
* A `stat` that throws is classified as the argument's fault ({@link classifyInputFault}):
|
|
155
|
+
* absent says so in the invocation's words.
|
|
156
|
+
*/
|
|
157
|
+
function directoryRefusal(resolved) {
|
|
158
|
+
let stats;
|
|
159
|
+
try {
|
|
160
|
+
// The operator's own argument: its own `within`.
|
|
161
|
+
stats = requireFollowedStatSync(resolved, resolved);
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
return classifyInputFault(resolved, error, { origin: 'argument', message: `Path does not exist: ${resolved}` });
|
|
165
|
+
}
|
|
166
|
+
if (!stats.isDirectory())
|
|
167
|
+
return new CommandRefusalError('USAGE_INVALID', `Path is not a directory: ${resolved}`);
|
|
168
|
+
return undefined;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Why a DIRECTORY argument cannot be read, or `undefined` when it can be.
|
|
172
|
+
*
|
|
173
|
+
* A probe, not a listing: the verb's own walk owns enumeration; this only asks
|
|
174
|
+
* whether it can start. A directory the OS will not let the process list or
|
|
175
|
+
* enter is an input that exists and cannot be read â `INPUT_UNREADABLE`, never
|
|
176
|
+
* "not found" and never a finding about a tree nothing was read from.
|
|
177
|
+
*
|
|
178
|
+
* @param dir - The resolved argument, known to be a directory
|
|
179
|
+
* @returns The classified `source` fault (origin `argument`), or `undefined`
|
|
180
|
+
*/
|
|
181
|
+
export function unlistableDirectoryRefusal(dir) {
|
|
182
|
+
try {
|
|
183
|
+
accessSync(dir, constants.R_OK | constants.X_OK);
|
|
184
|
+
return undefined;
|
|
185
|
+
}
|
|
186
|
+
catch (error) {
|
|
187
|
+
return classifyFsFault(error, argumentPath(dir));
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* {@link assertDirectoryArgument}, plus the one more way a directory argument
|
|
192
|
+
* can leave nothing to examine: the OS will not let the process read it.
|
|
193
|
+
*
|
|
194
|
+
* @param pathArg - The argument as typed, relative to cwd or absolute
|
|
195
|
+
* @returns The resolved absolute path
|
|
196
|
+
* @throws {CommandRefusalError} `USAGE_INVALID` when it is not a directory
|
|
197
|
+
* @throws {FsFaultError} when it does not exist (`USAGE_INVALID`) or cannot be listed
|
|
198
|
+
*/
|
|
199
|
+
export function assertReadableDirectoryArgument(pathArg) {
|
|
200
|
+
const resolved = safePath.resolve(pathArg);
|
|
201
|
+
const refusal = readableDirectoryRefusal(resolved);
|
|
202
|
+
if (refusal !== undefined)
|
|
203
|
+
throw refusal;
|
|
77
204
|
return resolved;
|
|
78
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* Why `resolved` cannot be read as a directory â absent (a classified argument fault,
|
|
208
|
+
* `USAGE_INVALID`) or not a directory (`USAGE_INVALID`), or refused by the OS (a
|
|
209
|
+
* classified fault, `INPUT_UNREADABLE`) â or `undefined`. The one judgement behind
|
|
210
|
+
* {@link assertReadableDirectoryArgument} and the skills scope guard.
|
|
211
|
+
*
|
|
212
|
+
* @param resolved - The resolved argument
|
|
213
|
+
*/
|
|
214
|
+
export function readableDirectoryRefusal(resolved) {
|
|
215
|
+
return directoryRefusal(resolved) ?? unlistableDirectoryRefusal(resolved);
|
|
216
|
+
}
|
|
79
217
|
//# sourceMappingURL=project-root-policy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-root-policy.js","sourceRoot":"","sources":["../../src/utils/project-root-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"project-root-policy.js","sourceRoot":"","sources":["../../src/utils/project-root-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAc,MAAM,SAA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IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,eAAe,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACnD,CAAC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,+BAA+B,CAAC,OAAe;IAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAG,wBAAwB,CAAC,QAAQ,CAAC,CAAC;IACnD,IAAI,OAAO,KAAK,SAAS;QAAE,MAAM,OAAO,CAAC;IACzC,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAAgB;IACvD,OAAO,gBAAgB,CAAC,QAAQ,CAAC,IAAI,0BAA0B,CAAC,QAAQ,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
* `docs/architecture/zones.md` §2, "A lens is evaluated only when a statement
|
|
13
13
|
* names one of its relations".
|
|
14
14
|
*/
|
|
15
|
-
import { type DerivedTableName, type PopulationCache, type Projection } from '@vibe-agent-toolkit/resources';
|
|
15
|
+
import { type DerivedTableName, type PopulationCache, type PopulationOutcome, type Projection } from '@vibe-agent-toolkit/resources';
|
|
16
|
+
import type { LensPopulation } from './lens-population.js';
|
|
16
17
|
import type { Logger } from './logger.js';
|
|
17
18
|
/**
|
|
18
19
|
* The rows one lens evaluation produced, keyed by `DERIVED_TABLES`' own keys.
|
|
@@ -24,16 +25,32 @@ import type { Logger } from './logger.js';
|
|
|
24
25
|
export type LensRows = {
|
|
25
26
|
readonly [Name in DerivedTableName]?: readonly Record<string, unknown>[];
|
|
26
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* What one lens evaluation produced: its rows, and where its OWN population came
|
|
30
|
+
* from â `null` for a lens that populated nothing (it read the run's projection).
|
|
31
|
+
* Required, so a lens that populates cannot leave its provenance unstated.
|
|
32
|
+
*/
|
|
33
|
+
export interface LensEvaluation {
|
|
34
|
+
readonly rows: LensRows;
|
|
35
|
+
readonly population: PopulationOutcome['population'] | null;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A run's {@link LensPopulation} from each evaluated lens's own population.
|
|
39
|
+
*
|
|
40
|
+
* @param populations - Each evaluated lens's `population`, in evaluation order
|
|
41
|
+
* @returns The run's lens provenance
|
|
42
|
+
*/
|
|
43
|
+
export declare function lensPopulationOf(populations: readonly LensEvaluation['population'][]): LensPopulation;
|
|
27
44
|
/** Everything a lens may read while evaluating. */
|
|
28
45
|
export interface LensEvaluationInput {
|
|
29
46
|
/** The resources-lane projection the run already populated. */
|
|
30
47
|
readonly projection: Projection;
|
|
31
48
|
/** Absolute corpus root, for a lens that must populate a lane of its own. */
|
|
32
49
|
readonly root: string;
|
|
33
|
-
/** Where a lens's own blob-stage refusals go â stderr. */
|
|
34
|
-
readonly logger: Logger;
|
|
35
50
|
/** The run's projection store, so a lens's own population can hit it. */
|
|
36
51
|
readonly cache: PopulationCache | undefined;
|
|
52
|
+
/** Where a lens that populates reports its own population's refused content. */
|
|
53
|
+
readonly logger: Logger;
|
|
37
54
|
}
|
|
38
55
|
/** One lens: the relations it owns, and how to produce their rows. */
|
|
39
56
|
export interface ProjectionLens {
|
|
@@ -52,9 +69,10 @@ export interface ProjectionLens {
|
|
|
52
69
|
*
|
|
53
70
|
* @param input - The projection, the root, and the run's oracles
|
|
54
71
|
* @returns Every relation this lens owns â all of them, every time, because
|
|
55
|
-
* omitting one leaves its previous contents in place
|
|
72
|
+
* omitting one leaves its previous contents in place â and where its own
|
|
73
|
+
* population came from
|
|
56
74
|
*/
|
|
57
|
-
readonly evaluate: (input: LensEvaluationInput) => Promise<
|
|
75
|
+
readonly evaluate: (input: LensEvaluationInput) => Promise<LensEvaluation> | LensEvaluation;
|
|
58
76
|
}
|
|
59
77
|
/** The authored-link lens: `lens_contexts`, `edges`, `edge_resolutions`. */
|
|
60
78
|
export declare const AUTHORED_LINK_LENS: ProjectionLens;
|
|
@@ -91,8 +109,8 @@ export declare function lensesNamedBy(statements: readonly string[] | undefined)
|
|
|
91
109
|
*
|
|
92
110
|
* @param lens - The lens
|
|
93
111
|
* @param input - What it may read
|
|
94
|
-
* @returns Its rows
|
|
112
|
+
* @returns Its rows and its own population's provenance
|
|
95
113
|
* @throws Error When the rows omit a declared relation or carry an undeclared one
|
|
96
114
|
*/
|
|
97
|
-
export declare function evaluateLens(lens: ProjectionLens, input: LensEvaluationInput): Promise<
|
|
115
|
+
export declare function evaluateLens(lens: ProjectionLens, input: LensEvaluationInput): Promise<LensEvaluation>;
|
|
98
116
|
//# sourceMappingURL=projection-lenses.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection-lenses.d.ts","sourceRoot":"","sources":["../../src/utils/projection-lenses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"projection-lenses.d.ts","sourceRoot":"","sources":["../../src/utils/projection-lenses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAChB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,IAAI,IAAI,gBAAgB,CAAC,CAAC,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;CACzE,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC,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AE,mBAAmB,GACzB,OAAO,CAAC,cAAc,CAAC,CAazB"}
|
|
@@ -12,20 +12,33 @@
|
|
|
12
12
|
* `docs/architecture/zones.md` §2, "A lens is evaluated only when a statement
|
|
13
13
|
* names one of its relations".
|
|
14
14
|
*/
|
|
15
|
-
import { DERIVED_TABLES } from '@vibe-agent-toolkit/resources';
|
|
15
|
+
import { DERIVED_TABLES, } from '@vibe-agent-toolkit/resources';
|
|
16
16
|
import { evaluateClaudeContextLens } from './claude-context-lens.js';
|
|
17
17
|
import { evaluateAuthoredLenses } from './edge-lens-evaluation.js';
|
|
18
|
+
/**
|
|
19
|
+
* A run's {@link LensPopulation} from each evaluated lens's own population.
|
|
20
|
+
*
|
|
21
|
+
* @param populations - Each evaluated lens's `population`, in evaluation order
|
|
22
|
+
* @returns The run's lens provenance
|
|
23
|
+
*/
|
|
24
|
+
export function lensPopulationOf(populations) {
|
|
25
|
+
const populated = populations.filter((population) => population !== null);
|
|
26
|
+
if (populated.length === 0)
|
|
27
|
+
return 'none';
|
|
28
|
+
return populated.every((population) => population === 'store') ? 'store' : 'derived';
|
|
29
|
+
}
|
|
18
30
|
/** The authored-link lens: `lens_contexts`, `edges`, `edge_resolutions`. */
|
|
19
31
|
export const AUTHORED_LINK_LENS = {
|
|
20
32
|
name: 'authored-link',
|
|
21
33
|
relations: ['lensContexts', 'edges', 'edgeResolutions'],
|
|
22
|
-
|
|
34
|
+
// Reads the run's projection, so it populates nothing of its own.
|
|
35
|
+
evaluate: ({ projection }) => ({ rows: evaluateAuthoredLenses(projection), population: null }),
|
|
23
36
|
};
|
|
24
37
|
/** The always-loaded context lens: `claude_context_chains`, `claude_context_loads`. */
|
|
25
38
|
export const CLAUDE_CONTEXT_LENS = {
|
|
26
39
|
name: 'claude-context',
|
|
27
40
|
relations: ['claudeContextChains', 'claudeContextLoads'],
|
|
28
|
-
evaluate: ({ root,
|
|
41
|
+
evaluate: ({ root, cache, logger }) => evaluateClaudeContextLens({ root, cache, logger }),
|
|
29
42
|
};
|
|
30
43
|
/** Every lens the query lane can evaluate, in evaluation order. */
|
|
31
44
|
export const PROJECTION_LENSES = [
|
|
@@ -68,11 +81,12 @@ export function lensesNamedBy(statements) {
|
|
|
68
81
|
*
|
|
69
82
|
* @param lens - The lens
|
|
70
83
|
* @param input - What it may read
|
|
71
|
-
* @returns Its rows
|
|
84
|
+
* @returns Its rows and its own population's provenance
|
|
72
85
|
* @throws Error When the rows omit a declared relation or carry an undeclared one
|
|
73
86
|
*/
|
|
74
87
|
export async function evaluateLens(lens, input) {
|
|
75
|
-
const
|
|
88
|
+
const evaluation = await lens.evaluate(input);
|
|
89
|
+
const { rows } = evaluation;
|
|
76
90
|
const declared = lens.relations;
|
|
77
91
|
const missing = declared.filter((name) => !Object.hasOwn(rows, name));
|
|
78
92
|
const undeclared = Object.keys(rows).filter((name) => !declared.includes(name));
|
|
@@ -80,7 +94,7 @@ export async function evaluateLens(lens, input) {
|
|
|
80
94
|
throw new Error(`Lens "${lens.name}" must produce exactly [${declared.join(', ')}];`
|
|
81
95
|
+ ` missing [${missing.join(', ')}], undeclared [${undeclared.join(', ')}]`);
|
|
82
96
|
}
|
|
83
|
-
return
|
|
97
|
+
return evaluation;
|
|
84
98
|
}
|
|
85
99
|
/**
|
|
86
100
|
* Blank out the parts of a statement that cannot name a table: line comments,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection-lenses.js","sourceRoot":"","sources":["../../src/utils/projection-lenses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"projection-lenses.js","sourceRoot":"","sources":["../../src/utils/projection-lenses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,cAAc,GAKf,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,C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AC;QACxC,IAAI,KAAK,KAAK,CAAC,CAAC;YAAE,OAAO,QAAQ,CAAC;QAClC,IAAI,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,MAAM;YAAE,OAAO,KAAK,GAAG,CAAC,CAAC;QACzE,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC;QACrB,IAAI,GAAG,KAAK,GAAG,CAAC,CAAC;IACnB,CAAC;AACH,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAS,OAAO,CAAC,GAAW;IAC1B,OAAO,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AACvF,CAAC;AAED,kFAAkF;AAClF,MAAM,eAAe,GAAG,cAAc,CAAC;AAEvC;;;;;;;;;GASG;AACH,SAAS,aAAa,CAAC,KAA0B,EAAE,QAAgB;IACjE,OAAO,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -45,10 +45,9 @@
|
|
|
45
45
|
* closure also puts the legible-failure wrapper on the single path that can
|
|
46
46
|
* throw, so no command can forget it.
|
|
47
47
|
*/
|
|
48
|
-
import { type Projection } from '@vibe-agent-toolkit/resources';
|
|
48
|
+
import { type PopulationOutcome, type Projection } from '@vibe-agent-toolkit/resources';
|
|
49
|
+
import type { LensPopulation } from './lens-population.js';
|
|
49
50
|
import type { Logger } from './logger.js';
|
|
50
|
-
/** Where the POPULATION a statement ran against came from. */
|
|
51
|
-
export type PopulationOrigin = 'derived' | 'store';
|
|
52
51
|
/**
|
|
53
52
|
* What a run's rows are, and where they came from.
|
|
54
53
|
*
|
|
@@ -62,12 +61,17 @@ export interface ProjectionProvenance {
|
|
|
62
61
|
/**
|
|
63
62
|
* ð The cache tell. Reported rather than inferred, because it CANNOT be
|
|
64
63
|
* inferred: a correct store hit and a correct re-derivation produce identical
|
|
65
|
-
* rows.
|
|
66
|
-
* contributor timing is filed â an empty record list IS the hit.
|
|
64
|
+
* rows. It is `populate()`'s own outcome, never a count of what ran.
|
|
67
65
|
*
|
|
68
66
|
* It describes the POPULATION, which is the only thing the store now affects.
|
|
69
67
|
*/
|
|
70
|
-
readonly population:
|
|
68
|
+
readonly population: PopulationOutcome['population'];
|
|
69
|
+
/**
|
|
70
|
+
* The same tell for the lenses' OWN populations â the claude-context lens
|
|
71
|
+
* populates a lane of its own. `'none'` when no evaluated lens populated
|
|
72
|
+
* anything; see {@link lensPopulationOf}.
|
|
73
|
+
*/
|
|
74
|
+
readonly lensPopulation: LensPopulation;
|
|
71
75
|
/**
|
|
72
76
|
* ð What that origin was WORTH. {@link population} says whether the
|
|
73
77
|
* projection was served or re-derived; this says what the difference cost, so
|
|
@@ -201,9 +205,9 @@ export interface PopulationExtent {
|
|
|
201
205
|
*
|
|
202
206
|
* ðŠĪ Realizations rather than any other count, because every alternative
|
|
203
207
|
* fails to reach zero on the case that matters: `roots` always holds exactly
|
|
204
|
-
* one row (the invariant thrown for below), so a total over
|
|
208
|
+
* one row (the invariant thrown for below), so a total over every table
|
|
205
209
|
* is never 0; `blobs` is content-keyed and deduped, so it counts parse REACH
|
|
206
|
-
* and already has its own
|
|
210
|
+
* and already has its own report in `populateAndReport`; and `resources` counts
|
|
207
211
|
* identities, which a corpus can legitimately have none of while enumerating
|
|
208
212
|
* plenty. One row per enumerated path is non-zero exactly when something was
|
|
209
213
|
* enumerated.
|
|
@@ -218,6 +222,8 @@ export interface PreflightStatement {
|
|
|
218
222
|
}
|
|
219
223
|
/** Run one read-only statement against the populated projection. */
|
|
220
224
|
export type AskProjection = (sql: string, ...parameters: readonly string[]) => readonly Record<string, unknown>[];
|
|
225
|
+
/** The result columns one statement would produce, in order, without running it. */
|
|
226
|
+
type ColumnsOfStatement = (sql: string, ...parameters: readonly string[]) => readonly string[];
|
|
221
227
|
/**
|
|
222
228
|
* Compile every statement a run intends to ask, against the schema and NO rows,
|
|
223
229
|
* before anything is populated.
|
|
@@ -266,8 +272,8 @@ export declare function assertQueriesCompile(statements: readonly PreflightState
|
|
|
266
272
|
*
|
|
267
273
|
* @param options - The run
|
|
268
274
|
* @param options.root - Absolute corpus root
|
|
269
|
-
* @param options.logger - Where
|
|
270
|
-
* parseable document on stdout stays parseable)
|
|
275
|
+
* @param options.logger - Where the population's refused content is reported
|
|
276
|
+
* (stderr, so a parseable document on stdout stays parseable)
|
|
271
277
|
* @param options.preflight - Every statement this run intends to ask, compiled
|
|
272
278
|
* against the empty schema BEFORE the population starts. See
|
|
273
279
|
* {@link assertQueriesCompile}
|
|
@@ -285,7 +291,7 @@ export declare function withQueriedProjection<T>(options: {
|
|
|
285
291
|
logger: Logger;
|
|
286
292
|
preflight?: readonly PreflightStatement[];
|
|
287
293
|
statements?: readonly string[];
|
|
288
|
-
}, work: (ask: AskProjection, provenance: ProjectionProvenance, extent: PopulationExtent, projection: Projection) => Promise<T> | T): Promise<T>;
|
|
294
|
+
}, work: (ask: AskProjection, provenance: ProjectionProvenance, extent: PopulationExtent, projection: Projection, columnsOf: ColumnsOfStatement) => Promise<T> | T): Promise<T>;
|
|
289
295
|
/**
|
|
290
296
|
* Turn a rejected statement into a message that names the surface it missed.
|
|
291
297
|
*
|
|
@@ -321,4 +327,5 @@ export declare function withQueriedProjection<T>(options: {
|
|
|
321
327
|
* failure was a name this projection does not have
|
|
322
328
|
*/
|
|
323
329
|
export declare function describeQueryFailure(sql: string, message: string): string;
|
|
330
|
+
export {};
|
|
324
331
|
//# sourceMappingURL=projection-query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection-query.d.ts","sourceRoot":"","sources":["../../src/utils/projection-query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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