mixdog 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/README.md +7 -5
  2. package/package.json +1 -1
  3. package/scripts/gate-local.mjs +19 -3
  4. package/scripts/model-catalog-audit.mjs +1 -15
  5. package/src/agents/reviewer/AGENT.md +3 -3
  6. package/src/agents/reviewer/agent.json +1 -1
  7. package/src/defaults/shipped-history.json +5 -0
  8. package/src/defaults/skills/pptx/SKILL.md +6 -6
  9. package/src/defaults/skills/pptx/references/review.md +6 -4
  10. package/src/defaults/skills/pptx/scripts/source-extract.mjs +1 -1
  11. package/src/defaults/skills/setup/references/actions.md +13 -3
  12. package/src/defaults/skills/visualize/SKILL.md +12 -9
  13. package/src/repl/slash-commands.mjs +16 -1
  14. package/src/rules/shared/60-verification.md +3 -1
  15. package/src/rules/shared/70-delivery.md +4 -2
  16. package/src/runtime/agent/orchestrator/agent-runtime/agent-progress-watchdog.mjs +29 -4
  17. package/src/runtime/agent/orchestrator/agent-runtime/cache-strategy.mjs +10 -0
  18. package/src/runtime/agent/orchestrator/cache-mtime.mjs +26 -5
  19. package/src/runtime/agent/orchestrator/config.mjs +10 -4
  20. package/src/runtime/agent/orchestrator/context/collect.mjs +2 -1
  21. package/src/runtime/agent/orchestrator/context/deferred-tools.mjs +11 -5
  22. package/src/runtime/agent/orchestrator/context/skill-catalog.mjs +74 -21
  23. package/src/runtime/agent/orchestrator/mcp/client-config.mjs +122 -15
  24. package/src/runtime/agent/orchestrator/mcp/client-handshake.mjs +54 -11
  25. package/src/runtime/agent/orchestrator/mcp/client-transport.mjs +104 -9
  26. package/src/runtime/agent/orchestrator/mcp/client.mjs +358 -140
  27. package/src/runtime/agent/orchestrator/mcp/lazy-output-validator.mjs +25 -0
  28. package/src/runtime/agent/orchestrator/mcp/oauth-callback.mjs +103 -0
  29. package/src/runtime/agent/orchestrator/mcp/oauth-credentials.mjs +150 -0
  30. package/src/runtime/agent/orchestrator/mcp/oauth-login.mjs +111 -0
  31. package/src/runtime/agent/orchestrator/mcp/oauth-probe.mjs +87 -0
  32. package/src/runtime/agent/orchestrator/mcp/oauth-provider.mjs +95 -0
  33. package/src/runtime/agent/orchestrator/mcp/oauth-request.mjs +122 -0
  34. package/src/runtime/agent/orchestrator/mcp/oauth-shared.mjs +9 -0
  35. package/src/runtime/agent/orchestrator/mcp/oauth.mjs +229 -0
  36. package/src/runtime/agent/orchestrator/mcp/plugin-placeholders.mjs +54 -0
  37. package/src/runtime/agent/orchestrator/providers/account-pool.mjs +294 -44
  38. package/src/runtime/agent/orchestrator/providers/anthropic-api-recovery.mjs +2 -1
  39. package/src/runtime/agent/orchestrator/providers/anthropic-api-transport.mjs +94 -31
  40. package/src/runtime/agent/orchestrator/providers/anthropic-error-contract.mjs +96 -0
  41. package/src/runtime/agent/orchestrator/providers/anthropic-fast-mode.mjs +39 -18
  42. package/src/runtime/agent/orchestrator/providers/anthropic-max-tokens-recovery.mjs +55 -0
  43. package/src/runtime/agent/orchestrator/providers/anthropic-max-tokens.mjs +25 -21
  44. package/src/runtime/agent/orchestrator/providers/anthropic-messages.mjs +3 -1
  45. package/src/runtime/agent/orchestrator/providers/anthropic-midstream-recovery.mjs +18 -4
  46. package/src/runtime/agent/orchestrator/providers/anthropic-model-resolve.mjs +13 -1
  47. package/src/runtime/agent/orchestrator/providers/anthropic-oauth-client-version.mjs +1 -1
  48. package/src/runtime/agent/orchestrator/providers/anthropic-oauth-midstream.mjs +10 -1
  49. package/src/runtime/agent/orchestrator/providers/anthropic-oauth-recovery.mjs +23 -9
  50. package/src/runtime/agent/orchestrator/providers/anthropic-oauth-request/initial-status.mjs +46 -20
  51. package/src/runtime/agent/orchestrator/providers/anthropic-oauth-request.mjs +14 -9
  52. package/src/runtime/agent/orchestrator/providers/anthropic-oauth.mjs +73 -35
  53. package/src/runtime/agent/orchestrator/providers/anthropic-overload-fallback.mjs +69 -0
  54. package/src/runtime/agent/orchestrator/providers/anthropic-server-fallback.mjs +4 -0
  55. package/src/runtime/agent/orchestrator/providers/anthropic-sse.mjs +8 -1
  56. package/src/runtime/agent/orchestrator/providers/anthropic.mjs +53 -18
  57. package/src/runtime/agent/orchestrator/providers/antigravity-oauth-catalog.mjs +30 -9
  58. package/src/runtime/agent/orchestrator/providers/antigravity-oauth.mjs +7 -0
  59. package/src/runtime/agent/orchestrator/providers/antigravity-request.mjs +30 -14
  60. package/src/runtime/agent/orchestrator/providers/antigravity-response.mjs +2 -1
  61. package/src/runtime/agent/orchestrator/providers/antigravity-retry-policy.mjs +93 -0
  62. package/src/runtime/agent/orchestrator/providers/antigravity-transport.mjs +82 -9
  63. package/src/runtime/agent/orchestrator/providers/auto-effort.mjs +9 -0
  64. package/src/runtime/agent/orchestrator/providers/command-code-oauth-login.mjs +337 -0
  65. package/src/runtime/agent/orchestrator/providers/command-code-oauth-tokens.mjs +159 -0
  66. package/src/runtime/agent/orchestrator/providers/command-code-oauth.mjs +447 -0
  67. package/src/runtime/agent/orchestrator/providers/cursor-auth.mjs +38 -5
  68. package/src/runtime/agent/orchestrator/providers/cursor-client-version.mjs +1 -1
  69. package/src/runtime/agent/orchestrator/providers/cursor-wire-guards.mjs +97 -2
  70. package/src/runtime/agent/orchestrator/providers/cursor-wire-stream-bridge.mjs +102 -23
  71. package/src/runtime/agent/orchestrator/providers/cursor-wire-transport.mjs +103 -33
  72. package/src/runtime/agent/orchestrator/providers/cursor-wire.mjs +29 -6
  73. package/src/runtime/agent/orchestrator/providers/cursor.mjs +18 -1
  74. package/src/runtime/agent/orchestrator/providers/custom-provider.mjs +7 -4
  75. package/src/runtime/agent/orchestrator/providers/effort-configuration.mjs +86 -19
  76. package/src/runtime/agent/orchestrator/providers/gemini-cache-policy.mjs +1 -1
  77. package/src/runtime/agent/orchestrator/providers/gemini-cache.mjs +29 -8
  78. package/src/runtime/agent/orchestrator/providers/gemini-error-contract.mjs +191 -0
  79. package/src/runtime/agent/orchestrator/providers/gemini-family.mjs +9 -0
  80. package/src/runtime/agent/orchestrator/providers/gemini-history-signatures.mjs +9 -4
  81. package/src/runtime/agent/orchestrator/providers/gemini-response.mjs +3 -1
  82. package/src/runtime/agent/orchestrator/providers/gemini-retry-policy.mjs +180 -0
  83. package/src/runtime/agent/orchestrator/providers/gemini-schema.mjs +21 -82
  84. package/src/runtime/agent/orchestrator/providers/gemini-sdk-request.mjs +4 -1
  85. package/src/runtime/agent/orchestrator/providers/gemini-stream.mjs +71 -12
  86. package/src/runtime/agent/orchestrator/providers/gemini-thinking.mjs +21 -20
  87. package/src/runtime/agent/orchestrator/providers/gemini.mjs +97 -51
  88. package/src/runtime/agent/orchestrator/providers/grok-oauth-tokens.mjs +3 -0
  89. package/src/runtime/agent/orchestrator/providers/grok-oauth.mjs +68 -19
  90. package/src/runtime/agent/orchestrator/providers/lib/gemini-model-catalog.mjs +7 -1
  91. package/src/runtime/agent/orchestrator/providers/mimo-oauth.mjs +3 -0
  92. package/src/runtime/agent/orchestrator/providers/model-list-sanitize.mjs +2 -1
  93. package/src/runtime/agent/orchestrator/providers/model-proxy-bridge.mjs +1080 -0
  94. package/src/runtime/agent/orchestrator/providers/model-proxy-channel.d.mts +15 -0
  95. package/src/runtime/agent/orchestrator/providers/model-proxy-channel.mjs +35 -0
  96. package/src/runtime/agent/orchestrator/providers/muse-code-oauth.mjs +4 -9
  97. package/src/runtime/agent/orchestrator/providers/oauth-credential-probes.mjs +12 -0
  98. package/src/runtime/agent/orchestrator/providers/oauth-usage.mjs +6 -5
  99. package/src/runtime/agent/orchestrator/providers/openai-compat-chat-send.mjs +5 -3
  100. package/src/runtime/agent/orchestrator/providers/openai-compat-chat-stream/stream-result.mjs +22 -0
  101. package/src/runtime/agent/orchestrator/providers/openai-compat-chat-stream.mjs +1 -0
  102. package/src/runtime/agent/orchestrator/providers/openai-compat-error-contract.mjs +50 -0
  103. package/src/runtime/agent/orchestrator/providers/openai-compat-models.mjs +6 -2
  104. package/src/runtime/agent/orchestrator/providers/openai-compat-options.mjs +11 -0
  105. package/src/runtime/agent/orchestrator/providers/openai-compat-response-normalization.mjs +23 -0
  106. package/src/runtime/agent/orchestrator/providers/openai-compat-responses-events.mjs +16 -8
  107. package/src/runtime/agent/orchestrator/providers/openai-compat-responses-state.mjs +3 -2
  108. package/src/runtime/agent/orchestrator/providers/openai-compat-responses.mjs +94 -13
  109. package/src/runtime/agent/orchestrator/providers/openai-compat-retry-profile.mjs +193 -0
  110. package/src/runtime/agent/orchestrator/providers/openai-compat-stream-common.mjs +66 -2
  111. package/src/runtime/agent/orchestrator/providers/openai-compat-stream.mjs +2 -1
  112. package/src/runtime/agent/orchestrator/providers/openai-compat-wire.mjs +6 -0
  113. package/src/runtime/agent/orchestrator/providers/openai-compat-xai-send.mjs +6 -3
  114. package/src/runtime/agent/orchestrator/providers/openai-compat-xai.mjs +23 -14
  115. package/src/runtime/agent/orchestrator/providers/openai-compat.mjs +26 -6
  116. package/src/runtime/agent/orchestrator/providers/openai-direct-request.mjs +42 -25
  117. package/src/runtime/agent/orchestrator/providers/openai-error-contract.mjs +274 -0
  118. package/src/runtime/agent/orchestrator/providers/openai-http-sse-request.mjs +72 -32
  119. package/src/runtime/agent/orchestrator/providers/openai-http-sse-response-state/response-events/terminal-frames.mjs +18 -11
  120. package/src/runtime/agent/orchestrator/providers/openai-http-sse-response-state/response-outcome.mjs +1 -2
  121. package/src/runtime/agent/orchestrator/providers/openai-http-sse-response-state/response-stamps.mjs +2 -2
  122. package/src/runtime/agent/orchestrator/providers/openai-http-sse-response-state/response-state.mjs +2 -3
  123. package/src/runtime/agent/orchestrator/providers/openai-http-sse-response-state.mjs +2 -2
  124. package/src/runtime/agent/orchestrator/providers/openai-http-sse-watchdogs.mjs +1 -3
  125. package/src/runtime/agent/orchestrator/providers/openai-oauth-dispatch.mjs +34 -3
  126. package/src/runtime/agent/orchestrator/providers/openai-oauth-http-sse.mjs +5 -1
  127. package/src/runtime/agent/orchestrator/providers/openai-oauth-tokens.mjs +22 -2
  128. package/src/runtime/agent/orchestrator/providers/openai-oauth.mjs +5 -0
  129. package/src/runtime/agent/orchestrator/providers/openai-responses-input.mjs +5 -9
  130. package/src/runtime/agent/orchestrator/providers/openai-retry-policy.mjs +9 -0
  131. package/src/runtime/agent/orchestrator/providers/openai-ws-handshake.mjs +16 -8
  132. package/src/runtime/agent/orchestrator/providers/openai-ws-send-attempts/attempt-context.mjs +1 -2
  133. package/src/runtime/agent/orchestrator/providers/openai-ws-send-attempts/policy.mjs +25 -14
  134. package/src/runtime/agent/orchestrator/providers/openai-ws-terminal.mjs +18 -11
  135. package/src/runtime/agent/orchestrator/providers/openai-ws.mjs +35 -24
  136. package/src/runtime/agent/orchestrator/providers/provider-error-kind.mjs +581 -0
  137. package/src/runtime/agent/orchestrator/providers/registry.mjs +35 -9
  138. package/src/runtime/agent/orchestrator/providers/retry-backoff.mjs +46 -7
  139. package/src/runtime/agent/orchestrator/providers/retry-classification.mjs +118 -219
  140. package/src/runtime/agent/orchestrator/providers/retry-classifier.mjs +2 -0
  141. package/src/runtime/agent/orchestrator/providers/retry-executor.mjs +148 -45
  142. package/src/runtime/agent/orchestrator/providers/retry-midstream.mjs +81 -16
  143. package/src/runtime/agent/orchestrator/runtime-core/config-helpers.mjs +3 -0
  144. package/src/runtime/agent/orchestrator/runtime-core/effort.mjs +3 -0
  145. package/src/runtime/agent/orchestrator/runtime-core/extension-scopes.mjs +15 -55
  146. package/src/runtime/agent/orchestrator/runtime-core/goal-control.mjs +15 -2
  147. package/src/runtime/agent/orchestrator/runtime-core/goal-reminder.mjs +0 -18
  148. package/src/runtime/agent/orchestrator/runtime-core/model-capabilities.mjs +57 -28
  149. package/src/runtime/agent/orchestrator/runtime-core/orchestration.mjs +19 -16
  150. package/src/runtime/agent/orchestrator/runtime-core/plugin-mcp.mjs +268 -181
  151. package/src/runtime/agent/orchestrator/runtime-core/skill-tool-loading.mjs +4 -1
  152. package/src/runtime/agent/orchestrator/runtime-core/tool-catalog-schema.mjs +21 -0
  153. package/src/runtime/agent/orchestrator/runtime-core/tool-catalog.mjs +54 -3
  154. package/src/runtime/agent/orchestrator/session/catalog-db/index.mjs +284 -0
  155. package/src/runtime/agent/orchestrator/session/catalog-db/schema.mjs +270 -0
  156. package/src/runtime/agent/orchestrator/session/catalog-db/sqlite-gate.mjs +27 -0
  157. package/src/runtime/agent/orchestrator/session/catalog-db/worker.mjs +628 -0
  158. package/src/runtime/agent/orchestrator/session/compact/messages.mjs +6 -2
  159. package/src/runtime/agent/orchestrator/session/conversation-import/claude.mjs +184 -0
  160. package/src/runtime/agent/orchestrator/session/conversation-import/codex.mjs +136 -0
  161. package/src/runtime/agent/orchestrator/session/conversation-import/convert.mjs +128 -0
  162. package/src/runtime/agent/orchestrator/session/conversation-import/imported-session.mjs +127 -0
  163. package/src/runtime/agent/orchestrator/session/conversation-import/turns.mjs +101 -0
  164. package/src/runtime/agent/orchestrator/session/explicit-skills.mjs +83 -5
  165. package/src/runtime/agent/orchestrator/session/imported-message.mjs +11 -0
  166. package/src/runtime/agent/orchestrator/session/loop/completion-guards.mjs +2 -1
  167. package/src/runtime/agent/orchestrator/session/loop/loop-state.mjs +1 -1
  168. package/src/runtime/agent/orchestrator/session/loop/no-tool-turn.mjs +3 -2
  169. package/src/runtime/agent/orchestrator/session/loop/send-phase.mjs +10 -4
  170. package/src/runtime/agent/orchestrator/session/loop/steering.mjs +4 -3
  171. package/src/runtime/agent/orchestrator/session/loop/step-auto-effort.mjs +102 -18
  172. package/src/runtime/agent/orchestrator/session/loop/tool-helpers.mjs +3 -0
  173. package/src/runtime/agent/orchestrator/session/loop/tool-phase.mjs +3 -1
  174. package/src/runtime/agent/orchestrator/session/manager/ask-queue.mjs +42 -5
  175. package/src/runtime/agent/orchestrator/session/manager/ask-session.mjs +14 -3
  176. package/src/runtime/agent/orchestrator/session/manager/ask-turn-auto-effort.mjs +20 -12
  177. package/src/runtime/agent/orchestrator/session/manager/ask-turn-execute.mjs +50 -23
  178. package/src/runtime/agent/orchestrator/session/manager/ask-turn-loop-options.mjs +4 -0
  179. package/src/runtime/agent/orchestrator/session/manager/pending-message-entry.mjs +22 -14
  180. package/src/runtime/agent/orchestrator/session/manager/session-close.mjs +1 -1
  181. package/src/runtime/agent/orchestrator/session/manager/turn-interruption.mjs +18 -7
  182. package/src/runtime/agent/orchestrator/session/manager.mjs +0 -1
  183. package/src/runtime/agent/orchestrator/session/pre-send-compact.mjs +4 -3
  184. package/src/runtime/agent/orchestrator/session/send-with-recovery.mjs +155 -29
  185. package/src/runtime/agent/orchestrator/session/store/listing.mjs +6 -2
  186. package/src/runtime/agent/orchestrator/session/store/save-worker.mjs +6 -3
  187. package/src/runtime/agent/orchestrator/session/store/summary-cache.mjs +6 -0
  188. package/src/runtime/agent/orchestrator/session/store/write-guards.mjs +16 -0
  189. package/src/runtime/agent/orchestrator/session/store-agent-worker-rows.mjs +22 -10
  190. package/src/runtime/agent/orchestrator/session/store-summary-catalog.mjs +819 -0
  191. package/src/runtime/agent/orchestrator/session/store-summary-fields.mjs +12 -0
  192. package/src/runtime/agent/orchestrator/session/store-summary-index.mjs +22 -12
  193. package/src/runtime/agent/orchestrator/session/store-summary-reader-catalog-fixture.mjs +158 -0
  194. package/src/runtime/agent/orchestrator/session/store-summary-reader.mjs +183 -374
  195. package/src/runtime/agent/orchestrator/session/synthetic-user-envelope.mjs +3 -1
  196. package/src/runtime/agent/orchestrator/session/tool-batch/pre-dispatch.mjs +1 -1
  197. package/src/runtime/agent/orchestrator/session/transcript-restore/restore.mjs +41 -3
  198. package/src/runtime/agent/orchestrator/session/transcript-restore/user-text.mjs +38 -17
  199. package/src/runtime/agent/orchestrator/tools/builtin/arg-guard.mjs +2 -2
  200. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/deadline-plan.mjs +12 -15
  201. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/invocation-plan.mjs +17 -1
  202. package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/spawn-env.mjs +4 -0
  203. package/src/runtime/agent/orchestrator/tools/builtin/builtin-tools.mjs +5 -5
  204. package/src/runtime/agent/orchestrator/tools/builtin/lib/list-helpers.mjs +2 -2
  205. package/src/runtime/agent/orchestrator/tools/builtin/path-diagnostics.mjs +6 -6
  206. package/src/runtime/agent/orchestrator/tools/builtin/read-range-index.mjs +173 -22
  207. package/src/runtime/agent/orchestrator/tools/builtin/read-single-guards.mjs +8 -4
  208. package/src/runtime/agent/orchestrator/tools/builtin/read-single-tool.mjs +5 -4
  209. package/src/runtime/agent/orchestrator/tools/builtin/read-source-windows.mjs +15 -2
  210. package/src/runtime/agent/orchestrator/tools/builtin/search-glob-tool.mjs +13 -10
  211. package/src/runtime/agent/orchestrator/tools/builtin/search-grep-tool.mjs +1 -1
  212. package/src/runtime/agent/orchestrator/tools/builtin/search-path-diagnostics.mjs +17 -12
  213. package/src/runtime/agent/orchestrator/tools/code-graph/dispatch/root-resolution.mjs +2 -2
  214. package/src/runtime/agent/orchestrator/tools/code-graph/dispatch.mjs +1 -1
  215. package/src/runtime/agent/orchestrator/tools/patch/apply-patch/codex-batch.mjs +4 -4
  216. package/src/runtime/agent/orchestrator/tools/patch/apply-patch/route.mjs +2 -2
  217. package/src/runtime/agent/orchestrator/tools/patch/orchestrator.mjs +1 -1
  218. package/src/runtime/agent/orchestrator/tools/patch/read-redirects.mjs +34 -30
  219. package/src/runtime/agent/orchestrator/tools/patch/sequence/units.mjs +7 -7
  220. package/src/runtime/agent/orchestrator/tools/patch/sequence.mjs +1 -1
  221. package/src/runtime/agent/orchestrator/tools/shell-snapshot.mjs +4 -0
  222. package/src/runtime/attachments/store.d.mts +3 -0
  223. package/src/runtime/channels/lib/owned-runtime/owned-start.mjs +1 -1
  224. package/src/runtime/channels/lib/webhook/session-dispatch.mjs +16 -4
  225. package/src/runtime/channels/lib/worker-main.mjs +17 -14
  226. package/src/runtime/computer-bridge/linux-readiness.mjs +0 -2
  227. package/src/runtime/effort-judge/judge-client.mjs +56 -18
  228. package/src/runtime/memory/lib/memory.mjs +1 -1
  229. package/src/runtime/memory/lib/pg/process.mjs +34 -24
  230. package/src/runtime/memory/lib/pg/supervisor.mjs +16 -13
  231. package/src/runtime/memory/lib/session-ingest.mjs +2 -2
  232. package/src/runtime/office/README.md +1 -1
  233. package/src/runtime/office/shared/values.mjs +0 -5
  234. package/src/runtime/shared/atomic-file.mjs +25 -4
  235. package/src/runtime/shared/background-tasks.mjs +92 -14
  236. package/src/runtime/shared/err-text.mjs +25 -0
  237. package/src/runtime/shared/error-presentation.mjs +159 -19
  238. package/src/runtime/shared/extension-scopes.mjs +5 -3
  239. package/src/runtime/shared/file-lock.mjs +37 -11
  240. package/src/runtime/shared/llm/anthropic-betas.mjs +4 -3
  241. package/src/runtime/shared/llm/anthropic-effort.mjs +134 -131
  242. package/src/runtime/shared/llm/anthropic-thinking-contract.mjs +50 -14
  243. package/src/runtime/shared/llm/model-catalog.mjs +53 -52
  244. package/src/runtime/shared/llm/openai-daybreak.mjs +4 -16
  245. package/src/runtime/shared/llm/provider-catalog-registry.mjs +17 -0
  246. package/src/runtime/shared/llm/provider-model-identities.mjs +13 -4
  247. package/src/runtime/shared/llm/usage-rollup.mjs +0 -1
  248. package/src/runtime/shared/model-display.mjs +13 -0
  249. package/src/runtime/shared/plugin-manifest.mjs +18 -9
  250. package/src/runtime/shared/pristine-execution-contract.json +9 -2
  251. package/src/runtime/shared/pristine-execution.mjs +28 -4
  252. package/src/runtime/shared/provider-accounts.mjs +124 -20
  253. package/src/runtime/shared/provider-api-key.mjs +12 -0
  254. package/src/runtime/shared/quota-resume-store.mjs +11 -0
  255. package/src/runtime/shared/session-baseline-store.mjs +960 -0
  256. package/src/runtime/shared/shell-display.mjs +9 -3
  257. package/src/runtime/shared/skill-mentions.d.mts +10 -0
  258. package/src/runtime/shared/skill-mentions.mjs +133 -0
  259. package/src/runtime/shared/skill-script-runtime.mjs +264 -0
  260. package/src/runtime/shared/statusline/statusline-format.mjs +4 -4
  261. package/src/runtime/shared/task-notification-envelope.mjs +2 -2
  262. package/src/runtime/shared/tool-primitives.mjs +35 -2
  263. package/src/runtime/shared/turn-changes.mjs +447 -219
  264. package/src/runtime/shared/turn-snapshot-store.mjs +182 -1
  265. package/src/runtime/shared/turn-snapshot.mjs +170 -48
  266. package/src/runtime/shared/turn-worktree-snapshot.mjs +160 -51
  267. package/src/runtime/shared/worker-requests.mjs +15 -2
  268. package/src/runtime/shared/worktrees/contract.mjs +0 -24
  269. package/src/runtime/shared/worktrees/test-support.mjs +19 -4
  270. package/src/session-runtime/automation-agents.mjs +8 -2
  271. package/src/session-runtime/boot/apis.mjs +61 -0
  272. package/src/session-runtime/boot/config.mjs +5 -2
  273. package/src/session-runtime/boot/facade.mjs +1 -0
  274. package/src/session-runtime/boot/infrastructure.mjs +35 -18
  275. package/src/session-runtime/conversation-import/discovery.mjs +698 -0
  276. package/src/session-runtime/conversation-import/service.mjs +369 -0
  277. package/src/session-runtime/cwd-plugins/cwd-apply.mjs +10 -5
  278. package/src/session-runtime/cwd-plugins/plugin-status.mjs +47 -42
  279. package/src/session-runtime/lifecycle/session-catalog.mjs +2 -0
  280. package/src/session-runtime/lifecycle/teardown.mjs +1 -1
  281. package/src/session-runtime/mcp-glue/connect.mjs +83 -16
  282. package/src/session-runtime/mcp-glue/plugin-servers.mjs +499 -0
  283. package/src/session-runtime/mcp-glue/server-catalog.mjs +135 -33
  284. package/src/session-runtime/mcp-glue.mjs +25 -2
  285. package/src/session-runtime/mcp-oauth-login.mjs +174 -0
  286. package/src/session-runtime/model-route/model-switch-target.mjs +34 -0
  287. package/src/session-runtime/model-route/set-route.mjs +83 -15
  288. package/src/session-runtime/model-route/web-search-route.mjs +1 -1
  289. package/src/session-runtime/native-web-search/routes.mjs +22 -3
  290. package/src/session-runtime/new-session-config.mjs +3 -2
  291. package/src/session-runtime/notification-bus.mjs +9 -2
  292. package/src/session-runtime/provider-auth/accounts.mjs +33 -15
  293. package/src/session-runtime/provider-models/model-meta.mjs +12 -3
  294. package/src/session-runtime/provider-models/web-search-catalog.mjs +5 -1
  295. package/src/session-runtime/provider-readiness.mjs +16 -10
  296. package/src/session-runtime/quick-model-rows/web-search-rows.mjs +13 -8
  297. package/src/session-runtime/quick-web-search-models.mjs +13 -38
  298. package/src/session-runtime/resource-extension-sync.mjs +24 -5
  299. package/src/session-runtime/resource-mcp-api.mjs +198 -78
  300. package/src/session-runtime/resource-plugins-api.mjs +29 -41
  301. package/src/session-runtime/resource-scope-decorate.mjs +6 -8
  302. package/src/session-runtime/resource-skills-api.mjs +23 -2
  303. package/src/session-runtime/runtime-review-api.mjs +13 -0
  304. package/src/session-runtime/schedule-session-run.mjs +1 -1
  305. package/src/session-runtime/services/agent-tool/job-task-reconcile.mjs +13 -1
  306. package/src/session-runtime/services/agent-tool/job-views/agent-list.mjs +7 -2
  307. package/src/session-runtime/services/agent-tool/send-flow.mjs +22 -4
  308. package/src/session-runtime/services/agent-tool/spawn-flow/job-start.mjs +2 -0
  309. package/src/session-runtime/services/agent-tool/spawn-flow/spawn-run.mjs +22 -5
  310. package/src/session-runtime/services/agent-tool/worker-index/row-liveness.mjs +8 -1
  311. package/src/session-runtime/services/agent-tool/worker-index/row-shape.mjs +2 -2
  312. package/src/session-runtime/services/agent-tool/worker-rows.mjs +17 -0
  313. package/src/session-runtime/services/channel-session-router.mjs +4 -1
  314. package/src/session-runtime/services/hook-bus/command-handler.mjs +4 -1
  315. package/src/session-runtime/services/hook-bus/handlers.mjs +7 -3
  316. package/src/session-runtime/services/provider-admin.mjs +64 -18
  317. package/src/session-runtime/services/usage-dashboard-model.mjs +3 -0
  318. package/src/session-runtime/settings-compaction-api.mjs +1 -0
  319. package/src/session-runtime/setup-tool/executor.mjs +12 -1
  320. package/src/session-runtime/setup-tool/extended-actions.mjs +1 -0
  321. package/src/session-runtime/setup-tool/settings-contract.mjs +1 -0
  322. package/src/session-runtime/setup-tool/tool-defs.mjs +7 -1
  323. package/src/session-runtime/skills-api.mjs +7 -3
  324. package/src/session-runtime/turn/turn-run/ask-callbacks.mjs +1 -0
  325. package/src/session-runtime/webhook-session-run.mjs +16 -4
  326. package/src/skill-script-entry.mjs +36 -0
  327. package/src/standalone/daemon-drain-policy.mjs +8 -0
  328. package/src/standalone/daemon-stored-session-views.mjs +11 -3
  329. package/src/standalone/daemon-telemetry.mjs +55 -0
  330. package/src/standalone/daemon.mjs +44 -11
  331. package/src/standalone/session-protocol.mjs +12 -0
  332. package/src/standalone/session-service/agent-tree/agent-cancel.mjs +33 -2
  333. package/src/standalone/session-service/agent-tree/agent-turns.mjs +26 -10
  334. package/src/standalone/session-service/agent-tree.mjs +12 -0
  335. package/src/standalone/session-service/quota-resume.mjs +8 -0
  336. package/src/standalone/session-service/retention/busy.mjs +15 -1
  337. package/src/standalone/session-service/session-calls/session-action.mjs +6 -1
  338. package/src/standalone/session-service-api.mjs +5 -0
  339. package/src/standalone/session-service.mjs +1 -0
  340. package/src/tui/App.jsx +9 -1
  341. package/src/tui/app/app-view/floating-panel.jsx +9 -1
  342. package/src/tui/app/app-view.jsx +7 -0
  343. package/src/tui/app/create-app-pickers.mjs +4 -0
  344. package/src/tui/app/extension-pickers/mcp-login.mjs +107 -0
  345. package/src/tui/app/extension-pickers/mcp-servers-picker.mjs +2 -1
  346. package/src/tui/app/extension-pickers/plugins-pickers.mjs +35 -16
  347. package/src/tui/app/extension-pickers.mjs +2 -1
  348. package/src/tui/app/model-options.mjs +13 -16
  349. package/src/tui/app/skill-mention-palette.mjs +88 -0
  350. package/src/tui/app/slash-commands.mjs +7 -2
  351. package/src/tui/app/slash-dispatch/panel-commands.mjs +16 -1
  352. package/src/tui/app/slash-palette.mjs +23 -7
  353. package/src/tui/app/transcript-row-estimate.mjs +11 -3
  354. package/src/tui/app/use-prompt-draft-flow.mjs +7 -2
  355. package/src/tui/app/use-prompt-state.mjs +5 -0
  356. package/src/tui/components/Message.jsx +22 -1
  357. package/src/tui/components/PromptInput.jsx +21 -3
  358. package/src/tui/components/SlashCommandPalette.jsx +12 -3
  359. package/src/tui/components/StatusLine.jsx +2 -0
  360. package/src/tui/components/TranscriptItem.jsx +9 -1
  361. package/src/tui/components/prompt-input/key-handler.mjs +21 -8
  362. package/src/tui/components/status-line/local-line.mjs +5 -2
  363. package/src/tui/components/status-line/use-statusline-text.mjs +7 -1
  364. package/src/tui/components/user-message-skills.mjs +38 -0
  365. package/src/tui/dist/index.mjs +1323 -214
  366. package/src/tui/session/queue-helpers.mjs +7 -2
  367. package/src/tui/session/quota-resume.mjs +46 -14
  368. package/src/tui/session/session-api/commands.mjs +33 -24
  369. package/src/tui/session/session-api/extensions.mjs +26 -2
  370. package/src/tui/session/session-api/integrations.mjs +7 -0
  371. package/src/tui/session/session-api/lifecycle.mjs +5 -1
  372. package/src/tui/session/session-api/routes.mjs +71 -7
  373. package/src/tui/session/session-api/settings.mjs +12 -14
  374. package/src/tui/session/session-flow/drain.mjs +21 -5
  375. package/src/tui/session/session-flow/failed-turn-rewind.mjs +10 -4
  376. package/src/tui/session/tui-steering-persist.mjs +25 -9
  377. package/src/tui/session/turn.mjs +55 -15
  378. package/src/tui/statusline-ansi-bridge.mjs +1 -1
  379. package/src/ui/statusline-agents.mjs +15 -4
  380. package/src/ui/statusline.mjs +7 -3
  381. package/src/ui/streaming-markdown-heal.mjs +34 -3
  382. package/src/vendor/statusline/src/gateway/claude-current.mjs +14 -4
  383. package/src/runtime/effort-judge/previous-human-request.mjs +0 -162
  384. package/src/runtime/effort-judge/verified-context-input.mjs +0 -10
  385. package/src/runtime/memory/lib/memory-session-merge.mjs +0 -32
  386. package/src/runtime/shared/llm/usage-session-history.mjs +0 -266
