muonroi-cli 1.8.0 → 1.8.3
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/dist/src/agent-harness/mock-model.js +112 -4
- package/dist/src/cli/cost-forensics.js +7 -4
- package/dist/src/flow/compaction/index.d.ts +1 -0
- package/dist/src/flow/compaction/index.js +4 -0
- package/dist/src/generated/version.d.ts +1 -1
- package/dist/src/generated/version.js +1 -1
- package/dist/src/index.js +4 -2
- package/dist/src/lsp/manager.js +11 -3
- package/dist/src/mcp/auto-setup.js +0 -8
- package/dist/src/mcp/self-verify-jobs.d.ts +1 -0
- package/dist/src/mcp/self-verify-runner.js +1 -1
- package/dist/src/mcp/setup-guide-text.d.ts +1 -1
- package/dist/src/mcp/setup-guide-text.js +3 -1
- package/dist/src/orchestrator/auto-commit.js +9 -7
- package/dist/src/orchestrator/message-processor.d.ts +2 -0
- package/dist/src/orchestrator/message-processor.js +7 -0
- package/dist/src/orchestrator/orchestrator.d.ts +3 -0
- package/dist/src/orchestrator/orchestrator.js +371 -28
- package/dist/src/orchestrator/pending-calls.js +2 -1
- package/dist/src/orchestrator/preprocessor.js +3 -2
- package/dist/src/orchestrator/prompts.d.ts +8 -0
- package/dist/src/orchestrator/prompts.js +224 -177
- package/dist/src/orchestrator/sub-agent-cap.d.ts +2 -0
- package/dist/src/orchestrator/sub-agent-cap.js +12 -4
- package/dist/src/orchestrator/subagent-compactor.d.ts +7 -0
- package/dist/src/orchestrator/subagent-compactor.js +65 -14
- package/dist/src/orchestrator/tool-engine.d.ts +2 -0
- package/dist/src/orchestrator/tool-engine.js +80 -21
- package/dist/src/orchestrator/turn-runner-deps.d.ts +2 -0
- package/dist/src/pil/llm-classify.d.ts +11 -0
- package/dist/src/pil/llm-classify.js +193 -0
- package/dist/src/self-qa/agentic-loop.js +30 -21
- package/dist/src/storage/index.d.ts +1 -1
- package/dist/src/storage/index.js +1 -1
- package/dist/src/storage/migrations.js +13 -1
- package/dist/src/storage/transcript.d.ts +2 -0
- package/dist/src/storage/transcript.js +304 -178
- package/dist/src/storage/usage.js +22 -5
- package/dist/src/tools/native-tools.js +10 -1
- package/dist/src/tools/registry.d.ts +1 -0
- package/dist/src/tools/registry.js +30 -2
- package/dist/src/types/index.d.ts +1 -1
- package/dist/src/ui/app.js +0 -0
- package/dist/src/ui/slash/expand.js +14 -1
- package/dist/src/ui/use-app-logic.js +0 -0
- package/dist/src/utils/install-manager.d.ts +2 -0
- package/dist/src/utils/install-manager.js +105 -7
- package/dist/src/utils/logger.d.ts +28 -0
- package/dist/src/utils/logger.js +171 -0
- package/dist/src/utils/settings.d.ts +9 -1
- package/dist/src/utils/settings.js +59 -22
- package/dist/src/utils/update-checker.js +12 -2
- package/package.json +8 -1
- 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 -155
- 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 -163
- 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 -188
- 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__/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__/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 -520
- 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 -197
- 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__/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 -98
- 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 -56
- 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-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 -127
- 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 -138
- 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,181 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for scope-ceiling module (Plan 04-4B).
|
|
3
|
-
*
|
|
4
|
-
* Covers:
|
|
5
|
-
* - Matrix lookup for every task_type × size cell (all 7 task_type rows
|
|
6
|
-
* referenced verbatim per locked CONTEXT)
|
|
7
|
-
* - Unknown taskType fallback to "general" row
|
|
8
|
-
* - parseBudgetOverride flag extraction + prompt cleaning
|
|
9
|
-
* - Session counter persistence + per-session isolation
|
|
10
|
-
* - Soft-warn step computation
|
|
11
|
-
* - forcedFinalize delegates to passed-in model factory (no hardcoded IDs)
|
|
12
|
-
*/
|
|
13
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
14
|
-
import { forcedFinalize, getSessionLastTask, getSessionStepCount, incSessionStep, parseBudgetOverride, recordSessionLastTask, resetSessionStep, resolveCeiling, softWarnStep, } from "./scope-ceiling.js";
|
|
15
|
-
describe("resolveCeiling — matrix lookup (locked verbatim)", () => {
|
|
16
|
-
it("analyze row", () => {
|
|
17
|
-
expect(resolveCeiling("analyze", "small")).toBe(5);
|
|
18
|
-
expect(resolveCeiling("analyze", "medium")).toBe(10);
|
|
19
|
-
expect(resolveCeiling("analyze", "large")).toBe(15);
|
|
20
|
-
});
|
|
21
|
-
it("debug row", () => {
|
|
22
|
-
expect(resolveCeiling("debug", "small")).toBe(6);
|
|
23
|
-
expect(resolveCeiling("debug", "medium")).toBe(12);
|
|
24
|
-
expect(resolveCeiling("debug", "large")).toBe(20);
|
|
25
|
-
});
|
|
26
|
-
it("refactor row", () => {
|
|
27
|
-
expect(resolveCeiling("refactor", "small")).toBe(8);
|
|
28
|
-
expect(resolveCeiling("refactor", "medium")).toBe(14);
|
|
29
|
-
expect(resolveCeiling("refactor", "large")).toBe(22);
|
|
30
|
-
});
|
|
31
|
-
it("generate row", () => {
|
|
32
|
-
expect(resolveCeiling("generate", "small")).toBe(10);
|
|
33
|
-
expect(resolveCeiling("generate", "medium")).toBe(18);
|
|
34
|
-
expect(resolveCeiling("generate", "large")).toBe(30);
|
|
35
|
-
});
|
|
36
|
-
it("plan row", () => {
|
|
37
|
-
expect(resolveCeiling("plan", "small")).toBe(4);
|
|
38
|
-
expect(resolveCeiling("plan", "medium")).toBe(8);
|
|
39
|
-
expect(resolveCeiling("plan", "large")).toBe(12);
|
|
40
|
-
});
|
|
41
|
-
it("documentation row", () => {
|
|
42
|
-
expect(resolveCeiling("documentation", "small")).toBe(5);
|
|
43
|
-
expect(resolveCeiling("documentation", "medium")).toBe(8);
|
|
44
|
-
expect(resolveCeiling("documentation", "large")).toBe(12);
|
|
45
|
-
});
|
|
46
|
-
it("general row", () => {
|
|
47
|
-
expect(resolveCeiling("general", "small")).toBe(5);
|
|
48
|
-
expect(resolveCeiling("general", "medium")).toBe(10);
|
|
49
|
-
expect(resolveCeiling("general", "large")).toBe(20);
|
|
50
|
-
});
|
|
51
|
-
it("unknown taskType falls back to general row", () => {
|
|
52
|
-
expect(resolveCeiling("unknown-task", "small")).toBe(5);
|
|
53
|
-
expect(resolveCeiling("unknown-task", "medium")).toBe(10);
|
|
54
|
-
expect(resolveCeiling("unknown-task", "large")).toBe(20);
|
|
55
|
-
});
|
|
56
|
-
it("null/undefined taskType falls back to general", () => {
|
|
57
|
-
expect(resolveCeiling(undefined, "medium")).toBe(10);
|
|
58
|
-
expect(resolveCeiling(null, "large")).toBe(20);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
describe("softWarnStep — floor(ceiling × 0.7)", () => {
|
|
62
|
-
it("computes 70% floor", () => {
|
|
63
|
-
expect(softWarnStep(10)).toBe(7);
|
|
64
|
-
expect(softWarnStep(20)).toBe(14);
|
|
65
|
-
expect(softWarnStep(5)).toBe(3); // floor(3.5)
|
|
66
|
-
expect(softWarnStep(8)).toBe(5); // floor(5.6)
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
describe("parseBudgetOverride", () => {
|
|
70
|
-
it("extracts numeric override + strips flag from prompt", () => {
|
|
71
|
-
const r = parseBudgetOverride("--budget-rounds 20 fix bug");
|
|
72
|
-
expect(r.override).toBe(20);
|
|
73
|
-
expect(r.cleanedPrompt).toBe("fix bug");
|
|
74
|
-
});
|
|
75
|
-
it("handles flag in middle of prompt", () => {
|
|
76
|
-
const r = parseBudgetOverride("fix --budget-rounds 50 the bug");
|
|
77
|
-
expect(r.override).toBe(50);
|
|
78
|
-
expect(r.cleanedPrompt).toBe("fix the bug");
|
|
79
|
-
});
|
|
80
|
-
it("returns undefined override when flag absent", () => {
|
|
81
|
-
const r = parseBudgetOverride("no flag here");
|
|
82
|
-
expect(r.override).toBeUndefined();
|
|
83
|
-
expect(r.cleanedPrompt).toBe("no flag here");
|
|
84
|
-
});
|
|
85
|
-
it("preserves empty prompt when flag is whole input", () => {
|
|
86
|
-
const r = parseBudgetOverride("--budget-rounds 7");
|
|
87
|
-
expect(r.override).toBe(7);
|
|
88
|
-
expect(r.cleanedPrompt).toBe("");
|
|
89
|
-
});
|
|
90
|
-
it("trims surrounding whitespace after strip", () => {
|
|
91
|
-
const r = parseBudgetOverride(" --budget-rounds 3 do thing ");
|
|
92
|
-
expect(r.override).toBe(3);
|
|
93
|
-
expect(r.cleanedPrompt).toBe("do thing");
|
|
94
|
-
});
|
|
95
|
-
it("ignores malformed (non-numeric) value", () => {
|
|
96
|
-
const r = parseBudgetOverride("--budget-rounds abc do thing");
|
|
97
|
-
expect(r.override).toBeUndefined();
|
|
98
|
-
expect(r.cleanedPrompt).toBe("--budget-rounds abc do thing");
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
describe("session counter", () => {
|
|
102
|
-
afterEach(() => {
|
|
103
|
-
resetSessionStep("sess-A");
|
|
104
|
-
resetSessionStep("sess-B");
|
|
105
|
-
});
|
|
106
|
-
it("increment + read across two calls preserves count", () => {
|
|
107
|
-
expect(getSessionStepCount("sess-A")).toBe(0);
|
|
108
|
-
expect(incSessionStep("sess-A")).toBe(1);
|
|
109
|
-
expect(incSessionStep("sess-A")).toBe(2);
|
|
110
|
-
expect(getSessionStepCount("sess-A")).toBe(2);
|
|
111
|
-
});
|
|
112
|
-
it("different sessionId is isolated", () => {
|
|
113
|
-
incSessionStep("sess-A");
|
|
114
|
-
incSessionStep("sess-A");
|
|
115
|
-
incSessionStep("sess-A");
|
|
116
|
-
expect(getSessionStepCount("sess-A")).toBe(3);
|
|
117
|
-
expect(getSessionStepCount("sess-B")).toBe(0);
|
|
118
|
-
expect(incSessionStep("sess-B")).toBe(1);
|
|
119
|
-
expect(getSessionStepCount("sess-A")).toBe(3);
|
|
120
|
-
});
|
|
121
|
-
it("reset clears the counter", () => {
|
|
122
|
-
incSessionStep("sess-A");
|
|
123
|
-
incSessionStep("sess-A");
|
|
124
|
-
resetSessionStep("sess-A");
|
|
125
|
-
expect(getSessionStepCount("sess-A")).toBe(0);
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
describe("forcedFinalize", () => {
|
|
129
|
-
it("delegates to passed-in model — no hardcoded model id", async () => {
|
|
130
|
-
// Mock model factory that returns canned text. The shape mirrors what the
|
|
131
|
-
// AI SDK streamText would expose; forcedFinalize unwraps `.text` (or the
|
|
132
|
-
// async equivalent) and returns { text }.
|
|
133
|
-
const mockModel = {
|
|
134
|
-
__isMock: true,
|
|
135
|
-
// Marker so the implementation can detect this is a mock and short-circuit.
|
|
136
|
-
};
|
|
137
|
-
const result = await forcedFinalize({
|
|
138
|
-
model: mockModel,
|
|
139
|
-
messages: [{ role: "user", content: "hello" }],
|
|
140
|
-
system: "be brief",
|
|
141
|
-
// Test-only injection — production callers pass `model` only.
|
|
142
|
-
__testInvoke: async () => ({ text: "[forced-finalize] partial answer" }),
|
|
143
|
-
});
|
|
144
|
-
expect(result.text).toContain("forced-finalize");
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
describe("Phase 5 — session last-task tracking (Fix 2)", () => {
|
|
148
|
-
afterEach(() => {
|
|
149
|
-
const host = globalThis;
|
|
150
|
-
host.__muonroiSessionLastTask?.clear();
|
|
151
|
-
});
|
|
152
|
-
it("records and reads the last non-chitchat task row", () => {
|
|
153
|
-
recordSessionLastTask("sess-X", "generate", "medium");
|
|
154
|
-
expect(getSessionLastTask("sess-X")).toEqual({ taskType: "generate", size: "medium" });
|
|
155
|
-
});
|
|
156
|
-
it("returns null when no task has been recorded", () => {
|
|
157
|
-
expect(getSessionLastTask("sess-empty")).toBeNull();
|
|
158
|
-
});
|
|
159
|
-
it("ignores chitchat / general / empty taskType writes", () => {
|
|
160
|
-
recordSessionLastTask("sess-Y", "general", "small");
|
|
161
|
-
expect(getSessionLastTask("sess-Y")).toBeNull();
|
|
162
|
-
recordSessionLastTask("sess-Y", "", "small");
|
|
163
|
-
expect(getSessionLastTask("sess-Y")).toBeNull();
|
|
164
|
-
});
|
|
165
|
-
it("isolates sessions from each other", () => {
|
|
166
|
-
recordSessionLastTask("sess-A", "refactor", "large");
|
|
167
|
-
recordSessionLastTask("sess-B", "debug", "small");
|
|
168
|
-
expect(getSessionLastTask("sess-A")).toEqual({ taskType: "refactor", size: "large" });
|
|
169
|
-
expect(getSessionLastTask("sess-B")).toEqual({ taskType: "debug", size: "small" });
|
|
170
|
-
});
|
|
171
|
-
it("overwrites prior row on subsequent task turns within the same session", () => {
|
|
172
|
-
recordSessionLastTask("sess-C", "analyze", "small");
|
|
173
|
-
recordSessionLastTask("sess-C", "refactor", "medium");
|
|
174
|
-
expect(getSessionLastTask("sess-C")).toEqual({ taskType: "refactor", size: "medium" });
|
|
175
|
-
});
|
|
176
|
-
it("rejects empty sessionId", () => {
|
|
177
|
-
recordSessionLastTask("", "generate", "medium");
|
|
178
|
-
expect(getSessionLastTask("")).toBeNull();
|
|
179
|
-
});
|
|
180
|
-
});
|
|
181
|
-
//# sourceMappingURL=scope-ceiling.test.js.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* src/orchestrator/scope-reminder.test.ts
|
|
3
|
-
*
|
|
4
|
-
* Phase 04 / Plan 4A — REQ-005 scope reminder cadence + format + soft-warn.
|
|
5
|
-
*
|
|
6
|
-
* Locked behaviour per 04-CONTEXT.md (Scope reminder 4A):
|
|
7
|
-
* - Cadence K: 3 small / 5 medium / 8 large; hard floor K >= 3
|
|
8
|
-
* - Format (<=200 chars):
|
|
9
|
-
* [scope-check step N/CEILING — task=TASKTYPE size=SIZE]
|
|
10
|
-
* original: "PROMPT_SNIPPET (first 100 chars)"
|
|
11
|
-
* still on scope? if no → emit final answer; if yes → continue.
|
|
12
|
-
* - Soft-warn fires ONCE per session at step === floor(ceiling * 0.7)
|
|
13
|
-
* - Reminder lives in tool_result/system message — never in system prompt
|
|
14
|
-
*/
|
|
15
|
-
export {};
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* src/orchestrator/scope-reminder.test.ts
|
|
3
|
-
*
|
|
4
|
-
* Phase 04 / Plan 4A — REQ-005 scope reminder cadence + format + soft-warn.
|
|
5
|
-
*
|
|
6
|
-
* Locked behaviour per 04-CONTEXT.md (Scope reminder 4A):
|
|
7
|
-
* - Cadence K: 3 small / 5 medium / 8 large; hard floor K >= 3
|
|
8
|
-
* - Format (<=200 chars):
|
|
9
|
-
* [scope-check step N/CEILING — task=TASKTYPE size=SIZE]
|
|
10
|
-
* original: "PROMPT_SNIPPET (first 100 chars)"
|
|
11
|
-
* still on scope? if no → emit final answer; if yes → continue.
|
|
12
|
-
* - Soft-warn fires ONCE per session at step === floor(ceiling * 0.7)
|
|
13
|
-
* - Reminder lives in tool_result/system message — never in system prompt
|
|
14
|
-
*/
|
|
15
|
-
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
16
|
-
import { attachReminderToMessages, buildScopeReminder, cadenceForSize, shouldInjectCeilingCrossing, shouldInjectReminder, shouldInjectSoftWarn, shouldPreWarnCompaction, } from "./scope-reminder.js";
|
|
17
|
-
describe("cadenceForSize", () => {
|
|
18
|
-
it("locks 3/5/8 for small/medium/large with hard floor >= 3", () => {
|
|
19
|
-
expect(cadenceForSize("small")).toBe(3);
|
|
20
|
-
expect(cadenceForSize("medium")).toBe(5);
|
|
21
|
-
expect(cadenceForSize("large")).toBe(8);
|
|
22
|
-
});
|
|
23
|
-
it("defends the K >= 3 hard floor against unknown sizes", () => {
|
|
24
|
-
// Cast through unknown — the public contract is "small"|"medium"|"large"
|
|
25
|
-
// but a caller can still pass garbage at runtime. Floor must hold.
|
|
26
|
-
expect(cadenceForSize("tiny")).toBeGreaterThanOrEqual(3);
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
describe("shouldInjectReminder", () => {
|
|
30
|
-
it("returns true at every multiple of K, false elsewhere", () => {
|
|
31
|
-
expect(shouldInjectReminder(0, 3)).toBe(false); // step 0 is pre-loop
|
|
32
|
-
expect(shouldInjectReminder(1, 3)).toBe(false);
|
|
33
|
-
expect(shouldInjectReminder(2, 3)).toBe(false);
|
|
34
|
-
expect(shouldInjectReminder(3, 3)).toBe(true);
|
|
35
|
-
expect(shouldInjectReminder(4, 3)).toBe(false);
|
|
36
|
-
expect(shouldInjectReminder(5, 3)).toBe(false);
|
|
37
|
-
expect(shouldInjectReminder(6, 3)).toBe(true);
|
|
38
|
-
expect(shouldInjectReminder(9, 3)).toBe(true);
|
|
39
|
-
});
|
|
40
|
-
it("works for K=5 (medium) and K=8 (large)", () => {
|
|
41
|
-
expect(shouldInjectReminder(5, 5)).toBe(true);
|
|
42
|
-
expect(shouldInjectReminder(10, 5)).toBe(true);
|
|
43
|
-
expect(shouldInjectReminder(7, 5)).toBe(false);
|
|
44
|
-
expect(shouldInjectReminder(8, 8)).toBe(true);
|
|
45
|
-
expect(shouldInjectReminder(16, 8)).toBe(true);
|
|
46
|
-
expect(shouldInjectReminder(9, 8)).toBe(false);
|
|
47
|
-
});
|
|
48
|
-
it("never fires for non-positive step", () => {
|
|
49
|
-
expect(shouldInjectReminder(-1, 3)).toBe(false);
|
|
50
|
-
expect(shouldInjectReminder(0, 3)).toBe(false);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
describe("shouldInjectSoftWarn", () => {
|
|
54
|
-
beforeEach(() => {
|
|
55
|
-
// Reset global one-shot guard between tests.
|
|
56
|
-
globalThis.__muonroiSoftWarnFired = undefined;
|
|
57
|
-
});
|
|
58
|
-
afterEach(() => {
|
|
59
|
-
globalThis.__muonroiSoftWarnFired = undefined;
|
|
60
|
-
});
|
|
61
|
-
it("fires once at floor(ceiling * 0.7) per session", () => {
|
|
62
|
-
// ceiling 10 -> floor(7) = 7
|
|
63
|
-
expect(shouldInjectSoftWarn(6, 10, "sess-A")).toBe(false);
|
|
64
|
-
expect(shouldInjectSoftWarn(7, 10, "sess-A")).toBe(true);
|
|
65
|
-
// Subsequent calls within same session return false.
|
|
66
|
-
expect(shouldInjectSoftWarn(7, 10, "sess-A")).toBe(false);
|
|
67
|
-
expect(shouldInjectSoftWarn(8, 10, "sess-A")).toBe(false);
|
|
68
|
-
});
|
|
69
|
-
it("fires independently per session id", () => {
|
|
70
|
-
expect(shouldInjectSoftWarn(7, 10, "sess-A")).toBe(true);
|
|
71
|
-
// Different session — fresh one-shot.
|
|
72
|
-
expect(shouldInjectSoftWarn(7, 10, "sess-B")).toBe(true);
|
|
73
|
-
expect(shouldInjectSoftWarn(7, 10, "sess-B")).toBe(false);
|
|
74
|
-
});
|
|
75
|
-
it("does not fire below threshold", () => {
|
|
76
|
-
// ceiling 20 -> floor(14)
|
|
77
|
-
expect(shouldInjectSoftWarn(13, 20, "s1")).toBe(false);
|
|
78
|
-
expect(shouldInjectSoftWarn(14, 20, "s1")).toBe(true);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
describe("shouldInjectCeilingCrossing", () => {
|
|
82
|
-
beforeEach(() => {
|
|
83
|
-
globalThis.__muonroiCeilingCrossingFired = undefined;
|
|
84
|
-
});
|
|
85
|
-
afterEach(() => {
|
|
86
|
-
globalThis.__muonroiCeilingCrossingFired = undefined;
|
|
87
|
-
});
|
|
88
|
-
it("fires exactly once per session at the first step past the natural ceiling", () => {
|
|
89
|
-
expect(shouldInjectCeilingCrossing(6, 6, "s1")).toBe(false); // equal, not past
|
|
90
|
-
expect(shouldInjectCeilingCrossing(7, 6, "s1")).toBe(true); // first crossing
|
|
91
|
-
expect(shouldInjectCeilingCrossing(8, 6, "s1")).toBe(false); // already fired
|
|
92
|
-
expect(shouldInjectCeilingCrossing(77, 6, "s1")).toBe(false); // still suppressed
|
|
93
|
-
});
|
|
94
|
-
it("fires independently per session", () => {
|
|
95
|
-
expect(shouldInjectCeilingCrossing(7, 6, "a")).toBe(true);
|
|
96
|
-
expect(shouldInjectCeilingCrossing(7, 6, "b")).toBe(true);
|
|
97
|
-
expect(shouldInjectCeilingCrossing(8, 6, "b")).toBe(false);
|
|
98
|
-
});
|
|
99
|
-
it("never fires below or at the ceiling", () => {
|
|
100
|
-
expect(shouldInjectCeilingCrossing(1, 6, "x")).toBe(false);
|
|
101
|
-
expect(shouldInjectCeilingCrossing(6, 6, "x")).toBe(false);
|
|
102
|
-
});
|
|
103
|
-
it("rejects non-positive or non-finite inputs", () => {
|
|
104
|
-
expect(shouldInjectCeilingCrossing(0, 6, "x")).toBe(false);
|
|
105
|
-
expect(shouldInjectCeilingCrossing(-1, 6, "x")).toBe(false);
|
|
106
|
-
expect(shouldInjectCeilingCrossing(7, 0, "x")).toBe(false);
|
|
107
|
-
expect(shouldInjectCeilingCrossing(Number.NaN, 6, "x")).toBe(false);
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
describe("buildScopeReminder", () => {
|
|
111
|
-
it("contains verbatim first 100 chars of prompt and stays <= 200 chars", () => {
|
|
112
|
-
const prompt = "A".repeat(200);
|
|
113
|
-
const out = buildScopeReminder({
|
|
114
|
-
step: 3,
|
|
115
|
-
ceiling: 10,
|
|
116
|
-
taskType: "refactor",
|
|
117
|
-
size: "small",
|
|
118
|
-
originalPrompt: prompt,
|
|
119
|
-
});
|
|
120
|
-
expect(out.length).toBeLessThanOrEqual(200);
|
|
121
|
-
// First 100 chars of prompt must appear verbatim.
|
|
122
|
-
expect(out).toContain("A".repeat(100));
|
|
123
|
-
// Header marker present (4V harness asserts this exact prefix).
|
|
124
|
-
expect(out).toMatch(/\[scope-check step 3\//);
|
|
125
|
-
expect(out).toContain("still on scope?");
|
|
126
|
-
});
|
|
127
|
-
it("uses whole prompt when shorter than 100 chars (no padding)", () => {
|
|
128
|
-
const out = buildScopeReminder({
|
|
129
|
-
step: 5,
|
|
130
|
-
ceiling: 14,
|
|
131
|
-
taskType: "debug",
|
|
132
|
-
size: "medium",
|
|
133
|
-
originalPrompt: "short prompt",
|
|
134
|
-
});
|
|
135
|
-
expect(out).toContain('"short prompt"');
|
|
136
|
-
expect(out.length).toBeLessThanOrEqual(200);
|
|
137
|
-
});
|
|
138
|
-
it("escapes embedded quote characters in the snippet", () => {
|
|
139
|
-
const out = buildScopeReminder({
|
|
140
|
-
step: 3,
|
|
141
|
-
ceiling: 10,
|
|
142
|
-
taskType: "generate",
|
|
143
|
-
size: "small",
|
|
144
|
-
originalPrompt: 'fix bug with "quoted" word',
|
|
145
|
-
});
|
|
146
|
-
// Embedded quote must be escaped to keep the snippet parseable.
|
|
147
|
-
expect(out).toMatch(/\\"quoted\\"/);
|
|
148
|
-
expect(out.length).toBeLessThanOrEqual(200);
|
|
149
|
-
});
|
|
150
|
-
it("hard-truncates final string to 200 chars defensively", () => {
|
|
151
|
-
// Even with monster taskType / size labels, hard cap holds.
|
|
152
|
-
const out = buildScopeReminder({
|
|
153
|
-
step: 9999,
|
|
154
|
-
ceiling: 99999,
|
|
155
|
-
taskType: "x".repeat(50),
|
|
156
|
-
size: "y".repeat(50),
|
|
157
|
-
originalPrompt: "P".repeat(500),
|
|
158
|
-
});
|
|
159
|
-
expect(out.length).toBeLessThanOrEqual(200);
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
describe("attachReminderToMessages", () => {
|
|
163
|
-
it("appends reminder text to the last tool message", () => {
|
|
164
|
-
const messages = [
|
|
165
|
-
{ role: "user", content: "do the thing" },
|
|
166
|
-
{
|
|
167
|
-
role: "tool",
|
|
168
|
-
content: [
|
|
169
|
-
{
|
|
170
|
-
type: "tool-result",
|
|
171
|
-
toolCallId: "id1",
|
|
172
|
-
toolName: "read_file",
|
|
173
|
-
output: { type: "text", value: "file contents" },
|
|
174
|
-
},
|
|
175
|
-
],
|
|
176
|
-
},
|
|
177
|
-
];
|
|
178
|
-
const out = attachReminderToMessages(messages, "[scope-check step 3/10] etc");
|
|
179
|
-
expect(out.length).toBe(2);
|
|
180
|
-
const last = out[1];
|
|
181
|
-
expect(last.role).toBe("tool");
|
|
182
|
-
// Reminder text appears appended either as a new tool-result text
|
|
183
|
-
// value, or as a wrapper around the existing one. The contract is:
|
|
184
|
-
// the reminder string is now present in the JSON-stringified last msg.
|
|
185
|
-
expect(JSON.stringify(last)).toContain("[scope-check step 3/10] etc");
|
|
186
|
-
});
|
|
187
|
-
it("appends a system message when last message is text-only assistant", () => {
|
|
188
|
-
const messages = [
|
|
189
|
-
{ role: "user", content: "hi" },
|
|
190
|
-
{ role: "assistant", content: "ok" },
|
|
191
|
-
];
|
|
192
|
-
const out = attachReminderToMessages(messages, "remind");
|
|
193
|
-
expect(out.length).toBe(3);
|
|
194
|
-
const tail = out[2];
|
|
195
|
-
expect(tail.role).toBe("system");
|
|
196
|
-
expect(tail.content).toBe("remind");
|
|
197
|
-
});
|
|
198
|
-
it("returns input unchanged when reminder is empty", () => {
|
|
199
|
-
const messages = [{ role: "user", content: "hi" }];
|
|
200
|
-
const out = attachReminderToMessages(messages, "");
|
|
201
|
-
expect(out).toEqual(messages);
|
|
202
|
-
});
|
|
203
|
-
});
|
|
204
|
-
describe("shouldPreWarnCompaction (regression: session 2b7a10219499 dead pre-warning)", () => {
|
|
205
|
-
const THRESHOLD = 200_000; // MUONROI_TOP_LEVEL_COMPACT_THRESHOLD_CHARS default
|
|
206
|
-
it("fires when prompt chars reach >=78% of the threshold (approaching compaction)", () => {
|
|
207
|
-
expect(shouldPreWarnCompaction(Math.floor(THRESHOLD * 0.78), THRESHOLD)).toBe(true);
|
|
208
|
-
expect(shouldPreWarnCompaction(190_000, THRESHOLD)).toBe(true);
|
|
209
|
-
});
|
|
210
|
-
it("does NOT fire while comfortably below the threshold", () => {
|
|
211
|
-
expect(shouldPreWarnCompaction(100_000, THRESHOLD)).toBe(false);
|
|
212
|
-
expect(shouldPreWarnCompaction(0, THRESHOLD)).toBe(false);
|
|
213
|
-
});
|
|
214
|
-
it("guards against the original bug: a message COUNT can never trip a char threshold", () => {
|
|
215
|
-
// The dead wiring compared stripped.length (a message count, ~tens) to the
|
|
216
|
-
// char-scaled threshold. With chars it crosses; with a count it never does.
|
|
217
|
-
const messageCount = 60; // plausible long-session message count
|
|
218
|
-
expect(shouldPreWarnCompaction(messageCount, THRESHOLD)).toBe(false);
|
|
219
|
-
expect(shouldPreWarnCompaction(170_000, THRESHOLD)).toBe(true);
|
|
220
|
-
});
|
|
221
|
-
it("is inert for a zero/negative threshold (no compaction configured)", () => {
|
|
222
|
-
expect(shouldPreWarnCompaction(999_999, 0)).toBe(false);
|
|
223
|
-
});
|
|
224
|
-
});
|
|
225
|
-
//# sourceMappingURL=scope-reminder.test.js.map
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* session-experience — in-process record of the agent's lived session, so a
|
|
3
|
-
* "cảm nhận trong CLI" / "are you blind?" question is answered from data, not by
|
|
4
|
-
* re-reading source. Also the "measure before re-architecting" instrumentation.
|
|
5
|
-
*/
|
|
6
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
7
|
-
import { __resetSessionExperienceForTests, formatElisionManifest, formatSessionExperience, getSessionExperience, isSessionExperienceEmpty, recentElisions, recordCompaction, recordEeEvent, recordElision, recordRehydration, } from "./session-experience.js";
|
|
8
|
-
describe("session-experience tracker", () => {
|
|
9
|
-
afterEach(() => __resetSessionExperienceForTests());
|
|
10
|
-
it("starts empty and reports an intact-context felt summary", () => {
|
|
11
|
-
expect(isSessionExperienceEmpty()).toBe(true);
|
|
12
|
-
const text = formatSessionExperience();
|
|
13
|
-
expect(text).toContain("Nothing notable");
|
|
14
|
-
expect(text).toContain("context is intact this session");
|
|
15
|
-
// Steering line must always tell the agent to use lived data, not source.
|
|
16
|
-
expect(text).toMatch(/not by reading the CLI source/i);
|
|
17
|
-
});
|
|
18
|
-
it("accumulates compaction, elision, rehydration and EE counters", () => {
|
|
19
|
-
recordCompaction(4);
|
|
20
|
-
recordCompaction(9);
|
|
21
|
-
recordElision("call_a", "read_file", 4100, 4);
|
|
22
|
-
recordElision("call_b", "grep", 2300, 9);
|
|
23
|
-
recordRehydration("cache");
|
|
24
|
-
recordRehydration("unavailable");
|
|
25
|
-
recordEeEvent("timeout");
|
|
26
|
-
const s = getSessionExperience();
|
|
27
|
-
expect(s.compactions).toBe(2);
|
|
28
|
-
expect(s.lastCompactionStep).toBe(9);
|
|
29
|
-
expect(s.elisions).toHaveLength(2);
|
|
30
|
-
expect(s.totalElidedChars).toBe(6400);
|
|
31
|
-
expect(s.rehydrations.cache).toBe(1);
|
|
32
|
-
expect(s.rehydrations.unavailable).toBe(1);
|
|
33
|
-
expect(s.eeTimeouts).toBe(1);
|
|
34
|
-
expect(isSessionExperienceEmpty()).toBe(false);
|
|
35
|
-
});
|
|
36
|
-
it("felt summary reflects real counters when non-empty", () => {
|
|
37
|
-
recordCompaction(3);
|
|
38
|
-
recordElision("call_x", "read_file", 5000, 3);
|
|
39
|
-
recordRehydration("ee");
|
|
40
|
-
const text = formatSessionExperience();
|
|
41
|
-
expect(text).toContain("fired 1x");
|
|
42
|
-
expect(text).toContain("last at step 3");
|
|
43
|
-
expect(text).toContain("Tool outputs elided: 1");
|
|
44
|
-
expect(text).toContain("ee=1");
|
|
45
|
-
expect(text).not.toContain("Nothing notable");
|
|
46
|
-
});
|
|
47
|
-
it("recentElisions returns newest first and respects the cap arg", () => {
|
|
48
|
-
for (let i = 0; i < 6; i++)
|
|
49
|
-
recordElision(`call_${i}`, "read_file", 1000 + i, i);
|
|
50
|
-
const recent = recentElisions(3);
|
|
51
|
-
expect(recent.map((e) => e.toolCallId)).toEqual(["call_5", "call_4", "call_3"]);
|
|
52
|
-
});
|
|
53
|
-
it("formatElisionManifest is empty with no elisions, actionable otherwise", () => {
|
|
54
|
-
expect(formatElisionManifest()).toBe("");
|
|
55
|
-
recordElision("0123456789abcdefXYZ", "read_file", 4096, 7);
|
|
56
|
-
const m = formatElisionManifest();
|
|
57
|
-
// id is shortened, tool + char count present, and points at ee_query.
|
|
58
|
-
expect(m).toContain("id=0123456789ab");
|
|
59
|
-
expect(m).toContain("read_file (4096c)");
|
|
60
|
-
expect(m).toMatch(/ee_query "tool-artifact id=XXX"/);
|
|
61
|
-
});
|
|
62
|
-
it("caps the elision log at 200 (FIFO) without unbounded growth", () => {
|
|
63
|
-
for (let i = 0; i < 250; i++)
|
|
64
|
-
recordElision(`c_${i}`, "bash", 500, i);
|
|
65
|
-
const s = getSessionExperience();
|
|
66
|
-
expect(s.elisions).toHaveLength(200);
|
|
67
|
-
// Oldest 50 dropped; newest retained.
|
|
68
|
-
expect(s.elisions[0].toolCallId).toBe("c_50");
|
|
69
|
-
expect(s.elisions.at(-1).toolCallId).toBe("c_249");
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
//# sourceMappingURL=session-experience.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { attemptStallRescue, buildStallSynthesisMessages, detectReplyLanguageHint, pushStallToolResult, STALL_RESCUE_MAX_CHARS_PER_RESULT, STALL_RESCUE_MAX_RESULTS, } from "./stall-rescue.js";
|
|
3
|
-
describe("pushStallToolResult", () => {
|
|
4
|
-
it("caps the buffer count, keeping the most recent results", () => {
|
|
5
|
-
const buf = [];
|
|
6
|
-
for (let i = 0; i < STALL_RESCUE_MAX_RESULTS + 5; i++)
|
|
7
|
-
pushStallToolResult(buf, "bash", `out-${i}`);
|
|
8
|
-
expect(buf.length).toBe(STALL_RESCUE_MAX_RESULTS);
|
|
9
|
-
// oldest dropped, newest kept
|
|
10
|
-
expect(buf[buf.length - 1]?.text).toBe(`out-${STALL_RESCUE_MAX_RESULTS + 4}`);
|
|
11
|
-
expect(buf.some((r) => r.text === "out-0")).toBe(false);
|
|
12
|
-
});
|
|
13
|
-
it("truncates per-entry text and defaults a missing tool name", () => {
|
|
14
|
-
const buf = [];
|
|
15
|
-
pushStallToolResult(buf, "", "x".repeat(STALL_RESCUE_MAX_CHARS_PER_RESULT + 500));
|
|
16
|
-
expect(buf[0]?.tool).toBe("tool");
|
|
17
|
-
expect(buf[0]?.text.length).toBe(STALL_RESCUE_MAX_CHARS_PER_RESULT);
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
describe("buildStallSynthesisMessages", () => {
|
|
21
|
-
it("appends one synthetic user turn with the request + tool digest", () => {
|
|
22
|
-
const base = [{ role: "user", content: "hi" }];
|
|
23
|
-
const out = buildStallSynthesisMessages(base, "find a bug", [
|
|
24
|
-
{ tool: "grep", text: "match in a.ts" },
|
|
25
|
-
{ tool: "read_file", text: "contents" },
|
|
26
|
-
]);
|
|
27
|
-
expect(out.length).toBe(base.length + 1);
|
|
28
|
-
const last = out[out.length - 1];
|
|
29
|
-
expect(last.role).toBe("user");
|
|
30
|
-
expect(last.content).toContain("find a bug");
|
|
31
|
-
expect(last.content).toContain("grep");
|
|
32
|
-
expect(last.content).toContain("match in a.ts");
|
|
33
|
-
expect(last.content).toMatch(/Do NOT call any more tools/i);
|
|
34
|
-
// does not mutate the base array
|
|
35
|
-
expect(base.length).toBe(1);
|
|
36
|
-
});
|
|
37
|
-
it("prepends a Vietnamese reply directive when user wrote in Vietnamese", () => {
|
|
38
|
-
const out = buildStallSynthesisMessages([], "sửa thêm popup reload không xoá login", [
|
|
39
|
-
{ tool: "grep", text: "found" },
|
|
40
|
-
]);
|
|
41
|
-
const last = out[out.length - 1];
|
|
42
|
-
expect(last.content).toMatch(/^Reply in Vietnamese/);
|
|
43
|
-
expect(last.content).toContain("the user wrote in Vietnamese");
|
|
44
|
-
});
|
|
45
|
-
it("omits the language directive for plain English input", () => {
|
|
46
|
-
const out = buildStallSynthesisMessages([], "find a bug please", [{ tool: "grep", text: "found" }]);
|
|
47
|
-
const last = out[out.length - 1];
|
|
48
|
-
expect(last.content).not.toMatch(/^Reply in /);
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
describe("detectReplyLanguageHint", () => {
|
|
52
|
-
it("detects Vietnamese from any diacritic", () => {
|
|
53
|
-
expect(detectReplyLanguageHint("tìm")).toBe("Vietnamese");
|
|
54
|
-
expect(detectReplyLanguageHint("sửa thêm cho tôi")).toBe("Vietnamese");
|
|
55
|
-
expect(detectReplyLanguageHint("Cập nhật")).toBe("Vietnamese");
|
|
56
|
-
});
|
|
57
|
-
it("returns null for ASCII / English text", () => {
|
|
58
|
-
expect(detectReplyLanguageHint("commit and push please")).toBeNull();
|
|
59
|
-
expect(detectReplyLanguageHint("")).toBeNull();
|
|
60
|
-
});
|
|
61
|
-
it("returns null for a VN-only word with NO diacritics (the heuristic is conservative)", () => {
|
|
62
|
-
// 'commit push de auto ci/cd len prod nhe' — VN sans diacritics is indistinguishable
|
|
63
|
-
// from English under this heuristic. Acceptable: false negative, never false positive.
|
|
64
|
-
expect(detectReplyLanguageHint("commit push de auto ci/cd len prod nhe")).toBeNull();
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
describe("attemptStallRescue", () => {
|
|
68
|
-
it("returns null when there are no tool results (nothing to synthesize)", async () => {
|
|
69
|
-
let called = false;
|
|
70
|
-
const out = await attemptStallRescue({
|
|
71
|
-
baseMessages: [],
|
|
72
|
-
userText: "q",
|
|
73
|
-
toolResults: [],
|
|
74
|
-
finalize: async () => {
|
|
75
|
-
called = true;
|
|
76
|
-
return { text: "should not run" };
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
expect(out).toBeNull();
|
|
80
|
-
expect(called).toBe(false);
|
|
81
|
-
});
|
|
82
|
-
it("returns the synthesized text when finalize yields content", async () => {
|
|
83
|
-
const out = await attemptStallRescue({
|
|
84
|
-
baseMessages: [{ role: "user", content: "x" }],
|
|
85
|
-
userText: "find a bug",
|
|
86
|
-
toolResults: [{ tool: "grep", text: "found it in a.ts:42" }],
|
|
87
|
-
finalize: async ({ messages }) => {
|
|
88
|
-
// proves the digest reached the finalize call
|
|
89
|
-
const last = messages[messages.length - 1];
|
|
90
|
-
expect(last.content).toContain("a.ts:42");
|
|
91
|
-
return { text: "The bug is at a.ts:42 — null deref." };
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
expect(out).toBe("The bug is at a.ts:42 — null deref.");
|
|
95
|
-
});
|
|
96
|
-
it("returns null when finalize yields empty/whitespace text", async () => {
|
|
97
|
-
const out = await attemptStallRescue({
|
|
98
|
-
baseMessages: [],
|
|
99
|
-
userText: "q",
|
|
100
|
-
toolResults: [{ tool: "bash", text: "out" }],
|
|
101
|
-
finalize: async () => ({ text: " " }),
|
|
102
|
-
});
|
|
103
|
-
expect(out).toBeNull();
|
|
104
|
-
});
|
|
105
|
-
it("never throws — returns null when finalize rejects (provider still dead)", async () => {
|
|
106
|
-
const out = await attemptStallRescue({
|
|
107
|
-
baseMessages: [],
|
|
108
|
-
userText: "q",
|
|
109
|
-
toolResults: [{ tool: "bash", text: "out" }],
|
|
110
|
-
finalize: async () => {
|
|
111
|
-
throw new Error("stall again");
|
|
112
|
-
},
|
|
113
|
-
});
|
|
114
|
-
expect(out).toBeNull();
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
//# sourceMappingURL=stall-rescue.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|