mixdog 1.0.12 → 1.1.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.
Files changed (356) hide show
  1. package/README.md +83 -182
  2. package/package.json +4 -2
  3. package/scripts/build-shipped-history.mjs +131 -0
  4. package/scripts/latest-guard.mjs +63 -0
  5. package/scripts/lib/run-node-tests.mjs +330 -32
  6. package/scripts/lib/test-failure-records.mjs +5 -0
  7. package/scripts/lib/test-failure-summary.mjs +14 -3
  8. package/scripts/lib/test-spawn-ledger.mjs +19 -0
  9. package/scripts/merge-mac-update-feed.mjs +107 -0
  10. package/scripts/mobile-release.mjs +210 -0
  11. package/scripts/post-release-check.mjs +353 -0
  12. package/scripts/prune-embedding-runtime.mjs +9 -5
  13. package/scripts/publish-asset-release.mjs +43 -0
  14. package/scripts/release-guard.mjs +63 -0
  15. package/scripts/test-direct.mjs +16 -1
  16. package/scripts/test.mjs +29 -7
  17. package/src/agents/advisor/AGENT.md +38 -0
  18. package/src/agents/advisor/agent.json +6 -0
  19. package/src/agents/reviewer/AGENT.md +5 -2
  20. package/src/agents/reviewer/agent.json +1 -1
  21. package/src/defaults/shipped-history.json +383 -0
  22. package/src/defaults/skills/computer-use/SKILL.md +1 -1
  23. package/src/defaults/skills/goal-management/SKILL.md +11 -5
  24. package/src/defaults/skills/setup/SKILL.md +5 -8
  25. package/src/defaults/skills/setup/references/actions.md +62 -31
  26. package/src/defaults/skills/setup/references/surfaces.md +12 -10
  27. package/src/lib/keychain-cjs.cjs +582 -17
  28. package/src/lib/rules-builder.cjs +1 -1
  29. package/src/runtime/agent/orchestrator/agent-runtime/cache-strategy.mjs +3 -1
  30. package/src/runtime/agent/orchestrator/agent-runtime/session-builder.mjs +4 -0
  31. package/src/runtime/agent/orchestrator/config-presets.d.mts +1 -0
  32. package/src/runtime/agent/orchestrator/config-presets.mjs +44 -0
  33. package/src/runtime/agent/orchestrator/config-providers-merge.mjs +9 -1
  34. package/src/runtime/agent/orchestrator/config-storage.mjs +32 -4
  35. package/src/runtime/agent/orchestrator/config.mjs +120 -21
  36. package/src/runtime/agent/orchestrator/context/instruction-files.mjs +130 -0
  37. package/src/runtime/agent/orchestrator/context/role-instructions.mjs +4 -0
  38. package/src/runtime/agent/orchestrator/providers/account-pool.mjs +77 -26
  39. package/src/runtime/agent/orchestrator/providers/anthropic-api-request.mjs +44 -14
  40. package/src/runtime/agent/orchestrator/providers/anthropic-oauth-credentials.mjs +2 -1
  41. package/src/runtime/agent/orchestrator/providers/anthropic.mjs +11 -2
  42. package/src/runtime/agent/orchestrator/providers/antigravity-oauth-login.mjs +2 -0
  43. package/src/runtime/agent/orchestrator/providers/cursor-auth.mjs +3 -3
  44. package/src/runtime/agent/orchestrator/providers/custom-provider-config.mjs +388 -0
  45. package/src/runtime/agent/orchestrator/providers/custom-provider.mjs +92 -109
  46. package/src/runtime/agent/orchestrator/providers/custom-reasoning.mjs +107 -0
  47. package/src/runtime/agent/orchestrator/providers/effort-configuration.mjs +51 -9
  48. package/src/runtime/agent/orchestrator/providers/grok-oauth-login.mjs +2 -1
  49. package/src/runtime/agent/orchestrator/providers/lib/oauth-token-utils.mjs +11 -0
  50. package/src/runtime/agent/orchestrator/providers/lib/open-login-url.mjs +9 -0
  51. package/src/runtime/agent/orchestrator/providers/mimo-oauth-login.mjs +254 -0
  52. package/src/runtime/agent/orchestrator/providers/mimo-oauth-profile.mjs +218 -0
  53. package/src/runtime/agent/orchestrator/providers/mimo-oauth-tokens.mjs +239 -0
  54. package/src/runtime/agent/orchestrator/providers/mimo-oauth.mjs +233 -0
  55. package/src/runtime/agent/orchestrator/providers/muse-code-oauth-login.mjs +247 -0
  56. package/src/runtime/agent/orchestrator/providers/muse-code-oauth-tokens.mjs +225 -0
  57. package/src/runtime/agent/orchestrator/providers/muse-code-oauth.mjs +542 -0
  58. package/src/runtime/agent/orchestrator/providers/oauth-credential-probes.mjs +25 -0
  59. package/src/runtime/agent/orchestrator/providers/oauth-usage.mjs +18 -10
  60. package/src/runtime/agent/orchestrator/providers/openai-codex-model.mjs +13 -0
  61. package/src/runtime/agent/orchestrator/providers/openai-compat-chat-send.mjs +51 -11
  62. package/src/runtime/agent/orchestrator/providers/openai-compat-chat-stream.mjs +6 -1
  63. package/src/runtime/agent/orchestrator/providers/openai-compat-models.mjs +7 -5
  64. package/src/runtime/agent/orchestrator/providers/openai-compat-options.mjs +12 -0
  65. package/src/runtime/agent/orchestrator/providers/openai-compat-responses.mjs +37 -9
  66. package/src/runtime/agent/orchestrator/providers/openai-compat-wire.mjs +12 -2
  67. package/src/runtime/agent/orchestrator/providers/openai-compat.mjs +6 -1
  68. package/src/runtime/agent/orchestrator/providers/openai-oauth-catalog-store.mjs +99 -0
  69. package/src/runtime/agent/orchestrator/providers/openai-oauth-catalog.mjs +4 -8
  70. package/src/runtime/agent/orchestrator/providers/openai-oauth-login.mjs +3 -7
  71. package/src/runtime/agent/orchestrator/providers/openai-responses-payload.mjs +8 -0
  72. package/src/runtime/agent/orchestrator/providers/quota-reading.mjs +70 -0
  73. package/src/runtime/agent/orchestrator/providers/registry.mjs +42 -3
  74. package/src/runtime/agent/orchestrator/runtime-core/builtin-features.mjs +19 -35
  75. package/src/runtime/agent/orchestrator/runtime-core/effort.mjs +7 -0
  76. package/src/runtime/agent/orchestrator/runtime-core/goal-mutations.mjs +0 -17
  77. package/src/runtime/agent/orchestrator/runtime-core/goal-state.mjs +0 -3
  78. package/src/runtime/agent/orchestrator/runtime-core/goal-store.mjs +0 -1
  79. package/src/runtime/agent/orchestrator/runtime-core/goal-text.mjs +1 -1
  80. package/src/runtime/agent/orchestrator/runtime-core/goal-tool-defs.mjs +16 -2
  81. package/src/runtime/agent/orchestrator/runtime-core/goal-tool-exec.mjs +1 -2
  82. package/src/runtime/agent/orchestrator/runtime-core/goal-turns.mjs +18 -4
  83. package/src/runtime/agent/orchestrator/runtime-core/orchestration.mjs +7 -1
  84. package/src/runtime/agent/orchestrator/runtime-core/session-route-policy.mjs +16 -0
  85. package/src/runtime/agent/orchestrator/runtime-core/tool-catalog.mjs +2 -0
  86. package/src/runtime/agent/orchestrator/runtime-core/tool-defs.mjs +2 -2
  87. package/src/runtime/agent/orchestrator/runtime-core/workflow/context.mjs +7 -7
  88. package/src/runtime/agent/orchestrator/runtime-core/workflow.mjs +6 -0
  89. package/src/runtime/agent/orchestrator/session/loop/send-phase.mjs +11 -1
  90. package/src/runtime/agent/orchestrator/session/loop/step-auto-effort.mjs +28 -3
  91. package/src/runtime/agent/orchestrator/session/loop/tool-call-ids.mjs +90 -0
  92. package/src/runtime/agent/orchestrator/session/loop/tool-exec/before-hook.mjs +19 -11
  93. package/src/runtime/agent/orchestrator/session/loop/tool-phase.mjs +1 -0
  94. package/src/runtime/agent/orchestrator/session/manager/ask-turn-auto-effort.mjs +24 -11
  95. package/src/runtime/agent/orchestrator/session/manager/ask-turn-execute.mjs +2 -6
  96. package/src/runtime/agent/orchestrator/session/manager/runtime-liveness.mjs +28 -0
  97. package/src/runtime/agent/orchestrator/session/manager/session-lifecycle.mjs +63 -3
  98. package/src/runtime/agent/orchestrator/session/manager/session-prompt-composition.mjs +8 -0
  99. package/src/runtime/agent/orchestrator/session/manager/session-record.mjs +3 -0
  100. package/src/runtime/agent/orchestrator/session/manager/session-tool-surface.mjs +4 -4
  101. package/src/runtime/agent/orchestrator/session/store-agent-worker-rows.mjs +3 -0
  102. package/src/runtime/agent/orchestrator/session/tool-batch/finalize.mjs +2 -0
  103. package/src/runtime/agent/orchestrator/session/transcript-restore/restore.mjs +3 -0
  104. package/src/runtime/agent/orchestrator/session/transcript-restore/tool-result-status.mjs +23 -0
  105. package/src/runtime/agent/orchestrator/session/turn-effort.mjs +18 -0
  106. package/src/runtime/agent/orchestrator/stall-policy.mjs +0 -1
  107. package/src/runtime/agent/orchestrator/tools/builtin/arg-guard.mjs +11 -8
  108. package/src/runtime/agent/orchestrator/tools/builtin/atomic-write.mjs +27 -12
  109. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/bashism-rewrite.mjs +245 -0
  110. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/command-preflight.mjs +13 -1
  111. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/completed-result.mjs +3 -1
  112. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/invocation-plan.mjs +2 -2
  113. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/result-format.mjs +49 -0
  114. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool.mjs +3 -3
  115. package/src/runtime/agent/orchestrator/tools/builtin/builtin-tools.mjs +9 -7
  116. package/src/runtime/agent/orchestrator/tools/builtin/cache-layers.mjs +19 -20
  117. package/src/runtime/agent/orchestrator/tools/builtin/external-tool-adapters.mjs +67 -19
  118. package/src/runtime/agent/orchestrator/tools/builtin/file-version-test-helpers.mjs +11 -0
  119. package/src/runtime/agent/orchestrator/tools/builtin/file-version.mjs +13 -0
  120. package/src/runtime/agent/orchestrator/tools/builtin/git-command-tool.mjs +28 -3
  121. package/src/runtime/agent/orchestrator/tools/builtin/lib/grep-single-file-rescue.mjs +8 -5
  122. package/src/runtime/agent/orchestrator/tools/builtin/lib/shell-task-output.mjs +25 -12
  123. package/src/runtime/agent/orchestrator/tools/builtin/path-utils.mjs +73 -1
  124. package/src/runtime/agent/orchestrator/tools/builtin/raw-content-publication.mjs +17 -0
  125. package/src/runtime/agent/orchestrator/tools/builtin/read-range-index.mjs +136 -76
  126. package/src/runtime/agent/orchestrator/tools/builtin/read-single-guards.mjs +2 -2
  127. package/src/runtime/agent/orchestrator/tools/builtin/read-single-render.mjs +15 -17
  128. package/src/runtime/agent/orchestrator/tools/builtin/read-single-tool.mjs +4 -2
  129. package/src/runtime/agent/orchestrator/tools/builtin/read-snapshot-runtime.mjs +11 -10
  130. package/src/runtime/agent/orchestrator/tools/builtin/read-source-windows.mjs +5 -3
  131. package/src/runtime/agent/orchestrator/tools/builtin/read-streaming.mjs +30 -16
  132. package/src/runtime/agent/orchestrator/tools/builtin/read-tool.mjs +3 -1
  133. package/src/runtime/agent/orchestrator/tools/builtin/search-grep-tool.mjs +17 -6
  134. package/src/runtime/agent/orchestrator/tools/builtin/search-path-diagnostics.mjs +23 -5
  135. package/src/runtime/agent/orchestrator/tools/builtin/shell-jobs.mjs +93 -43
  136. package/src/runtime/agent/orchestrator/tools/builtin/snapshot-helpers.mjs +4 -11
  137. package/src/runtime/agent/orchestrator/tools/builtin/snapshot-store.mjs +7 -3
  138. package/src/runtime/agent/orchestrator/tools/builtin/snapshot-validation.mjs +16 -19
  139. package/src/runtime/agent/orchestrator/tools/builtin/task-tool.mjs +32 -6
  140. package/src/runtime/agent/orchestrator/tools/builtin.mjs +9 -2
  141. package/src/runtime/agent/orchestrator/tools/code-graph/dispatch.mjs +3 -1
  142. package/src/runtime/agent/orchestrator/tools/graph-manifest.json +13 -13
  143. package/src/runtime/agent/orchestrator/tools/lib/shell-run-background/promote-job.mjs +12 -15
  144. package/src/runtime/agent/orchestrator/tools/lib/shell-run-background.mjs +6 -3
  145. package/src/runtime/agent/orchestrator/tools/lib/shell-run-settle.mjs +14 -4
  146. package/src/runtime/agent/orchestrator/tools/lib/shell-run-state.mjs +4 -2
  147. package/src/runtime/agent/orchestrator/tools/patch/apply-patch/codex-batch.mjs +58 -8
  148. package/src/runtime/agent/orchestrator/tools/patch/content-guard.mjs +47 -0
  149. package/src/runtime/agent/orchestrator/tools/patch/delete-quarantine.mjs +155 -0
  150. package/src/runtime/agent/orchestrator/tools/patch/dispatch/native-proofs.mjs +6 -2
  151. package/src/runtime/agent/orchestrator/tools/patch/dispatch/native-snapshots.mjs +6 -2
  152. package/src/runtime/agent/orchestrator/tools/patch/dispatch.mjs +19 -16
  153. package/src/runtime/agent/orchestrator/tools/patch/matcher.mjs +13 -44
  154. package/src/runtime/agent/orchestrator/tools/patch/orchestrator.mjs +2 -2
  155. package/src/runtime/agent/orchestrator/tools/patch/post-patch-excerpts.mjs +5 -2
  156. package/src/runtime/agent/orchestrator/tools/patch/replay-capture.mjs +47 -7
  157. package/src/runtime/agent/orchestrator/tools/patch/rollback-state.mjs +72 -8
  158. package/src/runtime/agent/orchestrator/tools/patch/section-coalesce.mjs +3 -2
  159. package/src/runtime/agent/orchestrator/tools/patch/sequence/run.mjs +9 -1
  160. package/src/runtime/agent/orchestrator/tools/patch/sequence/units.mjs +9 -1
  161. package/src/runtime/agent/orchestrator/tools/patch/sequence.mjs +6 -6
  162. package/src/runtime/agent/orchestrator/tools/patch/ui-diff.mjs +16 -4
  163. package/src/runtime/agent/orchestrator/tools/patch/v4a-convert.mjs +35 -14
  164. package/src/runtime/agent/orchestrator/tools/patch/wave.mjs +42 -4
  165. package/src/runtime/agent/orchestrator/tools/shell-codepage.mjs +296 -0
  166. package/src/runtime/agent/orchestrator/tools/shell-command.mjs +124 -81
  167. package/src/runtime/agent/orchestrator/tools/shell-exec-output.mjs +75 -24
  168. package/src/runtime/agent/orchestrator/tools/shell-exec-policy.mjs +19 -4
  169. package/src/runtime/channels/lib/config.mjs +3 -8
  170. package/src/runtime/channels/lib/voice-runtime-fetcher.mjs +7 -3
  171. package/src/{tui → runtime/channels}/lib/voice-setup.mjs +38 -22
  172. package/src/runtime/channels/lib/webhook/request-handler.mjs +42 -8
  173. package/src/runtime/computer-bridge/actions.mjs +2 -0
  174. package/src/runtime/computer-bridge/client.mjs +25 -1
  175. package/src/runtime/computer-bridge/linux-action-capabilities.mjs +84 -0
  176. package/src/runtime/computer-bridge/linux-readiness.d.mts +52 -0
  177. package/src/runtime/computer-bridge/linux-readiness.mjs +411 -0
  178. package/src/runtime/computer-bridge/test-linux-display.mjs +5 -0
  179. package/src/runtime/effort-judge/compact-tokenizer.mjs +13 -8
  180. package/src/runtime/effort-judge/judge-client.mjs +12 -3
  181. package/src/runtime/effort-judge/judge-input.mjs +5 -2
  182. package/src/runtime/effort-judge/model-install.mjs +9 -3
  183. package/src/runtime/effort-judge/model-manifest.json +8 -8
  184. package/src/runtime/effort-judge/previous-human-request.mjs +162 -0
  185. package/src/runtime/effort-judge/verified-context-input.mjs +10 -0
  186. package/src/runtime/memory/lib/embedding-provider.mjs +12 -0
  187. package/src/runtime/memory/lib/embedding-worker.mjs +9 -3
  188. package/src/runtime/memory/lib/http-router/session-routes.mjs +2 -1
  189. package/src/runtime/memory/lib/memory-config-flags.mjs +3 -2
  190. package/src/runtime/memory/lib/memory-embed.mjs +5 -0
  191. package/src/runtime/memory/lib/pg/supervisor.mjs +3 -0
  192. package/src/runtime/shared/agent-route-config.mjs +50 -2
  193. package/src/runtime/shared/bounded-file-read.mjs +166 -0
  194. package/src/runtime/shared/builtin-grandfathering.mjs +37 -0
  195. package/src/runtime/shared/config.mjs +74 -6
  196. package/src/runtime/shared/defaults-separation.mjs +263 -0
  197. package/src/runtime/shared/developer-options.mjs +7 -0
  198. package/src/runtime/shared/instruction-files-mode.mjs +9 -0
  199. package/src/runtime/shared/llm/anthropic-effort.mjs +4 -0
  200. package/src/runtime/shared/llm/model-catalog.mjs +25 -1
  201. package/src/runtime/shared/llm/openai-daybreak.mjs +79 -0
  202. package/src/runtime/shared/llm/usage-ledger-rollup.mjs +105 -1
  203. package/src/runtime/shared/llm/usage-ledger-worker.mjs +2 -1
  204. package/src/runtime/shared/llm/usage-ledger.mjs +72 -5
  205. package/src/runtime/shared/onnx-runtime-support.mjs +6 -0
  206. package/src/runtime/shared/orchestration.mjs +14 -6
  207. package/src/runtime/shared/pristine-execution-contract.json +9 -0
  208. package/src/runtime/shared/pristine-execution.mjs +1 -1
  209. package/src/runtime/shared/projects.mjs +65 -48
  210. package/src/runtime/shared/provider-accounts.mjs +49 -6
  211. package/src/runtime/shared/quota-resume-store.mjs +255 -0
  212. package/src/runtime/shared/resource-admission.mjs +10 -3
  213. package/src/runtime/shared/schedule-model-ref.mjs +11 -0
  214. package/src/runtime/shared/session-approval-wait.mjs +35 -0
  215. package/src/runtime/shared/shell-display.mjs +4 -2
  216. package/src/runtime/shared/shipped-definitions.mjs +275 -0
  217. package/src/runtime/shared/tool-card-model.golden.json +3 -3
  218. package/src/runtime/shared/tool-result-summary.mjs +86 -15
  219. package/src/runtime/shared/transcript-metadata.mjs +2 -0
  220. package/src/runtime/shared/turn-review-reply.mjs +2 -0
  221. package/src/runtime/shared/turn-snapshot.mjs +65 -6
  222. package/src/runtime/shared/turn-worktree-snapshot.mjs +208 -27
  223. package/src/session-runtime/boot/apis.mjs +24 -0
  224. package/src/session-runtime/boot/config.mjs +4 -0
  225. package/src/session-runtime/boot/facade.mjs +4 -1
  226. package/src/session-runtime/boot/infrastructure.mjs +21 -2
  227. package/src/session-runtime/boot/session.mjs +3 -0
  228. package/src/session-runtime/channel-config-api.mjs +5 -0
  229. package/src/session-runtime/config-lifecycle/config-writers.mjs +3 -0
  230. package/src/session-runtime/config-lifecycle.mjs +31 -6
  231. package/src/session-runtime/goal-facade-api.mjs +4 -0
  232. package/src/session-runtime/lifecycle/inheritance.mjs +28 -6
  233. package/src/session-runtime/lifecycle/session-switch/context-switch.mjs +3 -0
  234. package/src/session-runtime/lifecycle/session-switch/resume.mjs +7 -1
  235. package/src/session-runtime/lifecycle/session-switch/session-delete.mjs +6 -0
  236. package/src/session-runtime/lifecycle/teardown/session-close.mjs +14 -2
  237. package/src/session-runtime/media-api.mjs +32 -22
  238. package/src/session-runtime/model-recency.mjs +17 -0
  239. package/src/session-runtime/model-route/route-tuning.mjs +3 -5
  240. package/src/session-runtime/model-route/set-route.mjs +49 -21
  241. package/src/session-runtime/model-route-api.mjs +2 -1
  242. package/src/session-runtime/notification-bus.mjs +31 -6
  243. package/src/session-runtime/provider-auth/login.mjs +16 -10
  244. package/src/session-runtime/provider-auth/setup.mjs +22 -2
  245. package/src/session-runtime/provider-models/catalog-load.mjs +3 -1
  246. package/src/session-runtime/provider-models/row-hydration.mjs +26 -17
  247. package/src/session-runtime/provider-readiness.mjs +4 -0
  248. package/src/session-runtime/quick-model-rows/model-meta.mjs +26 -0
  249. package/src/session-runtime/quick-model-rows/provider-rows.mjs +40 -14
  250. package/src/session-runtime/resource-api.mjs +8 -1
  251. package/src/session-runtime/runtime-core.mjs +4 -0
  252. package/src/session-runtime/runtime-facade.mjs +25 -1
  253. package/src/session-runtime/runtime-review-api.mjs +12 -1
  254. package/src/session-runtime/schedule-session-run.mjs +3 -1
  255. package/src/session-runtime/services/agent-tool/helpers.mjs +4 -0
  256. package/src/session-runtime/services/agent-tool/index-write-queue.mjs +63 -27
  257. package/src/session-runtime/services/agent-tool/job-views/agent-list.mjs +15 -3
  258. package/src/session-runtime/services/agent-tool/job-views/session-progress.mjs +2 -0
  259. package/src/session-runtime/services/agent-tool/spawn-flow/spawn-prep.mjs +11 -3
  260. package/src/session-runtime/services/agent-tool/spawn-preset.mjs +2 -0
  261. package/src/session-runtime/services/agent-tool/worker-index/approval-wait.mjs +97 -0
  262. package/src/session-runtime/services/agent-tool/worker-index/mutation-batch.mjs +4 -2
  263. package/src/session-runtime/services/agent-tool/worker-index/row-liveness.mjs +8 -2
  264. package/src/session-runtime/services/agent-tool/worker-index/row-shape.mjs +3 -0
  265. package/src/session-runtime/services/agent-tool/worker-index/row-store.mjs +58 -2
  266. package/src/session-runtime/services/agent-tool/worker-index.mjs +69 -15
  267. package/src/session-runtime/services/agent-tool/worker-rows.mjs +2 -0
  268. package/src/session-runtime/services/channel-admin.mjs +91 -15
  269. package/src/session-runtime/services/provider-admin.mjs +336 -80
  270. package/src/session-runtime/services/seeds.mjs +80 -152
  271. package/src/session-runtime/services/usage-dashboard-model.mjs +35 -0
  272. package/src/session-runtime/services/usage-dashboard.mjs +7 -0
  273. package/src/session-runtime/session-address.mjs +125 -0
  274. package/src/session-runtime/session-create.mjs +57 -2
  275. package/src/session-runtime/settings-builtin-tools-api.mjs +23 -0
  276. package/src/session-runtime/settings-compaction-api.mjs +13 -0
  277. package/src/session-runtime/setup-tool/executor.mjs +97 -40
  278. package/src/session-runtime/setup-tool/extended-actions.mjs +64 -5
  279. package/src/session-runtime/setup-tool/settings-contract.mjs +44 -1
  280. package/src/session-runtime/setup-tool/tool-defs.mjs +20 -7
  281. package/src/session-runtime/tool-policy-refresh.mjs +3 -0
  282. package/src/session-runtime/tool-surface.mjs +16 -9
  283. package/src/session-runtime/turn/session-ops.mjs +3 -0
  284. package/src/session-runtime/turn/share-ops.mjs +4 -1
  285. package/src/session-runtime/turn/turn-run/turn-prepare.mjs +6 -0
  286. package/src/session-runtime/usage-stats-api.mjs +15 -0
  287. package/src/session-runtime/webhook-session-run.mjs +3 -1
  288. package/src/session-runtime/workflow-agents-api/agent-editor.mjs +31 -5
  289. package/src/session-runtime/workflow-agents-api/agent-route.mjs +4 -0
  290. package/src/session-runtime/workflow-agents-api/workflow-packs.mjs +27 -7
  291. package/src/standalone/daemon-boot-coordinator.mjs +10 -0
  292. package/src/standalone/daemon-drain-policy.mjs +9 -0
  293. package/src/standalone/daemon-stored-session-views.mjs +7 -8
  294. package/src/standalone/daemon.mjs +21 -5
  295. package/src/standalone/local-session-runtime.mjs +11 -0
  296. package/src/standalone/session-client.mjs +52 -7
  297. package/src/standalone/session-protocol.mjs +9 -0
  298. package/src/standalone/session-service/agent-tree/agent-child.mjs +2 -0
  299. package/src/standalone/session-service/entries/lifecycle.mjs +2 -0
  300. package/src/standalone/session-service/entries/session-loads.mjs +9 -0
  301. package/src/standalone/session-service/projection/revisions.mjs +28 -4
  302. package/src/standalone/session-service/projection.mjs +1 -0
  303. package/src/standalone/session-service/quota-resume.mjs +140 -0
  304. package/src/standalone/session-service/session-calls/session-action.mjs +2 -2
  305. package/src/standalone/session-service/session-calls.mjs +10 -2
  306. package/src/standalone/session-service/stored-reader.mjs +26 -1
  307. package/src/standalone/session-service.mjs +21 -0
  308. package/src/standalone/session-transport/routes.mjs +2 -0
  309. package/src/tui/app/doctor.mjs +7 -11
  310. package/src/tui/app/maintenance-pickers/auto-clear-picker.mjs +3 -5
  311. package/src/tui/app/model-options.mjs +13 -1
  312. package/src/tui/app/model-picker/route-selection/fast-parameters.mjs +10 -4
  313. package/src/tui/app/provider-setup/oauth-actions.mjs +5 -0
  314. package/src/tui/app/settings-picker/settings-rows.mjs +4 -6
  315. package/src/tui/app/settings-picker/settings-toggles/store-toggles.mjs +1 -1
  316. package/src/tui/app/slash-dispatch/route-commands.mjs +3 -2
  317. package/src/tui/components/ContextPanel.jsx +5 -1
  318. package/src/tui/components/Spinner.jsx +34 -319
  319. package/src/tui/components/SpinnerByline.jsx +256 -0
  320. package/src/tui/components/use-spinner-progress.mjs +113 -0
  321. package/src/tui/dist/index.mjs +15421 -14283
  322. package/src/tui/session/agent-job-feed/execution-delivery.mjs +13 -1
  323. package/src/tui/session/agent-job-feed/notification-router.mjs +3 -0
  324. package/src/tui/session/agent-job-feed/pending-resume.mjs +14 -1
  325. package/src/tui/session/agent-job-feed.mjs +4 -0
  326. package/src/tui/session/context-state.mjs +15 -1
  327. package/src/tui/session/initial-state.mjs +6 -0
  328. package/src/tui/session/live-share/owner.mjs +17 -0
  329. package/src/tui/session/oauth-flows.mjs +2 -0
  330. package/src/tui/session/quota-resume.mjs +263 -0
  331. package/src/tui/session/session-api/intake/abort.mjs +39 -35
  332. package/src/tui/session/session-api/intake/submission.mjs +13 -21
  333. package/src/tui/session/session-api/intake.mjs +3 -3
  334. package/src/tui/session/session-api/integrations.mjs +13 -9
  335. package/src/tui/session/session-api/lifecycle/dispose.mjs +1 -0
  336. package/src/tui/session/session-api/lifecycle/inheritance.mjs +2 -2
  337. package/src/tui/session/session-api/lifecycle/session-reset.mjs +4 -0
  338. package/src/tui/session/session-api/lifecycle.mjs +71 -2
  339. package/src/tui/session/session-api/media.mjs +2 -2
  340. package/src/tui/session/session-api/quota-resume.mjs +21 -0
  341. package/src/tui/session/session-api/routes.mjs +4 -2
  342. package/src/tui/session/session-api/settings.mjs +2 -0
  343. package/src/tui/session/session-api.mjs +2 -0
  344. package/src/tui/session/session-flow/auto-clear.mjs +14 -6
  345. package/src/tui/session/session-flow/drain.mjs +52 -5
  346. package/src/tui/session/session-flow/queue/take-entries.mjs +2 -3
  347. package/src/tui/session/session-flow/queue.mjs +3 -0
  348. package/src/tui/session/session-flow/steering.mjs +11 -0
  349. package/src/tui/session/session-flow.mjs +1 -0
  350. package/src/tui/session/tool-approval.mjs +7 -2
  351. package/src/tui/session/tool-card-results/grouped-result.mjs +11 -2
  352. package/src/tui/session/transcript-intake.mjs +1 -0
  353. package/src/tui/session/transcript-spill/spill-dir.mjs +22 -6
  354. package/src/tui/session/turn.mjs +40 -3
  355. package/src/tui/spinner-meta.mjs +26 -10
  356. package/src/vendor/statusline/bin/statusline-route.mjs +3 -2
