muonroi-cli 1.8.1 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +122 -122
- package/dist/src/cli/cost-forensics.js +12 -12
- package/dist/src/council/prompts.js +20 -20
- package/dist/src/generated/version.d.ts +1 -1
- package/dist/src/generated/version.js +1 -1
- package/dist/src/mcp/oauth-callback.js +2 -2
- package/dist/src/mcp/setup-guide-text.d.ts +1 -1
- package/dist/src/mcp/setup-guide-text.js +76 -74
- package/dist/src/ops/doctor.js +7 -7
- package/dist/src/orchestrator/orchestrator.js +22 -13
- package/dist/src/orchestrator/prompts.js +159 -159
- package/dist/src/pil/layer1-intent.js +37 -37
- package/dist/src/pil/layer2_5-ponytail.js +8 -8
- package/dist/src/product-loop/done-gate.js +3 -3
- package/dist/src/product-loop/loop-driver.js +18 -18
- package/dist/src/product-loop/progress-snapshot.js +4 -4
- package/dist/src/providers/mcp-vision-bridge.js +48 -48
- package/dist/src/reporter/index.js +1 -1
- package/dist/src/scaffold/bb-ecosystem-apply.js +47 -47
- package/dist/src/scaffold/bb-quality-gate.js +5 -5
- package/dist/src/scaffold/continuation-prompt.js +60 -60
- package/dist/src/scaffold/init-new.js +453 -453
- package/dist/src/self-qa/agentic-loop.js +19 -19
- package/dist/src/storage/interaction-log.js +5 -5
- package/dist/src/storage/migrations.js +125 -125
- package/dist/src/storage/session-experience-store.js +4 -4
- package/dist/src/storage/sessions.js +43 -43
- package/dist/src/storage/transcript.js +100 -100
- package/dist/src/storage/usage.js +14 -14
- package/dist/src/storage/workspaces.js +12 -12
- package/dist/src/ui/slash/council-inspect.js +4 -4
- package/dist/src/utils/clipboard-image.js +23 -23
- package/dist/src/utils/install-manager.d.ts +1 -0
- package/dist/src/utils/install-manager.js +29 -0
- package/dist/src/utils/side-question.js +2 -2
- package/dist/src/utils/skills.js +3 -3
- package/dist/src/utils/update-checker.js +12 -2
- package/package.json +8 -1
- package/dist/src/__test-helpers__/catalog-fixtures.d.ts +0 -22
- package/dist/src/__test-helpers__/catalog-fixtures.js +0 -55
- package/dist/src/__test-stubs__/ee-server.d.ts +0 -27
- package/dist/src/__test-stubs__/ee-server.js +0 -138
- package/dist/src/__test-stubs__/vitest-setup.d.ts +0 -1
- package/dist/src/__test-stubs__/vitest-setup.js +0 -38
- package/dist/src/__tests__/council/bubble-layout.test.d.ts +0 -1
- package/dist/src/__tests__/council/bubble-layout.test.js +0 -39
- package/dist/src/__tests__/council/code-block-truncate.test.d.ts +0 -1
- package/dist/src/__tests__/council/code-block-truncate.test.js +0 -45
- package/dist/src/__tests__/council/role-palette.test.d.ts +0 -1
- package/dist/src/__tests__/council/role-palette.test.js +0 -59
- package/dist/src/__tests__/first-run-wizard.test.d.ts +0 -1
- package/dist/src/__tests__/first-run-wizard.test.js +0 -9
- package/dist/src/agent-harness/__tests__/cli-flags.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/cli-flags.spec.js +0 -33
- package/dist/src/agent-harness/__tests__/driver.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/driver.spec.js +0 -141
- package/dist/src/agent-harness/__tests__/idle.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/idle.spec.js +0 -84
- package/dist/src/agent-harness/__tests__/mock-llm.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/mock-llm.spec.js +0 -91
- package/dist/src/agent-harness/__tests__/mock-model.spec.d.ts +0 -5
- package/dist/src/agent-harness/__tests__/mock-model.spec.js +0 -270
- package/dist/src/agent-harness/__tests__/predicate.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/predicate.spec.js +0 -27
- package/dist/src/agent-harness/__tests__/protocol.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/protocol.spec.js +0 -56
- package/dist/src/agent-harness/__tests__/schema.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/schema.spec.js +0 -76
- package/dist/src/agent-harness/__tests__/selector.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/selector.spec.js +0 -70
- package/dist/src/agent-harness/__tests__/sidechannel.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/sidechannel.spec.js +0 -29
- package/dist/src/agent-harness/__tests__/spec-helpers.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/spec-helpers.spec.js +0 -68
- package/dist/src/chat/__tests__/broadcast-bus.test.d.ts +0 -1
- package/dist/src/chat/__tests__/broadcast-bus.test.js +0 -81
- package/dist/src/chat/__tests__/channel-manager.test.d.ts +0 -1
- package/dist/src/chat/__tests__/channel-manager.test.js +0 -133
- package/dist/src/chat/__tests__/client.test.d.ts +0 -1
- package/dist/src/chat/__tests__/client.test.js +0 -109
- package/dist/src/chat/__tests__/discord-integration.test.d.ts +0 -1
- package/dist/src/chat/__tests__/discord-integration.test.js +0 -153
- package/dist/src/chat/__tests__/intent-prompt.test.d.ts +0 -1
- package/dist/src/chat/__tests__/intent-prompt.test.js +0 -80
- package/dist/src/chat/__tests__/verdict-resolver.test.d.ts +0 -1
- package/dist/src/chat/__tests__/verdict-resolver.test.js +0 -308
- package/dist/src/cli/__tests__/bw-vault.test.d.ts +0 -1
- package/dist/src/cli/__tests__/bw-vault.test.js +0 -87
- package/dist/src/cli/__tests__/keys-bundle.test.d.ts +0 -1
- package/dist/src/cli/__tests__/keys-bundle.test.js +0 -40
- package/dist/src/cli/__tests__/share-cmd.test.d.ts +0 -1
- package/dist/src/cli/__tests__/share-cmd.test.js +0 -175
- package/dist/src/cli/config/__tests__/model-picker.test.d.ts +0 -1
- package/dist/src/cli/config/__tests__/model-picker.test.js +0 -56
- package/dist/src/cli/config/__tests__/provider-fetch.test.d.ts +0 -1
- package/dist/src/cli/config/__tests__/provider-fetch.test.js +0 -38
- package/dist/src/cli/cost-forensics.test.d.ts +0 -1
- package/dist/src/cli/cost-forensics.test.js +0 -223
- package/dist/src/cli/experience-report.test.d.ts +0 -5
- package/dist/src/cli/experience-report.test.js +0 -63
- package/dist/src/cli/keys.test.d.ts +0 -1
- package/dist/src/cli/keys.test.js +0 -86
- package/dist/src/council/__tests__/abort-threading.test.d.ts +0 -1
- package/dist/src/council/__tests__/abort-threading.test.js +0 -193
- package/dist/src/council/__tests__/accounting.test.d.ts +0 -1
- package/dist/src/council/__tests__/accounting.test.js +0 -66
- package/dist/src/council/__tests__/audit-replay.test.d.ts +0 -1
- package/dist/src/council/__tests__/audit-replay.test.js +0 -241
- package/dist/src/council/__tests__/clarification-prompt.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarification-prompt.test.js +0 -71
- package/dist/src/council/__tests__/clarifier-max-rounds.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-max-rounds.test.js +0 -46
- package/dist/src/council/__tests__/clarifier-options.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-options.test.js +0 -54
- package/dist/src/council/__tests__/clarifier-ready-gate.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-ready-gate.test.js +0 -265
- package/dist/src/council/__tests__/cost-aware.test.d.ts +0 -1
- package/dist/src/council/__tests__/cost-aware.test.js +0 -49
- package/dist/src/council/__tests__/council-turn-length-emit.test.d.ts +0 -1
- package/dist/src/council/__tests__/council-turn-length-emit.test.js +0 -130
- package/dist/src/council/__tests__/debate-planner-structured.test.d.ts +0 -1
- package/dist/src/council/__tests__/debate-planner-structured.test.js +0 -209
- package/dist/src/council/__tests__/debate-round-budget.test.d.ts +0 -1
- package/dist/src/council/__tests__/debate-round-budget.test.js +0 -45
- package/dist/src/council/__tests__/decisions-lock.test.d.ts +0 -6
- package/dist/src/council/__tests__/decisions-lock.test.js +0 -352
- package/dist/src/council/__tests__/evaluator-metrics.test.d.ts +0 -1
- package/dist/src/council/__tests__/evaluator-metrics.test.js +0 -463
- package/dist/src/council/__tests__/oauth-reachable.test.d.ts +0 -1
- package/dist/src/council/__tests__/oauth-reachable.test.js +0 -31
- package/dist/src/council/__tests__/parse-outcome-fallback.test.d.ts +0 -1
- package/dist/src/council/__tests__/parse-outcome-fallback.test.js +0 -114
- package/dist/src/council/__tests__/post-debate-recommendation.test.d.ts +0 -1
- package/dist/src/council/__tests__/post-debate-recommendation.test.js +0 -58
- package/dist/src/council/__tests__/research-tools.test.d.ts +0 -1
- package/dist/src/council/__tests__/research-tools.test.js +0 -214
- package/dist/src/council/__tests__/round-tools.test.d.ts +0 -1
- package/dist/src/council/__tests__/round-tools.test.js +0 -306
- package/dist/src/council/__tests__/tool-trace.test.d.ts +0 -1
- package/dist/src/council/__tests__/tool-trace.test.js +0 -131
- package/dist/src/council/__tests__/types-contract.test.d.ts +0 -9
- package/dist/src/council/__tests__/types-contract.test.js +0 -82
- package/dist/src/council/clarifier-question-cap.test.d.ts +0 -12
- package/dist/src/council/clarifier-question-cap.test.js +0 -73
- package/dist/src/daemon/scheduler.test.d.ts +0 -1
- package/dist/src/daemon/scheduler.test.js +0 -103
- package/dist/src/ee/__tests__/bb-design.test.d.ts +0 -14
- package/dist/src/ee/__tests__/bb-design.test.js +0 -180
- package/dist/src/ee/__tests__/ee-onboarding.test.d.ts +0 -1
- package/dist/src/ee/__tests__/ee-onboarding.test.js +0 -32
- package/dist/src/ee/__tests__/export-transcripts.test.d.ts +0 -11
- package/dist/src/ee/__tests__/export-transcripts.test.js +0 -200
- package/dist/src/ee/__tests__/pil-context-bridge.test.d.ts +0 -1
- package/dist/src/ee/__tests__/pil-context-bridge.test.js +0 -54
- package/dist/src/ee/__tests__/pipeline.integration.test.d.ts +0 -14
- package/dist/src/ee/__tests__/pipeline.integration.test.js +0 -151
- package/dist/src/ee/__tests__/recall-format.test.d.ts +0 -10
- package/dist/src/ee/__tests__/recall-format.test.js +0 -57
- package/dist/src/ee/__tests__/recall-ledger.test.d.ts +0 -1
- package/dist/src/ee/__tests__/recall-ledger.test.js +0 -45
- package/dist/src/ee/__tests__/render-sink-wiring.test.d.ts +0 -1
- package/dist/src/ee/__tests__/render-sink-wiring.test.js +0 -74
- package/dist/src/ee/artifact-cache.test.d.ts +0 -1
- package/dist/src/ee/artifact-cache.test.js +0 -69
- package/dist/src/ee/auth.test.d.ts +0 -1
- package/dist/src/ee/auth.test.js +0 -59
- package/dist/src/ee/bridge.test.d.ts +0 -1
- package/dist/src/ee/bridge.test.js +0 -230
- package/dist/src/ee/client.test.d.ts +0 -1
- package/dist/src/ee/client.test.js +0 -181
- package/dist/src/ee/extract-session.test.d.ts +0 -1
- package/dist/src/ee/extract-session.test.js +0 -192
- package/dist/src/ee/intercept.test.d.ts +0 -1
- package/dist/src/ee/intercept.test.js +0 -171
- package/dist/src/ee/judge.test.d.ts +0 -1
- package/dist/src/ee/judge.test.js +0 -190
- package/dist/src/ee/mistake-detector.test.d.ts +0 -1
- package/dist/src/ee/mistake-detector.test.js +0 -221
- package/dist/src/ee/offline-queue.test.d.ts +0 -1
- package/dist/src/ee/offline-queue.test.js +0 -246
- package/dist/src/ee/phase-outcome.test.d.ts +0 -1
- package/dist/src/ee/phase-outcome.test.js +0 -94
- package/dist/src/ee/phase-tracker.test.d.ts +0 -1
- package/dist/src/ee/phase-tracker.test.js +0 -142
- package/dist/src/ee/posttool.test.d.ts +0 -1
- package/dist/src/ee/posttool.test.js +0 -70
- package/dist/src/ee/prompt-stale.test.d.ts +0 -8
- package/dist/src/ee/prompt-stale.test.js +0 -76
- package/dist/src/ee/recall-mirror.test.d.ts +0 -1
- package/dist/src/ee/recall-mirror.test.js +0 -65
- package/dist/src/ee/render.test.d.ts +0 -1
- package/dist/src/ee/render.test.js +0 -63
- package/dist/src/ee/scope.test.d.ts +0 -1
- package/dist/src/ee/scope.test.js +0 -97
- package/dist/src/ee/search.test.d.ts +0 -1
- package/dist/src/ee/search.test.js +0 -23
- package/dist/src/ee/session-trajectory.test.d.ts +0 -1
- package/dist/src/ee/session-trajectory.test.js +0 -120
- package/dist/src/ee/touch.test.d.ts +0 -1
- package/dist/src/ee/touch.test.js +0 -62
- package/dist/src/ee/who-am-i.test.d.ts +0 -1
- package/dist/src/ee/who-am-i.test.js +0 -101
- package/dist/src/flow/__tests__/migration.test.d.ts +0 -1
- package/dist/src/flow/__tests__/migration.test.js +0 -105
- package/dist/src/flow/__tests__/parser.test.d.ts +0 -1
- package/dist/src/flow/__tests__/parser.test.js +0 -68
- package/dist/src/flow/__tests__/run-manager-product.test.d.ts +0 -1
- package/dist/src/flow/__tests__/run-manager-product.test.js +0 -49
- package/dist/src/flow/__tests__/run-manager.test.d.ts +0 -1
- package/dist/src/flow/__tests__/run-manager.test.js +0 -83
- package/dist/src/flow/__tests__/scaffold-checkpoint.test.d.ts +0 -1
- package/dist/src/flow/__tests__/scaffold-checkpoint.test.js +0 -93
- package/dist/src/flow/__tests__/scaffold.test.d.ts +0 -1
- package/dist/src/flow/__tests__/scaffold.test.js +0 -47
- package/dist/src/flow/__tests__/warning-persist.test.d.ts +0 -5
- package/dist/src/flow/__tests__/warning-persist.test.js +0 -96
- package/dist/src/flow/compaction/__tests__/compress.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/compress.test.js +0 -63
- package/dist/src/flow/compaction/__tests__/extract.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/extract.test.js +0 -66
- package/dist/src/flow/compaction/__tests__/preserve.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/preserve.test.js +0 -62
- package/dist/src/gsd/__tests__/gray-areas.test.d.ts +0 -1
- package/dist/src/gsd/__tests__/gray-areas.test.js +0 -29
- package/dist/src/gsd/__tests__/types.test.d.ts +0 -1
- package/dist/src/gsd/__tests__/types.test.js +0 -78
- package/dist/src/headless/__tests__/council-answers.test.d.ts +0 -1
- package/dist/src/headless/__tests__/council-answers.test.js +0 -251
- package/dist/src/headless/output.test.d.ts +0 -1
- package/dist/src/headless/output.test.js +0 -239
- package/dist/src/lsp/builtins.test.d.ts +0 -1
- package/dist/src/lsp/builtins.test.js +0 -112
- package/dist/src/lsp/client-normalize.test.d.ts +0 -12
- package/dist/src/lsp/client-normalize.test.js +0 -34
- package/dist/src/lsp/manager.test.d.ts +0 -1
- package/dist/src/lsp/manager.test.js +0 -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,381 +0,0 @@
|
|
|
1
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
-
import { analyzeImageFromSource, askVisionProxy, bridgeMcpToolResult, getVisionGuidanceForTextOnly, isImageFile, listCachedImages, scrubImagePayloadsInMessages, } from "./mcp-vision-bridge.js";
|
|
3
|
-
vi.mock("../models/registry.js", () => ({
|
|
4
|
-
getModelInfo: (id) => {
|
|
5
|
-
if (id.startsWith("deepseek"))
|
|
6
|
-
return { supportsVision: false };
|
|
7
|
-
if (id === "claude-sonnet-4-6")
|
|
8
|
-
return { supportsVision: true };
|
|
9
|
-
return {};
|
|
10
|
-
},
|
|
11
|
-
}));
|
|
12
|
-
vi.mock("./keychain.js", () => ({
|
|
13
|
-
loadKeyForProvider: vi.fn().mockResolvedValue("sk-test-key-12345678901234567890"),
|
|
14
|
-
}));
|
|
15
|
-
const mockFetch = vi.fn();
|
|
16
|
-
global.fetch = mockFetch;
|
|
17
|
-
describe("bridgeMcpToolResult", () => {
|
|
18
|
-
beforeEach(() => vi.clearAllMocks());
|
|
19
|
-
afterEach(() => vi.restoreAllMocks());
|
|
20
|
-
it("passes through for vision-capable models", async () => {
|
|
21
|
-
const result = await bridgeMcpToolResult("mcp_playwright__browser_take_screenshot", "some output", "claude-sonnet-4-6");
|
|
22
|
-
expect(result.proxied).toBe(false);
|
|
23
|
-
expect(result.output).toBe("some output");
|
|
24
|
-
});
|
|
25
|
-
it("passes through snapshot (text) results without proxying", async () => {
|
|
26
|
-
const result = await bridgeMcpToolResult("mcp_playwright__browser_snapshot", "accessibility tree content...", "deepseek-v4-flash");
|
|
27
|
-
expect(result.proxied).toBe(false);
|
|
28
|
-
expect(mockFetch).not.toHaveBeenCalled();
|
|
29
|
-
});
|
|
30
|
-
it("proxies screenshot results for text-only models", async () => {
|
|
31
|
-
const fakeBase64 = `iVBORw0KGgo${"A".repeat(600)}`;
|
|
32
|
-
mockFetch.mockResolvedValueOnce({
|
|
33
|
-
ok: true,
|
|
34
|
-
json: async () => ({
|
|
35
|
-
choices: [{ message: { content: "A login page with username and password fields" } }],
|
|
36
|
-
}),
|
|
37
|
-
});
|
|
38
|
-
const result = await bridgeMcpToolResult("mcp_playwright__browser_take_screenshot", { data: fakeBase64 }, "deepseek-v4-flash");
|
|
39
|
-
expect(result.proxied).toBe(true);
|
|
40
|
-
expect(result.description).toContain("login page");
|
|
41
|
-
expect(mockFetch).toHaveBeenCalledTimes(1);
|
|
42
|
-
});
|
|
43
|
-
it("intercepts ANY MCP tool with image data, not just Playwright", async () => {
|
|
44
|
-
const fakeBase64 = `iVBORw0KGgo${"A".repeat(600)}`;
|
|
45
|
-
mockFetch.mockResolvedValueOnce({
|
|
46
|
-
ok: true,
|
|
47
|
-
json: async () => ({
|
|
48
|
-
choices: [{ message: { content: "Figma design with buttons" } }],
|
|
49
|
-
}),
|
|
50
|
-
});
|
|
51
|
-
const result = await bridgeMcpToolResult("mcp_figma__export_frame", { imageData: fakeBase64 }, "deepseek-v4-flash");
|
|
52
|
-
expect(result.proxied).toBe(true);
|
|
53
|
-
expect(result.description).toContain("Figma design");
|
|
54
|
-
});
|
|
55
|
-
it("intercepts non-MCP tools with image data", async () => {
|
|
56
|
-
const fakeBase64 = `/9j/${"A".repeat(600)}`;
|
|
57
|
-
mockFetch.mockResolvedValueOnce({
|
|
58
|
-
ok: true,
|
|
59
|
-
json: async () => ({
|
|
60
|
-
choices: [{ message: { content: "JPEG content" } }],
|
|
61
|
-
}),
|
|
62
|
-
});
|
|
63
|
-
const result = await bridgeMcpToolResult("computer_screenshot", { screenshot: fakeBase64 }, "deepseek-v4-flash");
|
|
64
|
-
expect(result.proxied).toBe(true);
|
|
65
|
-
});
|
|
66
|
-
it("detects data URI images in generic results", async () => {
|
|
67
|
-
const fakeBase64 = "A".repeat(200);
|
|
68
|
-
mockFetch.mockResolvedValueOnce({
|
|
69
|
-
ok: true,
|
|
70
|
-
json: async () => ({
|
|
71
|
-
choices: [{ message: { content: "Chart showing revenue data" } }],
|
|
72
|
-
}),
|
|
73
|
-
});
|
|
74
|
-
const result = await bridgeMcpToolResult("mcp_some_tool__capture", `data:image/png;base64,${fakeBase64}`, "deepseek-v4-flash");
|
|
75
|
-
expect(result.proxied).toBe(true);
|
|
76
|
-
});
|
|
77
|
-
it("passes through non-image tool results", async () => {
|
|
78
|
-
const result = await bridgeMcpToolResult("mcp_playwright__browser_click", { success: true, message: "Clicked element" }, "deepseek-v4-flash");
|
|
79
|
-
expect(result.proxied).toBe(false);
|
|
80
|
-
expect(mockFetch).not.toHaveBeenCalled();
|
|
81
|
-
});
|
|
82
|
-
it("falls back gracefully when vision API fails — but still strips base64", async () => {
|
|
83
|
-
const fakeBase64 = `iVBORw0KGgo${"A".repeat(600)}`;
|
|
84
|
-
mockFetch.mockResolvedValue({ ok: false, status: 500 });
|
|
85
|
-
const result = await bridgeMcpToolResult("mcp_playwright__browser_take_screenshot", { data: fakeBase64 }, "deepseek-v4-flash");
|
|
86
|
-
// proxied=true means the orchestrator will swap in our cleaned output;
|
|
87
|
-
// critical to prevent the raw base64 from polluting conversation history.
|
|
88
|
-
expect(result.proxied).toBe(true);
|
|
89
|
-
const serialized = JSON.stringify(result.output);
|
|
90
|
-
expect(serialized).toContain("could not be analyzed");
|
|
91
|
-
expect(serialized).not.toContain(fakeBase64);
|
|
92
|
-
});
|
|
93
|
-
it("strips base64 data from output when proxied", async () => {
|
|
94
|
-
const fakeBase64 = `iVBORw0KGgo${"A".repeat(600)}`;
|
|
95
|
-
mockFetch.mockResolvedValueOnce({
|
|
96
|
-
ok: true,
|
|
97
|
-
json: async () => ({
|
|
98
|
-
choices: [{ message: { content: "Dashboard page" } }],
|
|
99
|
-
}),
|
|
100
|
-
});
|
|
101
|
-
const result = await bridgeMcpToolResult("mcp_playwright__browser_take_screenshot", { screenshot: fakeBase64, format: "png" }, "deepseek-v4-flash");
|
|
102
|
-
expect(result.proxied).toBe(true);
|
|
103
|
-
const output = result.output;
|
|
104
|
-
expect(output.screenshot).toContain("removed");
|
|
105
|
-
});
|
|
106
|
-
it("caches images for follow-up queries", async () => {
|
|
107
|
-
const fakeBase64 = `iVBORw0KGgo${"A".repeat(600)}`;
|
|
108
|
-
mockFetch.mockResolvedValueOnce({
|
|
109
|
-
ok: true,
|
|
110
|
-
json: async () => ({
|
|
111
|
-
choices: [{ message: { content: "Test page" } }],
|
|
112
|
-
}),
|
|
113
|
-
});
|
|
114
|
-
const result = await bridgeMcpToolResult("mcp_playwright__browser_take_screenshot", { data: fakeBase64 }, "deepseek-v4-flash");
|
|
115
|
-
expect(result.cachedImageIds).toBeDefined();
|
|
116
|
-
expect(result.cachedImageIds.length).toBeGreaterThan(0);
|
|
117
|
-
const cached = listCachedImages();
|
|
118
|
-
expect(cached.length).toBeGreaterThan(0);
|
|
119
|
-
expect(cached[cached.length - 1].hasDescription).toBe(true);
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
describe("design context structured output", () => {
|
|
123
|
-
beforeEach(() => vi.clearAllMocks());
|
|
124
|
-
it("requests json_object response_format for figma/design tools", async () => {
|
|
125
|
-
const fakeBase64 = `iVBORw0KGgo${"A".repeat(600)}`;
|
|
126
|
-
mockFetch.mockResolvedValueOnce({
|
|
127
|
-
ok: true,
|
|
128
|
-
json: async () => ({
|
|
129
|
-
choices: [{ message: { content: '{"viewport":{"width":1440,"height":900}}' } }],
|
|
130
|
-
}),
|
|
131
|
-
});
|
|
132
|
-
await bridgeMcpToolResult("mcp_figma__export_frame", { imageData: fakeBase64 }, "deepseek-v4-flash");
|
|
133
|
-
const body = JSON.parse(mockFetch.mock.calls[0][1].body);
|
|
134
|
-
expect(body.response_format).toEqual({ type: "json_object" });
|
|
135
|
-
});
|
|
136
|
-
it("does NOT set response_format for non-design contexts", async () => {
|
|
137
|
-
const fakeBase64 = `iVBORw0KGgo${"A".repeat(600)}`;
|
|
138
|
-
mockFetch.mockResolvedValueOnce({
|
|
139
|
-
ok: true,
|
|
140
|
-
json: async () => ({ choices: [{ message: { content: "ok" } }] }),
|
|
141
|
-
});
|
|
142
|
-
await bridgeMcpToolResult("mcp_playwright__browser_take_screenshot", { data: fakeBase64 }, "deepseek-v4-flash");
|
|
143
|
-
const body = JSON.parse(mockFetch.mock.calls[0][1].body);
|
|
144
|
-
expect(body.response_format).toBeUndefined();
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
describe("SVG fast-path", () => {
|
|
148
|
-
beforeEach(() => vi.clearAllMocks());
|
|
149
|
-
it("bypasses vision API when input is image/svg+xml", async () => {
|
|
150
|
-
const svgText = '<svg width="100" height="50"><rect x="10" y="10" width="80" height="30" fill="#007bff"/></svg>';
|
|
151
|
-
const svgBase64 = Buffer.from(svgText, "utf8").toString("base64");
|
|
152
|
-
const dataUri = `data:image/svg+xml;base64,${svgBase64}`;
|
|
153
|
-
const result = await bridgeMcpToolResult("mcp_figma__export_frame", dataUri, "deepseek-v4-flash");
|
|
154
|
-
expect(mockFetch).not.toHaveBeenCalled();
|
|
155
|
-
expect(result.proxied).toBe(true);
|
|
156
|
-
const out = JSON.stringify(result.output);
|
|
157
|
-
expect(out).toContain("fast-path");
|
|
158
|
-
expect(out).toContain("rect");
|
|
159
|
-
});
|
|
160
|
-
});
|
|
161
|
-
describe("askVisionProxy", () => {
|
|
162
|
-
beforeEach(() => vi.clearAllMocks());
|
|
163
|
-
it("returns guidance when no images cached and no path given", async () => {
|
|
164
|
-
const result = await askVisionProxy("What?", "img_nonexistent");
|
|
165
|
-
expect(result).toContain("No matching image");
|
|
166
|
-
expect(result).toContain("file_path");
|
|
167
|
-
});
|
|
168
|
-
it("answers follow-up questions about cached images", async () => {
|
|
169
|
-
// Cache an image first
|
|
170
|
-
const fakeBase64 = `/9j/${"B".repeat(600)}`;
|
|
171
|
-
mockFetch.mockResolvedValueOnce({
|
|
172
|
-
ok: true,
|
|
173
|
-
json: async () => ({
|
|
174
|
-
choices: [{ message: { content: "A form page" } }],
|
|
175
|
-
}),
|
|
176
|
-
});
|
|
177
|
-
const bridgeResult = await bridgeMcpToolResult("mcp_playwright__take_screenshot", { data: fakeBase64 }, "deepseek-v4-flash");
|
|
178
|
-
const imageId = bridgeResult.cachedImageIds?.[0];
|
|
179
|
-
expect(imageId).toBeDefined();
|
|
180
|
-
// Ask follow-up
|
|
181
|
-
mockFetch.mockResolvedValueOnce({
|
|
182
|
-
ok: true,
|
|
183
|
-
json: async () => ({
|
|
184
|
-
choices: [{ message: { content: "The submit button is blue" } }],
|
|
185
|
-
}),
|
|
186
|
-
});
|
|
187
|
-
const answer = await askVisionProxy("What color is the submit button?", imageId);
|
|
188
|
-
expect(answer).toContain("submit button is blue");
|
|
189
|
-
expect(answer).toContain("Vision Proxy Answer");
|
|
190
|
-
});
|
|
191
|
-
it("uses most recent image when no ID specified", async () => {
|
|
192
|
-
mockFetch.mockResolvedValueOnce({
|
|
193
|
-
ok: true,
|
|
194
|
-
json: async () => ({
|
|
195
|
-
choices: [{ message: { content: "Green banner at top" } }],
|
|
196
|
-
}),
|
|
197
|
-
});
|
|
198
|
-
// Should use most recent cached image from previous tests
|
|
199
|
-
const answer = await askVisionProxy("What color is the banner?");
|
|
200
|
-
expect(answer).toContain("Vision Proxy Answer");
|
|
201
|
-
});
|
|
202
|
-
});
|
|
203
|
-
describe("analyzeImageFromSource", () => {
|
|
204
|
-
beforeEach(() => vi.clearAllMocks());
|
|
205
|
-
it("analyzes inline base64 images", async () => {
|
|
206
|
-
const fakeBase64 = `iVBORw0KGgo${"C".repeat(600)}`;
|
|
207
|
-
mockFetch.mockResolvedValueOnce({
|
|
208
|
-
ok: true,
|
|
209
|
-
json: async () => ({
|
|
210
|
-
choices: [{ message: { content: "A diagram showing system architecture" } }],
|
|
211
|
-
}),
|
|
212
|
-
});
|
|
213
|
-
const result = await analyzeImageFromSource(fakeBase64);
|
|
214
|
-
expect(result).toContain("diagram");
|
|
215
|
-
expect(result).toContain("Cached as");
|
|
216
|
-
});
|
|
217
|
-
it("analyzes data URIs", async () => {
|
|
218
|
-
const fakeBase64 = "A".repeat(200);
|
|
219
|
-
mockFetch.mockResolvedValueOnce({
|
|
220
|
-
ok: true,
|
|
221
|
-
json: async () => ({
|
|
222
|
-
choices: [{ message: { content: "Logo image" } }],
|
|
223
|
-
}),
|
|
224
|
-
});
|
|
225
|
-
const result = await analyzeImageFromSource(`data:image/png;base64,${fakeBase64}`);
|
|
226
|
-
expect(result).toContain("Logo");
|
|
227
|
-
});
|
|
228
|
-
it("rejects invalid source", async () => {
|
|
229
|
-
const result = await analyzeImageFromSource("not-a-file-and-not-base64");
|
|
230
|
-
expect(result).toContain("Cannot resolve image source");
|
|
231
|
-
});
|
|
232
|
-
it("focuses analysis with a question", async () => {
|
|
233
|
-
const fakeBase64 = `iVBORw0KGgo${"D".repeat(600)}`;
|
|
234
|
-
mockFetch.mockResolvedValueOnce({
|
|
235
|
-
ok: true,
|
|
236
|
-
json: async () => ({
|
|
237
|
-
choices: [{ message: { content: "The text reads: Hello World" } }],
|
|
238
|
-
}),
|
|
239
|
-
});
|
|
240
|
-
const result = await analyzeImageFromSource(fakeBase64, "What text is visible?");
|
|
241
|
-
expect(result).toContain("Hello World");
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
describe("getVisionGuidanceForTextOnly", () => {
|
|
245
|
-
it("returns comprehensive guidance for text-only models", () => {
|
|
246
|
-
const guidance = getVisionGuidanceForTextOnly("deepseek-v4-flash");
|
|
247
|
-
expect(guidance).toContain("analyze_image");
|
|
248
|
-
expect(guidance).toContain("ask_vision_proxy");
|
|
249
|
-
expect(guidance).toContain("list_vision_cache");
|
|
250
|
-
expect(guidance).toContain("PROACTIVE");
|
|
251
|
-
expect(guidance.length).toBeGreaterThan(200);
|
|
252
|
-
});
|
|
253
|
-
it("returns empty for vision-capable models", () => {
|
|
254
|
-
expect(getVisionGuidanceForTextOnly("claude-sonnet-4-6")).toBe("");
|
|
255
|
-
});
|
|
256
|
-
});
|
|
257
|
-
describe("isImageFile", () => {
|
|
258
|
-
it("detects common image extensions", () => {
|
|
259
|
-
expect(isImageFile("photo.png")).toBe(true);
|
|
260
|
-
expect(isImageFile("photo.jpg")).toBe(true);
|
|
261
|
-
expect(isImageFile("photo.jpeg")).toBe(true);
|
|
262
|
-
expect(isImageFile("icon.svg")).toBe(true);
|
|
263
|
-
expect(isImageFile("anim.gif")).toBe(true);
|
|
264
|
-
expect(isImageFile("photo.webp")).toBe(true);
|
|
265
|
-
});
|
|
266
|
-
it("rejects non-image files", () => {
|
|
267
|
-
expect(isImageFile("code.ts")).toBe(false);
|
|
268
|
-
expect(isImageFile("doc.pdf")).toBe(false);
|
|
269
|
-
expect(isImageFile("data.json")).toBe(false);
|
|
270
|
-
});
|
|
271
|
-
});
|
|
272
|
-
describe("scrubImagePayloadsInMessages — vision description injection", () => {
|
|
273
|
-
beforeEach(() => vi.clearAllMocks());
|
|
274
|
-
it("injects bridged vision description into AI-SDK tool-result content", async () => {
|
|
275
|
-
const fakeBase64 = `iVBORw0KGgo${"Z".repeat(600)}`;
|
|
276
|
-
mockFetch.mockResolvedValueOnce({
|
|
277
|
-
ok: true,
|
|
278
|
-
json: async () => ({
|
|
279
|
-
choices: [{ message: { content: "Login form with email and password" } }],
|
|
280
|
-
}),
|
|
281
|
-
});
|
|
282
|
-
const toolCallId = "call_test_inject_123";
|
|
283
|
-
await bridgeMcpToolResult("mcp_playwright__browser_take_screenshot", { data: fakeBase64 }, "deepseek-v4-flash", undefined, toolCallId);
|
|
284
|
-
// Mimic AI SDK v5 response.messages shape after scrubbing base64.
|
|
285
|
-
const aiSdkMessage = {
|
|
286
|
-
role: "tool",
|
|
287
|
-
content: [
|
|
288
|
-
{
|
|
289
|
-
type: "tool-result",
|
|
290
|
-
toolCallId,
|
|
291
|
-
toolName: "mcp_playwright__browser_take_screenshot",
|
|
292
|
-
output: {
|
|
293
|
-
type: "content",
|
|
294
|
-
value: [
|
|
295
|
-
{ type: "text", text: "### Result\n- [Screenshot]" },
|
|
296
|
-
{ type: "image-data", data: fakeBase64, mediaType: "image/png" },
|
|
297
|
-
],
|
|
298
|
-
},
|
|
299
|
-
},
|
|
300
|
-
],
|
|
301
|
-
};
|
|
302
|
-
const [scrubbed] = scrubImagePayloadsInMessages([aiSdkMessage]);
|
|
303
|
-
const value = scrubbed.content[0].output.value;
|
|
304
|
-
// Original image bytes gone.
|
|
305
|
-
const imgPart = value.find((p) => p.type === "image-data");
|
|
306
|
-
expect(imgPart?.data).not.toContain(fakeBase64);
|
|
307
|
-
// Vision description injected as a text part so the next turn can read it.
|
|
308
|
-
const injected = value.find((p) => p.type === "text" && p.text?.includes("Login form"));
|
|
309
|
-
expect(injected).toBeDefined();
|
|
310
|
-
});
|
|
311
|
-
});
|
|
312
|
-
describe("scrubImagePayloadsInMessages — non-image size cap", () => {
|
|
313
|
-
it("truncates oversized AI-SDK tool-result text content", () => {
|
|
314
|
-
// Newlines + spaces ensure the chunk doesn't match the base64-image regex,
|
|
315
|
-
// so we exercise the size cap rather than the image scrubber.
|
|
316
|
-
const huge = " some directory entry line\n".repeat(20_000); // ~580KB
|
|
317
|
-
const msg = {
|
|
318
|
-
role: "tool",
|
|
319
|
-
content: [
|
|
320
|
-
{
|
|
321
|
-
type: "tool-result",
|
|
322
|
-
toolCallId: "call_huge_1",
|
|
323
|
-
toolName: "mcp_filesystem__directory_tree",
|
|
324
|
-
output: { type: "content", value: [{ type: "text", text: huge }] },
|
|
325
|
-
},
|
|
326
|
-
],
|
|
327
|
-
};
|
|
328
|
-
const [scrubbed] = scrubImagePayloadsInMessages([msg]);
|
|
329
|
-
const text = scrubbed.content[0].output.value[0].text;
|
|
330
|
-
expect(text.length).toBeLessThan(huge.length);
|
|
331
|
-
expect(text).toContain("truncated by muonroi-cli");
|
|
332
|
-
expect(text).toContain("directory_tree");
|
|
333
|
-
});
|
|
334
|
-
it("truncates oversized bash string output", () => {
|
|
335
|
-
const huge = "line\n".repeat(80_000); // ~400KB
|
|
336
|
-
const msg = {
|
|
337
|
-
role: "tool",
|
|
338
|
-
content: [
|
|
339
|
-
{
|
|
340
|
-
type: "tool-result",
|
|
341
|
-
toolCallId: "call_huge_2",
|
|
342
|
-
toolName: "bash",
|
|
343
|
-
output: huge,
|
|
344
|
-
},
|
|
345
|
-
],
|
|
346
|
-
};
|
|
347
|
-
const [scrubbed] = scrubImagePayloadsInMessages([msg]);
|
|
348
|
-
const out = scrubbed.content[0].output;
|
|
349
|
-
expect(out.length).toBeLessThan(huge.length);
|
|
350
|
-
expect(out).toContain("truncated");
|
|
351
|
-
});
|
|
352
|
-
it("leaves small tool outputs untouched", () => {
|
|
353
|
-
const small = "hello world";
|
|
354
|
-
const msg = {
|
|
355
|
-
role: "tool",
|
|
356
|
-
content: [
|
|
357
|
-
{
|
|
358
|
-
type: "tool-result",
|
|
359
|
-
toolCallId: "call_small",
|
|
360
|
-
toolName: "bash",
|
|
361
|
-
output: small,
|
|
362
|
-
},
|
|
363
|
-
],
|
|
364
|
-
};
|
|
365
|
-
const [scrubbed] = scrubImagePayloadsInMessages([msg]);
|
|
366
|
-
expect(scrubbed.content[0].output).toBe(small);
|
|
367
|
-
});
|
|
368
|
-
});
|
|
369
|
-
describe("listCachedImages", () => {
|
|
370
|
-
it("returns structured list with required fields", () => {
|
|
371
|
-
const cached = listCachedImages();
|
|
372
|
-
for (const entry of cached) {
|
|
373
|
-
expect(entry).toHaveProperty("id");
|
|
374
|
-
expect(entry).toHaveProperty("source");
|
|
375
|
-
expect(entry).toHaveProperty("label");
|
|
376
|
-
expect(entry).toHaveProperty("age");
|
|
377
|
-
expect(entry).toHaveProperty("hasDescription");
|
|
378
|
-
}
|
|
379
|
-
});
|
|
380
|
-
});
|
|
381
|
-
//# sourceMappingURL=mcp-vision-bridge.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for src/providers/ollama.ts
|
|
3
|
-
* Uses recorded JSONL fixture replayed via mocked streamText.
|
|
4
|
-
*/
|
|
5
|
-
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
6
|
-
import { createMockFullStream, loadFixtureChunks } from "./__test-utils__/load-fixture.js";
|
|
7
|
-
vi.mock("ai", () => ({
|
|
8
|
-
streamText: vi.fn(),
|
|
9
|
-
}));
|
|
10
|
-
vi.mock("ollama-ai-provider-v2", () => ({
|
|
11
|
-
createOllama: vi.fn(() => vi.fn((model) => ({ modelId: model }))),
|
|
12
|
-
}));
|
|
13
|
-
import { streamText } from "ai";
|
|
14
|
-
import { createOllamaAdapter } from "./ollama.js";
|
|
15
|
-
const mockStreamText = vi.mocked(streamText);
|
|
16
|
-
describe("createOllamaAdapter", () => {
|
|
17
|
-
beforeEach(() => {
|
|
18
|
-
vi.clearAllMocks();
|
|
19
|
-
});
|
|
20
|
-
it('has id "ollama"', () => {
|
|
21
|
-
const adapter = createOllamaAdapter({ model: "qwen2.5-coder:1.5b" });
|
|
22
|
-
expect(adapter.id).toBe("ollama");
|
|
23
|
-
});
|
|
24
|
-
it("streams text-delta from ollama fixture", async () => {
|
|
25
|
-
const chunks = loadFixtureChunks("ollama", "streaming");
|
|
26
|
-
mockStreamText.mockReturnValue({ fullStream: createMockFullStream(chunks) });
|
|
27
|
-
const adapter = createOllamaAdapter({ model: "qwen2.5-coder:1.5b", baseURL: "http://localhost:11434/api" });
|
|
28
|
-
const collected = [];
|
|
29
|
-
for await (const chunk of adapter.stream({ messages: [{ role: "user", content: "hi" }] })) {
|
|
30
|
-
collected.push(chunk);
|
|
31
|
-
}
|
|
32
|
-
const textChunks = collected.filter((c) => c.kind === "text-delta");
|
|
33
|
-
expect(textChunks.length).toBeGreaterThanOrEqual(3);
|
|
34
|
-
expect(collected.some((c) => c.kind === "finish")).toBe(true);
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=ollama.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for src/providers/openai-compatible.ts
|
|
3
|
-
* Verifies DeepSeek + SiliconFlow share the OpenAI-compatible adapter.
|
|
4
|
-
*/
|
|
5
|
-
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
6
|
-
import { createMockFullStream, loadFixtureChunks } from "./__test-utils__/load-fixture.js";
|
|
7
|
-
vi.mock("ai", () => ({
|
|
8
|
-
streamText: vi.fn(),
|
|
9
|
-
}));
|
|
10
|
-
vi.mock("@ai-sdk/openai-compatible", () => ({
|
|
11
|
-
createOpenAICompatible: vi.fn(() => vi.fn((model) => ({ modelId: model }))),
|
|
12
|
-
}));
|
|
13
|
-
import { streamText } from "ai";
|
|
14
|
-
import { createOpenAICompatibleAdapter } from "./openai-compatible.js";
|
|
15
|
-
const mockStreamText = vi.mocked(streamText);
|
|
16
|
-
describe("createOpenAICompatibleAdapter", () => {
|
|
17
|
-
beforeEach(() => {
|
|
18
|
-
vi.clearAllMocks();
|
|
19
|
-
});
|
|
20
|
-
it('sets id to "deepseek" when configured as deepseek', () => {
|
|
21
|
-
const adapter = createOpenAICompatibleAdapter({
|
|
22
|
-
id: "deepseek",
|
|
23
|
-
model: "deepseek-v4-flash",
|
|
24
|
-
apiKey: "test-key-xxxxxxxxxxxxxxxxxxxx",
|
|
25
|
-
baseURL: "https://api.deepseek.com/v1",
|
|
26
|
-
});
|
|
27
|
-
expect(adapter.id).toBe("deepseek");
|
|
28
|
-
});
|
|
29
|
-
it('sets id to "siliconflow" when configured as siliconflow', () => {
|
|
30
|
-
const adapter = createOpenAICompatibleAdapter({
|
|
31
|
-
id: "siliconflow",
|
|
32
|
-
model: "Qwen/Qwen2.5-Coder-32B-Instruct",
|
|
33
|
-
apiKey: "test-key-xxxxxxxxxxxxxxxxxxxx",
|
|
34
|
-
});
|
|
35
|
-
expect(adapter.id).toBe("siliconflow");
|
|
36
|
-
});
|
|
37
|
-
it("streams text-delta events from deepseek fixture", async () => {
|
|
38
|
-
const chunks = loadFixtureChunks("deepseek", "streaming");
|
|
39
|
-
mockStreamText.mockReturnValue({ fullStream: createMockFullStream(chunks) });
|
|
40
|
-
const adapter = createOpenAICompatibleAdapter({
|
|
41
|
-
id: "deepseek",
|
|
42
|
-
model: "deepseek-v4-flash",
|
|
43
|
-
apiKey: "test-key-xxxxxxxxxxxxxxxxxxxx",
|
|
44
|
-
});
|
|
45
|
-
const collected = [];
|
|
46
|
-
for await (const chunk of adapter.stream({ messages: [{ role: "user", content: "hi" }] })) {
|
|
47
|
-
collected.push(chunk);
|
|
48
|
-
}
|
|
49
|
-
const textChunks = collected.filter((c) => c.kind === "text-delta");
|
|
50
|
-
expect(textChunks.length).toBeGreaterThanOrEqual(3);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
//# sourceMappingURL=openai-compatible.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for src/providers/openai.ts
|
|
3
|
-
* Uses recorded JSONL fixtures replayed via mocked streamText.
|
|
4
|
-
*/
|
|
5
|
-
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
6
|
-
import { createMockFullStream, loadFixtureChunks } from "./__test-utils__/load-fixture.js";
|
|
7
|
-
// Mock ai module's streamText
|
|
8
|
-
vi.mock("ai", () => ({
|
|
9
|
-
streamText: vi.fn(),
|
|
10
|
-
}));
|
|
11
|
-
// Mock @ai-sdk/openai
|
|
12
|
-
vi.mock("@ai-sdk/openai", () => ({
|
|
13
|
-
createOpenAI: vi.fn(() => vi.fn((model) => ({ modelId: model }))),
|
|
14
|
-
}));
|
|
15
|
-
import { streamText } from "ai";
|
|
16
|
-
import { createOpenAIAdapter } from "./openai.js";
|
|
17
|
-
const mockStreamText = vi.mocked(streamText);
|
|
18
|
-
describe("createOpenAIAdapter", () => {
|
|
19
|
-
beforeEach(() => {
|
|
20
|
-
vi.clearAllMocks();
|
|
21
|
-
});
|
|
22
|
-
it('has id "openai"', () => {
|
|
23
|
-
const adapter = createOpenAIAdapter({ model: "gpt-4o", apiKey: "test-key-xxxxxxxxxxxxxxxxxxxx" });
|
|
24
|
-
expect(adapter.id).toBe("openai");
|
|
25
|
-
});
|
|
26
|
-
it("streams text-delta events from streaming fixture", async () => {
|
|
27
|
-
const chunks = loadFixtureChunks("openai", "streaming");
|
|
28
|
-
mockStreamText.mockReturnValue({ fullStream: createMockFullStream(chunks) });
|
|
29
|
-
const adapter = createOpenAIAdapter({ model: "gpt-4o", apiKey: "test-key-xxxxxxxxxxxxxxxxxxxx" });
|
|
30
|
-
const collected = [];
|
|
31
|
-
for await (const chunk of adapter.stream({ messages: [{ role: "user", content: "hi" }] })) {
|
|
32
|
-
collected.push(chunk);
|
|
33
|
-
}
|
|
34
|
-
const textChunks = collected.filter((c) => c.kind === "text-delta");
|
|
35
|
-
expect(textChunks.length).toBeGreaterThanOrEqual(3);
|
|
36
|
-
expect(collected.some((c) => c.kind === "finish")).toBe(true);
|
|
37
|
-
});
|
|
38
|
-
it("yields parallel tool-call events with distinct toolCallIds", async () => {
|
|
39
|
-
const chunks = loadFixtureChunks("openai", "parallel-tools");
|
|
40
|
-
mockStreamText.mockReturnValue({ fullStream: createMockFullStream(chunks) });
|
|
41
|
-
const adapter = createOpenAIAdapter({ model: "gpt-4o", apiKey: "test-key-xxxxxxxxxxxxxxxxxxxx" });
|
|
42
|
-
const collected = [];
|
|
43
|
-
for await (const chunk of adapter.stream({ messages: [{ role: "user", content: "read files" }] })) {
|
|
44
|
-
collected.push(chunk);
|
|
45
|
-
}
|
|
46
|
-
const toolCalls = collected.filter((c) => c.kind === "tool-call");
|
|
47
|
-
expect(toolCalls.length).toBeGreaterThanOrEqual(2);
|
|
48
|
-
// Distinct toolCallIds
|
|
49
|
-
const ids = new Set(toolCalls.map((c) => c.toolCallId));
|
|
50
|
-
expect(ids.size).toBe(toolCalls.length);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
//# sourceMappingURL=openai.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for src/providers/pricing.ts
|
|
3
|
-
* Verifies lookupPricing returns correct USD/M for known (provider, model) pairs
|
|
4
|
-
* and undefined for unknown models (except ollama wildcard).
|
|
5
|
-
*/
|
|
6
|
-
import { beforeAll, describe, expect, it } from "vitest";
|
|
7
|
-
import { loadCatalog } from "../models/registry.js";
|
|
8
|
-
import { lookupPricing, STATIC_PRICING_FALLBACK } from "./pricing.js";
|
|
9
|
-
describe("lookupPricing", () => {
|
|
10
|
-
beforeAll(async () => {
|
|
11
|
-
await loadCatalog();
|
|
12
|
-
});
|
|
13
|
-
// --- Catalog-first path ---
|
|
14
|
-
it("catalog path: deepseek-v4-flash returns pricing from catalog", () => {
|
|
15
|
-
const p = lookupPricing("deepseek", "deepseek-v4-flash");
|
|
16
|
-
expect(p).toBeDefined();
|
|
17
|
-
expect(p.input_per_million_usd).toBe(0.27);
|
|
18
|
-
expect(p.output_per_million_usd).toBe(1.1);
|
|
19
|
-
expect(p.cached_input_per_million_usd).toBe(0.027);
|
|
20
|
-
});
|
|
21
|
-
it("catalog path: deepseek-v4-pro returns pricing from catalog with cached_input", () => {
|
|
22
|
-
const p = lookupPricing("deepseek", "deepseek-v4-pro");
|
|
23
|
-
expect(p).toBeDefined();
|
|
24
|
-
expect(p.input_per_million_usd).toBe(0.55);
|
|
25
|
-
expect(p.output_per_million_usd).toBe(2.19);
|
|
26
|
-
expect(p.cached_input_per_million_usd).toBe(0.055);
|
|
27
|
-
});
|
|
28
|
-
it("catalog path: siliconflow model returns pricing from catalog", () => {
|
|
29
|
-
const p = lookupPricing("siliconflow", "deepseek-ai/DeepSeek-V4-Flash");
|
|
30
|
-
expect(p).toBeDefined();
|
|
31
|
-
expect(p.input_per_million_usd).toBe(0.14);
|
|
32
|
-
expect(p.output_per_million_usd).toBe(0.28);
|
|
33
|
-
});
|
|
34
|
-
// --- Static fallback path (providers not in catalog) ---
|
|
35
|
-
it("static fallback: anthropic claude-3-5-sonnet-latest returns pricing", () => {
|
|
36
|
-
const p = lookupPricing("anthropic", "claude-3-5-sonnet-latest");
|
|
37
|
-
expect(p).toBeDefined();
|
|
38
|
-
expect(p.input_per_million_usd).toBe(3.0);
|
|
39
|
-
expect(p.output_per_million_usd).toBe(15.0);
|
|
40
|
-
});
|
|
41
|
-
it("static fallback: openai gpt-4o returns pricing", () => {
|
|
42
|
-
const p = lookupPricing("openai", "gpt-4o");
|
|
43
|
-
expect(p).toBeDefined();
|
|
44
|
-
expect(p.input_per_million_usd).toBe(2.5);
|
|
45
|
-
expect(p.output_per_million_usd).toBe(10.0);
|
|
46
|
-
});
|
|
47
|
-
it("static fallback: google gemini-2.5-flash returns pricing", () => {
|
|
48
|
-
const p = lookupPricing("google", "gemini-2.5-flash");
|
|
49
|
-
expect(p).toBeDefined();
|
|
50
|
-
expect(p.input_per_million_usd).toBe(0.3);
|
|
51
|
-
});
|
|
52
|
-
it("static fallback: deepseek deepseek-v4-flash with cached_input rate", () => {
|
|
53
|
-
const p = lookupPricing("deepseek", "deepseek-v4-flash");
|
|
54
|
-
expect(p).toBeDefined();
|
|
55
|
-
expect(p.input_per_million_usd).toBe(0.27);
|
|
56
|
-
expect(p.output_per_million_usd).toBe(1.1);
|
|
57
|
-
expect(p.cached_input_per_million_usd).toBe(0.027);
|
|
58
|
-
});
|
|
59
|
-
it("anthropic models surface cache_write surcharge via static fallback", () => {
|
|
60
|
-
const p = lookupPricing("anthropic", "claude-3-5-sonnet-latest");
|
|
61
|
-
expect(p?.cached_input_per_million_usd).toBeDefined();
|
|
62
|
-
expect(p?.cache_write_per_million_usd).toBeDefined();
|
|
63
|
-
expect(p.cache_write_per_million_usd).toBeGreaterThan(p.input_per_million_usd);
|
|
64
|
-
});
|
|
65
|
-
it("returns undefined for unknown provider", () => {
|
|
66
|
-
expect(lookupPricing("nonexistent", "model")).toBeUndefined();
|
|
67
|
-
});
|
|
68
|
-
it("returns undefined for unknown model on a known provider (not ollama)", () => {
|
|
69
|
-
expect(lookupPricing("anthropic", "nonexistent-model")).toBeUndefined();
|
|
70
|
-
});
|
|
71
|
-
it("returns zero pricing for any ollama model via wildcard", () => {
|
|
72
|
-
const p = lookupPricing("ollama", "any-model-here");
|
|
73
|
-
expect(p).toBeDefined();
|
|
74
|
-
expect(p.input_per_million_usd).toBe(0);
|
|
75
|
-
expect(p.output_per_million_usd).toBe(0);
|
|
76
|
-
});
|
|
77
|
-
it("STATIC_PRICING_FALLBACK map has entries for all 6 providers", () => {
|
|
78
|
-
expect(Object.keys(STATIC_PRICING_FALLBACK)).toEqual(expect.arrayContaining(["anthropic", "openai", "google", "deepseek", "siliconflow", "ollama"]));
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
//# sourceMappingURL=pricing.test.js.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for computePromptCacheKey — the F1 fix for OpenAI prompt
|
|
3
|
-
* cache key stability across rounds in a session.
|
|
4
|
-
*/
|
|
5
|
-
import { describe, expect, it } from "vitest";
|
|
6
|
-
import { computePromptCacheKey } from "./runtime.js";
|
|
7
|
-
describe("computePromptCacheKey", () => {
|
|
8
|
-
it("returns a stable 32-char hex hash for a given session id", () => {
|
|
9
|
-
const a = computePromptCacheKey("sess-abc-123");
|
|
10
|
-
const b = computePromptCacheKey("sess-abc-123");
|
|
11
|
-
expect(a).toBe(b);
|
|
12
|
-
expect(a).toMatch(/^[a-f0-9]{32}$/);
|
|
13
|
-
});
|
|
14
|
-
it("produces different keys for different session ids", () => {
|
|
15
|
-
const a = computePromptCacheKey("sess-aaa");
|
|
16
|
-
const b = computePromptCacheKey("sess-bbb");
|
|
17
|
-
expect(a).not.toBe(b);
|
|
18
|
-
});
|
|
19
|
-
it("returns undefined when no session id is provided", () => {
|
|
20
|
-
expect(computePromptCacheKey(undefined)).toBeUndefined();
|
|
21
|
-
expect(computePromptCacheKey("")).toBeUndefined();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
//# sourceMappingURL=prompt-cache-key.spec.js.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Verifies the H1 mock-model hook in resolveModelRuntime: when
|
|
3
|
-
* `globalThis.__muonroiMockModel` is set, the resolved runtime returns the
|
|
4
|
-
* mock model and the test-supplied unsupportedParams/defaultProviderOptions
|
|
5
|
-
* overrides flow through to ResolvedModelRuntime exactly as the real factory
|
|
6
|
-
* path would surface them.
|
|
7
|
-
*/
|
|
8
|
-
export {};
|