@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
|
@@ -6,29 +6,31 @@
|
|
|
6
6
|
* (commands, hooks, agents, .mcp.json, skills/, .claude-plugin/plugin.json) and
|
|
7
7
|
* imports pool skills (from dist/skills/) via the `skills:` selector.
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
9
|
+
import { mkdir, readdir } from 'node:fs/promises';
|
|
10
|
+
import { conventionalSuiteProbe, createProjectRegistry, getMarketplaceOutputDir, getPluginSourceDir, isSkillPackagingInputError, listPluginSourceSkillDirs, listUntrackedPluginSkillDirs, materializeIssue, packageSkillInto, packagingConfigToPackageOptions, pluginDirInMarketplace, skillNameToFsPath, stagedPathMapper } from '@vibe-agent-toolkit/agent-skills';
|
|
11
|
+
import { buildReport, toFindings } from '@vibe-agent-toolkit/schema';
|
|
12
|
+
import { applyTreePlan, compareCodeUnits, direntKindFollowing, everyInOrder, foldedSegment, forEachInOrder, isSingleFsSegment, issueLocation, isTreeChangeResidue, mapInOrder, pathPresent, planTreeChanges, relativeEscapesRoot, safePath, sideWithin, toForwardSlash, VatError, withFsFault, writeFileUnder } from '@vibe-agent-toolkit/utils';
|
|
13
|
+
import { onCrawlOutput } from '@vibe-agent-toolkit/utils/crawl';
|
|
14
14
|
import { Command } from 'commander';
|
|
15
15
|
import { readPluginLocalSkillName } from '../../../commands/skills/skill-discovery.js';
|
|
16
|
-
import {
|
|
16
|
+
import { CommandRefusalError, errorMessageOf, refusalCodeOf } from '../../../utils/command-refusal.js';
|
|
17
17
|
import { loadConfig } from '../../../utils/config-loader.js';
|
|
18
|
-
import {
|
|
18
|
+
import { endWithReport, leftoverFindingsOf, leftoverIssue, NOTHING_FINISHED, refusalReport } from '../../../utils/document-writer.js';
|
|
19
|
+
import { collectPostBuildIssues, formatIssueLines, formatIssueSetHeading, formatPackagedFileCount, issuesToRenderAtVerbosity, } from '../../../utils/issue-rendering.js';
|
|
19
20
|
import { createLogger } from '../../../utils/logger.js';
|
|
20
|
-
import {
|
|
21
|
+
import { copyFileIntoMarketplace, copyTreeIntoMarketplace, writingMarketplace } from '../../../utils/marketplace-io.js';
|
|
21
22
|
import { readPackageJsonOrAbsent } from '../../../utils/package-json.js';
|
|
23
|
+
import { requireInputPath } from '../../../utils/project-root-policy.js';
|
|
22
24
|
import { withResourcePopulationSource } from '../../../utils/resource-loader.js';
|
|
23
25
|
import { collectDeclaredEvalSuites, mergeSkillPackagingConfig, pluginLocalSkillConfigEntry } from '../../../utils/skill-packaging-config.js';
|
|
24
|
-
import {
|
|
26
|
+
import { packagingFailedIssue } from '../../skills/build.js';
|
|
25
27
|
import { discoverSkillsFromConfig } from '../../skills/skill-discovery.js';
|
|
26
|
-
import { loadClaudeProjectConfig } from '../claude-config.js';
|
|
28
|
+
import { assertMarketplaceDeclared, loadClaudeProjectConfig } from '../claude-config.js';
|
|
27
29
|
import { buildMarketplaceJson } from './marketplace-json.js';
|
|
28
30
|
import { resolvePluginChangelogPath } from './plugin-changelog.js';
|
|
29
31
|
import { applyPluginFiles } from './plugin-files.js';
|
|
30
32
|
import { mergePluginJson, resolveVersion } from './plugin-json-merge.js';
|
|
31
|
-
import { parsePluginJsonFiles, verifyNoCaseCollidingPluginNames, verifyPluginDirCaseMatch, } from './plugin-validators.js';
|
|
33
|
+
import { parsePluginJsonFiles, readAuthorPluginJson, verifyNoCaseCollidingPluginNames, verifyPluginDirCaseMatch, } from './plugin-validators.js';
|
|
32
34
|
import { treeCopyPlugin } from './tree-copy.js';
|
|
33
35
|
const CLAUDE_PLUGIN_DIRNAME = '.claude-plugin';
|
|
34
36
|
export function createPluginBuildCommand() {
|
|
@@ -61,6 +63,10 @@ Description:
|
|
|
61
63
|
wherever the other marketplace/repo actually publishes it. Use this to
|
|
62
64
|
cherry-pick a plugin from one marketplace into another without vendoring it.
|
|
63
65
|
|
|
66
|
+
Each marketplace is built whole beside dist/.claude/plugins/marketplaces/
|
|
67
|
+
<marketplace> and swapped in once every plugin passed: a failure, or a plugin
|
|
68
|
+
the post-build gate stops, leaves the previous marketplace exactly as it was.
|
|
69
|
+
|
|
64
70
|
Output structure:
|
|
65
71
|
dist/.claude/plugins/marketplaces/<marketplace>/
|
|
66
72
|
.claude-plugin/marketplace.json
|
|
@@ -69,63 +75,124 @@ Output structure:
|
|
|
69
75
|
skills/<skillName>/SKILL.md
|
|
70
76
|
|
|
71
77
|
Output:
|
|
72
|
-
YAML
|
|
78
|
+
YAML report -> stdout: status (ok | findings | error), summary, examined
|
|
79
|
+
(marketplaces built), findings (each with its location), and data:
|
|
80
|
+
marketplacesBuilt, pluginsBuilt, pluginsReferenced, skillsPackaged, and
|
|
81
|
+
marketplaces[] of { name, status, reason?, plugins[] { name, outputPath,
|
|
82
|
+
skills }, externalPlugins[] }. Paths are relative to the directory holding
|
|
83
|
+
vibe-agent-toolkit.config.yaml.
|
|
73
84
|
Build progress -> stderr
|
|
74
85
|
|
|
75
86
|
On stderr, each packaged skill's findings heading names the whole set and
|
|
76
87
|
its severity breakdown, and errors are always printed in full beneath it.
|
|
77
88
|
Warnings and info findings stay collapsed into that heading unless
|
|
78
|
-
--verbose. The stdout
|
|
79
|
-
|
|
89
|
+
--verbose. The stdout report is NOT affected by --verbose: its findings
|
|
90
|
+
are every finding at every verbosity.
|
|
80
91
|
|
|
81
92
|
Exit Codes:
|
|
82
|
-
0 -
|
|
83
|
-
1 -
|
|
84
|
-
|
|
93
|
+
0 - Built; findings, if any, are warnings or info
|
|
94
|
+
1 - An error-severity finding: a plugin-local skill failed the post-build
|
|
95
|
+
gate (the build stops there — that marketplace is not replaced and
|
|
96
|
+
nothing after it is built), or no marketplace is configured
|
|
97
|
+
(RESOURCE_CHECK_BROKEN)
|
|
98
|
+
2 - The build could not run (error.code): USAGE_INVALID (an undeclared
|
|
99
|
+
--marketplace), CONFIG_INVALID (no config; an empty or colliding plugin
|
|
100
|
+
declaration; an invalid files[].dest), INPUT_UNREADABLE (a plugin file
|
|
101
|
+
that is not JSON, a pool skill or files[].source nothing built, a
|
|
102
|
+
symlink no bundle can ship, a file the build copies -- LICENSE,
|
|
103
|
+
README.md, CHANGELOG.md, a plugin file, a files[].source, a built skill
|
|
104
|
+
in dist/skills -- that the OS will not read), RUN_INCOMPLETE (the packager refused a
|
|
105
|
+
plugin-local skill's content, e.g. a skill files: source that does not
|
|
106
|
+
exist — the SKILL_PACKAGING_FAILED finding names the skill — or the OS
|
|
107
|
+
would not let the build write its output: a full disk, a read-only
|
|
108
|
+
dist/; no finding). Known gap: a disk so full that the git snapshot
|
|
109
|
+
of the project fails first is still INTERNAL_ERROR ("git did not
|
|
110
|
+
answer ...").
|
|
85
111
|
|
|
86
112
|
Example:
|
|
87
113
|
$ vat skills build && vat claude plugin build # Build skills then wrap for Claude
|
|
88
114
|
`);
|
|
89
115
|
return command;
|
|
90
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* What `vat claude plugin build` writes in the project at `configDir`: every marketplace it
|
|
119
|
+
* replaces lives under this one tree. The one definition — the build's own declaration of its
|
|
120
|
+
* outputs, and what `vat build` tells its skills phase the run writes after it.
|
|
121
|
+
*/
|
|
122
|
+
export function pluginBuildOutput(configDir) {
|
|
123
|
+
return safePath.join(configDir, 'dist', '.claude', 'plugins', 'marketplaces');
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Which side of the run `dist/skills` — the pool skills this build copies in — is on. Under
|
|
127
|
+
* `vat claude plugin build` it is an INPUT another build wrote (`source`: a refusal is fixed by
|
|
128
|
+
* rebuilding it); under `vat build` the run's own skills phase wrote it, so it is one of the
|
|
129
|
+
* run's outputs (`destination`). Asked of the run's ONE declaration of what it writes
|
|
130
|
+
* (`onCrawlOutput`), never decided here a second way.
|
|
131
|
+
*/
|
|
132
|
+
function distSkillsSide(distSkillsDir, outputs) {
|
|
133
|
+
return onCrawlOutput(distSkillsDir, outputs) ? 'destination' : 'source';
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The side of each path a probe of a plugin's source directory touches, walked from the project root.
|
|
137
|
+
* The conventional `plugins/` directory (walked through, and listed to confirm an absence) is plugin
|
|
138
|
+
* source as a whole; a configured `source` is only itself — the directories above it are the project
|
|
139
|
+
* the build writes into.
|
|
140
|
+
*/
|
|
141
|
+
function pluginSourceSideOf(configDir, plugin, pluginSourceDir) {
|
|
142
|
+
const inputRoot = plugin.source === undefined ? safePath.join(configDir, 'plugins') : pluginSourceDir;
|
|
143
|
+
return sideWithin(inputRoot, 'source', 'destination');
|
|
144
|
+
}
|
|
91
145
|
/**
|
|
92
146
|
* Discover available skill names by listing directories in dist/skills/.
|
|
147
|
+
*
|
|
148
|
+
* @param outputs - What the run writes (its one declaration), which decides `dist/skills`' side
|
|
93
149
|
*/
|
|
94
|
-
|
|
150
|
+
function discoverBuiltSkills(configDir, outputs) {
|
|
95
151
|
const skillsDir = safePath.join(configDir, 'dist', 'skills');
|
|
96
|
-
|
|
97
|
-
|
|
152
|
+
// A probe or a listing the OS refuses is on dist/skills' side of the run (see `distSkillsSide`);
|
|
153
|
+
// `dist/` itself, walked through and listed to confirm an absence, is the project's: the tree the build writes.
|
|
154
|
+
const side = distSkillsSide(skillsDir, outputs);
|
|
155
|
+
// "Not built" only once `dist/`'s listing agrees: a wrong absent silently builds every plugin without its skills.
|
|
156
|
+
if (!pathPresent(skillsDir, { follow: configDir }, sideWithin(skillsDir, side, 'destination'), 'confirmed')) {
|
|
157
|
+
return Promise.resolve([]);
|
|
98
158
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
159
|
+
return withFsFault({ side, origin: 'content', action: 'list the built skills', path: skillsDir }, async () => {
|
|
160
|
+
const entries = await readdir(skillsDir, { withFileTypes: true });
|
|
161
|
+
const kinds = await Promise.all(entries.map((entry) => direntKindFollowing(skillsDir, entry, configDir)));
|
|
162
|
+
// A staged or parked tree a concurrent or killed `vat skills build` left beside a bundle is no skill.
|
|
163
|
+
return entries.filter((entry, i) => kinds[i] === 'directory' && !isTreeChangeResidue(entry.name)).map((entry) => entry.name);
|
|
164
|
+
});
|
|
102
165
|
}
|
|
103
166
|
/**
|
|
104
167
|
* Build Claude plugin artifacts for a project — the non-exiting orchestration
|
|
105
168
|
* core shared by the `vat claude plugin build` CLI action and `vat skill test`
|
|
106
169
|
* (which builds a declared skill's owning marketplace before staging its dist).
|
|
107
170
|
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* marketplace
|
|
171
|
+
* Pushes each marketplace into `built` as it finishes, so a caller whose catch
|
|
172
|
+
* reads the same array publishes the marketplaces that finished before a throw.
|
|
173
|
+
* A marketplace whose plugin failed the gate ({@link MarketplaceBuildResult.gate})
|
|
174
|
+
* is pushed and ends the run. Never calls `process.exit` and never writes stdout.
|
|
111
175
|
*
|
|
112
176
|
* `configDir` is threaded in (the project root that holds
|
|
113
177
|
* vibe-agent-toolkit.config.yaml), so callers that already know the root build
|
|
114
|
-
* against it rather than re-discovering from cwd. `
|
|
115
|
-
* the
|
|
178
|
+
* against it rather than re-discovering from cwd. `projectConfig` is the config
|
|
179
|
+
* the caller already parsed from it, so the file is read (and any unknown-key
|
|
180
|
+
* warning printed) once per run. `options.marketplace` restricts
|
|
181
|
+
* the build to a single marketplace by name, and refuses a name the config does
|
|
182
|
+
* not declare.
|
|
116
183
|
*
|
|
117
184
|
* `options.verbose` affects the stderr findings report ONLY (see
|
|
118
|
-
* `summarizePackagedSkillIssues`); it changes nothing this function returns
|
|
119
|
-
* programmatic caller — `vat skill test`, which builds a marketplace purely to
|
|
120
|
-
* stage a skill — can leave it off and still get the same result objects.
|
|
185
|
+
* `summarizePackagedSkillIssues`); it changes nothing this function returns.
|
|
121
186
|
*/
|
|
122
|
-
|
|
123
|
-
const logger = options
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
187
|
+
async function buildClaudePluginMarketplaces(configDir, projectConfig, options, built) {
|
|
188
|
+
const { logger, verbose } = options;
|
|
189
|
+
// The run's ONE declaration of what it writes: the marketplaces this build replaces, and what the
|
|
190
|
+
// run wrote before it. A fault on, in or above any of them is the destination's.
|
|
191
|
+
const outputs = [pluginBuildOutput(configDir), ...options.runOutputs];
|
|
192
|
+
const marketplaces = projectConfig?.claude?.marketplaces ?? {};
|
|
193
|
+
assertMarketplaceDeclared(options.marketplace, Object.keys(marketplaces));
|
|
194
|
+
if (Object.keys(marketplaces).length === 0) {
|
|
195
|
+
return;
|
|
129
196
|
}
|
|
130
197
|
// Read version from root package.json — lowest-precedence fallback in the
|
|
131
198
|
// per-plugin version chain (config > plugin.json > root). Used so Claude
|
|
@@ -137,7 +204,7 @@ export async function runClaudePluginBuild(configDir, options = {}) {
|
|
|
137
204
|
const rootPkg = readPackageJsonOrAbsent(safePath.join(configDir, 'package.json'));
|
|
138
205
|
const rootVersion = typeof rootPkg?.['version'] === 'string' ? rootPkg['version'] : undefined;
|
|
139
206
|
// Discover available skills from dist/skills/ for pool-to-plugin selectors
|
|
140
|
-
const availableSkills = await discoverBuiltSkills(configDir);
|
|
207
|
+
const availableSkills = await discoverBuiltSkills(configDir, outputs);
|
|
141
208
|
// Load the project's skills config (defaults + per-skill) so each plugin-local
|
|
142
209
|
// skill is PACKAGED with its own effective packaging config — the same config
|
|
143
210
|
// `vat skills build` would use for it. Undefined when no config, in which case
|
|
@@ -156,7 +223,10 @@ export async function runClaudePluginBuild(configDir, options = {}) {
|
|
|
156
223
|
// store and ignore oracle `vat resources validate` uses. `createProjectRegistry`
|
|
157
224
|
// re-applies its own markdown-only `include` to whatever the source offers, so
|
|
158
225
|
// this is a change of COST, not of what the build sees.
|
|
159
|
-
const sharedRegistry = await withResourcePopulationSource({ root: configDir },
|
|
226
|
+
const sharedRegistry = await withResourcePopulationSource({ root: configDir }, (populationSource) => createProjectRegistry(configDir, {
|
|
227
|
+
// What this run writes (see `outputs` above). A fault on, in or above it (the project
|
|
228
|
+
// root included) is the destination's.
|
|
229
|
+
outputs,
|
|
160
230
|
...(populationSource !== undefined && { populationSource }),
|
|
161
231
|
}));
|
|
162
232
|
logger.debug(`Project registry: ${sharedRegistry.getAllResources().length} markdown resources (built once)`);
|
|
@@ -166,8 +236,8 @@ export async function runClaudePluginBuild(configDir, options = {}) {
|
|
|
166
236
|
// a plugin-local skill's bundle must exclude the OTHER skills' suites too — not
|
|
167
237
|
// just its own. Discovery is not free, hence once per run rather than per skill.
|
|
168
238
|
// `'refuse'`: a bundle assembled around a directory discovery could not
|
|
169
|
-
// list may ship another skill's answer key. The throw
|
|
170
|
-
// command
|
|
239
|
+
// list may ship another skill's answer key. The throw carries the classified
|
|
240
|
+
// fault (a `source` listing), which the command publishes as the table says.
|
|
171
241
|
const projectSkills = skillsConfig === undefined
|
|
172
242
|
? []
|
|
173
243
|
: collectDeclaredEvalSuites(skillsConfig, await discoverSkillsFromConfig(skillsConfig, configDir, 'refuse'));
|
|
@@ -182,17 +252,18 @@ export async function runClaudePluginBuild(configDir, options = {}) {
|
|
|
182
252
|
// Run-scoped, never module-scoped: the answer is a filesystem snapshot, and a cache
|
|
183
253
|
// outliving the run would keep answering for a tree that has since changed.
|
|
184
254
|
const suiteProbe = conventionalSuiteProbe();
|
|
185
|
-
const results = [];
|
|
186
255
|
const allPluginNames = [];
|
|
187
256
|
for (const mp of Object.values(marketplaces)) {
|
|
188
257
|
for (const p of mp.plugins)
|
|
189
258
|
allPluginNames.push(p.name);
|
|
190
259
|
}
|
|
191
260
|
verifyNoCaseCollidingPluginNames(allPluginNames);
|
|
192
|
-
|
|
261
|
+
// In order, stopping at the first gated marketplace: each writes its own tree
|
|
262
|
+
// and the log reads marketplace by marketplace.
|
|
263
|
+
await everyInOrder(Object.keys(marketplaces), async (name) => {
|
|
193
264
|
// Skip if --marketplace filter specified and doesn't match
|
|
194
265
|
if (options.marketplace && options.marketplace !== name) {
|
|
195
|
-
|
|
266
|
+
return true;
|
|
196
267
|
}
|
|
197
268
|
const mpConfig = marketplaces[name];
|
|
198
269
|
logger.info(`\n Building marketplace: ${name}`);
|
|
@@ -206,121 +277,138 @@ export async function runClaudePluginBuild(configDir, options = {}) {
|
|
|
206
277
|
registry: sharedRegistry,
|
|
207
278
|
projectSkills,
|
|
208
279
|
suiteProbe,
|
|
280
|
+
outputs,
|
|
209
281
|
logger,
|
|
210
282
|
verbose,
|
|
211
283
|
});
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
284
|
+
built.push(result);
|
|
285
|
+
return result.gate === undefined;
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* {@link buildClaudePluginMarketplaces} for a programmatic caller that only
|
|
290
|
+
* wants the built tree: one result per marketplace built (empty when no
|
|
291
|
+
* `claude.marketplaces` are configured), and a throw — carrying the gate's
|
|
292
|
+
* reason — when a plugin failed the post-build gate, since there is then no
|
|
293
|
+
* complete marketplace to stage from.
|
|
294
|
+
*/
|
|
295
|
+
export async function runClaudePluginBuild(configDir, options) {
|
|
296
|
+
const built = [];
|
|
297
|
+
await buildClaudePluginMarketplaces(configDir, loadConfig(configDir, 'destination'), { marketplace: options.marketplace, logger: options.logger ?? createLogger({}), verbose: options.verbose === true, runOutputs: options.runOutputs }, built);
|
|
298
|
+
const gated = built.find((result) => result.gate !== undefined)?.gate;
|
|
299
|
+
if (gated !== undefined)
|
|
300
|
+
throw new Error(gated.reason);
|
|
301
|
+
return built;
|
|
302
|
+
}
|
|
303
|
+
/** Plugin build has no `--strict`: warnings never fail it. */
|
|
304
|
+
const GATE = { strict: false };
|
|
305
|
+
/** Every finding the built marketplaces carry, the stopped plugin's included. */
|
|
306
|
+
function marketplaceIssues(result) {
|
|
307
|
+
return [...result.plugins.flatMap((plugin) => plugin.issues), ...(result.gate?.issues ?? []), ...result.residue];
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* The report's `data` for the marketplaces built — paths relative to
|
|
311
|
+
* `configDir`, the directory whose config the build read.
|
|
312
|
+
*/
|
|
313
|
+
function pluginBuildData(configDir, built) {
|
|
314
|
+
const plugins = built.flatMap((result) => result.plugins);
|
|
315
|
+
return {
|
|
316
|
+
marketplacesBuilt: built.filter((result) => result.gate === undefined).length,
|
|
317
|
+
pluginsBuilt: plugins.length,
|
|
318
|
+
pluginsReferenced: built.flatMap((result) => result.externalPlugins).length,
|
|
319
|
+
skillsPackaged: plugins.flatMap((plugin) => plugin.skillsCopied).length,
|
|
320
|
+
marketplaces: built.map((result) => ({
|
|
321
|
+
name: result.name,
|
|
322
|
+
status: toFindings(marketplaceIssues(result)).length === 0 ? 'ok' : 'findings',
|
|
323
|
+
...(result.gate === undefined ? {} : { reason: result.gate.reason }),
|
|
324
|
+
plugins: result.plugins.map((plugin) => ({
|
|
325
|
+
name: plugin.pluginName,
|
|
326
|
+
outputPath: toForwardSlash(safePath.relative(configDir, plugin.pluginDir)),
|
|
327
|
+
skills: plugin.skillsCopied,
|
|
328
|
+
})),
|
|
329
|
+
// Referenced, not built — no output path. `source` is the same object
|
|
330
|
+
// emitted verbatim into marketplace.json, so the report and the artifact
|
|
331
|
+
// can never disagree about what a reference points at.
|
|
332
|
+
externalPlugins: result.externalPlugins.map((plugin) => ({
|
|
333
|
+
name: plugin.pluginName,
|
|
334
|
+
...(plugin.pluginVersion === undefined ? {} : { version: plugin.pluginVersion }),
|
|
335
|
+
source: plugin.source,
|
|
336
|
+
})),
|
|
337
|
+
})),
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* The packager refused one plugin-local skill's own CONTENT — a `files:` source
|
|
342
|
+
* that is not there, a bundled nested `SKILL.md`, a name that is no path segment.
|
|
343
|
+
*
|
|
344
|
+
* That is the project's to fix, so it is coded where it is caught: the run
|
|
345
|
+
* stopped (`RUN_INCOMPLETE`) on a `SKILL_PACKAGING_FAILED` finding at the skill —
|
|
346
|
+
* the refusal `vat skill test run` and `vat agent build` publish for the same
|
|
347
|
+
* cause. An uncoded packager throw is not wrapped: it stays a defect.
|
|
348
|
+
*/
|
|
349
|
+
class SkillPackagingStop extends CommandRefusalError {
|
|
350
|
+
/** The refused skill's `SKILL.md`, absolute. */
|
|
351
|
+
skillPath;
|
|
352
|
+
constructor(cause, skillPath) {
|
|
353
|
+
super('RUN_INCOMPLETE', errorMessageOf(cause), { cause });
|
|
354
|
+
this.skillPath = skillPath;
|
|
216
355
|
}
|
|
217
|
-
return results;
|
|
218
356
|
}
|
|
219
357
|
/**
|
|
220
|
-
*
|
|
221
|
-
*
|
|
358
|
+
* `finished`, plus the `SKILL_PACKAGING_FAILED` finding a {@link SkillPackagingStop} stands for.
|
|
359
|
+
*
|
|
360
|
+
* @param finished - What the run finished before it stopped
|
|
361
|
+
* @param error - What stopped it
|
|
362
|
+
* @param configDir - The project root the finding's `location` is relative to, when known
|
|
363
|
+
*/
|
|
364
|
+
function withPackagingStop(finished, error, configDir) {
|
|
365
|
+
if (!(error instanceof SkillPackagingStop))
|
|
366
|
+
return finished;
|
|
367
|
+
const relative = configDir === undefined ? undefined : issueLocation(error.skillPath, configDir);
|
|
368
|
+
const location = relative === undefined || relativeEscapesRoot(relative) ? undefined : relative;
|
|
369
|
+
return { ...finished, findings: [...finished.findings, ...toFindings([packagingFailedIssue(error.message, location, 'rebuild', error.cause)])] };
|
|
370
|
+
}
|
|
371
|
+
/** What the marketplaces built so far are, as the report or a refusal's finished work. */
|
|
372
|
+
function builtWork(configDir, built) {
|
|
373
|
+
return {
|
|
374
|
+
examined: built.length,
|
|
375
|
+
findings: toFindings(built.flatMap((result) => marketplaceIssues(result))),
|
|
376
|
+
data: pluginBuildData(configDir, built),
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Build every configured plugin marketplace and hand back the report — the
|
|
381
|
+
* refusal branch when it could not run, carrying the marketplaces that
|
|
382
|
+
* finished — printing it nowhere.
|
|
222
383
|
*
|
|
223
|
-
*
|
|
384
|
+
* ONE function for both lanes: `vat claude plugin build` publishes it with
|
|
385
|
+
* `endWithReport`, and `vat build`'s `claude` phase (run only when
|
|
386
|
+
* `claude.marketplaces` is configured) folds it. The report is the one BEFORE
|
|
387
|
+
* the writer's run-integrity pass.
|
|
224
388
|
*/
|
|
225
|
-
export async function runClaudePluginBuildPhase(options) {
|
|
389
|
+
export async function runClaudePluginBuildPhase(options, runOutputs) {
|
|
226
390
|
const logger = createLogger(options.debug ? { debug: true } : {});
|
|
227
391
|
const startTime = Date.now();
|
|
392
|
+
const built = [];
|
|
393
|
+
let configDir;
|
|
228
394
|
try {
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
},
|
|
237
|
-
exitCode: 0,
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
const results = await runClaudePluginBuild(configDir, {
|
|
241
|
-
...(options.marketplace ? { marketplace: options.marketplace } : {}),
|
|
242
|
-
logger,
|
|
243
|
-
verbose: options.verbose === true,
|
|
244
|
-
});
|
|
245
|
-
const duration = Date.now() - startTime;
|
|
246
|
-
const totalPlugins = results.flatMap((r) => r.plugins).length;
|
|
247
|
-
const totalExternalPlugins = results.flatMap((r) => r.externalPlugins).length;
|
|
248
|
-
const totalSkills = results.flatMap((r) => r.plugins).flatMap((p) => p.skillsCopied).length;
|
|
249
|
-
const allPlugins = results.flatMap((r) => r.plugins);
|
|
250
|
-
// KNOWN, DELIBERATELY NOT FIXED — this lane NAMES NOTHING. Every level of this
|
|
251
|
-
// document publishes severity counts and no findings: `vat build --only claude`
|
|
252
|
-
// on a real adopter monorepo published `warnings: 70, info: 30` with zero named
|
|
253
|
-
// findings anywhere in the document, at any verbosity. A reader is told how many
|
|
254
|
-
// things are wrong and never which. The findings exist — `summarizePackagedSkillIssues`
|
|
255
|
-
// and `reportPluginIssues` render them — but only to stderr, where no CI consumer
|
|
256
|
-
// reads them.
|
|
257
|
-
//
|
|
258
|
-
// Same class as the `validationFailedSkills` rows in ../../skills/build.ts, a
|
|
259
|
-
// different lane. Fixing it means carrying `ValidationIssue[]` up through
|
|
260
|
-
// `PluginBuildResult`/`MarketplaceBuildResult` beside the counts they already
|
|
261
|
-
// carry, then publishing it on the plugin rows below.
|
|
262
|
-
const document = {
|
|
263
|
-
status: 'success',
|
|
264
|
-
// The build gate is two-valued and a warning does not fail it, so the
|
|
265
|
-
// distribution has to travel next to the status rather than inside it.
|
|
266
|
-
issueCounts: sumSeverityCounts(allPlugins.map((p) => p.issueCounts)),
|
|
267
|
-
marketplacesBuilt: results.filter((r) => r.status === 'built').length,
|
|
268
|
-
pluginsBuilt: totalPlugins,
|
|
269
|
-
pluginsReferenced: totalExternalPlugins,
|
|
270
|
-
skillsPackaged: totalSkills,
|
|
271
|
-
marketplaces: results.map((r) => ({
|
|
272
|
-
name: r.name,
|
|
273
|
-
status: r.status,
|
|
274
|
-
...(r.reason ? { reason: r.reason } : {}),
|
|
275
|
-
plugins: r.plugins.map((p) => ({
|
|
276
|
-
name: p.pluginName,
|
|
277
|
-
// KNOWN, DELIBERATELY NOT FIXED — an ABSOLUTE path, so stdout carries
|
|
278
|
-
// `$HOME`. Measured on a real adopter monorepo run: 5 places in the
|
|
279
|
-
// published document. Failure MESSAGES in this change were scrubbed of
|
|
280
|
-
// absolute project paths and are confirmed clean; the success-path fields
|
|
281
|
-
// like this one were not, so the leak survives in the reports CI keeps.
|
|
282
|
-
//
|
|
283
|
-
// Do NOT relativize it on its own. It is blocked on the same undecided
|
|
284
|
-
// question as `skills[].outputPath` in ../../skills/build.ts: which root
|
|
285
|
-
// these reports anchor on. Picking one here picks it by accident, and the
|
|
286
|
-
// two build lanes then publish paths in two coordinate systems.
|
|
287
|
-
dir: p.pluginDir,
|
|
288
|
-
skills: p.skillsCopied,
|
|
289
|
-
commandsCopied: p.commandsCopied,
|
|
290
|
-
hooksCopied: p.hooksCopied,
|
|
291
|
-
agentsCopied: p.agentsCopied,
|
|
292
|
-
mcpCopied: p.mcpCopied,
|
|
293
|
-
treeFilesCopied: p.treeFilesCopied,
|
|
294
|
-
symlinksCopied: p.symlinksCopied,
|
|
295
|
-
explicitFilesCopied: p.explicitFilesCopied,
|
|
296
|
-
localSkillsPackaged: p.localSkillsPackaged,
|
|
297
|
-
issueCounts: p.issueCounts,
|
|
298
|
-
})),
|
|
299
|
-
// Referenced, not built — no dir, no counts to report. `source` is the
|
|
300
|
-
// same object emitted verbatim into marketplace.json, so the report and
|
|
301
|
-
// the artifact can never disagree about what a reference points at.
|
|
302
|
-
externalPlugins: r.externalPlugins.map((p) => ({
|
|
303
|
-
name: p.pluginName,
|
|
304
|
-
...(p.pluginVersion ? { version: p.pluginVersion } : {}),
|
|
305
|
-
source: p.source,
|
|
306
|
-
})),
|
|
307
|
-
})),
|
|
308
|
-
duration: `${duration}ms`,
|
|
309
|
-
};
|
|
310
|
-
return { document, exitCode: 0 };
|
|
395
|
+
const loaded = loadClaudeProjectConfig();
|
|
396
|
+
configDir = loaded.configDir;
|
|
397
|
+
// The config this lane already parsed is handed down, so the build reads it
|
|
398
|
+
// once (and warns about an unknown key once).
|
|
399
|
+
await buildClaudePluginMarketplaces(configDir, loaded.projectConfig, { marketplace: options.marketplace, logger, verbose: options.verbose === true, runOutputs }, built);
|
|
400
|
+
const work = builtWork(configDir, built);
|
|
401
|
+
return { report: buildReport({ ...work, gate: GATE, durationMs: Date.now() - startTime }) };
|
|
311
402
|
}
|
|
312
403
|
catch (error) {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
exitCode: 2,
|
|
316
|
-
failed: true,
|
|
317
|
-
};
|
|
404
|
+
const finished = configDir === undefined || built.length === 0 ? NOTHING_FINISHED : builtWork(configDir, built);
|
|
405
|
+
return { report: refusalReport(refusalCodeOf(error), error, GATE, withPackagingStop(finished, error, configDir)) };
|
|
318
406
|
}
|
|
319
407
|
}
|
|
320
408
|
async function pluginBuildCommand(options) {
|
|
321
|
-
//
|
|
322
|
-
//
|
|
323
|
-
|
|
409
|
+
// This command offers no `--format`: the report is YAML.
|
|
410
|
+
// On its own, this verb writes nothing before its marketplaces: `dist/skills` is an input.
|
|
411
|
+
endWithReport('claude plugin build', (await runClaudePluginBuildPhase(options, [])).report, 'yaml');
|
|
324
412
|
}
|
|
325
413
|
/**
|
|
326
414
|
* Copy distribution files (LICENSE, README.md, CHANGELOG.md) to marketplace output.
|
|
@@ -331,11 +419,14 @@ async function copyDistributionFiles(marketplaceDir, configDir, config, logger)
|
|
|
331
419
|
'README.md': config.publish?.readme,
|
|
332
420
|
'CHANGELOG.md': config.publish?.changelog,
|
|
333
421
|
};
|
|
334
|
-
|
|
422
|
+
// In order: the log names the files in this order, and the first failed copy is the one reported.
|
|
423
|
+
await forEachInOrder(['LICENSE', 'README.md', 'CHANGELOG.md'], async (file) => {
|
|
335
424
|
const override = overrides[file];
|
|
336
425
|
const srcPath = override ? safePath.join(configDir, override) : safePath.join(configDir, file);
|
|
337
|
-
|
|
338
|
-
|
|
426
|
+
// Absent is skipped once the project root's listing agrees (a wrong absent silently ships less); a file the OS will not let the build examine refuses.
|
|
427
|
+
// The file is an input; the directories above it, and the root listed to confirm it absent, are the project the build writes into.
|
|
428
|
+
if (pathPresent(srcPath, { follow: configDir }, sideWithin(srcPath, 'source', 'destination'), 'confirmed')) {
|
|
429
|
+
await copyFileIntoMarketplace(srcPath, { root: marketplaceDir, relative: file }, issueLocation(srcPath, configDir), issueLocation(safePath.join(marketplaceDir, file), configDir));
|
|
339
430
|
if (override) {
|
|
340
431
|
logger.info(` ${file} (from publish.${file === 'README.md' ? 'readme' : 'changelog'}: ${override})`);
|
|
341
432
|
}
|
|
@@ -343,20 +434,85 @@ async function copyDistributionFiles(marketplaceDir, configDir, config, logger)
|
|
|
343
434
|
logger.info(` ${file} (copied from project root)`);
|
|
344
435
|
}
|
|
345
436
|
}
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Thrown from a marketplace's staging fill when a plugin failed the gate: the plan discards what
|
|
441
|
+
* it staged, and the previous marketplace stays exactly as it was. One per marketplace.
|
|
442
|
+
*/
|
|
443
|
+
class MarketplaceNotEarned extends VatError {
|
|
444
|
+
constructor(name) {
|
|
445
|
+
super('PLUGIN_BUILD_NOT_EARNED', `marketplace ${name}: a plugin failed the gate, so the build does not replace the previous marketplace`);
|
|
346
446
|
}
|
|
347
447
|
}
|
|
448
|
+
/**
|
|
449
|
+
* Build ONE marketplace as one tree-change plan: a `replace` of
|
|
450
|
+
* `dist/.claude/plugins/marketplaces/<name>` whose staged tree the whole build is written
|
|
451
|
+
* into ({@link buildMarketplaceInto}). It lands only when every plugin passed the gate; a
|
|
452
|
+
* failure anywhere — a refused write, a refused input, a gated plugin — leaves the previous
|
|
453
|
+
* marketplace byte-equal (orphaned plugins of a previous build go with the swap).
|
|
454
|
+
*/
|
|
348
455
|
async function buildMarketplace(input) {
|
|
349
|
-
const { name,
|
|
456
|
+
const { name, configDir } = input;
|
|
457
|
+
// The config schema already refuses a name that is not one path segment; this re-check keeps the
|
|
458
|
+
// replace below from ever aiming outside dist/ if a caller skips it.
|
|
459
|
+
if (!isSingleFsSegment(name)) {
|
|
460
|
+
throw new CommandRefusalError('CONFIG_INVALID', `Marketplace name ${JSON.stringify(name)} is not a single path segment; rename it in vibe-agent-toolkit.config.yaml under claude.marketplaces.`);
|
|
461
|
+
}
|
|
462
|
+
const marketplaceDir = getMarketplaceOutputDir(configDir, name);
|
|
463
|
+
const notEarned = new MarketplaceNotEarned(name);
|
|
464
|
+
// A holder, not a `let`: the fill assigns it inside the plan, where flow analysis cannot see.
|
|
465
|
+
const holder = {};
|
|
466
|
+
const plan = await planTreeChanges([{
|
|
467
|
+
op: 'replace',
|
|
468
|
+
dest: marketplaceDir,
|
|
469
|
+
ownership: { kind: 'vat-state' },
|
|
470
|
+
label: `marketplace ${name}`,
|
|
471
|
+
fill: {
|
|
472
|
+
from: 'write',
|
|
473
|
+
write: async (staged) => {
|
|
474
|
+
holder.staged = staged;
|
|
475
|
+
holder.built = await buildMarketplaceInto(input, staged);
|
|
476
|
+
if (holder.built.gate !== undefined)
|
|
477
|
+
throw notEarned;
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
}]);
|
|
481
|
+
let residue;
|
|
482
|
+
try {
|
|
483
|
+
residue = (await applyTreePlan(plan)).warnings.map(({ message, path }) => leftoverIssue(message, path));
|
|
484
|
+
}
|
|
485
|
+
catch (error) {
|
|
486
|
+
if (error !== notEarned)
|
|
487
|
+
throw error;
|
|
488
|
+
residue = leftoverFindingsOf(error);
|
|
489
|
+
}
|
|
490
|
+
const { built, staged } = holder;
|
|
491
|
+
// The plan resolves, or ends gated, only once its fill has run.
|
|
492
|
+
if (built === undefined || staged === undefined)
|
|
493
|
+
throw new Error(`plugin build: the plan for marketplace ${name} ended without building it`);
|
|
494
|
+
return landedMarketplace(built, stagedPathMapper(configDir, staged, marketplaceDir), residue);
|
|
495
|
+
}
|
|
496
|
+
/** A marketplace built into its staged tree, every path it names re-anchored onto where it landed. */
|
|
497
|
+
function landedMarketplace(built, landedPath, residue) {
|
|
498
|
+
const landedIssues = (issues) => issues.map((issue) => (issue.location === undefined ? issue : { ...issue, location: landedPath(issue.location) }));
|
|
499
|
+
return {
|
|
500
|
+
...built,
|
|
501
|
+
plugins: built.plugins.map((plugin) => ({ ...plugin, pluginDir: landedPath(plugin.pluginDir), issues: landedIssues(plugin.issues) })),
|
|
502
|
+
gate: built.gate === undefined ? undefined : { ...built.gate, issues: landedIssues(built.gate.issues) },
|
|
503
|
+
residue,
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
/** The whole marketplace build, into `marketplaceDir`: its plan's staged tree. */
|
|
507
|
+
async function buildMarketplaceInto(input, marketplaceDir) {
|
|
508
|
+
const { name, config, availableSkills, configDir, skillsConfig, rootVersion, registry, projectSkills, suiteProbe, outputs, logger, verbose } = input;
|
|
350
509
|
const plugins = [];
|
|
351
510
|
const externalPlugins = [];
|
|
352
|
-
// Clean stale marketplace directory before rebuilding — removes orphaned plugins
|
|
353
|
-
const marketplaceBaseDir = safePath.join(configDir, 'dist', '.claude', 'plugins', 'marketplaces', name);
|
|
354
|
-
if (existsSync(marketplaceBaseDir)) {
|
|
355
|
-
await rm(marketplaceBaseDir, { recursive: true, force: true });
|
|
356
|
-
}
|
|
357
511
|
// Marketplace-level skills filter restricts pool available to plugins that use "*"
|
|
358
512
|
const marketplaceAvailable = resolveMarketplaceAvailableSkills(config, availableSkills);
|
|
359
|
-
|
|
513
|
+
let gate;
|
|
514
|
+
// In order, stopping at the first gated plugin: each writes into this marketplace's tree.
|
|
515
|
+
await everyInOrder(config.plugins, async (pluginDef) => {
|
|
360
516
|
// externalSource plugins are never built or copied — they route straight
|
|
361
517
|
// to a marketplace.json entry referencing the other repo. Every phase
|
|
362
518
|
// buildPlugin runs (empty-plugin guard, tree-copy, skills packaging,
|
|
@@ -372,10 +528,10 @@ async function buildMarketplace(input) {
|
|
|
372
528
|
pluginVersion: pluginDef.version,
|
|
373
529
|
source: pluginDef.externalSource,
|
|
374
530
|
});
|
|
375
|
-
|
|
531
|
+
return true;
|
|
376
532
|
}
|
|
377
|
-
const
|
|
378
|
-
|
|
533
|
+
const outcome = await buildPlugin({
|
|
534
|
+
marketplaceDir,
|
|
379
535
|
pluginDef,
|
|
380
536
|
marketplaceAvailable,
|
|
381
537
|
configDir,
|
|
@@ -385,15 +541,22 @@ async function buildMarketplace(input) {
|
|
|
385
541
|
registry,
|
|
386
542
|
projectSkills,
|
|
387
543
|
suiteProbe,
|
|
544
|
+
outputs,
|
|
388
545
|
logger,
|
|
389
546
|
verbose,
|
|
390
547
|
});
|
|
391
|
-
|
|
548
|
+
if (outcome.kind === 'gated') {
|
|
549
|
+
gate = outcome.failure;
|
|
550
|
+
return false;
|
|
551
|
+
}
|
|
552
|
+
plugins.push(outcome.result);
|
|
553
|
+
return true;
|
|
554
|
+
});
|
|
555
|
+
if (gate !== undefined) {
|
|
556
|
+
// No marketplace.json over a plugin that was never assembled: the plan discards the staged tree.
|
|
557
|
+
return { name, plugins, externalPlugins, gate, residue: [] };
|
|
392
558
|
}
|
|
393
559
|
// Generate .claude-plugin/marketplace.json
|
|
394
|
-
const marketplaceDir = marketplaceBaseDir;
|
|
395
|
-
const claudePluginDir = safePath.join(marketplaceDir, CLAUDE_PLUGIN_DIRNAME);
|
|
396
|
-
await mkdir(claudePluginDir, { recursive: true });
|
|
397
560
|
// Each BUILT entry's author is the plugin's own MERGED author (see
|
|
398
561
|
// marketplace-json.ts), so marketplace.json and that plugin's plugin.json
|
|
399
562
|
// cannot disagree. External entries carry no author — see marketplace-json.ts.
|
|
@@ -417,10 +580,11 @@ async function buildMarketplace(input) {
|
|
|
417
580
|
})),
|
|
418
581
|
],
|
|
419
582
|
});
|
|
420
|
-
|
|
583
|
+
const marketplaceJsonPath = safePath.join(marketplaceDir, CLAUDE_PLUGIN_DIRNAME, 'marketplace.json');
|
|
584
|
+
await writingMarketplace(`write ${marketplaceJsonPath}`, () => writeFileUnder(marketplaceDir, `${CLAUDE_PLUGIN_DIRNAME}/marketplace.json`, JSON.stringify(marketplaceJson, null, 2), { existing: 'replace', writing: 'the marketplace manifest' }));
|
|
421
585
|
logger.info(` .claude-plugin/marketplace.json`);
|
|
422
586
|
await copyDistributionFiles(marketplaceDir, configDir, config, logger);
|
|
423
|
-
return { name,
|
|
587
|
+
return { name, plugins, externalPlugins, gate: undefined, residue: [] };
|
|
424
588
|
}
|
|
425
589
|
/**
|
|
426
590
|
* Resolve which pool skills are available to plugins in this marketplace.
|
|
@@ -468,32 +632,27 @@ function resolvePluginSkills(pluginDef, availableSkills) {
|
|
|
468
632
|
* Supports exact match and simple glob patterns (prefix*, suffix*, *contains*).
|
|
469
633
|
*/
|
|
470
634
|
function matchesSelector(skillName, selector) {
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
const
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
const
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
return JSON.parse(readFileSync(authorPluginJsonPath, 'utf-8'));
|
|
489
|
-
}
|
|
490
|
-
catch (e) {
|
|
491
|
-
throw new Error(`Author .claude-plugin/plugin.json is not valid JSON: ${e.message}`);
|
|
635
|
+
// `*` is the selector's ONE wildcard (any run of characters, none included); every other character
|
|
636
|
+
// is itself. Matched by its literal pieces, in order — never compiled to a regular expression, where
|
|
637
|
+
// a `.` or a `(` in a skill name's selector would mean something else.
|
|
638
|
+
const pieces = selector.split('*');
|
|
639
|
+
const first = pieces[0] ?? '';
|
|
640
|
+
const last = pieces.at(-1) ?? '';
|
|
641
|
+
if (pieces.length === 1)
|
|
642
|
+
return skillName === selector;
|
|
643
|
+
if (skillName.length < first.length + last.length || !skillName.startsWith(first) || !skillName.endsWith(last))
|
|
644
|
+
return false;
|
|
645
|
+
const end = skillName.length - last.length;
|
|
646
|
+
let from = first.length;
|
|
647
|
+
for (const piece of pieces.slice(1, -1)) {
|
|
648
|
+
const at = skillName.indexOf(piece, from);
|
|
649
|
+
if (at === -1 || at + piece.length > end)
|
|
650
|
+
return false;
|
|
651
|
+
from = at + piece.length;
|
|
492
652
|
}
|
|
653
|
+
return true;
|
|
493
654
|
}
|
|
494
655
|
async function writeMergedPluginJson(pluginDef, authorJson, pluginVersion, pluginDir, owner, logger) {
|
|
495
|
-
const pluginJsonDir = safePath.join(pluginDir, CLAUDE_PLUGIN_DIRNAME);
|
|
496
|
-
await mkdir(pluginJsonDir, { recursive: true });
|
|
497
656
|
const { merged, author, warnings } = mergePluginJson({
|
|
498
657
|
vat: {
|
|
499
658
|
name: pluginDef.name,
|
|
@@ -505,10 +664,33 @@ async function writeMergedPluginJson(pluginDef, authorJson, pluginVersion, plugi
|
|
|
505
664
|
});
|
|
506
665
|
for (const w of warnings)
|
|
507
666
|
logger.info(`warning: ${w}`);
|
|
508
|
-
|
|
667
|
+
const pluginJsonPath = safePath.join(pluginDir, CLAUDE_PLUGIN_DIRNAME, 'plugin.json');
|
|
668
|
+
await writingMarketplace(`write ${pluginJsonPath}`, () => writeFileUnder(pluginDir, `${CLAUDE_PLUGIN_DIRNAME}/plugin.json`, JSON.stringify(merged, null, 2), { existing: 'replace', writing: 'the merged plugin.json' }));
|
|
509
669
|
logger.info(` .claude-plugin/plugin.json`);
|
|
510
670
|
return author;
|
|
511
671
|
}
|
|
672
|
+
/**
|
|
673
|
+
* The selected pool skills with the `skills/`-relative directory each lands in, in the order they are
|
|
674
|
+
* copied: by destination path, whatever order the selector or `readdir` named them in — every
|
|
675
|
+
* directory before anything under it, since a path sorts after each of its prefixes. A pool skill that
|
|
676
|
+
* holds a link is then always in place before a skill landing under it, so that layout is refused one
|
|
677
|
+
* way (the link, an input fault) and never as this run's own half-written output.
|
|
678
|
+
*
|
|
679
|
+
* Destinations are compared as a filesystem that folds names compares them (`Group/sub` is under
|
|
680
|
+
* `group` there); the skill's name breaks a tie, so two skills sent to one destination are also
|
|
681
|
+
* copied in one order on every host.
|
|
682
|
+
*
|
|
683
|
+
* Pure: it reads nothing.
|
|
684
|
+
*/
|
|
685
|
+
function poolCopyOrder(selected, destOverrides) {
|
|
686
|
+
return selected
|
|
687
|
+
.map((skillName) => {
|
|
688
|
+
const fsPath = destOverrides.get(skillName) ?? skillNameToFsPath(skillName);
|
|
689
|
+
return { skillName, fsPath, placed: toForwardSlash(fsPath).split('/').map((segment) => foldedSegment(segment)).join('/') };
|
|
690
|
+
})
|
|
691
|
+
.toSorted((a, b) => compareCodeUnits(a.placed, b.placed) || compareCodeUnits(a.skillName, b.skillName))
|
|
692
|
+
.map(({ skillName, fsPath }) => ({ skillName, fsPath }));
|
|
693
|
+
}
|
|
512
694
|
/**
|
|
513
695
|
* Copy pool skills (from dist/skills/) selected by the plugin's skills: selector
|
|
514
696
|
* into the plugin bundle's skills/ directory.
|
|
@@ -524,22 +706,25 @@ async function writeMergedPluginJson(pluginDef, authorJson, pluginVersion, plugi
|
|
|
524
706
|
* `foo`) landed at `skills/foo`, and `vat skill test foo` then hard-failed looking for
|
|
525
707
|
* a dist at `skills/group/foo` that the build never wrote.
|
|
526
708
|
*/
|
|
527
|
-
async function copyPoolSkills(pluginDef, marketplaceAvailable, configDir, pluginDir, destOverrides, logger) {
|
|
528
|
-
const selected = resolvePluginSkills(pluginDef, marketplaceAvailable);
|
|
709
|
+
async function copyPoolSkills(pluginDef, marketplaceAvailable, configDir, pluginDir, destOverrides, outputs, logger) {
|
|
710
|
+
const selected = poolCopyOrder(resolvePluginSkills(pluginDef, marketplaceAvailable), destOverrides);
|
|
529
711
|
const copied = [];
|
|
530
|
-
|
|
712
|
+
// In order: each copy writes into the plugin dir, `destOverrides` may collide, and the first failure wins.
|
|
713
|
+
await forEachInOrder(selected, async ({ skillName, fsPath }) => {
|
|
531
714
|
const skillDistPath = safePath.join(configDir, 'dist', 'skills', skillName);
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
}
|
|
536
|
-
const fsPath = destOverrides.get(skillName) ?? skillNameToFsPath(skillName);
|
|
715
|
+
requireInputPath(skillDistPath, configDir, {
|
|
716
|
+
origin: 'content',
|
|
717
|
+
message: `Skill "${skillName}" not built at dist/skills/${skillName}. Run: vat skills build (or vat build to build everything)`,
|
|
718
|
+
}, sideWithin(safePath.join(configDir, 'dist', 'skills'), distSkillsSide(skillDistPath, outputs), 'destination'));
|
|
537
719
|
const destPath = safePath.join(pluginDir, 'skills', fsPath);
|
|
538
|
-
|
|
539
|
-
|
|
720
|
+
// A file in dist/skills the OS will not read is on dist/skills' side of the run (`distSkillsSide`):
|
|
721
|
+
// an input another build wrote (INPUT_UNREADABLE, fixed by rebuilding it), or this run's own output.
|
|
722
|
+
await copyTreeIntoMarketplace({ path: skillDistPath, side: distSkillsSide(skillDistPath, outputs) },
|
|
723
|
+
// From the plugin's own directory down: an earlier pool copy may have left a link on the way.
|
|
724
|
+
{ root: pluginDir, relative: `skills/${toForwardSlash(fsPath)}` }, `dist/skills/${skillName}`, issueLocation(destPath, configDir));
|
|
540
725
|
copied.push(fsPath);
|
|
541
726
|
logger.info(` ${skillName} -> skills/${fsPath}`);
|
|
542
|
-
}
|
|
727
|
+
});
|
|
543
728
|
return copied;
|
|
544
729
|
}
|
|
545
730
|
/**
|
|
@@ -557,7 +742,7 @@ async function copyPoolSkills(pluginDef, marketplaceAvailable, configDir, plugin
|
|
|
557
742
|
* gitignored/untracked skill dir must not be published by one producer when the
|
|
558
743
|
* other would never have shipped it).
|
|
559
744
|
*/
|
|
560
|
-
|
|
745
|
+
function discoverPluginLocalSkills(pluginSourceDir, logger) {
|
|
561
746
|
// Git visibility is the right filter, but a SILENT drop is not: a skill the author
|
|
562
747
|
// just created and has not `git add`ed is simply absent from the built plugin, and
|
|
563
748
|
// a build that says "success" while omitting it reads as one that shipped it.
|
|
@@ -567,15 +752,14 @@ async function discoverPluginLocalSkills(pluginSourceDir, logger) {
|
|
|
567
752
|
`into this plugin (the plugin build ships tracked files only). Run \`git add\` on it, or ` +
|
|
568
753
|
`add it to .gitignore to silence this.`);
|
|
569
754
|
}
|
|
570
|
-
|
|
571
|
-
|
|
755
|
+
// In order: a SKILL.md that will not read must be the first one named, deterministically.
|
|
756
|
+
return mapInOrder(listPluginSourceSkillDirs(pluginSourceDir), async (skillDirPath) => {
|
|
572
757
|
const skillSourceDir = safePath.join(pluginSourceDir, 'skills', skillDirPath);
|
|
573
758
|
// Resolved through the SAME reader `vat skills build` and `vat verify` use — per-skill
|
|
574
759
|
// config is keyed by name, so two answers would mean two effective configs.
|
|
575
760
|
const skillName = await readPluginLocalSkillName(skillSourceDir, skillDirPath);
|
|
576
|
-
|
|
577
|
-
}
|
|
578
|
-
return skills;
|
|
761
|
+
return { skillDirPath, skillPath: safePath.join(skillSourceDir, 'SKILL.md'), skillName };
|
|
762
|
+
});
|
|
579
763
|
}
|
|
580
764
|
/**
|
|
581
765
|
* PACKAGE each plugin-local skill (a skill living in the plugin's own `skills/`
|
|
@@ -607,10 +791,13 @@ export async function packagePluginLocalSkills(input) {
|
|
|
607
791
|
const packaged = [];
|
|
608
792
|
// KNOWN GAP — NO PER-SKILL CONTAINMENT. `packageSkill` reports most problems by
|
|
609
793
|
// RETURNING a result whose `hasErrors` is set, but it THROWS on structural packaging
|
|
610
|
-
// failures (filename collisions, unreadable sources).
|
|
611
|
-
//
|
|
612
|
-
//
|
|
613
|
-
//
|
|
794
|
+
// failures (filename collisions, unreadable sources). One throw escapes the whole
|
|
795
|
+
// plugin build and discards every skill packaged before it — while the partial
|
|
796
|
+
// `skills/<dir>/` trees already written stay on disk, described by nothing.
|
|
797
|
+
//
|
|
798
|
+
// What IS done: the packager's refusal of a skill's own content is CODED where it is
|
|
799
|
+
// caught below (`SkillPackagingStop`), so the stopped run names the skill and is not
|
|
800
|
+
// published as a defect in VAT. It still stops the run; containment is the gap.
|
|
614
801
|
//
|
|
615
802
|
// This is the SAME defect, in the same shape, that `packageSkills` had until commit
|
|
616
803
|
// ba140fae ("fix(skills): one unbuildable skill no longer discards the whole build").
|
|
@@ -628,7 +815,8 @@ export async function packagePluginLocalSkills(input) {
|
|
|
628
815
|
// collision no longer throws — it is a returned finding. The remaining throw paths
|
|
629
816
|
// are an absent or unreadable `files:` source; do not use a collision as the fixture
|
|
630
817
|
// when adding that guard, or the test will pass without the guard existing.
|
|
631
|
-
|
|
818
|
+
// In order: every skill packages against the one shared registry, and the log follows `input.skills`.
|
|
819
|
+
await forEachInOrder(input.skills, async ({ skillDirPath, skillPath, skillName }) => {
|
|
632
820
|
// Per-skill config goes through `pluginLocalSkillConfigEntry` — the one lookup
|
|
633
821
|
// `vat verify` also uses to check what this packaged — so verify never checks
|
|
634
822
|
// `files:` dests or severity overrides this build did not apply.
|
|
@@ -664,13 +852,16 @@ export async function packagePluginLocalSkills(input) {
|
|
|
664
852
|
// bounded 17-entry reconciliation, not an unbounded one. UNVERIFIED how much of the
|
|
665
853
|
// 17 - 14 delta is the false-positive class described above versus genuinely dead
|
|
666
854
|
// entries; nobody has classified them entry by entry.
|
|
667
|
-
|
|
855
|
+
// In place: the plugin dir is inside the marketplace's staged tree, which its plan lands whole.
|
|
856
|
+
const { result } = await packageSkillInto(skillPath, skillOutputDir, {
|
|
668
857
|
...packagingConfigToPackageOptions(packagingConfig, { skillPath, outputPath: skillOutputDir }, input.projectSkills, input.suiteProbe),
|
|
669
858
|
registry: input.registry,
|
|
859
|
+
}, input.outputs).catch((error) => {
|
|
860
|
+
throw isSkillPackagingInputError(error) ? new SkillPackagingStop(error, skillPath) : error;
|
|
670
861
|
});
|
|
671
862
|
input.logger.info(` ${skillName} -> skills/${skillDirPath} (${formatPackagedFileCount(result)})`);
|
|
672
863
|
packaged.push({ skillDirPath, result });
|
|
673
|
-
}
|
|
864
|
+
});
|
|
674
865
|
return packaged;
|
|
675
866
|
}
|
|
676
867
|
/**
|
|
@@ -696,10 +887,10 @@ export async function packagePluginLocalSkills(input) {
|
|
|
696
887
|
export function summarizePackagedSkillIssues(packaged, verbose) {
|
|
697
888
|
const lines = [];
|
|
698
889
|
const withErrors = [];
|
|
699
|
-
const
|
|
890
|
+
const all = [];
|
|
700
891
|
for (const { skillDirPath, result } of packaged) {
|
|
701
892
|
const issues = collectPostBuildIssues(result);
|
|
702
|
-
|
|
893
|
+
all.push(...issues);
|
|
703
894
|
if (issues.length > 0) {
|
|
704
895
|
lines.push(` ${skillDirPath}: ${formatIssueSetHeading(issues, 'post-build')}`);
|
|
705
896
|
for (const issue of issuesToRenderAtVerbosity(issues, verbose)) {
|
|
@@ -709,15 +900,15 @@ export function summarizePackagedSkillIssues(packaged, verbose) {
|
|
|
709
900
|
if (result.hasErrors)
|
|
710
901
|
withErrors.push(skillDirPath);
|
|
711
902
|
}
|
|
712
|
-
return { lines, withErrors,
|
|
903
|
+
return { lines, withErrors, issues: all };
|
|
713
904
|
}
|
|
714
905
|
/** Print the summary to stderr and return what the caller gates on. */
|
|
715
906
|
function reportPackagedSkillIssues(packaged, logger, verbose) {
|
|
716
|
-
const { lines, withErrors,
|
|
907
|
+
const { lines, withErrors, issues } = summarizePackagedSkillIssues(packaged, verbose);
|
|
717
908
|
for (const line of lines) {
|
|
718
909
|
logger.info(line);
|
|
719
910
|
}
|
|
720
|
-
return { withErrors,
|
|
911
|
+
return { withErrors, issues };
|
|
721
912
|
}
|
|
722
913
|
/**
|
|
723
914
|
* Turn the tree-copy's dead `exclude:` patterns into located, coded findings.
|
|
@@ -740,7 +931,7 @@ function unusedExcludeIssues(unusedExcludePatterns, configDir, pluginSourceDir)
|
|
|
740
931
|
}));
|
|
741
932
|
}
|
|
742
933
|
/**
|
|
743
|
-
* Print the plugin-level findings to stderr
|
|
934
|
+
* Print the plugin-level findings to stderr.
|
|
744
935
|
*
|
|
745
936
|
* Rendered IN FULL at every verbosity — `issuesToRenderAtVerbosity(…, true)` —
|
|
746
937
|
* rather than collapsing warnings into the heading. The verbosity collapse
|
|
@@ -760,7 +951,6 @@ function reportPluginIssues(issues, logger) {
|
|
|
760
951
|
}
|
|
761
952
|
}
|
|
762
953
|
}
|
|
763
|
-
return countBySeverity(issues);
|
|
764
954
|
}
|
|
765
955
|
/**
|
|
766
956
|
* Split the plugin's own skills into those that COLLIDE with its resolved pool
|
|
@@ -808,19 +998,20 @@ function resolveCollidingSkills(skills, selectedSkillNames) {
|
|
|
808
998
|
return { colliding, packageable, conflicts };
|
|
809
999
|
}
|
|
810
1000
|
async function buildPlugin(input) {
|
|
811
|
-
const {
|
|
812
|
-
const pluginDir =
|
|
1001
|
+
const { marketplaceDir, pluginDef, marketplaceAvailable, configDir, skillsConfig, owner, rootVersion, registry, projectSkills, suiteProbe, outputs, logger, verbose } = input;
|
|
1002
|
+
const pluginDir = pluginDirInMarketplace(marketplaceDir, pluginDef.name);
|
|
813
1003
|
const pluginSourceDir = getPluginSourceDir(configDir, pluginDef);
|
|
814
1004
|
logger.info(` Building plugin: ${pluginDef.name}`);
|
|
815
1005
|
// Phase 1: validators.
|
|
816
1006
|
await verifyPluginDirCaseMatch(configDir, pluginDef.name);
|
|
817
|
-
|
|
1007
|
+
// Confirmed: a wrong absent would silently build the plugin without its own directory.
|
|
1008
|
+
const pluginSourceExists = pathPresent(pluginSourceDir, { follow: configDir }, pluginSourceSideOf(configDir, pluginDef, pluginSourceDir), 'confirmed');
|
|
818
1009
|
const hasExplicitFiles = (pluginDef.files?.length ?? 0) > 0;
|
|
819
1010
|
const hasPoolSkills = pluginDef.skills === '*'
|
|
820
1011
|
? marketplaceAvailable.length > 0
|
|
821
1012
|
: pluginDef.skills.length > 0;
|
|
822
1013
|
if (!pluginSourceExists && !hasExplicitFiles && !hasPoolSkills) {
|
|
823
|
-
throw new
|
|
1014
|
+
throw new CommandRefusalError('CONFIG_INVALID', `Plugin '${pluginDef.name}' has no content: no plugin dir found at ` +
|
|
824
1015
|
`'${toForwardSlash(safePath.relative(configDir, pluginSourceDir))}', no files mapped, and no skills selected. ` +
|
|
825
1016
|
`Add one of: (a) create the plugin directory, ` +
|
|
826
1017
|
`(b) add files: [{ source, dest }, ...] in config, ` +
|
|
@@ -829,7 +1020,7 @@ async function buildPlugin(input) {
|
|
|
829
1020
|
if (pluginSourceExists) {
|
|
830
1021
|
await parsePluginJsonFiles(pluginSourceDir);
|
|
831
1022
|
}
|
|
832
|
-
await mkdir(pluginDir, { recursive: true });
|
|
1023
|
+
await writingMarketplace(`create ${pluginDir}`, () => mkdir(pluginDir, { recursive: true }));
|
|
833
1024
|
// Phase 1.4: discover the plugin's own skills ONCE (recursive; git-visible only),
|
|
834
1025
|
// resolving each declared name. Every phase below reads this list.
|
|
835
1026
|
const localSkills = pluginSourceExists
|
|
@@ -844,7 +1035,7 @@ async function buildPlugin(input) {
|
|
|
844
1035
|
const { colliding: collidingSkills, packageable, conflicts } = resolveCollidingSkills(localSkills, selectedSkillNames);
|
|
845
1036
|
if (conflicts.length > 0) {
|
|
846
1037
|
const pluginSourceRel = toForwardSlash(safePath.relative(configDir, pluginSourceDir));
|
|
847
|
-
throw new
|
|
1038
|
+
throw new CommandRefusalError('CONFIG_INVALID', `Plugin '${pluginDef.name}': two DIFFERENT skills claim the same output directory.\n` +
|
|
848
1039
|
conflicts
|
|
849
1040
|
.map(({ skill, poolSkillFsPath }) => ` - skills/${skill.skillDirPath} holds the plugin-local skill "${skill.skillName}", ` +
|
|
850
1041
|
`but the plugin's skills: selector also copies a pool skill into skills/${poolSkillFsPath}.`)
|
|
@@ -876,12 +1067,19 @@ async function buildPlugin(input) {
|
|
|
876
1067
|
registry,
|
|
877
1068
|
projectSkills,
|
|
878
1069
|
suiteProbe,
|
|
1070
|
+
outputs,
|
|
879
1071
|
logger,
|
|
880
1072
|
});
|
|
881
|
-
const { withErrors: skillsWithErrors,
|
|
1073
|
+
const { withErrors: skillsWithErrors, issues: localSkillIssues } = reportPackagedSkillIssues(packagedLocalSkills, logger, verbose);
|
|
882
1074
|
if (skillsWithErrors.length > 0) {
|
|
883
|
-
|
|
884
|
-
|
|
1075
|
+
return {
|
|
1076
|
+
kind: 'gated',
|
|
1077
|
+
failure: {
|
|
1078
|
+
reason: `Plugin '${pluginDef.name}': ${skillsWithErrors.length} plugin-local skill(s) emitted ` +
|
|
1079
|
+
`post-build validation errors: ${skillsWithErrors.join(', ')}`,
|
|
1080
|
+
issues: localSkillIssues,
|
|
1081
|
+
},
|
|
1082
|
+
};
|
|
885
1083
|
}
|
|
886
1084
|
const localSkillsPackaged = packagedLocalSkills.length;
|
|
887
1085
|
// Phase 2b: tree copy of everything the other phases did NOT produce (commands,
|
|
@@ -934,12 +1132,13 @@ async function buildPlugin(input) {
|
|
|
934
1132
|
logger.info(` ${link} (symlink, copied by content)`);
|
|
935
1133
|
}
|
|
936
1134
|
// Plugin-level findings: they belong to the plugin, not to any one skill, and
|
|
937
|
-
// they
|
|
938
|
-
//
|
|
1135
|
+
// they join the SAME `issues` the skills' findings land in. Anything else
|
|
1136
|
+
// republishes the bug: a build that changed what ships while its
|
|
939
1137
|
// machine-readable report said `warnings: 0`.
|
|
940
|
-
const
|
|
1138
|
+
const pluginIssues = unusedExcludeIssues(treeResult.unusedExcludePatterns, configDir, pluginSourceDir);
|
|
1139
|
+
reportPluginIssues(pluginIssues, logger);
|
|
941
1140
|
// Phase 3: pool-skill copy-in (from dist/skills/ via the plugin's skills: selector).
|
|
942
|
-
const skillsCopied = await copyPoolSkills(pluginDef, marketplaceAvailable, configDir, pluginDir, poolDestOverrides, logger);
|
|
1141
|
+
const skillsCopied = await copyPoolSkills(pluginDef, marketplaceAvailable, configDir, pluginDir, poolDestOverrides, outputs, logger);
|
|
943
1142
|
// Phase 4: files[] mapping (may overwrite tree-copied files).
|
|
944
1143
|
let explicitFilesCopied = 0;
|
|
945
1144
|
if (pluginDef.files && pluginDef.files.length > 0) {
|
|
@@ -961,26 +1160,44 @@ async function buildPlugin(input) {
|
|
|
961
1160
|
// by default, or `entry.changelog` (relative to plugin source) when configured.
|
|
962
1161
|
// No-op when neither resolves — marketplace-level CHANGELOG (handled in
|
|
963
1162
|
// copyDistributionFiles) is unaffected.
|
|
964
|
-
const changelogPath = resolvePluginChangelogPath(pluginSourceDir, pluginDef);
|
|
1163
|
+
const changelogPath = resolvePluginChangelogPath(pluginSourceDir, pluginDef, configDir);
|
|
965
1164
|
if (changelogPath) {
|
|
966
|
-
|
|
1165
|
+
const target = { root: pluginDir, relative: 'CHANGELOG.md' };
|
|
1166
|
+
await copyFileIntoMarketplace(changelogPath, target, issueLocation(changelogPath, configDir), issueLocation(safePath.join(target.root, target.relative), configDir));
|
|
967
1167
|
logger.info(` CHANGELOG.md`);
|
|
968
1168
|
}
|
|
969
|
-
return {
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
1169
|
+
return { kind: 'built', result: {
|
|
1170
|
+
pluginName: pluginDef.name,
|
|
1171
|
+
pluginDir,
|
|
1172
|
+
pluginVersion,
|
|
1173
|
+
pluginAuthor,
|
|
1174
|
+
skillsCopied,
|
|
1175
|
+
commandsCopied: treeResult.commandsCopied,
|
|
1176
|
+
hooksCopied: treeResult.hooksCopied,
|
|
1177
|
+
agentsCopied: treeResult.agentsCopied,
|
|
1178
|
+
mcpCopied: treeResult.mcpCopied,
|
|
1179
|
+
treeFilesCopied: treeResult.filesCopied,
|
|
1180
|
+
symlinksCopied: treeResult.symlinksCopied,
|
|
1181
|
+
explicitFilesCopied,
|
|
1182
|
+
localSkillsPackaged,
|
|
1183
|
+
issues: [...localSkillIssues, ...pluginIssues],
|
|
1184
|
+
} };
|
|
985
1185
|
}
|
|
1186
|
+
/** Test-facing seam: the pure decisions of this module, reached by its unit tests. */
|
|
1187
|
+
export const __internal = {
|
|
1188
|
+
builtWork,
|
|
1189
|
+
landedMarketplace,
|
|
1190
|
+
marketplaceIssues,
|
|
1191
|
+
matchesSelector,
|
|
1192
|
+
pluginBuildData,
|
|
1193
|
+
poolCopyOrder,
|
|
1194
|
+
reportPackagedSkillIssues,
|
|
1195
|
+
reportPluginIssues,
|
|
1196
|
+
resolveCollidingSkills,
|
|
1197
|
+
resolveMarketplaceAvailableSkills,
|
|
1198
|
+
resolvePluginSkills,
|
|
1199
|
+
SkillPackagingStop,
|
|
1200
|
+
unusedExcludeIssues,
|
|
1201
|
+
withPackagingStop,
|
|
1202
|
+
};
|
|
986
1203
|
//# sourceMappingURL=build.js.map
|