@@ -70,8 +70,10 @@ that a call returned without transport error.
70
70
  background cycles. Core Memory entries
71
71
  are read and changed with the `memory` tool, not setup.
72
72
  - Built-ins have installation state separate from enabled state. Browser Use,
73
- Computer Use, and voice actions require this conversation open in the local
74
- Desktop window.
73
+ Computer Use actions require this conversation open in the local Desktop
74
+ window; voice runs on the runtime and needs no Desktop.
75
+ - Hook rules are before-tool policy, separate from MCP and plugins. Deleting a
76
+ rule is destructive; disabling preserves it.
75
77
  - Desktop appearance changes affect the Desktop host, not a paired phone.
76
78
  Display language is independent of profile response language. A required
77
79
  reload is reported, never performed automatically.
@@ -82,7 +84,6 @@ that a call returned without transport error.
82
84
  be scoped to selected Projects.
83
85
  - User skills are machine-global. Enabled plugin skills and built-in skills are
84
86
  also discoverable; project-local `.mixdog/skills` directories are ignored.
85
- Use extension scope to limit where a global skill appears.
86
87
  - `set_disabled_skills` replaces the complete disabled list; inspect the
87
88
  current list before changing one entry.
88
89
 
@@ -93,8 +94,6 @@ that a call returned without transport error.
93
94
  - For an MCP failure, inspect the reported transport error before changing
