muonroi-cli 1.8.1 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +5 -17
- package/README.md +20 -9
- package/dist/src/generated/version.d.ts +1 -1
- package/dist/src/generated/version.js +1 -1
- package/dist/src/mcp/setup-guide-text.d.ts +1 -1
- package/dist/src/mcp/setup-guide-text.js +8 -5
- package/dist/src/orchestrator/orchestrator.js +22 -13
- package/dist/src/orchestrator/tool-engine.d.ts +4 -0
- package/dist/src/orchestrator/tool-engine.js +49 -0
- package/dist/src/ui/use-app-logic.js +0 -0
- package/dist/src/utils/install-manager.d.ts +1 -0
- package/dist/src/utils/install-manager.js +41 -10
- package/dist/src/utils/update-checker.js +12 -2
- package/package.json +9 -2
- package/dist/src/__test-helpers__/catalog-fixtures.d.ts +0 -22
- package/dist/src/__test-helpers__/catalog-fixtures.js +0 -55
- package/dist/src/__test-stubs__/ee-server.d.ts +0 -27
- package/dist/src/__test-stubs__/ee-server.js +0 -138
- package/dist/src/__test-stubs__/vitest-setup.d.ts +0 -1
- package/dist/src/__test-stubs__/vitest-setup.js +0 -38
- package/dist/src/__tests__/council/bubble-layout.test.d.ts +0 -1
- package/dist/src/__tests__/council/bubble-layout.test.js +0 -39
- package/dist/src/__tests__/council/code-block-truncate.test.d.ts +0 -1
- package/dist/src/__tests__/council/code-block-truncate.test.js +0 -45
- package/dist/src/__tests__/council/role-palette.test.d.ts +0 -1
- package/dist/src/__tests__/council/role-palette.test.js +0 -59
- package/dist/src/__tests__/first-run-wizard.test.d.ts +0 -1
- package/dist/src/__tests__/first-run-wizard.test.js +0 -9
- package/dist/src/agent-harness/__tests__/cli-flags.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/cli-flags.spec.js +0 -33
- package/dist/src/agent-harness/__tests__/driver.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/driver.spec.js +0 -141
- package/dist/src/agent-harness/__tests__/idle.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/idle.spec.js +0 -84
- package/dist/src/agent-harness/__tests__/mock-llm.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/mock-llm.spec.js +0 -91
- package/dist/src/agent-harness/__tests__/mock-model.spec.d.ts +0 -5
- package/dist/src/agent-harness/__tests__/mock-model.spec.js +0 -270
- package/dist/src/agent-harness/__tests__/predicate.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/predicate.spec.js +0 -27
- package/dist/src/agent-harness/__tests__/protocol.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/protocol.spec.js +0 -56
- package/dist/src/agent-harness/__tests__/schema.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/schema.spec.js +0 -76
- package/dist/src/agent-harness/__tests__/selector.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/selector.spec.js +0 -70
- package/dist/src/agent-harness/__tests__/sidechannel.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/sidechannel.spec.js +0 -29
- package/dist/src/agent-harness/__tests__/spec-helpers.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/spec-helpers.spec.js +0 -68
- package/dist/src/chat/__tests__/broadcast-bus.test.d.ts +0 -1
- package/dist/src/chat/__tests__/broadcast-bus.test.js +0 -81
- package/dist/src/chat/__tests__/channel-manager.test.d.ts +0 -1
- package/dist/src/chat/__tests__/channel-manager.test.js +0 -133
- package/dist/src/chat/__tests__/client.test.d.ts +0 -1
- package/dist/src/chat/__tests__/client.test.js +0 -109
- package/dist/src/chat/__tests__/discord-integration.test.d.ts +0 -1
- package/dist/src/chat/__tests__/discord-integration.test.js +0 -153
- package/dist/src/chat/__tests__/intent-prompt.test.d.ts +0 -1
- package/dist/src/chat/__tests__/intent-prompt.test.js +0 -80
- package/dist/src/chat/__tests__/verdict-resolver.test.d.ts +0 -1
- package/dist/src/chat/__tests__/verdict-resolver.test.js +0 -308
- package/dist/src/cli/__tests__/bw-vault.test.d.ts +0 -1
- package/dist/src/cli/__tests__/bw-vault.test.js +0 -87
- package/dist/src/cli/__tests__/keys-bundle.test.d.ts +0 -1
- package/dist/src/cli/__tests__/keys-bundle.test.js +0 -40
- package/dist/src/cli/__tests__/share-cmd.test.d.ts +0 -1
- package/dist/src/cli/__tests__/share-cmd.test.js +0 -175
- package/dist/src/cli/config/__tests__/model-picker.test.d.ts +0 -1
- package/dist/src/cli/config/__tests__/model-picker.test.js +0 -56
- package/dist/src/cli/config/__tests__/provider-fetch.test.d.ts +0 -1
- package/dist/src/cli/config/__tests__/provider-fetch.test.js +0 -38
- package/dist/src/cli/cost-forensics.test.d.ts +0 -1
- package/dist/src/cli/cost-forensics.test.js +0 -223
- package/dist/src/cli/experience-report.test.d.ts +0 -5
- package/dist/src/cli/experience-report.test.js +0 -63
- package/dist/src/cli/keys.test.d.ts +0 -1
- package/dist/src/cli/keys.test.js +0 -86
- package/dist/src/council/__tests__/abort-threading.test.d.ts +0 -1
- package/dist/src/council/__tests__/abort-threading.test.js +0 -193
- package/dist/src/council/__tests__/accounting.test.d.ts +0 -1
- package/dist/src/council/__tests__/accounting.test.js +0 -66
- package/dist/src/council/__tests__/audit-replay.test.d.ts +0 -1
- package/dist/src/council/__tests__/audit-replay.test.js +0 -241
- package/dist/src/council/__tests__/clarification-prompt.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarification-prompt.test.js +0 -71
- package/dist/src/council/__tests__/clarifier-max-rounds.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-max-rounds.test.js +0 -46
- package/dist/src/council/__tests__/clarifier-options.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-options.test.js +0 -54
- package/dist/src/council/__tests__/clarifier-ready-gate.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-ready-gate.test.js +0 -265
- package/dist/src/council/__tests__/cost-aware.test.d.ts +0 -1
- package/dist/src/council/__tests__/cost-aware.test.js +0 -49
- package/dist/src/council/__tests__/council-turn-length-emit.test.d.ts +0 -1
- package/dist/src/council/__tests__/council-turn-length-emit.test.js +0 -130
- package/dist/src/council/__tests__/debate-planner-structured.test.d.ts +0 -1
- package/dist/src/council/__tests__/debate-planner-structured.test.js +0 -209
- package/dist/src/council/__tests__/debate-round-budget.test.d.ts +0 -1
- package/dist/src/council/__tests__/debate-round-budget.test.js +0 -45
- package/dist/src/council/__tests__/decisions-lock.test.d.ts +0 -6
- package/dist/src/council/__tests__/decisions-lock.test.js +0 -352
- package/dist/src/council/__tests__/evaluator-metrics.test.d.ts +0 -1
- package/dist/src/council/__tests__/evaluator-metrics.test.js +0 -463
- package/dist/src/council/__tests__/oauth-reachable.test.d.ts +0 -1
- package/dist/src/council/__tests__/oauth-reachable.test.js +0 -31
- package/dist/src/council/__tests__/parse-outcome-fallback.test.d.ts +0 -1
- package/dist/src/council/__tests__/parse-outcome-fallback.test.js +0 -114
- package/dist/src/council/__tests__/post-debate-recommendation.test.d.ts +0 -1
- package/dist/src/council/__tests__/post-debate-recommendation.test.js +0 -58
- package/dist/src/council/__tests__/research-tools.test.d.ts +0 -1
- package/dist/src/council/__tests__/research-tools.test.js +0 -214
- package/dist/src/council/__tests__/round-tools.test.d.ts +0 -1
- package/dist/src/council/__tests__/round-tools.test.js +0 -306
- package/dist/src/council/__tests__/tool-trace.test.d.ts +0 -1
- package/dist/src/council/__tests__/tool-trace.test.js +0 -131
- package/dist/src/council/__tests__/types-contract.test.d.ts +0 -9
- package/dist/src/council/__tests__/types-contract.test.js +0 -82
- package/dist/src/council/clarifier-question-cap.test.d.ts +0 -12
- package/dist/src/council/clarifier-question-cap.test.js +0 -73
- package/dist/src/daemon/scheduler.test.d.ts +0 -1
- package/dist/src/daemon/scheduler.test.js +0 -103
- package/dist/src/ee/__tests__/bb-design.test.d.ts +0 -14
- package/dist/src/ee/__tests__/bb-design.test.js +0 -180
- package/dist/src/ee/__tests__/ee-onboarding.test.d.ts +0 -1
- package/dist/src/ee/__tests__/ee-onboarding.test.js +0 -32
- package/dist/src/ee/__tests__/export-transcripts.test.d.ts +0 -11
- package/dist/src/ee/__tests__/export-transcripts.test.js +0 -200
- package/dist/src/ee/__tests__/pil-context-bridge.test.d.ts +0 -1
- package/dist/src/ee/__tests__/pil-context-bridge.test.js +0 -54
- package/dist/src/ee/__tests__/pipeline.integration.test.d.ts +0 -14
- package/dist/src/ee/__tests__/pipeline.integration.test.js +0 -151
- package/dist/src/ee/__tests__/recall-format.test.d.ts +0 -10
- package/dist/src/ee/__tests__/recall-format.test.js +0 -57
- package/dist/src/ee/__tests__/recall-ledger.test.d.ts +0 -1
- package/dist/src/ee/__tests__/recall-ledger.test.js +0 -45
- package/dist/src/ee/__tests__/render-sink-wiring.test.d.ts +0 -1
- package/dist/src/ee/__tests__/render-sink-wiring.test.js +0 -74
- package/dist/src/ee/artifact-cache.test.d.ts +0 -1
- package/dist/src/ee/artifact-cache.test.js +0 -69
- package/dist/src/ee/auth.test.d.ts +0 -1
- package/dist/src/ee/auth.test.js +0 -59
- package/dist/src/ee/bridge.test.d.ts +0 -1
- package/dist/src/ee/bridge.test.js +0 -230
- package/dist/src/ee/client.test.d.ts +0 -1
- package/dist/src/ee/client.test.js +0 -181
- package/dist/src/ee/extract-session.test.d.ts +0 -1
- package/dist/src/ee/extract-session.test.js +0 -192
- package/dist/src/ee/intercept.test.d.ts +0 -1
- package/dist/src/ee/intercept.test.js +0 -171
- package/dist/src/ee/judge.test.d.ts +0 -1
- package/dist/src/ee/judge.test.js +0 -190
- package/dist/src/ee/mistake-detector.test.d.ts +0 -1
- package/dist/src/ee/mistake-detector.test.js +0 -221
- package/dist/src/ee/offline-queue.test.d.ts +0 -1
- package/dist/src/ee/offline-queue.test.js +0 -246
- package/dist/src/ee/phase-outcome.test.d.ts +0 -1
- package/dist/src/ee/phase-outcome.test.js +0 -94
- package/dist/src/ee/phase-tracker.test.d.ts +0 -1
- package/dist/src/ee/phase-tracker.test.js +0 -142
- package/dist/src/ee/posttool.test.d.ts +0 -1
- package/dist/src/ee/posttool.test.js +0 -70
- package/dist/src/ee/prompt-stale.test.d.ts +0 -8
- package/dist/src/ee/prompt-stale.test.js +0 -76
- package/dist/src/ee/recall-mirror.test.d.ts +0 -1
- package/dist/src/ee/recall-mirror.test.js +0 -65
- package/dist/src/ee/render.test.d.ts +0 -1
- package/dist/src/ee/render.test.js +0 -63
- package/dist/src/ee/scope.test.d.ts +0 -1
- package/dist/src/ee/scope.test.js +0 -97
- package/dist/src/ee/search.test.d.ts +0 -1
- package/dist/src/ee/search.test.js +0 -23
- package/dist/src/ee/session-trajectory.test.d.ts +0 -1
- package/dist/src/ee/session-trajectory.test.js +0 -120
- package/dist/src/ee/touch.test.d.ts +0 -1
- package/dist/src/ee/touch.test.js +0 -62
- package/dist/src/ee/who-am-i.test.d.ts +0 -1
- package/dist/src/ee/who-am-i.test.js +0 -101
- package/dist/src/flow/__tests__/migration.test.d.ts +0 -1
- package/dist/src/flow/__tests__/migration.test.js +0 -105
- package/dist/src/flow/__tests__/parser.test.d.ts +0 -1
- package/dist/src/flow/__tests__/parser.test.js +0 -68
- package/dist/src/flow/__tests__/run-manager-product.test.d.ts +0 -1
- package/dist/src/flow/__tests__/run-manager-product.test.js +0 -49
- package/dist/src/flow/__tests__/run-manager.test.d.ts +0 -1
- package/dist/src/flow/__tests__/run-manager.test.js +0 -83
- package/dist/src/flow/__tests__/scaffold-checkpoint.test.d.ts +0 -1
- package/dist/src/flow/__tests__/scaffold-checkpoint.test.js +0 -93
- package/dist/src/flow/__tests__/scaffold.test.d.ts +0 -1
- package/dist/src/flow/__tests__/scaffold.test.js +0 -47
- package/dist/src/flow/__tests__/warning-persist.test.d.ts +0 -5
- package/dist/src/flow/__tests__/warning-persist.test.js +0 -96
- package/dist/src/flow/compaction/__tests__/compress.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/compress.test.js +0 -63
- package/dist/src/flow/compaction/__tests__/extract.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/extract.test.js +0 -66
- package/dist/src/flow/compaction/__tests__/preserve.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/preserve.test.js +0 -62
- package/dist/src/gsd/__tests__/gray-areas.test.d.ts +0 -1
- package/dist/src/gsd/__tests__/gray-areas.test.js +0 -29
- package/dist/src/gsd/__tests__/types.test.d.ts +0 -1
- package/dist/src/gsd/__tests__/types.test.js +0 -78
- package/dist/src/headless/__tests__/council-answers.test.d.ts +0 -1
- package/dist/src/headless/__tests__/council-answers.test.js +0 -251
- package/dist/src/headless/output.test.d.ts +0 -1
- package/dist/src/headless/output.test.js +0 -239
- package/dist/src/lsp/builtins.test.d.ts +0 -1
- package/dist/src/lsp/builtins.test.js +0 -112
- package/dist/src/lsp/client-normalize.test.d.ts +0 -12
- package/dist/src/lsp/client-normalize.test.js +0 -34
- package/dist/src/lsp/manager.test.d.ts +0 -1
- package/dist/src/lsp/manager.test.js +0 -194
- package/dist/src/lsp/npm-cache.test.d.ts +0 -1
- package/dist/src/lsp/npm-cache.test.js +0 -53
- package/dist/src/lsp/smoke.test.d.ts +0 -1
- package/dist/src/lsp/smoke.test.js +0 -56
- package/dist/src/maintain/__tests__/codebase-intel.test.d.ts +0 -5
- package/dist/src/maintain/__tests__/codebase-intel.test.js +0 -237
- package/dist/src/maintain/__tests__/gh-create-pr.test.d.ts +0 -11
- package/dist/src/maintain/__tests__/gh-create-pr.test.js +0 -160
- package/dist/src/maintain/__tests__/pr-builder.test.d.ts +0 -10
- package/dist/src/maintain/__tests__/pr-builder.test.js +0 -229
- package/dist/src/maintain/__tests__/repo-map.test.d.ts +0 -5
- package/dist/src/maintain/__tests__/repo-map.test.js +0 -90
- package/dist/src/maintain/__tests__/task-runner.test.d.ts +0 -11
- package/dist/src/maintain/__tests__/task-runner.test.js +0 -281
- package/dist/src/mcp/__tests__/auto-setup.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/auto-setup.test.js +0 -155
- package/dist/src/mcp/__tests__/cap-tool-result.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/cap-tool-result.test.js +0 -58
- package/dist/src/mcp/__tests__/client-pool.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/client-pool.spec.js +0 -169
- package/dist/src/mcp/__tests__/ee-tools.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/ee-tools.test.js +0 -226
- package/dist/src/mcp/__tests__/forensics-tools.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/forensics-tools.test.js +0 -54
- package/dist/src/mcp/__tests__/harness-driver-action-tools.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-action-tools.spec.js +0 -103
- package/dist/src/mcp/__tests__/harness-driver-async-tools.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-async-tools.spec.js +0 -112
- package/dist/src/mcp/__tests__/harness-driver-read-tools.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-read-tools.spec.js +0 -124
- package/dist/src/mcp/__tests__/harness-driver-security.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-security.spec.js +0 -61
- package/dist/src/mcp/__tests__/harness-driver.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver.spec.js +0 -20
- package/dist/src/mcp/__tests__/lazy-schema.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/lazy-schema.spec.js +0 -152
- package/dist/src/mcp/__tests__/lsp-tools.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/lsp-tools.test.js +0 -56
- package/dist/src/mcp/__tests__/mcp-keychain.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/mcp-keychain.test.js +0 -40
- package/dist/src/mcp/__tests__/parallel-build.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/parallel-build.spec.js +0 -67
- package/dist/src/mcp/__tests__/research-onboarding.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/research-onboarding.test.js +0 -148
- package/dist/src/mcp/__tests__/runtime-hydration.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/runtime-hydration.test.js +0 -78
- package/dist/src/mcp/__tests__/runtime-output-cap.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/runtime-output-cap.test.js +0 -42
- package/dist/src/mcp/__tests__/runtime-sanitize.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/runtime-sanitize.test.js +0 -40
- package/dist/src/mcp/__tests__/self-verify-jobs.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/self-verify-jobs.test.js +0 -92
- package/dist/src/mcp/__tests__/smart-filter.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/smart-filter.test.js +0 -177
- package/dist/src/mcp/__tests__/tools-server.smoke.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/tools-server.smoke.test.js +0 -42
- package/dist/src/mcp/parse-headers.test.d.ts +0 -1
- package/dist/src/mcp/parse-headers.test.js +0 -43
- package/dist/src/mcp/smoke.test.d.ts +0 -1
- package/dist/src/mcp/smoke.test.js +0 -159
- package/dist/src/models/__tests__/registry.test.d.ts +0 -1
- package/dist/src/models/__tests__/registry.test.js +0 -74
- package/dist/src/models/catalog-gemini.test.d.ts +0 -1
- package/dist/src/models/catalog-gemini.test.js +0 -48
- package/dist/src/models/catalog-url.test.d.ts +0 -1
- package/dist/src/models/catalog-url.test.js +0 -26
- package/dist/src/models/catalog-validation.test.d.ts +0 -1
- package/dist/src/models/catalog-validation.test.js +0 -63
- package/dist/src/ops/__tests__/doctor-council-mcp.test.d.ts +0 -1
- package/dist/src/ops/__tests__/doctor-council-mcp.test.js +0 -139
- package/dist/src/ops/__tests__/doctor-ee-health.test.d.ts +0 -1
- package/dist/src/ops/__tests__/doctor-ee-health.test.js +0 -134
- package/dist/src/ops/bug-report.test.d.ts +0 -1
- package/dist/src/ops/bug-report.test.js +0 -148
- package/dist/src/ops/doctor.test.d.ts +0 -1
- package/dist/src/ops/doctor.test.js +0 -97
- package/dist/src/orchestrator/__tests__/agent-base-url-switch.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/agent-base-url-switch.test.js +0 -77
- package/dist/src/orchestrator/__tests__/auto-commit.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/auto-commit.test.js +0 -142
- package/dist/src/orchestrator/__tests__/batch-turn-runner.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/batch-turn-runner.test.js +0 -164
- package/dist/src/orchestrator/__tests__/council-manager.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/council-manager.test.js +0 -148
- package/dist/src/orchestrator/__tests__/cross-turn-dedup.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/cross-turn-dedup.test.js +0 -175
- package/dist/src/orchestrator/__tests__/current-call-id.test.d.ts +0 -16
- package/dist/src/orchestrator/__tests__/current-call-id.test.js +0 -138
- package/dist/src/orchestrator/__tests__/delegations.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/delegations.test.js +0 -96
- package/dist/src/orchestrator/__tests__/error-forensics.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/error-forensics.test.js +0 -93
- package/dist/src/orchestrator/__tests__/flow-resume.test.d.ts +0 -5
- package/dist/src/orchestrator/__tests__/flow-resume.test.js +0 -61
- package/dist/src/orchestrator/__tests__/humanize-api-error.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/humanize-api-error.test.js +0 -68
- package/dist/src/orchestrator/__tests__/mcp-capability-block.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/mcp-capability-block.test.js +0 -39
- package/dist/src/orchestrator/__tests__/message-processor.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/message-processor.test.js +0 -189
- package/dist/src/orchestrator/__tests__/message-write-ahead.test.d.ts +0 -22
- package/dist/src/orchestrator/__tests__/message-write-ahead.test.js +0 -149
- package/dist/src/orchestrator/__tests__/project-stack.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/project-stack.test.js +0 -65
- package/dist/src/orchestrator/__tests__/prompts.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/prompts.test.js +0 -88
- package/dist/src/orchestrator/__tests__/read-path-budget.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/read-path-budget.test.js +0 -156
- package/dist/src/orchestrator/__tests__/retry-classifier.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/retry-classifier.test.js +0 -112
- package/dist/src/orchestrator/__tests__/retry-stream.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/retry-stream.test.js +0 -151
- package/dist/src/orchestrator/__tests__/route-feedback.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/route-feedback.test.js +0 -47
- package/dist/src/orchestrator/__tests__/stream-runner.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/stream-runner.test.js +0 -202
- package/dist/src/orchestrator/__tests__/sub-agent-model-tier.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/sub-agent-model-tier.test.js +0 -45
- package/dist/src/orchestrator/__tests__/sub-session-delegation.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/sub-session-delegation.test.js +0 -507
- package/dist/src/orchestrator/__tests__/usage-events-shape.test.d.ts +0 -8
- package/dist/src/orchestrator/__tests__/usage-events-shape.test.js +0 -58
- package/dist/src/orchestrator/__tests__/usage-normalizer-c1.test.d.ts +0 -21
- package/dist/src/orchestrator/__tests__/usage-normalizer-c1.test.js +0 -155
- package/dist/src/orchestrator/__tests__/usage-shape-threading.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/usage-shape-threading.test.js +0 -98
- package/dist/src/orchestrator/__tests__/write-ahead.test.d.ts +0 -20
- package/dist/src/orchestrator/__tests__/write-ahead.test.js +0 -134
- package/dist/src/orchestrator/abort.test.d.ts +0 -1
- package/dist/src/orchestrator/abort.test.js +0 -34
- package/dist/src/orchestrator/agent.test.d.ts +0 -1
- package/dist/src/orchestrator/agent.test.js +0 -178
- package/dist/src/orchestrator/cleanup.test.d.ts +0 -1
- package/dist/src/orchestrator/cleanup.test.js +0 -67
- package/dist/src/orchestrator/compaction.test.d.ts +0 -1
- package/dist/src/orchestrator/compaction.test.js +0 -187
- package/dist/src/orchestrator/delegations.test.d.ts +0 -1
- package/dist/src/orchestrator/delegations.test.js +0 -107
- package/dist/src/orchestrator/grounding-check.test.d.ts +0 -1
- package/dist/src/orchestrator/grounding-check.test.js +0 -94
- package/dist/src/orchestrator/interrupted-turn.test.d.ts +0 -1
- package/dist/src/orchestrator/interrupted-turn.test.js +0 -34
- package/dist/src/orchestrator/message-seq.test.d.ts +0 -1
- package/dist/src/orchestrator/message-seq.test.js +0 -24
- package/dist/src/orchestrator/pending-calls.test.d.ts +0 -1
- package/dist/src/orchestrator/pending-calls.test.js +0 -188
- package/dist/src/orchestrator/provider-options-shape.spec.d.ts +0 -1
- package/dist/src/orchestrator/provider-options-shape.spec.js +0 -63
- package/dist/src/orchestrator/reasoning.test.d.ts +0 -1
- package/dist/src/orchestrator/reasoning.test.js +0 -101
- package/dist/src/orchestrator/repetition-detector.test.d.ts +0 -1
- package/dist/src/orchestrator/repetition-detector.test.js +0 -103
- package/dist/src/orchestrator/sandbox.test.d.ts +0 -1
- package/dist/src/orchestrator/sandbox.test.js +0 -99
- package/dist/src/orchestrator/scope-ceiling.test.d.ts +0 -13
- package/dist/src/orchestrator/scope-ceiling.test.js +0 -181
- package/dist/src/orchestrator/scope-reminder.test.d.ts +0 -15
- package/dist/src/orchestrator/scope-reminder.test.js +0 -225
- package/dist/src/orchestrator/session-experience.test.d.ts +0 -6
- package/dist/src/orchestrator/session-experience.test.js +0 -72
- package/dist/src/orchestrator/stall-rescue.test.d.ts +0 -1
- package/dist/src/orchestrator/stall-rescue.test.js +0 -117
- package/dist/src/orchestrator/stall-watchdog.test.d.ts +0 -1
- package/dist/src/orchestrator/stall-watchdog.test.js +0 -153
- package/dist/src/orchestrator/steer-inbox.test.d.ts +0 -1
- package/dist/src/orchestrator/steer-inbox.test.js +0 -33
- package/dist/src/orchestrator/sub-agent-cap.test.d.ts +0 -1
- package/dist/src/orchestrator/sub-agent-cap.test.js +0 -208
- package/dist/src/orchestrator/subagent-compactor.spec.d.ts +0 -1
- package/dist/src/orchestrator/subagent-compactor.spec.js +0 -636
- package/dist/src/orchestrator/text-tool-call-detector.test.d.ts +0 -1
- package/dist/src/orchestrator/text-tool-call-detector.test.js +0 -147
- package/dist/src/orchestrator/token-counter.test.d.ts +0 -1
- package/dist/src/orchestrator/token-counter.test.js +0 -57
- package/dist/src/orchestrator/tool-args-hash.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-args-hash.test.js +0 -105
- package/dist/src/orchestrator/tool-args-repair.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-args-repair.test.js +0 -136
- package/dist/src/orchestrator/tool-loop-askcard.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-loop-askcard.test.js +0 -71
- package/dist/src/orchestrator/tool-loop-cap.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-loop-cap.test.js +0 -176
- package/dist/src/orchestrator/tool-repetition-detector.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-repetition-detector.test.js +0 -101
- package/dist/src/pil/__tests__/budget.test.d.ts +0 -1
- package/dist/src/pil/__tests__/budget.test.js +0 -33
- package/dist/src/pil/__tests__/clarity-gate.test.d.ts +0 -1
- package/dist/src/pil/__tests__/clarity-gate.test.js +0 -37
- package/dist/src/pil/__tests__/config.test.d.ts +0 -1
- package/dist/src/pil/__tests__/config.test.js +0 -57
- package/dist/src/pil/__tests__/discovery-cache.test.d.ts +0 -1
- package/dist/src/pil/__tests__/discovery-cache.test.js +0 -38
- package/dist/src/pil/__tests__/discovery-types.test.d.ts +0 -1
- package/dist/src/pil/__tests__/discovery-types.test.js +0 -65
- package/dist/src/pil/__tests__/discovery.test.d.ts +0 -1
- package/dist/src/pil/__tests__/discovery.test.js +0 -178
- package/dist/src/pil/__tests__/dual-run.test.d.ts +0 -1
- package/dist/src/pil/__tests__/dual-run.test.js +0 -51
- package/dist/src/pil/__tests__/layer1-intent-trace.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer1-intent-trace.test.js +0 -138
- package/dist/src/pil/__tests__/layer1-intent.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer1-intent.test.js +0 -329
- package/dist/src/pil/__tests__/layer15-context-scan.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer15-context-scan.test.js +0 -64
- package/dist/src/pil/__tests__/layer16-clarity.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer16-clarity.test.js +0 -72
- package/dist/src/pil/__tests__/layer17-feasibility.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer17-feasibility.test.js +0 -36
- package/dist/src/pil/__tests__/layer18-acceptance.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer18-acceptance.test.js +0 -18
- package/dist/src/pil/__tests__/layer2-personality.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer2-personality.test.js +0 -57
- package/dist/src/pil/__tests__/layer2_5-ponytail.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer2_5-ponytail.test.js +0 -53
- package/dist/src/pil/__tests__/layer3-ee-injection.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer3-ee-injection.test.js +0 -221
- package/dist/src/pil/__tests__/layer3-injected-chunk.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer3-injected-chunk.test.js +0 -134
- package/dist/src/pil/__tests__/layer4-gsd.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer4-gsd.test.js +0 -191
- package/dist/src/pil/__tests__/layer5-context.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer5-context.test.js +0 -175
- package/dist/src/pil/__tests__/layer6-output.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer6-output.test.js +0 -465
- package/dist/src/pil/__tests__/llm-classify.test.d.ts +0 -1
- package/dist/src/pil/__tests__/llm-classify.test.js +0 -275
- package/dist/src/pil/__tests__/native-capabilities-workbook.test.d.ts +0 -1
- package/dist/src/pil/__tests__/native-capabilities-workbook.test.js +0 -40
- package/dist/src/pil/__tests__/ollama-classify.test.d.ts +0 -1
- package/dist/src/pil/__tests__/ollama-classify.test.js +0 -68
- package/dist/src/pil/__tests__/orchestrator-integration.test.d.ts +0 -10
- package/dist/src/pil/__tests__/orchestrator-integration.test.js +0 -100
- package/dist/src/pil/__tests__/pipeline.test.d.ts +0 -1
- package/dist/src/pil/__tests__/pipeline.test.js +0 -188
- package/dist/src/pil/__tests__/renderer-coverage.test.d.ts +0 -7
- package/dist/src/pil/__tests__/renderer-coverage.test.js +0 -42
- package/dist/src/pil/__tests__/response-tools.test.d.ts +0 -1
- package/dist/src/pil/__tests__/response-tools.test.js +0 -242
- package/dist/src/pil/__tests__/schema.test.d.ts +0 -1
- package/dist/src/pil/__tests__/schema.test.js +0 -202
- package/dist/src/pil/__tests__/scoreComplexity.test.d.ts +0 -1
- package/dist/src/pil/__tests__/scoreComplexity.test.js +0 -119
- package/dist/src/pil/__tests__/scoreSufficiency.test.d.ts +0 -8
- package/dist/src/pil/__tests__/scoreSufficiency.test.js +0 -89
- package/dist/src/pil/__tests__/store.test.d.ts +0 -1
- package/dist/src/pil/__tests__/store.test.js +0 -44
- package/dist/src/pil/__tests__/surface-compaction-artifacts.test.d.ts +0 -1
- package/dist/src/pil/__tests__/surface-compaction-artifacts.test.js +0 -112
- package/dist/src/pil/__tests__/task-tier-map.test.d.ts +0 -1
- package/dist/src/pil/__tests__/task-tier-map.test.js +0 -33
- package/dist/src/pil/agent-operating-contract.test.d.ts +0 -1
- package/dist/src/pil/agent-operating-contract.test.js +0 -80
- package/dist/src/pil/cheap-model-playbook.test.d.ts +0 -1
- package/dist/src/pil/cheap-model-playbook.test.js +0 -160
- package/dist/src/pil/cheap-model-workbooks.test.d.ts +0 -1
- package/dist/src/pil/cheap-model-workbooks.test.js +0 -129
- package/dist/src/pil/layer1-intent.test.d.ts +0 -1
- package/dist/src/pil/layer1-intent.test.js +0 -764
- package/dist/src/pil/layer1_5-complexity-size.test.d.ts +0 -10
- package/dist/src/pil/layer1_5-complexity-size.test.js +0 -248
- package/dist/src/pil/session-experience-injection.test.d.ts +0 -6
- package/dist/src/pil/session-experience-injection.test.js +0 -79
- package/dist/src/pil/session-state.test.d.ts +0 -1
- package/dist/src/pil/session-state.test.js +0 -73
- package/dist/src/playbook/__tests__/directives.test.d.ts +0 -1
- package/dist/src/playbook/__tests__/directives.test.js +0 -115
- package/dist/src/product-loop/__tests__/artifact-io.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/artifact-io.test.js +0 -83
- package/dist/src/product-loop/__tests__/assumption-ledger.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/assumption-ledger.test.js +0 -261
- package/dist/src/product-loop/__tests__/backlog-builder.test.d.ts +0 -10
- package/dist/src/product-loop/__tests__/backlog-builder.test.js +0 -175
- package/dist/src/product-loop/__tests__/backlog-store.test.d.ts +0 -4
- package/dist/src/product-loop/__tests__/backlog-store.test.js +0 -96
- package/dist/src/product-loop/__tests__/cb2-retry-bonus.test.d.ts +0 -13
- package/dist/src/product-loop/__tests__/cb2-retry-bonus.test.js +0 -158
- package/dist/src/product-loop/__tests__/circuit-breakers-coverage.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/circuit-breakers-coverage.test.js +0 -67
- package/dist/src/product-loop/__tests__/circuit-breakers.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/circuit-breakers.test.js +0 -79
- package/dist/src/product-loop/__tests__/complexity-routing.spec.d.ts +0 -11
- package/dist/src/product-loop/__tests__/complexity-routing.spec.js +0 -240
- package/dist/src/product-loop/__tests__/context-policy.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/context-policy.test.js +0 -266
- package/dist/src/product-loop/__tests__/cost-preview.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/cost-preview.test.js +0 -111
- package/dist/src/product-loop/__tests__/cost-scoper.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/cost-scoper.test.js +0 -50
- package/dist/src/product-loop/__tests__/cross-run-memory.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/cross-run-memory.test.js +0 -168
- package/dist/src/product-loop/__tests__/design-output.spec.d.ts +0 -1
- package/dist/src/product-loop/__tests__/design-output.spec.js +0 -36
- package/dist/src/product-loop/__tests__/discover.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discover.test.js +0 -83
- package/dist/src/product-loop/__tests__/discovery-context-format.test.d.ts +0 -13
- package/dist/src/product-loop/__tests__/discovery-context-format.test.js +0 -100
- package/dist/src/product-loop/__tests__/discovery-council-runner.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-council-runner.test.js +0 -13
- package/dist/src/product-loop/__tests__/discovery-detection.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-detection.test.js +0 -151
- package/dist/src/product-loop/__tests__/discovery-ecosystem.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/discovery-ecosystem.test.js +0 -209
- package/dist/src/product-loop/__tests__/discovery-integration.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-integration.test.js +0 -126
- package/dist/src/product-loop/__tests__/discovery-interview.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-interview.test.js +0 -394
- package/dist/src/product-loop/__tests__/discovery-migrations.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-migrations.test.js +0 -69
- package/dist/src/product-loop/__tests__/discovery-persistence.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-persistence.test.js +0 -146
- package/dist/src/product-loop/__tests__/discovery-prompt-parser.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-prompt-parser.test.js +0 -65
- package/dist/src/product-loop/__tests__/discovery-prompt-specificity.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-prompt-specificity.test.js +0 -55
- package/dist/src/product-loop/__tests__/discovery-recommender-ecosystem.test.d.ts +0 -9
- package/dist/src/product-loop/__tests__/discovery-recommender-ecosystem.test.js +0 -178
- package/dist/src/product-loop/__tests__/discovery-recommender.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-recommender.test.js +0 -316
- package/dist/src/product-loop/__tests__/discovery-schema.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-schema.test.js +0 -77
- package/dist/src/product-loop/__tests__/done-gate-coverage.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/done-gate-coverage.test.js +0 -135
- package/dist/src/product-loop/__tests__/done-gate.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/done-gate.test.js +0 -122
- package/dist/src/product-loop/__tests__/ee-extract-wiring.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/ee-extract-wiring.test.js +0 -186
- package/dist/src/product-loop/__tests__/extract-to-ee.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/extract-to-ee.test.js +0 -161
- package/dist/src/product-loop/__tests__/feedback-routing.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/feedback-routing.test.js +0 -83
- package/dist/src/product-loop/__tests__/gather-selectable-alts.test.d.ts +0 -15
- package/dist/src/product-loop/__tests__/gather-selectable-alts.test.js +0 -143
- package/dist/src/product-loop/__tests__/hot-path.spec.d.ts +0 -11
- package/dist/src/product-loop/__tests__/hot-path.spec.js +0 -146
- package/dist/src/product-loop/__tests__/integration.test.d.ts +0 -7
- package/dist/src/product-loop/__tests__/integration.test.js +0 -301
- package/dist/src/product-loop/__tests__/loop-driver-audit.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/loop-driver-audit.test.js +0 -269
- package/dist/src/product-loop/__tests__/loop-driver.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/loop-driver.test.js +0 -225
- package/dist/src/product-loop/__tests__/maintenance-task-synthesis.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/maintenance-task-synthesis.test.js +0 -67
- package/dist/src/product-loop/__tests__/phase-a1-a3-sprint-runner.test.d.ts +0 -13
- package/dist/src/product-loop/__tests__/phase-a1-a3-sprint-runner.test.js +0 -268
- package/dist/src/product-loop/__tests__/phase-a2-backlog-build.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/phase-a2-backlog-build.test.js +0 -162
- package/dist/src/product-loop/__tests__/phase-budget.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-budget.test.js +0 -149
- package/dist/src/product-loop/__tests__/phase-orchestrator-integration.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-orchestrator-integration.test.js +0 -138
- package/dist/src/product-loop/__tests__/phase-plan.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-plan.test.js +0 -208
- package/dist/src/product-loop/__tests__/phase-rituals.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-rituals.test.js +0 -174
- package/dist/src/product-loop/__tests__/phase-runner.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-runner.test.js +0 -414
- package/dist/src/product-loop/__tests__/phase-tracker-bridge.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-tracker-bridge.test.js +0 -67
- package/dist/src/product-loop/__tests__/pick-backend-stack.test.d.ts +0 -11
- package/dist/src/product-loop/__tests__/pick-backend-stack.test.js +0 -95
- package/dist/src/product-loop/__tests__/product-identity.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/product-identity.test.js +0 -40
- package/dist/src/product-loop/__tests__/progress-snapshot.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/progress-snapshot.test.js +0 -152
- package/dist/src/product-loop/__tests__/reality-anchor.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/reality-anchor.test.js +0 -49
- package/dist/src/product-loop/__tests__/repo-audit.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/repo-audit.test.js +0 -97
- package/dist/src/product-loop/__tests__/repo-brief.test.d.ts +0 -9
- package/dist/src/product-loop/__tests__/repo-brief.test.js +0 -132
- package/dist/src/product-loop/__tests__/role-memory.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/role-memory.test.js +0 -56
- package/dist/src/product-loop/__tests__/role-registry.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/role-registry.test.js +0 -222
- package/dist/src/product-loop/__tests__/role-routing-ee.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/role-routing-ee.test.js +0 -79
- package/dist/src/product-loop/__tests__/route-decision-emit.test.d.ts +0 -10
- package/dist/src/product-loop/__tests__/route-decision-emit.test.js +0 -222
- package/dist/src/product-loop/__tests__/seed-questions.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/seed-questions.test.js +0 -30
- package/dist/src/product-loop/__tests__/ship-polish.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/ship-polish.test.js +0 -96
- package/dist/src/product-loop/__tests__/sprint-planner.test.d.ts +0 -6
- package/dist/src/product-loop/__tests__/sprint-planner.test.js +0 -140
- package/dist/src/product-loop/__tests__/sprint-runner-backlog.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/sprint-runner-backlog.test.js +0 -221
- package/dist/src/product-loop/__tests__/sprint-runner-emit.test.d.ts +0 -14
- package/dist/src/product-loop/__tests__/sprint-runner-emit.test.js +0 -279
- package/dist/src/product-loop/__tests__/sprint-runner-phase-chunks.test.d.ts +0 -14
- package/dist/src/product-loop/__tests__/sprint-runner-phase-chunks.test.js +0 -193
- package/dist/src/product-loop/__tests__/sprint-runner.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/sprint-runner.test.js +0 -432
- package/dist/src/product-loop/__tests__/sprint-self-verify.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/sprint-self-verify.test.js +0 -73
- package/dist/src/product-loop/__tests__/sprint-store.test.d.ts +0 -7
- package/dist/src/product-loop/__tests__/sprint-store.test.js +0 -84
- package/dist/src/product-loop/__tests__/stakeholder-acl.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/stakeholder-acl.test.js +0 -83
- package/dist/src/product-loop/__tests__/state-md-ee-injections.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/state-md-ee-injections.test.js +0 -182
- package/dist/src/product-loop/__tests__/sufficiency-routing.spec.d.ts +0 -12
- package/dist/src/product-loop/__tests__/sufficiency-routing.spec.js +0 -140
- package/dist/src/product-loop/__tests__/typed-artifacts.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/typed-artifacts.test.js +0 -222
- package/dist/src/product-loop/__tests__/types.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/types.test.js +0 -79
- package/dist/src/product-loop/__tests__/verify-failure-threshold.test.d.ts +0 -9
- package/dist/src/product-loop/__tests__/verify-failure-threshold.test.js +0 -146
- package/dist/src/product-loop/__tests__/verify-failure-tracking.test.d.ts +0 -4
- package/dist/src/product-loop/__tests__/verify-failure-tracking.test.js +0 -122
- package/dist/src/product-loop/__tests__/verify-result.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/verify-result.test.js +0 -53
- package/dist/src/providers/__tests__/adapter-oauth-wiring.test.d.ts +0 -8
- package/dist/src/providers/__tests__/adapter-oauth-wiring.test.js +0 -125
- package/dist/src/providers/__tests__/capabilities-cosmetic.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-cosmetic.test.js +0 -109
- package/dist/src/providers/__tests__/capabilities-flags.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-flags.test.js +0 -145
- package/dist/src/providers/__tests__/capabilities-provider-options.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-provider-options.test.js +0 -201
- package/dist/src/providers/__tests__/capabilities-sanitize.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-sanitize.test.js +0 -60
- package/dist/src/providers/__tests__/capabilities.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities.test.js +0 -41
- package/dist/src/providers/__tests__/provider-coverage.test.d.ts +0 -1
- package/dist/src/providers/__tests__/provider-coverage.test.js +0 -45
- package/dist/src/providers/__tests__/reasoning-roundtrip.test.d.ts +0 -1
- package/dist/src/providers/__tests__/reasoning-roundtrip.test.js +0 -216
- package/dist/src/providers/__tests__/runtime-integration.test.d.ts +0 -1
- package/dist/src/providers/__tests__/runtime-integration.test.js +0 -93
- package/dist/src/providers/__tests__/runtime.test.d.ts +0 -1
- package/dist/src/providers/__tests__/runtime.test.js +0 -80
- package/dist/src/providers/__tests__/siliconflow-sse-repair.test.d.ts +0 -1
- package/dist/src/providers/__tests__/siliconflow-sse-repair.test.js +0 -267
- package/dist/src/providers/__tests__/strategies-registry.test.d.ts +0 -8
- package/dist/src/providers/__tests__/strategies-registry.test.js +0 -49
- package/dist/src/providers/__tests__/strategies-resolve.test.d.ts +0 -12
- package/dist/src/providers/__tests__/strategies-resolve.test.js +0 -128
- package/dist/src/providers/__tests__/wire-debug.test.d.ts +0 -1
- package/dist/src/providers/__tests__/wire-debug.test.js +0 -39
- package/dist/src/providers/adapter.test.d.ts +0 -1
- package/dist/src/providers/adapter.test.js +0 -19
- package/dist/src/providers/auth/__tests__/browser-flow.test.d.ts +0 -8
- package/dist/src/providers/auth/__tests__/browser-flow.test.js +0 -186
- package/dist/src/providers/auth/__tests__/device-flow.test.d.ts +0 -6
- package/dist/src/providers/auth/__tests__/device-flow.test.js +0 -219
- package/dist/src/providers/auth/__tests__/gemini-oauth.test.d.ts +0 -4
- package/dist/src/providers/auth/__tests__/gemini-oauth.test.js +0 -306
- package/dist/src/providers/auth/__tests__/grok-oauth.test.d.ts +0 -8
- package/dist/src/providers/auth/__tests__/grok-oauth.test.js +0 -236
- package/dist/src/providers/auth/__tests__/openai-oauth.test.d.ts +0 -7
- package/dist/src/providers/auth/__tests__/openai-oauth.test.js +0 -309
- package/dist/src/providers/auth/__tests__/token-store.test.d.ts +0 -7
- package/dist/src/providers/auth/__tests__/token-store.test.js +0 -125
- package/dist/src/providers/errors.test.d.ts +0 -1
- package/dist/src/providers/errors.test.js +0 -66
- package/dist/src/providers/gemini.test.d.ts +0 -1
- package/dist/src/providers/gemini.test.js +0 -37
- package/dist/src/providers/keychain.test.d.ts +0 -1
- package/dist/src/providers/keychain.test.js +0 -84
- package/dist/src/providers/mcp-vision-bridge.test.d.ts +0 -1
- package/dist/src/providers/mcp-vision-bridge.test.js +0 -381
- package/dist/src/providers/ollama.test.d.ts +0 -1
- package/dist/src/providers/ollama.test.js +0 -37
- package/dist/src/providers/openai-compatible.test.d.ts +0 -1
- package/dist/src/providers/openai-compatible.test.js +0 -53
- package/dist/src/providers/openai.test.d.ts +0 -1
- package/dist/src/providers/openai.test.js +0 -53
- package/dist/src/providers/pricing.test.d.ts +0 -1
- package/dist/src/providers/pricing.test.js +0 -81
- package/dist/src/providers/prompt-cache-key.spec.d.ts +0 -5
- package/dist/src/providers/prompt-cache-key.spec.js +0 -24
- package/dist/src/providers/runtime-mock.spec.d.ts +0 -8
- package/dist/src/providers/runtime-mock.spec.js +0 -69
- package/dist/src/providers/vision-proxy.test.d.ts +0 -1
- package/dist/src/providers/vision-proxy.test.js +0 -212
- package/dist/src/reporter/__tests__/acl-check.test.d.ts +0 -6
- package/dist/src/reporter/__tests__/acl-check.test.js +0 -59
- package/dist/src/reporter/__tests__/auto-fire.test.d.ts +0 -10
- package/dist/src/reporter/__tests__/auto-fire.test.js +0 -140
- package/dist/src/reporter/__tests__/budget.test.d.ts +0 -7
- package/dist/src/reporter/__tests__/budget.test.js +0 -60
- package/dist/src/reporter/__tests__/handlers.test.d.ts +0 -7
- package/dist/src/reporter/__tests__/handlers.test.js +0 -163
- package/dist/src/reporter/__tests__/query-router.test.d.ts +0 -6
- package/dist/src/reporter/__tests__/query-router.test.js +0 -90
- package/dist/src/router/__tests__/step-router.test.d.ts +0 -4
- package/dist/src/router/__tests__/step-router.test.js +0 -131
- package/dist/src/router/classifier/index.test.d.ts +0 -1
- package/dist/src/router/classifier/index.test.js +0 -29
- package/dist/src/router/classifier/regex.test.d.ts +0 -1
- package/dist/src/router/classifier/regex.test.js +0 -44
- package/dist/src/router/classifier/tree-sitter.test.d.ts +0 -1
- package/dist/src/router/classifier/tree-sitter.test.js +0 -23
- package/dist/src/router/cold.test.d.ts +0 -1
- package/dist/src/router/cold.test.js +0 -56
- package/dist/src/router/decide.test.d.ts +0 -1
- package/dist/src/router/decide.test.js +0 -198
- package/dist/src/router/health.test.d.ts +0 -1
- package/dist/src/router/health.test.js +0 -52
- package/dist/src/router/provider-sentinel.test.d.ts +0 -1
- package/dist/src/router/provider-sentinel.test.js +0 -20
- package/dist/src/router/role-override.test.d.ts +0 -1
- package/dist/src/router/role-override.test.js +0 -26
- package/dist/src/router/warm.test.d.ts +0 -1
- package/dist/src/router/warm.test.js +0 -202
- package/dist/src/scaffold/__tests__/continuation-prompt.test.d.ts +0 -4
- package/dist/src/scaffold/__tests__/continuation-prompt.test.js +0 -79
- package/dist/src/scaffold/__tests__/continue-as-council.spec.d.ts +0 -10
- package/dist/src/scaffold/__tests__/continue-as-council.spec.js +0 -102
- package/dist/src/scaffold/__tests__/dotnet-assembly-name.test.d.ts +0 -1
- package/dist/src/scaffold/__tests__/dotnet-assembly-name.test.js +0 -27
- package/dist/src/scaffold/__tests__/fe-scaffold-contents.test.d.ts +0 -1
- package/dist/src/scaffold/__tests__/fe-scaffold-contents.test.js +0 -106
- package/dist/src/scaffold/__tests__/init-new.smoke.spec.d.ts +0 -15
- package/dist/src/scaffold/__tests__/init-new.smoke.spec.js +0 -81
- package/dist/src/scaffold/__tests__/init-new.spec.d.ts +0 -5
- package/dist/src/scaffold/__tests__/init-new.spec.js +0 -378
- package/dist/src/scaffold/__tests__/install-bb-templates.spec.d.ts +0 -1
- package/dist/src/scaffold/__tests__/install-bb-templates.spec.js +0 -77
- package/dist/src/scaffold/__tests__/point-to-existing.spec.d.ts +0 -7
- package/dist/src/scaffold/__tests__/point-to-existing.spec.js +0 -94
- package/dist/src/self-qa/__tests__/agentic-context.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/agentic-context.test.js +0 -98
- package/dist/src/self-qa/__tests__/agentic-loop.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/agentic-loop.test.js +0 -62
- package/dist/src/self-qa/__tests__/delta-encoder.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/delta-encoder.test.js +0 -97
- package/dist/src/self-qa/__tests__/judge.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/judge.test.js +0 -131
- package/dist/src/self-qa/__tests__/scenario-planner.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/scenario-planner.test.js +0 -79
- package/dist/src/self-qa/__tests__/spec-emitter.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/spec-emitter.test.js +0 -62
- package/dist/src/storage/__tests__/hierarchical-session.test.d.ts +0 -1
- package/dist/src/storage/__tests__/hierarchical-session.test.js +0 -161
- package/dist/src/storage/__tests__/migrations.test.d.ts +0 -12
- package/dist/src/storage/__tests__/migrations.test.js +0 -357
- package/dist/src/storage/__tests__/sweep-stale-pending.test.d.ts +0 -10
- package/dist/src/storage/__tests__/sweep-stale-pending.test.js +0 -97
- package/dist/src/storage/__tests__/ui-interaction-log.test.d.ts +0 -7
- package/dist/src/storage/__tests__/ui-interaction-log.test.js +0 -127
- package/dist/src/storage/atomic-io.test.d.ts +0 -1
- package/dist/src/storage/atomic-io.test.js +0 -74
- package/dist/src/storage/config.test.d.ts +0 -1
- package/dist/src/storage/config.test.js +0 -29
- package/dist/src/storage/session-experience-store.test.d.ts +0 -5
- package/dist/src/storage/session-experience-store.test.js +0 -86
- package/dist/src/storage/tool-results.test.d.ts +0 -1
- package/dist/src/storage/tool-results.test.js +0 -48
- package/dist/src/storage/transcript-response-entry.test.d.ts +0 -1
- package/dist/src/storage/transcript-response-entry.test.js +0 -111
- package/dist/src/storage/transcript.test.d.ts +0 -1
- package/dist/src/storage/transcript.test.js +0 -22
- package/dist/src/storage/usage-cap.test.d.ts +0 -1
- package/dist/src/storage/usage-cap.test.js +0 -51
- package/dist/src/tools/__tests__/native-tools.test.d.ts +0 -1
- package/dist/src/tools/__tests__/native-tools.test.js +0 -59
- package/dist/src/tools/__tests__/vision-gate.test.d.ts +0 -1
- package/dist/src/tools/__tests__/vision-gate.test.js +0 -56
- package/dist/src/tools/bash-output-cache.test.d.ts +0 -1
- package/dist/src/tools/bash-output-cache.test.js +0 -89
- package/dist/src/tools/bash-output-integration.test.d.ts +0 -10
- package/dist/src/tools/bash-output-integration.test.js +0 -30
- package/dist/src/tools/bash.test.d.ts +0 -1
- package/dist/src/tools/bash.test.js +0 -90
- package/dist/src/tools/computer.test.d.ts +0 -1
- package/dist/src/tools/computer.test.js +0 -142
- package/dist/src/tools/file-tracker.test.d.ts +0 -1
- package/dist/src/tools/file-tracker.test.js +0 -77
- package/dist/src/tools/file.test.d.ts +0 -1
- package/dist/src/tools/file.test.js +0 -106
- package/dist/src/tools/git-safety.test.d.ts +0 -1
- package/dist/src/tools/git-safety.test.js +0 -155
- package/dist/src/tools/registry-bash-empty-command.test.d.ts +0 -13
- package/dist/src/tools/registry-bash-empty-command.test.js +0 -57
- package/dist/src/tools/registry-bash-footer.test.d.ts +0 -7
- package/dist/src/tools/registry-bash-footer.test.js +0 -82
- package/dist/src/tools/registry-ee-query.test.d.ts +0 -11
- package/dist/src/tools/registry-ee-query.test.js +0 -71
- package/dist/src/tools/registry-git-safety.test.d.ts +0 -7
- package/dist/src/tools/registry-git-safety.test.js +0 -103
- package/dist/src/tools/registry-session-repeat.test.d.ts +0 -12
- package/dist/src/tools/registry-session-repeat.test.js +0 -87
- package/dist/src/tools/registry.test.d.ts +0 -1
- package/dist/src/tools/registry.test.js +0 -34
- package/dist/src/tools/schedule.test.d.ts +0 -1
- package/dist/src/tools/schedule.test.js +0 -118
- package/dist/src/tools/todo-write-snapshot.test.d.ts +0 -1
- package/dist/src/tools/todo-write-snapshot.test.js +0 -43
- package/dist/src/ui/__tests__/markdown-render.test.d.ts +0 -1
- package/dist/src/ui/__tests__/markdown-render.test.js +0 -65
- package/dist/src/ui/__tests__/picker-providers.test.d.ts +0 -1
- package/dist/src/ui/__tests__/picker-providers.test.js +0 -31
- package/dist/src/ui/cards/__tests__/product-status-card.test.d.ts +0 -1
- package/dist/src/ui/cards/__tests__/product-status-card.test.js +0 -27
- package/dist/src/ui/components/__tests__/council-leader-bubble.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-leader-bubble.test.js +0 -14
- package/dist/src/ui/components/__tests__/council-message-bubble.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-message-bubble.test.js +0 -74
- package/dist/src/ui/components/__tests__/council-phase-timeline.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-phase-timeline.test.js +0 -51
- package/dist/src/ui/components/__tests__/council-placeholder-bubble.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-placeholder-bubble.test.js +0 -14
- package/dist/src/ui/components/__tests__/council-question-card.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-question-card.test.js +0 -121
- package/dist/src/ui/components/__tests__/council-synthesis-banner.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-synthesis-banner.test.js +0 -11
- package/dist/src/ui/components/__tests__/task-list-panel.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/task-list-panel.test.js +0 -31
- package/dist/src/ui/components/__tests__/use-pair-quote-buffer.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/use-pair-quote-buffer.test.js +0 -37
- package/dist/src/ui/slash/__tests__/clear.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/clear.test.js +0 -58
- package/dist/src/ui/slash/__tests__/compact.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/compact.test.js +0 -43
- package/dist/src/ui/slash/__tests__/cost.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/cost.test.js +0 -54
- package/dist/src/ui/slash/__tests__/discuss.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/discuss.test.js +0 -83
- package/dist/src/ui/slash/__tests__/execute.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/execute.test.js +0 -71
- package/dist/src/ui/slash/__tests__/expand.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/expand.test.js +0 -67
- package/dist/src/ui/slash/__tests__/ideal.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/ideal.test.js +0 -158
- package/dist/src/ui/slash/__tests__/menu-parity.test.d.ts +0 -17
- package/dist/src/ui/slash/__tests__/menu-parity.test.js +0 -43
- package/dist/src/ui/slash/__tests__/optimize.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/optimize.test.js +0 -130
- package/dist/src/ui/slash/__tests__/pin.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/pin.test.js +0 -38
- package/dist/src/ui/slash/__tests__/plan.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/plan.test.js +0 -82
- package/dist/src/ui/slash/__tests__/ponytail.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/ponytail.test.js +0 -37
- package/dist/src/ui/slash/__tests__/status-render.test.d.ts +0 -7
- package/dist/src/ui/slash/__tests__/status-render.test.js +0 -77
- package/dist/src/ui/slash/route.test.d.ts +0 -1
- package/dist/src/ui/slash/route.test.js +0 -70
- package/dist/src/ui/status-bar/index.test.d.ts +0 -1
- package/dist/src/ui/status-bar/index.test.js +0 -139
- package/dist/src/ui/status-bar/store.test.d.ts +0 -1
- package/dist/src/ui/status-bar/store.test.js +0 -116
- package/dist/src/ui/status-bar/tier-badge.test.d.ts +0 -1
- package/dist/src/ui/status-bar/tier-badge.test.js +0 -34
- package/dist/src/ui/status-bar/usd-meter.test.d.ts +0 -1
- package/dist/src/ui/status-bar/usd-meter.test.js +0 -32
- package/dist/src/ui/utils/__tests__/format.test.d.ts +0 -1
- package/dist/src/ui/utils/__tests__/format.test.js +0 -50
- package/dist/src/ui/utils/__tests__/tools.test.d.ts +0 -1
- package/dist/src/ui/utils/__tests__/tools.test.js +0 -48
- package/dist/src/ui/utils/relaunch.test.d.ts +0 -1
- package/dist/src/ui/utils/relaunch.test.js +0 -133
- package/dist/src/ui/utils/text.test.d.ts +0 -1
- package/dist/src/ui/utils/text.test.js +0 -47
- package/dist/src/usage/__tests__/product-ledger.test.d.ts +0 -1
- package/dist/src/usage/__tests__/product-ledger.test.js +0 -60
- package/dist/src/usage/downgrade.test.d.ts +0 -1
- package/dist/src/usage/downgrade.test.js +0 -70
- package/dist/src/usage/estimator.test.d.ts +0 -1
- package/dist/src/usage/estimator.test.js +0 -38
- package/dist/src/usage/ledger.test.d.ts +0 -1
- package/dist/src/usage/ledger.test.js +0 -171
- package/dist/src/usage/midstream.test.d.ts +0 -1
- package/dist/src/usage/midstream.test.js +0 -47
- package/dist/src/usage/thresholds.test.d.ts +0 -1
- package/dist/src/usage/thresholds.test.js +0 -77
- package/dist/src/utils/__tests__/auto-council-settings.test.d.ts +0 -1
- package/dist/src/utils/__tests__/auto-council-settings.test.js +0 -41
- package/dist/src/utils/__tests__/compaction-caps.test.d.ts +0 -21
- package/dist/src/utils/__tests__/compaction-caps.test.js +0 -187
- package/dist/src/utils/__tests__/ee-logger.test.d.ts +0 -11
- package/dist/src/utils/__tests__/ee-logger.test.js +0 -165
- package/dist/src/utils/__tests__/file-lock.test.d.ts +0 -1
- package/dist/src/utils/__tests__/file-lock.test.js +0 -66
- package/dist/src/utils/__tests__/footprint-gitignore.test.d.ts +0 -1
- package/dist/src/utils/__tests__/footprint-gitignore.test.js +0 -50
- package/dist/src/utils/__tests__/llm-deadline-abort.test.d.ts +0 -1
- package/dist/src/utils/__tests__/llm-deadline-abort.test.js +0 -33
- package/dist/src/utils/__tests__/llm-deadline.test.d.ts +0 -1
- package/dist/src/utils/__tests__/llm-deadline.test.js +0 -68
- package/dist/src/utils/__tests__/logger.test.d.ts +0 -1
- package/dist/src/utils/__tests__/logger.test.js +0 -115
- package/dist/src/utils/__tests__/rate-limit.test.d.ts +0 -1
- package/dist/src/utils/__tests__/rate-limit.test.js +0 -38
- package/dist/src/utils/__tests__/settings-agent-first.test.d.ts +0 -1
- package/dist/src/utils/__tests__/settings-agent-first.test.js +0 -48
- package/dist/src/utils/__tests__/settings-disabled-models.test.d.ts +0 -7
- package/dist/src/utils/__tests__/settings-disabled-models.test.js +0 -99
- package/dist/src/utils/__tests__/settings-web-research.test.d.ts +0 -1
- package/dist/src/utils/__tests__/settings-web-research.test.js +0 -46
- package/dist/src/utils/__tests__/slugify.test.d.ts +0 -1
- package/dist/src/utils/__tests__/slugify.test.js +0 -37
- package/dist/src/utils/__tests__/visible-retry.test.d.ts +0 -1
- package/dist/src/utils/__tests__/visible-retry.test.js +0 -143
- package/dist/src/utils/install-manager.test.d.ts +0 -1
- package/dist/src/utils/install-manager.test.js +0 -169
- package/dist/src/utils/instructions.test.d.ts +0 -1
- package/dist/src/utils/instructions.test.js +0 -93
- package/dist/src/utils/open-url.test.d.ts +0 -1
- package/dist/src/utils/open-url.test.js +0 -86
- package/dist/src/utils/permission-mode.test.d.ts +0 -1
- package/dist/src/utils/permission-mode.test.js +0 -188
- package/dist/src/utils/redactor.test.d.ts +0 -1
- package/dist/src/utils/redactor.test.js +0 -84
- package/dist/src/utils/settings.test.d.ts +0 -1
- package/dist/src/utils/settings.test.js +0 -212
- package/dist/src/utils/shell.test.d.ts +0 -1
- package/dist/src/utils/shell.test.js +0 -97
- package/dist/src/utils/skills.test.d.ts +0 -1
- package/dist/src/utils/skills.test.js +0 -45
- package/dist/src/utils/subagent-display.test.d.ts +0 -1
- package/dist/src/utils/subagent-display.test.js +0 -21
- package/dist/src/utils/subagents-settings.test.d.ts +0 -1
- package/dist/src/utils/subagents-settings.test.js +0 -64
- package/dist/src/utils/telegram-audio-settings.test.d.ts +0 -1
- package/dist/src/utils/telegram-audio-settings.test.js +0 -39
- package/dist/src/utils/update-checker.test.d.ts +0 -1
- package/dist/src/utils/update-checker.test.js +0 -142
- package/dist/src/verify/__tests__/coverage-parsers.test.d.ts +0 -1
- package/dist/src/verify/__tests__/coverage-parsers.test.js +0 -69
- package/dist/src/verify/__tests__/dotnet-recipe.test.d.ts +0 -10
- package/dist/src/verify/__tests__/dotnet-recipe.test.js +0 -70
- package/dist/src/verify/checkpoint.test.d.ts +0 -1
- package/dist/src/verify/checkpoint.test.js +0 -160
- package/dist/src/verify/entrypoint.test.d.ts +0 -1
- package/dist/src/verify/entrypoint.test.js +0 -233
- package/dist/src/verify/environment.test.d.ts +0 -1
- package/dist/src/verify/environment.test.js +0 -94
- package/dist/src/verify/orchestrator.test.d.ts +0 -1
- package/dist/src/verify/orchestrator.test.js +0 -126
- package/dist/src/verify/runtime-prep.test.d.ts +0 -1
- package/dist/src/verify/runtime-prep.test.js +0 -38
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { beforeAll, describe, expect, test } from "vitest";
|
|
2
|
-
import { getEffectiveReasoningEffort, getModelIds, getModelInfo, getSupportedReasoningEfforts, loadCatalog, MODELS, normalizeModelId, } from "../registry.js";
|
|
3
|
-
beforeAll(async () => {
|
|
4
|
-
await loadCatalog();
|
|
5
|
-
});
|
|
6
|
-
describe("MODELS catalog", () => {
|
|
7
|
-
test("has at least one model", () => {
|
|
8
|
-
expect(MODELS.length).toBeGreaterThan(0);
|
|
9
|
-
});
|
|
10
|
-
test("every model has required fields", () => {
|
|
11
|
-
for (const m of MODELS) {
|
|
12
|
-
expect(m.id).toBeTruthy();
|
|
13
|
-
expect(m.name).toBeTruthy();
|
|
14
|
-
expect(m.contextWindow).toBeGreaterThan(0);
|
|
15
|
-
expect(typeof m.inputPrice).toBe("number");
|
|
16
|
-
expect(typeof m.outputPrice).toBe("number");
|
|
17
|
-
expect(typeof m.reasoning).toBe("boolean");
|
|
18
|
-
expect(m.description).toBeTruthy();
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
test("no duplicate IDs", () => {
|
|
22
|
-
const ids = MODELS.map((m) => m.id);
|
|
23
|
-
expect(new Set(ids).size).toBe(ids.length);
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
describe("getModelIds", () => {
|
|
27
|
-
test("returns array of all model IDs", () => {
|
|
28
|
-
const ids = getModelIds();
|
|
29
|
-
expect(ids.length).toBe(MODELS.length);
|
|
30
|
-
expect(ids).toContain("deepseek-v4-flash");
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
describe("getModelInfo", () => {
|
|
34
|
-
test("returns info for known model", () => {
|
|
35
|
-
const info = getModelInfo("deepseek-v4-flash");
|
|
36
|
-
expect(info).toBeDefined();
|
|
37
|
-
expect(info.name).toBe("DeepSeek V4 Flash (native)");
|
|
38
|
-
expect(info.contextWindow).toBe(128_000);
|
|
39
|
-
});
|
|
40
|
-
test("returns info via alias", () => {
|
|
41
|
-
const info = getModelInfo("deepseek-flash-native");
|
|
42
|
-
expect(info).toBeDefined();
|
|
43
|
-
expect(info.id).toBe("deepseek-v4-flash");
|
|
44
|
-
});
|
|
45
|
-
test("returns undefined for unknown model", () => {
|
|
46
|
-
expect(getModelInfo("nonexistent-model")).toBeUndefined();
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
describe("normalizeModelId", () => {
|
|
50
|
-
test("resolves alias to canonical ID", () => {
|
|
51
|
-
expect(normalizeModelId("deepseek-flash-native")).toBe("deepseek-v4-flash");
|
|
52
|
-
});
|
|
53
|
-
test("passes through unknown IDs unchanged", () => {
|
|
54
|
-
expect(normalizeModelId("custom-model-123")).toBe("custom-model-123");
|
|
55
|
-
});
|
|
56
|
-
test("passes through canonical IDs unchanged", () => {
|
|
57
|
-
expect(normalizeModelId("deepseek-v4-flash")).toBe("deepseek-v4-flash");
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
describe("getEffectiveReasoningEffort", () => {
|
|
61
|
-
test("returns provided effort for reasoning model", () => {
|
|
62
|
-
expect(getEffectiveReasoningEffort("deepseek-v4-flash", "high")).toBe("high");
|
|
63
|
-
});
|
|
64
|
-
test("returns undefined when no effort provided", () => {
|
|
65
|
-
expect(getEffectiveReasoningEffort("deepseek-v4-flash", undefined)).toBeUndefined();
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
describe("getSupportedReasoningEfforts", () => {
|
|
69
|
-
test("returns efforts for reasoning-capable model", () => {
|
|
70
|
-
const efforts = getSupportedReasoningEfforts("deepseek-v4-flash");
|
|
71
|
-
expect(efforts.length).toBeGreaterThan(0);
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
//# sourceMappingURL=registry.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { beforeAll, describe, expect, it } from "vitest";
|
|
2
|
-
import { detectProviderForModel } from "../providers/runtime.js";
|
|
3
|
-
import { getModelInfo, loadCatalog } from "./registry.js";
|
|
4
|
-
/**
|
|
5
|
-
* Regression guard for the Agy/Google Gemini catalog entries.
|
|
6
|
-
* These are the models Agy supports for the "google" provider (via agy.exe OAuth + cloudcode-pa).
|
|
7
|
-
* Without a catalog entry a model cannot be selected or routed (Zero-Hardcode Rule).
|
|
8
|
-
*/
|
|
9
|
-
const GEMINI_IDS = [
|
|
10
|
-
"gemini-3.5-flash-high",
|
|
11
|
-
"gemini-3.5-flash-medium",
|
|
12
|
-
"gemini-3.5-flash-low",
|
|
13
|
-
"gemini-3.1-pro-high",
|
|
14
|
-
"gemini-3.1-pro-low",
|
|
15
|
-
"gemini-3-flash",
|
|
16
|
-
];
|
|
17
|
-
describe("Gemini catalog entries", () => {
|
|
18
|
-
beforeAll(async () => {
|
|
19
|
-
await loadCatalog();
|
|
20
|
-
});
|
|
21
|
-
it("resolves every Gemini id to the google provider", () => {
|
|
22
|
-
for (const id of GEMINI_IDS) {
|
|
23
|
-
const info = getModelInfo(id);
|
|
24
|
-
expect(info, `catalog missing ${id}`).toBeDefined();
|
|
25
|
-
expect(info?.provider).toBe("google");
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
it("maps gemini ids to the google provider via runtime detection", () => {
|
|
29
|
-
// direct + alias (gemini-3.5-flash aliases to the high variant)
|
|
30
|
-
expect(detectProviderForModel("gemini-3.5-flash-high")).toBe("google");
|
|
31
|
-
expect(detectProviderForModel("gemini-3.5-flash")).toBe("google");
|
|
32
|
-
expect(detectProviderForModel("gemini-3.1-pro-high")).toBe("google");
|
|
33
|
-
});
|
|
34
|
-
it("marks all Gemini models multimodal (vision) and 1M context", () => {
|
|
35
|
-
for (const id of GEMINI_IDS) {
|
|
36
|
-
const info = getModelInfo(id);
|
|
37
|
-
expect(info?.supportsVision, `${id} should support vision`).toBe(true);
|
|
38
|
-
expect(info?.contextWindow ?? 0, `${id} should be ~1M context`).toBeGreaterThanOrEqual(1_000_000);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
it("covers fast / balanced / premium tiers across the Gemini line", () => {
|
|
42
|
-
const tiers = new Set(GEMINI_IDS.map((id) => getModelInfo(id)?.tier));
|
|
43
|
-
expect(tiers.has("fast")).toBe(true);
|
|
44
|
-
expect(tiers.has("balanced")).toBe(true);
|
|
45
|
-
expect(tiers.has("premium")).toBe(true);
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
//# sourceMappingURL=catalog-gemini.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
2
|
-
import { getCatalogUrl } from "./catalog-client.js";
|
|
3
|
-
describe("getCatalogUrl", () => {
|
|
4
|
-
const original = process.env.MUONROI_CATALOG_URL;
|
|
5
|
-
afterEach(() => {
|
|
6
|
-
if (original === undefined)
|
|
7
|
-
delete process.env.MUONROI_CATALOG_URL;
|
|
8
|
-
else
|
|
9
|
-
process.env.MUONROI_CATALOG_URL = original;
|
|
10
|
-
});
|
|
11
|
-
it("defaults to the catalog.muonroi.com service (not the dead cp.muonroi.com URL)", () => {
|
|
12
|
-
delete process.env.MUONROI_CATALOG_URL;
|
|
13
|
-
const url = getCatalogUrl();
|
|
14
|
-
expect(url).toBe("https://catalog.muonroi.com/api/v1/models");
|
|
15
|
-
expect(url).not.toContain("cp.muonroi.com");
|
|
16
|
-
});
|
|
17
|
-
it("honors MUONROI_CATALOG_URL override", () => {
|
|
18
|
-
process.env.MUONROI_CATALOG_URL = "http://localhost:8083/api/v1/models";
|
|
19
|
-
expect(getCatalogUrl()).toBe("http://localhost:8083/api/v1/models");
|
|
20
|
-
});
|
|
21
|
-
it("ignores a blank/whitespace override and falls back to the default", () => {
|
|
22
|
-
process.env.MUONROI_CATALOG_URL = " ";
|
|
23
|
-
expect(getCatalogUrl()).toBe("https://catalog.muonroi.com/api/v1/models");
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=catalog-url.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
import { describe, expect, it } from "vitest";
|
|
3
|
-
import { safeValidateCatalog, validateStaticCatalog } from "./catalog-client.js";
|
|
4
|
-
const realCatalog = createRequire(import.meta.url)("./catalog.json");
|
|
5
|
-
// A minimal valid catalog payload for the happy-path assertions.
|
|
6
|
-
const VALID = {
|
|
7
|
-
version: "1.0",
|
|
8
|
-
updated_at: "2026-06-06",
|
|
9
|
-
models: [
|
|
10
|
-
{
|
|
11
|
-
id: "m-fast",
|
|
12
|
-
name: "M Fast",
|
|
13
|
-
provider: "acme",
|
|
14
|
-
tier: "fast",
|
|
15
|
-
context_window: 128000,
|
|
16
|
-
max_output_tokens: 8000,
|
|
17
|
-
input_price_per_million: 0.1,
|
|
18
|
-
output_price_per_million: 0.2,
|
|
19
|
-
reasoning: false,
|
|
20
|
-
description: "fast",
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
};
|
|
24
|
-
describe("catalog schema validation", () => {
|
|
25
|
-
it("accepts the real bundled catalog.json", () => {
|
|
26
|
-
const models = safeValidateCatalog(realCatalog);
|
|
27
|
-
expect(models).not.toBeNull();
|
|
28
|
-
expect(models.length).toBeGreaterThan(0);
|
|
29
|
-
// every entry must carry the routing-critical fields
|
|
30
|
-
for (const m of models) {
|
|
31
|
-
expect(typeof m.id).toBe("string");
|
|
32
|
-
expect(typeof m.provider).toBe("string");
|
|
33
|
-
expect(typeof m.tier).toBe("string");
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
it("safeValidateCatalog returns the models for a valid payload", () => {
|
|
37
|
-
expect(safeValidateCatalog(VALID)?.[0]?.id).toBe("m-fast");
|
|
38
|
-
});
|
|
39
|
-
it("safeValidateCatalog returns null for a malformed remote payload (does not throw)", () => {
|
|
40
|
-
expect(safeValidateCatalog({ version: "1", models: "nope" })).toBeNull();
|
|
41
|
-
expect(safeValidateCatalog({ version: "1", updated_at: "x", models: [] })).toBeNull(); // empty
|
|
42
|
-
expect(safeValidateCatalog({
|
|
43
|
-
version: "1",
|
|
44
|
-
updated_at: "x",
|
|
45
|
-
models: [{ id: "x" }], // missing required provider/tier/prices
|
|
46
|
-
})).toBeNull();
|
|
47
|
-
expect(safeValidateCatalog(null)).toBeNull();
|
|
48
|
-
});
|
|
49
|
-
it("forward-compatible: unknown future fields are tolerated", () => {
|
|
50
|
-
const withExtra = {
|
|
51
|
-
...VALID,
|
|
52
|
-
models: [{ ...VALID.models[0], some_future_flag: true }],
|
|
53
|
-
};
|
|
54
|
-
expect(safeValidateCatalog(withExtra)).not.toBeNull();
|
|
55
|
-
});
|
|
56
|
-
it("validateStaticCatalog throws loudly on a malformed bundled file", () => {
|
|
57
|
-
expect(() => validateStaticCatalog({ version: "1", updated_at: "x", models: [{ id: "x" }] }, "test.json")).toThrow(/Malformed catalog at test\.json/);
|
|
58
|
-
});
|
|
59
|
-
it("validateStaticCatalog returns models for a valid bundled file", () => {
|
|
60
|
-
expect(validateStaticCatalog(VALID, "test.json")[0]?.id).toBe("m-fast");
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
//# sourceMappingURL=catalog-validation.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* doctor-council-mcp.test.ts
|
|
3
|
-
*
|
|
4
|
-
* CQ-23: checkCouncilMcpNudge doctor check — warns when user has run
|
|
5
|
-
* >=3 council sessions on URL/research topics without Tavily or Playwright MCP.
|
|
6
|
-
*/
|
|
7
|
-
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
8
|
-
// --- Mocks must be declared before imports ---
|
|
9
|
-
// Mock healthDetailed to avoid network calls
|
|
10
|
-
vi.mock("../../ee/health.js", () => ({
|
|
11
|
-
healthDetailed: vi.fn().mockResolvedValue({
|
|
12
|
-
ok: true,
|
|
13
|
-
status: 200,
|
|
14
|
-
mode: "thin-client",
|
|
15
|
-
circuit: "closed",
|
|
16
|
-
components: {
|
|
17
|
-
server: { ok: true, status: 200 },
|
|
18
|
-
gates: { ok: true, status: 200 },
|
|
19
|
-
},
|
|
20
|
-
}),
|
|
21
|
-
}));
|
|
22
|
-
// Mock providers/keychain to avoid OS keychain calls
|
|
23
|
-
vi.mock("../../providers/keychain.js", () => ({
|
|
24
|
-
listStoredProviders: vi.fn().mockResolvedValue([]),
|
|
25
|
-
}));
|
|
26
|
-
// vi.hoisted() ensures mock variables are initialized before vi.mock() factories run
|
|
27
|
-
const { mockLoadMcpServers, mockLoadUserSettings } = vi.hoisted(() => ({
|
|
28
|
-
mockLoadMcpServers: vi.fn().mockReturnValue([]),
|
|
29
|
-
mockLoadUserSettings: vi.fn().mockReturnValue({}),
|
|
30
|
-
}));
|
|
31
|
-
vi.mock("../../utils/settings.js", () => ({
|
|
32
|
-
loadMcpServers: mockLoadMcpServers,
|
|
33
|
-
loadUserSettings: mockLoadUserSettings,
|
|
34
|
-
loadProjectSettings: vi.fn().mockReturnValue({}),
|
|
35
|
-
}));
|
|
36
|
-
// vi.hoisted() for db mocks — mockPrepare captures mockGet/mockAll in the same closure
|
|
37
|
-
const { mockGet, mockAll, mockPrepare } = vi.hoisted(() => {
|
|
38
|
-
const mockGet = vi.fn().mockReturnValue({ cnt: 0 });
|
|
39
|
-
const mockAll = vi.fn().mockReturnValue([]);
|
|
40
|
-
const mockPrepare = vi.fn().mockImplementation((sql) => {
|
|
41
|
-
if (sql.includes("interaction_logs")) {
|
|
42
|
-
return { get: mockGet };
|
|
43
|
-
}
|
|
44
|
-
return { all: mockAll };
|
|
45
|
-
});
|
|
46
|
-
return { mockGet, mockAll, mockPrepare };
|
|
47
|
-
});
|
|
48
|
-
vi.mock("../../storage/db.js", () => ({
|
|
49
|
-
getDatabase: vi.fn(() => ({ prepare: mockPrepare })),
|
|
50
|
-
}));
|
|
51
|
-
import { runDoctor } from "../doctor.js";
|
|
52
|
-
// Helper: build a [Council Memory] message_json row with a given topic
|
|
53
|
-
function councilRow(topic) {
|
|
54
|
-
const record = JSON.stringify({ topic, outcome: "test", rounds: 1 });
|
|
55
|
-
const content = `[Council Memory] ${record}`;
|
|
56
|
-
return { message_json: JSON.stringify({ role: "system", content }) };
|
|
57
|
-
}
|
|
58
|
-
// Helper: extract the council.mcp result from runDoctor()
|
|
59
|
-
async function getCouncilMcpResult() {
|
|
60
|
-
const results = await runDoctor();
|
|
61
|
-
const r = results.find((c) => c.name === "council.mcp");
|
|
62
|
-
expect(r, "council.mcp check must be present in runDoctor output").toBeDefined();
|
|
63
|
-
return r;
|
|
64
|
-
}
|
|
65
|
-
describe("checkCouncilMcpNudge (CQ-23)", () => {
|
|
66
|
-
beforeEach(() => {
|
|
67
|
-
vi.clearAllMocks();
|
|
68
|
-
// Restore defaults after clearAllMocks
|
|
69
|
-
mockLoadMcpServers.mockReturnValue([]);
|
|
70
|
-
mockLoadUserSettings.mockReturnValue({});
|
|
71
|
-
mockGet.mockReturnValue({ cnt: 0 });
|
|
72
|
-
mockAll.mockReturnValue([]);
|
|
73
|
-
mockPrepare.mockImplementation((sql) => {
|
|
74
|
-
if (sql.includes("interaction_logs")) {
|
|
75
|
-
return { get: mockGet };
|
|
76
|
-
}
|
|
77
|
-
return { all: mockAll };
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
it("Test 1: no MCP + 3 URL-topic sessions → warn", async () => {
|
|
81
|
-
mockLoadMcpServers.mockReturnValue([]);
|
|
82
|
-
mockAll.mockReturnValue([
|
|
83
|
-
councilRow("https://example.com analysis"),
|
|
84
|
-
councilRow("review https://foo.io changelog"),
|
|
85
|
-
councilRow("https://bar.dev migration"),
|
|
86
|
-
]);
|
|
87
|
-
const result = await getCouncilMcpResult();
|
|
88
|
-
expect(result.status).toBe("warn");
|
|
89
|
-
});
|
|
90
|
-
it("Test 2: tavily enabled + 3 URL-topic sessions → pass", async () => {
|
|
91
|
-
mockLoadMcpServers.mockReturnValue([{ id: "tavily", label: "Tavily", enabled: true, transport: "stdio" }]);
|
|
92
|
-
mockAll.mockReturnValue([
|
|
93
|
-
councilRow("https://example.com analysis"),
|
|
94
|
-
councilRow("https://foo.io changelog"),
|
|
95
|
-
councilRow("https://bar.dev migration"),
|
|
96
|
-
]);
|
|
97
|
-
const result = await getCouncilMcpResult();
|
|
98
|
-
expect(result.status).toBe("pass");
|
|
99
|
-
});
|
|
100
|
-
it("Test 3: no MCP + only 2 qualifying sessions → pass (threshold not met)", async () => {
|
|
101
|
-
mockLoadMcpServers.mockReturnValue([]);
|
|
102
|
-
mockAll.mockReturnValue([councilRow("https://example.com analysis"), councilRow("review https://foo.io")]);
|
|
103
|
-
const result = await getCouncilMcpResult();
|
|
104
|
-
expect(result.status).toBe("pass");
|
|
105
|
-
});
|
|
106
|
-
it("Test 4: DB unavailable → pass with skip message", async () => {
|
|
107
|
-
mockLoadMcpServers.mockReturnValue([]);
|
|
108
|
-
mockPrepare.mockImplementation(() => {
|
|
109
|
-
throw new Error("DB unavailable");
|
|
110
|
-
});
|
|
111
|
-
const result = await getCouncilMcpResult();
|
|
112
|
-
expect(result.status).toBe("pass");
|
|
113
|
-
expect(result.detail).toContain("skipped");
|
|
114
|
-
});
|
|
115
|
-
it("Test 5: warn detail contains 'tavily', 'playwright', and session count", async () => {
|
|
116
|
-
mockLoadMcpServers.mockReturnValue([]);
|
|
117
|
-
mockAll.mockReturnValue([
|
|
118
|
-
councilRow("https://example.com"),
|
|
119
|
-
councilRow("https://example.org"),
|
|
120
|
-
councilRow("https://example.net"),
|
|
121
|
-
]);
|
|
122
|
-
const result = await getCouncilMcpResult();
|
|
123
|
-
expect(result.status).toBe("warn");
|
|
124
|
-
expect(result.detail).toContain("tavily");
|
|
125
|
-
expect(result.detail).toContain("playwright");
|
|
126
|
-
expect(result.detail).toContain("3");
|
|
127
|
-
});
|
|
128
|
-
it("Test 6: topic with research keyword (no URL) counts as qualifying", async () => {
|
|
129
|
-
mockLoadMcpServers.mockReturnValue([]);
|
|
130
|
-
mockAll.mockReturnValue([
|
|
131
|
-
councilRow("research on quantum computing"),
|
|
132
|
-
councilRow("find the latest framework"),
|
|
133
|
-
councilRow("investigate performance issues"),
|
|
134
|
-
]);
|
|
135
|
-
const result = await getCouncilMcpResult();
|
|
136
|
-
expect(result.status).toBe("warn");
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
//# sourceMappingURL=doctor-council-mcp.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* doctor-ee-health.test.ts
|
|
3
|
-
*
|
|
4
|
-
* CQ-16c/16d regression tests: runDoctor reports ee.health and ee.brain
|
|
5
|
-
* with mode/circuit detail and brain-emptiness bootstrap hint.
|
|
6
|
-
*/
|
|
7
|
-
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
8
|
-
// Mock healthDetailed before doctor.ts imports it
|
|
9
|
-
vi.mock("../../ee/health.js", () => ({
|
|
10
|
-
healthDetailed: vi.fn(),
|
|
11
|
-
}));
|
|
12
|
-
// Mock getDatabase with a minimal SQLite-like interface
|
|
13
|
-
const mockGet = vi.fn().mockReturnValue({ cnt: 0 });
|
|
14
|
-
const mockPrepare = vi.fn().mockReturnValue({ get: mockGet });
|
|
15
|
-
vi.mock("../../storage/db", () => ({
|
|
16
|
-
getDatabase: vi.fn(() => ({ prepare: mockPrepare })),
|
|
17
|
-
}));
|
|
18
|
-
// Mock other external dependencies to prevent network calls in doctor
|
|
19
|
-
vi.mock("../../ee/intercept.js", () => ({
|
|
20
|
-
getDefaultEEClient: vi.fn(() => ({
|
|
21
|
-
health: vi.fn().mockResolvedValue({ ok: true, status: 200 }),
|
|
22
|
-
})),
|
|
23
|
-
}));
|
|
24
|
-
// Mock keychain — on macOS the real keychain probe can prompt and hang in CI.
|
|
25
|
-
vi.mock("../../providers/keychain.js", () => ({
|
|
26
|
-
listStoredProviders: vi.fn().mockResolvedValue([]),
|
|
27
|
-
getStoredApiKey: vi.fn().mockResolvedValue(null),
|
|
28
|
-
setStoredApiKey: vi.fn().mockResolvedValue(undefined),
|
|
29
|
-
deleteStoredApiKey: vi.fn().mockResolvedValue(undefined),
|
|
30
|
-
}));
|
|
31
|
-
// Mock settings — avoid filesystem reads that may block in CI sandboxes.
|
|
32
|
-
vi.mock("../../utils/settings.js", () => ({
|
|
33
|
-
loadUserSettings: vi.fn().mockResolvedValue({}),
|
|
34
|
-
saveUserSettings: vi.fn().mockResolvedValue(undefined),
|
|
35
|
-
loadMcpServers: vi.fn().mockResolvedValue([]),
|
|
36
|
-
}));
|
|
37
|
-
import { healthDetailed } from "../../ee/health.js";
|
|
38
|
-
import { runDoctor } from "../doctor.js";
|
|
39
|
-
const healthDetailedMock = vi.mocked(healthDetailed);
|
|
40
|
-
const HEALTH_OK = {
|
|
41
|
-
ok: true,
|
|
42
|
-
status: 200,
|
|
43
|
-
mode: "thin-client",
|
|
44
|
-
circuit: "closed",
|
|
45
|
-
components: {
|
|
46
|
-
server: { ok: true, status: 200 },
|
|
47
|
-
gates: { ok: true, status: 200 },
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
describe("doctor EE health checks (CQ-16c/16d)", () => {
|
|
51
|
-
beforeEach(() => {
|
|
52
|
-
healthDetailedMock.mockResolvedValue(HEALTH_OK);
|
|
53
|
-
mockGet.mockReturnValue({ cnt: 0 });
|
|
54
|
-
});
|
|
55
|
-
it("ee.health result is present in runDoctor output", async () => {
|
|
56
|
-
const results = await runDoctor();
|
|
57
|
-
const eeHealth = results.find((r) => r.name === "ee.health");
|
|
58
|
-
expect(eeHealth).toBeDefined();
|
|
59
|
-
});
|
|
60
|
-
it("ee.brain result is present in runDoctor output", async () => {
|
|
61
|
-
const results = await runDoctor();
|
|
62
|
-
const eeBrain = results.find((r) => r.name === "ee.brain");
|
|
63
|
-
expect(eeBrain).toBeDefined();
|
|
64
|
-
});
|
|
65
|
-
it("ee.health passes and includes mode=thin-client when EE is healthy", async () => {
|
|
66
|
-
const results = await runDoctor();
|
|
67
|
-
const eeHealth = results.find((r) => r.name === "ee.health");
|
|
68
|
-
expect(eeHealth?.status).toBe("pass");
|
|
69
|
-
expect(eeHealth?.detail).toContain("mode=thin-client");
|
|
70
|
-
});
|
|
71
|
-
it("ee.health warns with VPS address hint when EE unreachable (ok=false, thin-client)", async () => {
|
|
72
|
-
healthDetailedMock.mockResolvedValue({
|
|
73
|
-
ok: false,
|
|
74
|
-
status: 0,
|
|
75
|
-
mode: "thin-client",
|
|
76
|
-
circuit: "open",
|
|
77
|
-
components: {
|
|
78
|
-
server: { ok: false, status: 0 },
|
|
79
|
-
gates: { ok: false, status: 0 },
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
const results = await runDoctor();
|
|
83
|
-
const eeHealth = results.find((r) => r.name === "ee.health");
|
|
84
|
-
expect(eeHealth?.status).toBe("warn");
|
|
85
|
-
expect(eeHealth?.detail).toContain("72.61.127.154");
|
|
86
|
-
});
|
|
87
|
-
it("ee.health does NOT report unreachable when server is up but gates degraded (VERIFY F9)", async () => {
|
|
88
|
-
// Live ee_query works (server reachable) yet the gates sub-check fails —
|
|
89
|
-
// doctor must not call this "unreachable" (false negative). server.ok is
|
|
90
|
-
// the reachability signal, not result.ok.
|
|
91
|
-
healthDetailedMock.mockResolvedValue({
|
|
92
|
-
ok: false,
|
|
93
|
-
status: 200,
|
|
94
|
-
mode: "thin-client",
|
|
95
|
-
circuit: "closed",
|
|
96
|
-
components: {
|
|
97
|
-
server: { ok: true, status: 200 },
|
|
98
|
-
gates: { ok: false, status: 0 },
|
|
99
|
-
},
|
|
100
|
-
});
|
|
101
|
-
const results = await runDoctor();
|
|
102
|
-
const eeHealth = results.find((r) => r.name === "ee.health");
|
|
103
|
-
expect(eeHealth?.status).toBe("warn");
|
|
104
|
-
expect(eeHealth?.detail).not.toContain("unreachable");
|
|
105
|
-
expect(eeHealth?.detail).toContain("server=ok");
|
|
106
|
-
expect(eeHealth?.detail.toLowerCase()).toContain("gates");
|
|
107
|
-
});
|
|
108
|
-
it("ee.health warns gracefully when healthDetailed throws", async () => {
|
|
109
|
-
healthDetailedMock.mockRejectedValue(new Error("network timeout"));
|
|
110
|
-
const results = await runDoctor();
|
|
111
|
-
const eeHealth = results.find((r) => r.name === "ee.health");
|
|
112
|
-
expect(eeHealth?.status).toBe("warn");
|
|
113
|
-
});
|
|
114
|
-
it("ee.brain passes when no_match count is 0", async () => {
|
|
115
|
-
mockGet.mockReturnValue({ cnt: 0 });
|
|
116
|
-
const results = await runDoctor();
|
|
117
|
-
const eeBrain = results.find((r) => r.name === "ee.brain");
|
|
118
|
-
expect(eeBrain?.status).toBe("pass");
|
|
119
|
-
});
|
|
120
|
-
it("ee.brain warns with bootstrap hint when no_match count >= 50", async () => {
|
|
121
|
-
mockGet.mockReturnValue({ cnt: 50 });
|
|
122
|
-
const results = await runDoctor();
|
|
123
|
-
const eeBrain = results.find((r) => r.name === "ee.brain");
|
|
124
|
-
expect(eeBrain?.status).toBe("warn");
|
|
125
|
-
expect(eeBrain?.detail).toContain("experience extract");
|
|
126
|
-
});
|
|
127
|
-
it("ee.brain passes when no_match count is 49 (below threshold)", async () => {
|
|
128
|
-
mockGet.mockReturnValue({ cnt: 49 });
|
|
129
|
-
const results = await runDoctor();
|
|
130
|
-
const eeBrain = results.find((r) => r.name === "ee.brain");
|
|
131
|
-
expect(eeBrain?.status).toBe("pass");
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
//# sourceMappingURL=doctor-ee-health.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
-
// RED phase: import module under test (will fail until bug-report.ts is created)
|
|
3
|
-
import { buildBugReport, formatBugReport } from "./bug-report.js";
|
|
4
|
-
// Mock fs/promises for controlled test environment
|
|
5
|
-
// bug-report.ts uses named import { readFile } from "fs/promises"
|
|
6
|
-
vi.mock("fs/promises", () => {
|
|
7
|
-
const actual = require("fs/promises");
|
|
8
|
-
return {
|
|
9
|
-
...actual,
|
|
10
|
-
readFile: vi.fn(),
|
|
11
|
-
};
|
|
12
|
-
});
|
|
13
|
-
// Mock runDoctor to avoid real network calls
|
|
14
|
-
vi.mock("./doctor.js", () => ({
|
|
15
|
-
runDoctor: vi.fn().mockResolvedValue([
|
|
16
|
-
{ name: "bun_version", status: "pass", detail: "Bun 1.3.13" },
|
|
17
|
-
{ name: "os", status: "pass", detail: "linux 5.15" },
|
|
18
|
-
{ name: "key_presence", status: "pass", detail: "API key in env" },
|
|
19
|
-
{ name: "ollama", status: "warn", detail: "Ollama unreachable" },
|
|
20
|
-
{ name: "ee", status: "warn", detail: "EE unreachable" },
|
|
21
|
-
{ name: "qdrant", status: "warn", detail: "Qdrant unreachable" },
|
|
22
|
-
{ name: "error_rate", status: "pass", detail: "0 errors in last 24h" },
|
|
23
|
-
]),
|
|
24
|
-
}));
|
|
25
|
-
// Mock EE health to avoid real network calls
|
|
26
|
-
vi.mock("../ee/health.js", () => ({
|
|
27
|
-
health: vi.fn().mockResolvedValue({ ok: false, status: 503 }),
|
|
28
|
-
}));
|
|
29
|
-
/** Helper to get the mocked readFile from the vi.mock above */
|
|
30
|
-
async function getMockedReadFile() {
|
|
31
|
-
const mod = await import("fs/promises");
|
|
32
|
-
return mod.readFile;
|
|
33
|
-
}
|
|
34
|
-
describe("buildBugReport — required sections", () => {
|
|
35
|
-
beforeEach(async () => {
|
|
36
|
-
const readFile = await getMockedReadFile();
|
|
37
|
-
// Default: no config, no error log
|
|
38
|
-
readFile.mockRejectedValue(new Error("ENOENT: file not found"));
|
|
39
|
-
});
|
|
40
|
-
afterEach(() => {
|
|
41
|
-
vi.clearAllMocks();
|
|
42
|
-
});
|
|
43
|
-
it("returns all required sections", async () => {
|
|
44
|
-
const bundle = await buildBugReport();
|
|
45
|
-
expect(bundle).toHaveProperty("generated_at");
|
|
46
|
-
expect(bundle).toHaveProperty("bun_version");
|
|
47
|
-
expect(bundle).toHaveProperty("os");
|
|
48
|
-
expect(bundle).toHaveProperty("doctor");
|
|
49
|
-
expect(bundle).toHaveProperty("config_redacted");
|
|
50
|
-
expect(bundle).toHaveProperty("error_log_tail");
|
|
51
|
-
expect(bundle.os).toHaveProperty("platform");
|
|
52
|
-
expect(bundle.os).toHaveProperty("release");
|
|
53
|
-
expect(bundle.os).toHaveProperty("arch");
|
|
54
|
-
});
|
|
55
|
-
it("generated_at is a valid ISO 8601 timestamp", async () => {
|
|
56
|
-
const bundle = await buildBugReport();
|
|
57
|
-
expect(() => new Date(bundle.generated_at)).not.toThrow();
|
|
58
|
-
expect(new Date(bundle.generated_at).toISOString()).toBe(bundle.generated_at);
|
|
59
|
-
});
|
|
60
|
-
it("doctor results contain 7 entries from runDoctor()", async () => {
|
|
61
|
-
const bundle = await buildBugReport();
|
|
62
|
-
expect(bundle.doctor).toHaveLength(7);
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
describe("buildBugReport — config_redacted does NOT contain authToken", () => {
|
|
66
|
-
afterEach(() => {
|
|
67
|
-
vi.clearAllMocks();
|
|
68
|
-
});
|
|
69
|
-
it("config_redacted excludes ee.authToken and includes cap.monthly_usd", async () => {
|
|
70
|
-
const mockConfig = JSON.stringify({
|
|
71
|
-
ee: { authToken: "secret-token-123456" },
|
|
72
|
-
cap: { monthly_usd: 15 },
|
|
73
|
-
router: { confidence_threshold: 0.55 },
|
|
74
|
-
});
|
|
75
|
-
const readFile = await getMockedReadFile();
|
|
76
|
-
readFile.mockImplementation((filePath) => {
|
|
77
|
-
// Match by filename ending to avoid Windows/Unix path separator issues
|
|
78
|
-
if (String(filePath).endsWith("config.json"))
|
|
79
|
-
return Promise.resolve(mockConfig);
|
|
80
|
-
return Promise.reject(new Error("ENOENT: file not found"));
|
|
81
|
-
});
|
|
82
|
-
const bundle = await buildBugReport();
|
|
83
|
-
// Should include cap.monthly_usd
|
|
84
|
-
expect(bundle.config_redacted["cap.monthly_usd"]).toBe(15);
|
|
85
|
-
// Should NOT contain the auth token value anywhere in the bundle JSON
|
|
86
|
-
const bundleJson = JSON.stringify(bundle);
|
|
87
|
-
expect(bundleJson).not.toContain("secret-token-123456");
|
|
88
|
-
// Should NOT have authToken as a key
|
|
89
|
-
expect(Object.keys(bundle.config_redacted)).not.toContain("authToken");
|
|
90
|
-
expect(Object.keys(bundle.config_redacted)).not.toContain("ee.authToken");
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
describe("buildBugReport — error_log_tail scrubs API keys", () => {
|
|
94
|
-
afterEach(() => {
|
|
95
|
-
vi.clearAllMocks();
|
|
96
|
-
});
|
|
97
|
-
it("scrubs sk-ant-* keys from error log lines", async () => {
|
|
98
|
-
const errorLogContent = [
|
|
99
|
-
"2026-04-30T10:00:00Z Error calling sk-ant-abc123def456ghi789xyz at /api",
|
|
100
|
-
"2026-04-30T10:01:00Z Normal log line without secrets",
|
|
101
|
-
].join("\n");
|
|
102
|
-
const readFile = await getMockedReadFile();
|
|
103
|
-
readFile.mockImplementation((filePath) => {
|
|
104
|
-
// Match by filename ending to avoid Windows/Unix path separator issues
|
|
105
|
-
if (String(filePath).endsWith("errors.log"))
|
|
106
|
-
return Promise.resolve(errorLogContent);
|
|
107
|
-
return Promise.reject(new Error("ENOENT: file not found"));
|
|
108
|
-
});
|
|
109
|
-
const bundle = await buildBugReport();
|
|
110
|
-
// The error log tail should not contain the original API key
|
|
111
|
-
expect(bundle.error_log_tail.join(" ")).not.toContain("sk-ant-abc123def456ghi789xyz");
|
|
112
|
-
// Should have 2 lines from the log
|
|
113
|
-
expect(bundle.error_log_tail).toHaveLength(2);
|
|
114
|
-
// First line should be redacted (contains ***REDACTED***)
|
|
115
|
-
expect(bundle.error_log_tail[0]).toContain("***REDACTED***");
|
|
116
|
-
// Normal line should be intact
|
|
117
|
-
expect(bundle.error_log_tail[1]).toContain("Normal log line without secrets");
|
|
118
|
-
});
|
|
119
|
-
it("limits error_log_tail to max 20 lines", async () => {
|
|
120
|
-
const manyLines = Array.from({ length: 30 }, (_, i) => `2026-04-30T10:00:0${String(i).padStart(2, "0")}Z Log line ${i}`).join("\n");
|
|
121
|
-
const readFile = await getMockedReadFile();
|
|
122
|
-
readFile.mockImplementation((filePath) => {
|
|
123
|
-
if (String(filePath).endsWith("errors.log"))
|
|
124
|
-
return Promise.resolve(manyLines);
|
|
125
|
-
return Promise.reject(new Error("ENOENT: file not found"));
|
|
126
|
-
});
|
|
127
|
-
const bundle = await buildBugReport();
|
|
128
|
-
expect(bundle.error_log_tail.length).toBeLessThanOrEqual(20);
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
describe("formatBugReport — produces valid JSON", () => {
|
|
132
|
-
it("formatBugReport produces valid JSON string", () => {
|
|
133
|
-
const bundle = {
|
|
134
|
-
generated_at: new Date().toISOString(),
|
|
135
|
-
bun_version: "1.3.13",
|
|
136
|
-
os: { platform: "linux", release: "5.15", arch: "x64" },
|
|
137
|
-
doctor: [{ name: "os", status: "pass", detail: "linux" }],
|
|
138
|
-
config_redacted: { "cap.monthly_usd": 15 },
|
|
139
|
-
error_log_tail: [],
|
|
140
|
-
ee_status: null,
|
|
141
|
-
};
|
|
142
|
-
const json = formatBugReport(bundle);
|
|
143
|
-
expect(() => JSON.parse(json)).not.toThrow();
|
|
144
|
-
const parsed = JSON.parse(json);
|
|
145
|
-
expect(parsed.bun_version).toBe("1.3.13");
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
//# sourceMappingURL=bug-report.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|