muonroi-cli 1.8.1 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +5 -17
- package/README.md +20 -9
- package/dist/src/generated/version.d.ts +1 -1
- package/dist/src/generated/version.js +1 -1
- package/dist/src/mcp/setup-guide-text.d.ts +1 -1
- package/dist/src/mcp/setup-guide-text.js +8 -5
- package/dist/src/orchestrator/orchestrator.js +22 -13
- package/dist/src/orchestrator/tool-engine.d.ts +4 -0
- package/dist/src/orchestrator/tool-engine.js +49 -0
- package/dist/src/ui/use-app-logic.js +0 -0
- package/dist/src/utils/install-manager.d.ts +1 -0
- package/dist/src/utils/install-manager.js +41 -10
- package/dist/src/utils/update-checker.js +12 -2
- package/package.json +9 -2
- package/dist/src/__test-helpers__/catalog-fixtures.d.ts +0 -22
- package/dist/src/__test-helpers__/catalog-fixtures.js +0 -55
- package/dist/src/__test-stubs__/ee-server.d.ts +0 -27
- package/dist/src/__test-stubs__/ee-server.js +0 -138
- package/dist/src/__test-stubs__/vitest-setup.d.ts +0 -1
- package/dist/src/__test-stubs__/vitest-setup.js +0 -38
- package/dist/src/__tests__/council/bubble-layout.test.d.ts +0 -1
- package/dist/src/__tests__/council/bubble-layout.test.js +0 -39
- package/dist/src/__tests__/council/code-block-truncate.test.d.ts +0 -1
- package/dist/src/__tests__/council/code-block-truncate.test.js +0 -45
- package/dist/src/__tests__/council/role-palette.test.d.ts +0 -1
- package/dist/src/__tests__/council/role-palette.test.js +0 -59
- package/dist/src/__tests__/first-run-wizard.test.d.ts +0 -1
- package/dist/src/__tests__/first-run-wizard.test.js +0 -9
- package/dist/src/agent-harness/__tests__/cli-flags.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/cli-flags.spec.js +0 -33
- package/dist/src/agent-harness/__tests__/driver.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/driver.spec.js +0 -141
- package/dist/src/agent-harness/__tests__/idle.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/idle.spec.js +0 -84
- package/dist/src/agent-harness/__tests__/mock-llm.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/mock-llm.spec.js +0 -91
- package/dist/src/agent-harness/__tests__/mock-model.spec.d.ts +0 -5
- package/dist/src/agent-harness/__tests__/mock-model.spec.js +0 -270
- package/dist/src/agent-harness/__tests__/predicate.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/predicate.spec.js +0 -27
- package/dist/src/agent-harness/__tests__/protocol.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/protocol.spec.js +0 -56
- package/dist/src/agent-harness/__tests__/schema.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/schema.spec.js +0 -76
- package/dist/src/agent-harness/__tests__/selector.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/selector.spec.js +0 -70
- package/dist/src/agent-harness/__tests__/sidechannel.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/sidechannel.spec.js +0 -29
- package/dist/src/agent-harness/__tests__/spec-helpers.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/spec-helpers.spec.js +0 -68
- package/dist/src/chat/__tests__/broadcast-bus.test.d.ts +0 -1
- package/dist/src/chat/__tests__/broadcast-bus.test.js +0 -81
- package/dist/src/chat/__tests__/channel-manager.test.d.ts +0 -1
- package/dist/src/chat/__tests__/channel-manager.test.js +0 -133
- package/dist/src/chat/__tests__/client.test.d.ts +0 -1
- package/dist/src/chat/__tests__/client.test.js +0 -109
- package/dist/src/chat/__tests__/discord-integration.test.d.ts +0 -1
- package/dist/src/chat/__tests__/discord-integration.test.js +0 -153
- package/dist/src/chat/__tests__/intent-prompt.test.d.ts +0 -1
- package/dist/src/chat/__tests__/intent-prompt.test.js +0 -80
- package/dist/src/chat/__tests__/verdict-resolver.test.d.ts +0 -1
- package/dist/src/chat/__tests__/verdict-resolver.test.js +0 -308
- package/dist/src/cli/__tests__/bw-vault.test.d.ts +0 -1
- package/dist/src/cli/__tests__/bw-vault.test.js +0 -87
- package/dist/src/cli/__tests__/keys-bundle.test.d.ts +0 -1
- package/dist/src/cli/__tests__/keys-bundle.test.js +0 -40
- package/dist/src/cli/__tests__/share-cmd.test.d.ts +0 -1
- package/dist/src/cli/__tests__/share-cmd.test.js +0 -175
- package/dist/src/cli/config/__tests__/model-picker.test.d.ts +0 -1
- package/dist/src/cli/config/__tests__/model-picker.test.js +0 -56
- package/dist/src/cli/config/__tests__/provider-fetch.test.d.ts +0 -1
- package/dist/src/cli/config/__tests__/provider-fetch.test.js +0 -38
- package/dist/src/cli/cost-forensics.test.d.ts +0 -1
- package/dist/src/cli/cost-forensics.test.js +0 -223
- package/dist/src/cli/experience-report.test.d.ts +0 -5
- package/dist/src/cli/experience-report.test.js +0 -63
- package/dist/src/cli/keys.test.d.ts +0 -1
- package/dist/src/cli/keys.test.js +0 -86
- package/dist/src/council/__tests__/abort-threading.test.d.ts +0 -1
- package/dist/src/council/__tests__/abort-threading.test.js +0 -193
- package/dist/src/council/__tests__/accounting.test.d.ts +0 -1
- package/dist/src/council/__tests__/accounting.test.js +0 -66
- package/dist/src/council/__tests__/audit-replay.test.d.ts +0 -1
- package/dist/src/council/__tests__/audit-replay.test.js +0 -241
- package/dist/src/council/__tests__/clarification-prompt.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarification-prompt.test.js +0 -71
- package/dist/src/council/__tests__/clarifier-max-rounds.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-max-rounds.test.js +0 -46
- package/dist/src/council/__tests__/clarifier-options.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-options.test.js +0 -54
- package/dist/src/council/__tests__/clarifier-ready-gate.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-ready-gate.test.js +0 -265
- package/dist/src/council/__tests__/cost-aware.test.d.ts +0 -1
- package/dist/src/council/__tests__/cost-aware.test.js +0 -49
- package/dist/src/council/__tests__/council-turn-length-emit.test.d.ts +0 -1
- package/dist/src/council/__tests__/council-turn-length-emit.test.js +0 -130
- package/dist/src/council/__tests__/debate-planner-structured.test.d.ts +0 -1
- package/dist/src/council/__tests__/debate-planner-structured.test.js +0 -209
- package/dist/src/council/__tests__/debate-round-budget.test.d.ts +0 -1
- package/dist/src/council/__tests__/debate-round-budget.test.js +0 -45
- package/dist/src/council/__tests__/decisions-lock.test.d.ts +0 -6
- package/dist/src/council/__tests__/decisions-lock.test.js +0 -352
- package/dist/src/council/__tests__/evaluator-metrics.test.d.ts +0 -1
- package/dist/src/council/__tests__/evaluator-metrics.test.js +0 -463
- package/dist/src/council/__tests__/oauth-reachable.test.d.ts +0 -1
- package/dist/src/council/__tests__/oauth-reachable.test.js +0 -31
- package/dist/src/council/__tests__/parse-outcome-fallback.test.d.ts +0 -1
- package/dist/src/council/__tests__/parse-outcome-fallback.test.js +0 -114
- package/dist/src/council/__tests__/post-debate-recommendation.test.d.ts +0 -1
- package/dist/src/council/__tests__/post-debate-recommendation.test.js +0 -58
- package/dist/src/council/__tests__/research-tools.test.d.ts +0 -1
- package/dist/src/council/__tests__/research-tools.test.js +0 -214
- package/dist/src/council/__tests__/round-tools.test.d.ts +0 -1
- package/dist/src/council/__tests__/round-tools.test.js +0 -306
- package/dist/src/council/__tests__/tool-trace.test.d.ts +0 -1
- package/dist/src/council/__tests__/tool-trace.test.js +0 -131
- package/dist/src/council/__tests__/types-contract.test.d.ts +0 -9
- package/dist/src/council/__tests__/types-contract.test.js +0 -82
- package/dist/src/council/clarifier-question-cap.test.d.ts +0 -12
- package/dist/src/council/clarifier-question-cap.test.js +0 -73
- package/dist/src/daemon/scheduler.test.d.ts +0 -1
- package/dist/src/daemon/scheduler.test.js +0 -103
- package/dist/src/ee/__tests__/bb-design.test.d.ts +0 -14
- package/dist/src/ee/__tests__/bb-design.test.js +0 -180
- package/dist/src/ee/__tests__/ee-onboarding.test.d.ts +0 -1
- package/dist/src/ee/__tests__/ee-onboarding.test.js +0 -32
- package/dist/src/ee/__tests__/export-transcripts.test.d.ts +0 -11
- package/dist/src/ee/__tests__/export-transcripts.test.js +0 -200
- package/dist/src/ee/__tests__/pil-context-bridge.test.d.ts +0 -1
- package/dist/src/ee/__tests__/pil-context-bridge.test.js +0 -54
- package/dist/src/ee/__tests__/pipeline.integration.test.d.ts +0 -14
- package/dist/src/ee/__tests__/pipeline.integration.test.js +0 -151
- package/dist/src/ee/__tests__/recall-format.test.d.ts +0 -10
- package/dist/src/ee/__tests__/recall-format.test.js +0 -57
- package/dist/src/ee/__tests__/recall-ledger.test.d.ts +0 -1
- package/dist/src/ee/__tests__/recall-ledger.test.js +0 -45
- package/dist/src/ee/__tests__/render-sink-wiring.test.d.ts +0 -1
- package/dist/src/ee/__tests__/render-sink-wiring.test.js +0 -74
- package/dist/src/ee/artifact-cache.test.d.ts +0 -1
- package/dist/src/ee/artifact-cache.test.js +0 -69
- package/dist/src/ee/auth.test.d.ts +0 -1
- package/dist/src/ee/auth.test.js +0 -59
- package/dist/src/ee/bridge.test.d.ts +0 -1
- package/dist/src/ee/bridge.test.js +0 -230
- package/dist/src/ee/client.test.d.ts +0 -1
- package/dist/src/ee/client.test.js +0 -181
- package/dist/src/ee/extract-session.test.d.ts +0 -1
- package/dist/src/ee/extract-session.test.js +0 -192
- package/dist/src/ee/intercept.test.d.ts +0 -1
- package/dist/src/ee/intercept.test.js +0 -171
- package/dist/src/ee/judge.test.d.ts +0 -1
- package/dist/src/ee/judge.test.js +0 -190
- package/dist/src/ee/mistake-detector.test.d.ts +0 -1
- package/dist/src/ee/mistake-detector.test.js +0 -221
- package/dist/src/ee/offline-queue.test.d.ts +0 -1
- package/dist/src/ee/offline-queue.test.js +0 -246
- package/dist/src/ee/phase-outcome.test.d.ts +0 -1
- package/dist/src/ee/phase-outcome.test.js +0 -94
- package/dist/src/ee/phase-tracker.test.d.ts +0 -1
- package/dist/src/ee/phase-tracker.test.js +0 -142
- package/dist/src/ee/posttool.test.d.ts +0 -1
- package/dist/src/ee/posttool.test.js +0 -70
- package/dist/src/ee/prompt-stale.test.d.ts +0 -8
- package/dist/src/ee/prompt-stale.test.js +0 -76
- package/dist/src/ee/recall-mirror.test.d.ts +0 -1
- package/dist/src/ee/recall-mirror.test.js +0 -65
- package/dist/src/ee/render.test.d.ts +0 -1
- package/dist/src/ee/render.test.js +0 -63
- package/dist/src/ee/scope.test.d.ts +0 -1
- package/dist/src/ee/scope.test.js +0 -97
- package/dist/src/ee/search.test.d.ts +0 -1
- package/dist/src/ee/search.test.js +0 -23
- package/dist/src/ee/session-trajectory.test.d.ts +0 -1
- package/dist/src/ee/session-trajectory.test.js +0 -120
- package/dist/src/ee/touch.test.d.ts +0 -1
- package/dist/src/ee/touch.test.js +0 -62
- package/dist/src/ee/who-am-i.test.d.ts +0 -1
- package/dist/src/ee/who-am-i.test.js +0 -101
- package/dist/src/flow/__tests__/migration.test.d.ts +0 -1
- package/dist/src/flow/__tests__/migration.test.js +0 -105
- package/dist/src/flow/__tests__/parser.test.d.ts +0 -1
- package/dist/src/flow/__tests__/parser.test.js +0 -68
- package/dist/src/flow/__tests__/run-manager-product.test.d.ts +0 -1
- package/dist/src/flow/__tests__/run-manager-product.test.js +0 -49
- package/dist/src/flow/__tests__/run-manager.test.d.ts +0 -1
- package/dist/src/flow/__tests__/run-manager.test.js +0 -83
- package/dist/src/flow/__tests__/scaffold-checkpoint.test.d.ts +0 -1
- package/dist/src/flow/__tests__/scaffold-checkpoint.test.js +0 -93
- package/dist/src/flow/__tests__/scaffold.test.d.ts +0 -1
- package/dist/src/flow/__tests__/scaffold.test.js +0 -47
- package/dist/src/flow/__tests__/warning-persist.test.d.ts +0 -5
- package/dist/src/flow/__tests__/warning-persist.test.js +0 -96
- package/dist/src/flow/compaction/__tests__/compress.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/compress.test.js +0 -63
- package/dist/src/flow/compaction/__tests__/extract.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/extract.test.js +0 -66
- package/dist/src/flow/compaction/__tests__/preserve.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/preserve.test.js +0 -62
- package/dist/src/gsd/__tests__/gray-areas.test.d.ts +0 -1
- package/dist/src/gsd/__tests__/gray-areas.test.js +0 -29
- package/dist/src/gsd/__tests__/types.test.d.ts +0 -1
- package/dist/src/gsd/__tests__/types.test.js +0 -78
- package/dist/src/headless/__tests__/council-answers.test.d.ts +0 -1
- package/dist/src/headless/__tests__/council-answers.test.js +0 -251
- package/dist/src/headless/output.test.d.ts +0 -1
- package/dist/src/headless/output.test.js +0 -239
- package/dist/src/lsp/builtins.test.d.ts +0 -1
- package/dist/src/lsp/builtins.test.js +0 -112
- package/dist/src/lsp/client-normalize.test.d.ts +0 -12
- package/dist/src/lsp/client-normalize.test.js +0 -34
- package/dist/src/lsp/manager.test.d.ts +0 -1
- package/dist/src/lsp/manager.test.js +0 -194
- package/dist/src/lsp/npm-cache.test.d.ts +0 -1
- package/dist/src/lsp/npm-cache.test.js +0 -53
- package/dist/src/lsp/smoke.test.d.ts +0 -1
- package/dist/src/lsp/smoke.test.js +0 -56
- package/dist/src/maintain/__tests__/codebase-intel.test.d.ts +0 -5
- package/dist/src/maintain/__tests__/codebase-intel.test.js +0 -237
- package/dist/src/maintain/__tests__/gh-create-pr.test.d.ts +0 -11
- package/dist/src/maintain/__tests__/gh-create-pr.test.js +0 -160
- package/dist/src/maintain/__tests__/pr-builder.test.d.ts +0 -10
- package/dist/src/maintain/__tests__/pr-builder.test.js +0 -229
- package/dist/src/maintain/__tests__/repo-map.test.d.ts +0 -5
- package/dist/src/maintain/__tests__/repo-map.test.js +0 -90
- package/dist/src/maintain/__tests__/task-runner.test.d.ts +0 -11
- package/dist/src/maintain/__tests__/task-runner.test.js +0 -281
- package/dist/src/mcp/__tests__/auto-setup.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/auto-setup.test.js +0 -155
- package/dist/src/mcp/__tests__/cap-tool-result.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/cap-tool-result.test.js +0 -58
- package/dist/src/mcp/__tests__/client-pool.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/client-pool.spec.js +0 -169
- package/dist/src/mcp/__tests__/ee-tools.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/ee-tools.test.js +0 -226
- package/dist/src/mcp/__tests__/forensics-tools.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/forensics-tools.test.js +0 -54
- package/dist/src/mcp/__tests__/harness-driver-action-tools.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-action-tools.spec.js +0 -103
- package/dist/src/mcp/__tests__/harness-driver-async-tools.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-async-tools.spec.js +0 -112
- package/dist/src/mcp/__tests__/harness-driver-read-tools.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-read-tools.spec.js +0 -124
- package/dist/src/mcp/__tests__/harness-driver-security.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-security.spec.js +0 -61
- package/dist/src/mcp/__tests__/harness-driver.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver.spec.js +0 -20
- package/dist/src/mcp/__tests__/lazy-schema.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/lazy-schema.spec.js +0 -152
- package/dist/src/mcp/__tests__/lsp-tools.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/lsp-tools.test.js +0 -56
- package/dist/src/mcp/__tests__/mcp-keychain.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/mcp-keychain.test.js +0 -40
- package/dist/src/mcp/__tests__/parallel-build.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/parallel-build.spec.js +0 -67
- package/dist/src/mcp/__tests__/research-onboarding.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/research-onboarding.test.js +0 -148
- package/dist/src/mcp/__tests__/runtime-hydration.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/runtime-hydration.test.js +0 -78
- package/dist/src/mcp/__tests__/runtime-output-cap.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/runtime-output-cap.test.js +0 -42
- package/dist/src/mcp/__tests__/runtime-sanitize.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/runtime-sanitize.test.js +0 -40
- package/dist/src/mcp/__tests__/self-verify-jobs.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/self-verify-jobs.test.js +0 -92
- package/dist/src/mcp/__tests__/smart-filter.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/smart-filter.test.js +0 -177
- package/dist/src/mcp/__tests__/tools-server.smoke.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/tools-server.smoke.test.js +0 -42
- package/dist/src/mcp/parse-headers.test.d.ts +0 -1
- package/dist/src/mcp/parse-headers.test.js +0 -43
- package/dist/src/mcp/smoke.test.d.ts +0 -1
- package/dist/src/mcp/smoke.test.js +0 -159
- package/dist/src/models/__tests__/registry.test.d.ts +0 -1
- package/dist/src/models/__tests__/registry.test.js +0 -74
- package/dist/src/models/catalog-gemini.test.d.ts +0 -1
- package/dist/src/models/catalog-gemini.test.js +0 -48
- package/dist/src/models/catalog-url.test.d.ts +0 -1
- package/dist/src/models/catalog-url.test.js +0 -26
- package/dist/src/models/catalog-validation.test.d.ts +0 -1
- package/dist/src/models/catalog-validation.test.js +0 -63
- package/dist/src/ops/__tests__/doctor-council-mcp.test.d.ts +0 -1
- package/dist/src/ops/__tests__/doctor-council-mcp.test.js +0 -139
- package/dist/src/ops/__tests__/doctor-ee-health.test.d.ts +0 -1
- package/dist/src/ops/__tests__/doctor-ee-health.test.js +0 -134
- package/dist/src/ops/bug-report.test.d.ts +0 -1
- package/dist/src/ops/bug-report.test.js +0 -148
- package/dist/src/ops/doctor.test.d.ts +0 -1
- package/dist/src/ops/doctor.test.js +0 -97
- package/dist/src/orchestrator/__tests__/agent-base-url-switch.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/agent-base-url-switch.test.js +0 -77
- package/dist/src/orchestrator/__tests__/auto-commit.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/auto-commit.test.js +0 -142
- package/dist/src/orchestrator/__tests__/batch-turn-runner.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/batch-turn-runner.test.js +0 -164
- package/dist/src/orchestrator/__tests__/council-manager.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/council-manager.test.js +0 -148
- package/dist/src/orchestrator/__tests__/cross-turn-dedup.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/cross-turn-dedup.test.js +0 -175
- package/dist/src/orchestrator/__tests__/current-call-id.test.d.ts +0 -16
- package/dist/src/orchestrator/__tests__/current-call-id.test.js +0 -138
- package/dist/src/orchestrator/__tests__/delegations.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/delegations.test.js +0 -96
- package/dist/src/orchestrator/__tests__/error-forensics.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/error-forensics.test.js +0 -93
- package/dist/src/orchestrator/__tests__/flow-resume.test.d.ts +0 -5
- package/dist/src/orchestrator/__tests__/flow-resume.test.js +0 -61
- package/dist/src/orchestrator/__tests__/humanize-api-error.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/humanize-api-error.test.js +0 -68
- package/dist/src/orchestrator/__tests__/mcp-capability-block.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/mcp-capability-block.test.js +0 -39
- package/dist/src/orchestrator/__tests__/message-processor.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/message-processor.test.js +0 -189
- package/dist/src/orchestrator/__tests__/message-write-ahead.test.d.ts +0 -22
- package/dist/src/orchestrator/__tests__/message-write-ahead.test.js +0 -149
- package/dist/src/orchestrator/__tests__/project-stack.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/project-stack.test.js +0 -65
- package/dist/src/orchestrator/__tests__/prompts.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/prompts.test.js +0 -88
- package/dist/src/orchestrator/__tests__/read-path-budget.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/read-path-budget.test.js +0 -156
- package/dist/src/orchestrator/__tests__/retry-classifier.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/retry-classifier.test.js +0 -112
- package/dist/src/orchestrator/__tests__/retry-stream.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/retry-stream.test.js +0 -151
- package/dist/src/orchestrator/__tests__/route-feedback.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/route-feedback.test.js +0 -47
- package/dist/src/orchestrator/__tests__/stream-runner.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/stream-runner.test.js +0 -202
- package/dist/src/orchestrator/__tests__/sub-agent-model-tier.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/sub-agent-model-tier.test.js +0 -45
- package/dist/src/orchestrator/__tests__/sub-session-delegation.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/sub-session-delegation.test.js +0 -507
- package/dist/src/orchestrator/__tests__/usage-events-shape.test.d.ts +0 -8
- package/dist/src/orchestrator/__tests__/usage-events-shape.test.js +0 -58
- package/dist/src/orchestrator/__tests__/usage-normalizer-c1.test.d.ts +0 -21
- package/dist/src/orchestrator/__tests__/usage-normalizer-c1.test.js +0 -155
- package/dist/src/orchestrator/__tests__/usage-shape-threading.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/usage-shape-threading.test.js +0 -98
- package/dist/src/orchestrator/__tests__/write-ahead.test.d.ts +0 -20
- package/dist/src/orchestrator/__tests__/write-ahead.test.js +0 -134
- package/dist/src/orchestrator/abort.test.d.ts +0 -1
- package/dist/src/orchestrator/abort.test.js +0 -34
- package/dist/src/orchestrator/agent.test.d.ts +0 -1
- package/dist/src/orchestrator/agent.test.js +0 -178
- package/dist/src/orchestrator/cleanup.test.d.ts +0 -1
- package/dist/src/orchestrator/cleanup.test.js +0 -67
- package/dist/src/orchestrator/compaction.test.d.ts +0 -1
- package/dist/src/orchestrator/compaction.test.js +0 -187
- package/dist/src/orchestrator/delegations.test.d.ts +0 -1
- package/dist/src/orchestrator/delegations.test.js +0 -107
- package/dist/src/orchestrator/grounding-check.test.d.ts +0 -1
- package/dist/src/orchestrator/grounding-check.test.js +0 -94
- package/dist/src/orchestrator/interrupted-turn.test.d.ts +0 -1
- package/dist/src/orchestrator/interrupted-turn.test.js +0 -34
- package/dist/src/orchestrator/message-seq.test.d.ts +0 -1
- package/dist/src/orchestrator/message-seq.test.js +0 -24
- package/dist/src/orchestrator/pending-calls.test.d.ts +0 -1
- package/dist/src/orchestrator/pending-calls.test.js +0 -188
- package/dist/src/orchestrator/provider-options-shape.spec.d.ts +0 -1
- package/dist/src/orchestrator/provider-options-shape.spec.js +0 -63
- package/dist/src/orchestrator/reasoning.test.d.ts +0 -1
- package/dist/src/orchestrator/reasoning.test.js +0 -101
- package/dist/src/orchestrator/repetition-detector.test.d.ts +0 -1
- package/dist/src/orchestrator/repetition-detector.test.js +0 -103
- package/dist/src/orchestrator/sandbox.test.d.ts +0 -1
- package/dist/src/orchestrator/sandbox.test.js +0 -99
- package/dist/src/orchestrator/scope-ceiling.test.d.ts +0 -13
- package/dist/src/orchestrator/scope-ceiling.test.js +0 -181
- package/dist/src/orchestrator/scope-reminder.test.d.ts +0 -15
- package/dist/src/orchestrator/scope-reminder.test.js +0 -225
- package/dist/src/orchestrator/session-experience.test.d.ts +0 -6
- package/dist/src/orchestrator/session-experience.test.js +0 -72
- package/dist/src/orchestrator/stall-rescue.test.d.ts +0 -1
- package/dist/src/orchestrator/stall-rescue.test.js +0 -117
- package/dist/src/orchestrator/stall-watchdog.test.d.ts +0 -1
- package/dist/src/orchestrator/stall-watchdog.test.js +0 -153
- package/dist/src/orchestrator/steer-inbox.test.d.ts +0 -1
- package/dist/src/orchestrator/steer-inbox.test.js +0 -33
- package/dist/src/orchestrator/sub-agent-cap.test.d.ts +0 -1
- package/dist/src/orchestrator/sub-agent-cap.test.js +0 -208
- package/dist/src/orchestrator/subagent-compactor.spec.d.ts +0 -1
- package/dist/src/orchestrator/subagent-compactor.spec.js +0 -636
- package/dist/src/orchestrator/text-tool-call-detector.test.d.ts +0 -1
- package/dist/src/orchestrator/text-tool-call-detector.test.js +0 -147
- package/dist/src/orchestrator/token-counter.test.d.ts +0 -1
- package/dist/src/orchestrator/token-counter.test.js +0 -57
- package/dist/src/orchestrator/tool-args-hash.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-args-hash.test.js +0 -105
- package/dist/src/orchestrator/tool-args-repair.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-args-repair.test.js +0 -136
- package/dist/src/orchestrator/tool-loop-askcard.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-loop-askcard.test.js +0 -71
- package/dist/src/orchestrator/tool-loop-cap.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-loop-cap.test.js +0 -176
- package/dist/src/orchestrator/tool-repetition-detector.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-repetition-detector.test.js +0 -101
- package/dist/src/pil/__tests__/budget.test.d.ts +0 -1
- package/dist/src/pil/__tests__/budget.test.js +0 -33
- package/dist/src/pil/__tests__/clarity-gate.test.d.ts +0 -1
- package/dist/src/pil/__tests__/clarity-gate.test.js +0 -37
- package/dist/src/pil/__tests__/config.test.d.ts +0 -1
- package/dist/src/pil/__tests__/config.test.js +0 -57
- package/dist/src/pil/__tests__/discovery-cache.test.d.ts +0 -1
- package/dist/src/pil/__tests__/discovery-cache.test.js +0 -38
- package/dist/src/pil/__tests__/discovery-types.test.d.ts +0 -1
- package/dist/src/pil/__tests__/discovery-types.test.js +0 -65
- package/dist/src/pil/__tests__/discovery.test.d.ts +0 -1
- package/dist/src/pil/__tests__/discovery.test.js +0 -178
- package/dist/src/pil/__tests__/dual-run.test.d.ts +0 -1
- package/dist/src/pil/__tests__/dual-run.test.js +0 -51
- package/dist/src/pil/__tests__/layer1-intent-trace.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer1-intent-trace.test.js +0 -138
- package/dist/src/pil/__tests__/layer1-intent.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer1-intent.test.js +0 -329
- package/dist/src/pil/__tests__/layer15-context-scan.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer15-context-scan.test.js +0 -64
- package/dist/src/pil/__tests__/layer16-clarity.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer16-clarity.test.js +0 -72
- package/dist/src/pil/__tests__/layer17-feasibility.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer17-feasibility.test.js +0 -36
- package/dist/src/pil/__tests__/layer18-acceptance.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer18-acceptance.test.js +0 -18
- package/dist/src/pil/__tests__/layer2-personality.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer2-personality.test.js +0 -57
- package/dist/src/pil/__tests__/layer2_5-ponytail.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer2_5-ponytail.test.js +0 -53
- package/dist/src/pil/__tests__/layer3-ee-injection.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer3-ee-injection.test.js +0 -221
- package/dist/src/pil/__tests__/layer3-injected-chunk.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer3-injected-chunk.test.js +0 -134
- package/dist/src/pil/__tests__/layer4-gsd.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer4-gsd.test.js +0 -191
- package/dist/src/pil/__tests__/layer5-context.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer5-context.test.js +0 -175
- package/dist/src/pil/__tests__/layer6-output.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer6-output.test.js +0 -465
- package/dist/src/pil/__tests__/llm-classify.test.d.ts +0 -1
- package/dist/src/pil/__tests__/llm-classify.test.js +0 -275
- package/dist/src/pil/__tests__/native-capabilities-workbook.test.d.ts +0 -1
- package/dist/src/pil/__tests__/native-capabilities-workbook.test.js +0 -40
- package/dist/src/pil/__tests__/ollama-classify.test.d.ts +0 -1
- package/dist/src/pil/__tests__/ollama-classify.test.js +0 -68
- package/dist/src/pil/__tests__/orchestrator-integration.test.d.ts +0 -10
- package/dist/src/pil/__tests__/orchestrator-integration.test.js +0 -100
- package/dist/src/pil/__tests__/pipeline.test.d.ts +0 -1
- package/dist/src/pil/__tests__/pipeline.test.js +0 -188
- package/dist/src/pil/__tests__/renderer-coverage.test.d.ts +0 -7
- package/dist/src/pil/__tests__/renderer-coverage.test.js +0 -42
- package/dist/src/pil/__tests__/response-tools.test.d.ts +0 -1
- package/dist/src/pil/__tests__/response-tools.test.js +0 -242
- package/dist/src/pil/__tests__/schema.test.d.ts +0 -1
- package/dist/src/pil/__tests__/schema.test.js +0 -202
- package/dist/src/pil/__tests__/scoreComplexity.test.d.ts +0 -1
- package/dist/src/pil/__tests__/scoreComplexity.test.js +0 -119
- package/dist/src/pil/__tests__/scoreSufficiency.test.d.ts +0 -8
- package/dist/src/pil/__tests__/scoreSufficiency.test.js +0 -89
- package/dist/src/pil/__tests__/store.test.d.ts +0 -1
- package/dist/src/pil/__tests__/store.test.js +0 -44
- package/dist/src/pil/__tests__/surface-compaction-artifacts.test.d.ts +0 -1
- package/dist/src/pil/__tests__/surface-compaction-artifacts.test.js +0 -112
- package/dist/src/pil/__tests__/task-tier-map.test.d.ts +0 -1
- package/dist/src/pil/__tests__/task-tier-map.test.js +0 -33
- package/dist/src/pil/agent-operating-contract.test.d.ts +0 -1
- package/dist/src/pil/agent-operating-contract.test.js +0 -80
- package/dist/src/pil/cheap-model-playbook.test.d.ts +0 -1
- package/dist/src/pil/cheap-model-playbook.test.js +0 -160
- package/dist/src/pil/cheap-model-workbooks.test.d.ts +0 -1
- package/dist/src/pil/cheap-model-workbooks.test.js +0 -129
- package/dist/src/pil/layer1-intent.test.d.ts +0 -1
- package/dist/src/pil/layer1-intent.test.js +0 -764
- package/dist/src/pil/layer1_5-complexity-size.test.d.ts +0 -10
- package/dist/src/pil/layer1_5-complexity-size.test.js +0 -248
- package/dist/src/pil/session-experience-injection.test.d.ts +0 -6
- package/dist/src/pil/session-experience-injection.test.js +0 -79
- package/dist/src/pil/session-state.test.d.ts +0 -1
- package/dist/src/pil/session-state.test.js +0 -73
- package/dist/src/playbook/__tests__/directives.test.d.ts +0 -1
- package/dist/src/playbook/__tests__/directives.test.js +0 -115
- package/dist/src/product-loop/__tests__/artifact-io.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/artifact-io.test.js +0 -83
- package/dist/src/product-loop/__tests__/assumption-ledger.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/assumption-ledger.test.js +0 -261
- package/dist/src/product-loop/__tests__/backlog-builder.test.d.ts +0 -10
- package/dist/src/product-loop/__tests__/backlog-builder.test.js +0 -175
- package/dist/src/product-loop/__tests__/backlog-store.test.d.ts +0 -4
- package/dist/src/product-loop/__tests__/backlog-store.test.js +0 -96
- package/dist/src/product-loop/__tests__/cb2-retry-bonus.test.d.ts +0 -13
- package/dist/src/product-loop/__tests__/cb2-retry-bonus.test.js +0 -158
- package/dist/src/product-loop/__tests__/circuit-breakers-coverage.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/circuit-breakers-coverage.test.js +0 -67
- package/dist/src/product-loop/__tests__/circuit-breakers.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/circuit-breakers.test.js +0 -79
- package/dist/src/product-loop/__tests__/complexity-routing.spec.d.ts +0 -11
- package/dist/src/product-loop/__tests__/complexity-routing.spec.js +0 -240
- package/dist/src/product-loop/__tests__/context-policy.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/context-policy.test.js +0 -266
- package/dist/src/product-loop/__tests__/cost-preview.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/cost-preview.test.js +0 -111
- package/dist/src/product-loop/__tests__/cost-scoper.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/cost-scoper.test.js +0 -50
- package/dist/src/product-loop/__tests__/cross-run-memory.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/cross-run-memory.test.js +0 -168
- package/dist/src/product-loop/__tests__/design-output.spec.d.ts +0 -1
- package/dist/src/product-loop/__tests__/design-output.spec.js +0 -36
- package/dist/src/product-loop/__tests__/discover.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discover.test.js +0 -83
- package/dist/src/product-loop/__tests__/discovery-context-format.test.d.ts +0 -13
- package/dist/src/product-loop/__tests__/discovery-context-format.test.js +0 -100
- package/dist/src/product-loop/__tests__/discovery-council-runner.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-council-runner.test.js +0 -13
- package/dist/src/product-loop/__tests__/discovery-detection.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-detection.test.js +0 -151
- package/dist/src/product-loop/__tests__/discovery-ecosystem.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/discovery-ecosystem.test.js +0 -209
- package/dist/src/product-loop/__tests__/discovery-integration.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-integration.test.js +0 -126
- package/dist/src/product-loop/__tests__/discovery-interview.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-interview.test.js +0 -394
- package/dist/src/product-loop/__tests__/discovery-migrations.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-migrations.test.js +0 -69
- package/dist/src/product-loop/__tests__/discovery-persistence.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-persistence.test.js +0 -146
- package/dist/src/product-loop/__tests__/discovery-prompt-parser.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-prompt-parser.test.js +0 -65
- package/dist/src/product-loop/__tests__/discovery-prompt-specificity.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-prompt-specificity.test.js +0 -55
- package/dist/src/product-loop/__tests__/discovery-recommender-ecosystem.test.d.ts +0 -9
- package/dist/src/product-loop/__tests__/discovery-recommender-ecosystem.test.js +0 -178
- package/dist/src/product-loop/__tests__/discovery-recommender.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-recommender.test.js +0 -316
- package/dist/src/product-loop/__tests__/discovery-schema.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-schema.test.js +0 -77
- package/dist/src/product-loop/__tests__/done-gate-coverage.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/done-gate-coverage.test.js +0 -135
- package/dist/src/product-loop/__tests__/done-gate.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/done-gate.test.js +0 -122
- package/dist/src/product-loop/__tests__/ee-extract-wiring.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/ee-extract-wiring.test.js +0 -186
- package/dist/src/product-loop/__tests__/extract-to-ee.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/extract-to-ee.test.js +0 -161
- package/dist/src/product-loop/__tests__/feedback-routing.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/feedback-routing.test.js +0 -83
- package/dist/src/product-loop/__tests__/gather-selectable-alts.test.d.ts +0 -15
- package/dist/src/product-loop/__tests__/gather-selectable-alts.test.js +0 -143
- package/dist/src/product-loop/__tests__/hot-path.spec.d.ts +0 -11
- package/dist/src/product-loop/__tests__/hot-path.spec.js +0 -146
- package/dist/src/product-loop/__tests__/integration.test.d.ts +0 -7
- package/dist/src/product-loop/__tests__/integration.test.js +0 -301
- package/dist/src/product-loop/__tests__/loop-driver-audit.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/loop-driver-audit.test.js +0 -269
- package/dist/src/product-loop/__tests__/loop-driver.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/loop-driver.test.js +0 -225
- package/dist/src/product-loop/__tests__/maintenance-task-synthesis.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/maintenance-task-synthesis.test.js +0 -67
- package/dist/src/product-loop/__tests__/phase-a1-a3-sprint-runner.test.d.ts +0 -13
- package/dist/src/product-loop/__tests__/phase-a1-a3-sprint-runner.test.js +0 -268
- package/dist/src/product-loop/__tests__/phase-a2-backlog-build.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/phase-a2-backlog-build.test.js +0 -162
- package/dist/src/product-loop/__tests__/phase-budget.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-budget.test.js +0 -149
- package/dist/src/product-loop/__tests__/phase-orchestrator-integration.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-orchestrator-integration.test.js +0 -138
- package/dist/src/product-loop/__tests__/phase-plan.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-plan.test.js +0 -208
- package/dist/src/product-loop/__tests__/phase-rituals.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-rituals.test.js +0 -174
- package/dist/src/product-loop/__tests__/phase-runner.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-runner.test.js +0 -414
- package/dist/src/product-loop/__tests__/phase-tracker-bridge.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-tracker-bridge.test.js +0 -67
- package/dist/src/product-loop/__tests__/pick-backend-stack.test.d.ts +0 -11
- package/dist/src/product-loop/__tests__/pick-backend-stack.test.js +0 -95
- package/dist/src/product-loop/__tests__/product-identity.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/product-identity.test.js +0 -40
- package/dist/src/product-loop/__tests__/progress-snapshot.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/progress-snapshot.test.js +0 -152
- package/dist/src/product-loop/__tests__/reality-anchor.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/reality-anchor.test.js +0 -49
- package/dist/src/product-loop/__tests__/repo-audit.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/repo-audit.test.js +0 -97
- package/dist/src/product-loop/__tests__/repo-brief.test.d.ts +0 -9
- package/dist/src/product-loop/__tests__/repo-brief.test.js +0 -132
- package/dist/src/product-loop/__tests__/role-memory.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/role-memory.test.js +0 -56
- package/dist/src/product-loop/__tests__/role-registry.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/role-registry.test.js +0 -222
- package/dist/src/product-loop/__tests__/role-routing-ee.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/role-routing-ee.test.js +0 -79
- package/dist/src/product-loop/__tests__/route-decision-emit.test.d.ts +0 -10
- package/dist/src/product-loop/__tests__/route-decision-emit.test.js +0 -222
- package/dist/src/product-loop/__tests__/seed-questions.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/seed-questions.test.js +0 -30
- package/dist/src/product-loop/__tests__/ship-polish.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/ship-polish.test.js +0 -96
- package/dist/src/product-loop/__tests__/sprint-planner.test.d.ts +0 -6
- package/dist/src/product-loop/__tests__/sprint-planner.test.js +0 -140
- package/dist/src/product-loop/__tests__/sprint-runner-backlog.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/sprint-runner-backlog.test.js +0 -221
- package/dist/src/product-loop/__tests__/sprint-runner-emit.test.d.ts +0 -14
- package/dist/src/product-loop/__tests__/sprint-runner-emit.test.js +0 -279
- package/dist/src/product-loop/__tests__/sprint-runner-phase-chunks.test.d.ts +0 -14
- package/dist/src/product-loop/__tests__/sprint-runner-phase-chunks.test.js +0 -193
- package/dist/src/product-loop/__tests__/sprint-runner.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/sprint-runner.test.js +0 -432
- package/dist/src/product-loop/__tests__/sprint-self-verify.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/sprint-self-verify.test.js +0 -73
- package/dist/src/product-loop/__tests__/sprint-store.test.d.ts +0 -7
- package/dist/src/product-loop/__tests__/sprint-store.test.js +0 -84
- package/dist/src/product-loop/__tests__/stakeholder-acl.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/stakeholder-acl.test.js +0 -83
- package/dist/src/product-loop/__tests__/state-md-ee-injections.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/state-md-ee-injections.test.js +0 -182
- package/dist/src/product-loop/__tests__/sufficiency-routing.spec.d.ts +0 -12
- package/dist/src/product-loop/__tests__/sufficiency-routing.spec.js +0 -140
- package/dist/src/product-loop/__tests__/typed-artifacts.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/typed-artifacts.test.js +0 -222
- package/dist/src/product-loop/__tests__/types.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/types.test.js +0 -79
- package/dist/src/product-loop/__tests__/verify-failure-threshold.test.d.ts +0 -9
- package/dist/src/product-loop/__tests__/verify-failure-threshold.test.js +0 -146
- package/dist/src/product-loop/__tests__/verify-failure-tracking.test.d.ts +0 -4
- package/dist/src/product-loop/__tests__/verify-failure-tracking.test.js +0 -122
- package/dist/src/product-loop/__tests__/verify-result.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/verify-result.test.js +0 -53
- package/dist/src/providers/__tests__/adapter-oauth-wiring.test.d.ts +0 -8
- package/dist/src/providers/__tests__/adapter-oauth-wiring.test.js +0 -125
- package/dist/src/providers/__tests__/capabilities-cosmetic.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-cosmetic.test.js +0 -109
- package/dist/src/providers/__tests__/capabilities-flags.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-flags.test.js +0 -145
- package/dist/src/providers/__tests__/capabilities-provider-options.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-provider-options.test.js +0 -201
- package/dist/src/providers/__tests__/capabilities-sanitize.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-sanitize.test.js +0 -60
- package/dist/src/providers/__tests__/capabilities.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities.test.js +0 -41
- package/dist/src/providers/__tests__/provider-coverage.test.d.ts +0 -1
- package/dist/src/providers/__tests__/provider-coverage.test.js +0 -45
- package/dist/src/providers/__tests__/reasoning-roundtrip.test.d.ts +0 -1
- package/dist/src/providers/__tests__/reasoning-roundtrip.test.js +0 -216
- package/dist/src/providers/__tests__/runtime-integration.test.d.ts +0 -1
- package/dist/src/providers/__tests__/runtime-integration.test.js +0 -93
- package/dist/src/providers/__tests__/runtime.test.d.ts +0 -1
- package/dist/src/providers/__tests__/runtime.test.js +0 -80
- package/dist/src/providers/__tests__/siliconflow-sse-repair.test.d.ts +0 -1
- package/dist/src/providers/__tests__/siliconflow-sse-repair.test.js +0 -267
- package/dist/src/providers/__tests__/strategies-registry.test.d.ts +0 -8
- package/dist/src/providers/__tests__/strategies-registry.test.js +0 -49
- package/dist/src/providers/__tests__/strategies-resolve.test.d.ts +0 -12
- package/dist/src/providers/__tests__/strategies-resolve.test.js +0 -128
- package/dist/src/providers/__tests__/wire-debug.test.d.ts +0 -1
- package/dist/src/providers/__tests__/wire-debug.test.js +0 -39
- package/dist/src/providers/adapter.test.d.ts +0 -1
- package/dist/src/providers/adapter.test.js +0 -19
- package/dist/src/providers/auth/__tests__/browser-flow.test.d.ts +0 -8
- package/dist/src/providers/auth/__tests__/browser-flow.test.js +0 -186
- package/dist/src/providers/auth/__tests__/device-flow.test.d.ts +0 -6
- package/dist/src/providers/auth/__tests__/device-flow.test.js +0 -219
- package/dist/src/providers/auth/__tests__/gemini-oauth.test.d.ts +0 -4
- package/dist/src/providers/auth/__tests__/gemini-oauth.test.js +0 -306
- package/dist/src/providers/auth/__tests__/grok-oauth.test.d.ts +0 -8
- package/dist/src/providers/auth/__tests__/grok-oauth.test.js +0 -236
- package/dist/src/providers/auth/__tests__/openai-oauth.test.d.ts +0 -7
- package/dist/src/providers/auth/__tests__/openai-oauth.test.js +0 -309
- package/dist/src/providers/auth/__tests__/token-store.test.d.ts +0 -7
- package/dist/src/providers/auth/__tests__/token-store.test.js +0 -125
- package/dist/src/providers/errors.test.d.ts +0 -1
- package/dist/src/providers/errors.test.js +0 -66
- package/dist/src/providers/gemini.test.d.ts +0 -1
- package/dist/src/providers/gemini.test.js +0 -37
- package/dist/src/providers/keychain.test.d.ts +0 -1
- package/dist/src/providers/keychain.test.js +0 -84
- package/dist/src/providers/mcp-vision-bridge.test.d.ts +0 -1
- package/dist/src/providers/mcp-vision-bridge.test.js +0 -381
- package/dist/src/providers/ollama.test.d.ts +0 -1
- package/dist/src/providers/ollama.test.js +0 -37
- package/dist/src/providers/openai-compatible.test.d.ts +0 -1
- package/dist/src/providers/openai-compatible.test.js +0 -53
- package/dist/src/providers/openai.test.d.ts +0 -1
- package/dist/src/providers/openai.test.js +0 -53
- package/dist/src/providers/pricing.test.d.ts +0 -1
- package/dist/src/providers/pricing.test.js +0 -81
- package/dist/src/providers/prompt-cache-key.spec.d.ts +0 -5
- package/dist/src/providers/prompt-cache-key.spec.js +0 -24
- package/dist/src/providers/runtime-mock.spec.d.ts +0 -8
- package/dist/src/providers/runtime-mock.spec.js +0 -69
- package/dist/src/providers/vision-proxy.test.d.ts +0 -1
- package/dist/src/providers/vision-proxy.test.js +0 -212
- package/dist/src/reporter/__tests__/acl-check.test.d.ts +0 -6
- package/dist/src/reporter/__tests__/acl-check.test.js +0 -59
- package/dist/src/reporter/__tests__/auto-fire.test.d.ts +0 -10
- package/dist/src/reporter/__tests__/auto-fire.test.js +0 -140
- package/dist/src/reporter/__tests__/budget.test.d.ts +0 -7
- package/dist/src/reporter/__tests__/budget.test.js +0 -60
- package/dist/src/reporter/__tests__/handlers.test.d.ts +0 -7
- package/dist/src/reporter/__tests__/handlers.test.js +0 -163
- package/dist/src/reporter/__tests__/query-router.test.d.ts +0 -6
- package/dist/src/reporter/__tests__/query-router.test.js +0 -90
- package/dist/src/router/__tests__/step-router.test.d.ts +0 -4
- package/dist/src/router/__tests__/step-router.test.js +0 -131
- package/dist/src/router/classifier/index.test.d.ts +0 -1
- package/dist/src/router/classifier/index.test.js +0 -29
- package/dist/src/router/classifier/regex.test.d.ts +0 -1
- package/dist/src/router/classifier/regex.test.js +0 -44
- package/dist/src/router/classifier/tree-sitter.test.d.ts +0 -1
- package/dist/src/router/classifier/tree-sitter.test.js +0 -23
- package/dist/src/router/cold.test.d.ts +0 -1
- package/dist/src/router/cold.test.js +0 -56
- package/dist/src/router/decide.test.d.ts +0 -1
- package/dist/src/router/decide.test.js +0 -198
- package/dist/src/router/health.test.d.ts +0 -1
- package/dist/src/router/health.test.js +0 -52
- package/dist/src/router/provider-sentinel.test.d.ts +0 -1
- package/dist/src/router/provider-sentinel.test.js +0 -20
- package/dist/src/router/role-override.test.d.ts +0 -1
- package/dist/src/router/role-override.test.js +0 -26
- package/dist/src/router/warm.test.d.ts +0 -1
- package/dist/src/router/warm.test.js +0 -202
- package/dist/src/scaffold/__tests__/continuation-prompt.test.d.ts +0 -4
- package/dist/src/scaffold/__tests__/continuation-prompt.test.js +0 -79
- package/dist/src/scaffold/__tests__/continue-as-council.spec.d.ts +0 -10
- package/dist/src/scaffold/__tests__/continue-as-council.spec.js +0 -102
- package/dist/src/scaffold/__tests__/dotnet-assembly-name.test.d.ts +0 -1
- package/dist/src/scaffold/__tests__/dotnet-assembly-name.test.js +0 -27
- package/dist/src/scaffold/__tests__/fe-scaffold-contents.test.d.ts +0 -1
- package/dist/src/scaffold/__tests__/fe-scaffold-contents.test.js +0 -106
- package/dist/src/scaffold/__tests__/init-new.smoke.spec.d.ts +0 -15
- package/dist/src/scaffold/__tests__/init-new.smoke.spec.js +0 -81
- package/dist/src/scaffold/__tests__/init-new.spec.d.ts +0 -5
- package/dist/src/scaffold/__tests__/init-new.spec.js +0 -378
- package/dist/src/scaffold/__tests__/install-bb-templates.spec.d.ts +0 -1
- package/dist/src/scaffold/__tests__/install-bb-templates.spec.js +0 -77
- package/dist/src/scaffold/__tests__/point-to-existing.spec.d.ts +0 -7
- package/dist/src/scaffold/__tests__/point-to-existing.spec.js +0 -94
- package/dist/src/self-qa/__tests__/agentic-context.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/agentic-context.test.js +0 -98
- package/dist/src/self-qa/__tests__/agentic-loop.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/agentic-loop.test.js +0 -62
- package/dist/src/self-qa/__tests__/delta-encoder.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/delta-encoder.test.js +0 -97
- package/dist/src/self-qa/__tests__/judge.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/judge.test.js +0 -131
- package/dist/src/self-qa/__tests__/scenario-planner.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/scenario-planner.test.js +0 -79
- package/dist/src/self-qa/__tests__/spec-emitter.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/spec-emitter.test.js +0 -62
- package/dist/src/storage/__tests__/hierarchical-session.test.d.ts +0 -1
- package/dist/src/storage/__tests__/hierarchical-session.test.js +0 -161
- package/dist/src/storage/__tests__/migrations.test.d.ts +0 -12
- package/dist/src/storage/__tests__/migrations.test.js +0 -357
- package/dist/src/storage/__tests__/sweep-stale-pending.test.d.ts +0 -10
- package/dist/src/storage/__tests__/sweep-stale-pending.test.js +0 -97
- package/dist/src/storage/__tests__/ui-interaction-log.test.d.ts +0 -7
- package/dist/src/storage/__tests__/ui-interaction-log.test.js +0 -127
- package/dist/src/storage/atomic-io.test.d.ts +0 -1
- package/dist/src/storage/atomic-io.test.js +0 -74
- package/dist/src/storage/config.test.d.ts +0 -1
- package/dist/src/storage/config.test.js +0 -29
- package/dist/src/storage/session-experience-store.test.d.ts +0 -5
- package/dist/src/storage/session-experience-store.test.js +0 -86
- package/dist/src/storage/tool-results.test.d.ts +0 -1
- package/dist/src/storage/tool-results.test.js +0 -48
- package/dist/src/storage/transcript-response-entry.test.d.ts +0 -1
- package/dist/src/storage/transcript-response-entry.test.js +0 -111
- package/dist/src/storage/transcript.test.d.ts +0 -1
- package/dist/src/storage/transcript.test.js +0 -22
- package/dist/src/storage/usage-cap.test.d.ts +0 -1
- package/dist/src/storage/usage-cap.test.js +0 -51
- package/dist/src/tools/__tests__/native-tools.test.d.ts +0 -1
- package/dist/src/tools/__tests__/native-tools.test.js +0 -59
- package/dist/src/tools/__tests__/vision-gate.test.d.ts +0 -1
- package/dist/src/tools/__tests__/vision-gate.test.js +0 -56
- package/dist/src/tools/bash-output-cache.test.d.ts +0 -1
- package/dist/src/tools/bash-output-cache.test.js +0 -89
- package/dist/src/tools/bash-output-integration.test.d.ts +0 -10
- package/dist/src/tools/bash-output-integration.test.js +0 -30
- package/dist/src/tools/bash.test.d.ts +0 -1
- package/dist/src/tools/bash.test.js +0 -90
- package/dist/src/tools/computer.test.d.ts +0 -1
- package/dist/src/tools/computer.test.js +0 -142
- package/dist/src/tools/file-tracker.test.d.ts +0 -1
- package/dist/src/tools/file-tracker.test.js +0 -77
- package/dist/src/tools/file.test.d.ts +0 -1
- package/dist/src/tools/file.test.js +0 -106
- package/dist/src/tools/git-safety.test.d.ts +0 -1
- package/dist/src/tools/git-safety.test.js +0 -155
- package/dist/src/tools/registry-bash-empty-command.test.d.ts +0 -13
- package/dist/src/tools/registry-bash-empty-command.test.js +0 -57
- package/dist/src/tools/registry-bash-footer.test.d.ts +0 -7
- package/dist/src/tools/registry-bash-footer.test.js +0 -82
- package/dist/src/tools/registry-ee-query.test.d.ts +0 -11
- package/dist/src/tools/registry-ee-query.test.js +0 -71
- package/dist/src/tools/registry-git-safety.test.d.ts +0 -7
- package/dist/src/tools/registry-git-safety.test.js +0 -103
- package/dist/src/tools/registry-session-repeat.test.d.ts +0 -12
- package/dist/src/tools/registry-session-repeat.test.js +0 -87
- package/dist/src/tools/registry.test.d.ts +0 -1
- package/dist/src/tools/registry.test.js +0 -34
- package/dist/src/tools/schedule.test.d.ts +0 -1
- package/dist/src/tools/schedule.test.js +0 -118
- package/dist/src/tools/todo-write-snapshot.test.d.ts +0 -1
- package/dist/src/tools/todo-write-snapshot.test.js +0 -43
- package/dist/src/ui/__tests__/markdown-render.test.d.ts +0 -1
- package/dist/src/ui/__tests__/markdown-render.test.js +0 -65
- package/dist/src/ui/__tests__/picker-providers.test.d.ts +0 -1
- package/dist/src/ui/__tests__/picker-providers.test.js +0 -31
- package/dist/src/ui/cards/__tests__/product-status-card.test.d.ts +0 -1
- package/dist/src/ui/cards/__tests__/product-status-card.test.js +0 -27
- package/dist/src/ui/components/__tests__/council-leader-bubble.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-leader-bubble.test.js +0 -14
- package/dist/src/ui/components/__tests__/council-message-bubble.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-message-bubble.test.js +0 -74
- package/dist/src/ui/components/__tests__/council-phase-timeline.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-phase-timeline.test.js +0 -51
- package/dist/src/ui/components/__tests__/council-placeholder-bubble.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-placeholder-bubble.test.js +0 -14
- package/dist/src/ui/components/__tests__/council-question-card.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-question-card.test.js +0 -121
- package/dist/src/ui/components/__tests__/council-synthesis-banner.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-synthesis-banner.test.js +0 -11
- package/dist/src/ui/components/__tests__/task-list-panel.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/task-list-panel.test.js +0 -31
- package/dist/src/ui/components/__tests__/use-pair-quote-buffer.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/use-pair-quote-buffer.test.js +0 -37
- package/dist/src/ui/slash/__tests__/clear.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/clear.test.js +0 -58
- package/dist/src/ui/slash/__tests__/compact.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/compact.test.js +0 -43
- package/dist/src/ui/slash/__tests__/cost.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/cost.test.js +0 -54
- package/dist/src/ui/slash/__tests__/discuss.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/discuss.test.js +0 -83
- package/dist/src/ui/slash/__tests__/execute.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/execute.test.js +0 -71
- package/dist/src/ui/slash/__tests__/expand.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/expand.test.js +0 -67
- package/dist/src/ui/slash/__tests__/ideal.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/ideal.test.js +0 -158
- package/dist/src/ui/slash/__tests__/menu-parity.test.d.ts +0 -17
- package/dist/src/ui/slash/__tests__/menu-parity.test.js +0 -43
- package/dist/src/ui/slash/__tests__/optimize.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/optimize.test.js +0 -130
- package/dist/src/ui/slash/__tests__/pin.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/pin.test.js +0 -38
- package/dist/src/ui/slash/__tests__/plan.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/plan.test.js +0 -82
- package/dist/src/ui/slash/__tests__/ponytail.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/ponytail.test.js +0 -37
- package/dist/src/ui/slash/__tests__/status-render.test.d.ts +0 -7
- package/dist/src/ui/slash/__tests__/status-render.test.js +0 -77
- package/dist/src/ui/slash/route.test.d.ts +0 -1
- package/dist/src/ui/slash/route.test.js +0 -70
- package/dist/src/ui/status-bar/index.test.d.ts +0 -1
- package/dist/src/ui/status-bar/index.test.js +0 -139
- package/dist/src/ui/status-bar/store.test.d.ts +0 -1
- package/dist/src/ui/status-bar/store.test.js +0 -116
- package/dist/src/ui/status-bar/tier-badge.test.d.ts +0 -1
- package/dist/src/ui/status-bar/tier-badge.test.js +0 -34
- package/dist/src/ui/status-bar/usd-meter.test.d.ts +0 -1
- package/dist/src/ui/status-bar/usd-meter.test.js +0 -32
- package/dist/src/ui/utils/__tests__/format.test.d.ts +0 -1
- package/dist/src/ui/utils/__tests__/format.test.js +0 -50
- package/dist/src/ui/utils/__tests__/tools.test.d.ts +0 -1
- package/dist/src/ui/utils/__tests__/tools.test.js +0 -48
- package/dist/src/ui/utils/relaunch.test.d.ts +0 -1
- package/dist/src/ui/utils/relaunch.test.js +0 -133
- package/dist/src/ui/utils/text.test.d.ts +0 -1
- package/dist/src/ui/utils/text.test.js +0 -47
- package/dist/src/usage/__tests__/product-ledger.test.d.ts +0 -1
- package/dist/src/usage/__tests__/product-ledger.test.js +0 -60
- package/dist/src/usage/downgrade.test.d.ts +0 -1
- package/dist/src/usage/downgrade.test.js +0 -70
- package/dist/src/usage/estimator.test.d.ts +0 -1
- package/dist/src/usage/estimator.test.js +0 -38
- package/dist/src/usage/ledger.test.d.ts +0 -1
- package/dist/src/usage/ledger.test.js +0 -171
- package/dist/src/usage/midstream.test.d.ts +0 -1
- package/dist/src/usage/midstream.test.js +0 -47
- package/dist/src/usage/thresholds.test.d.ts +0 -1
- package/dist/src/usage/thresholds.test.js +0 -77
- package/dist/src/utils/__tests__/auto-council-settings.test.d.ts +0 -1
- package/dist/src/utils/__tests__/auto-council-settings.test.js +0 -41
- package/dist/src/utils/__tests__/compaction-caps.test.d.ts +0 -21
- package/dist/src/utils/__tests__/compaction-caps.test.js +0 -187
- package/dist/src/utils/__tests__/ee-logger.test.d.ts +0 -11
- package/dist/src/utils/__tests__/ee-logger.test.js +0 -165
- package/dist/src/utils/__tests__/file-lock.test.d.ts +0 -1
- package/dist/src/utils/__tests__/file-lock.test.js +0 -66
- package/dist/src/utils/__tests__/footprint-gitignore.test.d.ts +0 -1
- package/dist/src/utils/__tests__/footprint-gitignore.test.js +0 -50
- package/dist/src/utils/__tests__/llm-deadline-abort.test.d.ts +0 -1
- package/dist/src/utils/__tests__/llm-deadline-abort.test.js +0 -33
- package/dist/src/utils/__tests__/llm-deadline.test.d.ts +0 -1
- package/dist/src/utils/__tests__/llm-deadline.test.js +0 -68
- package/dist/src/utils/__tests__/logger.test.d.ts +0 -1
- package/dist/src/utils/__tests__/logger.test.js +0 -115
- package/dist/src/utils/__tests__/rate-limit.test.d.ts +0 -1
- package/dist/src/utils/__tests__/rate-limit.test.js +0 -38
- package/dist/src/utils/__tests__/settings-agent-first.test.d.ts +0 -1
- package/dist/src/utils/__tests__/settings-agent-first.test.js +0 -48
- package/dist/src/utils/__tests__/settings-disabled-models.test.d.ts +0 -7
- package/dist/src/utils/__tests__/settings-disabled-models.test.js +0 -99
- package/dist/src/utils/__tests__/settings-web-research.test.d.ts +0 -1
- package/dist/src/utils/__tests__/settings-web-research.test.js +0 -46
- package/dist/src/utils/__tests__/slugify.test.d.ts +0 -1
- package/dist/src/utils/__tests__/slugify.test.js +0 -37
- package/dist/src/utils/__tests__/visible-retry.test.d.ts +0 -1
- package/dist/src/utils/__tests__/visible-retry.test.js +0 -143
- package/dist/src/utils/install-manager.test.d.ts +0 -1
- package/dist/src/utils/install-manager.test.js +0 -169
- package/dist/src/utils/instructions.test.d.ts +0 -1
- package/dist/src/utils/instructions.test.js +0 -93
- package/dist/src/utils/open-url.test.d.ts +0 -1
- package/dist/src/utils/open-url.test.js +0 -86
- package/dist/src/utils/permission-mode.test.d.ts +0 -1
- package/dist/src/utils/permission-mode.test.js +0 -188
- package/dist/src/utils/redactor.test.d.ts +0 -1
- package/dist/src/utils/redactor.test.js +0 -84
- package/dist/src/utils/settings.test.d.ts +0 -1
- package/dist/src/utils/settings.test.js +0 -212
- package/dist/src/utils/shell.test.d.ts +0 -1
- package/dist/src/utils/shell.test.js +0 -97
- package/dist/src/utils/skills.test.d.ts +0 -1
- package/dist/src/utils/skills.test.js +0 -45
- package/dist/src/utils/subagent-display.test.d.ts +0 -1
- package/dist/src/utils/subagent-display.test.js +0 -21
- package/dist/src/utils/subagents-settings.test.d.ts +0 -1
- package/dist/src/utils/subagents-settings.test.js +0 -64
- package/dist/src/utils/telegram-audio-settings.test.d.ts +0 -1
- package/dist/src/utils/telegram-audio-settings.test.js +0 -39
- package/dist/src/utils/update-checker.test.d.ts +0 -1
- package/dist/src/utils/update-checker.test.js +0 -142
- package/dist/src/verify/__tests__/coverage-parsers.test.d.ts +0 -1
- package/dist/src/verify/__tests__/coverage-parsers.test.js +0 -69
- package/dist/src/verify/__tests__/dotnet-recipe.test.d.ts +0 -10
- package/dist/src/verify/__tests__/dotnet-recipe.test.js +0 -70
- package/dist/src/verify/checkpoint.test.d.ts +0 -1
- package/dist/src/verify/checkpoint.test.js +0 -160
- package/dist/src/verify/entrypoint.test.d.ts +0 -1
- package/dist/src/verify/entrypoint.test.js +0 -233
- package/dist/src/verify/environment.test.d.ts +0 -1
- package/dist/src/verify/environment.test.js +0 -94
- package/dist/src/verify/orchestrator.test.d.ts +0 -1
- package/dist/src/verify/orchestrator.test.js +0 -126
- package/dist/src/verify/runtime-prep.test.d.ts +0 -1
- package/dist/src/verify/runtime-prep.test.js +0 -38
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { rm } from "node:fs/promises";
|
|
2
|
-
import os from "node:os";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
5
|
-
import { __artifactCacheSize, __resetArtifactCacheForTests, __setArtifactCacheDiskPathForTests, __setArtifactCacheMaxForTests, appendArtifactToDisk, findArtifactByQuery, findArtifactOnDisk, flushArtifactDiskWrites, getArtifact, recordArtifact, } from "./artifact-cache.js";
|
|
6
|
-
// Redirect the disk spill to a temp file for EVERY test so recordArtifact never
|
|
7
|
-
// writes the real ~/.muonroi-cli/artifact-cache.jsonl.
|
|
8
|
-
const diskFile = path.join(os.tmpdir(), `muonroi-artifact-cache-test-${process.pid}.jsonl`);
|
|
9
|
-
beforeEach(() => __setArtifactCacheDiskPathForTests(diskFile));
|
|
10
|
-
afterEach(async () => {
|
|
11
|
-
__resetArtifactCacheForTests();
|
|
12
|
-
delete process.env.MUONROI_ARTIFACT_CACHE_DISK;
|
|
13
|
-
await rm(diskFile, { force: true });
|
|
14
|
-
});
|
|
15
|
-
describe("artifact-cache (in-memory tier — durable rehydrate when EE is down)", () => {
|
|
16
|
-
it("records and retrieves an elided output by toolCallId", () => {
|
|
17
|
-
recordArtifact("call_7", "read_file", "FULL CONTENT of src/auth.ts");
|
|
18
|
-
expect(getArtifact("call_7")).toEqual({ toolName: "read_file", content: "FULL CONTENT of src/auth.ts" });
|
|
19
|
-
expect(getArtifact("missing")).toBeNull();
|
|
20
|
-
});
|
|
21
|
-
it("no-ops on empty id or empty content", () => {
|
|
22
|
-
recordArtifact("", "read_file", "x");
|
|
23
|
-
recordArtifact("call_x", "read_file", "");
|
|
24
|
-
expect(__artifactCacheSize()).toBe(0);
|
|
25
|
-
});
|
|
26
|
-
it("findArtifactByQuery extracts the id from the contract query strings", () => {
|
|
27
|
-
recordArtifact("abc123", "grep", "GREP HITS");
|
|
28
|
-
expect(findArtifactByQuery("tool-artifact id=abc123")?.content).toBe("GREP HITS");
|
|
29
|
-
expect(findArtifactByQuery("full tool result id=abc123")?.toolCallId).toBe("abc123");
|
|
30
|
-
expect(findArtifactByQuery("tool-artifact ID = abc123")?.content).toBe("GREP HITS"); // spacing/case
|
|
31
|
-
expect(findArtifactByQuery("tool-artifact id=nope")).toBeNull(); // not cached
|
|
32
|
-
expect(findArtifactByQuery("no id here")).toBeNull(); // no id=
|
|
33
|
-
});
|
|
34
|
-
it("evicts the oldest entries past the LRU cap; re-recording refreshes recency", () => {
|
|
35
|
-
__setArtifactCacheMaxForTests(2);
|
|
36
|
-
recordArtifact("a", "t", "A");
|
|
37
|
-
recordArtifact("b", "t", "B");
|
|
38
|
-
recordArtifact("a", "t", "A2"); // touch 'a' → now 'b' is oldest
|
|
39
|
-
recordArtifact("c", "t", "C"); // evicts 'b'
|
|
40
|
-
expect(getArtifact("a")?.content).toBe("A2");
|
|
41
|
-
expect(getArtifact("c")?.content).toBe("C");
|
|
42
|
-
expect(getArtifact("b")).toBeNull();
|
|
43
|
-
expect(__artifactCacheSize()).toBe(2);
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
describe("artifact-cache (disk spill — survives a process restart)", () => {
|
|
47
|
-
it("rehydrates from disk after the in-memory tier is gone (simulated restart)", async () => {
|
|
48
|
-
recordArtifact("call_disk", "read_file", "PERSISTED CONTENT");
|
|
49
|
-
await flushArtifactDiskWrites();
|
|
50
|
-
// Simulate a restart: in-memory tier cleared, but the disk file persists.
|
|
51
|
-
__resetArtifactCacheForTests();
|
|
52
|
-
__setArtifactCacheDiskPathForTests(diskFile);
|
|
53
|
-
expect(findArtifactByQuery("tool-artifact id=call_disk")).toBeNull(); // memory gone
|
|
54
|
-
const onDisk = await findArtifactOnDisk("tool-artifact id=call_disk");
|
|
55
|
-
expect(onDisk?.content).toBe("PERSISTED CONTENT");
|
|
56
|
-
expect(onDisk?.toolName).toBe("read_file");
|
|
57
|
-
});
|
|
58
|
-
it("newest record for an id wins on disk", async () => {
|
|
59
|
-
await appendArtifactToDisk("dup", "t", "OLD");
|
|
60
|
-
await appendArtifactToDisk("dup", "t", "NEW");
|
|
61
|
-
expect((await findArtifactOnDisk("tool-artifact id=dup"))?.content).toBe("NEW");
|
|
62
|
-
});
|
|
63
|
-
it("respects MUONROI_ARTIFACT_CACHE_DISK=0 (no disk read)", async () => {
|
|
64
|
-
await appendArtifactToDisk("x", "t", "C");
|
|
65
|
-
process.env.MUONROI_ARTIFACT_CACHE_DISK = "0";
|
|
66
|
-
expect(await findArtifactOnDisk("tool-artifact id=x")).toBeNull();
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
//# sourceMappingURL=artifact-cache.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/src/ee/auth.test.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { promises as fs } from "node:fs";
|
|
2
|
-
import * as os from "node:os";
|
|
3
|
-
import * as path from "node:path";
|
|
4
|
-
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
5
|
-
import { getEmbeddingModelVersion, loadEEAuthToken, refreshAuthToken } from "./auth.js";
|
|
6
|
-
describe("loadEEAuthToken", () => {
|
|
7
|
-
let tmpHome;
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
tmpHome = await fs.mkdtemp(path.join(os.tmpdir(), "ee-auth-test-"));
|
|
10
|
-
});
|
|
11
|
-
afterEach(async () => {
|
|
12
|
-
await fs.rm(tmpHome, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 }).catch(() => { });
|
|
13
|
-
});
|
|
14
|
-
it("returns token when ~/.experience/config.json exists", async () => {
|
|
15
|
-
const dir = path.join(tmpHome, ".experience");
|
|
16
|
-
await fs.mkdir(dir, { recursive: true });
|
|
17
|
-
await fs.writeFile(path.join(dir, "config.json"), JSON.stringify({
|
|
18
|
-
authToken: "test-token-abc123",
|
|
19
|
-
embeddingModelVersion: "nomic-embed-text-v1.5",
|
|
20
|
-
}));
|
|
21
|
-
const token = await loadEEAuthToken({ home: tmpHome });
|
|
22
|
-
expect(token).toBe("test-token-abc123");
|
|
23
|
-
});
|
|
24
|
-
it("returns null when ~/.experience/config.json is absent (no throw)", async () => {
|
|
25
|
-
const token = await loadEEAuthToken({ home: tmpHome });
|
|
26
|
-
expect(token).toBeNull();
|
|
27
|
-
});
|
|
28
|
-
it("sets embeddingModelVersion from config", async () => {
|
|
29
|
-
const dir = path.join(tmpHome, ".experience");
|
|
30
|
-
await fs.mkdir(dir, { recursive: true });
|
|
31
|
-
await fs.writeFile(path.join(dir, "config.json"), JSON.stringify({
|
|
32
|
-
authToken: "tok",
|
|
33
|
-
embeddingModelVersion: "custom-v2",
|
|
34
|
-
}));
|
|
35
|
-
await loadEEAuthToken({ home: tmpHome });
|
|
36
|
-
expect(getEmbeddingModelVersion()).toBe("custom-v2");
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
describe("refreshAuthToken", () => {
|
|
40
|
-
let tmpHome;
|
|
41
|
-
beforeEach(async () => {
|
|
42
|
-
tmpHome = await fs.mkdtemp(path.join(os.tmpdir(), "ee-auth-ref-"));
|
|
43
|
-
});
|
|
44
|
-
afterEach(async () => {
|
|
45
|
-
await fs.rm(tmpHome, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 }).catch(() => { });
|
|
46
|
-
});
|
|
47
|
-
it("re-reads config.json and updates the cached value", async () => {
|
|
48
|
-
const dir = path.join(tmpHome, ".experience");
|
|
49
|
-
await fs.mkdir(dir, { recursive: true });
|
|
50
|
-
await fs.writeFile(path.join(dir, "config.json"), JSON.stringify({ authToken: "old-token" }));
|
|
51
|
-
const first = await loadEEAuthToken({ home: tmpHome });
|
|
52
|
-
expect(first).toBe("old-token");
|
|
53
|
-
// Write new token
|
|
54
|
-
await fs.writeFile(path.join(dir, "config.json"), JSON.stringify({ authToken: "new-token" }));
|
|
55
|
-
const second = await refreshAuthToken({ home: tmpHome });
|
|
56
|
-
expect(second).toBe("new-token");
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
//# sourceMappingURL=auth.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
-
// ─── Hoisted mocks (must be at module top-level for vi.mock hoisting) ──────────
|
|
3
|
-
const mockCore = vi.hoisted(() => ({
|
|
4
|
-
classifyViaBrain: vi.fn().mockResolvedValue("generate"),
|
|
5
|
-
searchCollection: vi.fn().mockResolvedValue([{ id: "p1", score: 0.9, payload: { text: "test" } }]),
|
|
6
|
-
routeModel: vi.fn().mockResolvedValue({
|
|
7
|
-
tier: "balanced",
|
|
8
|
-
model: "claude-sonnet-4-6",
|
|
9
|
-
confidence: 0.8,
|
|
10
|
-
source: "brain",
|
|
11
|
-
reason: "test",
|
|
12
|
-
taskHash: "abc123",
|
|
13
|
-
}),
|
|
14
|
-
routeFeedback: vi.fn().mockResolvedValue(true),
|
|
15
|
-
getEmbeddingRaw: vi.fn().mockResolvedValue([0.1, 0.2, 0.3]),
|
|
16
|
-
}));
|
|
17
|
-
const mockRequire = vi.hoisted(() => vi.fn().mockReturnValue(mockCore));
|
|
18
|
-
const mockAccess = vi.hoisted(() => vi.fn().mockResolvedValue(undefined));
|
|
19
|
-
vi.mock("node:module", () => ({
|
|
20
|
-
createRequire: vi.fn().mockReturnValue(mockRequire),
|
|
21
|
-
}));
|
|
22
|
-
vi.mock("node:fs", () => ({
|
|
23
|
-
promises: { access: mockAccess },
|
|
24
|
-
}));
|
|
25
|
-
// ─── Import module under test (after mocks) ────────────────────────────────────
|
|
26
|
-
import { classifyViaBrain, getEmbeddingRaw, resetBridge, routeFeedback, routeModel, searchCollection, } from "./bridge.js";
|
|
27
|
-
// ─── Tests ─────────────────────────────────────────────────────────────────────
|
|
28
|
-
describe("bridge — loaded core", () => {
|
|
29
|
-
beforeEach(() => {
|
|
30
|
-
resetBridge();
|
|
31
|
-
mockAccess.mockResolvedValue(undefined);
|
|
32
|
-
mockRequire.mockReturnValue(mockCore);
|
|
33
|
-
vi.clearAllMocks();
|
|
34
|
-
mockAccess.mockResolvedValue(undefined);
|
|
35
|
-
mockRequire.mockReturnValue(mockCore);
|
|
36
|
-
mockCore.classifyViaBrain.mockResolvedValue("generate");
|
|
37
|
-
mockCore.searchCollection.mockResolvedValue([{ id: "p1", score: 0.9, payload: { text: "test" } }]);
|
|
38
|
-
mockCore.routeModel.mockResolvedValue({
|
|
39
|
-
tier: "balanced",
|
|
40
|
-
model: "claude-sonnet-4-6",
|
|
41
|
-
confidence: 0.8,
|
|
42
|
-
source: "brain",
|
|
43
|
-
reason: "test",
|
|
44
|
-
taskHash: "abc123",
|
|
45
|
-
});
|
|
46
|
-
mockCore.routeFeedback.mockResolvedValue(true);
|
|
47
|
-
mockCore.getEmbeddingRaw.mockResolvedValue([0.1, 0.2, 0.3]);
|
|
48
|
-
});
|
|
49
|
-
afterEach(() => {
|
|
50
|
-
resetBridge();
|
|
51
|
-
});
|
|
52
|
-
it("Test 1: classifyViaBrain returns classification string when core loaded", async () => {
|
|
53
|
-
const result = await classifyViaBrain("write a function to sort an array");
|
|
54
|
-
expect(result).toBe("generate");
|
|
55
|
-
expect(mockCore.classifyViaBrain).toHaveBeenCalledWith("write a function to sort an array", 5000, undefined);
|
|
56
|
-
});
|
|
57
|
-
it("Test 2: searchCollection returns EEPoint[] when core loaded", async () => {
|
|
58
|
-
const vector = [0.1, 0.2, 0.3];
|
|
59
|
-
const result = await searchCollection("my-collection", vector, 5);
|
|
60
|
-
expect(result).toEqual([{ id: "p1", score: 0.9, payload: { text: "test" } }]);
|
|
61
|
-
expect(mockCore.searchCollection).toHaveBeenCalledWith("my-collection", vector, 5, undefined);
|
|
62
|
-
});
|
|
63
|
-
it("Test 3: routeModel returns EERouteResult when core loaded", async () => {
|
|
64
|
-
const result = await routeModel("code-generation", { cwd: "/home/user" }, "bun");
|
|
65
|
-
expect(result).toEqual({
|
|
66
|
-
tier: "balanced",
|
|
67
|
-
model: "claude-sonnet-4-6",
|
|
68
|
-
confidence: 0.8,
|
|
69
|
-
source: "brain",
|
|
70
|
-
reason: "test",
|
|
71
|
-
taskHash: "abc123",
|
|
72
|
-
});
|
|
73
|
-
expect(mockCore.routeModel).toHaveBeenCalledWith("code-generation", { cwd: "/home/user" }, "bun");
|
|
74
|
-
});
|
|
75
|
-
it("Test 4: routeFeedback returns true when core loaded", async () => {
|
|
76
|
-
const result = await routeFeedback("abc123", "balanced", "claude-sonnet-4-6", "success", 0, 1500);
|
|
77
|
-
expect(result).toBe(true);
|
|
78
|
-
expect(mockCore.routeFeedback).toHaveBeenCalledWith("abc123", "balanced", "claude-sonnet-4-6", "success", 0, 1500);
|
|
79
|
-
});
|
|
80
|
-
it("Test 5: getEmbeddingRaw returns number[] when core loaded", async () => {
|
|
81
|
-
const result = await getEmbeddingRaw("hello world");
|
|
82
|
-
expect(result).toEqual([0.1, 0.2, 0.3]);
|
|
83
|
-
expect(mockCore.getEmbeddingRaw).toHaveBeenCalledWith("hello world", undefined);
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
describe("bridge — missing core (BRIDGE-02)", () => {
|
|
87
|
-
beforeEach(() => {
|
|
88
|
-
resetBridge();
|
|
89
|
-
vi.clearAllMocks();
|
|
90
|
-
// Simulate file not found
|
|
91
|
-
mockAccess.mockRejectedValue(new Error("ENOENT: no such file or directory"));
|
|
92
|
-
});
|
|
93
|
-
afterEach(() => {
|
|
94
|
-
resetBridge();
|
|
95
|
-
});
|
|
96
|
-
it("Test 6: classifyViaBrain returns null when core file missing", async () => {
|
|
97
|
-
const result = await classifyViaBrain("some prompt");
|
|
98
|
-
expect(result).toBeNull();
|
|
99
|
-
});
|
|
100
|
-
it("Test 7: searchCollection returns [] when core file missing", async () => {
|
|
101
|
-
const result = await searchCollection("col", [0.1], 3);
|
|
102
|
-
expect(result).toEqual([]);
|
|
103
|
-
});
|
|
104
|
-
it("Test 8: routeModel returns null when core file missing", async () => {
|
|
105
|
-
const result = await routeModel("task", {}, "bun");
|
|
106
|
-
expect(result).toBeNull();
|
|
107
|
-
});
|
|
108
|
-
it("Test 9: routeFeedback returns false when core file missing", async () => {
|
|
109
|
-
const result = await routeFeedback("hash", "tier", "model", "success", 0, null);
|
|
110
|
-
expect(result).toBe(false);
|
|
111
|
-
});
|
|
112
|
-
it("Test 10: getEmbeddingRaw returns null when core file missing", async () => {
|
|
113
|
-
const result = await getEmbeddingRaw("text");
|
|
114
|
-
expect(result).toBeNull();
|
|
115
|
-
});
|
|
116
|
-
it("Test 11: console.warn called with 'experience-core.js not found' message when file missing", async () => {
|
|
117
|
-
const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => { });
|
|
118
|
-
await classifyViaBrain("prompt");
|
|
119
|
-
expect(warnSpy).toHaveBeenCalledWith(expect.stringContaining("experience-core.js not found"));
|
|
120
|
-
warnSpy.mockRestore();
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
describe("bridge — require throws (BRIDGE-02)", () => {
|
|
124
|
-
beforeEach(() => {
|
|
125
|
-
resetBridge();
|
|
126
|
-
vi.clearAllMocks();
|
|
127
|
-
// File exists but require() throws
|
|
128
|
-
mockAccess.mockResolvedValue(undefined);
|
|
129
|
-
mockRequire.mockImplementation(() => {
|
|
130
|
-
throw new Error("corrupt module: unexpected token");
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
afterEach(() => {
|
|
134
|
-
resetBridge();
|
|
135
|
-
// Restore mockRequire to default behavior for subsequent test groups
|
|
136
|
-
mockRequire.mockReturnValue(mockCore);
|
|
137
|
-
});
|
|
138
|
-
it("Test 12: classifyViaBrain returns null when require throws", async () => {
|
|
139
|
-
const result = await classifyViaBrain("prompt");
|
|
140
|
-
expect(result).toBeNull();
|
|
141
|
-
});
|
|
142
|
-
it("Test 13: searchCollection returns [] when require throws", async () => {
|
|
143
|
-
const result = await searchCollection("col", [0.1], 3);
|
|
144
|
-
expect(result).toEqual([]);
|
|
145
|
-
});
|
|
146
|
-
it("Test 14: routeModel returns null when require throws", async () => {
|
|
147
|
-
const result = await routeModel("task", {}, "bun");
|
|
148
|
-
expect(result).toBeNull();
|
|
149
|
-
});
|
|
150
|
-
it("Test 15: routeFeedback returns false when require throws", async () => {
|
|
151
|
-
const result = await routeFeedback("hash", "tier", "model", "fail", 1, null);
|
|
152
|
-
expect(result).toBe(false);
|
|
153
|
-
});
|
|
154
|
-
it("Test 16: getEmbeddingRaw returns null when require throws", async () => {
|
|
155
|
-
const result = await getEmbeddingRaw("text");
|
|
156
|
-
expect(result).toBeNull();
|
|
157
|
-
});
|
|
158
|
-
it("Test 17: console.warn called with 'failed to load' message when require throws", async () => {
|
|
159
|
-
const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => { });
|
|
160
|
-
await classifyViaBrain("prompt");
|
|
161
|
-
expect(warnSpy).toHaveBeenCalledWith(expect.stringContaining("failed to load"));
|
|
162
|
-
warnSpy.mockRestore();
|
|
163
|
-
});
|
|
164
|
-
});
|
|
165
|
-
describe("bridge — lazy singleton", () => {
|
|
166
|
-
beforeEach(() => {
|
|
167
|
-
resetBridge();
|
|
168
|
-
vi.clearAllMocks();
|
|
169
|
-
mockAccess.mockResolvedValue(undefined);
|
|
170
|
-
mockRequire.mockReturnValue(mockCore);
|
|
171
|
-
mockCore.classifyViaBrain.mockResolvedValue("generate");
|
|
172
|
-
});
|
|
173
|
-
afterEach(() => {
|
|
174
|
-
resetBridge();
|
|
175
|
-
});
|
|
176
|
-
it("Test 18: second call to classifyViaBrain does NOT re-attempt load (lazy singleton)", async () => {
|
|
177
|
-
await classifyViaBrain("first call");
|
|
178
|
-
await classifyViaBrain("second call");
|
|
179
|
-
// mockRequire should only be called once (when loading the core)
|
|
180
|
-
expect(mockRequire).toHaveBeenCalledTimes(1);
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
describe("bridge — resetBridge", () => {
|
|
184
|
-
beforeEach(() => {
|
|
185
|
-
resetBridge();
|
|
186
|
-
vi.clearAllMocks();
|
|
187
|
-
mockAccess.mockResolvedValue(undefined);
|
|
188
|
-
mockRequire.mockReturnValue(mockCore);
|
|
189
|
-
mockCore.classifyViaBrain.mockResolvedValue("generate");
|
|
190
|
-
});
|
|
191
|
-
afterEach(() => {
|
|
192
|
-
resetBridge();
|
|
193
|
-
});
|
|
194
|
-
it("Test 19: resetBridge allows re-attempt on next call", async () => {
|
|
195
|
-
// First call loads the core
|
|
196
|
-
await classifyViaBrain("first");
|
|
197
|
-
expect(mockRequire).toHaveBeenCalledTimes(1);
|
|
198
|
-
// Reset clears state
|
|
199
|
-
resetBridge();
|
|
200
|
-
// Second call after reset should re-attempt load
|
|
201
|
-
await classifyViaBrain("second");
|
|
202
|
-
expect(mockRequire).toHaveBeenCalledTimes(2);
|
|
203
|
-
});
|
|
204
|
-
});
|
|
205
|
-
describe("bridge — config isolation (BRIDGE-03)", () => {
|
|
206
|
-
it("Test 20: classifyViaBrain signature does NOT accept config args (type-level check)", async () => {
|
|
207
|
-
// This test verifies via TypeScript @ts-expect-error that config args are rejected
|
|
208
|
-
// If type check passes (no error here), the function signature correctly excludes config params
|
|
209
|
-
// Valid call — should compile
|
|
210
|
-
const _validCall = () => classifyViaBrain("prompt");
|
|
211
|
-
const _validCallWithTimeout = () => classifyViaBrain("prompt", 3000);
|
|
212
|
-
// These would cause @ts-expect-error if uncommented:
|
|
213
|
-
const _invalidCall = () => classifyViaBrain("prompt", 3000, "http://localhost:6333");
|
|
214
|
-
expect(_validCall).toBeDefined();
|
|
215
|
-
expect(_validCallWithTimeout).toBeDefined();
|
|
216
|
-
});
|
|
217
|
-
it("Test 21: searchCollection signature does NOT accept qdrantUrl/ollamaUrl/brainModel", async () => {
|
|
218
|
-
// Valid signature
|
|
219
|
-
const _validCall = () => searchCollection("col", [0.1], 5);
|
|
220
|
-
const _validCallWithSignal = () => searchCollection("col", [0.1], 5, new AbortController().signal);
|
|
221
|
-
expect(_validCall).toBeDefined();
|
|
222
|
-
expect(_validCallWithSignal).toBeDefined();
|
|
223
|
-
});
|
|
224
|
-
it("Test 22: routeModel signature does NOT accept config params", async () => {
|
|
225
|
-
// Valid signature: (task, context, runtime)
|
|
226
|
-
const _validCall = () => routeModel("task", { key: "value" }, "bun");
|
|
227
|
-
expect(_validCall).toBeDefined();
|
|
228
|
-
});
|
|
229
|
-
});
|
|
230
|
-
//# sourceMappingURL=bridge.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
-
import { createEEClient, resetEEClientState } from "./client.js";
|
|
3
|
-
const mockReq = {
|
|
4
|
-
toolName: "bash",
|
|
5
|
-
toolInput: { command: "ls" },
|
|
6
|
-
cwd: "/tmp",
|
|
7
|
-
tenantId: "local",
|
|
8
|
-
scope: { kind: "global" },
|
|
9
|
-
};
|
|
10
|
-
const mockPayload = {
|
|
11
|
-
toolName: "bash",
|
|
12
|
-
toolInput: { command: "ls" },
|
|
13
|
-
outcome: { success: true, exitCode: 0, durationMs: 10 },
|
|
14
|
-
cwd: "/tmp",
|
|
15
|
-
tenantId: "local",
|
|
16
|
-
scope: { kind: "global" },
|
|
17
|
-
};
|
|
18
|
-
describe("EEClient - health", () => {
|
|
19
|
-
it("Test 1: health 200 returns { ok: true, status: 200 }", async () => {
|
|
20
|
-
const mockFetch = vi.fn().mockResolvedValue({ ok: true, status: 200 });
|
|
21
|
-
const ee = createEEClient({ fetchImpl: mockFetch });
|
|
22
|
-
const result = await ee.health();
|
|
23
|
-
expect(result).toEqual({ ok: true, status: 200 });
|
|
24
|
-
});
|
|
25
|
-
it("Test 2: health 502 returns { ok: false, status: 502 } without throwing", async () => {
|
|
26
|
-
const mockFetch = vi.fn().mockResolvedValue({ ok: false, status: 502 });
|
|
27
|
-
const ee = createEEClient({ fetchImpl: mockFetch });
|
|
28
|
-
const result = await ee.health();
|
|
29
|
-
expect(result).toEqual({ ok: false, status: 502 });
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
describe("EEClient - intercept", () => {
|
|
33
|
-
beforeEach(() => {
|
|
34
|
-
vi.useFakeTimers();
|
|
35
|
-
resetEEClientState(); // clear cache + circuit between tests
|
|
36
|
-
});
|
|
37
|
-
afterEach(() => {
|
|
38
|
-
vi.useRealTimers();
|
|
39
|
-
});
|
|
40
|
-
it("Test 3: intercept allow — returns decision:allow", async () => {
|
|
41
|
-
const mockFetch = vi.fn().mockResolvedValue({
|
|
42
|
-
ok: true,
|
|
43
|
-
status: 200,
|
|
44
|
-
json: async () => ({ decision: "allow" }),
|
|
45
|
-
});
|
|
46
|
-
const ee = createEEClient({ fetchImpl: mockFetch });
|
|
47
|
-
const result = await ee.intercept(mockReq);
|
|
48
|
-
expect(result.decision).toBe("allow");
|
|
49
|
-
});
|
|
50
|
-
it("Test 4: intercept block — returns decision:block with reason", async () => {
|
|
51
|
-
const mockFetch = vi.fn().mockResolvedValue({
|
|
52
|
-
ok: true,
|
|
53
|
-
status: 200,
|
|
54
|
-
json: async () => ({ decision: "block", reason: "dangerous command" }),
|
|
55
|
-
});
|
|
56
|
-
const ee = createEEClient({ fetchImpl: mockFetch });
|
|
57
|
-
const result = await ee.intercept(mockReq);
|
|
58
|
-
expect(result.decision).toBe("block");
|
|
59
|
-
expect(result.reason).toBe("dangerous command");
|
|
60
|
-
});
|
|
61
|
-
it("Test 5: intercept 5xx falls back to { decision: 'allow', reason: 'ee-unreachable' }", async () => {
|
|
62
|
-
const consoleSpy = vi.spyOn(console, "warn").mockImplementation(() => { });
|
|
63
|
-
const mockFetch = vi.fn().mockResolvedValue({ ok: false, status: 503 });
|
|
64
|
-
const ee = createEEClient({ fetchImpl: mockFetch });
|
|
65
|
-
const result = await ee.intercept(mockReq);
|
|
66
|
-
expect(result.decision).toBe("allow");
|
|
67
|
-
expect(result.reason).toBe("ee-unreachable");
|
|
68
|
-
consoleSpy.mockRestore();
|
|
69
|
-
});
|
|
70
|
-
it("Test 6: intercept timeout falls back to { decision: 'allow', reason: 'ee-unreachable' }", async () => {
|
|
71
|
-
// Simulate a fetch that aborts due to timeout signal
|
|
72
|
-
const mockFetch = vi.fn().mockImplementation((_url, opts) => {
|
|
73
|
-
return new Promise((_resolve, reject) => {
|
|
74
|
-
// Listen to the abort signal and reject when it fires
|
|
75
|
-
const signal = opts?.signal;
|
|
76
|
-
if (signal) {
|
|
77
|
-
signal.addEventListener("abort", () => {
|
|
78
|
-
const err = new DOMException("The operation was aborted.", "AbortError");
|
|
79
|
-
reject(err);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
const ee = createEEClient({ fetchImpl: mockFetch, timeoutMs: 50 });
|
|
85
|
-
// Advance timers to trigger AbortSignal.timeout
|
|
86
|
-
const resultPromise = ee.intercept(mockReq);
|
|
87
|
-
await vi.advanceTimersByTimeAsync(200);
|
|
88
|
-
const result = await resultPromise;
|
|
89
|
-
expect(result.decision).toBe("allow");
|
|
90
|
-
expect(result.reason).toBe("ee-unreachable");
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
describe("EEClient - posttool", () => {
|
|
94
|
-
it("Test 7: posttool is awaitable — returns Promise<void> and fetch is called", async () => {
|
|
95
|
-
const mockFetch = vi.fn().mockResolvedValue({ ok: true, status: 200 });
|
|
96
|
-
const ee = createEEClient({ fetchImpl: mockFetch });
|
|
97
|
-
// posttool is now async (awaitable by PostToolUse handler)
|
|
98
|
-
const returnValue = ee.posttool(mockPayload);
|
|
99
|
-
expect(returnValue).toBeInstanceOf(Promise);
|
|
100
|
-
await returnValue;
|
|
101
|
-
expect(mockFetch).toHaveBeenCalledOnce();
|
|
102
|
-
});
|
|
103
|
-
it("Test 8: posttool swallows errors silently", async () => {
|
|
104
|
-
const mockFetch = vi.fn().mockRejectedValue(new Error("network error"));
|
|
105
|
-
const ee = createEEClient({ fetchImpl: mockFetch });
|
|
106
|
-
// Must not throw even when awaited
|
|
107
|
-
await expect(ee.posttool(mockPayload)).resolves.toBeUndefined();
|
|
108
|
-
});
|
|
109
|
-
it("Test 9: posttool does not hang on a wedged server — bounded by an abort signal", async () => {
|
|
110
|
-
// PostToolUse hook (src/hooks/index.ts) AWAITS posttool on the hot path.
|
|
111
|
-
// A reachable-but-wedged EE server (accepts TCP, never responds) must NOT
|
|
112
|
-
// hang the hook — posttool must carry a timeout abort signal like every
|
|
113
|
-
// other client method, honouring the "never block orchestrator" intent.
|
|
114
|
-
vi.useFakeTimers();
|
|
115
|
-
try {
|
|
116
|
-
const mockFetch = vi.fn().mockImplementation((_url, opts) => {
|
|
117
|
-
return new Promise((_resolve, reject) => {
|
|
118
|
-
const signal = opts?.signal;
|
|
119
|
-
// Wedged server: only ever settles if the client aborts it.
|
|
120
|
-
signal?.addEventListener("abort", () => {
|
|
121
|
-
reject(new DOMException("The operation was aborted.", "AbortError"));
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
const ee = createEEClient({ fetchImpl: mockFetch });
|
|
126
|
-
const p = ee.posttool(mockPayload);
|
|
127
|
-
// Structural: the call must be bounded by an AbortSignal (deterministic).
|
|
128
|
-
const opts = mockFetch.mock.calls[0][1];
|
|
129
|
-
expect(opts.signal).toBeInstanceOf(AbortSignal);
|
|
130
|
-
// Behavioral: once the timeout fires, the wedged call is aborted and the
|
|
131
|
-
// fire-and-forget catch resolves posttool to undefined (never throws).
|
|
132
|
-
await vi.advanceTimersByTimeAsync(15_000);
|
|
133
|
-
await expect(p).resolves.toBeUndefined();
|
|
134
|
-
}
|
|
135
|
-
finally {
|
|
136
|
-
vi.useRealTimers();
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
describe("EEClient - auth", () => {
|
|
141
|
-
beforeEach(() => {
|
|
142
|
-
resetEEClientState();
|
|
143
|
-
});
|
|
144
|
-
it("Test 9: auth header included when authToken provided", async () => {
|
|
145
|
-
const mockFetch = vi.fn().mockResolvedValue({
|
|
146
|
-
ok: true,
|
|
147
|
-
status: 200,
|
|
148
|
-
json: async () => ({ decision: "allow" }),
|
|
149
|
-
});
|
|
150
|
-
const ee = createEEClient({ authToken: "my-token", fetchImpl: mockFetch });
|
|
151
|
-
await ee.intercept(mockReq);
|
|
152
|
-
const [, opts] = mockFetch.mock.calls[0];
|
|
153
|
-
const headers = opts.headers;
|
|
154
|
-
expect(headers.Authorization).toBe("Bearer my-token");
|
|
155
|
-
});
|
|
156
|
-
it("Test 10: intercept body does NOT contain BYOK provider keys (sk- prefix)", async () => {
|
|
157
|
-
const mockFetch = vi.fn().mockResolvedValue({
|
|
158
|
-
ok: true,
|
|
159
|
-
status: 200,
|
|
160
|
-
json: async () => ({ decision: "allow" }),
|
|
161
|
-
});
|
|
162
|
-
const ee = createEEClient({ fetchImpl: mockFetch });
|
|
163
|
-
// Even if toolInput somehow contains key-like values, the intercept payload
|
|
164
|
-
// schema is toolName + toolInput + cwd only — no auth tokens from the CLI config
|
|
165
|
-
const reqWithNoKeys = {
|
|
166
|
-
toolName: "bash",
|
|
167
|
-
toolInput: { command: "echo hello" },
|
|
168
|
-
cwd: "/home/user",
|
|
169
|
-
tenantId: "local",
|
|
170
|
-
scope: { kind: "global" },
|
|
171
|
-
};
|
|
172
|
-
await ee.intercept(reqWithNoKeys);
|
|
173
|
-
const [, opts] = mockFetch.mock.calls[0];
|
|
174
|
-
const body = opts.body;
|
|
175
|
-
// The request body must not contain any "sk-" substring
|
|
176
|
-
expect(body).not.toMatch(/sk-/);
|
|
177
|
-
// Must not contain "Bearer sk-" form
|
|
178
|
-
expect(body).not.toMatch(/Bearer sk-/);
|
|
179
|
-
});
|
|
180
|
-
});
|
|
181
|
-
//# sourceMappingURL=client.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|