94
95
  command, arguments, directory, environment, URL, headers, or enabled state.
95
96
  - MCP reads intentionally omit raw connection values that may contain secrets.
96
- Partial edits preserve those values. Use environment-variable names for
97
- credentials; never request or echo their values.
98
97
  - For an unavailable built-in, distinguish not installed, installed but
99
98
  disabled, and bridge inactive.
100
99
  - Desktop requests require a single live claimant and a confirmed receipt.
@@ -107,8 +106,6 @@ that a call returned without transport error.
107
106
 
108
107
  ## Finish
109
108
 
110
- - Do not expose secrets or internal-only configuration as supported user
111
- options.
112
- - Do not claim the current session changed when the receipt says next session.
109
+ - Do not expose internal-only configuration as a supported user option.
113
110
  - Do not commit, deploy, restart, or update the app unless separately requested
114
111
  and approved.
@@ -7,7 +7,8 @@ Read this when choosing a `setup` mutation.
7
7
  - `status` reads one domain: summary, model, agents, workflow, websearch,
8
8
  output-style, profile, autoclear, compaction, memory, features, local-provider, shell,
9
9
  providers, mcp, skills, plugins, update, onboarding, capabilities, developer,
10
- desktop, appearance, projects, connection, schedules, or webhooks.
10
+ desktop, appearance, projects, connection, schedules, webhooks, hooks, or
11
+ media.
11
12
  - `open` navigates to a supported UI surface. Read `surfaces.md` for targets and
