@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,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The document `vat resources query` publishes, apart from the command.
|
|
3
|
+
*
|
|
4
|
+
* A sibling module because the published-shape registry imports it and the
|
|
5
|
+
* command imports the writer that imports the registry: a schema declared in
|
|
6
|
+
* the command module itself would be an import cycle, read before it is
|
|
7
|
+
* initialised.
|
|
8
|
+
*
|
|
9
|
+
* 🔑 **`examined` is the population, not the rows.** A statement selecting
|
|
10
|
+
* zero rows over a populated tree is a real answer (`ok`); a statement over a
|
|
11
|
+
* population of zero resources is not one, and the writer refuses it.
|
|
12
|
+
*/
|
|
13
|
+
import { type Report } from '@vibe-agent-toolkit/schema';
|
|
14
|
+
import { z } from 'zod';
|
|
15
|
+
import type { ExaminedDeclaration } from '../../utils/run-integrity.js';
|
|
16
|
+
/** What `examined` counts for `vat resources query`, and the remedy when it is zero. */
|
|
17
|
+
export declare const RESOURCES_QUERY_EXAMINED: ExaminedDeclaration;
|
|
18
|
+
declare const ResourcesQueryDataSchema: z.ZodObject<{
|
|
19
|
+
/** The project the statement was asked about. */
|
|
20
|
+
root: z.ZodString;
|
|
21
|
+
/** The statement's result columns, in order — present even when it selected no row. */
|
|
22
|
+
columns: z.ZodArray<z.ZodString, "many">;
|
|
23
|
+
/** The selected rows, exactly as SQLite holds the values. */
|
|
24
|
+
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
|
|
25
|
+
/** Whether the projection was derived this run or read from the store — the cache tell. */
|
|
26
|
+
population: z.ZodEnum<["store" | "derived", ...("store" | "derived")[]]>;
|
|
27
|
+
/** What that population cost. */
|
|
28
|
+
populationSecs: z.ZodNumber;
|
|
29
|
+
/** What evaluating the lenses cost, paid before the statement ran. */
|
|
30
|
+
lensSecs: z.ZodNumber;
|
|
31
|
+
/** Which lenses that covers — the derived relations this statement named. */
|
|
32
|
+
lensesEvaluated: z.ZodArray<z.ZodString, "many">;
|
|
33
|
+
/** Where those lenses' own populations came from: `none` when no evaluated lens populated anything. */
|
|
34
|
+
lensPopulation: z.ZodEnum<["none", "store" | "derived", ...("store" | "derived")[]]>;
|
|
35
|
+
/** The prose frame `limits` is read under; present exactly when a bounded lens ran. */
|
|
36
|
+
boundsStatement: z.ZodOptional<z.ZodString>;
|
|
37
|
+
/** What the derived rows do NOT settle; present exactly when a bounded lens ran. */
|
|
38
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
direction: z.ZodEnum<["over-report", "under-report", "scope", "assumption"]>;
|
|
41
|
+
statement: z.ZodString;
|
|
42
|
+
}, "strict", z.ZodTypeAny, {
|
|
43
|
+
id: string;
|
|
44
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
45
|
+
statement: string;
|
|
46
|
+
}, {
|
|
47
|
+
id: string;
|
|
48
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
49
|
+
statement: string;
|
|
50
|
+
}>, "many">>;
|
|
51
|
+
}, "strict", z.ZodTypeAny, {
|
|
52
|
+
root: string;
|
|
53
|
+
population: "store" | "derived";
|
|
54
|
+
rows: Record<string, unknown>[];
|
|
55
|
+
populationSecs: number;
|
|
56
|
+
lensSecs: number;
|
|
57
|
+
lensesEvaluated: string[];
|
|
58
|
+
lensPopulation: "store" | "none" | "derived";
|
|
59
|
+
columns: string[];
|
|
60
|
+
boundsStatement?: string | undefined;
|
|
61
|
+
limits?: {
|
|
62
|
+
id: string;
|
|
63
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
64
|
+
statement: string;
|
|
65
|
+
}[] | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
root: string;
|
|
68
|
+
population: "store" | "derived";
|
|
69
|
+
rows: Record<string, unknown>[];
|
|
70
|
+
populationSecs: number;
|
|
71
|
+
lensSecs: number;
|
|
72
|
+
lensesEvaluated: string[];
|
|
73
|
+
lensPopulation: "store" | "none" | "derived";
|
|
74
|
+
columns: string[];
|
|
75
|
+
boundsStatement?: string | undefined;
|
|
76
|
+
limits?: {
|
|
77
|
+
id: string;
|
|
78
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
79
|
+
statement: string;
|
|
80
|
+
}[] | undefined;
|
|
81
|
+
}>;
|
|
82
|
+
export type ResourcesQueryData = z.infer<typeof ResourcesQueryDataSchema>;
|
|
83
|
+
/** The document this command publishes. */
|
|
84
|
+
export declare const RESOURCES_QUERY_REPORT_SCHEMA: import("@vibe-agent-toolkit/schema").ReportZodSchema<z.ZodObject<{
|
|
85
|
+
/** The project the statement was asked about. */
|
|
86
|
+
root: z.ZodString;
|
|
87
|
+
/** The statement's result columns, in order — present even when it selected no row. */
|
|
88
|
+
columns: z.ZodArray<z.ZodString, "many">;
|
|
89
|
+
/** The selected rows, exactly as SQLite holds the values. */
|
|
90
|
+
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
|
|
91
|
+
/** Whether the projection was derived this run or read from the store — the cache tell. */
|
|
92
|
+
population: z.ZodEnum<["store" | "derived", ...("store" | "derived")[]]>;
|
|
93
|
+
/** What that population cost. */
|
|
94
|
+
populationSecs: z.ZodNumber;
|
|
95
|
+
/** What evaluating the lenses cost, paid before the statement ran. */
|
|
96
|
+
lensSecs: z.ZodNumber;
|
|
97
|
+
/** Which lenses that covers — the derived relations this statement named. */
|
|
98
|
+
lensesEvaluated: z.ZodArray<z.ZodString, "many">;
|
|
99
|
+
/** Where those lenses' own populations came from: `none` when no evaluated lens populated anything. */
|
|
100
|
+
lensPopulation: z.ZodEnum<["none", "store" | "derived", ...("store" | "derived")[]]>;
|
|
101
|
+
/** The prose frame `limits` is read under; present exactly when a bounded lens ran. */
|
|
102
|
+
boundsStatement: z.ZodOptional<z.ZodString>;
|
|
103
|
+
/** What the derived rows do NOT settle; present exactly when a bounded lens ran. */
|
|
104
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
105
|
+
id: z.ZodString;
|
|
106
|
+
direction: z.ZodEnum<["over-report", "under-report", "scope", "assumption"]>;
|
|
107
|
+
statement: z.ZodString;
|
|
108
|
+
}, "strict", z.ZodTypeAny, {
|
|
109
|
+
id: string;
|
|
110
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
111
|
+
statement: string;
|
|
112
|
+
}, {
|
|
113
|
+
id: string;
|
|
114
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
115
|
+
statement: string;
|
|
116
|
+
}>, "many">>;
|
|
117
|
+
}, "strict", z.ZodTypeAny, {
|
|
118
|
+
root: string;
|
|
119
|
+
population: "store" | "derived";
|
|
120
|
+
rows: Record<string, unknown>[];
|
|
121
|
+
populationSecs: number;
|
|
122
|
+
lensSecs: number;
|
|
123
|
+
lensesEvaluated: string[];
|
|
124
|
+
lensPopulation: "store" | "none" | "derived";
|
|
125
|
+
columns: string[];
|
|
126
|
+
boundsStatement?: string | undefined;
|
|
127
|
+
limits?: {
|
|
128
|
+
id: string;
|
|
129
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
130
|
+
statement: string;
|
|
131
|
+
}[] | undefined;
|
|
132
|
+
}, {
|
|
133
|
+
root: string;
|
|
134
|
+
population: "store" | "derived";
|
|
135
|
+
rows: Record<string, unknown>[];
|
|
136
|
+
populationSecs: number;
|
|
137
|
+
lensSecs: number;
|
|
138
|
+
lensesEvaluated: string[];
|
|
139
|
+
lensPopulation: "store" | "none" | "derived";
|
|
140
|
+
columns: string[];
|
|
141
|
+
boundsStatement?: string | undefined;
|
|
142
|
+
limits?: {
|
|
143
|
+
id: string;
|
|
144
|
+
direction: "scope" | "over-report" | "under-report" | "assumption";
|
|
145
|
+
statement: string;
|
|
146
|
+
}[] | undefined;
|
|
147
|
+
}>, z.ZodObject<Omit<{
|
|
148
|
+
code: z.ZodString;
|
|
149
|
+
severity: z.ZodEnum<["error", "warning", "info", "ignore"]>;
|
|
150
|
+
message: z.ZodString;
|
|
151
|
+
location: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
152
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
field: z.ZodOptional<z.ZodString>;
|
|
154
|
+
link: z.ZodOptional<z.ZodString>;
|
|
155
|
+
fix: z.ZodOptional<z.ZodString>;
|
|
156
|
+
reference: z.ZodOptional<z.ZodString>;
|
|
157
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
158
|
+
}, "severity"> & {
|
|
159
|
+
severity: z.ZodEnum<["error", "warning", "info"]>;
|
|
160
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
}, "strict", z.ZodTypeAny, {
|
|
162
|
+
code: string;
|
|
163
|
+
message: string;
|
|
164
|
+
severity: "error" | "warning" | "info";
|
|
165
|
+
fix?: string | undefined;
|
|
166
|
+
reference?: string | undefined;
|
|
167
|
+
location?: string | undefined;
|
|
168
|
+
line?: number | undefined;
|
|
169
|
+
field?: string | undefined;
|
|
170
|
+
link?: string | undefined;
|
|
171
|
+
suggestion?: string | undefined;
|
|
172
|
+
column?: number | undefined;
|
|
173
|
+
}, {
|
|
174
|
+
code: string;
|
|
175
|
+
message: string;
|
|
176
|
+
severity: "error" | "warning" | "info";
|
|
177
|
+
fix?: string | undefined;
|
|
178
|
+
reference?: string | undefined;
|
|
179
|
+
location?: string | undefined;
|
|
180
|
+
line?: number | undefined;
|
|
181
|
+
field?: string | undefined;
|
|
182
|
+
link?: string | undefined;
|
|
183
|
+
suggestion?: string | undefined;
|
|
184
|
+
column?: number | undefined;
|
|
185
|
+
}>>;
|
|
186
|
+
export type ResourcesQueryReport = Report<ResourcesQueryData>;
|
|
187
|
+
export {};
|
|
188
|
+
//# sourceMappingURL=query-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-schema.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/query-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAA+B,KAAK,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAIxE,wFAAwF;AACxF,eAAO,MAAM,wBAAwB,EAAE,mBAItC,CAAC;AAEF,QAAA,MAAM,wBAAwB;IAC5B,iDAAiD;;IAEjD,uFAAuF;;IAEvF,6DAA6D;;IAE7D,2FAA2F;;IAE3F,iCAAiC;;IAEjC,sEAAsE;;IAEtE,6EAA6E;;IAE7E,uGAAuG;;IAEvG,uFAAuF;;IAEvF,oFAAoF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE3E,CAAC;AAEZ,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,2CAA2C;AAC3C,eAAO,MAAM,6BAA6B;IAzBxC,iDAAiD;;IAEjD,uFAAuF;;IAEvF,6DAA6D;;IAE7D,2FAA2F;;IAE3F,iCAAiC;;IAEjC,sEAAsE;;IAEtE,6EAA6E;;IAE7E,uGAAuG;;IAEvG,uFAAuF;;IAEvF,oFAAoF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOY,CAAC;AAEnG,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The document `vat resources query` publishes, apart from the command.
|
|
3
|
+
*
|
|
4
|
+
* A sibling module because the published-shape registry imports it and the
|
|
5
|
+
* command imports the writer that imports the registry: a schema declared in
|
|
6
|
+
* the command module itself would be an import cycle, read before it is
|
|
7
|
+
* initialised.
|
|
8
|
+
*
|
|
9
|
+
* 🔑 **`examined` is the population, not the rows.** A statement selecting
|
|
10
|
+
* zero rows over a populated tree is a real answer (`ok`); a statement over a
|
|
11
|
+
* population of zero resources is not one, and the writer refuses it.
|
|
12
|
+
*/
|
|
13
|
+
import { POPULATION_ORIGINS } from '@vibe-agent-toolkit/resources';
|
|
14
|
+
import { FindingSchema, reportSchema } from '@vibe-agent-toolkit/schema';
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
import { LENS_POPULATIONS } from '../../utils/lens-population.js';
|
|
17
|
+
import { StatedLimitSchema } from './check-schema.js';
|
|
18
|
+
/** What `examined` counts for `vat resources query`, and the remedy when it is zero. */
|
|
19
|
+
export const RESOURCES_QUERY_EXAMINED = {
|
|
20
|
+
unit: 'resources in the population',
|
|
21
|
+
whenZero: 'The projection holds no tracked resource, so no statement over it answers anything: run from inside'
|
|
22
|
+
+ ' the project, and check that its files are tracked or not excluded.',
|
|
23
|
+
};
|
|
24
|
+
const ResourcesQueryDataSchema = z.object({
|
|
25
|
+
/** The project the statement was asked about. */
|
|
26
|
+
root: z.string(),
|
|
27
|
+
/** The statement's result columns, in order — present even when it selected no row. */
|
|
28
|
+
columns: z.array(z.string()),
|
|
29
|
+
/** The selected rows, exactly as SQLite holds the values. */
|
|
30
|
+
rows: z.array(z.record(z.string(), z.unknown())),
|
|
31
|
+
/** Whether the projection was derived this run or read from the store — the cache tell. */
|
|
32
|
+
population: z.enum(POPULATION_ORIGINS),
|
|
33
|
+
/** What that population cost. */
|
|
34
|
+
populationSecs: z.number().nonnegative(),
|
|
35
|
+
/** What evaluating the lenses cost, paid before the statement ran. */
|
|
36
|
+
lensSecs: z.number().nonnegative(),
|
|
37
|
+
/** Which lenses that covers — the derived relations this statement named. */
|
|
38
|
+
lensesEvaluated: z.array(z.string()),
|
|
39
|
+
/** Where those lenses' own populations came from: `none` when no evaluated lens populated anything. */
|
|
40
|
+
lensPopulation: z.enum(LENS_POPULATIONS),
|
|
41
|
+
/** The prose frame `limits` is read under; present exactly when a bounded lens ran. */
|
|
42
|
+
boundsStatement: z.string().optional(),
|
|
43
|
+
/** What the derived rows do NOT settle; present exactly when a bounded lens ran. */
|
|
44
|
+
limits: z.array(StatedLimitSchema).optional(),
|
|
45
|
+
}).strict();
|
|
46
|
+
/** The document this command publishes. */
|
|
47
|
+
export const RESOURCES_QUERY_REPORT_SCHEMA = reportSchema(ResourcesQueryDataSchema, FindingSchema);
|
|
48
|
+
//# sourceMappingURL=query-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-schema.js","sourceRoot":"","sources":["../../../src/commands/resources/query-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAe,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGlE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,wFAAwF;AACxF,MAAM,CAAC,MAAM,wBAAwB,GAAwB;IAC3D,IAAI,EAAE,6BAA6B;IACnC,QAAQ,EAAE,qGAAqG;UAC3G,qEAAqE;CAC1E,CAAC;AAEF,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,iDAAiD;IACjD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,uFAAuF;IACvF,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5B,6DAA6D;IAC7D,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAChD,2FAA2F;IAC3F,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;IACtC,iCAAiC;IACjC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE;IACxC,sEAAsE;IACtE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE;IAClC,6EAA6E;IAC7E,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,uGAAuG;IACvG,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;IACxC,uFAAuF;IACvF,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,oFAAoF;IACpF,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC,MAAM,EAAE,CAAC;AAIZ,2CAA2C;AAC3C,MAAM,CAAC,MAAM,6BAA6B,GAAG,YAAY,CAAC,wBAAwB,EAAE,aAAa,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* ## Why a query verb at all, when `scan` already reports counts
|
|
5
5
|
*
|
|
6
6
|
* `vat resources scan` answers the questions its payload was written for, and
|
|
7
|
-
* nothing else. The projection holds
|
|
7
|
+
* nothing else. The projection holds a table per fact kind — realizations, references,
|
|
8
8
|
* sections, conditions, provenance, rule patterns — and every question nobody
|
|
9
9
|
* anticipated currently has no answer short of writing a new command. This verb
|
|
10
10
|
* is the general case: one statement, the rows it selects, no new field.
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
* from the **store**. It has to be reported, because it cannot be inferred: a
|
|
25
25
|
* correct hit and a correct re-derivation produce byte-identical rows, so "did
|
|
26
26
|
* the cache work" is otherwise unfalsifiable — this repository's most repeated
|
|
27
|
-
* failure. The signal is real rather than declarative:
|
|
28
|
-
*
|
|
29
|
-
*
|
|
27
|
+
* failure. The signal is real rather than declarative: it is the outcome
|
|
28
|
+
* `populate()` returns, which says whether the store served the run.
|
|
29
|
+
* `lensPopulation` is the same tell for a lens that populates a lane of its own.
|
|
30
30
|
*
|
|
31
31
|
* `populationSecs` sits beside it and says what that origin was worth — the wall
|
|
32
32
|
* time of the setup both this verb and `vat resources check` pay before either
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
* authority on why.
|
|
46
46
|
*/
|
|
47
47
|
import { type ProjectionProvenance } from '../../utils/projection-query.js';
|
|
48
|
+
import type { ResourcesQueryReport } from './query-schema.js';
|
|
48
49
|
interface QueryOptions {
|
|
49
50
|
debug?: boolean;
|
|
50
51
|
/** Bound in order, for every `?` in the statement. */
|
|
@@ -54,7 +55,11 @@ interface QueryOptions {
|
|
|
54
55
|
}
|
|
55
56
|
/** What one query run produced, and what produced it. */
|
|
56
57
|
interface QueryOutcome extends ProjectionProvenance {
|
|
58
|
+
/** The statement's result columns, in order — known even when it selected no row. */
|
|
59
|
+
columns: readonly string[];
|
|
57
60
|
rows: readonly Record<string, unknown>[];
|
|
61
|
+
/** Resources the population enumerated: what the statement was asked OVER. */
|
|
62
|
+
membersEnumerated: number;
|
|
58
63
|
}
|
|
59
64
|
export interface ProjectionQueryPayloadInput extends QueryOutcome {
|
|
60
65
|
/** The stated root the query was asked about. */
|
|
@@ -62,21 +67,21 @@ export interface ProjectionQueryPayloadInput extends QueryOutcome {
|
|
|
62
67
|
durationMs: number;
|
|
63
68
|
}
|
|
64
69
|
/**
|
|
65
|
-
* Build the query
|
|
70
|
+
* Build the query report.
|
|
66
71
|
*
|
|
67
72
|
* Pure: no file system, no clock, no `process.exit` — the same contract
|
|
68
|
-
* `
|
|
69
|
-
*
|
|
70
|
-
*
|
|
73
|
+
* `buildScanReport` follows, and for the same reason: it keeps the document's
|
|
74
|
+
* shape, field names included, under unit test rather than only under a CLI
|
|
75
|
+
* spawn.
|
|
71
76
|
*
|
|
72
|
-
* `
|
|
73
|
-
*
|
|
74
|
-
*
|
|
77
|
+
* 🔑 `examined` is the POPULATION the statement ran over, never the rows it
|
|
78
|
+
* selected. Zero rows over a populated tree is an answer (`ok`); a statement
|
|
79
|
+
* over a population of nothing answers nothing, and the writer refuses it.
|
|
75
80
|
*
|
|
76
81
|
* @param input - The rows and the provenance of the run that produced them
|
|
77
|
-
* @returns The
|
|
82
|
+
* @returns The report to publish
|
|
78
83
|
*/
|
|
79
|
-
export declare function
|
|
84
|
+
export declare function buildProjectionQueryReport(input: ProjectionQueryPayloadInput): ResourcesQueryReport;
|
|
80
85
|
/**
|
|
81
86
|
* Run one read-only SQL statement against this tree's resource projection.
|
|
82
87
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AASH,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,iCAAiC,CAAC;AAGzC,UAAU,YAAY;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,yDAAyD;AACzD,UAAU,YAAa,SAAQ,oBAAoB;IACjD,IAAI,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AASH,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,iCAAiC,CAAC;AAGzC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,UAAU,YAAY;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,yDAAyD;AACzD,UAAU,YAAa,SAAQ,oBAAoB;IACjD,qFAAqF;IACrF,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,IAAI,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACzC,8EAA8E;IAC9E,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,2BAA4B,SAAQ,YAAY;IAC/D,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,2BAA2B,GAAG,oBAAoB,CAiCnG;AA2CD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,IAAI,CAAC,CA4Bf"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* ## Why a query verb at all, when `scan` already reports counts
|
|
5
5
|
*
|
|
6
6
|
* `vat resources scan` answers the questions its payload was written for, and
|
|
7
|
-
* nothing else. The projection holds
|
|
7
|
+
* nothing else. The projection holds a table per fact kind — realizations, references,
|
|
8
8
|
* sections, conditions, provenance, rule patterns — and every question nobody
|
|
9
9
|
* anticipated currently has no answer short of writing a new command. This verb
|
|
10
10
|
* is the general case: one statement, the rows it selects, no new field.
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
* from the **store**. It has to be reported, because it cannot be inferred: a
|
|
25
25
|
* correct hit and a correct re-derivation produce byte-identical rows, so "did
|
|
26
26
|
* the cache work" is otherwise unfalsifiable — this repository's most repeated
|
|
27
|
-
* failure. The signal is real rather than declarative:
|
|
28
|
-
*
|
|
29
|
-
*
|
|
27
|
+
* failure. The signal is real rather than declarative: it is the outcome
|
|
28
|
+
* `populate()` returns, which says whether the store served the run.
|
|
29
|
+
* `lensPopulation` is the same tell for a lens that populates a lane of its own.
|
|
30
30
|
*
|
|
31
31
|
* `populationSecs` sits beside it and says what that origin was worth — the wall
|
|
32
32
|
* time of the setup both this verb and `vat resources check` pay before either
|
|
@@ -44,56 +44,62 @@
|
|
|
44
44
|
* spec and arbitrary SQL has none. `SqlQueryableStore.query`'s docstring is the
|
|
45
45
|
* authority on why.
|
|
46
46
|
*/
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
47
|
+
import { buildReport } from '@vibe-agent-toolkit/schema';
|
|
48
|
+
import { refusalCodeOf } from '../../utils/command-refusal.js';
|
|
49
|
+
import { endWithRefusal, endWithReport, NOTHING_FINISHED } from '../../utils/document-writer.js';
|
|
49
50
|
import { formatDurationSecs } from '../../utils/duration.js';
|
|
50
51
|
import { createLogger } from '../../utils/logger.js';
|
|
51
|
-
import { writeStructuredOutput } from '../../utils/output.js';
|
|
52
52
|
import { assertDirectoryArgument, projectRootOrLoudCwd } from '../../utils/project-root-policy.js';
|
|
53
53
|
import { withQueriedProjection, } from '../../utils/projection-query.js';
|
|
54
54
|
import { relationBoundsFor } from '../../utils/relation-limits.js';
|
|
55
55
|
/**
|
|
56
|
-
* Build the query
|
|
56
|
+
* Build the query report.
|
|
57
57
|
*
|
|
58
58
|
* Pure: no file system, no clock, no `process.exit` — the same contract
|
|
59
|
-
* `
|
|
60
|
-
*
|
|
61
|
-
*
|
|
59
|
+
* `buildScanReport` follows, and for the same reason: it keeps the document's
|
|
60
|
+
* shape, field names included, under unit test rather than only under a CLI
|
|
61
|
+
* spawn.
|
|
62
62
|
*
|
|
63
|
-
* `
|
|
64
|
-
*
|
|
65
|
-
*
|
|
63
|
+
* 🔑 `examined` is the POPULATION the statement ran over, never the rows it
|
|
64
|
+
* selected. Zero rows over a populated tree is an answer (`ok`); a statement
|
|
65
|
+
* over a population of nothing answers nothing, and the writer refuses it.
|
|
66
66
|
*
|
|
67
67
|
* @param input - The rows and the provenance of the run that produced them
|
|
68
|
-
* @returns The
|
|
68
|
+
* @returns The report to publish
|
|
69
69
|
*/
|
|
70
|
-
export function
|
|
71
|
-
return {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
70
|
+
export function buildProjectionQueryReport(input) {
|
|
71
|
+
return buildReport({
|
|
72
|
+
examined: input.membersEnumerated,
|
|
73
|
+
findings: [],
|
|
74
|
+
// `vat resources query` offers no `--strict`, and reports no finding of its own.
|
|
75
|
+
gate: { strict: false },
|
|
76
|
+
durationMs: input.durationMs,
|
|
77
|
+
data: {
|
|
78
|
+
// Stated once, and the only absolute path in the document.
|
|
79
|
+
root: input.root,
|
|
80
|
+
columns: [...input.columns],
|
|
81
|
+
rows: [...input.rows],
|
|
82
|
+
// The cache tell — see the header.
|
|
83
|
+
population: input.population,
|
|
84
|
+
// Immediately after the origin, because the two are one statement: served
|
|
85
|
+
// or derived, and what that was worth.
|
|
86
|
+
populationSecs: formatDurationSecs(input.populationMs),
|
|
87
|
+
// Beside the population it is NOT part of. A store hit does not make a lens
|
|
88
|
+
// evaluation cheaper, so folding it into `populationSecs` would read as the
|
|
89
|
+
// store having got worse. See `ProjectionProvenance.lensMs`.
|
|
90
|
+
lensSecs: formatDurationSecs(input.lensMs),
|
|
91
|
+
// 🔑 What that number covers. A lens is evaluated only when THIS statement
|
|
92
|
+
// names one of its relations, so an empty list beside `lensSecs: 0` is the
|
|
93
|
+
// statement saying it asked for none — not a lens that silently stopped
|
|
94
|
+
// running. See `ProjectionProvenance.lensesEvaluated`.
|
|
95
|
+
lensesEvaluated: [...input.lensesEvaluated],
|
|
96
|
+
// The cache tell for those lenses' own populations — see the header.
|
|
97
|
+
lensPopulation: input.lensPopulation,
|
|
98
|
+
// The bounds of the rows, stated ONCE and only when a bounded lens ran —
|
|
99
|
+
// `relation-limits.ts` carries why the SQL route owes them at all.
|
|
100
|
+
...relationBoundsFor(input.lensesEvaluated),
|
|
101
|
+
},
|
|
102
|
+
});
|
|
97
103
|
}
|
|
98
104
|
/**
|
|
99
105
|
* Populate the tree and run the caller's one statement against it.
|
|
@@ -111,7 +117,7 @@ export function buildProjectionQueryOutputData(input) {
|
|
|
111
117
|
* @param options.logger - Where blob-stage refusals are reported
|
|
112
118
|
* @returns The rows and the provenance of the population behind them
|
|
113
119
|
*/
|
|
114
|
-
|
|
120
|
+
function runProjectionQuery(options) {
|
|
115
121
|
const { root, sql, parameters, logger } = options;
|
|
116
122
|
// The statement is compiled against the empty schema first, so a typo'd
|
|
117
123
|
// column — or a `?` with no `--param` behind it — costs milliseconds instead
|
|
@@ -121,7 +127,12 @@ async function runProjectionQuery(options) {
|
|
|
121
127
|
// preflight COMPILES this statement early, while `statements` decides which
|
|
122
128
|
// derived relations get evaluated at all. One statement, two questions asked
|
|
123
129
|
// of it.
|
|
124
|
-
{ root, logger, preflight: [{ sql, parameters }], statements: [sql] }, (ask, provenance
|
|
130
|
+
{ root, logger, preflight: [{ sql, parameters }], statements: [sql] }, (ask, provenance, extent, _projection, columnsOf) => ({
|
|
131
|
+
columns: columnsOf(sql, ...parameters),
|
|
132
|
+
rows: ask(sql, ...parameters),
|
|
133
|
+
membersEnumerated: extent.membersEnumerated,
|
|
134
|
+
...provenance,
|
|
135
|
+
}));
|
|
125
136
|
}
|
|
126
137
|
/**
|
|
127
138
|
* Run one read-only SQL statement against this tree's resource projection.
|
|
@@ -150,6 +161,8 @@ async function runProjectionQuery(options) {
|
|
|
150
161
|
export async function queryCommand(sql, pathArg, options) {
|
|
151
162
|
const logger = createLogger({ debug: options.debug ?? false });
|
|
152
163
|
const startTime = Date.now();
|
|
164
|
+
// The two formats this verb offers (Commander refuses any other).
|
|
165
|
+
const format = options.format === 'json' ? 'json' : 'yaml';
|
|
153
166
|
try {
|
|
154
167
|
if (pathArg !== undefined)
|
|
155
168
|
assertDirectoryArgument(pathArg);
|
|
@@ -162,16 +175,15 @@ export async function queryCommand(sql, pathArg, options) {
|
|
|
162
175
|
parameters: options.param ?? [],
|
|
163
176
|
logger,
|
|
164
177
|
});
|
|
165
|
-
|
|
178
|
+
endWithReport('resources query', buildProjectionQueryReport({
|
|
166
179
|
...outcome,
|
|
167
180
|
root: projectRoot,
|
|
168
181
|
durationMs: Date.now() - startTime,
|
|
169
|
-
});
|
|
170
|
-
writeStructuredOutput(payload, options.format);
|
|
171
|
-
process.exit(ExitCode.OK);
|
|
182
|
+
}), format);
|
|
172
183
|
}
|
|
173
184
|
catch (error) {
|
|
174
|
-
|
|
185
|
+
// A refused statement is USAGE_INVALID by its code; see `describedFailure`.
|
|
186
|
+
endWithRefusal('resources query', refusalCodeOf(error), error, format, { strict: false }, NOTHING_FINISHED);
|
|
175
187
|
}
|
|
176
188
|
}
|
|
177
189
|
//# sourceMappingURL=query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/commands/resources/query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/commands/resources/query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACjG,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAe,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AACnG,OAAO,EACL,qBAAqB,GAEtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AA2BnE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAAkC;IAC3E,OAAO,WAAW,CAAC;QACjB,QAAQ,EAAE,KAAK,CAAC,iBAAiB;QACjC,QAAQ,EAAE,EAAE;QACZ,iFAAiF;QACjF,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;QACvB,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,IAAI,EAAE;YACJ,2DAA2D;YAC3D,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;YAC3B,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;YACrB,mCAAmC;YACnC,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,0EAA0E;YAC1E,uCAAuC;YACvC,cAAc,EAAE,kBAAkB,CAAC,KAAK,CAAC,YAAY,CAAC;YACtD,4EAA4E;YAC5E,4EAA4E;YAC5E,6DAA6D;YAC7D,QAAQ,EAAE,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC;YAC1C,2EAA2E;YAC3E,2EAA2E;YAC3E,wEAAwE;YACxE,uDAAuD;YACvD,eAAe,EAAE,CAAC,GAAG,KAAK,CAAC,eAAe,CAAC;YAC3C,qEAAqE;YACrE,cAAc,EAAE,KAAK,CAAC,cAAc;YACpC,yEAAyE;YACzE,mEAAmE;YACnE,GAAG,iBAAiB,CAAC,KAAK,CAAC,eAAe,CAAC;SAC5C;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAS,kBAAkB,CAAC,OAK3B;IACC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAClD,wEAAwE;IACxE,6EAA6E;IAC7E,wBAAwB;IACxB,OAAO,qBAAqB;IAC1B,0EAA0E;IAC1E,4EAA4E;IAC5E,6EAA6E;IAC7E,SAAS;IACT,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,EAAE,EACrE,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;QACpD,OAAO,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC;QACtC,IAAI,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC;QAC7B,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;QAC3C,GAAG,UAAU;KACd,CAAC,CACH,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,GAAW,EACX,OAA2B,EAC3B,OAAqB;IAErB,MAAM,MAAM,GAAG,YAAY,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,KAAK,EAAE,CAAC,CAAC;IAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,kEAAkE;IAClE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAE3D,IAAI,CAAC;QACH,IAAI,OAAO,KAAK,SAAS;YAAE,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC5D,wEAAwE;QACxE,0CAA0C;QAC1C,MAAM,WAAW,GAAG,oBAAoB,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;QAE3E,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC;YACvC,IAAI,EAAE,WAAW;YACjB,GAAG;YACH,UAAU,EAAE,OAAO,CAAC,KAAK,IAAI,EAAE;YAC/B,MAAM;SACP,CAAC,CAAC;QAEH,aAAa,CAAC,iBAAiB,EAAE,0BAA0B,CAAC;YAC1D,GAAG,OAAO;YACV,IAAI,EAAE,WAAW;YACjB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;SACnC,CAAC,EAAE,MAAM,CAAC,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,4EAA4E;QAC5E,cAAc,CAAC,iBAAiB,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,gBAAgB,CAAC,CAAC;IAC9G,CAAC;AACH,CAAC"}
|