muonroi-cli 1.8.0 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/agent-harness/mock-model.js +112 -4
- package/dist/src/cli/cost-forensics.js +7 -4
- package/dist/src/flow/compaction/index.d.ts +1 -0
- package/dist/src/flow/compaction/index.js +4 -0
- package/dist/src/generated/version.d.ts +1 -1
- package/dist/src/generated/version.js +1 -1
- package/dist/src/index.js +4 -2
- package/dist/src/lsp/manager.js +11 -3
- package/dist/src/mcp/auto-setup.js +0 -8
- package/dist/src/mcp/self-verify-jobs.d.ts +1 -0
- package/dist/src/mcp/self-verify-runner.js +1 -1
- package/dist/src/mcp/setup-guide-text.d.ts +1 -1
- package/dist/src/mcp/setup-guide-text.js +3 -1
- package/dist/src/orchestrator/auto-commit.js +9 -7
- package/dist/src/orchestrator/message-processor.d.ts +2 -0
- package/dist/src/orchestrator/message-processor.js +7 -0
- package/dist/src/orchestrator/orchestrator.d.ts +3 -0
- package/dist/src/orchestrator/orchestrator.js +371 -28
- package/dist/src/orchestrator/pending-calls.js +2 -1
- package/dist/src/orchestrator/preprocessor.js +3 -2
- package/dist/src/orchestrator/prompts.d.ts +8 -0
- package/dist/src/orchestrator/prompts.js +224 -177
- package/dist/src/orchestrator/sub-agent-cap.d.ts +2 -0
- package/dist/src/orchestrator/sub-agent-cap.js +12 -4
- package/dist/src/orchestrator/subagent-compactor.d.ts +7 -0
- package/dist/src/orchestrator/subagent-compactor.js +65 -14
- package/dist/src/orchestrator/tool-engine.d.ts +2 -0
- package/dist/src/orchestrator/tool-engine.js +80 -21
- package/dist/src/orchestrator/turn-runner-deps.d.ts +2 -0
- package/dist/src/pil/llm-classify.d.ts +11 -0
- package/dist/src/pil/llm-classify.js +193 -0
- package/dist/src/self-qa/agentic-loop.js +30 -21
- package/dist/src/storage/index.d.ts +1 -1
- package/dist/src/storage/index.js +1 -1
- package/dist/src/storage/migrations.js +13 -1
- package/dist/src/storage/transcript.d.ts +2 -0
- package/dist/src/storage/transcript.js +304 -178
- package/dist/src/storage/usage.js +22 -5
- package/dist/src/tools/native-tools.js +10 -1
- package/dist/src/tools/registry.d.ts +1 -0
- package/dist/src/tools/registry.js +30 -2
- package/dist/src/types/index.d.ts +1 -1
- package/dist/src/ui/app.js +0 -0
- package/dist/src/ui/slash/expand.js +14 -1
- package/dist/src/ui/use-app-logic.js +0 -0
- package/dist/src/utils/install-manager.d.ts +2 -0
- package/dist/src/utils/install-manager.js +105 -7
- package/dist/src/utils/logger.d.ts +28 -0
- package/dist/src/utils/logger.js +171 -0
- package/dist/src/utils/settings.d.ts +9 -1
- package/dist/src/utils/settings.js +59 -22
- package/dist/src/utils/update-checker.js +12 -2
- package/package.json +8 -1
- package/dist/src/__test-helpers__/catalog-fixtures.d.ts +0 -22
- package/dist/src/__test-helpers__/catalog-fixtures.js +0 -55
- package/dist/src/__test-stubs__/ee-server.d.ts +0 -27
- package/dist/src/__test-stubs__/ee-server.js +0 -138
- package/dist/src/__test-stubs__/vitest-setup.d.ts +0 -1
- package/dist/src/__test-stubs__/vitest-setup.js +0 -38
- package/dist/src/__tests__/council/bubble-layout.test.d.ts +0 -1
- package/dist/src/__tests__/council/bubble-layout.test.js +0 -39
- package/dist/src/__tests__/council/code-block-truncate.test.d.ts +0 -1
- package/dist/src/__tests__/council/code-block-truncate.test.js +0 -45
- package/dist/src/__tests__/council/role-palette.test.d.ts +0 -1
- package/dist/src/__tests__/council/role-palette.test.js +0 -59
- package/dist/src/__tests__/first-run-wizard.test.d.ts +0 -1
- package/dist/src/__tests__/first-run-wizard.test.js +0 -9
- package/dist/src/agent-harness/__tests__/cli-flags.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/cli-flags.spec.js +0 -33
- package/dist/src/agent-harness/__tests__/driver.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/driver.spec.js +0 -141
- package/dist/src/agent-harness/__tests__/idle.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/idle.spec.js +0 -84
- package/dist/src/agent-harness/__tests__/mock-llm.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/mock-llm.spec.js +0 -91
- package/dist/src/agent-harness/__tests__/mock-model.spec.d.ts +0 -5
- package/dist/src/agent-harness/__tests__/mock-model.spec.js +0 -270
- package/dist/src/agent-harness/__tests__/predicate.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/predicate.spec.js +0 -27
- package/dist/src/agent-harness/__tests__/protocol.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/protocol.spec.js +0 -56
- package/dist/src/agent-harness/__tests__/schema.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/schema.spec.js +0 -76
- package/dist/src/agent-harness/__tests__/selector.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/selector.spec.js +0 -70
- package/dist/src/agent-harness/__tests__/sidechannel.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/sidechannel.spec.js +0 -29
- package/dist/src/agent-harness/__tests__/spec-helpers.spec.d.ts +0 -1
- package/dist/src/agent-harness/__tests__/spec-helpers.spec.js +0 -68
- package/dist/src/chat/__tests__/broadcast-bus.test.d.ts +0 -1
- package/dist/src/chat/__tests__/broadcast-bus.test.js +0 -81
- package/dist/src/chat/__tests__/channel-manager.test.d.ts +0 -1
- package/dist/src/chat/__tests__/channel-manager.test.js +0 -133
- package/dist/src/chat/__tests__/client.test.d.ts +0 -1
- package/dist/src/chat/__tests__/client.test.js +0 -109
- package/dist/src/chat/__tests__/discord-integration.test.d.ts +0 -1
- package/dist/src/chat/__tests__/discord-integration.test.js +0 -153
- package/dist/src/chat/__tests__/intent-prompt.test.d.ts +0 -1
- package/dist/src/chat/__tests__/intent-prompt.test.js +0 -80
- package/dist/src/chat/__tests__/verdict-resolver.test.d.ts +0 -1
- package/dist/src/chat/__tests__/verdict-resolver.test.js +0 -308
- package/dist/src/cli/__tests__/bw-vault.test.d.ts +0 -1
- package/dist/src/cli/__tests__/bw-vault.test.js +0 -87
- package/dist/src/cli/__tests__/keys-bundle.test.d.ts +0 -1
- package/dist/src/cli/__tests__/keys-bundle.test.js +0 -40
- package/dist/src/cli/__tests__/share-cmd.test.d.ts +0 -1
- package/dist/src/cli/__tests__/share-cmd.test.js +0 -175
- package/dist/src/cli/config/__tests__/model-picker.test.d.ts +0 -1
- package/dist/src/cli/config/__tests__/model-picker.test.js +0 -56
- package/dist/src/cli/config/__tests__/provider-fetch.test.d.ts +0 -1
- package/dist/src/cli/config/__tests__/provider-fetch.test.js +0 -38
- package/dist/src/cli/cost-forensics.test.d.ts +0 -1
- package/dist/src/cli/cost-forensics.test.js +0 -223
- package/dist/src/cli/experience-report.test.d.ts +0 -5
- package/dist/src/cli/experience-report.test.js +0 -63
- package/dist/src/cli/keys.test.d.ts +0 -1
- package/dist/src/cli/keys.test.js +0 -86
- package/dist/src/council/__tests__/abort-threading.test.d.ts +0 -1
- package/dist/src/council/__tests__/abort-threading.test.js +0 -193
- package/dist/src/council/__tests__/accounting.test.d.ts +0 -1
- package/dist/src/council/__tests__/accounting.test.js +0 -66
- package/dist/src/council/__tests__/audit-replay.test.d.ts +0 -1
- package/dist/src/council/__tests__/audit-replay.test.js +0 -241
- package/dist/src/council/__tests__/clarification-prompt.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarification-prompt.test.js +0 -71
- package/dist/src/council/__tests__/clarifier-max-rounds.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-max-rounds.test.js +0 -46
- package/dist/src/council/__tests__/clarifier-options.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-options.test.js +0 -54
- package/dist/src/council/__tests__/clarifier-ready-gate.test.d.ts +0 -1
- package/dist/src/council/__tests__/clarifier-ready-gate.test.js +0 -265
- package/dist/src/council/__tests__/cost-aware.test.d.ts +0 -1
- package/dist/src/council/__tests__/cost-aware.test.js +0 -49
- package/dist/src/council/__tests__/council-turn-length-emit.test.d.ts +0 -1
- package/dist/src/council/__tests__/council-turn-length-emit.test.js +0 -130
- package/dist/src/council/__tests__/debate-planner-structured.test.d.ts +0 -1
- package/dist/src/council/__tests__/debate-planner-structured.test.js +0 -209
- package/dist/src/council/__tests__/debate-round-budget.test.d.ts +0 -1
- package/dist/src/council/__tests__/debate-round-budget.test.js +0 -45
- package/dist/src/council/__tests__/decisions-lock.test.d.ts +0 -6
- package/dist/src/council/__tests__/decisions-lock.test.js +0 -352
- package/dist/src/council/__tests__/evaluator-metrics.test.d.ts +0 -1
- package/dist/src/council/__tests__/evaluator-metrics.test.js +0 -463
- package/dist/src/council/__tests__/oauth-reachable.test.d.ts +0 -1
- package/dist/src/council/__tests__/oauth-reachable.test.js +0 -31
- package/dist/src/council/__tests__/parse-outcome-fallback.test.d.ts +0 -1
- package/dist/src/council/__tests__/parse-outcome-fallback.test.js +0 -114
- package/dist/src/council/__tests__/post-debate-recommendation.test.d.ts +0 -1
- package/dist/src/council/__tests__/post-debate-recommendation.test.js +0 -58
- package/dist/src/council/__tests__/research-tools.test.d.ts +0 -1
- package/dist/src/council/__tests__/research-tools.test.js +0 -214
- package/dist/src/council/__tests__/round-tools.test.d.ts +0 -1
- package/dist/src/council/__tests__/round-tools.test.js +0 -306
- package/dist/src/council/__tests__/tool-trace.test.d.ts +0 -1
- package/dist/src/council/__tests__/tool-trace.test.js +0 -131
- package/dist/src/council/__tests__/types-contract.test.d.ts +0 -9
- package/dist/src/council/__tests__/types-contract.test.js +0 -82
- package/dist/src/council/clarifier-question-cap.test.d.ts +0 -12
- package/dist/src/council/clarifier-question-cap.test.js +0 -73
- package/dist/src/daemon/scheduler.test.d.ts +0 -1
- package/dist/src/daemon/scheduler.test.js +0 -103
- package/dist/src/ee/__tests__/bb-design.test.d.ts +0 -14
- package/dist/src/ee/__tests__/bb-design.test.js +0 -180
- package/dist/src/ee/__tests__/ee-onboarding.test.d.ts +0 -1
- package/dist/src/ee/__tests__/ee-onboarding.test.js +0 -32
- package/dist/src/ee/__tests__/export-transcripts.test.d.ts +0 -11
- package/dist/src/ee/__tests__/export-transcripts.test.js +0 -200
- package/dist/src/ee/__tests__/pil-context-bridge.test.d.ts +0 -1
- package/dist/src/ee/__tests__/pil-context-bridge.test.js +0 -54
- package/dist/src/ee/__tests__/pipeline.integration.test.d.ts +0 -14
- package/dist/src/ee/__tests__/pipeline.integration.test.js +0 -151
- package/dist/src/ee/__tests__/recall-format.test.d.ts +0 -10
- package/dist/src/ee/__tests__/recall-format.test.js +0 -57
- package/dist/src/ee/__tests__/recall-ledger.test.d.ts +0 -1
- package/dist/src/ee/__tests__/recall-ledger.test.js +0 -45
- package/dist/src/ee/__tests__/render-sink-wiring.test.d.ts +0 -1
- package/dist/src/ee/__tests__/render-sink-wiring.test.js +0 -74
- package/dist/src/ee/artifact-cache.test.d.ts +0 -1
- package/dist/src/ee/artifact-cache.test.js +0 -69
- package/dist/src/ee/auth.test.d.ts +0 -1
- package/dist/src/ee/auth.test.js +0 -59
- package/dist/src/ee/bridge.test.d.ts +0 -1
- package/dist/src/ee/bridge.test.js +0 -230
- package/dist/src/ee/client.test.d.ts +0 -1
- package/dist/src/ee/client.test.js +0 -181
- package/dist/src/ee/extract-session.test.d.ts +0 -1
- package/dist/src/ee/extract-session.test.js +0 -192
- package/dist/src/ee/intercept.test.d.ts +0 -1
- package/dist/src/ee/intercept.test.js +0 -171
- package/dist/src/ee/judge.test.d.ts +0 -1
- package/dist/src/ee/judge.test.js +0 -190
- package/dist/src/ee/mistake-detector.test.d.ts +0 -1
- package/dist/src/ee/mistake-detector.test.js +0 -221
- package/dist/src/ee/offline-queue.test.d.ts +0 -1
- package/dist/src/ee/offline-queue.test.js +0 -246
- package/dist/src/ee/phase-outcome.test.d.ts +0 -1
- package/dist/src/ee/phase-outcome.test.js +0 -94
- package/dist/src/ee/phase-tracker.test.d.ts +0 -1
- package/dist/src/ee/phase-tracker.test.js +0 -142
- package/dist/src/ee/posttool.test.d.ts +0 -1
- package/dist/src/ee/posttool.test.js +0 -70
- package/dist/src/ee/prompt-stale.test.d.ts +0 -8
- package/dist/src/ee/prompt-stale.test.js +0 -76
- package/dist/src/ee/recall-mirror.test.d.ts +0 -1
- package/dist/src/ee/recall-mirror.test.js +0 -65
- package/dist/src/ee/render.test.d.ts +0 -1
- package/dist/src/ee/render.test.js +0 -63
- package/dist/src/ee/scope.test.d.ts +0 -1
- package/dist/src/ee/scope.test.js +0 -97
- package/dist/src/ee/search.test.d.ts +0 -1
- package/dist/src/ee/search.test.js +0 -23
- package/dist/src/ee/session-trajectory.test.d.ts +0 -1
- package/dist/src/ee/session-trajectory.test.js +0 -120
- package/dist/src/ee/touch.test.d.ts +0 -1
- package/dist/src/ee/touch.test.js +0 -62
- package/dist/src/ee/who-am-i.test.d.ts +0 -1
- package/dist/src/ee/who-am-i.test.js +0 -101
- package/dist/src/flow/__tests__/migration.test.d.ts +0 -1
- package/dist/src/flow/__tests__/migration.test.js +0 -105
- package/dist/src/flow/__tests__/parser.test.d.ts +0 -1
- package/dist/src/flow/__tests__/parser.test.js +0 -68
- package/dist/src/flow/__tests__/run-manager-product.test.d.ts +0 -1
- package/dist/src/flow/__tests__/run-manager-product.test.js +0 -49
- package/dist/src/flow/__tests__/run-manager.test.d.ts +0 -1
- package/dist/src/flow/__tests__/run-manager.test.js +0 -83
- package/dist/src/flow/__tests__/scaffold-checkpoint.test.d.ts +0 -1
- package/dist/src/flow/__tests__/scaffold-checkpoint.test.js +0 -93
- package/dist/src/flow/__tests__/scaffold.test.d.ts +0 -1
- package/dist/src/flow/__tests__/scaffold.test.js +0 -47
- package/dist/src/flow/__tests__/warning-persist.test.d.ts +0 -5
- package/dist/src/flow/__tests__/warning-persist.test.js +0 -96
- package/dist/src/flow/compaction/__tests__/compress.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/compress.test.js +0 -63
- package/dist/src/flow/compaction/__tests__/extract.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/extract.test.js +0 -66
- package/dist/src/flow/compaction/__tests__/preserve.test.d.ts +0 -1
- package/dist/src/flow/compaction/__tests__/preserve.test.js +0 -62
- package/dist/src/gsd/__tests__/gray-areas.test.d.ts +0 -1
- package/dist/src/gsd/__tests__/gray-areas.test.js +0 -29
- package/dist/src/gsd/__tests__/types.test.d.ts +0 -1
- package/dist/src/gsd/__tests__/types.test.js +0 -78
- package/dist/src/headless/__tests__/council-answers.test.d.ts +0 -1
- package/dist/src/headless/__tests__/council-answers.test.js +0 -251
- package/dist/src/headless/output.test.d.ts +0 -1
- package/dist/src/headless/output.test.js +0 -239
- package/dist/src/lsp/builtins.test.d.ts +0 -1
- package/dist/src/lsp/builtins.test.js +0 -112
- package/dist/src/lsp/client-normalize.test.d.ts +0 -12
- package/dist/src/lsp/client-normalize.test.js +0 -34
- package/dist/src/lsp/manager.test.d.ts +0 -1
- package/dist/src/lsp/manager.test.js +0 -155
- package/dist/src/lsp/npm-cache.test.d.ts +0 -1
- package/dist/src/lsp/npm-cache.test.js +0 -53
- package/dist/src/lsp/smoke.test.d.ts +0 -1
- package/dist/src/lsp/smoke.test.js +0 -56
- package/dist/src/maintain/__tests__/codebase-intel.test.d.ts +0 -5
- package/dist/src/maintain/__tests__/codebase-intel.test.js +0 -237
- package/dist/src/maintain/__tests__/gh-create-pr.test.d.ts +0 -11
- package/dist/src/maintain/__tests__/gh-create-pr.test.js +0 -160
- package/dist/src/maintain/__tests__/pr-builder.test.d.ts +0 -10
- package/dist/src/maintain/__tests__/pr-builder.test.js +0 -229
- package/dist/src/maintain/__tests__/repo-map.test.d.ts +0 -5
- package/dist/src/maintain/__tests__/repo-map.test.js +0 -90
- package/dist/src/maintain/__tests__/task-runner.test.d.ts +0 -11
- package/dist/src/maintain/__tests__/task-runner.test.js +0 -281
- package/dist/src/mcp/__tests__/auto-setup.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/auto-setup.test.js +0 -155
- package/dist/src/mcp/__tests__/cap-tool-result.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/cap-tool-result.test.js +0 -58
- package/dist/src/mcp/__tests__/client-pool.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/client-pool.spec.js +0 -169
- package/dist/src/mcp/__tests__/ee-tools.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/ee-tools.test.js +0 -226
- package/dist/src/mcp/__tests__/forensics-tools.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/forensics-tools.test.js +0 -54
- package/dist/src/mcp/__tests__/harness-driver-action-tools.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-action-tools.spec.js +0 -103
- package/dist/src/mcp/__tests__/harness-driver-async-tools.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-async-tools.spec.js +0 -112
- package/dist/src/mcp/__tests__/harness-driver-read-tools.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-read-tools.spec.js +0 -124
- package/dist/src/mcp/__tests__/harness-driver-security.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver-security.spec.js +0 -61
- package/dist/src/mcp/__tests__/harness-driver.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/harness-driver.spec.js +0 -20
- package/dist/src/mcp/__tests__/lazy-schema.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/lazy-schema.spec.js +0 -152
- package/dist/src/mcp/__tests__/lsp-tools.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/lsp-tools.test.js +0 -56
- package/dist/src/mcp/__tests__/mcp-keychain.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/mcp-keychain.test.js +0 -40
- package/dist/src/mcp/__tests__/parallel-build.spec.d.ts +0 -1
- package/dist/src/mcp/__tests__/parallel-build.spec.js +0 -67
- package/dist/src/mcp/__tests__/research-onboarding.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/research-onboarding.test.js +0 -148
- package/dist/src/mcp/__tests__/runtime-hydration.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/runtime-hydration.test.js +0 -78
- package/dist/src/mcp/__tests__/runtime-output-cap.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/runtime-output-cap.test.js +0 -42
- package/dist/src/mcp/__tests__/runtime-sanitize.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/runtime-sanitize.test.js +0 -40
- package/dist/src/mcp/__tests__/self-verify-jobs.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/self-verify-jobs.test.js +0 -92
- package/dist/src/mcp/__tests__/smart-filter.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/smart-filter.test.js +0 -177
- package/dist/src/mcp/__tests__/tools-server.smoke.test.d.ts +0 -1
- package/dist/src/mcp/__tests__/tools-server.smoke.test.js +0 -42
- package/dist/src/mcp/parse-headers.test.d.ts +0 -1
- package/dist/src/mcp/parse-headers.test.js +0 -43
- package/dist/src/mcp/smoke.test.d.ts +0 -1
- package/dist/src/mcp/smoke.test.js +0 -159
- package/dist/src/models/__tests__/registry.test.d.ts +0 -1
- package/dist/src/models/__tests__/registry.test.js +0 -74
- package/dist/src/models/catalog-gemini.test.d.ts +0 -1
- package/dist/src/models/catalog-gemini.test.js +0 -48
- package/dist/src/models/catalog-url.test.d.ts +0 -1
- package/dist/src/models/catalog-url.test.js +0 -26
- package/dist/src/models/catalog-validation.test.d.ts +0 -1
- package/dist/src/models/catalog-validation.test.js +0 -63
- package/dist/src/ops/__tests__/doctor-council-mcp.test.d.ts +0 -1
- package/dist/src/ops/__tests__/doctor-council-mcp.test.js +0 -139
- package/dist/src/ops/__tests__/doctor-ee-health.test.d.ts +0 -1
- package/dist/src/ops/__tests__/doctor-ee-health.test.js +0 -134
- package/dist/src/ops/bug-report.test.d.ts +0 -1
- package/dist/src/ops/bug-report.test.js +0 -148
- package/dist/src/ops/doctor.test.d.ts +0 -1
- package/dist/src/ops/doctor.test.js +0 -97
- package/dist/src/orchestrator/__tests__/agent-base-url-switch.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/agent-base-url-switch.test.js +0 -77
- package/dist/src/orchestrator/__tests__/auto-commit.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/auto-commit.test.js +0 -142
- package/dist/src/orchestrator/__tests__/batch-turn-runner.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/batch-turn-runner.test.js +0 -163
- package/dist/src/orchestrator/__tests__/council-manager.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/council-manager.test.js +0 -148
- package/dist/src/orchestrator/__tests__/cross-turn-dedup.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/cross-turn-dedup.test.js +0 -175
- package/dist/src/orchestrator/__tests__/current-call-id.test.d.ts +0 -16
- package/dist/src/orchestrator/__tests__/current-call-id.test.js +0 -138
- package/dist/src/orchestrator/__tests__/delegations.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/delegations.test.js +0 -96
- package/dist/src/orchestrator/__tests__/error-forensics.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/error-forensics.test.js +0 -93
- package/dist/src/orchestrator/__tests__/flow-resume.test.d.ts +0 -5
- package/dist/src/orchestrator/__tests__/flow-resume.test.js +0 -61
- package/dist/src/orchestrator/__tests__/humanize-api-error.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/humanize-api-error.test.js +0 -68
- package/dist/src/orchestrator/__tests__/mcp-capability-block.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/mcp-capability-block.test.js +0 -39
- package/dist/src/orchestrator/__tests__/message-processor.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/message-processor.test.js +0 -188
- package/dist/src/orchestrator/__tests__/message-write-ahead.test.d.ts +0 -22
- package/dist/src/orchestrator/__tests__/message-write-ahead.test.js +0 -149
- package/dist/src/orchestrator/__tests__/project-stack.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/project-stack.test.js +0 -65
- package/dist/src/orchestrator/__tests__/read-path-budget.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/read-path-budget.test.js +0 -156
- package/dist/src/orchestrator/__tests__/retry-classifier.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/retry-classifier.test.js +0 -112
- package/dist/src/orchestrator/__tests__/retry-stream.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/retry-stream.test.js +0 -151
- package/dist/src/orchestrator/__tests__/route-feedback.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/route-feedback.test.js +0 -47
- package/dist/src/orchestrator/__tests__/stream-runner.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/stream-runner.test.js +0 -202
- package/dist/src/orchestrator/__tests__/sub-agent-model-tier.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/sub-agent-model-tier.test.js +0 -45
- package/dist/src/orchestrator/__tests__/usage-events-shape.test.d.ts +0 -8
- package/dist/src/orchestrator/__tests__/usage-events-shape.test.js +0 -58
- package/dist/src/orchestrator/__tests__/usage-normalizer-c1.test.d.ts +0 -21
- package/dist/src/orchestrator/__tests__/usage-normalizer-c1.test.js +0 -155
- package/dist/src/orchestrator/__tests__/usage-shape-threading.test.d.ts +0 -1
- package/dist/src/orchestrator/__tests__/usage-shape-threading.test.js +0 -98
- package/dist/src/orchestrator/__tests__/write-ahead.test.d.ts +0 -20
- package/dist/src/orchestrator/__tests__/write-ahead.test.js +0 -134
- package/dist/src/orchestrator/abort.test.d.ts +0 -1
- package/dist/src/orchestrator/abort.test.js +0 -34
- package/dist/src/orchestrator/agent.test.d.ts +0 -1
- package/dist/src/orchestrator/agent.test.js +0 -178
- package/dist/src/orchestrator/cleanup.test.d.ts +0 -1
- package/dist/src/orchestrator/cleanup.test.js +0 -67
- package/dist/src/orchestrator/compaction.test.d.ts +0 -1
- package/dist/src/orchestrator/compaction.test.js +0 -187
- package/dist/src/orchestrator/delegations.test.d.ts +0 -1
- package/dist/src/orchestrator/delegations.test.js +0 -107
- package/dist/src/orchestrator/grounding-check.test.d.ts +0 -1
- package/dist/src/orchestrator/grounding-check.test.js +0 -94
- package/dist/src/orchestrator/interrupted-turn.test.d.ts +0 -1
- package/dist/src/orchestrator/interrupted-turn.test.js +0 -34
- package/dist/src/orchestrator/message-seq.test.d.ts +0 -1
- package/dist/src/orchestrator/message-seq.test.js +0 -24
- package/dist/src/orchestrator/pending-calls.test.d.ts +0 -1
- package/dist/src/orchestrator/pending-calls.test.js +0 -188
- package/dist/src/orchestrator/provider-options-shape.spec.d.ts +0 -1
- package/dist/src/orchestrator/provider-options-shape.spec.js +0 -63
- package/dist/src/orchestrator/reasoning.test.d.ts +0 -1
- package/dist/src/orchestrator/reasoning.test.js +0 -101
- package/dist/src/orchestrator/repetition-detector.test.d.ts +0 -1
- package/dist/src/orchestrator/repetition-detector.test.js +0 -103
- package/dist/src/orchestrator/sandbox.test.d.ts +0 -1
- package/dist/src/orchestrator/sandbox.test.js +0 -99
- package/dist/src/orchestrator/scope-ceiling.test.d.ts +0 -13
- package/dist/src/orchestrator/scope-ceiling.test.js +0 -181
- package/dist/src/orchestrator/scope-reminder.test.d.ts +0 -15
- package/dist/src/orchestrator/scope-reminder.test.js +0 -225
- package/dist/src/orchestrator/session-experience.test.d.ts +0 -6
- package/dist/src/orchestrator/session-experience.test.js +0 -72
- package/dist/src/orchestrator/stall-rescue.test.d.ts +0 -1
- package/dist/src/orchestrator/stall-rescue.test.js +0 -117
- package/dist/src/orchestrator/stall-watchdog.test.d.ts +0 -1
- package/dist/src/orchestrator/stall-watchdog.test.js +0 -153
- package/dist/src/orchestrator/steer-inbox.test.d.ts +0 -1
- package/dist/src/orchestrator/steer-inbox.test.js +0 -33
- package/dist/src/orchestrator/sub-agent-cap.test.d.ts +0 -1
- package/dist/src/orchestrator/sub-agent-cap.test.js +0 -208
- package/dist/src/orchestrator/subagent-compactor.spec.d.ts +0 -1
- package/dist/src/orchestrator/subagent-compactor.spec.js +0 -520
- package/dist/src/orchestrator/text-tool-call-detector.test.d.ts +0 -1
- package/dist/src/orchestrator/text-tool-call-detector.test.js +0 -147
- package/dist/src/orchestrator/token-counter.test.d.ts +0 -1
- package/dist/src/orchestrator/token-counter.test.js +0 -57
- package/dist/src/orchestrator/tool-args-hash.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-args-hash.test.js +0 -105
- package/dist/src/orchestrator/tool-args-repair.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-args-repair.test.js +0 -136
- package/dist/src/orchestrator/tool-loop-askcard.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-loop-askcard.test.js +0 -71
- package/dist/src/orchestrator/tool-loop-cap.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-loop-cap.test.js +0 -176
- package/dist/src/orchestrator/tool-repetition-detector.test.d.ts +0 -1
- package/dist/src/orchestrator/tool-repetition-detector.test.js +0 -101
- package/dist/src/pil/__tests__/budget.test.d.ts +0 -1
- package/dist/src/pil/__tests__/budget.test.js +0 -33
- package/dist/src/pil/__tests__/clarity-gate.test.d.ts +0 -1
- package/dist/src/pil/__tests__/clarity-gate.test.js +0 -37
- package/dist/src/pil/__tests__/config.test.d.ts +0 -1
- package/dist/src/pil/__tests__/config.test.js +0 -57
- package/dist/src/pil/__tests__/discovery-cache.test.d.ts +0 -1
- package/dist/src/pil/__tests__/discovery-cache.test.js +0 -38
- package/dist/src/pil/__tests__/discovery-types.test.d.ts +0 -1
- package/dist/src/pil/__tests__/discovery-types.test.js +0 -65
- package/dist/src/pil/__tests__/discovery.test.d.ts +0 -1
- package/dist/src/pil/__tests__/discovery.test.js +0 -178
- package/dist/src/pil/__tests__/dual-run.test.d.ts +0 -1
- package/dist/src/pil/__tests__/dual-run.test.js +0 -51
- package/dist/src/pil/__tests__/layer1-intent-trace.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer1-intent-trace.test.js +0 -138
- package/dist/src/pil/__tests__/layer1-intent.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer1-intent.test.js +0 -329
- package/dist/src/pil/__tests__/layer15-context-scan.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer15-context-scan.test.js +0 -64
- package/dist/src/pil/__tests__/layer16-clarity.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer16-clarity.test.js +0 -72
- package/dist/src/pil/__tests__/layer17-feasibility.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer17-feasibility.test.js +0 -36
- package/dist/src/pil/__tests__/layer18-acceptance.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer18-acceptance.test.js +0 -18
- package/dist/src/pil/__tests__/layer2-personality.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer2-personality.test.js +0 -57
- package/dist/src/pil/__tests__/layer2_5-ponytail.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer2_5-ponytail.test.js +0 -53
- package/dist/src/pil/__tests__/layer3-ee-injection.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer3-ee-injection.test.js +0 -221
- package/dist/src/pil/__tests__/layer3-injected-chunk.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer3-injected-chunk.test.js +0 -134
- package/dist/src/pil/__tests__/layer4-gsd.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer4-gsd.test.js +0 -191
- package/dist/src/pil/__tests__/layer5-context.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer5-context.test.js +0 -175
- package/dist/src/pil/__tests__/layer6-output.test.d.ts +0 -1
- package/dist/src/pil/__tests__/layer6-output.test.js +0 -465
- package/dist/src/pil/__tests__/llm-classify.test.d.ts +0 -1
- package/dist/src/pil/__tests__/llm-classify.test.js +0 -197
- package/dist/src/pil/__tests__/native-capabilities-workbook.test.d.ts +0 -1
- package/dist/src/pil/__tests__/native-capabilities-workbook.test.js +0 -40
- package/dist/src/pil/__tests__/ollama-classify.test.d.ts +0 -1
- package/dist/src/pil/__tests__/ollama-classify.test.js +0 -68
- package/dist/src/pil/__tests__/orchestrator-integration.test.d.ts +0 -10
- package/dist/src/pil/__tests__/orchestrator-integration.test.js +0 -100
- package/dist/src/pil/__tests__/pipeline.test.d.ts +0 -1
- package/dist/src/pil/__tests__/pipeline.test.js +0 -188
- package/dist/src/pil/__tests__/renderer-coverage.test.d.ts +0 -7
- package/dist/src/pil/__tests__/renderer-coverage.test.js +0 -42
- package/dist/src/pil/__tests__/response-tools.test.d.ts +0 -1
- package/dist/src/pil/__tests__/response-tools.test.js +0 -242
- package/dist/src/pil/__tests__/schema.test.d.ts +0 -1
- package/dist/src/pil/__tests__/schema.test.js +0 -202
- package/dist/src/pil/__tests__/scoreComplexity.test.d.ts +0 -1
- package/dist/src/pil/__tests__/scoreComplexity.test.js +0 -119
- package/dist/src/pil/__tests__/scoreSufficiency.test.d.ts +0 -8
- package/dist/src/pil/__tests__/scoreSufficiency.test.js +0 -89
- package/dist/src/pil/__tests__/store.test.d.ts +0 -1
- package/dist/src/pil/__tests__/store.test.js +0 -44
- package/dist/src/pil/__tests__/surface-compaction-artifacts.test.d.ts +0 -1
- package/dist/src/pil/__tests__/surface-compaction-artifacts.test.js +0 -112
- package/dist/src/pil/__tests__/task-tier-map.test.d.ts +0 -1
- package/dist/src/pil/__tests__/task-tier-map.test.js +0 -33
- package/dist/src/pil/agent-operating-contract.test.d.ts +0 -1
- package/dist/src/pil/agent-operating-contract.test.js +0 -80
- package/dist/src/pil/cheap-model-playbook.test.d.ts +0 -1
- package/dist/src/pil/cheap-model-playbook.test.js +0 -160
- package/dist/src/pil/cheap-model-workbooks.test.d.ts +0 -1
- package/dist/src/pil/cheap-model-workbooks.test.js +0 -129
- package/dist/src/pil/layer1-intent.test.d.ts +0 -1
- package/dist/src/pil/layer1-intent.test.js +0 -764
- package/dist/src/pil/layer1_5-complexity-size.test.d.ts +0 -10
- package/dist/src/pil/layer1_5-complexity-size.test.js +0 -248
- package/dist/src/pil/session-experience-injection.test.d.ts +0 -6
- package/dist/src/pil/session-experience-injection.test.js +0 -79
- package/dist/src/pil/session-state.test.d.ts +0 -1
- package/dist/src/pil/session-state.test.js +0 -73
- package/dist/src/playbook/__tests__/directives.test.d.ts +0 -1
- package/dist/src/playbook/__tests__/directives.test.js +0 -115
- package/dist/src/product-loop/__tests__/artifact-io.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/artifact-io.test.js +0 -83
- package/dist/src/product-loop/__tests__/assumption-ledger.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/assumption-ledger.test.js +0 -261
- package/dist/src/product-loop/__tests__/backlog-builder.test.d.ts +0 -10
- package/dist/src/product-loop/__tests__/backlog-builder.test.js +0 -175
- package/dist/src/product-loop/__tests__/backlog-store.test.d.ts +0 -4
- package/dist/src/product-loop/__tests__/backlog-store.test.js +0 -96
- package/dist/src/product-loop/__tests__/cb2-retry-bonus.test.d.ts +0 -13
- package/dist/src/product-loop/__tests__/cb2-retry-bonus.test.js +0 -158
- package/dist/src/product-loop/__tests__/circuit-breakers-coverage.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/circuit-breakers-coverage.test.js +0 -67
- package/dist/src/product-loop/__tests__/circuit-breakers.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/circuit-breakers.test.js +0 -79
- package/dist/src/product-loop/__tests__/complexity-routing.spec.d.ts +0 -11
- package/dist/src/product-loop/__tests__/complexity-routing.spec.js +0 -240
- package/dist/src/product-loop/__tests__/context-policy.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/context-policy.test.js +0 -266
- package/dist/src/product-loop/__tests__/cost-preview.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/cost-preview.test.js +0 -111
- package/dist/src/product-loop/__tests__/cost-scoper.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/cost-scoper.test.js +0 -50
- package/dist/src/product-loop/__tests__/cross-run-memory.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/cross-run-memory.test.js +0 -168
- package/dist/src/product-loop/__tests__/design-output.spec.d.ts +0 -1
- package/dist/src/product-loop/__tests__/design-output.spec.js +0 -36
- package/dist/src/product-loop/__tests__/discover.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discover.test.js +0 -83
- package/dist/src/product-loop/__tests__/discovery-context-format.test.d.ts +0 -13
- package/dist/src/product-loop/__tests__/discovery-context-format.test.js +0 -100
- package/dist/src/product-loop/__tests__/discovery-council-runner.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-council-runner.test.js +0 -13
- package/dist/src/product-loop/__tests__/discovery-detection.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-detection.test.js +0 -151
- package/dist/src/product-loop/__tests__/discovery-ecosystem.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/discovery-ecosystem.test.js +0 -209
- package/dist/src/product-loop/__tests__/discovery-integration.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-integration.test.js +0 -126
- package/dist/src/product-loop/__tests__/discovery-interview.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-interview.test.js +0 -394
- package/dist/src/product-loop/__tests__/discovery-migrations.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-migrations.test.js +0 -69
- package/dist/src/product-loop/__tests__/discovery-persistence.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-persistence.test.js +0 -146
- package/dist/src/product-loop/__tests__/discovery-prompt-parser.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-prompt-parser.test.js +0 -65
- package/dist/src/product-loop/__tests__/discovery-prompt-specificity.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-prompt-specificity.test.js +0 -55
- package/dist/src/product-loop/__tests__/discovery-recommender-ecosystem.test.d.ts +0 -9
- package/dist/src/product-loop/__tests__/discovery-recommender-ecosystem.test.js +0 -178
- package/dist/src/product-loop/__tests__/discovery-recommender.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-recommender.test.js +0 -316
- package/dist/src/product-loop/__tests__/discovery-schema.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/discovery-schema.test.js +0 -77
- package/dist/src/product-loop/__tests__/done-gate-coverage.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/done-gate-coverage.test.js +0 -135
- package/dist/src/product-loop/__tests__/done-gate.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/done-gate.test.js +0 -122
- package/dist/src/product-loop/__tests__/ee-extract-wiring.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/ee-extract-wiring.test.js +0 -186
- package/dist/src/product-loop/__tests__/extract-to-ee.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/extract-to-ee.test.js +0 -161
- package/dist/src/product-loop/__tests__/feedback-routing.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/feedback-routing.test.js +0 -83
- package/dist/src/product-loop/__tests__/gather-selectable-alts.test.d.ts +0 -15
- package/dist/src/product-loop/__tests__/gather-selectable-alts.test.js +0 -143
- package/dist/src/product-loop/__tests__/hot-path.spec.d.ts +0 -11
- package/dist/src/product-loop/__tests__/hot-path.spec.js +0 -146
- package/dist/src/product-loop/__tests__/integration.test.d.ts +0 -7
- package/dist/src/product-loop/__tests__/integration.test.js +0 -301
- package/dist/src/product-loop/__tests__/loop-driver-audit.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/loop-driver-audit.test.js +0 -269
- package/dist/src/product-loop/__tests__/loop-driver.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/loop-driver.test.js +0 -225
- package/dist/src/product-loop/__tests__/maintenance-task-synthesis.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/maintenance-task-synthesis.test.js +0 -67
- package/dist/src/product-loop/__tests__/phase-a1-a3-sprint-runner.test.d.ts +0 -13
- package/dist/src/product-loop/__tests__/phase-a1-a3-sprint-runner.test.js +0 -268
- package/dist/src/product-loop/__tests__/phase-a2-backlog-build.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/phase-a2-backlog-build.test.js +0 -162
- package/dist/src/product-loop/__tests__/phase-budget.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-budget.test.js +0 -149
- package/dist/src/product-loop/__tests__/phase-orchestrator-integration.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-orchestrator-integration.test.js +0 -138
- package/dist/src/product-loop/__tests__/phase-plan.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-plan.test.js +0 -208
- package/dist/src/product-loop/__tests__/phase-rituals.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-rituals.test.js +0 -174
- package/dist/src/product-loop/__tests__/phase-runner.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-runner.test.js +0 -414
- package/dist/src/product-loop/__tests__/phase-tracker-bridge.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/phase-tracker-bridge.test.js +0 -67
- package/dist/src/product-loop/__tests__/pick-backend-stack.test.d.ts +0 -11
- package/dist/src/product-loop/__tests__/pick-backend-stack.test.js +0 -95
- package/dist/src/product-loop/__tests__/product-identity.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/product-identity.test.js +0 -40
- package/dist/src/product-loop/__tests__/progress-snapshot.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/progress-snapshot.test.js +0 -152
- package/dist/src/product-loop/__tests__/reality-anchor.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/reality-anchor.test.js +0 -49
- package/dist/src/product-loop/__tests__/repo-audit.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/repo-audit.test.js +0 -97
- package/dist/src/product-loop/__tests__/repo-brief.test.d.ts +0 -9
- package/dist/src/product-loop/__tests__/repo-brief.test.js +0 -132
- package/dist/src/product-loop/__tests__/role-memory.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/role-memory.test.js +0 -56
- package/dist/src/product-loop/__tests__/role-registry.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/role-registry.test.js +0 -222
- package/dist/src/product-loop/__tests__/role-routing-ee.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/role-routing-ee.test.js +0 -79
- package/dist/src/product-loop/__tests__/route-decision-emit.test.d.ts +0 -10
- package/dist/src/product-loop/__tests__/route-decision-emit.test.js +0 -222
- package/dist/src/product-loop/__tests__/seed-questions.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/seed-questions.test.js +0 -30
- package/dist/src/product-loop/__tests__/ship-polish.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/ship-polish.test.js +0 -96
- package/dist/src/product-loop/__tests__/sprint-planner.test.d.ts +0 -6
- package/dist/src/product-loop/__tests__/sprint-planner.test.js +0 -140
- package/dist/src/product-loop/__tests__/sprint-runner-backlog.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/sprint-runner-backlog.test.js +0 -221
- package/dist/src/product-loop/__tests__/sprint-runner-emit.test.d.ts +0 -14
- package/dist/src/product-loop/__tests__/sprint-runner-emit.test.js +0 -279
- package/dist/src/product-loop/__tests__/sprint-runner-phase-chunks.test.d.ts +0 -14
- package/dist/src/product-loop/__tests__/sprint-runner-phase-chunks.test.js +0 -193
- package/dist/src/product-loop/__tests__/sprint-runner.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/sprint-runner.test.js +0 -432
- package/dist/src/product-loop/__tests__/sprint-self-verify.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/sprint-self-verify.test.js +0 -73
- package/dist/src/product-loop/__tests__/sprint-store.test.d.ts +0 -7
- package/dist/src/product-loop/__tests__/sprint-store.test.js +0 -84
- package/dist/src/product-loop/__tests__/stakeholder-acl.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/stakeholder-acl.test.js +0 -83
- package/dist/src/product-loop/__tests__/state-md-ee-injections.test.d.ts +0 -8
- package/dist/src/product-loop/__tests__/state-md-ee-injections.test.js +0 -182
- package/dist/src/product-loop/__tests__/sufficiency-routing.spec.d.ts +0 -12
- package/dist/src/product-loop/__tests__/sufficiency-routing.spec.js +0 -140
- package/dist/src/product-loop/__tests__/typed-artifacts.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/typed-artifacts.test.js +0 -222
- package/dist/src/product-loop/__tests__/types.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/types.test.js +0 -79
- package/dist/src/product-loop/__tests__/verify-failure-threshold.test.d.ts +0 -9
- package/dist/src/product-loop/__tests__/verify-failure-threshold.test.js +0 -146
- package/dist/src/product-loop/__tests__/verify-failure-tracking.test.d.ts +0 -4
- package/dist/src/product-loop/__tests__/verify-failure-tracking.test.js +0 -122
- package/dist/src/product-loop/__tests__/verify-result.test.d.ts +0 -1
- package/dist/src/product-loop/__tests__/verify-result.test.js +0 -53
- package/dist/src/providers/__tests__/adapter-oauth-wiring.test.d.ts +0 -8
- package/dist/src/providers/__tests__/adapter-oauth-wiring.test.js +0 -125
- package/dist/src/providers/__tests__/capabilities-cosmetic.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-cosmetic.test.js +0 -109
- package/dist/src/providers/__tests__/capabilities-flags.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-flags.test.js +0 -145
- package/dist/src/providers/__tests__/capabilities-provider-options.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-provider-options.test.js +0 -201
- package/dist/src/providers/__tests__/capabilities-sanitize.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities-sanitize.test.js +0 -60
- package/dist/src/providers/__tests__/capabilities.test.d.ts +0 -1
- package/dist/src/providers/__tests__/capabilities.test.js +0 -41
- package/dist/src/providers/__tests__/provider-coverage.test.d.ts +0 -1
- package/dist/src/providers/__tests__/provider-coverage.test.js +0 -45
- package/dist/src/providers/__tests__/reasoning-roundtrip.test.d.ts +0 -1
- package/dist/src/providers/__tests__/reasoning-roundtrip.test.js +0 -216
- package/dist/src/providers/__tests__/runtime-integration.test.d.ts +0 -1
- package/dist/src/providers/__tests__/runtime-integration.test.js +0 -93
- package/dist/src/providers/__tests__/runtime.test.d.ts +0 -1
- package/dist/src/providers/__tests__/runtime.test.js +0 -80
- package/dist/src/providers/__tests__/siliconflow-sse-repair.test.d.ts +0 -1
- package/dist/src/providers/__tests__/siliconflow-sse-repair.test.js +0 -267
- package/dist/src/providers/__tests__/strategies-registry.test.d.ts +0 -8
- package/dist/src/providers/__tests__/strategies-registry.test.js +0 -49
- package/dist/src/providers/__tests__/strategies-resolve.test.d.ts +0 -12
- package/dist/src/providers/__tests__/strategies-resolve.test.js +0 -128
- package/dist/src/providers/__tests__/wire-debug.test.d.ts +0 -1
- package/dist/src/providers/__tests__/wire-debug.test.js +0 -39
- package/dist/src/providers/adapter.test.d.ts +0 -1
- package/dist/src/providers/adapter.test.js +0 -19
- package/dist/src/providers/auth/__tests__/browser-flow.test.d.ts +0 -8
- package/dist/src/providers/auth/__tests__/browser-flow.test.js +0 -186
- package/dist/src/providers/auth/__tests__/device-flow.test.d.ts +0 -6
- package/dist/src/providers/auth/__tests__/device-flow.test.js +0 -219
- package/dist/src/providers/auth/__tests__/gemini-oauth.test.d.ts +0 -4
- package/dist/src/providers/auth/__tests__/gemini-oauth.test.js +0 -306
- package/dist/src/providers/auth/__tests__/grok-oauth.test.d.ts +0 -8
- package/dist/src/providers/auth/__tests__/grok-oauth.test.js +0 -236
- package/dist/src/providers/auth/__tests__/openai-oauth.test.d.ts +0 -7
- package/dist/src/providers/auth/__tests__/openai-oauth.test.js +0 -309
- package/dist/src/providers/auth/__tests__/token-store.test.d.ts +0 -7
- package/dist/src/providers/auth/__tests__/token-store.test.js +0 -125
- package/dist/src/providers/errors.test.d.ts +0 -1
- package/dist/src/providers/errors.test.js +0 -66
- package/dist/src/providers/gemini.test.d.ts +0 -1
- package/dist/src/providers/gemini.test.js +0 -37
- package/dist/src/providers/keychain.test.d.ts +0 -1
- package/dist/src/providers/keychain.test.js +0 -84
- package/dist/src/providers/mcp-vision-bridge.test.d.ts +0 -1
- package/dist/src/providers/mcp-vision-bridge.test.js +0 -381
- package/dist/src/providers/ollama.test.d.ts +0 -1
- package/dist/src/providers/ollama.test.js +0 -37
- package/dist/src/providers/openai-compatible.test.d.ts +0 -1
- package/dist/src/providers/openai-compatible.test.js +0 -53
- package/dist/src/providers/openai.test.d.ts +0 -1
- package/dist/src/providers/openai.test.js +0 -53
- package/dist/src/providers/pricing.test.d.ts +0 -1
- package/dist/src/providers/pricing.test.js +0 -81
- package/dist/src/providers/prompt-cache-key.spec.d.ts +0 -5
- package/dist/src/providers/prompt-cache-key.spec.js +0 -24
- package/dist/src/providers/runtime-mock.spec.d.ts +0 -8
- package/dist/src/providers/runtime-mock.spec.js +0 -69
- package/dist/src/providers/vision-proxy.test.d.ts +0 -1
- package/dist/src/providers/vision-proxy.test.js +0 -212
- package/dist/src/reporter/__tests__/acl-check.test.d.ts +0 -6
- package/dist/src/reporter/__tests__/acl-check.test.js +0 -59
- package/dist/src/reporter/__tests__/auto-fire.test.d.ts +0 -10
- package/dist/src/reporter/__tests__/auto-fire.test.js +0 -140
- package/dist/src/reporter/__tests__/budget.test.d.ts +0 -7
- package/dist/src/reporter/__tests__/budget.test.js +0 -60
- package/dist/src/reporter/__tests__/handlers.test.d.ts +0 -7
- package/dist/src/reporter/__tests__/handlers.test.js +0 -163
- package/dist/src/reporter/__tests__/query-router.test.d.ts +0 -6
- package/dist/src/reporter/__tests__/query-router.test.js +0 -90
- package/dist/src/router/__tests__/step-router.test.d.ts +0 -4
- package/dist/src/router/__tests__/step-router.test.js +0 -131
- package/dist/src/router/classifier/index.test.d.ts +0 -1
- package/dist/src/router/classifier/index.test.js +0 -29
- package/dist/src/router/classifier/regex.test.d.ts +0 -1
- package/dist/src/router/classifier/regex.test.js +0 -44
- package/dist/src/router/classifier/tree-sitter.test.d.ts +0 -1
- package/dist/src/router/classifier/tree-sitter.test.js +0 -23
- package/dist/src/router/cold.test.d.ts +0 -1
- package/dist/src/router/cold.test.js +0 -56
- package/dist/src/router/decide.test.d.ts +0 -1
- package/dist/src/router/decide.test.js +0 -198
- package/dist/src/router/health.test.d.ts +0 -1
- package/dist/src/router/health.test.js +0 -52
- package/dist/src/router/provider-sentinel.test.d.ts +0 -1
- package/dist/src/router/provider-sentinel.test.js +0 -20
- package/dist/src/router/role-override.test.d.ts +0 -1
- package/dist/src/router/role-override.test.js +0 -26
- package/dist/src/router/warm.test.d.ts +0 -1
- package/dist/src/router/warm.test.js +0 -202
- package/dist/src/scaffold/__tests__/continuation-prompt.test.d.ts +0 -4
- package/dist/src/scaffold/__tests__/continuation-prompt.test.js +0 -79
- package/dist/src/scaffold/__tests__/continue-as-council.spec.d.ts +0 -10
- package/dist/src/scaffold/__tests__/continue-as-council.spec.js +0 -102
- package/dist/src/scaffold/__tests__/dotnet-assembly-name.test.d.ts +0 -1
- package/dist/src/scaffold/__tests__/dotnet-assembly-name.test.js +0 -27
- package/dist/src/scaffold/__tests__/fe-scaffold-contents.test.d.ts +0 -1
- package/dist/src/scaffold/__tests__/fe-scaffold-contents.test.js +0 -106
- package/dist/src/scaffold/__tests__/init-new.smoke.spec.d.ts +0 -15
- package/dist/src/scaffold/__tests__/init-new.smoke.spec.js +0 -81
- package/dist/src/scaffold/__tests__/init-new.spec.d.ts +0 -5
- package/dist/src/scaffold/__tests__/init-new.spec.js +0 -378
- package/dist/src/scaffold/__tests__/install-bb-templates.spec.d.ts +0 -1
- package/dist/src/scaffold/__tests__/install-bb-templates.spec.js +0 -77
- package/dist/src/scaffold/__tests__/point-to-existing.spec.d.ts +0 -7
- package/dist/src/scaffold/__tests__/point-to-existing.spec.js +0 -94
- package/dist/src/self-qa/__tests__/agentic-context.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/agentic-context.test.js +0 -98
- package/dist/src/self-qa/__tests__/agentic-loop.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/agentic-loop.test.js +0 -62
- package/dist/src/self-qa/__tests__/delta-encoder.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/delta-encoder.test.js +0 -97
- package/dist/src/self-qa/__tests__/judge.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/judge.test.js +0 -131
- package/dist/src/self-qa/__tests__/scenario-planner.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/scenario-planner.test.js +0 -79
- package/dist/src/self-qa/__tests__/spec-emitter.test.d.ts +0 -1
- package/dist/src/self-qa/__tests__/spec-emitter.test.js +0 -62
- package/dist/src/storage/__tests__/migrations.test.d.ts +0 -12
- package/dist/src/storage/__tests__/migrations.test.js +0 -357
- package/dist/src/storage/__tests__/sweep-stale-pending.test.d.ts +0 -10
- package/dist/src/storage/__tests__/sweep-stale-pending.test.js +0 -97
- package/dist/src/storage/__tests__/ui-interaction-log.test.d.ts +0 -7
- package/dist/src/storage/__tests__/ui-interaction-log.test.js +0 -127
- package/dist/src/storage/atomic-io.test.d.ts +0 -1
- package/dist/src/storage/atomic-io.test.js +0 -74
- package/dist/src/storage/config.test.d.ts +0 -1
- package/dist/src/storage/config.test.js +0 -29
- package/dist/src/storage/session-experience-store.test.d.ts +0 -5
- package/dist/src/storage/session-experience-store.test.js +0 -86
- package/dist/src/storage/tool-results.test.d.ts +0 -1
- package/dist/src/storage/tool-results.test.js +0 -48
- package/dist/src/storage/transcript-response-entry.test.d.ts +0 -1
- package/dist/src/storage/transcript-response-entry.test.js +0 -98
- package/dist/src/storage/transcript.test.d.ts +0 -1
- package/dist/src/storage/transcript.test.js +0 -22
- package/dist/src/storage/usage-cap.test.d.ts +0 -1
- package/dist/src/storage/usage-cap.test.js +0 -51
- package/dist/src/tools/__tests__/native-tools.test.d.ts +0 -1
- package/dist/src/tools/__tests__/native-tools.test.js +0 -59
- package/dist/src/tools/__tests__/vision-gate.test.d.ts +0 -1
- package/dist/src/tools/__tests__/vision-gate.test.js +0 -56
- package/dist/src/tools/bash-output-cache.test.d.ts +0 -1
- package/dist/src/tools/bash-output-cache.test.js +0 -89
- package/dist/src/tools/bash-output-integration.test.d.ts +0 -10
- package/dist/src/tools/bash-output-integration.test.js +0 -30
- package/dist/src/tools/bash.test.d.ts +0 -1
- package/dist/src/tools/bash.test.js +0 -90
- package/dist/src/tools/computer.test.d.ts +0 -1
- package/dist/src/tools/computer.test.js +0 -142
- package/dist/src/tools/file-tracker.test.d.ts +0 -1
- package/dist/src/tools/file-tracker.test.js +0 -77
- package/dist/src/tools/file.test.d.ts +0 -1
- package/dist/src/tools/file.test.js +0 -106
- package/dist/src/tools/git-safety.test.d.ts +0 -1
- package/dist/src/tools/git-safety.test.js +0 -155
- package/dist/src/tools/registry-bash-empty-command.test.d.ts +0 -13
- package/dist/src/tools/registry-bash-empty-command.test.js +0 -57
- package/dist/src/tools/registry-bash-footer.test.d.ts +0 -7
- package/dist/src/tools/registry-bash-footer.test.js +0 -82
- package/dist/src/tools/registry-ee-query.test.d.ts +0 -11
- package/dist/src/tools/registry-ee-query.test.js +0 -71
- package/dist/src/tools/registry-git-safety.test.d.ts +0 -7
- package/dist/src/tools/registry-git-safety.test.js +0 -103
- package/dist/src/tools/registry-session-repeat.test.d.ts +0 -12
- package/dist/src/tools/registry-session-repeat.test.js +0 -87
- package/dist/src/tools/registry.test.d.ts +0 -1
- package/dist/src/tools/registry.test.js +0 -34
- package/dist/src/tools/schedule.test.d.ts +0 -1
- package/dist/src/tools/schedule.test.js +0 -118
- package/dist/src/tools/todo-write-snapshot.test.d.ts +0 -1
- package/dist/src/tools/todo-write-snapshot.test.js +0 -43
- package/dist/src/ui/__tests__/markdown-render.test.d.ts +0 -1
- package/dist/src/ui/__tests__/markdown-render.test.js +0 -65
- package/dist/src/ui/__tests__/picker-providers.test.d.ts +0 -1
- package/dist/src/ui/__tests__/picker-providers.test.js +0 -31
- package/dist/src/ui/cards/__tests__/product-status-card.test.d.ts +0 -1
- package/dist/src/ui/cards/__tests__/product-status-card.test.js +0 -27
- package/dist/src/ui/components/__tests__/council-leader-bubble.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-leader-bubble.test.js +0 -14
- package/dist/src/ui/components/__tests__/council-message-bubble.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-message-bubble.test.js +0 -74
- package/dist/src/ui/components/__tests__/council-phase-timeline.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-phase-timeline.test.js +0 -51
- package/dist/src/ui/components/__tests__/council-placeholder-bubble.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-placeholder-bubble.test.js +0 -14
- package/dist/src/ui/components/__tests__/council-question-card.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-question-card.test.js +0 -121
- package/dist/src/ui/components/__tests__/council-synthesis-banner.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/council-synthesis-banner.test.js +0 -11
- package/dist/src/ui/components/__tests__/task-list-panel.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/task-list-panel.test.js +0 -31
- package/dist/src/ui/components/__tests__/use-pair-quote-buffer.test.d.ts +0 -1
- package/dist/src/ui/components/__tests__/use-pair-quote-buffer.test.js +0 -37
- package/dist/src/ui/slash/__tests__/clear.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/clear.test.js +0 -58
- package/dist/src/ui/slash/__tests__/compact.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/compact.test.js +0 -43
- package/dist/src/ui/slash/__tests__/cost.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/cost.test.js +0 -54
- package/dist/src/ui/slash/__tests__/discuss.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/discuss.test.js +0 -83
- package/dist/src/ui/slash/__tests__/execute.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/execute.test.js +0 -71
- package/dist/src/ui/slash/__tests__/expand.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/expand.test.js +0 -67
- package/dist/src/ui/slash/__tests__/ideal.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/ideal.test.js +0 -158
- package/dist/src/ui/slash/__tests__/menu-parity.test.d.ts +0 -17
- package/dist/src/ui/slash/__tests__/menu-parity.test.js +0 -43
- package/dist/src/ui/slash/__tests__/optimize.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/optimize.test.js +0 -130
- package/dist/src/ui/slash/__tests__/pin.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/pin.test.js +0 -38
- package/dist/src/ui/slash/__tests__/plan.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/plan.test.js +0 -82
- package/dist/src/ui/slash/__tests__/ponytail.test.d.ts +0 -1
- package/dist/src/ui/slash/__tests__/ponytail.test.js +0 -37
- package/dist/src/ui/slash/__tests__/status-render.test.d.ts +0 -7
- package/dist/src/ui/slash/__tests__/status-render.test.js +0 -77
- package/dist/src/ui/slash/route.test.d.ts +0 -1
- package/dist/src/ui/slash/route.test.js +0 -70
- package/dist/src/ui/status-bar/index.test.d.ts +0 -1
- package/dist/src/ui/status-bar/index.test.js +0 -139
- package/dist/src/ui/status-bar/store.test.d.ts +0 -1
- package/dist/src/ui/status-bar/store.test.js +0 -116
- package/dist/src/ui/status-bar/tier-badge.test.d.ts +0 -1
- package/dist/src/ui/status-bar/tier-badge.test.js +0 -34
- package/dist/src/ui/status-bar/usd-meter.test.d.ts +0 -1
- package/dist/src/ui/status-bar/usd-meter.test.js +0 -32
- package/dist/src/ui/utils/__tests__/format.test.d.ts +0 -1
- package/dist/src/ui/utils/__tests__/format.test.js +0 -50
- package/dist/src/ui/utils/__tests__/tools.test.d.ts +0 -1
- package/dist/src/ui/utils/__tests__/tools.test.js +0 -48
- package/dist/src/ui/utils/relaunch.test.d.ts +0 -1
- package/dist/src/ui/utils/relaunch.test.js +0 -133
- package/dist/src/ui/utils/text.test.d.ts +0 -1
- package/dist/src/ui/utils/text.test.js +0 -47
- package/dist/src/usage/__tests__/product-ledger.test.d.ts +0 -1
- package/dist/src/usage/__tests__/product-ledger.test.js +0 -60
- package/dist/src/usage/downgrade.test.d.ts +0 -1
- package/dist/src/usage/downgrade.test.js +0 -70
- package/dist/src/usage/estimator.test.d.ts +0 -1
- package/dist/src/usage/estimator.test.js +0 -38
- package/dist/src/usage/ledger.test.d.ts +0 -1
- package/dist/src/usage/ledger.test.js +0 -171
- package/dist/src/usage/midstream.test.d.ts +0 -1
- package/dist/src/usage/midstream.test.js +0 -47
- package/dist/src/usage/thresholds.test.d.ts +0 -1
- package/dist/src/usage/thresholds.test.js +0 -77
- package/dist/src/utils/__tests__/auto-council-settings.test.d.ts +0 -1
- package/dist/src/utils/__tests__/auto-council-settings.test.js +0 -41
- package/dist/src/utils/__tests__/compaction-caps.test.d.ts +0 -21
- package/dist/src/utils/__tests__/compaction-caps.test.js +0 -187
- package/dist/src/utils/__tests__/ee-logger.test.d.ts +0 -11
- package/dist/src/utils/__tests__/ee-logger.test.js +0 -165
- package/dist/src/utils/__tests__/file-lock.test.d.ts +0 -1
- package/dist/src/utils/__tests__/file-lock.test.js +0 -66
- package/dist/src/utils/__tests__/footprint-gitignore.test.d.ts +0 -1
- package/dist/src/utils/__tests__/footprint-gitignore.test.js +0 -50
- package/dist/src/utils/__tests__/llm-deadline-abort.test.d.ts +0 -1
- package/dist/src/utils/__tests__/llm-deadline-abort.test.js +0 -33
- package/dist/src/utils/__tests__/llm-deadline.test.d.ts +0 -1
- package/dist/src/utils/__tests__/llm-deadline.test.js +0 -56
- package/dist/src/utils/__tests__/rate-limit.test.d.ts +0 -1
- package/dist/src/utils/__tests__/rate-limit.test.js +0 -38
- package/dist/src/utils/__tests__/settings-disabled-models.test.d.ts +0 -7
- package/dist/src/utils/__tests__/settings-disabled-models.test.js +0 -99
- package/dist/src/utils/__tests__/settings-web-research.test.d.ts +0 -1
- package/dist/src/utils/__tests__/settings-web-research.test.js +0 -46
- package/dist/src/utils/__tests__/slugify.test.d.ts +0 -1
- package/dist/src/utils/__tests__/slugify.test.js +0 -37
- package/dist/src/utils/__tests__/visible-retry.test.d.ts +0 -1
- package/dist/src/utils/__tests__/visible-retry.test.js +0 -143
- package/dist/src/utils/install-manager.test.d.ts +0 -1
- package/dist/src/utils/install-manager.test.js +0 -127
- package/dist/src/utils/instructions.test.d.ts +0 -1
- package/dist/src/utils/instructions.test.js +0 -93
- package/dist/src/utils/open-url.test.d.ts +0 -1
- package/dist/src/utils/open-url.test.js +0 -86
- package/dist/src/utils/permission-mode.test.d.ts +0 -1
- package/dist/src/utils/permission-mode.test.js +0 -188
- package/dist/src/utils/redactor.test.d.ts +0 -1
- package/dist/src/utils/redactor.test.js +0 -84
- package/dist/src/utils/settings.test.d.ts +0 -1
- package/dist/src/utils/settings.test.js +0 -212
- package/dist/src/utils/shell.test.d.ts +0 -1
- package/dist/src/utils/shell.test.js +0 -97
- package/dist/src/utils/skills.test.d.ts +0 -1
- package/dist/src/utils/skills.test.js +0 -45
- package/dist/src/utils/subagent-display.test.d.ts +0 -1
- package/dist/src/utils/subagent-display.test.js +0 -21
- package/dist/src/utils/subagents-settings.test.d.ts +0 -1
- package/dist/src/utils/subagents-settings.test.js +0 -64
- package/dist/src/utils/telegram-audio-settings.test.d.ts +0 -1
- package/dist/src/utils/telegram-audio-settings.test.js +0 -39
- package/dist/src/utils/update-checker.test.d.ts +0 -1
- package/dist/src/utils/update-checker.test.js +0 -138
- package/dist/src/verify/__tests__/coverage-parsers.test.d.ts +0 -1
- package/dist/src/verify/__tests__/coverage-parsers.test.js +0 -69
- package/dist/src/verify/__tests__/dotnet-recipe.test.d.ts +0 -10
- package/dist/src/verify/__tests__/dotnet-recipe.test.js +0 -70
- package/dist/src/verify/checkpoint.test.d.ts +0 -1
- package/dist/src/verify/checkpoint.test.js +0 -160
- package/dist/src/verify/entrypoint.test.d.ts +0 -1
- package/dist/src/verify/entrypoint.test.js +0 -233
- package/dist/src/verify/environment.test.d.ts +0 -1
- package/dist/src/verify/environment.test.js +0 -94
- package/dist/src/verify/orchestrator.test.d.ts +0 -1
- package/dist/src/verify/orchestrator.test.js +0 -126
- package/dist/src/verify/runtime-prep.test.d.ts +0 -1
- package/dist/src/verify/runtime-prep.test.js +0 -38
|
@@ -236,6 +236,7 @@ export function registerNativeMuonroiTools(tools, opts = {}) {
|
|
|
236
236
|
goal: { type: "string" },
|
|
237
237
|
llm: { type: "string" },
|
|
238
238
|
turns: { type: "number" },
|
|
239
|
+
mockLlmDir: { type: "string", description: "Use 'none' to run child TUI against real LLM APIs" },
|
|
239
240
|
},
|
|
240
241
|
required: ["mode"],
|
|
241
242
|
}),
|
|
@@ -247,7 +248,15 @@ export function registerNativeMuonroiTools(tools, opts = {}) {
|
|
|
247
248
|
const { getModelInfo } = await import("../models/registry.js");
|
|
248
249
|
if (!getModelInfo(input.llm))
|
|
249
250
|
return errLine("unknown_model", `llm '${input.llm}' is not in catalog.json`);
|
|
250
|
-
return json({
|
|
251
|
+
return json({
|
|
252
|
+
runId: jm.start({
|
|
253
|
+
kind: "agentic",
|
|
254
|
+
goal: input.goal,
|
|
255
|
+
llm: input.llm,
|
|
256
|
+
turns: input.turns,
|
|
257
|
+
mockLlmDir: input.mockLlmDir,
|
|
258
|
+
}),
|
|
259
|
+
});
|
|
251
260
|
}
|
|
252
261
|
return json({
|
|
253
262
|
runId: jm.start({ kind: "tier1", since: input?.since, max: input?.max, emit: input?.emit, out: input?.out }),
|
|
@@ -15,6 +15,7 @@ interface ToolRegistryOpts {
|
|
|
15
15
|
listDelegations?: () => Promise<ToolResult>;
|
|
16
16
|
killDelegation?: (id: string) => Promise<ToolResult>;
|
|
17
17
|
modelId?: string;
|
|
18
|
+
consultParentSession?: (question: string) => Promise<string>;
|
|
18
19
|
/**
|
|
19
20
|
* When false, the 3 vision-proxy tools (analyze_image, ask_vision_proxy,
|
|
20
21
|
* list_vision_cache) are omitted even for vision-proxy models. Used by the
|
|
@@ -150,7 +150,8 @@ export function createBuiltinTools(bash, mode, opts) {
|
|
|
150
150
|
description: "Execute a shell command. Output is automatically cached — every call returns a " +
|
|
151
151
|
"run_id you can re-query via bash_output_get(run_id, mode=tail|head|grep|lines). " +
|
|
152
152
|
"Do NOT pipe `| tail`, `| head`, `| grep`, or `> file` — that hides output from " +
|
|
153
|
-
"the cache. Run unpiped and slice via bash_output_get instead. For collecting system info (OS, versions, cwd layout, git, disk, processes) batch with ; or && in ONE call, e.g. 'uname -a; node -v; bun --version; ls -la | head -15; git status --short; df -h .; ps aux | head -5'. Set background=true for long-running processes (dev servers, watchers)."
|
|
153
|
+
"the cache. Run unpiped and slice via bash_output_get instead. For collecting system info (OS, versions, cwd layout, git, disk, processes) batch with ; or && in ONE call, e.g. 'uname -a; node -v; bun --version; ls -la | head -15; git status --short; df -h .; ps aux | head -5'. Set background=true for long-running processes (dev servers, watchers). " +
|
|
154
|
+
'Avoid nesting double-quotes inline for database queries/scripts (e.g. executing raw SQL via `sqlite3 db "SELECT..."`) since they can fail parsing in shell environments; write query scripts to a temporary file first and run them.',
|
|
154
155
|
inputSchema: jsonSchema({
|
|
155
156
|
type: "object",
|
|
156
157
|
properties: {
|
|
@@ -504,6 +505,27 @@ export function createBuiltinTools(bash, mode, opts) {
|
|
|
504
505
|
},
|
|
505
506
|
});
|
|
506
507
|
}
|
|
508
|
+
// consult_parent_session
|
|
509
|
+
if (opts?.consultParentSession) {
|
|
510
|
+
const consultParentSession = opts.consultParentSession;
|
|
511
|
+
tools.consult_parent_session = dynamicTool({
|
|
512
|
+
description: "Consult the parent session for supervision or guidance when stuck, when needing clarification on the overall goal, or when encountering critical errors. ONLY available in sub-sessions.",
|
|
513
|
+
inputSchema: jsonSchema({
|
|
514
|
+
type: "object",
|
|
515
|
+
properties: {
|
|
516
|
+
question: {
|
|
517
|
+
type: "string",
|
|
518
|
+
description: "The specific question or issue you need the parent session to advise on.",
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
required: ["question"],
|
|
522
|
+
}),
|
|
523
|
+
execute: async (input) => {
|
|
524
|
+
const result = await consultParentSession(input.question);
|
|
525
|
+
return result;
|
|
526
|
+
},
|
|
527
|
+
});
|
|
528
|
+
}
|
|
507
529
|
// delegate
|
|
508
530
|
if (opts?.runDelegation) {
|
|
509
531
|
const runDelegation = opts.runDelegation;
|
|
@@ -653,7 +675,13 @@ export function createBuiltinTools(bash, mode, opts) {
|
|
|
653
675
|
return "[ee_unavailable] Experience Engine returned no response (server down, timeout, circuit open, or unconfigured) and the artifact is not in this session's local cache. Proceed without EE recall — re-read the source directly if you need the elided content.";
|
|
654
676
|
}
|
|
655
677
|
recordRehydration("ee");
|
|
656
|
-
|
|
678
|
+
const points = resp.points ?? [];
|
|
679
|
+
const bestHit = points[0];
|
|
680
|
+
if (bestHit) {
|
|
681
|
+
const matchedId = query.match(/(?:id\s*=\s*|id\s*\b)([a-zA-Z0-9_:-]+)/i)?.[1] ?? "unknown";
|
|
682
|
+
return truncateOutput(`[tool-artifact id=${matchedId} — rehydrated from Experience Engine]\n${bestHit.text}`);
|
|
683
|
+
}
|
|
684
|
+
return `[tool-artifact — not found in Experience Engine]`;
|
|
657
685
|
}
|
|
658
686
|
// General recall → /api/recall (recallMode, [id col] index + surface).
|
|
659
687
|
const { recallEE, formatRecallForAgent } = await import("../ee/search.js");
|
|
@@ -419,7 +419,7 @@ export interface ModelInfo {
|
|
|
419
419
|
supportsVision?: boolean;
|
|
420
420
|
}
|
|
421
421
|
export type AgentMode = "agent" | "plan" | "ask";
|
|
422
|
-
export type SessionStatus = "active" | "completed" | "archived";
|
|
422
|
+
export type SessionStatus = "active" | "completed" | "archived" | "abandoned";
|
|
423
423
|
export type UsageSource = "message" | "title" | "task" | "delegation" | "council" | "other";
|
|
424
424
|
export interface WorkspaceInfo {
|
|
425
425
|
id: string;
|
package/dist/src/ui/app.js
CHANGED
|
Binary file
|
|
@@ -30,11 +30,24 @@ export const handleExpandSlash = async (_args, ctx) => {
|
|
|
30
30
|
const latestFile = snapshots[snapshots.length - 1];
|
|
31
31
|
const latestPath = path.join(historyDir, latestFile);
|
|
32
32
|
const content = await fs.readFile(latestPath, "utf8");
|
|
33
|
+
// Attempt to read the corresponding .json file for structured messages restore
|
|
34
|
+
let jsonContent = "";
|
|
35
|
+
const jsonPath = latestPath.replace(/\.md$/, ".json");
|
|
36
|
+
try {
|
|
37
|
+
jsonContent = await fs.readFile(jsonPath, "utf8");
|
|
38
|
+
await fs.unlink(jsonPath).catch(() => { });
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
// no JSON snapshot found (legacy md-only snapshot)
|
|
42
|
+
}
|
|
33
43
|
// Delete the snapshot file (prevent double-expand per Pitfall 5)
|
|
34
44
|
await fs.unlink(latestPath);
|
|
35
45
|
// Count lines for summary
|
|
36
46
|
const lines = content.split("\n").length;
|
|
37
|
-
|
|
47
|
+
if (jsonContent) {
|
|
48
|
+
return `__EXPAND_JSON__\n${jsonContent}\nRestored from ${latestFile} (${lines} lines). Previous compaction reversed.\n${content}`;
|
|
49
|
+
}
|
|
50
|
+
// Return signal for orchestrator to restore messages (legacy text fallback)
|
|
38
51
|
return `__EXPAND__\nRestored from ${latestFile} (${lines} lines). Previous compaction reversed.\n${content}`;
|
|
39
52
|
};
|
|
40
53
|
// Self-register on module import
|
|
Binary file
|
|
@@ -49,7 +49,9 @@ export declare function getReleaseTargetForPlatform(platform?: NodeJS.Platform,
|
|
|
49
49
|
export declare function loadScriptInstallMetadata(homeDir?: string): ScriptInstallMetadata | null;
|
|
50
50
|
export declare function saveScriptInstallMetadata(metadata: ScriptInstallMetadata, homeDir?: string): void;
|
|
51
51
|
export declare function getScriptInstallContext(homeDir?: string): ScriptInstallContext | null;
|
|
52
|
+
export declare function fetchLatestGitTag(gitDir: string): Promise<string | null>;
|
|
52
53
|
export declare function fetchLatestReleaseVersion(): Promise<string | null>;
|
|
54
|
+
export declare function fetchLatestNpmVersion(pkgName?: string): Promise<string | null>;
|
|
53
55
|
export declare function parseChecksumsFile(contents: string): Map<string, string>;
|
|
54
56
|
/**
|
|
55
57
|
* How this muonroi-cli was installed. Drives which update path the built-in
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { spawn } from "child_process";
|
|
1
|
+
import { exec, spawn } from "child_process";
|
|
2
2
|
import { createHash } from "crypto";
|
|
3
3
|
import fs from "fs";
|
|
4
4
|
import os from "os";
|
|
@@ -83,10 +83,59 @@ export function getScriptInstallContext(homeDir = os.homedir()) {
|
|
|
83
83
|
}
|
|
84
84
|
return null;
|
|
85
85
|
}
|
|
86
|
+
export function fetchLatestGitTag(gitDir) {
|
|
87
|
+
return new Promise((resolve) => {
|
|
88
|
+
exec(`git -C "${gitDir}" ls-remote --tags origin`, (error, stdout) => {
|
|
89
|
+
if (error) {
|
|
90
|
+
resolve(null);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const lines = stdout.split(/\r?\n/);
|
|
94
|
+
let maxVersion = null;
|
|
95
|
+
for (const line of lines) {
|
|
96
|
+
const match = line.match(/refs\/tags\/(v?[0-9]+\.[0-9]+\.[0-9]+[^\s]*)$/);
|
|
97
|
+
if (!match)
|
|
98
|
+
continue;
|
|
99
|
+
let tag = match[1];
|
|
100
|
+
if (tag.endsWith("^{}")) {
|
|
101
|
+
tag = tag.slice(0, -3);
|
|
102
|
+
}
|
|
103
|
+
const version = normalizeReleaseVersion(tag);
|
|
104
|
+
if (!version)
|
|
105
|
+
continue;
|
|
106
|
+
if (!maxVersion || semverGt(version, maxVersion)) {
|
|
107
|
+
maxVersion = version;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
resolve(maxVersion);
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
}
|
|
86
114
|
export async function fetchLatestReleaseVersion() {
|
|
87
115
|
const release = await fetchReleaseJson(`${RELEASES_API}/latest`);
|
|
88
116
|
return release ? normalizeReleaseVersion(release.tag_name) : null;
|
|
89
117
|
}
|
|
118
|
+
export async function fetchLatestNpmVersion(pkgName = "muonroi-cli") {
|
|
119
|
+
try {
|
|
120
|
+
const controller = new AbortController();
|
|
121
|
+
const timer = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS);
|
|
122
|
+
const res = await fetch(`https://registry.npmjs.org/${pkgName}/latest`, {
|
|
123
|
+
signal: controller.signal,
|
|
124
|
+
headers: {
|
|
125
|
+
Accept: "application/json",
|
|
126
|
+
"User-Agent": "muonroi-cli",
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
clearTimeout(timer);
|
|
130
|
+
if (!res.ok)
|
|
131
|
+
return null;
|
|
132
|
+
const data = (await res.json());
|
|
133
|
+
return data.version ? semverValid(data.version) : null;
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
90
139
|
export function parseChecksumsFile(contents) {
|
|
91
140
|
const result = new Map();
|
|
92
141
|
for (const rawLine of contents.split(/\r?\n/)) {
|
|
@@ -179,31 +228,72 @@ export async function runManagedUpdate(currentVersion) {
|
|
|
179
228
|
const method = detectInstallMethod();
|
|
180
229
|
if (method === "script")
|
|
181
230
|
return runScriptManagedUpdate(currentVersion);
|
|
231
|
+
const root = findGitRoot(path.dirname(runningModulePath()));
|
|
232
|
+
let latestVersion = null;
|
|
233
|
+
if (method === "dev-link" && root) {
|
|
234
|
+
latestVersion = await fetchLatestGitTag(root);
|
|
235
|
+
}
|
|
236
|
+
else if (method === "bun-global" || method === "npm-global") {
|
|
237
|
+
latestVersion = await fetchLatestNpmVersion("muonroi-cli");
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
latestVersion = await fetchLatestReleaseVersion();
|
|
241
|
+
if (!latestVersion) {
|
|
242
|
+
latestVersion = await fetchLatestNpmVersion("muonroi-cli");
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
const normalizedCurrent = semverValid(currentVersion);
|
|
246
|
+
let statusHeader = "";
|
|
247
|
+
let hasUpdate = false;
|
|
248
|
+
if (latestVersion && normalizedCurrent) {
|
|
249
|
+
hasUpdate = semverGt(latestVersion, normalizedCurrent);
|
|
250
|
+
if (hasUpdate) {
|
|
251
|
+
statusHeader = `A new version of muonroi-cli is available!\n Current version: v${normalizedCurrent}\n Latest version: v${latestVersion}\n\n`;
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
statusHeader = `You are already up to date!\n Current version: v${normalizedCurrent}\n Latest version: v${latestVersion}\n\n`;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
else if (normalizedCurrent) {
|
|
258
|
+
statusHeader = `Current version: v${normalizedCurrent}\nUnable to check the latest version from GitHub.\n\n`;
|
|
259
|
+
}
|
|
182
260
|
const cmd = getUpdateCommandForMethod(method);
|
|
183
261
|
if (cmd) {
|
|
184
262
|
const pm = method === "bun-global" ? "bun" : "npm";
|
|
263
|
+
const instruction = hasUpdate
|
|
264
|
+
? `To update, run this in a fresh terminal:\n\n ${cmd}\n\nThen restart muonroi-cli.`
|
|
265
|
+
: `If you want to reinstall, run this in a fresh terminal:\n\n ${cmd}`;
|
|
185
266
|
return {
|
|
186
267
|
success: true,
|
|
187
|
-
output:
|
|
268
|
+
output: `${statusHeader}${instruction}`,
|
|
188
269
|
};
|
|
189
270
|
}
|
|
190
271
|
if (method === "compiled") {
|
|
191
272
|
const target = getReleaseTargetForPlatform();
|
|
192
273
|
const asset = target?.assetName ?? "the release asset for your platform";
|
|
274
|
+
const instruction = hasUpdate
|
|
275
|
+
? `Download the latest ${asset} from https://github.com/${GITHUB_REPO}/releases/latest and replace the current binary, or rebuild from source.`
|
|
276
|
+
: `If you want to reinstall, download the latest ${asset} from https://github.com/${GITHUB_REPO}/releases/latest and replace the current binary.`;
|
|
193
277
|
return {
|
|
194
278
|
success: true,
|
|
195
|
-
output:
|
|
279
|
+
output: `${statusHeader}${instruction}`,
|
|
196
280
|
};
|
|
197
281
|
}
|
|
198
282
|
if (method === "dev-link") {
|
|
199
|
-
const root = findGitRoot(path.dirname(runningModulePath()));
|
|
200
283
|
const target = root ?? "the muonroi-cli checkout";
|
|
284
|
+
const instruction = hasUpdate
|
|
285
|
+
? `To update, pull the latest changes and rebuild:\n\n git -C "${target}" pull && bun install && bun run build\n\nThen restart muonroi-cli. (If you also use the compiled muonroi-cli-dev binary, rebuild that separately.)`
|
|
286
|
+
: `To rebuild your local installation:\n\n git -C "${target}" pull && bun install && bun run build\n\nThen restart muonroi-cli.`;
|
|
201
287
|
return {
|
|
202
288
|
success: true,
|
|
203
|
-
output:
|
|
289
|
+
output: `${statusHeader}${instruction}`,
|
|
204
290
|
};
|
|
205
291
|
}
|
|
206
|
-
|
|
292
|
+
const fallback = notScriptManaged("update");
|
|
293
|
+
return {
|
|
294
|
+
success: fallback.success,
|
|
295
|
+
output: `${statusHeader}${fallback.output}`,
|
|
296
|
+
};
|
|
207
297
|
}
|
|
208
298
|
export async function runScriptManagedUpdate(currentVersion) {
|
|
209
299
|
const context = getScriptInstallContext();
|
|
@@ -348,7 +438,15 @@ async function fetchReleaseJson(url) {
|
|
|
348
438
|
try {
|
|
349
439
|
const controller = new AbortController();
|
|
350
440
|
const timer = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS);
|
|
351
|
-
const
|
|
441
|
+
const token = process.env.GITHUB_TOKEN || process.env.GH_TOKEN;
|
|
442
|
+
const res = await fetch(url, {
|
|
443
|
+
signal: controller.signal,
|
|
444
|
+
headers: {
|
|
445
|
+
Accept: "application/vnd.github+json",
|
|
446
|
+
"User-Agent": "muonroi-cli",
|
|
447
|
+
...(token ? { Authorization: `token ${token}` } : {}),
|
|
448
|
+
},
|
|
449
|
+
});
|
|
352
450
|
clearTimeout(timer);
|
|
353
451
|
return res.ok ? (await res.json()) : null;
|
|
354
452
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type LogLevel = "debug" | "info" | "warn" | "error";
|
|
2
|
+
export type LogNamespace = "cli" | "ui" | "orchestrator" | "storage" | "ee" | "mcp" | "pil" | "router";
|
|
3
|
+
export interface LogContext {
|
|
4
|
+
elapsedMs?: number;
|
|
5
|
+
error?: Error | unknown;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the given log level is enabled based on the current process level weight.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isLogLevelEnabled(level: LogLevel): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Redacts common patterns of API keys and credential strings from log messages.
|
|
14
|
+
*/
|
|
15
|
+
export declare function redactSecrets(str: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Recursively redacts sensitive fields from context objects.
|
|
18
|
+
*/
|
|
19
|
+
export declare function redactObject(obj: unknown): unknown;
|
|
20
|
+
/**
|
|
21
|
+
* Structured unified logging system.
|
|
22
|
+
*/
|
|
23
|
+
export declare const logger: {
|
|
24
|
+
debug(ns: LogNamespace, msg: string, ctx?: LogContext): void;
|
|
25
|
+
info(ns: LogNamespace, msg: string, ctx?: LogContext): void;
|
|
26
|
+
warn(ns: LogNamespace, msg: string, ctx?: LogContext): void;
|
|
27
|
+
error(ns: LogNamespace, msg: string, ctx?: LogContext): void;
|
|
28
|
+
};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import * as fs from "fs";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
import * as os from "os";
|
|
4
|
+
const LEVEL_WEIGHTS = {
|
|
5
|
+
debug: 0,
|
|
6
|
+
info: 1,
|
|
7
|
+
warn: 2,
|
|
8
|
+
error: 3,
|
|
9
|
+
};
|
|
10
|
+
// Default log level is 'info' unless explicitly configured.
|
|
11
|
+
const CURRENT_WEIGHT = (() => {
|
|
12
|
+
const envLevel = process.env.MUONROI_LOG_LEVEL?.toLowerCase();
|
|
13
|
+
if (envLevel === "debug")
|
|
14
|
+
return LEVEL_WEIGHTS.debug;
|
|
15
|
+
if (envLevel === "info")
|
|
16
|
+
return LEVEL_WEIGHTS.info;
|
|
17
|
+
if (envLevel === "warn")
|
|
18
|
+
return LEVEL_WEIGHTS.warn;
|
|
19
|
+
if (envLevel === "error")
|
|
20
|
+
return LEVEL_WEIGHTS.error;
|
|
21
|
+
return LEVEL_WEIGHTS.info;
|
|
22
|
+
})();
|
|
23
|
+
/**
|
|
24
|
+
* Checks if the given log level is enabled based on the current process level weight.
|
|
25
|
+
*/
|
|
26
|
+
export function isLogLevelEnabled(level) {
|
|
27
|
+
return LEVEL_WEIGHTS[level] >= CURRENT_WEIGHT;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Redacts common patterns of API keys and credential strings from log messages.
|
|
31
|
+
*/
|
|
32
|
+
export function redactSecrets(str) {
|
|
33
|
+
return str
|
|
34
|
+
.replace(/\bsk-[A-Za-z0-9-_]{20,}\b/g, "[REDACTED_API_KEY]")
|
|
35
|
+
.replace(/\bxai-[A-Za-z0-9-_]{20,}\b/g, "[REDACTED_API_KEY]")
|
|
36
|
+
.replace(/\bAIzaSy[A-Za-z0-9-_]{30,}\b/g, "[REDACTED_API_KEY]");
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Recursively redacts sensitive fields from context objects.
|
|
40
|
+
*/
|
|
41
|
+
export function redactObject(obj) {
|
|
42
|
+
if (obj === null || obj === undefined)
|
|
43
|
+
return obj;
|
|
44
|
+
if (typeof obj === "string") {
|
|
45
|
+
return redactSecrets(obj);
|
|
46
|
+
}
|
|
47
|
+
if (Array.isArray(obj)) {
|
|
48
|
+
return obj.map(redactObject);
|
|
49
|
+
}
|
|
50
|
+
if (typeof obj === "object") {
|
|
51
|
+
const res = {};
|
|
52
|
+
for (const [k, v] of Object.entries(obj)) {
|
|
53
|
+
const lowerK = k.toLowerCase();
|
|
54
|
+
if (lowerK.includes("key") ||
|
|
55
|
+
lowerK.includes("secret") ||
|
|
56
|
+
lowerK.includes("token") ||
|
|
57
|
+
lowerK.includes("password") ||
|
|
58
|
+
lowerK.includes("auth")) {
|
|
59
|
+
res[k] = "[REDACTED]";
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
res[k] = redactObject(v);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return res;
|
|
66
|
+
}
|
|
67
|
+
return obj;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Returns true if the interactive TUI is active, preventing console writes.
|
|
71
|
+
*/
|
|
72
|
+
function isTuiActive() {
|
|
73
|
+
try {
|
|
74
|
+
return globalThis.__muonroiTuiActive === true;
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Writes logs safely to ~/.muonroi-cli/debug.log.
|
|
82
|
+
*/
|
|
83
|
+
function appendToFile(level, ns, msg, ctx) {
|
|
84
|
+
try {
|
|
85
|
+
const dir = path.join(os.homedir(), ".muonroi-cli");
|
|
86
|
+
if (!fs.existsSync(dir)) {
|
|
87
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
88
|
+
}
|
|
89
|
+
const logPath = path.join(dir, "debug.log");
|
|
90
|
+
const ts = new Date().toISOString();
|
|
91
|
+
const redactedCtx = ctx ? redactObject(ctx) : null;
|
|
92
|
+
const ctxStr = redactedCtx ? ` ${JSON.stringify(redactedCtx)}` : "";
|
|
93
|
+
const logLine = `[${ts}] [${level.toUpperCase()}] [${ns.toUpperCase()}] ${redactSecrets(msg)}${ctxStr}\n`;
|
|
94
|
+
fs.appendFileSync(logPath, logLine, "utf8");
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
/* fail-open */
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Formats console log lines with colors.
|
|
102
|
+
*/
|
|
103
|
+
function formatConsole(level, ns, msg, ctx) {
|
|
104
|
+
const ts = new Date().toISOString().split("T")[1].slice(0, -1); // HH:MM:SS.mmm
|
|
105
|
+
const levelStr = level.toUpperCase();
|
|
106
|
+
const nsStr = ns.toUpperCase();
|
|
107
|
+
const cleanMsg = redactSecrets(msg);
|
|
108
|
+
const redactedCtx = ctx ? redactObject(ctx) : null;
|
|
109
|
+
const ctxStr = redactedCtx ? ` ${JSON.stringify(redactedCtx)}` : "";
|
|
110
|
+
// Apply colors for developer convenience in terminal logs (non-TUI)
|
|
111
|
+
let color = "\x1b[0m"; // Reset
|
|
112
|
+
if (level === "debug")
|
|
113
|
+
color = "\x1b[90m"; // Gray
|
|
114
|
+
if (level === "info")
|
|
115
|
+
color = "\x1b[32m"; // Green
|
|
116
|
+
if (level === "warn")
|
|
117
|
+
color = "\x1b[33m"; // Yellow
|
|
118
|
+
if (level === "error")
|
|
119
|
+
color = "\x1b[31m"; // Red
|
|
120
|
+
return `${color}[${ts}] [${levelStr}] [${nsStr}] ${cleanMsg}${ctxStr}\x1b[0m`;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Structured unified logging system.
|
|
124
|
+
*/
|
|
125
|
+
export const logger = {
|
|
126
|
+
debug(ns, msg, ctx) {
|
|
127
|
+
if (!isLogLevelEnabled("debug"))
|
|
128
|
+
return;
|
|
129
|
+
if (isTuiActive()) {
|
|
130
|
+
appendToFile("debug", ns, msg, ctx);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
// eslint-disable-next-line no-console
|
|
134
|
+
console.log(formatConsole("debug", ns, msg, ctx));
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
info(ns, msg, ctx) {
|
|
138
|
+
if (!isLogLevelEnabled("info"))
|
|
139
|
+
return;
|
|
140
|
+
if (isTuiActive()) {
|
|
141
|
+
appendToFile("info", ns, msg, ctx);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
// eslint-disable-next-line no-console
|
|
145
|
+
console.log(formatConsole("info", ns, msg, ctx));
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
warn(ns, msg, ctx) {
|
|
149
|
+
if (!isLogLevelEnabled("warn"))
|
|
150
|
+
return;
|
|
151
|
+
if (isTuiActive()) {
|
|
152
|
+
appendToFile("warn", ns, msg, ctx);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
// eslint-disable-next-line no-console
|
|
156
|
+
console.warn(formatConsole("warn", ns, msg, ctx));
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
error(ns, msg, ctx) {
|
|
160
|
+
if (!isLogLevelEnabled("error"))
|
|
161
|
+
return;
|
|
162
|
+
if (isTuiActive()) {
|
|
163
|
+
appendToFile("error", ns, msg, ctx);
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
// eslint-disable-next-line no-console
|
|
167
|
+
console.error(formatConsole("error", ns, msg, ctx));
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -75,6 +75,14 @@ export interface UserSettings {
|
|
|
75
75
|
* defaultModel field stays as the hard pin for legacy paths.
|
|
76
76
|
*/
|
|
77
77
|
defaultProvider?: ProviderId;
|
|
78
|
+
/** When true, the agent prioritizes task completion over strict runaway safety caps. */
|
|
79
|
+
agentFirst?: boolean;
|
|
80
|
+
/** Custom soft limit on the number of tool execution steps before pausing. */
|
|
81
|
+
maxToolRounds?: number;
|
|
82
|
+
/** Custom hard limit on the number of tool execution steps per turn. */
|
|
83
|
+
hardMaxToolRounds?: number;
|
|
84
|
+
/** Custom limit on the number of LLM call round-trips allowed in a single turn. */
|
|
85
|
+
maxLlmCallsPerTurn?: number;
|
|
78
86
|
/** Shell used by the bash tool. On Windows, defaults to Git Bash when present. */
|
|
79
87
|
shell?: ShellSettings;
|
|
80
88
|
lsp?: LspSettings;
|
|
@@ -343,7 +351,7 @@ export declare function getTopLevelCompactKeepLast(): number;
|
|
|
343
351
|
* higher default so single-tool turns are unaffected. Env override:
|
|
344
352
|
* MUONROI_TOP_LEVEL_TOOL_BUDGET_CHARS.
|
|
345
353
|
*/
|
|
346
|
-
export declare function getTopLevelToolBudgetChars(): number;
|
|
354
|
+
export declare function getTopLevelToolBudgetChars(maxRounds?: number): number;
|
|
347
355
|
export declare function getRoleModel(role: ModelRole): string | undefined;
|
|
348
356
|
export declare function getRoleModels(): Partial<Record<ModelRole, string>>;
|
|
349
357
|
export declare function getCouncilRounds(): number;
|
|
@@ -4,6 +4,7 @@ import * as path from "path";
|
|
|
4
4
|
import { getEffectiveReasoningEffort, getFirstCatalogModel, getFirstCatalogProvider, getModelByTier, getModelIds, getModelInfo, MODELS, normalizeModelId, } from "../models/registry.js";
|
|
5
5
|
import { apiBaseFor, PROVIDER_ENDPOINTS } from "../providers/endpoints.js";
|
|
6
6
|
import { ALL_PROVIDER_IDS } from "../providers/types.js";
|
|
7
|
+
import { logger } from "./logger.js";
|
|
7
8
|
import { normalizeShellSettings } from "./shell.js";
|
|
8
9
|
export function getCatalogDefaultModel() {
|
|
9
10
|
const provider = getDefaultProvider();
|
|
@@ -79,18 +80,58 @@ function ensureDir(dir) {
|
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
82
|
function readJson(filePath) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
const RETRIES = 5;
|
|
84
|
+
let lastErr;
|
|
85
|
+
for (let attempt = 0; attempt < RETRIES; attempt++) {
|
|
86
|
+
try {
|
|
87
|
+
if (!fs.existsSync(filePath))
|
|
88
|
+
return null;
|
|
89
|
+
return JSON.parse(fs.readFileSync(filePath, "utf-8"));
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
lastErr = err;
|
|
93
|
+
const code = err?.code;
|
|
94
|
+
if (code === "EBUSY" || code === "EPERM" || err instanceof SyntaxError) {
|
|
95
|
+
logger.warn("cli", `Lock contention or syntax error reading ${path.basename(filePath)}, retrying (attempt ${attempt + 1}/${RETRIES})`, { error: err });
|
|
96
|
+
// Spin wait briefly to let the lock release or the write complete
|
|
97
|
+
const end = Date.now() + 20 * (attempt + 1);
|
|
98
|
+
while (Date.now() < end) {
|
|
99
|
+
// busy wait
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
89
106
|
}
|
|
107
|
+
return null;
|
|
90
108
|
}
|
|
91
109
|
function writeJson(filePath, data) {
|
|
92
110
|
ensureDir(path.dirname(filePath));
|
|
93
|
-
|
|
111
|
+
const serialized = JSON.stringify(data, null, 2);
|
|
112
|
+
const RETRIES = 5;
|
|
113
|
+
let lastErr;
|
|
114
|
+
for (let attempt = 0; attempt < RETRIES; attempt++) {
|
|
115
|
+
try {
|
|
116
|
+
fs.writeFileSync(filePath, serialized, { mode: 0o600 });
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
lastErr = err;
|
|
121
|
+
const code = err?.code;
|
|
122
|
+
if (code === "EBUSY" || code === "EPERM") {
|
|
123
|
+
logger.warn("cli", `Lock contention writing ${path.basename(filePath)}, retrying (attempt ${attempt + 1}/${RETRIES})`, { error: err });
|
|
124
|
+
const end = Date.now() + 20 * (attempt + 1);
|
|
125
|
+
while (Date.now() < end) {
|
|
126
|
+
// busy wait
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
throw err;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
throw lastErr;
|
|
94
135
|
}
|
|
95
136
|
/**
|
|
96
137
|
* Ensure the CLI's own project-local footprint (`.muonroi-cli/`) is gitignored
|
|
@@ -559,13 +600,13 @@ export function getSubAgentBudgetChars() {
|
|
|
559
600
|
const envRaw = process.env.MUONROI_SUB_AGENT_BUDGET_CHARS;
|
|
560
601
|
if (envRaw) {
|
|
561
602
|
const n = Number(envRaw);
|
|
562
|
-
if (Number.isFinite(n) && n >= 20_000 && n <=
|
|
603
|
+
if (Number.isFinite(n) && n >= 20_000 && n <= 5_000_000)
|
|
563
604
|
return Math.floor(n);
|
|
564
605
|
}
|
|
565
606
|
const val = loadUserSettings().subAgentBudgetChars;
|
|
566
|
-
if (typeof val === "number" && val >= 20_000 && val <=
|
|
607
|
+
if (typeof val === "number" && val >= 20_000 && val <= 5_000_000)
|
|
567
608
|
return Math.floor(val);
|
|
568
|
-
return
|
|
609
|
+
return 240_000;
|
|
569
610
|
}
|
|
570
611
|
/**
|
|
571
612
|
* Stall watchdog timeout (ms) for streaming model calls: if the provider sends
|
|
@@ -694,24 +735,20 @@ export function getTopLevelCompactKeepLast() {
|
|
|
694
735
|
* higher default so single-tool turns are unaffected. Env override:
|
|
695
736
|
* MUONROI_TOP_LEVEL_TOOL_BUDGET_CHARS.
|
|
696
737
|
*/
|
|
697
|
-
export function getTopLevelToolBudgetChars() {
|
|
738
|
+
export function getTopLevelToolBudgetChars(maxRounds) {
|
|
698
739
|
const envRaw = process.env.MUONROI_TOP_LEVEL_TOOL_BUDGET_CHARS;
|
|
699
740
|
if (envRaw) {
|
|
700
741
|
const n = Number(envRaw);
|
|
701
|
-
if (Number.isFinite(n) && n >= 50_000 && n <=
|
|
742
|
+
if (Number.isFinite(n) && n >= 50_000 && n <= 10_000_000)
|
|
702
743
|
return Math.floor(n);
|
|
703
744
|
}
|
|
704
745
|
const val = loadUserSettings().topLevelToolBudgetChars;
|
|
705
|
-
if (typeof val === "number" && val >= 50_000 && val <=
|
|
746
|
+
if (typeof val === "number" && val >= 50_000 && val <= 10_000_000)
|
|
706
747
|
return Math.floor(val);
|
|
707
|
-
//
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
// (~3 tool turns), and the 80% tier at 160K chars (~5 turns); small tasks
|
|
712
|
-
// (1-3 turns) are unaffected. The sub-agent budget is 120K, so 200K maintains
|
|
713
|
-
// a ~1.7x ratio reflecting the broader top-level conversation context.
|
|
714
|
-
return 200_000;
|
|
748
|
+
// Dynamically scale default based on maxRounds relative to default base (40)
|
|
749
|
+
const baseRounds = 40;
|
|
750
|
+
const scale = maxRounds && maxRounds > baseRounds ? maxRounds / baseRounds : 1;
|
|
751
|
+
return Math.floor(400_000 * scale);
|
|
715
752
|
}
|
|
716
753
|
export function getRoleModel(role) {
|
|
717
754
|
return loadUserSettings().roleModels?.[role];
|