package/README.md CHANGED
@@ -6,8 +6,12 @@
6
6
 
7
7
  <p align="center">
8
8
  The open-source coding agent that uses 63% fewer tokens.
9
+ <br>
10
+ <a href="#installation"><b>Download ↓</b></a>
9
11
  </p>
10
12
 
13
+ https://github.com/user-attachments/assets/af515dc9-b0fb-4b6a-aaa1-1d82db792ed0
14
+
11
15
  <p align="center">
12
16
  <a href="https://github.com/tribgames/mixdog/releases/latest/download/mixdog-desktop-win-x64.exe"><img src="https://raw.githubusercontent.com/tribgames/mixdog/main/docs/assets/download-windows.svg" alt="Download for Windows" height="48"></a>
13
17
  &nbsp;
@@ -30,8 +34,6 @@
30
34
  <a href="#documentation"><b>Docs</b></a>
31
35
  </p>
32
36
 
33
- https://github.com/user-attachments/assets/af515dc9-b0fb-4b6a-aaa1-1d82db792ed0
34
-
35
37
  ## Highlights
36
38
 
37
39
  - [63% fewer tokens](#benchmarks) than Codex CLI on the same model, at the
@@ -116,9 +118,9 @@ shell networking — headless exec is not an offline sandbox. Run
116
118
 
117
119
  <p align="center">
118
120
  <picture>
119
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tribgames/mixdog/main/benchmarks/terminal-bench-2.1/tb21-sol-vs-codex-dark.svg">
120
- <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tribgames/mixdog/main/benchmarks/terminal-bench-2.1/tb21-sol-vs-codex-light.svg">
121
- <img alt="Bar chart: Mixdog vs Codex CLI on Terminal-Bench 2.1" src="https://raw.githubusercontent.com/tribgames/mixdog/main/benchmarks/terminal-bench-2.1/tb21-sol-vs-codex-light.svg">
121
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tribgames/mixdog/main/design/promo/tb21-sol-vs-codex-dark.svg">
122
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tribgames/mixdog/main/design/promo/tb21-sol-vs-codex-light.svg">
123
+ <img alt="Bar chart: Mixdog vs Codex CLI on Terminal-Bench 2.1" src="https://raw.githubusercontent.com/tribgames/mixdog/main/design/promo/tb21-sol-vs-codex-light.svg">
122
124
  </picture>
123
125
  </p>
124
126
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mixdog",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
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,10 +2,17 @@
2
2
  // Local pre-push check. Mirrors the test legs of .github/workflows/release-gate.yml
3
3
  // (jobs: runtime, runtime-slow, desktop, desktop-tests fast/slow). It MUST be
4
4
  // updated together with that workflow whenever those commands change.
5
+ // Up front, before any build or leg, it runs two fast source checks and stops
6
+ // if either fails: the gate's shipped-history job (build-shipped-history.mjs
7
+ // --check; needs a full clone, a shallow one keeps the committed file), and the
8
+ // released-section changelog check the desktop fast lane asserts
9
+ // (changelog-locales.test.mjs; Deploy's plan adds the Unreleased section).
5
10
  // Not covered locally: runtime-macos, computer-backend (cargo + Linux X11),
6
11
  // desktop-tests `computer` lane (windows-latest, src/main/computer/ only),
7
- // relay (apps/relay tests), graph (cargo test). The gate's path filtering is
8
- // not applied: every leg always runs. Run `npm ci` (root and apps/desktop) first.
12
+ // relay (apps/relay tests), graph (cargo test), patch (cargo test of the
13
+ // checked-out engine), mobile-scripts (Python unittest). The gate's path
14
+ // filtering is not applied: every check and leg always runs. Run `npm ci`
15
+ // (root and apps/desktop) first.
9
16
  import { spawn, spawnSync } from 'node:child_process';
10
17
  import fs from 'node:fs';
11
18
  import os from 'node:os';
@@ -16,6 +23,15 @@ import { gateTestBudget, runGateLegs } from './lib/gate-scheduler.mjs';
16
23
  const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
17
24
  const started = Date.now();
18
25
 
26
+ const preChecks = ['node scripts/build-shipped-history.mjs --check', 'node scripts/check-changelog-locales.mjs'];
27
+ const failedPreChecks = preChecks.filter(
28
+ (cmd) => spawnSync(cmd, { cwd: root, stdio: 'inherit', shell: true }).status !== 0
29
+ );
30
+ if (failedPreChecks.length) {
31
+ console.error(`[gate:local] pre-check failed: ${failedPreChecks.join('; ')}`);
32
+ process.exit(1);
33
+ }
34
+
19
35
  const build = spawnSync('npm run build:spawn:test', { cwd: root, stdio: 'inherit', shell: true });
20
36
  if (build.status !== 0) {
21
37
  console.error('[gate:local] build:spawn:test failed');
@@ -87,7 +103,7 @@ for (const leg of legs) {
87
103
  }
88
104
  }
89
105
  console.log(
90
- 'Not covered locally: runtime-macos, computer-backend, desktop-tests computer lane (Windows-only), relay, graph'
106
+ 'Not covered locally: runtime-macos, computer-backend, desktop-tests computer lane (Windows-only), relay, graph, patch, mobile-scripts'
91
107
  );
92
108
  console.log(`Total: ${((Date.now() - started) / 1000).toFixed(1)}s`);
93
109
  process.exit(legs.every((l) => l.ok) ? 0 : 1);
@@ -6,7 +6,6 @@ import {
6
6
  warmModelMetadataCatalogs,
7
7
  auditModelPricing,
8
8
  } from '../src/runtime/agent/orchestrator/providers/model-catalog.mjs';
9
- import { QUICK_WEB_SEARCH_MODELS } from '../src/session-runtime/quick-web-search-models.mjs';
10
9
 
11
10
  const args = new Set(process.argv.slice(2));
12
11
  const json = args.has('--json');
@@ -154,21 +153,8 @@ for (const [name, provider] of getAllProviders()) {
154
153
  });
