peaks-loop 4.1.3 → 4.1.4
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/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +56 -0
- package/README-en.md +1 -1
- package/README.md +1 -1
- package/dist/cli/commands/asset-command-shared.d.ts +12 -0
- package/dist/cli/commands/asset-command-shared.js +45 -0
- package/dist/cli/commands/asset-commands.d.ts +6 -1
- package/dist/cli/commands/asset-commands.js +11 -372
- package/dist/cli/commands/asset-crystallize-command.d.ts +3 -0
- package/dist/cli/commands/asset-crystallize-command.js +60 -0
- package/dist/cli/commands/asset-crystallize-payload.d.ts +47 -0
- package/dist/cli/commands/asset-crystallize-payload.js +85 -0
- package/dist/cli/commands/asset-crystallize-runner.d.ts +3 -0
- package/dist/cli/commands/asset-crystallize-runner.js +133 -0
- package/dist/cli/commands/asset-dispose-command.d.ts +3 -0
- package/dist/cli/commands/asset-dispose-command.js +99 -0
- package/dist/cli/commands/asset-status-command.d.ts +3 -0
- package/dist/cli/commands/asset-status-command.js +100 -0
- package/dist/cli/commands/baseline-audit-command.d.ts +3 -0
- package/dist/cli/commands/baseline-audit-command.js +64 -0
- package/dist/cli/commands/baseline-command-shared.d.ts +23 -0
- package/dist/cli/commands/baseline-command-shared.js +39 -0
- package/dist/cli/commands/baseline-commands.js +33 -313
- package/dist/cli/commands/baseline-freeze-commands.d.ts +4 -0
- package/dist/cli/commands/baseline-freeze-commands.js +81 -0
- package/dist/cli/commands/baseline-guard-command.d.ts +3 -0
- package/dist/cli/commands/baseline-guard-command.js +52 -0
- package/dist/cli/commands/baseline-read-commands.d.ts +5 -0
- package/dist/cli/commands/baseline-read-commands.js +72 -0
- package/dist/cli/commands/baseline-rollback-commands.d.ts +4 -0
- package/dist/cli/commands/baseline-rollback-commands.js +88 -0
- package/dist/cli/commands/classify-downgrade-command.d.ts +9 -0
- package/dist/cli/commands/classify-downgrade-command.js +21 -0
- package/dist/cli/commands/classify-run-command.d.ts +9 -0
- package/dist/cli/commands/classify-run-command.js +73 -0
- package/dist/cli/commands/classify-signals.d.ts +5 -0
- package/dist/cli/commands/classify-signals.js +104 -0
- package/dist/cli/commands/code-emit-handoff-command.js +40 -3
- package/dist/cli/commands/code-gate-step-08-command.js +25 -9
- package/dist/cli/commands/codegraph-command-options.d.ts +22 -0
- package/dist/cli/commands/codegraph-command-options.js +22 -0
- package/dist/cli/commands/codegraph-commands.d.ts +2 -2
- package/dist/cli/commands/codegraph-commands.js +14 -397
- package/dist/cli/commands/codegraph-config-restore-command.d.ts +3 -0
- package/dist/cli/commands/codegraph-config-restore-command.js +200 -0
- package/dist/cli/commands/codegraph-proxy-commands.d.ts +10 -0
- package/dist/cli/commands/codegraph-proxy-commands.js +159 -0
- package/dist/cli/commands/codegraph-repair-commands.d.ts +3 -0
- package/dist/cli/commands/codegraph-repair-commands.js +94 -0
- package/dist/cli/commands/codegraph-status-command.d.ts +1 -1
- package/dist/cli/commands/codegraph-status-command.js +27 -214
- package/dist/cli/commands/codegraph-status-integrity.d.ts +44 -0
- package/dist/cli/commands/codegraph-status-integrity.js +121 -0
- package/dist/cli/commands/codegraph-status-json.d.ts +5 -0
- package/dist/cli/commands/codegraph-status-json.js +127 -0
- package/dist/cli/commands/container-command-shared.d.ts +60 -0
- package/dist/cli/commands/container-command-shared.js +52 -0
- package/dist/cli/commands/container-commands.d.ts +1 -1
- package/dist/cli/commands/container-commands.js +4 -216
- package/dist/cli/commands/container-release-command.d.ts +3 -0
- package/dist/cli/commands/container-release-command.js +105 -0
- package/dist/cli/commands/container-spawn-command.d.ts +3 -0
- package/dist/cli/commands/container-spawn-command.js +148 -0
- package/dist/cli/commands/context-check-command.d.ts +3 -0
- package/dist/cli/commands/context-check-command.js +81 -0
- package/dist/cli/commands/context-commands.d.ts +2 -7
- package/dist/cli/commands/context-commands.js +6 -276
- package/dist/cli/commands/context-layer-command.d.ts +3 -0
- package/dist/cli/commands/context-layer-command.js +34 -0
- package/dist/cli/commands/context-layer-fetchers.d.ts +15 -0
- package/dist/cli/commands/context-layer-fetchers.js +162 -0
- package/dist/cli/commands/context-status-command.d.ts +17 -0
- package/dist/cli/commands/context-status-command.js +41 -0
- package/dist/cli/commands/contract-write-command.d.ts +3 -0
- package/dist/cli/commands/contract-write-command.js +144 -0
- package/dist/cli/commands/core/doctor-bindings.d.ts +17 -0
- package/dist/cli/commands/core/doctor-bindings.js +30 -0
- package/dist/cli/commands/core/doctor-command.d.ts +4 -18
- package/dist/cli/commands/core/doctor-command.js +2 -323
- package/dist/cli/commands/core/doctor-logs.d.ts +8 -0
- package/dist/cli/commands/core/doctor-logs.js +32 -0
- package/dist/cli/commands/core/doctor-probes.d.ts +3 -0
- package/dist/cli/commands/core/doctor-probes.js +55 -0
- package/dist/cli/commands/core/doctor-run-command.d.ts +12 -0
- package/dist/cli/commands/core/doctor-run-command.js +172 -0
- package/dist/cli/commands/core/doctor-summary.d.ts +7 -0
- package/dist/cli/commands/core/doctor-summary.js +39 -0
- package/dist/cli/commands/core/memory-command-shared.d.ts +25 -0
- package/dist/cli/commands/core/memory-command-shared.js +20 -0
- package/dist/cli/commands/core/memory-command.d.ts +1 -1
- package/dist/cli/commands/core/memory-command.js +6 -227
- package/dist/cli/commands/core/memory-delegated-verbs.d.ts +4 -0
- package/dist/cli/commands/core/memory-delegated-verbs.js +178 -0
- package/dist/cli/commands/core/memory-extract-command.d.ts +3 -0
- package/dist/cli/commands/core/memory-extract-command.js +90 -0
- package/dist/cli/commands/core/memory-sync-command.d.ts +3 -0
- package/dist/cli/commands/core/memory-sync-command.js +38 -0
- package/dist/cli/commands/core/session-command.d.ts +1 -1
- package/dist/cli/commands/core/session-command.js +12 -206
- package/dist/cli/commands/core/session-info-command.d.ts +3 -0
- package/dist/cli/commands/core/session-info-command.js +142 -0
- package/dist/cli/commands/core/session-verb-commands.d.ts +5 -0
- package/dist/cli/commands/core/session-verb-commands.js +58 -0
- package/dist/cli/commands/core/standards-command.d.ts +1 -24
- package/dist/cli/commands/core/standards-command.js +33 -201
- package/dist/cli/commands/core/standards-init-command.d.ts +3 -0
- package/dist/cli/commands/core/standards-init-command.js +87 -0
- package/dist/cli/commands/core/standards-lint.d.ts +24 -0
- package/dist/cli/commands/core/standards-lint.js +57 -0
- package/dist/cli/commands/core/standards-migrate-command.d.ts +3 -0
- package/dist/cli/commands/core/standards-migrate-command.js +57 -0
- package/dist/cli/commands/cron-scheduler-commands.d.ts +5 -1
- package/dist/cli/commands/cron-scheduler-commands.js +36 -206
- package/dist/cli/commands/cron-scheduler-run-once-command.d.ts +7 -0
- package/dist/cli/commands/cron-scheduler-run-once-command.js +35 -0
- package/dist/cli/commands/cron-scheduler-shared.d.ts +6 -0
- package/dist/cli/commands/cron-scheduler-shared.js +48 -0
- package/dist/cli/commands/cron-scheduler-start-command.d.ts +7 -0
- package/dist/cli/commands/cron-scheduler-start-command.js +65 -0
- package/dist/cli/commands/cron-scheduler-status-command.d.ts +7 -0
- package/dist/cli/commands/cron-scheduler-status-command.js +46 -0
- package/dist/cli/commands/cron-scheduler-stop-command.d.ts +7 -0
- package/dist/cli/commands/cron-scheduler-stop-command.js +61 -0
- package/dist/cli/commands/dispatch-dag-envelope.d.ts +41 -0
- package/dist/cli/commands/dispatch-dag-envelope.js +49 -0
- package/dist/cli/commands/dispatch-dag-failure.d.ts +18 -0
- package/dist/cli/commands/dispatch-dag-failure.js +16 -0
- package/dist/cli/commands/dispatch-dag-preflight.d.ts +51 -0
- package/dist/cli/commands/dispatch-dag-preflight.js +105 -0
- package/dist/cli/commands/dispatch-dag-runners.d.ts +48 -0
- package/dist/cli/commands/dispatch-dag-runners.js +73 -0
- package/dist/cli/commands/dispatch-from-dag.d.ts +27 -0
- package/dist/cli/commands/dispatch-from-dag.js +87 -257
- package/dist/cli/commands/final-review-command-envelopes.d.ts +44 -0
- package/dist/cli/commands/final-review-command-envelopes.js +100 -0
- package/dist/cli/commands/final-review-command-shared.d.ts +52 -0
- package/dist/cli/commands/final-review-command-shared.js +35 -0
- package/dist/cli/commands/final-review-commands.d.ts +7 -27
- package/dist/cli/commands/final-review-commands.js +13 -240
- package/dist/cli/commands/final-review-prepare-command.d.ts +3 -0
- package/dist/cli/commands/final-review-prepare-command.js +200 -0
- package/dist/cli/commands/governance-classify-contract-commands.d.ts +23 -9
- package/dist/cli/commands/governance-classify-contract-commands.js +26 -269
- package/dist/cli/commands/hooks-command-shared.d.ts +42 -0
- package/dist/cli/commands/hooks-command-shared.js +32 -0
- package/dist/cli/commands/hooks-commands.d.ts +20 -0
- package/dist/cli/commands/hooks-commands.js +75 -309
- package/dist/cli/commands/hooks-install-envelopes.d.ts +6 -0
- package/dist/cli/commands/hooks-install-envelopes.js +144 -0
- package/dist/cli/commands/hooks-status-command.d.ts +3 -0
- package/dist/cli/commands/hooks-status-command.js +93 -0
- package/dist/cli/commands/hooks-uninstall-command.d.ts +3 -0
- package/dist/cli/commands/hooks-uninstall-command.js +43 -0
- package/dist/cli/commands/loop-command-shared.d.ts +31 -0
- package/dist/cli/commands/loop-command-shared.js +15 -0
- package/dist/cli/commands/loop-commands.d.ts +12 -17
- package/dist/cli/commands/loop-commands.js +56 -238
- package/dist/cli/commands/loop-export-command.d.ts +3 -0
- package/dist/cli/commands/loop-export-command.js +73 -0
- package/dist/cli/commands/loop-goal-compose-command.d.ts +3 -0
- package/dist/cli/commands/loop-goal-compose-command.js +36 -0
- package/dist/cli/commands/loop-import-command.d.ts +3 -0
- package/dist/cli/commands/loop-import-command.js +86 -0
- package/dist/cli/commands/loop-placeholder-commands.d.ts +3 -0
- package/dist/cli/commands/loop-placeholder-commands.js +52 -0
- package/dist/cli/commands/memory-command-shared.d.ts +59 -0
- package/dist/cli/commands/memory-command-shared.js +39 -0
- package/dist/cli/commands/memory-commands.d.ts +6 -79
- package/dist/cli/commands/memory-commands.js +19 -309
- package/dist/cli/commands/memory-ingest-command.d.ts +3 -0
- package/dist/cli/commands/memory-ingest-command.js +50 -0
- package/dist/cli/commands/memory-list-command.d.ts +16 -0
- package/dist/cli/commands/memory-list-command.js +129 -0
- package/dist/cli/commands/memory-reindex-command.d.ts +9 -0
- package/dist/cli/commands/memory-reindex-command.js +78 -0
- package/dist/cli/commands/memory-rotate-command.d.ts +3 -0
- package/dist/cli/commands/memory-rotate-command.js +55 -0
- package/dist/cli/commands/memory-search-command.d.ts +7 -0
- package/dist/cli/commands/memory-search-command.js +46 -0
- package/dist/cli/commands/openspec-archive-command.d.ts +3 -0
- package/dist/cli/commands/openspec-archive-command.js +55 -0
- package/dist/cli/commands/openspec-command-shared.d.ts +62 -0
- package/dist/cli/commands/openspec-command-shared.js +135 -0
- package/dist/cli/commands/openspec-commands.d.ts +1 -1
- package/dist/cli/commands/openspec-commands.js +33 -306
- package/dist/cli/commands/openspec-from-doctor-command.d.ts +3 -0
- package/dist/cli/commands/openspec-from-doctor-command.js +66 -0
- package/dist/cli/commands/openspec-init-command.d.ts +3 -0
- package/dist/cli/commands/openspec-init-command.js +49 -0
- package/dist/cli/commands/openspec-list-command.d.ts +3 -0
- package/dist/cli/commands/openspec-list-command.js +27 -0
- package/dist/cli/commands/openspec-render-command.d.ts +3 -0
- package/dist/cli/commands/openspec-render-command.js +33 -0
- package/dist/cli/commands/openspec-show-command.d.ts +3 -0
- package/dist/cli/commands/openspec-show-command.js +33 -0
- package/dist/cli/commands/openspec-to-rd-command.d.ts +3 -0
- package/dist/cli/commands/openspec-to-rd-command.js +33 -0
- package/dist/cli/commands/openspec-validate-command.d.ts +3 -0
- package/dist/cli/commands/openspec-validate-command.js +45 -0
- package/dist/cli/commands/playwright-browser-command.d.ts +8 -0
- package/dist/cli/commands/playwright-browser-command.js +61 -0
- package/dist/cli/commands/playwright-commands.d.ts +10 -62
- package/dist/cli/commands/playwright-commands.js +77 -400
- package/dist/cli/commands/playwright-envelope.d.ts +8 -0
- package/dist/cli/commands/playwright-envelope.js +29 -0
- package/dist/cli/commands/playwright-ls-stop-commands.d.ts +4 -0
- package/dist/cli/commands/playwright-ls-stop-commands.js +74 -0
- package/dist/cli/commands/playwright-session-store.d.ts +65 -0
- package/dist/cli/commands/playwright-session-store.js +189 -0
- package/dist/cli/commands/project-commands.d.ts +19 -0
- package/dist/cli/commands/project-commands.js +98 -259
- package/dist/cli/commands/project-context-command.d.ts +3 -0
- package/dist/cli/commands/project-context-command.js +44 -0
- package/dist/cli/commands/project-dashboard-command.d.ts +3 -0
- package/dist/cli/commands/project-dashboard-command.js +74 -0
- package/dist/cli/commands/project-knowledge-command.d.ts +3 -0
- package/dist/cli/commands/project-knowledge-command.js +48 -0
- package/dist/cli/commands/project-memories-show-command.d.ts +3 -0
- package/dist/cli/commands/project-memories-show-command.js +87 -0
- package/dist/cli/commands/project-memory-index-command.d.ts +3 -0
- package/dist/cli/commands/project-memory-index-command.js +31 -0
- package/dist/cli/commands/qa-archive-screenshots-command.d.ts +3 -0
- package/dist/cli/commands/qa-archive-screenshots-command.js +53 -0
- package/dist/cli/commands/qa-commands.d.ts +14 -87
- package/dist/cli/commands/qa-commands.js +17 -315
- package/dist/cli/commands/qa-context-prestep.d.ts +1 -0
- package/dist/cli/commands/qa-context-prestep.js +34 -0
- package/dist/cli/commands/qa-run-command.d.ts +3 -0
- package/dist/cli/commands/qa-run-command.js +105 -0
- package/dist/cli/commands/qa-run-options.d.ts +23 -0
- package/dist/cli/commands/qa-run-options.js +31 -0
- package/dist/cli/commands/qa-run-slice.d.ts +41 -0
- package/dist/cli/commands/qa-run-slice.js +145 -0
- package/dist/cli/commands/release-canary-command.d.ts +28 -0
- package/dist/cli/commands/release-canary-command.js +129 -0
- package/dist/cli/commands/release-command-shared.d.ts +13 -0
- package/dist/cli/commands/release-command-shared.js +18 -0
- package/dist/cli/commands/release-commands.d.ts +10 -18
- package/dist/cli/commands/release-commands.js +25 -298
- package/dist/cli/commands/release-done-command.d.ts +3 -0
- package/dist/cli/commands/release-done-command.js +64 -0
- package/dist/cli/commands/release-hotfix-command.d.ts +3 -0
- package/dist/cli/commands/release-hotfix-command.js +50 -0
- package/dist/cli/commands/release-plan-command.d.ts +3 -0
- package/dist/cli/commands/release-plan-command.js +33 -0
- package/dist/cli/commands/release-precheck-command.d.ts +3 -0
- package/dist/cli/commands/release-precheck-command.js +28 -0
- package/dist/cli/commands/release-promote-command.d.ts +3 -0
- package/dist/cli/commands/release-promote-command.js +34 -0
- package/dist/cli/commands/release-rollback-command.d.ts +3 -0
- package/dist/cli/commands/release-rollback-command.js +33 -0
- package/dist/cli/commands/release-watch-command.d.ts +3 -0
- package/dist/cli/commands/release-watch-command.js +44 -0
- package/dist/cli/commands/sediment-argv-flags.d.ts +54 -0
- package/dist/cli/commands/sediment-argv-flags.js +116 -0
- package/dist/cli/commands/sediment-command-shared.d.ts +15 -0
- package/dist/cli/commands/sediment-command-shared.js +5 -0
- package/dist/cli/commands/sediment-commands.d.ts +35 -59
- package/dist/cli/commands/sediment-commands.js +36 -590
- package/dist/cli/commands/sediment-pool-commands.d.ts +9 -0
- package/dist/cli/commands/sediment-pool-commands.js +185 -0
- package/dist/cli/commands/sediment-query-commands.d.ts +4 -0
- package/dist/cli/commands/sediment-query-commands.js +94 -0
- package/dist/cli/commands/sediment-release-commands.d.ts +8 -0
- package/dist/cli/commands/sediment-release-commands.js +232 -0
- package/dist/cli/commands/sop-advance-command.d.ts +3 -0
- package/dist/cli/commands/sop-advance-command.js +160 -0
- package/dist/cli/commands/sop-check-command.d.ts +3 -0
- package/dist/cli/commands/sop-check-command.js +44 -0
- package/dist/cli/commands/sop-command-shared.d.ts +23 -0
- package/dist/cli/commands/sop-command-shared.js +18 -0
- package/dist/cli/commands/sop-commands.d.ts +15 -1
- package/dist/cli/commands/sop-commands.js +26 -240
- package/dist/cli/commands/sop-init-command.d.ts +3 -0
- package/dist/cli/commands/sop-init-command.js +51 -0
- package/dist/cli/commands/sop-lint-command.d.ts +3 -0
- package/dist/cli/commands/sop-lint-command.js +64 -0
- package/dist/cli/commands/sop-register-command.d.ts +3 -0
- package/dist/cli/commands/sop-register-command.js +48 -0
- package/dist/cli/commands/sop-registry-command.d.ts +3 -0
- package/dist/cli/commands/sop-registry-command.js +30 -0
- package/dist/cli/commands/statusline-command-shared.d.ts +73 -0
- package/dist/cli/commands/statusline-command-shared.js +90 -0
- package/dist/cli/commands/statusline-commands.d.ts +1 -19
- package/dist/cli/commands/statusline-commands.js +48 -287
- package/dist/cli/commands/statusline-compact-command.d.ts +4 -0
- package/dist/cli/commands/statusline-compact-command.js +54 -0
- package/dist/cli/commands/statusline-install-command.d.ts +3 -0
- package/dist/cli/commands/statusline-install-command.js +48 -0
- package/dist/cli/commands/statusline-render-command.d.ts +9 -0
- package/dist/cli/commands/statusline-render-command.js +55 -0
- package/dist/cli/commands/statusline-status-command.d.ts +3 -0
- package/dist/cli/commands/statusline-status-command.js +23 -0
- package/dist/cli/commands/statusline-uninstall-command.d.ts +3 -0
- package/dist/cli/commands/statusline-uninstall-command.js +23 -0
- package/dist/cli/commands/test-command-run-helpers.d.ts +27 -0
- package/dist/cli/commands/test-command-run-helpers.js +73 -0
- package/dist/cli/commands/test-command-runner-resolution.d.ts +57 -0
- package/dist/cli/commands/test-command-runner-resolution.js +183 -0
- package/dist/cli/commands/test-commands.d.ts +8 -56
- package/dist/cli/commands/test-commands.js +26 -249
- package/dist/cli/commands/vm-command-shared.d.ts +23 -0
- package/dist/cli/commands/vm-command-shared.js +23 -0
- package/dist/cli/commands/vm-commands.d.ts +1 -28
- package/dist/cli/commands/vm-commands.js +36 -270
- package/dist/cli/commands/vm-hypervisor-runtime.d.ts +15 -0
- package/dist/cli/commands/vm-hypervisor-runtime.js +64 -0
- package/dist/cli/commands/vm-release-command.d.ts +5 -0
- package/dist/cli/commands/vm-release-command.js +101 -0
- package/dist/cli/commands/vm-spawn-command.d.ts +5 -0
- package/dist/cli/commands/vm-spawn-command.js +177 -0
- package/dist/cli/commands/web-command-shared.d.ts +12 -0
- package/dist/cli/commands/web-command-shared.js +30 -0
- package/dist/cli/commands/web-commands.d.ts +7 -14
- package/dist/cli/commands/web-commands.js +6 -314
- package/dist/cli/commands/web-install-command.d.ts +10 -0
- package/dist/cli/commands/web-install-command.js +116 -0
- package/dist/cli/commands/web-lifecycle-commands.d.ts +9 -30
- package/dist/cli/commands/web-lifecycle-commands.js +14 -322
- package/dist/cli/commands/web-login-command.d.ts +14 -0
- package/dist/cli/commands/web-login-command.js +189 -0
- package/dist/cli/commands/web-op-payload.d.ts +22 -0
- package/dist/cli/commands/web-op-payload.js +89 -0
- package/dist/cli/commands/web-op-refusals.d.ts +37 -0
- package/dist/cli/commands/web-op-refusals.js +73 -0
- package/dist/cli/commands/web-op-runner.d.ts +14 -0
- package/dist/cli/commands/web-op-runner.js +166 -0
- package/dist/cli/commands/web-status-command.d.ts +4 -0
- package/dist/cli/commands/web-status-command.js +32 -0
- package/dist/cli/commands/web-stop-command.d.ts +10 -0
- package/dist/cli/commands/web-stop-command.js +59 -0
- package/dist/cli/commands/web-verb-specs.d.ts +18 -0
- package/dist/cli/commands/web-verb-specs.js +66 -0
- package/dist/cli/commands/workflow-command-shared.d.ts +102 -0
- package/dist/cli/commands/workflow-command-shared.js +74 -0
- package/dist/cli/commands/workflow-graph-commands.d.ts +3 -0
- package/dist/cli/commands/workflow-graph-commands.js +73 -0
- package/dist/cli/commands/workflow-init-command.d.ts +3 -0
- package/dist/cli/commands/workflow-init-command.js +68 -0
- package/dist/cli/commands/workflow-lifecycle-commands.d.ts +9 -59
- package/dist/cli/commands/workflow-lifecycle-commands.js +14 -348
- package/dist/cli/commands/workflow-node-commands.d.ts +3 -0
- package/dist/cli/commands/workflow-node-commands.js +154 -0
- package/dist/cli/commands/workflow-terminalize-command.d.ts +3 -0
- package/dist/cli/commands/workflow-terminalize-command.js +56 -0
- package/dist/services/code/auto-compact-artifacts.d.ts +54 -0
- package/dist/services/code/auto-compact-artifacts.js +135 -0
- package/dist/services/code/auto-compact-attempt.d.ts +46 -0
- package/dist/services/code/auto-compact-attempt.js +88 -0
- package/dist/services/code/auto-compact-decision.d.ts +74 -0
- package/dist/services/code/auto-compact-decision.js +149 -0
- package/dist/services/code/auto-compact-dispatch-gate.d.ts +36 -0
- package/dist/services/code/auto-compact-dispatch-gate.js +86 -0
- package/dist/services/code/auto-compact-envelopes.d.ts +33 -0
- package/dist/services/code/auto-compact-envelopes.js +134 -0
- package/dist/services/code/auto-compact-history.d.ts +46 -0
- package/dist/services/code/auto-compact-history.js +17 -0
- package/dist/services/code/auto-compact-orchestrator.d.ts +11 -240
- package/dist/services/code/auto-compact-orchestrator.js +165 -686
- package/dist/services/code/auto-compact-run-types.d.ts +123 -0
- package/dist/services/code/auto-compact-run-types.js +1 -0
- package/dist/services/code/emit-handoff.d.ts +35 -1
- package/dist/services/code/emit-handoff.js +128 -7
- package/dist/services/code/step-08-gate.d.ts +28 -19
- package/dist/services/code/step-08-gate.js +92 -35
- package/dist/services/config/config-coercion.d.ts +7 -0
- package/dist/services/config/config-coercion.js +156 -0
- package/dist/services/config/config-file-io.d.ts +11 -0
- package/dist/services/config/config-file-io.js +61 -0
- package/dist/services/config/config-get.d.ts +2 -0
- package/dist/services/config/config-get.js +36 -0
- package/dist/services/config/config-global-loader.d.ts +15 -0
- package/dist/services/config/config-global-loader.js +111 -0
- package/dist/services/config/config-nested-path.d.ts +3 -0
- package/dist/services/config/config-nested-path.js +53 -0
- package/dist/services/config/config-primitives.d.ts +16 -0
- package/dist/services/config/config-primitives.js +24 -0
- package/dist/services/config/config-service.d.ts +9 -33
- package/dist/services/config/config-service.js +16 -665
- package/dist/services/config/config-validation.d.ts +19 -0
- package/dist/services/config/config-validation.js +152 -0
- package/dist/services/config/config-workspace.d.ts +10 -0
- package/dist/services/config/config-workspace.js +158 -0
- package/dist/services/skills/hooks-settings-deny-list.d.ts +61 -0
- package/dist/services/skills/hooks-settings-deny-list.js +173 -0
- package/dist/services/skills/hooks-settings-envelopes.d.ts +20 -0
- package/dist/services/skills/hooks-settings-envelopes.js +79 -0
- package/dist/services/skills/hooks-settings-file-shape.d.ts +43 -0
- package/dist/services/skills/hooks-settings-file-shape.js +207 -0
- package/dist/services/skills/hooks-settings-paths.d.ts +34 -0
- package/dist/services/skills/hooks-settings-paths.js +75 -0
- package/dist/services/skills/hooks-settings-read-installed.d.ts +39 -0
- package/dist/services/skills/hooks-settings-read-installed.js +60 -0
- package/dist/services/skills/hooks-settings-service.d.ts +12 -212
- package/dist/services/skills/hooks-settings-service.js +71 -657
- package/dist/services/skills/hooks-settings-types.d.ts +139 -0
- package/dist/services/skills/hooks-settings-types.js +1 -0
- package/dist/services/workspace/claude-settings-template-merge.d.ts +89 -0
- package/dist/services/workspace/claude-settings-template-merge.js +243 -0
- package/dist/services/workspace/claude-settings-template.d.ts +29 -87
- package/dist/services/workspace/claude-settings-template.js +81 -236
- package/package.json +5 -5
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// src/cli/commands/test-command-run-helpers.ts
|
|
2
|
+
//
|
|
3
|
+
// The pieces `peaks test`'s action is built from: the clear-cache short
|
|
4
|
+
// circuit, the framework resolution, the runner output report and the failure
|
|
5
|
+
// envelope. Split out of `test-commands.ts`; every message, exit code and
|
|
6
|
+
// stream target is unchanged.
|
|
7
|
+
//
|
|
8
|
+
// This module deliberately does NOT import `test-commands.ts` — the runner
|
|
9
|
+
// spawn lives there (with its same-file `deps.spawnFn ?? spawn` alias), and a
|
|
10
|
+
// module graph that reaches back into the registration file is how a command
|
|
11
|
+
// family becomes a cycle.
|
|
12
|
+
import { clearTestCache, detectTestFramework } from '../../services/test-cache/test-cache-service.js';
|
|
13
|
+
import { FRAMEWORKS } from './test-command-runner-resolution.js';
|
|
14
|
+
/** A refused run, on the stream and in the shape the caller asked for. */
|
|
15
|
+
export function emitTestFailure(options, message) {
|
|
16
|
+
if (options.json === true) {
|
|
17
|
+
process.stdout.write(JSON.stringify({ ok: false, error: message }) + '\n');
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
process.stderr.write(message + '\n');
|
|
21
|
+
}
|
|
22
|
+
process.exitCode = 1;
|
|
23
|
+
}
|
|
24
|
+
/** The `--clear-cache` short circuit. */
|
|
25
|
+
export function clearCacheAndReport(options, projectRoot) {
|
|
26
|
+
const result = clearTestCache(projectRoot);
|
|
27
|
+
if (options.json === true) {
|
|
28
|
+
process.stdout.write(JSON.stringify({
|
|
29
|
+
ok: true,
|
|
30
|
+
data: { cleared: true, removed: result.removed, dir: '.peaks/_runtime/test-cache/' }
|
|
31
|
+
}) + '\n');
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
process.stdout.write(`cleared ${result.removed} cache file(s) from .peaks/_runtime/test-cache/\n`);
|
|
35
|
+
}
|
|
36
|
+
/** The framework to run, or null after the matching refusal was emitted. */
|
|
37
|
+
export function resolveFramework(options, projectRoot) {
|
|
38
|
+
if (options.framework) {
|
|
39
|
+
if (!FRAMEWORKS.includes(options.framework)) {
|
|
40
|
+
emitTestFailure(options, `INVALID_FRAMEWORK: --framework must be one of ${FRAMEWORKS.join(', ')} (got "${options.framework}")`);
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return options.framework;
|
|
44
|
+
}
|
|
45
|
+
const detected = detectTestFramework(projectRoot);
|
|
46
|
+
if (!detected) {
|
|
47
|
+
emitTestFailure(options, 'NO_TEST_FRAMEWORK: no supported test framework found in package.json (jest, vitest, or mocha). Install one and re-run, or pass --framework <name>.');
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return detected;
|
|
51
|
+
}
|
|
52
|
+
/** Stream the runner's output to the user, then emit the JSON envelope. */
|
|
53
|
+
export function reportRunResult(options, framework, argv, result) {
|
|
54
|
+
if (result.notice !== null)
|
|
55
|
+
process.stderr.write(result.notice);
|
|
56
|
+
process.stdout.write(result.stdout);
|
|
57
|
+
process.stderr.write(result.stderr);
|
|
58
|
+
if (result.code !== 0) {
|
|
59
|
+
process.exitCode = 1;
|
|
60
|
+
}
|
|
61
|
+
if (options.json === true) {
|
|
62
|
+
process.stdout.write(JSON.stringify({
|
|
63
|
+
ok: result.code === 0,
|
|
64
|
+
data: {
|
|
65
|
+
framework,
|
|
66
|
+
argv,
|
|
67
|
+
exitCode: result.code,
|
|
68
|
+
fingerprintCache: options.noCacheResult ? 'bypassed' : 'enabled',
|
|
69
|
+
cacheDir: '.peaks/_runtime/test-cache/'
|
|
70
|
+
}
|
|
71
|
+
}) + '\n');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { TestFramework } from '../../services/test-cache/test-cache-service.js';
|
|
2
|
+
export declare const FRAMEWORKS: TestFramework[];
|
|
3
|
+
/**
|
|
4
|
+
* Build the argv for the underlying test runner. This is the SINGLE
|
|
5
|
+
* source of truth for "peaks test drops --no-cache from the
|
|
6
|
+
* consumer's script" (G7 / NG7). `--cache` is always passed
|
|
7
|
+
* unless the user explicitly opts in to `--no-cache` or `--passthrough`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildRunnerArgv(framework: TestFramework, patterns: string[], options: {
|
|
10
|
+
all?: boolean;
|
|
11
|
+
changed?: boolean;
|
|
12
|
+
cache?: boolean;
|
|
13
|
+
passthrough?: boolean;
|
|
14
|
+
}): string[];
|
|
15
|
+
/** Successful resolution — everything `spawn` needs, plus provenance. */
|
|
16
|
+
export type RunnerFound = {
|
|
17
|
+
ok: true;
|
|
18
|
+
/** Executable to spawn: node itself, a local shim, or a PATH hit. */
|
|
19
|
+
command: string;
|
|
20
|
+
/** argv for `command` (includes the JS entry when spawning node). */
|
|
21
|
+
args: string[];
|
|
22
|
+
/** How the runner was found — named in the PATH-fallback notice. */
|
|
23
|
+
via: string;
|
|
24
|
+
/** True only for the PATH fallback, which the caller surfaces visibly. */
|
|
25
|
+
fromPath: boolean;
|
|
26
|
+
};
|
|
27
|
+
export type RunnerResolution = RunnerFound | {
|
|
28
|
+
ok: false;
|
|
29
|
+
searched: string[];
|
|
30
|
+
};
|
|
31
|
+
/** Injection seams for tests — production passes nothing. */
|
|
32
|
+
export type ResolveRunnerDeps = {
|
|
33
|
+
platform?: NodeJS.Platform;
|
|
34
|
+
existsSync?: (path: string) => boolean;
|
|
35
|
+
readFileSync?: (path: string) => string;
|
|
36
|
+
env?: NodeJS.ProcessEnv;
|
|
37
|
+
/** Node executable used to run the runner's JS entry. */
|
|
38
|
+
nodeExecPath?: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Resolve the consumer project's LOCAL runner, and the form of it that
|
|
42
|
+
* `spawn` can actually launch on this platform.
|
|
43
|
+
*
|
|
44
|
+
* Probed, in order (every probe is reported when nothing is found):
|
|
45
|
+
* 1. `<root>/node_modules/.bin/<runner>` (+ `.cmd`/`.exe` on Windows) —
|
|
46
|
+
* the project-local runner the command documents.
|
|
47
|
+
* 2. `<root>/node_modules/<runner>/package.json` → its `bin` JS entry.
|
|
48
|
+
* 3. PATH — last resort only; the caller prints a visible notice.
|
|
49
|
+
*
|
|
50
|
+
* Between 1 and 2 the **JS entry** wins: `spawn` runs it as
|
|
51
|
+
* `node <entry> …`, which is identical on Windows and POSIX and never
|
|
52
|
+
* routes argv through a shell. The `.cmd` shim is only a fallback because
|
|
53
|
+
* it needs cmd.exe to launch it (see `toSpawnable`).
|
|
54
|
+
*/
|
|
55
|
+
export declare function resolveRunner(framework: TestFramework, argv: string[], projectRoot: string, deps?: ResolveRunnerDeps): RunnerResolution;
|
|
56
|
+
/** Actionable message for the no-runner case — never a raw ENOENT. */
|
|
57
|
+
export declare function formatRunnerNotFound(framework: TestFramework, searched: string[]): string;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
// src/cli/commands/test-command-runner-resolution.ts
|
|
2
|
+
//
|
|
3
|
+
// Where `peaks test` finds the consumer project's runner, and the argv it
|
|
4
|
+
// hands it. Split out of `test-commands.ts`; every probe order, preference
|
|
5
|
+
// rule and platform branch is unchanged.
|
|
6
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
7
|
+
import { dirname, join, resolve } from 'node:path';
|
|
8
|
+
export const FRAMEWORKS = ['jest', 'vitest', 'mocha'];
|
|
9
|
+
/**
|
|
10
|
+
* Build the argv for the underlying test runner. This is the SINGLE
|
|
11
|
+
* source of truth for "peaks test drops --no-cache from the
|
|
12
|
+
* consumer's script" (G7 / NG7). `--cache` is always passed
|
|
13
|
+
* unless the user explicitly opts in to `--no-cache` or `--passthrough`.
|
|
14
|
+
*/
|
|
15
|
+
export function buildRunnerArgv(framework, patterns, options) {
|
|
16
|
+
if (options.passthrough) {
|
|
17
|
+
// Caller has explicitly chosen to honor the consumer's argv;
|
|
18
|
+
// we still pass the patterns so the runner filters to them.
|
|
19
|
+
if (framework === 'jest')
|
|
20
|
+
return [...patterns, '--no-cache'];
|
|
21
|
+
if (framework === 'vitest')
|
|
22
|
+
return ['run', ...patterns];
|
|
23
|
+
return [...patterns];
|
|
24
|
+
}
|
|
25
|
+
if (framework === 'jest') {
|
|
26
|
+
const argv = [...patterns];
|
|
27
|
+
if (options.all)
|
|
28
|
+
argv.push('--passWithNoTests');
|
|
29
|
+
if (options.changed)
|
|
30
|
+
argv.push('--changedSince=HEAD');
|
|
31
|
+
// Commander's `.option('--no-cache')` sets `opts.cache` (BASE name) to
|
|
32
|
+
// `false` when the flag is passed; `opts.cache` is `true` by default.
|
|
33
|
+
// The default-mode invariant (G7/NG7) is `--cache`; the explicit
|
|
34
|
+
// override is `--no-cache`. Inverted from the previous wording
|
|
35
|
+
// because `options = {}` made the read side `!== true` and silently
|
|
36
|
+
// flipped every default-mode jest/vitest run to `--no-cache`.
|
|
37
|
+
if (options.cache === false)
|
|
38
|
+
argv.push('--no-cache');
|
|
39
|
+
else
|
|
40
|
+
argv.push('--cache');
|
|
41
|
+
return argv;
|
|
42
|
+
}
|
|
43
|
+
if (framework === 'vitest') {
|
|
44
|
+
const argv = ['run', ...patterns];
|
|
45
|
+
if (options.changed)
|
|
46
|
+
argv.push('--changed');
|
|
47
|
+
if (options.cache === false)
|
|
48
|
+
argv.push('--no-cache');
|
|
49
|
+
else
|
|
50
|
+
argv.push('--cache');
|
|
51
|
+
return argv;
|
|
52
|
+
}
|
|
53
|
+
// mocha — no built-in --cache flag; we just pass the patterns.
|
|
54
|
+
return [...patterns];
|
|
55
|
+
}
|
|
56
|
+
/** `<pkg>/package.json#bin`, resolved to the absolute JS entry it points at. */
|
|
57
|
+
function readBinEntry(pkgJsonPath, name, read) {
|
|
58
|
+
let pkg = {};
|
|
59
|
+
try {
|
|
60
|
+
pkg = JSON.parse(read(pkgJsonPath));
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
// Not fatal: fall through to the `.bin` shim below, and the not-found
|
|
64
|
+
// error still names this package.json in `searched`.
|
|
65
|
+
pkg = {};
|
|
66
|
+
}
|
|
67
|
+
const rel = typeof pkg.bin === 'string' ? pkg.bin : pkg.bin?.[name];
|
|
68
|
+
if (typeof rel !== 'string' || rel.length === 0)
|
|
69
|
+
return null;
|
|
70
|
+
return resolve(dirname(pkgJsonPath), rel);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Convert a resolved executable + argv into a form `spawn` can launch with
|
|
74
|
+
* `shell: false`.
|
|
75
|
+
*
|
|
76
|
+
* A Windows `.cmd`/`.bat` shim cannot be spawned directly (spawn → EINVAL).
|
|
77
|
+
* The obvious fix, `spawn(shim, argv, { shell: true })`, re-splits argv inside
|
|
78
|
+
* cmd.exe: a pattern `tests/a b/x.test.ts` arrives as THREE args (measured).
|
|
79
|
+
* Invoking cmd.exe ourselves with `/d /s /c` keeps argv intact.
|
|
80
|
+
*/
|
|
81
|
+
function toSpawnable(exe, argv, platform, env) {
|
|
82
|
+
if (platform === 'win32' && /\.(?:cmd|bat)$/i.test(exe)) {
|
|
83
|
+
return { command: env.ComSpec ?? 'cmd.exe', args: ['/d', '/s', '/c', exe, ...argv] };
|
|
84
|
+
}
|
|
85
|
+
return { command: exe, args: argv };
|
|
86
|
+
}
|
|
87
|
+
/** Spawnable PATH hits, in preference order (`where`/`which` avoided so this
|
|
88
|
+
* stays in-process and testable). */
|
|
89
|
+
function resolveFromPath(name, platform, env, exists) {
|
|
90
|
+
const dirs = (env.PATH ?? '').split(platform === 'win32' ? ';' : ':').filter((d) => d.length > 0);
|
|
91
|
+
const exts = platform === 'win32' ? ['.exe', '.cmd', '.bat', ''] : [''];
|
|
92
|
+
for (const dir of dirs) {
|
|
93
|
+
for (const ext of exts) {
|
|
94
|
+
const candidate = join(dir, name + ext);
|
|
95
|
+
if (exists(candidate))
|
|
96
|
+
return candidate;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Step 1 of the probe: the project-local `<root>/node_modules/.bin/<runner>`
|
|
103
|
+
* shim (plus `.cmd`/`.exe` on Windows). Every candidate is recorded in
|
|
104
|
+
* `searched`, in probe order, so the not-found message names them all.
|
|
105
|
+
*/
|
|
106
|
+
function probeLocalShim(framework, where) {
|
|
107
|
+
const binDir = join(where.projectRoot, 'node_modules', '.bin');
|
|
108
|
+
const exts = where.platform === 'win32' ? ['.cmd', '.exe'] : [''];
|
|
109
|
+
let shim = null;
|
|
110
|
+
for (const ext of exts) {
|
|
111
|
+
const candidate = join(binDir, framework + ext);
|
|
112
|
+
where.searched.push(candidate);
|
|
113
|
+
if (shim === null && where.exists(candidate))
|
|
114
|
+
shim = candidate;
|
|
115
|
+
}
|
|
116
|
+
return shim;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Resolve the consumer project's LOCAL runner, and the form of it that
|
|
120
|
+
* `spawn` can actually launch on this platform.
|
|
121
|
+
*
|
|
122
|
+
* Probed, in order (every probe is reported when nothing is found):
|
|
123
|
+
* 1. `<root>/node_modules/.bin/<runner>` (+ `.cmd`/`.exe` on Windows) —
|
|
124
|
+
* the project-local runner the command documents.
|
|
125
|
+
* 2. `<root>/node_modules/<runner>/package.json` → its `bin` JS entry.
|
|
126
|
+
* 3. PATH — last resort only; the caller prints a visible notice.
|
|
127
|
+
*
|
|
128
|
+
* Between 1 and 2 the **JS entry** wins: `spawn` runs it as
|
|
129
|
+
* `node <entry> …`, which is identical on Windows and POSIX and never
|
|
130
|
+
* routes argv through a shell. The `.cmd` shim is only a fallback because
|
|
131
|
+
* it needs cmd.exe to launch it (see `toSpawnable`).
|
|
132
|
+
*/
|
|
133
|
+
export function resolveRunner(framework, argv, projectRoot, deps = {}) {
|
|
134
|
+
const platform = deps.platform ?? process.platform;
|
|
135
|
+
const exists = deps.existsSync ?? existsSync;
|
|
136
|
+
const read = deps.readFileSync ?? ((path) => readFileSync(path, 'utf8'));
|
|
137
|
+
const env = deps.env ?? process.env;
|
|
138
|
+
const nodeExec = deps.nodeExecPath ?? process.execPath;
|
|
139
|
+
const searched = [];
|
|
140
|
+
// 1. Project-local `.bin` shim.
|
|
141
|
+
const shim = probeLocalShim(framework, { projectRoot, platform, exists, searched });
|
|
142
|
+
// 2. Project-local package entry.
|
|
143
|
+
const pkgJsonPath = join(projectRoot, 'node_modules', framework, 'package.json');
|
|
144
|
+
searched.push(pkgJsonPath);
|
|
145
|
+
const entry = exists(pkgJsonPath) ? readBinEntry(pkgJsonPath, framework, read) : null;
|
|
146
|
+
if (entry !== null && exists(entry)) {
|
|
147
|
+
return {
|
|
148
|
+
ok: true,
|
|
149
|
+
command: nodeExec,
|
|
150
|
+
args: [entry, ...argv],
|
|
151
|
+
via: `local ${entry}`,
|
|
152
|
+
fromPath: false
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
if (shim !== null) {
|
|
156
|
+
return {
|
|
157
|
+
ok: true,
|
|
158
|
+
...toSpawnable(shim, argv, platform, env),
|
|
159
|
+
via: `local ${shim}`,
|
|
160
|
+
fromPath: false
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
// 3. PATH — last resort.
|
|
164
|
+
const onPath = resolveFromPath(framework, platform, env, exists);
|
|
165
|
+
searched.push(`PATH lookup for "${framework}"`);
|
|
166
|
+
if (onPath !== null) {
|
|
167
|
+
return {
|
|
168
|
+
ok: true,
|
|
169
|
+
...toSpawnable(onPath, argv, platform, env),
|
|
170
|
+
via: `PATH: ${onPath}`,
|
|
171
|
+
fromPath: true
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
return { ok: false, searched };
|
|
175
|
+
}
|
|
176
|
+
/** Actionable message for the no-runner case — never a raw ENOENT. */
|
|
177
|
+
export function formatRunnerNotFound(framework, searched) {
|
|
178
|
+
return [
|
|
179
|
+
`RUNNER_NOT_FOUND: no ${framework} runner found for this project. Looked for:`,
|
|
180
|
+
...searched.map((p) => ` - ${p}`),
|
|
181
|
+
`Install it (e.g. \`npm i -D ${framework}\`) or pass --framework <name>.`
|
|
182
|
+
].join('\n');
|
|
183
|
+
}
|
|
@@ -32,69 +32,19 @@
|
|
|
32
32
|
* peaks test --no-cache — pass --no-cache to the framework
|
|
33
33
|
* peaks test --passthrough — do NOT override the consumer's argv
|
|
34
34
|
* peaks test --framework <name> — force a specific framework
|
|
35
|
+
*
|
|
36
|
+
* The runner resolution and this file's spawn site live here; the action body
|
|
37
|
+
* it dispatches to lives in `test-command-run.ts` and the argv/probe rules in
|
|
38
|
+
* `test-command-runner-resolution.ts`.
|
|
35
39
|
*/
|
|
36
40
|
import { spawn } from 'node:child_process';
|
|
37
41
|
import type { Command } from 'commander';
|
|
38
42
|
import { type ProgramIO } from '../cli-helpers.js';
|
|
39
|
-
import {
|
|
40
|
-
|
|
41
|
-
* Build the argv for the underlying test runner. This is the SINGLE
|
|
42
|
-
* source of truth for "peaks test drops --no-cache from the
|
|
43
|
-
* consumer's script" (G7 / NG7). `--cache` is always passed
|
|
44
|
-
* unless the user explicitly opts in to `--no-cache` or `--passthrough`.
|
|
45
|
-
*/
|
|
46
|
-
export declare function buildRunnerArgv(framework: TestFramework, patterns: string[], options: {
|
|
47
|
-
all?: boolean;
|
|
48
|
-
changed?: boolean;
|
|
49
|
-
cache?: boolean;
|
|
50
|
-
passthrough?: boolean;
|
|
51
|
-
}): string[];
|
|
52
|
-
/** Successful resolution — everything `spawn` needs, plus provenance. */
|
|
53
|
-
export type RunnerFound = {
|
|
54
|
-
ok: true;
|
|
55
|
-
/** Executable to spawn: node itself, a local shim, or a PATH hit. */
|
|
56
|
-
command: string;
|
|
57
|
-
/** argv for `command` (includes the JS entry when spawning node). */
|
|
58
|
-
args: string[];
|
|
59
|
-
/** How the runner was found — named in the PATH-fallback notice. */
|
|
60
|
-
via: string;
|
|
61
|
-
/** True only for the PATH fallback, which the caller surfaces visibly. */
|
|
62
|
-
fromPath: boolean;
|
|
63
|
-
};
|
|
64
|
-
export type RunnerResolution = RunnerFound | {
|
|
65
|
-
ok: false;
|
|
66
|
-
searched: string[];
|
|
67
|
-
};
|
|
68
|
-
/** Injection seams for tests — production passes nothing. */
|
|
69
|
-
export type ResolveRunnerDeps = {
|
|
70
|
-
platform?: NodeJS.Platform;
|
|
71
|
-
existsSync?: (path: string) => boolean;
|
|
72
|
-
readFileSync?: (path: string) => string;
|
|
73
|
-
env?: NodeJS.ProcessEnv;
|
|
74
|
-
/** Node executable used to run the runner's JS entry. */
|
|
75
|
-
nodeExecPath?: string;
|
|
76
|
-
};
|
|
43
|
+
import type { TestFramework } from '../../services/test-cache/test-cache-service.js';
|
|
44
|
+
import { type ResolveRunnerDeps } from './test-command-runner-resolution.js';
|
|
77
45
|
export type RunRunnerDeps = ResolveRunnerDeps & {
|
|
78
46
|
spawnFn?: typeof spawn;
|
|
79
47
|
};
|
|
80
|
-
/**
|
|
81
|
-
* Resolve the consumer project's LOCAL runner, and the form of it that
|
|
82
|
-
* `spawn` can actually launch on this platform.
|
|
83
|
-
*
|
|
84
|
-
* Probed, in order (every probe is reported when nothing is found):
|
|
85
|
-
* 1. `<root>/node_modules/.bin/<runner>` (+ `.cmd`/`.exe` on Windows) —
|
|
86
|
-
* the project-local runner the command documents.
|
|
87
|
-
* 2. `<root>/node_modules/<runner>/package.json` → its `bin` JS entry.
|
|
88
|
-
* 3. PATH — last resort only; the caller prints a visible notice.
|
|
89
|
-
*
|
|
90
|
-
* Between 1 and 2 the **JS entry** wins: `spawn` runs it as
|
|
91
|
-
* `node <entry> …`, which is identical on Windows and POSIX and never
|
|
92
|
-
* routes argv through a shell. The `.cmd` shim is only a fallback because
|
|
93
|
-
* it needs cmd.exe to launch it (see `toSpawnable`).
|
|
94
|
-
*/
|
|
95
|
-
export declare function resolveRunner(framework: TestFramework, argv: string[], projectRoot: string, deps?: ResolveRunnerDeps): RunnerResolution;
|
|
96
|
-
/** Actionable message for the no-runner case — never a raw ENOENT. */
|
|
97
|
-
export declare function formatRunnerNotFound(framework: TestFramework, searched: string[]): string;
|
|
98
48
|
export declare function runRunner(framework: TestFramework, argv: string[], projectRoot: string, deps?: RunRunnerDeps): Promise<{
|
|
99
49
|
code: number;
|
|
100
50
|
stdout: string;
|
|
@@ -102,3 +52,5 @@ export declare function runRunner(framework: TestFramework, argv: string[], proj
|
|
|
102
52
|
notice: string | null;
|
|
103
53
|
}>;
|
|
104
54
|
export declare function registerTestCommands(program: Command, _io: ProgramIO): void;
|
|
55
|
+
export { buildRunnerArgv, formatRunnerNotFound, resolveRunner, type ResolveRunnerDeps, type RunnerFound, type RunnerResolution } from './test-command-runner-resolution.js';
|
|
56
|
+
export type { TestOptions } from './test-command-run-helpers.js';
|