@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
|
@@ -7,22 +7,27 @@
|
|
|
7
7
|
* - LICENSE file must exist (error)
|
|
8
8
|
* - README.md should exist (warning)
|
|
9
9
|
* - CHANGELOG.md should exist (warning)
|
|
10
|
+
*
|
|
11
|
+
* Publishes the `Report<T>` envelope (`validate-schema.ts`): every finding flat
|
|
12
|
+
* with its `location` relative to `data.root`, one `data.plugins` row per
|
|
13
|
+
* declared local plugin walked.
|
|
10
14
|
*/
|
|
11
|
-
import {
|
|
12
|
-
import { validateMarketplace, validateSkill, } from '@vibe-agent-toolkit/agent-skills';
|
|
15
|
+
import { readdirSync } from 'node:fs';
|
|
16
|
+
import { materializeIssue, validateMarketplace, validateSkill, } from '@vibe-agent-toolkit/agent-skills';
|
|
13
17
|
import { validatePlugin } from '@vibe-agent-toolkit/claude-marketplace';
|
|
14
|
-
import {
|
|
15
|
-
import { direntKindFollowingSync, findProjectRoot, isPathAbsentError, issueLocation, isVatError, normalizePath, PathEscapesRootError, relativeEscapesRoot, safePath, toForwardSlash, toForwardSlashAnyPlatform } from '@vibe-agent-toolkit/utils';
|
|
18
|
+
import { buildReport, summarizeIssues, toFindings, } from '@vibe-agent-toolkit/schema';
|
|
19
|
+
import { direntKindFollowingSync, everywhere, findProjectRoot, followedKindSync, forEachInOrder, fsFaultOf, isLinkChainRefusedError, isPathAbsentError, issueLocation, isVatError, mapInOrder, normalizePath, PathEscapesRootError, pathPresent, relativeEscapesRoot, safePath, toForwardSlash, toForwardSlashAnyPlatform } from '@vibe-agent-toolkit/utils';
|
|
16
20
|
import { Command } from 'commander';
|
|
17
|
-
import {
|
|
21
|
+
import { refusalCodeOf } from '../../../utils/command-refusal.js';
|
|
18
22
|
import { loadConfig } from '../../../utils/config-loader.js';
|
|
19
|
-
import {
|
|
23
|
+
import { endWithReport, NOTHING_FINISHED, publishedReport, refusalReport } from '../../../utils/document-writer.js';
|
|
20
24
|
import { resolveIssueSeverity } from '../../../utils/issue-severity.js';
|
|
21
25
|
import { createLogger } from '../../../utils/logger.js';
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { runIntegrityFinding } from '../../../utils/run-integrity.js';
|
|
25
|
-
|
|
26
|
+
import { assertReadableDirectoryArgument } from '../../../utils/project-root-policy.js';
|
|
27
|
+
import { relativizePath } from '../../../utils/relativize-paths.js';
|
|
28
|
+
import { RUN_INTEGRITY_CODE, runIntegrityFinding, warnRunIntegrity } from '../../../utils/run-integrity.js';
|
|
29
|
+
/** `vat claude marketplace validate` offers no `--strict`: warnings never fail it. */
|
|
30
|
+
const GATE = { strict: false };
|
|
26
31
|
/**
|
|
27
32
|
* Check for required/recommended files in the marketplace root.
|
|
28
33
|
*/
|
|
@@ -34,7 +39,8 @@ function checkMarketplaceFiles(marketplacePath) {
|
|
|
34
39
|
{ file: 'CHANGELOG.md', code: 'MARKETPLACE_MISSING_CHANGELOG', severity: 'warning', verb: 'recommended for tracking changes' },
|
|
35
40
|
];
|
|
36
41
|
for (const check of fileChecks) {
|
|
37
|
-
|
|
42
|
+
// A probe the OS refuses is the marketplace's source fault, never "missing".
|
|
43
|
+
if (!pathPresent(safePath.join(marketplacePath, check.file), { follow: marketplacePath }, everywhere('source'), 'probe')) {
|
|
38
44
|
issues.push({
|
|
39
45
|
severity: check.severity,
|
|
40
46
|
code: check.code,
|
|
@@ -71,6 +77,8 @@ class WalkBoundary {
|
|
|
71
77
|
marketplacePath;
|
|
72
78
|
realRoot;
|
|
73
79
|
refused = [];
|
|
80
|
+
/** Root-relative paths inside a validated plugin the OS would not let the walk read. */
|
|
81
|
+
unread = [];
|
|
74
82
|
constructor(marketplacePath, realRoot) {
|
|
75
83
|
this.marketplacePath = marketplacePath;
|
|
76
84
|
this.realRoot = realRoot;
|
|
@@ -81,12 +89,41 @@ class WalkBoundary {
|
|
|
81
89
|
* beneath it is visited either, because nothing beneath it was read.
|
|
82
90
|
*/
|
|
83
91
|
contains(abs) {
|
|
84
|
-
|
|
85
|
-
if (!relativeEscapesRoot(safePath.relative(this.realRoot, real)))
|
|
92
|
+
if (this.resolvesInside(abs))
|
|
86
93
|
return true;
|
|
87
94
|
this.refused.push(issueLocation(abs, this.marketplacePath));
|
|
88
95
|
return false;
|
|
89
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Whether `abs`'s real path — its links read beneath the root first — sits under the root. A
|
|
99
|
+
* chain through a network or device path leaves the root by definition, and is never handed to
|
|
100
|
+
* the kernel: it is outside.
|
|
101
|
+
*/
|
|
102
|
+
resolvesInside(abs) {
|
|
103
|
+
try {
|
|
104
|
+
return !relativeEscapesRoot(safePath.relative(this.realRoot, toForwardSlash(normalizePath(abs, this.marketplacePath))));
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
if (!isLinkChainRefusedError(error))
|
|
108
|
+
throw error;
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Record `abs` as a path the OS refused to let the walk read, and return its
|
|
114
|
+
* `SCAN_PATH_UNREADABLE` warning. The record, not the warning, is what the
|
|
115
|
+
* builder turns into the run-integrity refusal: a severity override may
|
|
116
|
+
* silence the warning, never the fact that nothing behind the path was read.
|
|
117
|
+
* Anything that is not a filesystem refusal is a defect and is rethrown.
|
|
118
|
+
*/
|
|
119
|
+
unreadable(abs, error) {
|
|
120
|
+
const fault = fsFaultOf(error);
|
|
121
|
+
if (fault === undefined)
|
|
122
|
+
throw error;
|
|
123
|
+
const location = issueLocation(abs, this.marketplacePath);
|
|
124
|
+
this.unread.push(location);
|
|
125
|
+
return materializeIssue('SCAN_PATH_UNREADABLE', { location, detail: `${location}: read refused with ${fault.errno}` });
|
|
126
|
+
}
|
|
90
127
|
}
|
|
91
128
|
/**
|
|
92
129
|
* Validate all SKILL.md files within a plugin's skills/ directory.
|
|
@@ -100,23 +137,52 @@ class WalkBoundary {
|
|
|
100
137
|
*/
|
|
101
138
|
async function validatePluginSkills(pluginDir, marketplacePath, boundary, validation) {
|
|
102
139
|
const skillsDir = safePath.join(pluginDir, 'skills');
|
|
103
|
-
|
|
140
|
+
// Containment first: it reads the chain, so a link out (a network one included) is refused by
|
|
141
|
+
// name before anything follows it; an absent `skills/` is inside and then not present.
|
|
142
|
+
if (!boundary.contains(skillsDir))
|
|
104
143
|
return [];
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
144
|
+
let skillEntries;
|
|
145
|
+
try {
|
|
146
|
+
if (!pathPresent(skillsDir, { follow: marketplacePath }, everywhere('source'), 'probe'))
|
|
147
|
+
return [];
|
|
148
|
+
skillEntries = readdirSync(skillsDir, { withFileTypes: true });
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
return resolveIssueSeverity([boundary.unreadable(skillsDir, error)], validation);
|
|
152
|
+
}
|
|
153
|
+
// In order: `boundary` records refused and unread paths in the order the run names them.
|
|
154
|
+
const perSkill = await mapInOrder(skillEntries, (skillEntry) => validateOneSkill(safePath.join(skillsDir, skillEntry.name), marketplacePath, boundary, validation));
|
|
155
|
+
return perSkill.flat();
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Validate one entry of a plugin's `skills/`: nothing when it is not a skill
|
|
159
|
+
* directory holding a SKILL.md under the root. A skill the OS will not let the
|
|
160
|
+
* run stat or read is one this gate did not check — named through `boundary`
|
|
161
|
+
* and refused by the builder, never a crash (it was INTERNAL_ERROR, exit 2).
|
|
162
|
+
*/
|
|
163
|
+
async function validateOneSkill(skillDir, marketplacePath, boundary, validation) {
|
|
164
|
+
const refusedAt = (path, error) => resolveIssueSeverity([boundary.unreadable(path, error)], validation);
|
|
165
|
+
// Containment before every followed probe: `contains` reads the chain and refuses a link out
|
|
166
|
+
// (a network one included) by name, so the probe after it only ever follows a chain in the root.
|
|
167
|
+
try {
|
|
168
|
+
if (!boundary.contains(skillDir) || !isDirectory(skillDir, marketplacePath))
|
|
169
|
+
return [];
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
return refusedAt(skillDir, error);
|
|
173
|
+
}
|
|
174
|
+
const skillMdPath = safePath.join(skillDir, 'SKILL.md');
|
|
175
|
+
try {
|
|
176
|
+
if (!boundary.contains(skillMdPath) || !pathPresent(skillMdPath, { follow: marketplacePath }, everywhere('source'), 'probe'))
|
|
177
|
+
return [];
|
|
114
178
|
// Severity only (no `allow`), resolved here so a default-`ignore` code can still be raised.
|
|
115
179
|
const severity = validation?.severity === undefined ? {} : { severity: validation.severity };
|
|
116
|
-
const skillResult = await validateSkill({ skillPath: skillMdPath, rootDir: skillDir, locationRoot: marketplacePath, validation: severity });
|
|
117
|
-
|
|
180
|
+
const skillResult = await validateSkill({ skillPath: skillMdPath, rootDir: skillDir, locationRoot: marketplacePath, validation: severity, side: 'source' });
|
|
181
|
+
return skillResult.issues;
|
|
182
|
+
}
|
|
183
|
+
catch (error) {
|
|
184
|
+
return refusedAt(skillMdPath, error);
|
|
118
185
|
}
|
|
119
|
-
return issues;
|
|
120
186
|
}
|
|
121
187
|
/**
|
|
122
188
|
* Whether `dir` is a directory. `false` for a file and for nothing — both are
|
|
@@ -125,9 +191,9 @@ async function validatePluginSkills(pluginDir, marketplacePath, boundary, valida
|
|
|
125
191
|
* resolve, sending the reader to create a directory that is there. The refusal
|
|
126
192
|
* propagates and the command refuses the run by errno, like every other verb.
|
|
127
193
|
*/
|
|
128
|
-
function isDirectory(dir) {
|
|
194
|
+
function isDirectory(dir, within) {
|
|
129
195
|
try {
|
|
130
|
-
return
|
|
196
|
+
return followedKindSync(dir, within) === 'directory';
|
|
131
197
|
}
|
|
132
198
|
catch (error) {
|
|
133
199
|
if (isPathAbsentError(error))
|
|
@@ -181,9 +247,19 @@ function containedPluginDir(marketplacePath, realRoot, source) {
|
|
|
181
247
|
throw error;
|
|
182
248
|
return undefined;
|
|
183
249
|
}
|
|
184
|
-
|
|
250
|
+
let real;
|
|
251
|
+
try {
|
|
252
|
+
if (!isDirectory(lexical, marketplacePath))
|
|
253
|
+
return undefined;
|
|
254
|
+
real = toForwardSlash(normalizePath(lexical, marketplacePath));
|
|
255
|
+
}
|
|
256
|
+
catch (error) {
|
|
257
|
+
// A source whose link chain names a network or device path leaves the root by definition: it
|
|
258
|
+
// names nothing this command may enter, and the builder refuses the run by name from its absence.
|
|
259
|
+
if (!isLinkChainRefusedError(error))
|
|
260
|
+
throw error;
|
|
185
261
|
return undefined;
|
|
186
|
-
|
|
262
|
+
}
|
|
187
263
|
return relativeEscapesRoot(safePath.relative(realRoot, real)) ? undefined : { lexical, real };
|
|
188
264
|
}
|
|
189
265
|
/**
|
|
@@ -215,11 +291,10 @@ function containedPluginDir(marketplacePath, realRoot, source) {
|
|
|
215
291
|
* `validation` is the governing project's severity map (see
|
|
216
292
|
* {@link resolveProjectValidationConfig}). It is applied to each plugin result
|
|
217
293
|
* HERE rather than to the flat list at the end because the emitted document
|
|
218
|
-
* publishes both: `
|
|
219
|
-
*
|
|
220
|
-
* keeps them from disagreeing — a
|
|
221
|
-
*
|
|
222
|
-
* contains a warning.
|
|
294
|
+
* publishes both: the envelope's `findings` and each `data.plugins[]` row's
|
|
295
|
+
* `status` + `summary` tally the same findings. Resolving once, at the
|
|
296
|
+
* producer, is what keeps them from disagreeing — a row counting a warning
|
|
297
|
+
* the envelope suppressed, or a row `findings` over nothing published.
|
|
223
298
|
*/
|
|
224
299
|
async function validateDeclaredPlugins(marketplacePath, declared, validation) {
|
|
225
300
|
const pluginResults = [];
|
|
@@ -227,34 +302,38 @@ async function validateDeclaredPlugins(marketplacePath, declared, validation) {
|
|
|
227
302
|
// Keyed by REAL path: one directory is validated once however many entries
|
|
228
303
|
// name it, and the same key is what `undeclaredPluginDirs` compares against.
|
|
229
304
|
const validatedByDir = new Map();
|
|
230
|
-
|
|
305
|
+
// The marketplace root is the operator's own argument: its own `within`.
|
|
306
|
+
const realRoot = toForwardSlash(normalizePath(marketplacePath, marketplacePath));
|
|
231
307
|
const boundary = new WalkBoundary(marketplacePath, realRoot);
|
|
232
|
-
|
|
308
|
+
// In order: `validatedByDir` dedupes a directory two entries name, which a
|
|
309
|
+
// concurrent first visit would validate twice.
|
|
310
|
+
await forEachInOrder(declared, async (entry) => {
|
|
233
311
|
// A source that names nothing inside the root — nothing at all, a file,
|
|
234
312
|
// an absolute path, a `..` climb, a symlink out — is simply absent from the
|
|
235
313
|
// results, and the builder refuses the run by name from that absence.
|
|
236
314
|
const dir = containedPluginDir(marketplacePath, realRoot, entry.source);
|
|
237
315
|
if (dir === undefined)
|
|
238
|
-
|
|
316
|
+
return;
|
|
239
317
|
// Two entries, one directory: the directory's findings were collected
|
|
240
318
|
// twice and COUNTED twice (`PLUGIN_MISSING_AUTHOR: 2` for one file). Each
|
|
241
319
|
// entry still gets its row — the manifest declared two — but the file is
|
|
242
320
|
// inspected once and its findings enter `issues` once.
|
|
243
321
|
const seen = validatedByDir.get(dir.real);
|
|
244
322
|
if (seen !== undefined) {
|
|
245
|
-
pluginResults.push({ ...entry,
|
|
246
|
-
|
|
323
|
+
pluginResults.push({ ...entry, ...seen });
|
|
324
|
+
return;
|
|
247
325
|
}
|
|
248
|
-
const
|
|
249
|
-
validatedByDir.set(dir.real,
|
|
250
|
-
pluginResults.push({ ...entry,
|
|
251
|
-
issues.push(...result.issues);
|
|
326
|
+
const contained = await validateContainedPlugin(dir.lexical, marketplacePath, boundary, validation);
|
|
327
|
+
validatedByDir.set(dir.real, contained);
|
|
328
|
+
pluginResults.push({ ...entry, ...contained });
|
|
329
|
+
issues.push(...contained.result.issues);
|
|
252
330
|
issues.push(...await validatePluginSkills(dir.lexical, marketplacePath, boundary, validation));
|
|
253
|
-
}
|
|
331
|
+
});
|
|
254
332
|
return {
|
|
255
333
|
pluginResults,
|
|
256
334
|
undeclared: undeclaredPluginDirs(marketplacePath, new Set(validatedByDir.keys())),
|
|
257
335
|
refused: boundary.refused,
|
|
336
|
+
unread: boundary.unread,
|
|
258
337
|
issues,
|
|
259
338
|
};
|
|
260
339
|
}
|
|
@@ -263,21 +342,26 @@ async function validateDeclaredPlugins(marketplacePath, declared, validation) {
|
|
|
263
342
|
* of the root, in which case the manifest is refused by name and the plugin's
|
|
264
343
|
* row says so instead of carrying findings about a file the run did not read.
|
|
265
344
|
*
|
|
266
|
-
* The row
|
|
267
|
-
* the builder publishes once for the run, and a
|
|
268
|
-
* whose manifest was never opened would be the
|
|
269
|
-
* boundary exists to refuse
|
|
345
|
+
* The row is published with `manifestRead: false` and nothing counted: the
|
|
346
|
+
* error is the refusal the builder publishes once for the run, and a bare
|
|
347
|
+
* `ok` row for a plugin whose manifest was never opened would be the
|
|
348
|
+
* reassuring lie this whole boundary exists to refuse — `manifestRead` is
|
|
349
|
+
* what tells the two apart. A manifest the OS will not read is the same
|
|
350
|
+
* claim: the row is `manifestRead: false` and the builder names it in that refusal.
|
|
270
351
|
*/
|
|
271
352
|
async function validateContainedPlugin(pluginDir, marketplacePath, boundary, validation) {
|
|
272
353
|
const manifestPath = safePath.join(pluginDir, '.claude-plugin', 'plugin.json');
|
|
273
|
-
|
|
354
|
+
// No presence probe: `contains` reads the chain, and an absent (or dangling) manifest is inside.
|
|
355
|
+
if (!boundary.contains(manifestPath)) {
|
|
274
356
|
return {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
357
|
+
manifestRead: false,
|
|
358
|
+
result: {
|
|
359
|
+
path: pluginDir,
|
|
360
|
+
type: 'claude-plugin',
|
|
361
|
+
...summarizeIssues([]),
|
|
362
|
+
description: `Plugin manifest not read: ${issueLocation(manifestPath, marketplacePath)} resolves outside the marketplace root`,
|
|
363
|
+
issues: [],
|
|
364
|
+
},
|
|
281
365
|
};
|
|
282
366
|
}
|
|
283
367
|
// `locationRoot` is not optional here even though the parameter is: omitted,
|
|
@@ -286,12 +370,19 @@ async function validateContainedPlugin(pluginDir, marketplacePath, boundary, val
|
|
|
286
370
|
// and skill findings beside them — and every plugin's manifest collapses to
|
|
287
371
|
// the same `.claude-plugin/plugin.json`.
|
|
288
372
|
const rawResult = await validatePlugin(pluginDir, { strict: true, locationRoot: marketplacePath });
|
|
373
|
+
// A manifest the OS refused is a `SCAN_PATH_UNREADABLE` WARNING from the
|
|
374
|
+
// validator — right for `vat audit`, a pass for this gate. Read off the RAW
|
|
375
|
+
// issues, so a severity override cannot turn "not read" back into "read".
|
|
376
|
+
const manifestLocation = issueLocation(manifestPath, marketplacePath);
|
|
377
|
+
const manifestRead = !rawResult.issues.some((issue) => issue.code === 'SCAN_PATH_UNREADABLE' && issue.location === manifestLocation);
|
|
289
378
|
const pluginIssues = resolveIssueSeverity(rawResult.issues, validation);
|
|
290
379
|
return {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
380
|
+
manifestRead,
|
|
381
|
+
result: {
|
|
382
|
+
...rawResult,
|
|
383
|
+
issues: pluginIssues,
|
|
384
|
+
...summarizeIssues(pluginIssues),
|
|
385
|
+
},
|
|
295
386
|
};
|
|
296
387
|
}
|
|
297
388
|
/**
|
|
@@ -304,15 +395,35 @@ async function validateContainedPlugin(pluginDir, marketplacePath, boundary, val
|
|
|
304
395
|
*/
|
|
305
396
|
function undeclaredPluginDirs(marketplacePath, validatedDirs) {
|
|
306
397
|
const pluginsDir = safePath.join(marketplacePath, 'plugins');
|
|
307
|
-
if (!
|
|
398
|
+
if (!pathPresent(pluginsDir, { follow: marketplacePath }, everywhere('source'), 'probe'))
|
|
308
399
|
return [];
|
|
309
400
|
return readdirSync(pluginsDir, { withFileTypes: true })
|
|
310
401
|
// Followed: a plugin directory that is a link is a plugin the marketplace
|
|
311
402
|
// ships, and `validatedDirs` is real paths for exactly that reason.
|
|
312
|
-
.
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
.
|
|
403
|
+
.flatMap((entry) => {
|
|
404
|
+
const dir = safePath.join(pluginsDir, entry.name);
|
|
405
|
+
const real = undeclaredCandidateIdentity(pluginsDir, entry, marketplacePath);
|
|
406
|
+
return real === undefined || validatedDirs.has(real) ? [] : [issueLocation(dir, marketplacePath)];
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* The real path of a `plugins/` entry that resolves to a directory, or `undefined` when it does
|
|
411
|
+
* not. An entry whose link chain names a network or device path is never followed: no declared
|
|
412
|
+
* source can resolve to it (the source lane refuses the same chain), so it is listed by its own
|
|
413
|
+
* spelling — named, never silently dropped.
|
|
414
|
+
*/
|
|
415
|
+
function undeclaredCandidateIdentity(pluginsDir, entry, within) {
|
|
416
|
+
const dir = safePath.join(pluginsDir, entry.name);
|
|
417
|
+
try {
|
|
418
|
+
if (direntKindFollowingSync(pluginsDir, entry, within) !== 'directory')
|
|
419
|
+
return undefined;
|
|
420
|
+
return toForwardSlash(normalizePath(dir, within));
|
|
421
|
+
}
|
|
422
|
+
catch (error) {
|
|
423
|
+
if (!isLinkChainRefusedError(error))
|
|
424
|
+
throw error;
|
|
425
|
+
return dir;
|
|
426
|
+
}
|
|
316
427
|
}
|
|
317
428
|
/**
|
|
318
429
|
* The `validation` config governing findings about `marketplacePath`.
|
|
@@ -352,7 +463,7 @@ function resolveProjectValidationConfig(marketplacePath, logger) {
|
|
|
352
463
|
if (projectRoot === null)
|
|
353
464
|
return undefined;
|
|
354
465
|
try {
|
|
355
|
-
return loadConfig(projectRoot)?.skills?.defaults?.validation;
|
|
466
|
+
return loadConfig(projectRoot, 'source')?.skills?.defaults?.validation;
|
|
356
467
|
}
|
|
357
468
|
catch (error) {
|
|
358
469
|
logger.error(`Warning: could not read ${projectRoot} config for validation.severity overrides — ` +
|
|
@@ -378,8 +489,8 @@ function resolveProjectValidationConfig(marketplacePath, logger) {
|
|
|
378
489
|
*
|
|
379
490
|
* Severity resolution is likewise INSIDE this function rather than a step the
|
|
380
491
|
* command adds after it. Its absence is the whole defect this addressed, and a
|
|
381
|
-
* command-body step is one a caller can forget: with it here, the
|
|
382
|
-
*
|
|
492
|
+
* command-body step is one a caller can forget: with it here, the envelope's
|
|
493
|
+
* `findings` and the `data.plugins[]` tallies derive from a single resolved set, and the
|
|
383
494
|
* smallest testable entry point is the one that includes the filter. The run's
|
|
384
495
|
* `status` — and with it the exit code — is derived one step later, in
|
|
385
496
|
* {@link buildMarketplaceValidateReport}, from the issues the document actually
|
|
@@ -402,70 +513,53 @@ export async function collectMarketplaceFindings(marketplacePath, logger) {
|
|
|
402
513
|
// These issues are deliberately NOT severity-resolved: an override governs
|
|
403
514
|
// findings ABOUT a marketplace that could be read, not the failure to read
|
|
404
515
|
// one. Resolving them would let `MARKETPLACE_MISSING_MANIFEST: ignore` empty
|
|
405
|
-
// the list and report `status:
|
|
406
|
-
|
|
407
|
-
if (marketplaceResult.status === 'error') {
|
|
516
|
+
// the list and report `status: ok` beside a manifest that is missing — a run that never happened claiming it passed.
|
|
517
|
+
if (marketplaceResult.summary.errors > 0) {
|
|
408
518
|
return {
|
|
409
519
|
marketplaceResult,
|
|
410
520
|
pluginResults: [],
|
|
411
521
|
undeclared: [],
|
|
412
522
|
refused: [],
|
|
523
|
+
unread: [],
|
|
413
524
|
issues: [...marketplaceResult.issues],
|
|
414
525
|
};
|
|
415
526
|
}
|
|
416
527
|
const validation = resolveProjectValidationConfig(marketplacePath, logger);
|
|
417
528
|
const fileIssues = checkMarketplaceFiles(marketplacePath);
|
|
418
|
-
const { pluginResults, undeclared, refused, issues: pluginIssues } = await validateDeclaredPlugins(marketplacePath, marketplaceResult.metadata?.localPluginSources ?? [], validation);
|
|
529
|
+
const { pluginResults, undeclared, refused, unread, issues: pluginIssues } = await validateDeclaredPlugins(marketplacePath, marketplaceResult.metadata?.localPluginSources ?? [], validation);
|
|
419
530
|
const issues = [
|
|
420
531
|
...resolveIssueSeverity(marketplaceResult.issues, validation),
|
|
421
532
|
...resolveIssueSeverity(fileIssues, validation),
|
|
422
533
|
...pluginIssues,
|
|
423
534
|
];
|
|
424
|
-
return { marketplaceResult, pluginResults, undeclared, refused, issues };
|
|
535
|
+
return { marketplaceResult, pluginResults, undeclared, refused, unread, issues };
|
|
425
536
|
}
|
|
426
537
|
/**
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
* `join(root, location)` names a real file — so a row keyed `(no location)`
|
|
432
|
-
* would be a path that resolves to nothing, which is the coordinate lie `root`
|
|
433
|
-
* exists to prevent. The row is published with `unlocated: true` and no
|
|
434
|
-
* `location` instead. Dropping such findings was the other option and is the
|
|
435
|
-
* worse one: grouping by `location` is exactly the operation that silently
|
|
436
|
-
* loses them, and a shorter summary is the reassuring failure.
|
|
437
|
-
*/
|
|
438
|
-
const UNLOCATED = Symbol('unlocated');
|
|
439
|
-
/**
|
|
440
|
-
* Collapse a flat finding list onto one counts-only row per `location`.
|
|
441
|
-
*
|
|
442
|
-
* `location` is this command's per-asset unit: `plugins/alpha/.claude-plugin/
|
|
443
|
-
* plugin.json`, `plugins/beta/skills/x/SKILL.md`. Rows come out in first-seen
|
|
444
|
-
* order, and a location with no findings has no row — there is nothing to
|
|
445
|
-
* filter here, because a location only exists in this listing by having emitted
|
|
446
|
-
* something.
|
|
538
|
+
* The plugin entries the run examined: every REMOTE entry — the manifest's
|
|
539
|
+
* schema is its whole validation, and it passed — plus every declared local
|
|
540
|
+
* plugin the walk reached. A local entry whose source did not resolve is not
|
|
541
|
+
* counted; the builder's run-integrity finding names it.
|
|
447
542
|
*
|
|
448
|
-
*
|
|
449
|
-
*
|
|
450
|
-
* {@link MarketplaceValidateReportInput.root}).
|
|
543
|
+
* Remote entries count because an all-remote marketplace is a real verdict
|
|
544
|
+
* about a manifest whose every entry validated, not a run over nothing.
|
|
451
545
|
*/
|
|
452
|
-
|
|
453
|
-
const
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
}
|
|
546
|
+
function pluginEntriesExamined(marketplace, pluginResults) {
|
|
547
|
+
const declared = marketplace?.pluginEntries ?? 0;
|
|
548
|
+
const local = marketplace?.localPluginSources?.length ?? 0;
|
|
549
|
+
return declared - local + pluginResults.length;
|
|
550
|
+
}
|
|
551
|
+
/** The manifest's facts the document publishes, or `null` when it did not validate. */
|
|
552
|
+
function marketplaceData(marketplace) {
|
|
553
|
+
if (marketplace === undefined)
|
|
554
|
+
return null;
|
|
555
|
+
const { name, description, version, pluginEntries, localPluginSources } = marketplace;
|
|
556
|
+
return {
|
|
557
|
+
...(name === undefined ? {} : { name }),
|
|
558
|
+
...(description === undefined ? {} : { description }),
|
|
559
|
+
...(version === undefined ? {} : { version }),
|
|
560
|
+
...(pluginEntries === undefined ? {} : { pluginEntries }),
|
|
561
|
+
...(localPluginSources === undefined ? {} : { localPluginSources }),
|
|
562
|
+
};
|
|
469
563
|
}
|
|
470
564
|
/**
|
|
471
565
|
* Build the report `vat claude marketplace validate` publishes on stdout.
|
|
@@ -475,57 +569,50 @@ export function summarizeIssuesByLocation(issues) {
|
|
|
475
569
|
* builder serves both exits (manifest-missing bail and full run) so the
|
|
476
570
|
* document has a single shape either way.
|
|
477
571
|
*
|
|
572
|
+
* `status` and `summary` are derived by `buildReport` from the findings — the
|
|
573
|
+
* run-integrity refusal below included — so the status, the counts and the
|
|
574
|
+
* exit code cannot disagree. A plugin row's `summary` is the tally of the
|
|
575
|
+
* findings its own validator published; every finding itself is on the
|
|
576
|
+
* envelope, once.
|
|
577
|
+
*
|
|
478
578
|
* Being pure is also the limit of what it can guarantee: it re-bases `path`,
|
|
479
579
|
* and passes `issues` through verbatim. The single-coordinate-system property
|
|
480
580
|
* is therefore only as true as its inputs — see `root` above — and is enforced
|
|
481
581
|
* against a real marketplace in `payload-path-coordinates.test.ts`, not here.
|
|
482
582
|
*/
|
|
483
583
|
export function buildMarketplaceValidateReport(input) {
|
|
484
|
-
const { root, marketplace, pluginResults, undeclared, refused
|
|
485
|
-
const
|
|
486
|
-
|
|
584
|
+
const { root, marketplace, pluginResults, undeclared, refused } = input;
|
|
585
|
+
const unread = [...unreadManifests(pluginResults, refused, root), ...input.unread];
|
|
586
|
+
const findings = toFindings([
|
|
587
|
+
...unfinishedRunFinding(marketplace, pluginResults, refused, unread),
|
|
487
588
|
...input.issues,
|
|
488
|
-
];
|
|
489
|
-
const
|
|
490
|
-
const plugins = pluginResults.map(({ name, source, result }) => ({
|
|
589
|
+
]);
|
|
590
|
+
const plugins = pluginResults.map(({ name, source, result, manifestRead }) => ({
|
|
491
591
|
name,
|
|
492
592
|
source,
|
|
493
|
-
path: result.path,
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
issues: result.issues,
|
|
593
|
+
path: relativizePath(result.path, root),
|
|
594
|
+
manifestRead,
|
|
595
|
+
...summarizeIssues(toFindings(result.issues)),
|
|
497
596
|
}));
|
|
498
|
-
return {
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
refused: [...refused],
|
|
518
|
-
// One row per inspected asset by default; the flat per-issue list under
|
|
519
|
-
// `--verbose`. Either way every `location` stays relative to `root` above.
|
|
520
|
-
issues: verbose === true ? issues : summarizeIssuesByLocation(issues),
|
|
521
|
-
// Counts ride beside the status: `status` names only the worst ACTIONABLE
|
|
522
|
-
// severity, so an info-only run is `success` and the info would otherwise
|
|
523
|
-
// be unreported.
|
|
524
|
-
issueCounts,
|
|
525
|
-
summary: bailSummary
|
|
526
|
-
?? `${issueCounts.errors} error(s), ${issueCounts.warnings} warning(s), ${issueCounts.info} info`,
|
|
527
|
-
duration,
|
|
528
|
-
};
|
|
597
|
+
return buildReport({
|
|
598
|
+
examined: pluginEntriesExamined(marketplace, pluginResults),
|
|
599
|
+
findings,
|
|
600
|
+
data: {
|
|
601
|
+
// Stated once, and the only absolute path in the document.
|
|
602
|
+
root,
|
|
603
|
+
marketplace: marketplaceData(marketplace),
|
|
604
|
+
plugins,
|
|
605
|
+
// Named, not graded — see `validateDeclaredPlugins`. Always present, so an
|
|
606
|
+
// empty list is a statement that `plugins/` was looked at.
|
|
607
|
+
undeclared: [...undeclared],
|
|
608
|
+
// Paths the walk would not open (real path outside the root) — see
|
|
609
|
+
// `WalkBoundary`. Always present: an empty list says every path the run
|
|
610
|
+
// read was under `root`, which is the containment claim the help text makes.
|
|
611
|
+
refused: [...refused],
|
|
612
|
+
},
|
|
613
|
+
gate: GATE,
|
|
614
|
+
durationMs: input.durationMs,
|
|
615
|
+
});
|
|
529
616
|
}
|
|
530
617
|
/**
|
|
531
618
|
* The refusal for a run in which a declared local source did not resolve.
|
|
@@ -570,10 +657,10 @@ export function buildMarketplaceValidateReport(input) {
|
|
|
570
657
|
* @param refused - Root-relative paths the walk would not open
|
|
571
658
|
* @returns The one finding, or nothing
|
|
572
659
|
*/
|
|
573
|
-
function unfinishedRunFinding(marketplace, validated, refused) {
|
|
660
|
+
function unfinishedRunFinding(marketplace, validated, refused, unread) {
|
|
574
661
|
const declared = marketplace?.localPluginSources ?? [];
|
|
575
662
|
const unresolved = declared.filter((entry) => !validated.some((v) => v.name === entry.name && v.source === entry.source));
|
|
576
|
-
if (unresolved.length === 0 && refused.length === 0)
|
|
663
|
+
if (unresolved.length === 0 && refused.length === 0 && unread.length === 0)
|
|
577
664
|
return [];
|
|
578
665
|
const parts = [];
|
|
579
666
|
if (unresolved.length > 0) {
|
|
@@ -596,17 +683,46 @@ function unfinishedRunFinding(marketplace, validated, refused) {
|
|
|
596
683
|
+ ' they hold — this command never leaves the directory it was pointed at. Replace each link'
|
|
597
684
|
+ ' with the files it points at, or move its target under the marketplace root.');
|
|
598
685
|
}
|
|
686
|
+
if (unread.length > 0) {
|
|
687
|
+
const named = unread.map((path) => `\`${path}\``).join(', ');
|
|
688
|
+
parts.push(`The operating system refused to let this run read ${unread.length} path(s) inside a validated plugin: ${named}`
|
|
689
|
+
+ ' (the SCAN_PATH_UNREADABLE finding beside each names the errno). Nothing behind them was'
|
|
690
|
+
+ ' checked — a plugin.json\'s manifest checks, a skill\'s SKILL.md checks — so this document is'
|
|
691
|
+
+ ' not a verdict about them. Make each path readable — check its permissions and ownership — and re-run.');
|
|
692
|
+
}
|
|
599
693
|
return [runIntegrityFinding(parts.join(' '))];
|
|
600
694
|
}
|
|
601
695
|
/**
|
|
602
|
-
*
|
|
603
|
-
*
|
|
696
|
+
* The root-relative manifest of every plugin row whose manifest was not read
|
|
697
|
+
* for a reason OTHER than a link out of the root — those are already named in
|
|
698
|
+
* `refused`. Derived from the document's own rows, like the rest of the refusal.
|
|
699
|
+
*/
|
|
700
|
+
function unreadManifests(pluginResults, refused, root) {
|
|
701
|
+
const manifests = pluginResults
|
|
702
|
+
.filter((row) => !row.manifestRead)
|
|
703
|
+
.map((row) => toForwardSlash(safePath.join(relativizePath(row.result.path, root), '.claude-plugin', 'plugin.json')))
|
|
704
|
+
.filter((manifest) => !refused.includes(manifest));
|
|
705
|
+
return [...new Set(manifests)];
|
|
706
|
+
}
|
|
707
|
+
/** The human half, on stderr: every error in full, and the rest under `--verbose`. */
|
|
708
|
+
function logFindings(report, verbose, logger) {
|
|
709
|
+
for (const finding of report.findings) {
|
|
710
|
+
if (!verbose && finding.severity !== 'error' && finding.code !== RUN_INTEGRITY_CODE)
|
|
711
|
+
continue;
|
|
712
|
+
const anchor = finding.location === undefined ? '' : `${finding.location}: `;
|
|
713
|
+
logger.error(` ${anchor}${finding.severity}: ${finding.message} [${finding.code}]`);
|
|
714
|
+
}
|
|
715
|
+
const { errors, warnings, info } = report.summary;
|
|
716
|
+
logger.info(`${errors} error(s), ${warnings} warning(s), ${info} info`);
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Validate a marketplace and hand back its report, printing nothing on stdout.
|
|
604
720
|
*
|
|
605
721
|
* The phase entry point for `vat verify`, which runs this once per configured
|
|
606
|
-
* marketplace
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
*
|
|
722
|
+
* marketplace, and the command's own. The report is the one BEFORE the
|
|
723
|
+
* writer's run-integrity pass: inside an orchestrator, `runPhase` applies the same
|
|
724
|
+
* pass to this phase's report, by the declaration this verb gives its own writer. A refusal is the envelope's error
|
|
725
|
+
* branch, its message already on stderr.
|
|
610
726
|
*/
|
|
611
727
|
export async function runMarketplaceValidatePhase(targetPath, options) {
|
|
612
728
|
const logger = createLogger(options.debug ? { debug: true } : {});
|
|
@@ -614,39 +730,54 @@ export async function runMarketplaceValidatePhase(targetPath, options) {
|
|
|
614
730
|
try {
|
|
615
731
|
const marketplacePath = safePath.resolve(targetPath ?? '.');
|
|
616
732
|
logger.info(`Validating marketplace: ${marketplacePath}`);
|
|
617
|
-
const { marketplaceResult, pluginResults, undeclared, refused, issues } = await collectMarketplaceFindings(marketplacePath, logger);
|
|
618
|
-
|
|
619
|
-
// found. Both emit through the one builder, so the document has a single
|
|
620
|
-
// shape either way.
|
|
621
|
-
const bailed = marketplaceResult.status === 'error';
|
|
622
|
-
const document = buildMarketplaceValidateReport({
|
|
733
|
+
const { marketplaceResult, pluginResults, undeclared, refused, unread, issues } = await collectMarketplaceFindings(marketplacePath, logger);
|
|
734
|
+
const report = buildMarketplaceValidateReport({
|
|
623
735
|
root: marketplacePath,
|
|
624
736
|
marketplace: marketplaceResult.metadata,
|
|
625
737
|
pluginResults,
|
|
626
738
|
undeclared,
|
|
627
739
|
refused,
|
|
740
|
+
unread,
|
|
628
741
|
issues,
|
|
629
|
-
|
|
630
|
-
duration: formatDuration(Date.now() - startTime),
|
|
631
|
-
verbose: options.verbose === true,
|
|
742
|
+
durationMs: Date.now() - startTime,
|
|
632
743
|
});
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
// code computed upstream of it would answer 0 over `status: error`.
|
|
636
|
-
return { document, exitCode: document.status === 'error' ? 1 : 0 };
|
|
744
|
+
logFindings(report, options.verbose === true, logger);
|
|
745
|
+
return { report };
|
|
637
746
|
}
|
|
638
747
|
catch (error) {
|
|
639
|
-
return {
|
|
640
|
-
document: reportCommandError(error, logger, startTime, 'MarketplaceValidate'),
|
|
641
|
-
exitCode: 2,
|
|
642
|
-
failed: true,
|
|
643
|
-
};
|
|
748
|
+
return { report: refusedReport(error) };
|
|
644
749
|
}
|
|
645
750
|
}
|
|
751
|
+
/** The error branch for a run that could not do its job — classified by code, never by message. */
|
|
752
|
+
function refusedReport(error) {
|
|
753
|
+
return refusalReport(refusalCodeOf(error), error, GATE, NOTHING_FINISHED);
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* The command lane: the operator's `[path]` is judged before anything runs.
|
|
757
|
+
*
|
|
758
|
+
* A path naming nothing is the invocation's mistake (`USAGE_INVALID`); one the
|
|
759
|
+
* OS will not list is the input's (`INPUT_UNREADABLE`). Neither is a finding
|
|
760
|
+
* about a marketplace. Only the TYPED argument is judged: `vat verify` hands
|
|
761
|
+
* the phase a path it computed (`dist/.claude/plugins/marketplaces/<name>`),
|
|
762
|
+
* where an absent directory is an unbuilt marketplace — a finding about the
|
|
763
|
+
* project (`MARKETPLACE_MISSING_MANIFEST`), not an invocation mistake.
|
|
764
|
+
*/
|
|
646
765
|
async function marketplaceValidateCommand(targetPath, options) {
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
766
|
+
let report;
|
|
767
|
+
try {
|
|
768
|
+
const marketplacePath = assertReadableDirectoryArgument(targetPath ?? '.');
|
|
769
|
+
({ report } = await runMarketplaceValidatePhase(marketplacePath, options));
|
|
770
|
+
}
|
|
771
|
+
catch (error) {
|
|
772
|
+
// Only the argument check throws here: the phase returns its own refusals.
|
|
773
|
+
report = refusedReport(error);
|
|
774
|
+
}
|
|
775
|
+
const published = publishedReport('claude marketplace validate', report);
|
|
776
|
+
// The writer's own zero-examined refusal, warned in the lane that publishes it.
|
|
777
|
+
if (published !== report)
|
|
778
|
+
warnRunIntegrity(published);
|
|
779
|
+
// This command offers no `--format`: its document is YAML.
|
|
780
|
+
endWithReport('claude marketplace validate', published, 'yaml');
|
|
650
781
|
}
|
|
651
782
|
export function createMarketplaceValidateCommand() {
|
|
652
783
|
const command = new Command('validate');
|
|
@@ -654,7 +785,7 @@ export function createMarketplaceValidateCommand() {
|
|
|
654
785
|
.description('Validate a marketplace directory for publishing')
|
|
655
786
|
.argument('[path]', 'Path to marketplace directory (default: current directory)')
|
|
656
787
|
.option('-d, --debug', 'Enable debug logging')
|
|
657
|
-
.option('-v, --verbose', '
|
|
788
|
+
.option('-v, --verbose', 'Print every finding in full on stderr, not only the errors')
|
|
658
789
|
.action(marketplaceValidateCommand)
|
|
659
790
|
.addHelpText('after', `
|
|
660
791
|
Description:
|
|
@@ -663,40 +794,53 @@ Description:
|
|
|
663
794
|
|
|
664
795
|
Plugin versions are required (error, not warning) in strict marketplace validation.
|
|
665
796
|
|
|
666
|
-
Output (YAML on stdout):
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
797
|
+
Output (YAML on stdout — the report envelope):
|
|
798
|
+
status: ok | findings | error. findings means at least one finding was
|
|
799
|
+
published; error means the run did not finish (error.code says why).
|
|
800
|
+
examined: the plugin entries validated — every remote entry of
|
|
801
|
+
marketplace.json plus each declared local plugin the walk reached.
|
|
802
|
+
summary: the findings by severity.
|
|
803
|
+
findings[]: every finding, flat — {code, severity, message, location, …};
|
|
804
|
+
location is relative to data.root.
|
|
805
|
+
data.root: the marketplace directory — every path in the document is
|
|
806
|
+
relative to it.
|
|
807
|
+
data.marketplace: the manifest's name, version, pluginEntries and
|
|
808
|
+
localPluginSources; null when the manifest is missing or invalid.
|
|
809
|
+
data.plugins[]: one row per declared local plugin walked — {name, source,
|
|
810
|
+
path, manifestRead, status, summary}. A declared source that does
|
|
811
|
+
not resolve is reported as RESOURCE_CHECK_BROKEN at error (exit 1),
|
|
812
|
+
naming it, rather than as a pass — a plugin the manifest ships and
|
|
813
|
+
this run never saw is not a verdict. A source is never followed
|
|
814
|
+
outside the root: an absolute path or a ".." segment fails the
|
|
815
|
+
manifest schema, and a symlink that points out is refused like an
|
|
816
|
+
unresolved source. Co-located marketplaces (source: "./") are
|
|
817
|
+
validated at the root. An all-remote marketplace has nothing local
|
|
818
|
+
to walk; its entries still count as examined.
|
|
819
|
+
data.undeclared: directories under plugins/ that no manifest entry names.
|
|
681
820
|
Listed only — they cannot be installed, so they are neither
|
|
682
821
|
validated nor a failure.
|
|
683
|
-
refused: paths inside a validated plugin this run would not open
|
|
684
|
-
they resolve outside the root (a skills/ dir, skill dir,
|
|
685
|
-
or plugin.json that is a symlink pointing out). Containment
|
|
686
|
-
real path at every depth, not only at the declared source;
|
|
687
|
-
named here and in the RESOURCE_CHECK_BROKEN finding (exit 1).
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
(
|
|
691
|
-
|
|
822
|
+
data.refused: paths inside a validated plugin this run would not open
|
|
823
|
+
because they resolve outside the root (a skills/ dir, skill dir,
|
|
824
|
+
SKILL.md or plugin.json that is a symlink pointing out). Containment
|
|
825
|
+
is by real path at every depth, not only at the declared source;
|
|
826
|
+
each is named here and in the RESOURCE_CHECK_BROKEN finding (exit 1).
|
|
827
|
+
A plugin.json the OS will not read is the same: its row is
|
|
828
|
+
manifestRead: false and the RESOURCE_CHECK_BROKEN finding names it
|
|
829
|
+
(exit 1) beside the SCAN_PATH_UNREADABLE warning — never a pass. So
|
|
830
|
+
is a plugin's skills/ directory the OS will not list, or a skill
|
|
831
|
+
directory or SKILL.md it will not stat or read: named in that
|
|
832
|
+
finding (exit 1), each beside its SCAN_PATH_UNREADABLE warning.
|
|
692
833
|
|
|
693
|
-
|
|
694
|
-
|
|
834
|
+
stderr prints every error in full; --verbose adds every warning and info.
|
|
835
|
+
The document is the same either way.
|
|
695
836
|
|
|
696
|
-
Exit Codes:
|
|
697
|
-
0 -
|
|
698
|
-
1 -
|
|
699
|
-
|
|
837
|
+
Exit Codes (derived from the document):
|
|
838
|
+
0 - status ok, or findings with no error-severity finding
|
|
839
|
+
1 - status findings with at least one error-severity finding (including a
|
|
840
|
+
marketplace declaring no plugin entry: nothing was examined)
|
|
841
|
+
2 - status error: the run did not finish — USAGE_INVALID for a path that
|
|
842
|
+
does not exist or is not a directory, INPUT_UNREADABLE for one the OS
|
|
843
|
+
will not list
|
|
700
844
|
|
|
701
845
|
Example:
|
|
702
846
|
$ vat claude marketplace validate . # Validate current directory
|