12
13
  UI-only settings.
13
14
 
@@ -26,9 +27,10 @@ Read this when choosing a `setup` mutation.
26
27
  | Memory capability | `set_memory_enabled` |
27
28
  | Background memory cycles | `set_recap_enabled` |
28
29
  | Web Search tool exposure | `set_web_search_enabled` |
29
- | Git, Office, Code Tidy, Local Provider, Browser, Computer, or voice enabled state | `set_builtin_enabled` |
30
- | Git, Memory, Office, Code Tidy, Local Provider, Browser, Computer, or voice preparation | `install_builtin` |
31
- | Managed local model installation (use the local-provider skill) | `install_local_model` |
30
+ | Which user instruction files (AGENTS.md / CLAUDE.md) new sessions load: all, agents, claude, or off | `set_instruction_files` |
31
+ | Git, Office, Code Tidy, Local Provider, Auto Effort, Browser, Computer, or voice enabled state | `set_builtin_enabled` |
32
+ | Git, Memory, Office, Code Tidy, Local Provider, Auto Effort, Browser, Computer, or voice preparation | `install_builtin` |
33
+ | Managed local model installation | `install_local_model` |
32
34
  | Start or resume a background runtime/model download | `start_local_installation` |
33
35
  | Pause a shared local download, retaining partial files | `cancel_local_installation` |
