@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
|
@@ -3,23 +3,27 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Creates distributable artifacts (directory, ZIP, npm) from a SKILL.md file
|
|
5
5
|
*/
|
|
6
|
-
import { existsSync, statSync } from 'node:fs';
|
|
7
6
|
import { basename, dirname } from 'node:path';
|
|
8
|
-
import { packageSkill, validateSkill, ZipSizeLimitError, } from '@vibe-agent-toolkit/agent-skills';
|
|
7
|
+
import { isSkillPackagingInputError, packageSkill, SKILL_PACKAGE_CHECKS_FAILED_CODE, validateSkill, ZipSizeLimitError, } from '@vibe-agent-toolkit/agent-skills';
|
|
9
8
|
import { parseFileCached } from '@vibe-agent-toolkit/resources';
|
|
10
|
-
import {
|
|
11
|
-
import { safePath } from '@vibe-agent-toolkit/utils';
|
|
9
|
+
import { buildReport, toFindings } from '@vibe-agent-toolkit/schema';
|
|
10
|
+
import { findProjectRoot, followedStatSync, issueLocation, isVatError, requireFollowedStatSync, safePath, toForwardSlash, withFsFault } from '@vibe-agent-toolkit/utils';
|
|
12
11
|
import { Command } from 'commander';
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import { formatIssueLines, formatIssueSetHeading } from '../../utils/issue-rendering.js';
|
|
12
|
+
import { CommandRefusalError, errorMessageOf, refusalCodeOf } from '../../utils/command-refusal.js';
|
|
13
|
+
import { endWithRefusal, endWithReport, leftoverFindingsOf, leftoverIssue, NOTHING_FINISHED } from '../../utils/document-writer.js';
|
|
14
|
+
import { collectPostBuildIssues, formatIssueLines, formatIssueSetHeading } from '../../utils/issue-rendering.js';
|
|
16
15
|
import { createLogger } from '../../utils/logger.js';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
16
|
+
import { readInputFile, requireProjectRoot } from '../../utils/project-root-policy.js';
|
|
17
|
+
import { resolveSkillPath } from '../skill/review.js';
|
|
18
|
+
import { packagingFailedIssue } from './build.js';
|
|
19
19
|
/** Default packaging target */
|
|
20
20
|
const DEFAULT_TARGET = 'claude-code';
|
|
21
21
|
/** Valid packaging targets */
|
|
22
22
|
const VALID_TARGETS = ['claude-code', 'claude-web'];
|
|
23
|
+
/** Every `--formats` value, in the order the help text lists them. */
|
|
24
|
+
const VALID_FORMATS = ['directory', 'zip', 'npm', 'marketplace'];
|
|
25
|
+
/** The formats produced when `--formats` is not given. */
|
|
26
|
+
const DEFAULT_FORMATS = ['directory', 'zip'];
|
|
23
27
|
/**
|
|
24
28
|
* Whether packaging should rewrite relative links in copied files.
|
|
25
29
|
*
|
|
@@ -49,12 +53,13 @@ export function createPackageCommand() {
|
|
|
49
53
|
const command = new Command('package');
|
|
50
54
|
command
|
|
51
55
|
.description('Package a skill for distribution (creates directory + ZIP artifacts)')
|
|
52
|
-
.argument('<skill-path>', 'Path to SKILL.md file')
|
|
56
|
+
.argument('<skill-path>', 'Path to the SKILL.md file (or the skill directory holding it)')
|
|
53
57
|
.requiredOption('-o, --output <path>', 'Output directory for packaged skill')
|
|
54
|
-
.option('-f, --formats <formats>',
|
|
58
|
+
.option('-f, --formats <formats>', `Package formats (comma-separated: ${VALID_FORMATS.join(',')}; an unknown name is refused)`, DEFAULT_FORMATS.join(','))
|
|
55
59
|
.option('--no-rewrite-links', 'Skip rewriting relative links in copied files')
|
|
56
60
|
.option('-b, --base-path <path>', 'Base path for resolving relative links (default: dirname of SKILL.md)')
|
|
57
|
-
.option('--dry-run', 'Preview packaging without creating files')
|
|
61
|
+
.option('--dry-run', 'Preview packaging without creating files: the real run stopped before its first write, so what it would refuse before writing is refused here too')
|
|
62
|
+
.option('--force', 'Replace a previous package: --output and a <output>.zip / <name>.marketplace.json file beside it are replaced as one (a directory standing where an archive goes is refused, never removed); without it, an --output that holds anything is refused')
|
|
58
63
|
.option('--debug', 'Enable debug logging')
|
|
59
64
|
.option('--target <target>', 'Packaging target: claude-code (default, resources/ dir) or claude-web (references/, scripts/, assets/ dirs for Claude.ai upload)', DEFAULT_TARGET)
|
|
60
65
|
.action(packageCommand)
|
|
@@ -69,17 +74,52 @@ Description:
|
|
|
69
74
|
|
|
70
75
|
REQUIRED: --output flag must specify where to create the package
|
|
71
76
|
|
|
77
|
+
The package is written whole beside --output and swapped in: the directory
|
|
78
|
+
and the archives the formats write beside it land together, or nothing
|
|
79
|
+
changes — a failure partway, or a package its own post-build checks fail,
|
|
80
|
+
leaves a previous package exactly as it was.
|
|
81
|
+
|
|
82
|
+
VAT never deletes what it did not produce. An --output that already holds
|
|
83
|
+
anything — a non-empty directory, a file, or (with the zip / marketplace
|
|
84
|
+
formats) the <output>.zip or <name>.marketplace.json beside it — is refused
|
|
85
|
+
(USAGE_INVALID) and left exactly as it was, unless --force says it is a
|
|
86
|
+
previous package to replace; --force never replaces a directory standing in
|
|
87
|
+
an archive's place (USAGE_INVALID). --dry-run decides by the same plan and
|
|
88
|
+
prints it ([dry-run] create|replace <what> <path>). An empty directory is
|
|
89
|
+
replaced as-is. An --output that is, or contains, the SKILL.md or a file it
|
|
90
|
+
bundles is refused (USAGE_INVALID) even with --force: VAT never writes over
|
|
91
|
+
what it reads.
|
|
92
|
+
|
|
72
93
|
Output:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
94
|
+
YAML report on stdout (schema: packages/cli/schemas/skills-package.json):
|
|
95
|
+
status ok|findings|error, examined (1 skill), findings[] (every validation
|
|
96
|
+
finding, plus SKILL_PACKAGE_TOO_LARGE for a claude-web ZIP over 8 MB or
|
|
97
|
+
SKILL_PACKAGING_FAILED when packaging refused the skill's content), and
|
|
98
|
+
data: skill, version, outputPath (relative to the working directory; null
|
|
99
|
+
when no package was produced), dryRun. Progress goes to stderr.
|
|
78
100
|
|
|
79
101
|
Exit Codes:
|
|
80
|
-
0 -
|
|
81
|
-
1 -
|
|
82
|
-
|
|
102
|
+
0 - Packaged (or previewed with --dry-run); warnings and info do not block
|
|
103
|
+
1 - An error-severity finding (nothing is packaged): the skill failed
|
|
104
|
+
validation, the package failed its own post-build checks (their
|
|
105
|
+
findings), packaging refused the skill's content
|
|
106
|
+
(SKILL_PACKAGING_FAILED), or its claude-web ZIP exceeds 8 MB
|
|
107
|
+
(SKILL_PACKAGE_TOO_LARGE)
|
|
108
|
+
2 - The run could not start or finish; error.code says why: USAGE_INVALID
|
|
109
|
+
(a <skill-path> naming nothing, an invalid --target, an unknown or
|
|
110
|
+
empty --formats value, no project root,
|
|
111
|
+
an --output already holding something and no --force, or an --output
|
|
112
|
+
holding the skill's own source), INPUT_UNREADABLE
|
|
113
|
+
(a <skill-path> the OS will not stat or read, or a directory in the
|
|
114
|
+
project the OS will not list -- the crawl names it, dry run or real;
|
|
115
|
+
this verb takes no git snapshot), RUN_INCOMPLETE (an output the OS will not let the build
|
|
116
|
+
write or examine: a full disk, a read-only or unwritable output
|
|
117
|
+
directory, an --output under a directory the OS will not let VAT
|
|
118
|
+
examine, a file in the way, a ZIP, npm package.json or marketplace
|
|
119
|
+
manifest that could not be written -- nothing of the package lands),
|
|
120
|
+
or INTERNAL_ERROR (an
|
|
121
|
+
unexpected failure). A previous package the swap replaced that the OS
|
|
122
|
+
will not remove is a TREE_CLEANUP_INCOMPLETE warning naming it (exit 0)
|
|
83
123
|
|
|
84
124
|
Requirements:
|
|
85
125
|
projectRoot: required (errors if no vibe-agent-toolkit.config.yaml or .git/ ancestor)
|
|
@@ -89,47 +129,70 @@ Requirements:
|
|
|
89
129
|
|
|
90
130
|
Examples:
|
|
91
131
|
$ vat skills package SKILL.md -o dist/my-skill
|
|
132
|
+
$ vat skills package SKILL.md -o dist/my-skill --force # replace the previous package
|
|
92
133
|
$ vat skills package SKILL.md -o /tmp/skill --dry-run
|
|
93
|
-
$ vat skills package SKILL.md -o dist -f zip,npm
|
|
134
|
+
$ vat skills package SKILL.md -o dist/my-skill -f zip,npm
|
|
94
135
|
`);
|
|
95
136
|
return command;
|
|
96
137
|
}
|
|
138
|
+
/** `vat skills package` has no `--strict`: warnings never fail it. */
|
|
139
|
+
const PACKAGE_GATE = { strict: false };
|
|
97
140
|
/**
|
|
98
|
-
* Validate skill
|
|
141
|
+
* Validate the skill and render every finding to stderr.
|
|
99
142
|
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
143
|
+
* `locationRoot` is passed, not left to the validator's default, so every
|
|
144
|
+
* finding and the ZIP-ceiling finding {@link buildSkillsPackageReport} adds
|
|
145
|
+
* are located against the SAME root.
|
|
102
146
|
*/
|
|
103
|
-
async function
|
|
147
|
+
async function validateForPackage(skillPath, basePath, locationRoot, logger) {
|
|
104
148
|
logger.info(`\n🔍 Validating skill...`);
|
|
105
|
-
// `{}`: this verb reads no project config (nor does `packageSkill` below).
|
|
106
|
-
|
|
149
|
+
// `{}`: this verb reads no project config (nor does `packageSkill` below). The gate
|
|
150
|
+
// reads only the skill: a read the OS refuses is the input's, of its content.
|
|
151
|
+
const validationResult = await withFsFault({ side: 'source', origin: 'content', action: `validate the skill at ${skillPath}` }, () => validateSkill({
|
|
107
152
|
skillPath,
|
|
108
153
|
rootDir: basePath,
|
|
154
|
+
locationRoot,
|
|
109
155
|
validation: {},
|
|
110
|
-
|
|
156
|
+
side: 'source',
|
|
157
|
+
}));
|
|
111
158
|
for (const line of formatSkillValidationLines(validationResult)) {
|
|
112
159
|
logger.info(line);
|
|
113
160
|
}
|
|
114
|
-
if (validationResult.status === 'error') {
|
|
115
|
-
// The findings above went to stderr only; without this the command exited 1
|
|
116
|
-
// having written zero bytes of the documented stdout summary.
|
|
117
|
-
handleValidationGateFailure(skillPath, validationResult.issues);
|
|
118
|
-
}
|
|
119
161
|
return validationResult;
|
|
120
162
|
}
|
|
121
163
|
/**
|
|
122
|
-
* The
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
164
|
+
* The claude.ai ZIP ceiling, as a finding about the skill. Always `error` and
|
|
165
|
+
* not overridable (`NonOverridableCode`): this verb reads no project config,
|
|
166
|
+
* so a `validation.severity` key for it would parse and do nothing.
|
|
167
|
+
*/
|
|
168
|
+
function packageTooLargeIssue(message, location) {
|
|
169
|
+
return {
|
|
170
|
+
severity: 'error',
|
|
171
|
+
code: 'SKILL_PACKAGE_TOO_LARGE',
|
|
172
|
+
message,
|
|
173
|
+
location,
|
|
174
|
+
fix: 'Link fewer or smaller resources from the skill, or package with --target claude-code, which has no upload ceiling.',
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
/** The finding a packaging refusal publishes. */
|
|
178
|
+
function refusedIssue(refused) {
|
|
179
|
+
return refused.code === 'SKILL_PACKAGE_TOO_LARGE'
|
|
180
|
+
? packageTooLargeIssue(refused.message, refused.location)
|
|
181
|
+
: packagingFailedIssue(refused.message, refused.location, 're-run vat skills package', refused.thrown);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* THE document of one run. `examined` is the one skill; every validation
|
|
185
|
+
* finding is published whatever its severity, so the status is the literal
|
|
186
|
+
* `ok`/`findings` and the exit code derives from the counts — warnings never
|
|
187
|
+
* block (no `--strict`), an error does.
|
|
130
188
|
*/
|
|
131
|
-
export function
|
|
132
|
-
|
|
189
|
+
export function buildSkillsPackageReport(input) {
|
|
190
|
+
const issues = [
|
|
191
|
+
...input.validation.issues,
|
|
192
|
+
...(input.refused === undefined ? [] : [refusedIssue(input.refused)]),
|
|
193
|
+
...input.runFindings,
|
|
194
|
+
];
|
|
195
|
+
return buildReport({ examined: 1, findings: toFindings(issues), data: input.data, gate: PACKAGE_GATE });
|
|
133
196
|
}
|
|
134
197
|
/**
|
|
135
198
|
* Render the validation report: a headline that names what was found, then every
|
|
@@ -137,64 +200,29 @@ export function buildPackageHeader(validation) {
|
|
|
137
200
|
*
|
|
138
201
|
* Two silent drops used to live here. The renderer filtered to `error` and
|
|
139
202
|
* `warning` only, so every `info` finding vanished; and the caller only invoked
|
|
140
|
-
* it for
|
|
141
|
-
* `✅ Validation passed` — the
|
|
142
|
-
* non-blocking status, which is exactly the case that got swallowed.
|
|
203
|
+
* it for an error result, so a warning-severity result printed a bare
|
|
204
|
+
* `✅ Validation passed` — exactly the case that got swallowed.
|
|
143
205
|
*/
|
|
144
|
-
/** One glyph per status value — total, so a new status cannot fall through to a nicer one. */
|
|
145
|
-
const SKILL_VALIDATION_GLYPHS = {
|
|
146
|
-
error: '❌',
|
|
147
|
-
warning: '⚠️ ',
|
|
148
|
-
success: 'ℹ️ ',
|
|
149
|
-
};
|
|
150
206
|
export function formatSkillValidationLines(validationResult) {
|
|
151
|
-
const { issues,
|
|
207
|
+
const { issues, summary } = validationResult;
|
|
152
208
|
if (issues.length === 0) {
|
|
153
209
|
return ['✅ Validation passed — no findings'];
|
|
154
210
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
211
|
+
let headline;
|
|
212
|
+
if (summary.errors > 0) {
|
|
213
|
+
headline = `\n❌ Skill validation failed — ${formatIssueSetHeading(issues)}`;
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
const glyph = summary.warnings > 0 ? '⚠️ ' : 'ℹ️ ';
|
|
217
|
+
headline = `\n${glyph} Validation passed with findings — ${formatIssueSetHeading(issues)}`;
|
|
218
|
+
}
|
|
219
|
+
const lines = [headline, ` Summary: ${validationResult.description}\n`];
|
|
160
220
|
for (const issue of issues) {
|
|
161
221
|
lines.push(...formatIssueLines(issue, ' '));
|
|
162
222
|
}
|
|
163
223
|
lines.push('');
|
|
164
224
|
return lines;
|
|
165
225
|
}
|
|
166
|
-
/**
|
|
167
|
-
* Recursively collect linked markdown files
|
|
168
|
-
*/
|
|
169
|
-
async function collectLinkedFiles(markdownPath, basePath, visited) {
|
|
170
|
-
const normalizedPath = safePath.resolve(markdownPath);
|
|
171
|
-
if (visited.has(normalizedPath)) {
|
|
172
|
-
return [];
|
|
173
|
-
}
|
|
174
|
-
visited.add(normalizedPath);
|
|
175
|
-
const parseResult = await parseFileCached(markdownPath, 'markdown');
|
|
176
|
-
const linkedFiles = [];
|
|
177
|
-
for (const link of parseResult.links) {
|
|
178
|
-
if (link.type !== 'local_file')
|
|
179
|
-
continue;
|
|
180
|
-
const hrefWithoutAnchor = link.href.split('#')[0] ?? link.href;
|
|
181
|
-
if (hrefWithoutAnchor === '')
|
|
182
|
-
continue;
|
|
183
|
-
const resolvedPath = safePath.resolve(dirname(markdownPath), hrefWithoutAnchor);
|
|
184
|
-
// Only include markdown files (no basePath filtering - collect all valid linked files)
|
|
185
|
-
if (!resolvedPath.endsWith('.md'))
|
|
186
|
-
continue;
|
|
187
|
-
// Skip missing files
|
|
188
|
-
if (!existsSync(resolvedPath))
|
|
189
|
-
continue;
|
|
190
|
-
linkedFiles.push(resolvedPath);
|
|
191
|
-
// Recursively collect from this file
|
|
192
|
-
const transitive = await collectLinkedFiles(resolvedPath, basePath, visited);
|
|
193
|
-
linkedFiles.push(...transitive);
|
|
194
|
-
}
|
|
195
|
-
// Deduplicate
|
|
196
|
-
return [...new Set(linkedFiles)];
|
|
197
|
-
}
|
|
198
226
|
/**
|
|
199
227
|
* Extract skill name from parse result
|
|
200
228
|
*/
|
|
@@ -215,163 +243,216 @@ function extractSkillName(parseResult) {
|
|
|
215
243
|
/**
|
|
216
244
|
* Calculate estimated ZIP size for files
|
|
217
245
|
*/
|
|
218
|
-
function calculateZipSize(skillPath, linkedFiles) {
|
|
246
|
+
function calculateZipSize(skillPath, linkedFiles, within) {
|
|
219
247
|
let totalSize = 0;
|
|
220
|
-
|
|
248
|
+
// The skill the operator named: its own `within`.
|
|
249
|
+
totalSize += requireFollowedStatSync(skillPath, skillPath).size;
|
|
221
250
|
for (const file of linkedFiles) {
|
|
222
|
-
|
|
223
|
-
|
|
251
|
+
// Read beneath the base links resolve against: a file that resolves to nothing weighs nothing.
|
|
252
|
+
const stats = followedStatSync(file, within);
|
|
253
|
+
if (stats !== undefined) {
|
|
254
|
+
totalSize += stats.size;
|
|
224
255
|
}
|
|
225
256
|
}
|
|
226
257
|
// Rough estimate: 60% compression for markdown
|
|
227
258
|
return Math.round((totalSize * 0.6) / 1024);
|
|
228
259
|
}
|
|
229
|
-
/**
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
function writePackageHeader(validation) {
|
|
238
|
-
// Serialized from a real object rather than hand-spelled lines: the property
|
|
239
|
-
// has to be visible as a property (to a reader and to the repo's severity-counts
|
|
240
|
-
// ratchet, which scans source for a counts block), and yaml.stringify cannot
|
|
241
|
-
// get the indentation wrong.
|
|
242
|
-
process.stdout.write(yaml.stringify(buildPackageHeader(validation), { indent: 2, lineWidth: 0 }));
|
|
260
|
+
/** A path as the report publishes it: relative to the working directory, forward slashes. */
|
|
261
|
+
function reportPath(path) {
|
|
262
|
+
return toForwardSlash(safePath.relative(process.cwd(), safePath.resolve(path)));
|
|
263
|
+
}
|
|
264
|
+
/** The frontmatter `version` as the report publishes it: a string, or `null` when none is declared. */
|
|
265
|
+
function frontmatterVersion(parseResult) {
|
|
266
|
+
const version = parseResult.frontmatter?.['version'];
|
|
267
|
+
return typeof version === 'string' || typeof version === 'number' ? String(version) : null;
|
|
243
268
|
}
|
|
244
269
|
/**
|
|
245
|
-
*
|
|
270
|
+
* The `--formats` value, or the invocation's mistake. An unknown name used to
|
|
271
|
+
* be dropped by the packager, so `--formats zpi` wrote only the directory and
|
|
272
|
+
* exited 0.
|
|
246
273
|
*/
|
|
247
|
-
function
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
process.stdout.write(` - ${format}\n`);
|
|
274
|
+
function resolvePackageFormats(rawFormats) {
|
|
275
|
+
if (rawFormats === undefined)
|
|
276
|
+
return [...DEFAULT_FORMATS];
|
|
277
|
+
const requested = rawFormats.split(',').map((format) => format.trim()).filter((format) => format !== '');
|
|
278
|
+
const unknown = requested.filter((format) => !VALID_FORMATS.includes(format));
|
|
279
|
+
if (requested.length === 0 || unknown.length > 0) {
|
|
280
|
+
const quoted = unknown.map((format) => JSON.stringify(format)).join(', ');
|
|
281
|
+
const named = unknown.length > 0 ? `Unknown --formats value(s): ${quoted}` : '--formats names no format';
|
|
282
|
+
throw new CommandRefusalError('USAGE_INVALID', `${named}. Valid formats are: ${VALID_FORMATS.join(', ')}`);
|
|
257
283
|
}
|
|
258
|
-
|
|
284
|
+
return requested;
|
|
259
285
|
}
|
|
286
|
+
/** Test seam: the report's pure field derivations, and the `--formats` resolver. */
|
|
287
|
+
export const __internal = { extractSkillName, failedChecksReport, frontmatterVersion, reportPath, resolvePackageFormats, resolveTarget };
|
|
260
288
|
/**
|
|
261
|
-
*
|
|
289
|
+
* Preview the package: the packager's own dry run (`dryRun: true`), so the
|
|
290
|
+
* project crawl, the link walk and the output check that can refuse the real run
|
|
291
|
+
* refuse the preview the same way — and the file list is the one the real run
|
|
292
|
+
* would copy. Runs after the validation gate passed.
|
|
262
293
|
*/
|
|
263
|
-
async function
|
|
264
|
-
const startTime = Date.now();
|
|
265
|
-
// Validate skill path exists
|
|
266
|
-
if (!existsSync(skillPath)) {
|
|
267
|
-
throw new Error(`SKILL.md not found: ${skillPath}`);
|
|
268
|
-
}
|
|
294
|
+
async function previewPackage(skillPath, options, packageOptions, logger) {
|
|
269
295
|
logger.info(`🔍 Dry-run: Analyzing skill packaging...`);
|
|
270
296
|
logger.info(` Source: ${skillPath}`);
|
|
271
297
|
logger.info(` Output: ${options.output}`);
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
//
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
// Collect linked files (recursively)
|
|
279
|
-
const basePath = resolveBasePath(options, skillPath);
|
|
280
|
-
const linkedFiles = await collectLinkedFiles(skillPath, basePath, new Set());
|
|
298
|
+
const plan = await packageSkill(skillPath, { ...packageOptions, dryRun: true });
|
|
299
|
+
logger.info(` Skill: ${plan.skill.name}`);
|
|
300
|
+
// The output's plan, as the real run would carry it out: one line per change.
|
|
301
|
+
for (const line of plan.plannedChanges ?? []) {
|
|
302
|
+
logger.info(` [dry-run] ${line}`);
|
|
303
|
+
}
|
|
281
304
|
logger.info(`\n📁 Files to be packaged:`);
|
|
282
305
|
logger.info(` - SKILL.md (root)`);
|
|
283
|
-
for (const file of
|
|
284
|
-
|
|
285
|
-
logger.info(` - ${relPath}`);
|
|
306
|
+
for (const file of plan.files.dependencies) {
|
|
307
|
+
logger.info(` - ${toForwardSlash(file)}`);
|
|
286
308
|
}
|
|
287
|
-
logger.info(`\n Total: ${
|
|
288
|
-
|
|
289
|
-
const formats = options.formats?.split(',').map(f => f.trim()) ?? ['directory', 'zip'];
|
|
309
|
+
logger.info(`\n Total: ${plan.files.dependencies.length + 1} files`);
|
|
310
|
+
const formats = packageOptions.formats ?? [];
|
|
290
311
|
logger.info(`\n📦 Formats to create:`);
|
|
291
312
|
for (const format of formats) {
|
|
292
313
|
logger.info(` - ${format}`);
|
|
293
314
|
}
|
|
294
|
-
// Estimate ZIP size if needed
|
|
295
315
|
if (formats.includes('zip')) {
|
|
296
|
-
const estimatedZipSize = calculateZipSize(skillPath,
|
|
316
|
+
const estimatedZipSize = calculateZipSize(skillPath, (plan.plannedSources ?? []).filter((file) => file !== skillPath), resolveBasePath(options, skillPath));
|
|
297
317
|
logger.info(`\n📊 Estimated ZIP size: ~${estimatedZipSize}KB`);
|
|
298
318
|
}
|
|
299
|
-
const duration = Date.now() - startTime;
|
|
300
|
-
// Output YAML results
|
|
301
|
-
outputDryRunYaml(skillName, options.output, linkedFiles.length + 1, formats, duration, validationResult);
|
|
302
319
|
logger.info(`\n✅ Dry-run complete (no files created)`);
|
|
303
320
|
logger.info(` Run without --dry-run to create the package`);
|
|
321
|
+
return { skill: plan.skill.name, version: plan.skill.version ?? null, outputPath: reportPath(options.output), dryRun: true };
|
|
304
322
|
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
323
|
+
/**
|
|
324
|
+
* Which finding a `packageSkill` throw is, or `undefined` for a defect. Only
|
|
325
|
+
* the packager's CODED refusals are findings about the skill — the claude.ai
|
|
326
|
+
* ZIP ceiling, and its refusal of the skill's own content; an uncoded throw is
|
|
327
|
+
* VAT's, and reaches the command's `INTERNAL_ERROR`.
|
|
328
|
+
*/
|
|
329
|
+
export function packagingRefusalCode(error) {
|
|
330
|
+
if (error instanceof ZipSizeLimitError)
|
|
331
|
+
return 'SKILL_PACKAGE_TOO_LARGE';
|
|
332
|
+
return isSkillPackagingInputError(error) ? 'SKILL_PACKAGING_FAILED' : undefined;
|
|
333
|
+
}
|
|
334
|
+
/** The `--target` value, or the invocation's mistake. */
|
|
335
|
+
function resolveTarget(rawTarget) {
|
|
336
|
+
if (!VALID_TARGETS.includes(rawTarget)) {
|
|
337
|
+
throw new CommandRefusalError('USAGE_INVALID', `Invalid --target value: "${rawTarget}". Valid targets are: ${VALID_TARGETS.join(', ')}`);
|
|
338
|
+
}
|
|
339
|
+
return rawTarget;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Package the skill — or, with `--dry-run`, preview it through the same packager
|
|
343
|
+
* call. A claude-web ZIP over the 8 MB claude.ai ceiling, and the packager
|
|
344
|
+
* refusing the skill's own content, are FINDINGS about the skill, not failures of
|
|
345
|
+
* the run; every other throw reaches the command's refusal.
|
|
346
|
+
*/
|
|
347
|
+
async function packageAndReport(skillPath, options, target, formats, validation, locationRoot, logger) {
|
|
348
|
+
const packageOptions = {
|
|
349
|
+
formats: [...formats],
|
|
350
|
+
rewriteLinks: resolveRewriteLinks(options),
|
|
351
|
+
outputPath: options.output,
|
|
352
|
+
target,
|
|
353
|
+
...(options.force === true && { replaceExistingOutput: true }),
|
|
354
|
+
};
|
|
355
|
+
// Only set when explicitly supplied — packageSkill() owns the fallback for
|
|
356
|
+
// this field, so an unconditional resolveBasePath() here would change it.
|
|
357
|
+
if (options.basePath) {
|
|
358
|
+
packageOptions.basePath = options.basePath;
|
|
359
|
+
}
|
|
308
360
|
try {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
requireProjectRoot(process.cwd(), 'vat skills package');
|
|
312
|
-
logger.info(`📦 Packaging skill: ${skillPath}`);
|
|
313
|
-
// Validate --target option
|
|
314
|
-
const rawTarget = options.target ?? DEFAULT_TARGET;
|
|
315
|
-
if (!VALID_TARGETS.includes(rawTarget)) {
|
|
316
|
-
throw new Error(`Invalid --target value: "${rawTarget}". Valid targets are: ${VALID_TARGETS.join(', ')}`);
|
|
317
|
-
}
|
|
318
|
-
const target = rawTarget;
|
|
319
|
-
// Parse formats
|
|
320
|
-
const formats = options.formats
|
|
321
|
-
?.split(',')
|
|
322
|
-
.map(f => f.trim()) ?? ['directory', 'zip'];
|
|
323
|
-
// Build package options
|
|
324
|
-
const packageOptions = {
|
|
325
|
-
formats,
|
|
326
|
-
rewriteLinks: resolveRewriteLinks(options),
|
|
327
|
-
outputPath: options.output,
|
|
328
|
-
target,
|
|
329
|
-
};
|
|
330
|
-
// Only set when explicitly supplied — packageSkill() owns the fallback for
|
|
331
|
-
// this field, so an unconditional resolveBasePath() here would change it.
|
|
332
|
-
if (options.basePath) {
|
|
333
|
-
packageOptions.basePath = options.basePath;
|
|
361
|
+
if (options.dryRun === true) {
|
|
362
|
+
return buildSkillsPackageReport({ validation, data: await previewPackage(skillPath, options, packageOptions, logger), runFindings: [] });
|
|
334
363
|
}
|
|
335
|
-
// Handle dry-run mode
|
|
336
|
-
if (options.dryRun) {
|
|
337
|
-
await performDryRun(skillPath, options, logger);
|
|
338
|
-
process.exit(ExitCode.OK);
|
|
339
|
-
}
|
|
340
|
-
// VALIDATE FIRST - shift left to catch errors early
|
|
341
|
-
const validationResult = await validateSkillOrExit(skillPath, resolveBasePath(options, skillPath), logger);
|
|
342
|
-
logger.info('');
|
|
343
|
-
// Package the skill
|
|
344
364
|
const result = await packageSkill(skillPath, packageOptions);
|
|
345
|
-
const
|
|
346
|
-
// Output YAML to stdout
|
|
347
|
-
process.stdout.write('---\n');
|
|
348
|
-
writePackageHeader(validationResult);
|
|
349
|
-
process.stdout.write(`skill: ${result.skill.name}\n`);
|
|
350
|
-
process.stdout.write(`version: ${result.skill.version ?? 'unspecified'}\n`);
|
|
351
|
-
process.stdout.write(`outputPath: ${result.outputPath}\n`);
|
|
352
|
-
process.stdout.write(`filesPackaged: ${result.files.dependencies.length + 1}\n`);
|
|
353
|
-
if (result.artifacts) {
|
|
354
|
-
process.stdout.write(`artifacts:\n`);
|
|
355
|
-
for (const [format, path] of Object.entries(result.artifacts)) {
|
|
356
|
-
process.stdout.write(` ${format}: ${path}\n`);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
process.stdout.write(`duration: ${duration}ms\n`);
|
|
365
|
+
const leftovers = result.residue.map(({ message, path }) => leftoverIssue(message, path));
|
|
360
366
|
logger.info(`✅ Packaged skill: ${result.skill.name}`);
|
|
361
367
|
logger.info(` Output: ${result.outputPath}`);
|
|
362
368
|
if (result.artifacts?.['zip']) {
|
|
363
369
|
logger.info(` ZIP: ${basename(result.artifacts['zip'])}`);
|
|
364
370
|
}
|
|
365
|
-
|
|
371
|
+
return buildSkillsPackageReport({
|
|
372
|
+
validation,
|
|
373
|
+
data: { skill: result.skill.name, version: result.skill.version ?? null, outputPath: reportPath(result.outputPath), dryRun: false },
|
|
374
|
+
runFindings: leftovers,
|
|
375
|
+
});
|
|
366
376
|
}
|
|
367
377
|
catch (error) {
|
|
368
|
-
if (error
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
378
|
+
if (isVatError(error, SKILL_PACKAGE_CHECKS_FAILED_CODE))
|
|
379
|
+
return failedChecksReport(error, validation, logger);
|
|
380
|
+
const code = packagingRefusalCode(error);
|
|
381
|
+
if (code === undefined)
|
|
382
|
+
throw error;
|
|
383
|
+
const message = errorMessageOf(error);
|
|
384
|
+
logger.error(`Package failed: ${message}`);
|
|
385
|
+
const parseResult = await parseFileCached(skillPath, 'markdown');
|
|
386
|
+
return buildSkillsPackageReport({
|
|
387
|
+
validation,
|
|
388
|
+
// The package is one plan: a refused one — a too-large ZIP included — landed nothing.
|
|
389
|
+
data: { skill: extractSkillName(parseResult), version: frontmatterVersion(parseResult), outputPath: null, dryRun: options.dryRun === true },
|
|
390
|
+
refused: { code, message, location: issueLocation(skillPath, locationRoot), thrown: error },
|
|
391
|
+
runFindings: leftoverFindingsOf(error),
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* A package its own post-build checks failed: it did not land (the previous output is as it was),
|
|
397
|
+
* and this lane publishes the checks' own findings — exit 1, `outputPath: null` — with what the
|
|
398
|
+
* discard could not remove.
|
|
399
|
+
*/
|
|
400
|
+
function failedChecksReport(error, validation, logger) {
|
|
401
|
+
const { result } = error;
|
|
402
|
+
const postBuild = collectPostBuildIssues(result);
|
|
403
|
+
logger.error(`Package failed its post-build checks: nothing was written to ${result.outputPath}`);
|
|
404
|
+
for (const issue of postBuild) {
|
|
405
|
+
for (const line of formatIssueLines(issue, ' '))
|
|
406
|
+
logger.error(line);
|
|
407
|
+
}
|
|
408
|
+
return buildSkillsPackageReport({
|
|
409
|
+
validation,
|
|
410
|
+
data: { skill: result.skill.name, version: result.skill.version ?? null, outputPath: null, dryRun: false },
|
|
411
|
+
runFindings: [...postBuild, ...leftoverFindingsOf(error)],
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* The SKILL.md the argument names, or the invocation's refusal — the same
|
|
416
|
+
* policy `vat skill review` applies to its path: a path naming nothing is
|
|
417
|
+
* `USAGE_INVALID`, one the OS will not stat or read is `INPUT_UNREADABLE`.
|
|
418
|
+
* Decided here, before the validator, whose own existence probe cannot tell
|
|
419
|
+
* the two apart and whose read is uncoded.
|
|
420
|
+
*/
|
|
421
|
+
function resolvePackageSource(skillPath) {
|
|
422
|
+
const skillFile = resolveSkillPath(skillPath);
|
|
423
|
+
readInputFile(skillFile, { origin: 'argument', message: `Path does not exist: ${skillFile}` });
|
|
424
|
+
return skillFile;
|
|
425
|
+
}
|
|
426
|
+
/** One run, as the report it publishes: the gate's failure, a dry run's preview, or the package. */
|
|
427
|
+
async function runPackage(skillPathArg, options, logger) {
|
|
428
|
+
const skillPath = resolvePackageSource(skillPathArg);
|
|
429
|
+
// Spec §7: `vat skills package` requires a projectRoot — fails fast at
|
|
430
|
+
// the CLI boundary if no config or git ancestor exists.
|
|
431
|
+
requireProjectRoot(process.cwd(), 'vat skills package');
|
|
432
|
+
logger.info(`📦 Packaging skill: ${skillPathArg}`);
|
|
433
|
+
const target = resolveTarget(options.target ?? DEFAULT_TARGET);
|
|
434
|
+
const formats = resolvePackageFormats(options.formats);
|
|
435
|
+
// VALIDATE FIRST - shift left to catch errors early.
|
|
436
|
+
const skillDir = dirname(skillPath);
|
|
437
|
+
const locationRoot = findProjectRoot(skillDir) ?? skillDir;
|
|
438
|
+
const validation = await validateForPackage(skillPath, resolveBasePath(options, skillPath), locationRoot, logger);
|
|
439
|
+
logger.info('');
|
|
440
|
+
if (validation.summary.errors > 0) {
|
|
441
|
+
// The gate stopped it: nothing was packaged, and the document says so.
|
|
442
|
+
const skill = validation.metadata?.name ?? basename(skillDir);
|
|
443
|
+
return buildSkillsPackageReport({ validation, data: { skill, version: null, outputPath: null, dryRun: options.dryRun === true }, runFindings: [] });
|
|
444
|
+
}
|
|
445
|
+
return packageAndReport(skillPath, options, target, formats, validation, locationRoot, logger);
|
|
446
|
+
}
|
|
447
|
+
async function packageCommand(skillPath, options) {
|
|
448
|
+
const logger = createLogger(options.debug ? { debug: true } : {});
|
|
449
|
+
let report;
|
|
450
|
+
try {
|
|
451
|
+
report = await runPackage(skillPath, options, logger);
|
|
452
|
+
}
|
|
453
|
+
catch (error) {
|
|
454
|
+
endWithRefusal('skills package', refusalCodeOf(error), error, 'yaml', PACKAGE_GATE, NOTHING_FINISHED);
|
|
375
455
|
}
|
|
456
|
+
endWithReport('skills package', report, 'yaml');
|
|
376
457
|
}
|
|
377
458
|
//# sourceMappingURL=package.js.map
|