@vibe-agent-toolkit/cli 0.2.0-rc.11 → 0.2.0-rc.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/bin/supervise-cli.d.ts +45 -0
- package/dist/bin/supervise-cli.d.ts.map +1 -0
- package/dist/bin/supervise-cli.js +83 -0
- package/dist/bin/supervise-cli.js.map +1 -0
- package/dist/bin/vat +95 -43
- package/dist/bin/vat.d.ts +15 -4
- package/dist/bin/vat.d.ts.map +1 -1
- package/dist/bin/vat.js +95 -43
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +21 -29
- package/dist/bin.js.map +1 -1
- package/dist/command-tree.d.ts +45 -0
- package/dist/command-tree.d.ts.map +1 -0
- package/dist/command-tree.js +60 -0
- package/dist/command-tree.js.map +1 -0
- package/dist/commands/agent/build-schema.d.ts +100 -0
- package/dist/commands/agent/build-schema.d.ts.map +1 -0
- package/dist/commands/agent/build-schema.js +32 -0
- package/dist/commands/agent/build-schema.js.map +1 -0
- package/dist/commands/agent/build.d.ts +1 -0
- package/dist/commands/agent/build.d.ts.map +1 -1
- package/dist/commands/agent/build.js +63 -33
- package/dist/commands/agent/build.js.map +1 -1
- package/dist/commands/agent/import-schema.d.ts +75 -0
- package/dist/commands/agent/import-schema.d.ts.map +1 -0
- package/dist/commands/agent/import-schema.js +25 -0
- package/dist/commands/agent/import-schema.js.map +1 -0
- package/dist/commands/agent/import.d.ts.map +1 -1
- package/dist/commands/agent/import.js +33 -27
- package/dist/commands/agent/import.js.map +1 -1
- package/dist/commands/agent/index.d.ts.map +1 -1
- package/dist/commands/agent/index.js +132 -37
- package/dist/commands/agent/index.js.map +1 -1
- package/dist/commands/agent/install-path.d.ts.map +1 -1
- package/dist/commands/agent/install-path.js +2 -1
- package/dist/commands/agent/install-path.js.map +1 -1
- package/dist/commands/agent/install-schema.d.ts +89 -0
- package/dist/commands/agent/install-schema.d.ts.map +1 -0
- package/dist/commands/agent/install-schema.js +29 -0
- package/dist/commands/agent/install-schema.js.map +1 -0
- package/dist/commands/agent/install.d.ts +7 -1
- package/dist/commands/agent/install.d.ts.map +1 -1
- package/dist/commands/agent/install.js +78 -108
- package/dist/commands/agent/install.js.map +1 -1
- package/dist/commands/agent/installed-schema.d.ts +140 -0
- package/dist/commands/agent/installed-schema.d.ts.map +1 -0
- package/dist/commands/agent/installed-schema.js +36 -0
- package/dist/commands/agent/installed-schema.js.map +1 -0
- package/dist/commands/agent/installed.d.ts +1 -1
- package/dist/commands/agent/installed.d.ts.map +1 -1
- package/dist/commands/agent/installed.js +104 -75
- package/dist/commands/agent/installed.js.map +1 -1
- package/dist/commands/agent/list-schema.d.ts +128 -0
- package/dist/commands/agent/list-schema.d.ts.map +1 -0
- package/dist/commands/agent/list-schema.js +34 -0
- package/dist/commands/agent/list-schema.js.map +1 -0
- package/dist/commands/agent/list.d.ts +4 -3
- package/dist/commands/agent/list.d.ts.map +1 -1
- package/dist/commands/agent/list.js +50 -37
- package/dist/commands/agent/list.js.map +1 -1
- package/dist/commands/agent/run.d.ts +3 -0
- package/dist/commands/agent/run.d.ts.map +1 -1
- package/dist/commands/agent/run.js +8 -3
- package/dist/commands/agent/run.js.map +1 -1
- package/dist/commands/agent/uninstall-schema.d.ts +89 -0
- package/dist/commands/agent/uninstall-schema.d.ts.map +1 -0
- package/dist/commands/agent/uninstall-schema.js +29 -0
- package/dist/commands/agent/uninstall-schema.js.map +1 -0
- package/dist/commands/agent/uninstall.d.ts +5 -1
- package/dist/commands/agent/uninstall.d.ts.map +1 -1
- package/dist/commands/agent/uninstall.js +50 -38
- package/dist/commands/agent/uninstall.js.map +1 -1
- package/dist/commands/agent/validate-schema.d.ts +129 -0
- package/dist/commands/agent/validate-schema.d.ts.map +1 -0
- package/dist/commands/agent/validate-schema.js +35 -0
- package/dist/commands/agent/validate-schema.js.map +1 -0
- package/dist/commands/agent/validate.d.ts +6 -0
- package/dist/commands/agent/validate.d.ts.map +1 -1
- package/dist/commands/agent/validate.js +64 -36
- package/dist/commands/agent/validate.js.map +1 -1
- package/dist/commands/ard/emit-schema.d.ts +108 -0
- package/dist/commands/ard/emit-schema.d.ts.map +1 -0
- package/dist/commands/ard/emit-schema.js +37 -0
- package/dist/commands/ard/emit-schema.js.map +1 -0
- package/dist/commands/ard/emit.d.ts +21 -65
- package/dist/commands/ard/emit.d.ts.map +1 -1
- package/dist/commands/ard/emit.js +68 -74
- package/dist/commands/ard/emit.js.map +1 -1
- package/dist/commands/ard/index.d.ts.map +1 -1
- package/dist/commands/ard/index.js +14 -11
- package/dist/commands/ard/index.js.map +1 -1
- package/dist/commands/audit/compat-lane-findings.d.ts +65 -0
- package/dist/commands/audit/compat-lane-findings.d.ts.map +1 -0
- package/dist/commands/audit/compat-lane-findings.js +72 -0
- package/dist/commands/audit/compat-lane-findings.js.map +1 -0
- package/dist/commands/audit/distributed-tree.d.ts +2 -2
- package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
- package/dist/commands/audit/distributed-tree.js +23 -12
- package/dist/commands/audit/distributed-tree.js.map +1 -1
- package/dist/commands/audit/git-url-clone.d.ts +15 -7
- package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
- package/dist/commands/audit/git-url-clone.js +85 -42
- package/dist/commands/audit/git-url-clone.js.map +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts +28 -4
- package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
- package/dist/commands/audit/hierarchical-output.js +44 -27
- package/dist/commands/audit/hierarchical-output.js.map +1 -1
- package/dist/commands/audit/scan-population.d.ts.map +1 -1
- package/dist/commands/audit/scan-population.js +2 -1
- package/dist/commands/audit/scan-population.js.map +1 -1
- package/dist/commands/audit-schema.d.ts +1247 -0
- package/dist/commands/audit-schema.d.ts.map +1 -0
- package/dist/commands/audit-schema.js +139 -0
- package/dist/commands/audit-schema.js.map +1 -0
- package/dist/commands/audit-settings-schema.d.ts +417 -0
- package/dist/commands/audit-settings-schema.d.ts.map +1 -0
- package/dist/commands/audit-settings-schema.js +77 -0
- package/dist/commands/audit-settings-schema.js.map +1 -0
- package/dist/commands/audit-settings.d.ts +28 -9
- package/dist/commands/audit-settings.d.ts.map +1 -1
- package/dist/commands/audit-settings.js +215 -151
- package/dist/commands/audit-settings.js.map +1 -1
- package/dist/commands/audit.d.ts +72 -33
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +405 -411
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts +61 -4
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +176 -190
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cache/clear-schema.d.ts +111 -0
- package/dist/commands/cache/clear-schema.d.ts.map +1 -0
- package/dist/commands/cache/clear-schema.js +37 -0
- package/dist/commands/cache/clear-schema.js.map +1 -0
- package/dist/commands/cache/clear.d.ts +28 -26
- package/dist/commands/cache/clear.d.ts.map +1 -1
- package/dist/commands/cache/clear.js +108 -103
- package/dist/commands/cache/clear.js.map +1 -1
- package/dist/commands/cache/index.d.ts.map +1 -1
- package/dist/commands/cache/index.js +13 -7
- package/dist/commands/cache/index.js.map +1 -1
- package/dist/commands/claude/claude-config.d.ts +23 -6
- package/dist/commands/claude/claude-config.d.ts.map +1 -1
- package/dist/commands/claude/claude-config.js +29 -15
- package/dist/commands/claude/claude-config.js.map +1 -1
- package/dist/commands/claude/context.d.ts +55 -2
- package/dist/commands/claude/context.d.ts.map +1 -1
- package/dist/commands/claude/context.js +74 -50
- package/dist/commands/claude/context.js.map +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.js +2 -2
- package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts +14 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.js +135 -68
- package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.d.ts +3 -5
- package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.js +16 -7
- package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/publish-schema.d.ts +137 -0
- package/dist/commands/claude/marketplace/publish-schema.d.ts.map +1 -0
- package/dist/commands/claude/marketplace/publish-schema.js +32 -0
- package/dist/commands/claude/marketplace/publish-schema.js.map +1 -0
- package/dist/commands/claude/marketplace/publish-tree.d.ts +6 -0
- package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish-tree.js +75 -17
- package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
- package/dist/commands/claude/marketplace/publish.d.ts +27 -0
- package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish.js +84 -50
- package/dist/commands/claude/marketplace/publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate-schema.d.ts +362 -0
- package/dist/commands/claude/marketplace/validate-schema.d.ts.map +1 -0
- package/dist/commands/claude/marketplace/validate-schema.js +67 -0
- package/dist/commands/claude/marketplace/validate-schema.js.map +1 -0
- package/dist/commands/claude/marketplace/validate.d.ts +40 -53
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +358 -214
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/org/api-keys.d.ts +3 -0
- package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
- package/dist/commands/claude/org/api-keys.js +4 -5
- package/dist/commands/claude/org/api-keys.js.map +1 -1
- package/dist/commands/claude/org/code-analytics.js +1 -1
- package/dist/commands/claude/org/code-analytics.js.map +1 -1
- package/dist/commands/claude/org/cost.d.ts.map +1 -1
- package/dist/commands/claude/org/cost.js +11 -33
- package/dist/commands/claude/org/cost.js.map +1 -1
- package/dist/commands/claude/org/helpers.d.ts +40 -27
- package/dist/commands/claude/org/helpers.d.ts.map +1 -1
- package/dist/commands/claude/org/helpers.js +61 -66
- package/dist/commands/claude/org/helpers.js.map +1 -1
- package/dist/commands/claude/org/index.d.ts.map +1 -1
- package/dist/commands/claude/org/index.js +10 -4
- package/dist/commands/claude/org/index.js.map +1 -1
- package/dist/commands/claude/org/info.d.ts.map +1 -1
- package/dist/commands/claude/org/info.js +2 -3
- package/dist/commands/claude/org/info.js.map +1 -1
- package/dist/commands/claude/org/invites.d.ts +3 -0
- package/dist/commands/claude/org/invites.d.ts.map +1 -1
- package/dist/commands/claude/org/invites.js +5 -7
- package/dist/commands/claude/org/invites.js.map +1 -1
- package/dist/commands/claude/org/skills.d.ts +76 -21
- package/dist/commands/claude/org/skills.d.ts.map +1 -1
- package/dist/commands/claude/org/skills.js +273 -246
- package/dist/commands/claude/org/skills.js.map +1 -1
- package/dist/commands/claude/org/stubs-schema.d.ts +56 -0
- package/dist/commands/claude/org/stubs-schema.d.ts.map +1 -0
- package/dist/commands/claude/org/stubs-schema.js +23 -0
- package/dist/commands/claude/org/stubs-schema.js.map +1 -0
- package/dist/commands/claude/org/stubs.d.ts +8 -3
- package/dist/commands/claude/org/stubs.d.ts.map +1 -1
- package/dist/commands/claude/org/stubs.js +9 -9
- package/dist/commands/claude/org/stubs.js.map +1 -1
- package/dist/commands/claude/org/usage.d.ts.map +1 -1
- package/dist/commands/claude/org/usage.js +1 -2
- package/dist/commands/claude/org/usage.js.map +1 -1
- package/dist/commands/claude/org/users.d.ts +3 -0
- package/dist/commands/claude/org/users.d.ts.map +1 -1
- package/dist/commands/claude/org/users.js +6 -8
- package/dist/commands/claude/org/users.js.map +1 -1
- package/dist/commands/claude/org/workspaces.d.ts +3 -0
- package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
- package/dist/commands/claude/org/workspaces.js +10 -15
- package/dist/commands/claude/org/workspaces.js.map +1 -1
- package/dist/commands/claude/plugin/build-schema.d.ts +642 -0
- package/dist/commands/claude/plugin/build-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/build-schema.js +51 -0
- package/dist/commands/claude/plugin/build-schema.js.map +1 -0
- package/dist/commands/claude/plugin/build.d.ts +220 -45
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +466 -249
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/helpers.d.ts +186 -24
- package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
- package/dist/commands/claude/plugin/helpers.js +110 -68
- package/dist/commands/claude/plugin/helpers.js.map +1 -1
- package/dist/commands/claude/plugin/install-schema.d.ts +144 -0
- package/dist/commands/claude/plugin/install-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/install-schema.js +36 -0
- package/dist/commands/claude/plugin/install-schema.js.map +1 -0
- package/dist/commands/claude/plugin/install.d.ts +191 -11
- package/dist/commands/claude/plugin/install.d.ts.map +1 -1
- package/dist/commands/claude/plugin/install.js +688 -628
- package/dist/commands/claude/plugin/install.js.map +1 -1
- package/dist/commands/claude/plugin/kept-findings.d.ts +19 -0
- package/dist/commands/claude/plugin/kept-findings.d.ts.map +1 -0
- package/dist/commands/claude/plugin/kept-findings.js +24 -0
- package/dist/commands/claude/plugin/kept-findings.js.map +1 -0
- package/dist/commands/claude/plugin/list-schema.d.ts +223 -0
- package/dist/commands/claude/plugin/list-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/list-schema.js +34 -0
- package/dist/commands/claude/plugin/list-schema.js.map +1 -0
- package/dist/commands/claude/plugin/list.d.ts +18 -0
- package/dist/commands/claude/plugin/list.d.ts.map +1 -1
- package/dist/commands/claude/plugin/list.js +53 -45
- package/dist/commands/claude/plugin/list.js.map +1 -1
- package/dist/commands/claude/plugin/npm-pack.d.ts +15 -0
- package/dist/commands/claude/plugin/npm-pack.d.ts.map +1 -0
- package/dist/commands/claude/plugin/npm-pack.js +39 -0
- package/dist/commands/claude/plugin/npm-pack.js.map +1 -0
- package/dist/commands/claude/plugin/plugin-changelog.d.ts +5 -1
- package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-changelog.js +9 -5
- package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.d.ts +21 -2
- package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.js +65 -32
- package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.d.ts +13 -0
- package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.js +64 -16
- package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +63 -37
- package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
- package/dist/commands/claude/plugin/uninstall-schema.d.ts +112 -0
- package/dist/commands/claude/plugin/uninstall-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/uninstall-schema.js +28 -0
- package/dist/commands/claude/plugin/uninstall-schema.js.map +1 -0
- package/dist/commands/claude/plugin/uninstall.d.ts +57 -0
- package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
- package/dist/commands/claude/plugin/uninstall.js +176 -64
- package/dist/commands/claude/plugin/uninstall.js.map +1 -1
- package/dist/commands/consistency-check.d.ts.map +1 -1
- package/dist/commands/consistency-check.js +8 -6
- package/dist/commands/consistency-check.js.map +1 -1
- package/dist/commands/corpus/index.d.ts.map +1 -1
- package/dist/commands/corpus/index.js +26 -10
- package/dist/commands/corpus/index.js.map +1 -1
- package/dist/commands/corpus/report.d.ts +34 -16
- package/dist/commands/corpus/report.d.ts.map +1 -1
- package/dist/commands/corpus/report.js +36 -18
- package/dist/commands/corpus/report.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts +25 -20
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +123 -67
- package/dist/commands/corpus/runner.js.map +1 -1
- package/dist/commands/corpus/scan-schema.d.ts +127 -0
- package/dist/commands/corpus/scan-schema.d.ts.map +1 -0
- package/dist/commands/corpus/scan-schema.js +31 -0
- package/dist/commands/corpus/scan-schema.js.map +1 -0
- package/dist/commands/corpus/scan.d.ts +31 -0
- package/dist/commands/corpus/scan.d.ts.map +1 -1
- package/dist/commands/corpus/scan.js +124 -50
- package/dist/commands/corpus/scan.js.map +1 -1
- package/dist/commands/corpus/seed.d.ts +11 -8
- package/dist/commands/corpus/seed.d.ts.map +1 -1
- package/dist/commands/corpus/seed.js +29 -11
- package/dist/commands/corpus/seed.js.map +1 -1
- package/dist/commands/doctor-render.d.ts +52 -0
- package/dist/commands/doctor-render.d.ts.map +1 -0
- package/dist/commands/doctor-render.js +110 -0
- package/dist/commands/doctor-render.js.map +1 -0
- package/dist/commands/doctor-schema.d.ts +191 -0
- package/dist/commands/doctor-schema.d.ts.map +1 -0
- package/dist/commands/doctor-schema.js +44 -0
- package/dist/commands/doctor-schema.js.map +1 -0
- package/dist/commands/doctor.d.ts +7 -62
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +126 -165
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/inventory-schema.d.ts +7297 -0
- package/dist/commands/inventory-schema.d.ts.map +1 -0
- package/dist/commands/inventory-schema.js +28 -0
- package/dist/commands/inventory-schema.js.map +1 -0
- package/dist/commands/inventory.d.ts +1 -1
- package/dist/commands/inventory.d.ts.map +1 -1
- package/dist/commands/inventory.js +89 -41
- package/dist/commands/inventory.js.map +1 -1
- package/dist/commands/mcp/index.d.ts.map +1 -1
- package/dist/commands/mcp/index.js +15 -0
- package/dist/commands/mcp/index.js.map +1 -1
- package/dist/commands/mcp/list-collections-schema.d.ts +101 -0
- package/dist/commands/mcp/list-collections-schema.d.ts.map +1 -0
- package/dist/commands/mcp/list-collections-schema.js +22 -0
- package/dist/commands/mcp/list-collections-schema.js.map +1 -0
- package/dist/commands/mcp/list-collections.d.ts +1 -1
- package/dist/commands/mcp/list-collections.d.ts.map +1 -1
- package/dist/commands/mcp/list-collections.js +19 -17
- package/dist/commands/mcp/list-collections.js.map +1 -1
- package/dist/commands/mcp/serve.d.ts +5 -0
- package/dist/commands/mcp/serve.d.ts.map +1 -1
- package/dist/commands/mcp/serve.js +29 -15
- package/dist/commands/mcp/serve.js.map +1 -1
- package/dist/commands/okf/index.d.ts.map +1 -1
- package/dist/commands/okf/index.js +6 -5
- package/dist/commands/okf/index.js.map +1 -1
- package/dist/commands/okf/validate-schema.d.ts +171 -0
- package/dist/commands/okf/validate-schema.d.ts.map +1 -0
- package/dist/commands/okf/validate-schema.js +44 -0
- package/dist/commands/okf/validate-schema.js.map +1 -0
- package/dist/commands/okf/validate.d.ts +16 -149
- package/dist/commands/okf/validate.d.ts.map +1 -1
- package/dist/commands/okf/validate.js +64 -62
- package/dist/commands/okf/validate.js.map +1 -1
- package/dist/commands/orchestrator-schema.d.ts +419 -0
- package/dist/commands/orchestrator-schema.d.ts.map +1 -0
- package/dist/commands/orchestrator-schema.js +91 -0
- package/dist/commands/orchestrator-schema.js.map +1 -0
- package/dist/commands/phase-utils.d.ts +188 -220
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +210 -258
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/positional-args.d.ts +13 -11
- package/dist/commands/positional-args.d.ts.map +1 -1
- package/dist/commands/positional-args.js +16 -15
- package/dist/commands/positional-args.js.map +1 -1
- package/dist/commands/rag/admin-schema.d.ts +152 -0
- package/dist/commands/rag/admin-schema.d.ts.map +1 -0
- package/dist/commands/rag/admin-schema.js +31 -0
- package/dist/commands/rag/admin-schema.js.map +1 -0
- package/dist/commands/rag/clear-command.d.ts.map +1 -1
- package/dist/commands/rag/clear-command.js +30 -15
- package/dist/commands/rag/clear-command.js.map +1 -1
- package/dist/commands/rag/command-helpers.d.ts +31 -7
- package/dist/commands/rag/command-helpers.d.ts.map +1 -1
- package/dist/commands/rag/command-helpers.js +41 -21
- package/dist/commands/rag/command-helpers.js.map +1 -1
- package/dist/commands/rag/index-command.d.ts +37 -48
- package/dist/commands/rag/index-command.d.ts.map +1 -1
- package/dist/commands/rag/index-command.js +80 -65
- package/dist/commands/rag/index-command.js.map +1 -1
- package/dist/commands/rag/index-schema.d.ts +107 -0
- package/dist/commands/rag/index-schema.d.ts.map +1 -0
- package/dist/commands/rag/index-schema.js +34 -0
- package/dist/commands/rag/index-schema.js.map +1 -0
- package/dist/commands/rag/index.d.ts.map +1 -1
- package/dist/commands/rag/index.js +88 -41
- package/dist/commands/rag/index.js.map +1 -1
- package/dist/commands/rag/query-command.d.ts +18 -4
- package/dist/commands/rag/query-command.d.ts.map +1 -1
- package/dist/commands/rag/query-command.js +42 -27
- package/dist/commands/rag/query-command.js.map +1 -1
- package/dist/commands/rag/query-schema.d.ts +363 -0
- package/dist/commands/rag/query-schema.d.ts.map +1 -0
- package/dist/commands/rag/query-schema.js +59 -0
- package/dist/commands/rag/query-schema.js.map +1 -0
- package/dist/commands/rag/stats-command.d.ts.map +1 -1
- package/dist/commands/rag/stats-command.js +19 -18
- package/dist/commands/rag/stats-command.js.map +1 -1
- package/dist/commands/resources/check-progress.d.ts +64 -11
- package/dist/commands/resources/check-progress.d.ts.map +1 -1
- package/dist/commands/resources/check-progress.js +77 -4
- package/dist/commands/resources/check-progress.js.map +1 -1
- package/dist/commands/resources/check-schema.d.ts +335 -0
- package/dist/commands/resources/check-schema.d.ts.map +1 -0
- package/dist/commands/resources/check-schema.js +104 -0
- package/dist/commands/resources/check-schema.js.map +1 -0
- package/dist/commands/resources/check-supervisor.d.ts +315 -71
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -1
- package/dist/commands/resources/check-supervisor.js +493 -107
- package/dist/commands/resources/check-supervisor.js.map +1 -1
- package/dist/commands/resources/check.d.ts +56 -249
- package/dist/commands/resources/check.d.ts.map +1 -1
- package/dist/commands/resources/check.js +416 -276
- package/dist/commands/resources/check.js.map +1 -1
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +165 -91
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/query-schema.d.ts +188 -0
- package/dist/commands/resources/query-schema.d.ts.map +1 -0
- package/dist/commands/resources/query-schema.js +48 -0
- package/dist/commands/resources/query-schema.js.map +1 -0
- package/dist/commands/resources/query.d.ts +17 -12
- package/dist/commands/resources/query.d.ts.map +1 -1
- package/dist/commands/resources/query.js +60 -48
- package/dist/commands/resources/query.js.map +1 -1
- package/dist/commands/resources/scan-schema.d.ts +195 -0
- package/dist/commands/resources/scan-schema.d.ts.map +1 -0
- package/dist/commands/resources/scan-schema.js +53 -0
- package/dist/commands/resources/scan-schema.js.map +1 -0
- package/dist/commands/resources/scan.d.ts +26 -3
- package/dist/commands/resources/scan.d.ts.map +1 -1
- package/dist/commands/resources/scan.js +51 -53
- package/dist/commands/resources/scan.js.map +1 -1
- package/dist/commands/resources/validate-schema.d.ts +326 -0
- package/dist/commands/resources/validate-schema.d.ts.map +1 -0
- package/dist/commands/resources/validate-schema.js +60 -0
- package/dist/commands/resources/validate-schema.js.map +1 -0
- package/dist/commands/resources/validate.d.ts +45 -169
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +221 -485
- package/dist/commands/resources/validate.js.map +1 -1
- package/dist/commands/skill/review-checklist.d.ts.map +1 -1
- package/dist/commands/skill/review-checklist.js +0 -1
- package/dist/commands/skill/review-checklist.js.map +1 -1
- package/dist/commands/skill/review-schema.d.ts +278 -0
- package/dist/commands/skill/review-schema.d.ts.map +1 -0
- package/dist/commands/skill/review-schema.js +46 -0
- package/dist/commands/skill/review-schema.js.map +1 -0
- package/dist/commands/skill/review.d.ts +8 -234
- package/dist/commands/skill/review.d.ts.map +1 -1
- package/dist/commands/skill/review.js +54 -78
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/auth-flags.d.ts +3 -0
- package/dist/commands/skill/test/auth-flags.d.ts.map +1 -1
- package/dist/commands/skill/test/auth-flags.js +6 -2
- package/dist/commands/skill/test/auth-flags.js.map +1 -1
- package/dist/commands/skill/test/configure-schema.d.ts +67 -0
- package/dist/commands/skill/test/configure-schema.d.ts.map +1 -0
- package/dist/commands/skill/test/configure-schema.js +27 -0
- package/dist/commands/skill/test/configure-schema.js.map +1 -0
- package/dist/commands/skill/test/configure.d.ts +12 -5
- package/dist/commands/skill/test/configure.d.ts.map +1 -1
- package/dist/commands/skill/test/configure.js +101 -31
- package/dist/commands/skill/test/configure.js.map +1 -1
- package/dist/commands/skill/test/run-schema.d.ts +107 -0
- package/dist/commands/skill/test/run-schema.d.ts.map +1 -0
- package/dist/commands/skill/test/run-schema.js +36 -0
- package/dist/commands/skill/test/run-schema.js.map +1 -0
- package/dist/commands/skill/test/run.d.ts +3 -2
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +316 -155
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build-schema.d.ts +199 -0
- package/dist/commands/skills/build-schema.d.ts.map +1 -0
- package/dist/commands/skills/build-schema.js +55 -0
- package/dist/commands/skills/build-schema.js.map +1 -0
- package/dist/commands/skills/build.d.ts +95 -298
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +415 -818
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/command-helpers.d.ts +5 -11
- package/dist/commands/skills/command-helpers.d.ts.map +1 -1
- package/dist/commands/skills/command-helpers.js +7 -17
- package/dist/commands/skills/command-helpers.js.map +1 -1
- package/dist/commands/skills/index.js +12 -6
- package/dist/commands/skills/index.js.map +1 -1
- package/dist/commands/skills/install-schema.d.ts +153 -0
- package/dist/commands/skills/install-schema.d.ts.map +1 -0
- package/dist/commands/skills/install-schema.js +44 -0
- package/dist/commands/skills/install-schema.js.map +1 -0
- package/dist/commands/skills/install.d.ts +76 -8
- package/dist/commands/skills/install.d.ts.map +1 -1
- package/dist/commands/skills/install.js +230 -194
- package/dist/commands/skills/install.js.map +1 -1
- package/dist/commands/skills/list-schema.d.ts +145 -0
- package/dist/commands/skills/list-schema.d.ts.map +1 -0
- package/dist/commands/skills/list-schema.js +37 -0
- package/dist/commands/skills/list-schema.js.map +1 -0
- package/dist/commands/skills/list.d.ts +39 -8
- package/dist/commands/skills/list.d.ts.map +1 -1
- package/dist/commands/skills/list.js +110 -122
- package/dist/commands/skills/list.js.map +1 -1
- package/dist/commands/skills/package-schema.d.ts +98 -0
- package/dist/commands/skills/package-schema.d.ts.map +1 -0
- package/dist/commands/skills/package-schema.js +32 -0
- package/dist/commands/skills/package-schema.js.map +1 -0
- package/dist/commands/skills/package.d.ts +85 -14
- package/dist/commands/skills/package.d.ts.map +1 -1
- package/dist/commands/skills/package.js +288 -207
- package/dist/commands/skills/package.js.map +1 -1
- package/dist/commands/skills/scope-guard.d.ts +27 -20
- package/dist/commands/skills/scope-guard.d.ts.map +1 -1
- package/dist/commands/skills/scope-guard.js +43 -32
- package/dist/commands/skills/scope-guard.js.map +1 -1
- package/dist/commands/skills/skill-discovery.d.ts +1 -1
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +40 -19
- package/dist/commands/skills/skill-discovery.js.map +1 -1
- package/dist/commands/skills/source-resolvers.d.ts +58 -8
- package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
- package/dist/commands/skills/source-resolvers.js +113 -38
- package/dist/commands/skills/source-resolvers.js.map +1 -1
- package/dist/commands/skills/validate-command.d.ts.map +1 -1
- package/dist/commands/skills/validate-command.js +31 -51
- package/dist/commands/skills/validate-command.js.map +1 -1
- package/dist/commands/skills/validate-schema.d.ts +199 -0
- package/dist/commands/skills/validate-schema.d.ts.map +1 -0
- package/dist/commands/skills/validate-schema.js +44 -0
- package/dist/commands/skills/validate-schema.js.map +1 -0
- package/dist/commands/skills/validate.d.ts +100 -136
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +257 -343
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts +17 -5
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +139 -94
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +121 -110
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +230 -294
- package/dist/commands/verify.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/report-schemas.d.ts +12398 -35
- package/dist/report-schemas.d.ts.map +1 -1
- package/dist/report-schemas.js +624 -66
- package/dist/report-schemas.js.map +1 -1
- package/dist/skill-resolution/packaging-config.js +2 -2
- package/dist/skill-resolution/packaging-config.js.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.js +20 -13
- package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
- package/dist/utils/agent-discovery.d.ts +34 -1
- package/dist/utils/agent-discovery.d.ts.map +1 -1
- package/dist/utils/agent-discovery.js +80 -38
- package/dist/utils/agent-discovery.js.map +1 -1
- package/dist/utils/claude-context-lens.d.ts +13 -6
- package/dist/utils/claude-context-lens.d.ts.map +1 -1
- package/dist/utils/claude-context-lens.js +11 -12
- package/dist/utils/claude-context-lens.js.map +1 -1
- package/dist/utils/command-error-codes.d.ts +12 -0
- package/dist/utils/command-error-codes.d.ts.map +1 -0
- package/dist/utils/command-error-codes.js +12 -0
- package/dist/utils/command-error-codes.js.map +1 -0
- package/dist/utils/command-refusal.d.ts +58 -0
- package/dist/utils/command-refusal.d.ts.map +1 -0
- package/dist/utils/command-refusal.js +170 -0
- package/dist/utils/command-refusal.js.map +1 -0
- package/dist/utils/commander-ending.d.ts +40 -0
- package/dist/utils/commander-ending.d.ts.map +1 -0
- package/dist/utils/commander-ending.js +42 -0
- package/dist/utils/commander-ending.js.map +1 -0
- package/dist/utils/config-loader.d.ts +13 -8
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js +84 -45
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/corpus-target.d.ts +1 -1
- package/dist/utils/corpus-target.d.ts.map +1 -1
- package/dist/utils/corpus-target.js +6 -4
- package/dist/utils/corpus-target.js.map +1 -1
- package/dist/utils/debug-diagnostics.d.ts +18 -0
- package/dist/utils/debug-diagnostics.d.ts.map +1 -0
- package/dist/utils/debug-diagnostics.js +23 -0
- package/dist/utils/debug-diagnostics.js.map +1 -0
- package/dist/utils/document-writer.d.ts +191 -0
- package/dist/utils/document-writer.d.ts.map +1 -0
- package/dist/utils/document-writer.js +319 -0
- package/dist/utils/document-writer.js.map +1 -0
- package/dist/utils/help-loader.d.ts +2 -2
- package/dist/utils/help-loader.js +2 -2
- package/dist/utils/install-plan.d.ts +99 -0
- package/dist/utils/install-plan.d.ts.map +1 -0
- package/dist/utils/install-plan.js +146 -0
- package/dist/utils/install-plan.js.map +1 -0
- package/dist/utils/issue-anchor.d.ts +1 -1
- package/dist/utils/issue-anchor.d.ts.map +1 -1
- package/dist/utils/issue-anchor.js.map +1 -1
- package/dist/utils/issue-rendering.d.ts +8 -3
- package/dist/utils/issue-rendering.d.ts.map +1 -1
- package/dist/utils/issue-rendering.js +4 -0
- package/dist/utils/issue-rendering.js.map +1 -1
- package/dist/utils/lens-population.d.ts +20 -0
- package/dist/utils/lens-population.d.ts.map +1 -0
- package/dist/utils/lens-population.js +15 -0
- package/dist/utils/lens-population.js.map +1 -0
- package/dist/utils/marketplace-io.d.ts +63 -0
- package/dist/utils/marketplace-io.d.ts.map +1 -0
- package/dist/utils/marketplace-io.js +63 -0
- package/dist/utils/marketplace-io.js.map +1 -0
- package/dist/utils/operator-notices.d.ts +97 -0
- package/dist/utils/operator-notices.d.ts.map +1 -0
- package/dist/utils/operator-notices.js +115 -0
- package/dist/utils/operator-notices.js.map +1 -0
- package/dist/utils/optional-backend.d.ts +18 -15
- package/dist/utils/optional-backend.d.ts.map +1 -1
- package/dist/utils/optional-backend.js +22 -33
- package/dist/utils/optional-backend.js.map +1 -1
- package/dist/utils/output.d.ts +5 -43
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +8 -63
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/package-json.d.ts +3 -4
- package/dist/utils/package-json.d.ts.map +1 -1
- package/dist/utils/package-json.js +8 -8
- package/dist/utils/package-json.js.map +1 -1
- package/dist/utils/population-wiring.d.ts +31 -38
- package/dist/utils/population-wiring.d.ts.map +1 -1
- package/dist/utils/population-wiring.js +38 -32
- package/dist/utils/population-wiring.js.map +1 -1
- package/dist/utils/project-root-policy.d.ts +74 -1
- package/dist/utils/project-root-policy.d.ts.map +1 -1
- package/dist/utils/project-root-policy.js +146 -8
- package/dist/utils/project-root-policy.js.map +1 -1
- package/dist/utils/projection-lenses.d.ts +25 -7
- package/dist/utils/projection-lenses.d.ts.map +1 -1
- package/dist/utils/projection-lenses.js +20 -6
- package/dist/utils/projection-lenses.js.map +1 -1
- package/dist/utils/projection-query.d.ts +17 -10
- package/dist/utils/projection-query.d.ts.map +1 -1
- package/dist/utils/projection-query.js +47 -28
- package/dist/utils/projection-query.js.map +1 -1
- package/dist/utils/projection-store.d.ts +2 -2
- package/dist/utils/projection-store.d.ts.map +1 -1
- package/dist/utils/projection-store.js +74 -45
- package/dist/utils/projection-store.js.map +1 -1
- package/dist/utils/rag-database.d.ts +61 -0
- package/dist/utils/rag-database.d.ts.map +1 -0
- package/dist/utils/rag-database.js +178 -0
- package/dist/utils/rag-database.js.map +1 -0
- package/dist/utils/relation-limits.d.ts +7 -2
- package/dist/utils/relation-limits.d.ts.map +1 -1
- package/dist/utils/relation-limits.js +6 -1
- package/dist/utils/relation-limits.js.map +1 -1
- package/dist/utils/relativize-paths.d.ts +23 -0
- package/dist/utils/relativize-paths.d.ts.map +1 -1
- package/dist/utils/relativize-paths.js +32 -1
- package/dist/utils/relativize-paths.js.map +1 -1
- package/dist/utils/resource-loader.d.ts +76 -32
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +132 -66
- package/dist/utils/resource-loader.js.map +1 -1
- package/dist/utils/run-integrity.d.ts +64 -31
- package/dist/utils/run-integrity.d.ts.map +1 -1
- package/dist/utils/run-integrity.js +76 -35
- package/dist/utils/run-integrity.js.map +1 -1
- package/dist/utils/scope-locations.d.ts +7 -5
- package/dist/utils/scope-locations.d.ts.map +1 -1
- package/dist/utils/scope-locations.js +37 -12
- package/dist/utils/scope-locations.js.map +1 -1
- package/dist/utils/staging-dir.d.ts +7 -0
- package/dist/utils/staging-dir.d.ts.map +1 -0
- package/dist/utils/staging-dir.js +12 -0
- package/dist/utils/staging-dir.js.map +1 -0
- package/dist/utils/url-redact.d.ts +9 -0
- package/dist/utils/url-redact.d.ts.map +1 -1
- package/dist/utils/url-redact.js +13 -0
- package/dist/utils/url-redact.js.map +1 -1
- package/dist/utils/user-context-scanner.d.ts +3 -2
- package/dist/utils/user-context-scanner.d.ts.map +1 -1
- package/dist/utils/user-context-scanner.js +24 -4
- package/dist/utils/user-context-scanner.js.map +1 -1
- package/dist/utils/validate-help-files.d.ts.map +1 -1
- package/dist/utils/validate-help-files.js +8 -14
- package/dist/utils/validate-help-files.js.map +1 -1
- package/dist/utils/vat-bin-path.d.ts.map +1 -1
- package/dist/utils/vat-bin-path.js +3 -3
- package/dist/utils/vat-bin-path.js.map +1 -1
- package/dist/utils/verdict-helpers.d.ts.map +1 -1
- package/dist/utils/verdict-helpers.js +5 -5
- package/dist/utils/verdict-helpers.js.map +1 -1
- package/docs/agent.md +347 -2
- package/docs/audit.md +312 -89
- package/docs/doctor.md +65 -19
- package/docs/index.md +571 -20
- package/docs/mcp.md +64 -12
- package/docs/rag.md +176 -48
- package/docs/resources.md +257 -71
- package/docs/skill-test.md +148 -19
- package/docs/skills.md +459 -174
- package/package.json +16 -19
- package/schemas/agent-build.json +268 -0
- package/schemas/agent-import.json +252 -0
- package/schemas/agent-install.json +260 -0
- package/schemas/agent-installed.json +287 -0
- package/schemas/agent-list.json +279 -0
- package/schemas/agent-uninstall.json +260 -0
- package/schemas/agent-validate.json +279 -0
- package/schemas/ard-emit.json +224 -106
- package/schemas/audit-settings.json +472 -0
- package/schemas/audit.json +635 -0
- package/schemas/cache-clear.json +273 -0
- package/schemas/claude-marketplace-publish.json +286 -0
- package/schemas/claude-marketplace-validate.json +352 -0
- package/schemas/claude-org-not-implemented.json +239 -0
- package/schemas/claude-plugin-build.json +446 -0
- package/schemas/claude-plugin-install.json +291 -0
- package/schemas/claude-plugin-list.json +326 -0
- package/schemas/claude-plugin-uninstall.json +272 -0
- package/schemas/corpus-audit.json +635 -0
- package/schemas/corpus-scan.json +293 -0
- package/schemas/doctor.json +299 -0
- package/schemas/inventory.json +982 -0
- package/schemas/mcp-list-collections.json +268 -0
- package/schemas/okf-validate.json +224 -106
- package/schemas/orchestrator.json +299 -0
- package/schemas/rag-clear.json +253 -0
- package/schemas/rag-index.json +273 -0
- package/schemas/rag-query.json +365 -0
- package/schemas/rag-stats.json +269 -0
- package/schemas/resources-check.json +242 -108
- package/schemas/resources-query.json +333 -0
- package/schemas/resources-scan.json +321 -0
- package/schemas/resources-validate.json +332 -0
- package/schemas/skill-review.json +224 -106
- package/schemas/skill-test-configure.json +256 -0
- package/schemas/skill-test-run.json +296 -0
- package/schemas/skills-build.json +325 -0
- package/schemas/skills-install.json +287 -0
- package/schemas/skills-list.json +283 -0
- package/schemas/skills-package.json +270 -0
- package/schemas/skills-validate.json +285 -0
- package/dist/commands/skills/shared.d.ts +0 -29
- package/dist/commands/skills/shared.d.ts.map +0 -1
- package/dist/commands/skills/shared.js +0 -33
- package/dist/commands/skills/shared.js.map +0 -1
- package/dist/utils/command-error.d.ts +0 -194
- package/dist/utils/command-error.d.ts.map +0 -1
- package/dist/utils/command-error.js +0 -237
- package/dist/utils/command-error.js.map +0 -1
|
@@ -4,10 +4,45 @@
|
|
|
4
4
|
import { buildLinkAuthEngineConfig, buildResourcePopulation, DEFAULT_RESOURCE_INCLUDE, gitExtentSelected, ResourceRegistry, } from '@vibe-agent-toolkit/resources';
|
|
5
5
|
import { relativeEscapesRoot, safePath, toForwardSlash } from '@vibe-agent-toolkit/utils';
|
|
6
6
|
import { GitTracker, gitTreeSnapshot } from '@vibe-agent-toolkit/utils/git';
|
|
7
|
+
import { CommandRefusalError } from './command-refusal.js';
|
|
7
8
|
import { loadConfig } from './config-loader.js';
|
|
8
9
|
import { collectionsOption } from './population-wiring.js';
|
|
9
10
|
import { assertDirectoryArgument } from './project-root-policy.js';
|
|
10
11
|
import { withPopulationCache } from './projection-store.js';
|
|
12
|
+
/**
|
|
13
|
+
* The published `population` an observation implies: `null` for the walk —
|
|
14
|
+
* offered no source, or declined the one it was offered — because nothing was
|
|
15
|
+
* populated from or into the store.
|
|
16
|
+
*
|
|
17
|
+
* @param observation - The load's one observation
|
|
18
|
+
* @returns `'store'`, `'derived'` or `null`
|
|
19
|
+
*/
|
|
20
|
+
export function publishedPopulation(observation) {
|
|
21
|
+
return observation.lane === 'walk' ? null : observation.outcome.population;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Which enumerator the projection lane used, or `null` when the walk ran and
|
|
25
|
+
* there was no extent to source.
|
|
26
|
+
*
|
|
27
|
+
* Reported for the same reason the lane is, one level down. The lane
|
|
28
|
+
* distinguishes the walk from the projection; it does NOT distinguish the
|
|
29
|
+
* projection's two enumerators, and `VAT_EXTENT_SOURCE` is exactly the axis a
|
|
30
|
+
* flip decision turns on. Without this, both arms of that A/B report
|
|
31
|
+
* `projection` and two identical populations mean either "the enumerators
|
|
32
|
+
* agree" or "the switch was ignored" — indistinguishable, and the second is
|
|
33
|
+
* reachable, because `crawlSourceFor` falls back to the walk without saying so
|
|
34
|
+
* when the root is not in a repository.
|
|
35
|
+
*
|
|
36
|
+
* 🪤 NOT a cache-hit marker: on a hit no enumerator runs and it still names the
|
|
37
|
+
* one this process selected, because the source is chosen before the store is
|
|
38
|
+
* asked.
|
|
39
|
+
*
|
|
40
|
+
* @param population - The load's population
|
|
41
|
+
* @returns The enumerator, or `null` for the walk
|
|
42
|
+
*/
|
|
43
|
+
export function extentSourceOf(population) {
|
|
44
|
+
return population.lane === 'walk' ? null : population.extentSource;
|
|
45
|
+
}
|
|
11
46
|
/**
|
|
12
47
|
* Refuse a `resources.linkAuth` provider that cannot compile HERE, where the
|
|
13
48
|
* config is loaded, so every verb that loads it answers the same way.
|
|
@@ -49,6 +84,29 @@ export function scopeIncludeToSubtree(include, relDir) {
|
|
|
49
84
|
}
|
|
50
85
|
return include.map((pattern) => `${relDir}/${pattern}`);
|
|
51
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Refuse a `--collection` that names no collection the project declares.
|
|
89
|
+
*
|
|
90
|
+
* A typo'd filter used to run the verb over zero resources and answer with a
|
|
91
|
+
* run-integrity finding (or, in `scan`, a zero count under the typo'd name) —
|
|
92
|
+
* a report about a collection that does not exist. It is the invocation's
|
|
93
|
+
* mistake, and `resources validate` and `resources scan` refuse it the same way.
|
|
94
|
+
* A declared collection that matched no file is NOT refused here: that is a run
|
|
95
|
+
* over nothing, and the writer's run-integrity refusal says so.
|
|
96
|
+
*
|
|
97
|
+
* @param config - The loaded project config, when there is one
|
|
98
|
+
* @param collection - The `--collection` value, when one was passed
|
|
99
|
+
* @throws {CommandRefusalError} `USAGE_INVALID` naming the declared collections
|
|
100
|
+
*/
|
|
101
|
+
export function assertDeclaredCollection(config, collection) {
|
|
102
|
+
if (collection === undefined)
|
|
103
|
+
return;
|
|
104
|
+
const declared = Object.keys(config?.resources?.collections ?? {});
|
|
105
|
+
if (declared.includes(collection))
|
|
106
|
+
return;
|
|
107
|
+
throw new CommandRefusalError('USAGE_INVALID', `--collection ${collection} names no collection in resources.collections`
|
|
108
|
+
+ ` (declared: ${declared.length === 0 ? 'none' : declared.join(', ')})`);
|
|
109
|
+
}
|
|
52
110
|
/**
|
|
53
111
|
* Build the crawl options for an explicit path argument.
|
|
54
112
|
*
|
|
@@ -74,7 +132,7 @@ function crawlOptionsForPath(pathArg, projectRoot, config, logger) {
|
|
|
74
132
|
// them silently — silent dropping is the bug this function exists to fix.
|
|
75
133
|
logger.warn(`${resolved} is outside projectRoot ${projectRoot}; ` +
|
|
76
134
|
`resources include/exclude patterns from the config do not apply to it`);
|
|
77
|
-
return { baseDir: resolved, unreadable: RESOURCES_UNREADABLE };
|
|
135
|
+
return { baseDir: resolved, unreadable: RESOURCES_UNREADABLE, outputs: [] };
|
|
78
136
|
}
|
|
79
137
|
// The crawler used to perform this check itself, because it received the path
|
|
80
138
|
// argument as its `baseDir`. Now that `baseDir` is the project root, a bad path
|
|
@@ -84,6 +142,8 @@ function crawlOptionsForPath(pathArg, projectRoot, config, logger) {
|
|
|
84
142
|
return {
|
|
85
143
|
baseDir: projectRoot,
|
|
86
144
|
unreadable: RESOURCES_UNREADABLE,
|
|
145
|
+
// Every resources verb only reads the tree it crawls.
|
|
146
|
+
outputs: [],
|
|
87
147
|
include: scopeIncludeToSubtree(DEFAULT_RESOURCE_INCLUDE, normalizedRelDir),
|
|
88
148
|
...(config?.resources?.exclude ? { exclude: config.resources.exclude } : {}),
|
|
89
149
|
};
|
|
@@ -122,6 +182,21 @@ export const RESOURCES_CRAWL_PROJECTION = 'projection';
|
|
|
122
182
|
* name it explicitly keep working and keep MEANING the same thing.
|
|
123
183
|
*/
|
|
124
184
|
export const RESOURCES_CRAWL_WALK = 'walk';
|
|
185
|
+
/**
|
|
186
|
+
* The debug line naming the lane a crawl was offered, for every verb that
|
|
187
|
+
* offers one. Each lane says it — a marker only one lane emitted would make the
|
|
188
|
+
* other identifiable by ABSENCE, which is indistinguishable from a build too
|
|
189
|
+
* old to have either lane — and there is no source only when the walk was
|
|
190
|
+
* selected, so the walk's line names {@link RESOURCES_CRAWL_WALK}.
|
|
191
|
+
*
|
|
192
|
+
* @param populationSource - The source offered to the crawl, if any
|
|
193
|
+
* @returns The line to log
|
|
194
|
+
*/
|
|
195
|
+
export function crawlLaneDebugLine(populationSource) {
|
|
196
|
+
return populationSource === undefined
|
|
197
|
+
? `Enumerating via the incumbent walk (${RESOURCES_CRAWL_ENV}=${RESOURCES_CRAWL_WALK})`
|
|
198
|
+
: `Enumerating via the projection lane (${RESOURCES_CRAWL_ENV}=${RESOURCES_CRAWL_PROJECTION})`;
|
|
199
|
+
}
|
|
125
200
|
/**
|
|
126
201
|
* Whether this process should source the resources population from a projection.
|
|
127
202
|
*
|
|
@@ -141,9 +216,10 @@ export const RESOURCES_CRAWL_WALK = 'walk';
|
|
|
141
216
|
* known, and it is the cost this default was accepted at; closing it is its own
|
|
142
217
|
* change (teaching an extent to admit `120000` entries as their own paths).
|
|
143
218
|
* The omission is no longer SILENT — each declined link is an `info` row under
|
|
144
|
-
* one of the
|
|
145
|
-
* `EXTENT_SYMLINK_TARGET_OUTSIDE_ROOT`, `EXTENT_SYMLINK_TARGET_UNRESOLVED`
|
|
146
|
-
*
|
|
219
|
+
* one of the four declined-link codes (`EXTENT_SYMLINK_NOT_REALIZED`,
|
|
220
|
+
* `EXTENT_SYMLINK_TARGET_OUTSIDE_ROOT`, `EXTENT_SYMLINK_TARGET_UNRESOLVED` for a
|
|
221
|
+
* dangling in-root target, `EXTENT_SYMLINK_TARGET_UNREADABLE` for one the OS
|
|
222
|
+
* would not resolve) — but no such row is a `LINK_BROKEN_FILE`
|
|
147
223
|
* finding.
|
|
148
224
|
* {@link RESOURCES_CRAWL_WALK} is the one-value escape hatch meanwhile.
|
|
149
225
|
*
|
|
@@ -181,42 +257,39 @@ export function resourcesProjectionCrawlSelected() {
|
|
|
181
257
|
* would admit the ignored half of a git tree rather than decline it. See
|
|
182
258
|
* `buildResourcePopulation`.
|
|
183
259
|
*
|
|
260
|
+
* The enumeration's outcome and enumerator travel back on what `enumerate`
|
|
261
|
+
* returns, and from there on what `ResourceRegistry.crawl` returns — never on a
|
|
262
|
+
* side channel this closure writes to.
|
|
263
|
+
*
|
|
184
264
|
* @param root - The root this source may answer for, and no other
|
|
185
265
|
* @param gitTracker - The run's ignore oracle
|
|
186
|
-
* @param observeExtentSource - Called with the enumerator that actually ran,
|
|
187
|
-
* once per enumerated root. The value cannot be recovered afterwards by
|
|
188
|
-
* re-reading the environment — see {@link ResourceLoadResult.extentSource}.
|
|
189
|
-
* 🪤 On a cache hit NO enumerator runs and this still reports the one this
|
|
190
|
-
* process selected, because the source is chosen before the store is asked
|
|
191
266
|
* @param cache - The run's projection store, or `undefined` to enumerate every
|
|
192
267
|
* time. A SEPARATE selector from {@link RESOURCES_CRAWL_ENV}: which lane
|
|
193
268
|
* enumerates and whether its answer is cached are independent choices, and a
|
|
194
269
|
* cache folded into the lane switch could never be measured against it
|
|
195
270
|
* @returns A population source, or `undefined` to use the walk
|
|
196
271
|
*/
|
|
197
|
-
function populationSourceFor(root, gitTracker,
|
|
272
|
+
function populationSourceFor(root, gitTracker, cache) {
|
|
198
273
|
if (!resourcesProjectionCrawlSelected()) {
|
|
199
274
|
return undefined;
|
|
200
275
|
}
|
|
201
276
|
return {
|
|
202
277
|
root: safePath.resolve(root),
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
return { paths: population.paths, conditions: population.conditions };
|
|
219
|
-
},
|
|
278
|
+
// `outputs` come from the crawl that asks (the registry's one declaration of what its verb writes).
|
|
279
|
+
enumerate: (enumeratedRoot, outputs) => buildResourcePopulation({
|
|
280
|
+
root: enumeratedRoot,
|
|
281
|
+
outputs,
|
|
282
|
+
// `enumeratedRoot` and this source's own `root` are the SAME directory,
|
|
283
|
+
// always: `populationFrom` compares them and declines outright when they
|
|
284
|
+
// differ, so `enumerate` is never called for another tree. Reading the
|
|
285
|
+
// declarations off the root being enumerated is therefore not a guard
|
|
286
|
+
// against a second root — it is how the declaration and the enumeration
|
|
287
|
+
// are kept demonstrably on one tree at the point of use, with no second
|
|
288
|
+
// variable to fall out of step with the one that was checked.
|
|
289
|
+
gitTracker,
|
|
290
|
+
...(cache !== undefined && { cache }),
|
|
291
|
+
...collectionsOption(enumeratedRoot),
|
|
292
|
+
}),
|
|
220
293
|
};
|
|
221
294
|
}
|
|
222
295
|
/**
|
|
@@ -250,29 +323,31 @@ function populationSourceFor(root, gitTracker, observeExtentSource, cache) {
|
|
|
250
323
|
* @param options.gitTracker - An already-initialized tracker to reuse. Omit to
|
|
251
324
|
* have one built, which costs a `git ls-files` spawn — and only when the lane
|
|
252
325
|
* is actually selected
|
|
253
|
-
* @param options.observeExtentSource - Called with the enumerator that ran, once
|
|
254
|
-
* per enumerated root. 🪤 NOT a cache-hit marker: on a hit no enumerator runs
|
|
255
|
-
* and this still reports the one this process selected
|
|
256
326
|
* @param work - Given the source, or `undefined` when the walk stays selected
|
|
257
327
|
* @returns Whatever `work` returned
|
|
258
328
|
*/
|
|
259
|
-
export
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
const gitTracker = options.gitTracker ?? new GitTracker(options.root);
|
|
266
|
-
return withPopulationCache({ root: options.root }, async (cache) => {
|
|
267
|
-
// Initialized inside the bracket for the reason `loadResourcesWithConfig`
|
|
268
|
-
// gives at its own call: the store has already taken the snapshot that
|
|
269
|
-
// answers this tracker's question, so asking git again is a spawn spent
|
|
270
|
-
// rebuilding a set the process is holding.
|
|
271
|
-
if (options.gitTracker === undefined) {
|
|
272
|
-
await gitTracker.initialize();
|
|
329
|
+
export function withResourcePopulationSource(options, work) {
|
|
330
|
+
try {
|
|
331
|
+
// Checked before anything is built or opened: an unselected lane must cost
|
|
332
|
+
// nothing, or every command pays a tracker and a store to decline them.
|
|
333
|
+
if (!resourcesProjectionCrawlSelected()) {
|
|
334
|
+
return work(undefined);
|
|
273
335
|
}
|
|
274
|
-
|
|
275
|
-
|
|
336
|
+
const gitTracker = options.gitTracker ?? new GitTracker(options.root);
|
|
337
|
+
return withPopulationCache({ root: options.root }, async (cache) => {
|
|
338
|
+
// Initialized inside the bracket for the reason `loadResourcesWithConfig`
|
|
339
|
+
// gives at its own call: the store has already taken the snapshot that
|
|
340
|
+
// answers this tracker's question, so asking git again is a spawn spent
|
|
341
|
+
// rebuilding a set the process is holding.
|
|
342
|
+
if (options.gitTracker === undefined) {
|
|
343
|
+
await gitTracker.initialize();
|
|
344
|
+
}
|
|
345
|
+
return work(populationSourceFor(options.root, gitTracker, cache));
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
catch (error) {
|
|
349
|
+
return Promise.reject(error);
|
|
350
|
+
}
|
|
276
351
|
}
|
|
277
352
|
/**
|
|
278
353
|
* Load resources from a path with config support
|
|
@@ -300,11 +375,12 @@ export async function withResourcePopulationSource(options, work) {
|
|
|
300
375
|
* @param pathArg - Path argument from CLI (optional)
|
|
301
376
|
* @param projectRoot - Pre-resolved project root from the CLI boundary
|
|
302
377
|
* @param logger - Logger instance
|
|
303
|
-
* @returns Resource load result with registry and
|
|
378
|
+
* @returns Resource load result with registry, metadata and the population the
|
|
379
|
+
* crawl returned
|
|
304
380
|
*/
|
|
305
381
|
export async function loadResourcesWithConfig(pathArg, projectRoot, logger) {
|
|
306
382
|
// Config lookup is anchored at the resolved projectRoot.
|
|
307
|
-
const config = loadConfig(projectRoot);
|
|
383
|
+
const config = loadConfig(projectRoot, 'source');
|
|
308
384
|
if (config) {
|
|
309
385
|
logger.debug(`Loaded config from ${projectRoot}`);
|
|
310
386
|
assertLinkAuthProvidersCompile(config);
|
|
@@ -345,6 +421,7 @@ export async function loadResourcesWithConfig(pathArg, projectRoot, logger) {
|
|
|
345
421
|
crawlOptions = {
|
|
346
422
|
baseDir: projectRoot,
|
|
347
423
|
unreadable: RESOURCES_UNREADABLE,
|
|
424
|
+
outputs: [],
|
|
348
425
|
// Apply include patterns from config (if specified)
|
|
349
426
|
...(config?.resources?.include ? { include: config.resources.include } : {}),
|
|
350
427
|
// Apply exclude patterns from config (if specified)
|
|
@@ -354,11 +431,10 @@ export async function loadResourcesWithConfig(pathArg, projectRoot, logger) {
|
|
|
354
431
|
// Which lane enumerates. Applied to the options both branches above produced,
|
|
355
432
|
// so the path-argument case and the whole-root case cannot end up on different
|
|
356
433
|
// crawlers — the bug shape this file already carries one fix for.
|
|
357
|
-
let extentSource = null;
|
|
358
434
|
// The store brackets the crawl and is closed however the crawl ends. Nothing
|
|
359
435
|
// outside this bracket can reach it: the population source is called from
|
|
360
436
|
// inside `registry.crawl` and nowhere else.
|
|
361
|
-
const
|
|
437
|
+
const population = await withPopulationCache({ root: projectRoot }, async (cache) => {
|
|
362
438
|
// The git enumerator takes a `gitTreeSnapshot` during the crawl below no matter
|
|
363
439
|
// what. Taking it HERE instead is the same snapshot moved a few lines earlier —
|
|
364
440
|
// the open bracket memoizes it, so the enumerator's own call becomes a lookup —
|
|
@@ -386,23 +462,14 @@ export async function loadResourcesWithConfig(pathArg, projectRoot, logger) {
|
|
|
386
462
|
// no snapshot was taken the peek misses and it spawns exactly as before.
|
|
387
463
|
await gitTracker.initialize();
|
|
388
464
|
logger.debug(`GitTracker initialized with ${gitTracker.getStats().cacheSize} tracked files`);
|
|
389
|
-
const populationSource = populationSourceFor(projectRoot, gitTracker,
|
|
390
|
-
|
|
391
|
-
}, cache);
|
|
392
|
-
const selected = populationSource ? 'projection' : 'walk';
|
|
465
|
+
const populationSource = populationSourceFor(projectRoot, gitTracker, cache);
|
|
466
|
+
logger.debug(crawlLaneDebugLine(populationSource));
|
|
393
467
|
if (populationSource) {
|
|
394
|
-
logger.debug(`Enumerating via the projection lane (${RESOURCES_CRAWL_ENV}=${RESOURCES_CRAWL_PROJECTION})`);
|
|
395
468
|
crawlOptions = { ...crawlOptions, populationSource };
|
|
396
469
|
}
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
// identifiable by ABSENCE, which is indistinguishable from a build too old
|
|
401
|
-
// to have either lane.
|
|
402
|
-
logger.debug(`Enumerating via the incumbent walk (${RESOURCES_CRAWL_ENV} unset)`);
|
|
403
|
-
}
|
|
404
|
-
await registry.crawl(crawlOptions);
|
|
405
|
-
return selected;
|
|
470
|
+
// Read off what the crawl RETURNED, so a crawl that declined the source
|
|
471
|
+
// reports the walk it actually took — with no enumerator.
|
|
472
|
+
return (await registry.crawl(crawlOptions)).population;
|
|
406
473
|
});
|
|
407
474
|
return {
|
|
408
475
|
scanPath: pathArg ?? projectRoot,
|
|
@@ -410,8 +477,7 @@ export async function loadResourcesWithConfig(pathArg, projectRoot, logger) {
|
|
|
410
477
|
config,
|
|
411
478
|
registry,
|
|
412
479
|
gitTracker,
|
|
413
|
-
|
|
414
|
-
extentSource,
|
|
480
|
+
population,
|
|
415
481
|
};
|
|
416
482
|
}
|
|
417
483
|
//# sourceMappingURL=resource-loader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-loader.js","sourceRoot":"","sources":["../../src/utils/resource-loader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"resource-loader.js","sourceRoot":"","sources":["../../src/utils/resource-loader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,GASjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAE5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;A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MAAM,gBAAgB,GAAG,mBAAmB,CAAC,WAAW,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAC7E,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CAAC;QACnD,IAAI,gBAAgB,EAAE,CAAC;YACrB,YAAY,GAAG,EAAE,GAAG,YAAY,EAAE,gBAAgB,EAAE,CAAC;QACvD,CAAC;QAED,wEAAwE;QACxE,0DAA0D;QAC1D,OAAO,CAAC,MAAM,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,QAAQ,EAAE,OAAO,IAAI,WAAW;QAChC,WAAW;QACX,MAAM;QACN,QAAQ;QACR,UAAU;QACV,UAAU;KACX,CAAC;AACJ,CAAC"}
|
|
@@ -26,27 +26,32 @@
|
|
|
26
26
|
* 1. **Code {@link RUN_INTEGRITY_CODE} — `RESOURCE_CHECK_BROKEN` — and never a
|
|
27
27
|
* sibling per site.** It is the registry's one run-integrity claim — *these
|
|
28
28
|
* assertions did not execute meaningfully, so the green means nothing* — and
|
|
29
|
-
*
|
|
30
|
-
* it non-overridable by construction. A code per site would buy a consumer
|
|
29
|
+
* it is a registered REFUSAL code, which `ValidationConfigSchema` refuses as a
|
|
30
|
+
* `severity` or `allow` key — what makes it non-overridable by construction. A code per site would buy a consumer
|
|
31
31
|
* nothing the message does not already say while adding one more thing an
|
|
32
32
|
* adopter's CI has to know to look for.
|
|
33
33
|
* 2. **Severity `error`, and not a parameter.** The one thing that must never be
|
|
34
34
|
* configurable about "the gate did not do its job" is whether it gates.
|
|
35
|
-
* 3. **Derived
|
|
36
|
-
*
|
|
37
|
-
* deriving the refusal there lands it after
|
|
38
|
-
* `applyAllowFilter` and makes "denominator zero,
|
|
39
|
-
* unrepresentable rather than merely unwritten. A pure
|
|
40
|
-
* without I/O.
|
|
41
|
-
*
|
|
42
|
-
*
|
|
35
|
+
* 3. **Derived once, in the writer, from the verb's declared denominator.**
|
|
36
|
+
* {@link withRunIntegrity} is the one function every lane's `Report` passes
|
|
37
|
+
* through on its way out, so deriving the refusal there lands it after
|
|
38
|
+
* `resolveIssueSeverity` and `applyAllowFilter` and makes "denominator zero,
|
|
39
|
+
* status clean" unrepresentable rather than merely unwritten. A pure
|
|
40
|
+
* function, unit-testable without I/O — no verb decides this at its own site.
|
|
41
|
+
* An orchestrated PHASE passes through the same function, with its verb's own
|
|
42
|
+
* declaration, before it is folded (`phaseVerdict` in `commands/phase-utils.ts`):
|
|
43
|
+
* judged on the orchestrator's sum alone, a configured phase that examined
|
|
44
|
+
* nothing was hidden by a healthy phase beside it — the tenth instance.
|
|
45
|
+
* 4. **ONE finding per run of a verb**, however many things went unmatched. The
|
|
46
|
+
* claim is about the RUN; one per argument is per-finding duplication. An
|
|
47
|
+
* orchestrator carries each phase's own, at most one per phase.
|
|
43
48
|
* 5. **The message says what did not run and what the operator can do.** It
|
|
44
49
|
* must not claim the corpus is broken — it claims the run is not a verdict.
|
|
45
50
|
* 6. **stderr may still carry a human warning; the document and the exit code
|
|
46
51
|
* must agree with it.** The human channel and the machine channel were what
|
|
47
52
|
* disagreed in every shipped instance, and only the machine channel gates.
|
|
48
53
|
*/
|
|
49
|
-
import type
|
|
54
|
+
import { type Report, type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
50
55
|
/**
|
|
51
56
|
* The code every run-integrity refusal carries.
|
|
52
57
|
*
|
|
@@ -54,8 +59,8 @@ import type { ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
|
54
59
|
* compile, a corpus with no members, a run with no rules, a run that was killed,
|
|
55
60
|
* a scan that matched no file, a walk that missed a declared plugin, a phase that
|
|
56
61
|
* found no bundle — all are the same claim to a consumer, and they need the
|
|
57
|
-
* identical non-overridability, which
|
|
58
|
-
*
|
|
62
|
+
* identical non-overridability, which the registry grants by registering it as
|
|
63
|
+
* a REFUSAL — a kind `ValidationConfigSchema` refuses as a `severity` or `allow` key.
|
|
59
64
|
*/
|
|
60
65
|
export declare const RUN_INTEGRITY_CODE = "RESOURCE_CHECK_BROKEN";
|
|
61
66
|
/**
|
|
@@ -70,26 +75,54 @@ export declare const RUN_INTEGRITY_CODE = "RESOURCE_CHECK_BROKEN";
|
|
|
70
75
|
*/
|
|
71
76
|
export declare function runIntegrityFinding(message: string): ValidationIssue;
|
|
72
77
|
/**
|
|
73
|
-
*
|
|
78
|
+
* What a report's `examined` counts, and what an operator should check when
|
|
79
|
+
* it is zero — the two facts only the verb knows, so {@link withRunIntegrity}
|
|
80
|
+
* can name them without asking WHY the denominator is zero — an absent config
|
|
81
|
+
* block, a filter that matched nothing and a typo'd glob all arrive as zero.
|
|
82
|
+
*/
|
|
83
|
+
export interface ExaminedDeclaration {
|
|
84
|
+
/** What `examined` counts, plural noun: 'files', 'skills', 'rows of the population', 'search roots'. */
|
|
85
|
+
readonly unit: string;
|
|
86
|
+
/** What an operator should check when it is zero — the site-specific remedy. */
|
|
87
|
+
readonly whenZero: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The single point every completed {@link Report} passes through on its way
|
|
91
|
+
* out: adds the one `RESOURCE_CHECK_BROKEN` refusal-as-finding when `examined`
|
|
92
|
+
* is zero, so no verb decides this at its own site (invariant 3 above).
|
|
74
93
|
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
94
|
+
* Stands down (returns `report` unchanged) in three cases: `status: 'error'`
|
|
95
|
+
* — a run that did not finish is not a run that examined nothing, and its own
|
|
96
|
+
* `error` already carries the refusal; `examined > 0` — the positive control;
|
|
97
|
+
* and a findings list that already carries a refusal-kind code (invariant 4 —
|
|
98
|
+
* one refusal per run, whichever the site already published wins over the
|
|
99
|
+
* generic one).
|
|
80
100
|
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
|
|
85
|
-
|
|
101
|
+
* @param report - The completed or failed report, as the verb built it
|
|
102
|
+
* @param examined - What `examined` counts and the remedy for zero
|
|
103
|
+
* @returns `report` unchanged, or rebuilt with the one refusal finding added
|
|
104
|
+
*/
|
|
105
|
+
export declare function withRunIntegrity<T>(report: Report<T>, examined: ExaminedDeclaration): Report<T>;
|
|
106
|
+
/**
|
|
107
|
+
* The success line a verb may print over its run — invariant 6's stderr half,
|
|
108
|
+
* and the one rule for it: `success` when the run examined something, a
|
|
109
|
+
* not-a-verdict line otherwise. Every shipped instance of the class printed a
|
|
110
|
+
* green line directly above the refusal its own document carried.
|
|
111
|
+
*
|
|
112
|
+
* @param examined - The run's `examined`, as its report counts it
|
|
113
|
+
* @param success - The verb's own success line; its leading whitespace is kept
|
|
114
|
+
* @returns The line to print
|
|
115
|
+
*/
|
|
116
|
+
export declare function verdictBanner(examined: number, success: string): string;
|
|
117
|
+
/**
|
|
118
|
+
* The human half of a run-integrity refusal: each `RESOURCE_CHECK_BROKEN`
|
|
119
|
+
* finding's message, on stderr. It decides nothing — the document is what
|
|
120
|
+
* gates — but a refusal only in the document never reached the operator
|
|
121
|
+
* reading the terminal.
|
|
86
122
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* @param message - The site's own account of what did not run and what to do;
|
|
91
|
-
* evaluated lazily so a populated run pays nothing for it
|
|
92
|
-
* @returns The one finding, or nothing when at least one thing was checked
|
|
123
|
+
* A command lane calls it with the writer's published report when the writer
|
|
124
|
+
* ADDED the refusal (`publishedReport(verb, report) !== report`); a phase warns
|
|
125
|
+
* its own site-specific refusal where every lane sees it.
|
|
93
126
|
*/
|
|
94
|
-
export declare function
|
|
127
|
+
export declare function warnRunIntegrity(report: Report<unknown>): void;
|
|
95
128
|
//# sourceMappingURL=run-integrity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-integrity.d.ts","sourceRoot":"","sources":["../../src/utils/run-integrity.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"run-integrity.d.ts","sourceRoot":"","sources":["../../src/utils/run-integrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,OAAO,EAML,KAAK,MAAM,EACX,KAAK,eAAe,EACrB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,0BAAgD,CAAC;AAEhF;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAEpE;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,wGAAwG;IACxG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,mBAAmB,GAAG,MAAM,CAAC,CAAC,CAAC,CAkB/F;AAKD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,CAI9D"}
|