muonroi-cli 1.2.2 → 1.3.1
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/README.md +77 -316
- package/dist/packages/agent-harness-core/src/driver.d.ts +77 -0
- package/dist/packages/agent-harness-core/src/driver.js +311 -0
- package/dist/packages/agent-harness-core/src/driver.js.map +1 -0
- package/dist/packages/agent-harness-core/src/event-filter.d.ts +34 -0
- package/dist/packages/agent-harness-core/src/event-filter.js +70 -0
- package/dist/packages/agent-harness-core/src/event-filter.js.map +1 -0
- package/dist/packages/agent-harness-core/src/event-redact.d.ts +24 -0
- package/dist/packages/agent-harness-core/src/event-redact.js +150 -0
- package/dist/packages/agent-harness-core/src/event-redact.js.map +1 -0
- package/dist/packages/agent-harness-core/src/idle.d.ts +18 -0
- package/dist/packages/agent-harness-core/src/idle.js +57 -0
- package/dist/packages/agent-harness-core/src/idle.js.map +1 -0
- package/dist/packages/agent-harness-core/src/index.d.ts +10 -0
- package/dist/packages/agent-harness-core/src/index.js +12 -0
- package/dist/packages/agent-harness-core/src/index.js.map +1 -0
- package/dist/packages/agent-harness-core/src/mcp-server.d.ts +89 -0
- package/dist/packages/agent-harness-core/src/mcp-server.js +427 -0
- package/dist/packages/agent-harness-core/src/mcp-server.js.map +1 -0
- package/dist/packages/agent-harness-core/src/mock-llm.d.ts +75 -0
- package/dist/packages/agent-harness-core/src/mock-llm.js +116 -0
- package/dist/packages/agent-harness-core/src/mock-llm.js.map +1 -0
- package/dist/packages/agent-harness-core/src/predicate.d.ts +34 -0
- package/dist/packages/agent-harness-core/src/predicate.js +46 -0
- package/dist/packages/agent-harness-core/src/predicate.js.map +1 -0
- package/dist/packages/agent-harness-core/src/protocol.d.ts +198 -0
- package/dist/packages/agent-harness-core/src/protocol.js +2 -0
- package/dist/packages/agent-harness-core/src/protocol.js.map +1 -0
- package/dist/packages/agent-harness-core/src/registry.d.ts +30 -0
- package/dist/packages/agent-harness-core/src/registry.js +86 -0
- package/dist/packages/agent-harness-core/src/registry.js.map +1 -0
- package/dist/packages/agent-harness-core/src/selector.d.ts +14 -0
- package/dist/packages/agent-harness-core/src/selector.js +199 -0
- package/dist/packages/agent-harness-core/src/selector.js.map +1 -0
- package/dist/packages/agent-harness-core/src/spec-helpers.d.ts +24 -0
- package/dist/packages/agent-harness-core/src/spec-helpers.js +61 -0
- package/dist/packages/agent-harness-core/src/spec-helpers.js.map +1 -0
- package/dist/packages/agent-harness-core/src/transports/sidechannel.d.ts +11 -0
- package/dist/packages/agent-harness-core/src/transports/sidechannel.js +34 -0
- package/dist/packages/agent-harness-core/src/transports/sidechannel.js.map +1 -0
- package/dist/packages/agent-harness-core/src/transports/ws.d.ts +150 -0
- package/dist/packages/agent-harness-core/src/transports/ws.js +222 -0
- package/dist/packages/agent-harness-core/src/transports/ws.js.map +1 -0
- package/dist/packages/agent-harness-opentui/src/agent-mode.d.ts +46 -0
- package/dist/packages/agent-harness-opentui/src/agent-mode.js +178 -0
- package/dist/packages/agent-harness-opentui/src/agent-mode.js.map +1 -0
- package/dist/packages/agent-harness-opentui/src/index.d.ts +5 -0
- package/dist/packages/agent-harness-opentui/src/index.js +6 -0
- package/dist/packages/agent-harness-opentui/src/index.js.map +1 -0
- package/dist/packages/agent-harness-opentui/src/input-bridge.d.ts +27 -0
- package/dist/packages/agent-harness-opentui/src/input-bridge.js +126 -0
- package/dist/packages/agent-harness-opentui/src/input-bridge.js.map +1 -0
- package/dist/packages/agent-harness-opentui/src/install.d.ts +65 -0
- package/dist/packages/agent-harness-opentui/src/install.js +62 -0
- package/dist/packages/agent-harness-opentui/src/install.js.map +1 -0
- package/dist/packages/agent-harness-opentui/src/reconciler-hook.d.ts +15 -0
- package/dist/packages/agent-harness-opentui/src/reconciler-hook.js +52 -0
- package/dist/packages/agent-harness-opentui/src/reconciler-hook.js.map +1 -0
- package/dist/packages/agent-harness-opentui/src/semantic.d.ts +12 -0
- package/dist/packages/agent-harness-opentui/src/semantic.js +58 -0
- package/dist/packages/agent-harness-opentui/src/semantic.js.map +1 -0
- package/dist/src/__test-stubs__/ee-server.js.map +1 -0
- package/dist/src/__test-stubs__/vitest-setup.js +34 -0
- package/dist/src/__test-stubs__/vitest-setup.js.map +1 -0
- package/dist/src/__tests__/council/bubble-layout.test.js +39 -0
- package/dist/src/__tests__/council/bubble-layout.test.js.map +1 -0
- package/dist/src/__tests__/council/code-block-truncate.test.js +45 -0
- package/dist/src/__tests__/council/code-block-truncate.test.js.map +1 -0
- package/dist/src/__tests__/council/role-palette.test.js +59 -0
- package/dist/src/__tests__/council/role-palette.test.js.map +1 -0
- package/dist/src/__tests__/first-run-wizard.test.js +9 -0
- package/dist/src/__tests__/first-run-wizard.test.js.map +1 -0
- package/dist/src/agent-harness/__tests__/cli-flags.spec.js +33 -0
- package/dist/src/agent-harness/__tests__/cli-flags.spec.js.map +1 -0
- package/dist/src/agent-harness/__tests__/driver.spec.js +141 -0
- package/dist/src/agent-harness/__tests__/driver.spec.js.map +1 -0
- package/dist/src/agent-harness/__tests__/idle.spec.js +84 -0
- package/dist/src/agent-harness/__tests__/idle.spec.js.map +1 -0
- package/dist/src/agent-harness/__tests__/mock-llm.spec.js +91 -0
- package/dist/src/agent-harness/__tests__/mock-llm.spec.js.map +1 -0
- package/dist/src/agent-harness/__tests__/mock-model.spec.d.ts +5 -0
- package/dist/src/agent-harness/__tests__/mock-model.spec.js +169 -0
- package/dist/src/agent-harness/__tests__/mock-model.spec.js.map +1 -0
- package/dist/src/agent-harness/__tests__/predicate.spec.js +27 -0
- package/dist/src/agent-harness/__tests__/predicate.spec.js.map +1 -0
- package/dist/src/agent-harness/__tests__/protocol.spec.js +56 -0
- package/dist/src/agent-harness/__tests__/protocol.spec.js.map +1 -0
- package/dist/src/agent-harness/__tests__/schema.spec.js +76 -0
- package/dist/src/agent-harness/__tests__/schema.spec.js.map +1 -0
- package/dist/src/agent-harness/__tests__/selector.spec.js +70 -0
- package/dist/src/agent-harness/__tests__/selector.spec.js.map +1 -0
- package/dist/src/agent-harness/__tests__/sidechannel.spec.js +29 -0
- package/dist/src/agent-harness/__tests__/sidechannel.spec.js.map +1 -0
- package/dist/src/agent-harness/__tests__/spec-helpers.spec.js +68 -0
- package/dist/src/agent-harness/__tests__/spec-helpers.spec.js.map +1 -0
- package/dist/src/agent-harness/index.d.ts +2 -0
- package/dist/src/agent-harness/index.js +20 -0
- package/dist/src/agent-harness/index.js.map +1 -0
- package/dist/src/agent-harness/mock-model.d.ts +149 -0
- package/dist/src/agent-harness/mock-model.js +291 -0
- package/dist/src/agent-harness/mock-model.js.map +1 -0
- package/dist/src/agent-harness/test-spawn.d.ts +42 -0
- package/dist/src/agent-harness/test-spawn.js +165 -0
- package/dist/src/agent-harness/test-spawn.js.map +1 -0
- package/dist/src/billing/index.js.map +1 -0
- package/dist/src/chat/__tests__/broadcast-bus.test.js +81 -0
- package/dist/src/chat/__tests__/broadcast-bus.test.js.map +1 -0
- package/dist/src/chat/__tests__/channel-manager.test.js +133 -0
- package/dist/src/chat/__tests__/channel-manager.test.js.map +1 -0
- package/dist/src/chat/__tests__/client.test.js +109 -0
- package/dist/src/chat/__tests__/client.test.js.map +1 -0
- package/dist/src/chat/__tests__/discord-integration.test.js +153 -0
- package/dist/src/chat/__tests__/discord-integration.test.js.map +1 -0
- package/dist/src/chat/__tests__/intent-prompt.test.js +80 -0
- package/dist/src/chat/__tests__/intent-prompt.test.js.map +1 -0
- package/dist/src/chat/__tests__/verdict-resolver.test.js +308 -0
- package/dist/src/chat/__tests__/verdict-resolver.test.js.map +1 -0
- package/dist/src/chat/broadcast-bus.d.ts +10 -0
- package/dist/src/chat/broadcast-bus.js +52 -0
- package/dist/src/chat/broadcast-bus.js.map +1 -0
- package/dist/src/chat/channel-manager.d.ts +16 -0
- package/dist/src/chat/channel-manager.js +121 -0
- package/dist/src/chat/channel-manager.js.map +1 -0
- package/dist/src/chat/chat-keychain.d.ts +26 -0
- package/dist/src/chat/chat-keychain.js +113 -0
- package/dist/src/chat/chat-keychain.js.map +1 -0
- package/dist/src/chat/factory.d.ts +3 -0
- package/dist/src/chat/factory.js +29 -0
- package/dist/src/chat/factory.js.map +1 -0
- package/dist/src/chat/intent-prompt.d.ts +17 -0
- package/dist/src/chat/intent-prompt.js +52 -0
- package/dist/src/chat/intent-prompt.js.map +1 -0
- package/dist/src/chat/providers/discord/client.d.ts +28 -0
- package/dist/src/chat/providers/discord/client.js +77 -0
- package/dist/src/chat/providers/discord/client.js.map +1 -0
- package/dist/src/chat/types.d.ts +51 -0
- package/dist/src/chat/types.js +8 -0
- package/dist/src/chat/types.js.map +1 -0
- package/dist/src/chat/verdict-constants.d.ts +13 -0
- package/dist/src/chat/verdict-constants.js +18 -0
- package/dist/src/chat/verdict-constants.js.map +1 -0
- package/dist/src/chat/verdict-resolver.d.ts +28 -0
- package/dist/src/chat/verdict-resolver.js +181 -0
- package/dist/src/chat/verdict-resolver.js.map +1 -0
- package/dist/src/cli/__tests__/bw-vault.test.js +87 -0
- package/dist/src/cli/__tests__/bw-vault.test.js.map +1 -0
- package/dist/src/cli/__tests__/keys-bundle.test.js +40 -0
- package/dist/src/cli/__tests__/keys-bundle.test.js.map +1 -0
- package/dist/src/cli/__tests__/share-cmd.test.js +175 -0
- package/dist/src/cli/__tests__/share-cmd.test.js.map +1 -0
- package/dist/src/cli/bw-vault.d.ts +55 -0
- package/dist/src/cli/bw-vault.js +133 -0
- package/dist/src/cli/bw-vault.js.map +1 -0
- package/dist/src/cli/config/__tests__/model-picker.test.js +56 -0
- package/dist/src/cli/config/__tests__/model-picker.test.js.map +1 -0
- package/dist/src/cli/config/__tests__/provider-fetch.test.js +38 -0
- package/dist/src/cli/config/__tests__/provider-fetch.test.js.map +1 -0
- package/dist/src/cli/config/index.d.ts +2 -0
- package/dist/src/cli/config/index.js +106 -0
- package/dist/src/cli/config/index.js.map +1 -0
- package/dist/src/cli/config/model-picker.d.ts +17 -0
- package/dist/src/cli/config/model-picker.js +149 -0
- package/dist/src/cli/config/model-picker.js.map +1 -0
- package/dist/src/cli/config/provider-fetch.d.ts +8 -0
- package/dist/src/cli/config/provider-fetch.js +59 -0
- package/dist/src/cli/config/provider-fetch.js.map +1 -0
- package/dist/src/cli/config/screen-council.d.ts +1 -0
- package/dist/src/cli/config/screen-council.js +196 -0
- package/dist/src/cli/config/screen-council.js.map +1 -0
- package/dist/src/cli/config/screen-models.d.ts +1 -0
- package/dist/src/cli/config/screen-models.js +86 -0
- package/dist/src/cli/config/screen-models.js.map +1 -0
- package/dist/src/cli/config/screen-providers.d.ts +1 -0
- package/dist/src/cli/config/screen-providers.js +167 -0
- package/dist/src/cli/config/screen-providers.js.map +1 -0
- package/dist/src/cli/config/tui.d.ts +34 -0
- package/dist/src/cli/config/tui.js +145 -0
- package/dist/src/cli/config/tui.js.map +1 -0
- package/dist/src/cli/cost-forensics.d.ts +46 -0
- package/dist/src/cli/cost-forensics.js +188 -0
- package/dist/src/cli/cost-forensics.js.map +1 -0
- package/dist/src/cli/cost-forensics.test.js +99 -0
- package/dist/src/cli/cost-forensics.test.js.map +1 -0
- package/dist/src/cli/keys-bundle.d.ts +28 -0
- package/dist/src/cli/keys-bundle.js +77 -0
- package/dist/src/cli/keys-bundle.js.map +1 -0
- package/dist/src/cli/keys.d.ts +74 -0
- package/dist/src/cli/keys.js +709 -0
- package/dist/src/cli/keys.js.map +1 -0
- package/dist/src/cli/keys.test.js +86 -0
- package/dist/src/cli/keys.test.js.map +1 -0
- package/dist/src/cli/pil-report.d.ts +17 -0
- package/dist/src/cli/pil-report.js +163 -0
- package/dist/src/cli/pil-report.js.map +1 -0
- package/dist/src/cli/share-cmd.d.ts +31 -0
- package/dist/src/cli/share-cmd.js +110 -0
- package/dist/src/cli/share-cmd.js.map +1 -0
- package/dist/src/cli/usage-report.d.ts +17 -0
- package/dist/src/cli/usage-report.js +226 -0
- package/dist/src/cli/usage-report.js.map +1 -0
- package/dist/src/cloud/index.js.map +1 -0
- package/dist/src/council/__tests__/accounting.test.js +66 -0
- package/dist/src/council/__tests__/accounting.test.js.map +1 -0
- package/dist/src/council/__tests__/audit-replay.test.js +241 -0
- package/dist/src/council/__tests__/audit-replay.test.js.map +1 -0
- package/dist/src/council/__tests__/clarifier-max-rounds.test.js +46 -0
- package/dist/src/council/__tests__/clarifier-max-rounds.test.js.map +1 -0
- package/dist/src/council/__tests__/clarifier-options.test.js +54 -0
- package/dist/src/council/__tests__/clarifier-options.test.js.map +1 -0
- package/dist/src/council/__tests__/cost-aware.test.js +49 -0
- package/dist/src/council/__tests__/cost-aware.test.js.map +1 -0
- package/dist/src/council/__tests__/debate-planner-structured.test.js +209 -0
- package/dist/src/council/__tests__/debate-planner-structured.test.js.map +1 -0
- package/dist/src/council/__tests__/evaluator-metrics.test.js +460 -0
- package/dist/src/council/__tests__/evaluator-metrics.test.js.map +1 -0
- package/dist/src/council/__tests__/parse-outcome-fallback.test.js +103 -0
- package/dist/src/council/__tests__/parse-outcome-fallback.test.js.map +1 -0
- package/dist/src/council/__tests__/research-tools.test.js +210 -0
- package/dist/src/council/__tests__/research-tools.test.js.map +1 -0
- package/dist/src/council/__tests__/round-tools.test.js +300 -0
- package/dist/src/council/__tests__/round-tools.test.js.map +1 -0
- package/dist/src/council/__tests__/tool-trace.test.js +131 -0
- package/dist/src/council/__tests__/tool-trace.test.js.map +1 -0
- package/dist/src/council/__tests__/types-contract.test.d.ts +9 -0
- package/dist/src/council/__tests__/types-contract.test.js +82 -0
- package/dist/src/council/__tests__/types-contract.test.js.map +1 -0
- package/dist/src/council/clarifier.d.ts +42 -0
- package/dist/src/council/clarifier.js +332 -0
- package/dist/src/council/clarifier.js.map +1 -0
- package/dist/src/council/context.d.ts +18 -0
- package/dist/src/council/context.js +221 -0
- package/dist/src/council/context.js.map +1 -0
- package/dist/src/council/debate-planner.d.ts +8 -0
- package/dist/src/council/debate-planner.js +243 -0
- package/dist/src/council/debate-planner.js.map +1 -0
- package/dist/src/council/debate.d.ts +4 -0
- package/dist/src/council/debate.js +1014 -0
- package/dist/src/council/debate.js.map +1 -0
- package/dist/src/council/executor.d.ts +3 -0
- package/dist/src/council/executor.js +15 -0
- package/dist/src/council/executor.js.map +1 -0
- package/dist/src/council/index.d.ts +17 -0
- package/dist/src/council/index.js +747 -0
- package/dist/src/council/index.js.map +1 -0
- package/dist/src/council/leader.d.ts +60 -0
- package/dist/src/council/leader.js +216 -0
- package/dist/src/council/leader.js.map +1 -0
- package/dist/src/council/llm.d.ts +39 -0
- package/dist/src/council/llm.js +784 -0
- package/dist/src/council/llm.js.map +1 -0
- package/dist/src/council/phase-events.d.ts +26 -0
- package/dist/src/council/phase-events.js +37 -0
- package/dist/src/council/phase-events.js.map +1 -0
- package/dist/src/council/planner.d.ts +9 -0
- package/dist/src/council/planner.js +262 -0
- package/dist/src/council/planner.js.map +1 -0
- package/dist/src/council/preflight.d.ts +10 -0
- package/dist/src/council/preflight.js +66 -0
- package/dist/src/council/preflight.js.map +1 -0
- package/dist/src/council/prompts.d.ts +97 -0
- package/dist/src/council/prompts.js +491 -0
- package/dist/src/council/prompts.js.map +1 -0
- package/dist/src/council/types.d.ts +263 -0
- package/dist/src/council/types.js.map +1 -0
- package/dist/src/daemon/scheduler.d.ts +15 -0
- package/dist/src/daemon/scheduler.js +126 -0
- package/dist/src/daemon/scheduler.js.map +1 -0
- package/dist/src/daemon/scheduler.test.js +103 -0
- package/dist/src/daemon/scheduler.test.js.map +1 -0
- package/dist/src/ee/__tests__/bb-design.test.d.ts +14 -0
- package/dist/src/ee/__tests__/bb-design.test.js +180 -0
- package/dist/src/ee/__tests__/bb-design.test.js.map +1 -0
- package/dist/src/ee/__tests__/pil-context-bridge.test.js +54 -0
- package/dist/src/ee/__tests__/pil-context-bridge.test.js.map +1 -0
- package/dist/src/ee/__tests__/pipeline.integration.test.js +151 -0
- package/dist/src/ee/__tests__/pipeline.integration.test.js.map +1 -0
- package/dist/src/ee/__tests__/render-sink-wiring.test.js +74 -0
- package/dist/src/ee/__tests__/render-sink-wiring.test.js.map +1 -0
- package/dist/src/ee/auth.d.ts +21 -0
- package/dist/src/ee/auth.js +69 -0
- package/dist/src/ee/auth.js.map +1 -0
- package/dist/src/ee/auth.test.js.map +1 -0
- package/dist/src/ee/bb-design.d.ts +54 -0
- package/dist/src/ee/bb-design.js +213 -0
- package/dist/src/ee/bb-design.js.map +1 -0
- package/dist/src/ee/bb-retrieval.d.ts +107 -0
- package/dist/src/ee/bb-retrieval.js +341 -0
- package/dist/src/ee/bb-retrieval.js.map +1 -0
- package/dist/src/ee/bridge.d.ts +102 -0
- package/dist/src/ee/bridge.js +338 -0
- package/dist/src/ee/bridge.js.map +1 -0
- package/dist/src/ee/bridge.test.js.map +1 -0
- package/dist/src/ee/client-mode.d.ts +57 -0
- package/dist/src/ee/client-mode.js +140 -0
- package/dist/src/ee/client-mode.js.map +1 -0
- package/dist/src/ee/client.js +564 -0
- package/dist/src/ee/client.js.map +1 -0
- package/dist/src/ee/client.test.js.map +1 -0
- package/dist/src/ee/council-bridge.d.ts +27 -0
- package/dist/src/ee/council-bridge.js +60 -0
- package/dist/src/ee/council-bridge.js.map +1 -0
- package/dist/src/ee/embedding-cache.js.map +1 -0
- package/dist/src/ee/extract-session.js +55 -0
- package/dist/src/ee/extract-session.js.map +1 -0
- package/dist/src/ee/extract-session.test.js +192 -0
- package/dist/src/ee/extract-session.test.js.map +1 -0
- package/dist/src/ee/health.js +64 -0
- package/dist/src/ee/health.js.map +1 -0
- package/dist/src/ee/index.d.ts +10 -0
- package/dist/src/ee/index.js +9 -0
- package/dist/src/ee/index.js.map +1 -0
- package/dist/src/ee/intercept.js +122 -0
- package/dist/src/ee/intercept.js.map +1 -0
- package/dist/src/ee/intercept.test.js +171 -0
- package/dist/src/ee/intercept.test.js.map +1 -0
- package/dist/src/ee/judge.d.ts +55 -0
- package/dist/src/ee/judge.js +111 -0
- package/dist/src/ee/judge.js.map +1 -0
- package/dist/src/ee/judge.test.js +190 -0
- package/dist/src/ee/judge.test.js.map +1 -0
- package/dist/src/ee/mistake-detector.d.ts +129 -0
- package/dist/src/ee/mistake-detector.js +272 -0
- package/dist/src/ee/mistake-detector.js.map +1 -0
- package/dist/src/ee/mistake-detector.test.js +221 -0
- package/dist/src/ee/mistake-detector.test.js.map +1 -0
- package/dist/src/ee/offline-queue.js.map +1 -0
- package/dist/src/ee/offline-queue.test.js +246 -0
- package/dist/src/ee/offline-queue.test.js.map +1 -0
- package/dist/src/ee/phase-outcome.d.ts +83 -0
- package/dist/src/ee/phase-outcome.js +98 -0
- package/dist/src/ee/phase-outcome.js.map +1 -0
- package/dist/src/ee/phase-outcome.test.js +94 -0
- package/dist/src/ee/phase-outcome.test.js.map +1 -0
- package/dist/src/ee/phase-tracker.d.ts +91 -0
- package/dist/src/ee/phase-tracker.js +154 -0
- package/dist/src/ee/phase-tracker.js.map +1 -0
- package/dist/src/ee/phase-tracker.test.js +142 -0
- package/dist/src/ee/phase-tracker.test.js.map +1 -0
- package/dist/src/ee/posttool.js.map +1 -0
- package/dist/src/ee/posttool.test.js.map +1 -0
- package/dist/src/ee/prompt-stale.js.map +1 -0
- package/dist/src/ee/prompt-stale.test.js +76 -0
- package/dist/src/ee/prompt-stale.test.js.map +1 -0
- package/dist/src/ee/render.d.ts +25 -0
- package/dist/src/ee/render.js +62 -0
- package/dist/src/ee/render.js.map +1 -0
- package/dist/src/ee/render.test.js +63 -0
- package/dist/src/ee/render.test.js.map +1 -0
- package/dist/src/ee/scope.js.map +1 -0
- package/dist/src/ee/scope.test.js.map +1 -0
- package/dist/src/ee/session-trajectory.d.ts +81 -0
- package/dist/src/ee/session-trajectory.js +168 -0
- package/dist/src/ee/session-trajectory.js.map +1 -0
- package/dist/src/ee/session-trajectory.test.js +120 -0
- package/dist/src/ee/session-trajectory.test.js.map +1 -0
- package/dist/src/ee/tenant.js.map +1 -0
- package/dist/src/ee/touch.test.js +62 -0
- package/dist/src/ee/touch.test.js.map +1 -0
- package/dist/src/ee/types.d.ts +366 -0
- package/dist/src/ee/types.js.map +1 -0
- package/dist/src/flow/__tests__/migration.test.js.map +1 -0
- package/dist/src/flow/__tests__/parser.test.js.map +1 -0
- package/dist/src/flow/__tests__/run-manager-product.test.js +49 -0
- package/dist/src/flow/__tests__/run-manager-product.test.js.map +1 -0
- package/dist/src/flow/__tests__/run-manager.test.js.map +1 -0
- package/dist/src/flow/__tests__/scaffold-checkpoint.test.js +93 -0
- package/dist/src/flow/__tests__/scaffold-checkpoint.test.js.map +1 -0
- package/dist/src/flow/__tests__/scaffold.test.js.map +1 -0
- package/dist/src/flow/__tests__/warning-persist.test.js.map +1 -0
- package/dist/src/flow/artifact-io.js.map +1 -0
- package/dist/src/flow/compaction/__tests__/compress.test.js.map +1 -0
- package/dist/src/flow/compaction/__tests__/extract.test.js.map +1 -0
- package/dist/src/flow/compaction/__tests__/preserve.test.js.map +1 -0
- package/dist/src/flow/compaction/compress.js.map +1 -0
- package/dist/src/flow/compaction/extract.js.map +1 -0
- package/dist/src/flow/compaction/index.js.map +1 -0
- package/dist/src/flow/compaction/preserve.js.map +1 -0
- package/dist/src/flow/index.js.map +1 -0
- package/dist/src/flow/migration.js.map +1 -0
- package/dist/src/flow/parser.js.map +1 -0
- package/dist/src/flow/run-manager.d.ts +38 -0
- package/dist/src/flow/run-manager.js +139 -0
- package/dist/src/flow/run-manager.js.map +1 -0
- package/dist/src/flow/scaffold-checkpoint.d.ts +63 -0
- package/dist/src/flow/scaffold-checkpoint.js +101 -0
- package/dist/src/flow/scaffold-checkpoint.js.map +1 -0
- package/dist/src/flow/scaffold.js.map +1 -0
- package/dist/src/flow/warning-persist.js.map +1 -0
- package/dist/src/generated/version.d.ts +2 -0
- package/dist/src/generated/version.js +5 -0
- package/dist/src/generated/version.js.map +1 -0
- package/dist/src/gsd/__tests__/complexity.test.js +0 -0
- package/dist/src/gsd/__tests__/complexity.test.js.map +1 -0
- package/dist/src/gsd/__tests__/directives.test.js +44 -0
- package/dist/src/gsd/__tests__/directives.test.js.map +1 -0
- package/dist/src/gsd/__tests__/gray-areas.test.js +29 -0
- package/dist/src/gsd/__tests__/gray-areas.test.js.map +1 -0
- package/dist/src/gsd/__tests__/types.test.js +65 -0
- package/dist/src/gsd/__tests__/types.test.js.map +1 -0
- package/dist/src/gsd/complexity.d.ts +28 -0
- package/dist/src/gsd/complexity.js +103 -0
- package/dist/src/gsd/complexity.js.map +1 -0
- package/dist/src/gsd/directives.d.ts +31 -0
- package/dist/src/gsd/directives.js +73 -0
- package/dist/src/gsd/directives.js.map +1 -0
- package/dist/src/gsd/gray-areas.d.ts +30 -0
- package/dist/src/gsd/gray-areas.js +97 -0
- package/dist/src/gsd/gray-areas.js.map +1 -0
- package/dist/src/gsd/index.js.map +1 -0
- package/dist/src/gsd/types.d.ts +5 -0
- package/dist/src/gsd/types.js.map +1 -0
- package/dist/src/headless/__tests__/council-answers.test.js +226 -0
- package/dist/src/headless/__tests__/council-answers.test.js.map +1 -0
- package/dist/src/headless/council-answers.d.ts +53 -0
- package/dist/src/headless/council-answers.js +77 -0
- package/dist/src/headless/council-answers.js.map +1 -0
- package/dist/src/headless/output.d.ts +68 -0
- package/dist/src/headless/output.js.map +1 -0
- package/dist/src/headless/output.test.js +178 -0
- package/dist/src/headless/output.test.js.map +1 -0
- package/dist/src/hooks/config.js.map +1 -0
- package/dist/src/hooks/index.d.ts +44 -0
- package/dist/src/hooks/index.js +471 -0
- package/dist/src/hooks/index.js.map +1 -0
- package/dist/src/hooks/types.d.ts +175 -0
- package/dist/src/hooks/types.js.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +1347 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lsp/builtins.d.ts +9 -0
- package/dist/src/lsp/builtins.js +351 -0
- package/dist/src/lsp/builtins.js.map +1 -0
- package/dist/src/lsp/builtins.test.js +91 -0
- package/dist/src/lsp/builtins.test.js.map +1 -0
- package/dist/src/lsp/client.d.ts +20 -0
- package/dist/src/lsp/client.js +290 -0
- package/dist/src/lsp/client.js.map +1 -0
- package/dist/src/lsp/manager.d.ts +20 -0
- package/dist/src/lsp/manager.js +235 -0
- package/dist/src/lsp/manager.js.map +1 -0
- package/dist/src/lsp/manager.test.js +133 -0
- package/dist/src/lsp/manager.test.js.map +1 -0
- package/dist/src/lsp/npm-cache.js.map +1 -0
- package/dist/src/lsp/npm-cache.test.js +53 -0
- package/dist/src/lsp/npm-cache.test.js.map +1 -0
- package/dist/src/lsp/runtime.d.ts +6 -0
- package/dist/src/lsp/runtime.js +53 -0
- package/dist/src/lsp/runtime.js.map +1 -0
- package/dist/src/lsp/smoke.test.js.map +1 -0
- package/dist/src/lsp/types.js.map +1 -0
- package/dist/src/mcp/__tests__/auto-setup.test.js +81 -0
- package/dist/src/mcp/__tests__/auto-setup.test.js.map +1 -0
- package/dist/src/mcp/__tests__/harness-driver-action-tools.spec.js +101 -0
- package/dist/src/mcp/__tests__/harness-driver-action-tools.spec.js.map +1 -0
- package/dist/src/mcp/__tests__/harness-driver-async-tools.spec.js +110 -0
- package/dist/src/mcp/__tests__/harness-driver-async-tools.spec.js.map +1 -0
- package/dist/src/mcp/__tests__/harness-driver-read-tools.spec.js +124 -0
- package/dist/src/mcp/__tests__/harness-driver-read-tools.spec.js.map +1 -0
- package/dist/src/mcp/__tests__/harness-driver-security.spec.js +61 -0
- package/dist/src/mcp/__tests__/harness-driver-security.spec.js.map +1 -0
- package/dist/src/mcp/__tests__/harness-driver.spec.js +20 -0
- package/dist/src/mcp/__tests__/harness-driver.spec.js.map +1 -0
- package/dist/src/mcp/__tests__/lazy-schema.spec.js +152 -0
- package/dist/src/mcp/__tests__/lazy-schema.spec.js.map +1 -0
- package/dist/src/mcp/__tests__/mcp-keychain.test.js +40 -0
- package/dist/src/mcp/__tests__/mcp-keychain.test.js.map +1 -0
- package/dist/src/mcp/__tests__/research-onboarding.test.js +148 -0
- package/dist/src/mcp/__tests__/research-onboarding.test.js.map +1 -0
- package/dist/src/mcp/__tests__/runtime-hydration.test.js +78 -0
- package/dist/src/mcp/__tests__/runtime-hydration.test.js.map +1 -0
- package/dist/src/mcp/__tests__/runtime-sanitize.test.js +40 -0
- package/dist/src/mcp/__tests__/runtime-sanitize.test.js.map +1 -0
- package/dist/src/mcp/auto-setup.js +98 -0
- package/dist/src/mcp/auto-setup.js.map +1 -0
- package/dist/src/mcp/catalog.js +145 -0
- package/dist/src/mcp/catalog.js.map +1 -0
- package/dist/src/mcp/mcp-keychain.d.ts +13 -0
- package/dist/src/mcp/mcp-keychain.js +65 -0
- package/dist/src/mcp/mcp-keychain.js.map +1 -0
- package/dist/src/mcp/oauth-callback.d.ts +16 -0
- package/dist/src/mcp/oauth-callback.js +52 -0
- package/dist/src/mcp/oauth-callback.js.map +1 -0
- package/dist/src/mcp/oauth-provider.js.map +1 -0
- package/dist/src/mcp/opentui-spawn.d.ts +11 -0
- package/dist/src/mcp/opentui-spawn.js +58 -0
- package/dist/src/mcp/opentui-spawn.js.map +1 -0
- package/dist/src/mcp/parse-headers.js.map +1 -0
- package/dist/src/mcp/parse-headers.test.js +43 -0
- package/dist/src/mcp/parse-headers.test.js.map +1 -0
- package/dist/src/mcp/research-onboarding.d.ts +20 -0
- package/dist/src/mcp/research-onboarding.js +123 -0
- package/dist/src/mcp/research-onboarding.js.map +1 -0
- package/dist/src/mcp/runtime.js +148 -0
- package/dist/src/mcp/runtime.js.map +1 -0
- package/dist/src/mcp/smoke.test.js.map +1 -0
- package/dist/src/mcp/validate.d.ts +9 -0
- package/dist/src/mcp/validate.js.map +1 -0
- package/dist/src/models/__tests__/registry.test.js +74 -0
- package/dist/src/models/__tests__/registry.test.js.map +1 -0
- package/dist/src/models/catalog-client.js +104 -0
- package/dist/src/models/catalog-client.js.map +1 -0
- package/dist/src/models/catalog.json +177 -0
- package/dist/src/models/classify-tier.js +45 -0
- package/dist/src/models/classify-tier.js.map +1 -0
- package/dist/src/models/index.d.ts +1 -0
- package/dist/src/models/index.js +2 -0
- package/dist/src/models/index.js.map +1 -0
- package/dist/src/models/registry.d.ts +20 -0
- package/dist/src/models/registry.js +68 -0
- package/dist/src/models/registry.js.map +1 -0
- package/dist/src/ops/__tests__/doctor-council-mcp.test.js +139 -0
- package/dist/src/ops/__tests__/doctor-council-mcp.test.js.map +1 -0
- package/dist/src/ops/__tests__/doctor-ee-health.test.js +113 -0
- package/dist/src/ops/__tests__/doctor-ee-health.test.js.map +1 -0
- package/dist/src/ops/bug-report.js.map +1 -0
- package/dist/src/ops/bug-report.test.js.map +1 -0
- package/dist/src/ops/doctor.js +333 -0
- package/dist/src/ops/doctor.js.map +1 -0
- package/dist/src/ops/doctor.test.js +96 -0
- package/dist/src/ops/doctor.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/batch-turn-runner.test.js +154 -0
- package/dist/src/orchestrator/__tests__/batch-turn-runner.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/council-manager.test.js +148 -0
- package/dist/src/orchestrator/__tests__/council-manager.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/cross-turn-dedup.test.js +153 -0
- package/dist/src/orchestrator/__tests__/cross-turn-dedup.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/current-call-id.test.d.ts +16 -0
- package/dist/src/orchestrator/__tests__/current-call-id.test.js +138 -0
- package/dist/src/orchestrator/__tests__/current-call-id.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/flow-resume.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/message-processor.test.js +182 -0
- package/dist/src/orchestrator/__tests__/message-processor.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/message-write-ahead.test.d.ts +22 -0
- package/dist/src/orchestrator/__tests__/message-write-ahead.test.js +149 -0
- package/dist/src/orchestrator/__tests__/message-write-ahead.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/read-path-budget.test.js +98 -0
- package/dist/src/orchestrator/__tests__/read-path-budget.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/retry-classifier.test.js +102 -0
- package/dist/src/orchestrator/__tests__/retry-classifier.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/retry-stream.test.js +151 -0
- package/dist/src/orchestrator/__tests__/retry-stream.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/route-feedback.test.js +47 -0
- package/dist/src/orchestrator/__tests__/route-feedback.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/stream-runner.test.js +100 -0
- package/dist/src/orchestrator/__tests__/stream-runner.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/usage-events-shape.test.d.ts +8 -0
- package/dist/src/orchestrator/__tests__/usage-events-shape.test.js +58 -0
- package/dist/src/orchestrator/__tests__/usage-events-shape.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/usage-normalizer-c1.test.d.ts +21 -0
- package/dist/src/orchestrator/__tests__/usage-normalizer-c1.test.js +155 -0
- package/dist/src/orchestrator/__tests__/usage-normalizer-c1.test.js.map +1 -0
- package/dist/src/orchestrator/__tests__/write-ahead.test.d.ts +20 -0
- package/dist/src/orchestrator/__tests__/write-ahead.test.js +134 -0
- package/dist/src/orchestrator/__tests__/write-ahead.test.js.map +1 -0
- package/dist/src/orchestrator/abort.js.map +1 -0
- package/dist/src/orchestrator/abort.test.js.map +1 -0
- package/dist/src/orchestrator/agent-options.d.ts +144 -0
- package/dist/src/orchestrator/agent-options.js +15 -0
- package/dist/src/orchestrator/agent-options.js.map +1 -0
- package/dist/src/orchestrator/agent.test.js +160 -0
- package/dist/src/orchestrator/agent.test.js.map +1 -0
- package/dist/src/orchestrator/batch-turn-runner.d.ts +57 -0
- package/dist/src/orchestrator/batch-turn-runner.js +312 -0
- package/dist/src/orchestrator/batch-turn-runner.js.map +1 -0
- package/dist/src/orchestrator/batch-utils.d.ts +41 -0
- package/dist/src/orchestrator/batch-utils.js +268 -0
- package/dist/src/orchestrator/batch-utils.js.map +1 -0
- package/dist/src/orchestrator/cleanup.test.d.ts +1 -0
- package/dist/src/orchestrator/cleanup.test.js +67 -0
- package/dist/src/orchestrator/cleanup.test.js.map +1 -0
- package/dist/src/orchestrator/compaction.d.ts +47 -0
- package/dist/src/orchestrator/compaction.js +491 -0
- package/dist/src/orchestrator/compaction.js.map +1 -0
- package/dist/src/orchestrator/compaction.test.d.ts +1 -0
- package/dist/src/orchestrator/compaction.test.js +146 -0
- package/dist/src/orchestrator/compaction.test.js.map +1 -0
- package/dist/src/orchestrator/council-manager.d.ts +109 -0
- package/dist/src/orchestrator/council-manager.js +480 -0
- package/dist/src/orchestrator/council-manager.js.map +1 -0
- package/dist/src/orchestrator/cross-turn-dedup.d.ts +87 -0
- package/dist/src/orchestrator/cross-turn-dedup.js +153 -0
- package/dist/src/orchestrator/cross-turn-dedup.js.map +1 -0
- package/dist/src/orchestrator/delegations.d.ts +49 -0
- package/dist/src/orchestrator/delegations.js.map +1 -0
- package/dist/src/orchestrator/delegations.test.d.ts +1 -0
- package/dist/src/orchestrator/delegations.test.js +107 -0
- package/dist/src/orchestrator/delegations.test.js.map +1 -0
- package/dist/src/orchestrator/error-utils.d.ts +7 -0
- package/dist/src/orchestrator/error-utils.js +66 -0
- package/dist/src/orchestrator/error-utils.js.map +1 -0
- package/dist/src/orchestrator/flow-resume.d.ts +24 -0
- package/dist/src/orchestrator/flow-resume.js +52 -0
- package/dist/src/orchestrator/flow-resume.js.map +1 -0
- package/dist/src/orchestrator/message-processor.d.ts +132 -0
- package/dist/src/orchestrator/message-processor.js +1675 -0
- package/dist/src/orchestrator/message-processor.js.map +1 -0
- package/dist/src/orchestrator/message-seq.d.ts +13 -0
- package/dist/src/orchestrator/message-seq.js +21 -0
- package/dist/src/orchestrator/message-seq.js.map +1 -0
- package/dist/src/orchestrator/message-seq.test.d.ts +1 -0
- package/dist/src/orchestrator/message-seq.test.js +24 -0
- package/dist/src/orchestrator/message-seq.test.js.map +1 -0
- package/dist/src/orchestrator/orchestrator.d.ts +245 -0
- package/dist/src/orchestrator/orchestrator.js +2173 -0
- package/dist/src/orchestrator/orchestrator.js.map +1 -0
- package/dist/src/orchestrator/pending-calls.js.map +1 -0
- package/dist/src/orchestrator/pending-calls.test.d.ts +1 -0
- package/dist/src/orchestrator/pending-calls.test.js.map +1 -0
- package/dist/src/orchestrator/prompts.d.ts +31 -0
- package/dist/src/orchestrator/prompts.js +387 -0
- package/dist/src/orchestrator/prompts.js.map +1 -0
- package/dist/src/orchestrator/provider-options-shape.d.ts +23 -0
- package/dist/src/orchestrator/provider-options-shape.js +68 -0
- package/dist/src/orchestrator/provider-options-shape.js.map +1 -0
- package/dist/src/orchestrator/provider-options-shape.spec.d.ts +1 -0
- package/dist/src/orchestrator/provider-options-shape.spec.js +63 -0
- package/dist/src/orchestrator/provider-options-shape.spec.js.map +1 -0
- package/dist/src/orchestrator/read-path-budget.d.ts +57 -0
- package/dist/src/orchestrator/read-path-budget.js +103 -0
- package/dist/src/orchestrator/read-path-budget.js.map +1 -0
- package/dist/src/orchestrator/reasoning.js +57 -0
- package/dist/src/orchestrator/reasoning.js.map +1 -0
- package/dist/src/orchestrator/reasoning.test.d.ts +1 -0
- package/dist/src/orchestrator/reasoning.test.js +26 -0
- package/dist/src/orchestrator/reasoning.test.js.map +1 -0
- package/dist/src/orchestrator/retry-classifier.d.ts +26 -0
- package/dist/src/orchestrator/retry-classifier.js +103 -0
- package/dist/src/orchestrator/retry-classifier.js.map +1 -0
- package/dist/src/orchestrator/retry-stream.d.ts +43 -0
- package/dist/src/orchestrator/retry-stream.js +110 -0
- package/dist/src/orchestrator/retry-stream.js.map +1 -0
- package/dist/src/orchestrator/sandbox.test.d.ts +1 -0
- package/dist/src/orchestrator/sandbox.test.js +94 -0
- package/dist/src/orchestrator/sandbox.test.js.map +1 -0
- package/dist/src/orchestrator/stream-runner.d.ts +131 -0
- package/dist/src/orchestrator/stream-runner.js +549 -0
- package/dist/src/orchestrator/stream-runner.js.map +1 -0
- package/dist/src/orchestrator/sub-agent-cap.d.ts +98 -0
- package/dist/src/orchestrator/sub-agent-cap.js +146 -0
- package/dist/src/orchestrator/sub-agent-cap.js.map +1 -0
- package/dist/src/orchestrator/sub-agent-cap.test.d.ts +1 -0
- package/dist/src/orchestrator/sub-agent-cap.test.js +170 -0
- package/dist/src/orchestrator/sub-agent-cap.test.js.map +1 -0
- package/dist/src/orchestrator/subagent-compactor.d.ts +74 -0
- package/dist/src/orchestrator/subagent-compactor.js +218 -0
- package/dist/src/orchestrator/subagent-compactor.js.map +1 -0
- package/dist/src/orchestrator/subagent-compactor.spec.d.ts +1 -0
- package/dist/src/orchestrator/subagent-compactor.spec.js +131 -0
- package/dist/src/orchestrator/subagent-compactor.spec.js.map +1 -0
- package/dist/src/orchestrator/token-counter.d.ts +27 -0
- package/dist/src/orchestrator/token-counter.js +76 -0
- package/dist/src/orchestrator/token-counter.js.map +1 -0
- package/dist/src/orchestrator/token-counter.test.d.ts +1 -0
- package/dist/src/orchestrator/token-counter.test.js +57 -0
- package/dist/src/orchestrator/token-counter.test.js.map +1 -0
- package/dist/src/orchestrator/tool-utils.d.ts +38 -0
- package/dist/src/orchestrator/tool-utils.js +201 -0
- package/dist/src/orchestrator/tool-utils.js.map +1 -0
- package/dist/src/orchestrator/turn-runner-deps.d.ts +47 -0
- package/dist/src/orchestrator/turn-runner-deps.js +14 -0
- package/dist/src/orchestrator/turn-runner-deps.js.map +1 -0
- package/dist/src/pil/__tests__/budget.test.d.ts +1 -0
- package/dist/src/pil/__tests__/budget.test.js +33 -0
- package/dist/src/pil/__tests__/budget.test.js.map +1 -0
- package/dist/src/pil/__tests__/config.test.d.ts +1 -0
- package/dist/src/pil/__tests__/config.test.js +30 -0
- package/dist/src/pil/__tests__/config.test.js.map +1 -0
- package/dist/src/pil/__tests__/dual-run.test.d.ts +1 -0
- package/dist/src/pil/__tests__/dual-run.test.js +49 -0
- package/dist/src/pil/__tests__/dual-run.test.js.map +1 -0
- package/dist/src/pil/__tests__/layer1-intent-trace.test.d.ts +1 -0
- package/dist/src/pil/__tests__/layer1-intent-trace.test.js +128 -0
- package/dist/src/pil/__tests__/layer1-intent-trace.test.js.map +1 -0
- package/dist/src/pil/__tests__/layer1-intent.test.d.ts +1 -0
- package/dist/src/pil/__tests__/layer1-intent.test.js +305 -0
- package/dist/src/pil/__tests__/layer1-intent.test.js.map +1 -0
- package/dist/src/pil/__tests__/layer2-personality.test.d.ts +1 -0
- package/dist/src/pil/__tests__/layer2-personality.test.js +57 -0
- package/dist/src/pil/__tests__/layer2-personality.test.js.map +1 -0
- package/dist/src/pil/__tests__/layer3-ee-injection.test.d.ts +1 -0
- package/dist/src/pil/__tests__/layer3-ee-injection.test.js +153 -0
- package/dist/src/pil/__tests__/layer3-ee-injection.test.js.map +1 -0
- package/dist/src/pil/__tests__/layer3-injected-chunk.test.d.ts +1 -0
- package/dist/src/pil/__tests__/layer3-injected-chunk.test.js +91 -0
- package/dist/src/pil/__tests__/layer3-injected-chunk.test.js.map +1 -0
- package/dist/src/pil/__tests__/layer4-gsd.test.d.ts +1 -0
- package/dist/src/pil/__tests__/layer4-gsd.test.js +97 -0
- package/dist/src/pil/__tests__/layer4-gsd.test.js.map +1 -0
- package/dist/src/pil/__tests__/layer5-context.test.d.ts +1 -0
- package/dist/src/pil/__tests__/layer5-context.test.js +137 -0
- package/dist/src/pil/__tests__/layer5-context.test.js.map +1 -0
- package/dist/src/pil/__tests__/layer6-output.test.d.ts +1 -0
- package/dist/src/pil/__tests__/layer6-output.test.js +237 -0
- package/dist/src/pil/__tests__/layer6-output.test.js.map +1 -0
- package/dist/src/pil/__tests__/ollama-classify.test.d.ts +1 -0
- package/dist/src/pil/__tests__/ollama-classify.test.js.map +1 -0
- package/dist/src/pil/__tests__/orchestrator-integration.test.js.map +1 -0
- package/dist/src/pil/__tests__/pipeline.test.d.ts +1 -0
- package/dist/src/pil/__tests__/pipeline.test.js +167 -0
- package/dist/src/pil/__tests__/pipeline.test.js.map +1 -0
- package/dist/src/pil/__tests__/renderer-coverage.test.d.ts +7 -0
- package/dist/src/pil/__tests__/renderer-coverage.test.js +42 -0
- package/dist/src/pil/__tests__/renderer-coverage.test.js.map +1 -0
- package/dist/src/pil/__tests__/response-tools.test.d.ts +1 -0
- package/dist/src/pil/__tests__/response-tools.test.js +142 -0
- package/dist/src/pil/__tests__/response-tools.test.js.map +1 -0
- package/dist/src/pil/__tests__/schema.test.d.ts +1 -0
- package/dist/src/pil/__tests__/schema.test.js +202 -0
- package/dist/src/pil/__tests__/schema.test.js.map +1 -0
- package/dist/src/pil/__tests__/scoreComplexity.test.d.ts +1 -0
- package/dist/src/pil/__tests__/scoreComplexity.test.js +119 -0
- package/dist/src/pil/__tests__/scoreComplexity.test.js.map +1 -0
- package/dist/src/pil/__tests__/scoreSufficiency.test.d.ts +8 -0
- package/dist/src/pil/__tests__/scoreSufficiency.test.js +89 -0
- package/dist/src/pil/__tests__/scoreSufficiency.test.js.map +1 -0
- package/dist/src/pil/__tests__/store.test.d.ts +1 -0
- package/dist/src/pil/__tests__/store.test.js.map +1 -0
- package/dist/src/pil/__tests__/task-tier-map.test.d.ts +1 -0
- package/dist/src/pil/__tests__/task-tier-map.test.js.map +1 -0
- package/dist/src/pil/budget-log.d.ts +26 -0
- package/dist/src/pil/budget-log.js +59 -0
- package/dist/src/pil/budget-log.js.map +1 -0
- package/dist/src/pil/budget.js.map +1 -0
- package/dist/src/pil/config.d.ts +7 -0
- package/dist/src/pil/config.js +14 -0
- package/dist/src/pil/config.js.map +1 -0
- package/dist/src/pil/index.d.ts +11 -0
- package/dist/src/pil/index.js +11 -0
- package/dist/src/pil/index.js.map +1 -0
- package/dist/src/pil/layer1-intent.d.ts +49 -0
- package/dist/src/pil/layer1-intent.js +514 -0
- package/dist/src/pil/layer1-intent.js.map +1 -0
- package/dist/src/pil/layer1-intent.test.d.ts +1 -0
- package/dist/src/pil/layer1-intent.test.js +98 -0
- package/dist/src/pil/layer1-intent.test.js.map +1 -0
- package/dist/src/pil/layer2-personality.js +37 -0
- package/dist/src/pil/layer2-personality.js.map +1 -0
- package/dist/src/pil/layer3-ee-injection.d.ts +18 -0
- package/dist/src/pil/layer3-ee-injection.js +305 -0
- package/dist/src/pil/layer3-ee-injection.js.map +1 -0
- package/dist/src/pil/layer4-gsd.d.ts +20 -0
- package/dist/src/pil/layer4-gsd.js +108 -0
- package/dist/src/pil/layer4-gsd.js.map +1 -0
- package/dist/src/pil/layer5-context.js +151 -0
- package/dist/src/pil/layer5-context.js.map +1 -0
- package/dist/src/pil/layer6-output.d.ts +20 -0
- package/dist/src/pil/layer6-output.js +237 -0
- package/dist/src/pil/layer6-output.js.map +1 -0
- package/dist/src/pil/ollama-classify.js.map +1 -0
- package/dist/src/pil/pipeline.d.ts +23 -0
- package/dist/src/pil/pipeline.js +182 -0
- package/dist/src/pil/pipeline.js.map +1 -0
- package/dist/src/pil/response-tools.d.ts +63 -0
- package/dist/src/pil/response-tools.js +87 -0
- package/dist/src/pil/response-tools.js.map +1 -0
- package/dist/src/pil/schema.d.ts +160 -0
- package/dist/src/pil/schema.js +88 -0
- package/dist/src/pil/schema.js.map +1 -0
- package/dist/src/pil/store.js.map +1 -0
- package/dist/src/pil/task-tier-map.js.map +1 -0
- package/dist/src/pil/timeout.js.map +1 -0
- package/dist/src/pil/types.d.ts +149 -0
- package/dist/src/pil/types.js.map +1 -0
- package/dist/src/product-loop/__tests__/artifact-io.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/artifact-io.test.js +83 -0
- package/dist/src/product-loop/__tests__/artifact-io.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/assumption-ledger.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/assumption-ledger.test.js +261 -0
- package/dist/src/product-loop/__tests__/assumption-ledger.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/cb2-retry-bonus.test.d.ts +13 -0
- package/dist/src/product-loop/__tests__/cb2-retry-bonus.test.js +158 -0
- package/dist/src/product-loop/__tests__/cb2-retry-bonus.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/circuit-breakers-coverage.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/circuit-breakers-coverage.test.js +67 -0
- package/dist/src/product-loop/__tests__/circuit-breakers-coverage.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/circuit-breakers.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/circuit-breakers.test.js +79 -0
- package/dist/src/product-loop/__tests__/circuit-breakers.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/complexity-routing.spec.d.ts +11 -0
- package/dist/src/product-loop/__tests__/complexity-routing.spec.js +134 -0
- package/dist/src/product-loop/__tests__/complexity-routing.spec.js.map +1 -0
- package/dist/src/product-loop/__tests__/context-policy.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/context-policy.test.js +266 -0
- package/dist/src/product-loop/__tests__/context-policy.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/cost-preview.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/cost-preview.test.js +111 -0
- package/dist/src/product-loop/__tests__/cost-preview.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/cost-scoper.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/cost-scoper.test.js +50 -0
- package/dist/src/product-loop/__tests__/cost-scoper.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/cross-run-memory.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/cross-run-memory.test.js +168 -0
- package/dist/src/product-loop/__tests__/cross-run-memory.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/design-output.spec.d.ts +1 -0
- package/dist/src/product-loop/__tests__/design-output.spec.js +36 -0
- package/dist/src/product-loop/__tests__/design-output.spec.js.map +1 -0
- package/dist/src/product-loop/__tests__/discover.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/discover.test.js +83 -0
- package/dist/src/product-loop/__tests__/discover.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/discovery-council-runner.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/discovery-council-runner.test.js +13 -0
- package/dist/src/product-loop/__tests__/discovery-council-runner.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/discovery-detection.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/discovery-detection.test.js +151 -0
- package/dist/src/product-loop/__tests__/discovery-detection.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/discovery-ecosystem.test.d.ts +8 -0
- package/dist/src/product-loop/__tests__/discovery-ecosystem.test.js +110 -0
- package/dist/src/product-loop/__tests__/discovery-ecosystem.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/discovery-integration.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/discovery-integration.test.js +126 -0
- package/dist/src/product-loop/__tests__/discovery-integration.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/discovery-interview.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/discovery-interview.test.js +292 -0
- package/dist/src/product-loop/__tests__/discovery-interview.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/discovery-migrations.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/discovery-migrations.test.js +69 -0
- package/dist/src/product-loop/__tests__/discovery-migrations.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/discovery-persistence.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/discovery-persistence.test.js +146 -0
- package/dist/src/product-loop/__tests__/discovery-persistence.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/discovery-prompt-parser.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/discovery-prompt-parser.test.js +65 -0
- package/dist/src/product-loop/__tests__/discovery-prompt-parser.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/discovery-recommender-ecosystem.test.d.ts +9 -0
- package/dist/src/product-loop/__tests__/discovery-recommender-ecosystem.test.js +86 -0
- package/dist/src/product-loop/__tests__/discovery-recommender-ecosystem.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/discovery-recommender.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/discovery-recommender.test.js +316 -0
- package/dist/src/product-loop/__tests__/discovery-recommender.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/discovery-schema.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/discovery-schema.test.js +77 -0
- package/dist/src/product-loop/__tests__/discovery-schema.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/done-gate-coverage.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/done-gate-coverage.test.js +135 -0
- package/dist/src/product-loop/__tests__/done-gate-coverage.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/done-gate.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/done-gate.test.js +122 -0
- package/dist/src/product-loop/__tests__/done-gate.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/ee-extract-wiring.test.d.ts +8 -0
- package/dist/src/product-loop/__tests__/ee-extract-wiring.test.js +181 -0
- package/dist/src/product-loop/__tests__/ee-extract-wiring.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/extract-to-ee.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/extract-to-ee.test.js +161 -0
- package/dist/src/product-loop/__tests__/extract-to-ee.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/feedback-routing.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/feedback-routing.test.js +83 -0
- package/dist/src/product-loop/__tests__/feedback-routing.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/hot-path.spec.d.ts +11 -0
- package/dist/src/product-loop/__tests__/hot-path.spec.js +146 -0
- package/dist/src/product-loop/__tests__/hot-path.spec.js.map +1 -0
- package/dist/src/product-loop/__tests__/integration.test.d.ts +7 -0
- package/dist/src/product-loop/__tests__/integration.test.js +296 -0
- package/dist/src/product-loop/__tests__/integration.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/loop-driver-audit.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/loop-driver-audit.test.js +264 -0
- package/dist/src/product-loop/__tests__/loop-driver-audit.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/loop-driver.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/loop-driver.test.js +220 -0
- package/dist/src/product-loop/__tests__/loop-driver.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/phase-budget.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/phase-budget.test.js +149 -0
- package/dist/src/product-loop/__tests__/phase-budget.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/phase-orchestrator-integration.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/phase-orchestrator-integration.test.js +138 -0
- package/dist/src/product-loop/__tests__/phase-orchestrator-integration.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/phase-plan.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/phase-plan.test.js +208 -0
- package/dist/src/product-loop/__tests__/phase-plan.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/phase-rituals.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/phase-rituals.test.js +174 -0
- package/dist/src/product-loop/__tests__/phase-rituals.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/phase-runner.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/phase-runner.test.js +414 -0
- package/dist/src/product-loop/__tests__/phase-runner.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/phase-tracker-bridge.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/phase-tracker-bridge.test.js +67 -0
- package/dist/src/product-loop/__tests__/phase-tracker-bridge.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/product-identity.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/product-identity.test.js +40 -0
- package/dist/src/product-loop/__tests__/product-identity.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/reality-anchor.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/reality-anchor.test.js +49 -0
- package/dist/src/product-loop/__tests__/reality-anchor.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/repo-audit.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/repo-audit.test.js +97 -0
- package/dist/src/product-loop/__tests__/repo-audit.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/role-memory.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/role-memory.test.js +56 -0
- package/dist/src/product-loop/__tests__/role-memory.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/role-registry.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/role-registry.test.js +222 -0
- package/dist/src/product-loop/__tests__/role-registry.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/role-routing-ee.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/role-routing-ee.test.js +79 -0
- package/dist/src/product-loop/__tests__/role-routing-ee.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/route-decision-emit.test.d.ts +10 -0
- package/dist/src/product-loop/__tests__/route-decision-emit.test.js +173 -0
- package/dist/src/product-loop/__tests__/route-decision-emit.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/seed-questions.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/seed-questions.test.js +30 -0
- package/dist/src/product-loop/__tests__/seed-questions.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/ship-polish.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/ship-polish.test.js +96 -0
- package/dist/src/product-loop/__tests__/ship-polish.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/sprint-runner-emit.test.d.ts +14 -0
- package/dist/src/product-loop/__tests__/sprint-runner-emit.test.js +279 -0
- package/dist/src/product-loop/__tests__/sprint-runner-emit.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/sprint-runner.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/sprint-runner.test.js +432 -0
- package/dist/src/product-loop/__tests__/sprint-runner.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/stakeholder-acl.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/stakeholder-acl.test.js +83 -0
- package/dist/src/product-loop/__tests__/stakeholder-acl.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/state-md-ee-injections.test.d.ts +8 -0
- package/dist/src/product-loop/__tests__/state-md-ee-injections.test.js +182 -0
- package/dist/src/product-loop/__tests__/state-md-ee-injections.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/sufficiency-routing.spec.d.ts +12 -0
- package/dist/src/product-loop/__tests__/sufficiency-routing.spec.js +134 -0
- package/dist/src/product-loop/__tests__/sufficiency-routing.spec.js.map +1 -0
- package/dist/src/product-loop/__tests__/typed-artifacts.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/typed-artifacts.test.js +222 -0
- package/dist/src/product-loop/__tests__/typed-artifacts.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/types.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/types.test.js +79 -0
- package/dist/src/product-loop/__tests__/types.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/verify-failure-threshold.test.d.ts +9 -0
- package/dist/src/product-loop/__tests__/verify-failure-threshold.test.js +145 -0
- package/dist/src/product-loop/__tests__/verify-failure-threshold.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/verify-failure-tracking.test.d.ts +4 -0
- package/dist/src/product-loop/__tests__/verify-failure-tracking.test.js +122 -0
- package/dist/src/product-loop/__tests__/verify-failure-tracking.test.js.map +1 -0
- package/dist/src/product-loop/__tests__/verify-result.test.d.ts +1 -0
- package/dist/src/product-loop/__tests__/verify-result.test.js +53 -0
- package/dist/src/product-loop/__tests__/verify-result.test.js.map +1 -0
- package/dist/src/product-loop/artifact-io.d.ts +41 -0
- package/dist/src/product-loop/artifact-io.js +223 -0
- package/dist/src/product-loop/artifact-io.js.map +1 -0
- package/dist/src/product-loop/assumption-ledger.d.ts +101 -0
- package/dist/src/product-loop/assumption-ledger.js +190 -0
- package/dist/src/product-loop/assumption-ledger.js.map +1 -0
- package/dist/src/product-loop/circuit-breakers.d.ts +34 -0
- package/dist/src/product-loop/circuit-breakers.js +54 -0
- package/dist/src/product-loop/circuit-breakers.js.map +1 -0
- package/dist/src/product-loop/context-policy.d.ts +29 -0
- package/dist/src/product-loop/context-policy.js +141 -0
- package/dist/src/product-loop/context-policy.js.map +1 -0
- package/dist/src/product-loop/cost-preview.d.ts +46 -0
- package/dist/src/product-loop/cost-preview.js +75 -0
- package/dist/src/product-loop/cost-preview.js.map +1 -0
- package/dist/src/product-loop/cost-scoper.d.ts +21 -0
- package/dist/src/product-loop/cost-scoper.js +33 -0
- package/dist/src/product-loop/cost-scoper.js.map +1 -0
- package/dist/src/product-loop/cross-run-memory.d.ts +73 -0
- package/dist/src/product-loop/cross-run-memory.js +390 -0
- package/dist/src/product-loop/cross-run-memory.js.map +1 -0
- package/dist/src/product-loop/design-output.d.ts +4 -0
- package/dist/src/product-loop/design-output.js +21 -0
- package/dist/src/product-loop/design-output.js.map +1 -0
- package/dist/src/product-loop/discover.d.ts +25 -0
- package/dist/src/product-loop/discover.js +113 -0
- package/dist/src/product-loop/discover.js.map +1 -0
- package/dist/src/product-loop/discovery-context-format.d.ts +2 -0
- package/dist/src/product-loop/discovery-context-format.js +22 -0
- package/dist/src/product-loop/discovery-context-format.js.map +1 -0
- package/dist/src/product-loop/discovery-council-runner.d.ts +25 -0
- package/dist/src/product-loop/discovery-council-runner.js +66 -0
- package/dist/src/product-loop/discovery-council-runner.js.map +1 -0
- package/dist/src/product-loop/discovery-detection.d.ts +2 -0
- package/dist/src/product-loop/discovery-detection.js +163 -0
- package/dist/src/product-loop/discovery-detection.js.map +1 -0
- package/dist/src/product-loop/discovery-ecosystem.d.ts +57 -0
- package/dist/src/product-loop/discovery-ecosystem.js +106 -0
- package/dist/src/product-loop/discovery-ecosystem.js.map +1 -0
- package/dist/src/product-loop/discovery-interview.d.ts +40 -0
- package/dist/src/product-loop/discovery-interview.js +176 -0
- package/dist/src/product-loop/discovery-interview.js.map +1 -0
- package/dist/src/product-loop/discovery-migrations.d.ts +5 -0
- package/dist/src/product-loop/discovery-migrations.js +39 -0
- package/dist/src/product-loop/discovery-migrations.js.map +1 -0
- package/dist/src/product-loop/discovery-persistence.d.ts +19 -0
- package/dist/src/product-loop/discovery-persistence.js +182 -0
- package/dist/src/product-loop/discovery-persistence.js.map +1 -0
- package/dist/src/product-loop/discovery-prompt-parser.d.ts +15 -0
- package/dist/src/product-loop/discovery-prompt-parser.js +64 -0
- package/dist/src/product-loop/discovery-prompt-parser.js.map +1 -0
- package/dist/src/product-loop/discovery-recommender.d.ts +50 -0
- package/dist/src/product-loop/discovery-recommender.js +288 -0
- package/dist/src/product-loop/discovery-recommender.js.map +1 -0
- package/dist/src/product-loop/discovery-schema.d.ts +33 -0
- package/dist/src/product-loop/discovery-schema.js +120 -0
- package/dist/src/product-loop/discovery-schema.js.map +1 -0
- package/dist/src/product-loop/done-gate.d.ts +6 -0
- package/dist/src/product-loop/done-gate.js +196 -0
- package/dist/src/product-loop/done-gate.js.map +1 -0
- package/dist/src/product-loop/feedback-routing.d.ts +27 -0
- package/dist/src/product-loop/feedback-routing.js +64 -0
- package/dist/src/product-loop/feedback-routing.js.map +1 -0
- package/dist/src/product-loop/gather.d.ts +17 -0
- package/dist/src/product-loop/gather.js +253 -0
- package/dist/src/product-loop/gather.js.map +1 -0
- package/dist/src/product-loop/index.d.ts +74 -0
- package/dist/src/product-loop/index.js +1154 -0
- package/dist/src/product-loop/index.js.map +1 -0
- package/dist/src/product-loop/loop-driver.d.ts +4 -0
- package/dist/src/product-loop/loop-driver.js +824 -0
- package/dist/src/product-loop/loop-driver.js.map +1 -0
- package/dist/src/product-loop/phase-budget.d.ts +65 -0
- package/dist/src/product-loop/phase-budget.js +114 -0
- package/dist/src/product-loop/phase-budget.js.map +1 -0
- package/dist/src/product-loop/phase-plan.d.ts +21 -0
- package/dist/src/product-loop/phase-plan.js +140 -0
- package/dist/src/product-loop/phase-plan.js.map +1 -0
- package/dist/src/product-loop/phase-rituals.d.ts +38 -0
- package/dist/src/product-loop/phase-rituals.js +106 -0
- package/dist/src/product-loop/phase-rituals.js.map +1 -0
- package/dist/src/product-loop/phase-runner.d.ts +28 -0
- package/dist/src/product-loop/phase-runner.js +383 -0
- package/dist/src/product-loop/phase-runner.js.map +1 -0
- package/dist/src/product-loop/phase-tracker-bridge.d.ts +27 -0
- package/dist/src/product-loop/phase-tracker-bridge.js +37 -0
- package/dist/src/product-loop/phase-tracker-bridge.js.map +1 -0
- package/dist/src/product-loop/product-identity.d.ts +1 -0
- package/dist/src/product-loop/product-identity.js +10 -0
- package/dist/src/product-loop/product-identity.js.map +1 -0
- package/dist/src/product-loop/reality-anchor.d.ts +19 -0
- package/dist/src/product-loop/reality-anchor.js +39 -0
- package/dist/src/product-loop/reality-anchor.js.map +1 -0
- package/dist/src/product-loop/repo-audit.d.ts +46 -0
- package/dist/src/product-loop/repo-audit.js +300 -0
- package/dist/src/product-loop/repo-audit.js.map +1 -0
- package/dist/src/product-loop/role-memory.d.ts +13 -0
- package/dist/src/product-loop/role-memory.js +63 -0
- package/dist/src/product-loop/role-memory.js.map +1 -0
- package/dist/src/product-loop/role-registry.d.ts +22 -0
- package/dist/src/product-loop/role-registry.js +146 -0
- package/dist/src/product-loop/role-registry.js.map +1 -0
- package/dist/src/product-loop/seed-questions.d.ts +7 -0
- package/dist/src/product-loop/seed-questions.js +50 -0
- package/dist/src/product-loop/seed-questions.js.map +1 -0
- package/dist/src/product-loop/ship-polish.d.ts +29 -0
- package/dist/src/product-loop/ship-polish.js +134 -0
- package/dist/src/product-loop/ship-polish.js.map +1 -0
- package/dist/src/product-loop/sprint-runner.d.ts +63 -0
- package/dist/src/product-loop/sprint-runner.js +515 -0
- package/dist/src/product-loop/sprint-runner.js.map +1 -0
- package/dist/src/product-loop/stakeholder-acl.d.ts +16 -0
- package/dist/src/product-loop/stakeholder-acl.js +66 -0
- package/dist/src/product-loop/stakeholder-acl.js.map +1 -0
- package/dist/src/product-loop/typed-artifacts.d.ts +77 -0
- package/dist/src/product-loop/typed-artifacts.js +262 -0
- package/dist/src/product-loop/typed-artifacts.js.map +1 -0
- package/dist/src/product-loop/types.d.ts +395 -0
- package/dist/src/product-loop/types.js +2 -0
- package/dist/src/product-loop/types.js.map +1 -0
- package/dist/src/product-loop/verify-failure-tracking.d.ts +76 -0
- package/dist/src/product-loop/verify-failure-tracking.js +172 -0
- package/dist/src/product-loop/verify-failure-tracking.js.map +1 -0
- package/dist/src/product-loop/verify-result.d.ts +18 -0
- package/dist/src/product-loop/verify-result.js +31 -0
- package/dist/src/product-loop/verify-result.js.map +1 -0
- package/dist/src/providers/__test-utils__/load-fixture.js.map +1 -0
- package/dist/src/providers/__tests__/adapter-oauth-wiring.test.d.ts +8 -0
- package/dist/src/providers/__tests__/adapter-oauth-wiring.test.js +109 -0
- package/dist/src/providers/__tests__/adapter-oauth-wiring.test.js.map +1 -0
- package/dist/src/providers/__tests__/capabilities-cosmetic.test.d.ts +1 -0
- package/dist/src/providers/__tests__/capabilities-cosmetic.test.js +109 -0
- package/dist/src/providers/__tests__/capabilities-cosmetic.test.js.map +1 -0
- package/dist/src/providers/__tests__/capabilities-flags.test.d.ts +1 -0
- package/dist/src/providers/__tests__/capabilities-flags.test.js +145 -0
- package/dist/src/providers/__tests__/capabilities-flags.test.js.map +1 -0
- package/dist/src/providers/__tests__/capabilities-provider-options.test.d.ts +1 -0
- package/dist/src/providers/__tests__/capabilities-provider-options.test.js +179 -0
- package/dist/src/providers/__tests__/capabilities-provider-options.test.js.map +1 -0
- package/dist/src/providers/__tests__/capabilities-sanitize.test.d.ts +1 -0
- package/dist/src/providers/__tests__/capabilities-sanitize.test.js +75 -0
- package/dist/src/providers/__tests__/capabilities-sanitize.test.js.map +1 -0
- package/dist/src/providers/__tests__/capabilities.test.d.ts +1 -0
- package/dist/src/providers/__tests__/capabilities.test.js +41 -0
- package/dist/src/providers/__tests__/capabilities.test.js.map +1 -0
- package/dist/src/providers/__tests__/provider-coverage.test.d.ts +1 -0
- package/dist/src/providers/__tests__/provider-coverage.test.js +45 -0
- package/dist/src/providers/__tests__/provider-coverage.test.js.map +1 -0
- package/dist/src/providers/__tests__/runtime-integration.test.d.ts +1 -0
- package/dist/src/providers/__tests__/runtime-integration.test.js +86 -0
- package/dist/src/providers/__tests__/runtime-integration.test.js.map +1 -0
- package/dist/src/providers/__tests__/runtime.test.d.ts +1 -0
- package/dist/src/providers/__tests__/runtime.test.js +83 -0
- package/dist/src/providers/__tests__/runtime.test.js.map +1 -0
- package/dist/src/providers/__tests__/siliconflow-history.test.d.ts +1 -0
- package/dist/src/providers/__tests__/siliconflow-history.test.js +76 -0
- package/dist/src/providers/__tests__/siliconflow-history.test.js.map +1 -0
- package/dist/src/providers/__tests__/strategies-registry.test.d.ts +8 -0
- package/dist/src/providers/__tests__/strategies-registry.test.js +49 -0
- package/dist/src/providers/__tests__/strategies-registry.test.js.map +1 -0
- package/dist/src/providers/__tests__/strategies-resolve.test.d.ts +12 -0
- package/dist/src/providers/__tests__/strategies-resolve.test.js +128 -0
- package/dist/src/providers/__tests__/strategies-resolve.test.js.map +1 -0
- package/dist/src/providers/__tests__/wire-debug.test.d.ts +1 -0
- package/dist/src/providers/__tests__/wire-debug.test.js +39 -0
- package/dist/src/providers/__tests__/wire-debug.test.js.map +1 -0
- package/dist/src/providers/adapter.d.ts +61 -0
- package/dist/src/providers/adapter.js +127 -0
- package/dist/src/providers/adapter.js.map +1 -0
- package/dist/src/providers/adapter.test.d.ts +1 -0
- package/dist/src/providers/adapter.test.js.map +1 -0
- package/dist/src/providers/anthropic.js +146 -0
- package/dist/src/providers/anthropic.js.map +1 -0
- package/dist/src/providers/auth/__tests__/browser-flow.test.d.ts +8 -0
- package/dist/src/providers/auth/__tests__/browser-flow.test.js +186 -0
- package/dist/src/providers/auth/__tests__/browser-flow.test.js.map +1 -0
- package/dist/src/providers/auth/__tests__/device-flow.test.d.ts +6 -0
- package/dist/src/providers/auth/__tests__/device-flow.test.js +219 -0
- package/dist/src/providers/auth/__tests__/device-flow.test.js.map +1 -0
- package/dist/src/providers/auth/__tests__/gemini-oauth.test.d.ts +8 -0
- package/dist/src/providers/auth/__tests__/gemini-oauth.test.js +310 -0
- package/dist/src/providers/auth/__tests__/gemini-oauth.test.js.map +1 -0
- package/dist/src/providers/auth/__tests__/openai-oauth.test.d.ts +7 -0
- package/dist/src/providers/auth/__tests__/openai-oauth.test.js +309 -0
- package/dist/src/providers/auth/__tests__/openai-oauth.test.js.map +1 -0
- package/dist/src/providers/auth/__tests__/token-store.test.d.ts +7 -0
- package/dist/src/providers/auth/__tests__/token-store.test.js +125 -0
- package/dist/src/providers/auth/__tests__/token-store.test.js.map +1 -0
- package/dist/src/providers/auth/browser-flow.d.ts +60 -0
- package/dist/src/providers/auth/browser-flow.js +78 -0
- package/dist/src/providers/auth/browser-flow.js.map +1 -0
- package/dist/src/providers/auth/device-flow.d.ts +66 -0
- package/dist/src/providers/auth/device-flow.js +147 -0
- package/dist/src/providers/auth/device-flow.js.map +1 -0
- package/dist/src/providers/auth/gemini-oauth.d.ts +55 -0
- package/dist/src/providers/auth/gemini-oauth.js +294 -0
- package/dist/src/providers/auth/gemini-oauth.js.map +1 -0
- package/dist/src/providers/auth/openai-oauth.d.ts +60 -0
- package/dist/src/providers/auth/openai-oauth.js +373 -0
- package/dist/src/providers/auth/openai-oauth.js.map +1 -0
- package/dist/src/providers/auth/registry.d.ts +65 -0
- package/dist/src/providers/auth/registry.js +82 -0
- package/dist/src/providers/auth/registry.js.map +1 -0
- package/dist/src/providers/auth/token-store.d.ts +28 -0
- package/dist/src/providers/auth/token-store.js +134 -0
- package/dist/src/providers/auth/token-store.js.map +1 -0
- package/dist/src/providers/auth/types.d.ts +77 -0
- package/dist/src/providers/auth/types.js +30 -0
- package/dist/src/providers/auth/types.js.map +1 -0
- package/dist/src/providers/capabilities.d.ts +135 -0
- package/dist/src/providers/capabilities.js +241 -0
- package/dist/src/providers/capabilities.js.map +1 -0
- package/dist/src/providers/endpoints.d.ts +25 -0
- package/dist/src/providers/endpoints.js +58 -0
- package/dist/src/providers/endpoints.js.map +1 -0
- package/dist/src/providers/errors.js.map +1 -0
- package/dist/src/providers/errors.test.d.ts +1 -0
- package/dist/src/providers/errors.test.js.map +1 -0
- package/dist/src/providers/gemini.js +38 -0
- package/dist/src/providers/gemini.js.map +1 -0
- package/dist/src/providers/gemini.test.d.ts +1 -0
- package/dist/src/providers/gemini.test.js.map +1 -0
- package/dist/src/providers/index.d.ts +11 -0
- package/dist/src/providers/index.js +15 -0
- package/dist/src/providers/index.js.map +1 -0
- package/dist/src/providers/keychain.d.ts +66 -0
- package/dist/src/providers/keychain.js +250 -0
- package/dist/src/providers/keychain.js.map +1 -0
- package/dist/src/providers/keychain.test.d.ts +1 -0
- package/dist/src/providers/keychain.test.js +84 -0
- package/dist/src/providers/keychain.test.js.map +1 -0
- package/dist/src/providers/mcp-vision-bridge.d.ts +60 -0
- package/dist/src/providers/mcp-vision-bridge.js +861 -0
- package/dist/src/providers/mcp-vision-bridge.js.map +1 -0
- package/dist/src/providers/mcp-vision-bridge.test.d.ts +1 -0
- package/dist/src/providers/mcp-vision-bridge.test.js +381 -0
- package/dist/src/providers/mcp-vision-bridge.test.js.map +1 -0
- package/dist/src/providers/ollama.js.map +1 -0
- package/dist/src/providers/ollama.test.d.ts +1 -0
- package/dist/src/providers/ollama.test.js.map +1 -0
- package/dist/src/providers/openai-compatible.js +54 -0
- package/dist/src/providers/openai-compatible.js.map +1 -0
- package/dist/src/providers/openai-compatible.test.d.ts +1 -0
- package/dist/src/providers/openai-compatible.test.js +53 -0
- package/dist/src/providers/openai-compatible.test.js.map +1 -0
- package/dist/src/providers/openai.d.ts +22 -0
- package/dist/src/providers/openai.js +46 -0
- package/dist/src/providers/openai.js.map +1 -0
- package/dist/src/providers/openai.test.d.ts +1 -0
- package/dist/src/providers/openai.test.js.map +1 -0
- package/dist/src/providers/patch-zod-schema.js +120 -0
- package/dist/src/providers/patch-zod-schema.js.map +1 -0
- package/dist/src/providers/pricing.d.ts +35 -0
- package/dist/src/providers/pricing.js +92 -0
- package/dist/src/providers/pricing.js.map +1 -0
- package/dist/src/providers/pricing.test.d.ts +1 -0
- package/dist/src/providers/pricing.test.js +55 -0
- package/dist/src/providers/pricing.test.js.map +1 -0
- package/dist/src/providers/prompt-cache-key.spec.d.ts +5 -0
- package/dist/src/providers/prompt-cache-key.spec.js +24 -0
- package/dist/src/providers/prompt-cache-key.spec.js.map +1 -0
- package/dist/src/providers/runtime-mock.spec.d.ts +8 -0
- package/dist/src/providers/runtime-mock.spec.js +69 -0
- package/dist/src/providers/runtime-mock.spec.js.map +1 -0
- package/dist/src/providers/runtime.d.ts +90 -0
- package/dist/src/providers/runtime.js +226 -0
- package/dist/src/providers/runtime.js.map +1 -0
- package/dist/src/providers/siliconflow-history.d.ts +50 -0
- package/dist/src/providers/siliconflow-history.js +64 -0
- package/dist/src/providers/siliconflow-history.js.map +1 -0
- package/dist/src/providers/strategies/anthropic.strategy.d.ts +15 -0
- package/dist/src/providers/strategies/anthropic.strategy.js +21 -0
- package/dist/src/providers/strategies/anthropic.strategy.js.map +1 -0
- package/dist/src/providers/strategies/base.strategy.d.ts +52 -0
- package/dist/src/providers/strategies/base.strategy.js +38 -0
- package/dist/src/providers/strategies/base.strategy.js.map +1 -0
- package/dist/src/providers/strategies/deepseek.strategy.d.ts +14 -0
- package/dist/src/providers/strategies/deepseek.strategy.js +22 -0
- package/dist/src/providers/strategies/deepseek.strategy.js.map +1 -0
- package/dist/src/providers/strategies/google.strategy.d.ts +15 -0
- package/dist/src/providers/strategies/google.strategy.js +24 -0
- package/dist/src/providers/strategies/google.strategy.js.map +1 -0
- package/dist/src/providers/strategies/ollama.strategy.d.ts +15 -0
- package/dist/src/providers/strategies/ollama.strategy.js +18 -0
- package/dist/src/providers/strategies/ollama.strategy.js.map +1 -0
- package/dist/src/providers/strategies/openai.strategy.d.ts +23 -0
- package/dist/src/providers/strategies/openai.strategy.js +48 -0
- package/dist/src/providers/strategies/openai.strategy.js.map +1 -0
- package/dist/src/providers/strategies/registry.d.ts +14 -0
- package/dist/src/providers/strategies/registry.js +37 -0
- package/dist/src/providers/strategies/registry.js.map +1 -0
- package/dist/src/providers/strategies/siliconflow.strategy.d.ts +14 -0
- package/dist/src/providers/strategies/siliconflow.strategy.js +22 -0
- package/dist/src/providers/strategies/siliconflow.strategy.js.map +1 -0
- package/dist/src/providers/strategies/xai.strategy.d.ts +14 -0
- package/dist/src/providers/strategies/xai.strategy.js +22 -0
- package/dist/src/providers/strategies/xai.strategy.js.map +1 -0
- package/dist/src/providers/stream-loop.d.ts +20 -0
- package/dist/src/providers/stream-loop.js +79 -0
- package/dist/src/providers/stream-loop.js.map +1 -0
- package/dist/src/providers/types.d.ts +128 -0
- package/dist/src/providers/types.js +31 -0
- package/dist/src/providers/types.js.map +1 -0
- package/dist/src/providers/vision-proxy.js +256 -0
- package/dist/src/providers/vision-proxy.js.map +1 -0
- package/dist/src/providers/vision-proxy.test.d.ts +1 -0
- package/dist/src/providers/vision-proxy.test.js +212 -0
- package/dist/src/providers/vision-proxy.test.js.map +1 -0
- package/dist/src/providers/wire-debug.d.ts +28 -0
- package/dist/src/providers/wire-debug.js +146 -0
- package/dist/src/providers/wire-debug.js.map +1 -0
- package/dist/src/router/__tests__/step-router.test.d.ts +4 -0
- package/dist/src/router/__tests__/step-router.test.js +131 -0
- package/dist/src/router/__tests__/step-router.test.js.map +1 -0
- package/dist/src/router/classifier/grammars.js.map +1 -0
- package/dist/src/router/classifier/index.js.map +1 -0
- package/dist/src/router/classifier/index.test.d.ts +1 -0
- package/dist/src/router/classifier/index.test.js.map +1 -0
- package/dist/src/router/classifier/regex.js +104 -0
- package/dist/src/router/classifier/regex.js.map +1 -0
- package/dist/src/router/classifier/regex.test.d.ts +1 -0
- package/dist/src/router/classifier/regex.test.js.map +1 -0
- package/dist/src/router/classifier/tree-sitter.js.map +1 -0
- package/dist/src/router/classifier/tree-sitter.test.d.ts +1 -0
- package/dist/src/router/classifier/tree-sitter.test.js.map +1 -0
- package/dist/src/router/cold.js.map +1 -0
- package/dist/src/router/cold.test.d.ts +1 -0
- package/dist/src/router/cold.test.js +56 -0
- package/dist/src/router/cold.test.js.map +1 -0
- package/dist/src/router/decide.js +410 -0
- package/dist/src/router/decide.js.map +1 -0
- package/dist/src/router/decide.test.d.ts +1 -0
- package/dist/src/router/decide.test.js +116 -0
- package/dist/src/router/decide.test.js.map +1 -0
- package/dist/src/router/health.js.map +1 -0
- package/dist/src/router/health.test.d.ts +1 -0
- package/dist/src/router/health.test.js.map +1 -0
- package/dist/src/router/provider-sentinel.d.ts +16 -0
- package/dist/src/router/provider-sentinel.js +18 -0
- package/dist/src/router/provider-sentinel.js.map +1 -0
- package/dist/src/router/provider-sentinel.test.d.ts +1 -0
- package/dist/src/router/provider-sentinel.test.js +20 -0
- package/dist/src/router/provider-sentinel.test.js.map +1 -0
- package/dist/src/router/step-router.d.ts +57 -0
- package/dist/src/router/step-router.js +143 -0
- package/dist/src/router/step-router.js.map +1 -0
- package/dist/src/router/store.js.map +1 -0
- package/dist/src/router/types.js +2 -0
- package/dist/src/router/types.js.map +1 -0
- package/dist/src/router/warm.js +46 -0
- package/dist/src/router/warm.js.map +1 -0
- package/dist/src/router/warm.test.d.ts +1 -0
- package/dist/src/router/warm.test.js +144 -0
- package/dist/src/router/warm.test.js.map +1 -0
- package/dist/src/scaffold/__tests__/continuation-prompt.test.d.ts +4 -0
- package/dist/src/scaffold/__tests__/continuation-prompt.test.js +79 -0
- package/dist/src/scaffold/__tests__/continuation-prompt.test.js.map +1 -0
- package/dist/src/scaffold/__tests__/continue-as-council.spec.d.ts +10 -0
- package/dist/src/scaffold/__tests__/continue-as-council.spec.js +102 -0
- package/dist/src/scaffold/__tests__/continue-as-council.spec.js.map +1 -0
- package/dist/src/scaffold/__tests__/dotnet-assembly-name.test.d.ts +1 -0
- package/dist/src/scaffold/__tests__/dotnet-assembly-name.test.js +27 -0
- package/dist/src/scaffold/__tests__/dotnet-assembly-name.test.js.map +1 -0
- package/dist/src/scaffold/__tests__/fe-scaffold-contents.test.d.ts +1 -0
- package/dist/src/scaffold/__tests__/fe-scaffold-contents.test.js +106 -0
- package/dist/src/scaffold/__tests__/fe-scaffold-contents.test.js.map +1 -0
- package/dist/src/scaffold/__tests__/init-new.smoke.spec.d.ts +15 -0
- package/dist/src/scaffold/__tests__/init-new.smoke.spec.js +81 -0
- package/dist/src/scaffold/__tests__/init-new.smoke.spec.js.map +1 -0
- package/dist/src/scaffold/__tests__/init-new.spec.d.ts +5 -0
- package/dist/src/scaffold/__tests__/init-new.spec.js +378 -0
- package/dist/src/scaffold/__tests__/init-new.spec.js.map +1 -0
- package/dist/src/scaffold/__tests__/install-bb-templates.spec.d.ts +1 -0
- package/dist/src/scaffold/__tests__/install-bb-templates.spec.js +77 -0
- package/dist/src/scaffold/__tests__/install-bb-templates.spec.js.map +1 -0
- package/dist/src/scaffold/__tests__/point-to-existing.spec.d.ts +7 -0
- package/dist/src/scaffold/__tests__/point-to-existing.spec.js +94 -0
- package/dist/src/scaffold/__tests__/point-to-existing.spec.js.map +1 -0
- package/dist/src/scaffold/bb-ecosystem-apply.d.ts +80 -0
- package/dist/src/scaffold/bb-ecosystem-apply.js +315 -0
- package/dist/src/scaffold/bb-ecosystem-apply.js.map +1 -0
- package/dist/src/scaffold/bb-quality-gate.d.ts +59 -0
- package/dist/src/scaffold/bb-quality-gate.js +185 -0
- package/dist/src/scaffold/bb-quality-gate.js.map +1 -0
- package/dist/src/scaffold/continuation-prompt.d.ts +12 -0
- package/dist/src/scaffold/continuation-prompt.js +66 -0
- package/dist/src/scaffold/continuation-prompt.js.map +1 -0
- package/dist/src/scaffold/continue-as-council.d.ts +47 -0
- package/dist/src/scaffold/continue-as-council.js +60 -0
- package/dist/src/scaffold/continue-as-council.js.map +1 -0
- package/dist/src/scaffold/init-new.d.ts +239 -0
- package/dist/src/scaffold/init-new.js +1414 -0
- package/dist/src/scaffold/init-new.js.map +1 -0
- package/dist/src/scaffold/point-to-existing.d.ts +38 -0
- package/dist/src/scaffold/point-to-existing.js +51 -0
- package/dist/src/scaffold/point-to-existing.js.map +1 -0
- package/dist/src/scaffold/resume-from-gate-failures.d.ts +48 -0
- package/dist/src/scaffold/resume-from-gate-failures.js +113 -0
- package/dist/src/scaffold/resume-from-gate-failures.js.map +1 -0
- package/dist/src/storage/__tests__/migrations.test.js.map +1 -0
- package/dist/src/storage/__tests__/ui-interaction-log.test.d.ts +7 -0
- package/dist/src/storage/__tests__/ui-interaction-log.test.js +97 -0
- package/dist/src/storage/__tests__/ui-interaction-log.test.js.map +1 -0
- package/dist/src/storage/atomic-io.d.ts +30 -0
- package/dist/src/storage/atomic-io.js +163 -0
- package/dist/src/storage/atomic-io.js.map +1 -0
- package/dist/src/storage/atomic-io.test.d.ts +1 -0
- package/dist/src/storage/atomic-io.test.js +74 -0
- package/dist/src/storage/atomic-io.test.js.map +1 -0
- package/dist/src/storage/config.js +39 -0
- package/dist/src/storage/config.js.map +1 -0
- package/dist/src/storage/config.test.d.ts +1 -0
- package/dist/src/storage/config.test.js.map +1 -0
- package/dist/src/storage/db.js +143 -0
- package/dist/src/storage/db.js.map +1 -0
- package/dist/src/storage/index.d.ts +10 -0
- package/dist/src/storage/index.js +12 -0
- package/dist/src/storage/index.js.map +1 -0
- package/dist/src/storage/interaction-log.d.ts +33 -0
- package/dist/src/storage/interaction-log.js +73 -0
- package/dist/src/storage/interaction-log.js.map +1 -0
- package/dist/src/storage/migrations.d.ts +2 -0
- package/dist/src/storage/migrations.js +200 -0
- package/dist/src/storage/migrations.js.map +1 -0
- package/dist/src/storage/session-dir.js.map +1 -0
- package/dist/src/storage/sessions.d.ts +22 -0
- package/dist/src/storage/sessions.js +168 -0
- package/dist/src/storage/sessions.js.map +1 -0
- package/dist/src/storage/tool-results.d.ts +4 -0
- package/dist/src/storage/tool-results.js.map +1 -0
- package/dist/src/storage/transcript-view.js +23 -0
- package/dist/src/storage/transcript-view.js.map +1 -0
- package/dist/src/storage/transcript.d.ts +85 -0
- package/dist/src/storage/transcript.js +461 -0
- package/dist/src/storage/transcript.js.map +1 -0
- package/dist/src/storage/transcript.test.d.ts +1 -0
- package/dist/src/storage/transcript.test.js +22 -0
- package/dist/src/storage/transcript.test.js.map +1 -0
- package/dist/src/storage/ui-interaction-log.d.ts +146 -0
- package/dist/src/storage/ui-interaction-log.js +34 -0
- package/dist/src/storage/ui-interaction-log.js.map +1 -0
- package/dist/src/storage/usage-cap.js.map +1 -0
- package/dist/src/storage/usage-cap.test.d.ts +1 -0
- package/dist/src/storage/usage-cap.test.js.map +1 -0
- package/dist/src/storage/usage.d.ts +11 -0
- package/dist/src/storage/usage.js +65 -0
- package/dist/src/storage/usage.js.map +1 -0
- package/dist/src/storage/workspaces.d.ts +9 -0
- package/dist/src/storage/workspaces.js +60 -0
- package/dist/src/storage/workspaces.js.map +1 -0
- package/dist/src/tools/bash.d.ts +53 -0
- package/dist/src/tools/bash.js +593 -0
- package/dist/src/tools/bash.js.map +1 -0
- package/dist/src/tools/bash.test.d.ts +1 -0
- package/dist/src/tools/bash.test.js +268 -0
- package/dist/src/tools/bash.test.js.map +1 -0
- package/dist/src/tools/computer.d.ts +88 -0
- package/dist/src/tools/computer.js.map +1 -0
- package/dist/src/tools/computer.test.d.ts +1 -0
- package/dist/src/tools/computer.test.js +142 -0
- package/dist/src/tools/computer.test.js.map +1 -0
- package/dist/src/tools/file-tracker.d.ts +35 -0
- package/dist/src/tools/file-tracker.js +40 -0
- package/dist/src/tools/file-tracker.js.map +1 -0
- package/dist/src/tools/file-tracker.test.d.ts +1 -0
- package/dist/src/tools/file-tracker.test.js +77 -0
- package/dist/src/tools/file-tracker.test.js.map +1 -0
- package/dist/src/tools/file.d.ts +18 -0
- package/dist/src/tools/file.js +135 -0
- package/dist/src/tools/file.js.map +1 -0
- package/dist/src/tools/file.test.d.ts +1 -0
- package/dist/src/tools/file.test.js +58 -0
- package/dist/src/tools/file.test.js.map +1 -0
- package/dist/src/tools/grep.d.ts +8 -0
- package/dist/src/tools/grep.js.map +1 -0
- package/dist/src/tools/registry.d.ts +21 -0
- package/dist/src/tools/registry.js +346 -0
- package/dist/src/tools/registry.js.map +1 -0
- package/dist/src/tools/registry.test.d.ts +1 -0
- package/dist/src/tools/registry.test.js +34 -0
- package/dist/src/tools/registry.test.js.map +1 -0
- package/dist/src/tools/schedule.js +498 -0
- package/dist/src/tools/schedule.js.map +1 -0
- package/dist/src/tools/schedule.test.d.ts +1 -0
- package/dist/src/tools/schedule.test.js +118 -0
- package/dist/src/tools/schedule.test.js.map +1 -0
- package/dist/src/types/index.d.ts +396 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/ui/agents-modal.d.ts +36 -0
- package/dist/src/ui/agents-modal.js +55 -0
- package/dist/src/ui/agents-modal.js.map +1 -0
- package/dist/src/ui/app.d.ts +20 -0
- package/dist/src/ui/app.js +5423 -0
- package/dist/src/ui/app.js.map +1 -0
- package/dist/src/ui/cards/__tests__/product-status-card.test.d.ts +1 -0
- package/dist/src/ui/cards/__tests__/product-status-card.test.js +27 -0
- package/dist/src/ui/cards/__tests__/product-status-card.test.js.map +1 -0
- package/dist/src/ui/cards/product-status-card.d.ts +25 -0
- package/dist/src/ui/cards/product-status-card.js +55 -0
- package/dist/src/ui/cards/product-status-card.js.map +1 -0
- package/dist/src/ui/components/SuggestionOverlay.js.map +1 -0
- package/dist/src/ui/components/Toast.d.ts +23 -0
- package/dist/src/ui/components/Toast.js +70 -0
- package/dist/src/ui/components/Toast.js.map +1 -0
- package/dist/src/ui/components/__tests__/council-leader-bubble.test.d.ts +1 -0
- package/dist/src/ui/components/__tests__/council-leader-bubble.test.js +14 -0
- package/dist/src/ui/components/__tests__/council-leader-bubble.test.js.map +1 -0
- package/dist/src/ui/components/__tests__/council-message-bubble.test.d.ts +1 -0
- package/dist/src/ui/components/__tests__/council-message-bubble.test.js +74 -0
- package/dist/src/ui/components/__tests__/council-message-bubble.test.js.map +1 -0
- package/dist/src/ui/components/__tests__/council-phase-timeline.test.d.ts +1 -0
- package/dist/src/ui/components/__tests__/council-phase-timeline.test.js +51 -0
- package/dist/src/ui/components/__tests__/council-phase-timeline.test.js.map +1 -0
- package/dist/src/ui/components/__tests__/council-placeholder-bubble.test.d.ts +1 -0
- package/dist/src/ui/components/__tests__/council-placeholder-bubble.test.js +14 -0
- package/dist/src/ui/components/__tests__/council-placeholder-bubble.test.js.map +1 -0
- package/dist/src/ui/components/__tests__/council-question-card.test.d.ts +1 -0
- package/dist/src/ui/components/__tests__/council-question-card.test.js +121 -0
- package/dist/src/ui/components/__tests__/council-question-card.test.js.map +1 -0
- package/dist/src/ui/components/__tests__/council-synthesis-banner.test.d.ts +1 -0
- package/dist/src/ui/components/__tests__/council-synthesis-banner.test.js +11 -0
- package/dist/src/ui/components/__tests__/council-synthesis-banner.test.js.map +1 -0
- package/dist/src/ui/components/__tests__/use-pair-quote-buffer.test.d.ts +1 -0
- package/dist/src/ui/components/__tests__/use-pair-quote-buffer.test.js +37 -0
- package/dist/src/ui/components/__tests__/use-pair-quote-buffer.test.js.map +1 -0
- package/dist/src/ui/components/btw-overlay.js.map +1 -0
- package/dist/src/ui/components/bubble-layout.d.ts +36 -0
- package/dist/src/ui/components/bubble-layout.js +43 -0
- package/dist/src/ui/components/bubble-layout.js.map +1 -0
- package/dist/src/ui/components/code-block-truncate.d.ts +8 -0
- package/dist/src/ui/components/code-block-truncate.js +22 -0
- package/dist/src/ui/components/code-block-truncate.js.map +1 -0
- package/dist/src/ui/components/copy-flash-banner.d.ts +5 -0
- package/dist/src/ui/components/copy-flash-banner.js +5 -0
- package/dist/src/ui/components/copy-flash-banner.js.map +1 -0
- package/dist/src/ui/components/council-info-card.d.ts +9 -0
- package/dist/src/ui/components/council-info-card.js +10 -0
- package/dist/src/ui/components/council-info-card.js.map +1 -0
- package/dist/src/ui/components/council-leader-bubble.d.ts +11 -0
- package/dist/src/ui/components/council-leader-bubble.js +17 -0
- package/dist/src/ui/components/council-leader-bubble.js.map +1 -0
- package/dist/src/ui/components/council-message-bubble.d.ts +21 -0
- package/dist/src/ui/components/council-message-bubble.js +47 -0
- package/dist/src/ui/components/council-message-bubble.js.map +1 -0
- package/dist/src/ui/components/council-phase-timeline.d.ts +14 -0
- package/dist/src/ui/components/council-phase-timeline.js +64 -0
- package/dist/src/ui/components/council-phase-timeline.js.map +1 -0
- package/dist/src/ui/components/council-placeholder-bubble.d.ts +22 -0
- package/dist/src/ui/components/council-placeholder-bubble.js +37 -0
- package/dist/src/ui/components/council-placeholder-bubble.js.map +1 -0
- package/dist/src/ui/components/council-question-card.d.ts +64 -0
- package/dist/src/ui/components/council-question-card.js +135 -0
- package/dist/src/ui/components/council-question-card.js.map +1 -0
- package/dist/src/ui/components/council-status-list.d.ts +15 -0
- package/dist/src/ui/components/council-status-list.js +83 -0
- package/dist/src/ui/components/council-status-list.js.map +1 -0
- package/dist/src/ui/components/council-synthesis-banner.d.ts +10 -0
- package/dist/src/ui/components/council-synthesis-banner.js +15 -0
- package/dist/src/ui/components/council-synthesis-banner.js.map +1 -0
- package/dist/src/ui/components/diff-view.d.ts +31 -0
- package/dist/src/ui/components/diff-view.js +109 -0
- package/dist/src/ui/components/diff-view.js.map +1 -0
- package/dist/src/ui/components/halt-recovery-card.d.ts +9 -0
- package/dist/src/ui/components/halt-recovery-card.js +26 -0
- package/dist/src/ui/components/halt-recovery-card.js.map +1 -0
- package/dist/src/ui/components/hero-logo.d.ts +4 -0
- package/dist/src/ui/components/hero-logo.js +41 -0
- package/dist/src/ui/components/hero-logo.js.map +1 -0
- package/dist/src/ui/components/init-new-form-card.d.ts +109 -0
- package/dist/src/ui/components/init-new-form-card.js +106 -0
- package/dist/src/ui/components/init-new-form-card.js.map +1 -0
- package/dist/src/ui/components/lsp-views.d.ts +14 -0
- package/dist/src/ui/components/lsp-views.js +34 -0
- package/dist/src/ui/components/lsp-views.js.map +1 -0
- package/dist/src/ui/components/media-views.d.ts +13 -0
- package/dist/src/ui/components/media-views.js +29 -0
- package/dist/src/ui/components/media-views.js.map +1 -0
- package/dist/src/ui/components/message-view.d.ts +31 -0
- package/dist/src/ui/components/message-view.js +174 -0
- package/dist/src/ui/components/message-view.js.map +1 -0
- package/dist/src/ui/components/point-to-existing-form-card.d.ts +33 -0
- package/dist/src/ui/components/point-to-existing-form-card.js +34 -0
- package/dist/src/ui/components/point-to-existing-form-card.js.map +1 -0
- package/dist/src/ui/components/prompt-box.d.ts +50 -0
- package/dist/src/ui/components/prompt-box.js +66 -0
- package/dist/src/ui/components/prompt-box.js.map +1 -0
- package/dist/src/ui/components/role-palette.d.ts +22 -0
- package/dist/src/ui/components/role-palette.js +50 -0
- package/dist/src/ui/components/role-palette.js.map +1 -0
- package/dist/src/ui/components/session-header.d.ts +14 -0
- package/dist/src/ui/components/session-header.js +24 -0
- package/dist/src/ui/components/session-header.js.map +1 -0
- package/dist/src/ui/components/slash-inline-menu.d.ts +7 -0
- package/dist/src/ui/components/slash-inline-menu.js +14 -0
- package/dist/src/ui/components/slash-inline-menu.js.map +1 -0
- package/dist/src/ui/components/structured-response-view.d.ts +7 -0
- package/dist/src/ui/components/structured-response-view.js +59 -0
- package/dist/src/ui/components/structured-response-view.js.map +1 -0
- package/dist/src/ui/components/tool-result-views.d.ts +60 -0
- package/dist/src/ui/components/tool-result-views.js +83 -0
- package/dist/src/ui/components/tool-result-views.js.map +1 -0
- package/dist/src/ui/components/use-pair-quote-buffer.d.ts +11 -0
- package/dist/src/ui/components/use-pair-quote-buffer.js +17 -0
- package/dist/src/ui/components/use-pair-quote-buffer.js.map +1 -0
- package/dist/src/ui/constants.d.ts +37 -0
- package/dist/src/ui/constants.js +221 -0
- package/dist/src/ui/constants.js.map +1 -0
- package/dist/src/ui/hooks/use-agent-editor.d.ts +40 -0
- package/dist/src/ui/hooks/use-agent-editor.js +54 -0
- package/dist/src/ui/hooks/use-agent-editor.js.map +1 -0
- package/dist/src/ui/hooks/use-mcp-editor.d.ts +24 -0
- package/dist/src/ui/hooks/use-mcp-editor.js +38 -0
- package/dist/src/ui/hooks/use-mcp-editor.js.map +1 -0
- package/dist/src/ui/hooks/use-model-picker.d.ts +26 -0
- package/dist/src/ui/hooks/use-model-picker.js +44 -0
- package/dist/src/ui/hooks/use-model-picker.js.map +1 -0
- package/dist/src/ui/hooks/useTypeahead.js +127 -0
- package/dist/src/ui/hooks/useTypeahead.js.map +1 -0
- package/dist/src/ui/markdown.d.ts +5 -0
- package/dist/src/ui/markdown.js.map +1 -0
- package/dist/src/ui/mcp-modal-types.d.ts +24 -0
- package/dist/src/ui/mcp-modal-types.js.map +1 -0
- package/dist/src/ui/mcp-modal.d.ts +33 -0
- package/dist/src/ui/mcp-modal.js +95 -0
- package/dist/src/ui/mcp-modal.js.map +1 -0
- package/dist/src/ui/modals/api-key-modal.d.ts +11 -0
- package/dist/src/ui/modals/api-key-modal.js +15 -0
- package/dist/src/ui/modals/api-key-modal.js.map +1 -0
- package/dist/src/ui/modals/connect-modal.d.ts +30 -0
- package/dist/src/ui/modals/connect-modal.js +34 -0
- package/dist/src/ui/modals/connect-modal.js.map +1 -0
- package/dist/src/ui/modals/model-picker-modal.d.ts +50 -0
- package/dist/src/ui/modals/model-picker-modal.js +57 -0
- package/dist/src/ui/modals/model-picker-modal.js.map +1 -0
- package/dist/src/ui/modals/sandbox-picker-modal.d.ts +12 -0
- package/dist/src/ui/modals/sandbox-picker-modal.js +18 -0
- package/dist/src/ui/modals/sandbox-picker-modal.js.map +1 -0
- package/dist/src/ui/modals/update-modal.d.ts +8 -0
- package/dist/src/ui/modals/update-modal.js +10 -0
- package/dist/src/ui/modals/update-modal.js.map +1 -0
- package/dist/src/ui/modals/wallet-picker-modal.d.ts +26 -0
- package/dist/src/ui/modals/wallet-picker-modal.js +33 -0
- package/dist/src/ui/modals/wallet-picker-modal.js.map +1 -0
- package/dist/src/ui/plan.d.ts +24 -0
- package/dist/src/ui/plan.js.map +1 -0
- package/dist/src/ui/schedule-modal.d.ts +15 -0
- package/dist/src/ui/schedule-modal.js +37 -0
- package/dist/src/ui/schedule-modal.js.map +1 -0
- package/dist/src/ui/slash/__tests__/clear.test.js.map +1 -0
- package/dist/src/ui/slash/__tests__/compact.test.js.map +1 -0
- package/dist/src/ui/slash/__tests__/cost.test.js.map +1 -0
- package/dist/src/ui/slash/__tests__/discuss.test.d.ts +1 -0
- package/dist/src/ui/slash/__tests__/discuss.test.js.map +1 -0
- package/dist/src/ui/slash/__tests__/execute.test.d.ts +1 -0
- package/dist/src/ui/slash/__tests__/execute.test.js.map +1 -0
- package/dist/src/ui/slash/__tests__/expand.test.js.map +1 -0
- package/dist/src/ui/slash/__tests__/ideal.test.d.ts +1 -0
- package/dist/src/ui/slash/__tests__/ideal.test.js +117 -0
- package/dist/src/ui/slash/__tests__/ideal.test.js.map +1 -0
- package/dist/src/ui/slash/__tests__/menu-parity.test.d.ts +15 -0
- package/dist/src/ui/slash/__tests__/menu-parity.test.js +41 -0
- package/dist/src/ui/slash/__tests__/menu-parity.test.js.map +1 -0
- package/dist/src/ui/slash/__tests__/optimize.test.js +130 -0
- package/dist/src/ui/slash/__tests__/optimize.test.js.map +1 -0
- package/dist/src/ui/slash/__tests__/pin.test.d.ts +1 -0
- package/dist/src/ui/slash/__tests__/pin.test.js +38 -0
- package/dist/src/ui/slash/__tests__/pin.test.js.map +1 -0
- package/dist/src/ui/slash/__tests__/plan.test.d.ts +1 -0
- package/dist/src/ui/slash/__tests__/plan.test.js.map +1 -0
- package/dist/src/ui/slash/clear.js.map +1 -0
- package/dist/src/ui/slash/compact.js.map +1 -0
- package/dist/src/ui/slash/cost.js +55 -0
- package/dist/src/ui/slash/cost.js.map +1 -0
- package/dist/src/ui/slash/council-inspect.d.ts +9 -0
- package/dist/src/ui/slash/council-inspect.js +146 -0
- package/dist/src/ui/slash/council-inspect.js.map +1 -0
- package/dist/src/ui/slash/council.js +23 -0
- package/dist/src/ui/slash/council.js.map +1 -0
- package/dist/src/ui/slash/debug.js +109 -0
- package/dist/src/ui/slash/debug.js.map +1 -0
- package/dist/src/ui/slash/discuss.js.map +1 -0
- package/dist/src/ui/slash/ee.js +271 -0
- package/dist/src/ui/slash/ee.js.map +1 -0
- package/dist/src/ui/slash/execute.js.map +1 -0
- package/dist/src/ui/slash/expand.js.map +1 -0
- package/dist/src/ui/slash/export.d.ts +20 -0
- package/dist/src/ui/slash/export.js +253 -0
- package/dist/src/ui/slash/export.js.map +1 -0
- package/dist/src/ui/slash/ideal.d.ts +60 -0
- package/dist/src/ui/slash/ideal.js +198 -0
- package/dist/src/ui/slash/ideal.js.map +1 -0
- package/dist/src/ui/slash/menu-items.d.ts +42 -0
- package/dist/src/ui/slash/menu-items.js +92 -0
- package/dist/src/ui/slash/menu-items.js.map +1 -0
- package/dist/src/ui/slash/optimize.js +37 -0
- package/dist/src/ui/slash/optimize.js.map +1 -0
- package/dist/src/ui/slash/pin.d.ts +15 -0
- package/dist/src/ui/slash/pin.js +36 -0
- package/dist/src/ui/slash/pin.js.map +1 -0
- package/dist/src/ui/slash/plan.js.map +1 -0
- package/dist/src/ui/slash/registry.d.ts +32 -0
- package/dist/src/ui/slash/registry.js.map +1 -0
- package/dist/src/ui/slash/route.js.map +1 -0
- package/dist/src/ui/slash/route.test.js.map +1 -0
- package/dist/src/ui/status-bar/index.d.ts +14 -0
- package/dist/src/ui/status-bar/index.js +79 -0
- package/dist/src/ui/status-bar/index.js.map +1 -0
- package/dist/src/ui/status-bar/index.test.d.ts +1 -0
- package/dist/src/ui/status-bar/index.test.js.map +1 -0
- package/dist/src/ui/status-bar/store.d.ts +40 -0
- package/dist/src/ui/status-bar/store.js +161 -0
- package/dist/src/ui/status-bar/store.js.map +1 -0
- package/dist/src/ui/status-bar/store.test.d.ts +1 -0
- package/dist/src/ui/status-bar/store.test.js.map +1 -0
- package/dist/src/ui/status-bar/tier-badge.js.map +1 -0
- package/dist/src/ui/status-bar/tier-badge.test.d.ts +1 -0
- package/dist/src/ui/status-bar/tier-badge.test.js.map +1 -0
- package/dist/src/ui/status-bar/usd-meter.js.map +1 -0
- package/dist/src/ui/status-bar/usd-meter.test.d.ts +1 -0
- package/dist/src/ui/status-bar/usd-meter.test.js.map +1 -0
- package/dist/src/ui/syntax-highlight.d.ts +8 -0
- package/dist/src/ui/syntax-highlight.js +623 -0
- package/dist/src/ui/syntax-highlight.js.map +1 -0
- package/dist/src/ui/terminal-selection-text.js.map +1 -0
- package/dist/src/ui/theme.d.ts +91 -0
- package/dist/src/ui/theme.js +94 -0
- package/dist/src/ui/theme.js.map +1 -0
- package/dist/src/ui/types.d.ts +82 -0
- package/dist/src/ui/types.js +2 -0
- package/dist/src/ui/types.js.map +1 -0
- package/dist/src/ui/utils/color.d.ts +1 -0
- package/dist/src/ui/utils/color.js +18 -0
- package/dist/src/ui/utils/color.js.map +1 -0
- package/dist/src/ui/utils/format.d.ts +21 -0
- package/dist/src/ui/utils/format.js +75 -0
- package/dist/src/ui/utils/format.js.map +1 -0
- package/dist/src/ui/utils/modal.d.ts +3 -0
- package/dist/src/ui/utils/modal.js +7 -0
- package/dist/src/ui/utils/modal.js.map +1 -0
- package/dist/src/ui/utils/text.d.ts +6 -0
- package/dist/src/ui/utils/text.js +31 -0
- package/dist/src/ui/utils/text.js.map +1 -0
- package/dist/src/ui/utils/tools.d.ts +8 -0
- package/dist/src/ui/utils/tools.js +123 -0
- package/dist/src/ui/utils/tools.js.map +1 -0
- package/dist/src/usage/__tests__/product-ledger.test.d.ts +1 -0
- package/dist/src/usage/__tests__/product-ledger.test.js +59 -0
- package/dist/src/usage/__tests__/product-ledger.test.js.map +1 -0
- package/dist/src/usage/cost-log.d.ts +65 -0
- package/dist/src/usage/cost-log.js +117 -0
- package/dist/src/usage/cost-log.js.map +1 -0
- package/dist/src/usage/decision-log.d.ts +32 -0
- package/dist/src/usage/decision-log.js +70 -0
- package/dist/src/usage/decision-log.js.map +1 -0
- package/dist/src/usage/downgrade.js.map +1 -0
- package/dist/src/usage/downgrade.test.d.ts +1 -0
- package/dist/src/usage/downgrade.test.js.map +1 -0
- package/dist/src/usage/estimator.d.ts +26 -0
- package/dist/src/usage/estimator.js +46 -0
- package/dist/src/usage/estimator.js.map +1 -0
- package/dist/src/usage/estimator.test.d.ts +1 -0
- package/dist/src/usage/estimator.test.js.map +1 -0
- package/dist/src/usage/ledger.d.ts +48 -0
- package/dist/src/usage/ledger.js +208 -0
- package/dist/src/usage/ledger.js.map +1 -0
- package/dist/src/usage/ledger.test.d.ts +1 -0
- package/dist/src/usage/ledger.test.js.map +1 -0
- package/dist/src/usage/midstream.js.map +1 -0
- package/dist/src/usage/midstream.test.d.ts +1 -0
- package/dist/src/usage/midstream.test.js.map +1 -0
- package/dist/src/usage/product-ledger.d.ts +47 -0
- package/dist/src/usage/product-ledger.js +73 -0
- package/dist/src/usage/product-ledger.js.map +1 -0
- package/dist/src/usage/thresholds.js.map +1 -0
- package/dist/src/usage/thresholds.test.d.ts +1 -0
- package/dist/src/usage/thresholds.test.js.map +1 -0
- package/dist/src/usage/types.d.ts +31 -0
- package/dist/src/usage/types.js.map +1 -0
- package/dist/src/utils/__tests__/auto-council-settings.test.d.ts +1 -0
- package/dist/src/utils/__tests__/auto-council-settings.test.js +41 -0
- package/dist/src/utils/__tests__/auto-council-settings.test.js.map +1 -0
- package/dist/src/utils/__tests__/ee-logger.test.d.ts +11 -0
- package/dist/src/utils/__tests__/ee-logger.test.js +165 -0
- package/dist/src/utils/__tests__/ee-logger.test.js.map +1 -0
- package/dist/src/utils/__tests__/file-lock.test.d.ts +1 -0
- package/dist/src/utils/__tests__/file-lock.test.js +66 -0
- package/dist/src/utils/__tests__/file-lock.test.js.map +1 -0
- package/dist/src/utils/__tests__/rate-limit.test.d.ts +1 -0
- package/dist/src/utils/__tests__/rate-limit.test.js +38 -0
- package/dist/src/utils/__tests__/rate-limit.test.js.map +1 -0
- package/dist/src/utils/__tests__/settings-disabled-models.test.d.ts +7 -0
- package/dist/src/utils/__tests__/settings-disabled-models.test.js +99 -0
- package/dist/src/utils/__tests__/settings-disabled-models.test.js.map +1 -0
- package/dist/src/utils/__tests__/settings-web-research.test.d.ts +1 -0
- package/dist/src/utils/__tests__/settings-web-research.test.js +46 -0
- package/dist/src/utils/__tests__/settings-web-research.test.js.map +1 -0
- package/dist/src/utils/__tests__/slugify.test.d.ts +1 -0
- package/dist/src/utils/__tests__/slugify.test.js +37 -0
- package/dist/src/utils/__tests__/slugify.test.js.map +1 -0
- package/dist/src/utils/__tests__/visible-retry.test.d.ts +1 -0
- package/dist/src/utils/__tests__/visible-retry.test.js +143 -0
- package/dist/src/utils/__tests__/visible-retry.test.js.map +1 -0
- package/dist/src/utils/at-mentions.js.map +1 -0
- package/dist/src/utils/clipboard-image.js +146 -0
- package/dist/src/utils/clipboard-image.js.map +1 -0
- package/dist/src/utils/ee-logger.d.ts +65 -0
- package/dist/src/utils/ee-logger.js +150 -0
- package/dist/src/utils/ee-logger.js.map +1 -0
- package/dist/src/utils/file-index.js.map +1 -0
- package/dist/src/utils/file-lock.d.ts +5 -0
- package/dist/src/utils/file-lock.js +58 -0
- package/dist/src/utils/file-lock.js.map +1 -0
- package/dist/src/utils/git-root.js.map +1 -0
- package/dist/src/utils/host-clipboard.d.ts +10 -0
- package/dist/src/utils/host-clipboard.js +69 -0
- package/dist/src/utils/host-clipboard.js.map +1 -0
- package/dist/src/utils/install-manager.js.map +1 -0
- package/dist/src/utils/install-manager.test.d.ts +1 -0
- package/dist/src/utils/install-manager.test.js +127 -0
- package/dist/src/utils/install-manager.test.js.map +1 -0
- package/dist/src/utils/instructions.js +140 -0
- package/dist/src/utils/instructions.js.map +1 -0
- package/dist/src/utils/instructions.test.d.ts +1 -0
- package/dist/src/utils/instructions.test.js +93 -0
- package/dist/src/utils/instructions.test.js.map +1 -0
- package/dist/src/utils/permission-mode.js.map +1 -0
- package/dist/src/utils/permission-mode.test.d.ts +1 -0
- package/dist/src/utils/permission-mode.test.js.map +1 -0
- package/dist/src/utils/rate-limit.d.ts +4 -0
- package/dist/src/utils/rate-limit.js +21 -0
- package/dist/src/utils/rate-limit.js.map +1 -0
- package/dist/src/utils/redactor.js.map +1 -0
- package/dist/src/utils/redactor.test.d.ts +1 -0
- package/dist/src/utils/redactor.test.js +84 -0
- package/dist/src/utils/redactor.test.js.map +1 -0
- package/dist/src/utils/settings.d.ts +346 -0
- package/dist/src/utils/settings.js +791 -0
- package/dist/src/utils/settings.js.map +1 -0
- package/dist/src/utils/settings.test.d.ts +1 -0
- package/dist/src/utils/settings.test.js +160 -0
- package/dist/src/utils/settings.test.js.map +1 -0
- package/dist/src/utils/shell.d.ts +34 -0
- package/dist/src/utils/shell.js +171 -0
- package/dist/src/utils/shell.js.map +1 -0
- package/dist/src/utils/shell.test.d.ts +1 -0
- package/dist/src/utils/shell.test.js +71 -0
- package/dist/src/utils/shell.test.js.map +1 -0
- package/dist/src/utils/side-question.js.map +1 -0
- package/dist/src/utils/skills.js +194 -0
- package/dist/src/utils/skills.js.map +1 -0
- package/dist/src/utils/skills.test.d.ts +1 -0
- package/dist/src/utils/skills.test.js +45 -0
- package/dist/src/utils/skills.test.js.map +1 -0
- package/dist/src/utils/slugify.d.ts +1 -0
- package/dist/src/utils/slugify.js +10 -0
- package/dist/src/utils/slugify.js.map +1 -0
- package/dist/src/utils/subagent-display.js.map +1 -0
- package/dist/src/utils/subagent-display.test.d.ts +1 -0
- package/dist/src/utils/subagent-display.test.js +21 -0
- package/dist/src/utils/subagent-display.test.js.map +1 -0
- package/dist/src/utils/subagents-settings.test.d.ts +1 -0
- package/dist/src/utils/subagents-settings.test.js +58 -0
- package/dist/src/utils/subagents-settings.test.js.map +1 -0
- package/dist/src/utils/telegram-audio-settings.test.d.ts +1 -0
- package/dist/src/utils/telegram-audio-settings.test.js +39 -0
- package/dist/src/utils/telegram-audio-settings.test.js.map +1 -0
- package/dist/src/utils/update-checker.js +22 -0
- package/dist/src/utils/update-checker.js.map +1 -0
- package/dist/src/utils/update-checker.test.d.ts +1 -0
- package/dist/src/utils/update-checker.test.js +125 -0
- package/dist/src/utils/update-checker.test.js.map +1 -0
- package/dist/src/utils/visible-retry.d.ts +20 -0
- package/dist/src/utils/visible-retry.js +34 -0
- package/dist/src/utils/visible-retry.js.map +1 -0
- package/dist/src/verify/__tests__/coverage-parsers.test.d.ts +1 -0
- package/dist/src/verify/__tests__/coverage-parsers.test.js +69 -0
- package/dist/src/verify/__tests__/coverage-parsers.test.js.map +1 -0
- package/dist/src/verify/__tests__/dotnet-recipe.test.d.ts +10 -0
- package/dist/src/verify/__tests__/dotnet-recipe.test.js +70 -0
- package/dist/src/verify/__tests__/dotnet-recipe.test.js.map +1 -0
- package/dist/src/verify/checkpoint.d.ts +11 -0
- package/dist/src/verify/checkpoint.js.map +1 -0
- package/dist/src/verify/checkpoint.test.d.ts +1 -0
- package/dist/src/verify/checkpoint.test.js +160 -0
- package/dist/src/verify/checkpoint.test.js.map +1 -0
- package/dist/src/verify/coverage-parsers.d.ts +29 -0
- package/dist/src/verify/coverage-parsers.js +72 -0
- package/dist/src/verify/coverage-parsers.js.map +1 -0
- package/dist/src/verify/entrypoint.d.ts +30 -0
- package/dist/src/verify/entrypoint.js +349 -0
- package/dist/src/verify/entrypoint.js.map +1 -0
- package/dist/src/verify/entrypoint.test.d.ts +1 -0
- package/dist/src/verify/entrypoint.test.js +233 -0
- package/dist/src/verify/entrypoint.test.js.map +1 -0
- package/dist/src/verify/environment.d.ts +9 -0
- package/dist/src/verify/environment.js +116 -0
- package/dist/src/verify/environment.js.map +1 -0
- package/dist/src/verify/environment.test.d.ts +1 -0
- package/dist/src/verify/environment.test.js +94 -0
- package/dist/src/verify/environment.test.js.map +1 -0
- package/dist/src/verify/evidence.d.ts +10 -0
- package/dist/src/verify/evidence.js.map +1 -0
- package/dist/src/verify/orchestrator.d.ts +25 -0
- package/dist/src/verify/orchestrator.js +87 -0
- package/dist/src/verify/orchestrator.js.map +1 -0
- package/dist/src/verify/orchestrator.test.d.ts +1 -0
- package/dist/src/verify/orchestrator.test.js +126 -0
- package/dist/src/verify/orchestrator.test.js.map +1 -0
- package/dist/src/verify/recipes.d.ts +22 -0
- package/dist/src/verify/recipes.js +528 -0
- package/dist/src/verify/recipes.js.map +1 -0
- package/dist/src/verify/retry.d.ts +4 -0
- package/dist/src/verify/retry.js.map +1 -0
- package/dist/src/verify/runtime-prep.test.d.ts +1 -0
- package/dist/src/verify/runtime-prep.test.js +38 -0
- package/dist/src/verify/runtime-prep.test.js.map +1 -0
- package/package.json +30 -10
- package/src/__test-stubs__/vitest-setup.ts +36 -0
- package/src/__tests__/council/bubble-layout.test.ts +45 -0
- package/src/__tests__/council/code-block-truncate.test.ts +50 -0
- package/src/__tests__/council/role-palette.test.ts +66 -0
- package/src/__tests__/first-run-wizard.test.ts +9 -0
- package/src/agent-harness/__tests__/cli-flags.spec.ts +35 -0
- package/src/agent-harness/__tests__/driver.spec.ts +154 -0
- package/src/agent-harness/__tests__/idle.spec.ts +90 -0
- package/src/agent-harness/__tests__/mock-llm.spec.ts +126 -0
- package/src/agent-harness/__tests__/mock-model.spec.ts +195 -0
- package/src/agent-harness/__tests__/predicate.spec.ts +33 -0
- package/src/agent-harness/__tests__/protocol.spec.ts +62 -0
- package/src/agent-harness/__tests__/schema.spec.ts +81 -0
- package/src/agent-harness/__tests__/selector.spec.ts +82 -0
- package/src/agent-harness/__tests__/sidechannel.spec.ts +40 -0
- package/src/agent-harness/__tests__/spec-helpers.spec.ts +76 -0
- package/src/agent-harness/index.ts +24 -0
- package/src/agent-harness/mock-model.ts +394 -0
- package/src/agent-harness/test-spawn.ts +200 -0
- package/src/chat/__tests__/broadcast-bus.test.ts +90 -0
- package/src/chat/__tests__/channel-manager.test.ts +149 -0
- package/src/chat/__tests__/client.test.ts +118 -0
- package/src/chat/__tests__/discord-integration.test.ts +162 -0
- package/src/chat/__tests__/intent-prompt.test.ts +92 -0
- package/src/chat/__tests__/verdict-resolver.test.ts +336 -0
- package/src/chat/broadcast-bus.ts +53 -0
- package/src/chat/channel-manager.ts +146 -0
- package/src/chat/chat-keychain.ts +129 -0
- package/src/chat/factory.ts +37 -0
- package/src/chat/intent-prompt.ts +72 -0
- package/src/chat/providers/discord/client.ts +91 -0
- package/src/chat/types.ts +42 -0
- package/src/chat/verdict-constants.ts +26 -0
- package/src/chat/verdict-resolver.ts +231 -0
- package/src/cli/__tests__/bw-vault.test.ts +97 -0
- package/src/cli/__tests__/keys-bundle.test.ts +46 -0
- package/src/cli/__tests__/share-cmd.test.ts +197 -0
- package/src/cli/bw-vault.ts +184 -0
- package/src/cli/config/__tests__/model-picker.test.ts +59 -0
- package/src/cli/config/__tests__/provider-fetch.test.ts +38 -0
- package/src/cli/config/index.ts +112 -0
- package/src/cli/config/model-picker.ts +193 -0
- package/src/cli/config/provider-fetch.ts +75 -0
- package/src/cli/config/screen-council.ts +245 -0
- package/src/cli/config/screen-models.ts +104 -0
- package/src/cli/config/screen-providers.ts +197 -0
- package/src/cli/config/tui.ts +153 -0
- package/src/cli/cost-forensics.test.ts +128 -0
- package/src/cli/cost-forensics.ts +264 -0
- package/src/cli/keys-bundle.ts +91 -0
- package/src/cli/keys.test.ts +104 -0
- package/src/cli/keys.ts +787 -0
- package/src/cli/pil-report.ts +202 -0
- package/src/cli/share-cmd.ts +132 -0
- package/src/cli/usage-report.ts +266 -0
- package/src/council/__tests__/accounting.test.ts +72 -0
- package/src/council/__tests__/audit-replay.test.ts +344 -0
- package/src/council/__tests__/clarifier-max-rounds.test.ts +91 -0
- package/src/council/__tests__/clarifier-options.test.ts +63 -0
- package/src/council/__tests__/cost-aware.test.ts +60 -0
- package/src/council/__tests__/debate-planner-structured.test.ts +236 -0
- package/src/council/__tests__/evaluator-metrics.test.ts +513 -0
- package/src/council/__tests__/parse-outcome-fallback.test.ts +125 -0
- package/src/council/__tests__/research-tools.test.ts +239 -0
- package/src/council/__tests__/round-tools.test.ts +334 -0
- package/src/council/__tests__/tool-trace.test.ts +152 -0
- package/src/council/__tests__/types-contract.test.ts +88 -0
- package/src/council/clarifier.ts +409 -0
- package/src/council/context.ts +250 -0
- package/src/council/debate-planner.ts +264 -0
- package/src/council/debate.ts +1179 -0
- package/src/council/executor.ts +27 -0
- package/src/council/index.ts +916 -0
- package/src/council/leader.ts +262 -0
- package/src/council/llm.ts +967 -0
- package/src/council/phase-events.ts +58 -0
- package/src/council/planner.ts +303 -0
- package/src/council/preflight.ts +86 -0
- package/src/council/prompts.ts +600 -0
- package/src/council/types.ts +286 -0
- package/src/daemon/scheduler.ts +1 -1
- package/src/ee/__tests__/bb-design.test.ts +223 -0
- package/src/ee/__tests__/pil-context-bridge.test.ts +59 -0
- package/src/ee/__tests__/pipeline.integration.test.ts +6 -6
- package/src/ee/__tests__/render-sink-wiring.test.ts +89 -0
- package/src/ee/auth.ts +21 -0
- package/src/ee/bb-design.ts +284 -0
- package/src/ee/bb-retrieval.ts +467 -0
- package/src/ee/bridge.test.ts +1 -8
- package/src/ee/bridge.ts +201 -12
- package/src/ee/client-mode.ts +161 -0
- package/src/ee/client.test.ts +171 -171
- package/src/ee/client.ts +127 -19
- package/src/ee/council-bridge.ts +89 -0
- package/src/ee/extract-session.test.ts +3 -8
- package/src/ee/extract-session.ts +4 -2
- package/src/ee/health.ts +1 -1
- package/src/ee/index.ts +11 -10
- package/src/ee/intercept.test.ts +197 -191
- package/src/ee/intercept.ts +13 -2
- package/src/ee/judge.test.ts +56 -0
- package/src/ee/judge.ts +59 -1
- package/src/ee/mistake-detector.test.ts +252 -0
- package/src/ee/mistake-detector.ts +297 -0
- package/src/ee/offline-queue.test.ts +14 -63
- package/src/ee/offline-queue.ts +2 -9
- package/src/ee/phase-outcome.test.ts +107 -0
- package/src/ee/phase-outcome.ts +165 -0
- package/src/ee/phase-tracker.test.ts +175 -0
- package/src/ee/phase-tracker.ts +180 -0
- package/src/ee/prompt-stale.test.ts +6 -1
- package/src/ee/render.test.ts +7 -4
- package/src/ee/render.ts +25 -4
- package/src/ee/session-trajectory.test.ts +139 -0
- package/src/ee/session-trajectory.ts +226 -0
- package/src/ee/touch.test.ts +73 -71
- package/src/ee/types.ts +72 -7
- package/src/flow/__tests__/run-manager-product.test.ts +59 -0
- package/src/flow/__tests__/scaffold-checkpoint.test.ts +113 -0
- package/src/flow/run-manager.ts +35 -2
- package/src/flow/scaffold-checkpoint.ts +132 -0
- package/src/generated/version.ts +4 -0
- package/src/gsd/__tests__/complexity.test.ts +0 -0
- package/src/gsd/__tests__/directives.test.ts +49 -0
- package/src/gsd/__tests__/gray-areas.test.ts +33 -0
- package/src/gsd/complexity.ts +124 -0
- package/src/gsd/directives.ts +94 -0
- package/src/gsd/gray-areas.ts +144 -0
- package/src/gsd/types.ts +2 -0
- package/src/headless/__tests__/council-answers.test.ts +266 -0
- package/src/headless/council-answers.ts +130 -0
- package/src/headless/output.ts +1 -1
- package/src/hooks/index.ts +316 -19
- package/src/hooks/types.ts +42 -0
- package/src/index.ts +1564 -677
- package/src/lsp/client.ts +1 -1
- package/src/lsp/smoke.test.ts +15 -13
- package/src/mcp/__tests__/auto-setup.test.ts +88 -0
- package/src/mcp/__tests__/harness-driver-action-tools.spec.ts +114 -0
- package/src/mcp/__tests__/harness-driver-async-tools.spec.ts +127 -0
- package/src/mcp/__tests__/harness-driver-read-tools.spec.ts +140 -0
- package/src/mcp/__tests__/harness-driver-security.spec.ts +71 -0
- package/src/mcp/__tests__/harness-driver.spec.ts +21 -0
- package/src/mcp/__tests__/lazy-schema.spec.ts +173 -0
- package/src/mcp/__tests__/mcp-keychain.test.ts +46 -0
- package/src/mcp/__tests__/research-onboarding.test.ts +163 -0
- package/src/mcp/__tests__/runtime-hydration.test.ts +86 -0
- package/src/mcp/__tests__/runtime-sanitize.test.ts +44 -0
- package/src/mcp/auto-setup.ts +26 -7
- package/src/mcp/catalog.ts +31 -14
- package/src/mcp/mcp-keychain.ts +77 -0
- package/src/mcp/oauth-callback.ts +18 -6
- package/src/mcp/oauth-provider.ts +1 -3
- package/src/mcp/opentui-spawn.ts +64 -0
- package/src/mcp/research-onboarding.ts +143 -0
- package/src/mcp/runtime.ts +85 -27
- package/src/models/__tests__/registry.test.ts +11 -11
- package/src/models/catalog-client.ts +2 -2
- package/src/models/catalog.README.md +136 -0
- package/src/models/catalog.json +108 -245
- package/src/models/classify-tier.ts +20 -9
- package/src/models/registry.ts +5 -1
- package/src/ops/__tests__/doctor-council-mcp.test.ts +161 -0
- package/src/ops/__tests__/doctor-ee-health.test.ts +129 -0
- package/src/ops/doctor.test.ts +6 -5
- package/src/ops/doctor.ts +207 -13
- package/src/orchestrator/__tests__/batch-turn-runner.test.ts +178 -0
- package/src/orchestrator/__tests__/council-manager.test.ts +171 -0
- package/src/orchestrator/__tests__/cross-turn-dedup.test.ts +174 -0
- package/src/orchestrator/__tests__/current-call-id.test.ts +160 -0
- package/src/orchestrator/__tests__/message-processor.test.ts +196 -0
- package/src/orchestrator/__tests__/message-write-ahead.test.ts +170 -0
- package/src/orchestrator/__tests__/read-path-budget.test.ts +107 -0
- package/src/orchestrator/__tests__/retry-classifier.test.ts +120 -0
- package/src/orchestrator/__tests__/retry-stream.test.ts +186 -0
- package/src/orchestrator/__tests__/route-feedback.test.ts +1 -1
- package/src/orchestrator/__tests__/stream-runner.test.ts +123 -0
- package/src/orchestrator/__tests__/usage-events-shape.test.ts +80 -0
- package/src/orchestrator/__tests__/usage-normalizer-c1.test.ts +172 -0
- package/src/orchestrator/__tests__/write-ahead.test.ts +162 -0
- package/src/orchestrator/agent-options.ts +168 -0
- package/src/orchestrator/agent.test.ts +47 -1
- package/src/orchestrator/batch-turn-runner.ts +425 -0
- package/src/orchestrator/batch-utils.ts +340 -0
- package/src/orchestrator/cleanup.test.ts +3 -5
- package/src/orchestrator/compaction.test.ts +50 -3
- package/src/orchestrator/compaction.ts +178 -52
- package/src/orchestrator/council-manager.ts +580 -0
- package/src/orchestrator/cross-turn-dedup.ts +187 -0
- package/src/orchestrator/error-utils.ts +72 -0
- package/src/orchestrator/flow-resume.ts +0 -1
- package/src/orchestrator/message-processor.ts +1985 -0
- package/src/orchestrator/message-seq.test.ts +29 -0
- package/src/orchestrator/message-seq.ts +19 -0
- package/src/orchestrator/orchestrator.ts +1266 -2590
- package/src/orchestrator/prompts.ts +482 -0
- package/src/orchestrator/provider-options-shape.spec.ts +67 -0
- package/src/orchestrator/provider-options-shape.ts +70 -0
- package/src/orchestrator/read-path-budget.ts +128 -0
- package/src/orchestrator/reasoning.ts +5 -0
- package/src/orchestrator/retry-classifier.ts +131 -0
- package/src/orchestrator/retry-stream.ts +159 -0
- package/src/orchestrator/sandbox.test.ts +1 -1
- package/src/orchestrator/stream-runner.ts +729 -0
- package/src/orchestrator/sub-agent-cap.test.ts +186 -0
- package/src/orchestrator/sub-agent-cap.ts +218 -0
- package/src/orchestrator/subagent-compactor.spec.ts +144 -0
- package/src/orchestrator/subagent-compactor.ts +242 -0
- package/src/orchestrator/token-counter.test.ts +69 -0
- package/src/orchestrator/token-counter.ts +81 -0
- package/src/orchestrator/tool-utils.ts +214 -0
- package/src/orchestrator/turn-runner-deps.ts +83 -0
- package/src/pil/__tests__/config.test.ts +32 -0
- package/src/pil/__tests__/dual-run.test.ts +53 -0
- package/src/pil/__tests__/layer1-intent-trace.test.ts +140 -0
- package/src/pil/__tests__/layer1-intent.test.ts +130 -27
- package/src/pil/__tests__/layer3-ee-injection.test.ts +94 -30
- package/src/pil/__tests__/layer3-injected-chunk.test.ts +122 -0
- package/src/pil/__tests__/layer4-gsd.test.ts +56 -23
- package/src/pil/__tests__/layer5-context.test.ts +41 -0
- package/src/pil/__tests__/layer6-output.test.ts +154 -9
- package/src/pil/__tests__/ollama-classify.test.ts +81 -81
- package/src/pil/__tests__/pipeline.test.ts +19 -2
- package/src/pil/__tests__/renderer-coverage.test.ts +46 -0
- package/src/pil/__tests__/response-tools.test.ts +12 -3
- package/src/pil/__tests__/schema.test.ts +109 -4
- package/src/pil/__tests__/scoreComplexity.test.ts +134 -0
- package/src/pil/__tests__/scoreSufficiency.test.ts +104 -0
- package/src/pil/budget-log.ts +86 -0
- package/src/pil/config.ts +11 -0
- package/src/pil/index.ts +1 -1
- package/src/pil/layer1-intent.test.ts +127 -0
- package/src/pil/layer1-intent.ts +468 -43
- package/src/pil/layer2-personality.ts +9 -0
- package/src/pil/layer3-ee-injection.ts +298 -32
- package/src/pil/layer4-gsd.ts +73 -32
- package/src/pil/layer5-context.ts +53 -18
- package/src/pil/layer6-output.ts +157 -10
- package/src/pil/pipeline.ts +114 -19
- package/src/pil/response-tools.ts +2 -2
- package/src/pil/schema.ts +56 -2
- package/src/pil/types.ts +110 -2
- package/src/product-loop/__tests__/artifact-io.test.ts +97 -0
- package/src/product-loop/__tests__/assumption-ledger.test.ts +292 -0
- package/src/product-loop/__tests__/cb2-retry-bonus.test.ts +182 -0
- package/src/product-loop/__tests__/circuit-breakers-coverage.test.ts +82 -0
- package/src/product-loop/__tests__/circuit-breakers.test.ts +90 -0
- package/src/product-loop/__tests__/complexity-routing.spec.ts +169 -0
- package/src/product-loop/__tests__/context-policy.test.ts +280 -0
- package/src/product-loop/__tests__/cost-preview.test.ts +118 -0
- package/src/product-loop/__tests__/cost-scoper.test.ts +76 -0
- package/src/product-loop/__tests__/cross-run-memory.test.ts +195 -0
- package/src/product-loop/__tests__/design-output.spec.ts +39 -0
- package/src/product-loop/__tests__/discover.test.ts +98 -0
- package/src/product-loop/__tests__/discovery-council-runner.test.ts +13 -0
- package/src/product-loop/__tests__/discovery-detection.test.ts +180 -0
- package/src/product-loop/__tests__/discovery-ecosystem.test.ts +132 -0
- package/src/product-loop/__tests__/discovery-integration.test.ts +133 -0
- package/src/product-loop/__tests__/discovery-interview.test.ts +305 -0
- package/src/product-loop/__tests__/discovery-migrations.test.ts +75 -0
- package/src/product-loop/__tests__/discovery-persistence.test.ts +171 -0
- package/src/product-loop/__tests__/discovery-prompt-parser.test.ts +77 -0
- package/src/product-loop/__tests__/discovery-recommender-ecosystem.test.ts +94 -0
- package/src/product-loop/__tests__/discovery-recommender.test.ts +382 -0
- package/src/product-loop/__tests__/discovery-schema.test.ts +102 -0
- package/src/product-loop/__tests__/done-gate-coverage.test.ts +151 -0
- package/src/product-loop/__tests__/done-gate.test.ts +140 -0
- package/src/product-loop/__tests__/ee-extract-wiring.test.ts +216 -0
- package/src/product-loop/__tests__/extract-to-ee.test.ts +205 -0
- package/src/product-loop/__tests__/feedback-routing.test.ts +93 -0
- package/src/product-loop/__tests__/hot-path.spec.ts +177 -0
- package/src/product-loop/__tests__/integration.test.ts +344 -0
- package/src/product-loop/__tests__/loop-driver-audit.test.ts +321 -0
- package/src/product-loop/__tests__/loop-driver.test.ts +247 -0
- package/src/product-loop/__tests__/phase-budget.test.ts +172 -0
- package/src/product-loop/__tests__/phase-orchestrator-integration.test.ts +143 -0
- package/src/product-loop/__tests__/phase-plan.test.ts +241 -0
- package/src/product-loop/__tests__/phase-rituals.test.ts +211 -0
- package/src/product-loop/__tests__/phase-runner.test.ts +454 -0
- package/src/product-loop/__tests__/phase-tracker-bridge.test.ts +85 -0
- package/src/product-loop/__tests__/product-identity.test.ts +47 -0
- package/src/product-loop/__tests__/reality-anchor.test.ts +58 -0
- package/src/product-loop/__tests__/repo-audit.test.ts +103 -0
- package/src/product-loop/__tests__/role-memory.test.ts +70 -0
- package/src/product-loop/__tests__/role-registry.test.ts +235 -0
- package/src/product-loop/__tests__/role-routing-ee.test.ts +90 -0
- package/src/product-loop/__tests__/route-decision-emit.test.ts +207 -0
- package/src/product-loop/__tests__/seed-questions.test.ts +33 -0
- package/src/product-loop/__tests__/ship-polish.test.ts +109 -0
- package/src/product-loop/__tests__/sprint-runner-emit.test.ts +324 -0
- package/src/product-loop/__tests__/sprint-runner.test.ts +501 -0
- package/src/product-loop/__tests__/stakeholder-acl.test.ts +94 -0
- package/src/product-loop/__tests__/state-md-ee-injections.test.ts +229 -0
- package/src/product-loop/__tests__/sufficiency-routing.spec.ts +177 -0
- package/src/product-loop/__tests__/typed-artifacts.test.ts +261 -0
- package/src/product-loop/__tests__/types.test.ts +103 -0
- package/src/product-loop/__tests__/verify-failure-threshold.test.ts +177 -0
- package/src/product-loop/__tests__/verify-failure-tracking.test.ts +154 -0
- package/src/product-loop/__tests__/verify-result.test.ts +60 -0
- package/src/product-loop/artifact-io.ts +239 -0
- package/src/product-loop/assumption-ledger.ts +270 -0
- package/src/product-loop/circuit-breakers.ts +76 -0
- package/src/product-loop/context-policy.ts +180 -0
- package/src/product-loop/cost-preview.ts +124 -0
- package/src/product-loop/cost-scoper.ts +49 -0
- package/src/product-loop/cross-run-memory.ts +450 -0
- package/src/product-loop/design-output.ts +24 -0
- package/src/product-loop/discover.ts +159 -0
- package/src/product-loop/discovery-context-format.ts +32 -0
- package/src/product-loop/discovery-council-runner.ts +82 -0
- package/src/product-loop/discovery-detection.ts +161 -0
- package/src/product-loop/discovery-ecosystem.ts +124 -0
- package/src/product-loop/discovery-interview.ts +237 -0
- package/src/product-loop/discovery-migrations.ts +40 -0
- package/src/product-loop/discovery-persistence.ts +219 -0
- package/src/product-loop/discovery-prompt-parser.ts +80 -0
- package/src/product-loop/discovery-recommender.ts +366 -0
- package/src/product-loop/discovery-schema.ts +143 -0
- package/src/product-loop/done-gate.ts +224 -0
- package/src/product-loop/feedback-routing.ts +82 -0
- package/src/product-loop/gather.ts +304 -0
- package/src/product-loop/index.ts +1305 -0
- package/src/product-loop/loop-driver.ts +901 -0
- package/src/product-loop/phase-budget.ts +182 -0
- package/src/product-loop/phase-plan.ts +158 -0
- package/src/product-loop/phase-rituals.ts +158 -0
- package/src/product-loop/phase-runner.ts +455 -0
- package/src/product-loop/phase-tracker-bridge.ts +60 -0
- package/src/product-loop/product-identity.ts +11 -0
- package/src/product-loop/reality-anchor.ts +45 -0
- package/src/product-loop/repo-audit.ts +314 -0
- package/src/product-loop/role-memory.ts +72 -0
- package/src/product-loop/role-registry.ts +175 -0
- package/src/product-loop/seed-questions.ts +51 -0
- package/src/product-loop/ship-polish.ts +164 -0
- package/src/product-loop/sprint-runner.ts +610 -0
- package/src/product-loop/stakeholder-acl.ts +82 -0
- package/src/product-loop/typed-artifacts.ts +332 -0
- package/src/product-loop/types.ts +443 -0
- package/src/product-loop/verify-failure-tracking.ts +225 -0
- package/src/product-loop/verify-result.ts +39 -0
- package/src/providers/__tests__/adapter-oauth-wiring.test.ts +129 -0
- package/src/providers/__tests__/capabilities-cosmetic.test.ts +119 -0
- package/src/providers/__tests__/capabilities-flags.test.ts +166 -0
- package/src/providers/__tests__/capabilities-provider-options.test.ts +203 -0
- package/src/providers/__tests__/capabilities-sanitize.test.ts +82 -0
- package/src/providers/__tests__/capabilities.test.ts +44 -0
- package/src/providers/__tests__/provider-coverage.test.ts +48 -0
- package/src/providers/__tests__/runtime-integration.test.ts +41 -24
- package/src/providers/__tests__/runtime.test.ts +23 -13
- package/src/providers/__tests__/siliconflow-history.test.ts +82 -0
- package/src/providers/__tests__/strategies-registry.test.ts +55 -0
- package/src/providers/__tests__/strategies-resolve.test.ts +137 -0
- package/src/providers/__tests__/wire-debug.test.ts +42 -0
- package/src/providers/adapter.ts +135 -27
- package/src/providers/anthropic.ts +7 -2
- package/src/providers/auth/__tests__/browser-flow.test.ts +235 -0
- package/src/providers/auth/__tests__/device-flow.test.ts +263 -0
- package/src/providers/auth/__tests__/gemini-oauth.test.ts +387 -0
- package/src/providers/auth/__tests__/openai-oauth.test.ts +378 -0
- package/src/providers/auth/__tests__/token-store.test.ts +152 -0
- package/src/providers/auth/browser-flow.ts +140 -0
- package/src/providers/auth/device-flow.ts +221 -0
- package/src/providers/auth/gemini-oauth.ts +351 -0
- package/src/providers/auth/openai-oauth.ts +455 -0
- package/src/providers/auth/registry.ts +121 -0
- package/src/providers/auth/token-store.ts +154 -0
- package/src/providers/auth/types.ts +111 -0
- package/src/providers/capabilities.ts +351 -0
- package/src/providers/endpoints.ts +68 -0
- package/src/providers/gemini.ts +7 -2
- package/src/providers/index.ts +5 -9
- package/src/providers/keychain.test.ts +5 -0
- package/src/providers/keychain.ts +137 -3
- package/src/providers/mcp-vision-bridge.test.ts +513 -0
- package/src/providers/mcp-vision-bridge.ts +1020 -0
- package/src/providers/openai-compatible.test.ts +2 -2
- package/src/providers/openai-compatible.ts +16 -8
- package/src/providers/openai.ts +21 -2
- package/src/providers/patch-zod-schema.ts +10 -13
- package/src/providers/pricing.test.ts +11 -2
- package/src/providers/pricing.ts +66 -10
- package/src/providers/prompt-cache-key.spec.ts +28 -0
- package/src/providers/runtime-mock.spec.ts +86 -0
- package/src/providers/runtime.ts +227 -55
- package/src/providers/siliconflow-history.ts +74 -0
- package/src/providers/strategies/anthropic.strategy.ts +25 -0
- package/src/providers/strategies/base.strategy.ts +76 -0
- package/src/providers/strategies/deepseek.strategy.ts +26 -0
- package/src/providers/strategies/google.strategy.ts +28 -0
- package/src/providers/strategies/ollama.strategy.ts +22 -0
- package/src/providers/strategies/openai.strategy.ts +55 -0
- package/src/providers/strategies/registry.ts +43 -0
- package/src/providers/strategies/siliconflow.strategy.ts +26 -0
- package/src/providers/strategies/xai.strategy.ts +26 -0
- package/src/providers/stream-loop.ts +15 -1
- package/src/providers/types.ts +34 -0
- package/src/providers/vision-proxy.test.ts +96 -11
- package/src/providers/vision-proxy.ts +153 -45
- package/src/providers/wire-debug.ts +163 -0
- package/src/router/__tests__/step-router.test.ts +150 -0
- package/src/router/classifier/regex.test.ts +3 -1
- package/src/router/classifier/regex.ts +71 -12
- package/src/router/cold.test.ts +5 -5
- package/src/router/decide.test.ts +17 -5
- package/src/router/decide.ts +144 -26
- package/src/router/provider-sentinel.test.ts +22 -0
- package/src/router/provider-sentinel.ts +20 -0
- package/src/router/step-router.ts +194 -0
- package/src/router/warm.test.ts +3 -2
- package/src/router/warm.ts +7 -1
- package/src/scaffold/__tests__/continuation-prompt.test.ts +93 -0
- package/src/scaffold/__tests__/continue-as-council.spec.ts +124 -0
- package/src/scaffold/__tests__/dotnet-assembly-name.test.ts +28 -0
- package/src/scaffold/__tests__/fe-scaffold-contents.test.ts +127 -0
- package/src/scaffold/__tests__/init-new.smoke.spec.ts +99 -0
- package/src/scaffold/__tests__/init-new.spec.ts +450 -0
- package/src/scaffold/__tests__/install-bb-templates.spec.ts +86 -0
- package/src/scaffold/__tests__/point-to-existing.spec.ts +114 -0
- package/src/scaffold/bb-ecosystem-apply.ts +454 -0
- package/src/scaffold/bb-quality-gate.ts +287 -0
- package/src/scaffold/continuation-prompt.ts +80 -0
- package/src/scaffold/continue-as-council.ts +99 -0
- package/src/scaffold/init-new.ts +1691 -0
- package/src/scaffold/point-to-existing.ts +83 -0
- package/src/scaffold/resume-from-gate-failures.ts +167 -0
- package/src/storage/__tests__/ui-interaction-log.test.ts +105 -0
- package/src/storage/atomic-io.test.ts +32 -1
- package/src/storage/atomic-io.ts +107 -9
- package/src/storage/config.ts +5 -1
- package/src/storage/db.ts +93 -4
- package/src/storage/index.ts +8 -1
- package/src/storage/interaction-log.ts +121 -0
- package/src/storage/migrations.ts +66 -4
- package/src/storage/sessions.ts +28 -0
- package/src/storage/transcript.ts +207 -4
- package/src/storage/ui-interaction-log.ts +160 -0
- package/src/storage/usage.ts +4 -2
- package/src/tools/bash.test.ts +27 -0
- package/src/tools/bash.ts +60 -4
- package/src/tools/file-tracker.test.ts +99 -0
- package/src/tools/file-tracker.ts +70 -0
- package/src/tools/file.ts +59 -5
- package/src/tools/registry.test.ts +38 -0
- package/src/tools/registry.ts +133 -27
- package/src/types/index.ts +166 -3
- package/src/ui/agents-modal.tsx +164 -144
- package/src/ui/app.tsx +6464 -6277
- package/src/ui/cards/__tests__/product-status-card.test.ts +30 -0
- package/src/ui/cards/product-status-card.tsx +117 -0
- package/src/ui/components/Toast.tsx +100 -0
- package/src/ui/components/__tests__/council-leader-bubble.test.ts +16 -0
- package/src/ui/components/__tests__/council-message-bubble.test.ts +85 -0
- package/src/ui/components/__tests__/council-phase-timeline.test.ts +57 -0
- package/src/ui/components/__tests__/council-placeholder-bubble.test.ts +16 -0
- package/src/ui/components/__tests__/council-question-card.test.ts +133 -0
- package/src/ui/components/__tests__/council-synthesis-banner.test.ts +12 -0
- package/src/ui/components/__tests__/use-pair-quote-buffer.test.ts +41 -0
- package/src/ui/components/bubble-layout.ts +66 -0
- package/src/ui/components/code-block-truncate.ts +24 -0
- package/src/ui/components/copy-flash-banner.tsx +31 -0
- package/src/ui/components/council-info-card.tsx +45 -0
- package/src/ui/components/council-leader-bubble.tsx +41 -0
- package/src/ui/components/council-message-bubble.tsx +111 -0
- package/src/ui/components/council-phase-timeline.tsx +91 -0
- package/src/ui/components/council-placeholder-bubble.tsx +65 -0
- package/src/ui/components/council-question-card.tsx +253 -0
- package/src/ui/components/council-status-list.tsx +111 -0
- package/src/ui/components/council-synthesis-banner.tsx +37 -0
- package/src/ui/components/diff-view.tsx +225 -0
- package/src/ui/components/halt-recovery-card.tsx +83 -0
- package/src/ui/components/hero-logo.tsx +62 -0
- package/src/ui/components/init-new-form-card.tsx +470 -0
- package/src/ui/components/lsp-views.tsx +104 -0
- package/src/ui/components/media-views.tsx +66 -0
- package/src/ui/components/message-view.tsx +343 -0
- package/src/ui/components/point-to-existing-form-card.tsx +136 -0
- package/src/ui/components/prompt-box.tsx +306 -0
- package/src/ui/components/role-palette.ts +62 -0
- package/src/ui/components/session-header.tsx +68 -0
- package/src/ui/components/slash-inline-menu.tsx +63 -0
- package/src/ui/components/structured-response-view.tsx +191 -0
- package/src/ui/components/tool-result-views.tsx +258 -0
- package/src/ui/components/use-pair-quote-buffer.ts +23 -0
- package/src/ui/constants.ts +242 -0
- package/src/ui/hooks/use-agent-editor.ts +64 -0
- package/src/ui/hooks/use-mcp-editor.ts +39 -0
- package/src/ui/hooks/use-model-picker.ts +50 -0
- package/src/ui/hooks/useTypeahead.ts +17 -3
- package/src/ui/mcp-modal.tsx +306 -278
- package/src/ui/modals/api-key-modal.tsx +99 -0
- package/src/ui/modals/connect-modal.tsx +259 -0
- package/src/ui/modals/model-picker-modal.tsx +323 -0
- package/src/ui/modals/sandbox-picker-modal.tsx +99 -0
- package/src/ui/modals/update-modal.tsx +67 -0
- package/src/ui/modals/wallet-picker-modal.tsx +186 -0
- package/src/ui/schedule-modal.tsx +75 -63
- package/src/ui/slash/__tests__/ideal.test.ts +134 -0
- package/src/ui/slash/__tests__/menu-parity.test.ts +43 -0
- package/src/ui/slash/__tests__/optimize.test.ts +2 -2
- package/src/ui/slash/__tests__/pin.test.ts +47 -0
- package/src/ui/slash/cost.ts +7 -3
- package/src/ui/slash/council-inspect.ts +188 -0
- package/src/ui/slash/council.ts +11 -8
- package/src/ui/slash/debug.ts +5 -5
- package/src/ui/slash/ee.ts +43 -10
- package/src/ui/slash/export.ts +281 -0
- package/src/ui/slash/ideal.ts +254 -0
- package/src/ui/slash/menu-items.ts +106 -0
- package/src/ui/slash/optimize.ts +1 -1
- package/src/ui/slash/pin.ts +41 -0
- package/src/ui/slash/registry.ts +9 -0
- package/src/ui/status-bar/index.tsx +22 -18
- package/src/ui/status-bar/store.ts +23 -3
- package/src/ui/syntax-highlight.ts +627 -0
- package/src/ui/theme.ts +41 -0
- package/src/ui/types.ts +83 -0
- package/src/ui/utils/color.ts +19 -0
- package/src/ui/utils/format.ts +86 -0
- package/src/ui/utils/modal.ts +9 -0
- package/src/ui/utils/text.ts +31 -0
- package/src/ui/utils/tools.ts +95 -0
- package/src/usage/__tests__/product-ledger.test.ts +85 -0
- package/src/usage/cost-log.ts +158 -0
- package/src/usage/decision-log.ts +86 -0
- package/src/usage/estimator.ts +24 -0
- package/src/usage/ledger.ts +40 -0
- package/src/usage/product-ledger.ts +111 -0
- package/src/usage/types.ts +1 -0
- package/src/utils/__tests__/auto-council-settings.test.ts +46 -0
- package/src/utils/__tests__/ee-logger.test.ts +197 -0
- package/src/utils/__tests__/file-lock.test.ts +74 -0
- package/src/utils/__tests__/rate-limit.test.ts +42 -0
- package/src/utils/__tests__/settings-disabled-models.test.ts +113 -0
- package/src/utils/__tests__/settings-web-research.test.ts +45 -0
- package/src/utils/__tests__/slugify.test.ts +45 -0
- package/src/utils/__tests__/visible-retry.test.ts +195 -0
- package/src/utils/clipboard-image.ts +38 -13
- package/src/utils/ee-logger.ts +163 -0
- package/src/utils/file-lock.ts +66 -0
- package/src/utils/host-clipboard.ts +38 -0
- package/src/utils/instructions.test.ts +28 -0
- package/src/utils/instructions.ts +37 -4
- package/src/utils/rate-limit.ts +21 -0
- package/src/utils/settings.test.ts +4 -4
- package/src/utils/settings.ts +1108 -787
- package/src/utils/shell.test.ts +72 -0
- package/src/utils/shell.ts +193 -0
- package/src/utils/slugify.ts +9 -0
- package/src/utils/visible-retry.ts +56 -0
- package/src/verify/__tests__/coverage-parsers.test.ts +86 -0
- package/src/verify/__tests__/dotnet-recipe.test.ts +88 -0
- package/src/verify/coverage-parsers.ts +76 -0
- package/src/verify/recipes.ts +76 -0
- package/dist/__test-stubs__/ee-server.js.map +0 -1
- package/dist/billing/index.js.map +0 -1
- package/dist/cloud/index.js.map +0 -1
- package/dist/daemon/scheduler.d.ts +0 -15
- package/dist/daemon/scheduler.js +0 -126
- package/dist/daemon/scheduler.js.map +0 -1
- package/dist/daemon/scheduler.test.js +0 -103
- package/dist/daemon/scheduler.test.js.map +0 -1
- package/dist/ee/__tests__/pipeline.integration.test.js +0 -151
- package/dist/ee/__tests__/pipeline.integration.test.js.map +0 -1
- package/dist/ee/auth.d.ts +0 -19
- package/dist/ee/auth.js +0 -48
- package/dist/ee/auth.js.map +0 -1
- package/dist/ee/auth.test.js.map +0 -1
- package/dist/ee/bridge.d.ts +0 -68
- package/dist/ee/bridge.js +0 -177
- package/dist/ee/bridge.js.map +0 -1
- package/dist/ee/bridge.test.js.map +0 -1
- package/dist/ee/client.js +0 -464
- package/dist/ee/client.js.map +0 -1
- package/dist/ee/client.test.js.map +0 -1
- package/dist/ee/embedding-cache.js.map +0 -1
- package/dist/ee/extract-session.js +0 -53
- package/dist/ee/extract-session.js.map +0 -1
- package/dist/ee/extract-session.test.js +0 -197
- package/dist/ee/extract-session.test.js.map +0 -1
- package/dist/ee/health.js +0 -64
- package/dist/ee/health.js.map +0 -1
- package/dist/ee/index.d.ts +0 -10
- package/dist/ee/index.js +0 -9
- package/dist/ee/index.js.map +0 -1
- package/dist/ee/intercept.js +0 -117
- package/dist/ee/intercept.js.map +0 -1
- package/dist/ee/intercept.test.js +0 -170
- package/dist/ee/intercept.test.js.map +0 -1
- package/dist/ee/judge.d.ts +0 -36
- package/dist/ee/judge.js +0 -56
- package/dist/ee/judge.js.map +0 -1
- package/dist/ee/judge.test.js +0 -139
- package/dist/ee/judge.test.js.map +0 -1
- package/dist/ee/offline-queue.js.map +0 -1
- package/dist/ee/offline-queue.test.js +0 -246
- package/dist/ee/offline-queue.test.js.map +0 -1
- package/dist/ee/posttool.js.map +0 -1
- package/dist/ee/posttool.test.js.map +0 -1
- package/dist/ee/prompt-stale.js.map +0 -1
- package/dist/ee/prompt-stale.test.js +0 -76
- package/dist/ee/prompt-stale.test.js.map +0 -1
- package/dist/ee/render.d.ts +0 -20
- package/dist/ee/render.js +0 -30
- package/dist/ee/render.js.map +0 -1
- package/dist/ee/render.test.js +0 -61
- package/dist/ee/render.test.js.map +0 -1
- package/dist/ee/scope.js.map +0 -1
- package/dist/ee/scope.test.js.map +0 -1
- package/dist/ee/tenant.js.map +0 -1
- package/dist/ee/touch.test.js +0 -60
- package/dist/ee/touch.test.js.map +0 -1
- package/dist/ee/types.d.ts +0 -300
- package/dist/ee/types.js.map +0 -1
- package/dist/flow/__tests__/migration.test.js.map +0 -1
- package/dist/flow/__tests__/parser.test.js.map +0 -1
- package/dist/flow/__tests__/run-manager.test.js.map +0 -1
- package/dist/flow/__tests__/scaffold.test.js.map +0 -1
- package/dist/flow/__tests__/warning-persist.test.js.map +0 -1
- package/dist/flow/artifact-io.js.map +0 -1
- package/dist/flow/compaction/__tests__/compress.test.js.map +0 -1
- package/dist/flow/compaction/__tests__/extract.test.js.map +0 -1
- package/dist/flow/compaction/__tests__/preserve.test.js.map +0 -1
- package/dist/flow/compaction/compress.js.map +0 -1
- package/dist/flow/compaction/extract.js.map +0 -1
- package/dist/flow/compaction/index.js.map +0 -1
- package/dist/flow/compaction/preserve.js.map +0 -1
- package/dist/flow/index.js.map +0 -1
- package/dist/flow/migration.js.map +0 -1
- package/dist/flow/parser.js.map +0 -1
- package/dist/flow/run-manager.d.ts +0 -36
- package/dist/flow/run-manager.js +0 -110
- package/dist/flow/run-manager.js.map +0 -1
- package/dist/flow/scaffold.js.map +0 -1
- package/dist/flow/warning-persist.js.map +0 -1
- package/dist/gsd/__tests__/types.test.js +0 -65
- package/dist/gsd/__tests__/types.test.js.map +0 -1
- package/dist/gsd/index.js.map +0 -1
- package/dist/gsd/types.d.ts +0 -4
- package/dist/gsd/types.js.map +0 -1
- package/dist/headless/output.d.ts +0 -68
- package/dist/headless/output.js.map +0 -1
- package/dist/headless/output.test.js +0 -178
- package/dist/headless/output.test.js.map +0 -1
- package/dist/hooks/config.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -44
- package/dist/hooks/index.js +0 -187
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/types.d.ts +0 -130
- package/dist/hooks/types.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -531
- package/dist/index.js.map +0 -1
- package/dist/lsp/builtins.d.ts +0 -9
- package/dist/lsp/builtins.js +0 -351
- package/dist/lsp/builtins.js.map +0 -1
- package/dist/lsp/builtins.test.js +0 -91
- package/dist/lsp/builtins.test.js.map +0 -1
- package/dist/lsp/client.d.ts +0 -20
- package/dist/lsp/client.js +0 -290
- package/dist/lsp/client.js.map +0 -1
- package/dist/lsp/manager.d.ts +0 -20
- package/dist/lsp/manager.js +0 -235
- package/dist/lsp/manager.js.map +0 -1
- package/dist/lsp/manager.test.js +0 -133
- package/dist/lsp/manager.test.js.map +0 -1
- package/dist/lsp/npm-cache.js.map +0 -1
- package/dist/lsp/npm-cache.test.js +0 -53
- package/dist/lsp/npm-cache.test.js.map +0 -1
- package/dist/lsp/runtime.d.ts +0 -6
- package/dist/lsp/runtime.js +0 -53
- package/dist/lsp/runtime.js.map +0 -1
- package/dist/lsp/smoke.test.js.map +0 -1
- package/dist/lsp/types.js.map +0 -1
- package/dist/mcp/auto-setup.js +0 -76
- package/dist/mcp/auto-setup.js.map +0 -1
- package/dist/mcp/catalog.js +0 -121
- package/dist/mcp/catalog.js.map +0 -1
- package/dist/mcp/oauth-callback.d.ts +0 -9
- package/dist/mcp/oauth-callback.js +0 -49
- package/dist/mcp/oauth-callback.js.map +0 -1
- package/dist/mcp/oauth-provider.js.map +0 -1
- package/dist/mcp/parse-headers.js.map +0 -1
- package/dist/mcp/parse-headers.test.js +0 -43
- package/dist/mcp/parse-headers.test.js.map +0 -1
- package/dist/mcp/runtime.js +0 -81
- package/dist/mcp/runtime.js.map +0 -1
- package/dist/mcp/smoke.test.js.map +0 -1
- package/dist/mcp/validate.d.ts +0 -9
- package/dist/mcp/validate.js.map +0 -1
- package/dist/models/__tests__/registry.test.js +0 -74
- package/dist/models/__tests__/registry.test.js.map +0 -1
- package/dist/models/catalog-client.js +0 -104
- package/dist/models/catalog-client.js.map +0 -1
- package/dist/models/catalog.json +0 -314
- package/dist/models/classify-tier.js +0 -34
- package/dist/models/classify-tier.js.map +0 -1
- package/dist/models/index.d.ts +0 -1
- package/dist/models/index.js +0 -2
- package/dist/models/index.js.map +0 -1
- package/dist/models/registry.d.ts +0 -19
- package/dist/models/registry.js +0 -65
- package/dist/models/registry.js.map +0 -1
- package/dist/ops/bug-report.js.map +0 -1
- package/dist/ops/bug-report.test.js.map +0 -1
- package/dist/ops/doctor.js +0 -162
- package/dist/ops/doctor.js.map +0 -1
- package/dist/ops/doctor.test.js +0 -95
- package/dist/ops/doctor.test.js.map +0 -1
- package/dist/orchestrator/__tests__/flow-resume.test.js.map +0 -1
- package/dist/orchestrator/__tests__/route-feedback.test.js +0 -47
- package/dist/orchestrator/__tests__/route-feedback.test.js.map +0 -1
- package/dist/orchestrator/abort.js.map +0 -1
- package/dist/orchestrator/abort.test.js.map +0 -1
- package/dist/orchestrator/agent.test.js +0 -126
- package/dist/orchestrator/agent.test.js.map +0 -1
- package/dist/orchestrator/cleanup.test.js +0 -67
- package/dist/orchestrator/cleanup.test.js.map +0 -1
- package/dist/orchestrator/compaction.d.ts +0 -36
- package/dist/orchestrator/compaction.js +0 -375
- package/dist/orchestrator/compaction.js.map +0 -1
- package/dist/orchestrator/compaction.test.js +0 -105
- package/dist/orchestrator/compaction.test.js.map +0 -1
- package/dist/orchestrator/delegations.d.ts +0 -49
- package/dist/orchestrator/delegations.js.map +0 -1
- package/dist/orchestrator/delegations.test.js +0 -107
- package/dist/orchestrator/delegations.test.js.map +0 -1
- package/dist/orchestrator/flow-resume.d.ts +0 -25
- package/dist/orchestrator/flow-resume.js +0 -53
- package/dist/orchestrator/flow-resume.js.map +0 -1
- package/dist/orchestrator/orchestrator.d.ts +0 -239
- package/dist/orchestrator/orchestrator.js +0 -3209
- package/dist/orchestrator/orchestrator.js.map +0 -1
- package/dist/orchestrator/pending-calls.js.map +0 -1
- package/dist/orchestrator/pending-calls.test.js.map +0 -1
- package/dist/orchestrator/reasoning.js +0 -53
- package/dist/orchestrator/reasoning.js.map +0 -1
- package/dist/orchestrator/reasoning.test.js +0 -26
- package/dist/orchestrator/reasoning.test.js.map +0 -1
- package/dist/orchestrator/sandbox.test.js +0 -94
- package/dist/orchestrator/sandbox.test.js.map +0 -1
- package/dist/pil/__tests__/budget.test.js +0 -33
- package/dist/pil/__tests__/budget.test.js.map +0 -1
- package/dist/pil/__tests__/layer1-intent.test.js +0 -199
- package/dist/pil/__tests__/layer1-intent.test.js.map +0 -1
- package/dist/pil/__tests__/layer2-personality.test.js +0 -57
- package/dist/pil/__tests__/layer2-personality.test.js.map +0 -1
- package/dist/pil/__tests__/layer3-ee-injection.test.js +0 -96
- package/dist/pil/__tests__/layer3-ee-injection.test.js.map +0 -1
- package/dist/pil/__tests__/layer4-gsd.test.js +0 -68
- package/dist/pil/__tests__/layer4-gsd.test.js.map +0 -1
- package/dist/pil/__tests__/layer5-context.test.js +0 -100
- package/dist/pil/__tests__/layer5-context.test.js.map +0 -1
- package/dist/pil/__tests__/layer6-output.test.js +0 -115
- package/dist/pil/__tests__/layer6-output.test.js.map +0 -1
- package/dist/pil/__tests__/ollama-classify.test.js.map +0 -1
- package/dist/pil/__tests__/orchestrator-integration.test.js.map +0 -1
- package/dist/pil/__tests__/pipeline.test.js +0 -150
- package/dist/pil/__tests__/pipeline.test.js.map +0 -1
- package/dist/pil/__tests__/response-tools.test.js +0 -133
- package/dist/pil/__tests__/response-tools.test.js.map +0 -1
- package/dist/pil/__tests__/schema.test.js +0 -112
- package/dist/pil/__tests__/schema.test.js.map +0 -1
- package/dist/pil/__tests__/store.test.js.map +0 -1
- package/dist/pil/__tests__/task-tier-map.test.js.map +0 -1
- package/dist/pil/budget.js.map +0 -1
- package/dist/pil/index.d.ts +0 -11
- package/dist/pil/index.js +0 -11
- package/dist/pil/index.js.map +0 -1
- package/dist/pil/layer1-intent.d.ts +0 -13
- package/dist/pil/layer1-intent.js +0 -142
- package/dist/pil/layer1-intent.js.map +0 -1
- package/dist/pil/layer2-personality.js +0 -29
- package/dist/pil/layer2-personality.js.map +0 -1
- package/dist/pil/layer3-ee-injection.d.ts +0 -10
- package/dist/pil/layer3-ee-injection.js +0 -72
- package/dist/pil/layer3-ee-injection.js.map +0 -1
- package/dist/pil/layer4-gsd.d.ts +0 -2
- package/dist/pil/layer4-gsd.js +0 -64
- package/dist/pil/layer4-gsd.js.map +0 -1
- package/dist/pil/layer5-context.js +0 -124
- package/dist/pil/layer5-context.js.map +0 -1
- package/dist/pil/layer6-output.d.ts +0 -18
- package/dist/pil/layer6-output.js +0 -105
- package/dist/pil/layer6-output.js.map +0 -1
- package/dist/pil/ollama-classify.js.map +0 -1
- package/dist/pil/pipeline.d.ts +0 -16
- package/dist/pil/pipeline.js +0 -96
- package/dist/pil/pipeline.js.map +0 -1
- package/dist/pil/response-tools.d.ts +0 -63
- package/dist/pil/response-tools.js +0 -87
- package/dist/pil/response-tools.js.map +0 -1
- package/dist/pil/schema.d.ts +0 -80
- package/dist/pil/schema.js +0 -43
- package/dist/pil/schema.js.map +0 -1
- package/dist/pil/store.js.map +0 -1
- package/dist/pil/task-tier-map.js.map +0 -1
- package/dist/pil/timeout.js.map +0 -1
- package/dist/pil/types.d.ts +0 -39
- package/dist/pil/types.js.map +0 -1
- package/dist/providers/__test-utils__/load-fixture.js.map +0 -1
- package/dist/providers/__tests__/runtime-integration.test.js +0 -71
- package/dist/providers/__tests__/runtime-integration.test.js.map +0 -1
- package/dist/providers/__tests__/runtime.test.js +0 -76
- package/dist/providers/__tests__/runtime.test.js.map +0 -1
- package/dist/providers/adapter.d.ts +0 -15
- package/dist/providers/adapter.js +0 -45
- package/dist/providers/adapter.js.map +0 -1
- package/dist/providers/adapter.test.js.map +0 -1
- package/dist/providers/anthropic.js +0 -141
- package/dist/providers/anthropic.js.map +0 -1
- package/dist/providers/errors.js.map +0 -1
- package/dist/providers/errors.test.js.map +0 -1
- package/dist/providers/gemini.js +0 -33
- package/dist/providers/gemini.js.map +0 -1
- package/dist/providers/gemini.test.js.map +0 -1
- package/dist/providers/index.d.ts +0 -11
- package/dist/providers/index.js +0 -15
- package/dist/providers/index.js.map +0 -1
- package/dist/providers/keychain.d.ts +0 -32
- package/dist/providers/keychain.js +0 -127
- package/dist/providers/keychain.js.map +0 -1
- package/dist/providers/keychain.test.js +0 -80
- package/dist/providers/keychain.test.js.map +0 -1
- package/dist/providers/ollama.js.map +0 -1
- package/dist/providers/ollama.test.js.map +0 -1
- package/dist/providers/openai-compatible.js +0 -45
- package/dist/providers/openai-compatible.js.map +0 -1
- package/dist/providers/openai-compatible.test.js +0 -53
- package/dist/providers/openai-compatible.test.js.map +0 -1
- package/dist/providers/openai.d.ts +0 -11
- package/dist/providers/openai.js +0 -33
- package/dist/providers/openai.js.map +0 -1
- package/dist/providers/openai.test.js.map +0 -1
- package/dist/providers/patch-zod-schema.js +0 -121
- package/dist/providers/patch-zod-schema.js.map +0 -1
- package/dist/providers/pricing.d.ts +0 -21
- package/dist/providers/pricing.js +0 -50
- package/dist/providers/pricing.js.map +0 -1
- package/dist/providers/pricing.test.js +0 -47
- package/dist/providers/pricing.test.js.map +0 -1
- package/dist/providers/runtime.d.ts +0 -21
- package/dist/providers/runtime.js +0 -83
- package/dist/providers/runtime.js.map +0 -1
- package/dist/providers/stream-loop.d.ts +0 -16
- package/dist/providers/stream-loop.js +0 -63
- package/dist/providers/stream-loop.js.map +0 -1
- package/dist/providers/types.d.ts +0 -106
- package/dist/providers/types.js +0 -12
- package/dist/providers/types.js.map +0 -1
- package/dist/providers/vision-proxy.js +0 -152
- package/dist/providers/vision-proxy.js.map +0 -1
- package/dist/providers/vision-proxy.test.js +0 -136
- package/dist/providers/vision-proxy.test.js.map +0 -1
- package/dist/router/classifier/grammars.js.map +0 -1
- package/dist/router/classifier/index.js.map +0 -1
- package/dist/router/classifier/index.test.js.map +0 -1
- package/dist/router/classifier/regex.js +0 -45
- package/dist/router/classifier/regex.js.map +0 -1
- package/dist/router/classifier/regex.test.js.map +0 -1
- package/dist/router/classifier/tree-sitter.js.map +0 -1
- package/dist/router/classifier/tree-sitter.test.js.map +0 -1
- package/dist/router/cold.js.map +0 -1
- package/dist/router/cold.test.js +0 -56
- package/dist/router/cold.test.js.map +0 -1
- package/dist/router/decide.js +0 -300
- package/dist/router/decide.js.map +0 -1
- package/dist/router/decide.test.js +0 -116
- package/dist/router/decide.test.js.map +0 -1
- package/dist/router/health.js.map +0 -1
- package/dist/router/health.test.js.map +0 -1
- package/dist/router/store.js.map +0 -1
- package/dist/router/types.js.map +0 -1
- package/dist/router/warm.js +0 -40
- package/dist/router/warm.js.map +0 -1
- package/dist/router/warm.test.js +0 -144
- package/dist/router/warm.test.js.map +0 -1
- package/dist/storage/__tests__/migrations.test.js.map +0 -1
- package/dist/storage/atomic-io.d.ts +0 -18
- package/dist/storage/atomic-io.js +0 -65
- package/dist/storage/atomic-io.js.map +0 -1
- package/dist/storage/atomic-io.test.js +0 -49
- package/dist/storage/atomic-io.test.js.map +0 -1
- package/dist/storage/config.js +0 -35
- package/dist/storage/config.js.map +0 -1
- package/dist/storage/config.test.js.map +0 -1
- package/dist/storage/db.js +0 -71
- package/dist/storage/db.js.map +0 -1
- package/dist/storage/index.d.ts +0 -8
- package/dist/storage/index.js +0 -10
- package/dist/storage/index.js.map +0 -1
- package/dist/storage/migrations.d.ts +0 -2
- package/dist/storage/migrations.js +0 -138
- package/dist/storage/migrations.js.map +0 -1
- package/dist/storage/session-dir.js.map +0 -1
- package/dist/storage/sessions.d.ts +0 -16
- package/dist/storage/sessions.js +0 -142
- package/dist/storage/sessions.js.map +0 -1
- package/dist/storage/tool-results.d.ts +0 -4
- package/dist/storage/tool-results.js.map +0 -1
- package/dist/storage/transcript-view.js +0 -23
- package/dist/storage/transcript-view.js.map +0 -1
- package/dist/storage/transcript.d.ts +0 -12
- package/dist/storage/transcript.js +0 -269
- package/dist/storage/transcript.js.map +0 -1
- package/dist/storage/transcript.test.js +0 -22
- package/dist/storage/transcript.test.js.map +0 -1
- package/dist/storage/usage-cap.js.map +0 -1
- package/dist/storage/usage-cap.test.js.map +0 -1
- package/dist/storage/usage.d.ts +0 -11
- package/dist/storage/usage.js +0 -65
- package/dist/storage/usage.js.map +0 -1
- package/dist/storage/workspaces.d.ts +0 -9
- package/dist/storage/workspaces.js +0 -60
- package/dist/storage/workspaces.js.map +0 -1
- package/dist/tools/bash.d.ts +0 -46
- package/dist/tools/bash.js +0 -541
- package/dist/tools/bash.js.map +0 -1
- package/dist/tools/bash.test.js +0 -240
- package/dist/tools/bash.test.js.map +0 -1
- package/dist/tools/computer.d.ts +0 -88
- package/dist/tools/computer.js.map +0 -1
- package/dist/tools/computer.test.js +0 -142
- package/dist/tools/computer.test.js.map +0 -1
- package/dist/tools/file.d.ts +0 -17
- package/dist/tools/file.js +0 -101
- package/dist/tools/file.js.map +0 -1
- package/dist/tools/file.test.js +0 -58
- package/dist/tools/file.test.js.map +0 -1
- package/dist/tools/grep.d.ts +0 -8
- package/dist/tools/grep.js.map +0 -1
- package/dist/tools/registry.d.ts +0 -19
- package/dist/tools/registry.js +0 -245
- package/dist/tools/registry.js.map +0 -1
- package/dist/tools/schedule.js +0 -498
- package/dist/tools/schedule.js.map +0 -1
- package/dist/tools/schedule.test.js +0 -118
- package/dist/tools/schedule.test.js.map +0 -1
- package/dist/types/index.d.ts +0 -279
- package/dist/types/index.js.map +0 -1
- package/dist/ui/agents-modal.d.ts +0 -36
- package/dist/ui/agents-modal.js +0 -54
- package/dist/ui/agents-modal.js.map +0 -1
- package/dist/ui/app.d.ts +0 -31
- package/dist/ui/app.js +0 -3957
- package/dist/ui/app.js.map +0 -1
- package/dist/ui/components/SuggestionOverlay.js.map +0 -1
- package/dist/ui/components/btw-overlay.js.map +0 -1
- package/dist/ui/hooks/useTypeahead.js +0 -111
- package/dist/ui/hooks/useTypeahead.js.map +0 -1
- package/dist/ui/markdown.d.ts +0 -5
- package/dist/ui/markdown.js.map +0 -1
- package/dist/ui/mcp-modal-types.d.ts +0 -24
- package/dist/ui/mcp-modal-types.js.map +0 -1
- package/dist/ui/mcp-modal.d.ts +0 -33
- package/dist/ui/mcp-modal.js +0 -94
- package/dist/ui/mcp-modal.js.map +0 -1
- package/dist/ui/plan.d.ts +0 -24
- package/dist/ui/plan.js.map +0 -1
- package/dist/ui/schedule-modal.d.ts +0 -15
- package/dist/ui/schedule-modal.js +0 -36
- package/dist/ui/schedule-modal.js.map +0 -1
- package/dist/ui/slash/__tests__/clear.test.js.map +0 -1
- package/dist/ui/slash/__tests__/compact.test.js.map +0 -1
- package/dist/ui/slash/__tests__/cost.test.js.map +0 -1
- package/dist/ui/slash/__tests__/discuss.test.js.map +0 -1
- package/dist/ui/slash/__tests__/execute.test.js.map +0 -1
- package/dist/ui/slash/__tests__/expand.test.js.map +0 -1
- package/dist/ui/slash/__tests__/optimize.test.js +0 -130
- package/dist/ui/slash/__tests__/optimize.test.js.map +0 -1
- package/dist/ui/slash/__tests__/plan.test.js.map +0 -1
- package/dist/ui/slash/clear.js.map +0 -1
- package/dist/ui/slash/compact.js.map +0 -1
- package/dist/ui/slash/cost.js +0 -55
- package/dist/ui/slash/cost.js.map +0 -1
- package/dist/ui/slash/council.js +0 -22
- package/dist/ui/slash/council.js.map +0 -1
- package/dist/ui/slash/debug.js +0 -111
- package/dist/ui/slash/debug.js.map +0 -1
- package/dist/ui/slash/discuss.js.map +0 -1
- package/dist/ui/slash/ee.js +0 -247
- package/dist/ui/slash/ee.js.map +0 -1
- package/dist/ui/slash/execute.js.map +0 -1
- package/dist/ui/slash/expand.js.map +0 -1
- package/dist/ui/slash/optimize.js +0 -37
- package/dist/ui/slash/optimize.js.map +0 -1
- package/dist/ui/slash/plan.js.map +0 -1
- package/dist/ui/slash/registry.d.ts +0 -23
- package/dist/ui/slash/registry.js.map +0 -1
- package/dist/ui/slash/route.js.map +0 -1
- package/dist/ui/slash/route.test.js.map +0 -1
- package/dist/ui/status-bar/index.d.ts +0 -14
- package/dist/ui/status-bar/index.js +0 -74
- package/dist/ui/status-bar/index.js.map +0 -1
- package/dist/ui/status-bar/index.test.js.map +0 -1
- package/dist/ui/status-bar/store.d.ts +0 -38
- package/dist/ui/status-bar/store.js +0 -144
- package/dist/ui/status-bar/store.js.map +0 -1
- package/dist/ui/status-bar/store.test.js.map +0 -1
- package/dist/ui/status-bar/tier-badge.js.map +0 -1
- package/dist/ui/status-bar/tier-badge.test.js.map +0 -1
- package/dist/ui/status-bar/usd-meter.js.map +0 -1
- package/dist/ui/status-bar/usd-meter.test.js.map +0 -1
- package/dist/ui/terminal-selection-text.js.map +0 -1
- package/dist/ui/theme.d.ts +0 -53
- package/dist/ui/theme.js +0 -53
- package/dist/ui/theme.js.map +0 -1
- package/dist/usage/downgrade.js.map +0 -1
- package/dist/usage/downgrade.test.js.map +0 -1
- package/dist/usage/estimator.d.ts +0 -17
- package/dist/usage/estimator.js +0 -28
- package/dist/usage/estimator.js.map +0 -1
- package/dist/usage/estimator.test.js.map +0 -1
- package/dist/usage/ledger.d.ts +0 -42
- package/dist/usage/ledger.js +0 -181
- package/dist/usage/ledger.js.map +0 -1
- package/dist/usage/ledger.test.js.map +0 -1
- package/dist/usage/midstream.js.map +0 -1
- package/dist/usage/midstream.test.js.map +0 -1
- package/dist/usage/thresholds.js.map +0 -1
- package/dist/usage/thresholds.test.js.map +0 -1
- package/dist/usage/types.d.ts +0 -30
- package/dist/usage/types.js.map +0 -1
- package/dist/utils/at-mentions.js.map +0 -1
- package/dist/utils/clipboard-image.js +0 -121
- package/dist/utils/clipboard-image.js.map +0 -1
- package/dist/utils/file-index.js.map +0 -1
- package/dist/utils/git-root.js.map +0 -1
- package/dist/utils/host-clipboard.d.ts +0 -4
- package/dist/utils/host-clipboard.js +0 -32
- package/dist/utils/host-clipboard.js.map +0 -1
- package/dist/utils/install-manager.js.map +0 -1
- package/dist/utils/install-manager.test.js +0 -127
- package/dist/utils/install-manager.test.js.map +0 -1
- package/dist/utils/instructions.js +0 -107
- package/dist/utils/instructions.js.map +0 -1
- package/dist/utils/instructions.test.js +0 -68
- package/dist/utils/instructions.test.js.map +0 -1
- package/dist/utils/permission-mode.js.map +0 -1
- package/dist/utils/permission-mode.test.js.map +0 -1
- package/dist/utils/redactor.js.map +0 -1
- package/dist/utils/redactor.test.js +0 -84
- package/dist/utils/redactor.test.js.map +0 -1
- package/dist/utils/settings.d.ts +0 -179
- package/dist/utils/settings.js +0 -579
- package/dist/utils/settings.js.map +0 -1
- package/dist/utils/settings.test.js +0 -160
- package/dist/utils/settings.test.js.map +0 -1
- package/dist/utils/side-question.js.map +0 -1
- package/dist/utils/skills.js +0 -194
- package/dist/utils/skills.js.map +0 -1
- package/dist/utils/skills.test.js +0 -45
- package/dist/utils/skills.test.js.map +0 -1
- package/dist/utils/subagent-display.js.map +0 -1
- package/dist/utils/subagent-display.test.js +0 -21
- package/dist/utils/subagent-display.test.js.map +0 -1
- package/dist/utils/subagents-settings.test.js +0 -58
- package/dist/utils/subagents-settings.test.js.map +0 -1
- package/dist/utils/telegram-audio-settings.test.js +0 -39
- package/dist/utils/telegram-audio-settings.test.js.map +0 -1
- package/dist/utils/update-checker.js +0 -22
- package/dist/utils/update-checker.js.map +0 -1
- package/dist/utils/update-checker.test.js +0 -125
- package/dist/utils/update-checker.test.js.map +0 -1
- package/dist/verify/checkpoint.d.ts +0 -11
- package/dist/verify/checkpoint.js.map +0 -1
- package/dist/verify/checkpoint.test.js +0 -160
- package/dist/verify/checkpoint.test.js.map +0 -1
- package/dist/verify/entrypoint.d.ts +0 -30
- package/dist/verify/entrypoint.js +0 -349
- package/dist/verify/entrypoint.js.map +0 -1
- package/dist/verify/entrypoint.test.js +0 -233
- package/dist/verify/entrypoint.test.js.map +0 -1
- package/dist/verify/environment.d.ts +0 -9
- package/dist/verify/environment.js +0 -116
- package/dist/verify/environment.js.map +0 -1
- package/dist/verify/environment.test.js +0 -94
- package/dist/verify/environment.test.js.map +0 -1
- package/dist/verify/evidence.d.ts +0 -10
- package/dist/verify/evidence.js.map +0 -1
- package/dist/verify/orchestrator.d.ts +0 -25
- package/dist/verify/orchestrator.js +0 -87
- package/dist/verify/orchestrator.js.map +0 -1
- package/dist/verify/orchestrator.test.js +0 -126
- package/dist/verify/orchestrator.test.js.map +0 -1
- package/dist/verify/recipes.d.ts +0 -20
- package/dist/verify/recipes.js +0 -451
- package/dist/verify/recipes.js.map +0 -1
- package/dist/verify/retry.d.ts +0 -4
- package/dist/verify/retry.js.map +0 -1
- package/dist/verify/runtime-prep.test.js +0 -38
- package/dist/verify/runtime-prep.test.js.map +0 -1
- /package/dist/{__test-stubs__ → src/__test-stubs__}/ee-server.d.ts +0 -0
- /package/dist/{__test-stubs__ → src/__test-stubs__}/ee-server.js +0 -0
- /package/dist/{daemon/scheduler.test.d.ts → src/__test-stubs__/vitest-setup.d.ts} +0 -0
- /package/dist/{ee/auth.test.d.ts → src/__tests__/council/bubble-layout.test.d.ts} +0 -0
- /package/dist/{ee/bridge.test.d.ts → src/__tests__/council/code-block-truncate.test.d.ts} +0 -0
- /package/dist/{ee/client.test.d.ts → src/__tests__/council/role-palette.test.d.ts} +0 -0
- /package/dist/{ee/extract-session.test.d.ts → src/__tests__/first-run-wizard.test.d.ts} +0 -0
- /package/dist/{ee/intercept.test.d.ts → src/agent-harness/__tests__/cli-flags.spec.d.ts} +0 -0
- /package/dist/{ee/judge.test.d.ts → src/agent-harness/__tests__/driver.spec.d.ts} +0 -0
- /package/dist/{ee/offline-queue.test.d.ts → src/agent-harness/__tests__/idle.spec.d.ts} +0 -0
- /package/dist/{ee/posttool.test.d.ts → src/agent-harness/__tests__/mock-llm.spec.d.ts} +0 -0
- /package/dist/{ee/render.test.d.ts → src/agent-harness/__tests__/predicate.spec.d.ts} +0 -0
- /package/dist/{ee/scope.test.d.ts → src/agent-harness/__tests__/protocol.spec.d.ts} +0 -0
- /package/dist/{ee/touch.test.d.ts → src/agent-harness/__tests__/schema.spec.d.ts} +0 -0
- /package/dist/{flow/__tests__/migration.test.d.ts → src/agent-harness/__tests__/selector.spec.d.ts} +0 -0
- /package/dist/{flow/__tests__/parser.test.d.ts → src/agent-harness/__tests__/sidechannel.spec.d.ts} +0 -0
- /package/dist/{flow/__tests__/run-manager.test.d.ts → src/agent-harness/__tests__/spec-helpers.spec.d.ts} +0 -0
- /package/dist/{billing → src/billing}/index.d.ts +0 -0
- /package/dist/{billing → src/billing}/index.js +0 -0
- /package/dist/{flow/__tests__/scaffold.test.d.ts → src/chat/__tests__/broadcast-bus.test.d.ts} +0 -0
- /package/dist/{flow/compaction/__tests__/compress.test.d.ts → src/chat/__tests__/channel-manager.test.d.ts} +0 -0
- /package/dist/{flow/compaction/__tests__/extract.test.d.ts → src/chat/__tests__/client.test.d.ts} +0 -0
- /package/dist/{flow/compaction/__tests__/preserve.test.d.ts → src/chat/__tests__/discord-integration.test.d.ts} +0 -0
- /package/dist/{gsd/__tests__/types.test.d.ts → src/chat/__tests__/intent-prompt.test.d.ts} +0 -0
- /package/dist/{headless/output.test.d.ts → src/chat/__tests__/verdict-resolver.test.d.ts} +0 -0
- /package/dist/{lsp/builtins.test.d.ts → src/cli/__tests__/bw-vault.test.d.ts} +0 -0
- /package/dist/{lsp/manager.test.d.ts → src/cli/__tests__/keys-bundle.test.d.ts} +0 -0
- /package/dist/{lsp/npm-cache.test.d.ts → src/cli/__tests__/share-cmd.test.d.ts} +0 -0
- /package/dist/{lsp/smoke.test.d.ts → src/cli/config/__tests__/model-picker.test.d.ts} +0 -0
- /package/dist/{mcp/parse-headers.test.d.ts → src/cli/config/__tests__/provider-fetch.test.d.ts} +0 -0
- /package/dist/{mcp/smoke.test.d.ts → src/cli/cost-forensics.test.d.ts} +0 -0
- /package/dist/{models/__tests__/registry.test.d.ts → src/cli/keys.test.d.ts} +0 -0
- /package/dist/{cloud → src/cloud}/index.d.ts +0 -0
- /package/dist/{cloud → src/cloud}/index.js +0 -0
- /package/dist/{ops/bug-report.test.d.ts → src/council/__tests__/accounting.test.d.ts} +0 -0
- /package/dist/{ops/doctor.test.d.ts → src/council/__tests__/audit-replay.test.d.ts} +0 -0
- /package/dist/{orchestrator/__tests__/route-feedback.test.d.ts → src/council/__tests__/clarifier-max-rounds.test.d.ts} +0 -0
- /package/dist/{orchestrator/abort.test.d.ts → src/council/__tests__/clarifier-options.test.d.ts} +0 -0
- /package/dist/{orchestrator/agent.test.d.ts → src/council/__tests__/cost-aware.test.d.ts} +0 -0
- /package/dist/{orchestrator/cleanup.test.d.ts → src/council/__tests__/debate-planner-structured.test.d.ts} +0 -0
- /package/dist/{orchestrator/compaction.test.d.ts → src/council/__tests__/evaluator-metrics.test.d.ts} +0 -0
- /package/dist/{orchestrator/delegations.test.d.ts → src/council/__tests__/parse-outcome-fallback.test.d.ts} +0 -0
- /package/dist/{orchestrator/pending-calls.test.d.ts → src/council/__tests__/research-tools.test.d.ts} +0 -0
- /package/dist/{orchestrator/reasoning.test.d.ts → src/council/__tests__/round-tools.test.d.ts} +0 -0
- /package/dist/{orchestrator/sandbox.test.d.ts → src/council/__tests__/tool-trace.test.d.ts} +0 -0
- /package/dist/{router → src/council}/types.js +0 -0
- /package/dist/{pil/__tests__/budget.test.d.ts → src/daemon/scheduler.test.d.ts} +0 -0
- /package/dist/{pil/__tests__/layer1-intent.test.d.ts → src/ee/__tests__/pil-context-bridge.test.d.ts} +0 -0
- /package/dist/{ee → src/ee}/__tests__/pipeline.integration.test.d.ts +0 -0
- /package/dist/{pil/__tests__/layer2-personality.test.d.ts → src/ee/__tests__/render-sink-wiring.test.d.ts} +0 -0
- /package/dist/{pil/__tests__/layer3-ee-injection.test.d.ts → src/ee/auth.test.d.ts} +0 -0
- /package/dist/{ee → src/ee}/auth.test.js +0 -0
- /package/dist/{pil/__tests__/layer4-gsd.test.d.ts → src/ee/bridge.test.d.ts} +0 -0
- /package/dist/{ee → src/ee}/bridge.test.js +0 -0
- /package/dist/{ee → src/ee}/client.d.ts +0 -0
- /package/dist/{pil/__tests__/layer5-context.test.d.ts → src/ee/client.test.d.ts} +0 -0
- /package/dist/{ee → src/ee}/client.test.js +0 -0
- /package/dist/{ee → src/ee}/embedding-cache.d.ts +0 -0
- /package/dist/{ee → src/ee}/embedding-cache.js +0 -0
- /package/dist/{ee → src/ee}/extract-session.d.ts +0 -0
- /package/dist/{pil/__tests__/layer6-output.test.d.ts → src/ee/extract-session.test.d.ts} +0 -0
- /package/dist/{ee → src/ee}/health.d.ts +0 -0
- /package/dist/{ee → src/ee}/intercept.d.ts +0 -0
- /package/dist/{pil/__tests__/ollama-classify.test.d.ts → src/ee/intercept.test.d.ts} +0 -0
- /package/dist/{pil/__tests__/pipeline.test.d.ts → src/ee/judge.test.d.ts} +0 -0
- /package/dist/{pil/__tests__/response-tools.test.d.ts → src/ee/mistake-detector.test.d.ts} +0 -0
- /package/dist/{ee → src/ee}/offline-queue.d.ts +0 -0
- /package/dist/{ee → src/ee}/offline-queue.js +0 -0
- /package/dist/{pil/__tests__/schema.test.d.ts → src/ee/offline-queue.test.d.ts} +0 -0
- /package/dist/{pil/__tests__/store.test.d.ts → src/ee/phase-outcome.test.d.ts} +0 -0
- /package/dist/{pil/__tests__/task-tier-map.test.d.ts → src/ee/phase-tracker.test.d.ts} +0 -0
- /package/dist/{ee → src/ee}/posttool.d.ts +0 -0
- /package/dist/{ee → src/ee}/posttool.js +0 -0
- /package/dist/{providers/__tests__/runtime-integration.test.d.ts → src/ee/posttool.test.d.ts} +0 -0
- /package/dist/{ee → src/ee}/posttool.test.js +0 -0
- /package/dist/{ee → src/ee}/prompt-stale.d.ts +0 -0
- /package/dist/{ee → src/ee}/prompt-stale.js +0 -0
- /package/dist/{ee → src/ee}/prompt-stale.test.d.ts +0 -0
- /package/dist/{providers/__tests__/runtime.test.d.ts → src/ee/render.test.d.ts} +0 -0
- /package/dist/{ee → src/ee}/scope.d.ts +0 -0
- /package/dist/{ee → src/ee}/scope.js +0 -0
- /package/dist/{providers/adapter.test.d.ts → src/ee/scope.test.d.ts} +0 -0
- /package/dist/{ee → src/ee}/scope.test.js +0 -0
- /package/dist/{providers/errors.test.d.ts → src/ee/session-trajectory.test.d.ts} +0 -0
- /package/dist/{ee → src/ee}/tenant.d.ts +0 -0
- /package/dist/{ee → src/ee}/tenant.js +0 -0
- /package/dist/{providers/gemini.test.d.ts → src/ee/touch.test.d.ts} +0 -0
- /package/dist/{ee → src/ee}/types.js +0 -0
- /package/dist/{providers/keychain.test.d.ts → src/flow/__tests__/migration.test.d.ts} +0 -0
- /package/dist/{flow → src/flow}/__tests__/migration.test.js +0 -0
- /package/dist/{providers/ollama.test.d.ts → src/flow/__tests__/parser.test.d.ts} +0 -0
- /package/dist/{flow → src/flow}/__tests__/parser.test.js +0 -0
- /package/dist/{providers/openai-compatible.test.d.ts → src/flow/__tests__/run-manager-product.test.d.ts} +0 -0
- /package/dist/{providers/openai.test.d.ts → src/flow/__tests__/run-manager.test.d.ts} +0 -0
- /package/dist/{flow → src/flow}/__tests__/run-manager.test.js +0 -0
- /package/dist/{providers/pricing.test.d.ts → src/flow/__tests__/scaffold-checkpoint.test.d.ts} +0 -0
- /package/dist/{providers/vision-proxy.test.d.ts → src/flow/__tests__/scaffold.test.d.ts} +0 -0
- /package/dist/{flow → src/flow}/__tests__/scaffold.test.js +0 -0
- /package/dist/{flow → src/flow}/__tests__/warning-persist.test.d.ts +0 -0
- /package/dist/{flow → src/flow}/__tests__/warning-persist.test.js +0 -0
- /package/dist/{flow → src/flow}/artifact-io.d.ts +0 -0
- /package/dist/{flow → src/flow}/artifact-io.js +0 -0
- /package/dist/{router/classifier/index.test.d.ts → src/flow/compaction/__tests__/compress.test.d.ts} +0 -0
- /package/dist/{flow → src/flow}/compaction/__tests__/compress.test.js +0 -0
- /package/dist/{router/classifier/regex.test.d.ts → src/flow/compaction/__tests__/extract.test.d.ts} +0 -0
- /package/dist/{flow → src/flow}/compaction/__tests__/extract.test.js +0 -0
- /package/dist/{router/classifier/tree-sitter.test.d.ts → src/flow/compaction/__tests__/preserve.test.d.ts} +0 -0
- /package/dist/{flow → src/flow}/compaction/__tests__/preserve.test.js +0 -0
- /package/dist/{flow → src/flow}/compaction/compress.d.ts +0 -0
- /package/dist/{flow → src/flow}/compaction/compress.js +0 -0
- /package/dist/{flow → src/flow}/compaction/extract.d.ts +0 -0
- /package/dist/{flow → src/flow}/compaction/extract.js +0 -0
- /package/dist/{flow → src/flow}/compaction/index.d.ts +0 -0
- /package/dist/{flow → src/flow}/compaction/index.js +0 -0
- /package/dist/{flow → src/flow}/compaction/preserve.d.ts +0 -0
- /package/dist/{flow → src/flow}/compaction/preserve.js +0 -0
- /package/dist/{flow → src/flow}/index.d.ts +0 -0
- /package/dist/{flow → src/flow}/index.js +0 -0
- /package/dist/{flow → src/flow}/migration.d.ts +0 -0
- /package/dist/{flow → src/flow}/migration.js +0 -0
- /package/dist/{flow → src/flow}/parser.d.ts +0 -0
- /package/dist/{flow → src/flow}/parser.js +0 -0
- /package/dist/{flow → src/flow}/scaffold.d.ts +0 -0
- /package/dist/{flow → src/flow}/scaffold.js +0 -0
- /package/dist/{flow → src/flow}/warning-persist.d.ts +0 -0
- /package/dist/{flow → src/flow}/warning-persist.js +0 -0
- /package/dist/{router/cold.test.d.ts → src/gsd/__tests__/complexity.test.d.ts} +0 -0
- /package/dist/{router/decide.test.d.ts → src/gsd/__tests__/directives.test.d.ts} +0 -0
- /package/dist/{router/health.test.d.ts → src/gsd/__tests__/gray-areas.test.d.ts} +0 -0
- /package/dist/{router/warm.test.d.ts → src/gsd/__tests__/types.test.d.ts} +0 -0
- /package/dist/{gsd → src/gsd}/index.d.ts +0 -0
- /package/dist/{gsd → src/gsd}/index.js +0 -0
- /package/dist/{gsd → src/gsd}/types.js +0 -0
- /package/dist/{storage/atomic-io.test.d.ts → src/headless/__tests__/council-answers.test.d.ts} +0 -0
- /package/dist/{headless → src/headless}/output.js +0 -0
- /package/dist/{storage/config.test.d.ts → src/headless/output.test.d.ts} +0 -0
- /package/dist/{hooks → src/hooks}/config.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/config.js +0 -0
- /package/dist/{hooks → src/hooks}/types.js +0 -0
- /package/dist/{storage/transcript.test.d.ts → src/lsp/builtins.test.d.ts} +0 -0
- /package/dist/{storage/usage-cap.test.d.ts → src/lsp/manager.test.d.ts} +0 -0
- /package/dist/{lsp → src/lsp}/npm-cache.d.ts +0 -0
- /package/dist/{lsp → src/lsp}/npm-cache.js +0 -0
- /package/dist/{tools/bash.test.d.ts → src/lsp/npm-cache.test.d.ts} +0 -0
- /package/dist/{tools/computer.test.d.ts → src/lsp/smoke.test.d.ts} +0 -0
- /package/dist/{lsp → src/lsp}/smoke.test.js +0 -0
- /package/dist/{lsp → src/lsp}/types.d.ts +0 -0
- /package/dist/{lsp → src/lsp}/types.js +0 -0
- /package/dist/{tools/file.test.d.ts → src/mcp/__tests__/auto-setup.test.d.ts} +0 -0
- /package/dist/{tools/schedule.test.d.ts → src/mcp/__tests__/harness-driver-action-tools.spec.d.ts} +0 -0
- /package/dist/{ui/slash/__tests__/discuss.test.d.ts → src/mcp/__tests__/harness-driver-async-tools.spec.d.ts} +0 -0
- /package/dist/{ui/slash/__tests__/execute.test.d.ts → src/mcp/__tests__/harness-driver-read-tools.spec.d.ts} +0 -0
- /package/dist/{ui/slash/__tests__/plan.test.d.ts → src/mcp/__tests__/harness-driver-security.spec.d.ts} +0 -0
- /package/dist/{ui/status-bar/index.test.d.ts → src/mcp/__tests__/harness-driver.spec.d.ts} +0 -0
- /package/dist/{ui/status-bar/store.test.d.ts → src/mcp/__tests__/lazy-schema.spec.d.ts} +0 -0
- /package/dist/{ui/status-bar/tier-badge.test.d.ts → src/mcp/__tests__/mcp-keychain.test.d.ts} +0 -0
- /package/dist/{ui/status-bar/usd-meter.test.d.ts → src/mcp/__tests__/research-onboarding.test.d.ts} +0 -0
- /package/dist/{usage/downgrade.test.d.ts → src/mcp/__tests__/runtime-hydration.test.d.ts} +0 -0
- /package/dist/{usage/estimator.test.d.ts → src/mcp/__tests__/runtime-sanitize.test.d.ts} +0 -0
- /package/dist/{mcp → src/mcp}/auto-setup.d.ts +0 -0
- /package/dist/{mcp → src/mcp}/catalog.d.ts +0 -0
- /package/dist/{mcp → src/mcp}/oauth-provider.d.ts +0 -0
- /package/dist/{mcp → src/mcp}/oauth-provider.js +0 -0
- /package/dist/{mcp → src/mcp}/parse-headers.d.ts +0 -0
- /package/dist/{mcp → src/mcp}/parse-headers.js +0 -0
- /package/dist/{usage/ledger.test.d.ts → src/mcp/parse-headers.test.d.ts} +0 -0
- /package/dist/{mcp → src/mcp}/runtime.d.ts +0 -0
- /package/dist/{usage/midstream.test.d.ts → src/mcp/smoke.test.d.ts} +0 -0
- /package/dist/{mcp → src/mcp}/smoke.test.js +0 -0
- /package/dist/{mcp → src/mcp}/validate.js +0 -0
- /package/dist/{usage/thresholds.test.d.ts → src/models/__tests__/registry.test.d.ts} +0 -0
- /package/dist/{models → src/models}/catalog-client.d.ts +0 -0
- /package/dist/{models → src/models}/classify-tier.d.ts +0 -0
- /package/dist/{utils/install-manager.test.d.ts → src/ops/__tests__/doctor-council-mcp.test.d.ts} +0 -0
- /package/dist/{utils/instructions.test.d.ts → src/ops/__tests__/doctor-ee-health.test.d.ts} +0 -0
- /package/dist/{ops → src/ops}/bug-report.d.ts +0 -0
- /package/dist/{ops → src/ops}/bug-report.js +0 -0
- /package/dist/{utils/permission-mode.test.d.ts → src/ops/bug-report.test.d.ts} +0 -0
- /package/dist/{ops → src/ops}/bug-report.test.js +0 -0
- /package/dist/{ops → src/ops}/doctor.d.ts +0 -0
- /package/dist/{utils/redactor.test.d.ts → src/ops/doctor.test.d.ts} +0 -0
- /package/dist/{utils/settings.test.d.ts → src/orchestrator/__tests__/batch-turn-runner.test.d.ts} +0 -0
- /package/dist/{utils/skills.test.d.ts → src/orchestrator/__tests__/council-manager.test.d.ts} +0 -0
- /package/dist/{utils/subagent-display.test.d.ts → src/orchestrator/__tests__/cross-turn-dedup.test.d.ts} +0 -0
- /package/dist/{orchestrator → src/orchestrator}/__tests__/flow-resume.test.d.ts +0 -0
- /package/dist/{orchestrator → src/orchestrator}/__tests__/flow-resume.test.js +0 -0
- /package/dist/{utils/subagents-settings.test.d.ts → src/orchestrator/__tests__/message-processor.test.d.ts} +0 -0
- /package/dist/{utils/telegram-audio-settings.test.d.ts → src/orchestrator/__tests__/read-path-budget.test.d.ts} +0 -0
- /package/dist/{utils/update-checker.test.d.ts → src/orchestrator/__tests__/retry-classifier.test.d.ts} +0 -0
- /package/dist/{verify/checkpoint.test.d.ts → src/orchestrator/__tests__/retry-stream.test.d.ts} +0 -0
- /package/dist/{verify/entrypoint.test.d.ts → src/orchestrator/__tests__/route-feedback.test.d.ts} +0 -0
- /package/dist/{verify/environment.test.d.ts → src/orchestrator/__tests__/stream-runner.test.d.ts} +0 -0
- /package/dist/{orchestrator → src/orchestrator}/abort.d.ts +0 -0
- /package/dist/{orchestrator → src/orchestrator}/abort.js +0 -0
- /package/dist/{verify/orchestrator.test.d.ts → src/orchestrator/abort.test.d.ts} +0 -0
- /package/dist/{orchestrator → src/orchestrator}/abort.test.js +0 -0
- /package/dist/{verify/runtime-prep.test.d.ts → src/orchestrator/agent.test.d.ts} +0 -0
- /package/dist/{orchestrator → src/orchestrator}/delegations.js +0 -0
- /package/dist/{orchestrator → src/orchestrator}/pending-calls.d.ts +0 -0
- /package/dist/{orchestrator → src/orchestrator}/pending-calls.js +0 -0
- /package/dist/{orchestrator → src/orchestrator}/pending-calls.test.js +0 -0
- /package/dist/{orchestrator → src/orchestrator}/reasoning.d.ts +0 -0
- /package/dist/{pil → src/pil}/__tests__/ollama-classify.test.js +0 -0
- /package/dist/{pil → src/pil}/__tests__/orchestrator-integration.test.d.ts +0 -0
- /package/dist/{pil → src/pil}/__tests__/orchestrator-integration.test.js +0 -0
- /package/dist/{pil → src/pil}/__tests__/store.test.js +0 -0
- /package/dist/{pil → src/pil}/__tests__/task-tier-map.test.js +0 -0
- /package/dist/{pil → src/pil}/budget.d.ts +0 -0
- /package/dist/{pil → src/pil}/budget.js +0 -0
- /package/dist/{pil → src/pil}/layer2-personality.d.ts +0 -0
- /package/dist/{pil → src/pil}/layer5-context.d.ts +0 -0
- /package/dist/{pil → src/pil}/ollama-classify.d.ts +0 -0
- /package/dist/{pil → src/pil}/ollama-classify.js +0 -0
- /package/dist/{pil → src/pil}/store.d.ts +0 -0
- /package/dist/{pil → src/pil}/store.js +0 -0
- /package/dist/{pil → src/pil}/task-tier-map.d.ts +0 -0
- /package/dist/{pil → src/pil}/task-tier-map.js +0 -0
- /package/dist/{pil → src/pil}/timeout.d.ts +0 -0
- /package/dist/{pil → src/pil}/timeout.js +0 -0
- /package/dist/{pil → src/pil}/types.js +0 -0
- /package/dist/{providers → src/providers}/__test-utils__/load-fixture.d.ts +0 -0
- /package/dist/{providers → src/providers}/__test-utils__/load-fixture.js +0 -0
- /package/dist/{providers → src/providers}/adapter.test.js +0 -0
- /package/dist/{providers → src/providers}/anthropic.d.ts +0 -0
- /package/dist/{providers → src/providers}/errors.d.ts +0 -0
- /package/dist/{providers → src/providers}/errors.js +0 -0
- /package/dist/{providers → src/providers}/errors.test.js +0 -0
- /package/dist/{providers → src/providers}/gemini.d.ts +0 -0
- /package/dist/{providers → src/providers}/gemini.test.js +0 -0
- /package/dist/{providers → src/providers}/ollama.d.ts +0 -0
- /package/dist/{providers → src/providers}/ollama.js +0 -0
- /package/dist/{providers → src/providers}/ollama.test.js +0 -0
- /package/dist/{providers → src/providers}/openai-compatible.d.ts +0 -0
- /package/dist/{providers → src/providers}/openai.test.js +0 -0
- /package/dist/{providers → src/providers}/patch-zod-schema.d.ts +0 -0
- /package/dist/{providers → src/providers}/vision-proxy.d.ts +0 -0
- /package/dist/{router → src/router}/classifier/grammars.d.ts +0 -0
- /package/dist/{router → src/router}/classifier/grammars.js +0 -0
- /package/dist/{router → src/router}/classifier/index.d.ts +0 -0
- /package/dist/{router → src/router}/classifier/index.js +0 -0
- /package/dist/{router → src/router}/classifier/index.test.js +0 -0
- /package/dist/{router → src/router}/classifier/regex.d.ts +0 -0
- /package/dist/{router → src/router}/classifier/regex.test.js +0 -0
- /package/dist/{router → src/router}/classifier/tree-sitter.d.ts +0 -0
- /package/dist/{router → src/router}/classifier/tree-sitter.js +0 -0
- /package/dist/{router → src/router}/classifier/tree-sitter.test.js +0 -0
- /package/dist/{router → src/router}/cold.d.ts +0 -0
- /package/dist/{router → src/router}/cold.js +0 -0
- /package/dist/{router → src/router}/decide.d.ts +0 -0
- /package/dist/{router → src/router}/health.d.ts +0 -0
- /package/dist/{router → src/router}/health.js +0 -0
- /package/dist/{router → src/router}/health.test.js +0 -0
- /package/dist/{router → src/router}/store.d.ts +0 -0
- /package/dist/{router → src/router}/store.js +0 -0
- /package/dist/{router → src/router}/types.d.ts +0 -0
- /package/dist/{router → src/router}/warm.d.ts +0 -0
- /package/dist/{storage → src/storage}/__tests__/migrations.test.d.ts +0 -0
- /package/dist/{storage → src/storage}/__tests__/migrations.test.js +0 -0
- /package/dist/{storage → src/storage}/config.d.ts +0 -0
- /package/dist/{storage → src/storage}/config.test.js +0 -0
- /package/dist/{storage → src/storage}/db.d.ts +0 -0
- /package/dist/{storage → src/storage}/session-dir.d.ts +0 -0
- /package/dist/{storage → src/storage}/session-dir.js +0 -0
- /package/dist/{storage → src/storage}/tool-results.js +0 -0
- /package/dist/{storage → src/storage}/transcript-view.d.ts +0 -0
- /package/dist/{storage → src/storage}/usage-cap.d.ts +0 -0
- /package/dist/{storage → src/storage}/usage-cap.js +0 -0
- /package/dist/{storage → src/storage}/usage-cap.test.js +0 -0
- /package/dist/{tools → src/tools}/computer.js +0 -0
- /package/dist/{tools → src/tools}/grep.js +0 -0
- /package/dist/{tools → src/tools}/schedule.d.ts +0 -0
- /package/dist/{types → src/types}/index.js +0 -0
- /package/dist/{ui → src/ui}/components/SuggestionOverlay.d.ts +0 -0
- /package/dist/{ui → src/ui}/components/SuggestionOverlay.js +0 -0
- /package/dist/{ui → src/ui}/components/btw-overlay.d.ts +0 -0
- /package/dist/{ui → src/ui}/components/btw-overlay.js +0 -0
- /package/dist/{ui → src/ui}/hooks/useTypeahead.d.ts +0 -0
- /package/dist/{ui → src/ui}/markdown.js +0 -0
- /package/dist/{ui → src/ui}/mcp-modal-types.js +0 -0
- /package/dist/{ui → src/ui}/plan.js +0 -0
- /package/dist/{ui → src/ui}/slash/__tests__/clear.test.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/__tests__/clear.test.js +0 -0
- /package/dist/{ui → src/ui}/slash/__tests__/compact.test.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/__tests__/compact.test.js +0 -0
- /package/dist/{ui → src/ui}/slash/__tests__/cost.test.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/__tests__/cost.test.js +0 -0
- /package/dist/{ui → src/ui}/slash/__tests__/discuss.test.js +0 -0
- /package/dist/{ui → src/ui}/slash/__tests__/execute.test.js +0 -0
- /package/dist/{ui → src/ui}/slash/__tests__/expand.test.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/__tests__/expand.test.js +0 -0
- /package/dist/{ui → src/ui}/slash/__tests__/optimize.test.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/__tests__/plan.test.js +0 -0
- /package/dist/{ui → src/ui}/slash/clear.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/clear.js +0 -0
- /package/dist/{ui → src/ui}/slash/compact.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/compact.js +0 -0
- /package/dist/{ui → src/ui}/slash/cost.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/council.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/debug.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/discuss.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/discuss.js +0 -0
- /package/dist/{ui → src/ui}/slash/ee.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/execute.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/execute.js +0 -0
- /package/dist/{ui → src/ui}/slash/expand.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/expand.js +0 -0
- /package/dist/{ui → src/ui}/slash/optimize.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/plan.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/plan.js +0 -0
- /package/dist/{ui → src/ui}/slash/registry.js +0 -0
- /package/dist/{ui → src/ui}/slash/route.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/route.js +0 -0
- /package/dist/{ui → src/ui}/slash/route.test.d.ts +0 -0
- /package/dist/{ui → src/ui}/slash/route.test.js +0 -0
- /package/dist/{ui → src/ui}/status-bar/index.test.js +0 -0
- /package/dist/{ui → src/ui}/status-bar/store.test.js +0 -0
- /package/dist/{ui → src/ui}/status-bar/tier-badge.d.ts +0 -0
- /package/dist/{ui → src/ui}/status-bar/tier-badge.js +0 -0
- /package/dist/{ui → src/ui}/status-bar/tier-badge.test.js +0 -0
- /package/dist/{ui → src/ui}/status-bar/usd-meter.d.ts +0 -0
- /package/dist/{ui → src/ui}/status-bar/usd-meter.js +0 -0
- /package/dist/{ui → src/ui}/status-bar/usd-meter.test.js +0 -0
- /package/dist/{ui → src/ui}/terminal-selection-text.d.ts +0 -0
- /package/dist/{ui → src/ui}/terminal-selection-text.js +0 -0
- /package/dist/{usage → src/usage}/downgrade.d.ts +0 -0
- /package/dist/{usage → src/usage}/downgrade.js +0 -0
- /package/dist/{usage → src/usage}/downgrade.test.js +0 -0
- /package/dist/{usage → src/usage}/estimator.test.js +0 -0
- /package/dist/{usage → src/usage}/ledger.test.js +0 -0
- /package/dist/{usage → src/usage}/midstream.d.ts +0 -0
- /package/dist/{usage → src/usage}/midstream.js +0 -0
- /package/dist/{usage → src/usage}/midstream.test.js +0 -0
- /package/dist/{usage → src/usage}/thresholds.d.ts +0 -0
- /package/dist/{usage → src/usage}/thresholds.js +0 -0
- /package/dist/{usage → src/usage}/thresholds.test.js +0 -0
- /package/dist/{usage → src/usage}/types.js +0 -0
- /package/dist/{utils → src/utils}/at-mentions.d.ts +0 -0
- /package/dist/{utils → src/utils}/at-mentions.js +0 -0
- /package/dist/{utils → src/utils}/clipboard-image.d.ts +0 -0
- /package/dist/{utils → src/utils}/file-index.d.ts +0 -0
- /package/dist/{utils → src/utils}/file-index.js +0 -0
- /package/dist/{utils → src/utils}/git-root.d.ts +0 -0
- /package/dist/{utils → src/utils}/git-root.js +0 -0
- /package/dist/{utils → src/utils}/install-manager.d.ts +0 -0
- /package/dist/{utils → src/utils}/install-manager.js +0 -0
- /package/dist/{utils → src/utils}/instructions.d.ts +0 -0
- /package/dist/{utils → src/utils}/permission-mode.d.ts +0 -0
- /package/dist/{utils → src/utils}/permission-mode.js +0 -0
- /package/dist/{utils → src/utils}/permission-mode.test.js +0 -0
- /package/dist/{utils → src/utils}/redactor.d.ts +0 -0
- /package/dist/{utils → src/utils}/redactor.js +0 -0
- /package/dist/{utils → src/utils}/side-question.d.ts +0 -0
- /package/dist/{utils → src/utils}/side-question.js +0 -0
- /package/dist/{utils → src/utils}/skills.d.ts +0 -0
- /package/dist/{utils → src/utils}/subagent-display.d.ts +0 -0
- /package/dist/{utils → src/utils}/subagent-display.js +0 -0
- /package/dist/{utils → src/utils}/update-checker.d.ts +0 -0
- /package/dist/{verify → src/verify}/checkpoint.js +0 -0
- /package/dist/{verify → src/verify}/evidence.js +0 -0
- /package/dist/{verify → src/verify}/retry.js +0 -0
|
@@ -0,0 +1,1347 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// SECURITY: Redactor must be the FIRST import. installGlobalPatches() wraps
|
|
3
|
+
// console.* before any subsequent import side-effect or log can emit an API key.
|
|
4
|
+
// See: PROV-07, Pitfall 2 (HIGH severity API key leakage).
|
|
5
|
+
import { redactor } from "./utils/redactor.js";
|
|
6
|
+
redactor.installGlobalPatches();
|
|
7
|
+
import { readFileSync } from "node:fs";
|
|
8
|
+
import { InvalidArgumentError, program } from "commander";
|
|
9
|
+
import { createInterface } from "readline";
|
|
10
|
+
// Version is generated at build time by scripts/sync-version.cjs from
|
|
11
|
+
// package.json. Inlining as a constant avoids three failure modes:
|
|
12
|
+
// - Node ESM rejecting `import pkg from "../package.json"` without assertion
|
|
13
|
+
// - bun --compile virtual fs not resolving readFileSync paths
|
|
14
|
+
// - Stripping package.json from published files list
|
|
15
|
+
import { PACKAGE_DESCRIPTION, PACKAGE_VERSION } from "./generated/version.js";
|
|
16
|
+
const packageJson = { version: PACKAGE_VERSION, description: PACKAGE_DESCRIPTION };
|
|
17
|
+
import { hydrateChatEnvFromKeychain } from "./chat/chat-keychain.js";
|
|
18
|
+
import { setRenderSink } from "./ee/render.js";
|
|
19
|
+
import { createCouncilAutoAnswerer, handleCouncilChunk, parseCouncilAnswersFile, } from "./headless/council-answers.js";
|
|
20
|
+
import { createHeadlessJsonlEmitter, isHeadlessOutputFormat, renderHeadlessChunk, renderHeadlessPrelude, } from "./headless/output.js";
|
|
21
|
+
import { loadCatalog, normalizeModelId } from "./models/registry.js";
|
|
22
|
+
// Plan 00-07: boot-order modules — AbortContext + PendingCallsLog (TUI-01, TUI-03, TUI-04).
|
|
23
|
+
import { createAbortContext } from "./orchestrator/abort.js";
|
|
24
|
+
import { completeDelegation, failDelegation, loadDelegation } from "./orchestrator/delegations.js";
|
|
25
|
+
import { Agent } from "./orchestrator/orchestrator.js";
|
|
26
|
+
import { createPendingCallsLog } from "./orchestrator/pending-calls.js";
|
|
27
|
+
import { getProviderCapabilities } from "./providers/capabilities.js";
|
|
28
|
+
import { listStoredProviders, loadKeyForProvider, setKeyForProvider, } from "./providers/keychain.js";
|
|
29
|
+
import { detectProviderForModel } from "./providers/runtime.js";
|
|
30
|
+
import { loadConfig } from "./storage/config.js";
|
|
31
|
+
import { loadUsage } from "./storage/usage-cap.js";
|
|
32
|
+
import { startScheduleDaemon } from "./tools/schedule.js";
|
|
33
|
+
import { processAtMentions } from "./utils/at-mentions.js";
|
|
34
|
+
import { runScriptManagedUninstall } from "./utils/install-manager.js";
|
|
35
|
+
import { getApiKey, getBaseURL, getCurrentModel, getCurrentSandboxMode, getCurrentSandboxSettings, mergeSandboxSettings, saveUserSettings, } from "./utils/settings.js";
|
|
36
|
+
import { runUpdate } from "./utils/update-checker.js";
|
|
37
|
+
import { buildVerifyPrompt, getVerifyCliError } from "./verify/entrypoint.js";
|
|
38
|
+
// Hydrate chat secrets from OS keychain before CLI bootstrap
|
|
39
|
+
await hydrateChatEnvFromKeychain();
|
|
40
|
+
const exitCleanlyOnSigterm = () => {
|
|
41
|
+
process.exit(0);
|
|
42
|
+
};
|
|
43
|
+
process.on("SIGTERM", exitCleanlyOnSigterm);
|
|
44
|
+
process.on("uncaughtException", (err) => {
|
|
45
|
+
try {
|
|
46
|
+
require("fs").appendFileSync(require("path").join(require("os").homedir(), ".muonroi-cli", "crash.log"), `[${new Date().toISOString()}] UNCAUGHT: ${err.stack || err.message}\n`);
|
|
47
|
+
}
|
|
48
|
+
catch { }
|
|
49
|
+
console.error("Fatal:", err.message);
|
|
50
|
+
process.exit(1);
|
|
51
|
+
});
|
|
52
|
+
process.on("unhandledRejection", (reason) => {
|
|
53
|
+
const msg = reason instanceof Error ? reason.stack || reason.message : String(reason);
|
|
54
|
+
try {
|
|
55
|
+
require("fs").appendFileSync(require("path").join(require("os").homedir(), ".muonroi-cli", "crash.log"), `[${new Date().toISOString()}] REJECTION: ${msg}\n`);
|
|
56
|
+
}
|
|
57
|
+
catch { }
|
|
58
|
+
console.error("Unhandled rejection:", reason);
|
|
59
|
+
process.exit(1);
|
|
60
|
+
});
|
|
61
|
+
// ── EE render sink wiring (CQ-16a) ─────────────────────────────────────────
|
|
62
|
+
// Single-orchestrator-at-a-time invariant holds (no multi-session concurrency in v1.6).
|
|
63
|
+
// Sink routes experience_warning chunks into the active orchestrator's chat stream.
|
|
64
|
+
// When no active stream (headless / idle): drop silently — never leak to stderr in TUI.
|
|
65
|
+
let _activeEeYield = null;
|
|
66
|
+
export function setActiveEeYield(fn) {
|
|
67
|
+
_activeEeYield = fn;
|
|
68
|
+
}
|
|
69
|
+
setRenderSink((lineOrChunk) => {
|
|
70
|
+
if (!_activeEeYield)
|
|
71
|
+
return; // drop silently when no TUI active
|
|
72
|
+
const chunk = typeof lineOrChunk === "string"
|
|
73
|
+
? { type: "experience_warning", content: lineOrChunk }
|
|
74
|
+
: lineOrChunk;
|
|
75
|
+
_activeEeYield(chunk);
|
|
76
|
+
});
|
|
77
|
+
/**
|
|
78
|
+
* First-run wizard: prompts for API key interactively when none is configured.
|
|
79
|
+
* Output goes to stderr so it doesn't pollute piped stdout.
|
|
80
|
+
* Returns the trimmed key or null if user cancels / stdin is not a TTY.
|
|
81
|
+
*/
|
|
82
|
+
// Provider console URLs are sourced from providers/capabilities.ts via ProviderCapabilities.consoleSignupURL().
|
|
83
|
+
/**
|
|
84
|
+
* Try to find an API key for the model the CLI is about to run with.
|
|
85
|
+
* Resolution: env (legacy MUONROI_API_KEY) → OS keychain → settings.json.
|
|
86
|
+
* Returns null if nothing usable is configured anywhere.
|
|
87
|
+
*/
|
|
88
|
+
async function resolveKeyForModel(modelId) {
|
|
89
|
+
// Test escape hatch: harness specs that need to assert the API-key modal
|
|
90
|
+
// appearance (api-key.spec.ts) set MUONROI_TEST_NO_KEYCHAIN=1 to suppress
|
|
91
|
+
// the dev machine's real keychain entry from masking the unauthenticated
|
|
92
|
+
// boot path. Honoured ONLY in tests — never read in production flows.
|
|
93
|
+
if (process.env["MUONROI_TEST_NO_KEYCHAIN"] === "1")
|
|
94
|
+
return null;
|
|
95
|
+
const provider = detectProviderForModel(modelId);
|
|
96
|
+
try {
|
|
97
|
+
const k = await loadKeyForProvider(provider);
|
|
98
|
+
if (k)
|
|
99
|
+
return k;
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
/* fall through to wizard */
|
|
103
|
+
}
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* True when the active model's provider is authenticated via OAuth tokens
|
|
108
|
+
* (subscription login) instead of an API key. Lets the boot flow skip the
|
|
109
|
+
* first-run wizard for OAuth-only setups like a freshly logged-in ChatGPT
|
|
110
|
+
* subscription.
|
|
111
|
+
*/
|
|
112
|
+
async function hasOAuthForModel(modelId) {
|
|
113
|
+
if (process.env["MUONROI_TEST_NO_KEYCHAIN"] === "1")
|
|
114
|
+
return false;
|
|
115
|
+
const provider = detectProviderForModel(modelId);
|
|
116
|
+
try {
|
|
117
|
+
const { getOAuthProviderConfig } = await import("./providers/auth/registry.js");
|
|
118
|
+
const cfg = await getOAuthProviderConfig(provider);
|
|
119
|
+
if (!cfg)
|
|
120
|
+
return false;
|
|
121
|
+
const tokens = await cfg.loadTokensWithRefresh();
|
|
122
|
+
return !!tokens?.accessToken;
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* First-run wizard. If the keychain already has keys, prints a hint
|
|
130
|
+
* (model probably doesn't match any stored provider). Otherwise prompts
|
|
131
|
+
* for provider + key and persists to the OS keychain.
|
|
132
|
+
*/
|
|
133
|
+
/**
|
|
134
|
+
* Supported splash providers — mirrors SPLASH_PROVIDERS in ui/app.tsx.
|
|
135
|
+
* The wizard only surfaces these; other providers still work programmatically.
|
|
136
|
+
*/
|
|
137
|
+
const WIZARD_PROVIDERS = ["deepseek", "siliconflow"];
|
|
138
|
+
async function firstRunWizard(currentModel) {
|
|
139
|
+
let rl;
|
|
140
|
+
try {
|
|
141
|
+
rl = createInterface({ input: process.stdin, output: process.stderr });
|
|
142
|
+
const ask = (q) => new Promise((resolve) => rl.question(q, (answer) => resolve(answer)));
|
|
143
|
+
process.stderr.write("\nWelcome to muonroi-cli!\n\n");
|
|
144
|
+
const stored = await listStoredProviders();
|
|
145
|
+
if (stored.length > 0) {
|
|
146
|
+
process.stderr.write(`Keys already in keychain for: ${stored.join(", ")}\n`);
|
|
147
|
+
if (currentModel) {
|
|
148
|
+
const provider = detectProviderForModel(currentModel);
|
|
149
|
+
process.stderr.write(`Current model '${currentModel}' uses provider '${provider}', which has no stored key.\n`);
|
|
150
|
+
}
|
|
151
|
+
process.stderr.write("\nOptions:\n" +
|
|
152
|
+
" 1. Run with a model that matches a stored provider:\n" +
|
|
153
|
+
" muonroi-cli --model <model-id>\n" +
|
|
154
|
+
" 2. Open /providers inside the TUI to add another key.\n" +
|
|
155
|
+
" 3. muonroi-cli keys set <provider>\n\n");
|
|
156
|
+
rl.close();
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
process.stderr.write("Pick how you want to add credentials:\n\n");
|
|
160
|
+
process.stderr.write(" 1. Paste an API key (most common)\n");
|
|
161
|
+
process.stderr.write(" 2. Import an encrypted bundle file (from another device)\n");
|
|
162
|
+
process.stderr.write(" 3. Sync from a Bitwarden vault\n");
|
|
163
|
+
process.stderr.write(" 4. Skip — set up later via /providers inside the TUI\n\n");
|
|
164
|
+
const actionChoice = (await ask("Choice [1-4, default 1]: ")).trim() || "1";
|
|
165
|
+
if (actionChoice === "4") {
|
|
166
|
+
process.stderr.write("\nSkipped. Open /providers inside the TUI to add a key any time.\n");
|
|
167
|
+
rl.close();
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
if (actionChoice === "2") {
|
|
171
|
+
const file = (await ask("Path to bundle file: ")).trim();
|
|
172
|
+
if (!file) {
|
|
173
|
+
process.stderr.write("No file provided. Aborted.\n");
|
|
174
|
+
rl.close();
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
const passphrase = await ask("Bundle passphrase: ");
|
|
178
|
+
try {
|
|
179
|
+
const { readFileSync: readFile } = await import("node:fs");
|
|
180
|
+
const { decryptBundle } = await import("./cli/keys-bundle.js");
|
|
181
|
+
const raw = readFile(file, "utf8");
|
|
182
|
+
const bundle = JSON.parse(raw);
|
|
183
|
+
const payload = decryptBundle(bundle, passphrase);
|
|
184
|
+
let imported = 0;
|
|
185
|
+
for (const [prov, key] of Object.entries(payload.providers)) {
|
|
186
|
+
if (!WIZARD_PROVIDERS.includes(prov))
|
|
187
|
+
continue;
|
|
188
|
+
if (typeof key !== "string" || key.length < 20)
|
|
189
|
+
continue;
|
|
190
|
+
const ok = await setKeyForProvider(prov, key);
|
|
191
|
+
if (ok) {
|
|
192
|
+
imported++;
|
|
193
|
+
process.stderr.write(` ✓ ${prov} → keychain\n`);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
process.stderr.write(`\nImported ${imported} key(s). Launch the TUI to start.\n`);
|
|
197
|
+
rl.close();
|
|
198
|
+
// Return any imported key just so caller treats setup as done.
|
|
199
|
+
return imported > 0 ? "imported" : null;
|
|
200
|
+
}
|
|
201
|
+
catch (err) {
|
|
202
|
+
process.stderr.write(`\nImport failed: ${err.message}\n`);
|
|
203
|
+
rl.close();
|
|
204
|
+
return null;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
if (actionChoice === "3") {
|
|
208
|
+
const password = await ask("Bitwarden master password: ");
|
|
209
|
+
try {
|
|
210
|
+
const { unlockWithPassword, listSecureNotesByPrefix } = await import("./cli/bw-vault.js");
|
|
211
|
+
const unlock = await unlockWithPassword(password);
|
|
212
|
+
if (!unlock.ok || !unlock.session) {
|
|
213
|
+
process.stderr.write(`\nBitwarden unlock failed: ${unlock.error ?? "unknown error"}\n`);
|
|
214
|
+
rl.close();
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
const list = await listSecureNotesByPrefix(unlock.session, "muonroi-cli/");
|
|
218
|
+
if (!list.ok) {
|
|
219
|
+
process.stderr.write(`\nBitwarden list failed: ${list.error}\n`);
|
|
220
|
+
rl.close();
|
|
221
|
+
return null;
|
|
222
|
+
}
|
|
223
|
+
let imported = 0;
|
|
224
|
+
for (const item of list.items) {
|
|
225
|
+
const prov = item.name.slice("muonroi-cli/".length);
|
|
226
|
+
if (!WIZARD_PROVIDERS.includes(prov))
|
|
227
|
+
continue;
|
|
228
|
+
if (item.notes.length < 20)
|
|
229
|
+
continue;
|
|
230
|
+
const ok = await setKeyForProvider(prov, item.notes);
|
|
231
|
+
if (ok) {
|
|
232
|
+
imported++;
|
|
233
|
+
process.stderr.write(` ✓ ${prov} → keychain\n`);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
process.stderr.write(`\nImported ${imported} key(s) from Bitwarden. Launch the TUI to start.\n`);
|
|
237
|
+
rl.close();
|
|
238
|
+
return imported > 0 ? "imported" : null;
|
|
239
|
+
}
|
|
240
|
+
catch (err) {
|
|
241
|
+
process.stderr.write(`\nBitwarden sync failed: ${err.message}\n`);
|
|
242
|
+
rl.close();
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
// Default path: paste an API key for one of WIZARD_PROVIDERS.
|
|
247
|
+
process.stderr.write("\nSupported providers:\n\n");
|
|
248
|
+
WIZARD_PROVIDERS.forEach((p, i) => {
|
|
249
|
+
process.stderr.write(` ${i + 1}. ${p.padEnd(12)} ${getProviderCapabilities(p).consoleSignupURL()}\n`);
|
|
250
|
+
});
|
|
251
|
+
process.stderr.write("\n");
|
|
252
|
+
const choice = (await ask(`Provider [1-${WIZARD_PROVIDERS.length}, default 1]: `)).trim();
|
|
253
|
+
const idx = choice ? Number.parseInt(choice, 10) - 1 : 0;
|
|
254
|
+
if (!Number.isFinite(idx) || idx < 0 || idx >= WIZARD_PROVIDERS.length) {
|
|
255
|
+
process.stderr.write("Invalid choice — aborted.\n");
|
|
256
|
+
rl.close();
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
const provider = WIZARD_PROVIDERS[idx];
|
|
260
|
+
if (!provider) {
|
|
261
|
+
process.stderr.write("Invalid choice — aborted.\n");
|
|
262
|
+
rl.close();
|
|
263
|
+
return null;
|
|
264
|
+
}
|
|
265
|
+
process.stderr.write(`\nGet a key here: ${getProviderCapabilities(provider).consoleSignupURL()}\n`);
|
|
266
|
+
const raw = await ask(`Paste your ${provider} API key: `);
|
|
267
|
+
const trimmed = raw.trim();
|
|
268
|
+
if (!trimmed) {
|
|
269
|
+
process.stderr.write("No key provided. Aborted.\n");
|
|
270
|
+
rl.close();
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
if (trimmed.length < 20) {
|
|
274
|
+
process.stderr.write("Key looks too short (< 20 chars). Aborted.\n");
|
|
275
|
+
rl.close();
|
|
276
|
+
return null;
|
|
277
|
+
}
|
|
278
|
+
try {
|
|
279
|
+
const ok = await setKeyForProvider(provider, trimmed);
|
|
280
|
+
if (ok) {
|
|
281
|
+
process.stderr.write(`\nStored ${provider} key in OS keychain.\n`);
|
|
282
|
+
process.stderr.write("Tip: run 'muonroi-cli keys export ~/keys.json' to back up + move to other devices.\n");
|
|
283
|
+
if (currentModel) {
|
|
284
|
+
const currentProvider = detectProviderForModel(currentModel);
|
|
285
|
+
if (currentProvider !== provider) {
|
|
286
|
+
process.stderr.write(`\nNote: defaultModel '${currentModel}' is on '${currentProvider}'. ` +
|
|
287
|
+
`Edit ~/.muonroi-cli/user-settings.json or rerun with --model to use ${provider}.\n`);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
process.stderr.write("\nOS keychain unavailable on this platform. Key will be used for this session only.\n" +
|
|
293
|
+
`For persistence, set env var: ${provider.toUpperCase()}_API_KEY\n`);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
catch (err) {
|
|
297
|
+
process.stderr.write(`\nWarning: failed to store key in keychain: ${err.message}\n`);
|
|
298
|
+
}
|
|
299
|
+
rl.close();
|
|
300
|
+
return trimmed;
|
|
301
|
+
}
|
|
302
|
+
catch {
|
|
303
|
+
rl?.close();
|
|
304
|
+
return null;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
async function startInteractive(apiKey, baseURL, model, maxToolRounds, batchApi, sandboxMode, sandboxSettings, session, initialMessage, permissionMode = "safe", injectHalt = false) {
|
|
308
|
+
// ── Plan 00-07 boot order ──────────────────────────────────────────────────
|
|
309
|
+
// 1. redactor.installGlobalPatches() — already at top of file (line 6).
|
|
310
|
+
// 2. loadConfig + loadUsage (validates storage paths, logs usage cap state).
|
|
311
|
+
const [config, usage] = await Promise.all([loadConfig(), loadUsage()]);
|
|
312
|
+
void config; // Phase 0: plumbed but not yet surfaced in TUI status bar (TUI-05, Phase 1).
|
|
313
|
+
void usage; // Phase 0: same — cap guard will gate on this in plan 00-06+ / Phase 1.
|
|
314
|
+
// 3. Load API key for the active provider — enrolls into redactor.
|
|
315
|
+
const activeModel = getCurrentModel();
|
|
316
|
+
const activeProvider = detectProviderForModel(activeModel);
|
|
317
|
+
const providerKey = await loadKeyForProvider(activeProvider).catch(() => undefined);
|
|
318
|
+
void providerKey; // Agent also loads key internally; this run is for early redactor enrollment.
|
|
319
|
+
// Web-research migration prompt — runs once per install for existing users
|
|
320
|
+
// who never saw the first-run wizard's research step. Skip in non-interactive
|
|
321
|
+
// mode (--prompt, --verify, headless harnesses).
|
|
322
|
+
if (process.stdin.isTTY) {
|
|
323
|
+
try {
|
|
324
|
+
const { loadUserSettings } = await import("./utils/settings.js");
|
|
325
|
+
if (loadUserSettings().webResearchPrompted !== true) {
|
|
326
|
+
const rl = createInterface({ input: process.stdin, output: process.stderr });
|
|
327
|
+
const ask = (q) => new Promise((resolve) => rl.question(q, (a) => resolve(a)));
|
|
328
|
+
try {
|
|
329
|
+
const { runResearchMigrationPrompt } = await import("./mcp/research-onboarding.js");
|
|
330
|
+
await runResearchMigrationPrompt({
|
|
331
|
+
askChoice: ask,
|
|
332
|
+
askText: ask,
|
|
333
|
+
log: (m) => process.stderr.write(m),
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
finally {
|
|
337
|
+
rl.close();
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
catch (err) {
|
|
342
|
+
process.stderr.write(`\nWarning: research migration prompt failed: ${err.message}\n`);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
// 5-6. createPendingCallsLog + createAbortContext — wired before Agent so
|
|
346
|
+
// the Agent receives them via AgentOptions (Pitfall 9, TUI-04).
|
|
347
|
+
// Session ID is not available until Agent opens SQLite; use a stable
|
|
348
|
+
// pre-session sentinel "pre-session" for the pending-calls log.
|
|
349
|
+
// After Agent is constructed we promote to the real session ID.
|
|
350
|
+
const orchestratorAbort = createAbortContext();
|
|
351
|
+
// 7. SIGINT handler — must be registered BEFORE mountTUI so Ctrl+C fires
|
|
352
|
+
// abort before OpenTUI's own handler chains. The handler is non-blocking:
|
|
353
|
+
// it only sets the abort signal; OpenTUI's teardown flushes terminal state
|
|
354
|
+
// on its own reconciler path.
|
|
355
|
+
process.on("SIGINT", () => {
|
|
356
|
+
orchestratorAbort.abort("SIGINT");
|
|
357
|
+
// OpenTUI will receive its own SIGINT / Ctrl+C via exitOnCtrlC:false;
|
|
358
|
+
// onExit below handles the cleanup sequence.
|
|
359
|
+
});
|
|
360
|
+
// ── Construct Agent (opens SQLite, loads transcript, wires abort + pending) ─
|
|
361
|
+
// PendingCallsLog: use session selector as provisional ID; Agent will have
|
|
362
|
+
// the real session ID after construction.
|
|
363
|
+
const provisionalSessionId = session ?? "latest";
|
|
364
|
+
const pendingCalls = createPendingCallsLog(provisionalSessionId);
|
|
365
|
+
// Reconcile any orphaned .tmp files from a prior crash (Pitfall 9).
|
|
366
|
+
const reconciled = await pendingCalls.reconcile();
|
|
367
|
+
if (reconciled.abandoned > 0) {
|
|
368
|
+
console.warn(`[muonroi-cli] reconciled ${reconciled.abandoned} abandoned tool calls from prior session`);
|
|
369
|
+
}
|
|
370
|
+
const agent = new Agent(apiKey, baseURL, model, maxToolRounds, {
|
|
371
|
+
session,
|
|
372
|
+
sandboxMode,
|
|
373
|
+
sandboxSettings,
|
|
374
|
+
batchApi,
|
|
375
|
+
abortContext: orchestratorAbort,
|
|
376
|
+
pendingCalls,
|
|
377
|
+
permissionMode,
|
|
378
|
+
});
|
|
379
|
+
// ── /Plan 00-07 boot order ────────────────────────────────────────────────
|
|
380
|
+
const { createCliRenderer } = await import("@opentui/core");
|
|
381
|
+
const { createRoot } = await import("@opentui/react");
|
|
382
|
+
const { createElement } = await import("react");
|
|
383
|
+
const { App } = await import("./ui/app.js");
|
|
384
|
+
const renderer = await createCliRenderer({
|
|
385
|
+
exitOnCtrlC: false,
|
|
386
|
+
// We manage SIGINT ourselves (orchestrator abort → agent cleanup → renderer destroy).
|
|
387
|
+
// Prevent OpenTUI from registering its own SIGINT/SIGTERM handler which would
|
|
388
|
+
// call renderer.destroy() prematurely and race with our orderly shutdown.
|
|
389
|
+
exitSignals: [],
|
|
390
|
+
// Lets terminals (Kitty, iTerm2, WezTerm, …) report Command as `super` on KeyEvent — needed for ⌘C in the TUI.
|
|
391
|
+
useKittyKeyboard: {
|
|
392
|
+
disambiguate: true,
|
|
393
|
+
alternateKeys: true,
|
|
394
|
+
},
|
|
395
|
+
});
|
|
396
|
+
/**
|
|
397
|
+
* Restore terminal to main-screen mode before the process exits.
|
|
398
|
+
*
|
|
399
|
+
* On some terminals (WezTerm, especially under MINGW64/Git Bash), the native
|
|
400
|
+
* destroyRenderer() call inside renderer.destroy() does not reliably flush
|
|
401
|
+
* the Kitty-keyboard-disable and alternate-screen-exit escape sequences
|
|
402
|
+
* before process.exit() kills the runtime. This leaves the terminal in a
|
|
403
|
+
* half-restored state where subsequent shell output is interpreted as raw
|
|
404
|
+
* escape codes, producing the "jumping numbers" effect.
|
|
405
|
+
*
|
|
406
|
+
* The fix explicitly writes the restore sequences from JS and adds a brief
|
|
407
|
+
* flush delay before process.exit().
|
|
408
|
+
*/
|
|
409
|
+
function restoreTerminalSync() {
|
|
410
|
+
try {
|
|
411
|
+
// 1. Disable Kitty keyboard protocol if enabled.
|
|
412
|
+
if (typeof renderer.disableKittyKeyboard === "function") {
|
|
413
|
+
renderer.disableKittyKeyboard();
|
|
414
|
+
}
|
|
415
|
+
// 2. Restore terminal modes (bracketed paste, cursor, etc.).
|
|
416
|
+
if (typeof renderer.lib?.restoreTerminalModes === "function") {
|
|
417
|
+
renderer.lib.restoreTerminalModes(renderer.rendererPtr);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
catch {
|
|
421
|
+
// best-effort — terminal restore must never throw
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
// WezTerm closes the pane/window when the foreground process exits.
|
|
425
|
+
// Detect WezTerm via env vars and hold the process open briefly so the
|
|
426
|
+
// user can see the terminal before the window disappears.
|
|
427
|
+
const isWezTerm = !!process.env.WEZTERM_PANE ||
|
|
428
|
+
!!process.env.WEZTERM_EXECUTABLE ||
|
|
429
|
+
!!process.env.WEZTERM_CONFIG_FILE ||
|
|
430
|
+
!!process.env.WEZTERM_UNIX_SOCKET ||
|
|
431
|
+
process.env.TERM_PROGRAM === "WezTerm" ||
|
|
432
|
+
process.env.TERM_PROGRAM === "wezterm" ||
|
|
433
|
+
process.env.MUONROI_FORCE_SHELL_HOLD === "1";
|
|
434
|
+
const onExit = () => {
|
|
435
|
+
void agent.cleanup().finally(() => {
|
|
436
|
+
// Restore terminal state from JS before the native destroyRenderer runs
|
|
437
|
+
restoreTerminalSync();
|
|
438
|
+
renderer.destroy();
|
|
439
|
+
// Restore terminal modes BEFORE spawning child shell. Use synchronous
|
|
440
|
+
// writes to stdout's underlying fd so escape codes flush before the
|
|
441
|
+
// child inherits stdin — async process.stdout.write() can buffer past
|
|
442
|
+
// the spawn() boundary, leaving the terminal in mouse-tracking mode.
|
|
443
|
+
const writeSync = (seq) => {
|
|
444
|
+
try {
|
|
445
|
+
const fs = require("node:fs");
|
|
446
|
+
fs.writeSync(1, seq);
|
|
447
|
+
}
|
|
448
|
+
catch {
|
|
449
|
+
/* fall back to async */
|
|
450
|
+
try {
|
|
451
|
+
process.stdout.write(seq);
|
|
452
|
+
}
|
|
453
|
+
catch {
|
|
454
|
+
/* noop */
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
try {
|
|
459
|
+
// 1. Take stdin out of raw mode + pause it so no buffered keystrokes
|
|
460
|
+
// (or in-flight mouse-event bytes) hit the child shell.
|
|
461
|
+
if (process.stdin.isTTY && typeof process.stdin.setRawMode === "function") {
|
|
462
|
+
try {
|
|
463
|
+
process.stdin.setRawMode(false);
|
|
464
|
+
}
|
|
465
|
+
catch {
|
|
466
|
+
/* noop */
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
try {
|
|
470
|
+
process.stdin.pause();
|
|
471
|
+
}
|
|
472
|
+
catch {
|
|
473
|
+
/* noop */
|
|
474
|
+
}
|
|
475
|
+
try {
|
|
476
|
+
process.stdin.unref?.();
|
|
477
|
+
}
|
|
478
|
+
catch {
|
|
479
|
+
/* noop */
|
|
480
|
+
}
|
|
481
|
+
// 2. Disable extended-coords first (1006/1015/1005), then the basic
|
|
482
|
+
// tracking modes (1003→1002→1000). Wrong order leaves the terminal
|
|
483
|
+
// emitting SGR-formatted events after the base modes are off.
|
|
484
|
+
writeSync("\x1B[?1006l\x1B[?1015l\x1B[?1005l");
|
|
485
|
+
writeSync("\x1B[?1003l\x1B[?1002l\x1B[?1000l");
|
|
486
|
+
writeSync("\x1B[?2004l\x1B[?25h"); // bracketed paste off, cursor on
|
|
487
|
+
writeSync("\x1B[?1049l\x1B[0m\x1B[!p"); // exit alt-screen, reset SGR, soft reset
|
|
488
|
+
}
|
|
489
|
+
catch {
|
|
490
|
+
// best-effort
|
|
491
|
+
}
|
|
492
|
+
// WezTerm (and similar single-pane terminals) closes the window when
|
|
493
|
+
// the foreground process exits. To keep the pane usable after `/exit`,
|
|
494
|
+
// we hand control over to an interactive shell instead of exiting.
|
|
495
|
+
// Disable with MUONROI_NO_SHELL_HOLD=1.
|
|
496
|
+
const holdMode = process.env.MUONROI_NO_SHELL_HOLD === "1" ? "exit" : isWezTerm ? "shell" : "exit";
|
|
497
|
+
if (holdMode === "shell") {
|
|
498
|
+
// Defer spawn so the disable sequences are processed by the terminal
|
|
499
|
+
// BEFORE the child shell takes over stdin. Without this, the child
|
|
500
|
+
// can race with the in-flight disable codes and inherit a still-
|
|
501
|
+
// mouse-tracking terminal (visible as "35;145;26M" garbage at the
|
|
502
|
+
// shell prompt when the user moves the mouse).
|
|
503
|
+
setTimeout(() => {
|
|
504
|
+
try {
|
|
505
|
+
const { spawn } = require("node:child_process");
|
|
506
|
+
const isWin = process.platform === "win32";
|
|
507
|
+
const shellCmd = process.env.MUONROI_EXIT_SHELL ||
|
|
508
|
+
process.env.SHELL ||
|
|
509
|
+
(isWin ? process.env.COMSPEC || "cmd.exe" : "/bin/bash");
|
|
510
|
+
writeSync("\nSession ended. Returning to shell — type `exit` to close this pane.\n\n");
|
|
511
|
+
const child = spawn(shellCmd, [], { stdio: "inherit", shell: false });
|
|
512
|
+
child.on("exit", (code) => process.exit(code ?? 0));
|
|
513
|
+
child.on("error", () => process.exit(0));
|
|
514
|
+
}
|
|
515
|
+
catch {
|
|
516
|
+
setTimeout(() => process.exit(0), 16);
|
|
517
|
+
}
|
|
518
|
+
}, 80);
|
|
519
|
+
}
|
|
520
|
+
else {
|
|
521
|
+
// Give the OS a tick to flush stdout before we exit.
|
|
522
|
+
setTimeout(() => process.exit(0), 16);
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
};
|
|
526
|
+
createRoot(renderer).render(createElement(App, {
|
|
527
|
+
agent,
|
|
528
|
+
startupConfig: {
|
|
529
|
+
apiKey,
|
|
530
|
+
baseURL,
|
|
531
|
+
model: agent.getModel(),
|
|
532
|
+
maxToolRounds,
|
|
533
|
+
sandboxMode,
|
|
534
|
+
sandboxSettings,
|
|
535
|
+
version: packageJson.version,
|
|
536
|
+
injectHalt,
|
|
537
|
+
},
|
|
538
|
+
initialMessage,
|
|
539
|
+
onExit,
|
|
540
|
+
}));
|
|
541
|
+
}
|
|
542
|
+
async function runHeadless(prompt, apiKey, baseURL, model, maxToolRounds, batchApi, sandboxMode, sandboxSettings, format, session, permissionMode = "safe", councilAutoAnswer) {
|
|
543
|
+
const agent = new Agent(apiKey, baseURL, model, maxToolRounds, {
|
|
544
|
+
session,
|
|
545
|
+
sandboxMode,
|
|
546
|
+
sandboxSettings,
|
|
547
|
+
batchApi,
|
|
548
|
+
permissionMode,
|
|
549
|
+
});
|
|
550
|
+
const prelude = renderHeadlessPrelude(format, agent.getSessionId() || undefined);
|
|
551
|
+
if (prelude.stdout)
|
|
552
|
+
process.stdout.write(prelude.stdout);
|
|
553
|
+
if (prelude.stderr)
|
|
554
|
+
process.stderr.write(prelude.stderr);
|
|
555
|
+
function writeSafe(stream, data) {
|
|
556
|
+
try {
|
|
557
|
+
stream.write(data);
|
|
558
|
+
}
|
|
559
|
+
catch (e) {
|
|
560
|
+
if (e.code === "EPIPE")
|
|
561
|
+
process.exit(0);
|
|
562
|
+
throw e;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
// Council askcards have no TUI to render them in headless mode. When
|
|
566
|
+
// auto-answer is enabled, resolve the responder promises with either the
|
|
567
|
+
// scripted answer or `defaultIndex` — otherwise the process hangs forever.
|
|
568
|
+
const councilSink = {
|
|
569
|
+
respondToQuestion: (id, a) => agent.respondToCouncilQuestion(id, a),
|
|
570
|
+
respondToPreflight: (id, ok) => agent.respondToCouncilPreflight(id, ok),
|
|
571
|
+
};
|
|
572
|
+
function maybeAutoAnswer(chunk) {
|
|
573
|
+
const auditLine = handleCouncilChunk(chunk, councilAutoAnswer ?? null, councilSink);
|
|
574
|
+
if (auditLine)
|
|
575
|
+
writeSafe(process.stderr, `${auditLine}\n`);
|
|
576
|
+
}
|
|
577
|
+
try {
|
|
578
|
+
const { enhancedMessage } = processAtMentions(prompt, process.cwd());
|
|
579
|
+
if (format === "json") {
|
|
580
|
+
const { observer, consumeChunk, flush } = createHeadlessJsonlEmitter(agent.getSessionId() || undefined);
|
|
581
|
+
for await (const chunk of agent.processMessage(enhancedMessage, observer)) {
|
|
582
|
+
maybeAutoAnswer(chunk);
|
|
583
|
+
const writes = consumeChunk(chunk);
|
|
584
|
+
if (writes.stdout)
|
|
585
|
+
writeSafe(process.stdout, writes.stdout);
|
|
586
|
+
if (writes.stderr)
|
|
587
|
+
writeSafe(process.stderr, writes.stderr ?? "");
|
|
588
|
+
}
|
|
589
|
+
const tail = flush();
|
|
590
|
+
if (tail.stdout)
|
|
591
|
+
writeSafe(process.stdout, tail.stdout);
|
|
592
|
+
if (tail.stderr)
|
|
593
|
+
writeSafe(process.stderr, tail.stderr ?? "");
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
596
|
+
for await (const chunk of agent.processMessage(enhancedMessage)) {
|
|
597
|
+
maybeAutoAnswer(chunk);
|
|
598
|
+
const writes = renderHeadlessChunk(chunk);
|
|
599
|
+
if (writes.stdout)
|
|
600
|
+
writeSafe(process.stdout, writes.stdout);
|
|
601
|
+
if (writes.stderr)
|
|
602
|
+
writeSafe(process.stderr, writes.stderr);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
finally {
|
|
606
|
+
await agent.cleanup();
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
function loadCouncilAnswersOrExit(filePath) {
|
|
610
|
+
try {
|
|
611
|
+
const raw = readFileSync(filePath, "utf8");
|
|
612
|
+
return parseCouncilAnswersFile(raw);
|
|
613
|
+
}
|
|
614
|
+
catch (err) {
|
|
615
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
616
|
+
console.error(`Cannot load --council-answers file "${filePath}": ${msg}`);
|
|
617
|
+
process.exit(1);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
function changeDirectoryOrExit(directory) {
|
|
621
|
+
if (!directory) {
|
|
622
|
+
return;
|
|
623
|
+
}
|
|
624
|
+
try {
|
|
625
|
+
process.chdir(directory);
|
|
626
|
+
}
|
|
627
|
+
catch (err) {
|
|
628
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
629
|
+
console.error(`Cannot change to directory ${directory}: ${msg}`);
|
|
630
|
+
process.exit(1);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
function stringOption(value) {
|
|
634
|
+
return typeof value === "string" ? value : undefined;
|
|
635
|
+
}
|
|
636
|
+
function collect(value, prev) {
|
|
637
|
+
return [...prev, value];
|
|
638
|
+
}
|
|
639
|
+
function resolveCliSandboxMode(value) {
|
|
640
|
+
if (value === true)
|
|
641
|
+
return "shuru";
|
|
642
|
+
if (value === false)
|
|
643
|
+
return "off";
|
|
644
|
+
return undefined;
|
|
645
|
+
}
|
|
646
|
+
async function runBackgroundDelegation(jobPath, options) {
|
|
647
|
+
let output = "";
|
|
648
|
+
let agent;
|
|
649
|
+
try {
|
|
650
|
+
const delegation = await loadDelegation(jobPath);
|
|
651
|
+
const baseURL = stringOption(options.baseUrl) || getBaseURL();
|
|
652
|
+
const explicitModel = stringOption(options.model) || delegation.model;
|
|
653
|
+
const model = explicitModel ? normalizeModelId(explicitModel) : undefined;
|
|
654
|
+
// Resolve API key: explicit flag > legacy env/settings.apiKey > per-provider keychain
|
|
655
|
+
// (matches the foreground flow — delegations were previously broken when the user
|
|
656
|
+
// only had a per-provider key in the OS keychain, e.g. deepseek.)
|
|
657
|
+
let apiKey = stringOption(options.apiKey) || getApiKey();
|
|
658
|
+
if (!apiKey) {
|
|
659
|
+
const modelForResolve = model ?? delegation.model ?? getCurrentModel("agent");
|
|
660
|
+
const keychainKey = await resolveKeyForModel(modelForResolve);
|
|
661
|
+
if (keychainKey) {
|
|
662
|
+
apiKey = keychainKey;
|
|
663
|
+
}
|
|
664
|
+
else if (await hasOAuthForModel(modelForResolve)) {
|
|
665
|
+
apiKey = "oauth";
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
if (!apiKey) {
|
|
669
|
+
throw new Error("API key required. Set MUONROI_API_KEY, use --api-key, save it to ~/.muonroi-cli/user-settings.json, " +
|
|
670
|
+
"or run 'muonroi-cli keys login <provider>' for subscription OAuth.");
|
|
671
|
+
}
|
|
672
|
+
const maxToolRounds = parseInt(stringOption(options.maxToolRounds) || String(delegation.maxToolRounds), 10) || delegation.maxToolRounds;
|
|
673
|
+
const sandboxMode = resolveCliSandboxMode(options.sandbox) || delegation.sandboxMode || getCurrentSandboxMode();
|
|
674
|
+
const sandboxSettings = mergeSandboxSettings(getCurrentSandboxSettings(), delegation.sandboxSettings);
|
|
675
|
+
agent = new Agent(apiKey, baseURL, model, maxToolRounds, {
|
|
676
|
+
persistSession: false,
|
|
677
|
+
sandboxMode,
|
|
678
|
+
sandboxSettings,
|
|
679
|
+
batchApi: Boolean(delegation.batchApi ?? options.batchApi === true),
|
|
680
|
+
});
|
|
681
|
+
const result = await agent.runTaskRequest({
|
|
682
|
+
agent: delegation.agent,
|
|
683
|
+
description: delegation.description,
|
|
684
|
+
prompt: delegation.prompt,
|
|
685
|
+
});
|
|
686
|
+
output = (result.output || "").trim();
|
|
687
|
+
if (!result.success) {
|
|
688
|
+
await failDelegation(jobPath, result.output || result.error || "Background delegation failed.", output);
|
|
689
|
+
return;
|
|
690
|
+
}
|
|
691
|
+
await completeDelegation(jobPath, output, result.task?.summary);
|
|
692
|
+
}
|
|
693
|
+
catch (err) {
|
|
694
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
695
|
+
try {
|
|
696
|
+
await failDelegation(jobPath, msg, output);
|
|
697
|
+
}
|
|
698
|
+
catch {
|
|
699
|
+
// Best effort — background tasks should fail silently if persistence is unavailable.
|
|
700
|
+
}
|
|
701
|
+
process.exit(1);
|
|
702
|
+
}
|
|
703
|
+
finally {
|
|
704
|
+
await agent?.cleanup();
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
async function persistApiKeyToKeychain(rawKey, modelHint) {
|
|
708
|
+
const provider = detectProviderForModel(modelHint ?? getCurrentModel("agent"));
|
|
709
|
+
try {
|
|
710
|
+
return await setKeyForProvider(provider, rawKey);
|
|
711
|
+
}
|
|
712
|
+
catch {
|
|
713
|
+
return false;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
function resolveConfig(options) {
|
|
717
|
+
const apiKey = stringOption(options.apiKey) || getApiKey();
|
|
718
|
+
const baseURL = stringOption(options.baseUrl) || getBaseURL();
|
|
719
|
+
const explicitModel = stringOption(options.model);
|
|
720
|
+
const model = explicitModel ? normalizeModelId(explicitModel) : undefined;
|
|
721
|
+
const maxToolRounds = parseInt(stringOption(options.maxToolRounds) || "400", 10) || 400;
|
|
722
|
+
const sandboxMode = resolveCliSandboxMode(options.sandbox) || getCurrentSandboxMode();
|
|
723
|
+
const cliOverrides = {};
|
|
724
|
+
if (options.allowNet === true)
|
|
725
|
+
cliOverrides.allowNet = true;
|
|
726
|
+
const allowHostValue = options.allowHost;
|
|
727
|
+
if (Array.isArray(allowHostValue) && allowHostValue.length > 0) {
|
|
728
|
+
cliOverrides.allowedHosts = allowHostValue;
|
|
729
|
+
if (!cliOverrides.allowNet)
|
|
730
|
+
cliOverrides.allowNet = true;
|
|
731
|
+
}
|
|
732
|
+
const portValue = options.port;
|
|
733
|
+
if (Array.isArray(portValue) && portValue.length > 0) {
|
|
734
|
+
cliOverrides.ports = portValue;
|
|
735
|
+
}
|
|
736
|
+
const sandboxSettings = mergeSandboxSettings(getCurrentSandboxSettings(), cliOverrides);
|
|
737
|
+
if (typeof options.apiKey === "string" && process.env["MUONROI_TEST_NO_PERSIST"] !== "1") {
|
|
738
|
+
// Persist to OS keychain (per-provider) instead of plaintext settings.json.
|
|
739
|
+
// Fire-and-forget: keychain write is async; if it fails (no keytar), the key still
|
|
740
|
+
// works for this run via `apiKey` above and the user can re-supply it next invocation.
|
|
741
|
+
void persistApiKeyToKeychain(options.apiKey, stringOption(options.model)).catch(() => { });
|
|
742
|
+
}
|
|
743
|
+
if (typeof options.model === "string")
|
|
744
|
+
saveUserSettings({ defaultModel: normalizeModelId(options.model) });
|
|
745
|
+
return { apiKey, baseURL, model, maxToolRounds, sandboxMode, sandboxSettings };
|
|
746
|
+
}
|
|
747
|
+
function requireApiKey(apiKey) {
|
|
748
|
+
if (!apiKey) {
|
|
749
|
+
console.error("Error: API key required. Set MUONROI_API_KEY env var, use --api-key, or save to ~/.muonroi-cli/user-settings.json");
|
|
750
|
+
process.exit(1);
|
|
751
|
+
}
|
|
752
|
+
return apiKey;
|
|
753
|
+
}
|
|
754
|
+
function parseHeadlessOutputFormat(value) {
|
|
755
|
+
if (isHeadlessOutputFormat(value)) {
|
|
756
|
+
return value;
|
|
757
|
+
}
|
|
758
|
+
throw new InvalidArgumentError(`Invalid headless format "${value}". Expected "text" or "json".`);
|
|
759
|
+
}
|
|
760
|
+
program
|
|
761
|
+
.name("muonroi-cli")
|
|
762
|
+
.description("AI coding agent — built with Bun and OpenTUI")
|
|
763
|
+
.version(packageJson.version)
|
|
764
|
+
.argument("[message...]", "Initial message to send")
|
|
765
|
+
.option("-k, --api-key <key>", "API key")
|
|
766
|
+
.option("-u, --base-url <url>", "API base URL")
|
|
767
|
+
.option("-m, --model <model>", "Model to use")
|
|
768
|
+
.option("-d, --directory <dir>", "Working directory", process.cwd())
|
|
769
|
+
.option("-p, --prompt <prompt>", "Run a single prompt headlessly")
|
|
770
|
+
.option("--verify", "Run the built-in verify flow headlessly")
|
|
771
|
+
.option("--format <format>", "Headless output format: text or json", parseHeadlessOutputFormat, "text")
|
|
772
|
+
.option("--sandbox", "Run agent shell commands inside a Shuru sandbox")
|
|
773
|
+
.option("--no-sandbox", "Run agent shell commands directly on the host")
|
|
774
|
+
.option("--allow-net", "Enable network access inside the Shuru sandbox")
|
|
775
|
+
.option("--allow-host <pattern>", "Restrict sandbox network to specific hosts (repeatable)", collect, [])
|
|
776
|
+
.option("--port <mapping>", "Forward a host port to sandbox guest (HOST:GUEST, repeatable)", collect, [])
|
|
777
|
+
.option("-s, --session <id>", "Continue a saved session by id, or use 'latest'")
|
|
778
|
+
.option("--background-task-file <path>", "Run a persisted background delegation")
|
|
779
|
+
.option("--max-tool-rounds <n>", "Max tool execution rounds", "400")
|
|
780
|
+
.option("--batch-api", "Use xAI Batch API for model calls (async, lower cost)")
|
|
781
|
+
.option("--permission <mode>", "Permission mode: safe (confirm all), auto-edit (auto-approve file ops), yolo (auto-approve all)", "safe")
|
|
782
|
+
.option("-y, --yes", "Headless: auto-answer council askcards with their default option and approve preflights")
|
|
783
|
+
.option("--council-answers <file>", "Headless: JSON file with scripted council answers per phase (FIFO)")
|
|
784
|
+
.option("--update", "Update muonroi-cli to the latest version and exit")
|
|
785
|
+
.option("--smoke-boot-only", "CI smoke: validate loadConfig + loadUsage and exit 0 — no keychain access")
|
|
786
|
+
.option("--agent-mode", "Enable agent harness mode (JSONL sidechannel)")
|
|
787
|
+
.option("--agent-cols <n>", "Terminal columns in agent-mode", (v) => parseInt(v, 10), 120)
|
|
788
|
+
.option("--agent-rows <n>", "Terminal rows in agent-mode", (v) => parseInt(v, 10), 40)
|
|
789
|
+
.option("--agent-idle-ms <n>", "Idle quiescence window (ms)", (v) => parseInt(v, 10), 50)
|
|
790
|
+
.option("--agent-fake-clock", "Use deterministic frame-counter clock")
|
|
791
|
+
.option("--mock-llm <dir>", "Use fixture-based mock LLM from <dir> instead of real provider (E2E testing)")
|
|
792
|
+
.option("--inject-halt", "TEST SEAM: render a synthetic halt recovery card after boot (harness E2E only)")
|
|
793
|
+
.action(async (message, options) => {
|
|
794
|
+
// Agent-mode: start the sidechannel runtime BEFORE any TUI or model work.
|
|
795
|
+
// The runtime is exposed on globalThis so the renderer wiring (Task 1.6c)
|
|
796
|
+
// can pick it up without a direct import dependency.
|
|
797
|
+
if (options.agentMode) {
|
|
798
|
+
const { startAgentMode } = await import("@muonroi/agent-harness-opentui");
|
|
799
|
+
const runtime = await startAgentMode({
|
|
800
|
+
cols: options.agentCols,
|
|
801
|
+
rows: options.agentRows,
|
|
802
|
+
idleMs: options.agentIdleMs,
|
|
803
|
+
fakeClock: !!options.agentFakeClock,
|
|
804
|
+
});
|
|
805
|
+
globalThis.__muonroiAgentRuntime = runtime;
|
|
806
|
+
}
|
|
807
|
+
// Mock-LLM: load fixture directory and inject into globalThis BEFORE any
|
|
808
|
+
// provider call. Dynamic import keeps startup lean when flag is absent.
|
|
809
|
+
if (typeof options.mockLlm === "string") {
|
|
810
|
+
const { createMockLlm } = await import("@muonroi/agent-harness-core/mock-llm");
|
|
811
|
+
globalThis.__muonroiMockLlm = createMockLlm({ dir: options.mockLlm });
|
|
812
|
+
// Phase H1: AI-SDK-level mock. If any fixture declares a `model` block
|
|
813
|
+
// it is installed so `resolveModelRuntime` returns it instead of the
|
|
814
|
+
// real provider model. This enables cost-leak verification (G1, F1,
|
|
815
|
+
// B3/B4, C1) through the orchestrator's streamText path.
|
|
816
|
+
const { loadMockModelFromDir } = await import("./agent-harness/mock-model.js");
|
|
817
|
+
const modelHandle = await loadMockModelFromDir(options.mockLlm).catch(() => null);
|
|
818
|
+
if (modelHandle) {
|
|
819
|
+
// Install all three globals atomically so the runtime sees a
|
|
820
|
+
// consistent picture: model + the OAuth-registry-equivalent
|
|
821
|
+
// unsupportedParams / defaultProviderOptions parsed from the fixture.
|
|
822
|
+
const g = globalThis;
|
|
823
|
+
g.__muonroiMockModel = modelHandle.model;
|
|
824
|
+
g.__muonroiMockUnsupportedParams = modelHandle.unsupportedParams;
|
|
825
|
+
g.__muonroiMockDefaultProviderOptions = modelHandle.defaultProviderOptions;
|
|
826
|
+
// Phase H3 — exfiltrate recordings to a file at exit so the parent
|
|
827
|
+
// vitest spec can assert across the child-process boundary. Activated
|
|
828
|
+
// only when MUONROI_MOCK_MODEL_DUMP is set; otherwise no-op.
|
|
829
|
+
const dumpPath = process.env.MUONROI_MOCK_MODEL_DUMP;
|
|
830
|
+
if (typeof dumpPath === "string" && dumpPath.length > 0) {
|
|
831
|
+
const { dumpRecordings } = await import("./agent-harness/mock-model.js");
|
|
832
|
+
let dumped = false;
|
|
833
|
+
const doDump = () => {
|
|
834
|
+
if (dumped)
|
|
835
|
+
return;
|
|
836
|
+
dumped = true;
|
|
837
|
+
try {
|
|
838
|
+
dumpRecordings(dumpPath, modelHandle.model);
|
|
839
|
+
}
|
|
840
|
+
catch (err) {
|
|
841
|
+
// Last-ditch: surface on stderr so the parent test can see why.
|
|
842
|
+
process.stderr.write(`[muonroi-cli] dumpRecordings failed: ${String(err)}\n`);
|
|
843
|
+
}
|
|
844
|
+
};
|
|
845
|
+
// Continuous dump: write after every streamText completes so tests
|
|
846
|
+
// can read the dump without relying on a graceful exit handler. On
|
|
847
|
+
// Windows + Bun + named pipes, `process.on("exit")` handlers may
|
|
848
|
+
// not fire when process.exit() is called from deep async chains
|
|
849
|
+
// (observed empirically — exit event reaches the parent, but the
|
|
850
|
+
// exit-handler callbacks in the child never run). Patching
|
|
851
|
+
// doStream guarantees the dump exists after at least one call.
|
|
852
|
+
const writeDumpAlways = () => {
|
|
853
|
+
try {
|
|
854
|
+
dumpRecordings(dumpPath, modelHandle.model);
|
|
855
|
+
}
|
|
856
|
+
catch {
|
|
857
|
+
// ignore — best-effort
|
|
858
|
+
}
|
|
859
|
+
};
|
|
860
|
+
const origDoStream = modelHandle.model.doStream.bind(modelHandle.model);
|
|
861
|
+
modelHandle.model.doStream = async (options) => {
|
|
862
|
+
// biome-ignore lint/suspicious/noExplicitAny: AI SDK call options
|
|
863
|
+
const r = await origDoStream(options);
|
|
864
|
+
writeDumpAlways();
|
|
865
|
+
return r;
|
|
866
|
+
};
|
|
867
|
+
process.on("exit", doDump);
|
|
868
|
+
process.on("SIGINT", () => {
|
|
869
|
+
doDump();
|
|
870
|
+
process.exit(130);
|
|
871
|
+
});
|
|
872
|
+
process.on("SIGTERM", () => {
|
|
873
|
+
doDump();
|
|
874
|
+
process.exit(143);
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
// CI smoke affordance — exit cleanly WITHOUT invoking the provider.
|
|
880
|
+
// Deliberately exits BEFORE provider key loading — CI runners have no keychain configured.
|
|
881
|
+
if (options.smokeBootOnly) {
|
|
882
|
+
const [_cfg, _usg] = await Promise.all([loadConfig(), loadUsage()]);
|
|
883
|
+
console.log("[muonroi-cli] smoke-boot-only — config + usage loaded; exiting 0.");
|
|
884
|
+
process.exit(0);
|
|
885
|
+
}
|
|
886
|
+
if (options.update) {
|
|
887
|
+
console.log("Checking for updates...");
|
|
888
|
+
const result = await runUpdate(packageJson.version);
|
|
889
|
+
console.log(result.output);
|
|
890
|
+
process.exit(result.success ? 0 : 1);
|
|
891
|
+
}
|
|
892
|
+
changeDirectoryOrExit(options.directory);
|
|
893
|
+
// Boot model registry BEFORE any key resolution path runs —
|
|
894
|
+
// detectProviderForModel consults the catalog's alias map to route e.g.
|
|
895
|
+
// "deepseek-v4-flash" to provider "siliconflow". With an empty registry
|
|
896
|
+
// it falls back to a prefix match ("deepseek") and the CLI loads the
|
|
897
|
+
// wrong provider's key. Affects both runBackgroundDelegation and the
|
|
898
|
+
// main interactive/headless path below.
|
|
899
|
+
let catalogLoadFailed = false;
|
|
900
|
+
await loadCatalog().catch(() => {
|
|
901
|
+
catalogLoadFailed = true;
|
|
902
|
+
});
|
|
903
|
+
if (options.backgroundTaskFile) {
|
|
904
|
+
await runBackgroundDelegation(options.backgroundTaskFile, options);
|
|
905
|
+
return;
|
|
906
|
+
}
|
|
907
|
+
const config = resolveConfig(options);
|
|
908
|
+
// No legacy key in env / settings — try the OS keychain for the resolved
|
|
909
|
+
// model's provider before falling back to the wizard.
|
|
910
|
+
if (!config.apiKey) {
|
|
911
|
+
const modelForResolve = config.model ?? getCurrentModel("agent");
|
|
912
|
+
const keychainKey = await resolveKeyForModel(modelForResolve);
|
|
913
|
+
if (keychainKey) {
|
|
914
|
+
config.apiKey = keychainKey;
|
|
915
|
+
}
|
|
916
|
+
else if (await hasOAuthForModel(modelForResolve)) {
|
|
917
|
+
// OAuth-authenticated provider — runtime will inject Bearer headers.
|
|
918
|
+
// Set placeholder so downstream gating code (which only checks for
|
|
919
|
+
// a truthy apiKey) is satisfied.
|
|
920
|
+
config.apiKey = "oauth";
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
// First-run wizard (interactive only, before any TUI code)
|
|
924
|
+
const isInteractive = !options.prompt && !options.verify && process.stdin.isTTY;
|
|
925
|
+
if (!config.apiKey && isInteractive) {
|
|
926
|
+
const modelForWizard = config.model ?? getCurrentModel("agent");
|
|
927
|
+
const wizardKey = await firstRunWizard(modelForWizard);
|
|
928
|
+
if (wizardKey) {
|
|
929
|
+
// Key is already persisted to the OS keychain by the wizard. We DO NOT
|
|
930
|
+
// write it back to settings.json (avoids resurrecting plaintext that
|
|
931
|
+
// 'keys cleanup-settings' just removed).
|
|
932
|
+
config.apiKey = wizardKey;
|
|
933
|
+
}
|
|
934
|
+
else {
|
|
935
|
+
process.exit(1);
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
// Bootstrap EE auth (loads serverBaseUrl + token from ~/.experience/config.json)
|
|
939
|
+
const { loadEEAuthToken } = await import("./ee/auth.js");
|
|
940
|
+
await loadEEAuthToken().catch(() => { });
|
|
941
|
+
// Auto-detect EE client mode (thin / thin-degraded / fat / disabled).
|
|
942
|
+
// Result is cached for downstream callsites (PIL layers, bridge.searchByText)
|
|
943
|
+
// so each request doesn't re-probe.
|
|
944
|
+
const { detectEEClientMode, describeMode } = await import("./ee/client-mode.js");
|
|
945
|
+
detectEEClientMode()
|
|
946
|
+
.then((info) => {
|
|
947
|
+
if (process.env.MUONROI_EE_DEBUG === "1") {
|
|
948
|
+
console.error(`[muonroi-cli] ${describeMode(info)}`);
|
|
949
|
+
}
|
|
950
|
+
})
|
|
951
|
+
.catch(() => { });
|
|
952
|
+
// Patch zod-to-json-schema for Zod v4 compat (fixes tool calls for DeepSeek etc.)
|
|
953
|
+
const { patchZodToJsonSchema } = await import("./providers/patch-zod-schema.js");
|
|
954
|
+
patchZodToJsonSchema();
|
|
955
|
+
// Catalog already loaded above (before key resolution). Read the
|
|
956
|
+
// populated registry now to surface any load failure to the user.
|
|
957
|
+
const { MODELS: loadedModels, getModelInfo: lookupModel } = await import("./models/registry.js");
|
|
958
|
+
// No models loaded — check root cause
|
|
959
|
+
if (loadedModels.length === 0) {
|
|
960
|
+
if (catalogLoadFailed) {
|
|
961
|
+
console.error("\x1b[31mCould not load the model catalog. The installation may be corrupted.\x1b[0m\n" +
|
|
962
|
+
" The file \x1b[33mdist/models/catalog.json\x1b[0m was not found.\n" +
|
|
963
|
+
"\nTry reinstalling:\n" +
|
|
964
|
+
" \x1b[33mnpm install -g muonroi-cli\x1b[0m\n" +
|
|
965
|
+
" # or: \x1b[33mbun install -g muonroi-cli\x1b[0m\n" +
|
|
966
|
+
"\nIf building from source:\n" +
|
|
967
|
+
" \x1b[33mbun run build\x1b[0m\n");
|
|
968
|
+
}
|
|
969
|
+
else if (config.apiKey) {
|
|
970
|
+
console.error("\x1b[31mAPI key is invalid or expired. No models could be loaded.\x1b[0m\n" +
|
|
971
|
+
"Update your key:\n" +
|
|
972
|
+
" muonroi-cli -k YOUR_NEW_KEY\n" +
|
|
973
|
+
" # or: export MUONROI_API_KEY=YOUR_NEW_KEY\n" +
|
|
974
|
+
`\nGet a key at: ${getProviderCapabilities("anthropic").consoleSignupURL()}`);
|
|
975
|
+
}
|
|
976
|
+
else {
|
|
977
|
+
console.error("\x1b[31mNo API key configured and no models could be loaded.\x1b[0m\n" +
|
|
978
|
+
"Set your key:\n" +
|
|
979
|
+
" muonroi-cli -k YOUR_API_KEY\n" +
|
|
980
|
+
" # or: export MUONROI_API_KEY=YOUR_API_KEY\n" +
|
|
981
|
+
`\nGet a key at: ${getProviderCapabilities("anthropic").consoleSignupURL()}`);
|
|
982
|
+
}
|
|
983
|
+
process.exit(1);
|
|
984
|
+
}
|
|
985
|
+
// Validate configured model exists in loaded registry — fallback to first available
|
|
986
|
+
if (loadedModels.length > 0) {
|
|
987
|
+
const { getCurrentModel } = await import("./utils/settings.js");
|
|
988
|
+
const effectiveModel = config.model || getCurrentModel();
|
|
989
|
+
if (effectiveModel && !lookupModel(effectiveModel)) {
|
|
990
|
+
console.error(`\x1b[31mModel "${effectiveModel}" is not available (may be retired or not in your plan).\x1b[0m\n`);
|
|
991
|
+
console.error("Available models:\n");
|
|
992
|
+
for (const m of loadedModels.slice(0, 15)) {
|
|
993
|
+
console.error(` \x1b[36m${m.id}\x1b[0m — ${m.name}`);
|
|
994
|
+
}
|
|
995
|
+
if (loadedModels.length > 15) {
|
|
996
|
+
console.error(` ... and ${loadedModels.length - 15} more (run \`muonroi-cli models\` to see all)`);
|
|
997
|
+
}
|
|
998
|
+
console.error("\n\x1b[33mSet your model:\x1b[0m\n" +
|
|
999
|
+
" muonroi-cli -m MODEL_ID\n" +
|
|
1000
|
+
" # or add to ~/.muonroi-cli/user-settings.json:\n" +
|
|
1001
|
+
' # { "defaultModel": "MODEL_ID" }\n');
|
|
1002
|
+
process.exit(1);
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
const councilAnswersFile = typeof options.councilAnswers === "string" ? loadCouncilAnswersOrExit(options.councilAnswers) : undefined;
|
|
1006
|
+
const councilAutoAnswer = createCouncilAutoAnswerer({
|
|
1007
|
+
enabled: options.yes === true,
|
|
1008
|
+
file: councilAnswersFile,
|
|
1009
|
+
});
|
|
1010
|
+
if (options.verify) {
|
|
1011
|
+
const verifyError = getVerifyCliError({ hasPrompt: Boolean(options.prompt), hasMessageArgs: message.length > 0 });
|
|
1012
|
+
if (verifyError) {
|
|
1013
|
+
console.error(verifyError);
|
|
1014
|
+
process.exit(1);
|
|
1015
|
+
}
|
|
1016
|
+
await runHeadless(buildVerifyPrompt(process.cwd()), requireApiKey(config.apiKey), config.baseURL, config.model, config.maxToolRounds, options.batchApi === true, config.sandboxMode, config.sandboxSettings, options.format, options.session, options.permission, councilAutoAnswer);
|
|
1017
|
+
return;
|
|
1018
|
+
}
|
|
1019
|
+
if (options.prompt) {
|
|
1020
|
+
await runHeadless(options.prompt, requireApiKey(config.apiKey), config.baseURL, config.model, config.maxToolRounds, options.batchApi === true, config.sandboxMode, config.sandboxSettings, options.format, options.session, options.permission, councilAutoAnswer);
|
|
1021
|
+
return;
|
|
1022
|
+
}
|
|
1023
|
+
const initialMessage = message.length > 0 ? message.join(" ") : undefined;
|
|
1024
|
+
await startInteractive(config.apiKey, config.baseURL, config.model, config.maxToolRounds, options.batchApi === true, config.sandboxMode, config.sandboxSettings, options.session, initialMessage, options.permission, options.injectHalt === true);
|
|
1025
|
+
});
|
|
1026
|
+
program
|
|
1027
|
+
.command("models")
|
|
1028
|
+
.description("List available models")
|
|
1029
|
+
.action(async () => {
|
|
1030
|
+
console.log("\nLoading model catalog...\n");
|
|
1031
|
+
await loadCatalog();
|
|
1032
|
+
const { MODELS } = await import("./models/registry.js");
|
|
1033
|
+
for (const m of MODELS) {
|
|
1034
|
+
const tags = [
|
|
1035
|
+
m.reasoning ? "reasoning" : "non-reasoning",
|
|
1036
|
+
m.multiAgent ? "multi-agent" : null,
|
|
1037
|
+
m.responsesOnly ? "responses-only" : null,
|
|
1038
|
+
].filter(Boolean);
|
|
1039
|
+
const suffix = tags.length > 0 ? ` (${tags.join(", ")})` : "";
|
|
1040
|
+
console.log(` \x1b[36m${m.id}\x1b[0m — ${m.name}${suffix}`);
|
|
1041
|
+
console.log(` ${m.description} | ${formatContext(m.contextWindow)} context | $${m.inputPrice}/$${m.outputPrice} per 1M tokens`);
|
|
1042
|
+
if ((m.aliases?.length ?? 0) > 0) {
|
|
1043
|
+
console.log(` aliases: ${(m.aliases ?? []).join(", ")}`);
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
console.log();
|
|
1047
|
+
});
|
|
1048
|
+
program
|
|
1049
|
+
.command("update")
|
|
1050
|
+
.description("Update muonroi-cli to the latest release")
|
|
1051
|
+
.action(async () => {
|
|
1052
|
+
console.log("Checking for updates...");
|
|
1053
|
+
const result = await runUpdate(packageJson.version);
|
|
1054
|
+
console.log(result.output);
|
|
1055
|
+
process.exit(result.success ? 0 : 1);
|
|
1056
|
+
});
|
|
1057
|
+
program
|
|
1058
|
+
.command("uninstall")
|
|
1059
|
+
.description("Remove a script-installed muonroi-cli binary and optional data")
|
|
1060
|
+
.option("--dry-run", "Show what would be removed without removing it")
|
|
1061
|
+
.option("--force", "Skip the confirmation prompt")
|
|
1062
|
+
.option("--keep-config", "Keep ~/.muonroi-cli config files")
|
|
1063
|
+
.option("--keep-data", "Keep ~/.muonroi-cli data files")
|
|
1064
|
+
.action(async (options) => {
|
|
1065
|
+
const result = await runScriptManagedUninstall({
|
|
1066
|
+
dryRun: options.dryRun === true,
|
|
1067
|
+
force: options.force === true,
|
|
1068
|
+
keepConfig: options.keepConfig === true,
|
|
1069
|
+
keepData: options.keepData === true,
|
|
1070
|
+
});
|
|
1071
|
+
console.log(result.output);
|
|
1072
|
+
process.exit(result.success ? 0 : 1);
|
|
1073
|
+
});
|
|
1074
|
+
program
|
|
1075
|
+
.command("daemon")
|
|
1076
|
+
.description("Start the schedule daemon to run scheduled tasks")
|
|
1077
|
+
.option("--background", "Detach and run in the background")
|
|
1078
|
+
.action(async (options) => {
|
|
1079
|
+
if (options.background) {
|
|
1080
|
+
const result = await startScheduleDaemon(process.cwd());
|
|
1081
|
+
console.log(result.alreadyRunning
|
|
1082
|
+
? `Schedule daemon already running (pid: ${result.status.pid ?? "unknown"}).`
|
|
1083
|
+
: `Schedule daemon started in the background (pid: ${result.pid ?? "unknown"}).`);
|
|
1084
|
+
return;
|
|
1085
|
+
}
|
|
1086
|
+
process.off("SIGTERM", exitCleanlyOnSigterm);
|
|
1087
|
+
const { SchedulerDaemon } = await import("./daemon/scheduler.js");
|
|
1088
|
+
const daemon = new SchedulerDaemon();
|
|
1089
|
+
await daemon.start();
|
|
1090
|
+
});
|
|
1091
|
+
program
|
|
1092
|
+
.command("doctor")
|
|
1093
|
+
.description("Run health checks for muonroi-cli dependencies and services")
|
|
1094
|
+
.action(async () => {
|
|
1095
|
+
const { loadEEAuthToken } = await import("./ee/auth.js");
|
|
1096
|
+
await loadEEAuthToken().catch(() => { });
|
|
1097
|
+
const { runDoctor, formatDoctorReport } = await import("./ops/doctor.js");
|
|
1098
|
+
const results = await runDoctor();
|
|
1099
|
+
console.log("\nmuonroi-cli doctor\n");
|
|
1100
|
+
console.log(formatDoctorReport(results, packageJson.version));
|
|
1101
|
+
const hasFail = results.some((r) => r.status === "fail");
|
|
1102
|
+
process.exit(hasFail ? 1 : 0);
|
|
1103
|
+
});
|
|
1104
|
+
program
|
|
1105
|
+
.command("bug-report")
|
|
1106
|
+
.description("Generate anonymized diagnostic bundle for issue submission")
|
|
1107
|
+
.action(async () => {
|
|
1108
|
+
const { buildBugReport, formatBugReport } = await import("./ops/bug-report.js");
|
|
1109
|
+
const bundle = await buildBugReport();
|
|
1110
|
+
console.log(formatBugReport(bundle));
|
|
1111
|
+
});
|
|
1112
|
+
const keys = program
|
|
1113
|
+
.command("keys")
|
|
1114
|
+
.description("Manage provider API keys via the OS keychain (set, list, delete, import-bw)");
|
|
1115
|
+
keys
|
|
1116
|
+
.command("set <provider>")
|
|
1117
|
+
.description("Prompt for a provider API key and store it in the OS keychain")
|
|
1118
|
+
.option("--bw", "Also write the key to a Bitwarden vault Secure Note (requires bw CLI + BW_SESSION)")
|
|
1119
|
+
.option("--prefix <prefix>", "Bitwarden item name prefix when --bw is set (default: 'muonroi-cli/')", "muonroi-cli/")
|
|
1120
|
+
.action(async (provider, opts) => {
|
|
1121
|
+
const { runKeysSet } = await import("./cli/keys.js");
|
|
1122
|
+
await runKeysSet(provider, { bw: opts.bw, itemPrefix: opts.prefix });
|
|
1123
|
+
});
|
|
1124
|
+
keys
|
|
1125
|
+
.command("list")
|
|
1126
|
+
.description("Show provider keys currently stored in the OS keychain (masked)")
|
|
1127
|
+
.action(async () => {
|
|
1128
|
+
const { runKeysList } = await import("./cli/keys.js");
|
|
1129
|
+
await runKeysList();
|
|
1130
|
+
});
|
|
1131
|
+
keys
|
|
1132
|
+
.command("delete <provider>")
|
|
1133
|
+
.description("Delete a stored provider key from the OS keychain")
|
|
1134
|
+
.action(async (provider) => {
|
|
1135
|
+
const { runKeysDelete } = await import("./cli/keys.js");
|
|
1136
|
+
await runKeysDelete(provider);
|
|
1137
|
+
});
|
|
1138
|
+
keys
|
|
1139
|
+
.command("import-bw [providers...]")
|
|
1140
|
+
.description("Import keys from a Bitwarden vault into the OS keychain (requires bw CLI + BW_SESSION)")
|
|
1141
|
+
.option("--prefix <prefix>", "Vault item name prefix (default: 'muonroi-cli/')", "muonroi-cli/")
|
|
1142
|
+
.action(async (providers, opts) => {
|
|
1143
|
+
const { runKeysImportBw } = await import("./cli/keys.js");
|
|
1144
|
+
await runKeysImportBw({ providers, itemPrefix: opts.prefix });
|
|
1145
|
+
});
|
|
1146
|
+
keys
|
|
1147
|
+
.command("login <provider>")
|
|
1148
|
+
.description("Log in to a provider via OAuth subscription (currently supports: openai)")
|
|
1149
|
+
.action(async (provider) => {
|
|
1150
|
+
const { runKeysLogin } = await import("./cli/keys.js");
|
|
1151
|
+
await runKeysLogin(provider);
|
|
1152
|
+
});
|
|
1153
|
+
keys
|
|
1154
|
+
.command("logout <provider>")
|
|
1155
|
+
.description("Log out of an OAuth provider and revoke stored tokens")
|
|
1156
|
+
.action(async (provider) => {
|
|
1157
|
+
const { runKeysLogout } = await import("./cli/keys.js");
|
|
1158
|
+
await runKeysLogout(provider);
|
|
1159
|
+
});
|
|
1160
|
+
keys
|
|
1161
|
+
.command("export <file>")
|
|
1162
|
+
.description("Export all keychain keys to an encrypted portable bundle (move between devices)")
|
|
1163
|
+
.action(async (file) => {
|
|
1164
|
+
const { runKeysExport } = await import("./cli/keys.js");
|
|
1165
|
+
await runKeysExport(file);
|
|
1166
|
+
});
|
|
1167
|
+
keys
|
|
1168
|
+
.command("import <file>")
|
|
1169
|
+
.description("Import an encrypted bundle into the OS keychain (created by 'keys export')")
|
|
1170
|
+
.action(async (file) => {
|
|
1171
|
+
const { runKeysImport } = await import("./cli/keys.js");
|
|
1172
|
+
await runKeysImport(file);
|
|
1173
|
+
});
|
|
1174
|
+
keys
|
|
1175
|
+
.command("cleanup-settings")
|
|
1176
|
+
.description("Strip plaintext API keys out of ~/.muonroi-cli/user-settings.json after migrating to keychain")
|
|
1177
|
+
.action(async () => {
|
|
1178
|
+
const { runKeysCleanupSettings } = await import("./cli/keys.js");
|
|
1179
|
+
await runKeysCleanupSettings();
|
|
1180
|
+
});
|
|
1181
|
+
keys
|
|
1182
|
+
.command("set-chat <id>")
|
|
1183
|
+
.description("Set a chat-service secret (discord-token, discord-guild-id, slack-token, slack-team-id) in the OS keychain")
|
|
1184
|
+
.action(async (id) => {
|
|
1185
|
+
const { runChatKeySet } = await import("./cli/keys.js");
|
|
1186
|
+
if (!["discord-token", "discord-guild-id", "slack-token", "slack-team-id"].includes(id)) {
|
|
1187
|
+
console.error(`Unknown chat secret '${id}'. Valid: discord-token, discord-guild-id, slack-token, slack-team-id`);
|
|
1188
|
+
process.exit(1);
|
|
1189
|
+
}
|
|
1190
|
+
const value = (await new Promise((resolve) => {
|
|
1191
|
+
const rl = createInterface({ input: process.stdin, output: process.stderr });
|
|
1192
|
+
rl.question(`Paste ${id} value (hidden): `, (answer) => {
|
|
1193
|
+
rl.close();
|
|
1194
|
+
resolve(answer);
|
|
1195
|
+
});
|
|
1196
|
+
})).trim();
|
|
1197
|
+
if (!value) {
|
|
1198
|
+
console.error("Aborted (empty value).");
|
|
1199
|
+
process.exit(1);
|
|
1200
|
+
}
|
|
1201
|
+
await runChatKeySet(id, value);
|
|
1202
|
+
});
|
|
1203
|
+
keys
|
|
1204
|
+
.command("import-bw-chat [ids...]")
|
|
1205
|
+
.option("--prefix <prefix>", "BW item name prefix", "muonroi-cli/chat-")
|
|
1206
|
+
.description("Import chat-service secrets from Bitwarden vault into OS keychain")
|
|
1207
|
+
.action(async (ids, opts) => {
|
|
1208
|
+
const { runChatImportBw } = await import("./cli/keys.js");
|
|
1209
|
+
await runChatImportBw({ ids: ids.length > 0 ? ids : undefined, itemPrefix: opts.prefix });
|
|
1210
|
+
});
|
|
1211
|
+
const usage = program.command("usage").description("Inspect cost ledger and find spend bloat");
|
|
1212
|
+
usage
|
|
1213
|
+
.command("report")
|
|
1214
|
+
.description("Aggregate per-call cost log + product ledger to find where spend grew")
|
|
1215
|
+
.option("--by <dim>", "Group by: callsite | role | phase | model | provider", "callsite")
|
|
1216
|
+
.option("--date <yyyy-mm-dd>", "Restrict cost-log to a single UTC date")
|
|
1217
|
+
.option("--run <productRunId>", "Restrict product ledger to one runId")
|
|
1218
|
+
.option("--source <src>", "cost-log | product | both", "both")
|
|
1219
|
+
.option("--breakdown", "Show orchestrator system-prompt / tools / messages breakdown")
|
|
1220
|
+
.option("--json", "Emit aggregated rows as JSON")
|
|
1221
|
+
.action(async (opts) => {
|
|
1222
|
+
const { runUsageReport } = await import("./cli/usage-report.js");
|
|
1223
|
+
await runUsageReport({
|
|
1224
|
+
by: opts.by,
|
|
1225
|
+
date: opts.date,
|
|
1226
|
+
runId: opts.run,
|
|
1227
|
+
source: opts.source,
|
|
1228
|
+
breakdown: opts.breakdown,
|
|
1229
|
+
json: opts.json,
|
|
1230
|
+
});
|
|
1231
|
+
});
|
|
1232
|
+
usage
|
|
1233
|
+
.command("pil")
|
|
1234
|
+
.description("Attribute system-prompt size growth to PIL layers (intent/personality/EE/GSD/context)")
|
|
1235
|
+
.option("--date <yyyy-mm-dd>", "Restrict to a single UTC date")
|
|
1236
|
+
.option("--top <n>", "Show top N largest prompts", "5")
|
|
1237
|
+
.option("--json", "Emit aggregated rows as JSON")
|
|
1238
|
+
.action(async (opts) => {
|
|
1239
|
+
const { runPilReport } = await import("./cli/pil-report.js");
|
|
1240
|
+
await runPilReport({
|
|
1241
|
+
date: opts.date,
|
|
1242
|
+
top: parseInt(opts.top, 10) || 5,
|
|
1243
|
+
json: opts.json,
|
|
1244
|
+
});
|
|
1245
|
+
});
|
|
1246
|
+
usage
|
|
1247
|
+
.command("forensics <sessionPrefix>")
|
|
1248
|
+
.description("Per-event token + cache breakdown for a session (joins usage_events ∪ interaction_logs). Use to verify Phase A/B/C cost-optimization caps.")
|
|
1249
|
+
.option("--json", "Emit summary as JSON")
|
|
1250
|
+
.action(async (sessionPrefix, opts) => {
|
|
1251
|
+
const { runCostForensics } = await import("./cli/cost-forensics.js");
|
|
1252
|
+
await runCostForensics({ prefix: sessionPrefix, json: opts.json });
|
|
1253
|
+
});
|
|
1254
|
+
const mcp = program.command("mcp").description("Manage MCP server configuration");
|
|
1255
|
+
mcp
|
|
1256
|
+
.command("setup-research")
|
|
1257
|
+
.description("Configure web research MCP servers (context7, fetch, tavily)")
|
|
1258
|
+
.action(async () => {
|
|
1259
|
+
const rl = createInterface({ input: process.stdin, output: process.stderr });
|
|
1260
|
+
const ask = (q) => new Promise((resolve) => rl.question(q, (a) => resolve(a)));
|
|
1261
|
+
try {
|
|
1262
|
+
const { runResearchOnboarding } = await import("./mcp/research-onboarding.js");
|
|
1263
|
+
const result = await runResearchOnboarding({
|
|
1264
|
+
askYesNo: ask,
|
|
1265
|
+
askText: ask,
|
|
1266
|
+
log: (m) => process.stderr.write(m),
|
|
1267
|
+
});
|
|
1268
|
+
process.stderr.write(`\nDone. Tavily ${result.tavilyEnabled ? "enabled" : "skipped"}.\n`);
|
|
1269
|
+
}
|
|
1270
|
+
finally {
|
|
1271
|
+
rl.close();
|
|
1272
|
+
}
|
|
1273
|
+
});
|
|
1274
|
+
mcp
|
|
1275
|
+
.command("set <id>")
|
|
1276
|
+
.description("Prompt for an MCP API key (e.g. tavily) and store it in the OS keychain")
|
|
1277
|
+
.option("--bw", "Also write the key to a Bitwarden vault Secure Note (requires bw CLI + BW_SESSION)")
|
|
1278
|
+
.option("--prefix <prefix>", "Bitwarden item name prefix when --bw is set (default: 'muonroi-cli/')", "muonroi-cli/")
|
|
1279
|
+
.action(async (id, opts) => {
|
|
1280
|
+
const { runMcpKeysSet } = await import("./cli/keys.js");
|
|
1281
|
+
await runMcpKeysSet(id, { bw: opts.bw, itemPrefix: opts.prefix });
|
|
1282
|
+
});
|
|
1283
|
+
mcp
|
|
1284
|
+
.command("import-bw [keys...]")
|
|
1285
|
+
.description("Import MCP secrets (e.g. tavily) from a Bitwarden vault into the OS keychain (requires bw CLI + BW_SESSION)")
|
|
1286
|
+
.option("--prefix <prefix>", "Vault item name prefix (default: 'muonroi-cli/')", "muonroi-cli/")
|
|
1287
|
+
.action(async (keys, opts) => {
|
|
1288
|
+
const { runMcpImportBw } = await import("./cli/keys.js");
|
|
1289
|
+
await runMcpImportBw({ keys, itemPrefix: opts.prefix });
|
|
1290
|
+
});
|
|
1291
|
+
program
|
|
1292
|
+
.command("mcp-driver")
|
|
1293
|
+
.description("Run the agent-harness MCP driver over stdio")
|
|
1294
|
+
.action(async () => {
|
|
1295
|
+
const { runHarnessDriver } = await import("@muonroi/agent-harness-core/mcp-server");
|
|
1296
|
+
const { opentuiSpawn } = await import("./mcp/opentui-spawn.js");
|
|
1297
|
+
await runHarnessDriver(opentuiSpawn);
|
|
1298
|
+
});
|
|
1299
|
+
program
|
|
1300
|
+
.command("share <user>")
|
|
1301
|
+
.description("Add a stakeholder to the current product's Discord channel")
|
|
1302
|
+
.option("--product <slug>", "Override product slug (default: most recent run)")
|
|
1303
|
+
.option("--display <name>", "Display name for the stakeholder")
|
|
1304
|
+
.action(async (user, opts) => {
|
|
1305
|
+
const token = process.env.MUONROI_DISCORD_TOKEN;
|
|
1306
|
+
const guildId = process.env.MUONROI_DISCORD_GUILD_ID;
|
|
1307
|
+
if (!token || !guildId) {
|
|
1308
|
+
console.error("muonroi share: MUONROI_DISCORD_TOKEN and MUONROI_DISCORD_GUILD_ID must both be set.");
|
|
1309
|
+
process.exit(1);
|
|
1310
|
+
}
|
|
1311
|
+
const { DiscordChatProvider } = await import("./chat/providers/discord/client.js");
|
|
1312
|
+
const { runShareCommand } = await import("./cli/share-cmd.js");
|
|
1313
|
+
const client = new DiscordChatProvider(token);
|
|
1314
|
+
const result = await runShareCommand({
|
|
1315
|
+
cwd: process.cwd(),
|
|
1316
|
+
user,
|
|
1317
|
+
product: opts.product,
|
|
1318
|
+
display: opts.display,
|
|
1319
|
+
client,
|
|
1320
|
+
});
|
|
1321
|
+
switch (result.kind) {
|
|
1322
|
+
case "granted":
|
|
1323
|
+
console.log(`Granted channel access to <@${result.userId}> in product ${result.slug}.`);
|
|
1324
|
+
break;
|
|
1325
|
+
case "acl-only":
|
|
1326
|
+
console.log(`Added <@${result.userId}> to product ${result.slug}. Channel will be granted access on creation.`);
|
|
1327
|
+
break;
|
|
1328
|
+
case "already-stakeholder":
|
|
1329
|
+
console.log(`User <@${result.userId}> is already a stakeholder of ${result.slug}.`);
|
|
1330
|
+
break;
|
|
1331
|
+
case "perm-error":
|
|
1332
|
+
console.error(`Failed to grant Discord permission (status=${result.status}). ACL was still updated; user can join when bot has permission.`);
|
|
1333
|
+
process.exit(1);
|
|
1334
|
+
break;
|
|
1335
|
+
case "error":
|
|
1336
|
+
console.error(`muonroi share: ${result.message}`);
|
|
1337
|
+
process.exit(1);
|
|
1338
|
+
break;
|
|
1339
|
+
}
|
|
1340
|
+
});
|
|
1341
|
+
program.parse();
|
|
1342
|
+
function formatContext(tokens) {
|
|
1343
|
+
if (tokens >= 1_000_000)
|
|
1344
|
+
return `${tokens / 1_000_000}M`;
|
|
1345
|
+
return `${tokens / 1_000}K`;
|
|
1346
|
+
}
|
|
1347
|
+
//# sourceMappingURL=index.js.map
|