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,463 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CQ-08: LeaderEvaluation evidenceDensity/disagreementResolved fields + <0.3 trigger
|
|
3
|
-
* CQ-10: debate-planner falls back to FALLBACK_PLAN when both generateObject and parsePlan fail
|
|
4
|
-
*/
|
|
5
|
-
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
6
|
-
// ── CQ-08: LeaderEvaluation type accepts new metric fields ───────────────────
|
|
7
|
-
describe("CQ-08: LeaderEvaluation type — evidenceDensity and disagreementResolved", () => {
|
|
8
|
-
it("LeaderEvaluation accepts evidenceDensity as optional number field", () => {
|
|
9
|
-
const evaluation = {
|
|
10
|
-
allCriteriaMet: false,
|
|
11
|
-
criteriaStatus: [],
|
|
12
|
-
unresolvedPoints: [],
|
|
13
|
-
needsResearch: false,
|
|
14
|
-
shouldContinue: true,
|
|
15
|
-
reason: "test reason",
|
|
16
|
-
evidenceDensity: 0.25,
|
|
17
|
-
};
|
|
18
|
-
expect(evaluation.evidenceDensity).toBe(0.25);
|
|
19
|
-
});
|
|
20
|
-
it("LeaderEvaluation accepts disagreementResolved as optional number field", () => {
|
|
21
|
-
const evaluation = {
|
|
22
|
-
allCriteriaMet: false,
|
|
23
|
-
criteriaStatus: [],
|
|
24
|
-
unresolvedPoints: ["point A"],
|
|
25
|
-
needsResearch: false,
|
|
26
|
-
shouldContinue: true,
|
|
27
|
-
reason: "test",
|
|
28
|
-
disagreementResolved: 2,
|
|
29
|
-
};
|
|
30
|
-
expect(evaluation.disagreementResolved).toBe(2);
|
|
31
|
-
});
|
|
32
|
-
it("LeaderEvaluation accepts both evidenceDensity and disagreementResolved together", () => {
|
|
33
|
-
const evaluation = {
|
|
34
|
-
allCriteriaMet: true,
|
|
35
|
-
criteriaStatus: [{ criterion: "accuracy", met: true, evidence: "[CONFIRMED via bash:grep output]" }],
|
|
36
|
-
unresolvedPoints: [],
|
|
37
|
-
needsResearch: false,
|
|
38
|
-
shouldContinue: false,
|
|
39
|
-
reason: "all criteria met",
|
|
40
|
-
evidenceDensity: 0.65,
|
|
41
|
-
disagreementResolved: 3,
|
|
42
|
-
};
|
|
43
|
-
expect(evaluation.evidenceDensity).toBe(0.65);
|
|
44
|
-
expect(evaluation.disagreementResolved).toBe(3);
|
|
45
|
-
});
|
|
46
|
-
it("evidenceDensity < 0.3 threshold: value 0.25 is below threshold", () => {
|
|
47
|
-
// Verify the threshold logic is testable — 0.25 < 0.3 should trigger needsResearch
|
|
48
|
-
const evidenceDensity = 0.25;
|
|
49
|
-
const round = 2;
|
|
50
|
-
const wasNeedsResearch = false;
|
|
51
|
-
// Simulate debate.ts evaluateDebate logic:
|
|
52
|
-
// if (!needsResearch && round >= 2 && evidenceDensity < 0.3) { needsResearch = true; }
|
|
53
|
-
let needsResearch = wasNeedsResearch;
|
|
54
|
-
if (!needsResearch && round >= 2 && evidenceDensity < 0.3) {
|
|
55
|
-
needsResearch = true;
|
|
56
|
-
}
|
|
57
|
-
expect(needsResearch).toBe(true);
|
|
58
|
-
});
|
|
59
|
-
it("evidenceDensity >= 0.3 threshold: value 0.5 does NOT force needsResearch", () => {
|
|
60
|
-
const evidenceDensity = 0.5;
|
|
61
|
-
const round = 2;
|
|
62
|
-
const wasNeedsResearch = false;
|
|
63
|
-
let needsResearch = wasNeedsResearch;
|
|
64
|
-
if (!needsResearch && round >= 2 && evidenceDensity < 0.3) {
|
|
65
|
-
needsResearch = true;
|
|
66
|
-
}
|
|
67
|
-
expect(needsResearch).toBe(false);
|
|
68
|
-
});
|
|
69
|
-
it("evidenceDensity < 0.3 on round 1 does NOT trigger needsResearch (requires round >= 2)", () => {
|
|
70
|
-
const evidenceDensity = 0.1;
|
|
71
|
-
const round = 1; // round 1 — no trigger
|
|
72
|
-
const wasNeedsResearch = false;
|
|
73
|
-
let needsResearch = wasNeedsResearch;
|
|
74
|
-
if (!needsResearch && round >= 2 && evidenceDensity < 0.3) {
|
|
75
|
-
needsResearch = true;
|
|
76
|
-
}
|
|
77
|
-
expect(needsResearch).toBe(false);
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
// ── CQ-08: countCitations and estimateClaims behavior (indirectly via formula) ─
|
|
81
|
-
describe("CQ-08: evidence density calculation logic", () => {
|
|
82
|
-
it("text with [REFUTED via bash:...] tags increases citation count", () => {
|
|
83
|
-
// Mirror the countCitations regex from debate.ts:
|
|
84
|
-
// /\[(REFUTED|CONFIRMED) via [^\]]+\]/g
|
|
85
|
-
const text = "Claim A [REFUTED via bash:grep found nothing] and claim B [CONFIRMED via bash:ls output].";
|
|
86
|
-
const matches = text.match(/\[(REFUTED|CONFIRMED) via [^\]]+\]/g);
|
|
87
|
-
const citationCount = matches?.length ?? 0;
|
|
88
|
-
expect(citationCount).toBe(2);
|
|
89
|
-
});
|
|
90
|
-
it("text without citation tags yields citation count of 0", () => {
|
|
91
|
-
const text = "This is an unverified claim. Another assertion follows.";
|
|
92
|
-
const matches = text.match(/\[(REFUTED|CONFIRMED) via [^\]]+\]/g);
|
|
93
|
-
const citationCount = matches?.length ?? 0;
|
|
94
|
-
expect(citationCount).toBe(0);
|
|
95
|
-
});
|
|
96
|
-
it("countUnverified matches [UNVERIFIED:...] tags", () => {
|
|
97
|
-
const text = "Some claim [UNVERIFIED: no source for this RTT number] and another [UNVERIFIED].";
|
|
98
|
-
const matches = text.match(/\[UNVERIFIED[^\]]*\]/g);
|
|
99
|
-
expect(matches?.length).toBe(2);
|
|
100
|
-
});
|
|
101
|
-
it("evidenceDensity = cited / (cited + unverified) — flag-aware metric", () => {
|
|
102
|
-
// Mirror computeEvidenceDensity from debate.ts.
|
|
103
|
-
// Old metric was cited / total-sentences which couldn't exceed ~0.05 in
|
|
104
|
-
// any real debate (most sentences aren't citable claims). New metric only
|
|
105
|
-
// counts claims that participants explicitly flagged.
|
|
106
|
-
const text = "Verified fact [CONFIRMED via web_fetch: x]. Verified again [CONFIRMED via grep:found]. " +
|
|
107
|
-
"Unsure number [UNVERIFIED: typical RTT]. Another unsure [UNVERIFIED: corpus coverage]. " +
|
|
108
|
-
"Lots of opinion prose that should not affect the density.";
|
|
109
|
-
const cited = (text.match(/\[(REFUTED|CONFIRMED) via [^\]]+\]/g) ?? []).length;
|
|
110
|
-
const unverified = (text.match(/\[UNVERIFIED[^\]]*\]/g) ?? []).length;
|
|
111
|
-
const totalTagged = cited + unverified;
|
|
112
|
-
const density = totalTagged > 0 ? cited / totalTagged : 0;
|
|
113
|
-
expect(cited).toBe(2);
|
|
114
|
-
expect(unverified).toBe(2);
|
|
115
|
-
expect(density).toBe(0.5);
|
|
116
|
-
});
|
|
117
|
-
it("evidenceDensity is 0 when no claims were tagged at all", () => {
|
|
118
|
-
const text = "This is pure opinion. No tags. No evidence awareness shown.";
|
|
119
|
-
const cited = (text.match(/\[(REFUTED|CONFIRMED) via [^\]]+\]/g) ?? []).length;
|
|
120
|
-
const unverified = (text.match(/\[UNVERIFIED[^\]]*\]/g) ?? []).length;
|
|
121
|
-
const totalTagged = cited + unverified;
|
|
122
|
-
const density = totalTagged > 0 ? cited / totalTagged : 0;
|
|
123
|
-
expect(density).toBe(0);
|
|
124
|
-
});
|
|
125
|
-
it("evidenceDensity is 1.0 when every tagged claim was verified", () => {
|
|
126
|
-
const text = "[CONFIRMED via bash:test]. [CONFIRMED via grep:found]. [REFUTED via web:no-match].";
|
|
127
|
-
const cited = (text.match(/\[(REFUTED|CONFIRMED) via [^\]]+\]/g) ?? []).length;
|
|
128
|
-
const unverified = (text.match(/\[UNVERIFIED[^\]]*\]/g) ?? []).length;
|
|
129
|
-
const totalTagged = cited + unverified;
|
|
130
|
-
const density = totalTagged > 0 ? cited / totalTagged : 0;
|
|
131
|
-
expect(density).toBe(1.0);
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
// ── P3: Lock-phrase convergence detection ────────────────────────────────────
|
|
135
|
-
describe("P3: convergence ratio over a round's pair-turns", () => {
|
|
136
|
-
// Mirror LOCK_PHRASES and convergenceRatio from debate.ts — kept in sync
|
|
137
|
-
// by code review. If the production list grows, this test should mirror
|
|
138
|
-
// the addition so behaviour stays observable.
|
|
139
|
-
const LOCK_PHRASES = [
|
|
140
|
-
/\bever[yi]thing\s+(is\s+)?locked\b/i,
|
|
141
|
-
/\bfully\s+aligned\b/i,
|
|
142
|
-
/\bcomplete\s+agreement\b/i,
|
|
143
|
-
/\bno\s+remaining\s+(disputes|disagreements|concerns)\b/i,
|
|
144
|
-
/\bdesign\s+(is\s+)?locked\b/i,
|
|
145
|
-
/\barchitectural\s+decisions\s+(are\s+)?locked\b/i,
|
|
146
|
-
/\bagree\s+on\s+where\s+we['']?ve\s+landed\b/i,
|
|
147
|
-
/\bready\s+to\s+(proceed|move|start)\s+to\s+implementation\b/i,
|
|
148
|
-
/\blet['']?s\s+proceed\s+to\s+implementation\b/i,
|
|
149
|
-
/\bfinal\s+(position|confirmation)\b/i,
|
|
150
|
-
/\b(i\s+)?(fully\s+|completely\s+)?(agree|agreed|concur)\s+(with|on)\b/i,
|
|
151
|
-
/\bsigned?\s+off\b/i,
|
|
152
|
-
/\bship\s+it\b/i,
|
|
153
|
-
/\bno\s+(further\s+|more\s+)?(objections?|concerns?|issues?)\b/i,
|
|
154
|
-
/\bgreen[\s-]?light\b/i,
|
|
155
|
-
/\blooks?\s+good\s+to\s+(me|go)\b/i,
|
|
156
|
-
/\bgood\s+to\s+(go|ship|proceed)\b/i,
|
|
157
|
-
/(^|\s)nh[ấâ]t\s+tr[íi](?=\s|[.,!?;:]|$)/i,
|
|
158
|
-
/(^|\s)[đd][ồô]ng\s+[ýy]\s+(ho[àa]n\s+to[àa]n|v[ớơ]i)(?=\s|[.,!?;:]|$)/i,
|
|
159
|
-
/(^|\s)kh[ôo]ng\s+c[òo]n\s+(g[òo]p\s+[ýy]|[ýy]\s+ki[ếê]n|tranh\s+lu[ậâ]n)(?=\s|[.,!?;:]|$)/i,
|
|
160
|
-
/(^|\s)s[ẵã]n\s+s[àa]ng\s+(tri[ểê]n\s+khai|implement)(?=\s|[.,!?;:]|$)/i,
|
|
161
|
-
/(^|\s)ch[ốô]t\s+(s[ổô]|l[ạa]i|design)(?=\s|[.,!?;:]|$)/i,
|
|
162
|
-
];
|
|
163
|
-
const NEGATION_HEAD = /\b(don'?t|do\s+not|does\s+not|doesn'?t|cannot|can'?t|not|no(t)?\s+yet|haven'?t|hasn'?t|kh[ôo]ng|ch[ưu]a)\b/i;
|
|
164
|
-
function looksLocked(text) {
|
|
165
|
-
if (!text || text.length < 20)
|
|
166
|
-
return false;
|
|
167
|
-
for (const re of LOCK_PHRASES) {
|
|
168
|
-
const match = re.exec(text);
|
|
169
|
-
if (!match)
|
|
170
|
-
continue;
|
|
171
|
-
const windowStart = Math.max(0, match.index - 24);
|
|
172
|
-
const upstream = text.slice(windowStart, match.index);
|
|
173
|
-
if (NEGATION_HEAD.test(upstream))
|
|
174
|
-
continue;
|
|
175
|
-
return true;
|
|
176
|
-
}
|
|
177
|
-
return false;
|
|
178
|
-
}
|
|
179
|
-
function convergenceRatio(turns) {
|
|
180
|
-
const usable = turns.filter((t) => t && t.trim().length >= 20);
|
|
181
|
-
if (usable.length === 0)
|
|
182
|
-
return 0;
|
|
183
|
-
const locked = usable.filter(looksLocked).length;
|
|
184
|
-
return locked / usable.length;
|
|
185
|
-
}
|
|
186
|
-
it("session ea13da132dec round 3 turns trip the 0.8 lock threshold", () => {
|
|
187
|
-
// Excerpts taken verbatim from the export; each is one pair-turn.
|
|
188
|
-
const r3Turns = [
|
|
189
|
-
"I agree with your comprehensive summary. Everything else is locked. I'm satisfied with where we've landed.",
|
|
190
|
-
"We're fully aligned. Everything Locked. No remaining disputes. The pipeline spec is now: ...",
|
|
191
|
-
"We're aligned. Two quick confirmations from my side: ... Design locked. The implementation spec can proceed.",
|
|
192
|
-
"We are in complete agreement on every architectural decision. The implementation specification can proceed.",
|
|
193
|
-
"All architectural decisions are locked. The only outstanding UX tweak is the short selectionchange dismissal delay.",
|
|
194
|
-
"All architectural decisions are locked. I'm ready to start drafting the content-script and background-script.",
|
|
195
|
-
];
|
|
196
|
-
const ratio = convergenceRatio(r3Turns);
|
|
197
|
-
expect(ratio).toBeGreaterThanOrEqual(0.8);
|
|
198
|
-
});
|
|
199
|
-
it("returns 0 when no turn contains lock phrases", () => {
|
|
200
|
-
const turns = [
|
|
201
|
-
"I still disagree about the debounce timing. 200ms feels sluggish for single-word selections.",
|
|
202
|
-
"Your argument for batch translation has merit but breaks the offline-first guarantee.",
|
|
203
|
-
];
|
|
204
|
-
expect(convergenceRatio(turns)).toBe(0);
|
|
205
|
-
});
|
|
206
|
-
it("ignores empty / too-short turns when computing ratio", () => {
|
|
207
|
-
const turns = ["", "ok", "All architectural decisions are locked, no remaining disputes."];
|
|
208
|
-
expect(convergenceRatio(turns)).toBe(1.0);
|
|
209
|
-
});
|
|
210
|
-
it("partial convergence (1 of 3 turns locked) is below threshold", () => {
|
|
211
|
-
const turns = [
|
|
212
|
-
"Design is locked from my side, ready to proceed.",
|
|
213
|
-
"I still have concerns about rate-limit handling under high load.",
|
|
214
|
-
"The auth flow needs another pass — we haven't settled on token rotation.",
|
|
215
|
-
];
|
|
216
|
-
expect(convergenceRatio(turns)).toBeLessThan(0.8);
|
|
217
|
-
});
|
|
218
|
-
it("upgrade A: broader EN convergence vocabulary (signed off / ship it / no objections)", () => {
|
|
219
|
-
const turns = [
|
|
220
|
-
"Signed off on the proposed architecture, no further concerns from my side.",
|
|
221
|
-
"I fully agree with the migration plan as outlined.",
|
|
222
|
-
"Ship it — green-light from the security review perspective.",
|
|
223
|
-
];
|
|
224
|
-
expect(convergenceRatio(turns)).toBe(1.0);
|
|
225
|
-
});
|
|
226
|
-
it("upgrade A: Vietnamese convergence vocabulary", () => {
|
|
227
|
-
const turns = [
|
|
228
|
-
"Tôi hoàn toàn nhất trí với thiết kế hiện tại, không còn ý kiến gì thêm.",
|
|
229
|
-
"Đồng ý hoàn toàn với phương án migration, có thể chốt sổ.",
|
|
230
|
-
"Sẵn sàng triển khai theo spec này, không còn tranh luận gì.",
|
|
231
|
-
];
|
|
232
|
-
expect(convergenceRatio(turns)).toBe(1.0);
|
|
233
|
-
});
|
|
234
|
-
it("upgrade A: negation guard prevents false positive on 'don't agree'", () => {
|
|
235
|
-
const turns = [
|
|
236
|
-
"I don't agree with the proposed caching layer, performance impact is unclear.",
|
|
237
|
-
"We do not concur with skipping the integration test phase here.",
|
|
238
|
-
"Tôi không nhất trí với cách tiếp cận này, có rủi ro về consistency.",
|
|
239
|
-
];
|
|
240
|
-
expect(convergenceRatio(turns)).toBe(0);
|
|
241
|
-
});
|
|
242
|
-
it("upgrade A: negation only blocks the matched phrase, downstream agreement still counts", () => {
|
|
243
|
-
// First clause negates; second clause is a separate positive lock signal far
|
|
244
|
-
// beyond the 24-char negation window — should still register as locked.
|
|
245
|
-
const turns = [
|
|
246
|
-
"I'm not entirely sold on the rollout plan today, but after looking at the metrics overnight everything is locked from my perspective.",
|
|
247
|
-
];
|
|
248
|
-
expect(convergenceRatio(turns)).toBe(1.0);
|
|
249
|
-
});
|
|
250
|
-
});
|
|
251
|
-
// ── P7: action-item reuse helpers (synthesizePlanFromActionItems shape) ──────
|
|
252
|
-
describe("P7: synthesizePlanFromActionItems — heterogeneous input handling", () => {
|
|
253
|
-
// Mirror the implementation in src/council/index.ts. Kept in sync by code
|
|
254
|
-
// review; if the helper signature changes, this test mirrors the update.
|
|
255
|
-
function synthesizePlanFromActionItems(items) {
|
|
256
|
-
const total = items.length;
|
|
257
|
-
const steps = items.map((raw, idx) => {
|
|
258
|
-
let description;
|
|
259
|
-
let agent;
|
|
260
|
-
let hasDeps = false;
|
|
261
|
-
if (typeof raw === "string") {
|
|
262
|
-
description = raw;
|
|
263
|
-
}
|
|
264
|
-
else if (raw && typeof raw === "object") {
|
|
265
|
-
const o = raw;
|
|
266
|
-
const step = typeof o.step === "string" ? o.step : "";
|
|
267
|
-
const owner = typeof o.owner_lens === "string" ? o.owner_lens : undefined;
|
|
268
|
-
const time = typeof o.time_estimate === "string" ? ` (${o.time_estimate})` : "";
|
|
269
|
-
const accept = typeof o.acceptance_criteria === "string" ? ` — accept: ${o.acceptance_criteria}` : "";
|
|
270
|
-
description = step ? `${step}${time}${accept}` : JSON.stringify(o).slice(0, 200);
|
|
271
|
-
agent = owner;
|
|
272
|
-
const deps = o.depends_on;
|
|
273
|
-
hasDeps =
|
|
274
|
-
(Array.isArray(deps) && deps.length > 0) ||
|
|
275
|
-
(typeof deps === "string" && deps.trim().length > 0 && deps !== "none");
|
|
276
|
-
}
|
|
277
|
-
else {
|
|
278
|
-
description = String(raw);
|
|
279
|
-
}
|
|
280
|
-
const inFirstHalf = idx < total / 2;
|
|
281
|
-
const inLastThird = idx >= (total * 2) / 3;
|
|
282
|
-
const priority = hasDeps || inLastThird ? (inLastThird ? "low" : "medium") : inFirstHalf ? "high" : "medium";
|
|
283
|
-
return { description, agent, priority };
|
|
284
|
-
});
|
|
285
|
-
const complexity = total <= 4 ? "trivial" : total <= 9 ? "moderate" : "complex";
|
|
286
|
-
return { steps, estimatedComplexity: complexity, prerequisites: [] };
|
|
287
|
-
}
|
|
288
|
-
it("converts structured action-item objects (session 1a8fb4be3bc3 shape)", () => {
|
|
289
|
-
const items = [
|
|
290
|
-
{
|
|
291
|
-
step: "Init scaffold",
|
|
292
|
-
owner_lens: "Extension Architect",
|
|
293
|
-
time_estimate: "2h",
|
|
294
|
-
depends_on: [],
|
|
295
|
-
acceptance_criteria: "Manifest valid",
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
step: "Capture selection",
|
|
299
|
-
owner_lens: "Integration Engineer",
|
|
300
|
-
time_estimate: "4h",
|
|
301
|
-
depends_on: ["Init scaffold"],
|
|
302
|
-
acceptance_criteria: "Text extracted",
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
step: "Tooltip UI",
|
|
306
|
-
owner_lens: "Integration Engineer",
|
|
307
|
-
time_estimate: "6h",
|
|
308
|
-
depends_on: ["Capture selection"],
|
|
309
|
-
acceptance_criteria: "Renders near anchor",
|
|
310
|
-
},
|
|
311
|
-
];
|
|
312
|
-
const plan = synthesizePlanFromActionItems(items);
|
|
313
|
-
expect(plan.steps).toHaveLength(3);
|
|
314
|
-
expect(plan.steps[0].description).toContain("Init scaffold");
|
|
315
|
-
expect(plan.steps[0].description).toContain("2h");
|
|
316
|
-
expect(plan.steps[0].description).toContain("Manifest valid");
|
|
317
|
-
expect(plan.steps[0].agent).toBe("Extension Architect");
|
|
318
|
-
expect(plan.estimatedComplexity).toBe("trivial");
|
|
319
|
-
});
|
|
320
|
-
it("falls back gracefully on string items (legacy actionItems shape)", () => {
|
|
321
|
-
const items = ["First step", "Second step", "Third step", "Fourth step"];
|
|
322
|
-
const plan = synthesizePlanFromActionItems(items);
|
|
323
|
-
expect(plan.steps).toHaveLength(4);
|
|
324
|
-
expect(plan.steps[0].description).toBe("First step");
|
|
325
|
-
expect(plan.steps[0].agent).toBeUndefined();
|
|
326
|
-
expect(plan.estimatedComplexity).toBe("trivial");
|
|
327
|
-
});
|
|
328
|
-
it("priority heuristic — first-half no-deps → high, depends_on → medium, last third → low", () => {
|
|
329
|
-
// 9 items so we get clean thirds (0-2 first-third, 3-5 middle, 6-8 last)
|
|
330
|
-
const items = Array.from({ length: 9 }, (_, i) => ({ step: `Step ${i + 1}`, depends_on: [] }));
|
|
331
|
-
const plan = synthesizePlanFromActionItems(items);
|
|
332
|
-
// First half (indexes 0-4) with no deps → high
|
|
333
|
-
expect(plan.steps[0].priority).toBe("high");
|
|
334
|
-
expect(plan.steps[3].priority).toBe("high");
|
|
335
|
-
// Last third (indexes 6-8) → low regardless of deps
|
|
336
|
-
expect(plan.steps[6].priority).toBe("low");
|
|
337
|
-
expect(plan.steps[8].priority).toBe("low");
|
|
338
|
-
});
|
|
339
|
-
it("estimatedComplexity scales with step count", () => {
|
|
340
|
-
expect(synthesizePlanFromActionItems(["a", "b", "c"]).estimatedComplexity).toBe("trivial");
|
|
341
|
-
expect(synthesizePlanFromActionItems(Array.from({ length: 7 }, (_, i) => `s${i}`)).estimatedComplexity).toBe("moderate");
|
|
342
|
-
expect(synthesizePlanFromActionItems(Array.from({ length: 11 }, (_, i) => `s${i}`)).estimatedComplexity).toBe("complex");
|
|
343
|
-
});
|
|
344
|
-
});
|
|
345
|
-
// ── CQ-10: planDebate falls back to FALLBACK_PLAN ────────────────────────────
|
|
346
|
-
const FALLBACK_STANCE_NAMES = ["Primary Analyst", "Critical Reviewer"];
|
|
347
|
-
describe("CQ-10: planDebate returns FALLBACK_PLAN after double failure", () => {
|
|
348
|
-
beforeEach(() => {
|
|
349
|
-
vi.resetModules();
|
|
350
|
-
});
|
|
351
|
-
it("returns FALLBACK_PLAN when both generateObject and retry tracedGenerate fail", async () => {
|
|
352
|
-
vi.doMock("ai", () => ({
|
|
353
|
-
generateObject: vi.fn().mockRejectedValue(new Error("Schema validation error")),
|
|
354
|
-
generateText: vi.fn(),
|
|
355
|
-
}));
|
|
356
|
-
vi.doMock("../../providers/keychain.js", () => ({
|
|
357
|
-
loadKeyForProvider: vi.fn().mockResolvedValue("test-key"),
|
|
358
|
-
}));
|
|
359
|
-
vi.doMock("../../providers/runtime.js", () => ({
|
|
360
|
-
detectProviderForModel: vi.fn().mockReturnValue("openai"),
|
|
361
|
-
createProviderFactory: vi.fn().mockReturnValue({ factory: {} }),
|
|
362
|
-
createProviderFactoryAsync: vi.fn().mockResolvedValue({ factory: {} }),
|
|
363
|
-
resolveModelRuntime: vi.fn().mockReturnValue({ model: {}, providerOptions: undefined }),
|
|
364
|
-
}));
|
|
365
|
-
vi.doMock("../prompts.js", () => ({
|
|
366
|
-
buildDebatePlanPrompt: vi.fn().mockReturnValue({ system: "sys", prompt: "prompt" }),
|
|
367
|
-
}));
|
|
368
|
-
// tracedGenerate also fails — both paths exhausted
|
|
369
|
-
vi.doMock("../llm.js", () => ({
|
|
370
|
-
// biome-ignore lint/correctness/useYield: mock generator intentionally throws without yielding
|
|
371
|
-
tracedGenerate: vi.fn().mockImplementation(async function* () {
|
|
372
|
-
throw new Error("Retry also failed");
|
|
373
|
-
}),
|
|
374
|
-
}));
|
|
375
|
-
const { planDebate } = await import("../debate-planner.js");
|
|
376
|
-
const spec = {
|
|
377
|
-
problemStatement: "test problem",
|
|
378
|
-
constraints: [],
|
|
379
|
-
successCriteria: [],
|
|
380
|
-
scope: "test",
|
|
381
|
-
rawQA: [],
|
|
382
|
-
};
|
|
383
|
-
const llm = {};
|
|
384
|
-
const gen = planDebate(spec, "gpt-4o", llm);
|
|
385
|
-
let result = await gen.next();
|
|
386
|
-
while (!result.done) {
|
|
387
|
-
result = await gen.next();
|
|
388
|
-
}
|
|
389
|
-
const plan = result.value;
|
|
390
|
-
// Must match FALLBACK_PLAN shape
|
|
391
|
-
expect(plan.stances.map((s) => s.name)).toEqual(FALLBACK_STANCE_NAMES);
|
|
392
|
-
expect(plan.intentSummary).toContain("planner unavailable");
|
|
393
|
-
});
|
|
394
|
-
it("FALLBACK_PLAN intentSummary starts with '(planner unavailable'", async () => {
|
|
395
|
-
vi.doMock("ai", () => ({
|
|
396
|
-
generateObject: vi.fn().mockRejectedValue(new Error("API error")),
|
|
397
|
-
generateText: vi.fn(),
|
|
398
|
-
}));
|
|
399
|
-
vi.doMock("../../providers/keychain.js", () => ({
|
|
400
|
-
loadKeyForProvider: vi.fn().mockResolvedValue("test-key"),
|
|
401
|
-
}));
|
|
402
|
-
vi.doMock("../../providers/runtime.js", () => ({
|
|
403
|
-
detectProviderForModel: vi.fn().mockReturnValue("openai"),
|
|
404
|
-
createProviderFactory: vi.fn().mockReturnValue({ factory: {} }),
|
|
405
|
-
createProviderFactoryAsync: vi.fn().mockResolvedValue({ factory: {} }),
|
|
406
|
-
resolveModelRuntime: vi.fn().mockReturnValue({ model: {}, providerOptions: undefined }),
|
|
407
|
-
}));
|
|
408
|
-
vi.doMock("../prompts.js", () => ({
|
|
409
|
-
buildDebatePlanPrompt: vi.fn().mockReturnValue({ system: "sys", prompt: "prompt" }),
|
|
410
|
-
}));
|
|
411
|
-
vi.doMock("../llm.js", () => ({
|
|
412
|
-
// biome-ignore lint/correctness/useYield: mock generator intentionally throws without yielding
|
|
413
|
-
tracedGenerate: vi.fn().mockImplementation(async function* () {
|
|
414
|
-
throw new Error("retry fail");
|
|
415
|
-
}),
|
|
416
|
-
}));
|
|
417
|
-
const { planDebate } = await import("../debate-planner.js");
|
|
418
|
-
const spec = { problemStatement: "any topic", constraints: [], successCriteria: [], scope: "", rawQA: [] };
|
|
419
|
-
const gen = planDebate(spec, "gpt-4o", {});
|
|
420
|
-
let result = await gen.next();
|
|
421
|
-
while (!result.done) {
|
|
422
|
-
result = await gen.next();
|
|
423
|
-
}
|
|
424
|
-
const plan = result.value;
|
|
425
|
-
expect(plan.intentSummary).toMatch(/^\(planner unavailable/);
|
|
426
|
-
});
|
|
427
|
-
it("FALLBACK_PLAN output shape has 'decision' kind with standard sections", async () => {
|
|
428
|
-
vi.doMock("ai", () => ({
|
|
429
|
-
generateObject: vi.fn().mockRejectedValue(new Error("fail")),
|
|
430
|
-
generateText: vi.fn(),
|
|
431
|
-
}));
|
|
432
|
-
vi.doMock("../../providers/keychain.js", () => ({
|
|
433
|
-
loadKeyForProvider: vi.fn().mockResolvedValue("test-key"),
|
|
434
|
-
}));
|
|
435
|
-
vi.doMock("../../providers/runtime.js", () => ({
|
|
436
|
-
detectProviderForModel: vi.fn().mockReturnValue("openai"),
|
|
437
|
-
createProviderFactory: vi.fn().mockReturnValue({ factory: {} }),
|
|
438
|
-
createProviderFactoryAsync: vi.fn().mockResolvedValue({ factory: {} }),
|
|
439
|
-
resolveModelRuntime: vi.fn().mockReturnValue({ model: {}, providerOptions: undefined }),
|
|
440
|
-
}));
|
|
441
|
-
vi.doMock("../prompts.js", () => ({
|
|
442
|
-
buildDebatePlanPrompt: vi.fn().mockReturnValue({ system: "sys", prompt: "prompt" }),
|
|
443
|
-
}));
|
|
444
|
-
vi.doMock("../llm.js", () => ({
|
|
445
|
-
// biome-ignore lint/correctness/useYield: mock generator intentionally throws without yielding
|
|
446
|
-
tracedGenerate: vi.fn().mockImplementation(async function* () {
|
|
447
|
-
throw new Error("also fails");
|
|
448
|
-
}),
|
|
449
|
-
}));
|
|
450
|
-
const { planDebate } = await import("../debate-planner.js");
|
|
451
|
-
const spec = { problemStatement: "topic", constraints: [], successCriteria: [], scope: "", rawQA: [] };
|
|
452
|
-
const gen = planDebate(spec, "gpt-4o", {});
|
|
453
|
-
let result = await gen.next();
|
|
454
|
-
while (!result.done) {
|
|
455
|
-
result = await gen.next();
|
|
456
|
-
}
|
|
457
|
-
const plan = result.value;
|
|
458
|
-
expect(plan.outputShape.kind).toBe("decision");
|
|
459
|
-
expect(plan.outputShape.sections.length).toBeGreaterThanOrEqual(3);
|
|
460
|
-
expect(plan.outputShape.sections.map((s) => s.key)).toContain("recommendation");
|
|
461
|
-
});
|
|
462
|
-
});
|
|
463
|
-
//# sourceMappingURL=evaluator-metrics.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { beforeAll, describe, expect, it, vi } from "vitest";
|
|
2
|
-
// F15 regression: council participant resolution must treat OAuth-authed
|
|
3
|
-
// providers (no API key) as reachable. getConfiguredProviders() is the
|
|
4
|
-
// authoritative cred check; the old loadKeyForProvider-only path threw for
|
|
5
|
-
// OAuth-only providers → 0 participants → council bailed "No reachable
|
|
6
|
-
// provider" even though the model (e.g. grok via xAI OAuth) answers fine.
|
|
7
|
-
// xai is configured via OAuth only (present in getConfiguredProviders, but
|
|
8
|
-
// loadKeyForProvider would have thrown — no API key).
|
|
9
|
-
vi.mock("../../providers/keychain.js", () => ({
|
|
10
|
-
getConfiguredProviders: vi.fn(async () => ["xai"]),
|
|
11
|
-
}));
|
|
12
|
-
// Hermetic settings: no explicit role models, nothing disabled.
|
|
13
|
-
vi.mock("../../utils/settings.js", () => ({
|
|
14
|
-
getRoleModels: () => ({}),
|
|
15
|
-
getRoleModel: () => undefined,
|
|
16
|
-
isProviderDisabled: () => false,
|
|
17
|
-
}));
|
|
18
|
-
import { loadCatalog } from "../../models/registry.js";
|
|
19
|
-
import { resolveParticipants } from "../leader.js";
|
|
20
|
-
describe("F15 — council reachability counts OAuth-only providers", () => {
|
|
21
|
-
beforeAll(async () => {
|
|
22
|
-
await loadCatalog();
|
|
23
|
-
});
|
|
24
|
-
it("resolves >=2 participants when the session provider is OAuth-only (xai, no API key)", async () => {
|
|
25
|
-
const participants = await resolveParticipants("grok-build-0.1", false);
|
|
26
|
-
// Pre-fix this returned [] (loadKeyForProvider('xai') threw) → council bailed.
|
|
27
|
-
expect(participants.length).toBeGreaterThanOrEqual(2);
|
|
28
|
-
expect(participants.every((p) => p.model.startsWith("grok"))).toBe(true);
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=oauth-reachable.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
-
// Build a minimal mock CouncilLLM that returns a fixed synthesisText
|
|
3
|
-
function makeMockLLM(synthesisText) {
|
|
4
|
-
return {
|
|
5
|
-
async generate() {
|
|
6
|
-
return synthesisText;
|
|
7
|
-
},
|
|
8
|
-
async research() {
|
|
9
|
-
return "";
|
|
10
|
-
},
|
|
11
|
-
async debate() {
|
|
12
|
-
return { text: "", toolCalls: [] };
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
async function runPlanningWith(synthesisText, debatePlan) {
|
|
17
|
-
const { runPlanning } = await import("../planner.js");
|
|
18
|
-
const spec = {
|
|
19
|
-
problemStatement: "test",
|
|
20
|
-
constraints: [],
|
|
21
|
-
successCriteria: [],
|
|
22
|
-
scope: "test",
|
|
23
|
-
rawQA: [],
|
|
24
|
-
};
|
|
25
|
-
const debateState = {
|
|
26
|
-
spec,
|
|
27
|
-
exchangeLogs: new Map(),
|
|
28
|
-
runningSummary: "",
|
|
29
|
-
roundCount: 1,
|
|
30
|
-
active: [],
|
|
31
|
-
};
|
|
32
|
-
const participants = [{ role: "primary", model: "m1", position: "pos1" }];
|
|
33
|
-
const gen = runPlanning(debateState, spec, participants, "m1", async () => false, makeMockLLM(synthesisText), debatePlan);
|
|
34
|
-
let result;
|
|
35
|
-
while (true) {
|
|
36
|
-
const step = await gen.next();
|
|
37
|
-
if (step.done) {
|
|
38
|
-
result = step.value;
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return result;
|
|
43
|
-
}
|
|
44
|
-
const sampleDebatePlan = {
|
|
45
|
-
intentSummary: "Evaluate options",
|
|
46
|
-
stances: [],
|
|
47
|
-
outputShape: {
|
|
48
|
-
kind: "evaluation",
|
|
49
|
-
sections: [
|
|
50
|
-
{ key: "strengths", heading: "Strengths", prompt: "", shape: "list" },
|
|
51
|
-
{ key: "summary_text", heading: "Summary", prompt: "", shape: "text" },
|
|
52
|
-
],
|
|
53
|
-
guardrails: [],
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
describe("parseOutcome — raw log + shape-based fallback (CQ-20)", () => {
|
|
57
|
-
let errorSpy;
|
|
58
|
-
beforeEach(() => {
|
|
59
|
-
errorSpy = vi.spyOn(console, "error").mockImplementation(() => { });
|
|
60
|
-
});
|
|
61
|
-
afterEach(() => {
|
|
62
|
-
errorSpy.mockRestore();
|
|
63
|
-
});
|
|
64
|
-
it("Test 1: no JSON → returns null AND console.error called with raw text", async () => {
|
|
65
|
-
const rawText = "This is plain text with no JSON object inside at all.";
|
|
66
|
-
const result = await runPlanningWith(rawText);
|
|
67
|
-
expect(result?.outcome).toBeNull();
|
|
68
|
-
expect(errorSpy).toHaveBeenCalledWith(expect.stringContaining("[Council] parseOutcome failed"), expect.stringContaining(rawText));
|
|
69
|
-
});
|
|
70
|
-
it("Test 2: malformed JSON → returns null AND logs raw text", async () => {
|
|
71
|
-
const malformed = '{"summary": "ok"'; // missing closing brace — no valid JSON match
|
|
72
|
-
const result = await runPlanningWith(malformed);
|
|
73
|
-
expect(result?.outcome).toBeNull();
|
|
74
|
-
expect(errorSpy).toHaveBeenCalledWith(expect.stringContaining("[Council] parseOutcome failed"), expect.any(String));
|
|
75
|
-
});
|
|
76
|
-
it("Test 3: JSON parse fails + debatePlan sections → returns object with kind and summary", async () => {
|
|
77
|
-
const rawText = "This is a long enough line that exceeds twenty chars for summary extraction";
|
|
78
|
-
const result = await runPlanningWith(rawText, sampleDebatePlan);
|
|
79
|
-
expect(result?.outcome).not.toBeNull();
|
|
80
|
-
expect(result?.outcome.type).toBe("evaluation");
|
|
81
|
-
expect(result?.outcome.summary).toBe(rawText.trim());
|
|
82
|
-
});
|
|
83
|
-
it("Test 4: shape fallback populates sections with correct empty defaults", async () => {
|
|
84
|
-
const rawText = "Long enough summary text here for the fallback to work correctly";
|
|
85
|
-
const result = await runPlanningWith(rawText, sampleDebatePlan);
|
|
86
|
-
expect(result?.outcome?.sections).toBeDefined();
|
|
87
|
-
expect(result?.outcome?.sections?.strengths).toEqual([]);
|
|
88
|
-
expect(result?.outcome?.sections?.summary_text).toBe("");
|
|
89
|
-
});
|
|
90
|
-
it("Test 5: valid JSON path returns correct outcome — no regression", async () => {
|
|
91
|
-
const validJson = JSON.stringify({
|
|
92
|
-
type: "decision",
|
|
93
|
-
summary: "We should go with option A because it is simpler.",
|
|
94
|
-
agreed: ["Option A"],
|
|
95
|
-
});
|
|
96
|
-
const result = await runPlanningWith(validJson);
|
|
97
|
-
expect(result?.outcome).not.toBeNull();
|
|
98
|
-
expect(result?.outcome?.type).toBe("decision");
|
|
99
|
-
expect(result?.outcome?.summary).toBe("We should go with option A because it is simpler.");
|
|
100
|
-
expect(errorSpy).not.toHaveBeenCalled();
|
|
101
|
-
});
|
|
102
|
-
it("Test 6: shape fallback EXTRACTS section content from markdown headings (regex regression)", async () => {
|
|
103
|
-
// Pre-fix the heading regex used a literal "s+" instead of "\\s+" (and
|
|
104
|
-
// replaced spaces with "s+"), so it never matched a real "## Heading" line —
|
|
105
|
-
// every section came back empty even when the synthesis clearly contained them.
|
|
106
|
-
const md = "Here is the evaluation summary line that is plenty long enough.\n\n" +
|
|
107
|
-
"## Strengths\n- Fast startup\n- Low cost\n\n" +
|
|
108
|
-
"## Summary\nThe approach is solid overall.";
|
|
109
|
-
const result = await runPlanningWith(md, sampleDebatePlan);
|
|
110
|
-
expect(result?.outcome?.sections?.strengths).toEqual(["- Fast startup", "- Low cost"]);
|
|
111
|
-
expect(result?.outcome?.sections?.summary_text).toContain("The approach is solid overall.");
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
//# sourceMappingURL=parse-outcome-fallback.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|