mixdog 1.2.5 → 1.2.6

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 (290) hide show
  1. package/package.json +1 -1
  2. package/scripts/lib/gate-scheduler.mjs +2 -2
  3. package/scripts/lib/run-node-tests.mjs +5 -14
  4. package/scripts/provider-pingpong-live.mjs +9 -9
  5. package/src/agents/advisor/AGENT.md +4 -4
  6. package/src/agents/advisor/agent.json +1 -1
  7. package/src/agents/reviewer/AGENT.md +2 -3
  8. package/src/agents/reviewer/agent.json +1 -1
  9. package/src/defaults/shipped-history.json +10 -0
  10. package/src/defaults/skills/browser-use/SKILL.md +2 -1
  11. package/src/defaults/skills/computer-use/SKILL.md +3 -1
  12. package/src/defaults/skills/visualize/SKILL.md +3 -2
  13. package/src/lib/rules-builder.cjs +1 -1
  14. package/src/output-styles/common.md +22 -6
  15. package/src/output-styles/detailed.md +7 -5
  16. package/src/output-styles/minimal.md +7 -3
  17. package/src/output-styles/simple.md +2 -3
  18. package/src/rules/agent/AGENT.md +3 -1
  19. package/src/rules/lead/LEAD.md +4 -3
  20. package/src/rules/shared/10-tool-workflow.md +2 -1
  21. package/src/rules/shared/60-verification.md +4 -5
  22. package/src/runtime/agent/orchestrator/agent-runtime/cache-strategy.mjs +2 -1
  23. package/src/runtime/agent/orchestrator/config.mjs +6 -0
  24. package/src/runtime/agent/orchestrator/context/skill-catalog.mjs +1 -1
  25. package/src/runtime/agent/orchestrator/internal-agents.mjs +10 -0
  26. package/src/runtime/agent/orchestrator/mcp/child-tree.mjs +53 -60
  27. package/src/runtime/agent/orchestrator/mcp/client.mjs +7 -4
  28. package/src/runtime/agent/orchestrator/mcp/oauth-callback.mjs +2 -3
  29. package/src/runtime/agent/orchestrator/providers/account-pool.mjs +9 -2
  30. package/src/runtime/agent/orchestrator/providers/anthropic-oauth-credentials.mjs +40 -19
  31. package/src/runtime/agent/orchestrator/providers/anthropic-oauth.mjs +3 -2
  32. package/src/runtime/agent/orchestrator/providers/anthropic-sse-turn/turn-events/content-block-start.mjs +4 -1
  33. package/src/runtime/agent/orchestrator/providers/anthropic-sse-turn/turn-events.mjs +2 -0
  34. package/src/runtime/agent/orchestrator/providers/anthropic-sse-turn.mjs +3 -0
  35. package/src/runtime/agent/orchestrator/providers/anthropic-sse.mjs +2 -1
  36. package/src/runtime/agent/orchestrator/providers/anthropic.mjs +3 -1
  37. package/src/runtime/agent/orchestrator/providers/antigravity-oauth-login.mjs +1 -2
  38. package/src/runtime/agent/orchestrator/providers/catalog-deadline.mjs +163 -0
  39. package/src/runtime/agent/orchestrator/providers/catalog-failures.mjs +34 -0
  40. package/src/runtime/agent/orchestrator/providers/grok-oauth-login.mjs +38 -14
  41. package/src/runtime/agent/orchestrator/providers/lib/oauth-page.mjs +100 -26
  42. package/src/runtime/agent/orchestrator/providers/lib/send-callbacks.mjs +24 -0
  43. package/src/runtime/agent/orchestrator/providers/oauth-credential-probes.mjs +13 -0
  44. package/src/runtime/agent/orchestrator/providers/oauth-usage.mjs +2 -1
  45. package/src/runtime/agent/orchestrator/providers/openai-compat-chat-send.mjs +1 -0
  46. package/src/runtime/agent/orchestrator/providers/openai-compat-chat-stream/chunk-events.mjs +4 -0
  47. package/src/runtime/agent/orchestrator/providers/openai-compat-chat-stream/stream-state.mjs +3 -1
  48. package/src/runtime/agent/orchestrator/providers/openai-compat-chat-stream.mjs +2 -0
  49. package/src/runtime/agent/orchestrator/providers/openai-compat-models.mjs +49 -4
  50. package/src/runtime/agent/orchestrator/providers/openai-compat-presets.mjs +0 -7
  51. package/src/runtime/agent/orchestrator/providers/openai-compat-responses-events.mjs +7 -1
  52. package/src/runtime/agent/orchestrator/providers/openai-compat-responses.mjs +1 -0
  53. package/src/runtime/agent/orchestrator/providers/openai-compat-stream.mjs +2 -0
  54. package/src/runtime/agent/orchestrator/providers/openai-compat-xai-send.mjs +1 -0
  55. package/src/runtime/agent/orchestrator/providers/openai-http-sse-response-state/response-events.mjs +5 -1
  56. package/src/runtime/agent/orchestrator/providers/openai-http-sse-response-state.mjs +11 -2
  57. package/src/runtime/agent/orchestrator/providers/openai-oauth-http-sse.mjs +1 -0
  58. package/src/runtime/agent/orchestrator/providers/openai-oauth-login.mjs +45 -16
  59. package/src/runtime/agent/orchestrator/providers/openai-oauth-ws.mjs +1 -0
  60. package/src/runtime/agent/orchestrator/providers/openai-ws-connect.mjs +196 -0
  61. package/src/runtime/agent/orchestrator/providers/openai-ws-pool.mjs +74 -9
  62. package/src/runtime/agent/orchestrator/providers/openai-ws-stream/event-switch.mjs +14 -1
  63. package/src/runtime/agent/orchestrator/providers/openai-ws-stream.mjs +2 -0
  64. package/src/runtime/agent/orchestrator/providers/opencode-go-oauth-login.mjs +194 -0
  65. package/src/runtime/agent/orchestrator/providers/opencode-go-oauth-tokens.mjs +353 -0
  66. package/src/runtime/agent/orchestrator/providers/opencode-go-oauth.mjs +293 -0
  67. package/src/runtime/agent/orchestrator/providers/opencode-go-usage.mjs +33 -100
  68. package/src/runtime/agent/orchestrator/providers/opencode-go.mjs +23 -14
  69. package/src/runtime/agent/orchestrator/providers/registry.mjs +41 -27
  70. package/src/runtime/agent/orchestrator/runtime-core/ask-user-tool-defs.mjs +2 -3
  71. package/src/runtime/agent/orchestrator/runtime-core/orchestration.mjs +3 -8
  72. package/src/runtime/agent/orchestrator/session/agent-pool-progress.mjs +15 -3
  73. package/src/runtime/agent/orchestrator/session/compact/execution-tail.mjs +74 -13
  74. package/src/runtime/agent/orchestrator/session/compact/forked-summary.mjs +102 -0
  75. package/src/runtime/agent/orchestrator/session/compact/runner.mjs +8 -2
  76. package/src/runtime/agent/orchestrator/session/compact/summary.mjs +16 -0
  77. package/src/runtime/agent/orchestrator/session/lifecycle-scan.mjs +9 -0
  78. package/src/runtime/agent/orchestrator/session/loop/fresh-context.mjs +39 -2
  79. package/src/runtime/agent/orchestrator/session/loop/tool-exec/before-hook.mjs +9 -19
  80. package/src/runtime/agent/orchestrator/session/loop/tool-exec.mjs +2 -3
  81. package/src/runtime/agent/orchestrator/session/manager/ask-turn-loop-options.mjs +3 -0
  82. package/src/runtime/agent/orchestrator/session/manager/ask-turn-steering-drain.mjs +13 -5
  83. package/src/runtime/agent/orchestrator/session/manager/pending-message-entry.mjs +10 -7
  84. package/src/runtime/agent/orchestrator/session/manager/pending-messages.mjs +62 -22
  85. package/src/runtime/agent/orchestrator/session/manager/runtime-liveness.mjs +23 -1
  86. package/src/runtime/agent/orchestrator/session/manager/session-close.mjs +81 -34
  87. package/src/runtime/agent/orchestrator/session/manager.mjs +2 -2
  88. package/src/runtime/agent/orchestrator/session/request-fork.mjs +47 -0
  89. package/src/runtime/agent/orchestrator/session/side-question-store.mjs +16 -1
  90. package/src/runtime/agent/orchestrator/session/side-question.mjs +5 -43
  91. package/src/runtime/agent/orchestrator/session/store/fs-probe.mjs +10 -0
  92. package/src/runtime/agent/orchestrator/session/store/lifecycle-barriers.mjs +73 -6
  93. package/src/runtime/agent/orchestrator/session/store/load-session.mjs +40 -0
  94. package/src/runtime/agent/orchestrator/session/store/save-fault.mjs +15 -0
  95. package/src/runtime/agent/orchestrator/session/store/session-paths.mjs +12 -0
  96. package/src/runtime/agent/orchestrator/session/store-agent-worker-header.mjs +36 -0
  97. package/src/runtime/agent/orchestrator/session/store-agent-worker-rows.mjs +258 -43
  98. package/src/runtime/agent/orchestrator/session/store-record-strict-scan.mjs +306 -0
  99. package/src/runtime/agent/orchestrator/session/store-summary-catalog.mjs +70 -21
  100. package/src/runtime/agent/orchestrator/session/store-summary-reader.mjs +46 -30
  101. package/src/runtime/agent/orchestrator/session/store-transcript-cache.mjs +144 -45
  102. package/src/runtime/agent/orchestrator/session/store-transcript-projection.mjs +32 -13
  103. package/src/runtime/agent/orchestrator/session/store-transcript-worker.mjs +364 -38
  104. package/src/runtime/agent/orchestrator/session/store.mjs +9 -2
  105. package/src/runtime/agent/orchestrator/session/task-wait-control.mjs +43 -12
  106. package/src/runtime/agent/orchestrator/session/tool-result-offload.mjs +23 -6
  107. package/src/runtime/agent/orchestrator/tools/builtin/arg-guard.mjs +12 -6
  108. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/backgrounded-result.mjs +13 -7
  109. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/bashism-rewrite.mjs +1 -1
  110. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/benign-exit.mjs +7 -1
  111. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/completed-result.mjs +40 -7
  112. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/deadline-plan.mjs +37 -34
  113. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/inline-hoist.mjs +1 -1
  114. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/spawn-env.mjs +0 -4
  115. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool.mjs +6 -0
  116. package/src/runtime/agent/orchestrator/tools/builtin/builtin-tools.mjs +29 -27
  117. package/src/runtime/agent/orchestrator/tools/builtin/external-tool-adapters.mjs +1 -1
  118. package/src/runtime/agent/orchestrator/tools/builtin/find-files-tool.mjs +28 -11
  119. package/src/runtime/agent/orchestrator/tools/builtin/git-command-policy.mjs +12 -3
  120. package/src/runtime/agent/orchestrator/tools/builtin/git-command-tool.mjs +203 -101
  121. package/src/runtime/agent/orchestrator/tools/builtin/git-repo-rw-lock.mjs +90 -41
  122. package/src/runtime/agent/orchestrator/tools/builtin/lib/list-helpers.mjs +17 -1
  123. package/src/runtime/agent/orchestrator/tools/builtin/lib/shell-delivery.mjs +199 -0
  124. package/src/runtime/agent/orchestrator/tools/builtin/lib/shell-task-output.mjs +165 -39
  125. package/src/runtime/agent/orchestrator/tools/builtin/list-tool.mjs +25 -13
  126. package/src/runtime/agent/orchestrator/tools/builtin/read-batch.mjs +7 -6
  127. package/src/runtime/agent/orchestrator/tools/builtin/read-formatting.mjs +19 -4
  128. package/src/runtime/agent/orchestrator/tools/builtin/read-line-collector.mjs +5 -3
  129. package/src/runtime/agent/orchestrator/tools/builtin/read-single-render.mjs +25 -7
  130. package/src/runtime/agent/orchestrator/tools/builtin/read-special-files.mjs +2 -1
  131. package/src/runtime/agent/orchestrator/tools/builtin/read-tool/batch-render.mjs +3 -1
  132. package/src/runtime/agent/orchestrator/tools/builtin/search-glob-tool.mjs +12 -5
  133. package/src/runtime/agent/orchestrator/tools/builtin/search-grep-tool.mjs +61 -22
  134. package/src/runtime/agent/orchestrator/tools/builtin/search-path-diagnostics.mjs +32 -8
  135. package/src/runtime/agent/orchestrator/tools/builtin/shell-analysis.mjs +193 -19
  136. package/src/runtime/agent/orchestrator/tools/builtin/shell-direct-exe.mjs +57 -7
  137. package/src/runtime/agent/orchestrator/tools/builtin/shell-jobs.mjs +119 -32
  138. package/src/runtime/agent/orchestrator/tools/builtin/shell-lossless-compact.mjs +26 -1
  139. package/src/runtime/agent/orchestrator/tools/builtin/shell-output.mjs +13 -28
  140. package/src/runtime/agent/orchestrator/tools/builtin/task-tool.mjs +90 -11
  141. package/src/runtime/agent/orchestrator/tools/builtin/wait-budgets.mjs +23 -0
  142. package/src/runtime/agent/orchestrator/tools/builtin.mjs +54 -10
  143. package/src/runtime/agent/orchestrator/tools/code-graph/build.mjs +22 -28
  144. package/src/runtime/agent/orchestrator/tools/code-graph/dispatch.mjs +11 -7
  145. package/src/runtime/agent/orchestrator/tools/destructive-warning.mjs +126 -9
  146. package/src/runtime/agent/orchestrator/tools/graph-manifest.json +13 -13
  147. package/src/runtime/agent/orchestrator/tools/lib/owned-shell-trees.mjs +15 -6
  148. package/src/runtime/agent/orchestrator/tools/lib/shell-descendants.mjs +40 -2
  149. package/src/runtime/agent/orchestrator/tools/lib/shell-run-background/promote-job.mjs +2 -2
  150. package/src/runtime/agent/orchestrator/tools/lib/shell-run-background/promotion-results.mjs +13 -3
  151. package/src/runtime/agent/orchestrator/tools/lib/shell-run-settle.mjs +2 -0
  152. package/src/runtime/agent/orchestrator/tools/lib/shell-run-state.mjs +3 -1
  153. package/src/runtime/agent/orchestrator/tools/patch/v4a-convert.mjs +1 -1
  154. package/src/runtime/agent/orchestrator/tools/shell-command.mjs +35 -4
  155. package/src/runtime/agent/orchestrator/tools/shell-policy.mjs +7 -2
  156. package/src/runtime/agent/orchestrator/tools/shell-powershell.mjs +39 -23
  157. package/src/runtime/agent/orchestrator/tools/shell-snapshot.mjs +6 -2
  158. package/src/runtime/agent/orchestrator/tools/spawn-manifest.json +13 -13
  159. package/src/runtime/attachments/office-extract.mjs +11 -9
  160. package/src/runtime/memory/lib/embedding-tokenizer.mjs +32 -18
  161. package/src/runtime/memory/lib/runtime-fetcher.mjs +1 -1
  162. package/src/runtime/memory/lib/tool-call-handler.mjs +7 -5
  163. package/src/runtime/office/authoring/pptx-script-normalize.mjs +11 -8
  164. package/src/runtime/office/core/tabular.mjs +1 -1
  165. package/src/runtime/office/design/library/design-template-inspect.mjs +7 -4
  166. package/src/runtime/office/portable/docx-formatting.mjs +1 -1
  167. package/src/runtime/office/portable/docx-runs.mjs +1 -1
  168. package/src/runtime/office/portable/docx-tracked-edits.mjs +2 -2
  169. package/src/runtime/office/portable/portable-docx-edits.mjs +11 -10
  170. package/src/runtime/office/portable/portable-docx-operations.mjs +21 -17
  171. package/src/runtime/office/portable/portable-docx-parts.mjs +15 -9
  172. package/src/runtime/office/portable/portable-docx-styles.mjs +4 -1
  173. package/src/runtime/office/portable/portable-docx-xml.mjs +9 -9
  174. package/src/runtime/office/portable/portable-opc.mjs +27 -13
  175. package/src/runtime/office/portable/portable-pivot.mjs +3 -3
  176. package/src/runtime/office/portable/portable-pptx-chart.mjs +3 -3
  177. package/src/runtime/office/portable/portable-pptx-charts.mjs +24 -18
  178. package/src/runtime/office/portable/portable-pptx-core.mjs +5 -5
  179. package/src/runtime/office/portable/portable-pptx-deck.mjs +8 -4
  180. package/src/runtime/office/portable/portable-pptx-package.mjs +7 -4
  181. package/src/runtime/office/portable/portable-pptx-shapes.mjs +18 -9
  182. package/src/runtime/office/portable/portable-sheet-parts.mjs +9 -3
  183. package/src/runtime/office/portable/portable-sheet-xml.mjs +5 -5
  184. package/src/runtime/office/portable/portable-xlsx-charts.mjs +4 -1
  185. package/src/runtime/office/portable/portable-xlsx-drawings.mjs +10 -6
  186. package/src/runtime/office/portable/portable-xlsx-operations.mjs +8 -5
  187. package/src/runtime/office/portable/portable-xlsx-pivot-ops.mjs +1 -1
  188. package/src/runtime/office/portable/portable-xlsx-reference-shift.mjs +11 -7
  189. package/src/runtime/office/portable/portable-xlsx-sheet-edits.mjs +6 -3
  190. package/src/runtime/office/portable/portable-xml.mjs +1 -1
  191. package/src/runtime/shared/atomic-file.mjs +22 -13
  192. package/src/runtime/shared/background-tasks.mjs +60 -20
  193. package/src/runtime/shared/child-spawn-gate.mjs +26 -16
  194. package/src/runtime/shared/config.mjs +0 -10
  195. package/src/runtime/shared/file-lock.mjs +7 -1
  196. package/src/runtime/shared/file-permissions-worker.mjs +38 -0
  197. package/src/runtime/shared/file-permissions.d.mts +19 -4
  198. package/src/runtime/shared/file-permissions.mjs +310 -4
  199. package/src/runtime/shared/git-runner-worker.mjs +6 -78
  200. package/src/runtime/shared/llm/http-agent.mjs +7 -3
  201. package/src/runtime/shared/llm/provider-catalog-registry.mjs +10 -0
  202. package/src/runtime/shared/llm/usage-accounting.mjs +2 -0
  203. package/src/runtime/shared/llm/usage-ledger-import.mjs +32 -3
  204. package/src/runtime/shared/llm/usage-ledger-rollup.mjs +12 -5
  205. package/src/runtime/shared/llm/usage-ledger-worker.mjs +1 -1
  206. package/src/runtime/shared/llm/usage-ledger.mjs +20 -5
  207. package/src/runtime/shared/memory-snapshot.mjs +5 -1
  208. package/src/runtime/shared/notify-trace.mjs +8 -1
  209. package/src/runtime/shared/pristine-execution-contract.json +5 -1
  210. package/src/runtime/shared/process-runner-worker.mjs +7 -0
  211. package/src/runtime/shared/process-runner.mjs +38 -0
  212. package/src/runtime/shared/provider-accounts.mjs +2 -1
  213. package/src/runtime/shared/provider-api-key.mjs +0 -1
  214. package/src/runtime/shared/read-row-numbers.mjs +1 -1
  215. package/src/runtime/shared/resource-admission.mjs +60 -18
  216. package/src/runtime/shared/run-child.mjs +84 -0
  217. package/src/runtime/shared/session-activity-signal.mjs +23 -0
  218. package/src/runtime/shared/shell-output-summary.mjs +23 -0
  219. package/src/runtime/shared/singleton-owner.mjs +126 -42
  220. package/src/runtime/shared/tool-output-limit.mjs +4 -2
  221. package/src/runtime/shared/tool-output-marker.mjs +58 -0
  222. package/src/runtime/shared/user-data-guard.mjs +28 -9
  223. package/src/runtime/shared/worktrees/activity-gate.mjs +33 -8
  224. package/src/runtime/shared/worktrees/git-head.mjs +20 -2
  225. package/src/runtime/shared/worktrees/lock.mjs +3 -2
  226. package/src/runtime/terminal-bridge/tool-defs.mjs +1 -1
  227. package/src/runtime/tidy/runners/biome.mjs +3 -1
  228. package/src/runtime/tidy/shadow.mjs +2 -1
  229. package/src/runtime/web-search/index.mjs +5 -7
  230. package/src/runtime/web-search/lib/formatter.mjs +42 -6
  231. package/src/runtime/web-search/tool-defs.mjs +6 -1
  232. package/src/session-runtime/lifecycle/session-switch/context-switch.mjs +4 -3
  233. package/src/session-runtime/lifecycle/session-switch/resume.mjs +7 -4
  234. package/src/session-runtime/lifecycle/session-switch/session-delete.mjs +3 -3
  235. package/src/session-runtime/lifecycle/shared.mjs +19 -2
  236. package/src/session-runtime/lifecycle/teardown/session-close.mjs +2 -0
  237. package/src/session-runtime/lifecycle/teardown.mjs +5 -2
  238. package/src/session-runtime/lifecycle-api.mjs +3 -1
  239. package/src/session-runtime/provider-auth/login.mjs +10 -6
  240. package/src/session-runtime/provider-auth/setup.mjs +19 -2
  241. package/src/session-runtime/provider-catalog-cache.mjs +101 -25
  242. package/src/session-runtime/provider-models/catalog-load.mjs +14 -3
  243. package/src/session-runtime/provider-models/row-hydration.mjs +4 -0
  244. package/src/session-runtime/provider-models.mjs +76 -10
  245. package/src/session-runtime/provider-readiness.mjs +4 -0
  246. package/src/session-runtime/services/agent-tool/close-flow.mjs +2 -1
  247. package/src/session-runtime/services/agent-tool/job-views/agent-list.mjs +10 -2
  248. package/src/session-runtime/services/agent-tool/job-views/session-progress.mjs +13 -4
  249. package/src/session-runtime/services/agent-tool/notify.mjs +15 -4
  250. package/src/session-runtime/services/agent-tool/restart-notify.mjs +134 -0
  251. package/src/session-runtime/services/agent-tool/send-flow.mjs +24 -1
  252. package/src/session-runtime/services/agent-tool/spawn-flow/deferred-spawn.mjs +2 -1
  253. package/src/session-runtime/services/agent-tool/spawn-flow/job-start.mjs +4 -3
  254. package/src/session-runtime/services/agent-tool/spawn-flow/spawn-run.mjs +5 -1
  255. package/src/session-runtime/services/agent-tool/tag-registry/tag-lookup.mjs +8 -3
  256. package/src/session-runtime/services/agent-tool/tag-registry.mjs +3 -0
  257. package/src/session-runtime/services/agent-tool/worker-index/row-shape.mjs +4 -0
  258. package/src/session-runtime/services/agent-tool/worker-index.mjs +44 -10
  259. package/src/session-runtime/services/agent-tool.mjs +20 -0
  260. package/src/session-runtime/services/provider-admin.mjs +92 -20
  261. package/src/session-runtime/services/usage-dashboard-model.mjs +2 -2
  262. package/src/session-runtime/services/usage-dashboard.mjs +27 -69
  263. package/src/session-runtime/turn/session-ops.mjs +2 -2
  264. package/src/session-runtime/turn/turn-run/ask-callbacks.mjs +1 -0
  265. package/src/session-runtime/usage-stats-api.mjs +6 -1
  266. package/src/standalone/channel-transport/http-routes.mjs +10 -9
  267. package/src/standalone/daemon-desktop-runtime.mjs +20 -7
  268. package/src/standalone/daemon-owner.mjs +117 -25
  269. package/src/standalone/daemon.mjs +43 -13
  270. package/src/standalone/session-call-cache.mjs +6 -0
  271. package/src/standalone/session-protocol.mjs +1 -1
  272. package/src/standalone/session-service/retention/busy.mjs +7 -2
  273. package/src/standalone/session-transport/routes.mjs +7 -6
  274. package/src/tui/app/model-options.mjs +39 -2
  275. package/src/tui/app/model-picker.mjs +16 -2
  276. package/src/tui/app/provider-setup-picker.mjs +1 -2
  277. package/src/tui/dist/index.mjs +385 -104
  278. package/src/tui/session/notice-text.mjs +0 -1
  279. package/src/tui/session/session-api/intake/submission.mjs +7 -13
  280. package/src/tui/session/session-api/integrations.mjs +1 -5
  281. package/src/tui/session/session-flow/drain.mjs +8 -0
  282. package/src/tui/session/session-flow/steering.mjs +46 -0
  283. package/src/tui/session/session-flow.mjs +2 -0
  284. package/src/tui/session/turn-stream.mjs +33 -0
  285. package/src/tui/session/turn.mjs +30 -3
  286. package/src/ui/statusline.mjs +1 -6
  287. package/src/ui/streaming-markdown-heal.mjs +24 -7
  288. package/src/vendor/statusline/bin/statusline-route.mjs +0 -1
  289. package/src/vendor/statusline/src/gateway/route-meta.mjs +0 -1
  290. package/src/workflows/default/WORKFLOW.md +9 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mixdog",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Open-source coding agent that matches Codex on Terminal-Bench 2.1 with 63% fewer tokens.",
