@vibe-agent-toolkit/cli 0.1.42 → 0.2.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -5
- package/dist/bin/vat +95 -28
- package/dist/bin/vat.js +95 -28
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +137 -76
- package/dist/bin.js.map +1 -1
- package/dist/command-loaders.d.ts +44 -0
- package/dist/command-loaders.d.ts.map +1 -0
- package/dist/command-loaders.js +60 -0
- package/dist/command-loaders.js.map +1 -0
- package/dist/commands/agent/build.d.ts.map +1 -1
- package/dist/commands/agent/build.js +2 -1
- package/dist/commands/agent/build.js.map +1 -1
- package/dist/commands/agent/import.d.ts.map +1 -1
- package/dist/commands/agent/import.js +3 -2
- package/dist/commands/agent/import.js.map +1 -1
- package/dist/commands/agent/index.js +1 -1
- package/dist/commands/agent/install-path.d.ts +36 -0
- package/dist/commands/agent/install-path.d.ts.map +1 -0
- package/dist/commands/agent/install-path.js +44 -0
- package/dist/commands/agent/install-path.js.map +1 -0
- package/dist/commands/agent/install.d.ts.map +1 -1
- package/dist/commands/agent/install.js +66 -13
- package/dist/commands/agent/install.js.map +1 -1
- package/dist/commands/agent/installed.d.ts.map +1 -1
- package/dist/commands/agent/installed.js +22 -12
- package/dist/commands/agent/installed.js.map +1 -1
- package/dist/commands/agent/list.d.ts.map +1 -1
- package/dist/commands/agent/list.js +2 -1
- package/dist/commands/agent/list.js.map +1 -1
- package/dist/commands/agent/run.d.ts.map +1 -1
- package/dist/commands/agent/run.js +2 -1
- package/dist/commands/agent/run.js.map +1 -1
- package/dist/commands/agent/uninstall.d.ts.map +1 -1
- package/dist/commands/agent/uninstall.js +13 -6
- package/dist/commands/agent/uninstall.js.map +1 -1
- package/dist/commands/agent/validate.d.ts.map +1 -1
- package/dist/commands/agent/validate.js +3 -2
- package/dist/commands/agent/validate.js.map +1 -1
- package/dist/commands/ard/emit.d.ts +153 -0
- package/dist/commands/ard/emit.d.ts.map +1 -0
- package/dist/commands/ard/emit.js +276 -0
- package/dist/commands/ard/emit.js.map +1 -0
- package/dist/commands/ard/index.d.ts +12 -0
- package/dist/commands/ard/index.d.ts.map +1 -0
- package/dist/commands/ard/index.js +80 -0
- package/dist/commands/ard/index.js.map +1 -0
- package/dist/commands/ard/surfaces.d.ts +56 -0
- package/dist/commands/ard/surfaces.d.ts.map +1 -0
- package/dist/commands/ard/surfaces.js +150 -0
- package/dist/commands/ard/surfaces.js.map +1 -0
- package/dist/commands/audit/distributed-tree.d.ts +60 -2
- package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
- package/dist/commands/audit/distributed-tree.js +73 -1
- package/dist/commands/audit/distributed-tree.js.map +1 -1
- package/dist/commands/audit/git-url-clone.d.ts +1 -1
- package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
- package/dist/commands/audit/git-url-clone.js.map +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
- package/dist/commands/audit/hierarchical-output.js +1 -1
- package/dist/commands/audit/hierarchical-output.js.map +1 -1
- package/dist/commands/audit/provenance.d.ts.map +1 -1
- package/dist/commands/audit/provenance.js +4 -3
- package/dist/commands/audit/provenance.js.map +1 -1
- package/dist/commands/audit/scan-population.d.ts +158 -0
- package/dist/commands/audit/scan-population.d.ts.map +1 -0
- package/dist/commands/audit/scan-population.js +292 -0
- package/dist/commands/audit/scan-population.js.map +1 -0
- package/dist/commands/audit-settings.d.ts.map +1 -1
- package/dist/commands/audit-settings.js +6 -5
- package/dist/commands/audit-settings.js.map +1 -1
- package/dist/commands/audit.d.ts +98 -8
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +1133 -395
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +40 -36
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cache/cache-control.d.ts +82 -0
- package/dist/commands/cache/cache-control.d.ts.map +1 -0
- package/dist/commands/cache/cache-control.js +86 -0
- package/dist/commands/cache/cache-control.js.map +1 -0
- package/dist/commands/cache/clear.d.ts +105 -0
- package/dist/commands/cache/clear.d.ts.map +1 -0
- package/dist/commands/cache/clear.js +248 -0
- package/dist/commands/cache/clear.js.map +1 -0
- package/dist/commands/cache/index.d.ts +18 -0
- package/dist/commands/cache/index.d.ts.map +1 -0
- package/dist/commands/cache/index.js +94 -0
- package/dist/commands/cache/index.js.map +1 -0
- package/dist/commands/claude/claude-config.d.ts.map +1 -1
- package/dist/commands/claude/claude-config.js +6 -0
- package/dist/commands/claude/claude-config.js.map +1 -1
- package/dist/commands/claude/context.d.ts +340 -0
- package/dist/commands/claude/context.d.ts.map +1 -0
- package/dist/commands/claude/context.js +1080 -0
- package/dist/commands/claude/context.js.map +1 -0
- package/dist/commands/claude/index.d.ts +14 -0
- package/dist/commands/claude/index.d.ts.map +1 -1
- package/dist/commands/claude/index.js +22 -2
- package/dist/commands/claude/index.js.map +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.d.ts +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.js +1 -2
- package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.js +40 -31
- package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.js +0 -1
- package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish-tree.js +0 -6
- package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
- package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish.js +2 -1
- package/dist/commands/claude/marketplace/publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate.d.ts +73 -22
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +407 -72
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/org/api-keys.d.ts +0 -3
- package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
- package/dist/commands/claude/org/api-keys.js +2 -1
- package/dist/commands/claude/org/api-keys.js.map +1 -1
- package/dist/commands/claude/org/helpers.d.ts +54 -1
- package/dist/commands/claude/org/helpers.d.ts.map +1 -1
- package/dist/commands/claude/org/helpers.js +42 -7
- package/dist/commands/claude/org/helpers.js.map +1 -1
- package/dist/commands/claude/org/index.d.ts.map +1 -1
- package/dist/commands/claude/org/index.js +24 -16
- package/dist/commands/claude/org/index.js.map +1 -1
- package/dist/commands/claude/org/invites.d.ts +0 -3
- package/dist/commands/claude/org/invites.d.ts.map +1 -1
- package/dist/commands/claude/org/invites.js +3 -2
- package/dist/commands/claude/org/invites.js.map +1 -1
- package/dist/commands/claude/org/skills.d.ts +527 -0
- package/dist/commands/claude/org/skills.d.ts.map +1 -1
- package/dist/commands/claude/org/skills.js +1414 -108
- package/dist/commands/claude/org/skills.js.map +1 -1
- package/dist/commands/claude/org/users.d.ts +0 -3
- package/dist/commands/claude/org/users.d.ts.map +1 -1
- package/dist/commands/claude/org/users.js +6 -3
- package/dist/commands/claude/org/users.js.map +1 -1
- package/dist/commands/claude/org/workspaces.d.ts +0 -3
- package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
- package/dist/commands/claude/org/workspaces.js +11 -7
- package/dist/commands/claude/org/workspaces.js.map +1 -1
- package/dist/commands/claude/plugin/build.d.ts +41 -3
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +147 -80
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
- package/dist/commands/claude/plugin/helpers.js +2 -7
- package/dist/commands/claude/plugin/helpers.js.map +1 -1
- package/dist/commands/claude/plugin/install.d.ts +12 -0
- package/dist/commands/claude/plugin/install.d.ts.map +1 -1
- package/dist/commands/claude/plugin/install.js +93 -62
- package/dist/commands/claude/plugin/install.js.map +1 -1
- package/dist/commands/claude/plugin/list.d.ts.map +1 -1
- package/dist/commands/claude/plugin/list.js +3 -2
- package/dist/commands/claude/plugin/list.js.map +1 -1
- package/dist/commands/claude/plugin/marketplace-json.d.ts +24 -9
- package/dist/commands/claude/plugin/marketplace-json.d.ts.map +1 -1
- package/dist/commands/claude/plugin/marketplace-json.js +10 -9
- package/dist/commands/claude/plugin/marketplace-json.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-changelog.js +0 -2
- package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.js +3 -6
- package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.js +3 -6
- package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts +73 -0
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +221 -14
- package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
- package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
- package/dist/commands/claude/plugin/uninstall.js +4 -4
- package/dist/commands/claude/plugin/uninstall.js.map +1 -1
- package/dist/commands/consistency-check.d.ts +17 -15
- package/dist/commands/consistency-check.d.ts.map +1 -1
- package/dist/commands/consistency-check.js +152 -106
- package/dist/commands/consistency-check.js.map +1 -1
- package/dist/commands/corpus/index.d.ts.map +1 -1
- package/dist/commands/corpus/index.js +3 -0
- package/dist/commands/corpus/index.js.map +1 -1
- package/dist/commands/corpus/report.d.ts +1 -2
- package/dist/commands/corpus/report.d.ts.map +1 -1
- package/dist/commands/corpus/report.js +1 -3
- package/dist/commands/corpus/report.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts +58 -1
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +95 -41
- package/dist/commands/corpus/runner.js.map +1 -1
- package/dist/commands/corpus/scan.d.ts.map +1 -1
- package/dist/commands/corpus/scan.js +20 -12
- package/dist/commands/corpus/scan.js.map +1 -1
- package/dist/commands/corpus/seed.d.ts +4 -4
- package/dist/commands/corpus/seed.d.ts.map +1 -1
- package/dist/commands/corpus/seed.js +1 -3
- package/dist/commands/corpus/seed.js.map +1 -1
- package/dist/commands/doctor.d.ts +50 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +245 -52
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/inventory.d.ts +13 -1
- package/dist/commands/inventory.d.ts.map +1 -1
- package/dist/commands/inventory.js +128 -17
- package/dist/commands/inventory.js.map +1 -1
- package/dist/commands/mcp/collections.d.ts +1 -1
- package/dist/commands/mcp/collections.d.ts.map +1 -1
- package/dist/commands/mcp/list-collections.d.ts.map +1 -1
- package/dist/commands/mcp/list-collections.js +2 -1
- package/dist/commands/mcp/list-collections.js.map +1 -1
- package/dist/commands/mcp/serve.d.ts.map +1 -1
- package/dist/commands/mcp/serve.js +3 -2
- package/dist/commands/mcp/serve.js.map +1 -1
- package/dist/commands/okf/index.d.ts +11 -0
- package/dist/commands/okf/index.d.ts.map +1 -0
- package/dist/commands/okf/index.js +114 -0
- package/dist/commands/okf/index.js.map +1 -0
- package/dist/commands/okf/validate.d.ts +191 -0
- package/dist/commands/okf/validate.d.ts.map +1 -0
- package/dist/commands/okf/validate.js +190 -0
- package/dist/commands/okf/validate.js.map +1 -0
- package/dist/commands/phase-utils.d.ts +182 -114
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +154 -163
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/positional-args.d.ts.map +1 -1
- package/dist/commands/positional-args.js +3 -2
- package/dist/commands/positional-args.js.map +1 -1
- package/dist/commands/rag/clear-command.d.ts.map +1 -1
- package/dist/commands/rag/clear-command.js +2 -1
- package/dist/commands/rag/clear-command.js.map +1 -1
- package/dist/commands/rag/index-command.d.ts +64 -0
- package/dist/commands/rag/index-command.d.ts.map +1 -1
- package/dist/commands/rag/index-command.js +72 -6
- package/dist/commands/rag/index-command.js.map +1 -1
- package/dist/commands/rag/index.d.ts.map +1 -1
- package/dist/commands/rag/index.js +23 -10
- package/dist/commands/rag/index.js.map +1 -1
- package/dist/commands/rag/query-command.d.ts.map +1 -1
- package/dist/commands/rag/query-command.js +2 -1
- package/dist/commands/rag/query-command.js.map +1 -1
- package/dist/commands/rag/stats-command.d.ts.map +1 -1
- package/dist/commands/rag/stats-command.js +2 -1
- package/dist/commands/rag/stats-command.js.map +1 -1
- package/dist/commands/resources/builtin-help.d.ts +27 -0
- package/dist/commands/resources/builtin-help.d.ts.map +1 -0
- package/dist/commands/resources/builtin-help.js +46 -0
- package/dist/commands/resources/builtin-help.js.map +1 -0
- package/dist/commands/resources/check-progress.d.ts +154 -0
- package/dist/commands/resources/check-progress.d.ts.map +1 -0
- package/dist/commands/resources/check-progress.js +222 -0
- package/dist/commands/resources/check-progress.js.map +1 -0
- package/dist/commands/resources/check-supervisor.d.ts +465 -0
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -0
- package/dist/commands/resources/check-supervisor.js +573 -0
- package/dist/commands/resources/check-supervisor.js.map +1 -0
- package/dist/commands/resources/check.d.ts +593 -0
- package/dist/commands/resources/check.d.ts.map +1 -0
- package/dist/commands/resources/check.js +1365 -0
- package/dist/commands/resources/check.js.map +1 -0
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +425 -6
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/query.d.ts +106 -0
- package/dist/commands/resources/query.d.ts.map +1 -0
- package/dist/commands/resources/query.js +177 -0
- package/dist/commands/resources/query.js.map +1 -0
- package/dist/commands/resources/scan.d.ts +24 -0
- package/dist/commands/resources/scan.d.ts.map +1 -1
- package/dist/commands/resources/scan.js +17 -8
- package/dist/commands/resources/scan.js.map +1 -1
- package/dist/commands/resources/validate.d.ts +57 -4
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +224 -56
- package/dist/commands/resources/validate.js.map +1 -1
- package/dist/commands/skill/review-checklist.d.ts +3 -2
- package/dist/commands/skill/review-checklist.d.ts.map +1 -1
- package/dist/commands/skill/review-checklist.js +40 -2
- package/dist/commands/skill/review-checklist.js.map +1 -1
- package/dist/commands/skill/review.d.ts +247 -0
- package/dist/commands/skill/review.d.ts.map +1 -1
- package/dist/commands/skill/review.js +99 -62
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/configure.d.ts +56 -0
- package/dist/commands/skill/test/configure.d.ts.map +1 -1
- package/dist/commands/skill/test/configure.js +75 -16
- package/dist/commands/skill/test/configure.js.map +1 -1
- package/dist/commands/skill/test/run.d.ts +63 -10
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +258 -77
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build.d.ts +94 -4
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +325 -97
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/install.d.ts +2 -1
- package/dist/commands/skills/install.d.ts.map +1 -1
- package/dist/commands/skills/install.js +20 -31
- package/dist/commands/skills/install.js.map +1 -1
- package/dist/commands/skills/list.d.ts +2 -1
- package/dist/commands/skills/list.d.ts.map +1 -1
- package/dist/commands/skills/list.js +44 -26
- package/dist/commands/skills/list.js.map +1 -1
- package/dist/commands/skills/package.d.ts +24 -3
- package/dist/commands/skills/package.d.ts.map +1 -1
- package/dist/commands/skills/package.js +42 -17
- package/dist/commands/skills/package.js.map +1 -1
- package/dist/commands/skills/scope-guard.d.ts.map +1 -1
- package/dist/commands/skills/scope-guard.js +3 -5
- package/dist/commands/skills/scope-guard.js.map +1 -1
- package/dist/commands/skills/shared.d.ts.map +1 -1
- package/dist/commands/skills/shared.js +2 -4
- package/dist/commands/skills/shared.js.map +1 -1
- package/dist/commands/skills/skill-discovery.d.ts +47 -6
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +66 -16
- package/dist/commands/skills/skill-discovery.js.map +1 -1
- package/dist/commands/skills/source-resolvers.d.ts +15 -0
- package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
- package/dist/commands/skills/source-resolvers.js +25 -4
- package/dist/commands/skills/source-resolvers.js.map +1 -1
- package/dist/commands/skills/validate-command.d.ts.map +1 -1
- package/dist/commands/skills/validate-command.js +11 -3
- package/dist/commands/skills/validate-command.js.map +1 -1
- package/dist/commands/skills/validate.d.ts +140 -4
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +224 -67
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +63 -27
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +119 -15
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +357 -142
- package/dist/commands/verify.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/report-schemas.d.ts +45 -0
- package/dist/report-schemas.d.ts.map +1 -0
- package/dist/report-schemas.js +100 -0
- package/dist/report-schemas.js.map +1 -0
- package/dist/skill-resolution/classify.js +2 -2
- package/dist/skill-resolution/classify.js.map +1 -1
- package/dist/skill-resolution/packaging-config.d.ts +49 -5
- package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
- package/dist/skill-resolution/packaging-config.js +59 -19
- package/dist/skill-resolution/packaging-config.js.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.js +55 -57
- package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
- package/dist/utils/agent-discovery.d.ts.map +1 -1
- package/dist/utils/agent-discovery.js +22 -11
- package/dist/utils/agent-discovery.js.map +1 -1
- package/dist/utils/agent-runner.d.ts.map +1 -1
- package/dist/utils/agent-runner.js +7 -4
- package/dist/utils/agent-runner.js.map +1 -1
- package/dist/utils/claude-context-lens.d.ts +34 -0
- package/dist/utils/claude-context-lens.d.ts.map +1 -0
- package/dist/utils/claude-context-lens.js +39 -0
- package/dist/utils/claude-context-lens.js.map +1 -0
- package/dist/utils/command-error.d.ts +144 -7
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +179 -16
- package/dist/utils/command-error.js.map +1 -1
- package/dist/utils/config-loader.d.ts +2 -1
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js +40 -14
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/corpus-target.d.ts +26 -0
- package/dist/utils/corpus-target.d.ts.map +1 -0
- package/dist/utils/corpus-target.js +35 -0
- package/dist/utils/corpus-target.js.map +1 -0
- package/dist/utils/edge-lens-evaluation.d.ts +83 -0
- package/dist/utils/edge-lens-evaluation.d.ts.map +1 -0
- package/dist/utils/edge-lens-evaluation.js +110 -0
- package/dist/utils/edge-lens-evaluation.js.map +1 -0
- package/dist/utils/help-loader.d.ts.map +1 -1
- package/dist/utils/help-loader.js +0 -1
- package/dist/utils/help-loader.js.map +1 -1
- package/dist/utils/issue-anchor.d.ts +2 -2
- package/dist/utils/issue-anchor.d.ts.map +1 -1
- package/dist/utils/issue-anchor.js +1 -1
- package/dist/utils/issue-rendering.d.ts +3 -3
- package/dist/utils/issue-rendering.d.ts.map +1 -1
- package/dist/utils/issue-rendering.js +3 -3
- package/dist/utils/issue-rendering.js.map +1 -1
- package/dist/utils/issue-severity.d.ts +12 -5
- package/dist/utils/issue-severity.d.ts.map +1 -1
- package/dist/utils/issue-severity.js +1 -1
- package/dist/utils/issue-severity.js.map +1 -1
- package/dist/utils/optional-backend.d.ts +78 -0
- package/dist/utils/optional-backend.d.ts.map +1 -0
- package/dist/utils/optional-backend.js +117 -0
- package/dist/utils/optional-backend.js.map +1 -0
- package/dist/utils/output.d.ts +26 -0
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +35 -0
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/package-json.d.ts +24 -0
- package/dist/utils/package-json.d.ts.map +1 -0
- package/dist/utils/package-json.js +49 -0
- package/dist/utils/package-json.js.map +1 -0
- package/dist/utils/population-wiring.d.ts +100 -0
- package/dist/utils/population-wiring.d.ts.map +1 -0
- package/dist/utils/population-wiring.js +98 -0
- package/dist/utils/population-wiring.js.map +1 -0
- package/dist/utils/project-root-policy.d.ts +20 -0
- package/dist/utils/project-root-policy.d.ts.map +1 -1
- package/dist/utils/project-root-policy.js +30 -0
- package/dist/utils/project-root-policy.js.map +1 -1
- package/dist/utils/projection-lenses.d.ts +98 -0
- package/dist/utils/projection-lenses.d.ts.map +1 -0
- package/dist/utils/projection-lenses.js +203 -0
- package/dist/utils/projection-lenses.js.map +1 -0
- package/dist/utils/projection-query.d.ts +324 -0
- package/dist/utils/projection-query.d.ts.map +1 -0
- package/dist/utils/projection-query.js +357 -0
- package/dist/utils/projection-query.js.map +1 -0
- package/dist/utils/projection-store.d.ts +335 -0
- package/dist/utils/projection-store.d.ts.map +1 -0
- package/dist/utils/projection-store.js +522 -0
- package/dist/utils/projection-store.js.map +1 -0
- package/dist/utils/relation-limits.d.ts +50 -0
- package/dist/utils/relation-limits.d.ts.map +1 -0
- package/dist/utils/relation-limits.js +50 -0
- package/dist/utils/relation-limits.js.map +1 -0
- package/dist/utils/repeatable-option.d.ts +37 -0
- package/dist/utils/repeatable-option.d.ts.map +1 -0
- package/dist/utils/repeatable-option.js +39 -0
- package/dist/utils/repeatable-option.js.map +1 -0
- package/dist/utils/resource-loader.d.ts +132 -2
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +288 -27
- package/dist/utils/resource-loader.js.map +1 -1
- package/dist/utils/root-argv.d.ts +53 -0
- package/dist/utils/root-argv.d.ts.map +1 -0
- package/dist/utils/root-argv.js +215 -0
- package/dist/utils/root-argv.js.map +1 -0
- package/dist/utils/run-integrity.d.ts +95 -0
- package/dist/utils/run-integrity.d.ts.map +1 -0
- package/dist/utils/run-integrity.js +102 -0
- package/dist/utils/run-integrity.js.map +1 -0
- package/dist/utils/skill-discovery.d.ts.map +1 -1
- package/dist/utils/skill-discovery.js +2 -1
- package/dist/utils/skill-discovery.js.map +1 -1
- package/dist/utils/skill-packaging-config.d.ts +63 -1
- package/dist/utils/skill-packaging-config.d.ts.map +1 -1
- package/dist/utils/skill-packaging-config.js +56 -1
- package/dist/utils/skill-packaging-config.js.map +1 -1
- package/dist/utils/sqlite-experimental-warning.d.ts +69 -0
- package/dist/utils/sqlite-experimental-warning.d.ts.map +1 -0
- package/dist/utils/sqlite-experimental-warning.js +144 -0
- package/dist/utils/sqlite-experimental-warning.js.map +1 -0
- package/dist/utils/url-redact.d.ts.map +1 -1
- package/dist/utils/url-redact.js +4 -6
- package/dist/utils/url-redact.js.map +1 -1
- package/dist/utils/user-context-scanner.d.ts +8 -0
- package/dist/utils/user-context-scanner.d.ts.map +1 -1
- package/dist/utils/user-context-scanner.js +4 -2
- package/dist/utils/user-context-scanner.js.map +1 -1
- package/dist/utils/validate-help-files.d.ts.map +1 -1
- package/dist/utils/validate-help-files.js +12 -6
- package/dist/utils/validate-help-files.js.map +1 -1
- package/dist/utils/vat-bin-path.d.ts +36 -0
- package/dist/utils/vat-bin-path.d.ts.map +1 -0
- package/dist/utils/vat-bin-path.js +48 -0
- package/dist/utils/vat-bin-path.js.map +1 -0
- package/dist/utils/verdict-helpers.d.ts +1 -1
- package/dist/utils/verdict-helpers.d.ts.map +1 -1
- package/dist/utils/verdict-helpers.js +1 -1
- package/dist/utils/verdict-helpers.js.map +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -3
- package/dist/version.js.map +1 -1
- package/docs/agent.md +2 -2
- package/docs/audit.md +141 -37
- package/docs/doctor.md +7 -6
- package/docs/index.md +40 -12
- package/docs/mcp.md +2 -2
- package/docs/rag.md +3 -2
- package/docs/resources.md +13 -3
- package/docs/skill-test.md +10 -9
- package/docs/skills.md +53 -69
- package/package.json +38 -27
- package/schemas/ard-emit.json +149 -0
- package/schemas/okf-validate.json +170 -0
- package/schemas/resources-check.json +229 -0
- package/schemas/skill-review.json +230 -0
- package/dist/commands/resources/command-helpers.d.ts +0 -5
- package/dist/commands/resources/command-helpers.d.ts.map +0 -1
- package/dist/commands/resources/command-helpers.js +0 -6
- package/dist/commands/resources/command-helpers.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAKrD;AAED;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;AAoCpF,MAAM,WAAW,mBAAmB;IAClC,gFAAgF;IAChF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,CAAC,kBAAkB,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAC1B,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qB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAMrF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,IAAI,CAEN"}
|
package/dist/utils/output.js
CHANGED
|
@@ -138,6 +138,41 @@ export function writeYamlOutput(data) {
|
|
|
138
138
|
aliasDuplicateObjects: false,
|
|
139
139
|
})}`);
|
|
140
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Write a single JSON document to stdout.
|
|
143
|
+
*
|
|
144
|
+
* The sibling of {@link writeYamlOutput}, for the same payloads, and it exists
|
|
145
|
+
* because a consumer that has to parse YAML needs a YAML parser: JSON is the
|
|
146
|
+
* format every language reads without one. `vat resources validate` already
|
|
147
|
+
* offers `--format json` for exactly this reason; a scan document that could
|
|
148
|
+
* only be had as YAML made the population it reports the harder of the two to
|
|
149
|
+
* consume programmatically, which is backwards.
|
|
150
|
+
*
|
|
151
|
+
* Written the same way as its YAML sibling, and the comment there applies
|
|
152
|
+
* verbatim: the ordinary stream write keeps this summary behind any
|
|
153
|
+
* human-readable progress already buffered on the same channel.
|
|
154
|
+
*
|
|
155
|
+
* @param data - Data to serialize as JSON
|
|
156
|
+
*/
|
|
157
|
+
export function writeJsonOutput(data) {
|
|
158
|
+
process.stdout.write(`${JSON.stringify(data, null, 2)}\n`);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Write one structured document in the format a `--format` option selected:
|
|
162
|
+
* `json` → {@link writeJsonOutput}; anything else (including an absent option)
|
|
163
|
+
* → {@link writeYamlOutput}, the CLI's default document format.
|
|
164
|
+
*
|
|
165
|
+
* @param data - The document
|
|
166
|
+
* @param format - The selected format (`json`, or anything else for YAML)
|
|
167
|
+
*/
|
|
168
|
+
export function writeStructuredOutput(data, format) {
|
|
169
|
+
if (format === 'json') {
|
|
170
|
+
writeJsonOutput(data);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
writeYamlOutput(data);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
141
176
|
/**
|
|
142
177
|
* Write a test-format finding to stderr.
|
|
143
178
|
*
|
package/dist/utils/output.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,YAAY,CACV,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAChE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAC7B,CAAC;AACJ,CAAC;AAUD;;;;;;;;;GASG;AACH,MAAM,8BAA8B,GAAG,MAAM,CAAC;AAE9C,uEAAuE;AACvE,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAE/B;;;;;GAKG;AACH,SAAS,SAAS,CAAC,EAAU;IAC3B,OAAO,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AACnE,CAAC;AAED;;;;GAIG;AACH,SAAS,yBAAyB,CAAC,kBAA0B;IAC3D,IAAI,kBAAkB,GAAG,mBAAmB;QAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAC7D,CAAC;AASD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,YAAY,CAC1B,KAAiB,EACjB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ED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,eAAe,CAAC,IAAa;IAC3C,4EAA4E;IAC5E,wEAAwE;IACxE,4EAA4E;IAC5E,8EAA8E;IAC9E,2DAA2D;IAC3D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;QAChD,MAAM,EAAE,CAAC;QACT,SAAS,EAAE,GAAG;QACd,qBAAqB,EAAE,KAAK;KAC7B,CAAC,EAAE,CAAC,CAAC;AACR,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,eAAe,CAAC,IAAa;IAC3C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;AAC7D,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAa,EAAE,MAA0B;IAC7E,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;AACH,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAY,EACZ,IAAY,EACZ,MAAc,EACd,QAAgB,EAChB,OAAe;IAEf,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,IAAI,IAAI,MAAM,KAAK,QAAQ,KAAK,OAAO,IAAI,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One reading of a project's `package.json` for the lanes that want an
|
|
3
|
+
* OPTIONAL field out of it — a `version` to stamp, a `vat.skills` list, a
|
|
4
|
+
* `files` allowlist.
|
|
5
|
+
*
|
|
6
|
+
* Every one of those lanes used to spell the read as `existsSync` →
|
|
7
|
+
* `readFileSync` → `JSON.parse` inside one `try { … } catch { return <absent> }`,
|
|
8
|
+
* which made "there is no package.json" indistinguishable from "there is one
|
|
9
|
+
* and it is not JSON" and from "there is one and the OS refused it". The first
|
|
10
|
+
* is the sentinel's meaning; the other two were reported as it — a build
|
|
11
|
+
* stamped no version, a consistency check verified nothing, and neither said
|
|
12
|
+
* why. npm itself refuses a manifest it cannot parse, so a tree with one is
|
|
13
|
+
* already broken; the reader's job is to say so, not to proceed around it.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* The parsed manifest, or `undefined` when there is none at `pkgPath`.
|
|
17
|
+
*
|
|
18
|
+
* @throws {Error} naming the file when it exists but is not a JSON object;
|
|
19
|
+
* the parse error is the `cause`.
|
|
20
|
+
* @throws whatever the filesystem threw for anything that is not an absence
|
|
21
|
+
* (a refusal stays a refusal).
|
|
22
|
+
*/
|
|
23
|
+
export declare function readPackageJsonOrAbsent(pkgPath: string): Record<string, unknown> | undefined;
|
|
24
|
+
//# sourceMappingURL=package-json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-json.d.ts","sourceRoot":"","sources":["../../src/utils/package-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAoB5F"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One reading of a project's `package.json` for the lanes that want an
|
|
3
|
+
* OPTIONAL field out of it — a `version` to stamp, a `vat.skills` list, a
|
|
4
|
+
* `files` allowlist.
|
|
5
|
+
*
|
|
6
|
+
* Every one of those lanes used to spell the read as `existsSync` →
|
|
7
|
+
* `readFileSync` → `JSON.parse` inside one `try { … } catch { return <absent> }`,
|
|
8
|
+
* which made "there is no package.json" indistinguishable from "there is one
|
|
9
|
+
* and it is not JSON" and from "there is one and the OS refused it". The first
|
|
10
|
+
* is the sentinel's meaning; the other two were reported as it — a build
|
|
11
|
+
* stamped no version, a consistency check verified nothing, and neither said
|
|
12
|
+
* why. npm itself refuses a manifest it cannot parse, so a tree with one is
|
|
13
|
+
* already broken; the reader's job is to say so, not to proceed around it.
|
|
14
|
+
*/
|
|
15
|
+
import { readFileSync } from 'node:fs';
|
|
16
|
+
import { isPathAbsentError } from '@vibe-agent-toolkit/utils';
|
|
17
|
+
/**
|
|
18
|
+
* The parsed manifest, or `undefined` when there is none at `pkgPath`.
|
|
19
|
+
*
|
|
20
|
+
* @throws {Error} naming the file when it exists but is not a JSON object;
|
|
21
|
+
* the parse error is the `cause`.
|
|
22
|
+
* @throws whatever the filesystem threw for anything that is not an absence
|
|
23
|
+
* (a refusal stays a refusal).
|
|
24
|
+
*/
|
|
25
|
+
export function readPackageJsonOrAbsent(pkgPath) {
|
|
26
|
+
let raw;
|
|
27
|
+
try {
|
|
28
|
+
raw = readFileSync(pkgPath, 'utf-8');
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (isPathAbsentError(error))
|
|
32
|
+
return undefined;
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
35
|
+
let parsed;
|
|
36
|
+
try {
|
|
37
|
+
parsed = JSON.parse(raw);
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
if (!(error instanceof SyntaxError))
|
|
41
|
+
throw error;
|
|
42
|
+
throw new Error(`${pkgPath} is not valid JSON: ${error.message}`, { cause: error });
|
|
43
|
+
}
|
|
44
|
+
if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
|
|
45
|
+
throw new Error(`${pkgPath} is not a JSON object, so it is not a package manifest`);
|
|
46
|
+
}
|
|
47
|
+
return parsed;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=package-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-json.js","sourceRoot":"","sources":["../../src/utils/package-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAe;IACrD,IAAI,GAAW,CAAC;IAChB,IAAI,CAAC;QACH,GAAG,GAAG,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,iBAAiB,CAAC,KAAK,CAAC;YAAE,OAAO,SAAS,CAAC;QAC/C,MAAM,KAAK,CAAC;IACd,CAAC;IAED,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,CAAC,KAAK,YAAY,WAAW,CAAC;YAAE,MAAM,KAAK,CAAC;QACjD,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,uBAAuB,KAAK,CAAC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACtF,CAAC;IACD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3E,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,wDAAwD,CAAC,CAAC;IACtF,CAAC;IACD,OAAO,MAAiC,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The three arguments every CLI lane hands a projection population builder the
|
|
3
|
+
* same way: the blob-stage observer, the ignore oracle, and the run's store.
|
|
4
|
+
*
|
|
5
|
+
* ## Why this is CLI code and not `resources` code
|
|
6
|
+
*
|
|
7
|
+
* Nothing here decides anything about a projection. The observer's whole body is
|
|
8
|
+
* `describeBlobRefusals` — owned by `@vibe-agent-toolkit/resources` — routed to a
|
|
9
|
+
* {@link Logger}, which is a CLI type no other package has; the two spreads exist
|
|
10
|
+
* only because `exactOptionalPropertyTypes` makes "absent" and "present and
|
|
11
|
+
* undefined" different arguments. That is command plumbing, in the same family as
|
|
12
|
+
* `projection-store.ts` next door, so it stays inside the package the CLI-stays-
|
|
13
|
+
* dumb rule allows it in.
|
|
14
|
+
*
|
|
15
|
+
* ## The observer is the reason this is shared rather than retyped
|
|
16
|
+
*
|
|
17
|
+
* `buildInventoryPopulation` and `buildClaudeContextPopulation` both REQUIRE
|
|
18
|
+
* `onBlobPopulation` — a caller with nothing to do with the counts must name
|
|
19
|
+
* `DISCARD_BLOB_POPULATION` rather than leave it off — because a tree whose every
|
|
20
|
+
* document was declined as binary otherwise populates as empty and reports
|
|
21
|
+
* success. Two hand-written copies of the reporting half is two places for that
|
|
22
|
+
* report to quietly become a no-op.
|
|
23
|
+
*/
|
|
24
|
+
import { type BlobPopulationReport, type CollectionConfig, type PopulationCache } from '@vibe-agent-toolkit/resources';
|
|
25
|
+
import type { GitTracker } from '@vibe-agent-toolkit/utils/git';
|
|
26
|
+
import type { Logger } from './logger.js';
|
|
27
|
+
/**
|
|
28
|
+
* The population arguments {@link populationWiring} supplies.
|
|
29
|
+
*
|
|
30
|
+
* Spread into a builder's options object, so the three optional inputs are
|
|
31
|
+
* optional in the `exactOptionalPropertyTypes` sense — omitted entirely when
|
|
32
|
+
* they are absent, never present-and-undefined.
|
|
33
|
+
*/
|
|
34
|
+
export interface PopulationWiring {
|
|
35
|
+
onBlobPopulation: (report: BlobPopulationReport) => void;
|
|
36
|
+
gitTracker?: GitTracker | undefined;
|
|
37
|
+
cache?: PopulationCache | undefined;
|
|
38
|
+
collections?: Readonly<Record<string, CollectionConfig>> | undefined;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Wire one population's blob-stage observer, ignore oracle and store.
|
|
42
|
+
*
|
|
43
|
+
* `describeBlobRefusals` returns undefined on a run that refused nothing, so a
|
|
44
|
+
* clean population stays exactly as quiet as it was — which is the only thing
|
|
45
|
+
* that keeps the line worth reading when it does appear.
|
|
46
|
+
*
|
|
47
|
+
* ⚠️ The refusals go to `logger.warn`, i.e. **stderr**. Both callers write a
|
|
48
|
+
* parseable document to stdout, and a diagnostic in the middle of it breaks every
|
|
49
|
+
* consumer.
|
|
50
|
+
*
|
|
51
|
+
* @param logger - Where blob-stage refusals are reported
|
|
52
|
+
* @param gitTracker - The ignore oracle, or undefined when there is none. Not
|
|
53
|
+
* cosmetic: `resource_realizations.gitignored` is filled only when a tracker
|
|
54
|
+
* was supplied, so its absence decides whether a consumer can TELL which
|
|
55
|
+
* members were ignored
|
|
56
|
+
* @param cache - The run's projection store, or undefined to re-derive
|
|
57
|
+
* @param root - The project root, from which the run's declared `mimeType`
|
|
58
|
+
* routing is READ rather than passed. See {@link collectionsOption}
|
|
59
|
+
* @returns The options to spread into the population builder's argument
|
|
60
|
+
*/
|
|
61
|
+
export declare function populationWiring(logger: Logger, gitTracker: GitTracker | undefined, cache: PopulationCache | undefined, root: string): PopulationWiring;
|
|
62
|
+
/**
|
|
63
|
+
* The project's collection declarations at `root`, or undefined for a project
|
|
64
|
+
* that declares none.
|
|
65
|
+
*
|
|
66
|
+
* ## Why this is READ here and not passed in
|
|
67
|
+
*
|
|
68
|
+
* A declared `mimeType` changes which parser runs, which changes the content
|
|
69
|
+
* key, which is folded into the projection store's key through the routing's
|
|
70
|
+
* fingerprint. So two lanes of ONE command that disagree about whether to supply
|
|
71
|
+
* the declarations do not merely disagree about parsing — they **evict each
|
|
72
|
+
* other's stored extents over an unchanged tree, run after run.**
|
|
73
|
+
*
|
|
74
|
+
* Taking a `root` and reading the config here rather than accepting a
|
|
75
|
+
* `collections` argument is what makes that disagreement unrepresentable: there
|
|
76
|
+
* is one answer per root and every lane that goes through this helper gets it.
|
|
77
|
+
* An optional argument would have been a thing three call sites could each
|
|
78
|
+
* forget, and forgetting is silent — a cache that never hits looks exactly like
|
|
79
|
+
* a cache that is merely cold.
|
|
80
|
+
*
|
|
81
|
+
* `loadConfigCached` is keyed on the root, so the repeat calls across a
|
|
82
|
+
* command's lanes cost one parse between them. A broken config throws here, as
|
|
83
|
+
* it does everywhere else — a population silently typed by the built-in tables
|
|
84
|
+
* because the config would not parse is the conflation
|
|
85
|
+
* {@link loadConfigCached} exists to refuse.
|
|
86
|
+
*
|
|
87
|
+
* Returned as a SPREADABLE rather than a value: `exactOptionalPropertyTypes`
|
|
88
|
+
* makes an absent key and one holding `undefined` different arguments, and the
|
|
89
|
+
* population builders declare `collections` optional. Every caller spreads this,
|
|
90
|
+
* so no call site writes its own `!== undefined &&` and none can get the two
|
|
91
|
+
* states the wrong way round.
|
|
92
|
+
*
|
|
93
|
+
* @param root - The project root whose config declares the collections
|
|
94
|
+
* @returns `{ collections }`, or `{}` when there is no config or no
|
|
95
|
+
* `resources.collections` in it
|
|
96
|
+
*/
|
|
97
|
+
export declare function collectionsOption(root: string): {
|
|
98
|
+
collections?: Readonly<Record<string, CollectionConfig>>;
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=population-wiring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"population-wiring.d.ts","sourceRoot":"","sources":["../../src/utils/population-wiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAGhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gBAAgB,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACzD,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,KAAK,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IACpC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,GAAG,SAAS,CAAC;CACtE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,GAAG,SAAS,EAClC,KAAK,EAAE,eAAe,GAAG,SAAS,EAClC,IAAI,EAAE,MAAM,GACX,gBAAgB,CAUlB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,GACX;IAAE,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAA;CAAE,CAG9D"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The three arguments every CLI lane hands a projection population builder the
|
|
3
|
+
* same way: the blob-stage observer, the ignore oracle, and the run's store.
|
|
4
|
+
*
|
|
5
|
+
* ## Why this is CLI code and not `resources` code
|
|
6
|
+
*
|
|
7
|
+
* Nothing here decides anything about a projection. The observer's whole body is
|
|
8
|
+
* `describeBlobRefusals` — owned by `@vibe-agent-toolkit/resources` — routed to a
|
|
9
|
+
* {@link Logger}, which is a CLI type no other package has; the two spreads exist
|
|
10
|
+
* only because `exactOptionalPropertyTypes` makes "absent" and "present and
|
|
11
|
+
* undefined" different arguments. That is command plumbing, in the same family as
|
|
12
|
+
* `projection-store.ts` next door, so it stays inside the package the CLI-stays-
|
|
13
|
+
* dumb rule allows it in.
|
|
14
|
+
*
|
|
15
|
+
* ## The observer is the reason this is shared rather than retyped
|
|
16
|
+
*
|
|
17
|
+
* `buildInventoryPopulation` and `buildClaudeContextPopulation` both REQUIRE
|
|
18
|
+
* `onBlobPopulation` — a caller with nothing to do with the counts must name
|
|
19
|
+
* `DISCARD_BLOB_POPULATION` rather than leave it off — because a tree whose every
|
|
20
|
+
* document was declined as binary otherwise populates as empty and reports
|
|
21
|
+
* success. Two hand-written copies of the reporting half is two places for that
|
|
22
|
+
* report to quietly become a no-op.
|
|
23
|
+
*/
|
|
24
|
+
import { describeBlobRefusals, } from '@vibe-agent-toolkit/resources';
|
|
25
|
+
import { loadConfigCached } from './config-loader.js';
|
|
26
|
+
/**
|
|
27
|
+
* Wire one population's blob-stage observer, ignore oracle and store.
|
|
28
|
+
*
|
|
29
|
+
* `describeBlobRefusals` returns undefined on a run that refused nothing, so a
|
|
30
|
+
* clean population stays exactly as quiet as it was — which is the only thing
|
|
31
|
+
* that keeps the line worth reading when it does appear.
|
|
32
|
+
*
|
|
33
|
+
* ⚠️ The refusals go to `logger.warn`, i.e. **stderr**. Both callers write a
|
|
34
|
+
* parseable document to stdout, and a diagnostic in the middle of it breaks every
|
|
35
|
+
* consumer.
|
|
36
|
+
*
|
|
37
|
+
* @param logger - Where blob-stage refusals are reported
|
|
38
|
+
* @param gitTracker - The ignore oracle, or undefined when there is none. Not
|
|
39
|
+
* cosmetic: `resource_realizations.gitignored` is filled only when a tracker
|
|
40
|
+
* was supplied, so its absence decides whether a consumer can TELL which
|
|
41
|
+
* members were ignored
|
|
42
|
+
* @param cache - The run's projection store, or undefined to re-derive
|
|
43
|
+
* @param root - The project root, from which the run's declared `mimeType`
|
|
44
|
+
* routing is READ rather than passed. See {@link collectionsOption}
|
|
45
|
+
* @returns The options to spread into the population builder's argument
|
|
46
|
+
*/
|
|
47
|
+
export function populationWiring(logger, gitTracker, cache, root) {
|
|
48
|
+
return {
|
|
49
|
+
onBlobPopulation: (report) => {
|
|
50
|
+
const refusals = describeBlobRefusals(report);
|
|
51
|
+
if (refusals !== undefined)
|
|
52
|
+
logger.warn(refusals);
|
|
53
|
+
},
|
|
54
|
+
...(gitTracker !== undefined && { gitTracker }),
|
|
55
|
+
...(cache !== undefined && { cache }),
|
|
56
|
+
...collectionsOption(root),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The project's collection declarations at `root`, or undefined for a project
|
|
61
|
+
* that declares none.
|
|
62
|
+
*
|
|
63
|
+
* ## Why this is READ here and not passed in
|
|
64
|
+
*
|
|
65
|
+
* A declared `mimeType` changes which parser runs, which changes the content
|
|
66
|
+
* key, which is folded into the projection store's key through the routing's
|
|
67
|
+
* fingerprint. So two lanes of ONE command that disagree about whether to supply
|
|
68
|
+
* the declarations do not merely disagree about parsing — they **evict each
|
|
69
|
+
* other's stored extents over an unchanged tree, run after run.**
|
|
70
|
+
*
|
|
71
|
+
* Taking a `root` and reading the config here rather than accepting a
|
|
72
|
+
* `collections` argument is what makes that disagreement unrepresentable: there
|
|
73
|
+
* is one answer per root and every lane that goes through this helper gets it.
|
|
74
|
+
* An optional argument would have been a thing three call sites could each
|
|
75
|
+
* forget, and forgetting is silent — a cache that never hits looks exactly like
|
|
76
|
+
* a cache that is merely cold.
|
|
77
|
+
*
|
|
78
|
+
* `loadConfigCached` is keyed on the root, so the repeat calls across a
|
|
79
|
+
* command's lanes cost one parse between them. A broken config throws here, as
|
|
80
|
+
* it does everywhere else — a population silently typed by the built-in tables
|
|
81
|
+
* because the config would not parse is the conflation
|
|
82
|
+
* {@link loadConfigCached} exists to refuse.
|
|
83
|
+
*
|
|
84
|
+
* Returned as a SPREADABLE rather than a value: `exactOptionalPropertyTypes`
|
|
85
|
+
* makes an absent key and one holding `undefined` different arguments, and the
|
|
86
|
+
* population builders declare `collections` optional. Every caller spreads this,
|
|
87
|
+
* so no call site writes its own `!== undefined &&` and none can get the two
|
|
88
|
+
* states the wrong way round.
|
|
89
|
+
*
|
|
90
|
+
* @param root - The project root whose config declares the collections
|
|
91
|
+
* @returns `{ collections }`, or `{}` when there is no config or no
|
|
92
|
+
* `resources.collections` in it
|
|
93
|
+
*/
|
|
94
|
+
export function collectionsOption(root) {
|
|
95
|
+
const collections = loadConfigCached(root)?.resources?.collections;
|
|
96
|
+
return collections === undefined ? {} : { collections };
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=population-wiring.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"population-wiring.js","sourceRoot":"","sources":["../../src/utils/population-wiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EACL,oBAAoB,GAIrB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAiBtD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAc,EACd,UAAkC,EAClC,KAAkC,EAClC,IAAY;IAEZ,OAAO;QACL,gBAAgB,EAAE,CAAC,MAAM,EAAE,EAAE;YAC3B,MAAM,QAAQ,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;YAC9C,IAAI,QAAQ,KAAK,SAAS;gBAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpD,CAAC;QACD,GAAG,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,CAAC;QAC/C,GAAG,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,CAAC;QACrC,GAAG,iBAAiB,CAAC,IAAI,CAAC;KAC3B,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAAY;IAEZ,MAAM,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,WAAW,CAAC;IACnE,OAAO,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC;AAC1D,CAAC"}
|
|
@@ -30,4 +30,24 @@ export declare function projectRootOrLoudCwd(startDir: string, logger: Logger):
|
|
|
30
30
|
* `tolerate null` policy — return `string | null`; caller handles either case.
|
|
31
31
|
*/
|
|
32
32
|
export declare function projectRootOrNull(startDir: string): string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Fail loudly on a `[path]` argument that names no directory.
|
|
35
|
+
*
|
|
36
|
+
* Every `resources` verb takes an optional `[path]`, and two things can be
|
|
37
|
+
* meant by it: a SCOPE (`scan`, `validate` — crawl this subtree) or a LOCATOR
|
|
38
|
+
* (`query`, `check` — find the project from here; the projection is always the
|
|
39
|
+
* whole tree). Both start by resolving the argument, and both must refuse one
|
|
40
|
+
* that resolves to nothing — the scoping verbs would otherwise degrade into a
|
|
41
|
+
* glob matching nothing (`filesScanned: 0`, green), and the locating verbs
|
|
42
|
+
* walked UP from the missing path to whatever project the cwd is in and
|
|
43
|
+
* answered about THAT tree at exit 0, byte-identical to a correct run.
|
|
44
|
+
*
|
|
45
|
+
* One function so the two families refuse with one message; a reader who saw
|
|
46
|
+
* `validate` say "Path does not exist" should get the same words from `query`.
|
|
47
|
+
*
|
|
48
|
+
* @param pathArg - The argument as typed, relative to cwd or absolute
|
|
49
|
+
* @returns The resolved absolute path
|
|
50
|
+
* @throws When it does not exist or is not a directory
|
|
51
|
+
*/
|
|
52
|
+
export declare function assertDirectoryArgument(pathArg: string): string;
|
|
33
53
|
//# 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;AAMH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAShF;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAQ7E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEjE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAS/D"}
|
|
@@ -12,6 +12,7 @@
|
|
|
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 { existsSync, statSync } from 'node:fs';
|
|
15
16
|
import { findProjectRoot, safePath } from '@vibe-agent-toolkit/utils';
|
|
16
17
|
/**
|
|
17
18
|
* `required` policy — refuse to run if no projectRoot can be discovered.
|
|
@@ -46,4 +47,33 @@ export function projectRootOrLoudCwd(startDir, logger) {
|
|
|
46
47
|
export function projectRootOrNull(startDir) {
|
|
47
48
|
return findProjectRoot(startDir);
|
|
48
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Fail loudly on a `[path]` argument that names no directory.
|
|
52
|
+
*
|
|
53
|
+
* Every `resources` verb takes an optional `[path]`, and two things can be
|
|
54
|
+
* meant by it: a SCOPE (`scan`, `validate` — crawl this subtree) or a LOCATOR
|
|
55
|
+
* (`query`, `check` — find the project from here; the projection is always the
|
|
56
|
+
* whole tree). Both start by resolving the argument, and both must refuse one
|
|
57
|
+
* that resolves to nothing — the scoping verbs would otherwise degrade into a
|
|
58
|
+
* glob matching nothing (`filesScanned: 0`, green), and the locating verbs
|
|
59
|
+
* walked UP from the missing path to whatever project the cwd is in and
|
|
60
|
+
* answered about THAT tree at exit 0, byte-identical to a correct run.
|
|
61
|
+
*
|
|
62
|
+
* One function so the two families refuse with one message; a reader who saw
|
|
63
|
+
* `validate` say "Path does not exist" should get the same words from `query`.
|
|
64
|
+
*
|
|
65
|
+
* @param pathArg - The argument as typed, relative to cwd or absolute
|
|
66
|
+
* @returns The resolved absolute path
|
|
67
|
+
* @throws When it does not exist or is not a directory
|
|
68
|
+
*/
|
|
69
|
+
export function assertDirectoryArgument(pathArg) {
|
|
70
|
+
const resolved = safePath.resolve(pathArg);
|
|
71
|
+
if (!existsSync(resolved)) {
|
|
72
|
+
throw new Error(`Path does not exist: ${resolved}`);
|
|
73
|
+
}
|
|
74
|
+
if (!statSync(resolved).isDirectory()) {
|
|
75
|
+
throw new Error(`Path is not a directory: ${resolved}`);
|
|
76
|
+
}
|
|
77
|
+
return resolved;
|
|
78
|
+
}
|
|
49
79
|
//# 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,eAAe,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAItE;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAgB,EAAE,WAAmB;IACtE,MAAM,IAAI,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IACvC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CACb,GAAG,WAAW,gEAAgE;YAC5E,kDAAkD,CACrD,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAAgB,EAAE,MAAc;IACnE,MAAM,IAAI,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IACvC,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/B,MAAM,GAAG,GAAG,QAAQ,CA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;;;;;;;GAkBG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAe;IACrD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,wBAAwB,QAAQ,EAAE,CAAC,CAAC;IACtD,CAAC;IACD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,4BAA4B,QAAQ,EAAE,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which lenses a run evaluates, and when it does NOT — the selection that keeps
|
|
3
|
+
* the derived relations affordable.
|
|
4
|
+
*
|
|
5
|
+
* 🚨 **The selector over-selects on purpose: a FALSE NEGATIVE fails a run that
|
|
6
|
+
* had an answer.** A lens skipped when its relation is named leaves that
|
|
7
|
+
* relation ABSENT from the run's database, so the statement is refused with
|
|
8
|
+
* `no such table` — loud rather than wrong, because the refusal is SQLite's and
|
|
9
|
+
* does not depend on this scan. The cost that forced the selection, the rules
|
|
10
|
+
* that keep it fail-safe, and why the registry lives in the CLI rather than in a
|
|
11
|
+
* population are in
|
|
12
|
+
* `docs/architecture/zones.md` §2, "A lens is evaluated only when a statement
|
|
13
|
+
* names one of its relations".
|
|
14
|
+
*/
|
|
15
|
+
import { type DerivedTableName, type PopulationCache, type Projection } from '@vibe-agent-toolkit/resources';
|
|
16
|
+
import type { Logger } from './logger.js';
|
|
17
|
+
/**
|
|
18
|
+
* The rows one lens evaluation produced, keyed by `DERIVED_TABLES`' own keys.
|
|
19
|
+
*
|
|
20
|
+
* Structurally `projection-sqlite`'s `DerivedRows`, spelled here so every lens
|
|
21
|
+
* states its output in terms of the RELATION REGISTRY rather than of a storage
|
|
22
|
+
* backend. `writeDerived` accepts it unchanged.
|
|
23
|
+
*/
|
|
24
|
+
export type LensRows = {
|
|
25
|
+
readonly [Name in DerivedTableName]?: readonly Record<string, unknown>[];
|
|
26
|
+
};
|
|
27
|
+
/** Everything a lens may read while evaluating. */
|
|
28
|
+
export interface LensEvaluationInput {
|
|
29
|
+
/** The resources-lane projection the run already populated. */
|
|
30
|
+
readonly projection: Projection;
|
|
31
|
+
/** Absolute corpus root, for a lens that must populate a lane of its own. */
|
|
32
|
+
readonly root: string;
|
|
33
|
+
/** Where a lens's own blob-stage refusals go — stderr. */
|
|
34
|
+
readonly logger: Logger;
|
|
35
|
+
/** The run's projection store, so a lens's own population can hit it. */
|
|
36
|
+
readonly cache: PopulationCache | undefined;
|
|
37
|
+
}
|
|
38
|
+
/** One lens: the relations it owns, and how to produce their rows. */
|
|
39
|
+
export interface ProjectionLens {
|
|
40
|
+
/** How the lens names itself in `lensesEvaluated` and in a refusal. */
|
|
41
|
+
readonly name: string;
|
|
42
|
+
/**
|
|
43
|
+
* Every relation this lens produces, by registry key.
|
|
44
|
+
*
|
|
45
|
+
* ⛔ Disjoint from every other lens's. Two lenses claiming one relation would
|
|
46
|
+
* make "was it evaluated" unanswerable, and the second `writeDerived` would
|
|
47
|
+
* CLEAR the first's rows — `writeDerived` replaces a relation's contents.
|
|
48
|
+
*/
|
|
49
|
+
readonly relations: readonly DerivedTableName[];
|
|
50
|
+
/**
|
|
51
|
+
* Produce the rows.
|
|
52
|
+
*
|
|
53
|
+
* @param input - The projection, the root, and the run's oracles
|
|
54
|
+
* @returns Every relation this lens owns — all of them, every time, because
|
|
55
|
+
* omitting one leaves its previous contents in place
|
|
56
|
+
*/
|
|
57
|
+
readonly evaluate: (input: LensEvaluationInput) => Promise<LensRows> | LensRows;
|
|
58
|
+
}
|
|
59
|
+
/** The authored-link lens: `lens_contexts`, `edges`, `edge_resolutions`. */
|
|
60
|
+
export declare const AUTHORED_LINK_LENS: ProjectionLens;
|
|
61
|
+
/** The always-loaded context lens: `claude_context_chains`, `claude_context_loads`. */
|
|
62
|
+
export declare const CLAUDE_CONTEXT_LENS: ProjectionLens;
|
|
63
|
+
/** Every lens the query lane can evaluate, in evaluation order. */
|
|
64
|
+
export declare const PROJECTION_LENSES: readonly ProjectionLens[];
|
|
65
|
+
/**
|
|
66
|
+
* The SQL names of a lens's relations. Read off `DERIVED_TABLES` rather than
|
|
67
|
+
* restated: the SQL name and the registry key are deliberately different
|
|
68
|
+
* vocabularies (`edgeResolutions` is spelled `edge_resolutions`), so a second
|
|
69
|
+
* copy here would be a rename waiting to be missed.
|
|
70
|
+
*
|
|
71
|
+
* @param lens - The lens
|
|
72
|
+
* @returns Its relations as SQL spells them
|
|
73
|
+
*/
|
|
74
|
+
export declare function lensRelationNames(lens: ProjectionLens): readonly string[];
|
|
75
|
+
/**
|
|
76
|
+
* The lenses a run has to evaluate, given the statements it declared.
|
|
77
|
+
*
|
|
78
|
+
* @param statements - Every statement the run may ask, or `undefined` when the
|
|
79
|
+
* caller cannot enumerate them. ⛔ `undefined` selects EVERY lens — see the
|
|
80
|
+
* header on why the fail-safe direction is not negotiable
|
|
81
|
+
* @returns The lenses to evaluate, in {@link PROJECTION_LENSES} order
|
|
82
|
+
*/
|
|
83
|
+
export declare function lensesNamedBy(statements: readonly string[] | undefined): readonly ProjectionLens[];
|
|
84
|
+
/**
|
|
85
|
+
* Evaluate one lens and hand back its rows, refusing any that are not exactly
|
|
86
|
+
* the relations it declares.
|
|
87
|
+
*
|
|
88
|
+
* `LensRows` makes every relation optional, so a lens that forgot one compiles —
|
|
89
|
+
* and `writeDerived` would leave that relation empty, a table that reads as a
|
|
90
|
+
* healthy tree. Checked here because this is the one place every lens passes.
|
|
91
|
+
*
|
|
92
|
+
* @param lens - The lens
|
|
93
|
+
* @param input - What it may read
|
|
94
|
+
* @returns Its rows
|
|
95
|
+
* @throws Error When the rows omit a declared relation or carry an undeclared one
|
|
96
|
+
*/
|
|
97
|
+
export declare function evaluateLens(lens: ProjectionLens, input: LensEvaluationInput): Promise<LensRows>;
|
|
98
|
+
//# sourceMappingURL=projection-lenses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projection-lenses.d.ts","sourceRoot":"","sources":["../../src/utils/projection-lenses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAkB,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI7H,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,mDAAmD;AACnD,MAAM,WAAW,mBAAmB;IAClC,+DAA+D;IAC/D,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,CAAC;CAC7C;AAED,sEAAsE;AACtE,MAAM,WAAW,cAAc;IAC7B,uEAAuE;IACvE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAChD;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC;CACjF;AAED,4EAA4E;AAC5E,eAAO,MAAM,kBAAkB,EAAE,cAIhC,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM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