muonroi-cli 1.7.2 → 1.8.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/dist/packages/agent-harness-core/src/event-filter.js +1 -0
- package/dist/packages/agent-harness-core/src/event-redact.js +8 -0
- package/dist/packages/agent-harness-core/src/mcp-server.d.ts +16 -0
- package/dist/packages/agent-harness-core/src/mcp-server.js +88 -10
- package/dist/packages/agent-harness-core/src/protocol.d.ts +15 -0
- package/dist/packages/agent-harness-core/src/selector.js +2 -2
- package/dist/packages/agent-harness-core/src/transports/sidechannel.js +1 -1
- package/dist/packages/agent-harness-opentui/src/agent-mode.js +1 -1
- package/dist/packages/agent-harness-opentui/src/install.js +1 -1
- package/dist/src/__test-stubs__/vitest-setup.js +4 -0
- package/dist/src/agent-harness/__tests__/mock-model.spec.js +54 -0
- package/dist/src/agent-harness/mock-model.d.ts +1 -1
- package/dist/src/agent-harness/mock-model.js +143 -6
- package/dist/src/agent-harness/test-spawn.js +3 -1
- package/dist/src/chat/chat-keychain.js +9 -1
- package/dist/src/cli/cost-forensics.js +7 -4
- package/dist/src/cli/keys.d.ts +2 -2
- package/dist/src/cli/keys.js +107 -28
- package/dist/src/cli/usage-report.js +2 -2
- package/dist/src/council/__tests__/abort-threading.test.d.ts +1 -0
- package/dist/src/council/__tests__/abort-threading.test.js +193 -0
- package/dist/src/council/__tests__/clarification-prompt.test.js +21 -1
- package/dist/src/council/__tests__/council-turn-length-emit.test.d.ts +1 -0
- package/dist/src/council/__tests__/council-turn-length-emit.test.js +130 -0
- package/dist/src/council/__tests__/debate-round-budget.test.d.ts +1 -0
- package/dist/src/council/__tests__/debate-round-budget.test.js +45 -0
- package/dist/src/council/__tests__/evaluator-metrics.test.js +3 -0
- package/dist/src/council/__tests__/post-debate-recommendation.test.d.ts +1 -0
- package/dist/src/council/__tests__/post-debate-recommendation.test.js +58 -0
- package/dist/src/council/__tests__/research-tools.test.js +4 -0
- package/dist/src/council/__tests__/round-tools.test.js +6 -0
- package/dist/src/council/clarifier-question-cap.test.d.ts +12 -0
- package/dist/src/council/clarifier-question-cap.test.js +73 -0
- package/dist/src/council/clarifier.d.ts +29 -1
- package/dist/src/council/clarifier.js +64 -1
- package/dist/src/council/debate-planner.d.ts +2 -1
- package/dist/src/council/debate-planner.js +5 -3
- package/dist/src/council/debate.d.ts +9 -0
- package/dist/src/council/debate.js +88 -8
- package/dist/src/council/index.d.ts +46 -1
- package/dist/src/council/index.js +125 -19
- package/dist/src/council/llm.js +41 -13
- package/dist/src/council/prompts.js +36 -1
- package/dist/src/council/types.d.ts +14 -1
- package/dist/src/ee/__tests__/export-transcripts.test.js +1 -1
- package/dist/src/ee/bridge.d.ts +3 -1
- package/dist/src/ee/bridge.js +9 -3
- package/dist/src/ee/bridge.test.js +1 -2
- package/dist/src/ee/client.js +15 -2
- package/dist/src/ee/recall-ledger.d.ts +20 -0
- package/dist/src/ee/recall-ledger.js +40 -1
- package/dist/src/ee/search.d.ts +25 -0
- package/dist/src/ee/search.js +73 -0
- package/dist/src/ee/types.d.ts +15 -1
- package/dist/src/ee/who-am-i.d.ts +41 -0
- package/dist/src/ee/who-am-i.js +143 -0
- package/dist/src/ee/who-am-i.test.d.ts +1 -0
- package/dist/src/ee/who-am-i.test.js +101 -0
- package/dist/src/flow/compaction/index.d.ts +1 -0
- package/dist/src/flow/compaction/index.js +4 -0
- package/dist/src/generated/version.d.ts +1 -1
- package/dist/src/generated/version.js +1 -1
- package/dist/src/headless/council-answers.js +1 -0
- package/dist/src/headless/output.d.ts +30 -1
- package/dist/src/headless/output.js +180 -0
- package/dist/src/headless/output.test.js +61 -1
- package/dist/src/hooks/index.js +48 -2
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +59 -62
- package/dist/src/lsp/client-normalize.test.d.ts +12 -0
- package/dist/src/lsp/client-normalize.test.js +34 -0
- package/dist/src/lsp/client.d.ts +1 -0
- package/dist/src/lsp/client.js +10 -2
- package/dist/src/lsp/manager.d.ts +1 -1
- package/dist/src/lsp/manager.js +13 -5
- package/dist/src/lsp/manager.test.js +41 -2
- package/dist/src/lsp/runtime.d.ts +1 -1
- package/dist/src/lsp/runtime.js +2 -2
- package/dist/src/maintain/__tests__/gh-create-pr.test.js +7 -3
- package/dist/src/maintain/__tests__/pr-builder.test.js +7 -3
- package/dist/src/mcp/__tests__/client-pool.spec.js +3 -3
- package/dist/src/mcp/__tests__/ee-tools.test.js +42 -14
- package/dist/src/mcp/__tests__/forensics-tools.test.js +3 -3
- package/dist/src/mcp/__tests__/lsp-tools.test.js +4 -4
- package/dist/src/mcp/auto-setup.js +0 -8
- package/dist/src/mcp/client-pool.d.ts +1 -1
- package/dist/src/mcp/client-pool.js +25 -9
- package/dist/src/mcp/ee-tools.d.ts +10 -0
- package/dist/src/mcp/ee-tools.js +34 -0
- package/dist/src/mcp/self-verify-jobs.d.ts +1 -0
- package/dist/src/mcp/self-verify-jobs.js +1 -3
- package/dist/src/mcp/self-verify-runner.js +1 -1
- package/dist/src/models/catalog-gemini.test.js +12 -10
- package/dist/src/models/catalog.json +106 -38
- package/dist/src/orchestrator/__tests__/auto-commit.test.d.ts +1 -0
- package/dist/src/orchestrator/__tests__/auto-commit.test.js +142 -0
- package/dist/src/orchestrator/__tests__/batch-turn-runner.test.js +3 -0
- package/dist/src/orchestrator/__tests__/delegations.test.d.ts +1 -0
- package/dist/src/orchestrator/__tests__/delegations.test.js +96 -0
- package/dist/src/orchestrator/__tests__/message-processor.test.js +2 -0
- package/dist/src/orchestrator/__tests__/prompts.test.d.ts +1 -0
- package/dist/src/orchestrator/__tests__/prompts.test.js +88 -0
- package/dist/src/orchestrator/__tests__/stream-runner.test.js +29 -0
- package/dist/src/orchestrator/__tests__/sub-session-delegation.test.d.ts +1 -0
- package/dist/src/orchestrator/__tests__/sub-session-delegation.test.js +507 -0
- package/dist/src/orchestrator/agent.test.js +5 -2
- package/dist/src/orchestrator/auto-commit.d.ts +110 -0
- package/dist/src/orchestrator/auto-commit.js +366 -0
- package/dist/src/orchestrator/batch-turn-runner.d.ts +3 -2
- package/dist/src/orchestrator/batch-turn-runner.js +2 -1
- package/dist/src/orchestrator/compaction-proposer-prompt.d.ts +8 -0
- package/dist/src/orchestrator/compaction-proposer-prompt.js +43 -0
- package/dist/src/orchestrator/compaction.d.ts +22 -0
- package/dist/src/orchestrator/compaction.js +42 -0
- package/dist/src/orchestrator/delegations.d.ts +1 -0
- package/dist/src/orchestrator/delegations.js +41 -0
- package/dist/src/orchestrator/error-utils.js +27 -2
- package/dist/src/orchestrator/message-processor.d.ts +23 -5
- package/dist/src/orchestrator/message-processor.js +226 -2573
- package/dist/src/orchestrator/orchestrator.d.ts +11 -2
- package/dist/src/orchestrator/orchestrator.js +530 -43
- package/dist/src/orchestrator/pending-calls.js +2 -1
- package/dist/src/orchestrator/preprocessor.d.ts +13 -0
- package/dist/src/orchestrator/preprocessor.js +146 -0
- package/dist/src/orchestrator/prompts.d.ts +16 -0
- package/dist/src/orchestrator/prompts.js +130 -67
- package/dist/src/orchestrator/safety-askcard.d.ts +66 -0
- package/dist/src/orchestrator/safety-askcard.js +74 -0
- package/dist/src/orchestrator/sandbox.test.js +8 -5
- package/dist/src/orchestrator/scope-ceiling.js +1 -1
- package/dist/src/orchestrator/stall-watchdog.d.ts +47 -0
- package/dist/src/orchestrator/stall-watchdog.js +23 -0
- package/dist/src/orchestrator/stall-watchdog.test.js +36 -1
- package/dist/src/orchestrator/stream-runner.js +52 -30
- package/dist/src/orchestrator/sub-agent-cap.d.ts +2 -0
- package/dist/src/orchestrator/sub-agent-cap.js +12 -4
- package/dist/src/orchestrator/sub-agent-model-tier.js +1 -1
- package/dist/src/orchestrator/subagent-compactor.d.ts +21 -0
- package/dist/src/orchestrator/subagent-compactor.js +148 -24
- package/dist/src/orchestrator/subagent-compactor.spec.js +249 -1
- package/dist/src/orchestrator/text-tool-call-detector.d.ts +9 -5
- package/dist/src/orchestrator/text-tool-call-detector.js +16 -12
- package/dist/src/orchestrator/text-tool-call-detector.test.js +66 -8
- package/dist/src/orchestrator/tool-args-repair.js +1 -1
- package/dist/src/orchestrator/tool-engine.d.ts +153 -0
- package/dist/src/orchestrator/tool-engine.js +3138 -0
- package/dist/src/orchestrator/turn-runner-deps.d.ts +3 -0
- package/dist/src/pil/__tests__/discovery-types.test.js +15 -4
- package/dist/src/pil/__tests__/discovery.test.js +89 -145
- package/dist/src/pil/__tests__/dual-run.test.js +2 -0
- package/dist/src/pil/__tests__/layer1-intent-trace.test.js +3 -0
- package/dist/src/pil/__tests__/layer1-intent.test.js +3 -0
- package/dist/src/pil/__tests__/layer16-clarity.test.js +35 -32
- package/dist/src/pil/__tests__/layer18-acceptance.test.js +1 -78
- package/dist/src/pil/__tests__/layer2_5-ponytail.test.d.ts +1 -0
- package/dist/src/pil/__tests__/layer2_5-ponytail.test.js +53 -0
- package/dist/src/pil/__tests__/layer3-ee-injection.test.js +67 -4
- package/dist/src/pil/__tests__/layer3-injected-chunk.test.js +14 -2
- package/dist/src/pil/__tests__/layer4-gsd.test.js +30 -0
- package/dist/src/pil/__tests__/layer5-context.test.js +39 -1
- package/dist/src/pil/__tests__/layer6-output.test.js +30 -2
- package/dist/src/pil/__tests__/llm-classify.test.js +79 -1
- package/dist/src/pil/__tests__/orchestrator-integration.test.js +3 -1
- package/dist/src/pil/__tests__/pipeline.test.js +11 -8
- package/dist/src/pil/__tests__/response-tools.test.js +52 -0
- package/dist/src/pil/agent-operating-contract.d.ts +1 -1
- package/dist/src/pil/agent-operating-contract.js +5 -3
- package/dist/src/pil/agent-operating-contract.test.js +2 -2
- package/dist/src/pil/cheap-model-playbook.d.ts +1 -1
- package/dist/src/pil/cheap-model-playbook.js +1 -1
- package/dist/src/pil/cheap-model-workbooks.d.ts +1 -1
- package/dist/src/pil/cheap-model-workbooks.js +1 -1
- package/dist/src/pil/config.d.ts +20 -0
- package/dist/src/pil/config.js +35 -0
- package/dist/src/pil/discovery-types.d.ts +32 -9
- package/dist/src/pil/discovery.d.ts +3 -3
- package/dist/src/pil/discovery.js +138 -244
- package/dist/src/pil/index.d.ts +1 -1
- package/dist/src/pil/index.js +1 -1
- package/dist/src/pil/layer1-intent.d.ts +9 -1
- package/dist/src/pil/layer1-intent.js +62 -7
- package/dist/src/pil/layer1-intent.test.js +112 -2
- package/dist/src/pil/layer15-context-scan.js +1 -1
- package/dist/src/pil/layer16-clarity.d.ts +21 -25
- package/dist/src/pil/layer16-clarity.js +52 -88
- package/dist/src/pil/layer18-acceptance.d.ts +13 -3
- package/dist/src/pil/layer18-acceptance.js +1 -75
- package/dist/src/pil/layer2-personality.js +7 -8
- package/dist/src/pil/layer2_5-ponytail.d.ts +2 -0
- package/dist/src/pil/layer2_5-ponytail.js +41 -0
- package/dist/src/pil/layer3-ee-injection.js +180 -14
- package/dist/src/pil/layer4-gsd.js +22 -8
- package/dist/src/pil/layer5-context.d.ts +1 -0
- package/dist/src/pil/layer5-context.js +26 -11
- package/dist/src/pil/layer6-output.js +23 -5
- package/dist/src/pil/llm-classify.d.ts +11 -0
- package/dist/src/pil/llm-classify.js +196 -3
- package/dist/src/pil/native-capabilities-workbook.d.ts +1 -1
- package/dist/src/pil/native-capabilities-workbook.js +4 -3
- package/dist/src/pil/pipeline.js +15 -1
- package/dist/src/pil/response-tools.d.ts +16 -0
- package/dist/src/pil/response-tools.js +41 -0
- package/dist/src/pil/schema.d.ts +8 -0
- package/dist/src/pil/schema.js +24 -3
- package/dist/src/pil/task-tier-map.js +7 -7
- package/dist/src/pil/types.d.ts +9 -3
- package/dist/src/product-loop/__tests__/discovery-interview.test.js +103 -1
- package/dist/src/product-loop/__tests__/gather-selectable-alts.test.js +34 -0
- package/dist/src/product-loop/__tests__/sprint-self-verify.test.js +12 -12
- package/dist/src/product-loop/discovery-interview.d.ts +20 -0
- package/dist/src/product-loop/discovery-interview.js +121 -7
- package/dist/src/product-loop/gather.js +19 -5
- package/dist/src/product-loop/loop-driver.js +2 -2
- package/dist/src/product-loop/sprint-self-verify.js +2 -2
- package/dist/src/providers/__tests__/reasoning-roundtrip.test.js +12 -0
- package/dist/src/providers/auth/__tests__/gemini-oauth.test.d.ts +1 -5
- package/dist/src/providers/auth/__tests__/gemini-oauth.test.js +1 -5
- package/dist/src/providers/auth/gcloud.d.ts +28 -0
- package/dist/src/providers/auth/gcloud.js +102 -0
- package/dist/src/providers/auth/gemini-oauth.d.ts +46 -19
- package/dist/src/providers/auth/gemini-oauth.js +292 -105
- package/dist/src/providers/auth/grok-oauth.d.ts +1 -1
- package/dist/src/providers/auth/grok-oauth.js +1 -1
- package/dist/src/providers/auth/registry.js +28 -6
- package/dist/src/providers/gemini.d.ts +1 -1
- package/dist/src/providers/gemini.js +10 -3
- package/dist/src/providers/keychain.d.ts +2 -2
- package/dist/src/providers/keychain.js +20 -2
- package/dist/src/providers/openai.js +5 -1
- package/dist/src/providers/runtime.d.ts +1 -1
- package/dist/src/providers/runtime.js +11 -2
- package/dist/src/providers/siliconflow-sse-repair.js +1 -1
- package/dist/src/providers/strategies/google.strategy.d.ts +9 -2
- package/dist/src/providers/strategies/google.strategy.js +159 -9
- package/dist/src/providers/strategies/thinking-mode.js +19 -6
- package/dist/src/providers/types.d.ts +1 -1
- package/dist/src/router/decide.test.js +40 -8
- package/dist/src/router/step-router.d.ts +20 -0
- package/dist/src/router/step-router.js +73 -0
- package/dist/src/self-qa/agentic-loop.js +30 -21
- package/dist/src/self-qa/orchestrator.js +5 -5
- package/dist/src/self-qa/scenario-planner.js +1 -1
- package/dist/src/self-qa/spec-emitter.js +4 -4
- package/dist/src/storage/__tests__/hierarchical-session.test.d.ts +1 -0
- package/dist/src/storage/__tests__/hierarchical-session.test.js +161 -0
- package/dist/src/storage/__tests__/sweep-stale-pending.test.js +2 -2
- package/dist/src/storage/index.d.ts +1 -1
- package/dist/src/storage/index.js +1 -1
- package/dist/src/storage/migrations.js +13 -1
- package/dist/src/storage/transcript-response-entry.test.js +18 -5
- package/dist/src/storage/transcript-view.js +7 -1
- package/dist/src/storage/transcript.d.ts +3 -0
- package/dist/src/storage/transcript.js +254 -73
- package/dist/src/storage/ui-interaction-log.d.ts +17 -0
- package/dist/src/storage/usage.js +22 -5
- package/dist/src/tools/__tests__/native-tools.test.js +6 -0
- package/dist/src/tools/bash.d.ts +36 -23
- package/dist/src/tools/bash.js +59 -301
- package/dist/src/tools/bash.test.js +2 -257
- package/dist/src/tools/file-tracker.d.ts +5 -0
- package/dist/src/tools/file-tracker.js +14 -0
- package/dist/src/tools/file.js +2 -0
- package/dist/src/tools/git-safety.d.ts +38 -1
- package/dist/src/tools/git-safety.js +94 -4
- package/dist/src/tools/git-safety.test.js +45 -1
- package/dist/src/tools/native-tools.d.ts +1 -1
- package/dist/src/tools/native-tools.js +66 -1
- package/dist/src/tools/registry-bash-empty-command.test.js +4 -3
- package/dist/src/tools/registry-git-safety.test.js +17 -6
- package/dist/src/tools/registry.d.ts +6 -0
- package/dist/src/tools/registry.js +215 -13
- package/dist/src/types/index.d.ts +8 -2
- package/dist/src/ui/app.d.ts +1 -0
- package/dist/src/ui/app.js +0 -0
- package/dist/src/ui/components/council-question-card.js +1 -0
- package/dist/src/ui/components/message-view.js +37 -3
- package/dist/src/ui/components/structured-response-view.js +7 -0
- package/dist/src/ui/components/task-list-panel.js +3 -12
- package/dist/src/ui/containers/chat-feed.d.ts +40 -0
- package/dist/src/ui/containers/chat-feed.js +66 -0
- package/dist/src/ui/containers/modals-layer.d.ts +87 -0
- package/dist/src/ui/containers/modals-layer.js +18 -0
- package/dist/src/ui/slash/__tests__/menu-parity.test.d.ts +1 -0
- package/dist/src/ui/slash/__tests__/menu-parity.test.js +1 -0
- package/dist/src/ui/slash/__tests__/ponytail.test.d.ts +1 -0
- package/dist/src/ui/slash/__tests__/ponytail.test.js +37 -0
- package/dist/src/ui/slash/expand.js +14 -1
- package/dist/src/ui/slash/export.js +16 -1
- package/dist/src/ui/slash/menu-items.js +1 -0
- package/dist/src/ui/slash/ponytail.d.ts +2 -0
- package/dist/src/ui/slash/ponytail.js +19 -0
- package/dist/src/ui/status-bar/store.js +0 -1
- package/dist/src/ui/status-bar/store.test.js +2 -2
- package/dist/src/ui/use-app-logic.d.ts +26 -0
- package/dist/src/ui/use-app-logic.js +0 -0
- package/dist/src/ui/utils/relaunch.js +1 -1
- package/dist/src/ui/utils/text.d.ts +11 -0
- package/dist/src/ui/utils/text.js +21 -1
- package/dist/src/ui/utils/text.test.js +25 -1
- package/dist/src/ui/utils/tools.js +3 -1
- package/dist/src/usage/cost-log.js +2 -2
- package/dist/src/usage/estimator.d.ts +14 -0
- package/dist/src/usage/estimator.js +22 -0
- package/dist/src/utils/__tests__/compaction-caps.test.d.ts +21 -0
- package/dist/src/utils/__tests__/compaction-caps.test.js +187 -0
- package/dist/src/utils/__tests__/llm-deadline-abort.test.d.ts +1 -0
- package/dist/src/utils/__tests__/llm-deadline-abort.test.js +33 -0
- package/dist/src/utils/__tests__/llm-deadline.test.js +16 -4
- package/dist/src/utils/__tests__/logger.test.d.ts +1 -0
- package/dist/src/utils/__tests__/logger.test.js +115 -0
- package/dist/src/utils/__tests__/settings-agent-first.test.d.ts +1 -0
- package/dist/src/utils/__tests__/settings-agent-first.test.js +48 -0
- package/dist/src/utils/install-manager.d.ts +1 -0
- package/dist/src/utils/install-manager.js +76 -7
- package/dist/src/utils/install-manager.test.js +43 -1
- package/dist/src/utils/llm-deadline.d.ts +9 -1
- package/dist/src/utils/llm-deadline.js +31 -2
- package/dist/src/utils/logger.d.ts +28 -0
- package/dist/src/utils/logger.js +171 -0
- package/dist/src/utils/permission-mode.d.ts +33 -0
- package/dist/src/utils/permission-mode.js +164 -3
- package/dist/src/utils/permission-mode.test.js +92 -1
- package/dist/src/utils/settings.d.ts +36 -32
- package/dist/src/utils/settings.js +151 -123
- package/dist/src/utils/update-checker.test.js +5 -1
- package/package.json +1 -1
package/dist/src/pil/config.d.ts
CHANGED
|
@@ -5,6 +5,16 @@
|
|
|
5
5
|
* Default OFF during rollout; flip to ON after dual-run validation.
|
|
6
6
|
*/
|
|
7
7
|
export declare function isUnifiedPilEnabled(): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* MUONROI_PIL_UNIFIED_BUDGET_MS: client-side timeout for the unified
|
|
10
|
+
* /api/pil-context call in Layer 1 Pass 3. The server's uncached path is
|
|
11
|
+
* classifier-bound (~1.5-3s; its own classifier timeout is 3500ms), so the
|
|
12
|
+
* legacy 1500ms budget aborted before the server could ever answer — the
|
|
13
|
+
* unified path then ALWAYS fell back to legacy, making MUONROI_PIL_UNIFIED=1 a
|
|
14
|
+
* no-op. Default 3500ms clears realistic uncached latency; cache hits return in
|
|
15
|
+
* ~1ms regardless. Clamped to [1000, 8000].
|
|
16
|
+
*/
|
|
17
|
+
export declare function getUnifiedPilBudgetMs(): number;
|
|
8
18
|
/**
|
|
9
19
|
* MUONROI_LLM_FIRST_CLASSIFY: model-first Layer-1 classification. When enabled
|
|
10
20
|
* (default), the configured model classifies taskType/intentKind/style at the
|
|
@@ -14,5 +24,15 @@ export declare function isUnifiedPilEnabled(): boolean;
|
|
|
14
24
|
* (the orchestrator does this on the main path); without it, the cascade runs.
|
|
15
25
|
*/
|
|
16
26
|
export declare function isLlmFirstClassifyEnabled(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* G3 (b1): on the model-first classify path, also fetch the unified pil-context
|
|
29
|
+
* brain so layer3 renders the rich source="unified" injection (server-attributed
|
|
30
|
+
* t0/t2 + t1_rules + the rateable ledger) instead of falling through to its
|
|
31
|
+
* legacy dense-only /api/search round-trip. Default ON; set "0" to revert to
|
|
32
|
+
* the legacy layer3 injection on the default path. Independent of
|
|
33
|
+
* MUONROI_PIL_UNIFIED (which gates the OFFLINE cascade's unified pass).
|
|
34
|
+
*/
|
|
35
|
+
export declare function isLlmFirstBrainEnabled(): boolean;
|
|
17
36
|
export declare function isDiscoveryEnabled(): boolean;
|
|
18
37
|
export declare function getMaxInterviewQuestions(): number;
|
|
38
|
+
export declare function isPonytailModeEnabled(): boolean;
|
package/dist/src/pil/config.js
CHANGED
|
@@ -11,6 +11,21 @@ export function isUnifiedPilEnabled() {
|
|
|
11
11
|
return true;
|
|
12
12
|
return false;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* MUONROI_PIL_UNIFIED_BUDGET_MS: client-side timeout for the unified
|
|
16
|
+
* /api/pil-context call in Layer 1 Pass 3. The server's uncached path is
|
|
17
|
+
* classifier-bound (~1.5-3s; its own classifier timeout is 3500ms), so the
|
|
18
|
+
* legacy 1500ms budget aborted before the server could ever answer — the
|
|
19
|
+
* unified path then ALWAYS fell back to legacy, making MUONROI_PIL_UNIFIED=1 a
|
|
20
|
+
* no-op. Default 3500ms clears realistic uncached latency; cache hits return in
|
|
21
|
+
* ~1ms regardless. Clamped to [1000, 8000].
|
|
22
|
+
*/
|
|
23
|
+
export function getUnifiedPilBudgetMs() {
|
|
24
|
+
const raw = Number(process.env.MUONROI_PIL_UNIFIED_BUDGET_MS);
|
|
25
|
+
if (!Number.isFinite(raw))
|
|
26
|
+
return 3500;
|
|
27
|
+
return Math.max(1000, Math.min(8000, Math.trunc(raw)));
|
|
28
|
+
}
|
|
14
29
|
/**
|
|
15
30
|
* MUONROI_LLM_FIRST_CLASSIFY: model-first Layer-1 classification. When enabled
|
|
16
31
|
* (default), the configured model classifies taskType/intentKind/style at the
|
|
@@ -22,6 +37,17 @@ export function isUnifiedPilEnabled() {
|
|
|
22
37
|
export function isLlmFirstClassifyEnabled() {
|
|
23
38
|
return process.env.MUONROI_LLM_FIRST_CLASSIFY !== "0";
|
|
24
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* G3 (b1): on the model-first classify path, also fetch the unified pil-context
|
|
42
|
+
* brain so layer3 renders the rich source="unified" injection (server-attributed
|
|
43
|
+
* t0/t2 + t1_rules + the rateable ledger) instead of falling through to its
|
|
44
|
+
* legacy dense-only /api/search round-trip. Default ON; set "0" to revert to
|
|
45
|
+
* the legacy layer3 injection on the default path. Independent of
|
|
46
|
+
* MUONROI_PIL_UNIFIED (which gates the OFFLINE cascade's unified pass).
|
|
47
|
+
*/
|
|
48
|
+
export function isLlmFirstBrainEnabled() {
|
|
49
|
+
return process.env.MUONROI_LLM_FIRST_BRAIN !== "0";
|
|
50
|
+
}
|
|
25
51
|
export function isDiscoveryEnabled() {
|
|
26
52
|
return process.env.MUONROI_PIL_DISCOVERY !== "0";
|
|
27
53
|
}
|
|
@@ -33,4 +59,13 @@ export function getMaxInterviewQuestions() {
|
|
|
33
59
|
const v = Number(process.env.MUONROI_PIL_MAX_QUESTIONS);
|
|
34
60
|
return Number.isFinite(v) && v >= 1 && v <= 5 ? v : 3;
|
|
35
61
|
}
|
|
62
|
+
export function isPonytailModeEnabled() {
|
|
63
|
+
if (process.env.MUONROI_PONYTAIL_DISABLE === "1")
|
|
64
|
+
return false;
|
|
65
|
+
if (process.env.MUONROI_PONYTAIL_DISABLE === "0")
|
|
66
|
+
return true;
|
|
67
|
+
if (process.env.VITEST === "true" || process.env.NODE_ENV === "test")
|
|
68
|
+
return false;
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
36
71
|
//# sourceMappingURL=config.js.map
|
|
@@ -23,13 +23,32 @@ export interface RelevantModule {
|
|
|
23
23
|
relevance: string;
|
|
24
24
|
exists: boolean;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
/**
|
|
27
|
+
* A card designed entirely by the model — the model controls the question,
|
|
28
|
+
* context, options (labels, kinds, which is cancel/adjust), and default.
|
|
29
|
+
* The CLI only assigns questionId and renders via CouncilQuestionData.
|
|
30
|
+
*/
|
|
31
|
+
export interface ModelCard {
|
|
32
|
+
/** The question text shown to the user */
|
|
33
|
+
question: string;
|
|
34
|
+
/** Optional context/explanation shown below the question */
|
|
35
|
+
context?: string;
|
|
36
|
+
/** User-selectable options. Model controls labels, kinds, cancel/adjust markers */
|
|
37
|
+
options: ModelCardOption[];
|
|
38
|
+
/** Which option is pre-selected (0 = first). Defaults to 0. */
|
|
39
|
+
defaultIndex?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface ModelCardOption {
|
|
42
|
+
/** Button label or freetext field label */
|
|
43
|
+
label: string;
|
|
44
|
+
/** Optional tooltip / description */
|
|
45
|
+
description?: string;
|
|
46
|
+
/** 'choice' = clickable button, 'freetext' = free-text input field */
|
|
47
|
+
kind: "choice" | "freetext";
|
|
48
|
+
/** If true, picking this option cancels the entire interaction */
|
|
49
|
+
isCancel?: boolean;
|
|
50
|
+
/** If true, picking this indicates the user wants to clarify further (triggers re-interview) */
|
|
51
|
+
isAdjust?: boolean;
|
|
33
52
|
}
|
|
34
53
|
export interface ClarifiedIntent {
|
|
35
54
|
intentStatement?: string;
|
|
@@ -59,7 +78,7 @@ export type ModelClarificationProposer = (input: {
|
|
|
59
78
|
domain?: string | null;
|
|
60
79
|
};
|
|
61
80
|
additionalContext?: string;
|
|
62
|
-
}) => Promise<
|
|
81
|
+
}) => Promise<ModelCard[]>;
|
|
63
82
|
export interface FeasibilityResult {
|
|
64
83
|
viable: boolean;
|
|
65
84
|
warnings: string[];
|
|
@@ -81,6 +100,11 @@ export interface DiscoveryResult {
|
|
|
81
100
|
domain: string | null;
|
|
82
101
|
outputStyle: OutputStyle | null;
|
|
83
102
|
discoveryMs: number;
|
|
103
|
+
/** Raw Q&A pairs from the interview, visible to the model in enrichment */
|
|
104
|
+
interviewTranscript: Array<{
|
|
105
|
+
question: string;
|
|
106
|
+
answer: string;
|
|
107
|
+
}>;
|
|
84
108
|
}
|
|
85
109
|
export interface AcceptanceCardData {
|
|
86
110
|
intentStatement: string;
|
|
@@ -90,5 +114,4 @@ export interface AcceptanceCardData {
|
|
|
90
114
|
}
|
|
91
115
|
export interface DiscoveryInteractionHandler {
|
|
92
116
|
askQuestion(question: CouncilQuestionData): Promise<CouncilQuestionAnswer>;
|
|
93
|
-
showAcceptance(card: AcceptanceCardData): Promise<"accept" | "adjust" | "cancel">;
|
|
94
117
|
}
|
|
@@ -11,8 +11,8 @@ export interface L1Result {
|
|
|
11
11
|
export declare function runDiscovery(raw: string, l1: L1Result, cwd: string, handler: DiscoveryInteractionHandler | null, sessionId?: string | null, clarificationProposer?: ModelClarificationProposer | null, recentTurnsSummary?: string | null): Promise<DiscoveryResult>;
|
|
12
12
|
/**
|
|
13
13
|
* Create a ModelClarificationProposer backed by the actual task model.
|
|
14
|
-
* The model receives the user raw + CLI enrichment
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* The model receives the user raw + CLI enrichment and outputs the
|
|
15
|
+
* exact ModelCard[] it wants shown — full control over questions, options,
|
|
16
|
+
* option kinds, and cancel/adjust markers.
|
|
17
17
|
*/
|
|
18
18
|
export declare function createModelClarificationProposer(providerFactory: any, modelId: string): ModelClarificationProposer;
|