mixdog 1.1.0 → 1.1.2

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.
Files changed (174) hide show
  1. package/README.md +13 -6
  2. package/package.json +1 -2
  3. package/scripts/latest-guard.mjs +63 -0
  4. package/scripts/lib/run-node-tests.mjs +103 -27
  5. package/scripts/lib/test-failure-summary.mjs +7 -2
  6. package/scripts/merge-mac-update-feed.mjs +107 -0
  7. package/scripts/mobile-release.mjs +210 -0
  8. package/scripts/post-release-check.mjs +353 -0
  9. package/scripts/publish-asset-release.mjs +43 -0
  10. package/scripts/release-guard.mjs +63 -0
  11. package/scripts/release-paths.mjs +39 -2
  12. package/scripts/test.mjs +29 -7
  13. package/src/defaults/shipped-history.json +2 -0
  14. package/src/defaults/skills/computer-use/SKILL.md +1 -1
  15. package/src/defaults/skills/setup/references/actions.md +1 -0
  16. package/src/headless-role.mjs +2 -2
  17. package/src/lib/keychain-cjs.cjs +582 -17
  18. package/src/lib/rules-builder.cjs +0 -23
  19. package/src/rules/lead/LEAD.md +2 -2
  20. package/src/runtime/agent/orchestrator/config-storage.mjs +32 -4
  21. package/src/runtime/agent/orchestrator/config.mjs +18 -0
  22. package/src/runtime/agent/orchestrator/context/instruction-files.mjs +130 -0
  23. package/src/runtime/agent/orchestrator/context/role-instructions.mjs +4 -0
  24. package/src/runtime/agent/orchestrator/providers/lib/oauth-token-utils.mjs +11 -0
  25. package/src/runtime/agent/orchestrator/providers/lib/open-login-url.mjs +9 -0
  26. package/src/runtime/agent/orchestrator/providers/mimo-oauth-login.mjs +254 -0
  27. package/src/runtime/agent/orchestrator/providers/mimo-oauth-profile.mjs +218 -0
  28. package/src/runtime/agent/orchestrator/providers/mimo-oauth-tokens.mjs +239 -0
  29. package/src/runtime/agent/orchestrator/providers/mimo-oauth.mjs +233 -0
  30. package/src/runtime/agent/orchestrator/providers/muse-code-oauth-login.mjs +247 -0
  31. package/src/runtime/agent/orchestrator/providers/muse-code-oauth-tokens.mjs +225 -0
  32. package/src/runtime/agent/orchestrator/providers/muse-code-oauth.mjs +542 -0
  33. package/src/runtime/agent/orchestrator/providers/oauth-credential-probes.mjs +25 -0
  34. package/src/runtime/agent/orchestrator/providers/oauth-usage.mjs +4 -1
  35. package/src/runtime/agent/orchestrator/providers/openai-codex-model.mjs +13 -0
  36. package/src/runtime/agent/orchestrator/providers/openai-compat-responses.mjs +14 -6
  37. package/src/runtime/agent/orchestrator/providers/openai-oauth-catalog-store.mjs +99 -0
  38. package/src/runtime/agent/orchestrator/providers/openai-oauth-catalog.mjs +4 -8
  39. package/src/runtime/agent/orchestrator/providers/openai-oauth-login.mjs +2 -7
  40. package/src/runtime/agent/orchestrator/providers/openai-responses-payload.mjs +8 -0
  41. package/src/runtime/agent/orchestrator/providers/registry.mjs +4 -0
  42. package/src/runtime/agent/orchestrator/runtime-core/effort.mjs +2 -0
  43. package/src/runtime/agent/orchestrator/runtime-core/goal-tool-defs.mjs +15 -1
  44. package/src/runtime/agent/orchestrator/runtime-core/tool-defs.mjs +1 -5
  45. package/src/runtime/agent/orchestrator/session/context-utils.mjs +12 -14
  46. package/src/runtime/agent/orchestrator/session/loop/send-phase.mjs +11 -1
  47. package/src/runtime/agent/orchestrator/session/loop/tool-call-ids.mjs +90 -0
  48. package/src/runtime/agent/orchestrator/session/loop/tool-exec/before-hook.mjs +19 -11
  49. package/src/runtime/agent/orchestrator/session/loop/tool-phase.mjs +1 -0
  50. package/src/runtime/agent/orchestrator/session/manager/runtime-liveness.mjs +28 -0
  51. package/src/runtime/agent/orchestrator/session/manager/session-prompt-composition.mjs +8 -0
  52. package/src/runtime/agent/orchestrator/session/manager/session-record.mjs +3 -0
  53. package/src/runtime/agent/orchestrator/session/manager.mjs +1 -5
  54. package/src/runtime/agent/orchestrator/session/read-dedup.mjs +0 -1
  55. package/src/runtime/agent/orchestrator/session/store-agent-worker-rows.mjs +3 -0
  56. package/src/runtime/agent/orchestrator/session/tool-batch/finalize.mjs +2 -0
  57. package/src/runtime/agent/orchestrator/session/transcript-restore/restore.mjs +2 -0
  58. package/src/runtime/agent/orchestrator/session/transcript-restore/tool-result-status.mjs +23 -0
  59. package/src/runtime/agent/orchestrator/session/turn-effort.mjs +18 -0
  60. package/src/runtime/agent/orchestrator/tools/builtin/arg-guard.mjs +11 -8
  61. package/src/runtime/agent/orchestrator/tools/builtin/atomic-write.mjs +9 -4
  62. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/bashism-rewrite.mjs +245 -0
  63. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/command-preflight.mjs +13 -1
  64. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/completed-result.mjs +3 -1
  65. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/invocation-plan.mjs +2 -2
  66. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/result-format.mjs +49 -0
  67. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool.mjs +3 -3
  68. package/src/runtime/agent/orchestrator/tools/builtin/builtin-tools.mjs +9 -7
  69. package/src/runtime/agent/orchestrator/tools/builtin/external-tool-adapters.mjs +61 -8
  70. package/src/runtime/agent/orchestrator/tools/builtin/git-command-tool.mjs +28 -3
  71. package/src/runtime/agent/orchestrator/tools/builtin/path-utils.mjs +73 -1
  72. package/src/runtime/agent/orchestrator/tools/builtin/read-single-guards.mjs +2 -2
  73. package/src/runtime/agent/orchestrator/tools/builtin/read-tool.mjs +3 -1
  74. package/src/runtime/agent/orchestrator/tools/builtin/search-grep-tool.mjs +17 -6
  75. package/src/runtime/agent/orchestrator/tools/builtin/search-path-diagnostics.mjs +23 -5
  76. package/src/runtime/agent/orchestrator/tools/builtin/shell-jobs.mjs +93 -43
  77. package/src/runtime/agent/orchestrator/tools/builtin/task-tool.mjs +32 -6
  78. package/src/runtime/agent/orchestrator/tools/builtin.mjs +9 -2
  79. package/src/runtime/agent/orchestrator/tools/code-graph/dispatch.mjs +3 -1
  80. package/src/runtime/agent/orchestrator/tools/lib/shell-run-background/promote-job.mjs +12 -15
  81. package/src/runtime/agent/orchestrator/tools/lib/shell-run-background.mjs +2 -2
  82. package/src/runtime/agent/orchestrator/tools/lib/shell-run-state.mjs +4 -2
  83. package/src/runtime/agent/orchestrator/tools/shell-command.mjs +124 -91
  84. package/src/runtime/agent/orchestrator/tools/shell-exec-policy.mjs +19 -4
  85. package/src/runtime/channels/index.mjs +1 -5
  86. package/src/runtime/channels/lib/runtime-paths.mjs +8 -23
  87. package/src/runtime/channels/lib/tool-dispatch.mjs +1 -13
  88. package/src/runtime/channels/lib/worker-ipc.mjs +2 -2
  89. package/src/runtime/channels/lib/worker-main.mjs +4 -34
  90. package/src/runtime/computer-bridge/client.mjs +25 -1
  91. package/src/runtime/computer-bridge/linux-action-capabilities.mjs +84 -0
  92. package/src/runtime/computer-bridge/linux-readiness.d.mts +52 -0
  93. package/src/runtime/computer-bridge/linux-readiness.mjs +411 -0
  94. package/src/runtime/computer-bridge/test-linux-display.mjs +5 -0
  95. package/src/runtime/effort-judge/compact-tokenizer.mjs +13 -8
  96. package/src/runtime/effort-judge/judge-input.mjs +5 -2
  97. package/src/runtime/effort-judge/model-install.mjs +9 -3
  98. package/src/runtime/effort-judge/model-manifest.json +7 -7
  99. package/src/runtime/memory/lib/embedding-worker.mjs +9 -3
  100. package/src/runtime/memory/lib/pg/supervisor.mjs +3 -0
  101. package/src/runtime/shared/config.mjs +50 -2
  102. package/src/runtime/shared/developer-options.mjs +7 -0
  103. package/src/runtime/shared/instruction-files-mode.mjs +9 -0
  104. package/src/runtime/shared/llm/model-catalog.mjs +2 -1
  105. package/src/runtime/shared/llm/openai-daybreak.mjs +79 -0
  106. package/src/runtime/shared/pristine-execution-contract.json +9 -0
  107. package/src/runtime/shared/pristine-execution.mjs +1 -1
  108. package/src/runtime/shared/provider-accounts.mjs +2 -0
  109. package/src/runtime/shared/resource-admission.mjs +10 -3
  110. package/src/runtime/shared/schedule-model-ref.mjs +11 -0
  111. package/src/runtime/shared/semver.d.mts +1 -0
  112. package/src/runtime/shared/semver.mjs +57 -0
  113. package/src/runtime/shared/session-approval-wait.mjs +35 -0
  114. package/src/runtime/shared/shell-display.mjs +4 -2
  115. package/src/runtime/shared/tool-surface.mjs +2 -2
  116. package/src/runtime/shared/turn-worktree-snapshot.mjs +11 -10
  117. package/src/runtime/shared/update-checker.mjs +2 -31
  118. package/src/session-runtime/boot/apis.mjs +5 -0
  119. package/src/session-runtime/boot/begin.mjs +0 -2
  120. package/src/session-runtime/boot/tools.mjs +5 -4
  121. package/src/session-runtime/model-recency.mjs +3 -0
  122. package/src/session-runtime/provider-auth/login.mjs +10 -10
  123. package/src/session-runtime/provider-auth/setup.mjs +22 -2
  124. package/src/session-runtime/provider-models/row-hydration.mjs +12 -4
  125. package/src/session-runtime/provider-readiness.mjs +4 -0
  126. package/src/session-runtime/resource-mcp-api.mjs +7 -3
  127. package/src/session-runtime/runtime-bootstrap.mjs +0 -4
  128. package/src/session-runtime/runtime-facade.mjs +5 -0
  129. package/src/session-runtime/runtime-paths.mjs +0 -1
  130. package/src/session-runtime/schedule-session-run.mjs +3 -1
  131. package/src/session-runtime/services/agent-tool/index-write-queue.mjs +55 -14
  132. package/src/session-runtime/services/agent-tool/job-views/agent-list.mjs +15 -3
  133. package/src/session-runtime/services/agent-tool/job-views/session-progress.mjs +2 -0
  134. package/src/session-runtime/services/agent-tool/worker-index/approval-wait.mjs +97 -0
  135. package/src/session-runtime/services/agent-tool/worker-index/mutation-batch.mjs +4 -2
  136. package/src/session-runtime/services/agent-tool/worker-index/row-liveness.mjs +8 -2
  137. package/src/session-runtime/services/agent-tool/worker-index/row-shape.mjs +3 -0
  138. package/src/session-runtime/services/agent-tool/worker-index/row-store.mjs +58 -2
  139. package/src/session-runtime/services/agent-tool/worker-index.mjs +69 -15
  140. package/src/session-runtime/services/agent-tool/worker-rows.mjs +2 -0
  141. package/src/session-runtime/services/channel-admin.mjs +4 -2
  142. package/src/session-runtime/services/channel-worker.mjs +1 -1
  143. package/src/session-runtime/services/provider-admin.mjs +80 -17
  144. package/src/session-runtime/services/seeds.mjs +7 -10
  145. package/src/session-runtime/services/usage-dashboard-model.mjs +6 -0
  146. package/src/session-runtime/settings-builtin-tools-api.mjs +15 -0
  147. package/src/session-runtime/settings-profile-api.mjs +27 -2
  148. package/src/session-runtime/setup-tool/executor.mjs +5 -0
  149. package/src/session-runtime/setup-tool/tool-defs.mjs +8 -0
  150. package/src/session-runtime/starter-guide-state.mjs +62 -0
  151. package/src/session-runtime/tool-policy-refresh.mjs +3 -0
  152. package/src/session-runtime/webhook-session-run.mjs +3 -1
  153. package/src/session-runtime/workflow-agents-api/onboarding.mjs +3 -2
  154. package/src/standalone/channel-binding.mjs +1 -2
  155. package/src/standalone/channel-transport/call-dispatch.mjs +4 -10
  156. package/src/standalone/daemon-channels-loader.mjs +2 -3
  157. package/src/standalone/local-session-runtime.mjs +2 -78
  158. package/src/standalone/session-protocol.mjs +2 -0
  159. package/src/tui/app/model-options.mjs +13 -1
  160. package/src/tui/app/model-picker/route-selection/fast-parameters.mjs +10 -4
  161. package/src/tui/app/provider-setup/oauth-actions.mjs +5 -0
  162. package/src/tui/dist/index.mjs +84 -34
  163. package/src/tui/session/context-state.mjs +2 -0
  164. package/src/tui/session/live-share/owner.mjs +17 -0
  165. package/src/tui/session/oauth-flows.mjs +2 -0
  166. package/src/tui/session/session-api/extensions.mjs +12 -8
  167. package/src/tui/session/session-api/integrations.mjs +9 -8
  168. package/src/tui/session/session-api/routes.mjs +2 -2
  169. package/src/tui/session/session-api/settings.mjs +1 -0
  170. package/src/tui/session/session-api/shared.mjs +10 -6
  171. package/src/tui/session/tool-card-results/grouped-result.mjs +11 -2
  172. package/src/tui/session/transcript-spill/spill-dir.mjs +22 -6
  173. package/src/tui/spinner-meta.mjs +26 -10
  174. package/src/runtime/channels/tool-defs.mjs +0 -17