155
154
  }
156
155
 
156
+ // Quick web-search rows carry no static windows any more (they come from the catalogs).
157
157
  const quickRows = [];
158
- for (const [provider, models] of Object.entries(QUICK_WEB_SEARCH_MODELS)) {
159
- for (const model of models) {
160
- if (model?.contextWindow == null) continue;
161
- const external = externalMeta(modelsDev, litellm, provider, model.id);
162
- const externalContext = external.modelsDevContext ?? external.litellmContext;
163
- quickRows.push({
164
- provider,
165
- id: model.id,
166
- staticContext: n(model.contextWindow),
167
- externalContext,
168
- mismatch: n(model.contextWindow) != null && externalContext != null && n(model.contextWindow) !== externalContext,
169
- });
170
- }
171
- }
172
158
 
173
159
  const mismatches = providerResults.flatMap((p) => p.rows.filter((r) => r.contextMismatch || r.outputMismatch));
174
160
  const exactOneM = providerResults.flatMap((p) => p.rows.filter((r) => r.liveContext === 1_000_000));
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: Reviewer
3
- description: Use once at 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 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
4
  ---
5
5
 
6
6
  Independent final-check review agent.
7
7
 
8
- You are called once, after the deliverable is written and the Lead's own
9
- verification has run, before completion is reported.
8
+ You are called only at the end, after the deliverable is written and the
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
12
  criteria with independent judgment. Run the necessary builds, tests, lint, or
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "reviewer",
3
3
  "name": "Reviewer",