34
36
  | Local model idle memory release (0 disables) | `set_local_idle_ttl` |
@@ -41,7 +43,7 @@ Read this when choosing a `setup` mutation.
41
43
  | TUI system shell | `set_system_shell` |
42
44
  | Automatic updates | `set_auto_update` |
43
45
  | Remove stored provider authentication (one OAuth account at a time) | `forget_provider_auth` |
44
- | Select, rename, reorder, or auto-switch OAuth accounts | `set_provider_account` |
46
+ | Select, rename, reorder, or auto-switch OAuth accounts, or allow paid credits | `set_provider_account` |
45
47
  | Developer options such as risk-gated OAuth providers | `set_developer_option` |
46
48
  | Add an MCP server | `add_mcp_server` |
47
49
  | Edit or rename an MCP server | `save_mcp_server` |
@@ -55,7 +57,7 @@ Read this when choosing a `setup` mutation.
55
57
  | Enable or disable a plugin | `set_plugin_enabled` |
56
58
  | Remove a plugin | `remove_plugin` |
57
59
  | Install or reconfigure the MCP server a plugin ships | `enable_plugin_mcp` |
58
- | Available hosted models and their options; optionally native-search capable only | `list_models` |
60
+ | Available hosted models and their options; optionally one provider, native-search capable only, or a refreshed catalog | `list_models` |
59
61
  | Agent orchestration, independent of workflow instructions | `set_orchestration_mode` |
