muonroi-cli 1.8.1 → 1.8.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/LICENSE +5 -17
- package/README.md +20 -9
- package/dist/src/generated/version.d.ts +1 -1
- package/dist/src/generated/version.js +1 -1
- package/dist/src/mcp/setup-guide-text.d.ts +1 -1
- package/dist/src/mcp/setup-guide-text.js +8 -5
- package/dist/src/orchestrator/orchestrator.js +22 -13
- package/dist/src/orchestrator/tool-engine.d.ts +4 -0
- package/dist/src/orchestrator/tool-engine.js +49 -0
- package/dist/src/ui/use-app-logic.js +0 -0
- package/dist/src/utils/install-manager.d.ts +1 -0
- package/dist/src/utils/install-manager.js +41 -10
- package/dist/src/utils/update-checker.js +12 -2
- package/package.json +9 -2
- package/dist/src/__test-helpers__/catalog-fixtures.d.ts +0 -22
- package/dist/src/__test-helpers__/catalog-fixtures.js +0 -55
- package/dist/src/__test-stubs__/ee-server.d.ts +0 -27
- package/dist/src/__test-stubs__/ee-server.js +0 -138
- package/dist/src/__test-stubs__/vitest-setup.d.ts +0 -1
- package/dist/src/__test-stubs__/vitest-setup.js +0 -38
- package/dist/src/__tests__/council/bubble-layout.test.d.ts +0 -1
- package/dist/src/__tests__/council/bubble-layout.test.js +0 -39
- package/dist/src/__tests__/council/code-block-truncate.test.d.ts +0 -1
- package/dist/src/__tests__/council/code-block-truncate.test.js +0 -45
- package/dist/src/__tests__/council/role-palette.test.d.ts +0 -1
- package/dist/src/__tests__/council/role-palette.test.js +0 -59
- package/dist/src/__tests__/first-run-wizard.test.d.ts +0 -1
- package/dist/src/__tests__/first-run-wizard.test.js +0 -9
- package/dist/src/agent-harness/__tests__/cli-flags.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/cli-flags.spec.js +0 -33
- package/dist/src/agent-harness/__tests__/driver.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/driver.spec.js +0 -141
- package/dist/src/agent-harness/__tests__/idle.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/idle.spec.js +0 -84
- package/dist/src/agent-harness/__tests__/mock-llm.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/mock-llm.spec.js +0 -91
- package/dist/src/agent-harness/__tests__/mock-model.spec.d.ts +0 -5
- package/dist/src/agent-harness/__tests__/mock-model.spec.js +0 -270
- package/dist/src/agent-harness/__tests__/predicate.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/predicate.spec.js +0 -27
- package/dist/src/agent-harness/__tests__/protocol.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/protocol.spec.js +0 -56
- package/dist/src/agent-harness/__tests__/schema.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/schema.spec.js +0 -76
- package/dist/src/agent-harness/__tests__/selector.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/selector.spec.js +0 -70
- package/dist/src/agent-harness/__tests__/sidechannel.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/sidechannel.spec.js +0 -29
- package/dist/src/agent-harness/__tests__/spec-helpers.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/spec-helpers.spec.js +0 -68
- package/dist/src/chat/__tests__/broadcast-bus.test.d.ts +0 -1
- package/dist/src/chat/__tests__/broadcast-bus.test.js +0 -81
- package/dist/src/chat/__tests__/channel-manager.test.d.ts +0 -1
- package/dist/src/chat/__tests__/channel-manager.test.js +0 -133
- package/dist/src/chat/__tests__/client.test.d.ts +0 -1
- package/dist/src/chat/__tests__/client.test.js +0 -109
- package/dist/src/chat/__tests__/discord-integration.test.d.ts +0 -1
- package/dist/src/chat/__tests__/discord-integration.test.js +0 -153
- package/dist/src/chat/__tests__/intent-prompt.test.d.ts +0 -1
- package/dist/src/chat/__tests__/intent-prompt.test.js +0 -80
- package/dist/src/chat/__tests__/verdict-resolver.test.d.ts +0 -1
- package/dist/src/chat/__tests__/verdict-resolver.test.js +0 -308
- package/dist/src/cli/__tests__/bw-vault.test.d.ts +0 -1
- package/dist/src/cli/__tests__/bw-vault.test.js +0 -87
- package/dist/src/cli/__tests__/keys-bundle.test.d.ts +0 -1
- package/dist/src/cli/__tests__/keys-bundle.test.js +0 -40
- package/dist/src/cli/__tests__/share-cmd.test.d.ts +0 -1
- package/dist/src/cli/__tests__/share-cmd.test.js +0 -175
- package/dist/src/cli/config/__tests__/model-picker.test.d.ts +0 -1
- package/dist/src/cli/config/__tests__/model-picker.test.js +0 -56
- package/dist/src/cli/config/__tests__/provider-fetch.test.d.ts +0 -1
- package/dist/src/cli/config/__tests__/provider-fetch.test.js +0 -38
- package/dist/src/cli/cost-forensics.test.d.ts +0 -1
- package/dist/src/cli/cost-forensics.test.js +0 -223
- package/dist/src/cli/experience-report.test.d.ts +0 -5
- package/dist/src/cli/experience-report.test.js +0 -63
- package/dist/src/cli/keys.test.d.ts +0 -1
- package/dist/src/cli/keys.test.js +0 -86
- package/dist/src/council/__tests__/abort-threading.test.d.ts +0 -1
- package/dist/src/council/__tests__/abort-threading.test.js +0 -193
- package/dist/src/council/__tests__/accounting.test.d.ts +0 -1
- package/dist/src/council/__tests__/accounting.test.js +0 -66
- package/dist/src/council/__tests__/audit-replay.test.d.ts +0 -1
- package/dist/src/council/__tests__/audit-replay.test.js +0 -241
- package/dist/src/council/__tests__/clarification-prompt.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarification-prompt.test.js +0 -71
- package/dist/src/council/__tests__/clarifier-max-rounds.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-max-rounds.test.js +0 -46
- package/dist/src/council/__tests__/clarifier-options.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-options.test.js +0 -54
- package/dist/src/council/__tests__/clarifier-ready-gate.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-ready-gate.test.js +0 -265
- package/dist/src/council/__tests__/cost-aware.test.d.ts +0 -1
- package/dist/src/council/__tests__/cost-aware.test.js +0 -49
- package/dist/src/council/__tests__/council-turn-length-emit.test.d.ts +0 -1
- package/dist/src/council/__tests__/council-turn-length-emit.test.js +0 -130
- package/dist/src/council/__tests__/debate-planner-structured.test.d.ts +0 -1
- package/dist/src/council/__tests__/debate-planner-structured.test.js +0 -209
- package/dist/src/council/__tests__/debate-round-budget.test.d.ts +0 -1
- package/dist/src/council/__tests__/debate-round-budget.test.js +0 -45
- package/dist/src/council/__tests__/decisions-lock.test.d.ts +0 -6
- package/dist/src/council/__tests__/decisions-lock.test.js +0 -352
- package/dist/src/council/__tests__/evaluator-metrics.test.d.ts +0 -1
- package/dist/src/council/__tests__/evaluator-metrics.test.js +0 -463
- package/dist/src/council/__tests__/oauth-reachable.test.d.ts +0 -1
- package/dist/src/council/__tests__/oauth-reachable.test.js +0 -31
- package/dist/src/council/__tests__/parse-outcome-fallback.test.d.ts +0 -1
- package/dist/src/council/__tests__/parse-outcome-fallback.test.js +0 -114
- package/dist/src/council/__tests__/post-debate-recommendation.test.d.ts +0 -1
- package/dist/src/council/__tests__/post-debate-recommendation.test.js +0 -58
- package/dist/src/council/__tests__/research-tools.test.d.ts +0 -1
- package/dist/src/council/__tests__/research-tools.test.js +0 -214
- package/dist/src/council/__tests__/round-tools.test.d.ts +0 -1
- package/dist/src/council/__tests__/round-tools.test.js +0 -306
- package/dist/src/council/__tests__/tool-trace.test.d.ts +0 -1
- package/dist/src/council/__tests__/tool-trace.test.js +0 -131
- package/dist/src/council/__tests__/types-contract.test.d.ts +0 -9
- package/dist/src/council/__tests__/types-contract.test.js +0 -82
- package/dist/src/council/clarifier-question-cap.test.d.ts +0 -12
- package/dist/src/council/clarifier-question-cap.test.js +0 -73
- package/dist/src/daemon/scheduler.test.d.ts +0 -1
- package/dist/src/daemon/scheduler.test.js +0 -103
- package/dist/src/ee/__tests__/bb-design.test.d.ts +0 -14
- package/dist/src/ee/__tests__/bb-design.test.js +0 -180
- package/dist/src/ee/__tests__/ee-onboarding.test.d.ts +0 -1
- package/dist/src/ee/__tests__/ee-onboarding.test.js +0 -32
- package/dist/src/ee/__tests__/export-transcripts.test.d.ts +0 -11
- package/dist/src/ee/__tests__/export-transcripts.test.js +0 -200
- package/dist/src/ee/__tests__/pil-context-bridge.test.d.ts +0 -1
- package/dist/src/ee/__tests__/pil-context-bridge.test.js +0 -54
- package/dist/src/ee/__tests__/pipeline.integration.test.d.ts +0 -14
- package/dist/src/ee/__tests__/pipeline.integration.test.js +0 -151
- package/dist/src/ee/__tests__/recall-format.test.d.ts +0 -10
- package/dist/src/ee/__tests__/recall-format.test.js +0 -57
- package/dist/src/ee/__tests__/recall-ledger.test.d.ts +0 -1
- package/dist/src/ee/__tests__/recall-ledger.test.js +0 -45
- package/dist/src/ee/__tests__/render-sink-wiring.test.d.ts +0 -1
- package/dist/src/ee/__tests__/render-sink-wiring.test.js +0 -74
- package/dist/src/ee/artifact-cache.test.d.ts +0 -1
- package/dist/src/ee/artifact-cache.test.js +0 -69
- package/dist/src/ee/auth.test.d.ts +0 -1
- package/dist/src/ee/auth.test.js +0 -59
- package/dist/src/ee/bridge.test.d.ts +0 -1
- package/dist/src/ee/bridge.test.js +0 -230
- package/dist/src/ee/client.test.d.ts +0 -1
- package/dist/src/ee/client.test.js +0 -181
- package/dist/src/ee/extract-session.test.d.ts +0 -1
- package/dist/src/ee/extract-session.test.js +0 -192
- package/dist/src/ee/intercept.test.d.ts +0 -1
- package/dist/src/ee/intercept.test.js +0 -171
- package/dist/src/ee/judge.test.d.ts +0 -1
- package/dist/src/ee/judge.test.js +0 -190
- package/dist/src/ee/mistake-detector.test.d.ts +0 -1
- package/dist/src/ee/mistake-detector.test.js +0 -221
- package/dist/src/ee/offline-queue.test.d.ts +0 -1
- package/dist/src/ee/offline-queue.test.js +0 -246
- package/dist/src/ee/phase-outcome.test.d.ts +0 -1
- package/dist/src/ee/phase-outcome.test.js +0 -94
- package/dist/src/ee/phase-tracker.test.d.ts +0 -1
- package/dist/src/ee/phase-tracker.test.js +0 -142
- package/dist/src/ee/posttool.test.d.ts +0 -1
- package/dist/src/ee/posttool.test.js +0 -70
- package/dist/src/ee/prompt-stale.test.d.ts +0 -8
- package/dist/src/ee/prompt-stale.test.js +0 -76
- package/dist/src/ee/recall-mirror.test.d.ts +0 -1
- package/dist/src/ee/recall-mirror.test.js +0 -65
- package/dist/src/ee/render.test.d.ts +0 -1
- package/dist/src/ee/render.test.js +0 -63
- package/dist/src/ee/scope.test.d.ts +0 -1
- package/dist/src/ee/scope.test.js +0 -97
- package/dist/src/ee/search.test.d.ts +0 -1
- package/dist/src/ee/search.test.js +0 -23
- package/dist/src/ee/session-trajectory.test.d.ts +0 -1
- package/dist/src/ee/session-trajectory.test.js +0 -120
- package/dist/src/ee/touch.test.d.ts +0 -1
- package/dist/src/ee/touch.test.js +0 -62
- package/dist/src/ee/who-am-i.test.d.ts +0 -1
- package/dist/src/ee/who-am-i.test.js +0 -101
- package/dist/src/flow/__tests__/migration.test.d.ts +0 -1
- package/dist/src/flow/__tests__/migration.test.js +0 -105
- package/dist/src/flow/__tests__/parser.test.d.ts +0 -1
- package/dist/src/flow/__tests__/parser.test.js +0 -68
- package/dist/src/flow/__tests__/run-manager-product.test.d.ts +0 -1
- package/dist/src/flow/__tests__/run-manager-product.test.js +0 -49
- package/dist/src/flow/__tests__/run-manager.test.d.ts +0 -1
- package/dist/src/flow/__tests__/run-manager.test.js +0 -83
- package/dist/src/flow/__tests__/scaffold-checkpoint.test.d.ts +0 -1
- package/dist/src/flow/__tests__/scaffold-checkpoint.test.js +0 -93
- package/dist/src/flow/__tests__/scaffold.test.d.ts +0 -1
- package/dist/src/flow/__tests__/scaffold.test.js +0 -47
- package/dist/src/flow/__tests__/warning-persist.test.d.ts +0 -5
- package/dist/src/flow/__tests__/warning-persist.test.js +0 -96
- package/dist/src/flow/compaction/__tests__/compress.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/compress.test.js +0 -63
- package/dist/src/flow/compaction/__tests__/extract.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/extract.test.js +0 -66
- package/dist/src/flow/compaction/__tests__/preserve.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/preserve.test.js +0 -62
- package/dist/src/gsd/__tests__/gray-areas.test.d.ts +0 -1
- package/dist/src/gsd/__tests__/gray-areas.test.js +0 -29
- package/dist/src/gsd/__tests__/types.test.d.ts +0 -1
- package/dist/src/gsd/__tests__/types.test.js +0 -78
- package/dist/src/headless/__tests__/council-answers.test.d.ts +0 -1
- package/dist/src/headless/__tests__/council-answers.test.js +0 -251
- package/dist/src/headless/output.test.d.ts +0 -1
- package/dist/src/headless/output.test.js +0 -239
- package/dist/src/lsp/builtins.test.d.ts +0 -1
- package/dist/src/lsp/builtins.test.js +0 -112
- package/dist/src/lsp/client-normalize.test.d.ts +0 -12
- package/dist/src/lsp/client-normalize.test.js +0 -34
- package/dist/src/lsp/manager.test.d.ts +0 -1
- package/dist/src/lsp/manager.test.js +0 -194
- package/dist/src/lsp/npm-cache.test.d.ts +0 -1
- package/dist/src/lsp/npm-cache.test.js +0 -53
- package/dist/src/lsp/smoke.test.d.ts +0 -1
- package/dist/src/lsp/smoke.test.js +0 -56
- package/dist/src/maintain/__tests__/codebase-intel.test.d.ts +0 -5
- package/dist/src/maintain/__tests__/codebase-intel.test.js +0 -237
- package/dist/src/maintain/__tests__/gh-create-pr.test.d.ts +0 -11
- package/dist/src/maintain/__tests__/gh-create-pr.test.js +0 -160
- package/dist/src/maintain/__tests__/pr-builder.test.d.ts +0 -10
- package/dist/src/maintain/__tests__/pr-builder.test.js +0 -229
- package/dist/src/maintain/__tests__/repo-map.test.d.ts +0 -5
- package/dist/src/maintain/__tests__/repo-map.test.js +0 -90
- package/dist/src/maintain/__tests__/task-runner.test.d.ts +0 -11
- package/dist/src/maintain/__tests__/task-runner.test.js +0 -281
- package/dist/src/mcp/__tests__/auto-setup.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/auto-setup.test.js +0 -155
- package/dist/src/mcp/__tests__/cap-tool-result.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/cap-tool-result.test.js +0 -58
- package/dist/src/mcp/__tests__/client-pool.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/client-pool.spec.js +0 -169
- package/dist/src/mcp/__tests__/ee-tools.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/ee-tools.test.js +0 -226
- package/dist/src/mcp/__tests__/forensics-tools.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/forensics-tools.test.js +0 -54
- package/dist/src/mcp/__tests__/harness-driver-action-tools.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-action-tools.spec.js +0 -103
- package/dist/src/mcp/__tests__/harness-driver-async-tools.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-async-tools.spec.js +0 -112
- package/dist/src/mcp/__tests__/harness-driver-read-tools.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-read-tools.spec.js +0 -124
- package/dist/src/mcp/__tests__/harness-driver-security.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-security.spec.js +0 -61
- package/dist/src/mcp/__tests__/harness-driver.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver.spec.js +0 -20
- package/dist/src/mcp/__tests__/lazy-schema.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/lazy-schema.spec.js +0 -152
- package/dist/src/mcp/__tests__/lsp-tools.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/lsp-tools.test.js +0 -56
- package/dist/src/mcp/__tests__/mcp-keychain.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/mcp-keychain.test.js +0 -40
- package/dist/src/mcp/__tests__/parallel-build.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/parallel-build.spec.js +0 -67
- package/dist/src/mcp/__tests__/research-onboarding.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/research-onboarding.test.js +0 -148
- package/dist/src/mcp/__tests__/runtime-hydration.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/runtime-hydration.test.js +0 -78
- package/dist/src/mcp/__tests__/runtime-output-cap.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/runtime-output-cap.test.js +0 -42
- package/dist/src/mcp/__tests__/runtime-sanitize.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/runtime-sanitize.test.js +0 -40
- package/dist/src/mcp/__tests__/self-verify-jobs.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/self-verify-jobs.test.js +0 -92
- package/dist/src/mcp/__tests__/smart-filter.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/smart-filter.test.js +0 -177
- package/dist/src/mcp/__tests__/tools-server.smoke.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/tools-server.smoke.test.js +0 -42
- package/dist/src/mcp/parse-headers.test.d.ts +0 -1
- package/dist/src/mcp/parse-headers.test.js +0 -43
- package/dist/src/mcp/smoke.test.d.ts +0 -1
- package/dist/src/mcp/smoke.test.js +0 -159
- package/dist/src/models/__tests__/registry.test.d.ts +0 -1
- package/dist/src/models/__tests__/registry.test.js +0 -74
- package/dist/src/models/catalog-gemini.test.d.ts +0 -1
- package/dist/src/models/catalog-gemini.test.js +0 -48
- package/dist/src/models/catalog-url.test.d.ts +0 -1
- package/dist/src/models/catalog-url.test.js +0 -26
- package/dist/src/models/catalog-validation.test.d.ts +0 -1
- package/dist/src/models/catalog-validation.test.js +0 -63
- package/dist/src/ops/__tests__/doctor-council-mcp.test.d.ts +0 -1
- package/dist/src/ops/__tests__/doctor-council-mcp.test.js +0 -139
- package/dist/src/ops/__tests__/doctor-ee-health.test.d.ts +0 -1
- package/dist/src/ops/__tests__/doctor-ee-health.test.js +0 -134
- package/dist/src/ops/bug-report.test.d.ts +0 -1
- package/dist/src/ops/bug-report.test.js +0 -148
- package/dist/src/ops/doctor.test.d.ts +0 -1
- package/dist/src/ops/doctor.test.js +0 -97
- package/dist/src/orchestrator/__tests__/agent-base-url-switch.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/agent-base-url-switch.test.js +0 -77
- package/dist/src/orchestrator/__tests__/auto-commit.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/auto-commit.test.js +0 -142
- package/dist/src/orchestrator/__tests__/batch-turn-runner.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/batch-turn-runner.test.js +0 -164
- package/dist/src/orchestrator/__tests__/council-manager.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/council-manager.test.js +0 -148
- package/dist/src/orchestrator/__tests__/cross-turn-dedup.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/cross-turn-dedup.test.js +0 -175
- package/dist/src/orchestrator/__tests__/current-call-id.test.d.ts +0 -16
- package/dist/src/orchestrator/__tests__/current-call-id.test.js +0 -138
- package/dist/src/orchestrator/__tests__/delegations.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/delegations.test.js +0 -96
- package/dist/src/orchestrator/__tests__/error-forensics.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/error-forensics.test.js +0 -93
- package/dist/src/orchestrator/__tests__/flow-resume.test.d.ts +0 -5
- package/dist/src/orchestrator/__tests__/flow-resume.test.js +0 -61
- package/dist/src/orchestrator/__tests__/humanize-api-error.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/humanize-api-error.test.js +0 -68
- package/dist/src/orchestrator/__tests__/mcp-capability-block.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/mcp-capability-block.test.js +0 -39
- package/dist/src/orchestrator/__tests__/message-processor.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/message-processor.test.js +0 -189
- package/dist/src/orchestrator/__tests__/message-write-ahead.test.d.ts +0 -22
- package/dist/src/orchestrator/__tests__/message-write-ahead.test.js +0 -149
- package/dist/src/orchestrator/__tests__/project-stack.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/project-stack.test.js +0 -65
- package/dist/src/orchestrator/__tests__/prompts.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/prompts.test.js +0 -88
- package/dist/src/orchestrator/__tests__/read-path-budget.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/read-path-budget.test.js +0 -156
- package/dist/src/orchestrator/__tests__/retry-classifier.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/retry-classifier.test.js +0 -112
- package/dist/src/orchestrator/__tests__/retry-stream.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/retry-stream.test.js +0 -151
- package/dist/src/orchestrator/__tests__/route-feedback.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/route-feedback.test.js +0 -47
- package/dist/src/orchestrator/__tests__/stream-runner.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/stream-runner.test.js +0 -202
- package/dist/src/orchestrator/__tests__/sub-agent-model-tier.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/sub-agent-model-tier.test.js +0 -45
- package/dist/src/orchestrator/__tests__/sub-session-delegation.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/sub-session-delegation.test.js +0 -507
- package/dist/src/orchestrator/__tests__/usage-events-shape.test.d.ts +0 -8
- package/dist/src/orchestrator/__tests__/usage-events-shape.test.js +0 -58
- package/dist/src/orchestrator/__tests__/usage-normalizer-c1.test.d.ts +0 -21
- package/dist/src/orchestrator/__tests__/usage-normalizer-c1.test.js +0 -155
- package/dist/src/orchestrator/__tests__/usage-shape-threading.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/usage-shape-threading.test.js +0 -98
- package/dist/src/orchestrator/__tests__/write-ahead.test.d.ts +0 -20
- package/dist/src/orchestrator/__tests__/write-ahead.test.js +0 -134
- package/dist/src/orchestrator/abort.test.d.ts +0 -1
- package/dist/src/orchestrator/abort.test.js +0 -34
- package/dist/src/orchestrator/agent.test.d.ts +0 -1
- package/dist/src/orchestrator/agent.test.js +0 -178
- package/dist/src/orchestrator/cleanup.test.d.ts +0 -1
- package/dist/src/orchestrator/cleanup.test.js +0 -67
- package/dist/src/orchestrator/compaction.test.d.ts +0 -1
- package/dist/src/orchestrator/compaction.test.js +0 -187
- package/dist/src/orchestrator/delegations.test.d.ts +0 -1
- package/dist/src/orchestrator/delegations.test.js +0 -107
- package/dist/src/orchestrator/grounding-check.test.d.ts +0 -1
- package/dist/src/orchestrator/grounding-check.test.js +0 -94
- package/dist/src/orchestrator/interrupted-turn.test.d.ts +0 -1
- package/dist/src/orchestrator/interrupted-turn.test.js +0 -34
- package/dist/src/orchestrator/message-seq.test.d.ts +0 -1
- package/dist/src/orchestrator/message-seq.test.js +0 -24
- package/dist/src/orchestrator/pending-calls.test.d.ts +0 -1
- package/dist/src/orchestrator/pending-calls.test.js +0 -188
- package/dist/src/orchestrator/provider-options-shape.spec.d.ts +0 -1
- package/dist/src/orchestrator/provider-options-shape.spec.js +0 -63
- package/dist/src/orchestrator/reasoning.test.d.ts +0 -1
- package/dist/src/orchestrator/reasoning.test.js +0 -101
- package/dist/src/orchestrator/repetition-detector.test.d.ts +0 -1
- package/dist/src/orchestrator/repetition-detector.test.js +0 -103
- package/dist/src/orchestrator/sandbox.test.d.ts +0 -1
- package/dist/src/orchestrator/sandbox.test.js +0 -99
- package/dist/src/orchestrator/scope-ceiling.test.d.ts +0 -13
- package/dist/src/orchestrator/scope-ceiling.test.js +0 -181
- package/dist/src/orchestrator/scope-reminder.test.d.ts +0 -15
- package/dist/src/orchestrator/scope-reminder.test.js +0 -225
- package/dist/src/orchestrator/session-experience.test.d.ts +0 -6
- package/dist/src/orchestrator/session-experience.test.js +0 -72
- package/dist/src/orchestrator/stall-rescue.test.d.ts +0 -1
- package/dist/src/orchestrator/stall-rescue.test.js +0 -117
- package/dist/src/orchestrator/stall-watchdog.test.d.ts +0 -1
- package/dist/src/orchestrator/stall-watchdog.test.js +0 -153
- package/dist/src/orchestrator/steer-inbox.test.d.ts +0 -1
- package/dist/src/orchestrator/steer-inbox.test.js +0 -33
- package/dist/src/orchestrator/sub-agent-cap.test.d.ts +0 -1
- package/dist/src/orchestrator/sub-agent-cap.test.js +0 -208
- package/dist/src/orchestrator/subagent-compactor.spec.d.ts +0 -1
- package/dist/src/orchestrator/subagent-compactor.spec.js +0 -636
- package/dist/src/orchestrator/text-tool-call-detector.test.d.ts +0 -1
- package/dist/src/orchestrator/text-tool-call-detector.test.js +0 -147
- package/dist/src/orchestrator/token-counter.test.d.ts +0 -1
- package/dist/src/orchestrator/token-counter.test.js +0 -57
- package/dist/src/orchestrator/tool-args-hash.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-args-hash.test.js +0 -105
- package/dist/src/orchestrator/tool-args-repair.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-args-repair.test.js +0 -136
- package/dist/src/orchestrator/tool-loop-askcard.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-loop-askcard.test.js +0 -71
- package/dist/src/orchestrator/tool-loop-cap.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-loop-cap.test.js +0 -176
- package/dist/src/orchestrator/tool-repetition-detector.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-repetition-detector.test.js +0 -101
- package/dist/src/pil/__tests__/budget.test.d.ts +0 -1
- package/dist/src/pil/__tests__/budget.test.js +0 -33
- package/dist/src/pil/__tests__/clarity-gate.test.d.ts +0 -1
- package/dist/src/pil/__tests__/clarity-gate.test.js +0 -37
- package/dist/src/pil/__tests__/config.test.d.ts +0 -1
- package/dist/src/pil/__tests__/config.test.js +0 -57
- package/dist/src/pil/__tests__/discovery-cache.test.d.ts +0 -1
- package/dist/src/pil/__tests__/discovery-cache.test.js +0 -38
- package/dist/src/pil/__tests__/discovery-types.test.d.ts +0 -1
- package/dist/src/pil/__tests__/discovery-types.test.js +0 -65
- package/dist/src/pil/__tests__/discovery.test.d.ts +0 -1
- package/dist/src/pil/__tests__/discovery.test.js +0 -178
- package/dist/src/pil/__tests__/dual-run.test.d.ts +0 -1
- package/dist/src/pil/__tests__/dual-run.test.js +0 -51
- package/dist/src/pil/__tests__/layer1-intent-trace.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer1-intent-trace.test.js +0 -138
- package/dist/src/pil/__tests__/layer1-intent.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer1-intent.test.js +0 -329
- package/dist/src/pil/__tests__/layer15-context-scan.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer15-context-scan.test.js +0 -64
- package/dist/src/pil/__tests__/layer16-clarity.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer16-clarity.test.js +0 -72
- package/dist/src/pil/__tests__/layer17-feasibility.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer17-feasibility.test.js +0 -36
- package/dist/src/pil/__tests__/layer18-acceptance.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer18-acceptance.test.js +0 -18
- package/dist/src/pil/__tests__/layer2-personality.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer2-personality.test.js +0 -57
- package/dist/src/pil/__tests__/layer2_5-ponytail.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer2_5-ponytail.test.js +0 -53
- package/dist/src/pil/__tests__/layer3-ee-injection.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer3-ee-injection.test.js +0 -221
- package/dist/src/pil/__tests__/layer3-injected-chunk.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer3-injected-chunk.test.js +0 -134
- package/dist/src/pil/__tests__/layer4-gsd.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer4-gsd.test.js +0 -191
- package/dist/src/pil/__tests__/layer5-context.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer5-context.test.js +0 -175
- package/dist/src/pil/__tests__/layer6-output.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer6-output.test.js +0 -465
- package/dist/src/pil/__tests__/llm-classify.test.d.ts +0 -1
- package/dist/src/pil/__tests__/llm-classify.test.js +0 -275
- package/dist/src/pil/__tests__/native-capabilities-workbook.test.d.ts +0 -1
- package/dist/src/pil/__tests__/native-capabilities-workbook.test.js +0 -40
- package/dist/src/pil/__tests__/ollama-classify.test.d.ts +0 -1
- package/dist/src/pil/__tests__/ollama-classify.test.js +0 -68
- package/dist/src/pil/__tests__/orchestrator-integration.test.d.ts +0 -10
- package/dist/src/pil/__tests__/orchestrator-integration.test.js +0 -100
- package/dist/src/pil/__tests__/pipeline.test.d.ts +0 -1
- package/dist/src/pil/__tests__/pipeline.test.js +0 -188
- package/dist/src/pil/__tests__/renderer-coverage.test.d.ts +0 -7
- package/dist/src/pil/__tests__/renderer-coverage.test.js +0 -42
- package/dist/src/pil/__tests__/response-tools.test.d.ts +0 -1
- package/dist/src/pil/__tests__/response-tools.test.js +0 -242
- package/dist/src/pil/__tests__/schema.test.d.ts +0 -1
- package/dist/src/pil/__tests__/schema.test.js +0 -202
- package/dist/src/pil/__tests__/scoreComplexity.test.d.ts +0 -1
- package/dist/src/pil/__tests__/scoreComplexity.test.js +0 -119
- package/dist/src/pil/__tests__/scoreSufficiency.test.d.ts +0 -8
- package/dist/src/pil/__tests__/scoreSufficiency.test.js +0 -89
- package/dist/src/pil/__tests__/store.test.d.ts +0 -1
- package/dist/src/pil/__tests__/store.test.js +0 -44
- package/dist/src/pil/__tests__/surface-compaction-artifacts.test.d.ts +0 -1
- package/dist/src/pil/__tests__/surface-compaction-artifacts.test.js +0 -112
- package/dist/src/pil/__tests__/task-tier-map.test.d.ts +0 -1
- package/dist/src/pil/__tests__/task-tier-map.test.js +0 -33
- package/dist/src/pil/agent-operating-contract.test.d.ts +0 -1
- package/dist/src/pil/agent-operating-contract.test.js +0 -80
- package/dist/src/pil/cheap-model-playbook.test.d.ts +0 -1
- package/dist/src/pil/cheap-model-playbook.test.js +0 -160
- package/dist/src/pil/cheap-model-workbooks.test.d.ts +0 -1
- package/dist/src/pil/cheap-model-workbooks.test.js +0 -129
- package/dist/src/pil/layer1-intent.test.d.ts +0 -1
- package/dist/src/pil/layer1-intent.test.js +0 -764
- package/dist/src/pil/layer1_5-complexity-size.test.d.ts +0 -10
- package/dist/src/pil/layer1_5-complexity-size.test.js +0 -248
- package/dist/src/pil/session-experience-injection.test.d.ts +0 -6
- package/dist/src/pil/session-experience-injection.test.js +0 -79
- package/dist/src/pil/session-state.test.d.ts +0 -1
- package/dist/src/pil/session-state.test.js +0 -73
- package/dist/src/playbook/__tests__/directives.test.d.ts +0 -1
- package/dist/src/playbook/__tests__/directives.test.js +0 -115
- package/dist/src/product-loop/__tests__/artifact-io.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/artifact-io.test.js +0 -83
- package/dist/src/product-loop/__tests__/assumption-ledger.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/assumption-ledger.test.js +0 -261
- package/dist/src/product-loop/__tests__/backlog-builder.test.d.ts +0 -10
- package/dist/src/product-loop/__tests__/backlog-builder.test.js +0 -175
- package/dist/src/product-loop/__tests__/backlog-store.test.d.ts +0 -4
- package/dist/src/product-loop/__tests__/backlog-store.test.js +0 -96
- package/dist/src/product-loop/__tests__/cb2-retry-bonus.test.d.ts +0 -13
- package/dist/src/product-loop/__tests__/cb2-retry-bonus.test.js +0 -158
- package/dist/src/product-loop/__tests__/circuit-breakers-coverage.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/circuit-breakers-coverage.test.js +0 -67
- package/dist/src/product-loop/__tests__/circuit-breakers.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/circuit-breakers.test.js +0 -79
- package/dist/src/product-loop/__tests__/complexity-routing.spec.d.ts +0 -11
- package/dist/src/product-loop/__tests__/complexity-routing.spec.js +0 -240
- package/dist/src/product-loop/__tests__/context-policy.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/context-policy.test.js +0 -266
- package/dist/src/product-loop/__tests__/cost-preview.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/cost-preview.test.js +0 -111
- package/dist/src/product-loop/__tests__/cost-scoper.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/cost-scoper.test.js +0 -50
- package/dist/src/product-loop/__tests__/cross-run-memory.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/cross-run-memory.test.js +0 -168
- package/dist/src/product-loop/__tests__/design-output.spec.d.ts +0 -1
- package/dist/src/product-loop/__tests__/design-output.spec.js +0 -36
- package/dist/src/product-loop/__tests__/discover.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discover.test.js +0 -83
- package/dist/src/product-loop/__tests__/discovery-context-format.test.d.ts +0 -13
- package/dist/src/product-loop/__tests__/discovery-context-format.test.js +0 -100
- package/dist/src/product-loop/__tests__/discovery-council-runner.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-council-runner.test.js +0 -13
- package/dist/src/product-loop/__tests__/discovery-detection.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-detection.test.js +0 -151
- package/dist/src/product-loop/__tests__/discovery-ecosystem.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/discovery-ecosystem.test.js +0 -209
- package/dist/src/product-loop/__tests__/discovery-integration.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-integration.test.js +0 -126
- package/dist/src/product-loop/__tests__/discovery-interview.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-interview.test.js +0 -394
- package/dist/src/product-loop/__tests__/discovery-migrations.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-migrations.test.js +0 -69
- package/dist/src/product-loop/__tests__/discovery-persistence.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-persistence.test.js +0 -146
- package/dist/src/product-loop/__tests__/discovery-prompt-parser.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-prompt-parser.test.js +0 -65
- package/dist/src/product-loop/__tests__/discovery-prompt-specificity.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-prompt-specificity.test.js +0 -55
- package/dist/src/product-loop/__tests__/discovery-recommender-ecosystem.test.d.ts +0 -9
- package/dist/src/product-loop/__tests__/discovery-recommender-ecosystem.test.js +0 -178
- package/dist/src/product-loop/__tests__/discovery-recommender.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-recommender.test.js +0 -316
- package/dist/src/product-loop/__tests__/discovery-schema.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-schema.test.js +0 -77
- package/dist/src/product-loop/__tests__/done-gate-coverage.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/done-gate-coverage.test.js +0 -135
- package/dist/src/product-loop/__tests__/done-gate.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/done-gate.test.js +0 -122
- package/dist/src/product-loop/__tests__/ee-extract-wiring.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/ee-extract-wiring.test.js +0 -186
- package/dist/src/product-loop/__tests__/extract-to-ee.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/extract-to-ee.test.js +0 -161
- package/dist/src/product-loop/__tests__/feedback-routing.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/feedback-routing.test.js +0 -83
- package/dist/src/product-loop/__tests__/gather-selectable-alts.test.d.ts +0 -15
- package/dist/src/product-loop/__tests__/gather-selectable-alts.test.js +0 -143
- package/dist/src/product-loop/__tests__/hot-path.spec.d.ts +0 -11
- package/dist/src/product-loop/__tests__/hot-path.spec.js +0 -146
- package/dist/src/product-loop/__tests__/integration.test.d.ts +0 -7
- package/dist/src/product-loop/__tests__/integration.test.js +0 -301
- package/dist/src/product-loop/__tests__/loop-driver-audit.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/loop-driver-audit.test.js +0 -269
- package/dist/src/product-loop/__tests__/loop-driver.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/loop-driver.test.js +0 -225
- package/dist/src/product-loop/__tests__/maintenance-task-synthesis.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/maintenance-task-synthesis.test.js +0 -67
- package/dist/src/product-loop/__tests__/phase-a1-a3-sprint-runner.test.d.ts +0 -13
- package/dist/src/product-loop/__tests__/phase-a1-a3-sprint-runner.test.js +0 -268
- package/dist/src/product-loop/__tests__/phase-a2-backlog-build.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/phase-a2-backlog-build.test.js +0 -162
- package/dist/src/product-loop/__tests__/phase-budget.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-budget.test.js +0 -149
- package/dist/src/product-loop/__tests__/phase-orchestrator-integration.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-orchestrator-integration.test.js +0 -138
- package/dist/src/product-loop/__tests__/phase-plan.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-plan.test.js +0 -208
- package/dist/src/product-loop/__tests__/phase-rituals.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-rituals.test.js +0 -174
- package/dist/src/product-loop/__tests__/phase-runner.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-runner.test.js +0 -414
- package/dist/src/product-loop/__tests__/phase-tracker-bridge.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-tracker-bridge.test.js +0 -67
- package/dist/src/product-loop/__tests__/pick-backend-stack.test.d.ts +0 -11
- package/dist/src/product-loop/__tests__/pick-backend-stack.test.js +0 -95
- package/dist/src/product-loop/__tests__/product-identity.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/product-identity.test.js +0 -40
- package/dist/src/product-loop/__tests__/progress-snapshot.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/progress-snapshot.test.js +0 -152
- package/dist/src/product-loop/__tests__/reality-anchor.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/reality-anchor.test.js +0 -49
- package/dist/src/product-loop/__tests__/repo-audit.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/repo-audit.test.js +0 -97
- package/dist/src/product-loop/__tests__/repo-brief.test.d.ts +0 -9
- package/dist/src/product-loop/__tests__/repo-brief.test.js +0 -132
- package/dist/src/product-loop/__tests__/role-memory.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/role-memory.test.js +0 -56
- package/dist/src/product-loop/__tests__/role-registry.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/role-registry.test.js +0 -222
- package/dist/src/product-loop/__tests__/role-routing-ee.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/role-routing-ee.test.js +0 -79
- package/dist/src/product-loop/__tests__/route-decision-emit.test.d.ts +0 -10
- package/dist/src/product-loop/__tests__/route-decision-emit.test.js +0 -222
- package/dist/src/product-loop/__tests__/seed-questions.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/seed-questions.test.js +0 -30
- package/dist/src/product-loop/__tests__/ship-polish.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/ship-polish.test.js +0 -96
- package/dist/src/product-loop/__tests__/sprint-planner.test.d.ts +0 -6
- package/dist/src/product-loop/__tests__/sprint-planner.test.js +0 -140
- package/dist/src/product-loop/__tests__/sprint-runner-backlog.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/sprint-runner-backlog.test.js +0 -221
- package/dist/src/product-loop/__tests__/sprint-runner-emit.test.d.ts +0 -14
- package/dist/src/product-loop/__tests__/sprint-runner-emit.test.js +0 -279
- package/dist/src/product-loop/__tests__/sprint-runner-phase-chunks.test.d.ts +0 -14
- package/dist/src/product-loop/__tests__/sprint-runner-phase-chunks.test.js +0 -193
- package/dist/src/product-loop/__tests__/sprint-runner.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/sprint-runner.test.js +0 -432
- package/dist/src/product-loop/__tests__/sprint-self-verify.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/sprint-self-verify.test.js +0 -73
- package/dist/src/product-loop/__tests__/sprint-store.test.d.ts +0 -7
- package/dist/src/product-loop/__tests__/sprint-store.test.js +0 -84
- package/dist/src/product-loop/__tests__/stakeholder-acl.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/stakeholder-acl.test.js +0 -83
- package/dist/src/product-loop/__tests__/state-md-ee-injections.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/state-md-ee-injections.test.js +0 -182
- package/dist/src/product-loop/__tests__/sufficiency-routing.spec.d.ts +0 -12
- package/dist/src/product-loop/__tests__/sufficiency-routing.spec.js +0 -140
- package/dist/src/product-loop/__tests__/typed-artifacts.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/typed-artifacts.test.js +0 -222
- package/dist/src/product-loop/__tests__/types.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/types.test.js +0 -79
- package/dist/src/product-loop/__tests__/verify-failure-threshold.test.d.ts +0 -9
- package/dist/src/product-loop/__tests__/verify-failure-threshold.test.js +0 -146
- package/dist/src/product-loop/__tests__/verify-failure-tracking.test.d.ts +0 -4
- package/dist/src/product-loop/__tests__/verify-failure-tracking.test.js +0 -122
- package/dist/src/product-loop/__tests__/verify-result.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/verify-result.test.js +0 -53
- package/dist/src/providers/__tests__/adapter-oauth-wiring.test.d.ts +0 -8
- package/dist/src/providers/__tests__/adapter-oauth-wiring.test.js +0 -125
- package/dist/src/providers/__tests__/capabilities-cosmetic.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-cosmetic.test.js +0 -109
- package/dist/src/providers/__tests__/capabilities-flags.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-flags.test.js +0 -145
- package/dist/src/providers/__tests__/capabilities-provider-options.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-provider-options.test.js +0 -201
- package/dist/src/providers/__tests__/capabilities-sanitize.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-sanitize.test.js +0 -60
- package/dist/src/providers/__tests__/capabilities.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities.test.js +0 -41
- package/dist/src/providers/__tests__/provider-coverage.test.d.ts +0 -1
- package/dist/src/providers/__tests__/provider-coverage.test.js +0 -45
- package/dist/src/providers/__tests__/reasoning-roundtrip.test.d.ts +0 -1
- package/dist/src/providers/__tests__/reasoning-roundtrip.test.js +0 -216
- package/dist/src/providers/__tests__/runtime-integration.test.d.ts +0 -1
- package/dist/src/providers/__tests__/runtime-integration.test.js +0 -93
- package/dist/src/providers/__tests__/runtime.test.d.ts +0 -1
- package/dist/src/providers/__tests__/runtime.test.js +0 -80
- package/dist/src/providers/__tests__/siliconflow-sse-repair.test.d.ts +0 -1
- package/dist/src/providers/__tests__/siliconflow-sse-repair.test.js +0 -267
- package/dist/src/providers/__tests__/strategies-registry.test.d.ts +0 -8
- package/dist/src/providers/__tests__/strategies-registry.test.js +0 -49
- package/dist/src/providers/__tests__/strategies-resolve.test.d.ts +0 -12
- package/dist/src/providers/__tests__/strategies-resolve.test.js +0 -128
- package/dist/src/providers/__tests__/wire-debug.test.d.ts +0 -1
- package/dist/src/providers/__tests__/wire-debug.test.js +0 -39
- package/dist/src/providers/adapter.test.d.ts +0 -1
- package/dist/src/providers/adapter.test.js +0 -19
- package/dist/src/providers/auth/__tests__/browser-flow.test.d.ts +0 -8
- package/dist/src/providers/auth/__tests__/browser-flow.test.js +0 -186
- package/dist/src/providers/auth/__tests__/device-flow.test.d.ts +0 -6
- package/dist/src/providers/auth/__tests__/device-flow.test.js +0 -219
- package/dist/src/providers/auth/__tests__/gemini-oauth.test.d.ts +0 -4
- package/dist/src/providers/auth/__tests__/gemini-oauth.test.js +0 -306
- package/dist/src/providers/auth/__tests__/grok-oauth.test.d.ts +0 -8
- package/dist/src/providers/auth/__tests__/grok-oauth.test.js +0 -236
- package/dist/src/providers/auth/__tests__/openai-oauth.test.d.ts +0 -7
- package/dist/src/providers/auth/__tests__/openai-oauth.test.js +0 -309
- package/dist/src/providers/auth/__tests__/token-store.test.d.ts +0 -7
- package/dist/src/providers/auth/__tests__/token-store.test.js +0 -125
- package/dist/src/providers/errors.test.d.ts +0 -1
- package/dist/src/providers/errors.test.js +0 -66
- package/dist/src/providers/gemini.test.d.ts +0 -1
- package/dist/src/providers/gemini.test.js +0 -37
- package/dist/src/providers/keychain.test.d.ts +0 -1
- package/dist/src/providers/keychain.test.js +0 -84
- package/dist/src/providers/mcp-vision-bridge.test.d.ts +0 -1
- package/dist/src/providers/mcp-vision-bridge.test.js +0 -381
- package/dist/src/providers/ollama.test.d.ts +0 -1
- package/dist/src/providers/ollama.test.js +0 -37
- package/dist/src/providers/openai-compatible.test.d.ts +0 -1
- package/dist/src/providers/openai-compatible.test.js +0 -53
- package/dist/src/providers/openai.test.d.ts +0 -1
- package/dist/src/providers/openai.test.js +0 -53
- package/dist/src/providers/pricing.test.d.ts +0 -1
- package/dist/src/providers/pricing.test.js +0 -81
- package/dist/src/providers/prompt-cache-key.spec.d.ts +0 -5
- package/dist/src/providers/prompt-cache-key.spec.js +0 -24
- package/dist/src/providers/runtime-mock.spec.d.ts +0 -8
- package/dist/src/providers/runtime-mock.spec.js +0 -69
- package/dist/src/providers/vision-proxy.test.d.ts +0 -1
- package/dist/src/providers/vision-proxy.test.js +0 -212
- package/dist/src/reporter/__tests__/acl-check.test.d.ts +0 -6
- package/dist/src/reporter/__tests__/acl-check.test.js +0 -59
- package/dist/src/reporter/__tests__/auto-fire.test.d.ts +0 -10
- package/dist/src/reporter/__tests__/auto-fire.test.js +0 -140
- package/dist/src/reporter/__tests__/budget.test.d.ts +0 -7
- package/dist/src/reporter/__tests__/budget.test.js +0 -60
- package/dist/src/reporter/__tests__/handlers.test.d.ts +0 -7
- package/dist/src/reporter/__tests__/handlers.test.js +0 -163
- package/dist/src/reporter/__tests__/query-router.test.d.ts +0 -6
- package/dist/src/reporter/__tests__/query-router.test.js +0 -90
- package/dist/src/router/__tests__/step-router.test.d.ts +0 -4
- package/dist/src/router/__tests__/step-router.test.js +0 -131
- package/dist/src/router/classifier/index.test.d.ts +0 -1
- package/dist/src/router/classifier/index.test.js +0 -29
- package/dist/src/router/classifier/regex.test.d.ts +0 -1
- package/dist/src/router/classifier/regex.test.js +0 -44
- package/dist/src/router/classifier/tree-sitter.test.d.ts +0 -1
- package/dist/src/router/classifier/tree-sitter.test.js +0 -23
- package/dist/src/router/cold.test.d.ts +0 -1
- package/dist/src/router/cold.test.js +0 -56
- package/dist/src/router/decide.test.d.ts +0 -1
- package/dist/src/router/decide.test.js +0 -198
- package/dist/src/router/health.test.d.ts +0 -1
- package/dist/src/router/health.test.js +0 -52
- package/dist/src/router/provider-sentinel.test.d.ts +0 -1
- package/dist/src/router/provider-sentinel.test.js +0 -20
- package/dist/src/router/role-override.test.d.ts +0 -1
- package/dist/src/router/role-override.test.js +0 -26
- package/dist/src/router/warm.test.d.ts +0 -1
- package/dist/src/router/warm.test.js +0 -202
- package/dist/src/scaffold/__tests__/continuation-prompt.test.d.ts +0 -4
- package/dist/src/scaffold/__tests__/continuation-prompt.test.js +0 -79
- package/dist/src/scaffold/__tests__/continue-as-council.spec.d.ts +0 -10
- package/dist/src/scaffold/__tests__/continue-as-council.spec.js +0 -102
- package/dist/src/scaffold/__tests__/dotnet-assembly-name.test.d.ts +0 -1
- package/dist/src/scaffold/__tests__/dotnet-assembly-name.test.js +0 -27
- package/dist/src/scaffold/__tests__/fe-scaffold-contents.test.d.ts +0 -1
- package/dist/src/scaffold/__tests__/fe-scaffold-contents.test.js +0 -106
- package/dist/src/scaffold/__tests__/init-new.smoke.spec.d.ts +0 -15
- package/dist/src/scaffold/__tests__/init-new.smoke.spec.js +0 -81
- package/dist/src/scaffold/__tests__/init-new.spec.d.ts +0 -5
- package/dist/src/scaffold/__tests__/init-new.spec.js +0 -378
- package/dist/src/scaffold/__tests__/install-bb-templates.spec.d.ts +0 -1
- package/dist/src/scaffold/__tests__/install-bb-templates.spec.js +0 -77
- package/dist/src/scaffold/__tests__/point-to-existing.spec.d.ts +0 -7
- package/dist/src/scaffold/__tests__/point-to-existing.spec.js +0 -94
- package/dist/src/self-qa/__tests__/agentic-context.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/agentic-context.test.js +0 -98
- package/dist/src/self-qa/__tests__/agentic-loop.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/agentic-loop.test.js +0 -62
- package/dist/src/self-qa/__tests__/delta-encoder.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/delta-encoder.test.js +0 -97
- package/dist/src/self-qa/__tests__/judge.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/judge.test.js +0 -131
- package/dist/src/self-qa/__tests__/scenario-planner.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/scenario-planner.test.js +0 -79
- package/dist/src/self-qa/__tests__/spec-emitter.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/spec-emitter.test.js +0 -62
- package/dist/src/storage/__tests__/hierarchical-session.test.d.ts +0 -1
- package/dist/src/storage/__tests__/hierarchical-session.test.js +0 -161
- package/dist/src/storage/__tests__/migrations.test.d.ts +0 -12
- package/dist/src/storage/__tests__/migrations.test.js +0 -357
- package/dist/src/storage/__tests__/sweep-stale-pending.test.d.ts +0 -10
- package/dist/src/storage/__tests__/sweep-stale-pending.test.js +0 -97
- package/dist/src/storage/__tests__/ui-interaction-log.test.d.ts +0 -7
- package/dist/src/storage/__tests__/ui-interaction-log.test.js +0 -127
- package/dist/src/storage/atomic-io.test.d.ts +0 -1
- package/dist/src/storage/atomic-io.test.js +0 -74
- package/dist/src/storage/config.test.d.ts +0 -1
- package/dist/src/storage/config.test.js +0 -29
- package/dist/src/storage/session-experience-store.test.d.ts +0 -5
- package/dist/src/storage/session-experience-store.test.js +0 -86
- package/dist/src/storage/tool-results.test.d.ts +0 -1
- package/dist/src/storage/tool-results.test.js +0 -48
- package/dist/src/storage/transcript-response-entry.test.d.ts +0 -1
- package/dist/src/storage/transcript-response-entry.test.js +0 -111
- package/dist/src/storage/transcript.test.d.ts +0 -1
- package/dist/src/storage/transcript.test.js +0 -22
- package/dist/src/storage/usage-cap.test.d.ts +0 -1
- package/dist/src/storage/usage-cap.test.js +0 -51
- package/dist/src/tools/__tests__/native-tools.test.d.ts +0 -1
- package/dist/src/tools/__tests__/native-tools.test.js +0 -59
- package/dist/src/tools/__tests__/vision-gate.test.d.ts +0 -1
- package/dist/src/tools/__tests__/vision-gate.test.js +0 -56
- package/dist/src/tools/bash-output-cache.test.d.ts +0 -1
- package/dist/src/tools/bash-output-cache.test.js +0 -89
- package/dist/src/tools/bash-output-integration.test.d.ts +0 -10
- package/dist/src/tools/bash-output-integration.test.js +0 -30
- package/dist/src/tools/bash.test.d.ts +0 -1
- package/dist/src/tools/bash.test.js +0 -90
- package/dist/src/tools/computer.test.d.ts +0 -1
- package/dist/src/tools/computer.test.js +0 -142
- package/dist/src/tools/file-tracker.test.d.ts +0 -1
- package/dist/src/tools/file-tracker.test.js +0 -77
- package/dist/src/tools/file.test.d.ts +0 -1
- package/dist/src/tools/file.test.js +0 -106
- package/dist/src/tools/git-safety.test.d.ts +0 -1
- package/dist/src/tools/git-safety.test.js +0 -155
- package/dist/src/tools/registry-bash-empty-command.test.d.ts +0 -13
- package/dist/src/tools/registry-bash-empty-command.test.js +0 -57
- package/dist/src/tools/registry-bash-footer.test.d.ts +0 -7
- package/dist/src/tools/registry-bash-footer.test.js +0 -82
- package/dist/src/tools/registry-ee-query.test.d.ts +0 -11
- package/dist/src/tools/registry-ee-query.test.js +0 -71
- package/dist/src/tools/registry-git-safety.test.d.ts +0 -7
- package/dist/src/tools/registry-git-safety.test.js +0 -103
- package/dist/src/tools/registry-session-repeat.test.d.ts +0 -12
- package/dist/src/tools/registry-session-repeat.test.js +0 -87
- package/dist/src/tools/registry.test.d.ts +0 -1
- package/dist/src/tools/registry.test.js +0 -34
- package/dist/src/tools/schedule.test.d.ts +0 -1
- package/dist/src/tools/schedule.test.js +0 -118
- package/dist/src/tools/todo-write-snapshot.test.d.ts +0 -1
- package/dist/src/tools/todo-write-snapshot.test.js +0 -43
- package/dist/src/ui/__tests__/markdown-render.test.d.ts +0 -1
- package/dist/src/ui/__tests__/markdown-render.test.js +0 -65
- package/dist/src/ui/__tests__/picker-providers.test.d.ts +0 -1
- package/dist/src/ui/__tests__/picker-providers.test.js +0 -31
- package/dist/src/ui/cards/__tests__/product-status-card.test.d.ts +0 -1
- package/dist/src/ui/cards/__tests__/product-status-card.test.js +0 -27
- package/dist/src/ui/components/__tests__/council-leader-bubble.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-leader-bubble.test.js +0 -14
- package/dist/src/ui/components/__tests__/council-message-bubble.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-message-bubble.test.js +0 -74
- package/dist/src/ui/components/__tests__/council-phase-timeline.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-phase-timeline.test.js +0 -51
- package/dist/src/ui/components/__tests__/council-placeholder-bubble.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-placeholder-bubble.test.js +0 -14
- package/dist/src/ui/components/__tests__/council-question-card.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-question-card.test.js +0 -121
- package/dist/src/ui/components/__tests__/council-synthesis-banner.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-synthesis-banner.test.js +0 -11
- package/dist/src/ui/components/__tests__/task-list-panel.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/task-list-panel.test.js +0 -31
- package/dist/src/ui/components/__tests__/use-pair-quote-buffer.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/use-pair-quote-buffer.test.js +0 -37
- package/dist/src/ui/slash/__tests__/clear.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/clear.test.js +0 -58
- package/dist/src/ui/slash/__tests__/compact.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/compact.test.js +0 -43
- package/dist/src/ui/slash/__tests__/cost.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/cost.test.js +0 -54
- package/dist/src/ui/slash/__tests__/discuss.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/discuss.test.js +0 -83
- package/dist/src/ui/slash/__tests__/execute.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/execute.test.js +0 -71
- package/dist/src/ui/slash/__tests__/expand.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/expand.test.js +0 -67
- package/dist/src/ui/slash/__tests__/ideal.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/ideal.test.js +0 -158
- package/dist/src/ui/slash/__tests__/menu-parity.test.d.ts +0 -17
- package/dist/src/ui/slash/__tests__/menu-parity.test.js +0 -43
- package/dist/src/ui/slash/__tests__/optimize.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/optimize.test.js +0 -130
- package/dist/src/ui/slash/__tests__/pin.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/pin.test.js +0 -38
- package/dist/src/ui/slash/__tests__/plan.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/plan.test.js +0 -82
- package/dist/src/ui/slash/__tests__/ponytail.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/ponytail.test.js +0 -37
- package/dist/src/ui/slash/__tests__/status-render.test.d.ts +0 -7
- package/dist/src/ui/slash/__tests__/status-render.test.js +0 -77
- package/dist/src/ui/slash/route.test.d.ts +0 -1
- package/dist/src/ui/slash/route.test.js +0 -70
- package/dist/src/ui/status-bar/index.test.d.ts +0 -1
- package/dist/src/ui/status-bar/index.test.js +0 -139
- package/dist/src/ui/status-bar/store.test.d.ts +0 -1
- package/dist/src/ui/status-bar/store.test.js +0 -116
- package/dist/src/ui/status-bar/tier-badge.test.d.ts +0 -1
- package/dist/src/ui/status-bar/tier-badge.test.js +0 -34
- package/dist/src/ui/status-bar/usd-meter.test.d.ts +0 -1
- package/dist/src/ui/status-bar/usd-meter.test.js +0 -32
- package/dist/src/ui/utils/__tests__/format.test.d.ts +0 -1
- package/dist/src/ui/utils/__tests__/format.test.js +0 -50
- package/dist/src/ui/utils/__tests__/tools.test.d.ts +0 -1
- package/dist/src/ui/utils/__tests__/tools.test.js +0 -48
- package/dist/src/ui/utils/relaunch.test.d.ts +0 -1
- package/dist/src/ui/utils/relaunch.test.js +0 -133
- package/dist/src/ui/utils/text.test.d.ts +0 -1
- package/dist/src/ui/utils/text.test.js +0 -47
- package/dist/src/usage/__tests__/product-ledger.test.d.ts +0 -1
- package/dist/src/usage/__tests__/product-ledger.test.js +0 -60
- package/dist/src/usage/downgrade.test.d.ts +0 -1
- package/dist/src/usage/downgrade.test.js +0 -70
- package/dist/src/usage/estimator.test.d.ts +0 -1
- package/dist/src/usage/estimator.test.js +0 -38
- package/dist/src/usage/ledger.test.d.ts +0 -1
- package/dist/src/usage/ledger.test.js +0 -171
- package/dist/src/usage/midstream.test.d.ts +0 -1
- package/dist/src/usage/midstream.test.js +0 -47
- package/dist/src/usage/thresholds.test.d.ts +0 -1
- package/dist/src/usage/thresholds.test.js +0 -77
- package/dist/src/utils/__tests__/auto-council-settings.test.d.ts +0 -1
- package/dist/src/utils/__tests__/auto-council-settings.test.js +0 -41
- package/dist/src/utils/__tests__/compaction-caps.test.d.ts +0 -21
- package/dist/src/utils/__tests__/compaction-caps.test.js +0 -187
- package/dist/src/utils/__tests__/ee-logger.test.d.ts +0 -11
- package/dist/src/utils/__tests__/ee-logger.test.js +0 -165
- package/dist/src/utils/__tests__/file-lock.test.d.ts +0 -1
- package/dist/src/utils/__tests__/file-lock.test.js +0 -66
- package/dist/src/utils/__tests__/footprint-gitignore.test.d.ts +0 -1
- package/dist/src/utils/__tests__/footprint-gitignore.test.js +0 -50
- package/dist/src/utils/__tests__/llm-deadline-abort.test.d.ts +0 -1
- package/dist/src/utils/__tests__/llm-deadline-abort.test.js +0 -33
- package/dist/src/utils/__tests__/llm-deadline.test.d.ts +0 -1
- package/dist/src/utils/__tests__/llm-deadline.test.js +0 -68
- package/dist/src/utils/__tests__/logger.test.d.ts +0 -1
- package/dist/src/utils/__tests__/logger.test.js +0 -115
- package/dist/src/utils/__tests__/rate-limit.test.d.ts +0 -1
- package/dist/src/utils/__tests__/rate-limit.test.js +0 -38
- package/dist/src/utils/__tests__/settings-agent-first.test.d.ts +0 -1
- package/dist/src/utils/__tests__/settings-agent-first.test.js +0 -48
- package/dist/src/utils/__tests__/settings-disabled-models.test.d.ts +0 -7
- package/dist/src/utils/__tests__/settings-disabled-models.test.js +0 -99
- package/dist/src/utils/__tests__/settings-web-research.test.d.ts +0 -1
- package/dist/src/utils/__tests__/settings-web-research.test.js +0 -46
- package/dist/src/utils/__tests__/slugify.test.d.ts +0 -1
- package/dist/src/utils/__tests__/slugify.test.js +0 -37
- package/dist/src/utils/__tests__/visible-retry.test.d.ts +0 -1
- package/dist/src/utils/__tests__/visible-retry.test.js +0 -143
- package/dist/src/utils/install-manager.test.d.ts +0 -1
- package/dist/src/utils/install-manager.test.js +0 -169
- package/dist/src/utils/instructions.test.d.ts +0 -1
- package/dist/src/utils/instructions.test.js +0 -93
- package/dist/src/utils/open-url.test.d.ts +0 -1
- package/dist/src/utils/open-url.test.js +0 -86
- package/dist/src/utils/permission-mode.test.d.ts +0 -1
- package/dist/src/utils/permission-mode.test.js +0 -188
- package/dist/src/utils/redactor.test.d.ts +0 -1
- package/dist/src/utils/redactor.test.js +0 -84
- package/dist/src/utils/settings.test.d.ts +0 -1
- package/dist/src/utils/settings.test.js +0 -212
- package/dist/src/utils/shell.test.d.ts +0 -1
- package/dist/src/utils/shell.test.js +0 -97
- package/dist/src/utils/skills.test.d.ts +0 -1
- package/dist/src/utils/skills.test.js +0 -45
- package/dist/src/utils/subagent-display.test.d.ts +0 -1
- package/dist/src/utils/subagent-display.test.js +0 -21
- package/dist/src/utils/subagents-settings.test.d.ts +0 -1
- package/dist/src/utils/subagents-settings.test.js +0 -64
- package/dist/src/utils/telegram-audio-settings.test.d.ts +0 -1
- package/dist/src/utils/telegram-audio-settings.test.js +0 -39
- package/dist/src/utils/update-checker.test.d.ts +0 -1
- package/dist/src/utils/update-checker.test.js +0 -142
- package/dist/src/verify/__tests__/coverage-parsers.test.d.ts +0 -1
- package/dist/src/verify/__tests__/coverage-parsers.test.js +0 -69
- package/dist/src/verify/__tests__/dotnet-recipe.test.d.ts +0 -10
- package/dist/src/verify/__tests__/dotnet-recipe.test.js +0 -70
- package/dist/src/verify/checkpoint.test.d.ts +0 -1
- package/dist/src/verify/checkpoint.test.js +0 -160
- package/dist/src/verify/entrypoint.test.d.ts +0 -1
- package/dist/src/verify/entrypoint.test.js +0 -233
- package/dist/src/verify/environment.test.d.ts +0 -1
- package/dist/src/verify/environment.test.js +0 -94
- package/dist/src/verify/orchestrator.test.d.ts +0 -1
- package/dist/src/verify/orchestrator.test.js +0 -126
- package/dist/src/verify/runtime-prep.test.d.ts +0 -1
- package/dist/src/verify/runtime-prep.test.js +0 -38
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import os from "node:os";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
5
|
-
import { BashTool } from "./bash.js";
|
|
6
|
-
const tempDirs = [];
|
|
7
|
-
function makeTempDir(prefix) {
|
|
8
|
-
const dir = fs.mkdtempSync(path.join(os.tmpdir(), prefix));
|
|
9
|
-
tempDirs.push(dir);
|
|
10
|
-
return dir;
|
|
11
|
-
}
|
|
12
|
-
afterEach(() => {
|
|
13
|
-
for (const dir of tempDirs.splice(0)) {
|
|
14
|
-
fs.rmSync(dir, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 });
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
describe("BashTool non-sandbox behavior", () => {
|
|
18
|
-
it("translates POSIX-style absolute paths in cd when shell is POSIX", async () => {
|
|
19
|
-
if (process.platform !== "win32")
|
|
20
|
-
return;
|
|
21
|
-
const root = makeTempDir("muonroi-bash-cdposix-");
|
|
22
|
-
// Pretend the configured shell is bash (forces POSIX path translation in cd handler).
|
|
23
|
-
const bash = new BashTool(root, { shellSettings: { kind: "bash" } });
|
|
24
|
-
if (!bash.getResolvedShell().isPosix)
|
|
25
|
-
return; // skip if no bash on this Windows host
|
|
26
|
-
const driveLetter = root.match(/^([A-Za-z]):/)?.[1]?.toLowerCase();
|
|
27
|
-
if (!driveLetter)
|
|
28
|
-
return;
|
|
29
|
-
const posixPath = `/${driveLetter}${root.slice(2).replace(/\\/g, "/")}`;
|
|
30
|
-
const result = await bash.execute(`cd ${posixPath}`);
|
|
31
|
-
expect(result.success).toBe(true);
|
|
32
|
-
expect(bash.getCwd()).toBe(root);
|
|
33
|
-
});
|
|
34
|
-
it("strips trailing backslash from quoted cd target on Windows (E1 regression)", async () => {
|
|
35
|
-
if (process.platform !== "win32")
|
|
36
|
-
return;
|
|
37
|
-
const root = makeTempDir("muonroi-bash-trailbs-");
|
|
38
|
-
const bash = new BashTool(os.tmpdir());
|
|
39
|
-
// Simulate: cd "C:\foo\bar\" && pwd — the trailing \" is mis-parsed as
|
|
40
|
-
// escaped quote, leaving the path as "C:\foo\bar\". After the fix the
|
|
41
|
-
// trailing backslash is stripped and the directory resolves correctly.
|
|
42
|
-
const result = await bash.execute(`cd "${root}\\"`);
|
|
43
|
-
expect(result.success).toBe(true);
|
|
44
|
-
expect(bash.getCwd()).toBe(root);
|
|
45
|
-
});
|
|
46
|
-
it("splits `cd <dir> && <cmd>` and runs <cmd> in the new cwd (session 127140a47b56 regression)", async () => {
|
|
47
|
-
const root = makeTempDir("muonroi-bash-cdchain-");
|
|
48
|
-
const bash = new BashTool(os.tmpdir());
|
|
49
|
-
const echoCmd = process.platform === "win32" ? "echo split-ok" : "echo split-ok";
|
|
50
|
-
const quoted = process.platform === "win32" ? `"${root}"` : root;
|
|
51
|
-
const result = await bash.execute(`cd ${quoted} && ${echoCmd}`);
|
|
52
|
-
expect(result.success).toBe(true);
|
|
53
|
-
expect(result.output ?? "").toContain("split-ok");
|
|
54
|
-
expect(bash.getCwd()).toBe(root);
|
|
55
|
-
});
|
|
56
|
-
it("respects `&&` short-circuit: failed cd does NOT run the chained command", async () => {
|
|
57
|
-
const bash = new BashTool(os.tmpdir());
|
|
58
|
-
const result = await bash.execute(`cd /this/path/does/not/exist && echo should-not-run`);
|
|
59
|
-
expect(result.success).toBe(false);
|
|
60
|
-
expect(result.error ?? "").toMatch(/Cannot change directory/);
|
|
61
|
-
expect(result.output ?? "").not.toContain("should-not-run");
|
|
62
|
-
});
|
|
63
|
-
it("respects `||` short-circuit: failed cd DOES run the chained command", async () => {
|
|
64
|
-
const start = os.tmpdir();
|
|
65
|
-
const bash = new BashTool(start);
|
|
66
|
-
const result = await bash.execute(`cd /this/path/does/not/exist || echo fallback-ran`);
|
|
67
|
-
expect(result.success).toBe(true);
|
|
68
|
-
expect(result.output ?? "").toContain("fallback-ran");
|
|
69
|
-
expect(bash.getCwd()).toBe(start); // cwd unchanged after failed cd
|
|
70
|
-
});
|
|
71
|
-
it("strips cmd.exe DOS flag `/d` from `cd /d <path> && <cmd>` (session 7dcf8fd7d6a4 regression)", async () => {
|
|
72
|
-
const root = makeTempDir("muonroi-bash-cddosflag-");
|
|
73
|
-
const bash = new BashTool(os.tmpdir());
|
|
74
|
-
const quoted = process.platform === "win32" ? `"${root}"` : root;
|
|
75
|
-
const result = await bash.execute(`cd /d ${quoted} && echo dos-flag-ok`);
|
|
76
|
-
expect(result.success).toBe(true);
|
|
77
|
-
expect(result.output ?? "").toContain("dos-flag-ok");
|
|
78
|
-
expect(bash.getCwd()).toBe(root);
|
|
79
|
-
});
|
|
80
|
-
it("respects `;` separator: runs remainder regardless of cd outcome", async () => {
|
|
81
|
-
const root = makeTempDir("muonroi-bash-cdsemicolon-");
|
|
82
|
-
const bash = new BashTool(os.tmpdir());
|
|
83
|
-
const quoted = process.platform === "win32" ? `"${root}"` : root;
|
|
84
|
-
const result = await bash.execute(`cd ${quoted} ; echo always-runs`);
|
|
85
|
-
expect(result.success).toBe(true);
|
|
86
|
-
expect(result.output ?? "").toContain("always-runs");
|
|
87
|
-
expect(bash.getCwd()).toBe(root);
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
//# sourceMappingURL=bash.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import os from "os";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
5
|
-
import { buildAgentDesktopEnv, buildScreenshotPath, computerClick, computerLaunch, computerScreenshot, computerSnapshot, computerType, } from "./computer.js";
|
|
6
|
-
describe("computer tools", () => {
|
|
7
|
-
const tempDirs = [];
|
|
8
|
-
afterEach(() => {
|
|
9
|
-
for (const dir of tempDirs.splice(0)) {
|
|
10
|
-
fs.rmSync(dir, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 });
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
it("stores screenshots under .muonroi-cli/computer by default", () => {
|
|
14
|
-
const cwd = fs.mkdtempSync(path.join(os.tmpdir(), "muonroi-computer-"));
|
|
15
|
-
tempDirs.push(cwd);
|
|
16
|
-
const outputPath = buildScreenshotPath(cwd);
|
|
17
|
-
expect(outputPath).toContain(path.join(".muonroi-cli", "computer"));
|
|
18
|
-
expect(path.dirname(outputPath)).toBe(path.join(cwd, ".muonroi-cli", "computer"));
|
|
19
|
-
});
|
|
20
|
-
it("captures screenshots through agent-desktop", async () => {
|
|
21
|
-
const cwd = fs.mkdtempSync(path.join(os.tmpdir(), "muonroi-computer-"));
|
|
22
|
-
tempDirs.push(cwd);
|
|
23
|
-
const outputPath = path.join(cwd, "artifacts", "screen.png");
|
|
24
|
-
const runner = vi.fn(async () => ({
|
|
25
|
-
success: true,
|
|
26
|
-
stdout: JSON.stringify({ ok: true, command: "screenshot", data: { path: outputPath } }),
|
|
27
|
-
stderr: "",
|
|
28
|
-
}));
|
|
29
|
-
const result = await computerScreenshot({ output_path: "artifacts/screen.png", app: "Google Chrome", window_id: "w-42" }, cwd, undefined, runner);
|
|
30
|
-
expect(result.success).toBe(true);
|
|
31
|
-
expect(result.media).toEqual([{ kind: "image", path: outputPath, mediaType: "image/png" }]);
|
|
32
|
-
expect(result.computer).toEqual({
|
|
33
|
-
action: "screenshot",
|
|
34
|
-
path: outputPath,
|
|
35
|
-
app: "Google Chrome",
|
|
36
|
-
windowId: "w-42",
|
|
37
|
-
hint: "Use computer_snapshot to inspect accessibility refs before clicking or typing.",
|
|
38
|
-
});
|
|
39
|
-
expect(runner).toHaveBeenCalledWith(["screenshot", outputPath, "--app", "Google Chrome", "--window-id", "w-42"], cwd, undefined);
|
|
40
|
-
});
|
|
41
|
-
it("formats snapshots with refs and raw JSON", async () => {
|
|
42
|
-
const runner = vi.fn(async () => ({
|
|
43
|
-
success: true,
|
|
44
|
-
stdout: JSON.stringify({
|
|
45
|
-
ok: true,
|
|
46
|
-
command: "snapshot",
|
|
47
|
-
data: {
|
|
48
|
-
refs: ["@e1", "@e2"],
|
|
49
|
-
},
|
|
50
|
-
}),
|
|
51
|
-
stderr: "",
|
|
52
|
-
}));
|
|
53
|
-
const result = await computerSnapshot({ app: "Finder" }, "/tmp", undefined, runner);
|
|
54
|
-
expect(result.success).toBe(true);
|
|
55
|
-
expect(result.output).toContain("Refs: @e1, @e2");
|
|
56
|
-
expect(result.output).toContain('"command": "snapshot"');
|
|
57
|
-
expect(result.computer).toEqual({
|
|
58
|
-
action: "snapshot",
|
|
59
|
-
app: "Finder",
|
|
60
|
-
windowId: undefined,
|
|
61
|
-
});
|
|
62
|
-
expect(runner).toHaveBeenCalledWith(["snapshot", "--app", "Finder", "--interactive-only"], "/tmp", undefined);
|
|
63
|
-
});
|
|
64
|
-
it("clicks by accessibility ref", async () => {
|
|
65
|
-
const runner = vi.fn(async () => ({
|
|
66
|
-
success: true,
|
|
67
|
-
stdout: JSON.stringify({ ok: true, command: "click", data: { action: "click" } }),
|
|
68
|
-
stderr: "",
|
|
69
|
-
}));
|
|
70
|
-
const result = await computerClick({ ref: "@e7" }, "/tmp", undefined, runner);
|
|
71
|
-
expect(result.success).toBe(true);
|
|
72
|
-
expect(result.computer).toEqual({ action: "click", ref: "@e7" });
|
|
73
|
-
expect(runner).toHaveBeenCalledWith(["click", "@e7"], "/tmp", undefined);
|
|
74
|
-
});
|
|
75
|
-
it("reports a specific error for non-left ref clicks", async () => {
|
|
76
|
-
const runner = vi.fn(async () => ({
|
|
77
|
-
success: true,
|
|
78
|
-
stdout: "",
|
|
79
|
-
stderr: "",
|
|
80
|
-
}));
|
|
81
|
-
const result = await computerClick({ ref: "@e7", button: "right" }, "/tmp", undefined, runner);
|
|
82
|
-
expect(result.success).toBe(false);
|
|
83
|
-
expect(result.output).toContain("supports only the left button");
|
|
84
|
-
expect(runner).not.toHaveBeenCalled();
|
|
85
|
-
});
|
|
86
|
-
it("types into an element ref", async () => {
|
|
87
|
-
const runner = vi.fn(async () => ({
|
|
88
|
-
success: true,
|
|
89
|
-
stdout: JSON.stringify({ ok: true, command: "type", data: { action: "type" } }),
|
|
90
|
-
stderr: "",
|
|
91
|
-
}));
|
|
92
|
-
const result = await computerType({ ref: "@e5", text: "hello from muonroi" }, "/tmp", undefined, runner);
|
|
93
|
-
expect(result.success).toBe(true);
|
|
94
|
-
expect(result.output).toContain("Typed into @e5.");
|
|
95
|
-
expect(runner).toHaveBeenCalledWith(["type", "@e5", "hello from muonroi"], "/tmp", undefined);
|
|
96
|
-
});
|
|
97
|
-
it("launches apps through agent-desktop", async () => {
|
|
98
|
-
const runner = vi.fn(async () => ({
|
|
99
|
-
success: true,
|
|
100
|
-
stdout: JSON.stringify({ ok: true, command: "launch", data: { launched: true } }),
|
|
101
|
-
stderr: "",
|
|
102
|
-
}));
|
|
103
|
-
const result = await computerLaunch({ app: "Google Chrome", timeout_ms: 15000 }, "/tmp", undefined, runner);
|
|
104
|
-
expect(result.success).toBe(true);
|
|
105
|
-
expect(runner).toHaveBeenCalledWith(["launch", "Google Chrome", "--timeout", "15000"], "/tmp", undefined);
|
|
106
|
-
});
|
|
107
|
-
it("adds a macOS accessibility hint on permission failures", async () => {
|
|
108
|
-
const runner = vi.fn(async () => ({
|
|
109
|
-
success: false,
|
|
110
|
-
stdout: JSON.stringify({
|
|
111
|
-
ok: false,
|
|
112
|
-
command: "snapshot",
|
|
113
|
-
error: {
|
|
114
|
-
code: "PERM_DENIED",
|
|
115
|
-
message: "Accessibility permission not granted",
|
|
116
|
-
suggestion: "Open System Settings > Privacy & Security > Accessibility and add your terminal application",
|
|
117
|
-
},
|
|
118
|
-
}),
|
|
119
|
-
stderr: "",
|
|
120
|
-
}));
|
|
121
|
-
const result = await computerSnapshot({ app: "Finder" }, "/tmp", undefined, runner);
|
|
122
|
-
expect(result.success).toBe(false);
|
|
123
|
-
expect(result.output).toContain("Accessibility permission");
|
|
124
|
-
});
|
|
125
|
-
it("only forwards an allowlisted environment to agent-desktop", () => {
|
|
126
|
-
const env = buildAgentDesktopEnv({
|
|
127
|
-
PATH: "/usr/bin:/bin",
|
|
128
|
-
HOME: "/Users/tester",
|
|
129
|
-
TERM: "xterm-256color",
|
|
130
|
-
GROK_API_KEY: "secret",
|
|
131
|
-
TELEGRAM_BOT_TOKEN: "also-secret",
|
|
132
|
-
CUSTOM_SECRET: "nope",
|
|
133
|
-
});
|
|
134
|
-
expect(env).toEqual({
|
|
135
|
-
FORCE_COLOR: "0",
|
|
136
|
-
HOME: "/Users/tester",
|
|
137
|
-
PATH: "/usr/bin:/bin",
|
|
138
|
-
TERM: "xterm-256color",
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
//# sourceMappingURL=computer.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { readFile as fsRead, writeFile as fsWrite, mkdtemp, rm } from "fs/promises";
|
|
2
|
-
import os from "os";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
5
|
-
import { editFile, readFile, writeFile } from "./file.js";
|
|
6
|
-
import { FileTracker } from "./file-tracker.js";
|
|
7
|
-
vi.mock("../lsp/runtime", () => ({
|
|
8
|
-
summarizeDiagnostics: () => "",
|
|
9
|
-
syncFileWithLsp: async () => [],
|
|
10
|
-
}));
|
|
11
|
-
const tempDirs = [];
|
|
12
|
-
afterEach(async () => {
|
|
13
|
-
await Promise.all(tempDirs.splice(0).map((dir) => rm(dir, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 })));
|
|
14
|
-
});
|
|
15
|
-
async function createTempDir() {
|
|
16
|
-
const dir = await mkdtemp(path.join(os.tmpdir(), "muonroi-tracker-"));
|
|
17
|
-
tempDirs.push(dir);
|
|
18
|
-
return dir;
|
|
19
|
-
}
|
|
20
|
-
describe("FileTracker — read-before-write guard", () => {
|
|
21
|
-
it("rejects edit on an existing file that was not read first", async () => {
|
|
22
|
-
const cwd = await createTempDir();
|
|
23
|
-
await fsWrite(path.join(cwd, "demo.ts"), "const a = 1;\n", "utf8");
|
|
24
|
-
const tracker = new FileTracker();
|
|
25
|
-
const result = await editFile("demo.ts", "1", "2", cwd, tracker);
|
|
26
|
-
expect(result.success).toBe(false);
|
|
27
|
-
expect(result.output).toMatch(/must be read first/i);
|
|
28
|
-
});
|
|
29
|
-
it("rejects overwrite on an existing file that was not read first", async () => {
|
|
30
|
-
const cwd = await createTempDir();
|
|
31
|
-
await fsWrite(path.join(cwd, "demo.ts"), "old\n", "utf8");
|
|
32
|
-
const tracker = new FileTracker();
|
|
33
|
-
const result = await writeFile("demo.ts", "new\n", cwd, tracker);
|
|
34
|
-
expect(result.success).toBe(false);
|
|
35
|
-
expect(result.output).toMatch(/must be read first/i);
|
|
36
|
-
});
|
|
37
|
-
it("allows creating a new file without a prior read", async () => {
|
|
38
|
-
const cwd = await createTempDir();
|
|
39
|
-
const tracker = new FileTracker();
|
|
40
|
-
const result = await writeFile("brand-new.ts", "fresh\n", cwd, tracker);
|
|
41
|
-
expect(result.success).toBe(true);
|
|
42
|
-
expect(await fsRead(path.join(cwd, "brand-new.ts"), "utf8")).toBe("fresh\n");
|
|
43
|
-
});
|
|
44
|
-
it("allows edit after a read of the same file", async () => {
|
|
45
|
-
const cwd = await createTempDir();
|
|
46
|
-
await fsWrite(path.join(cwd, "demo.ts"), "const a = 1;\n", "utf8");
|
|
47
|
-
const tracker = new FileTracker();
|
|
48
|
-
readFile("demo.ts", cwd, undefined, undefined, tracker);
|
|
49
|
-
const result = await editFile("demo.ts", "1", "2", cwd, tracker);
|
|
50
|
-
expect(result.success).toBe(true);
|
|
51
|
-
expect(await fsRead(path.join(cwd, "demo.ts"), "utf8")).toBe("const a = 2;\n");
|
|
52
|
-
});
|
|
53
|
-
it("rejects edit when file changed on disk after the read (hash mismatch)", async () => {
|
|
54
|
-
const cwd = await createTempDir();
|
|
55
|
-
const filePath = path.join(cwd, "demo.ts");
|
|
56
|
-
await fsWrite(filePath, "const a = 1;\n", "utf8");
|
|
57
|
-
const tracker = new FileTracker();
|
|
58
|
-
readFile("demo.ts", cwd, undefined, undefined, tracker);
|
|
59
|
-
// Simulate external modification.
|
|
60
|
-
await fsWrite(filePath, "const a = 99;\n", "utf8");
|
|
61
|
-
const result = await editFile("demo.ts", "99", "100", cwd, tracker);
|
|
62
|
-
expect(result.success).toBe(false);
|
|
63
|
-
expect(result.output).toMatch(/changed on disk/i);
|
|
64
|
-
});
|
|
65
|
-
it("allows back-to-back edits without re-reading (write refreshes tracker)", async () => {
|
|
66
|
-
const cwd = await createTempDir();
|
|
67
|
-
await fsWrite(path.join(cwd, "demo.ts"), "1 2 3\n", "utf8");
|
|
68
|
-
const tracker = new FileTracker();
|
|
69
|
-
readFile("demo.ts", cwd, undefined, undefined, tracker);
|
|
70
|
-
const r1 = await editFile("demo.ts", "1", "A", cwd, tracker);
|
|
71
|
-
const r2 = await editFile("demo.ts", "2", "B", cwd, tracker);
|
|
72
|
-
expect(r1.success).toBe(true);
|
|
73
|
-
expect(r2.success).toBe(true);
|
|
74
|
-
expect(await fsRead(path.join(cwd, "demo.ts"), "utf8")).toBe("A B 3\n");
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
//# sourceMappingURL=file-tracker.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { mkdtemp, readFile, rm, writeFile as writeFsFile } from "fs/promises";
|
|
2
|
-
import os from "os";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
5
|
-
import { editFile, writeFile } from "./file.js";
|
|
6
|
-
const summarizeDiagnosticsMock = vi.fn(() => "1 LSP issue · 1 error");
|
|
7
|
-
const syncFileWithLspMock = vi.fn(async () => [
|
|
8
|
-
{
|
|
9
|
-
filePath: "/tmp/demo.ts",
|
|
10
|
-
serverId: "typescript",
|
|
11
|
-
diagnostics: [
|
|
12
|
-
{
|
|
13
|
-
message: "Type error",
|
|
14
|
-
severity: 1,
|
|
15
|
-
range: {
|
|
16
|
-
start: { line: 0, character: 0 },
|
|
17
|
-
end: { line: 0, character: 5 },
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
]);
|
|
23
|
-
vi.mock("../lsp/runtime", () => ({
|
|
24
|
-
summarizeDiagnostics: (diagnostics) => summarizeDiagnosticsMock(diagnostics),
|
|
25
|
-
syncFileWithLsp: (cwd, filePath, content, save, waitForDiagnostics) => syncFileWithLspMock(cwd, filePath, content, save, waitForDiagnostics),
|
|
26
|
-
}));
|
|
27
|
-
const tempDirs = [];
|
|
28
|
-
afterEach(async () => {
|
|
29
|
-
summarizeDiagnosticsMock.mockClear();
|
|
30
|
-
syncFileWithLspMock.mockClear();
|
|
31
|
-
await Promise.all(tempDirs.splice(0).map((dir) => rm(dir, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 })));
|
|
32
|
-
});
|
|
33
|
-
describe("file tool LSP integration", () => {
|
|
34
|
-
it("includes diagnostics metadata when writing a file", async () => {
|
|
35
|
-
const cwd = await createTempDir();
|
|
36
|
-
const result = await writeFile("demo.ts", "const answer = 42;\n", cwd);
|
|
37
|
-
expect(result.success).toBe(true);
|
|
38
|
-
expect(result.output).toContain("1 LSP issue");
|
|
39
|
-
expect(result.lspDiagnostics).toHaveLength(1);
|
|
40
|
-
expect(syncFileWithLspMock).toHaveBeenCalledWith(cwd, path.join(cwd, "demo.ts"), "const answer = 42;\n", true, true);
|
|
41
|
-
});
|
|
42
|
-
it("syncs edited file contents through the LSP runtime", async () => {
|
|
43
|
-
const cwd = await createTempDir();
|
|
44
|
-
const filePath = path.join(cwd, "demo.ts");
|
|
45
|
-
await writeFsFile(filePath, "const answer = 41;\n", "utf8");
|
|
46
|
-
const result = await editFile("demo.ts", "41", "42", cwd);
|
|
47
|
-
const content = await readFile(filePath, "utf8");
|
|
48
|
-
expect(result.success).toBe(true);
|
|
49
|
-
expect(content).toContain("42");
|
|
50
|
-
expect(syncFileWithLspMock).toHaveBeenCalledWith(cwd, filePath, "const answer = 42;\n", true, true);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
describe("editFile line-ending normalization", () => {
|
|
54
|
-
it("matches a multi-line old_string (LF) against a CRLF file and preserves CRLF", async () => {
|
|
55
|
-
// Live finding (storyflow_ui A/B 2026-06-06): both DeepSeek and Grok failed
|
|
56
|
-
// 8-9/10 edit_file calls on CRLF-terminated Angular templates. The model
|
|
57
|
-
// emits old_string with \n line breaks; the on-disk file uses \r\n, so an
|
|
58
|
-
// exact substring match never finds a multi-line old_string. Only a
|
|
59
|
-
// single-line edit (no newline) succeeded. The tool must normalize EOLs.
|
|
60
|
-
const cwd = await createTempDir();
|
|
61
|
-
const filePath = path.join(cwd, "tpl.html");
|
|
62
|
-
const crlf = '<div class="a">\r\n <span></span>\r\n</div>\r\n';
|
|
63
|
-
await writeFsFile(filePath, crlf, "utf8");
|
|
64
|
-
// old_string + new_string use \n (what an LLM emits).
|
|
65
|
-
const oldStr = '<div class="a">\n <span></span>\n</div>';
|
|
66
|
-
const newStr = '<div class="a">\n <span>X</span>\n</div>';
|
|
67
|
-
const result = await editFile("tpl.html", oldStr, newStr, cwd);
|
|
68
|
-
const content = await readFile(filePath, "utf8");
|
|
69
|
-
expect(result.success).toBe(true);
|
|
70
|
-
expect(content).toContain("<span>X</span>");
|
|
71
|
-
// CRLF must be preserved on the written lines (no silent LF conversion).
|
|
72
|
-
expect(content).toContain('<div class="a">\r\n <span>X</span>\r\n</div>\r\n');
|
|
73
|
-
expect(content).not.toMatch(/[^\r]\n/); // no bare LF remains
|
|
74
|
-
});
|
|
75
|
-
it("still edits a plain LF file with an LF old_string (no regression)", async () => {
|
|
76
|
-
const cwd = await createTempDir();
|
|
77
|
-
const filePath = path.join(cwd, "tpl.ts");
|
|
78
|
-
await writeFsFile(filePath, "const a = 1;\nconst b = 2;\n", "utf8");
|
|
79
|
-
const result = await editFile("tpl.ts", "const a = 1;\nconst b = 2;", "const a = 1;\nconst b = 3;", cwd);
|
|
80
|
-
const content = await readFile(filePath, "utf8");
|
|
81
|
-
expect(result.success).toBe(true);
|
|
82
|
-
expect(content).toBe("const a = 1;\nconst b = 3;\n");
|
|
83
|
-
});
|
|
84
|
-
it("still reports old_string not found when it is genuinely absent (CRLF file)", async () => {
|
|
85
|
-
const cwd = await createTempDir();
|
|
86
|
-
const filePath = path.join(cwd, "tpl.html");
|
|
87
|
-
await writeFsFile(filePath, '<div class="a">\r\n <span></span>\r\n</div>\r\n', "utf8");
|
|
88
|
-
const result = await editFile("tpl.html", "<p>\n nope\n</p>", "<p>yes</p>", cwd);
|
|
89
|
-
expect(result.success).toBe(false);
|
|
90
|
-
expect(result.output).toContain("old_string not found");
|
|
91
|
-
});
|
|
92
|
-
it("reports non-unique when the EOL-normalized old_string matches multiple times (CRLF file)", async () => {
|
|
93
|
-
const cwd = await createTempDir();
|
|
94
|
-
const filePath = path.join(cwd, "tpl.html");
|
|
95
|
-
await writeFsFile(filePath, "<li>x</li>\r\n<li>x</li>\r\n", "utf8");
|
|
96
|
-
const result = await editFile("tpl.html", "<li>x</li>", "<li>y</li>", cwd);
|
|
97
|
-
expect(result.success).toBe(false);
|
|
98
|
-
expect(result.output).toContain("not unique");
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
async function createTempDir() {
|
|
102
|
-
const dir = await mkdtemp(path.join(os.tmpdir(), "muonroi-file-tools-"));
|
|
103
|
-
tempDirs.push(dir);
|
|
104
|
-
return dir;
|
|
105
|
-
}
|
|
106
|
-
//# sourceMappingURL=file.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { tmpdir } from "node:os";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
5
|
-
import { __resetGitSafetyState, analyzeGitCommand, checkPushGate, commitBlockedMessage, detectSensitiveStaging, recordCommandOutcome, stagingWarning, } from "./git-safety.js";
|
|
6
|
-
describe("analyzeGitCommand", () => {
|
|
7
|
-
it("detects git push (with flags and chained)", () => {
|
|
8
|
-
expect(analyzeGitCommand("git push").isPush).toBe(true);
|
|
9
|
-
expect(analyzeGitCommand("git push origin main").isPush).toBe(true);
|
|
10
|
-
expect(analyzeGitCommand("git -c x=y push --force").isPush).toBe(true);
|
|
11
|
-
expect(analyzeGitCommand("git add -A && git commit -m x && git push origin main").isPush).toBe(true);
|
|
12
|
-
});
|
|
13
|
-
it("does not match 'push' inside a quoted commit message", () => {
|
|
14
|
-
expect(analyzeGitCommand('git commit -m "fix git push regression"').isPush).toBe(false);
|
|
15
|
-
});
|
|
16
|
-
it("detects a real push on its own line in a multi-line script", () => {
|
|
17
|
-
expect(analyzeGitCommand("git config user.name x\ngit push origin main").isPush).toBe(true);
|
|
18
|
-
});
|
|
19
|
-
it("does not bleed across a newline into an unrelated command", () => {
|
|
20
|
-
// 'git status' then a separate line with the word 'push' is NOT a git push.
|
|
21
|
-
expect(analyzeGitCommand("git status\necho push-notification").isPush).toBe(false);
|
|
22
|
-
expect(analyzeGitCommand("git log\nrm push.txt").isPush).toBe(false);
|
|
23
|
-
});
|
|
24
|
-
it("detects broad staging (-A / . / --all / commit -a)", () => {
|
|
25
|
-
expect(analyzeGitCommand("git add -A").isBroadStage).toBe(true);
|
|
26
|
-
expect(analyzeGitCommand("git add .").isBroadStage).toBe(true);
|
|
27
|
-
expect(analyzeGitCommand("git add --all").isBroadStage).toBe(true);
|
|
28
|
-
expect(analyzeGitCommand("git commit -am 'x'").isBroadStage).toBe(true);
|
|
29
|
-
expect(analyzeGitCommand("git commit -a").isBroadStage).toBe(true);
|
|
30
|
-
});
|
|
31
|
-
it("detects broad staging even with git global options before the subcommand", () => {
|
|
32
|
-
expect(analyzeGitCommand("git -c core.editor=true commit -a").isBroadStage).toBe(true);
|
|
33
|
-
expect(analyzeGitCommand("git -c x=y add -A").isBroadStage).toBe(true);
|
|
34
|
-
});
|
|
35
|
-
it("does not flag explicit/narrow staging or non-staging flags", () => {
|
|
36
|
-
expect(analyzeGitCommand("git add src/foo.ts src/bar.ts").isBroadStage).toBe(false);
|
|
37
|
-
expect(analyzeGitCommand("git add ./src/foo.ts").isBroadStage).toBe(false);
|
|
38
|
-
expect(analyzeGitCommand("git commit -m 'message'").isBroadStage).toBe(false);
|
|
39
|
-
expect(analyzeGitCommand("git commit --amend").isBroadStage).toBe(false);
|
|
40
|
-
// -a must be a clean flag cluster — a malformed `-a--otherflag` is not `-a`.
|
|
41
|
-
expect(analyzeGitCommand("git commit -a--otherflag").isBroadStage).toBe(false);
|
|
42
|
-
});
|
|
43
|
-
it("detects any `git commit` for the LSP commit gate (with or without -a)", () => {
|
|
44
|
-
expect(analyzeGitCommand("git commit -m 'x'").isCommit).toBe(true);
|
|
45
|
-
expect(analyzeGitCommand("git commit").isCommit).toBe(true);
|
|
46
|
-
expect(analyzeGitCommand("git commit -am 'x'").isCommit).toBe(true);
|
|
47
|
-
expect(analyzeGitCommand("git commit --amend --no-edit").isCommit).toBe(true);
|
|
48
|
-
expect(analyzeGitCommand("git -c x=y commit -m 'x'").isCommit).toBe(true);
|
|
49
|
-
expect(analyzeGitCommand("git add -A && git commit -m 'x'").isCommit).toBe(true);
|
|
50
|
-
});
|
|
51
|
-
it("does not treat commit plumbing / quoted messages as a commit", () => {
|
|
52
|
-
// `commit` must terminate at whitespace/clause-end — plumbing subcommands stay clear.
|
|
53
|
-
expect(analyzeGitCommand("git commit-tree $TREE").isCommit).toBe(false);
|
|
54
|
-
expect(analyzeGitCommand("git commit-graph write").isCommit).toBe(false);
|
|
55
|
-
// option values and quoted messages mentioning commit must not match.
|
|
56
|
-
expect(analyzeGitCommand("git log --grep=commit").isCommit).toBe(false);
|
|
57
|
-
expect(analyzeGitCommand('git push -m "amend the commit later"').isCommit).toBe(false);
|
|
58
|
-
// separate clause / line cannot bleed in.
|
|
59
|
-
expect(analyzeGitCommand("git status\necho commit").isCommit).toBe(false);
|
|
60
|
-
});
|
|
61
|
-
it("separates broad-add from commit-all so the gate scopes the right path set", () => {
|
|
62
|
-
const addAll = analyzeGitCommand("git add -A");
|
|
63
|
-
expect(addAll.isBroadAdd).toBe(true);
|
|
64
|
-
expect(addAll.isCommitAll).toBe(false);
|
|
65
|
-
const commitAll = analyzeGitCommand("git commit -am 'x'");
|
|
66
|
-
expect(commitAll.isCommitAll).toBe(true);
|
|
67
|
-
expect(commitAll.isBroadAdd).toBe(false);
|
|
68
|
-
expect(commitAll.isCommit).toBe(true);
|
|
69
|
-
const plainCommit = analyzeGitCommand("git commit -m 'x'");
|
|
70
|
-
expect(plainCommit.isBroadAdd).toBe(false);
|
|
71
|
-
expect(plainCommit.isCommitAll).toBe(false);
|
|
72
|
-
expect(plainCommit.isCommit).toBe(true);
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
describe("commitBlockedMessage", () => {
|
|
76
|
-
it("surfaces the diagnostic summary and does NOT advertise the env bypass", () => {
|
|
77
|
-
const msg = commitBlockedMessage("src/foo.ts:3 error TS2322");
|
|
78
|
-
expect(msg).toMatch(/BLOCKED/);
|
|
79
|
-
expect(msg).toContain("src/foo.ts:3 error TS2322");
|
|
80
|
-
expect(msg).toMatch(/git_commit/);
|
|
81
|
-
// G1 convention: the user-only escape hatch is never shown to the agent.
|
|
82
|
-
expect(msg).not.toMatch(/MUONROI_COMMIT_GATE/);
|
|
83
|
-
});
|
|
84
|
-
it("falls back gracefully when no summary is provided", () => {
|
|
85
|
-
expect(commitBlockedMessage()).toMatch(/no diagnostic detail/i);
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
describe("push gate", () => {
|
|
89
|
-
beforeEach(() => {
|
|
90
|
-
__resetGitSafetyState();
|
|
91
|
-
delete process.env.MUONROI_ALLOW_PUSH_ON_RED;
|
|
92
|
-
});
|
|
93
|
-
afterEach(() => {
|
|
94
|
-
delete process.env.MUONROI_ALLOW_PUSH_ON_RED;
|
|
95
|
-
});
|
|
96
|
-
it("does not block when no verification has failed", () => {
|
|
97
|
-
expect(checkPushGate("s1").blocked).toBe(false);
|
|
98
|
-
});
|
|
99
|
-
it("blocks push after a verification command fails", () => {
|
|
100
|
-
recordCommandOutcome("s1", "npm test", false);
|
|
101
|
-
const gate = checkPushGate("s1");
|
|
102
|
-
expect(gate.blocked).toBe(true);
|
|
103
|
-
expect(gate.failed).toContain("npm test");
|
|
104
|
-
});
|
|
105
|
-
it("clears the block when that same command re-runs green", () => {
|
|
106
|
-
recordCommandOutcome("s1", "npm test", false);
|
|
107
|
-
expect(checkPushGate("s1").blocked).toBe(true);
|
|
108
|
-
recordCommandOutcome("s1", "npm test", true);
|
|
109
|
-
expect(checkPushGate("s1").blocked).toBe(false);
|
|
110
|
-
});
|
|
111
|
-
it("a different verify passing does NOT clear an unrelated failed verify", () => {
|
|
112
|
-
recordCommandOutcome("s1", "npm test", false);
|
|
113
|
-
recordCommandOutcome("s1", "npm run build", true); // build green, tests still red
|
|
114
|
-
expect(checkPushGate("s1").blocked).toBe(true);
|
|
115
|
-
expect(checkPushGate("s1").failed).toEqual(["npm test"]);
|
|
116
|
-
});
|
|
117
|
-
it("is session-scoped (one session's failure does not gate another)", () => {
|
|
118
|
-
recordCommandOutcome("s1", "vitest run", false);
|
|
119
|
-
expect(checkPushGate("s1").blocked).toBe(true);
|
|
120
|
-
expect(checkPushGate("s2").blocked).toBe(false);
|
|
121
|
-
});
|
|
122
|
-
it("ignores non-verification command outcomes", () => {
|
|
123
|
-
recordCommandOutcome("s1", "git status", false);
|
|
124
|
-
recordCommandOutcome("s1", "ls -la", false);
|
|
125
|
-
expect(checkPushGate("s1").blocked).toBe(false);
|
|
126
|
-
});
|
|
127
|
-
it("respects the MUONROI_ALLOW_PUSH_ON_RED override", () => {
|
|
128
|
-
recordCommandOutcome("s1", "npm test", false);
|
|
129
|
-
process.env.MUONROI_ALLOW_PUSH_ON_RED = "1";
|
|
130
|
-
expect(checkPushGate("s1").blocked).toBe(false);
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
describe("sensitive staging detection", () => {
|
|
134
|
-
let dir;
|
|
135
|
-
beforeEach(() => {
|
|
136
|
-
dir = mkdtempSync(join(tmpdir(), "git-safety-"));
|
|
137
|
-
});
|
|
138
|
-
afterEach(() => {
|
|
139
|
-
rmSync(dir, { recursive: true, force: true });
|
|
140
|
-
});
|
|
141
|
-
it("flags .env and .muonroi-cli present in the repo root", () => {
|
|
142
|
-
writeFileSync(join(dir, ".env"), "SECRET=1");
|
|
143
|
-
writeFileSync(join(dir, ".muonroi-cli"), ""); // a file is enough for existsSync
|
|
144
|
-
const found = detectSensitiveStaging(dir);
|
|
145
|
-
expect(found).toContain(".env");
|
|
146
|
-
expect(found).toContain(".muonroi-cli");
|
|
147
|
-
expect(stagingWarning(dir)).toMatch(/WARNING/);
|
|
148
|
-
});
|
|
149
|
-
it("returns no warning for a clean repo", () => {
|
|
150
|
-
writeFileSync(join(dir, "README.md"), "# ok");
|
|
151
|
-
expect(detectSensitiveStaging(dir)).toEqual([]);
|
|
152
|
-
expect(stagingWarning(dir)).toBe("");
|
|
153
|
-
});
|
|
154
|
-
});
|
|
155
|
-
//# sourceMappingURL=git-safety.test.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Corrective guard for malformed bash tool calls (missing / empty `command`).
|
|
3
|
-
*
|
|
4
|
-
* Live obs (2026-06-04, deepseek long session 734e65cffdf6): on an open-ended
|
|
5
|
-
* "find a bug" task the cheap model emitted `bash` calls with EMPTY arguments
|
|
6
|
-
* (`{}`, no `command`) three times in a row until the loop-guard askcard fired.
|
|
7
|
-
* Root cause: the registry passed `input.command` (undefined) straight to
|
|
8
|
-
* `bash.execute()`, where `command.startsWith(...)` threw an opaque TypeError.
|
|
9
|
-
* An opaque error doesn't steer a cheap model to self-correct — it just repeats
|
|
10
|
-
* the malformed call. The guard returns a crisp, actionable instruction instead
|
|
11
|
-
* so the next step supplies a real command.
|
|
12
|
-
*/
|
|
13
|
-
export {};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Corrective guard for malformed bash tool calls (missing / empty `command`).
|
|
3
|
-
*
|
|
4
|
-
* Live obs (2026-06-04, deepseek long session 734e65cffdf6): on an open-ended
|
|
5
|
-
* "find a bug" task the cheap model emitted `bash` calls with EMPTY arguments
|
|
6
|
-
* (`{}`, no `command`) three times in a row until the loop-guard askcard fired.
|
|
7
|
-
* Root cause: the registry passed `input.command` (undefined) straight to
|
|
8
|
-
* `bash.execute()`, where `command.startsWith(...)` threw an opaque TypeError.
|
|
9
|
-
* An opaque error doesn't steer a cheap model to self-correct — it just repeats
|
|
10
|
-
* the malformed call. The guard returns a crisp, actionable instruction instead
|
|
11
|
-
* so the next step supplies a real command.
|
|
12
|
-
*/
|
|
13
|
-
import os from "node:os";
|
|
14
|
-
import { describe, expect, it } from "vitest";
|
|
15
|
-
import { BashTool } from "./bash.js";
|
|
16
|
-
import { createBuiltinTools } from "./registry.js";
|
|
17
|
-
async function runBash(tools, args) {
|
|
18
|
-
const t = tools.bash;
|
|
19
|
-
if (!t?.execute)
|
|
20
|
-
throw new Error("bash tool has no execute");
|
|
21
|
-
const out = await t.execute(args);
|
|
22
|
-
return typeof out === "string" ? out : JSON.stringify(out);
|
|
23
|
-
}
|
|
24
|
-
describe("bash tool — empty/missing command corrective guard", () => {
|
|
25
|
-
it("returns a corrective error (not a thrown TypeError) for missing command {}", async () => {
|
|
26
|
-
const bash = new BashTool(os.tmpdir());
|
|
27
|
-
const tools = createBuiltinTools(bash, "agent");
|
|
28
|
-
const out = await runBash(tools, {});
|
|
29
|
-
// Guard uses "BLOCKED (empty-bash):" prefix — more semantic than bare "ERROR".
|
|
30
|
-
expect(out).toMatch(/BLOCKED/);
|
|
31
|
-
expect(out).toMatch(/non-empty/i);
|
|
32
|
-
expect(out).toMatch(/command/i);
|
|
33
|
-
});
|
|
34
|
-
it("returns the corrective error for an empty-string command", async () => {
|
|
35
|
-
const bash = new BashTool(os.tmpdir());
|
|
36
|
-
const tools = createBuiltinTools(bash, "agent");
|
|
37
|
-
const out = await runBash(tools, { command: "" });
|
|
38
|
-
expect(out).toMatch(/BLOCKED/);
|
|
39
|
-
expect(out).toMatch(/non-empty/i);
|
|
40
|
-
});
|
|
41
|
-
it("returns the corrective error for a whitespace-only command", async () => {
|
|
42
|
-
const bash = new BashTool(os.tmpdir());
|
|
43
|
-
const tools = createBuiltinTools(bash, "agent");
|
|
44
|
-
const out = await runBash(tools, { command: " " });
|
|
45
|
-
expect(out).toMatch(/BLOCKED/);
|
|
46
|
-
expect(out).toMatch(/non-empty/i);
|
|
47
|
-
});
|
|
48
|
-
it("does NOT block a real command", async () => {
|
|
49
|
-
const bash = new BashTool(os.tmpdir());
|
|
50
|
-
const tools = createBuiltinTools(bash, "agent");
|
|
51
|
-
const out = await runBash(tools, { command: "echo guard-ok", timeout: 10_000 });
|
|
52
|
-
expect(out).toContain("guard-ok");
|
|
53
|
-
expect(out).toMatch(/\[bash_run_id: bash-\d+\]/);
|
|
54
|
-
expect(out).not.toMatch(/non-empty/i);
|
|
55
|
-
}, 15_000);
|
|
56
|
-
});
|
|
57
|
-
//# sourceMappingURL=registry-bash-empty-command.test.js.map
|