@vibe-agent-toolkit/cli 0.2.0-rc.10 → 0.2.0-rc.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/bin/supervise-cli.d.ts +45 -0
- package/dist/bin/supervise-cli.d.ts.map +1 -0
- package/dist/bin/supervise-cli.js +83 -0
- package/dist/bin/supervise-cli.js.map +1 -0
- package/dist/bin/vat +94 -40
- package/dist/bin/vat.d.ts +15 -4
- package/dist/bin/vat.d.ts.map +1 -1
- package/dist/bin/vat.js +94 -40
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +21 -29
- package/dist/bin.js.map +1 -1
- package/dist/command-tree.d.ts +45 -0
- package/dist/command-tree.d.ts.map +1 -0
- package/dist/command-tree.js +60 -0
- package/dist/command-tree.js.map +1 -0
- package/dist/commands/agent/build-schema.d.ts +100 -0
- package/dist/commands/agent/build-schema.d.ts.map +1 -0
- package/dist/commands/agent/build-schema.js +32 -0
- package/dist/commands/agent/build-schema.js.map +1 -0
- package/dist/commands/agent/build.d.ts +1 -0
- package/dist/commands/agent/build.d.ts.map +1 -1
- package/dist/commands/agent/build.js +63 -33
- package/dist/commands/agent/build.js.map +1 -1
- package/dist/commands/agent/import-schema.d.ts +75 -0
- package/dist/commands/agent/import-schema.d.ts.map +1 -0
- package/dist/commands/agent/import-schema.js +25 -0
- package/dist/commands/agent/import-schema.js.map +1 -0
- package/dist/commands/agent/import.d.ts.map +1 -1
- package/dist/commands/agent/import.js +33 -27
- package/dist/commands/agent/import.js.map +1 -1
- package/dist/commands/agent/index.d.ts.map +1 -1
- package/dist/commands/agent/index.js +132 -37
- package/dist/commands/agent/index.js.map +1 -1
- package/dist/commands/agent/install-path.d.ts.map +1 -1
- package/dist/commands/agent/install-path.js +2 -1
- package/dist/commands/agent/install-path.js.map +1 -1
- package/dist/commands/agent/install-schema.d.ts +89 -0
- package/dist/commands/agent/install-schema.d.ts.map +1 -0
- package/dist/commands/agent/install-schema.js +29 -0
- package/dist/commands/agent/install-schema.js.map +1 -0
- package/dist/commands/agent/install.d.ts +7 -1
- package/dist/commands/agent/install.d.ts.map +1 -1
- package/dist/commands/agent/install.js +78 -108
- package/dist/commands/agent/install.js.map +1 -1
- package/dist/commands/agent/installed-schema.d.ts +140 -0
- package/dist/commands/agent/installed-schema.d.ts.map +1 -0
- package/dist/commands/agent/installed-schema.js +36 -0
- package/dist/commands/agent/installed-schema.js.map +1 -0
- package/dist/commands/agent/installed.d.ts +1 -1
- package/dist/commands/agent/installed.d.ts.map +1 -1
- package/dist/commands/agent/installed.js +104 -75
- package/dist/commands/agent/installed.js.map +1 -1
- package/dist/commands/agent/list-schema.d.ts +128 -0
- package/dist/commands/agent/list-schema.d.ts.map +1 -0
- package/dist/commands/agent/list-schema.js +34 -0
- package/dist/commands/agent/list-schema.js.map +1 -0
- package/dist/commands/agent/list.d.ts +4 -3
- package/dist/commands/agent/list.d.ts.map +1 -1
- package/dist/commands/agent/list.js +50 -37
- package/dist/commands/agent/list.js.map +1 -1
- package/dist/commands/agent/run.d.ts +3 -0
- package/dist/commands/agent/run.d.ts.map +1 -1
- package/dist/commands/agent/run.js +8 -3
- package/dist/commands/agent/run.js.map +1 -1
- package/dist/commands/agent/uninstall-schema.d.ts +89 -0
- package/dist/commands/agent/uninstall-schema.d.ts.map +1 -0
- package/dist/commands/agent/uninstall-schema.js +29 -0
- package/dist/commands/agent/uninstall-schema.js.map +1 -0
- package/dist/commands/agent/uninstall.d.ts +5 -1
- package/dist/commands/agent/uninstall.d.ts.map +1 -1
- package/dist/commands/agent/uninstall.js +50 -38
- package/dist/commands/agent/uninstall.js.map +1 -1
- package/dist/commands/agent/validate-schema.d.ts +129 -0
- package/dist/commands/agent/validate-schema.d.ts.map +1 -0
- package/dist/commands/agent/validate-schema.js +35 -0
- package/dist/commands/agent/validate-schema.js.map +1 -0
- package/dist/commands/agent/validate.d.ts +6 -0
- package/dist/commands/agent/validate.d.ts.map +1 -1
- package/dist/commands/agent/validate.js +64 -36
- package/dist/commands/agent/validate.js.map +1 -1
- package/dist/commands/ard/emit-schema.d.ts +108 -0
- package/dist/commands/ard/emit-schema.d.ts.map +1 -0
- package/dist/commands/ard/emit-schema.js +37 -0
- package/dist/commands/ard/emit-schema.js.map +1 -0
- package/dist/commands/ard/emit.d.ts +31 -63
- package/dist/commands/ard/emit.d.ts.map +1 -1
- package/dist/commands/ard/emit.js +124 -68
- package/dist/commands/ard/emit.js.map +1 -1
- package/dist/commands/ard/index.d.ts.map +1 -1
- package/dist/commands/ard/index.js +17 -10
- package/dist/commands/ard/index.js.map +1 -1
- package/dist/commands/audit/compat-lane-findings.d.ts +65 -0
- package/dist/commands/audit/compat-lane-findings.d.ts.map +1 -0
- package/dist/commands/audit/compat-lane-findings.js +72 -0
- package/dist/commands/audit/compat-lane-findings.js.map +1 -0
- package/dist/commands/audit/distributed-tree.d.ts +2 -2
- package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
- package/dist/commands/audit/distributed-tree.js +23 -12
- package/dist/commands/audit/distributed-tree.js.map +1 -1
- package/dist/commands/audit/git-url-clone.d.ts +15 -7
- package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
- package/dist/commands/audit/git-url-clone.js +85 -42
- package/dist/commands/audit/git-url-clone.js.map +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts +28 -4
- package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
- package/dist/commands/audit/hierarchical-output.js +44 -27
- package/dist/commands/audit/hierarchical-output.js.map +1 -1
- package/dist/commands/audit/scan-population.d.ts.map +1 -1
- package/dist/commands/audit/scan-population.js +2 -1
- package/dist/commands/audit/scan-population.js.map +1 -1
- package/dist/commands/audit-schema.d.ts +1247 -0
- package/dist/commands/audit-schema.d.ts.map +1 -0
- package/dist/commands/audit-schema.js +139 -0
- package/dist/commands/audit-schema.js.map +1 -0
- package/dist/commands/audit-settings-schema.d.ts +417 -0
- package/dist/commands/audit-settings-schema.d.ts.map +1 -0
- package/dist/commands/audit-settings-schema.js +77 -0
- package/dist/commands/audit-settings-schema.js.map +1 -0
- package/dist/commands/audit-settings.d.ts +28 -9
- package/dist/commands/audit-settings.d.ts.map +1 -1
- package/dist/commands/audit-settings.js +215 -151
- package/dist/commands/audit-settings.js.map +1 -1
- package/dist/commands/audit.d.ts +72 -33
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +415 -397
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts +61 -4
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +176 -190
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cache/clear-schema.d.ts +111 -0
- package/dist/commands/cache/clear-schema.d.ts.map +1 -0
- package/dist/commands/cache/clear-schema.js +37 -0
- package/dist/commands/cache/clear-schema.js.map +1 -0
- package/dist/commands/cache/clear.d.ts +28 -26
- package/dist/commands/cache/clear.d.ts.map +1 -1
- package/dist/commands/cache/clear.js +108 -103
- package/dist/commands/cache/clear.js.map +1 -1
- package/dist/commands/cache/index.d.ts.map +1 -1
- package/dist/commands/cache/index.js +13 -7
- package/dist/commands/cache/index.js.map +1 -1
- package/dist/commands/claude/claude-config.d.ts +23 -6
- package/dist/commands/claude/claude-config.d.ts.map +1 -1
- package/dist/commands/claude/claude-config.js +29 -15
- package/dist/commands/claude/claude-config.js.map +1 -1
- package/dist/commands/claude/context.d.ts +87 -2
- package/dist/commands/claude/context.d.ts.map +1 -1
- package/dist/commands/claude/context.js +116 -57
- package/dist/commands/claude/context.js.map +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.js +2 -2
- package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts +14 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.js +135 -68
- package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.d.ts +3 -5
- package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.js +16 -7
- package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/publish-schema.d.ts +137 -0
- package/dist/commands/claude/marketplace/publish-schema.d.ts.map +1 -0
- package/dist/commands/claude/marketplace/publish-schema.js +32 -0
- package/dist/commands/claude/marketplace/publish-schema.js.map +1 -0
- package/dist/commands/claude/marketplace/publish-tree.d.ts +6 -0
- package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish-tree.js +75 -17
- package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
- package/dist/commands/claude/marketplace/publish.d.ts +27 -0
- package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish.js +84 -50
- package/dist/commands/claude/marketplace/publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate-schema.d.ts +362 -0
- package/dist/commands/claude/marketplace/validate-schema.d.ts.map +1 -0
- package/dist/commands/claude/marketplace/validate-schema.js +67 -0
- package/dist/commands/claude/marketplace/validate-schema.js.map +1 -0
- package/dist/commands/claude/marketplace/validate.d.ts +40 -53
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +358 -214
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/org/api-keys.d.ts +3 -0
- package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
- package/dist/commands/claude/org/api-keys.js +4 -5
- package/dist/commands/claude/org/api-keys.js.map +1 -1
- package/dist/commands/claude/org/code-analytics.js +1 -1
- package/dist/commands/claude/org/code-analytics.js.map +1 -1
- package/dist/commands/claude/org/cost.d.ts.map +1 -1
- package/dist/commands/claude/org/cost.js +11 -33
- package/dist/commands/claude/org/cost.js.map +1 -1
- package/dist/commands/claude/org/helpers.d.ts +40 -27
- package/dist/commands/claude/org/helpers.d.ts.map +1 -1
- package/dist/commands/claude/org/helpers.js +61 -66
- package/dist/commands/claude/org/helpers.js.map +1 -1
- package/dist/commands/claude/org/index.d.ts.map +1 -1
- package/dist/commands/claude/org/index.js +10 -4
- package/dist/commands/claude/org/index.js.map +1 -1
- package/dist/commands/claude/org/info.d.ts.map +1 -1
- package/dist/commands/claude/org/info.js +2 -3
- package/dist/commands/claude/org/info.js.map +1 -1
- package/dist/commands/claude/org/invites.d.ts +3 -0
- package/dist/commands/claude/org/invites.d.ts.map +1 -1
- package/dist/commands/claude/org/invites.js +5 -7
- package/dist/commands/claude/org/invites.js.map +1 -1
- package/dist/commands/claude/org/skills.d.ts +76 -21
- package/dist/commands/claude/org/skills.d.ts.map +1 -1
- package/dist/commands/claude/org/skills.js +273 -246
- package/dist/commands/claude/org/skills.js.map +1 -1
- package/dist/commands/claude/org/stubs-schema.d.ts +56 -0
- package/dist/commands/claude/org/stubs-schema.d.ts.map +1 -0
- package/dist/commands/claude/org/stubs-schema.js +23 -0
- package/dist/commands/claude/org/stubs-schema.js.map +1 -0
- package/dist/commands/claude/org/stubs.d.ts +8 -3
- package/dist/commands/claude/org/stubs.d.ts.map +1 -1
- package/dist/commands/claude/org/stubs.js +9 -9
- package/dist/commands/claude/org/stubs.js.map +1 -1
- package/dist/commands/claude/org/usage.d.ts.map +1 -1
- package/dist/commands/claude/org/usage.js +1 -2
- package/dist/commands/claude/org/usage.js.map +1 -1
- package/dist/commands/claude/org/users.d.ts +3 -0
- package/dist/commands/claude/org/users.d.ts.map +1 -1
- package/dist/commands/claude/org/users.js +6 -8
- package/dist/commands/claude/org/users.js.map +1 -1
- package/dist/commands/claude/org/workspaces.d.ts +3 -0
- package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
- package/dist/commands/claude/org/workspaces.js +10 -15
- package/dist/commands/claude/org/workspaces.js.map +1 -1
- package/dist/commands/claude/plugin/build-schema.d.ts +642 -0
- package/dist/commands/claude/plugin/build-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/build-schema.js +51 -0
- package/dist/commands/claude/plugin/build-schema.js.map +1 -0
- package/dist/commands/claude/plugin/build.d.ts +220 -45
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +466 -249
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/helpers.d.ts +186 -24
- package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
- package/dist/commands/claude/plugin/helpers.js +110 -68
- package/dist/commands/claude/plugin/helpers.js.map +1 -1
- package/dist/commands/claude/plugin/install-schema.d.ts +144 -0
- package/dist/commands/claude/plugin/install-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/install-schema.js +36 -0
- package/dist/commands/claude/plugin/install-schema.js.map +1 -0
- package/dist/commands/claude/plugin/install.d.ts +191 -11
- package/dist/commands/claude/plugin/install.d.ts.map +1 -1
- package/dist/commands/claude/plugin/install.js +688 -628
- package/dist/commands/claude/plugin/install.js.map +1 -1
- package/dist/commands/claude/plugin/kept-findings.d.ts +19 -0
- package/dist/commands/claude/plugin/kept-findings.d.ts.map +1 -0
- package/dist/commands/claude/plugin/kept-findings.js +24 -0
- package/dist/commands/claude/plugin/kept-findings.js.map +1 -0
- package/dist/commands/claude/plugin/list-schema.d.ts +223 -0
- package/dist/commands/claude/plugin/list-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/list-schema.js +34 -0
- package/dist/commands/claude/plugin/list-schema.js.map +1 -0
- package/dist/commands/claude/plugin/list.d.ts +18 -0
- package/dist/commands/claude/plugin/list.d.ts.map +1 -1
- package/dist/commands/claude/plugin/list.js +53 -45
- package/dist/commands/claude/plugin/list.js.map +1 -1
- package/dist/commands/claude/plugin/npm-pack.d.ts +15 -0
- package/dist/commands/claude/plugin/npm-pack.d.ts.map +1 -0
- package/dist/commands/claude/plugin/npm-pack.js +39 -0
- package/dist/commands/claude/plugin/npm-pack.js.map +1 -0
- package/dist/commands/claude/plugin/plugin-changelog.d.ts +5 -1
- package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-changelog.js +9 -5
- package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.d.ts +21 -2
- package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.js +65 -32
- package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.d.ts +13 -0
- package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.js +64 -16
- package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +63 -37
- package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
- package/dist/commands/claude/plugin/uninstall-schema.d.ts +112 -0
- package/dist/commands/claude/plugin/uninstall-schema.d.ts.map +1 -0
- package/dist/commands/claude/plugin/uninstall-schema.js +28 -0
- package/dist/commands/claude/plugin/uninstall-schema.js.map +1 -0
- package/dist/commands/claude/plugin/uninstall.d.ts +57 -0
- package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
- package/dist/commands/claude/plugin/uninstall.js +176 -64
- package/dist/commands/claude/plugin/uninstall.js.map +1 -1
- package/dist/commands/consistency-check.d.ts.map +1 -1
- package/dist/commands/consistency-check.js +8 -6
- package/dist/commands/consistency-check.js.map +1 -1
- package/dist/commands/corpus/index.d.ts.map +1 -1
- package/dist/commands/corpus/index.js +26 -10
- package/dist/commands/corpus/index.js.map +1 -1
- package/dist/commands/corpus/report.d.ts +34 -16
- package/dist/commands/corpus/report.d.ts.map +1 -1
- package/dist/commands/corpus/report.js +36 -18
- package/dist/commands/corpus/report.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts +25 -20
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +123 -67
- package/dist/commands/corpus/runner.js.map +1 -1
- package/dist/commands/corpus/scan-schema.d.ts +127 -0
- package/dist/commands/corpus/scan-schema.d.ts.map +1 -0
- package/dist/commands/corpus/scan-schema.js +31 -0
- package/dist/commands/corpus/scan-schema.js.map +1 -0
- package/dist/commands/corpus/scan.d.ts +31 -0
- package/dist/commands/corpus/scan.d.ts.map +1 -1
- package/dist/commands/corpus/scan.js +124 -50
- package/dist/commands/corpus/scan.js.map +1 -1
- package/dist/commands/corpus/seed.d.ts +11 -8
- package/dist/commands/corpus/seed.d.ts.map +1 -1
- package/dist/commands/corpus/seed.js +29 -11
- package/dist/commands/corpus/seed.js.map +1 -1
- package/dist/commands/doctor-render.d.ts +52 -0
- package/dist/commands/doctor-render.d.ts.map +1 -0
- package/dist/commands/doctor-render.js +110 -0
- package/dist/commands/doctor-render.js.map +1 -0
- package/dist/commands/doctor-schema.d.ts +191 -0
- package/dist/commands/doctor-schema.d.ts.map +1 -0
- package/dist/commands/doctor-schema.js +44 -0
- package/dist/commands/doctor-schema.js.map +1 -0
- package/dist/commands/doctor.d.ts +7 -62
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +126 -165
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/inventory-schema.d.ts +7297 -0
- package/dist/commands/inventory-schema.d.ts.map +1 -0
- package/dist/commands/inventory-schema.js +28 -0
- package/dist/commands/inventory-schema.js.map +1 -0
- package/dist/commands/inventory.d.ts +1 -1
- package/dist/commands/inventory.d.ts.map +1 -1
- package/dist/commands/inventory.js +89 -41
- package/dist/commands/inventory.js.map +1 -1
- package/dist/commands/mcp/index.d.ts.map +1 -1
- package/dist/commands/mcp/index.js +15 -0
- package/dist/commands/mcp/index.js.map +1 -1
- package/dist/commands/mcp/list-collections-schema.d.ts +101 -0
- package/dist/commands/mcp/list-collections-schema.d.ts.map +1 -0
- package/dist/commands/mcp/list-collections-schema.js +22 -0
- package/dist/commands/mcp/list-collections-schema.js.map +1 -0
- package/dist/commands/mcp/list-collections.d.ts +1 -1
- package/dist/commands/mcp/list-collections.d.ts.map +1 -1
- package/dist/commands/mcp/list-collections.js +19 -17
- package/dist/commands/mcp/list-collections.js.map +1 -1
- package/dist/commands/mcp/serve.d.ts +5 -0
- package/dist/commands/mcp/serve.d.ts.map +1 -1
- package/dist/commands/mcp/serve.js +29 -15
- package/dist/commands/mcp/serve.js.map +1 -1
- package/dist/commands/okf/index.d.ts.map +1 -1
- package/dist/commands/okf/index.js +13 -10
- package/dist/commands/okf/index.js.map +1 -1
- package/dist/commands/okf/validate-schema.d.ts +171 -0
- package/dist/commands/okf/validate-schema.d.ts.map +1 -0
- package/dist/commands/okf/validate-schema.js +44 -0
- package/dist/commands/okf/validate-schema.js.map +1 -0
- package/dist/commands/okf/validate.d.ts +16 -145
- package/dist/commands/okf/validate.d.ts.map +1 -1
- package/dist/commands/okf/validate.js +63 -52
- package/dist/commands/okf/validate.js.map +1 -1
- package/dist/commands/orchestrator-schema.d.ts +419 -0
- package/dist/commands/orchestrator-schema.d.ts.map +1 -0
- package/dist/commands/orchestrator-schema.js +91 -0
- package/dist/commands/orchestrator-schema.js.map +1 -0
- package/dist/commands/phase-utils.d.ts +188 -220
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +210 -258
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/positional-args.d.ts +13 -11
- package/dist/commands/positional-args.d.ts.map +1 -1
- package/dist/commands/positional-args.js +16 -15
- package/dist/commands/positional-args.js.map +1 -1
- package/dist/commands/rag/admin-schema.d.ts +152 -0
- package/dist/commands/rag/admin-schema.d.ts.map +1 -0
- package/dist/commands/rag/admin-schema.js +31 -0
- package/dist/commands/rag/admin-schema.js.map +1 -0
- package/dist/commands/rag/clear-command.d.ts.map +1 -1
- package/dist/commands/rag/clear-command.js +30 -15
- package/dist/commands/rag/clear-command.js.map +1 -1
- package/dist/commands/rag/command-helpers.d.ts +31 -7
- package/dist/commands/rag/command-helpers.d.ts.map +1 -1
- package/dist/commands/rag/command-helpers.js +41 -21
- package/dist/commands/rag/command-helpers.js.map +1 -1
- package/dist/commands/rag/index-command.d.ts +37 -48
- package/dist/commands/rag/index-command.d.ts.map +1 -1
- package/dist/commands/rag/index-command.js +80 -65
- package/dist/commands/rag/index-command.js.map +1 -1
- package/dist/commands/rag/index-schema.d.ts +107 -0
- package/dist/commands/rag/index-schema.d.ts.map +1 -0
- package/dist/commands/rag/index-schema.js +34 -0
- package/dist/commands/rag/index-schema.js.map +1 -0
- package/dist/commands/rag/index.d.ts.map +1 -1
- package/dist/commands/rag/index.js +88 -41
- package/dist/commands/rag/index.js.map +1 -1
- package/dist/commands/rag/query-command.d.ts +18 -4
- package/dist/commands/rag/query-command.d.ts.map +1 -1
- package/dist/commands/rag/query-command.js +42 -27
- package/dist/commands/rag/query-command.js.map +1 -1
- package/dist/commands/rag/query-schema.d.ts +363 -0
- package/dist/commands/rag/query-schema.d.ts.map +1 -0
- package/dist/commands/rag/query-schema.js +59 -0
- package/dist/commands/rag/query-schema.js.map +1 -0
- package/dist/commands/rag/stats-command.d.ts.map +1 -1
- package/dist/commands/rag/stats-command.js +19 -18
- package/dist/commands/rag/stats-command.js.map +1 -1
- package/dist/commands/resources/check-progress.d.ts +79 -13
- package/dist/commands/resources/check-progress.d.ts.map +1 -1
- package/dist/commands/resources/check-progress.js +112 -11
- package/dist/commands/resources/check-progress.js.map +1 -1
- package/dist/commands/resources/check-schema.d.ts +335 -0
- package/dist/commands/resources/check-schema.d.ts.map +1 -0
- package/dist/commands/resources/check-schema.js +104 -0
- package/dist/commands/resources/check-schema.js.map +1 -0
- package/dist/commands/resources/check-supervisor.d.ts +329 -71
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -1
- package/dist/commands/resources/check-supervisor.js +507 -107
- package/dist/commands/resources/check-supervisor.js.map +1 -1
- package/dist/commands/resources/check.d.ts +88 -254
- package/dist/commands/resources/check.d.ts.map +1 -1
- package/dist/commands/resources/check.js +537 -310
- package/dist/commands/resources/check.js.map +1 -1
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +189 -103
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/query-schema.d.ts +188 -0
- package/dist/commands/resources/query-schema.d.ts.map +1 -0
- package/dist/commands/resources/query-schema.js +48 -0
- package/dist/commands/resources/query-schema.js.map +1 -0
- package/dist/commands/resources/query.d.ts +18 -13
- package/dist/commands/resources/query.d.ts.map +1 -1
- package/dist/commands/resources/query.js +61 -49
- package/dist/commands/resources/query.js.map +1 -1
- package/dist/commands/resources/scan-schema.d.ts +195 -0
- package/dist/commands/resources/scan-schema.d.ts.map +1 -0
- package/dist/commands/resources/scan-schema.js +53 -0
- package/dist/commands/resources/scan-schema.js.map +1 -0
- package/dist/commands/resources/scan.d.ts +26 -3
- package/dist/commands/resources/scan.d.ts.map +1 -1
- package/dist/commands/resources/scan.js +51 -53
- package/dist/commands/resources/scan.js.map +1 -1
- package/dist/commands/resources/validate-schema.d.ts +326 -0
- package/dist/commands/resources/validate-schema.d.ts.map +1 -0
- package/dist/commands/resources/validate-schema.js +60 -0
- package/dist/commands/resources/validate-schema.js.map +1 -0
- package/dist/commands/resources/validate.d.ts +45 -169
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +221 -485
- package/dist/commands/resources/validate.js.map +1 -1
- package/dist/commands/skill/review-checklist.d.ts.map +1 -1
- package/dist/commands/skill/review-checklist.js +0 -1
- package/dist/commands/skill/review-checklist.js.map +1 -1
- package/dist/commands/skill/review-schema.d.ts +278 -0
- package/dist/commands/skill/review-schema.d.ts.map +1 -0
- package/dist/commands/skill/review-schema.js +46 -0
- package/dist/commands/skill/review-schema.js.map +1 -0
- package/dist/commands/skill/review.d.ts +8 -234
- package/dist/commands/skill/review.d.ts.map +1 -1
- package/dist/commands/skill/review.js +54 -77
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/auth-flags.d.ts +3 -0
- package/dist/commands/skill/test/auth-flags.d.ts.map +1 -1
- package/dist/commands/skill/test/auth-flags.js +6 -2
- package/dist/commands/skill/test/auth-flags.js.map +1 -1
- package/dist/commands/skill/test/configure-schema.d.ts +67 -0
- package/dist/commands/skill/test/configure-schema.d.ts.map +1 -0
- package/dist/commands/skill/test/configure-schema.js +27 -0
- package/dist/commands/skill/test/configure-schema.js.map +1 -0
- package/dist/commands/skill/test/configure.d.ts +12 -5
- package/dist/commands/skill/test/configure.d.ts.map +1 -1
- package/dist/commands/skill/test/configure.js +101 -31
- package/dist/commands/skill/test/configure.js.map +1 -1
- package/dist/commands/skill/test/run-schema.d.ts +107 -0
- package/dist/commands/skill/test/run-schema.d.ts.map +1 -0
- package/dist/commands/skill/test/run-schema.js +36 -0
- package/dist/commands/skill/test/run-schema.js.map +1 -0
- package/dist/commands/skill/test/run.d.ts +3 -2
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +316 -155
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build-schema.d.ts +199 -0
- package/dist/commands/skills/build-schema.d.ts.map +1 -0
- package/dist/commands/skills/build-schema.js +55 -0
- package/dist/commands/skills/build-schema.js.map +1 -0
- package/dist/commands/skills/build.d.ts +95 -298
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +415 -818
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/command-helpers.d.ts +5 -11
- package/dist/commands/skills/command-helpers.d.ts.map +1 -1
- package/dist/commands/skills/command-helpers.js +7 -17
- package/dist/commands/skills/command-helpers.js.map +1 -1
- package/dist/commands/skills/index.js +12 -6
- package/dist/commands/skills/index.js.map +1 -1
- package/dist/commands/skills/install-schema.d.ts +153 -0
- package/dist/commands/skills/install-schema.d.ts.map +1 -0
- package/dist/commands/skills/install-schema.js +44 -0
- package/dist/commands/skills/install-schema.js.map +1 -0
- package/dist/commands/skills/install.d.ts +76 -8
- package/dist/commands/skills/install.d.ts.map +1 -1
- package/dist/commands/skills/install.js +230 -194
- package/dist/commands/skills/install.js.map +1 -1
- package/dist/commands/skills/list-schema.d.ts +145 -0
- package/dist/commands/skills/list-schema.d.ts.map +1 -0
- package/dist/commands/skills/list-schema.js +37 -0
- package/dist/commands/skills/list-schema.js.map +1 -0
- package/dist/commands/skills/list.d.ts +39 -8
- package/dist/commands/skills/list.d.ts.map +1 -1
- package/dist/commands/skills/list.js +110 -122
- package/dist/commands/skills/list.js.map +1 -1
- package/dist/commands/skills/package-schema.d.ts +98 -0
- package/dist/commands/skills/package-schema.d.ts.map +1 -0
- package/dist/commands/skills/package-schema.js +32 -0
- package/dist/commands/skills/package-schema.js.map +1 -0
- package/dist/commands/skills/package.d.ts +85 -14
- package/dist/commands/skills/package.d.ts.map +1 -1
- package/dist/commands/skills/package.js +288 -207
- package/dist/commands/skills/package.js.map +1 -1
- package/dist/commands/skills/scope-guard.d.ts +27 -20
- package/dist/commands/skills/scope-guard.d.ts.map +1 -1
- package/dist/commands/skills/scope-guard.js +43 -28
- package/dist/commands/skills/scope-guard.js.map +1 -1
- package/dist/commands/skills/skill-discovery.d.ts +1 -1
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +40 -19
- package/dist/commands/skills/skill-discovery.js.map +1 -1
- package/dist/commands/skills/source-resolvers.d.ts +58 -8
- package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
- package/dist/commands/skills/source-resolvers.js +113 -38
- package/dist/commands/skills/source-resolvers.js.map +1 -1
- package/dist/commands/skills/validate-command.d.ts.map +1 -1
- package/dist/commands/skills/validate-command.js +31 -51
- package/dist/commands/skills/validate-command.js.map +1 -1
- package/dist/commands/skills/validate-schema.d.ts +199 -0
- package/dist/commands/skills/validate-schema.d.ts.map +1 -0
- package/dist/commands/skills/validate-schema.js +44 -0
- package/dist/commands/skills/validate-schema.js.map +1 -0
- package/dist/commands/skills/validate.d.ts +100 -136
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +257 -343
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts +17 -5
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +139 -94
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +121 -110
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +230 -294
- package/dist/commands/verify.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/report-schemas.d.ts +12398 -35
- package/dist/report-schemas.d.ts.map +1 -1
- package/dist/report-schemas.js +624 -66
- package/dist/report-schemas.js.map +1 -1
- package/dist/skill-resolution/packaging-config.js +2 -2
- package/dist/skill-resolution/packaging-config.js.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.js +20 -13
- package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
- package/dist/utils/agent-discovery.d.ts +34 -1
- package/dist/utils/agent-discovery.d.ts.map +1 -1
- package/dist/utils/agent-discovery.js +80 -38
- package/dist/utils/agent-discovery.js.map +1 -1
- package/dist/utils/claude-context-lens.d.ts +13 -6
- package/dist/utils/claude-context-lens.d.ts.map +1 -1
- package/dist/utils/claude-context-lens.js +11 -12
- package/dist/utils/claude-context-lens.js.map +1 -1
- package/dist/utils/command-error-codes.d.ts +12 -0
- package/dist/utils/command-error-codes.d.ts.map +1 -0
- package/dist/utils/command-error-codes.js +12 -0
- package/dist/utils/command-error-codes.js.map +1 -0
- package/dist/utils/command-refusal.d.ts +58 -0
- package/dist/utils/command-refusal.d.ts.map +1 -0
- package/dist/utils/command-refusal.js +170 -0
- package/dist/utils/command-refusal.js.map +1 -0
- package/dist/utils/commander-ending.d.ts +40 -0
- package/dist/utils/commander-ending.d.ts.map +1 -0
- package/dist/utils/commander-ending.js +42 -0
- package/dist/utils/commander-ending.js.map +1 -0
- package/dist/utils/config-loader.d.ts +13 -8
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js +84 -45
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/corpus-target.d.ts +1 -1
- package/dist/utils/corpus-target.d.ts.map +1 -1
- package/dist/utils/corpus-target.js +44 -5
- package/dist/utils/corpus-target.js.map +1 -1
- package/dist/utils/debug-diagnostics.d.ts +18 -0
- package/dist/utils/debug-diagnostics.d.ts.map +1 -0
- package/dist/utils/debug-diagnostics.js +23 -0
- package/dist/utils/debug-diagnostics.js.map +1 -0
- package/dist/utils/document-writer.d.ts +191 -0
- package/dist/utils/document-writer.d.ts.map +1 -0
- package/dist/utils/document-writer.js +319 -0
- package/dist/utils/document-writer.js.map +1 -0
- package/dist/utils/help-loader.d.ts +2 -2
- package/dist/utils/help-loader.js +2 -2
- package/dist/utils/install-plan.d.ts +99 -0
- package/dist/utils/install-plan.d.ts.map +1 -0
- package/dist/utils/install-plan.js +146 -0
- package/dist/utils/install-plan.js.map +1 -0
- package/dist/utils/issue-anchor.d.ts +1 -1
- package/dist/utils/issue-anchor.d.ts.map +1 -1
- package/dist/utils/issue-anchor.js.map +1 -1
- package/dist/utils/issue-rendering.d.ts +8 -3
- package/dist/utils/issue-rendering.d.ts.map +1 -1
- package/dist/utils/issue-rendering.js +4 -0
- package/dist/utils/issue-rendering.js.map +1 -1
- package/dist/utils/lens-population.d.ts +20 -0
- package/dist/utils/lens-population.d.ts.map +1 -0
- package/dist/utils/lens-population.js +15 -0
- package/dist/utils/lens-population.js.map +1 -0
- package/dist/utils/marketplace-io.d.ts +63 -0
- package/dist/utils/marketplace-io.d.ts.map +1 -0
- package/dist/utils/marketplace-io.js +63 -0
- package/dist/utils/marketplace-io.js.map +1 -0
- package/dist/utils/operator-notices.d.ts +97 -0
- package/dist/utils/operator-notices.d.ts.map +1 -0
- package/dist/utils/operator-notices.js +115 -0
- package/dist/utils/operator-notices.js.map +1 -0
- package/dist/utils/optional-backend.d.ts +18 -15
- package/dist/utils/optional-backend.d.ts.map +1 -1
- package/dist/utils/optional-backend.js +22 -33
- package/dist/utils/optional-backend.js.map +1 -1
- package/dist/utils/output.d.ts +5 -43
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +8 -63
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/package-json.d.ts +3 -4
- package/dist/utils/package-json.d.ts.map +1 -1
- package/dist/utils/package-json.js +8 -8
- package/dist/utils/package-json.js.map +1 -1
- package/dist/utils/population-wiring.d.ts +31 -38
- package/dist/utils/population-wiring.d.ts.map +1 -1
- package/dist/utils/population-wiring.js +38 -32
- package/dist/utils/population-wiring.js.map +1 -1
- package/dist/utils/project-root-policy.d.ts +74 -1
- package/dist/utils/project-root-policy.d.ts.map +1 -1
- package/dist/utils/project-root-policy.js +146 -8
- package/dist/utils/project-root-policy.js.map +1 -1
- package/dist/utils/projection-lenses.d.ts +25 -7
- package/dist/utils/projection-lenses.d.ts.map +1 -1
- package/dist/utils/projection-lenses.js +20 -6
- package/dist/utils/projection-lenses.js.map +1 -1
- package/dist/utils/projection-query.d.ts +18 -11
- package/dist/utils/projection-query.d.ts.map +1 -1
- package/dist/utils/projection-query.js +47 -28
- package/dist/utils/projection-query.js.map +1 -1
- package/dist/utils/projection-store.d.ts +2 -2
- package/dist/utils/projection-store.d.ts.map +1 -1
- package/dist/utils/projection-store.js +74 -45
- package/dist/utils/projection-store.js.map +1 -1
- package/dist/utils/rag-database.d.ts +61 -0
- package/dist/utils/rag-database.d.ts.map +1 -0
- package/dist/utils/rag-database.js +178 -0
- package/dist/utils/rag-database.js.map +1 -0
- package/dist/utils/relation-limits.d.ts +7 -2
- package/dist/utils/relation-limits.d.ts.map +1 -1
- package/dist/utils/relation-limits.js +6 -1
- package/dist/utils/relation-limits.js.map +1 -1
- package/dist/utils/relativize-paths.d.ts +23 -0
- package/dist/utils/relativize-paths.d.ts.map +1 -1
- package/dist/utils/relativize-paths.js +32 -1
- package/dist/utils/relativize-paths.js.map +1 -1
- package/dist/utils/resource-loader.d.ts +78 -32
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +134 -66
- package/dist/utils/resource-loader.js.map +1 -1
- package/dist/utils/run-integrity.d.ts +64 -31
- package/dist/utils/run-integrity.d.ts.map +1 -1
- package/dist/utils/run-integrity.js +76 -35
- package/dist/utils/run-integrity.js.map +1 -1
- package/dist/utils/scope-locations.d.ts +7 -5
- package/dist/utils/scope-locations.d.ts.map +1 -1
- package/dist/utils/scope-locations.js +37 -12
- package/dist/utils/scope-locations.js.map +1 -1
- package/dist/utils/staging-dir.d.ts +7 -0
- package/dist/utils/staging-dir.d.ts.map +1 -0
- package/dist/utils/staging-dir.js +12 -0
- package/dist/utils/staging-dir.js.map +1 -0
- package/dist/utils/url-redact.d.ts +9 -0
- package/dist/utils/url-redact.d.ts.map +1 -1
- package/dist/utils/url-redact.js +13 -0
- package/dist/utils/url-redact.js.map +1 -1
- package/dist/utils/user-context-scanner.d.ts +3 -2
- package/dist/utils/user-context-scanner.d.ts.map +1 -1
- package/dist/utils/user-context-scanner.js +24 -4
- package/dist/utils/user-context-scanner.js.map +1 -1
- package/dist/utils/validate-help-files.d.ts.map +1 -1
- package/dist/utils/validate-help-files.js +8 -14
- package/dist/utils/validate-help-files.js.map +1 -1
- package/dist/utils/vat-bin-path.d.ts.map +1 -1
- package/dist/utils/vat-bin-path.js +3 -3
- package/dist/utils/vat-bin-path.js.map +1 -1
- package/dist/utils/verdict-helpers.d.ts.map +1 -1
- package/dist/utils/verdict-helpers.js +5 -5
- package/dist/utils/verdict-helpers.js.map +1 -1
- package/docs/agent.md +347 -2
- package/docs/audit.md +312 -89
- package/docs/doctor.md +65 -19
- package/docs/index.md +571 -20
- package/docs/mcp.md +64 -12
- package/docs/rag.md +176 -48
- package/docs/resources.md +257 -71
- package/docs/skill-test.md +148 -19
- package/docs/skills.md +459 -174
- package/package.json +17 -20
- package/schemas/agent-build.json +268 -0
- package/schemas/agent-import.json +252 -0
- package/schemas/agent-install.json +260 -0
- package/schemas/agent-installed.json +287 -0
- package/schemas/agent-list.json +279 -0
- package/schemas/agent-uninstall.json +260 -0
- package/schemas/agent-validate.json +279 -0
- package/schemas/ard-emit.json +228 -107
- package/schemas/audit-settings.json +472 -0
- package/schemas/audit.json +635 -0
- package/schemas/cache-clear.json +273 -0
- package/schemas/claude-marketplace-publish.json +286 -0
- package/schemas/claude-marketplace-validate.json +352 -0
- package/schemas/claude-org-not-implemented.json +239 -0
- package/schemas/claude-plugin-build.json +446 -0
- package/schemas/claude-plugin-install.json +291 -0
- package/schemas/claude-plugin-list.json +326 -0
- package/schemas/claude-plugin-uninstall.json +272 -0
- package/schemas/corpus-audit.json +635 -0
- package/schemas/corpus-scan.json +293 -0
- package/schemas/doctor.json +299 -0
- package/schemas/inventory.json +982 -0
- package/schemas/mcp-list-collections.json +268 -0
- package/schemas/okf-validate.json +224 -106
- package/schemas/orchestrator.json +299 -0
- package/schemas/rag-clear.json +253 -0
- package/schemas/rag-index.json +273 -0
- package/schemas/rag-query.json +365 -0
- package/schemas/rag-stats.json +269 -0
- package/schemas/resources-check.json +280 -118
- package/schemas/resources-query.json +333 -0
- package/schemas/resources-scan.json +321 -0
- package/schemas/resources-validate.json +332 -0
- package/schemas/skill-review.json +224 -106
- package/schemas/skill-test-configure.json +256 -0
- package/schemas/skill-test-run.json +296 -0
- package/schemas/skills-build.json +325 -0
- package/schemas/skills-install.json +287 -0
- package/schemas/skills-list.json +283 -0
- package/schemas/skills-package.json +270 -0
- package/schemas/skills-validate.json +285 -0
- package/dist/commands/skills/shared.d.ts +0 -29
- package/dist/commands/skills/shared.d.ts.map +0 -1
- package/dist/commands/skills/shared.js +0 -33
- package/dist/commands/skills/shared.js.map +0 -1
- package/dist/utils/command-error.d.ts +0 -189
- package/dist/utils/command-error.d.ts.map +0 -1
- package/dist/utils/command-error.js +0 -230
- package/dist/utils/command-error.js.map +0 -1
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The document `vat cache clear` publishes, apart from the command.
|
|
3
|
+
*
|
|
4
|
+
* A sibling module because the published-shape registry imports it and the
|
|
5
|
+
* command imports the writer that imports the registry (the cycle
|
|
6
|
+
* `report-schemas.ts` describes).
|
|
7
|
+
*
|
|
8
|
+
* `examined` counts the cache locations considered — always one, the shared
|
|
9
|
+
* `<tmpdir>/.vat-cache` root. A root that does not exist is considered and
|
|
10
|
+
* empty (`existed: false`, `ok`). The tree is moved off its path whole before it
|
|
11
|
+
* is removed, so there is no partial clear: a refusal before that is the error
|
|
12
|
+
* branch with `data: null`; a delete the OS stops after it is the error branch
|
|
13
|
+
* (`RUN_INCOMPLETE`) with this `data` — the clear is done — and a
|
|
14
|
+
* TREE_CLEANUP_INCOMPLETE warning naming where the moved-aside tree is.
|
|
15
|
+
*/
|
|
16
|
+
import { type Report } from '@vibe-agent-toolkit/schema';
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
import type { ExaminedDeclaration } from '../../utils/run-integrity.js';
|
|
19
|
+
/** What `examined` counts for `vat cache clear`, and the remedy when it is zero. */
|
|
20
|
+
export declare const CACHE_CLEAR_EXAMINED: ExaminedDeclaration;
|
|
21
|
+
declare const CacheClearDataSchema: z.ZodObject<{
|
|
22
|
+
/** Absolute path of the tree targeted. */
|
|
23
|
+
cacheDir: z.ZodString;
|
|
24
|
+
/** Whether the directory was there at all. */
|
|
25
|
+
existed: z.ZodBoolean;
|
|
26
|
+
/** Top-level entries that are gone, sorted. */
|
|
27
|
+
removed: z.ZodArray<z.ZodString, "many">;
|
|
28
|
+
/** Files (and other non-directory entries) actually removed. */
|
|
29
|
+
entriesRemoved: z.ZodNumber;
|
|
30
|
+
/** Bytes actually removed. */
|
|
31
|
+
bytesRemoved: z.ZodNumber;
|
|
32
|
+
}, "strict", z.ZodTypeAny, {
|
|
33
|
+
cacheDir: string;
|
|
34
|
+
existed: boolean;
|
|
35
|
+
removed: string[];
|
|
36
|
+
entriesRemoved: number;
|
|
37
|
+
bytesRemoved: number;
|
|
38
|
+
}, {
|
|
39
|
+
cacheDir: string;
|
|
40
|
+
existed: boolean;
|
|
41
|
+
removed: string[];
|
|
42
|
+
entriesRemoved: number;
|
|
43
|
+
bytesRemoved: number;
|
|
44
|
+
}>;
|
|
45
|
+
export type CacheClearData = z.infer<typeof CacheClearDataSchema>;
|
|
46
|
+
/** The document this command publishes. */
|
|
47
|
+
export declare const CACHE_CLEAR_REPORT_SCHEMA: import("@vibe-agent-toolkit/schema").ReportZodSchema<z.ZodObject<{
|
|
48
|
+
/** Absolute path of the tree targeted. */
|
|
49
|
+
cacheDir: z.ZodString;
|
|
50
|
+
/** Whether the directory was there at all. */
|
|
51
|
+
existed: z.ZodBoolean;
|
|
52
|
+
/** Top-level entries that are gone, sorted. */
|
|
53
|
+
removed: z.ZodArray<z.ZodString, "many">;
|
|
54
|
+
/** Files (and other non-directory entries) actually removed. */
|
|
55
|
+
entriesRemoved: z.ZodNumber;
|
|
56
|
+
/** Bytes actually removed. */
|
|
57
|
+
bytesRemoved: z.ZodNumber;
|
|
58
|
+
}, "strict", z.ZodTypeAny, {
|
|
59
|
+
cacheDir: string;
|
|
60
|
+
existed: boolean;
|
|
61
|
+
removed: string[];
|
|
62
|
+
entriesRemoved: number;
|
|
63
|
+
bytesRemoved: number;
|
|
64
|
+
}, {
|
|
65
|
+
cacheDir: string;
|
|
66
|
+
existed: boolean;
|
|
67
|
+
removed: string[];
|
|
68
|
+
entriesRemoved: number;
|
|
69
|
+
bytesRemoved: number;
|
|
70
|
+
}>, z.ZodObject<Omit<{
|
|
71
|
+
code: z.ZodString;
|
|
72
|
+
severity: z.ZodEnum<["error", "warning", "info", "ignore"]>;
|
|
73
|
+
message: z.ZodString;
|
|
74
|
+
location: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
75
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
field: z.ZodOptional<z.ZodString>;
|
|
77
|
+
link: z.ZodOptional<z.ZodString>;
|
|
78
|
+
fix: z.ZodOptional<z.ZodString>;
|
|
79
|
+
reference: z.ZodOptional<z.ZodString>;
|
|
80
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
81
|
+
}, "severity"> & {
|
|
82
|
+
severity: z.ZodEnum<["error", "warning", "info"]>;
|
|
83
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
}, "strict", z.ZodTypeAny, {
|
|
85
|
+
code: string;
|
|
86
|
+
message: string;
|
|
87
|
+
severity: "error" | "warning" | "info";
|
|
88
|
+
fix?: string | undefined;
|
|
89
|
+
reference?: string | undefined;
|
|
90
|
+
location?: string | undefined;
|
|
91
|
+
line?: number | undefined;
|
|
92
|
+
field?: string | undefined;
|
|
93
|
+
link?: string | undefined;
|
|
94
|
+
suggestion?: string | undefined;
|
|
95
|
+
column?: number | undefined;
|
|
96
|
+
}, {
|
|
97
|
+
code: string;
|
|
98
|
+
message: string;
|
|
99
|
+
severity: "error" | "warning" | "info";
|
|
100
|
+
fix?: string | undefined;
|
|
101
|
+
reference?: string | undefined;
|
|
102
|
+
location?: string | undefined;
|
|
103
|
+
line?: number | undefined;
|
|
104
|
+
field?: string | undefined;
|
|
105
|
+
link?: string | undefined;
|
|
106
|
+
suggestion?: string | undefined;
|
|
107
|
+
column?: number | undefined;
|
|
108
|
+
}>>;
|
|
109
|
+
export type CacheClearReport = Report<CacheClearData>;
|
|
110
|
+
export {};
|
|
111
|
+
//# sourceMappingURL=clear-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clear-schema.d.ts","sourceRoot":"","sources":["../../../src/commands/cache/clear-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAA+B,KAAK,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,EAAE,mBAGlC,CAAC;AAEF,QAAA,MAAM,oBAAoB;IACxB,0CAA0C;;IAE1C,8CAA8C;;IAE9C,+CAA+C;;IAE/C,gEAAgE;;IAEhE,8BAA8B;;;;;;;;;;;;;;EAErB,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,2CAA2C;AAC3C,eAAO,MAAM,yBAAyB;IAfpC,0CAA0C;;IAE1C,8CAA8C;;IAE9C,+CAA+C;;IAE/C,gEAAgE;;IAEhE,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAO0D,CAAC;AAE3F,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The document `vat cache clear` publishes, apart from the command.
|
|
3
|
+
*
|
|
4
|
+
* A sibling module because the published-shape registry imports it and the
|
|
5
|
+
* command imports the writer that imports the registry (the cycle
|
|
6
|
+
* `report-schemas.ts` describes).
|
|
7
|
+
*
|
|
8
|
+
* `examined` counts the cache locations considered — always one, the shared
|
|
9
|
+
* `<tmpdir>/.vat-cache` root. A root that does not exist is considered and
|
|
10
|
+
* empty (`existed: false`, `ok`). The tree is moved off its path whole before it
|
|
11
|
+
* is removed, so there is no partial clear: a refusal before that is the error
|
|
12
|
+
* branch with `data: null`; a delete the OS stops after it is the error branch
|
|
13
|
+
* (`RUN_INCOMPLETE`) with this `data` — the clear is done — and a
|
|
14
|
+
* TREE_CLEANUP_INCOMPLETE warning naming where the moved-aside tree is.
|
|
15
|
+
*/
|
|
16
|
+
import { FindingSchema, reportSchema } from '@vibe-agent-toolkit/schema';
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
/** What `examined` counts for `vat cache clear`, and the remedy when it is zero. */
|
|
19
|
+
export const CACHE_CLEAR_EXAMINED = {
|
|
20
|
+
unit: 'cache locations',
|
|
21
|
+
whenZero: 'No cache location was considered, which is a defect in VAT — report it with the output of vat cache clear --debug.',
|
|
22
|
+
};
|
|
23
|
+
const CacheClearDataSchema = z.object({
|
|
24
|
+
/** Absolute path of the tree targeted. */
|
|
25
|
+
cacheDir: z.string(),
|
|
26
|
+
/** Whether the directory was there at all. */
|
|
27
|
+
existed: z.boolean(),
|
|
28
|
+
/** Top-level entries that are gone, sorted. */
|
|
29
|
+
removed: z.array(z.string()),
|
|
30
|
+
/** Files (and other non-directory entries) actually removed. */
|
|
31
|
+
entriesRemoved: z.number().int().nonnegative(),
|
|
32
|
+
/** Bytes actually removed. */
|
|
33
|
+
bytesRemoved: z.number().int().nonnegative(),
|
|
34
|
+
}).strict();
|
|
35
|
+
/** The document this command publishes. */
|
|
36
|
+
export const CACHE_CLEAR_REPORT_SCHEMA = reportSchema(CacheClearDataSchema, FindingSchema);
|
|
37
|
+
//# sourceMappingURL=clear-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clear-schema.js","sourceRoot":"","sources":["../../../src/commands/cache/clear-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAe,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,oFAAoF;AACpF,MAAM,CAAC,MAAM,oBAAoB,GAAwB;IACvD,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,oHAAoH;CAC/H,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,0CAA0C;IAC1C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,8CAA8C;IAC9C,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,+CAA+C;IAC/C,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5B,gEAAgE;IAChE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC9C,8BAA8B;IAC9B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CAC7C,CAAC,CAAC,MAAM,EAAE,CAAC;AAIZ,2CAA2C;AAC3C,MAAM,CAAC,MAAM,yBAAyB,GAAG,YAAY,CAAC,oBAAoB,EAAE,aAAa,CAAC,CAAC"}
|
|
@@ -24,32 +24,15 @@
|
|
|
24
24
|
* the operator chose. Stated so nobody reads a clean `bytesRemoved` as "every
|
|
25
25
|
* store is gone".
|
|
26
26
|
*/
|
|
27
|
+
import type { CacheClearData } from './clear-schema.js';
|
|
27
28
|
export interface CacheClearOptions {
|
|
28
29
|
debug?: boolean;
|
|
29
30
|
}
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* reportable. A recursive delete that gives up part-way has already removed most
|
|
36
|
-
* of the cache; surfacing that as a bare thrown error told the operator only
|
|
37
|
-
* that the command failed, while leaving them to guess how much of their cache
|
|
38
|
-
* still existed. An honest count of what went and what stayed is the whole
|
|
39
|
-
* point of a report.
|
|
40
|
-
*/
|
|
41
|
-
export interface CacheClearReport {
|
|
42
|
-
status: 'success' | 'partial';
|
|
43
|
-
cacheDir: string;
|
|
44
|
-
existed: boolean;
|
|
45
|
-
/** Top-level entries that are gone, sorted. Empty when nothing was there. */
|
|
46
|
-
removed: string[];
|
|
47
|
-
/** Top-level entries that survived a partial clear, sorted. Absent on success. */
|
|
48
|
-
remaining?: string[];
|
|
49
|
-
/** Why the delete stopped short. Absent on success. */
|
|
50
|
-
reason?: string;
|
|
51
|
-
entriesRemoved: number;
|
|
52
|
-
bytesRemoved: number;
|
|
31
|
+
/** What a clear finished: what it removed, and — when the OS would not then delete the tree it moved aside — that failure. */
|
|
32
|
+
interface CacheClearOutcome {
|
|
33
|
+
readonly data: CacheClearData;
|
|
34
|
+
/** The moved-aside cache the OS would not delete: a `destination` fault naming where it is. */
|
|
35
|
+
readonly leftover?: unknown;
|
|
53
36
|
}
|
|
54
37
|
/**
|
|
55
38
|
* The shared cache root, `<tmpdir>/.vat-cache`.
|
|
@@ -83,23 +66,42 @@ export interface CacheClearReport {
|
|
|
83
66
|
*/
|
|
84
67
|
export declare function vatCacheRoot(): string;
|
|
85
68
|
/**
|
|
86
|
-
* Measure, then delete, an entire cache tree
|
|
69
|
+
* Measure, then delete, an entire cache tree, as ONE tree-change plan: a `remove`
|
|
70
|
+
* of state VAT owns outright (`vat-state`).
|
|
87
71
|
*
|
|
88
72
|
* Measured BEFORE the delete, because afterwards there is nothing left to count
|
|
89
73
|
* and a report of "removed: unknown" would make the command unverifiable.
|
|
90
74
|
*
|
|
75
|
+
* The tree is moved off its path whole, then removed — so a delete the OS stops
|
|
76
|
+
* (another VAT writing into the shared tree, a file it will not unlink) leaves no
|
|
77
|
+
* part of a cache where the next run looks: the clear is done, and the failure is
|
|
78
|
+
* returned as `leftover`, naming where the moved-aside tree is — never a "partial"
|
|
79
|
+
* clear. A read-only directory the owner made is made writable on the way down,
|
|
80
|
+
* so it does not stop the delete.
|
|
81
|
+
*
|
|
91
82
|
* Deliberately reads no environment: `vat cache clear` runs whether or not
|
|
92
83
|
* caching is enabled for this process. A `VAT_CACHE=0` that also disarmed the
|
|
93
84
|
* cleanup would leave an operator with a cache they can neither use nor remove.
|
|
94
85
|
*
|
|
95
86
|
* @param cacheDir - Directory to remove, in full
|
|
96
|
-
* @returns What was removed
|
|
87
|
+
* @returns What was removed, and the `leftover` of a moved-aside tree the OS would not delete
|
|
88
|
+
* @throws {FsFaultError} an `environment` fault (`RUN_INCOMPLETE`) when the OS refuses to
|
|
89
|
+
* list or stat an entry during the measurement; a `destination` fault (`RUN_INCOMPLETE`)
|
|
90
|
+
* when it refuses to examine the cache path or to move the tree off it — nothing is
|
|
91
|
+
* removed then
|
|
97
92
|
*/
|
|
98
|
-
export declare function clearCacheDirectory(cacheDir: string): Promise<
|
|
93
|
+
export declare function clearCacheDirectory(cacheDir: string): Promise<CacheClearOutcome>;
|
|
99
94
|
/**
|
|
100
95
|
* Command entry point: clear the real cache root and publish the report.
|
|
101
96
|
*
|
|
97
|
+
* A complete clear is `ok` — nothing there to remove included. A refusal before
|
|
98
|
+
* the tree left its path is the envelope's error branch with `data: null`. Once
|
|
99
|
+
* it is off its path the clear is done: a delete the OS then stops is still
|
|
100
|
+
* `RUN_INCOMPLETE`, published with the clear's `data` and a
|
|
101
|
+
* TREE_CLEANUP_INCOMPLETE warning naming where the moved-aside tree is.
|
|
102
|
+
*
|
|
102
103
|
* @param options - Command options (only `--debug`, inherited from the root)
|
|
103
104
|
*/
|
|
104
105
|
export declare function cacheClearCommand(options?: CacheClearOptions): Promise<void>;
|
|
106
|
+
export {};
|
|
105
107
|
//# sourceMappingURL=clear.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clear.d.ts","sourceRoot":"","sources":["../../../src/commands/cache/clear.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;
|
|
1
|
+
{"version":3,"file":"clear.d.ts","sourceRoot":"","sources":["../../../src/commands/cache/clear.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAaH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAWxD,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AASD,8HAA8H;AAC9H,UAAU,iBAAiB;IACzB,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,+FAA+F;IAC/F,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAcrC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAqBtF;AA8BD;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAatF"}
|
|
@@ -24,35 +24,21 @@
|
|
|
24
24
|
* the operator chose. Stated so nobody reads a clean `bytesRemoved` as "every
|
|
25
25
|
* store is gone".
|
|
26
26
|
*/
|
|
27
|
-
import { promises as fs } from 'node:fs';
|
|
27
|
+
import { promises as fs, lstatSync } from 'node:fs';
|
|
28
28
|
import { basename, dirname } from 'node:path';
|
|
29
29
|
import { parseCacheDirectory } from '@vibe-agent-toolkit/resources';
|
|
30
|
-
import {
|
|
31
|
-
import { direntKind, isPathAbsentError, safePath } from '@vibe-agent-toolkit/utils';
|
|
32
|
-
import {
|
|
30
|
+
import { buildReport, toFindings } from '@vibe-agent-toolkit/schema';
|
|
31
|
+
import { applyTreePlanOrLeftover, classifyFsFault, isFsFaultError, direntKind, everywhere, isPathAbsentError, planTreeChanges, requireConfirmedAbsent, safePath } from '@vibe-agent-toolkit/utils';
|
|
32
|
+
import { refusalCodeOf } from '../../utils/command-refusal.js';
|
|
33
|
+
import { endWithRefusal, endWithReport, leftoverIssueOf, NOTHING_FINISHED } from '../../utils/document-writer.js';
|
|
33
34
|
import { createLogger } from '../../utils/logger.js';
|
|
34
|
-
import { writeYamlOutput } from '../../utils/output.js';
|
|
35
35
|
/** The one name the shared cache root is allowed to have. See {@link vatCacheRoot}. */
|
|
36
36
|
const VAT_CACHE_DIR_NAME = '.vat-cache';
|
|
37
|
+
/** `vat cache clear` has no `--strict`, and its only finding is a leftover warning: the gate is fixed. */
|
|
38
|
+
const CACHE_CLEAR_GATE = { strict: false };
|
|
39
|
+
/** One location is considered on every run: the shared cache root. */
|
|
40
|
+
const CACHE_LOCATIONS_CONSIDERED = 1;
|
|
37
41
|
const EMPTY_USAGE = { entries: 0, bytes: 0 };
|
|
38
|
-
/**
|
|
39
|
-
* Retry budget for the recursive delete.
|
|
40
|
-
*
|
|
41
|
-
* Not defensive padding — observed. `<tmpdir>/.vat-cache` is shared by every VAT
|
|
42
|
-
* on the machine: other worktrees, other sessions, and any adopter running an
|
|
43
|
-
* *installed* vat all write into it under their own namespace. A `vat cache
|
|
44
|
-
* clear` issued while one of them is mid-run walks a tree that is growing
|
|
45
|
-
* underneath it and `rmdir` fails `ENOTEMPTY` on a shard that gained a file
|
|
46
|
-
* between the listing and the removal. Reproduced twice against a concurrent
|
|
47
|
-
* `vat verify`; the same command succeeded immediately once that run finished.
|
|
48
|
-
*
|
|
49
|
-
* Node retries exactly this error class (`EBUSY`, `EMFILE`, `ENFILE`,
|
|
50
|
-
* `ENOTEMPTY`, `EPERM`) with a linear backoff, which clears a short overlap.
|
|
51
|
-
* It cannot win against a writer that keeps going for the whole window — that
|
|
52
|
-
* case still surfaces as an error, which is correct: "some of your cache is
|
|
53
|
-
* gone and something is still writing" must not be reported as success.
|
|
54
|
-
*/
|
|
55
|
-
const RM_RETRY = { maxRetries: 5, retryDelay: 100 };
|
|
56
42
|
/**
|
|
57
43
|
* The shared cache root, `<tmpdir>/.vat-cache`.
|
|
58
44
|
*
|
|
@@ -95,72 +81,77 @@ export function vatCacheRoot() {
|
|
|
95
81
|
return root;
|
|
96
82
|
}
|
|
97
83
|
/**
|
|
98
|
-
* Measure, then delete, an entire cache tree
|
|
84
|
+
* Measure, then delete, an entire cache tree, as ONE tree-change plan: a `remove`
|
|
85
|
+
* of state VAT owns outright (`vat-state`).
|
|
99
86
|
*
|
|
100
87
|
* Measured BEFORE the delete, because afterwards there is nothing left to count
|
|
101
88
|
* and a report of "removed: unknown" would make the command unverifiable.
|
|
102
89
|
*
|
|
90
|
+
* The tree is moved off its path whole, then removed — so a delete the OS stops
|
|
91
|
+
* (another VAT writing into the shared tree, a file it will not unlink) leaves no
|
|
92
|
+
* part of a cache where the next run looks: the clear is done, and the failure is
|
|
93
|
+
* returned as `leftover`, naming where the moved-aside tree is — never a "partial"
|
|
94
|
+
* clear. A read-only directory the owner made is made writable on the way down,
|
|
95
|
+
* so it does not stop the delete.
|
|
96
|
+
*
|
|
103
97
|
* Deliberately reads no environment: `vat cache clear` runs whether or not
|
|
104
98
|
* caching is enabled for this process. A `VAT_CACHE=0` that also disarmed the
|
|
105
99
|
* cleanup would leave an operator with a cache they can neither use nor remove.
|
|
106
100
|
*
|
|
107
101
|
* @param cacheDir - Directory to remove, in full
|
|
108
|
-
* @returns What was removed
|
|
102
|
+
* @returns What was removed, and the `leftover` of a moved-aside tree the OS would not delete
|
|
103
|
+
* @throws {FsFaultError} an `environment` fault (`RUN_INCOMPLETE`) when the OS refuses to
|
|
104
|
+
* list or stat an entry during the measurement; a `destination` fault (`RUN_INCOMPLETE`)
|
|
105
|
+
* when it refuses to examine the cache path or to move the tree off it — nothing is
|
|
106
|
+
* removed then
|
|
109
107
|
*/
|
|
110
108
|
export async function clearCacheDirectory(cacheDir) {
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
109
|
+
const absent = { data: { cacheDir, existed: false, removed: [], entriesRemoved: 0, bytesRemoved: 0 } };
|
|
110
|
+
const plan = await planTreeChanges([{ op: 'remove', dest: cacheDir, ownership: { kind: 'vat-state' }, label: 'the VAT cache' }]);
|
|
111
|
+
const existing = plan.changes[0]?.existing ?? 'absent';
|
|
112
|
+
if (existing === 'absent')
|
|
113
|
+
return absent;
|
|
114
|
+
// Another clear (any VAT on the machine) may take the cache between the plan and the move: gone
|
|
115
|
+
// is the goal state, so that is a clear of nothing — never a refusal.
|
|
116
|
+
const measured = await measureRoot(cacheDir, existing);
|
|
117
|
+
if (measured === undefined)
|
|
118
|
+
return absent;
|
|
119
|
+
let leftover;
|
|
117
120
|
try {
|
|
118
|
-
|
|
121
|
+
({ leftover } = await applyTreePlanOrLeftover(plan));
|
|
119
122
|
}
|
|
120
123
|
catch (error) {
|
|
121
|
-
|
|
124
|
+
if (isFsFaultError(error) && error.faultClass === 'absent' && goneNow(cacheDir))
|
|
125
|
+
return absent;
|
|
126
|
+
throw error;
|
|
122
127
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
existed: true,
|
|
127
|
-
removed: sorted(names),
|
|
128
|
-
entriesRemoved: usage.entries,
|
|
129
|
-
bytesRemoved: usage.bytes,
|
|
130
|
-
};
|
|
128
|
+
const { names, usage } = measured;
|
|
129
|
+
const data = { cacheDir, existed: true, removed: sorted(names), entriesRemoved: usage.entries, bytesRemoved: usage.bytes };
|
|
130
|
+
return leftover === undefined ? { data } : { data, leftover };
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* percent. Re-measuring what remains and subtracting is the only way the counts
|
|
138
|
-
* describe what actually happened rather than what was attempted.
|
|
139
|
-
*
|
|
140
|
-
* A concurrent writer can make the remainder *larger* than the original
|
|
141
|
-
* measurement, so the subtraction is floored at zero: reporting a negative
|
|
142
|
-
* number of removed bytes would be worse than reporting none.
|
|
143
|
-
*
|
|
144
|
-
* @param cacheDir - The tree that was being removed
|
|
145
|
-
* @param names - Top-level entry names as they were before the delete
|
|
146
|
-
* @param before - Usage measured before the delete
|
|
147
|
-
* @param error - Whatever `fs.rm` threw
|
|
148
|
-
* @returns A report naming what went, what stayed, and why
|
|
133
|
+
* What the delete will take: the root's top-level names and the whole tree's usage — or `undefined`
|
|
134
|
+
* when the root has really vanished since the plan saw it. A root that is not a directory (a link,
|
|
135
|
+
* a file someone put there) is one entry, never followed: the delete removes the entry itself, and
|
|
136
|
+
* counting a link's target would report a tree it never touches.
|
|
149
137
|
*/
|
|
150
|
-
async function
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
138
|
+
async function measureRoot(cacheDir, existing) {
|
|
139
|
+
if (existing !== 'directory')
|
|
140
|
+
return { names: [], usage: { entries: 1, bytes: await sizeOf(cacheDir) } };
|
|
141
|
+
const entries = await listedOrVanished(cacheDir);
|
|
142
|
+
if (entries === null)
|
|
143
|
+
return undefined;
|
|
144
|
+
return { names: entries.map((entry) => entry.name), usage: await measureEntries(cacheDir, entries) };
|
|
145
|
+
}
|
|
146
|
+
/** Whether nothing is at `cacheDir` now, believed only when its parent's listing agrees ({@link vanished}). */
|
|
147
|
+
function goneNow(cacheDir) {
|
|
148
|
+
try {
|
|
149
|
+
lstatSync(cacheDir);
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
return vanished(error, cacheDir, { side: 'destination', action: 'examine the cache', path: cacheDir });
|
|
154
|
+
}
|
|
164
155
|
}
|
|
165
156
|
/** Stable ordering for the reported entry lists. */
|
|
166
157
|
function sorted(names) {
|
|
@@ -169,41 +160,57 @@ function sorted(names) {
|
|
|
169
160
|
/**
|
|
170
161
|
* Command entry point: clear the real cache root and publish the report.
|
|
171
162
|
*
|
|
163
|
+
* A complete clear is `ok` — nothing there to remove included. A refusal before
|
|
164
|
+
* the tree left its path is the envelope's error branch with `data: null`. Once
|
|
165
|
+
* it is off its path the clear is done: a delete the OS then stops is still
|
|
166
|
+
* `RUN_INCOMPLETE`, published with the clear's `data` and a
|
|
167
|
+
* TREE_CLEANUP_INCOMPLETE warning naming where the moved-aside tree is.
|
|
168
|
+
*
|
|
172
169
|
* @param options - Command options (only `--debug`, inherited from the root)
|
|
173
170
|
*/
|
|
174
171
|
export async function cacheClearCommand(options = {}) {
|
|
175
|
-
const startTime = Date.now();
|
|
176
172
|
const logger = createLogger(options.debug ? { debug: true } : {});
|
|
173
|
+
let outcome;
|
|
177
174
|
try {
|
|
178
|
-
|
|
179
|
-
logger.debug(`Cleared ${String(report.entriesRemoved)} cache entries from ${report.cacheDir}`);
|
|
180
|
-
writeYamlOutput(report);
|
|
181
|
-
// A partial clear publishes its report and *then* fails. Exiting through
|
|
182
|
-
// `handleCommandError` instead would suppress the report entirely, which is
|
|
183
|
-
// the defect this branch exists to fix: the operator most needs to know how
|
|
184
|
-
// much of the cache survived precisely when the command did not finish.
|
|
185
|
-
// A partial clear is a run that did not finish, not a finding about the tree.
|
|
186
|
-
process.exit(report.status === 'partial' ? ExitCode.ERROR : ExitCode.OK);
|
|
175
|
+
outcome = await clearCacheDirectory(vatCacheRoot());
|
|
187
176
|
}
|
|
188
177
|
catch (error) {
|
|
189
|
-
|
|
178
|
+
return refuse(error, NOTHING_FINISHED);
|
|
190
179
|
}
|
|
180
|
+
const { data, leftover } = outcome;
|
|
181
|
+
if (leftover !== undefined)
|
|
182
|
+
return refuse(leftover, { examined: CACHE_LOCATIONS_CONSIDERED, findings: toFindings([leftoverIssueOf(leftover)]), data });
|
|
183
|
+
logger.debug(`Cleared ${String(data.entriesRemoved)} cache entries from ${data.cacheDir}`);
|
|
184
|
+
endWithReport('cache clear', buildReport({ examined: CACHE_LOCATIONS_CONSIDERED, findings: [], data, gate: CACHE_CLEAR_GATE }), 'yaml');
|
|
185
|
+
}
|
|
186
|
+
/** End on the envelope's error branch: `error` refused, `finished` the work done before it. */
|
|
187
|
+
function refuse(error, finished) {
|
|
188
|
+
return endWithRefusal('cache clear', refusalCodeOf(error), error, 'yaml', CACHE_CLEAR_GATE, finished);
|
|
191
189
|
}
|
|
192
190
|
/**
|
|
193
|
-
* `
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
* cache is gone when it is still on disk.
|
|
191
|
+
* Whether `error`, from a probe of `target`, says it is gone — believed only when the parent's
|
|
192
|
+
* listing agrees (a concurrent run pruning its own entry). An `ENOENT` for an entry the parent
|
|
193
|
+
* still names is a refusal, thrown classified: reading it as "gone" would report a cache that is
|
|
194
|
+
* on disk as cleared, or as never there. Any other error is thrown classified on `ctx`.
|
|
198
195
|
*/
|
|
199
|
-
|
|
196
|
+
function vanished(error, target, ctx) {
|
|
197
|
+
if (!isPathAbsentError(error))
|
|
198
|
+
throw classifyFsFault(error, { ...ctx, path: target });
|
|
199
|
+
requireConfirmedAbsent(target, error, { action: ctx.action, path: target }, { follows: false, sideOf: everywhere(ctx.side) });
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* List `dir`, or `null` when it has really vanished (see {@link vanished}). The cache is VAT's own
|
|
204
|
+
* scratch, so a listing the OS refuses is an `environment` fault.
|
|
205
|
+
*/
|
|
206
|
+
async function listedOrVanished(dir) {
|
|
207
|
+
const ctx = { side: 'environment', action: 'list the cache', path: dir };
|
|
200
208
|
try {
|
|
201
209
|
return await fs.readdir(dir, { withFileTypes: true });
|
|
202
210
|
}
|
|
203
211
|
catch (error) {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
throw error;
|
|
212
|
+
vanished(error, dir, ctx);
|
|
213
|
+
return null;
|
|
207
214
|
}
|
|
208
215
|
}
|
|
209
216
|
/** Sum file count and bytes over already-listed directory entries. */
|
|
@@ -213,26 +220,25 @@ async function measureEntries(dir, entries) {
|
|
|
213
220
|
// Not `isFile()`, and NOT followed: a symlink or socket is still an entry
|
|
214
221
|
// that is about to be removed, and counting only regular files would
|
|
215
222
|
// under-report it — while walking INTO a linked directory would count a
|
|
216
|
-
// tree
|
|
223
|
+
// tree the delete leaves untouched.
|
|
217
224
|
return direntKind(entry) === 'directory' ? measureTree(child) : { entries: 1, bytes: await sizeOf(child) };
|
|
218
225
|
}));
|
|
219
226
|
return usages.reduce((total, usage) => ({ entries: total.entries + usage.entries, bytes: total.bytes + usage.bytes }), EMPTY_USAGE);
|
|
220
227
|
}
|
|
221
|
-
/** Recursive measure. A directory that vanished mid-walk contributes nothing. */
|
|
228
|
+
/** Recursive measure. A directory that really vanished mid-walk contributes nothing. */
|
|
222
229
|
async function measureTree(dir) {
|
|
223
|
-
const entries = await
|
|
230
|
+
const entries = await listedOrVanished(dir);
|
|
224
231
|
return entries === null ? EMPTY_USAGE : measureEntries(dir, entries);
|
|
225
232
|
}
|
|
226
233
|
/**
|
|
227
234
|
* Size of one entry, without following symlinks.
|
|
228
235
|
*
|
|
229
|
-
* A file that
|
|
230
|
-
* than failing the clear — the whole tree is about to be deleted anyway,
|
|
231
|
-
* concurrent vat run pruning its own temp file must not turn cleanup into an
|
|
236
|
+
* A file that really disappeared between the listing and the stat contributes 0
|
|
237
|
+
* rather than failing the clear — the whole tree is about to be deleted anyway,
|
|
238
|
+
* and a concurrent vat run pruning its own temp file must not turn cleanup into an
|
|
232
239
|
* error. Only a DISAPPEARANCE is 0: an entry the OS refuses to stat is still
|
|
233
|
-
* there, still about to be counted as reclaimed
|
|
234
|
-
*
|
|
235
|
-
* entry, rather than read as an empty file.
|
|
240
|
+
* there, still about to be counted as reclaimed — so it is raised here, where it
|
|
241
|
+
* names the entry, rather than read as an empty file.
|
|
236
242
|
*/
|
|
237
243
|
async function sizeOf(target) {
|
|
238
244
|
try {
|
|
@@ -240,9 +246,8 @@ async function sizeOf(target) {
|
|
|
240
246
|
return stats.size;
|
|
241
247
|
}
|
|
242
248
|
catch (error) {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
throw error;
|
|
249
|
+
vanished(error, target, { side: 'environment', action: 'measure the cache', path: target });
|
|
250
|
+
return 0;
|
|
246
251
|
}
|
|
247
252
|
}
|
|
248
253
|
//# sourceMappingURL=clear.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clear.js","sourceRoot":"","sources":["../../../src/commands/cache/clear.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;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K,EAAE,CAAC;QACf,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5F,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/cache/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,kBAAkB,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/cache/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,kBAAkB,IAAI,OAAO,CA0F5C"}
|
|
@@ -70,21 +70,27 @@ Description:
|
|
|
70
70
|
A cache directory that does not exist is not an error — nothing to remove is
|
|
71
71
|
a successful clear.
|
|
72
72
|
|
|
73
|
-
The tree is
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
The tree is moved off its path whole, then removed: a delete the OS stops
|
|
74
|
+
(another VAT writing into the shared tree, a file it will not remove) leaves
|
|
75
|
+
no part of a cache at <tmpdir>/.vat-cache. That is the report's error branch
|
|
76
|
+
(error.code RUN_INCOMPLETE) still carrying the data of the clear, with a
|
|
77
|
+
TREE_CLEANUP_INCOMPLETE warning naming where the moved-aside tree is, so you
|
|
78
|
+
can remove it yourself.
|
|
76
79
|
|
|
77
80
|
Output:
|
|
81
|
+
A YAML report on stdout (status ok, or error); its data holds:
|
|
78
82
|
- cacheDir: absolute path that was targeted
|
|
79
83
|
- existed: whether the directory was there at all
|
|
80
84
|
- removed: top-level entries that are now gone
|
|
81
|
-
-
|
|
82
|
-
- entriesRemoved / bytesRemoved: file count and total size actually removed
|
|
85
|
+
- entriesRemoved / bytesRemoved: file count and total size removed
|
|
83
86
|
|
|
84
87
|
Exit Codes:
|
|
85
88
|
0 - Cache cleared (or already absent)
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
2 - RUN_INCOMPLETE: the cache could not be examined, listed, measured or
|
|
90
|
+
moved off its path (nothing cleared, data null), or the moved-aside tree
|
|
91
|
+
could not then be deleted (cleared, data present, a warning naming it).
|
|
92
|
+
The cache is VAT's own scratch, so a refusal there is the run not
|
|
93
|
+
finishing; the document's error says which
|
|
88
94
|
|
|
89
95
|
Example:
|
|
90
96
|
$ vat cache clear # Reclaim the temp-directory cache tree
|