60
62
  | Safe MCP edit metadata, excluding raw connection/credential values | `get_mcp_server` |
61
63
  | Read a workflow, agent, or skill definition | `read_definition` |
@@ -66,8 +68,12 @@ Read this when choosing a `setup` mutation.
66
68
  | Delete an existing schedule/webhook | `delete_automation` |
67
69
  | Enable/disable a schedule/webhook | `set_automation_enabled` |
68
70
  | Webhook listener enabled state, port, or domain | `set_webhook_config` |
69
- | Desktop keep-awake, run in background after window close, usage pin, or Computer observe-only state | `set_desktop_settings` |
70
- | Desktop theme, display language, or side panels | `set_appearance` |
71
+ | Desktop keep-awake, run in background after window close, turn-completion notifications, notification volume (Windows), usage pin, or Computer observe-only state | `set_desktop_settings` |
72
+ | Desktop theme, display language, side panels, markdown default view, link previews, or tool activity expansion | `set_appearance` |
73
+ | Add a before-tool hook rule | `add_hook_rule` |
74
+ | Enable or disable a hook rule by its `status hooks` index | `set_hook_rule_enabled` |
75
+ | Delete a hook rule by its `status hooks` index | `delete_hook_rule` |
76
+ | Remembered image/video lane and model used when a generation omits them | `set_media_default` |
71
77
  | Which activity rail items are pinned, in order (current list in `status desktop`) | `set_activity_rail_pins` |