4
- "description": "Use once at 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 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.",
5
5
  "entry": "AGENT.md"
6
6
  }
@@ -26,6 +26,7 @@
26
26
  "reviewer": [
27
27
  "07643b62440d3eba29b7360b8a33f09f",
28
28
  "25b44b46269490e26ca31c1852925171",
29
+ "a60ea68f9287d55489e92e5450432f62",
29
30
  "a61cb4557def4e7ed647d4bdacbb72e4",
30
31
  "de860d4111b61985f3b59eb1011fa421"
31
32
  ],
@@ -285,9 +286,11 @@
285
286
  "07802a61d913c3fb7c431774e7f4ebb7",
286
287
  "0a34c5b6011578bebdb6cca63edfcec4",
287
288
  "0ddf9f9845e1fcfc76d81592d6a71e70",
289
+ "0e044c22eb0786162ebb33a30f3bd5ae",
288
290
  "44171df8144101dc74bf21f72cb5b7c0",
289
291
  "48247c1645fd94aad7711082d4512c49",
290
292
  "4f94016363acccd788a724a2d414744e",
293
+ "56e474f78faafae39aebe921ccff112d",
291
294
  "6358ad25dd07a2f92ad65c249a4f360b",
292
295
  "7fb12aeb07b79ae113c0deb0a90c6da7",