@@ -2,9 +2,9 @@ import { availableParallelism } from 'node:os';
2
2
  import { testConcurrencyArg } from './run-node-tests.mjs';
3
3
 
4
4
  // A local gate has one budget, not a full machine's worth of workers per lane.
5
- // Six is the interactive-desktop default; explicit and shell budgets still win.
5
+ // Six is the interactive-desktop default; an explicit budget still wins.
6
6
  export function gateTestBudget(env = process.env, parallelism = availableParallelism()) {
7
- const argument = testConcurrencyArg([], env, parallelism);
7
+ const argument = testConcurrencyArg([], env);
8
8
  return argument ? Number(argument.split('=')[1]) : Math.min(6, parallelism);
9
9
  }
10
10
 
@@ -67,22 +67,13 @@ const positiveInt = (value) => {
67
67
  return Number.isInteger(n) && n > 0 ? n : null;
68
68
  };
69
69
 
70
- // `node --test` defaults to availableParallelism()-1 file processes. When the
71
- // run is one of several concurrent shell commands (the Mixdog shell tool
72
- // exports the admission cap as MIXDOG_SHELL_CONCURRENCY_CAP), that multiplies
73
- // across peers, so a capped run leaves `cap` cores to them: cores - cap, never
74
- // below 4. Dividing the cores by the cap left a 20-core machine with 2 file
75
- // processes and tripled the wall time (desktop 289 s vs 63.5 s). Precedence: an
76
- // explicit --test-concurrency flag, then MIXDOG_TEST_CONCURRENCY, then the
77
- // capped share; with none of them Node's default (cores-1) stands.
78
- // Returns the flag to add, or null.
79
- export function testConcurrencyArg(nodeArgs, env = process.env, parallelism = availableParallelism()) {
70
+ // `node --test` defaults to availableParallelism()-1 file processes. Precedence:
71
+ // an explicit --test-concurrency flag, then MIXDOG_TEST_CONCURRENCY; with
72
+ // neither, Node's default (cores-1) stands. Returns the flag to add, or null.
73
+ export function testConcurrencyArg(nodeArgs, env = process.env) {
80
74
  if (nodeArgs.some(concurrencyFlag)) return null;
81
75
  const explicit = positiveInt(env.MIXDOG_TEST_CONCURRENCY);
82
- if (explicit) return `--test-concurrency=${explicit}`;
83
- const cap = positiveInt(env.MIXDOG_SHELL_CONCURRENCY_CAP);
84
- if (!cap) return null;
85
- return `--test-concurrency=${Math.max(4, parallelism - cap)}`;
76
+ return explicit ? `--test-concurrency=${explicit}` : null;
86
77
  }
87
78
 
88
79
  // Every test file process is bounded: node:test fails a file (and records it
@@ -289,15 +289,15 @@ const routes = [
289
289
  ['openrouter-deepseek', 'openrouter', 'deepseek/deepseek-v4.1-flash', ['low', 'max']],
290
290
  ['deepseek', 'deepseek', 'deepseek-flash', ['low', 'max']],
291
291
  ['deepseek-pro', 'deepseek', 'deepseek-v4-pro', ['high']],
292
- ['opencode-go-gemini', 'opencode-go', 'gemini-4-argon-contributor', ['low', 'high']],
293
- ['opencode-go-deepseek', 'opencode-go', 'deepseek-v4.1-flash', ['low', 'max']],
294
- ['opencode-go-claude', 'opencode-go', 'claude-haiku-5-5', ['low', 'max']],
295
- ['opencode-go-gpt', 'opencode-go', 'gpt-6-luna', ['none', 'xhigh']],
296
- ['opencode-go-glm', 'opencode-go', 'glm-5.3-flash', ['low', 'max']],
297
- ['opencode-go-qwen', 'opencode-go', 'qwen3.8-flash', ['low', 'xhigh']],
298
- ['opencode-go-kimi', 'opencode-go', 'kimi-k3', ['max']],
299
- ['opencode-go-minimax', 'opencode-go', 'minimax-m3', [null]],
300
- ['opencode-go-grok', 'opencode-go', 'grok-4.7', ['low']],
292
+ ['opencode-go-gemini', 'opencode-go-oauth', 'gemini-4-argon-contributor', ['low', 'high']],
293
+ ['opencode-go-deepseek', 'opencode-go-oauth', 'deepseek-v4.1-flash', ['low', 'max']],
294
+ ['opencode-go-claude', 'opencode-go-oauth', 'claude-haiku-5-5', ['low', 'max']],
295
+ ['opencode-go-gpt', 'opencode-go-oauth', 'gpt-6-luna', ['none', 'xhigh']],
296
+ ['opencode-go-glm', 'opencode-go-oauth', 'glm-5.3-flash', ['low', 'max']],
297
+ ['opencode-go-qwen', 'opencode-go-oauth', 'qwen3.8-flash', ['low', 'xhigh']],
298
+ ['opencode-go-kimi', 'opencode-go-oauth', 'kimi-k3', ['max']],
299
+ ['opencode-go-minimax', 'opencode-go-oauth', 'minimax-m3', [null]],
300
+ ['opencode-go-grok', 'opencode-go-oauth', 'grok-4.7', ['low']],
301
301
  ['anthropic-api', 'anthropic', 'claude-haiku-5-5', ['low', 'max']],
302
302
  ['gemini-api', 'gemini', 'gemini-3.5-flash-lite', ['minimal', 'high']],
303
303
  ['grok-oauth', 'grok-oauth', 'grok-4.7', ['low', 'xhigh']],
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: Advisor
3
- description: "Use by difficulty: on any work beyond a simple one- or two-step change, after orientation and before committing to an approach, when errors recur or results stop converging, before changing approach, and for requested second opinions."
3
+ description: "Use when the approach is genuinely unclear, when errors recur or results stop converging, before changing approach, or when the user asks for a second opinion. Never for final verification."
4
4
  ---
5
5
 
6
6
  Independent technical advisor.
7
7
 
8
- You are consulted at decision points: once orientation is done and before an
9
- approach is committed, when errors recur or results stop converging, before a
8
+ You are consulted at decision points: when the approach is genuinely
9
+ unclear, when errors recur or results stop converging, before a
10
10
  change of approach, and when the user asks for a second opinion or
11
11
  cross-validation. You do not see the Lead's conversation; work from the brief
12
12
  and verify its evidence against the source yourself.
@@ -31,7 +31,7 @@ blockers rather than inventing certainty.
31
31
 
32
32
  Do not implement fixes, modify project files or settings, stage or commit
33
33
  changes, deploy, or delegate work. Keep checks non-destructive and isolate any
34
- test fixtures from existing user data. The final check belongs to Reviewer.
34
+ test fixtures from existing user data. Final verification is not yours; never take it over.
35
35
 
36
36
  Lead with the recommendation, then actionable findings ordered by severity, with
37
37
  evidence located by project-relative path and function or symbol. If no issue
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "advisor",
3
3
  "name": "Advisor",
4
- "description": "Use by difficulty: on any work beyond a simple one- or two-step change, after orientation and before committing to an approach, when errors recur or results stop converging, before changing approach, and for requested second opinions.",
4
+ "description": "Use when the approach is genuinely unclear, when errors recur or results stop converging, before changing approach, or when the user asks for a second opinion. Never for final verification.",
5
5
  "entry": "AGENT.md"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: Reviewer
3
- description: Use only at the end, as the final check of non-trivial work: after the implementation is written and verified, before reporting completion, to independently verify correctness, regressions, risks, and acceptance criteria. Skip for low-difficulty work.
3
+ description: Use only at the end, as the final independent check of non-trivial work; otherwise Lead's own review suffices.
4
4
  ---
5
5
 
6
6
  Independent final-check review agent.
@@ -9,8 +9,7 @@ You are called only at the end, after the deliverable is written and the
9
9
  Lead's own verification has run, before completion is reported.
10
10
 
11
11
  Inspect the diff, affected boundaries, existing tests, and stated acceptance
12
- criteria with independent judgment. Run the necessary builds, tests, lint, or
13
- runtime checks and actively seek regressions, unsupported assumptions, security
12
+ criteria with independent judgment. Reuse still-valid passing results; rerun failed or invalidated checks. Actively seek regressions, unsupported assumptions, security
14
13
  risks, and counterexamples.
15
14
 
16
15
  Do not modify files or reimplement the change. Result lists actionable
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "reviewer",
3
3
  "name": "Reviewer",
4
- "description": "Use only at the end, as the final check of non-trivial work: after the implementation is written and verified, before reporting completion, to independently verify correctness, regressions, risks, and acceptance criteria. Skip for low-difficulty work.",
4
+ "description": "Use only at the end, as the final independent check of non-trivial work; otherwise Lead's own review suffices.",
5
5
  "entry": "AGENT.md"
6
6
  }
@@ -2,6 +2,7 @@
2
2
  "agents": {
3
3
  "advisor": [
4
4
  "6bd0318995f70547c162efda92795e79",
5
+ "895c5f4311dcbebc0c8756c9ec61a02a",
5
6
  "d3b4a7926c9484833fe8ddba70260f9d"
6
7
  ],
7
8
  "debugger": [
@@ -28,6 +29,7 @@
28
29
  "reviewer": [
29
30
  "07643b62440d3eba29b7360b8a33f09f",
30
31
  "0d45f8d9a2a67373462840e8bf930694",
32
+ "1593af04edd24cdd5f05fe89a7386407",
31
33
  "25b44b46269490e26ca31c1852925171",
32
34
  "a60ea68f9287d55489e92e5450432f62",
33
35
  "a61cb4557def4e7ed647d4bdacbb72e4",
@@ -62,6 +64,7 @@
62
64
  "08d03484742e51d90961bcc3efe0acfa",
63
65
  "0afe17998c52bf57dcb8f3e8ebcec26f",
64
66
  "33205f4956124396b7e80882fbbedd18",
67
+ "37872608fe389a263c384298271aecfc",
65
68
  "4aaa7fa1f071c092733fda61380822c9",
66
69
  "4e133eaf5f209ea9c5eda74fe8d810e9",
67
70
  "56355187d05762ef50579d6285636c71",
@@ -105,6 +108,7 @@
105
108
  "outputStyles": {
106
109
  "common.md": [
107
110
  "2abd510eaeb6c83702b97a0ce215d348",
111
+ "3f5915d27c7659ad82cdbda064acfbfa",
108
112
  "4e6134d60ee5c54c2888e874653bcdad",
109
113
  "4ecd89b0c07ad8a81aa1f84882cf1b00",
110
114
  "899529696b7d6d3373ae83a76976ab48",
@@ -123,6 +127,7 @@
123
127
  "822498e7a6f11fa724fbf56a3498b21d",
124
128
  "9b6b57fa5fc86b445b47b743d5249335",
125
129
  "cf4dc49981a68a7b34990e6ba740e35b",
130
+ "d95e65d47329a3408fc009104c286036",
126
131
  "f768eba35712c51ed741782cc91f23f3",
127
132
  "f7ec059f73568252528a6a343f4e14d9"
128
133
  ],
@@ -142,6 +147,7 @@
142
147
  "05778bbf2481be70d4501543af6a7f44",
143
148
  "0beee3927bc1b4c7ccf3f2cbea50d1c4",
144
149
  "0c11f14731376cc80b0fd63a9dc4d4bf",
150
+ "101171a29ab8f16c465f6a3421ddc6ab",
145
151
  "10827dae8146a8e924e85f88a57d1e22",
146
152
  "68ab17dda19d69ddba3cb3d4f2c319fa",
147
153
  "6b102ba38f0fc9907a8e6a85b7bdc817",
@@ -151,6 +157,7 @@
151
157
  "eccd0524091bed441229a75c5eb803ff"
152
158
  ],
153
159
  "simple.md": [
160
+ "07c197ff8f20e24c65d844cd91711216",
154
161
  "16d8b5e7757001c614dae62f18f63aa1",
155
162
  "56b61d99f3179018f65b530d9b1491d7",
156
163
  "6e1749aa66d4416cadad4bcd26eb807a",
@@ -168,6 +175,7 @@
168
175
  "browser-use": [
169
176
  "00085086a7649ec6631f5cf0a3bbbf60",
170
177
  "08eee52328524eb032fd14f342742c41",
178
+ "43eeb0b9c5792f08f2223c76846926cb",
171
179
  "4ab5316454013712cedb25d9b75f4e43",
172
180
  "646365a3f7041a3da3d7d7d896a0c3b6",
173
181
  "8766650e61891e910b44bb2591c88f48",
@@ -204,6 +212,7 @@
204
212
  "398b50b687206544149feeb0a5b02c09",
205
213
  "3f8b7b4cd798dba866eccd7d09c76248",
206
214
  "733d30c3ca6745c96a69f7e237f3d8c0",
215
+ "75bdf20949f1e125f82b51ebca6a2ab4",
207
216
  "7b9ce58540ed4609f290dc981a7e1719",
208
217
  "8236330f56f27dd283bda6da1239285d",
209
218
  "8bc93c9320b83de81baa8cf242af5c0b",
@@ -379,6 +388,7 @@
379
388
  "fe0512acbb2fc8f80c5961b9f44aa5e2"
380
389
  ],
381
390
  "visualize": [
391
+ "8320fedd9dd745a332621c325a8bf355",
382
392
  "aa3531bfc4fd6ec3820493d0c190cc75",
383
393
  "f65924f0691284ad31000469a9855b62"
384
394
  ],
@@ -192,7 +192,8 @@ not as two blocks joined.
192
192
  - **Screen is the deliverable / user continues** — leave the relevant foreground
193
193
  page visible using `open` with its `tab`; clean up only disposable support
194
194
  pages. A CAPTCHA, 2FA, or identity check is a handoff, not completion: retain
195
- that exact page with `open` and wait.
195
+ that exact page with `open`. The Lead may wait; an agent preserves the
196
+ state, reports the required user action, and stops.
196
197
  - Preserve pre-existing user tabs, unfinished forms, and pages needed for
197
198
  recovery. If ownership or disposability is unclear, preserve the page;
198
199
  never clear cookies/storage as cleanup. Do not hide a screen the user asked
@@ -125,7 +125,9 @@ GNOME with Mixdog's own shell extension, which the app sets up); prefer accessib
125
125
  the user. If target-local release remains unconfirmed, the user must
126
126
  inspect/recover that window; restarting the host alone does not prove
127
127
  release. Obtain a new observation after an interruption.
128
- Use `wait_for_user` to keep the task waiting without sending input. Never
128
+ The Lead may use `wait_for_user` to keep the task waiting without sending
129
+ input; an agent preserves the state, reports the required user action, and
130
+ stops. Never
129
131
  operate Resume, Stop or the recovery controls, or change the idle policy, on
130
132
  the user's behalf.
131
133
  While paused, only `list`, `diagnose` and `wait_for_user` are available.
@@ -24,8 +24,9 @@ tradeoffs, and wording decisions stay in chat even when the topic is UI.
24
24
  - *Show* — any artifact you produced or changed (HTML, deck, document, sheet,
25
25
  PDF, image, video, a local dev page): `open` it once when it is ready. Edits
26
26
  reload the tab by themselves; never reopen to refresh.
27
- - *Mockup* — a UI change before implementation, or the user asks for a
28
- 시안/mockup/preview. §2.
27
+ - *Mockup* — the user asks for a mockup or preview, or a UI change whose
28
+ look the user still has to decide. A change whose look is already settled
29
+ is built directly. §2.
29
30
  - *Options* — the direction is genuinely open (the user is unsure, or two
30
31
  readings of the request lead to different layouts). §3.
31
32
  - *Explain* — a flow, state machine, architecture, or data path the user needs
@@ -139,7 +139,7 @@ function buildLanguageSection(dataDir) {
139
139
  // mistranslate, so the two clauses would be dead text.
140
140
  if (language.prompt !== 'English') {
141
141
  lines.push(
142
- `- Preserve identifiers, paths, commands, API names, and exact errors. For technical jargon, use the established term or a plain functional description, never an invented literal translation.`
142
+ `- Preserve identifiers, paths, commands, API names, and exact errors. Keep technical terms in their established form, usually the original English (blocker, cache, commit); add a short plain explanation only when the reader may not know it. Never invent a literal translation.`
143
143
  );
144
144
  }
145
145
  return `# Language\n\n${lines.join('\n')}`;
@@ -7,15 +7,31 @@ partial: true
7
7
 
8
8
  ## Shared Output Format
9
9
 
10
- - Lead with the answer; no restated request or closing recap. Natural,
10
+ - Lead with the answer; no restated request, closing recap, or offer. Natural,
11
11
  complete sentences in the reader's vocabulary, each point once; no arrow
12
12
  chains or unexplained shorthand.
13
- - Plain prose for simple questions; headings, lists, or tables only for real
14
- structure. GitHub-flavored Markdown, `$$…$$` for display math.
15
13
  - Distinguish facts, inference, and uncertainty; keep exact literals and
16
14
  material risks. Caveats only when they change the reader's next step.
17
- - Never pad: no tangents, unsolicited offers, raw dumps, or process recaps.
18
- Explicit depth requests win; depth applies to substantive answers, not the
19
- one-line pre-tool briefing.
15
+ - Show only what the reader needs: the decision, the result, the blocker, and
16
+ the action. No tangents, raw dumps, or process narration. Explicit depth
17
+ requests win; depth applies to substantive answers, not the one-line
18
+ pre-tool briefing.
20
19
  - At every depth keep decision-relevant failures, security warnings, and
21
20
  destructive-action confirmations; quote needed error text exactly.
21
+
22
+ Layout (GitHub-flavored Markdown, `$$…$$` for display math): the content picks
23
+ the format at every depth; depth sets only how much is said.
24
+
25
+ - Mixed content gets one short block per kind (result, cause, finding,
26
+ decision needed, remaining work) under a plain label in the reader's
27
+ language, never one running paragraph; what the reader must decide or do
28
+ comes last, on its own.
29
+ - A single answer or cause is short prose paragraphs without labels. Three or
30
+ more parallel items are a flat one-line list, numbered only for order, never
31
+ nested. A comparison across items is a small table with short cells.
32
+ - Commands, paths, identifiers, and literals go in code; multi-line code,
33
+ diffs, and output in fenced blocks.
34
+ - Bold only what the reader scans for: the decision or warning they must not
35
+ miss, a list item's leading label, the decisive number, the winning option;
36
+ never a sentence or a heading substitute. Headings only for long
37
+ multi-section answers; no emoji or horizontal rules.
@@ -7,8 +7,10 @@ aliases: verbose, full
7
7
 
8
8
  ## Depth
9
9
 
10
- - Explain the reasoning, mechanisms, evidence, trade-offs, and implications
11
- supporting the answer. Include relevant examples and edge cases.
12
- - Develop the requested subject fully, without speculation or detail that
13
- does not improve understanding.
14
- - Organize longer explanations into sections.
10
+ - Lead with the answer using the shared layout, then go clearly beyond
11
+ simple: the mechanism step by step, the evidence (exact values, commands, file
12
+ references, quoted errors), trade-offs and edge cases, what was not
13
+ verified, and the recommended next steps.
14
+ - Use the shared layout where the content calls for it, and add `###`
15
+ headings once the answer has several distinct sections.
16
+ - Omit speculation or detail that does not improve understanding.
@@ -7,8 +7,12 @@ aliases: brief, short
7
7
 
8
8
  ## Depth
9
9
 
10
- - State the conclusion and determining cause, adding one decisive fact or
11
- immediate consequence when useful.
10
+ - Give the conclusion, the determining cause, and the decisive facts the
11
+ reader needs to act, including any failure, caveat, or unverified area, in
12
+ a few sentences, clearly shorter than simple: no background, no
13
+ second-order points, no alternatives beyond the pick. Do not drop the facts
14
+ above to stay short.
15
+ - For a choice between options, name the pick and the main reason; show the
16
+ options themselves only if the reader must weigh them.
12
17
  - Omit intermediate reasoning, additional evidence, examples, and broader
13
18
  implications unless requested.
14
- - Prefer one short paragraph or a few brief bullets.
@@ -7,8 +7,7 @@ aliases: default, concise, handoff
7
7
 
8
8
  ## Depth
9
9
 
10
- - Give a self-contained summary: answer, core causal sequence, strongest
11
- evidence, and direct consequences.
10
+ - Give a self-contained summary: the answer first, then the core causal
11
+ sequence, the strongest evidence, and the direct consequence or next step.
12
12
  - Omit secondary evidence, implementation detail, and extended examples
13
13
  unless requested.
14
- - Use short paragraphs or a compact list.
@@ -3,7 +3,9 @@
3
3
  - Working from the brief: Lead's latest brief is your request and overrides
4
4
  any internal rule; Lead owns user approval. Work only inside the scope it
5
5
  names, without reapproval; escalate to Lead only a scope change, an
6
- unapproved destructive action, or a blocker.
6
+ unapproved destructive action, or a blocker. A step that needs the user
7
+ (sign-in approval, code, credential, answer) is a blocker: report it with
8
+ what the user must do, never wait or poll for them.
7
9
  - Communicate in English. Call tools immediately, with no preamble or
8
10
  progress text.
9
11
  - Reporting: send one final message, then stop; never ask whether to
@@ -28,6 +28,7 @@
28
28
  - Receiving an agent's report: it arrives as a `<task-notification>` block, a
29
29
  runtime message rather than the user speaking. Do not wait for it in-turn —
30
30
  finish work that does not depend on it and end the turn; never predict or
31
- fabricate the result. When it arrives, review the diff against the brief,
32
- run the independent verification, and report to the user; pending agent
33
- work is not a completed request.
31
+ fabricate the result. On an agent report, review its diff against the brief;
32
+ verify the integrated result once before the final review; after the
33
+ Reviewer reports, resolve the findings before reporting completion. Pending
34
+ agent work is not a completed request.
@@ -5,7 +5,8 @@
5
5
  listings→`glob`, entries/metadata→`list`. Tool names are not shell commands.
6
6
  - Cheapest decisive evidence first (existing state, a diff, a failing test);
7
7
  patch from it with no surveys or history. Stop once every requested item
8
- has its evidence; never one step past what was asked.
8
+ has its evidence; never widen past what was asked, and never ask
9
+ permission for work the request already covers.
9
10
  - Do not add work whose need depends on a pending result. Reuse content
10
11
  already delivered; changed sources and omitted ranges are new evidence.
11
12
  Trust documented guarantees; no availability checks or defensive branches —
@@ -3,11 +3,10 @@
3
3
  - Check required behavior, exact outputs and essential integrity, security,
4
4
  compatibility and buildability. Expected values come from sources or
5
5
  independent invariants, never from the output itself or from recall.
6
- - After all edits, cover each required check once: one runner per runtime,
7
- independent checks in parallel; no read/list/diff to confirm your own
8
- writes; rerun only failed or invalidated checks. If repeated fixes leave
9
- the same failure unchanged, test the underlying assumptions before
10
- another fix.
6
+ - Verify once, at the end, before reporting: each required check once,
7
+ independent checks in parallel; reuse still-valid passing results and
8
+ rerun failed or invalidated checks; never read back your own writes. If repeated fixes leave the same failure
9
+ unchanged, test the underlying assumptions before another fix.
11
10
  - Use supplied commands unchanged except inputs, else documented defaults; no
12
11
  stricter flags or unrequested suites.
13
12
  - Warnings or blocked checks never justify editing passing code. Fix obsolete
@@ -165,6 +165,7 @@ const PROVIDER_CACHE_CAPABILITY = Object.freeze({
165
165
  gemini: 'managed-explicit',
166
166
  deepseek: 'implicit-observed',
167
167
  'opencode-go': 'implicit-observed',
168
+ 'opencode-go-oauth': 'implicit-observed',
168
169
  });
169
170
 
170
171
  export function cacheCapabilityForProvider(provider) {
@@ -475,7 +476,7 @@ export function resolveProviderPromptCacheLane(provider, opts = {}, config = {})
475
476
  * server-side lane per call. `promptCacheScope: 'shared'` tells every
476
477
  * key-prefix provider to key the cache on the prefix instead.
477
478
  */
478
- export function oneShotPromptCacheOpts(agent) {
479
+ function oneShotPromptCacheOpts(agent) {
479
480
  return isOneShotMaintenanceAgent(agent) ? { promptCacheScope: 'shared' } : null;
480
481
  }
481
482
 
@@ -114,6 +114,8 @@ export function buildDefaultConfig(options = {}) {
114
114
  providers['muse-code-oauth'] = oauthEntry('muse-code-oauth');
115
115
  // Command Code Provider API, enabled from its stored Studio API key.
116
116
  providers['command-code-oauth'] = oauthEntry('command-code-oauth');
117
+ // OpenCode Go through an OpenCode Console login, enabled from its stored tokens.
118
+ providers['opencode-go-oauth'] = oauthEntry('opencode-go-oauth');
117
119
  // Dev-only providers (Settings → Developer → Providers, one option each):
118
120
  // omitted entirely from the default config while their option is off so
119
121
  // they never surface in settings.
@@ -307,6 +309,10 @@ export function loadConfig(options = {}) {
307
309
  const defaults = buildDefaultConfig({ detectCredentials: includeSecrets });
308
310
  return {
309
311
  ...defaults,
312
+ // A stored keychain key enables its provider with or without a stored
313
+ // config section: Settings lists such a provider as connected, so a
314
+ // profile that carries only credentials (a copied auth) must load it too.
315
+ providers: mergeStoredProviders({ raw: {}, defaults, includeSecrets, presenceOnly }),
310
316
  mcpServers: {},
311
317
  pluginMcp: {},
312
318
  presets: DEFAULT_PRESETS.map((p) => ({ ...p })),
@@ -495,7 +495,7 @@ export function buildSkillResultEnvelope(name, content, skillDir) {
495
495
  body = body.replace(/\$\{MIXDOG_SKILL_NODE\}/g, SKILL_LAUNCHER_COMMAND);
496
496
  if (skillDir) {
497
497
  const normDir = String(skillDir).replace(/\\/g, '/');
498
- body = body.replace(/\$\{MIXDOG_SKILL_DIR\}/g, normDir);
498
+ body = body.replace(/\$\{MIXDOG_SKILL_DIR\}/g, () => normDir);
499
499
  const escapedDir = escapeSkillXmlText(normDir);
500
500
  dirLine = `<base-dir>${escapedDir}</base-dir>\n`;
501
501
  }
@@ -121,16 +121,26 @@ function _loadHiddenAgents() {
121
121
  * by an agents.json modification (tracked via maxMtimeRecursive in
122
122
  * collect.mjs) consume fresh metadata in the same process.
123
123
  */
124
+ // The agent-status pulse resolves a watchdog policy per worker row, and each
125
+ // lookup re-stat'ed every dependency file synchronously. The mtime probe runs
126
+ // at most once per interval; an edit is picked up by the next probe.
127
+ const HIDDEN_AGENTS_RECHECK_MS = 1000;
128
+ let _hiddenAgentsCheckedAt = 0;
129
+
124
130
  function _getHiddenAgents() {
131
+ const now = Date.now();
132
+ if (_hiddenAgentsCache && now - _hiddenAgentsCheckedAt < HIDDEN_AGENTS_RECHECK_MS) return _hiddenAgentsCache.map;
125
133
  // The mtime probe never throws; a load failure surfaces with the message
126
134
  // _loadHiddenAgents already gave it, and the stale cache is not reused.
127
135
  if (_hiddenAgentsCache && _maxMtime(_hiddenAgentsCache.files) <= _hiddenAgentsCache.mtime) {
136
+ _hiddenAgentsCheckedAt = now;
128
137
  return _hiddenAgentsCache.map;
129
138
  }
130
139
  const files = _hiddenAgentsDependencyFiles();
131
140
  const mtime = _maxMtime(files);
132
141
  const map = _loadHiddenAgents();
133
142
  _hiddenAgentsCache = { mtime, files, map };
143
+ _hiddenAgentsCheckedAt = now;
134
144
  return map;
135
145
  }
136
146