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,42 +0,0 @@
|
|
|
1
|
-
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
-
import { MAX_TOOL_OUTPUT_CHARS } from "../../tools/registry.js";
|
|
3
|
-
vi.mock("@modelcontextprotocol/sdk/client/stdio.js", () => ({
|
|
4
|
-
StdioClientTransport: vi.fn(function (opts) {
|
|
5
|
-
Object.assign(this, opts);
|
|
6
|
-
}),
|
|
7
|
-
getDefaultEnvironment: () => ({}),
|
|
8
|
-
}));
|
|
9
|
-
// MCP client returns a single tool whose execute emits an over-cap payload.
|
|
10
|
-
const huge = "X".repeat(MAX_TOOL_OUTPUT_CHARS + 50_000);
|
|
11
|
-
vi.mock("@ai-sdk/mcp", () => ({
|
|
12
|
-
createMCPClient: vi.fn(async () => ({
|
|
13
|
-
tools: async () => ({
|
|
14
|
-
big_query: {
|
|
15
|
-
description: "returns a huge blob",
|
|
16
|
-
inputSchema: { type: "object", properties: {} },
|
|
17
|
-
execute: async () => ({ type: "content", value: [{ type: "text", text: huge }] }),
|
|
18
|
-
},
|
|
19
|
-
}),
|
|
20
|
-
close: async () => { },
|
|
21
|
-
})),
|
|
22
|
-
}));
|
|
23
|
-
vi.mock("../validate.js", () => ({
|
|
24
|
-
validateMcpServerConfig: () => ({ ok: true }),
|
|
25
|
-
}));
|
|
26
|
-
import { buildMcpToolSet } from "../runtime.js";
|
|
27
|
-
describe("buildMcpToolSet — MCP output is capped", () => {
|
|
28
|
-
beforeEach(() => vi.clearAllMocks());
|
|
29
|
-
it("truncates an over-cap MCP tool result through the wrapped execute", async () => {
|
|
30
|
-
const bundle = await buildMcpToolSet([
|
|
31
|
-
{ id: "demo", label: "Demo", enabled: true, transport: "stdio", command: "x", args: [] },
|
|
32
|
-
]);
|
|
33
|
-
const tool = bundle.tools.mcp_demo__big_query;
|
|
34
|
-
expect(tool).toBeDefined();
|
|
35
|
-
const out = await tool.execute({}, {});
|
|
36
|
-
const text = out.value[0].text;
|
|
37
|
-
expect(text.length).toBeLessThan(huge.length);
|
|
38
|
-
expect(text).toContain("truncated");
|
|
39
|
-
await bundle.close();
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
//# sourceMappingURL=runtime-output-cap.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Verifies the LLM-facing MCP tool name is sanitized against the OpenAI /
|
|
3
|
-
* DeepSeek function-name regex `^[a-zA-Z0-9_-]+$`. Tool names emitted by some
|
|
4
|
-
* MCP servers (e.g. muonroi-docs `docs.search`, bb.template.describe) contain
|
|
5
|
-
* dots that the providers reject with HTTP 400.
|
|
6
|
-
*
|
|
7
|
-
* We can't easily spin up a real MCP server inside a unit test, so we assert
|
|
8
|
-
* the regex itself matches the same characters runtime.ts rewrites. Smoke /
|
|
9
|
-
* integration coverage of the spawn path lives in smoke.test.ts.
|
|
10
|
-
*/
|
|
11
|
-
import { describe, expect, it } from "vitest";
|
|
12
|
-
const FN_NAME_RE = /^[a-zA-Z0-9_-]+$/;
|
|
13
|
-
function sanitize(name) {
|
|
14
|
-
return name.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
15
|
-
}
|
|
16
|
-
describe("MCP tool name sanitization", () => {
|
|
17
|
-
it.each([
|
|
18
|
-
"docs.search",
|
|
19
|
-
"docs.read",
|
|
20
|
-
"bb.template.describe",
|
|
21
|
-
"bb.package.describe",
|
|
22
|
-
"bb.recipe.list",
|
|
23
|
-
"ns/with/slash",
|
|
24
|
-
"weird name with spaces",
|
|
25
|
-
"v1:colon:tool",
|
|
26
|
-
])("rewrites %s to a function-name-safe string", (raw) => {
|
|
27
|
-
const safe = sanitize(raw);
|
|
28
|
-
expect(safe).toMatch(FN_NAME_RE);
|
|
29
|
-
});
|
|
30
|
-
it("leaves already-safe names unchanged", () => {
|
|
31
|
-
for (const safe of ["echo", "browser_take_screenshot", "search-files", "read_text_file"]) {
|
|
32
|
-
expect(sanitize(safe)).toBe(safe);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
it("produces the expected prefixed form for muonroi-docs docs.search", () => {
|
|
36
|
-
const prefix = `mcp_${"muonroi-docs".replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
37
|
-
expect(`${prefix}__${sanitize("docs.search")}`).toBe("mcp_muonroi-docs__docs_search");
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
//# sourceMappingURL=runtime-sanitize.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { JobManager } from "../self-verify-jobs.js";
|
|
3
|
-
// A controllable stub runner: tier1 resolves/rejects on demand.
|
|
4
|
-
function deferred() {
|
|
5
|
-
let resolve;
|
|
6
|
-
let reject;
|
|
7
|
-
const promise = new Promise((res, rej) => {
|
|
8
|
-
resolve = res;
|
|
9
|
-
reject = rej;
|
|
10
|
-
});
|
|
11
|
-
return { promise, resolve, reject };
|
|
12
|
-
}
|
|
13
|
-
function makeRunner(opts) {
|
|
14
|
-
return {
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
-
tier1: (_o, log) => {
|
|
17
|
-
log("tier1 started");
|
|
18
|
-
return (opts.tier1?.() ?? Promise.resolve({ summary: { passed: 1 } }));
|
|
19
|
-
},
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
-
agentic: (_o, log) => {
|
|
22
|
-
log("agentic started");
|
|
23
|
-
return (opts.agentic?.() ?? Promise.resolve({ verdict: "pass" }));
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
describe("JobManager", () => {
|
|
28
|
-
it("start returns a runId and job is initially running", () => {
|
|
29
|
-
const jm = new JobManager(makeRunner({ tier1: () => deferred().promise }));
|
|
30
|
-
const runId = jm.start({ kind: "tier1" });
|
|
31
|
-
expect(typeof runId).toBe("string");
|
|
32
|
-
expect(jm.status(runId)?.status).toBe("running");
|
|
33
|
-
});
|
|
34
|
-
it("transitions to done and stores the report", async () => {
|
|
35
|
-
const d = deferred();
|
|
36
|
-
const jm = new JobManager(makeRunner({ tier1: () => d.promise }));
|
|
37
|
-
const runId = jm.start({ kind: "tier1" });
|
|
38
|
-
d.resolve({ summary: { passed: 2 } });
|
|
39
|
-
await d.promise;
|
|
40
|
-
await Promise.resolve(); // let the .then microtask run
|
|
41
|
-
const job = jm.status(runId);
|
|
42
|
-
expect(job.status).toBe("done");
|
|
43
|
-
expect(job.report).toEqual({ summary: { passed: 2 } });
|
|
44
|
-
expect(job.finishedAt).toBeGreaterThan(0);
|
|
45
|
-
});
|
|
46
|
-
it("transitions to error on rejection", async () => {
|
|
47
|
-
const d = deferred();
|
|
48
|
-
const jm = new JobManager(makeRunner({ tier1: () => d.promise }));
|
|
49
|
-
const runId = jm.start({ kind: "tier1" });
|
|
50
|
-
d.reject(new Error("boom"));
|
|
51
|
-
await d.promise.catch(() => { });
|
|
52
|
-
await Promise.resolve();
|
|
53
|
-
const job = jm.status(runId);
|
|
54
|
-
expect(job.status).toBe("error");
|
|
55
|
-
expect(job.error).toBe("boom");
|
|
56
|
-
});
|
|
57
|
-
it("cancel marks a running job cancelled and discards a late result", async () => {
|
|
58
|
-
const d = deferred();
|
|
59
|
-
const jm = new JobManager(makeRunner({ tier1: () => d.promise }));
|
|
60
|
-
const runId = jm.start({ kind: "tier1" });
|
|
61
|
-
expect(jm.cancel(runId)).toBe(true);
|
|
62
|
-
expect(jm.status(runId)?.status).toBe("cancelled");
|
|
63
|
-
d.resolve({ summary: { passed: 9 } });
|
|
64
|
-
await d.promise;
|
|
65
|
-
await Promise.resolve();
|
|
66
|
-
expect(jm.status(runId)?.status).toBe("cancelled"); // late resolve ignored
|
|
67
|
-
});
|
|
68
|
-
it("captures log lines from the runner", async () => {
|
|
69
|
-
const jm = new JobManager(makeRunner({}));
|
|
70
|
-
const runId = jm.start({ kind: "tier1" });
|
|
71
|
-
await Promise.resolve();
|
|
72
|
-
expect(jm.status(runId)?.logBuffer).toContain("tier1 started");
|
|
73
|
-
});
|
|
74
|
-
it("evicts oldest jobs beyond the cap of 20", () => {
|
|
75
|
-
const jm = new JobManager(makeRunner({ tier1: () => new Promise(() => { }) }));
|
|
76
|
-
const ids = [];
|
|
77
|
-
for (let i = 0; i < 25; i++)
|
|
78
|
-
ids.push(jm.start({ kind: "tier1" }));
|
|
79
|
-
expect(jm.list().length).toBe(20);
|
|
80
|
-
expect(jm.status(ids[0])).toBeUndefined(); // oldest evicted
|
|
81
|
-
expect(jm.status(ids[24])).toBeDefined();
|
|
82
|
-
});
|
|
83
|
-
it("cancel returns false for a non-running job", async () => {
|
|
84
|
-
const d = deferred();
|
|
85
|
-
const jm = new JobManager(makeRunner({ tier1: () => d.promise }));
|
|
86
|
-
const runId = jm.start({ kind: "tier1" });
|
|
87
|
-
expect(jm.cancel(runId)).toBe(true); // first cancel succeeds
|
|
88
|
-
expect(jm.cancel(runId)).toBe(false); // second cancel: not running
|
|
89
|
-
expect(jm.cancel("nonexistent")).toBe(false);
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
//# sourceMappingURL=self-verify-jobs.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
2
|
-
import { dropRedundantFsMcpTools, filterMcpServersByMessage } from "../smart-filter.js";
|
|
3
|
-
// Minimal shape — the real McpServerConfig has more fields, but the filter only
|
|
4
|
-
// reads `.id`. Using a structural stub keeps the test independent of config.
|
|
5
|
-
const servers = [
|
|
6
|
-
{ id: "filesystem" },
|
|
7
|
-
{ id: "muonroi-tools" },
|
|
8
|
-
{ id: "muonroi-harness" },
|
|
9
|
-
{ id: "muonroi-docs" },
|
|
10
|
-
{ id: "context7" },
|
|
11
|
-
{ id: "fetch" },
|
|
12
|
-
{ id: "tavily" },
|
|
13
|
-
{ id: "chrome-devtools" },
|
|
14
|
-
{ id: "playwright" },
|
|
15
|
-
{ id: "figma" },
|
|
16
|
-
];
|
|
17
|
-
const ids = (s) => s.map((x) => x.id);
|
|
18
|
-
describe("filterMcpServersByMessage", () => {
|
|
19
|
-
it("drops browser AND docs/web servers when the message signals neither", () => {
|
|
20
|
-
// A pure code prompt with no docs/web/browser vocabulary should not pay for
|
|
21
|
-
// context7/fetch (docs/web lookup) or chrome/playwright/figma (browser).
|
|
22
|
-
const out = filterMcpServersByMessage(servers, "fix the auth bug in src/auth/login.ts");
|
|
23
|
-
expect(ids(out)).toEqual(["filesystem", "muonroi-tools", "muonroi-harness"]);
|
|
24
|
-
});
|
|
25
|
-
it("keeps browser servers when a browser signal is present", () => {
|
|
26
|
-
const out = filterMcpServersByMessage(servers, "take a screenshot of the dashboard");
|
|
27
|
-
expect(ids(out)).toContain("chrome-devtools");
|
|
28
|
-
expect(ids(out)).toContain("playwright");
|
|
29
|
-
expect(ids(out)).toContain("figma");
|
|
30
|
-
});
|
|
31
|
-
it("keeps docs/web servers when a docs signal is present", () => {
|
|
32
|
-
const out = filterMcpServersByMessage(servers, "how do I use the zod library API?");
|
|
33
|
-
expect(ids(out)).toContain("context7");
|
|
34
|
-
expect(ids(out)).toContain("fetch");
|
|
35
|
-
// web-search server is also an external-lookup server → kept on a docs signal.
|
|
36
|
-
expect(ids(out)).toContain("tavily");
|
|
37
|
-
});
|
|
38
|
-
it("drops the web-search server on a pure code prompt (no external-info signal)", () => {
|
|
39
|
-
const out = filterMcpServersByMessage(servers, "fix the auth bug in src/auth/login.ts");
|
|
40
|
-
expect(ids(out)).not.toContain("tavily");
|
|
41
|
-
});
|
|
42
|
-
it("keeps the web-search server on web-search intent (low-collision terms)", () => {
|
|
43
|
-
for (const msg of [
|
|
44
|
-
"search the web for the release date",
|
|
45
|
-
"look up the latest news on this",
|
|
46
|
-
"what's the weather today",
|
|
47
|
-
"find this online",
|
|
48
|
-
"check the internet for outages",
|
|
49
|
-
]) {
|
|
50
|
-
const out = filterMcpServersByMessage(servers, msg);
|
|
51
|
-
expect(ids(out), msg).toContain("tavily");
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
it("keeps both browser and docs servers when the message has a URL", () => {
|
|
55
|
-
const out = filterMcpServersByMessage(servers, "summarize https://example.com/article");
|
|
56
|
-
expect(ids(out)).toContain("context7");
|
|
57
|
-
expect(ids(out)).toContain("fetch");
|
|
58
|
-
expect(ids(out)).toContain("chrome-devtools");
|
|
59
|
-
});
|
|
60
|
-
it("NEVER drops non-optional domain servers (filesystem / tools / harness)", () => {
|
|
61
|
-
const out = filterMcpServersByMessage(servers, "Reply with exactly one word: PONG");
|
|
62
|
-
expect(ids(out)).toContain("filesystem");
|
|
63
|
-
expect(ids(out)).toContain("muonroi-tools");
|
|
64
|
-
expect(ids(out)).toContain("muonroi-harness");
|
|
65
|
-
});
|
|
66
|
-
it("keeps muonroi-docs for an ecosystem question that has no generic docs keyword", () => {
|
|
67
|
-
// Live miss (session dbe408937a3d turn 1): "bạn hiểu thế nào về hệ sinh thái
|
|
68
|
-
// muonroi" carries no docs/api keyword and doesn't say "muonroi-docs", so the
|
|
69
|
-
// authoritative ecosystem source was dropped and the agent guessed from files.
|
|
70
|
-
for (const msg of [
|
|
71
|
-
"bạn hiểu thế nào về hệ sinh thái muonroi",
|
|
72
|
-
"what is the muonroi ecosystem?",
|
|
73
|
-
"explain the building-block rule engine",
|
|
74
|
-
]) {
|
|
75
|
-
const out = filterMcpServersByMessage(servers, msg);
|
|
76
|
-
expect(ids(out), msg).toContain("muonroi-docs");
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
it("keeping muonroi-docs for an ecosystem question does NOT over-keep other docs/web servers", () => {
|
|
80
|
-
const out = filterMcpServersByMessage(servers, "bạn hiểu thế nào về hệ sinh thái muonroi");
|
|
81
|
-
expect(ids(out)).toContain("muonroi-docs");
|
|
82
|
-
expect(ids(out)).not.toContain("context7");
|
|
83
|
-
expect(ids(out)).not.toContain("fetch");
|
|
84
|
-
expect(ids(out)).not.toContain("tavily");
|
|
85
|
-
});
|
|
86
|
-
it("returns every server unchanged when disabled (MUONROI_DISABLE_SMART_MCP=1)", () => {
|
|
87
|
-
const out = filterMcpServersByMessage(servers, "Reply PONG", { disabled: true });
|
|
88
|
-
expect(ids(out)).toEqual(ids(servers));
|
|
89
|
-
});
|
|
90
|
-
it("preserves the existing browser-gate vocabulary exactly", () => {
|
|
91
|
-
// Regression guard: each token that the original inline regex recognised
|
|
92
|
-
// must still keep browser servers.
|
|
93
|
-
for (const word of ["browser", "playwright", "chrome", "figma", "canva", "render", "navigate", "click", "scrape"]) {
|
|
94
|
-
const out = filterMcpServersByMessage(servers, `please ${word} something`);
|
|
95
|
-
expect(ids(out)).toContain("chrome-devtools");
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
// Regression: session f6f7881a5fae. The user asked "bạn thử call tool
|
|
99
|
-
// setup_guide ... ( call tool chứ không phải đọc code )". `muonroi-docs` (id
|
|
100
|
-
// matches /docs/) carried no docs-lookup keyword, so the category skip dropped
|
|
101
|
-
// it — the model had no `setup_guide` tool and drove the server by hand over
|
|
102
|
-
// bash JSON-RPC. An explicit tool-invocation intent (or an outright server
|
|
103
|
-
// mention) must keep the owning server.
|
|
104
|
-
const docsServers = [{ id: "filesystem" }, { id: "muonroi-docs" }, { id: "context7" }, { id: "tavily" }];
|
|
105
|
-
it("keeps an optional server when the user explicitly asks to CALL a tool by name", () => {
|
|
106
|
-
const msg = "bạn thử call tool setup_guide xem có được thông tin gì không nhé ( call tool chứ không phải đọc code nhé )";
|
|
107
|
-
expect(ids(filterMcpServersByMessage(docsServers, msg))).toContain("muonroi-docs");
|
|
108
|
-
});
|
|
109
|
-
it("recognises explicit tool-invocation intent (EN + VI)", () => {
|
|
110
|
-
for (const msg of [
|
|
111
|
-
"please call the setup_guide tool and report",
|
|
112
|
-
"use the docs_search tool",
|
|
113
|
-
"invoke the mcp tool",
|
|
114
|
-
"do a tool call to setup_guide",
|
|
115
|
-
"dùng tool docs_search giúp tôi",
|
|
116
|
-
"gọi tool setup_guide",
|
|
117
|
-
"thử mcp tool xem sao",
|
|
118
|
-
]) {
|
|
119
|
-
expect(ids(filterMcpServersByMessage(docsServers, msg)), msg).toContain("muonroi-docs");
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
it("keeps a server named outright in the message even without a category signal", () => {
|
|
123
|
-
// "check the muonroi-docs MCP" — no docs-lookup verb, but the server is named.
|
|
124
|
-
const out = filterMcpServersByMessage(docsServers, "bạn check xem dùng được mcp muonroi-docs không nhé");
|
|
125
|
-
expect(ids(out)).toContain("muonroi-docs");
|
|
126
|
-
});
|
|
127
|
-
it("still drops optional servers on a pure code prompt (token savings preserved)", () => {
|
|
128
|
-
// The fix must NOT defeat the filter: no tool-intent, no server mention, no
|
|
129
|
-
// docs signal → muonroi-docs/context7/tavily still dropped.
|
|
130
|
-
const out = filterMcpServersByMessage(docsServers, "fix the off-by-one in parseRange()");
|
|
131
|
-
expect(ids(out)).toEqual(["filesystem"]);
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
describe("dropRedundantFsMcpTools", () => {
|
|
135
|
-
const fn = () => ({});
|
|
136
|
-
afterEach(() => {
|
|
137
|
-
delete process.env.MUONROI_KEEP_REDUNDANT_FS_MCP;
|
|
138
|
-
});
|
|
139
|
-
it("drops filesystem-MCP read/write/edit tools when the builtin equivalent is present", () => {
|
|
140
|
-
// Live waste (grok session f5dfab0ce0ca): files re-read via both read_file
|
|
141
|
-
// and mcp_filesystem__read_text_file.
|
|
142
|
-
const mcp = {
|
|
143
|
-
mcp_filesystem__read_text_file: fn,
|
|
144
|
-
mcp_filesystem__read_file: fn,
|
|
145
|
-
mcp_filesystem__read_multiple_files: fn,
|
|
146
|
-
mcp_filesystem__write_file: fn,
|
|
147
|
-
mcp_filesystem__edit_file: fn,
|
|
148
|
-
mcp_filesystem__directory_tree: fn, // NOT a builtin dup — keep
|
|
149
|
-
mcp_filesystem__search_files: fn, // keep
|
|
150
|
-
mcp_other__read_text_file: fn, // different server — keep
|
|
151
|
-
};
|
|
152
|
-
const builtins = new Set(["read_file", "write_file", "edit_file", "bash", "grep", "glob"]);
|
|
153
|
-
const { tools, dropped } = dropRedundantFsMcpTools(mcp, builtins);
|
|
154
|
-
expect(dropped.sort()).toEqual([
|
|
155
|
-
"mcp_filesystem__edit_file",
|
|
156
|
-
"mcp_filesystem__read_file",
|
|
157
|
-
"mcp_filesystem__read_multiple_files",
|
|
158
|
-
"mcp_filesystem__read_text_file",
|
|
159
|
-
"mcp_filesystem__write_file",
|
|
160
|
-
].sort());
|
|
161
|
-
expect(Object.keys(tools).sort()).toEqual(["mcp_filesystem__directory_tree", "mcp_filesystem__search_files", "mcp_other__read_text_file"].sort());
|
|
162
|
-
});
|
|
163
|
-
it("keeps the MCP tool when the builtin equivalent is NOT present (no silent capability loss)", () => {
|
|
164
|
-
const mcp = { mcp_filesystem__read_text_file: fn };
|
|
165
|
-
const { tools, dropped } = dropRedundantFsMcpTools(mcp, new Set(["bash"])); // no builtin read_file
|
|
166
|
-
expect(dropped).toEqual([]);
|
|
167
|
-
expect(Object.keys(tools)).toEqual(["mcp_filesystem__read_text_file"]);
|
|
168
|
-
});
|
|
169
|
-
it("respects MUONROI_KEEP_REDUNDANT_FS_MCP=1 override", () => {
|
|
170
|
-
process.env.MUONROI_KEEP_REDUNDANT_FS_MCP = "1";
|
|
171
|
-
const mcp = { mcp_filesystem__read_text_file: fn };
|
|
172
|
-
const { tools, dropped } = dropRedundantFsMcpTools(mcp, new Set(["read_file"]));
|
|
173
|
-
expect(dropped).toEqual([]);
|
|
174
|
-
expect(Object.keys(tools)).toEqual(["mcp_filesystem__read_text_file"]);
|
|
175
|
-
});
|
|
176
|
-
});
|
|
177
|
-
//# sourceMappingURL=smart-filter.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* tools-server.smoke.test.ts
|
|
3
|
-
*
|
|
4
|
-
* Windows note: unlike src/mcp/smoke.test.ts (which skips its stdio handshake on
|
|
5
|
-
* Windows+Bun citing StdioClientTransport closing stdin immediately), this test runs
|
|
6
|
-
* fully on Windows with the current MCP SDK. Verified stable across 3 consecutive
|
|
7
|
-
* native Windows runs (all passed, ~12-22s each). No platform guard needed here.
|
|
8
|
-
* If this test starts hanging on a future SDK upgrade, add:
|
|
9
|
-
* describe.skipIf(process.platform === "win32" || !!process.env.CI)(...)
|
|
10
|
-
* matching the precedent in the older smoke.test.ts.
|
|
11
|
-
*/
|
|
12
|
-
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
13
|
-
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
14
|
-
import { describe, expect, it } from "vitest";
|
|
15
|
-
describe("tools-mcp server smoke", () => {
|
|
16
|
-
it("advertises the selfverify_* tools over stdio", async () => {
|
|
17
|
-
const transport = new StdioClientTransport({
|
|
18
|
-
command: "bun",
|
|
19
|
-
args: ["run", "src/index.ts", "tools-mcp"],
|
|
20
|
-
});
|
|
21
|
-
const client = new Client({ name: "smoke-test", version: "0" }, { capabilities: {} });
|
|
22
|
-
await client.connect(transport);
|
|
23
|
-
try {
|
|
24
|
-
const { tools } = await client.listTools();
|
|
25
|
-
const names = tools.map((t) => t.name);
|
|
26
|
-
expect(names).toContain("selfverify_start");
|
|
27
|
-
expect(names).toContain("selfverify_status");
|
|
28
|
-
expect(names).toContain("selfverify_result");
|
|
29
|
-
expect(names).toContain("selfverify_list");
|
|
30
|
-
expect(names).toContain("selfverify_cancel");
|
|
31
|
-
expect(names).toContain("ee_query");
|
|
32
|
-
expect(names).toContain("ee_feedback");
|
|
33
|
-
expect(names).toContain("ee_health");
|
|
34
|
-
expect(names).toContain("usage_forensics");
|
|
35
|
-
expect(names).toContain("lsp_query");
|
|
36
|
-
}
|
|
37
|
-
finally {
|
|
38
|
-
await client.close();
|
|
39
|
-
}
|
|
40
|
-
}, 60_000);
|
|
41
|
-
});
|
|
42
|
-
//# sourceMappingURL=tools-server.smoke.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { parseEnvLines, parseHeaderLines } from "./parse-headers.js";
|
|
3
|
-
describe("parseHeaderLines", () => {
|
|
4
|
-
it("parses colon-separated headers and trims whitespace", () => {
|
|
5
|
-
expect(parseHeaderLines(`
|
|
6
|
-
Authorization: Bearer token
|
|
7
|
-
X-Trace-Id: abc123
|
|
8
|
-
`)).toEqual({
|
|
9
|
-
Authorization: "Bearer token",
|
|
10
|
-
"X-Trace-Id": "abc123",
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
it("ignores blank and malformed lines while preserving later colons in values", () => {
|
|
14
|
-
expect(parseHeaderLines(`
|
|
15
|
-
invalid
|
|
16
|
-
: missing-name
|
|
17
|
-
Host: example.com:443
|
|
18
|
-
`)).toEqual({
|
|
19
|
-
Host: "example.com:443",
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
describe("parseEnvLines", () => {
|
|
24
|
-
it("parses equals-separated env assignments and trims whitespace", () => {
|
|
25
|
-
expect(parseEnvLines(`
|
|
26
|
-
API_KEY = secret
|
|
27
|
-
MODE= production
|
|
28
|
-
`)).toEqual({
|
|
29
|
-
API_KEY: "secret",
|
|
30
|
-
MODE: "production",
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
it("ignores blank and malformed lines while preserving later equals in values", () => {
|
|
34
|
-
expect(parseEnvLines(`
|
|
35
|
-
missing
|
|
36
|
-
= no-name
|
|
37
|
-
URL=https://example.com?a=b
|
|
38
|
-
`)).toEqual({
|
|
39
|
-
URL: "https://example.com?a=b",
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=parse-headers.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
2
|
-
import { tmpdir } from "node:os";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import { describe, expect, it } from "vitest";
|
|
5
|
-
import { buildMcpToolSet } from "./runtime.js";
|
|
6
|
-
/**
|
|
7
|
-
* MCP smoke tests — unit-level coverage for buildMcpToolSet.
|
|
8
|
-
*
|
|
9
|
-
* Note: Full stdio stub integration was attempted but StdioClientTransport from
|
|
10
|
-
* @modelcontextprotocol/sdk closes stdin immediately on Windows+Bun, preventing
|
|
11
|
-
* real server handshake. Tests cover all code paths reachable without a live
|
|
12
|
-
* transport connection (empty list, disabled servers, validation failures).
|
|
13
|
-
*
|
|
14
|
-
* The stdio handshake test (discovers tools from stdio MCP echo stub) runs on
|
|
15
|
-
* Linux/macOS only — it is skipped on Windows where StdioClientTransport hangs on Bun.
|
|
16
|
-
*/
|
|
17
|
-
describe("MCP smoke test — buildMcpToolSet", () => {
|
|
18
|
-
it("returns empty tools and no errors for empty server list", async () => {
|
|
19
|
-
const bundle = await buildMcpToolSet([]);
|
|
20
|
-
expect(bundle.errors).toHaveLength(0);
|
|
21
|
-
expect(Object.keys(bundle.tools)).toHaveLength(0);
|
|
22
|
-
await bundle.close();
|
|
23
|
-
});
|
|
24
|
-
it("skips disabled servers without errors", async () => {
|
|
25
|
-
const bundle = await buildMcpToolSet([
|
|
26
|
-
{
|
|
27
|
-
id: "disabled-server",
|
|
28
|
-
label: "disabled-server",
|
|
29
|
-
enabled: false,
|
|
30
|
-
transport: "stdio",
|
|
31
|
-
command: "node",
|
|
32
|
-
args: ["--version"],
|
|
33
|
-
},
|
|
34
|
-
]);
|
|
35
|
-
// Disabled server should be skipped — no errors, no tools
|
|
36
|
-
expect(bundle.errors).toHaveLength(0);
|
|
37
|
-
expect(Object.keys(bundle.tools)).toHaveLength(0);
|
|
38
|
-
await bundle.close();
|
|
39
|
-
});
|
|
40
|
-
it("reports validation error for stdio server without command", async () => {
|
|
41
|
-
const bundle = await buildMcpToolSet([
|
|
42
|
-
{
|
|
43
|
-
id: "bad-stdio",
|
|
44
|
-
label: "bad-stdio",
|
|
45
|
-
enabled: true,
|
|
46
|
-
transport: "stdio",
|
|
47
|
-
command: "",
|
|
48
|
-
args: [],
|
|
49
|
-
},
|
|
50
|
-
]);
|
|
51
|
-
// Should have a validation error, not throw
|
|
52
|
-
expect(bundle.errors.length).toBeGreaterThan(0);
|
|
53
|
-
expect(bundle.errors[0]).toContain("bad-stdio");
|
|
54
|
-
await bundle.close();
|
|
55
|
-
});
|
|
56
|
-
it("reports validation error for http server without url", async () => {
|
|
57
|
-
const bundle = await buildMcpToolSet([
|
|
58
|
-
{
|
|
59
|
-
id: "bad-http",
|
|
60
|
-
label: "bad-http",
|
|
61
|
-
enabled: true,
|
|
62
|
-
transport: "sse",
|
|
63
|
-
url: "",
|
|
64
|
-
},
|
|
65
|
-
]);
|
|
66
|
-
expect(bundle.errors.length).toBeGreaterThan(0);
|
|
67
|
-
expect(bundle.errors[0]).toContain("bad-http");
|
|
68
|
-
await bundle.close();
|
|
69
|
-
});
|
|
70
|
-
it("buildMcpToolSet signature contract — accepts McpServerConfig[] and returns McpToolBundle shape", () => {
|
|
71
|
-
// Structural type check: buildMcpToolSet must be a function accepting server configs
|
|
72
|
-
// and returning a promise of { tools, errors, close }.
|
|
73
|
-
// This verifies the public API without spawning a subprocess.
|
|
74
|
-
expect(typeof buildMcpToolSet).toBe("function");
|
|
75
|
-
// The function must return a promise
|
|
76
|
-
const result = buildMcpToolSet([]);
|
|
77
|
-
expect(result).toBeInstanceOf(Promise);
|
|
78
|
-
// Resolve the promise and verify shape
|
|
79
|
-
return result.then((bundle) => {
|
|
80
|
-
expect(bundle).toHaveProperty("tools");
|
|
81
|
-
expect(bundle).toHaveProperty("errors");
|
|
82
|
-
expect(typeof bundle.close).toBe("function");
|
|
83
|
-
return bundle.close();
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
it.skipIf(process.platform === "win32" || !!process.env.CI)("discovers tools from stdio MCP echo stub", async () => {
|
|
87
|
-
// Inline MCP echo server script — handles initialize, notifications/initialized,
|
|
88
|
-
// and tools/list using Content-Length framing per the MCP JSON-RPC spec.
|
|
89
|
-
const echoServerScript = `
|
|
90
|
-
const { stdin, stdout } = require('process');
|
|
91
|
-
let buf = '';
|
|
92
|
-
stdin.setEncoding('utf8');
|
|
93
|
-
stdin.on('data', (chunk) => {
|
|
94
|
-
buf += chunk;
|
|
95
|
-
while (true) {
|
|
96
|
-
const headerEnd = buf.indexOf('\\r\\n\\r\\n');
|
|
97
|
-
if (headerEnd === -1) break;
|
|
98
|
-
const header = buf.slice(0, headerEnd);
|
|
99
|
-
const match = header.match(/Content-Length:\\s*(\\d+)/i);
|
|
100
|
-
if (!match) { buf = buf.slice(headerEnd + 4); continue; }
|
|
101
|
-
const len = parseInt(match[1], 10);
|
|
102
|
-
const bodyStart = headerEnd + 4;
|
|
103
|
-
if (buf.length < bodyStart + len) break;
|
|
104
|
-
const body = buf.slice(bodyStart, bodyStart + len);
|
|
105
|
-
buf = buf.slice(bodyStart + len);
|
|
106
|
-
handleMessage(JSON.parse(body));
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
function send(obj) {
|
|
110
|
-
const s = JSON.stringify(obj);
|
|
111
|
-
stdout.write('Content-Length: ' + Buffer.byteLength(s) + '\\r\\n\\r\\n' + s);
|
|
112
|
-
}
|
|
113
|
-
function handleMessage(msg) {
|
|
114
|
-
if (msg.method === 'initialize') {
|
|
115
|
-
send({ jsonrpc: '2.0', id: msg.id, result: {
|
|
116
|
-
protocolVersion: '2024-11-05',
|
|
117
|
-
capabilities: { tools: { listChanged: false } },
|
|
118
|
-
serverInfo: { name: 'echo-stub', version: '1.0.0' }
|
|
119
|
-
}});
|
|
120
|
-
} else if (msg.method === 'notifications/initialized') {
|
|
121
|
-
// no response needed
|
|
122
|
-
} else if (msg.method === 'tools/list') {
|
|
123
|
-
send({ jsonrpc: '2.0', id: msg.id, result: {
|
|
124
|
-
tools: [{
|
|
125
|
-
name: 'echo',
|
|
126
|
-
description: 'Echoes input',
|
|
127
|
-
inputSchema: { type: 'object', properties: { message: { type: 'string' } }, required: ['message'] }
|
|
128
|
-
}]
|
|
129
|
-
}});
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
`;
|
|
133
|
-
const tmpDir = await mkdtemp(join(tmpdir(), "mcp-echo-stub-"));
|
|
134
|
-
const scriptPath = join(tmpDir, "echo-server.js");
|
|
135
|
-
let bundle;
|
|
136
|
-
try {
|
|
137
|
-
await writeFile(scriptPath, echoServerScript, "utf8");
|
|
138
|
-
bundle = await buildMcpToolSet([
|
|
139
|
-
{
|
|
140
|
-
id: "test_echo",
|
|
141
|
-
label: "test_echo",
|
|
142
|
-
enabled: true,
|
|
143
|
-
transport: "stdio",
|
|
144
|
-
command: "node",
|
|
145
|
-
args: [scriptPath],
|
|
146
|
-
},
|
|
147
|
-
]);
|
|
148
|
-
expect(bundle.errors).toHaveLength(0);
|
|
149
|
-
expect(Object.keys(bundle.tools).length).toBeGreaterThanOrEqual(1);
|
|
150
|
-
expect(Object.keys(bundle.tools)).toContain("mcp_test_echo__echo");
|
|
151
|
-
}
|
|
152
|
-
finally {
|
|
153
|
-
if (bundle)
|
|
154
|
-
await bundle.close();
|
|
155
|
-
await rm(tmpDir, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 });
|
|
156
|
-
}
|
|
157
|
-
}, 15000);
|
|
158
|
-
});
|
|
159
|
-
//# sourceMappingURL=smoke.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|