293
296
  "804afd71ebc3f68614a4dc419af4b98e",
@@ -319,6 +322,7 @@
319
322
  "0d5c8c6e2349addf71d2ed2b4c1ccb1f",
320
323
  "0d6926aaca2890da9347f15a826546e3",
321
324
  "0f14ba0a3d8b3896b717dc144bbe49a4",
325
+ "15d86146cfbd58d85adf0c25cf1d683f",
322
326
  "1c317db86e1ff80a5c4102e09e36f5fb",
323
327
  "242f11864abdef90fa0cc9cb4599a579",
324
328
  "29a347c4d3a2f773fa92c627260301ba",
@@ -364,6 +368,7 @@
364
368
  "fe0512acbb2fc8f80c5961b9f44aa5e2"
365
369
  ],
366
370
  "visualize": [
371
+ "aa3531bfc4fd6ec3820493d0c190cc75",
367
372
  "f65924f0691284ad31000469a9855b62"
368
373
  ],
369
374
  "xlsx": [
@@ -23,9 +23,9 @@ The model designs; the runtime converts and measures. Write HTML/CSS for the act
23
23
  |---|---|---|
24
24
  | **New deck**, or a redesign the user wants rebuilt | one `author` call per deck: HTML slides in `script` by default (`references/html.md`), or a pptxgenjs script (§2-§4) when the kit's devices are wanted or no local browser exists; a new deck is never assembled from `batch` operations | `author` returns `audit.status: 'pass'`; `render` on that session returns the pages and a `reviewToken` |
25
25
  | **Existing deck** — template fill, partial rewrite, reorder, merging decks | `open` → `snapshot` → `batch` slide and shape operations (§6); a new page is a duplicated source page, never a runtime-composed one | every `batch` returns its own `audit` for the edited slides |
26
- | **Read or extract** — outline, text, or figures from a deck, or the material a deck is built from | `open` + a paged `snapshot` (`pages:[…]` or `cursor:`), or `node "${MIXDOG_SKILL_DIR}/scripts/source-extract.mjs" <file>` for blocks with citable locators | blocks prefixed `[slide 4]`, `[p3]`, `[Sheet1!B4]`, `[line 42]` |
26
+ | **Read or extract** — outline, text, or figures from a deck, or the material a deck is built from | `open` + a paged `snapshot` (`pages:[…]` or `cursor:`), or `${MIXDOG_SKILL_NODE} "${MIXDOG_SKILL_DIR}/scripts/source-extract.mjs" <file>` for blocks with citable locators | blocks prefixed `[slide 4]`, `[p3]`, `[Sheet1!B4]`, `[line 42]` |
27
27
 
28
- Prerequisites: the Office capability (`metadata.requires`) — its portable backend needs no installed PowerPoint, and Office on Windows is used in the background when present; fonts that render reliably for the recipient; a signed-in `media` lane only for generated pictures; an explicit `--provider` and `--model` for the reviewer and page-QC scripts, which reuse the existing sign-in and never ask for credentials.
28
+ Prerequisites: the Office capability (`metadata.requires`) — its portable backend needs no installed PowerPoint, and Office on Windows is used in the background when present; fonts that render reliably for the recipient; a signed-in `media` lane only for generated pictures; an explicit `--provider` and `--model` for the reviewer and page-QC scripts, which reuse the existing sign-in and never ask for credentials. Run bundled scripts with `${MIXDOG_SKILL_NODE}` (on PATH in any shell), never plain `node`.
29
29
 
30
30
  ## 1. Load routing
31
31
  | File | Owns | Read when |
@@ -59,10 +59,10 @@ Prerequisites: the Office capability (`metadata.requires`) — its portable back
59
59
  **Bounded refinement**: fix factual and material visual defects before taste edits. Keep each pass focused on the highest-impact changes. After two unsuccessful corrections of the same defect, preserve the last valid artifact and report the limitation rather than cycling for a higher score. This limit is not permission to call an inadequate design complete. If an asset fails, repair or replace it; if it is removed, recompose the space it owned.
60
60
  8. **Page QC (new decks; skip for a one-page edit)**: after the measured audit, `qa render:false`, and the first render, check overflow, clipping, collision, canvas edge, contrast, and distortion; never redesign, reword, add, or delete. In Solo, Lead reviews directly. Only with workflow-approved delegation, use the runner below: each fresh fixer sees one page's image, inventory, and measured defects, uses only office, and edits a working copy. The runner adopts it only if defects did not grow and no other page changed. For this delegated route, `close` the session before running:
61
61
  ```text
62
- node "${MIXDOG_SKILL_DIR}/scripts/qc-pages.mjs" <deck.pptx> --provider <provider> --model <model> --output qc-report.json [--pages 1-12] [--no-vision]
62
+ ${MIXDOG_SKILL_NODE} "${MIXDOG_SKILL_DIR}/scripts/qc-pages.mjs" <deck.pptx> --provider <provider> --model <model> --output qc-report.json [--pages 1-12] [--no-vision]
63
63
  ```
64
64
  Provider and model are explicit, as for the reviewer; `--no-vision` runs the geometry read only (a text-only model, or no renderer); at most 20 pages per run. Read the report (`pages[].reason`: improved, polished as unchanged, clean, scope, regression, audit_failed, execution_failed). A page whose run never replied is not a page that passed: `execution_failed` counts into `failed`, turns `ok` false, and exits the command, so rerun those pages before delivery rather than reading the report as clean. Then `open` the deck again and `render` it: the QC edits invalidate the earlier `reviewToken`, and a reopened session no longer carries the brief, which is why the brief read (`qa render:false`) comes before this step.
65
- 9. Reader and art director pass — read the contact sheet for sequence and full-size pages for detail. For substantial new work, use the source questions in `references/review.md`; its separate reviewer procedure (`node "${MIXDOG_SKILL_DIR}/scripts/review-deck.mjs" packet.json --provider <provider> --model <model> --output review.json`) requires workflow-approved delegation. Otherwise, explicitly label the pass self-review. Check the reader's answers against the original source key, then judge message visibility, focal hierarchy, and coherent variation before consulting `deck.rhythm`.
65
+ 9. Reader and art director pass — read the contact sheet for sequence and full-size pages for detail. For substantial new work, use the source questions in `references/review.md`; its separate reviewer procedure (`${MIXDOG_SKILL_NODE} "${MIXDOG_SKILL_DIR}/scripts/review-deck.mjs" packet.json --provider <provider> --model <model> --output review.json`) requires workflow-approved delegation. Otherwise, explicitly label the pass self-review. Check the reader's answers against the original source key, then judge message visibility, focal hierarchy, and coherent variation before consulting `deck.rhythm`.
66
66
  **Output**: a slide-specific keep/fix decision with the visible reason. Resolve phrase-breaking wraps, weak evidence, and accidental empty regions; do not move a title merely to vary the sequence or change a successful page to reach a quota. Select at most two high-impact design revisions per pass; zero is valid.
67
67
  **Default — reuse the review**: small text, shape or data edits use `batch`, not re-author; every `batch` returns its own `audit` for the edited slides, read before the next edit. Portable renders report `changedPages` and `reusedPages` for up to 12 requested pages: inspect changed pages and carry forward the unchanged pages' critique. Shared resources invalidate the cache conservatively; PDF export remains whole-document. COM and long-deck contact sheets refresh normally. Always use the new complete render token, never the previous approval.
68
68
  10. `office action:'finalize' session:<id> design:{ reviewed:true, reviewToken, critique:[...] }` — reuses a complete current preview, checks the document, saves, validates, and closes. Use the token from the final complete render; after detail-page inspection, restore a complete render before finalizing. An edit invalidates the previous approval. `fixes` lists work still owed; applied fixes belong in `note`. A render/export failure leaves the deliverable unfinished: preserve the session and artifacts, report the failure, and never substitute a manual save for successful finalize. Finalize an authored deck in its authoring session: a deck reopened in `mode:'background'` is re-saved by PowerPoint, which rewrites the theme, layout, and embedded-workbook parts, and the validation baseline then reports `changed_protected_part` / `lost_protected_part` against the file it opened. Done when finalize reports the saved, validated file and the session is closed.
@@ -84,7 +84,7 @@ Prerequisites: the Office capability (`metadata.requires`) — its portable back
84
84
  ```
85
85
  **Hard rule — the plan is the page's contract**: every slide's plan line names its job, relationship, move, composition move, carriers, texture, and rhythm before any geometry exists, so the design is decided before it is drawn. **The runtime gates on it** from two slides up: `author` refuses a deck whose brief has no `slide plan:` line (`plan_missing`), whose plan leaves a slide unwritten (`plan_slide_unplanned`), whose line names no job or carriers (`plan_incomplete`), or whose page does not carry what its own line named (`plan_promise_missing`) — `reason: plan_gate` with the slides listed, the previous deck and its session untouched, and the answer is the plan line or the page, not a retry. A single-slide specimen is not gated, and a stale slide count stays information (`plan_count_mismatch`). A thin request gets a defensible brief invented from the subject, never blank fields. The `facts:`, `directions:`, and `slide plan:` lines may wrap across comment lines; each continuation line is read as more ` · ` items — so ` · ` is the separator and never appears inside a value or a source (write "관측치와 측정", not "관측치·측정"; a fact cut at an inner ` · ` silently disappears and every figure it carried becomes `number_without_fact`). → runtime `plan_gate` at author (`plan_missing`, `plan_slide_unplanned`, `plan_incomplete`, `plan_promise_missing`); `plan_count_mismatch` in qa
86
86
  **Hard rule — every figure has a fact**: `facts:` lists each number the deck will show, with its source (a page, a cell, a URL, or "user brief"). Dates and slide numbers are exempt. A chart series is one fact listing its values in order (`F3 운영비 1Q–6Q 10.5 10.8 9.1 7.9 7.0 6.5 — 재무팀 시트 B4:G4`); the values in the script's `chart()` call are copied from that line. With source material, the fact sheet is written first; without it, the facts come from the request and say so. **The runtime gates on it**: `author` reads the staged deck and refuses to land one that shows a figure no fact covers (`reason: facts_gate`, the figures listed per slide) — the previous deck and its session stay untouched, and the answer is the facts line, not a retry. A sketch or template with no source at all declares `facts: sample — <why>`: every figure is illustrative, the deck lands with `factsMode: 'sample'`, and the delivery tells the user the numbers are examples. → runtime `facts_gate` at author; `number_without_fact`, `facts_missing`, `facts_illustrative` in qa
87
- **Hard rule — supplied material is cited**: when the deck is built from files or pages the user gave, `sources:` names them and every fact's source points where a reader can open it — a page (`p.12`), a cell (`Sheet1!B4`), a section (`§3`), or a URL. `node "${MIXDOG_SKILL_DIR}/scripts/source-extract.mjs" <file>` prints the material as blocks already prefixed with those locators, which is what the fact sheet quotes. A figure that came from somewhere else (a conversation, a live system) says so in its own source. → runtime `fact_without_locator` (advisory)
87
+ **Hard rule — supplied material is cited**: when the deck is built from files or pages the user gave, `sources:` names them and every fact's source points where a reader can open it — a page (`p.12`), a cell (`Sheet1!B4`), a section (`§3`), or a URL. `${MIXDOG_SKILL_NODE} "${MIXDOG_SKILL_DIR}/scripts/source-extract.mjs" <file>` prints the material as blocks already prefixed with those locators, which is what the fact sheet quotes. A figure that came from somewhere else (a conversation, a live system) says so in its own source. → runtime `fact_without_locator` (advisory)
88
88
 
89
89
  ## 4. Script contract and library boundaries
90
90
  - The kit prelude creates `pres` (`pptxgenjs`, `LAYOUT_WIDE` 13.33 × 7.5 in, coordinates in inches) and every helper; a script that declares its own `pres` runs without the prelude. Available modules: `pptxgenjs`, `sharp`, `node:fs`, `node:path`, `node:buffer`; no network and no photo library. Icons come from the injected `ICON` (256 offline Lucide stroke icons; `ICON.names` lists them, the kit's `icon()` / `iconRow()` place them) — a feature marker, a list prefix, or a stage glyph is an icon by name, never a Unicode emoji or a hand-drawn shape.
@@ -113,7 +113,7 @@ The runtime absorbs what it can (one `a:pPr` per paragraph; package validation a
113
113
  | A secondary-axis combo needs `valAxes` and `catAxes` with two entries each | PowerPoint drops the chart → runtime `chart_axis_undeclared` |
114
114
 
115
115
  ## 5. QA and finalize
116
- **Content before pixels**: read the deck's text once against the fact sheet — `node "${MIXDOG_SKILL_DIR}/scripts/source-extract.mjs" <deck.pptx>` on the saved file, or the snapshot's `text` — for missing material, typos, and order; a wrong order or a dropped fact is cheaper to catch in text than on a contact sheet. → manual
116
+ **Content before pixels**: read the deck's text once against the fact sheet — `${MIXDOG_SKILL_NODE} "${MIXDOG_SKILL_DIR}/scripts/source-extract.mjs" <deck.pptx>` on the saved file, or the snapshot's `text` — for missing material, typos, and order; a wrong order or a dropped fact is cheaper to catch in text than on a contact sheet. → manual
117
117
  Then inspect every rendered slide in this order. Read actual phrase endings, compare peer baselines and gaps, trace each connector to its intended boundary, and check that labels belong to the right object. Record a visible keep/fix reason rather than inferring a pass from a clean QA report. Hard hits need correction; the runtime's actual severity and source determine what blocks finalize. "Manual" means only the rendered image shows it.
118
118
 
119
119
  **Preview fidelity**: the portable preview is LibreOffice, and it spaces Hangul and CJK *chart category labels* by character — `1분기` is drawn as `1 분기` while the chart part holds the unspaced string, and PowerPoint draws it unspaced. Check the string (`source-extract.mjs` or the chart's `c:v` values) before treating it as a defect; slide text is unaffected.
@@ -52,12 +52,14 @@ policy. Provider and model must be explicit; it uses the existing sign-in, never
52
52
  asks to paste credentials. This is context separation, not an OS filesystem
53
53
  sandbox or proof that the model's judgement is unbiased.
54
54
 
55
- Run from the Project; `<pptx-skill-directory>` is the `<base-dir>` the runtime
56
- printed when the skill loaded (`SKILL.md` §2 step 9 carries the command with
57
- that directory already resolved):
55
+ Run it from the Project with the command `SKILL.md` §2 step 9 carries, which
56
+ the runtime resolved when the skill loaded. It starts with the launcher command
57
+ named there (on the shell tool's PATH), not plain `node`, which cannot load the
58
+ script in every installation. Its shape, with `<pptx-skill-directory>` the
59
+ `<base-dir>` the runtime printed:
58
60
 
59
61
  ```text
60
- node "<pptx-skill-directory>/scripts/review-deck.mjs" packet.json --provider <provider> --model <model> --output review.json
62
+ <launcher command from SKILL.md> "<pptx-skill-directory>/scripts/review-deck.mjs" packet.json --provider <provider> --model <model> --output review.json
61
63
  ```
62
64
 
63
65
  Packet format (all paths relative to the packet file unless absolute):
@@ -6,7 +6,7 @@
6
6
  // portable session that is closed without saving; anything else is read as
7
7
  // UTF-8 text. Output is bounded by --chars (default 4000) and every block is
8
8
  // cut at BLOCK_CHARS, so a large source never floods the context.
9
- // node "${MIXDOG_SKILL_DIR}/scripts/source-extract.mjs" <file> [--chars 4000]
9
+ // ${MIXDOG_SKILL_NODE} "${MIXDOG_SKILL_DIR}/scripts/source-extract.mjs" <file> [--chars 4000]
10
10
  import { access, readFile } from 'node:fs/promises';
11
11
  import { extname, resolve } from 'node:path';
12
12
  import { pathToFileURL } from 'node:url';
@@ -57,7 +57,7 @@ Read this when choosing a `setup` mutation.
57
57
  | Refresh a plugin checkout | `update_plugin` |
58
58
  | Enable or disable a plugin | `set_plugin_enabled` |
59
59
  | Remove a plugin | `remove_plugin` |
60
- | Install or reconfigure the MCP server a plugin ships | `enable_plugin_mcp` |
60
+ | Turn back on and reconnect every MCP server a plugin declares | `enable_plugin_mcp` |
61
61
  | Available hosted models and their options; optionally one provider, native-search capable only, or a refreshed catalog | `list_models` |
62
62
  | Agent orchestration, independent of workflow instructions | `set_orchestration_mode` |
63
63
  | Safe MCP edit metadata, excluding raw connection/credential values | `get_mcp_server` |
@@ -204,8 +204,18 @@ markers are read with `status desktop`.
204
204
  - Environment/header maps are partial patches. Omitted keys are preserved;
205
205
  `null` explicitly removes one key, including a stored credential.
206
206
  - Plugin enablement moves its contributed skills and MCP integrations together.
207
- - `enable_plugin_mcp` writes the MCP server a plugin ships and reconnects; it
208
- fails for a plugin without an MCP script.
207
+ - A registered plugin's MCP servers (its `.mcp.json` and manifest
208
+ `mcpServers`) appear automatically with `source: "plugin"` and `plugin` /
209
+ `pluginServer` in `status mcp`; nothing is copied into the MCP list. A plugin
210
+ server runs only while both the plugin and the server are enabled;
211
+ `set_mcp_enabled` toggles the server, `set_plugin_enabled` the plugin, and
212
+ `set_extension_scope` limits it (the plugin's scope still applies).
213
+ `add_mcp_server`, `save_mcp_server`, and `remove_mcp_server` refuse plugin
214
+ servers. Declaration problems and naming conflicts are reported as
215
+ `declarationErrors` and `warnings`.
216
+ - `enable_plugin_mcp` turns every server the plugin declares back on and
217
+ reconnects them; a disabled plugin stays disabled, and it fails for a plugin
218
+ that declares no MCP servers.
209
219
 
210
220
  ## Desktop, Projects, and automation
211
221
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: visualize
3
- description: Show mockups, design options, diagrams, and finished artifacts beside the chat with the visualize tool.
4
- when_to_use: 'Mockups before UI work, design options, visual explanations, or showing a produced artifact; not production code alone.'
3
+ description: Show mockups, design options, diagrams, and finished artifacts in the side panel beside the chat.
4
+ when_to_use: 'Mockups, previews, design options, diagrams, or showing any finished artifact; not code alone.'
5
5
  metadata:
6
6
  requires: visualize
7
7
  dependencies:
@@ -68,13 +68,16 @@ testing a page belong to `browser`.
68
68
  panel keeps each saved state as a version (v1…vN) the user can step back
69
69
  to, compare side by side, or restore, so never copy the file to keep an
70
70
  old version. The user can also point at the page: their message then carries a
71
- `<visualize_feedback>` block of numbered pins (`pin N` = the "📌 N" they
72
- saw), each with the note, tab and project-relative file, and for an HTML
73
- element its selector, label, trimmed HTML, key styles and box (a PDF or
74
- image pin gives a region instead), plus the crop image "visualize pin N"
75
- when there is one. Answer pin by pin by number and act on the element
76
- the selector names; secret values arrive as `[redacted]`, so never restore
77
- them from the crop or guess them.
71
+ `<visualize_feedback>` block of numbered pins (`pin N` = the pin numbered
72
+ N they saw), each with its label, note, tab, project-relative file and
73
+ `kind` (pane kind + element or region). An HTML element pin adds its
74
+ selector, `inside` path, trimmed HTML, key styles and box; a region pin
75
+ (an HTML drag, a document, PDF, image, diagram, or video frame) adds its
76
+ area, plus `elements` for an HTML drag and `time` for a video. The crop
77
+ image "visualize pin N" comes when there is one (`crop: none` otherwise).
78
+ Answer pin by pin by number and act on what the selector or area names;
79
+ secret values arrive as `[redacted]`, so never restore them from the crop
80
+ or guess them.
78
81
  8. **After approval**: implement from the approved mockup; its values are the
79
82
  spec. When the work needs a record, `export` the approved tab to PNG or PDF
80
83
  beside the page (`export` with `format` and a project-relative `output`,
@@ -3,6 +3,7 @@
3
3
  * to `ctx.out`; only `/exit` and `/quit` return 'exit'.
4
4
  */
5
5
  import { dim, green, red, yellow, colorEnabled } from '../runtime/shared/statusline/ansi.mjs';
6
+ import { switchesSessionModel } from '../session-runtime/model-route/model-switch-target.mjs';
6
7
  import { createSessionStats } from '../ui/session-stats.mjs';
7
8
  import { statuslineFor } from './turn-output.mjs';
8
9
 
@@ -65,7 +66,21 @@ async function setModel(ctx, arg) {
65
66
  return;
66
67
  }
67
68
  const runtime = await ctx.ensureRuntime();
68
- await runtime.setRoute({ model: arg });
69
+ const request = { model: arg };
70
+ // The user's model choice switches this conversation in place; with
71
+ // auto-compact on model change (default on) the history is compacted on the
72
+ // current model first. A failed compaction never blocks the switch.
73
+ if (switchesSessionModel(runtime, request) && runtime.getCompactionSettings?.()?.onModelChange !== false) {
74
+ // An invalid or unavailable selector is rejected before anything compacts.
75
+ await runtime.setRoute(request, { validateOnly: true });
76
+ out.write(`${dim('compacting conversation before the model change…')}\n`);
77
+ try {
78
+ await runtime.compact();
79
+ } catch {
80
+ /* next-turn auto-compaction fits the new window */
81
+ }
82
+ }
83
+ await runtime.setRoute(request, { switchEstablished: true });
69
84
  out.write(`${green(`✓ model → ${runtime.provider}/${runtime.model}`)}\n`);
70
85
  }
71
86
 
@@ -5,7 +5,9 @@
5
5
  independent invariants, never from the output itself or from recall.
6
6
  - After all edits, cover each required check once: one runner per runtime,
7
7
  independent checks in parallel; no read/list/diff to confirm your own
8
- writes; rerun only failed or invalidated checks.
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.
9
11
  - Use supplied commands unchanged except inputs, else documented defaults; no
10
12
  stricter flags or unrequested suites.
11
13
  - Warnings or blocked checks never justify editing passing code. Fix obsolete
@@ -8,8 +8,10 @@
8
8
  `src/app.ts:42`); files outside the Project always by absolute path; never a
9
9
  bare name, a path relative to another folder, or a `file://` URI.
10
10
  - Deliver requested visual artifacts (SVG, diagrams, HTML pages) as saved files
11
- and give their path, which opens them in the browser panel; never open them
12
- in the system browser or paste their source unless the user asks.
11
+ and give their path; never open them in the system browser or paste their
12
+ source unless the user asks.
13
+ <!-- tools: visualize -->
14
+ - Open each finished artifact beside the chat with `visualize open` when available.
13
15
 
14
16
  <!-- tools: git -->
15
17
  - A commit request includes selecting and staging its changes; a stage-only
@@ -59,6 +59,25 @@ function assistantMessageText(content) {
59
59
  .join('\n');
60
60
  }
61
61
 
62
+ // Visible assistant text inside a providerReplay envelope. Item shapes by
63
+ // provider: anthropic `{type:'text',text}`; openai/xai responses
64
+ // `{type:'message',content:[{type:'output_text',text}]}`; gemini/antigravity
65
+ // parts `{text}` (reasoning is `{thought:true,text}`). Reasoning/thinking and
66
+ // tool items are skipped.
67
+ function replayItemText(item) {
68
+ if (!item || typeof item !== 'object') return '';
69
+ if (item.type === 'message') return assistantMessageText(item.content);
70
+ if (item.type === 'text' || item.type === 'output_text' || (item.type === undefined && item.thought !== true)) {
71
+ return typeof item.text === 'string' ? item.text : '';
72
+ }
73
+ return '';
74
+ }
75
+
76
+ function providerReplayText(replay) {
77
+ const items = Array.isArray(replay?.items) ? replay.items : [];
78
+ return items.map(replayItemText).filter(Boolean).join('\n');
79
+ }
80
+
62
81
  /** Message index at askSession start — salvage only assistant rows appended this run. */
63
82
  export function resolveHandoffMessageStartIndex(session) {
64
83
  const messages = Array.isArray(session?.messages) ? session.messages : [];
@@ -72,7 +91,8 @@ function collectSessionAssistantHandoffText(session, messageStartIndex = 0) {
72
91
  for (let i = start; i < messages.length; i += 1) {
73
92
  const m = messages[i];
74
93
  if (m?.role !== 'assistant') continue;
75
- const t = assistantMessageText(m.content).trim();
94
+ const contentText = assistantMessageText(m.content).trim();
95
+ const t = contentText || providerReplayText(m.providerReplay).trim();
76
96
  if (t && t !== '.') parts.push(t);
77
97
  }
78
98
  return parts.length ? parts.join('\n\n') : '';
@@ -80,9 +100,14 @@ function collectSessionAssistantHandoffText(session, messageStartIndex = 0) {
80
100
 
81
101
  export function watchdogPartialHandoffFromError(error, session, messageStartIndex = 0) {
82
102
  if (!isAgentProgressWatchdogAbortError(error)) return null;
83
- // A canonical agent turn cannot expose its live transcript here, so it
84
- // reads the text itself and carries it on the stall error.
85
- if (typeof error.partialHandoff === 'string') return error.partialHandoff;
103
+ return turnPartialHandoff(error, session, messageStartIndex);
104
+ }
105
+
106
+ /** Assistant text a stopped turn produced before it stopped. A canonical agent
107
+ * turn cannot expose its live transcript here, so it reads the text itself
108
+ * and carries it on the turn's error. */
109
+ export function turnPartialHandoff(error, session, messageStartIndex = 0) {
110
+ if (typeof error?.partialHandoff === 'string') return error.partialHandoff;
86
111
  return partialHandoffTextFromSession(session, messageStartIndex);
87
112
  }
88
113
 
@@ -210,6 +210,16 @@ export function resolveProviderCacheKey(opts, provider) {
210
210
  );
211
211
  }
212
212
 
213
+ /** A cache identity as a prompt_cache_key: kept as is up to the 64-char wire
214
+ * limit, a bounded hash identity beyond it, '' when empty. */
215
+ export function normalizeCacheKey(value) {
216
+ const text = String(value ?? '').trim();
217
+ if (!text) return '';
218
+ const wellFormed = text.toWellFormed();
219
+ if (wellFormed.length <= 64) return wellFormed;
220
+ return `pc_${createHash('sha256').update(wellFormed).digest('hex').slice(0, 32)}`;
221
+ }
222
+
213
223
  function shortHash(value, chars = 18) {
214
224
  return createHash('sha256').update(stableHashStringify(value)).digest('hex').slice(0, chars);
215
225
  }
@@ -1,3 +1,4 @@
1
+ import { createHash } from 'node:crypto';
1
2
  import { statSync, readdirSync } from 'node:fs';
2
3
 
3
4
  /**
@@ -14,6 +15,28 @@ import { statSync, readdirSync } from 'node:fs';
14
15
  */
15
16
  export function maxMtimeRecursive(paths, depth = 3) {
16
17
  let max = 0;
18
+ walkMtimes(paths, depth, (_p, m) => {
19
+ if (m > max) max = m;
20
+ });
21
+ return max;
22
+ }
23
+
24
+ /**
25
+ * Exact change signature over the same walk as maxMtimeRecursive: every
26
+ * stat'ed path with its own mtime, so any single path changing (even to an
27
+ * older time) changes the result. Compare for equality only.
28
+ *
29
+ * @param {string[]} paths
30
+ * @param {number} [depth=3]
31
+ * @returns {string}
32
+ */
33
+ export function mtimeSignatureRecursive(paths, depth = 3) {
34
+ const parts = [];
35
+ walkMtimes(paths, depth, (p, m) => parts.push(`${p}:${m}`));
36
+ return createHash('sha1').update(parts.join('\n')).digest('hex');
37
+ }
38
+
39
+ function walkMtimes(paths, depth, visit) {
17
40
  function walk(p, d) {
18
41
  let st;
19
42
  try {
@@ -22,7 +45,7 @@ export function maxMtimeRecursive(paths, depth = 3) {
22
45
  return;
23
46
  }
24
47
  if (st.isDirectory()) {
25
- if (st.mtimeMs > max) max = st.mtimeMs;
48
+ visit(p, st.mtimeMs);
26
49
  if (d <= 0) return;
27
50
  let entries;
28
51
  try {
@@ -36,17 +59,15 @@ export function maxMtimeRecursive(paths, depth = 3) {
36
59
  walk(child, d - 1);
37
60
  } else if (e.isFile() && (e.name.endsWith('.md') || e.name.endsWith('.json'))) {
38
61
  try {
39
- const m = statSync(child).mtimeMs;
40
- if (m > max) max = m;
62
+ visit(child, statSync(child).mtimeMs);
41
63
  } catch {
42
64
  /* unreadable entry: skipped like a missing path */
43
65
  }
44
66
  }
45
67
  }
46
68
  } else {
47
- if (st.mtimeMs > max) max = st.mtimeMs;
69
+ visit(p, st.mtimeMs);
48
70
  }
49
71
  }
50
72
  for (const p of paths) walk(p, depth);
51
- return max;
52
73
  }
@@ -4,10 +4,7 @@ import { mergeStoredProviders } from './config-providers-merge.mjs';
4
4
  import { normalizeExtensionScopes } from '../../shared/extension-scopes.mjs';
5
5
  import { applyConfigPatch, diffConfig } from '../../shared/config-patch.mjs';
6
6
  import { normalizeWorkflowSelection } from '../../shared/orchestration.mjs';
7
- import {
8
- DEFAULT_INSTRUCTION_FILES_MODE,
9
- normalizeInstructionFilesMode,
10
- } from '../../shared/instruction-files-mode.mjs';
7
+ import { DEFAULT_INSTRUCTION_FILES_MODE, normalizeInstructionFilesMode } from '../../shared/instruction-files-mode.mjs';
11
8
  import {
12
9
  DEFAULT_DISABLED_AGENT_ROSTER,
13
10
  canonicalizeAgentRouteStorage,
@@ -45,6 +42,7 @@ import {
45
42
  import { oauthCredentialProbeState, isOAuthProviderAvailable } from './providers/oauth-credential-probes.mjs';
46
43
  import { normalizeDeveloperConfig } from '../../shared/developer-options.mjs';
47
44
  import { normalizeWorktreeSettings } from '../../shared/worktrees/settings.mjs';
45
+ import { normalizePluginMcpIntents } from './runtime-core/plugin-mcp.mjs';
48
46
 
49
47
  export const {
50
48
  PROFILE_LANGUAGES,
@@ -114,6 +112,8 @@ export function buildDefaultConfig(options = {}) {
114
112
  providers['grok-oauth'] = oauthEntry('grok-oauth');
115
113
  // Muse Code subscription (Meta Muse Spark), enabled from its stored key.
116
114
  providers['muse-code-oauth'] = oauthEntry('muse-code-oauth');
115
+ // Command Code Provider API, enabled from its stored Studio API key.
116
+ providers['command-code-oauth'] = oauthEntry('command-code-oauth');
117
117
  // Dev-only providers (Settings → Developer → Providers, one option each):
118
118
  // omitted entirely from the default config while their option is off so
119
119
  // they never surface in settings.
@@ -253,6 +253,7 @@ export function loadConfig(options = {}) {
253
253
  const loaded = canonicalizeAgentRouteStorage({
254
254
  providers: mergedProviders,
255
255
  mcpServers,
256
+ pluginMcp: normalizePluginMcpIntents(raw.pluginMcp),
256
257
  presets: withDefaultPresets(normalizedPresets),
257
258
  default: raw.default || null,
258
259
  maintenance: { ...DEFAULT_MAINTENANCE, ...normalizedMaint },
@@ -305,6 +306,7 @@ export function loadConfig(options = {}) {
305
306
  return {
306
307
  ...defaults,
307
308
  mcpServers: {},
309
+ pluginMcp: {},
308
310
  presets: DEFAULT_PRESETS.map((p) => ({ ...p })),
309
311
  default: null,
310
312
  maintenance: { ...DEFAULT_MAINTENANCE },
@@ -432,6 +434,10 @@ function buildAgentSaveBuilder(config) {
432
434
  modules,
433
435
  builtins,
434
436
  };
437
+ // Per-server intent for plugin-declared MCP servers; empty stays absent.
438
+ const pluginMcp = normalizePluginMcpIntents(config.pluginMcp);
439
+ if (Object.keys(pluginMcp).length) next.pluginMcp = pluginMcp;
440
+ else delete next.pluginMcp;
435
441
  // Developer options (developer-options.mjs); an empty set stays absent.
436
442
  if (Object.keys(developer).length) next.developer = developer;
437
443
  else if (Object.hasOwn(config, 'developer')) delete next.developer;
@@ -13,11 +13,12 @@ export {
13
13
  collectSkillsCached,
14
14
  filterSkillsExcludingDisabled,
15
15
  invalidateSkillsCache,
16
- invalidateSkillsMtimeGate,
17
16
  isSkillDisabled,
18
17
  loadSkillResource,
19
18
  skillBodyPresentInSession,
20
19
  skillMissingFeature,
20
+ skillOutsideScope,
21
+ skillOutsideScopeError,
21
22
  } from './skill-catalog.mjs';
22
23
  export {
23
24
  composeSystemPrompt,