@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":"index-command.d.ts","sourceRoot":"","sources":["../../../src/commands/rag/index-command.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"index-command.d.ts","sourceRoot":"","sources":["../../../src/commands/rag/index-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAWxE,UAAU,YAAY;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9B,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG,YAAY,CAMnF;AAED,4CAA4C;AAC5C,KAAK,UAAU,GAAG,WAAW,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,SAAS,kBAAkB,EAAE,EACzC,SAAS,EAAE,MAAM,GAChB,UAAU,EAAE,CAKd;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,IAAI,CAAC,CAuEf"}
|
|
@@ -2,11 +2,63 @@
|
|
|
2
2
|
* RAG index command - index markdown resources into vector database
|
|
3
3
|
*/
|
|
4
4
|
import { LanceDBRAGProvider } from '@vibe-agent-toolkit/rag-lancedb';
|
|
5
|
+
import { ExitCode } from '@vibe-agent-toolkit/schema';
|
|
6
|
+
import { safePath, toForwardSlash } from '@vibe-agent-toolkit/utils';
|
|
5
7
|
import { createLogger } from '../../utils/logger.js';
|
|
6
8
|
import { writeYamlOutput } from '../../utils/output.js';
|
|
7
9
|
import { projectRootOrNull } from '../../utils/project-root-policy.js';
|
|
8
10
|
import { loadResourcesWithConfig } from '../../utils/resource-loader.js';
|
|
9
11
|
import { formatDuration, handleCommandError, resolveDbPath } from './command-helpers.js';
|
|
12
|
+
/**
|
|
13
|
+
* Derive the reported status and exit code from what indexing actually did.
|
|
14
|
+
*
|
|
15
|
+
* This existed as a hardcoded `status: 'success'` next to an unconditional
|
|
16
|
+
* `process.exit(0)`, so a run that failed a fifth of its corpus told the user â
|
|
17
|
+
* and any CI step parsing it â that everything was fine, while the dropped
|
|
18
|
+
* documents were simply unsearchable. A status field that cannot express failure
|
|
19
|
+
* is the defect; the particular failures it hid are incidental, and
|
|
20
|
+
* `indexResources` can fail a resource for any reason (unreadable file,
|
|
21
|
+
* embedding-provider error, provider unavailable).
|
|
22
|
+
*
|
|
23
|
+
* `errors` is optional on `IndexResult`'s schema, so a provider MAY omit it;
|
|
24
|
+
* `LanceDBRAGProvider` never does (it always carries `errors: []` when nothing
|
|
25
|
+
* failed). Both shapes are success here, because the schema allows both.
|
|
26
|
+
*
|
|
27
|
+
* @param indexResult - The result of the indexing run (only `errors` is read)
|
|
28
|
+
* @returns The status to publish and the exit code that agrees with it
|
|
29
|
+
*/
|
|
30
|
+
export function indexOutcome(indexResult) {
|
|
31
|
+
const failed = indexResult.errors?.length ?? 0;
|
|
32
|
+
return failed > 0
|
|
33
|
+
? { status: 'partial', exitCode: ExitCode.FINDINGS }
|
|
34
|
+
: { status: 'success', exitCode: ExitCode.OK };
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The resources the crawl enumerated but could not read, as index errors.
|
|
38
|
+
*
|
|
39
|
+
* Such a file never reaches `indexResources`: the crawl reads and parses every
|
|
40
|
+
* file itself, so an unreadable one is dropped before the provider sees it. It
|
|
41
|
+
* is therefore in none of the provider's counters and not in its `errors` â
|
|
42
|
+
* the registry keeps the reconciliation log (`getUnreadableResources()`), and
|
|
43
|
+
* this command did not read it, so a corpus with a document missing from the
|
|
44
|
+
* index was reported `status: success`, exit 0, on both crawl lanes. Folding
|
|
45
|
+
* the log into the same `errors` list the provider's failures land in is what
|
|
46
|
+
* lets one status and one exit code cover "did not index everything asked".
|
|
47
|
+
*
|
|
48
|
+
* The id is the path relative to the crawl root: the registry never assigned
|
|
49
|
+
* one (it could not read the file to), and the relative path is what an
|
|
50
|
+
* operator needs to find it.
|
|
51
|
+
*
|
|
52
|
+
* @param unreadable - The registry's read-failure log
|
|
53
|
+
* @param crawlRoot - The directory the crawl was rooted at
|
|
54
|
+
* @returns One error per unreadable file, in the order the crawl met them
|
|
55
|
+
*/
|
|
56
|
+
export function unreadableIndexErrors(unreadable, crawlRoot) {
|
|
57
|
+
return unreadable.map((entry) => ({
|
|
58
|
+
resourceId: toForwardSlash(safePath.relative(crawlRoot, entry.filePath)),
|
|
59
|
+
error: `Enumerated by the crawl but could not be read, so it is not in the index: ${entry.reason}`,
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
10
62
|
export async function indexCommand(pathArg, options) {
|
|
11
63
|
const logger = createLogger({ debug: options.debug ?? false });
|
|
12
64
|
const startTime = Date.now();
|
|
@@ -24,7 +76,15 @@ export async function indexCommand(pathArg, options) {
|
|
|
24
76
|
const crawlRoot = projectRoot ?? process.cwd();
|
|
25
77
|
const { registry } = await loadResourcesWithConfig(pathArg, crawlRoot, logger);
|
|
26
78
|
const allResources = registry.getAllResources();
|
|
27
|
-
|
|
79
|
+
// The declared population is the admitted one PLUS what the crawl could not
|
|
80
|
+
// read; the second half is reported below, not dropped â see `unreadableIndexErrors`.
|
|
81
|
+
const unreadable = unreadableIndexErrors(registry.getUnreadableResources(), crawlRoot);
|
|
82
|
+
logger.debug(`Found ${allResources.length} resources to index (${unreadable.length} enumerated but unreadable)`);
|
|
83
|
+
for (const entry of unreadable) {
|
|
84
|
+
// On stderr as well, the way the provider reports its own per-resource
|
|
85
|
+
// failures, so a caller reading only the exit code still sees the name.
|
|
86
|
+
logger.warn(`[vat-rag] Failed to index resource '${entry.resourceId}': ${entry.error}`);
|
|
87
|
+
}
|
|
28
88
|
// Create RAG provider in admin mode (readonly: false)
|
|
29
89
|
const ragProvider = await LanceDBRAGProvider.create({
|
|
30
90
|
dbPath,
|
|
@@ -35,20 +95,26 @@ export async function indexCommand(pathArg, options) {
|
|
|
35
95
|
// Close provider
|
|
36
96
|
await ragProvider.close();
|
|
37
97
|
const duration = Date.now() - startTime;
|
|
98
|
+
// One list for both kinds of failure â the provider's and the crawl's.
|
|
99
|
+
const errors = [...unreadable, ...(indexResult.errors ?? [])];
|
|
100
|
+
// Status is DERIVED, never asserted: see `indexOutcome`.
|
|
101
|
+
const outcome = indexOutcome({ errors });
|
|
38
102
|
// Output results as YAML
|
|
39
103
|
writeYamlOutput({
|
|
40
|
-
status:
|
|
104
|
+
status: outcome.status,
|
|
41
105
|
resourcesIndexed: indexResult.resourcesIndexed,
|
|
42
106
|
resourcesSkipped: indexResult.resourcesSkipped,
|
|
107
|
+
resourcesEmpty: indexResult.resourcesEmpty,
|
|
43
108
|
resourcesUpdated: indexResult.resourcesUpdated,
|
|
44
109
|
chunksCreated: indexResult.chunksCreated,
|
|
45
110
|
chunksDeleted: indexResult.chunksDeleted,
|
|
46
111
|
duration: formatDuration(duration),
|
|
47
|
-
...(
|
|
48
|
-
? { errors: indexResult.errors }
|
|
49
|
-
: {}),
|
|
112
|
+
...(errors.length > 0 ? { errors } : {}),
|
|
50
113
|
});
|
|
51
|
-
|
|
114
|
+
// The report is published FIRST and the failure signalled after, so a
|
|
115
|
+
// partial run still hands the operator the `errors` list naming exactly
|
|
116
|
+
// which resources are missing from the database.
|
|
117
|
+
process.exit(outcome.exitCode);
|
|
52
118
|
}
|
|
53
119
|
catch (error) {
|
|
54
120
|
handleCommandError(error, logger, startTime, 'Index');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-command.js","sourceRoot":"","sources":["../../../src/commands/rag/index-command.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"index-command.js","sourceRoot":"","sources":["../../../src/commands/rag/index-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,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,IAAI,EAAE,CAAC,CAAC,CAAC;QAE9D,yDAAyD;QACzD,MAAM,OAAO,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;QAEzC,yBAAyB;QACzB,eAAe,CAAC;YACd,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,gBAAgB,EAAE,WAAW,CAAC,gBAAgB;YAC9C,gBAAgB,EAAE,WAAW,CAAC,gBAAgB;YAC9C,cAAc,EAAE,WAAW,CAAC,cAAc;YAC1C,gBAAgB,EAAE,WAAW,CAAC,gBAAgB;YAC9C,aAAa,EAAE,WAAW,CAAC,aAAa;YACxC,aAAa,EAAE,WAAW,CAAC,aAAa;YACxC,QAAQ,EAAE,cAAc,CAAC,QAAQ,CAAC;YAClC,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACzC,CAAC,CAAC;QAEH,sEAAsE;QACtE,wEAAwE;QACxE,iDAAiD;QACjD,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/rag/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/rag/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBpC,wBAAgB,gBAAgB,IAAI,OAAO,CA0M1C;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -2,10 +2,19 @@
|
|
|
2
2
|
* RAG command group
|
|
3
3
|
*/
|
|
4
4
|
import { Command } from 'commander';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { lazyAction } from '../../utils/optional-backend.js';
|
|
6
|
+
/**
|
|
7
|
+
* The RAG lane ships as an optional install.
|
|
8
|
+
*
|
|
9
|
+
* `rag-lancedb` carries a platform-native LanceDB binary
|
|
10
|
+
* and pulls `onnxruntime-web` and `gpt-tokenizer` behind it -- 275 MB of a
|
|
11
|
+
* 351 MB install, and 1,350 ms of cold module load, for a lane most vat
|
|
12
|
+
* commands never touch.
|
|
13
|
+
*/
|
|
14
|
+
const RAG_BACKEND = {
|
|
15
|
+
feature: 'RAG',
|
|
16
|
+
packageName: '@vibe-agent-toolkit/rag-lancedb',
|
|
17
|
+
};
|
|
9
18
|
// Common option descriptions
|
|
10
19
|
const DB_PATH_OPTION = '--db <path>';
|
|
11
20
|
const DB_PATH_DESC = 'Database path (default: .rag-db in project root)';
|
|
@@ -40,7 +49,7 @@ Configuration:
|
|
|
40
49
|
.description('Index markdown resources into vector database')
|
|
41
50
|
.option(DB_PATH_OPTION, DB_PATH_DESC)
|
|
42
51
|
.option('--debug', DEBUG_OPTION_DESC)
|
|
43
|
-
.action(indexCommand)
|
|
52
|
+
.action(lazyAction(RAG_BACKEND, async () => (await import('./index-command.js')).indexCommand))
|
|
44
53
|
.addHelpText('after', `
|
|
45
54
|
Description:
|
|
46
55
|
Indexes markdown files into LanceDB vector database for semantic search.
|
|
@@ -53,16 +62,20 @@ Description:
|
|
|
53
62
|
When no path: uses vibe-agent-toolkit.config.yaml include/exclude patterns
|
|
54
63
|
|
|
55
64
|
Output Structure (YAML):
|
|
56
|
-
status: success/error
|
|
65
|
+
status: success (every resource indexed) / partial (some failed) / error
|
|
57
66
|
resourcesIndexed: new/updated files
|
|
58
67
|
resourcesSkipped: unchanged files (content hash match)
|
|
68
|
+
resourcesEmpty: files that chunked to nothing (frontmatter-only or blank);
|
|
69
|
+
recorded, not searchable, not an error
|
|
59
70
|
resourcesUpdated: files with new content
|
|
60
71
|
chunksCreated: total chunks added
|
|
61
72
|
chunksDeleted: chunks removed from updated files
|
|
62
73
|
duration: total indexing time
|
|
74
|
+
errors: resources that failed, present only when non-empty. Their content
|
|
75
|
+
is NOT in the index and NOT searchable.
|
|
63
76
|
|
|
64
77
|
Exit Codes:
|
|
65
|
-
0 - Success | 2 - System error
|
|
78
|
+
0 - Success | 1 - Indexed with errors (see 'errors') | 2 - System error
|
|
66
79
|
|
|
67
80
|
Requirements:
|
|
68
81
|
projectRoot: optional (tolerates absence â use --db to specify path)
|
|
@@ -81,7 +94,7 @@ Example:
|
|
|
81
94
|
.option(DB_PATH_OPTION, DB_PATH_DESC)
|
|
82
95
|
.option('--limit <n>', 'Maximum results to return (default: 10)', Number.parseInt)
|
|
83
96
|
.option('--debug', DEBUG_OPTION_DESC)
|
|
84
|
-
.action(queryCommand)
|
|
97
|
+
.action(lazyAction(RAG_BACKEND, async () => (await import('./query-command.js')).queryCommand))
|
|
85
98
|
.addHelpText('after', `
|
|
86
99
|
Description:
|
|
87
100
|
Searches vector database using semantic similarity. Converts your query
|
|
@@ -123,7 +136,7 @@ Example:
|
|
|
123
136
|
.description('Show RAG database statistics')
|
|
124
137
|
.option(DB_PATH_OPTION, DB_PATH_DESC)
|
|
125
138
|
.option('--debug', DEBUG_OPTION_DESC)
|
|
126
|
-
.action(statsCommand)
|
|
139
|
+
.action(lazyAction(RAG_BACKEND, async () => (await import('./stats-command.js')).statsCommand))
|
|
127
140
|
.addHelpText('after', `
|
|
128
141
|
Description:
|
|
129
142
|
Displays vector database statistics including indexed content count,
|
|
@@ -157,7 +170,7 @@ Example:
|
|
|
157
170
|
.description('Delete entire RAG database directory')
|
|
158
171
|
.option(DB_PATH_OPTION, DB_PATH_DESC)
|
|
159
172
|
.option('--debug', DEBUG_OPTION_DESC)
|
|
160
|
-
.action(clearCommand)
|
|
173
|
+
.action(lazyAction(RAG_BACKEND, async () => (await import('./clear-command.js')).clearCommand))
|
|
161
174
|
.addHelpText('after', `
|
|
162
175
|
Description:
|
|
163
176
|
Deletes the entire RAG database directory and all indexed data.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/rag/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/rag/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAwB,MAAM,iCAAiC,CAAC;AAEnF;;;;;;;GAOG;AACH,MAAM,WAAW,GAAoB;IACnC,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,iCAAiC;CAC/C,CAAC;AAEF,6BAA6B;AAC7B,MAAM,cAAc,GAAG,aAAa,CAAC;AACrC,MAAM,YAAY,GAAG,kDAAkD,CAAC;AACxE,MAAM,iBAAiB,GAAG,sBAAsB,CAAC;AAEjD,MAAM,UAAU,gBAAgB;IAC9B,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;IAE/B,GAAG;SACA,WAAW,CAAC,qEAAqE,CAAC;SAClF,WAAW,CAAC,KAAK,CAAC,CAAC,uDAAuD;SAC1E,WAAW,CACV,OAAO,EACP;;;;;;;;;;;;;;;;;;;CAmBL,CACI,CAAC;IAEJ,GAAG;SACA,OAAO,CAAC,cAAc,CAAC;SACvB,WAAW,CAAC,+CAA+C,CAAC;SAC5D,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC;SACpC,MAAM,CAAC,SAAS,EAAE,iBAAiB,CAAC;SACpC,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,KAAK,IAA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AC,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;SAC9F,WAAW,CACV,OAAO,EACP;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BL,CACI,CAAC;IAEJ,OAAO,GAAG,CAAC;AACb,CAAC;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-command.d.ts","sourceRoot":"","sources":["../../../src/commands/rag/query-command.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"query-command.d.ts","sourceRoot":"","sources":["../../../src/commands/rag/query-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH,UAAU,YAAY;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,0FAA0F;AAC1F,UAAU,YAAY;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,IAAI,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA2CtF;AAED,wBAAsB,YAAY,CAChC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,IAAI,CAAC,CAmCf"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* RAG query command - search the vector database
|
|
3
3
|
*/
|
|
4
|
+
import { ExitCode } from '@vibe-agent-toolkit/schema';
|
|
4
5
|
import { safePath } from '@vibe-agent-toolkit/utils';
|
|
5
6
|
import { writeYamlOutput } from '../../utils/output.js';
|
|
6
7
|
import { projectRootOrNull } from '../../utils/project-root-policy.js';
|
|
@@ -76,6 +77,6 @@ export async function queryCommand(queryText, options) {
|
|
|
76
77
|
durationMs: Date.now() - startTime,
|
|
77
78
|
root,
|
|
78
79
|
}));
|
|
79
|
-
process.exit(
|
|
80
|
+
process.exit(ExitCode.OK);
|
|
80
81
|
}
|
|
81
82
|
//# sourceMappingURL=query-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-command.js","sourceRoot":"","sources":["../../../src/commands/rag/query-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,M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CAAC,EACD,OAAO,CACR,CAAC;IAEF,6EAA6E;IAC7E,6EAA6E;IAC7E,sDAAsD;IACtD,MAAM,IAAI,GAAG,iBAAiB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAEjF,eAAe,CACb,oBAAoB,CAAC;QACnB,SAAS;QACT,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;QAClC,IAAI;KACL,CAAC,CACH,CAAC;IAEF,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats-command.d.ts","sourceRoot":"","sources":["../../../src/commands/rag/stats-command.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"stats-command.d.ts","sourceRoot":"","sources":["../../../src/commands/rag/stats-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,UAAU,YAAY;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BvE"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* RAG stats command - show database statistics
|
|
3
3
|
*/
|
|
4
|
+
import { ExitCode } from '@vibe-agent-toolkit/schema';
|
|
4
5
|
import { writeYamlOutput } from '../../utils/output.js';
|
|
5
6
|
import { executeRagOperation, formatDuration } from './command-helpers.js';
|
|
6
7
|
export async function statsCommand(options) {
|
|
@@ -20,6 +21,6 @@ export async function statsCommand(options) {
|
|
|
20
21
|
lastIndexed: stats.lastIndexed.toISOString(),
|
|
21
22
|
duration: formatDuration(duration),
|
|
22
23
|
});
|
|
23
|
-
process.exit(
|
|
24
|
+
process.exit(ExitCode.OK);
|
|
24
25
|
}
|
|
25
26
|
//# sourceMappingURL=stats-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats-command.js","sourceRoot":"","sources":["../../../src/commands/rag/stats-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAO3E,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAAqB;IACtD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,MAAM,KAAK,GAAG,MAAM,mBAAmB,CACrC,OAAO,EACP,KAAK,EAAE,WAAW,EAAE,EAAE;QACpB,YAAY;QACZ,OAAO,MAAM,WAAW,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC,EACD,OAAO,CACR,CAAC;IAEF,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;IAExC,uBAAuB;IACvB,eAAe,CAAC;QACd,MAAM,EAAE,SAAS;QACjB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE;QAC5C,QAAQ,EAAE,cAAc,CAAC,QAAQ,CAAC;KACnC,CAAC,CAAC;IAEH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"stats-command.js","sourceRoot":"","sources":["../../../src/commands/rag/stats-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAO3E,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAAqB;IACtD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,MAAM,KAAK,GAAG,MAAM,mBAAmB,CACrC,OAAO,EACP,KAAK,EAAE,WAAW,EAAE,EAAE;QACpB,YAAY;QACZ,OAAO,MAAM,WAAW,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC,EACD,OAAO,CACR,CAAC;IAEF,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;IAExC,uBAAuB;IACvB,eAAe,CAAC;QACd,MAAM,EAAE,SAAS;QACjB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE;QAC5C,QAAQ,EAAE,cAAc,CAAC,QAAQ,CAAC;KACnC,CAAC,CAAC;IAEH,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What `vat resources check --help` says about the built-in checks.
|
|
3
|
+
*
|
|
4
|
+
* ð RENDERED from `BUILTIN_CHECKS` and `CODE_REGISTRY`, never transcribed. A
|
|
5
|
+
* hand-kept list named one built-in after a second had shipped, and a
|
|
6
|
+
* hand-copied statement backs a claim `check.ts` makes to the operator that
|
|
7
|
+
* would go silently false the moment a column is renamed.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Every built-in's SQL twin, as a `resources.checks` block a reader can paste.
|
|
11
|
+
*
|
|
12
|
+
* ONE `resources: checks:` header for every twin: a header per block made the
|
|
13
|
+
* pasted text two `resources:` keys, which YAML refuses. The description is
|
|
14
|
+
* JSON-quoted because a built-in's own description contains `paths: `, which
|
|
15
|
+
* unquoted YAML reads as a nested map.
|
|
16
|
+
*
|
|
17
|
+
* @returns The YAML block, indented four spaces for the help text
|
|
18
|
+
*/
|
|
19
|
+
export declare function builtinSqlTwins(): string;
|
|
20
|
+
/**
|
|
21
|
+
* Every built-in's name, one-line assertion, and the code it emits at the
|
|
22
|
+
* registry's default severity.
|
|
23
|
+
*
|
|
24
|
+
* @returns The list, indented for the help text
|
|
25
|
+
*/
|
|
26
|
+
export declare function builtinCheckList(): string;
|
|
27
|
+
//# sourceMappingURL=builtin-help.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-help.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/builtin-help.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;;;;;;;;GASG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAWxC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAMzC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What `vat resources check --help` says about the built-in checks.
|
|
3
|
+
*
|
|
4
|
+
* ð RENDERED from `BUILTIN_CHECKS` and `CODE_REGISTRY`, never transcribed. A
|
|
5
|
+
* hand-kept list named one built-in after a second had shipped, and a
|
|
6
|
+
* hand-copied statement backs a claim `check.ts` makes to the operator that
|
|
7
|
+
* would go silently false the moment a column is renamed.
|
|
8
|
+
*/
|
|
9
|
+
import { BUILTIN_CHECKS } from '@vibe-agent-toolkit/resources';
|
|
10
|
+
import { CODE_REGISTRY } from '@vibe-agent-toolkit/schema';
|
|
11
|
+
/**
|
|
12
|
+
* Every built-in's SQL twin, as a `resources.checks` block a reader can paste.
|
|
13
|
+
*
|
|
14
|
+
* ONE `resources: checks:` header for every twin: a header per block made the
|
|
15
|
+
* pasted text two `resources:` keys, which YAML refuses. The description is
|
|
16
|
+
* JSON-quoted because a built-in's own description contains `paths: `, which
|
|
17
|
+
* unquoted YAML reads as a nested map.
|
|
18
|
+
*
|
|
19
|
+
* @returns The YAML block, indented four spaces for the help text
|
|
20
|
+
*/
|
|
21
|
+
export function builtinSqlTwins() {
|
|
22
|
+
return [
|
|
23
|
+
' resources:',
|
|
24
|
+
' checks:',
|
|
25
|
+
...BUILTIN_CHECKS.map((check) => [
|
|
26
|
+
` my-${check.name}:`,
|
|
27
|
+
` description: ${JSON.stringify(check.description)}`,
|
|
28
|
+
' sql: |',
|
|
29
|
+
...check.sqlTwin.split('\n').map((line) => ` ${line}`),
|
|
30
|
+
].join('\n')),
|
|
31
|
+
].join('\n');
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Every built-in's name, one-line assertion, and the code it emits at the
|
|
35
|
+
* registry's default severity.
|
|
36
|
+
*
|
|
37
|
+
* @returns The list, indented for the help text
|
|
38
|
+
*/
|
|
39
|
+
export function builtinCheckList() {
|
|
40
|
+
return BUILTIN_CHECKS.map((check) => [
|
|
41
|
+
` ${check.name}`,
|
|
42
|
+
` ${check.description}.`,
|
|
43
|
+
` Emits ${check.code} (default: ${CODE_REGISTRY[check.code].defaultSeverity}).`,
|
|
44
|
+
].join('\n')).join('\n');
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=builtin-help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-help.js","sourceRoot":"","sources":["../../../src/commands/resources/builtin-help.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO;QACL,gBAAgB;QAChB,eAAe;QACf,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;YAC/B,cAAc,KAAK,CAAC,IAAI,GAAG;YAC3B,0BAA0B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;YAC7D,kBAAkB;YAClB,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,IAAI,EAAE,CAAC;SAClE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACd,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;QACnC,KAAK,KAAK,CAAC,IAAI,EAAE;QACjB,SAAS,KAAK,CAAC,WAAW,GAAG;QAC7B,eAAe,KAAK,CAAC,IAAI,cAAc,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,eAAe,IAAI;KACrF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The progress log a supervised `vat resources check` writes, and the reader
|
|
3
|
+
* that turns whatever survived into a report.
|
|
4
|
+
*
|
|
5
|
+
* ## ðĻ Why progress goes to a FILE, and never to stdout or IPC
|
|
6
|
+
*
|
|
7
|
+
* The run this log exists for is one that gets `SIGKILL`ed. That is not a design
|
|
8
|
+
* preference: a statement blocked inside synchronous `node:sqlite` never returns
|
|
9
|
+
* to the event loop, so nothing in-process can interrupt it â measured on Node
|
|
10
|
+
* 24.13.1, `worker.terminate()` never resolves against such a thread and the
|
|
11
|
+
* parent's own `process.exit()` does not exit either. An external `SIGKILL` is
|
|
12
|
+
* the only lever, and `SIGKILL` cannot be handled, deferred or flushed.
|
|
13
|
+
*
|
|
14
|
+
* So the child's report of what it has finished has to be DURABLE at every
|
|
15
|
+
* instant, not merely sent. stdout is buffered by the pipe and lost with the
|
|
16
|
+
* process; an IPC message needs a live event loop to be delivered, which is the
|
|
17
|
+
* exact resource the hung child does not have. An `appendFileSync` per unit is
|
|
18
|
+
* on disk before the next unit starts, which is the only property that matters.
|
|
19
|
+
*
|
|
20
|
+
* Keeping it off stdout has a second benefit worth stating: stdout stays the one
|
|
21
|
+
* parseable document this verb has always published, so `vat resources check |
|
|
22
|
+
* jq` is unaffected by a mechanism it should never have to know about.
|
|
23
|
+
*
|
|
24
|
+
* ## ðŠĪ The reader must expect DAMAGE, not merely tolerate it
|
|
25
|
+
*
|
|
26
|
+
* The signal lands wherever it lands, including part-way through a write, so the
|
|
27
|
+
* last line of a killed run's log is routinely half a JSON object. A reader that
|
|
28
|
+
* threw there would replace the bounded failure report with a stack trace at
|
|
29
|
+
* exactly the moment the report is the only thing the operator gets. A reader
|
|
30
|
+
* that GUESSED at a damaged line would be worse still: it would publish a cost
|
|
31
|
+
* record for a measurement nobody took, beside ones somebody did.
|
|
32
|
+
*
|
|
33
|
+
* Every line is therefore validated against a `.strict()` schema and silently
|
|
34
|
+
* dropped when it does not parse. That schema is also the whole of the format
|
|
35
|
+
* contract â there is no version integer here and there must never be one. This
|
|
36
|
+
* file is written and read by ONE process pair within ONE run of ONE build; the
|
|
37
|
+
* question a version integer pretends to answer ("can I read this?") is answered
|
|
38
|
+
* exactly and automatically by the schema the reader compiles with.
|
|
39
|
+
*/
|
|
40
|
+
import { z } from 'zod';
|
|
41
|
+
declare const ProgressEntrySchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
42
|
+
kind: z.ZodLiteral<"population">;
|
|
43
|
+
population: z.ZodUnion<[z.ZodLiteral<"derived">, z.ZodLiteral<"store">]>;
|
|
44
|
+
populationMs: z.ZodNumber;
|
|
45
|
+
lensMs: z.ZodNumber;
|
|
46
|
+
lensesEvaluated: z.ZodArray<z.ZodString, "many">;
|
|
47
|
+
membersEnumerated: z.ZodNumber;
|
|
48
|
+
}, "strict", z.ZodTypeAny, {
|
|
49
|
+
kind: "population";
|
|
50
|
+
population: "derived" | "store";
|
|
51
|
+
populationMs: number;
|
|
52
|
+
lensMs: number;
|
|
53
|
+
lensesEvaluated: string[];
|
|
54
|
+
membersEnumerated: number;
|
|
55
|
+
}, {
|
|
56
|
+
kind: "population";
|
|
57
|
+
population: "derived" | "store";
|
|
58
|
+
populationMs: number;
|
|
59
|
+
lensMs: number;
|
|
60
|
+
lensesEvaluated: string[];
|
|
61
|
+
membersEnumerated: number;
|
|
62
|
+
}>, z.ZodObject<{
|
|
63
|
+
kind: z.ZodLiteral<"start">;
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
}, "strict", z.ZodTypeAny, {
|
|
66
|
+
name: string;
|
|
67
|
+
kind: "start";
|
|
68
|
+
}, {
|
|
69
|
+
name: string;
|
|
70
|
+
kind: "start";
|
|
71
|
+
}>, z.ZodObject<{
|
|
72
|
+
kind: z.ZodLiteral<"check">;
|
|
73
|
+
name: z.ZodString;
|
|
74
|
+
durationMs: z.ZodNumber;
|
|
75
|
+
rows: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
broken: z.ZodOptional<z.ZodLiteral<true>>;
|
|
77
|
+
builtin: z.ZodOptional<z.ZodLiteral<true>>;
|
|
78
|
+
}, "strict", z.ZodTypeAny, {
|
|
79
|
+
name: string;
|
|
80
|
+
kind: "check";
|
|
81
|
+
durationMs: number;
|
|
82
|
+
rows?: number | undefined;
|
|
83
|
+
broken?: true | undefined;
|
|
84
|
+
builtin?: true | undefined;
|
|
85
|
+
}, {
|
|
86
|
+
name: string;
|
|
87
|
+
kind: "check";
|
|
88
|
+
durationMs: number;
|
|
89
|
+
rows?: number | undefined;
|
|
90
|
+
broken?: true | undefined;
|
|
91
|
+
builtin?: true | undefined;
|
|
92
|
+
}>, z.ZodObject<{
|
|
93
|
+
kind: z.ZodLiteral<"checks-complete">;
|
|
94
|
+
}, "strict", z.ZodTypeAny, {
|
|
95
|
+
kind: "checks-complete";
|
|
96
|
+
}, {
|
|
97
|
+
kind: "checks-complete";
|
|
98
|
+
}>]>;
|
|
99
|
+
/** One line of the progress log. */
|
|
100
|
+
export type ProgressEntry = z.infer<typeof ProgressEntrySchema>;
|
|
101
|
+
/**
|
|
102
|
+
* What the run was doing when it was killed.
|
|
103
|
+
*
|
|
104
|
+
* `idle` and `reporting` are both real answers and neither is a fallback.
|
|
105
|
+
* `idle` is the gap between the population and the first statement â nothing had
|
|
106
|
+
* started. `reporting` is the opposite end: every check finished and the child
|
|
107
|
+
* was assembling and serialising its document. Naming a rule in either would
|
|
108
|
+
* blame one that did not hang, and collapsing the two would tell an operator
|
|
109
|
+
* "between the population and the first statement" about a run that completed
|
|
110
|
+
* forty rules.
|
|
111
|
+
*/
|
|
112
|
+
export type UnitInFlight = {
|
|
113
|
+
readonly kind: 'population';
|
|
114
|
+
} | {
|
|
115
|
+
readonly kind: 'check';
|
|
116
|
+
readonly name: string;
|
|
117
|
+
} | {
|
|
118
|
+
readonly kind: 'reporting';
|
|
119
|
+
} | {
|
|
120
|
+
readonly kind: 'idle';
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Read whatever of the log survived.
|
|
124
|
+
*
|
|
125
|
+
* @param text - The log's raw contents, tail damage and all
|
|
126
|
+
* @returns The lines that validate, in the order they were written
|
|
127
|
+
*/
|
|
128
|
+
export declare function parseProgressLog(text: string): ProgressEntry[];
|
|
129
|
+
/**
|
|
130
|
+
* Which unit was running when the log stopped growing.
|
|
131
|
+
*
|
|
132
|
+
* ð The population sentinel is keyed on the population line's ABSENCE rather
|
|
133
|
+
* than on there being no `start` lines. Those are different states: a run killed
|
|
134
|
+
* during population has no projection and no honest document, while a run killed
|
|
135
|
+
* between the population and the first statement has both.
|
|
136
|
+
*
|
|
137
|
+
* @param entries - What {@link parseProgressLog} recovered
|
|
138
|
+
* @returns The unit in flight
|
|
139
|
+
*/
|
|
140
|
+
export declare function unitInFlight(entries: readonly ProgressEntry[]): UnitInFlight;
|
|
141
|
+
/**
|
|
142
|
+
* Open the log for append, and hand back the one-line-per-unit writer.
|
|
143
|
+
*
|
|
144
|
+
* â ïļ `appendFileSync`, and it must stay synchronous. The child that writes these
|
|
145
|
+
* lines is about to enter a blocking native call; an asynchronous write would be
|
|
146
|
+
* queued behind work the event loop never gets back to, so the line naming the
|
|
147
|
+
* rule that hangs would exist only in memory â where `SIGKILL` destroys it.
|
|
148
|
+
*
|
|
149
|
+
* @param path - Where the supervisor is watching
|
|
150
|
+
* @returns A writer that appends one entry and returns once it is on disk
|
|
151
|
+
*/
|
|
152
|
+
export declare function createProgressWriter(path: string): (entry: ProgressEntry) => void;
|
|
153
|
+
export {};
|
|
154
|
+
//# sourceMappingURL=check-progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-progress.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/check-progress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwFxB,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKvB,CAAC;AAEH,oCAAoC;AACpC,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GAC/B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,GAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9B;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAQ9D;AA4BD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,GAAG,YAAY,CAuB5E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAIjF"}
|