72
78
  | Register a Project and optionally set its display alias | `save_project` |
73
79
  | Unregister a Project without deleting its files | `remove_project` |
@@ -79,13 +85,12 @@ Read this when choosing a `setup` mutation.
79
85
  Inspect `status model`, `status agents`, `status websearch`, or `status
80
86
  workflow` before changing the corresponding domain.
81
87
 
82
- - A partial route preserves omitted values. Main routes also accept
83
- `modelParameters` and `contextPercent`; agent routes accept `disabled`.
88
+ - Main and agent routes also accept `modelParameters` and `contextPercent`; agent routes accept `disabled`.
84
89
  Use the model catalog for actual available options, not remembered model ids.
85
90
  - A Web Search route must support native web search; tool exposure is changed
86
91
  separately.
87
- - Definition actions use `definitionKind` (workflow, agent, skill). Read first,
88
- then supply only changed fields. Workflow/agent ids cannot be renamed through
92
+ - Definition actions use `definitionKind` (workflow, agent, skill).
93
+ Workflow/agent ids cannot be renamed through
89
94
  a save; change their display name instead. User skills may be renamed with
90
95
  `originalName` and `name`. Skill deletion is not exposed; disable it instead.
91
96
  Built-in and plugin skills accept only `toolDependencies` edits (`null`
@@ -94,11 +99,12 @@ workflow` before changing the corresponding domain.
94
99
 
95
100
  ## Providers and authentication
96
101
 
97
- Use `status providers` for authenticated state and source. Never request secret
98
- values through chat.
102
+ Use `status providers` for authenticated state and source.
99
103
 
100
104
  - API-key and OAuth providers: `open providers`, then the user completes
101
105
  authentication in the visible UI.
106
+ - Custom providers are registered, tested, and removed in the Providers UI;
107
+ `status providers` lists them as API rows with `custom: true`.
102
108
  - Local Provider is installed and enabled as a Built-in. Its endpoint is
103
109
  Mixdog-managed and is never configured by the user.
104
110
  Use the `local-provider` skill for hardware checks, model selection, downloads,
@@ -108,12 +114,11 @@ values through chat.
108
114
  It removes one OAuth account; a provider with several accounts requires
109
115
  `accountId` from the account list in `status providers`.
110
116
  - `set_provider_account` changes the selected account, automatic switching,
111
- account order (every account id exactly once), or an account label. Sign-in
117
+ paid-credit use after plan limits (`useCredits`), account order (every account id exactly once), or an account label. Sign-in
112
118
  for a new account still happens in the Providers UI.
113
119
  - `status developer` lists developer options. An option with a `warning` is
114
120
  enabled only after the user explicitly accepts that warning, passed as
115
121
  `riskAccepted:true`; never assume acceptance.
116
- - Usage sign-in is completed on the Usage or Providers surface.
117
122
 
118
123
  ## Profile, session, and Memory
119
124
 
@@ -125,8 +130,8 @@ values through chat.
125
130
  duration; `provider: "default"` sets the fallback for providers without a
126
131
  built-in window. A reset and a duration are mutually exclusive; provider
127
132
  reset requires a provider.
128
- - Compaction supports `enabled` and either `mainBufferTokens` or
129
- `mainBufferPercent`. Changing representation replaces the previous budget.
133
+ - Compaction supports `enabled` and a `compaction` object with either
134
+ `mainBufferTokens` or `mainBufferPercent`. Changing representation replaces the previous budget.
130
135
  - If no supported action exposes a requested Memory interval, report it as
131
136
  unavailable rather than editing configuration.
132
137
 
@@ -134,9 +139,10 @@ values through chat.
134
139
 
135
140
  Read `status features` and distinguish installation, enabled state, and live
136
141
  bridge state. `status features` covers Git, Memory, Office, Code Tidy, Local
137
- Provider and Web Search plus Browser/Computer bridge activity; voice status and
138
- the Browser Use / Computer Use installed and enabled markers are read with
139
- `status desktop`.
142
+ Provider, Auto Effort and Web Search plus Browser/Computer/Terminal bridge
143
+ activity and voice state (enabled, runtime installed, missing whisper/model/
144
+ ffmpeg components); the Browser Use / Computer Use installed and enabled
145
+ markers are read with `status desktop`.
140
146
 
141
147
  - Git, Memory, Office, and Local Provider are install-first capabilities.
142
148
  - Git and Office installation run on the Desktop when this conversation is
@@ -146,18 +152,43 @@ the Browser Use / Computer Use installed and enabled markers are read with
146
152
  (Office fonts only), so system Git and LibreOffice must already be present.
147
153
  - Memory installation downloads the embedding model; an offline or failed
148
154
  download fails the install.
149
- - Browser Use, Computer Use, and voice installation/toggles use the same
155
+ - Auto Effort is on by default where supported; it picks each turn's
156
+ reasoning effort with a local judge model downloaded in the background.
157
+ Enabling or installing it fails on unsupported machines; `status features`
158
+ reports `supported`, `installing` (judge download running) and `ready`.
159
+ - Terminal follows the live Desktop terminal bridge and has no toggle.
160
+ - Browser Use and Computer Use installation/toggles use the same
150
161
  `install_builtin` and `set_builtin_enabled` actions through a live Desktop
151
162
  receipt. Computer Use runs on Windows, macOS, and Linux desktops. These
152
163
  actions do not approve OS permission dialogs on the user's behalf.
164
+ - Voice runs on the runtime, with or without a Desktop window. Enabling it
165
+ (`set_builtin_enabled` true or `install_builtin`) first downloads any missing
166
+ whisper runtime, model, or ffmpeg, which can take minutes; a failed or
167
+ already-running install fails the action. Disabling keeps the installed
168
+ runtime. `status features` reports `installing` while a download runs.
169
+
170
+ ## Hooks and media
171
+
172
+ - `status hooks` lists before-tool rules with their `index`, plus configured
173
+ lifecycle events, config sources and errors. Argument edits are reported
174
+ only as `hasArgumentEdit`; their contents are never returned. Indexes shift
175
+ after a delete;
176
+ re-read status before addressing another rule.
177
+ - `add_hook_rule` takes `action` (allow, deny, block, modify, rewrite, ask)
178
+ and optional `tool`, `match`, `cwd`, `reason`. modify/rewrite need exactly
179
+ one of `patch` (merged into the arguments) or `args` (replaces them).
180
+ - `delete_hook_rule` is destructive and requires explicit approval for the
181
+ named rule; disabling with `set_hook_rule_enabled` preserves it.
182
+ - `status media` shows the remembered lane/model per kind. `set_media_default`
183
+ accepts only a signed-in lane that offers the kind (and the model, when
184
+ given) in the live media catalog; the media tool's `list` reads that catalog.
153
185
  - Environment feature overrides are diagnostics for headless or benchmark
154
186
  environments, not ordinary user settings.
155
187
 
156
188
  ## Skills, MCP, and plugins
157
189
 
158
190
  - `status skills` plus `set_disabled_skills` manage activation.
159
- - User skills live in the machine-global Mixdog data skills directory;
160
- `set_extension_scope` limits a global item to selected Project roots.
191
+ - `set_extension_scope` limits a global item to selected Project roots.
161
192
  - Plugin scope is inherited by the skills and MCP integrations it contributes.
162
193
  - MCP mutation results include reconnection state. Diagnose the returned error
163
194
  before making another change.
@@ -177,17 +208,17 @@ the Browser Use / Computer Use installed and enabled markers are read with
177
208
 
178
209
  - `status capabilities` lists supported actions and deliberate handoffs.
179
210
  - Desktop-only operations require the owning conversation visible in the local
180
- Desktop app. They affect the Desktop host, not a paired phone. Never claim a
181
- persisted change from merely delivering a request.
182
- - A display-language change returns `requiresReload`; setup does not reload,
183
- quit, deploy, or restart the app.
211
+ Desktop app. Never claim a persisted change from merely delivering a request.
212
+ - A display-language change returns `requiresReload`.
184
213
  - A Project removal unregisters it only.
185
214
  - Inspect schedules/webhooks before editing. `overwrite:true` updates an
186
215
  existing named entry and preserves omitted fields; a new schedule needs
187
- instructions plus exactly one of cron `time` or one-shot `at`.
216
+ instructions, a `model` (no default-model fallback), and exactly one of cron
217
+ `time` or one-shot `at`.
188
218
  - Attachment contents and webhook signing secrets are not returned by setup.
189
- Omitted attachments and existing webhook secrets are preserved. Copy a
190
- signing secret through the Webhooks UI, never chat.
219
+ Omitted attachments and existing webhook secrets are preserved. A saved
220
+ secret is never shown again: tell the user to open the Webhooks panel, edit
221
+ the webhook, press Regenerate secret, copy the new value, and save.
191
222
  - Enabling or creating automation may start its background worker. This is a
192
223
  persisted automation change, not permission to run an unrelated task now.
193
224
 
@@ -36,8 +36,11 @@ An attached Desktop or TUI may navigate and return `opened:true`.
36
36
  - Settings → General: profile, Web Search exposure, display language, theme,
37
37
  side panels, and notifications.
38
38
  - Settings → Context: auto-compact and auto-clear.
39
- - Settings → Output style: output style selection.
40
- - Settings → Providers: API-key, OAuth, local providers, and usage sign-in.
39
+ - Settings → Output style: output style selection, plus the desktop-only
40
+ "Expand tool activity" choice (collapsed / commands and edits / everything),
41
+ saved per device; Ctrl+O toggles everything open for the current window.
42
+ - Settings → Providers: API-key, OAuth, custom provider registration, local
43
+ providers, and usage sign-in.
41
44
  - Extensions → Plugin → Git & GitHub: Git/GitHub CLI installation and connection.
42
45
  - Settings → Connection: web-app pairing and linked devices.
43
46
  - Settings → System: update, keep-awake, run in background after the window
@@ -53,11 +56,12 @@ the user to Desktop.
53
56
 
54
57
  ## Desktop-backed settings
55
58
 
56
- Setup can read and change Desktop appearance, keep-awake, run in background,
57
- usage pin, activity rail pins, Computer observe-only, Browser/Computer/voice installation and
58
- toggles, Projects, and linked-device revocation through the attached
59
- Desktop. A receipt identifies `scope:desktop-host`; appearance is not applied
60
- to the paired browser. No Desktop claimant means no confirmed change.
59
+ Setup can read and change Desktop appearance (including markdown default
60
+ view, link previews, and tool activity expansion), keep-awake, run in
61
+ background, turn-completion notifications, notification volume (Windows),
62
+ usage pin, activity rail pins, Computer observe-only, Browser/Computer
63
+ installation and toggles, Projects, and linked-device revocation through the
64
+ attached Desktop. A receipt identifies `scope:desktop-host`.
61
65
 
62
66
  Computer observe-only and background Memory cycles (`set_recap_enabled`)
63
67
  have no settings control in either app; setup is their only supported route. Usage pin is the pin toggle on the activity rail usage card.
@@ -74,12 +78,10 @@ The setup tool does not mutate:
74
78
  - web-app pairing credentials and OS permission dialogs;
75
79
  - TUI-local theme palettes (use `/theme`; Desktop themes are separate).
76
80
 
77
- Use `open` where a target exists, then let the user act. Never simulate a
78
- missing or denied operation by editing storage or switching surfaces.
81
+ Use `open` where a target exists, then let the user act.
79
82
 
80
83
  ## TUI notes
81
84
 
82
85
  The TUI settings hub exposes system shell in addition to common settings.
83
86
  Desktop-host actions need the Desktop app; opening the TUI is not a substitute.
84
- Use the schema and `status capabilities` as the supported API boundary.
85
87