@@ -0,0 +1,62 @@
1
+ // The desktop "Getting started" guide state, kept in the config beside the
2
+ // onboarding flags (`onboarding.starterGuide`) so it outlives the renderer's
3
+ // localStorage. The desktop IPC gate (ipc-validation.ts) mirrors the schema.
4
+ export const STARTER_GUIDE_STEPS = Object.freeze(['provider', 'project', 'workflow', 'extensions', 'remote']);
5
+ const STARTER_GUIDE_KEYS = new Set(['closed', 'welcomed', 'visited']);
6
+
7
+ const plainObject = (value) => Boolean(value) && typeof value === 'object' && !Array.isArray(value);
8
+
9
+ /** The guide state of a user who has not answered it yet. */
10
+ export function freshStarterGuide() {
11
+ return { closed: false, welcomed: false, visited: [] };
12
+ }
13
+
14
+ /** The stored copy, read tolerantly; null when there is none. */
15
+ export function storedStarterGuide(value) {
16
+ if (!plainObject(value)) return null;
17
+ const visited = Array.isArray(value.visited) ? value.visited : [];
18
+ return {
19
+ closed: value.closed === true,
20
+ welcomed: value.welcomed === true,
21
+ visited: STARTER_GUIDE_STEPS.filter((step) => visited.includes(step)),
22
+ };
23
+ }
24
+
25
+ /** A save request, read strictly: anything off-schema is rejected, never coerced. */
26
+ export function requiredStarterGuideState(value) {
27
+ if (!plainObject(value)) throw new TypeError('starter guide state must be an object.');
28
+ for (const key of Object.keys(value)) {
29
+ if (!STARTER_GUIDE_KEYS.has(key)) throw new TypeError(`starter guide state has an unknown field: ${key}.`);
30
+ }
31
+ if (typeof value.closed !== 'boolean' || typeof value.welcomed !== 'boolean') {
32
+ throw new TypeError('starter guide closed and welcomed must be booleans.');
33
+ }
34
+ if (
35
+ !Array.isArray(value.visited) ||
36
+ value.visited.length > STARTER_GUIDE_STEPS.length * 2 ||
37
+ value.visited.some((step) => !STARTER_GUIDE_STEPS.includes(step))
38
+ ) {
39
+ throw new TypeError('starter guide visited must list known steps.');
40
+ }
41
+ return storedStarterGuide(value);
42
+ }
43
+
44
+ /** Every field only moves forward: a stale save can add, never undo. */
45
+ export function mergeStarterGuide(stored, next) {
46
+ const base = stored || freshStarterGuide();
47
+ return {
48
+ closed: base.closed || next.closed,
49
+ welcomed: base.welcomed || next.welcomed,
50
+ visited: STARTER_GUIDE_STEPS.filter((step) => base.visited.includes(step) || next.visited.includes(step)),
51
+ };
52
+ }
53
+
54
+ /**
55
+ * The onboarding section after a completion: a first completion starts the
56
+ * guide fresh, so an absent copy afterwards means a profile onboarded before
57
+ * the guide was persisted here.
58
+ */
59
+ export function withStarterGuideOnCompletion(previous, onboarding) {
60
+ if (previous?.completed === true || storedStarterGuide(previous?.starterGuide)) return onboarding;
61
+ return { ...onboarding, starterGuide: freshStarterGuide() };
62
+ }
@@ -72,6 +72,7 @@ export function createToolPolicyRefresh({
72
72
  modelStandaloneTools,
73
73
  featureDisallowedTools,
74
74
  loadCoreMemoryContext,
75
+ loadInstructionFilesContext,
75
76
  activeWorkflowContext,
76
77
  invalidatePreSessionToolSurface,
77
78
  }) {
@@ -139,6 +140,8 @@ export function createToolPolicyRefresh({
139
140
  skipRoleCatalog: true,
140
141
  workflowContext,
141
142
  coreMemoryContext,
143
+ // The rebuilt core keeps (or newly applies) the instruction-files setting.
144
+ instructionFilesContext: loadInstructionFilesContext?.(session) || null,
142
145
  // BP3 rebuild must keep the trailing language block, or a workflow
143
146
  // switch would silently drop the response-language directive.
144
147
  languageContext: _buildLeadLanguageContext(),
@@ -9,6 +9,7 @@ import { loadConfig } from '../runtime/agent/orchestrator/config.mjs';
9
9
  import { createSession } from '../runtime/agent/orchestrator/session/manager/session-lifecycle.mjs';
10
10
  import { askSession } from '../runtime/agent/orchestrator/session/manager/ask-session.mjs';
11
11
  import { modelRouteFields, parseScheduleModelRef } from '../runtime/shared/schedule-model-ref.mjs';
12
+ import { migrateCodexRoute } from '../runtime/agent/orchestrator/providers/openai-oauth-catalog-store.mjs';
12
13
  import { automationWorkflowOpts } from './automation-workflow.mjs';
13
14
  import { runAutomationTurns } from './automation-agents.mjs';
14
15
  import { automationPromptContent } from '../runtime/shared/automation-attachments.mjs';
@@ -17,7 +18,8 @@ import { automationPromptContent } from '../runtime/shared/automation-attachment
17
18
  function webhookRoute(modelRef) {
18
19
  if (modelRef) {
19
20
  const ref = parseScheduleModelRef(modelRef);
20
- if (ref && typeof ref === 'object') return ref;
21
+ // A model the provider catalog superseded runs on its successor.
22
+ if (ref && typeof ref === 'object') return migrateCodexRoute(ref);
21
23
  }
22
24
  const cfg = loadConfig({ secrets: false });
23
25
  const maintenance = cfg?.maintenance?.webhook;
@@ -12,6 +12,7 @@ import {
12
12
  } from '../../runtime/agent/orchestrator/runtime-core/workflow.mjs';
13
13
  import { ONBOARDING_VERSION } from '../quick-web-search-models.mjs';
14
14
  import { canonicalizeAgentRouteStorage } from '../../runtime/shared/agent-route-config.mjs';
15
+ import { withStarterGuideOnCompletion } from '../starter-guide-state.mjs';
15
16
  import { resolveDataDir } from './shared.mjs';
16
17
 
17
18
  // Onboarding slot picks: lead → default preset, agent → worker route,
@@ -91,12 +92,12 @@ export function createOnboardingApi(deps) {
91
92
  ]);
92
93
  nextConfig.agents = applyAgentRouteInput(agentInput, draft.agentRoutes, configurableIds);
93
94
  }
94
- nextConfig.onboarding = {
95
+ nextConfig.onboarding = withStarterGuideOnCompletion(config.onboarding, {
95
96
  ...(nextConfig.onboarding || {}),
96
97
  completed: true,
97
98
  version: ONBOARDING_VERSION,
98
99
  completedAt: new Date().toISOString(),
99
- };
100
+ });
100
101
  if (payload.webSearchRoute) {
101
102
  const webSearchToSave = webSearchRouteToSave(payload.webSearchRoute);
102
103
  if (webSearchToSave) nextConfig.webSearchRoute = webSearchToSave;
@@ -2,8 +2,7 @@ import { readFileSync, rmSync } from 'node:fs';
2
2
  import { basename } from 'node:path';
3
3
 
4
4
  export const ACTIVATE_TOOL = 'activate_channel_bridge';
5
- export const REBIND_TOOL = 'rebind_current_transcript';
6
- export const BINDING_TOOLS = new Set([ACTIVATE_TOOL, REBIND_TOOL]);
5
+ export const BINDING_TOOLS = new Set([ACTIVATE_TOOL]);
7
6
 
8
7
  export function remoteSessionIdFromBinding(name, args) {
9
8
  if (!BINDING_TOOLS.has(name) || !args || typeof args !== 'object') return null;
@@ -2,7 +2,7 @@
2
2
  * call-dispatch.mjs — one /call of the channel transport: the fair lanes
3
3
  * (ordinary vs. control/binding), the callId idempotency cache, and the
4
4
  * binding-aware run that moves the UI control pointer / durable pin around a
5
- * manual Remote ON/OFF or transcript rebind and rolls it back on failure.
5
+ * manual Remote ON/OFF and rolls it back on failure.
6
6
  *
7
7
  * Shared transport state read/written here: clients, pointerToken,
8
8
  * remoteAcquired, stickyRemoteFrame, pinnedSessionId, closed.
@@ -11,7 +11,7 @@ import { createFairCallScheduler } from '../fair-call-scheduler.mjs';
11
11
  import { callSignature, callIdConflict, clientCallOwner } from '../rpc-call-identity.mjs';
12
12
  import { isPidAlive } from '../../runtime/shared/pid-liveness.mjs';
13
13
  import { positiveInt } from '../../runtime/shared/numbers.mjs';
14
- import { ACTIVATE_TOOL, REBIND_TOOL, BINDING_TOOLS, remoteSessionIdFromBinding } from '../channel-binding.mjs';
14
+ import { ACTIVATE_TOOL, BINDING_TOOLS, remoteSessionIdFromBinding } from '../channel-binding.mjs';
15
15
 
16
16
  const CALL_CACHE_TTL_MS = 60_000;
17
17
 
@@ -52,10 +52,10 @@ export function createCallDispatch({
52
52
  const activationCall = name === ACTIVATE_TOOL;
53
53
  const activating = activationCall && args.active === true;
54
54
  const deactivating = activationCall && args.active === false;
55
- const rebindCall = name === REBIND_TOOL;
56
55
  const bindingSessionId = remoteSessionIdFromBinding(name, args);
57
56
  // Auto/implicit activation is retired. A valid manual ON always carries
58
- // its target session and explicitly overrides the old one.
57
+ // its target session and explicitly overrides the old one. Legacy automatic
58
+ // requests remain non-authoritative even when they include a session id.
59
59
  if (activating && (args.claimIfVacant === true || !bindingSessionId)) {
60
60
  return {
61
61
  content: [{ type: 'text', text: 'channel bridge claim skipped: manual ON required' }],
@@ -71,12 +71,6 @@ export function createCallDispatch({
71
71
  releaseSkipped: true,
72
72
  };
73
73
  }
74
- if (rebindCall && !pinnedSessionMatch) {
75
- return {
76
- content: [{ type: 'text', text: 'transcript rebind skipped: session is not pinned' }],
77
- rebindSkipped: true,
78
- };
79
- }
80
74
 
81
75
  const previousPointerToken = state.pointerToken;
82
76
  const previousRemoteSessionId = c.remoteSessionId || null;
@@ -46,14 +46,13 @@ export function createChannelsRuntimeLoader({ log, onLoaded = () => {}, setOwner
46
46
 
47
47
  async function handleCall(name, args, ctx) {
48
48
  const module = await ensure();
49
- // Accepted owner controls refresh active-instance context. The transport
50
- // admits rebind only for the current manual owner.
49
+ // Accepted owner controls refresh active-instance context.
51
50
  if (ctx && BINDING_TOOLS.has(name)) {
52
51
  try {
53
52
  setOwnerContext({ leadPid: ctx.leadPid, cwd: ctx.cwd });
54
53
  } catch {}
55
54
  }
56
- return module.handleToolCallWithBridgeRetry(name, args || {});
55
+ return module.handleToolCall(name, args || {});
57
56
  }
58
57
 
59
58
  return { ensure, start, handleCall };
@@ -37,90 +37,14 @@ import { tuiDebug, nextId, createTranscriptSpillBuffer } from '../tui/session/tr
37
37
 
38
38
  const SESSION_RUNTIME_MODULE = '../mixdog-session-runtime.mjs';
39
39
 
40
- // The runtime graph is imported lazily, but that import (measured ~250ms) used
41
- // to land inside the FIRST session runtime creation, which desktop performs while it
42
- // holds its transition lock — so the user's first navigation paid for it. Hosts
43
- // can start it during their own idle startup instead; the promise is shared, so
44
- // the create path either awaits an in-flight preload or does the import itself.
40
+ // Shared across create calls so concurrent session startups import the
41
+ // runtime graph once.
45
42
  let sessionRuntimeModulePromise = null;
46
43
  function importSessionRuntimeModule() {
47
44
  sessionRuntimeModulePromise ??= import(SESSION_RUNTIME_MODULE);
48
45
  return sessionRuntimeModulePromise;
49
46
  }
50
47
 
51
- export function preloadSessionRuntimeModule() {
52
- return importSessionRuntimeModule().catch(() => {
53
- // A real load failure surfaces on the authoritative create path.
54
- sessionRuntimeModulePromise = null;
55
- });
56
- }
57
-
58
- let agentLoopPrewarmPromise = null;
59
- export function preloadAgentLoopRuntime() {
60
- agentLoopPrewarmPromise ??= import('../runtime/agent/orchestrator/session/manager/runtime-loaders.mjs').then(
61
- (module) => module.prewarmAgentLoop()
62
- );
63
- void agentLoopPrewarmPromise.catch(() => {
64
- // Reservation-time prewarm retries through the same shared loader.
65
- agentLoopPrewarmPromise = null;
66
- });
67
- return agentLoopPrewarmPromise;
68
- }
69
-
70
- // Memory-runtime attach (PG proxy + embed warmup) measured ~6.5s cold and is
71
- // the largest first-turn blocker: loadCoreMemoryContext races it with a 2s
72
- // cap, but a cold attach stalls the event loop hard enough that even that
73
- // timer fires seconds late (probe: core-memory settle at ~6.0s). Warm the
74
- // EXACT shared proxy instance the session create path resolves —
75
- // getStandaloneMemoryRuntime caches by entry+dataDir, so the first turn finds
76
- // it initialized. Honors the same MIXDOG_BOOT_CORE_MEMORY opt-out.
77
- let memoryRuntimePrewarmPromise = null;
78
- export function preloadMemoryRuntime() {
79
- const bootFlag = String(process.env.MIXDOG_BOOT_CORE_MEMORY ?? '')
80
- .trim()
81
- .toLowerCase();
82
- if (bootFlag === '0' || bootFlag === 'false' || bootFlag === 'no' || bootFlag === 'off') {
83
- return Promise.resolve();
84
- }
85
- memoryRuntimePrewarmPromise ??= (async () => {
86
- const [{ getStandaloneMemoryRuntime }, { getPluginData }, { fileURLToPath }] = await Promise.all([
87
- import('../session-runtime/services/memory-runtime-proxy.mjs'),
88
- import('../runtime/agent/orchestrator/config.mjs'),
89
- import('node:url'),
90
- ]);
91
- const runtime = getStandaloneMemoryRuntime({
92
- entry: fileURLToPath(new URL('../runtime/memory/index.mjs', import.meta.url)),
93
- dataDir: process.env.MIXDOG_DATA_DIR || getPluginData?.() || undefined,
94
- });
95
- await runtime.init();
96
- })();
97
- void memoryRuntimePrewarmPromise.catch(() => {
98
- // Opportunistic: loadCoreMemoryContext retries through the same proxy.
99
- memoryRuntimePrewarmPromise = null;
100
- });
101
- return memoryRuntimePrewarmPromise;
102
- }
103
-
104
- // Windows keychain reads go through a DPAPI PowerShell host whose cold start
105
- // dominates a packaged boot (measured ~1.5s). The runtime batches every secret
106
- // into one call, but it only starts that batch when the runtime is created —
107
- // late enough that the first context switch waits on it. Hosts can start the
108
- // same batch while their window is still coming up.
109
- let keychainPrewarmPromise = null;
110
- export function preloadKeychainSecrets() {
111
- keychainPrewarmPromise ??= (async () => {
112
- try {
113
- const { createRequire } = await import('node:module');
114
- const require = createRequire(import.meta.url);
115
- const keychain = require('../lib/keychain-cjs.cjs');
116
- await keychain.prewarmSecrets?.();
117
- } catch {
118
- // Prewarm is opportunistic; the runtime still warms on its own path.
119
- }
120
- })();
121
- return keychainPrewarmPromise;
122
- }
123
-
124
48
  const TOOL_APPROVAL_TIMEOUT_MS = (() => {
125
49
  const value = Number(process.env.MIXDOG_TOOL_APPROVAL_TIMEOUT_MS);
126
50
  return Number.isFinite(value) && value > 0 ? Math.max(1000, Math.round(value)) : 120_000;
@@ -184,10 +184,12 @@ export const SESSION_CONFIGURE_ACTIONS = Object.freeze([
184
184
  'setTheme',
185
185
  'setToolMode',
186
186
  'setWebSearchEnabled',
187
+ 'setInstructionFiles',
187
188
  'setWebhookConfig',
188
189
  'setWebhookEnabled',
189
190
  'setWorkflow',
190
191
  'setOrchestrationMode',
192
+ 'saveStarterGuideState',
191
193
  'skipOnboarding',
192
194
  'startMediaJob',
193
195
  'switchContext',
@@ -8,6 +8,7 @@
8
8
  import { theme } from '../theme.mjs';
9
9
  import { displayModelName } from '../../runtime/shared/model-display.mjs';
10
10
  import { isRollingModelAlias } from '../../runtime/shared/model-alias.mjs';
11
+ import { DAYBREAK_PROVIDER, daybreakBlueOn } from '../../runtime/shared/llm/openai-daybreak.mjs';
11
12
 
12
13
  export const parsedModelVersion = (id) => {
13
14
  const text = String(id || '').toLowerCase();
@@ -167,6 +168,8 @@ const PROVIDER_DISPLAY_NAMES = new Map([
167
168
  ['openai-oauth', 'OpenAI OAuth'],
168
169
  ['anthropic-oauth', 'Anthropic OAuth'],
169
170
  ['grok-oauth', 'Grok OAuth'],
171
+ ['muse-code-oauth', 'Muse Code'],
172
+ ['mimo-oauth', 'MiMo'],
170
173
  ['cursor-oauth', 'Cursor OAuth'],
171
174
  ['antigravity-oauth', 'Antigravity OAuth'],
172
175
  ['openai', 'OpenAI API'],
@@ -193,6 +196,8 @@ const PROVIDER_DISPLAY_RANKS = {
193
196
  'openai-oauth': 10,
194
197
  'anthropic-oauth': 20,
195
198
  'grok-oauth': 30,
199
+ 'muse-code-oauth': 33,
200
+ 'mimo-oauth': 34,
196
201
  'antigravity-oauth': 31,
197
202
  'cursor-oauth': 32,
198
203
  'opencode-go': 35,
@@ -233,7 +238,14 @@ export const modelDescription = (m) =>
233
238
 
234
239
  const modelRecordDisplayName = (model) => displayModelName(model?.id, model?.provider, model?.display || model?.name);
235
240
 
236
- const routeModelDisplayName = (route) => displayModelName(route?.model, route?.provider, route?.modelDisplay || '');
241
+ // Daybreak Blue reads as part of the model ("GPT-6 Sol Blue"), ahead of effort.
242
+ const routeModelDisplayName = (route) =>
243
+ [
244
+ displayModelName(route?.model, route?.provider, route?.modelDisplay || ''),
245
+ route?.provider === DAYBREAK_PROVIDER && daybreakBlueOn(route?.modelParameters) ? 'Blue' : '',
246
+ ]
247
+ .filter(Boolean)
248
+ .join(' ');
237
249
 
238
250
  const groupModelsByProvider = (models) => {
239
251
  const providers = new Map();
@@ -4,6 +4,9 @@
4
4
  // selected parameters (and the selected effort), and cycling `thinking` can
5
5
  // invalidate a Fast selection that the new parameter combination rules out.
6
6
  import { modelKey } from './model-key.mjs';
7
+ import { DAYBREAK_PARAMETER_ID } from '../../../../runtime/shared/llm/openai-daybreak.mjs';
8
+
9
+ const TOGGLE_PARAMETER_IDS = new Set(['thinking', DAYBREAK_PARAMETER_ID]);
7
10
 
8
11
  export function createFastParameterSelection({ state, currentRoute, isCurrentRoute, isStateRoute, getSelectedEffort }) {
9
12
  const selectedFast = new Map();
@@ -82,12 +85,15 @@ export function createFastParameterSelection({ state, currentRoute, isCurrentRou
82
85
  return true;
83
86
  };
84
87
 
85
- /** Cycles the 'thinking' parameter to its next option; false when the model
86
- * has none. Fast is dropped when the new parameters rule it out. */
88
+ /** Cycles the model's toggle parameter ('thinking', or Daybreak Blue's
89
+ * on/off) to its next option; false when the model has none. Fast is
90
+ * dropped when the new parameters rule it out. */
87
91
  const cycleThinking = (model) => {
88
- const wanted = 'thinking';
89
- const definition = (model.modelParameterOptions || []).find((parameter) => parameter.id === wanted);
92
+ const definition = (model.modelParameterOptions || []).find((parameter) =>
93
+ TOGGLE_PARAMETER_IDS.has(parameter.id)
94
+ );
90
95
  if (!definition?.options?.length) return false;
96
+ const wanted = definition.id;
91
97
  const parameters = modelParametersFor(model);
92
98
  const current = Math.max(
93
99
  0,
@@ -127,6 +127,11 @@ function beginInteractiveOAuthLogin(flow, providerItem, login) {
127
127
  `browser opened for ${providerName}; paste code/redirect here if callback does not finish`,
128
128
  'info'
129
129
  );
130
+ } else if (started?.userCode) {
131
+ flow.store.pushNotice(
132
+ `${providerName}: enter code ${started.userCode} in the browser to finish signing in`,
133
+ 'info'
134
+ );
130
135
  } else {
131
136
  flow.store.pushNotice(`browser opened for ${providerName}; finish signing in there`, 'info');
132
137
  }