@vibe-agent-toolkit/cli 0.2.0-rc.1 → 0.2.0-rc.11
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 +4 -5
- package/dist/bin/vat +97 -28
- package/dist/bin/vat.js +97 -28
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +115 -76
- package/dist/bin.js.map +1 -1
- package/dist/command-loaders.d.ts +44 -0
- package/dist/command-loaders.d.ts.map +1 -0
- package/dist/command-loaders.js +60 -0
- package/dist/command-loaders.js.map +1 -0
- package/dist/commands/agent/build.d.ts.map +1 -1
- package/dist/commands/agent/build.js +2 -1
- package/dist/commands/agent/build.js.map +1 -1
- package/dist/commands/agent/import.d.ts.map +1 -1
- package/dist/commands/agent/import.js +3 -2
- package/dist/commands/agent/import.js.map +1 -1
- package/dist/commands/agent/index.js +1 -1
- package/dist/commands/agent/install-path.d.ts +36 -0
- package/dist/commands/agent/install-path.d.ts.map +1 -0
- package/dist/commands/agent/install-path.js +44 -0
- package/dist/commands/agent/install-path.js.map +1 -0
- package/dist/commands/agent/install.d.ts.map +1 -1
- package/dist/commands/agent/install.js +66 -13
- package/dist/commands/agent/install.js.map +1 -1
- package/dist/commands/agent/installed.d.ts.map +1 -1
- package/dist/commands/agent/installed.js +22 -12
- package/dist/commands/agent/installed.js.map +1 -1
- package/dist/commands/agent/list.d.ts.map +1 -1
- package/dist/commands/agent/list.js +2 -1
- package/dist/commands/agent/list.js.map +1 -1
- package/dist/commands/agent/run.d.ts.map +1 -1
- package/dist/commands/agent/run.js +2 -1
- package/dist/commands/agent/run.js.map +1 -1
- package/dist/commands/agent/uninstall.d.ts.map +1 -1
- package/dist/commands/agent/uninstall.js +13 -6
- package/dist/commands/agent/uninstall.js.map +1 -1
- package/dist/commands/agent/validate.d.ts.map +1 -1
- package/dist/commands/agent/validate.js +3 -2
- package/dist/commands/agent/validate.js.map +1 -1
- package/dist/commands/ard/emit.d.ts +165 -0
- package/dist/commands/ard/emit.d.ts.map +1 -0
- package/dist/commands/ard/emit.js +338 -0
- package/dist/commands/ard/emit.js.map +1 -0
- package/dist/commands/ard/index.d.ts +12 -0
- package/dist/commands/ard/index.d.ts.map +1 -0
- package/dist/commands/ard/index.js +84 -0
- package/dist/commands/ard/index.js.map +1 -0
- package/dist/commands/ard/surfaces.d.ts +56 -0
- package/dist/commands/ard/surfaces.d.ts.map +1 -0
- package/dist/commands/ard/surfaces.js +150 -0
- package/dist/commands/ard/surfaces.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 +11 -7
- package/dist/commands/audit/distributed-tree.js.map +1 -1
- package/dist/commands/audit/git-url-clone.d.ts +1 -1
- package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
- package/dist/commands/audit/git-url-clone.js.map +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
- package/dist/commands/audit/hierarchical-output.js +1 -1
- package/dist/commands/audit/hierarchical-output.js.map +1 -1
- package/dist/commands/audit/provenance.d.ts.map +1 -1
- package/dist/commands/audit/provenance.js +4 -3
- package/dist/commands/audit/provenance.js.map +1 -1
- package/dist/commands/audit/scan-population.d.ts +158 -0
- package/dist/commands/audit/scan-population.d.ts.map +1 -0
- package/dist/commands/audit/scan-population.js +292 -0
- package/dist/commands/audit/scan-population.js.map +1 -0
- package/dist/commands/audit-settings.d.ts.map +1 -1
- package/dist/commands/audit-settings.js +6 -5
- package/dist/commands/audit-settings.js.map +1 -1
- package/dist/commands/audit.d.ts +98 -8
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +1150 -394
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +40 -36
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cache/cache-control.d.ts +82 -0
- package/dist/commands/cache/cache-control.d.ts.map +1 -0
- package/dist/commands/cache/cache-control.js +86 -0
- package/dist/commands/cache/cache-control.js.map +1 -0
- package/dist/commands/cache/clear.d.ts +34 -6
- package/dist/commands/cache/clear.d.ts.map +1 -1
- package/dist/commands/cache/clear.js +101 -15
- package/dist/commands/cache/clear.js.map +1 -1
- package/dist/commands/cache/index.d.ts +13 -63
- package/dist/commands/cache/index.d.ts.map +1 -1
- package/dist/commands/cache/index.js +47 -79
- package/dist/commands/cache/index.js.map +1 -1
- package/dist/commands/claude/claude-config.d.ts.map +1 -1
- package/dist/commands/claude/claude-config.js +6 -0
- package/dist/commands/claude/claude-config.js.map +1 -1
- package/dist/commands/claude/context.d.ts +372 -0
- package/dist/commands/claude/context.d.ts.map +1 -0
- package/dist/commands/claude/context.js +1115 -0
- package/dist/commands/claude/context.js.map +1 -0
- package/dist/commands/claude/index.d.ts +14 -0
- package/dist/commands/claude/index.d.ts.map +1 -1
- package/dist/commands/claude/index.js +22 -2
- package/dist/commands/claude/index.js.map +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.d.ts +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.js +1 -2
- package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.js +40 -31
- package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.js +0 -1
- package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish-tree.js +0 -6
- package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
- package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish.js +2 -1
- package/dist/commands/claude/marketplace/publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate.d.ts +73 -22
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +407 -72
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/org/api-keys.d.ts +0 -3
- package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
- package/dist/commands/claude/org/api-keys.js +2 -1
- package/dist/commands/claude/org/api-keys.js.map +1 -1
- package/dist/commands/claude/org/helpers.d.ts +54 -1
- package/dist/commands/claude/org/helpers.d.ts.map +1 -1
- package/dist/commands/claude/org/helpers.js +42 -7
- 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 +24 -16
- package/dist/commands/claude/org/index.js.map +1 -1
- package/dist/commands/claude/org/invites.d.ts +0 -3
- package/dist/commands/claude/org/invites.d.ts.map +1 -1
- package/dist/commands/claude/org/invites.js +3 -2
- package/dist/commands/claude/org/invites.js.map +1 -1
- package/dist/commands/claude/org/skills.d.ts +527 -0
- package/dist/commands/claude/org/skills.d.ts.map +1 -1
- package/dist/commands/claude/org/skills.js +1414 -108
- package/dist/commands/claude/org/skills.js.map +1 -1
- package/dist/commands/claude/org/users.d.ts +0 -3
- package/dist/commands/claude/org/users.d.ts.map +1 -1
- package/dist/commands/claude/org/users.js +6 -3
- package/dist/commands/claude/org/users.js.map +1 -1
- package/dist/commands/claude/org/workspaces.d.ts +0 -3
- package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
- package/dist/commands/claude/org/workspaces.js +11 -7
- package/dist/commands/claude/org/workspaces.js.map +1 -1
- package/dist/commands/claude/plugin/build.d.ts +41 -3
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +147 -80
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
- package/dist/commands/claude/plugin/helpers.js +2 -7
- package/dist/commands/claude/plugin/helpers.js.map +1 -1
- package/dist/commands/claude/plugin/install.d.ts +12 -0
- package/dist/commands/claude/plugin/install.d.ts.map +1 -1
- package/dist/commands/claude/plugin/install.js +93 -62
- package/dist/commands/claude/plugin/install.js.map +1 -1
- package/dist/commands/claude/plugin/list.d.ts.map +1 -1
- package/dist/commands/claude/plugin/list.js +3 -2
- package/dist/commands/claude/plugin/list.js.map +1 -1
- package/dist/commands/claude/plugin/marketplace-json.d.ts +24 -9
- package/dist/commands/claude/plugin/marketplace-json.d.ts.map +1 -1
- package/dist/commands/claude/plugin/marketplace-json.js +10 -9
- package/dist/commands/claude/plugin/marketplace-json.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-changelog.js +0 -2
- package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.js +3 -6
- package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.js +3 -6
- package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts +73 -0
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +221 -14
- package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
- package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
- package/dist/commands/claude/plugin/uninstall.js +4 -4
- package/dist/commands/claude/plugin/uninstall.js.map +1 -1
- package/dist/commands/consistency-check.d.ts +17 -15
- package/dist/commands/consistency-check.d.ts.map +1 -1
- package/dist/commands/consistency-check.js +152 -106
- 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 +3 -0
- package/dist/commands/corpus/index.js.map +1 -1
- package/dist/commands/corpus/report.d.ts +1 -2
- package/dist/commands/corpus/report.d.ts.map +1 -1
- package/dist/commands/corpus/report.js +1 -3
- package/dist/commands/corpus/report.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts +58 -1
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +95 -41
- package/dist/commands/corpus/runner.js.map +1 -1
- package/dist/commands/corpus/scan.d.ts.map +1 -1
- package/dist/commands/corpus/scan.js +20 -12
- package/dist/commands/corpus/scan.js.map +1 -1
- package/dist/commands/corpus/seed.d.ts +4 -4
- package/dist/commands/corpus/seed.d.ts.map +1 -1
- package/dist/commands/corpus/seed.js +1 -3
- package/dist/commands/corpus/seed.js.map +1 -1
- package/dist/commands/doctor.d.ts +50 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +245 -52
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/inventory.d.ts +13 -1
- package/dist/commands/inventory.d.ts.map +1 -1
- package/dist/commands/inventory.js +121 -17
- package/dist/commands/inventory.js.map +1 -1
- package/dist/commands/mcp/collections.d.ts +1 -1
- package/dist/commands/mcp/collections.d.ts.map +1 -1
- package/dist/commands/mcp/list-collections.d.ts.map +1 -1
- package/dist/commands/mcp/list-collections.js +2 -1
- package/dist/commands/mcp/list-collections.js.map +1 -1
- package/dist/commands/mcp/serve.d.ts.map +1 -1
- package/dist/commands/mcp/serve.js +3 -2
- package/dist/commands/mcp/serve.js.map +1 -1
- package/dist/commands/okf/index.d.ts +11 -0
- package/dist/commands/okf/index.d.ts.map +1 -0
- package/dist/commands/okf/index.js +116 -0
- package/dist/commands/okf/index.js.map +1 -0
- package/dist/commands/okf/validate.d.ts +195 -0
- package/dist/commands/okf/validate.d.ts.map +1 -0
- package/dist/commands/okf/validate.js +199 -0
- package/dist/commands/okf/validate.js.map +1 -0
- package/dist/commands/phase-utils.d.ts +182 -114
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +154 -163
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/positional-args.d.ts.map +1 -1
- package/dist/commands/positional-args.js +3 -2
- package/dist/commands/positional-args.js.map +1 -1
- package/dist/commands/rag/clear-command.d.ts.map +1 -1
- package/dist/commands/rag/clear-command.js +2 -1
- package/dist/commands/rag/clear-command.js.map +1 -1
- package/dist/commands/rag/index-command.d.ts +64 -0
- package/dist/commands/rag/index-command.d.ts.map +1 -1
- package/dist/commands/rag/index-command.js +72 -6
- package/dist/commands/rag/index-command.js.map +1 -1
- package/dist/commands/rag/index.d.ts.map +1 -1
- package/dist/commands/rag/index.js +23 -10
- package/dist/commands/rag/index.js.map +1 -1
- package/dist/commands/rag/query-command.d.ts.map +1 -1
- package/dist/commands/rag/query-command.js +2 -1
- package/dist/commands/rag/query-command.js.map +1 -1
- package/dist/commands/rag/stats-command.d.ts.map +1 -1
- package/dist/commands/rag/stats-command.js +2 -1
- package/dist/commands/rag/stats-command.js.map +1 -1
- package/dist/commands/resources/builtin-help.d.ts +27 -0
- package/dist/commands/resources/builtin-help.d.ts.map +1 -0
- package/dist/commands/resources/builtin-help.js +46 -0
- package/dist/commands/resources/builtin-help.js.map +1 -0
- package/dist/commands/resources/check-progress.d.ts +167 -0
- package/dist/commands/resources/check-progress.d.ts.map +1 -0
- package/dist/commands/resources/check-progress.js +250 -0
- package/dist/commands/resources/check-progress.js.map +1 -0
- package/dist/commands/resources/check-supervisor.d.ts +479 -0
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -0
- package/dist/commands/resources/check-supervisor.js +587 -0
- package/dist/commands/resources/check-supervisor.js.map +1 -0
- package/dist/commands/resources/check.d.ts +620 -0
- package/dist/commands/resources/check.d.ts.map +1 -0
- package/dist/commands/resources/check.js +1452 -0
- package/dist/commands/resources/check.js.map +1 -0
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +430 -4
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/query.d.ts +106 -0
- package/dist/commands/resources/query.d.ts.map +1 -0
- package/dist/commands/resources/query.js +177 -0
- package/dist/commands/resources/query.js.map +1 -0
- package/dist/commands/resources/scan.d.ts +24 -0
- package/dist/commands/resources/scan.d.ts.map +1 -1
- package/dist/commands/resources/scan.js +17 -8
- package/dist/commands/resources/scan.js.map +1 -1
- package/dist/commands/resources/validate.d.ts +42 -2
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +208 -55
- package/dist/commands/resources/validate.js.map +1 -1
- package/dist/commands/skill/review-checklist.d.ts +3 -2
- package/dist/commands/skill/review-checklist.d.ts.map +1 -1
- package/dist/commands/skill/review-checklist.js +40 -2
- package/dist/commands/skill/review-checklist.js.map +1 -1
- package/dist/commands/skill/review.d.ts +247 -0
- package/dist/commands/skill/review.d.ts.map +1 -1
- package/dist/commands/skill/review.js +100 -62
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/configure.d.ts +56 -0
- package/dist/commands/skill/test/configure.d.ts.map +1 -1
- package/dist/commands/skill/test/configure.js +75 -16
- package/dist/commands/skill/test/configure.js.map +1 -1
- package/dist/commands/skill/test/run.d.ts +63 -10
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +258 -77
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build.d.ts +94 -4
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +325 -97
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/install.d.ts +2 -1
- package/dist/commands/skills/install.d.ts.map +1 -1
- package/dist/commands/skills/install.js +20 -31
- package/dist/commands/skills/install.js.map +1 -1
- package/dist/commands/skills/list.d.ts +2 -1
- package/dist/commands/skills/list.d.ts.map +1 -1
- package/dist/commands/skills/list.js +44 -26
- package/dist/commands/skills/list.js.map +1 -1
- package/dist/commands/skills/package.d.ts +1 -1
- package/dist/commands/skills/package.d.ts.map +1 -1
- package/dist/commands/skills/package.js +6 -8
- package/dist/commands/skills/package.js.map +1 -1
- package/dist/commands/skills/scope-guard.d.ts.map +1 -1
- package/dist/commands/skills/scope-guard.js +8 -6
- package/dist/commands/skills/scope-guard.js.map +1 -1
- package/dist/commands/skills/shared.d.ts.map +1 -1
- package/dist/commands/skills/shared.js +2 -4
- package/dist/commands/skills/shared.js.map +1 -1
- package/dist/commands/skills/skill-discovery.d.ts +47 -6
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +61 -11
- package/dist/commands/skills/skill-discovery.js.map +1 -1
- package/dist/commands/skills/source-resolvers.d.ts +15 -0
- package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
- package/dist/commands/skills/source-resolvers.js +25 -4
- 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 +11 -3
- package/dist/commands/skills/validate-command.js.map +1 -1
- package/dist/commands/skills/validate.d.ts +140 -4
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +224 -67
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +63 -27
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +119 -15
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +357 -142
- package/dist/commands/verify.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/report-schemas.d.ts +45 -0
- package/dist/report-schemas.d.ts.map +1 -0
- package/dist/report-schemas.js +100 -0
- package/dist/report-schemas.js.map +1 -0
- package/dist/skill-resolution/classify.js +2 -2
- package/dist/skill-resolution/classify.js.map +1 -1
- package/dist/skill-resolution/packaging-config.d.ts +49 -5
- package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
- package/dist/skill-resolution/packaging-config.js +59 -19
- 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 +55 -57
- package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
- package/dist/utils/agent-discovery.d.ts.map +1 -1
- package/dist/utils/agent-discovery.js +22 -11
- package/dist/utils/agent-discovery.js.map +1 -1
- package/dist/utils/agent-runner.d.ts.map +1 -1
- package/dist/utils/agent-runner.js +7 -4
- package/dist/utils/agent-runner.js.map +1 -1
- package/dist/utils/claude-context-lens.d.ts +34 -0
- package/dist/utils/claude-context-lens.d.ts.map +1 -0
- package/dist/utils/claude-context-lens.js +39 -0
- package/dist/utils/claude-context-lens.js.map +1 -0
- package/dist/utils/command-error.d.ts +143 -20
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +179 -36
- package/dist/utils/command-error.js.map +1 -1
- package/dist/utils/config-loader.d.ts +2 -1
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js +40 -14
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/corpus-target.d.ts +26 -0
- package/dist/utils/corpus-target.d.ts.map +1 -0
- package/dist/utils/corpus-target.js +72 -0
- package/dist/utils/corpus-target.js.map +1 -0
- package/dist/utils/edge-lens-evaluation.d.ts +83 -0
- package/dist/utils/edge-lens-evaluation.d.ts.map +1 -0
- package/dist/utils/edge-lens-evaluation.js +110 -0
- package/dist/utils/edge-lens-evaluation.js.map +1 -0
- package/dist/utils/help-loader.d.ts.map +1 -1
- package/dist/utils/help-loader.js +0 -1
- package/dist/utils/help-loader.js.map +1 -1
- package/dist/utils/issue-anchor.d.ts +2 -2
- package/dist/utils/issue-anchor.d.ts.map +1 -1
- package/dist/utils/issue-anchor.js +1 -1
- package/dist/utils/issue-rendering.d.ts +3 -3
- package/dist/utils/issue-rendering.d.ts.map +1 -1
- package/dist/utils/issue-rendering.js +3 -3
- package/dist/utils/issue-rendering.js.map +1 -1
- package/dist/utils/issue-severity.d.ts +12 -5
- package/dist/utils/issue-severity.d.ts.map +1 -1
- package/dist/utils/issue-severity.js +1 -1
- package/dist/utils/issue-severity.js.map +1 -1
- package/dist/utils/optional-backend.d.ts +78 -0
- package/dist/utils/optional-backend.d.ts.map +1 -0
- package/dist/utils/optional-backend.js +117 -0
- package/dist/utils/optional-backend.js.map +1 -0
- package/dist/utils/output.d.ts +26 -0
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +35 -0
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/package-json.d.ts +24 -0
- package/dist/utils/package-json.d.ts.map +1 -0
- package/dist/utils/package-json.js +49 -0
- package/dist/utils/package-json.js.map +1 -0
- package/dist/utils/population-wiring.d.ts +100 -0
- package/dist/utils/population-wiring.d.ts.map +1 -0
- package/dist/utils/population-wiring.js +98 -0
- package/dist/utils/population-wiring.js.map +1 -0
- package/dist/utils/project-root-policy.d.ts +20 -0
- package/dist/utils/project-root-policy.d.ts.map +1 -1
- package/dist/utils/project-root-policy.js +30 -0
- package/dist/utils/project-root-policy.js.map +1 -1
- package/dist/utils/projection-lenses.d.ts +98 -0
- package/dist/utils/projection-lenses.d.ts.map +1 -0
- package/dist/utils/projection-lenses.js +203 -0
- package/dist/utils/projection-lenses.js.map +1 -0
- package/dist/utils/projection-query.d.ts +324 -0
- package/dist/utils/projection-query.d.ts.map +1 -0
- package/dist/utils/projection-query.js +357 -0
- package/dist/utils/projection-query.js.map +1 -0
- package/dist/utils/projection-store.d.ts +335 -0
- package/dist/utils/projection-store.d.ts.map +1 -0
- package/dist/utils/projection-store.js +522 -0
- package/dist/utils/projection-store.js.map +1 -0
- package/dist/utils/relation-limits.d.ts +50 -0
- package/dist/utils/relation-limits.d.ts.map +1 -0
- package/dist/utils/relation-limits.js +50 -0
- package/dist/utils/relation-limits.js.map +1 -0
- package/dist/utils/repeatable-option.d.ts +37 -0
- package/dist/utils/repeatable-option.d.ts.map +1 -0
- package/dist/utils/repeatable-option.js +39 -0
- package/dist/utils/repeatable-option.js.map +1 -0
- package/dist/utils/resource-loader.d.ts +134 -2
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +290 -27
- package/dist/utils/resource-loader.js.map +1 -1
- package/dist/utils/root-argv.d.ts +53 -0
- package/dist/utils/root-argv.d.ts.map +1 -0
- package/dist/utils/root-argv.js +215 -0
- package/dist/utils/root-argv.js.map +1 -0
- package/dist/utils/run-integrity.d.ts +95 -0
- package/dist/utils/run-integrity.d.ts.map +1 -0
- package/dist/utils/run-integrity.js +102 -0
- package/dist/utils/run-integrity.js.map +1 -0
- package/dist/utils/skill-discovery.d.ts.map +1 -1
- package/dist/utils/skill-discovery.js +2 -1
- package/dist/utils/skill-discovery.js.map +1 -1
- package/dist/utils/skill-packaging-config.d.ts +63 -1
- package/dist/utils/skill-packaging-config.d.ts.map +1 -1
- package/dist/utils/skill-packaging-config.js +56 -1
- package/dist/utils/skill-packaging-config.js.map +1 -1
- package/dist/utils/sqlite-experimental-warning.d.ts +69 -0
- package/dist/utils/sqlite-experimental-warning.d.ts.map +1 -0
- package/dist/utils/sqlite-experimental-warning.js +144 -0
- package/dist/utils/sqlite-experimental-warning.js.map +1 -0
- package/dist/utils/url-redact.d.ts.map +1 -1
- package/dist/utils/url-redact.js +4 -6
- package/dist/utils/url-redact.js.map +1 -1
- package/dist/utils/user-context-scanner.d.ts +8 -0
- package/dist/utils/user-context-scanner.d.ts.map +1 -1
- package/dist/utils/user-context-scanner.js +4 -2
- 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 +12 -6
- package/dist/utils/validate-help-files.js.map +1 -1
- package/dist/utils/vat-bin-path.d.ts +36 -0
- package/dist/utils/vat-bin-path.d.ts.map +1 -0
- package/dist/utils/vat-bin-path.js +48 -0
- package/dist/utils/vat-bin-path.js.map +1 -0
- package/dist/utils/verdict-helpers.d.ts +1 -1
- package/dist/utils/verdict-helpers.d.ts.map +1 -1
- package/dist/utils/verdict-helpers.js +1 -1
- package/dist/utils/verdict-helpers.js.map +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -3
- package/dist/version.js.map +1 -1
- package/docs/agent.md +2 -2
- package/docs/audit.md +143 -39
- package/docs/doctor.md +7 -6
- package/docs/index.md +19 -11
- package/docs/mcp.md +2 -2
- package/docs/rag.md +3 -2
- package/docs/resources.md +13 -3
- package/docs/skill-test.md +10 -9
- package/docs/skills.md +53 -69
- package/package.json +36 -27
- package/schemas/ard-emit.json +152 -0
- package/schemas/okf-validate.json +170 -0
- package/schemas/resources-check.json +257 -0
- package/schemas/skill-review.json +230 -0
- package/dist/commands/resources/command-helpers.d.ts +0 -5
- package/dist/commands/resources/command-helpers.d.ts.map +0 -1
- package/dist/commands/resources/command-helpers.js +0 -6
- package/dist/commands/resources/command-helpers.js.map +0 -1
|
@@ -7,17 +7,21 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { existsSync } from 'node:fs';
|
|
9
9
|
import { basename, dirname, extname } from 'node:path';
|
|
10
|
-
import { BootstrapNeededError, buildStaleDistWarningLines, DuplicateStagedSkillError, isAcknowledged,
|
|
11
|
-
import {
|
|
10
|
+
import { BootstrapNeededError, buildStaleDistWarningLines, DuplicateStagedSkillError, isAcknowledged, conventionalSuiteProbe, packageSkill, packagingConfigToPackageOptions, runPreStageBuild, runSkillTestHarness, SecurityAckError, SKILL_TEST_BUILTIN_CAPS, SkillBuildError, skillTestFailureReason, } from '@vibe-agent-toolkit/agent-skills';
|
|
11
|
+
import { ExitCode } from '@vibe-agent-toolkit/schema';
|
|
12
|
+
import { findProjectRoot, prefixMessageOnce, resolveAssetReference, safePath, toForwardSlashAnyPlatform } from '@vibe-agent-toolkit/utils';
|
|
13
|
+
import { DirectoryListingRefusedError } from '@vibe-agent-toolkit/utils/crawl';
|
|
12
14
|
import { Command } from 'commander';
|
|
13
15
|
import { parseSourceSpec } from '../../../skill-resolution/classify.js';
|
|
14
16
|
import { findDeclaredSkillForPath, findDeclaredSkillForSourceDir, resolveProjectDeclaredEvalSuites, resolveSkillReference, } from '../../../skill-resolution/index.js';
|
|
15
17
|
import { ConfigLoadError, loadConfig, loadConfigCached } from '../../../utils/config-loader.js';
|
|
18
|
+
import { collectRepeated } from '../../../utils/repeatable-option.js';
|
|
19
|
+
import { isSkillPublished } from '../../../utils/skill-packaging-config.js';
|
|
16
20
|
import { runClaudePluginBuild } from '../../claude/plugin/build.js';
|
|
17
21
|
import { assertValidAuth, assertValidRequireAuth } from './auth-flags.js';
|
|
18
22
|
/** Extract the trailing path segment (cross-platform) from a path-like string. */
|
|
19
23
|
function lastPathSegment(p) {
|
|
20
|
-
return basename(
|
|
24
|
+
return basename(toForwardSlashAnyPlatform(p));
|
|
21
25
|
}
|
|
22
26
|
// ---------------------------------------------------------------------------
|
|
23
27
|
// Security warning (§12)
|
|
@@ -82,20 +86,28 @@ function coerceKnobs(options) {
|
|
|
82
86
|
}
|
|
83
87
|
/**
|
|
84
88
|
* Map a resolved skill's packaging-config `executables` (SkillExecutableEntry[]) to
|
|
85
|
-
* the grader's recognition-aid shape
|
|
89
|
+
* the grader's recognition-aid shape: each entry's stable NAME
|
|
86
90
|
* is its `path` basename with the extension stripped (`scripts/csvsum.py` → `csvsum`),
|
|
87
|
-
* carried alongside its `howInvoked
|
|
88
|
-
* input so the harness omits the aid entirely (the grader
|
|
89
|
-
* commands in the transcript). Pure + unit-testable.
|
|
91
|
+
* carried alongside its `howInvoked`, `kind` and the declared `path` itself. Returns
|
|
92
|
+
* undefined for absent/empty input so the harness omits the aid entirely (the grader
|
|
93
|
+
* still matches tools by the commands in the transcript). Pure + unit-testable.
|
|
94
|
+
*
|
|
95
|
+
* ⛔ THE `path` USED TO BE READ AND DISCARDED. It is the ONLY thing that separates
|
|
96
|
+
* an ambient copy of the skill — which is a copy, so it reproduces
|
|
97
|
+
* `…/scripts/csvsum.py` under whatever root it sits at — from the control arm's own
|
|
98
|
+
* scratch file of the same name. Forward-slashed at the derivation rather than at the
|
|
99
|
+
* consumer, because every needle and every resolved reach inside the detector is
|
|
100
|
+
* `/`-normalized and a `\` would silently match nothing.
|
|
90
101
|
*/
|
|
91
102
|
export function deriveDeclaredExecutableNames(executables) {
|
|
92
103
|
if (executables === undefined || executables.length === 0)
|
|
93
104
|
return undefined;
|
|
94
105
|
return executables.map((e) => {
|
|
95
|
-
const
|
|
106
|
+
const path = toForwardSlashAnyPlatform(e.path);
|
|
107
|
+
const base = basename(path);
|
|
96
108
|
const ext = extname(base);
|
|
97
109
|
const name = ext === '' ? base : base.slice(0, -ext.length);
|
|
98
|
-
return { name, howInvoked: e.howInvoked, kind: e.kind };
|
|
110
|
+
return { name, howInvoked: e.howInvoked, kind: e.kind, path };
|
|
99
111
|
});
|
|
100
112
|
}
|
|
101
113
|
/**
|
|
@@ -126,7 +138,7 @@ export function parseWithFlags(pairs) {
|
|
|
126
138
|
for (const pair of pairs) {
|
|
127
139
|
const [name, spec] = parseWithPair(pair);
|
|
128
140
|
// Fail closed on a repeated companion name rather than silently overwriting
|
|
129
|
-
// (last-wins would drop a companion the user asked for —
|
|
141
|
+
// (last-wins would drop a companion the user asked for — a silent no-op).
|
|
130
142
|
if (Object.hasOwn(record, name))
|
|
131
143
|
throw new DuplicateStagedSkillError(name);
|
|
132
144
|
record[name] = spec;
|
|
@@ -153,8 +165,8 @@ export function descriptorsToRecord(list) {
|
|
|
153
165
|
for (const d of list) {
|
|
154
166
|
const name = descriptorName(d);
|
|
155
167
|
// Two config descriptors deriving the same name (e.g. two `path:` entries with
|
|
156
|
-
// the same basename) would silently overwrite — the exact silent
|
|
157
|
-
//
|
|
168
|
+
// the same basename) would silently overwrite — the exact silent drop
|
|
169
|
+
// buildStageItems refuses, one layer above it. Fail closed here instead.
|
|
158
170
|
if (Object.hasOwn(record, name))
|
|
159
171
|
throw new DuplicateStagedSkillError(name);
|
|
160
172
|
record[name] = d;
|
|
@@ -233,7 +245,7 @@ function resolveRepoRoot() {
|
|
|
233
245
|
* {@link loadTestConfig}, which reads the PER-SKILL `skills.config.<skill>.test`
|
|
234
246
|
* block: graderModel/concurrency are global judge/pipeline settings that apply
|
|
235
247
|
* across every skill's test run, not something a single skill's config should
|
|
236
|
-
* override
|
|
248
|
+
* override.
|
|
237
249
|
*
|
|
238
250
|
* Undefined when there's no project root or no `test:` node. A broken config
|
|
239
251
|
* throws {@link ConfigLoadError}, propagated the same way as loadTestConfig's
|
|
@@ -272,7 +284,7 @@ function applyScalarMerges(opts, options, config) {
|
|
|
272
284
|
const authRequirement = options.requireAuth ?? config?.requireAuth;
|
|
273
285
|
if (authRequirement !== undefined)
|
|
274
286
|
opts.requireAuth = authRequirement;
|
|
275
|
-
const baseline = options.baseline
|
|
287
|
+
const baseline = resolveBaseline(options.baseline, config?.baseline);
|
|
276
288
|
if (baseline !== undefined)
|
|
277
289
|
opts.baseline = baseline;
|
|
278
290
|
const model = options.model ?? config?.model;
|
|
@@ -287,6 +299,36 @@ function applyScalarMerges(opts, options, config) {
|
|
|
287
299
|
if (evalsRef !== undefined)
|
|
288
300
|
opts.evalsSubpath = evalsRef;
|
|
289
301
|
}
|
|
302
|
+
/**
|
|
303
|
+
* Resolve `--baseline` with flag > config precedence, ANNOUNCING a config-sourced
|
|
304
|
+
* enable on stderr.
|
|
305
|
+
*
|
|
306
|
+
* Same threat model as {@link resolveCappedKnob} next door — a value from a
|
|
307
|
+
* COMMITTED config rides along in an untrusted subject repo — applied to the one
|
|
308
|
+
* cost knob that has no cap to clamp. `baseline` is the LARGEST cost multiplier in
|
|
309
|
+
* this command: it runs every eval TWICE (skill declared vs withheld), and each arm
|
|
310
|
+
* is an executor spawn AND a grader spawn, so `skills.config.<skill>.test.baseline:
|
|
311
|
+
* true` roughly doubles the spend of every `vat skill test run` an operator types.
|
|
312
|
+
* `--max-budget-usd` is a PER-SPAWN cap, so the worst-case ceiling doubles with it.
|
|
313
|
+
*
|
|
314
|
+
* A boolean cannot be clamped to a ceiling, so it is announced instead, and
|
|
315
|
+
* `--no-baseline` exists so the operator can turn it back off for THIS run without
|
|
316
|
+
* hand-editing someone else's YAML. Precedence runs both directions: an explicit
|
|
317
|
+
* flag wins whether it says true or false (hence the `undefined` check rather than
|
|
318
|
+
* `??`-style falsiness, which would let a config `true` override `--no-baseline`).
|
|
319
|
+
*
|
|
320
|
+
* Only an ENABLE is announced. A config `false` costs nothing and needs no note.
|
|
321
|
+
*/
|
|
322
|
+
export function resolveBaseline(flagValue, configValue) {
|
|
323
|
+
if (flagValue !== undefined)
|
|
324
|
+
return flagValue;
|
|
325
|
+
if (configValue !== true)
|
|
326
|
+
return configValue;
|
|
327
|
+
process.stderr.write("Note: baseline is ON from this project's committed config ('skills.config.<skill>.test.baseline'), " +
|
|
328
|
+
'not from a flag; it runs every eval TWICE (an executor AND a grader spawn per arm), roughly doubling ' +
|
|
329
|
+
'the spawns and the spend. Pass --no-baseline to turn it off for this run.\n');
|
|
330
|
+
return true;
|
|
331
|
+
}
|
|
290
332
|
/**
|
|
291
333
|
* Resolve one cost/runtime knob with flag > config > default precedence AND a
|
|
292
334
|
* built-in safety cap, enforcing an asymmetry between the two sources:
|
|
@@ -401,15 +443,16 @@ function applyGraderMerges(opts, options, knobs, globalTest) {
|
|
|
401
443
|
* precedence. CLI flags win; config (`skills.config.<skill>.test`) fills gaps;
|
|
402
444
|
* built-in defaults (inside the domain) are the final fallback.
|
|
403
445
|
*/
|
|
404
|
-
function buildHarnessOpts(subject, options, knobs, config, globalTest) {
|
|
446
|
+
function buildHarnessOpts(subject, options, knobs, config, globalTest, resolvedSubject) {
|
|
405
447
|
const repoRoot = resolveRepoRoot();
|
|
406
|
-
const opts = { subject, repoRoot };
|
|
448
|
+
const opts = { subject, repoRoot, subjectInPlace: resolvedSubject.inPlace };
|
|
407
449
|
applyFlagOnlyOptions(opts, options);
|
|
408
450
|
applyScalarMerges(opts, options, config);
|
|
409
451
|
applyKnobMerges(opts, knobs, config);
|
|
410
452
|
applyDepMerges(opts, options, config);
|
|
411
453
|
applyEnvMerges(opts, options, config);
|
|
412
454
|
applyGraderMerges(opts, options, knobs, globalTest);
|
|
455
|
+
applyResolvedSubject(opts, resolvedSubject);
|
|
413
456
|
return opts;
|
|
414
457
|
}
|
|
415
458
|
/**
|
|
@@ -432,7 +475,7 @@ function sourceScaffoldFields(source, declaredSkill, cwd) {
|
|
|
432
475
|
* Project-aware subject resolution for `vat skill test run`. Resolves the subject
|
|
433
476
|
* reference; for a declared skill, builds it (real entry points) and returns the
|
|
434
477
|
* dist dir to stage; everything else is staged as-is. Throws SkillBuildError
|
|
435
|
-
* (
|
|
478
|
+
* (reason `preflight`) for name-miss / not-found / --no-build-without-dist / build failure.
|
|
436
479
|
*
|
|
437
480
|
* `memo` is the per-run build memo (see {@link BuildMemo}) — pass the SAME map used
|
|
438
481
|
* for companion resolution so a skill that is both subject and companion builds once.
|
|
@@ -449,6 +492,7 @@ export async function resolveSubjectForTest(ref, cwd, flags, memo, buildCommand)
|
|
|
449
492
|
return {
|
|
450
493
|
subjectSource: resolved.source,
|
|
451
494
|
rebuilt: false,
|
|
495
|
+
inPlace: false,
|
|
452
496
|
wouldBuild: false,
|
|
453
497
|
...sourceScaffoldFields(resolved.source, resolved.declaredSkill, cwd),
|
|
454
498
|
};
|
|
@@ -466,6 +510,16 @@ export async function resolveSubjectForTest(ref, cwd, flags, memo, buildCommand)
|
|
|
466
510
|
}
|
|
467
511
|
}
|
|
468
512
|
}
|
|
513
|
+
/**
|
|
514
|
+
* An IN-PLACE declared skill: a POOL skill whose merged config says `publish: false`.
|
|
515
|
+
* `vat build` never bundles it (see `isSkillPublished`), so a test must not invent the
|
|
516
|
+
* bundle either — it stages the authored directory, which is what is used in place. A
|
|
517
|
+
* plugin-local skill is never in-place: `publish` scopes the pool only, and it ships
|
|
518
|
+
* with its plugin whatever the flag says.
|
|
519
|
+
*/
|
|
520
|
+
function isInPlaceSkill(ref) {
|
|
521
|
+
return ref.distribution.kind === 'pool' && !isSkillPublished(ref.packagingConfig);
|
|
522
|
+
}
|
|
469
523
|
/**
|
|
470
524
|
* --no-build / --dry-run branch of {@link buildDeclaredSkill}: never builds. Stage
|
|
471
525
|
* the existing dist if present; for a dry-run with no dist yet, fall back to the
|
|
@@ -473,7 +527,6 @@ export async function resolveSubjectForTest(ref, cwd, flags, memo, buildCommand)
|
|
|
473
527
|
* when --no-build is set but no dist exists.
|
|
474
528
|
*/
|
|
475
529
|
function resolveExistingDistOrThrow(ref, flags) {
|
|
476
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- expectedDistDir derived from project config
|
|
477
530
|
if (existsSync(ref.expectedDistDir)) {
|
|
478
531
|
if (flags.noBuild) {
|
|
479
532
|
process.stderr.write(`Using existing dist (NOT rebuilt): ${ref.expectedDistDir}\n`);
|
|
@@ -513,7 +566,7 @@ export function buildMemoKey(ref) {
|
|
|
513
566
|
* writes nothing (or writes an empty shell with no `SKILL.md`) would otherwise hand
|
|
514
567
|
* back a path a required companion then fails opaquely at staging, or an OPTIONAL
|
|
515
568
|
* one silently skips — the exact non-functional-companion-with-no-diagnostic
|
|
516
|
-
* symptom
|
|
569
|
+
* symptom adopters reported. Two distinct checks, two distinct messages, so the error
|
|
517
570
|
* tells the author which failure mode they hit:
|
|
518
571
|
* 1. `expectedDistDir` itself is missing — "no output at all".
|
|
519
572
|
* 2. `expectedDistDir` exists but has no `SKILL.md` — an empty/incomplete shell.
|
|
@@ -523,13 +576,11 @@ export function buildMemoKey(ref) {
|
|
|
523
576
|
* and is always checked.
|
|
524
577
|
*/
|
|
525
578
|
function verifyBuiltDist(ref) {
|
|
526
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- expectedDistDir derived from project config
|
|
527
579
|
if (!existsSync(ref.expectedDistDir)) {
|
|
528
580
|
throw new SkillBuildError(`Skill build for '${ref.name}' reported success but produced no output at ${ref.expectedDistDir}. ` +
|
|
529
581
|
`Check the skill's packaging config (\`vat build\` should create this directory).`);
|
|
530
582
|
}
|
|
531
583
|
const skillMdPath = safePath.join(ref.expectedDistDir, 'SKILL.md');
|
|
532
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- skillMdPath derived from project config
|
|
533
584
|
if (!existsSync(skillMdPath)) {
|
|
534
585
|
throw new SkillBuildError(`Skill build for '${ref.name}' reported success but produced no SKILL.md at ${ref.expectedDistDir}. ` +
|
|
535
586
|
`Check the skill's packaging config (\`vat build\` should create this file).`);
|
|
@@ -580,7 +631,20 @@ async function runDeclaredSkillBuild(ref) {
|
|
|
580
631
|
// excludes every skill's test input. Getting this wrong would hand the executor
|
|
581
632
|
// under test another skill's answer key — the exact signal the harness exists to
|
|
582
633
|
// protect. Memoized per config root, so a multi-skill run discovers once.
|
|
583
|
-
await packageSkill(ref.sourcePath, packagingConfigToPackageOptions(ref.packagingConfig, { skillPath: ref.sourcePath, outputPath: ref.expectedDistDir },
|
|
634
|
+
await packageSkill(ref.sourcePath, packagingConfigToPackageOptions(ref.packagingConfig, { skillPath: ref.sourcePath, outputPath: ref.expectedDistDir },
|
|
635
|
+
// `'refuse'`: staging a dist around a directory discovery could not
|
|
636
|
+
// list may hand the executor another skill's answer key. The throw is
|
|
637
|
+
// wrapped as `SkillBuildError` by the caller, message intact.
|
|
638
|
+
await resolveProjectDeclaredEvalSuites(ref.sourcePath, 'refuse'),
|
|
639
|
+
// Per CALL, deliberately, and this is parity rather than a regression: the
|
|
640
|
+
// probe was built inside `resolveTestInputDirs` on every path before it was
|
|
641
|
+
// threaded, so this lane pays exactly what it paid before. It is also the
|
|
642
|
+
// wrong lane to optimize — `runDeclaredSkillBuild` runs per buildable ref for
|
|
643
|
+
// a test run's handful of skills, not over a whole project, and there is no
|
|
644
|
+
// run-scoped seam threaded this far down to hang one on. The lane that made
|
|
645
|
+
// the O(S²) matter (`vat resources validate`, measured at 10,815 probes over
|
|
646
|
+
// 103 paths) hoists its probe; see the comment there.
|
|
647
|
+
conventionalSuiteProbe()));
|
|
584
648
|
return;
|
|
585
649
|
}
|
|
586
650
|
await runClaudePluginBuild(ref.configRoot, { marketplace: ref.distribution.marketplaceName });
|
|
@@ -590,7 +654,7 @@ async function runDeclaredSkillBuild(ref) {
|
|
|
590
654
|
* the existing dist under --no-build/--dry-run. Shared by SUBJECT resolution
|
|
591
655
|
* ({@link resolveBuildableSubject}) and `--with`/`--with-optional` COMPANION
|
|
592
656
|
* resolution ({@link resolveCompanionSpec}) so a companion that maps to a declared
|
|
593
|
-
* skill gets the exact same build treatment as the subject
|
|
657
|
+
* skill gets the exact same build treatment as the subject — its
|
|
594
658
|
* `files:` injection runs before staging, instead of a raw, possibly
|
|
595
659
|
* build-artifact-incomplete, source-tree copy.
|
|
596
660
|
*
|
|
@@ -619,8 +683,11 @@ async function buildDeclaredSkill(ref, flags, memo, buildCommand) {
|
|
|
619
683
|
// dry run stays the one mode that is safe to point at an untrusted clone. That
|
|
620
684
|
// preview falls back to an existing dist and says so (stale warning) — the honest
|
|
621
685
|
// trade, since accuracy requires consent to execute the repo's own build.
|
|
686
|
+
// An in-place skill has no dist to reuse or build: its authored directory IS what
|
|
687
|
+
// ships (in place), under every flag combination.
|
|
688
|
+
const inPlaceResult = { distDir: dirname(ref.sourcePath), rebuilt: false };
|
|
622
689
|
if (flags.noBuild || (flags.dryRun && !flags.explicitAck)) {
|
|
623
|
-
return resolveExistingDistOrThrow(ref, flags);
|
|
690
|
+
return isInPlaceSkill(ref) ? inPlaceResult : resolveExistingDistOrThrow(ref, flags);
|
|
624
691
|
}
|
|
625
692
|
// SECURITY (§12): reaching here means a real build WOULD run — runPreStageBuild
|
|
626
693
|
// executes an ARBITRARY shell command from the repo's committed `test.build`, and
|
|
@@ -630,6 +697,12 @@ async function buildDeclaredSkill(ref, flags, memo, buildCommand) {
|
|
|
630
697
|
if (!flags.acknowledged) {
|
|
631
698
|
throw new SecurityAckError();
|
|
632
699
|
}
|
|
700
|
+
// The `test.build` hook still runs for an in-place skill — it prepares what the
|
|
701
|
+
// test needs (the declared contract: once, before staging) — but nothing is bundled.
|
|
702
|
+
if (isInPlaceSkill(ref)) {
|
|
703
|
+
runPreStageBuildOnce(buildCommand, ref.configRoot, memo);
|
|
704
|
+
return inPlaceResult;
|
|
705
|
+
}
|
|
633
706
|
const key = buildMemoKey(ref);
|
|
634
707
|
// Memo HIT: this operation already ran in THIS process — skip the rebuild, but
|
|
635
708
|
// still verify this ref's own dist (the hit may be a marketplace sibling's).
|
|
@@ -660,10 +733,22 @@ async function buildDeclaredSkill(ref, flags, memo, buildCommand) {
|
|
|
660
733
|
async function resolveBuildableSubject(ref, flags, memo, buildCommand) {
|
|
661
734
|
const scaffoldDir = dirname(ref.sourcePath);
|
|
662
735
|
const build = await buildDeclaredSkill(ref, flags, memo, buildCommand);
|
|
736
|
+
if (isInPlaceSkill(ref)) {
|
|
737
|
+
// Staged as-is from source, but still the declared skill: its `test:` config applies.
|
|
738
|
+
return {
|
|
739
|
+
subjectSource: { path: build.distDir },
|
|
740
|
+
subjectScaffoldDir: scaffoldDir,
|
|
741
|
+
rebuilt: false,
|
|
742
|
+
inPlace: true,
|
|
743
|
+
wouldBuild: false,
|
|
744
|
+
linkedToDeclaredSkill: true,
|
|
745
|
+
};
|
|
746
|
+
}
|
|
663
747
|
return {
|
|
664
748
|
subjectSource: { path: build.distDir },
|
|
665
749
|
subjectScaffoldDir: scaffoldDir,
|
|
666
750
|
rebuilt: build.rebuilt,
|
|
751
|
+
inPlace: false,
|
|
667
752
|
wouldBuild: true,
|
|
668
753
|
...(build.dryRunStagedExistingDist === undefined
|
|
669
754
|
? {}
|
|
@@ -713,11 +798,12 @@ function isSurvivableCompanionFailure(err, declared, optional, flags) {
|
|
|
713
798
|
* with several companions leaves the user unable to tell which flag to fix.
|
|
714
799
|
*
|
|
715
800
|
* The message is prefixed IN PLACE so the error's CLASS (and therefore its
|
|
716
|
-
* `
|
|
717
|
-
* no re-wrapping. Prefixing
|
|
718
|
-
*
|
|
719
|
-
* the SAME error object, structurally, rather
|
|
720
|
-
* argument that no caught error class is ever
|
|
801
|
+
* `reason` / {@link skillTestFailureReason} mapping) is unchanged — no new error class,
|
|
802
|
+
* no re-wrapping. Prefixing happens ONCE per error object (`prefixMessageOnce`
|
|
803
|
+
* remembers the object, never re-reads the message) — this makes the function
|
|
804
|
+
* idempotent against repeat rethrows of the SAME error object, structurally, rather
|
|
805
|
+
* than relying on a hand-maintained argument that no caught error class is ever
|
|
806
|
+
* cached/reused across companions.
|
|
721
807
|
* {@link ConfigLoadError} instances ARE cached and re-thrown per config root by
|
|
722
808
|
* `loadConfigCached`, so mutating one in place would otherwise corrupt the cache; the
|
|
723
809
|
* already-prefixed check covers this case too (in practice `ConfigLoadError` is
|
|
@@ -728,18 +814,16 @@ function isSurvivableCompanionFailure(err, declared, optional, flags) {
|
|
|
728
814
|
* Debug output that prints `.stack` can disagree with the prefixed text on stderr.
|
|
729
815
|
*/
|
|
730
816
|
function rethrowNamingCompanion(err, alias, declaredName) {
|
|
731
|
-
|
|
732
|
-
err.message = `companion '${alias}' (declared skill '${declaredName}'): ${err.message}`;
|
|
733
|
-
}
|
|
817
|
+
prefixMessageOnce(err, `companion '${alias}' (declared skill '${declaredName}'): `);
|
|
734
818
|
throw err;
|
|
735
819
|
}
|
|
736
820
|
/**
|
|
737
|
-
* Companion analog of {@link resolveBuildableSubject}
|
|
821
|
+
* Companion analog of {@link resolveBuildableSubject}: resolve every
|
|
738
822
|
* `--with`/`--with-optional` companion whose spec is a `{ path }` pointing at a
|
|
739
823
|
* declared skill's SOURCE directory to that skill's BUILT dist, via the exact same
|
|
740
824
|
* {@link buildDeclaredSkill} the subject uses. Anything else — workspace:/npm:/
|
|
741
|
-
* url:/vendored specs, or a path outside this project's config — is
|
|
742
|
-
* story
|
|
825
|
+
* url:/vendored specs, or a path outside this project's config — is a different
|
|
826
|
+
* story: left untouched, staged as today.
|
|
743
827
|
*
|
|
744
828
|
* The `test.build` hook used is the COMPANION's own — read from the config that
|
|
745
829
|
* governs IT ({@link declaredSkillTestConfig}), not the subject's. The subject's hook
|
|
@@ -821,7 +905,7 @@ function warnIfPathTargetBypassesConfig(subject) {
|
|
|
821
905
|
/**
|
|
822
906
|
* Validate usage-level flags (auth values, numeric knobs) and load the subject's
|
|
823
907
|
* persisted test config. Runs before the async harness work, so a bad flag exits
|
|
824
|
-
* with a clean message + preflight
|
|
908
|
+
* with a clean message + `Reason: preflight` instead of surfacing as an unhandled
|
|
825
909
|
* promise rejection (raw stack trace, exit 1).
|
|
826
910
|
*/
|
|
827
911
|
async function preflightKnobsAndConfig(subject, options, cwd) {
|
|
@@ -836,21 +920,49 @@ async function preflightKnobsAndConfig(subject, options, cwd) {
|
|
|
836
920
|
}
|
|
837
921
|
catch (err) {
|
|
838
922
|
process.stderr.write(`Error: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
839
|
-
|
|
923
|
+
exitWithReason('preflight');
|
|
840
924
|
}
|
|
841
925
|
}
|
|
842
926
|
/**
|
|
843
|
-
*
|
|
927
|
+
* End the run on `ERROR`, saying WHY on stderr.
|
|
928
|
+
*
|
|
929
|
+
* The reason used to be three exit codes (1 internal, 2 preflight, 3
|
|
930
|
+
* bootstrap). Under the one exit-code contract every verb shares, every way the
|
|
931
|
+
* harness could not run is `ERROR`, and the `Reason:` line is where a CI
|
|
932
|
+
* author reads "harness broke" apart from "my environment is wrong".
|
|
933
|
+
*/
|
|
934
|
+
function exitWithReason(reason) {
|
|
935
|
+
process.stderr.write(`Reason: ${reason}\n`);
|
|
936
|
+
process.exit(ExitCode.ERROR);
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* End the run on the harness's own verdict: the `Summary:` line on stdout (the
|
|
940
|
+
* one channel kept machine-readable), the `Reason:` line on stderr when the
|
|
941
|
+
* harness could not run, and the exit code the harness decided.
|
|
942
|
+
*/
|
|
943
|
+
function exitWithResult(result) {
|
|
944
|
+
process.stdout.write(`Summary: ${result.summary}\n`);
|
|
945
|
+
if (result.reason !== undefined)
|
|
946
|
+
process.stderr.write(`Reason: ${result.reason}\n`);
|
|
947
|
+
process.exit(result.exitCode);
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* The reason for an error escaping EITHER phase of {@link runSkillTestRun}.
|
|
844
951
|
*
|
|
845
952
|
* A broken governing config ({@link ConfigLoadError}) is a user-fixable PREFLIGHT
|
|
846
|
-
* problem
|
|
847
|
-
* no case for it and falls through to
|
|
953
|
+
* problem, not an internal harness failure — {@link skillTestFailureReason} has
|
|
954
|
+
* no case for it and falls through to `internal`. ONE helper shared by BOTH catch
|
|
848
955
|
* blocks so the SUBJECT arm and the COMPANION arm can never drift: a companion's
|
|
849
956
|
* governing config root can differ from the subject's, so a broken config is
|
|
850
|
-
* reachable from either arm and must report the same
|
|
957
|
+
* reachable from either arm and must report the same reason from both.
|
|
851
958
|
*/
|
|
852
|
-
function
|
|
853
|
-
|
|
959
|
+
function reasonForRunError(err) {
|
|
960
|
+
// A directory the governing `skills.include` reaches and the crawl cannot list
|
|
961
|
+
// is the same class: discovery refuses it by name, and the remedy is `chmod` or
|
|
962
|
+
// a narrower include pattern — the operator's, not the harness's.
|
|
963
|
+
return err instanceof ConfigLoadError || err instanceof DirectoryListingRefusedError
|
|
964
|
+
? 'preflight'
|
|
965
|
+
: skillTestFailureReason(err);
|
|
854
966
|
}
|
|
855
967
|
/**
|
|
856
968
|
* Copy the resolved-subject fields onto the harness options. Optional fields are
|
|
@@ -892,7 +1004,7 @@ export async function runSkillTestRun(subject, options) {
|
|
|
892
1004
|
dryRun: options.dryRun === true,
|
|
893
1005
|
acknowledgedRunsSkillCode: options.iUnderstandThisRunsSkillCode === true,
|
|
894
1006
|
});
|
|
895
|
-
// Shared by subject AND companion resolution
|
|
1007
|
+
// Shared by subject AND companion resolution so a --with/--with-optional
|
|
896
1008
|
// companion that maps to a declared skill gets the exact same build GATING (no-build/
|
|
897
1009
|
// dry-run/security-ack) as the subject. The `test.build` hook is deliberately NOT in
|
|
898
1010
|
// here: it is per-skill (see BuildFlags), so the subject's own command is passed only
|
|
@@ -913,20 +1025,19 @@ export async function runSkillTestRun(subject, options) {
|
|
|
913
1025
|
}
|
|
914
1026
|
catch (err) {
|
|
915
1027
|
// A broken governing config surfacing during subject resolution is a preflight
|
|
916
|
-
// problem the user must fix
|
|
917
|
-
const exitCode = exitCodeForRunError(err);
|
|
1028
|
+
// problem the user must fix, not an internal harness failure.
|
|
918
1029
|
process.stderr.write(`Error: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
919
|
-
process.exit
|
|
1030
|
+
// 🪤 `return` after a `never`: under test `process.exit` is a spy that RETURNS.
|
|
1031
|
+
exitWithReason(reasonForRunError(err));
|
|
920
1032
|
return;
|
|
921
1033
|
}
|
|
922
1034
|
warnIfPathTargetBypassesConfig(resolvedSubject);
|
|
923
1035
|
try {
|
|
924
1036
|
// buildHarnessOpts assembles the companion records (--with/--with-optional and
|
|
925
1037
|
// config with:/optional:) and can throw DuplicateStagedSkillError on a repeated
|
|
926
|
-
// name — inside the try so it
|
|
927
|
-
const harnessOpts = buildHarnessOpts(subject, options, knobs, config, globalTest);
|
|
928
|
-
|
|
929
|
-
// Companion build resolution (issue #158): a --with/--with-optional companion
|
|
1038
|
+
// name — inside the try so it reads as preflight like every other preflight error.
|
|
1039
|
+
const harnessOpts = buildHarnessOpts(subject, options, knobs, config, globalTest, resolvedSubject);
|
|
1040
|
+
// Companion build resolution: a --with/--with-optional companion
|
|
930
1041
|
// whose source is a path into a declared skill gets built (its `files:`
|
|
931
1042
|
// injection runs) exactly like the subject, instead of a raw source-tree copy.
|
|
932
1043
|
const repoRoot = resolveRepoRoot();
|
|
@@ -937,25 +1048,56 @@ export async function runSkillTestRun(subject, options) {
|
|
|
937
1048
|
if (withOptional !== undefined)
|
|
938
1049
|
harnessOpts.withOptional = withOptional;
|
|
939
1050
|
const result = await runSkillTestHarness(harnessOpts);
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
1051
|
+
// Same rule as the `Workspaces:` line below — "a populated value is a promise
|
|
1052
|
+
// that the path is still there" — applied to the sibling it was written next to
|
|
1053
|
+
// and not applied to. Harness cleanup runs inside the harness's own `finally`,
|
|
1054
|
+
// BEFORE this result reaches the CLI: a run that returns before Step 7 creates
|
|
1055
|
+
// `results/` (the §12 security-ack refusal, and the preflight-failure branch
|
|
1056
|
+
// reachable from a `--require-auth` mismatch) leaves the harness root with no
|
|
1057
|
+
// `results/` child, and cleanup removes the ROOT outright. Printing the path
|
|
1058
|
+
// anyway hands the operator a directory that no longer exists.
|
|
1059
|
+
//
|
|
1060
|
+
// Asked of the PATH rather than re-derived from --keep/--out/--workdir on
|
|
1061
|
+
// purpose: the retention rule has ONE author (cleanupHarness), and a second copy
|
|
1062
|
+
// of its predicate here would drift from it. The filesystem cannot.
|
|
1063
|
+
if (existsSync(result.harnessPath)) {
|
|
1064
|
+
process.stderr.write(`Harness: ${result.harnessPath}\n`);
|
|
1065
|
+
}
|
|
1066
|
+
// The artifacts this command's help text tells the operator to read
|
|
1067
|
+
// (grading.json / friction.json / baseline.json). Reported separately from the
|
|
1068
|
+
// harness path because on a default run — no --out, no --workdir, no --keep —
|
|
1069
|
+
// results/ is the ONLY thing left under it: everything else is staged untrusted
|
|
1070
|
+
// bytes that cleanup evicts. Pointing at the harness root alone made the
|
|
1071
|
+
// operator guess which of its children still existed.
|
|
1072
|
+
if (result.resultsPath !== undefined) {
|
|
1073
|
+
process.stderr.write(`Results: ${result.resultsPath}\n`);
|
|
1074
|
+
}
|
|
1075
|
+
// The executor's working directories live OUTSIDE the harness root under an
|
|
1076
|
+
// unguessable token, so the harness path no longer leads an operator to them.
|
|
1077
|
+
// Under --keep they survive holding everything the evals produced; unreported,
|
|
1078
|
+
// they would be an orphan the operator cannot find to inspect or reap. On every
|
|
1079
|
+
// other run cleanup deletes them, and the harness answers with no
|
|
1080
|
+
// `workspacesPath` at all — the retention rule has ONE author, over there, so
|
|
1081
|
+
// this stays a plain presence check and never a second copy of it.
|
|
1082
|
+
if (result.workspacesPath !== undefined) {
|
|
1083
|
+
process.stderr.write(`Workspaces: ${result.workspacesPath}\n`);
|
|
1084
|
+
}
|
|
1085
|
+
exitWithResult(result);
|
|
943
1086
|
return;
|
|
944
1087
|
}
|
|
945
1088
|
catch (err) {
|
|
946
|
-
// Same rule as the subject arm above (see {@link
|
|
1089
|
+
// Same rule as the subject arm above (see {@link reasonForRunError}): companion
|
|
947
1090
|
// resolution can surface a ConfigLoadError from a DIFFERENT config root than the
|
|
948
|
-
// subject's, and that must
|
|
949
|
-
|
|
950
|
-
//
|
|
951
|
-
// and re-run" path — surface its message plainly, not as a hard `Error:`.
|
|
1091
|
+
// subject's, and that must read as preflight, not internal.
|
|
1092
|
+
// BootstrapNeededError is the happy "wrote a template, fill it in and
|
|
1093
|
+
// re-run" path — surface its message plainly, not as a hard `Error:`.
|
|
952
1094
|
if (err instanceof BootstrapNeededError) {
|
|
953
1095
|
process.stderr.write(`${err.message}\n`);
|
|
954
1096
|
}
|
|
955
1097
|
else {
|
|
956
1098
|
process.stderr.write(`Error: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
957
1099
|
}
|
|
958
|
-
|
|
1100
|
+
exitWithReason(reasonForRunError(err));
|
|
959
1101
|
return;
|
|
960
1102
|
}
|
|
961
1103
|
}
|
|
@@ -967,11 +1109,15 @@ export function createSkillTestRunCommand() {
|
|
|
967
1109
|
command
|
|
968
1110
|
.description('Execute a packaged skill\'s eval suite in a headless, context-isolated Claude session (runs the skill\'s code; not an OS sandbox)')
|
|
969
1111
|
.argument('<skill>', 'The skill to test')
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
.
|
|
974
|
-
.option('--
|
|
1112
|
+
// All four are repeatable single-value options, NOT variadic. A variadic
|
|
1113
|
+
// option consumes every token up to the next flag, so it ate the `<skill>`
|
|
1114
|
+
// positional and the run died reporting the subject missing. See
|
|
1115
|
+
// collectRepeated. Their help text always said "(repeatable)"; now it is true.
|
|
1116
|
+
.option('--with <pair>', 'Stage a REQUIRED companion skill the subject can invoke, as name=<src> (repeatable). <src> is workspace:<pkg> | npm:<spec> | url:<u> | path:<dir> | vendored (e.g. helper=npm:@scope/s@1.2.3). A path:<dir> that maps to a declared skill is BUILT like the subject (files: build artifacts included), not tree-copied as raw source. The run fails if a source cannot be resolved or its build fails.', collectRepeated)
|
|
1117
|
+
.option('--with-optional <pair>', 'Stage an OPTIONAL companion skill, as name=<src> (same syntax, repeatable). Staged from its raw (unbuilt) source with a warning if its source cannot be resolved, or if a non-destructive build fails; the run continues.', collectRepeated)
|
|
1118
|
+
.option('--env <pair>', 'Inject an env var into the executor spawn as KEY=VALUE (repeatable). Values support ${fixturesDir}, ${stagedSkillDir}, ${harnessRoot}, ${resultsDir}. ${fixturesDir} is per-eval and requires that eval to declare input `files`. CLI overrides config for the same key.', collectRepeated)
|
|
1119
|
+
.option('--pass-env <key>', 'Forward a host env var by NAME to the executor spawn if present (repeatable). Protected names (PATH, auth, model) are ignored.', collectRepeated)
|
|
1120
|
+
.option('--refresh', 'No-op today, accepted for forward compatibility: staging already does a full re-stage on every run, so there is no retained staged content for this flag to ignore. Nothing reads it — passing it changes nothing.')
|
|
975
1121
|
.option('--no-build', 'Skip building declared skills (subject and any --with/--with-optional companion); stage existing dist instead. Errors if absent for the subject or a REQUIRED companion; an OPTIONAL companion falls back to raw source with a warning.')
|
|
976
1122
|
.option('--workdir <dir>', 'Override the harness working directory')
|
|
977
1123
|
.option('--out <dir>', 'Override the harness output directory')
|
|
@@ -979,15 +1125,19 @@ export function createSkillTestRunCommand() {
|
|
|
979
1125
|
.option('--dry-run', 'Build and stage exactly as a real run would, then stop without spawning Claude (no tokens spent). Combine with --no-build to skip the build too.')
|
|
980
1126
|
.option('--auth <mode>', 'Auth mechanism: inherit | subscription | api-key | auto')
|
|
981
1127
|
.option('--require-auth <mech>', 'Require a specific auth mechanism: subscription | api-key')
|
|
982
|
-
|
|
983
|
-
|
|
1128
|
+
// `--baseline` MUST be declared before `--no-baseline`: Commander only leaves the
|
|
1129
|
+
// value undefined-when-untyped if a positive option already exists, and that
|
|
1130
|
+
// tri-state is what lets a flag beat config in BOTH directions (see resolveBaseline).
|
|
1131
|
+
.option('--baseline', "A/B the skill's INSTRUCTIONS (declared vs withheld) and report the lift on stderr. Runs every eval TWICE, so it roughly DOUBLES the spawns and the spend (--max-budget-usd is per-spawn). Both arms share a filesystem — not a capability control; see baselineDelta and baselineIntegrity in baseline.json")
|
|
1132
|
+
.option('--no-baseline', 'Force the baseline A/B OFF for this run, overriding a committed `test.baseline: true` in the project config (which is announced on stderr when it applies).')
|
|
1133
|
+
.option('--allow-eval-failure', 'Opt out of the fail-closed default: exit 0 even when an eval fails (for interactive use). By DEFAULT a failing eval exits 1, distinct from the harness-could-not-run exit 2 (with a Reason: line) so CI can gate on it.')
|
|
984
1134
|
.option('--allow-unverified-skill-source', 'Skip the vendored manifest integrity check')
|
|
985
1135
|
.option('--i-understand-this-runs-skill-code', 'Acknowledge this command executes skill code (required)')
|
|
986
1136
|
.option('--model <id>', "Model ID passed VERBATIM to `claude --model <id>` for the model UNDER TEST (the executor). VAT does no mapping/validation (e.g. opus, sonnet, claude-opus-4-8). Omit to use claude's own default model. Independent of --grader-model.")
|
|
987
1137
|
.option('--grader-model <id>', 'Model for the fixed grader/judge, passed VERBATIM to `claude --model` (default claude-sonnet-5). GLOBAL (top-level `test:` config), independent of --model (the model UNDER TEST).')
|
|
988
1138
|
.option('--evals <path>', "Eval suite to grade against: a path to an evals.json (resolved against the CURRENT DIRECTORY, so it may point outside the skill's tree) or an npm bare specifier honoring that package's exports map. Overrides `test.evals`, which is resolved against the skill source instead. Use this to test a skill you did not author — a correctly packaged skill ships no evals, because the suite is the answer key.")
|
|
989
1139
|
.option('--max-turns <n>', 'Per-spawn cap on executor/grader turns (positive integer)')
|
|
990
|
-
.option('--max-budget-usd <n>', '
|
|
1140
|
+
.option('--max-budget-usd <n>', 'Per-spawn USD budget cap, applied to EACH executor and grader spawn (positive number). Not a whole-run ceiling: a --baseline run has twice the spawns, so twice the worst-case spend.')
|
|
991
1141
|
.option('--timeout <s>', 'Wall-clock timeout in seconds (positive integer)')
|
|
992
1142
|
.option('--stall <s>', 'Stall-watchdog in seconds (positive integer)')
|
|
993
1143
|
.option('--concurrency <n>', 'Max evals graded in parallel (positive integer; default 4)')
|
|
@@ -1004,11 +1154,41 @@ Description:
|
|
|
1004
1154
|
transcript against the skill's expectations. VAT merges the grader results and
|
|
1005
1155
|
writes grading.json.
|
|
1006
1156
|
|
|
1157
|
+
A declared skill is built before staging -- except an IN-PLACE one (merged
|
|
1158
|
+
config publish: false), which 'vat build' never bundles: it is staged from its
|
|
1159
|
+
source directory, and friction.json says links leaving that directory are absent.
|
|
1160
|
+
|
|
1007
1161
|
IMPORTANT: This command EXECUTES the skill's code with your user account's
|
|
1008
1162
|
full privileges (filesystem, network, shell) and a reachable auth credential.
|
|
1009
1163
|
Only run skills you trust. You MUST pass --i-understand-this-runs-skill-code
|
|
1010
1164
|
to acknowledge this and proceed.
|
|
1011
1165
|
|
|
1166
|
+
Artifacts:
|
|
1167
|
+
grading.json (the verdict), friction.json, tool-eval.json, provenance.json,
|
|
1168
|
+
and -- with --baseline -- baseline.json are written to a results/ directory
|
|
1169
|
+
whose path is echoed to stderr ("Results: <path>"). On a DEFAULT run (no --out,
|
|
1170
|
+
--workdir or --keep) that directory SURVIVES and the staged skill bytes around
|
|
1171
|
+
it are removed.
|
|
1172
|
+
|
|
1173
|
+
--out or --workdir spares only the harness ROOT: it is a location you own, so
|
|
1174
|
+
vat never deletes it, and the staged (untrusted) skill bytes inside it stay
|
|
1175
|
+
until you delete them yourself. It is NOT a blanket "keep everything". Three
|
|
1176
|
+
vat-owned directories live OUTSIDE that root -- the grader's output dir, the
|
|
1177
|
+
held eval suite, and the per-eval executor WORKSPACES (every eval's working
|
|
1178
|
+
directory and everything the evals wrote) -- and they are reaped on a rule that
|
|
1179
|
+
ignores --out and --workdir entirely. --keep is the only flag that retains the
|
|
1180
|
+
workspaces; without it they are gone before this command prints, which is why
|
|
1181
|
+
the "Workspaces: <path>" line appears only under --keep. Pass --keep when you
|
|
1182
|
+
intend to inspect what the evals produced.
|
|
1183
|
+
|
|
1184
|
+
A --baseline run also echoes its lift to stderr ("Baseline delta: +2 (with
|
|
1185
|
+
skill: 3/3, without skill: 1/3)."), and stamps the same numbers into
|
|
1186
|
+
baseline.json as baselineDelta, run-level and per eval. A delta of 0 means the
|
|
1187
|
+
skill lifted nothing; a delta of null means the two arms were graded against a
|
|
1188
|
+
different number of expectations and cannot be subtracted at all -- see
|
|
1189
|
+
baselineIntegrity.skew for which evals, and prefer null over a number that
|
|
1190
|
+
would read as "100% without the skill".
|
|
1191
|
+
|
|
1012
1192
|
Model:
|
|
1013
1193
|
--model <id> selects the model UNDER TEST (the executor spawn): passed
|
|
1014
1194
|
straight through as \`claude --model <id>\` (verbatim -- VAT does not map or
|
|
@@ -1027,23 +1207,24 @@ Model:
|
|
|
1027
1207
|
|
|
1028
1208
|
Exit Codes:
|
|
1029
1209
|
0 - Harness ran to completion and every eval passed (or --allow-eval-failure suppressed a failing verdict)
|
|
1030
|
-
1 -
|
|
1031
|
-
2 -
|
|
1032
|
-
|
|
1033
|
-
|
|
1210
|
+
1 - An eval FAILED (the harness completed and produced a valid grading.json; expectations did not all pass). This is the fail-closed DEFAULT -- suppress with --allow-eval-failure.
|
|
1211
|
+
2 - The harness could not run. A 'Reason: <reason>' line on stderr says why:
|
|
1212
|
+
internal - the harness broke (grader fragment absent or off-schema, summary/expectations skew, executor/grader crash, stall/timeout)
|
|
1213
|
+
preflight - the environment or inputs need fixing (missing binary, auth error, eval inputs absent, unsafe workdir, ack missing, broken project config, a required skill -- subject or --with companion -- failed to build, --no-build with no existing dist for one of them, or an OPTIONAL --with-optional companion hitting a non-survivable failure: a destructive plugin-local build failure, missing security ack, or broken config)
|
|
1214
|
+
bootstrap - evals.json was absent, so VAT wrote a starter template next to the skill source. Fill it in and re-run.
|
|
1034
1215
|
|
|
1035
|
-
The
|
|
1036
|
-
failing closed on
|
|
1216
|
+
The same three-way contract as every other vat command, so a CI consumer
|
|
1217
|
+
can tolerate eval failures while failing closed on a harness that broke:
|
|
1037
1218
|
|
|
1038
1219
|
vat skill test run my-skill --i-understand-this-runs-skill-code
|
|
1039
1220
|
case $? in
|
|
1040
1221
|
0) ;; # all evals passed
|
|
1041
|
-
|
|
1042
|
-
*) exit 1 ;; #
|
|
1222
|
+
1) ;; # evals failed but the harness is healthy -- tolerate/warn
|
|
1223
|
+
*) exit 1 ;; # harness could not run -- fail the build; read Reason:
|
|
1043
1224
|
esac
|
|
1044
1225
|
|
|
1045
1226
|
Which specific evals failed lives in grading.json, never in the exit code.
|
|
1046
|
-
For interactive iteration, --allow-eval-failure downgrades
|
|
1227
|
+
For interactive iteration, --allow-eval-failure downgrades 1 to 0.
|
|
1047
1228
|
|
|
1048
1229
|
Example:
|
|
1049
1230
|
$ vat skill test run my-skill --i-understand-this-runs-skill-code
|