mixdog 1.0.11 → 1.1.0

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 (471) hide show
  1. package/NOTICE.md +20 -0
  2. package/README.md +75 -181
  3. package/package.json +9 -4
  4. package/scripts/build-shipped-history.mjs +131 -0
  5. package/scripts/check-changelog-locales.mjs +203 -0
  6. package/scripts/computer-task-cost-report.mjs +0 -4
  7. package/scripts/lib/run-node-tests.mjs +235 -13
  8. package/scripts/lib/test-failure-records.mjs +5 -0
  9. package/scripts/lib/test-failure-summary.mjs +9 -3
  10. package/scripts/lib/test-spawn-ledger.mjs +19 -0
  11. package/scripts/prune-embedding-runtime.mjs +9 -5
  12. package/scripts/sync-client-version-floors.mjs +100 -0
  13. package/scripts/test-direct.mjs +16 -1
  14. package/src/agents/advisor/AGENT.md +38 -0
  15. package/src/agents/advisor/agent.json +6 -0
  16. package/src/agents/reviewer/AGENT.md +5 -2
  17. package/src/agents/reviewer/agent.json +1 -1
  18. package/src/defaults/shipped-history.json +381 -0
  19. package/src/defaults/skills/docx/SKILL.md +7 -5
  20. package/src/defaults/skills/docx/references/html.md +9 -8
  21. package/src/defaults/skills/docx/references/native-authoring.md +28 -18
  22. package/src/defaults/skills/goal-management/SKILL.md +11 -5
  23. package/src/defaults/skills/local-provider/SKILL.md +2 -1
  24. package/src/defaults/skills/pdf/SKILL.md +9 -6
  25. package/src/defaults/skills/pdf/references/html.md +17 -12
  26. package/src/defaults/skills/pptx/SKILL.md +8 -6
  27. package/src/defaults/skills/pptx/references/composition.md +4 -4
  28. package/src/defaults/skills/pptx/references/concepts.md +168 -0
  29. package/src/defaults/skills/pptx/references/direction.md +5 -4
  30. package/src/defaults/skills/pptx/references/html.md +6 -29
  31. package/src/defaults/skills/pptx/references/kit-index.md +11 -3
  32. package/src/defaults/skills/pptx/references/kit.md +27 -5
  33. package/src/defaults/skills/pptx/references/review.md +6 -5
  34. package/src/defaults/skills/setup/SKILL.md +5 -8
  35. package/src/defaults/skills/setup/references/actions.md +61 -31
  36. package/src/defaults/skills/setup/references/surfaces.md +12 -10
  37. package/src/defaults/skills/xlsx/SKILL.md +8 -6
  38. package/src/defaults/skills/xlsx/references/html.md +8 -4
  39. package/src/defaults/skills/xlsx/references/model-conventions.md +2 -0
  40. package/src/defaults/skills/xlsx/references/report-design.md +32 -16
  41. package/src/help.mjs +1 -1
  42. package/src/lib/rules-builder.cjs +1 -1
  43. package/src/runtime/agent/orchestrator/agent-runtime/cache-strategy.mjs +3 -1
  44. package/src/runtime/agent/orchestrator/agent-runtime/session-builder.mjs +4 -0
  45. package/src/runtime/agent/orchestrator/config-presets.d.mts +1 -0
  46. package/src/runtime/agent/orchestrator/config-presets.mjs +44 -0
  47. package/src/runtime/agent/orchestrator/config-providers-merge.mjs +9 -1
  48. package/src/runtime/agent/orchestrator/config.mjs +102 -21
  49. package/src/runtime/agent/orchestrator/context/deferred-tools.mjs +3 -2
  50. package/src/runtime/agent/orchestrator/providers/account-pool.mjs +90 -26
  51. package/src/runtime/agent/orchestrator/providers/anthropic-api-request.mjs +44 -14
  52. package/src/runtime/agent/orchestrator/providers/anthropic-midstream-recovery.mjs +4 -4
  53. package/src/runtime/agent/orchestrator/providers/anthropic-oauth-client-version.mjs +5 -3
  54. package/src/runtime/agent/orchestrator/providers/anthropic-oauth-credentials.mjs +79 -8
  55. package/src/runtime/agent/orchestrator/providers/anthropic-oauth.mjs +29 -4
  56. package/src/runtime/agent/orchestrator/providers/anthropic-sse-turn.mjs +3 -0
  57. package/src/runtime/agent/orchestrator/providers/anthropic-sse.mjs +10 -1
  58. package/src/runtime/agent/orchestrator/providers/anthropic.mjs +11 -2
  59. package/src/runtime/agent/orchestrator/providers/antigravity-oauth-login.mjs +9 -5
  60. package/src/runtime/agent/orchestrator/providers/antigravity-oauth-tokens.mjs +9 -1
  61. package/src/runtime/agent/orchestrator/providers/antigravity-oauth.mjs +2 -0
  62. package/src/runtime/agent/orchestrator/providers/antigravity-response.mjs +30 -22
  63. package/src/runtime/agent/orchestrator/providers/antigravity-stream.mjs +2 -0
  64. package/src/runtime/agent/orchestrator/providers/auto-effort.mjs +28 -10
  65. package/src/runtime/agent/orchestrator/providers/codex-client-meta.mjs +14 -72
  66. package/src/runtime/agent/orchestrator/providers/cursor-auth.mjs +19 -3
  67. package/src/runtime/agent/orchestrator/providers/cursor-client-version.mjs +20 -10
  68. package/src/runtime/agent/orchestrator/providers/cursor-wire-stream-sink.mjs +36 -9
  69. package/src/runtime/agent/orchestrator/providers/cursor.mjs +11 -17
  70. package/src/runtime/agent/orchestrator/providers/custom-provider-config.mjs +388 -0
  71. package/src/runtime/agent/orchestrator/providers/custom-provider.mjs +92 -109
  72. package/src/runtime/agent/orchestrator/providers/custom-reasoning.mjs +107 -0
  73. package/src/runtime/agent/orchestrator/providers/effort-configuration.mjs +138 -30
  74. package/src/runtime/agent/orchestrator/providers/gemini-response.mjs +32 -15
  75. package/src/runtime/agent/orchestrator/providers/gemini-sdk-request.mjs +2 -0
  76. package/src/runtime/agent/orchestrator/providers/gemini-stream.mjs +39 -5
  77. package/src/runtime/agent/orchestrator/providers/gemini.mjs +9 -2
  78. package/src/runtime/agent/orchestrator/providers/grok-client-version.mjs +3 -2
  79. package/src/runtime/agent/orchestrator/providers/grok-oauth-login.mjs +6 -1
  80. package/src/runtime/agent/orchestrator/providers/grok-oauth-tokens.mjs +10 -1
  81. package/src/runtime/agent/orchestrator/providers/grok-oauth.mjs +3 -2
  82. package/src/runtime/agent/orchestrator/providers/lib/anthropic-request-utils.mjs +5 -1
  83. package/src/runtime/agent/orchestrator/providers/lib/note-error-usage.mjs +7 -0
  84. package/src/runtime/agent/orchestrator/providers/lib/oauth-token-utils.mjs +57 -0
  85. package/src/runtime/agent/orchestrator/providers/model-cache.mjs +12 -5
  86. package/src/runtime/agent/orchestrator/providers/npm-cli-version.mjs +20 -15
  87. package/src/runtime/agent/orchestrator/providers/oauth-usage.mjs +14 -9
  88. package/src/runtime/agent/orchestrator/providers/openai-compat-chat-send.mjs +56 -11
  89. package/src/runtime/agent/orchestrator/providers/openai-compat-chat-stream/stream-result.mjs +2 -1
  90. package/src/runtime/agent/orchestrator/providers/openai-compat-chat-stream/stream-state.mjs +28 -1
  91. package/src/runtime/agent/orchestrator/providers/openai-compat-chat-stream.mjs +27 -3
  92. package/src/runtime/agent/orchestrator/providers/openai-compat-models.mjs +7 -5
  93. package/src/runtime/agent/orchestrator/providers/openai-compat-options.mjs +12 -0
  94. package/src/runtime/agent/orchestrator/providers/openai-compat-response-normalization.mjs +23 -8
  95. package/src/runtime/agent/orchestrator/providers/openai-compat-responses-events.mjs +26 -6
  96. package/src/runtime/agent/orchestrator/providers/openai-compat-responses-state.mjs +7 -1
  97. package/src/runtime/agent/orchestrator/providers/openai-compat-responses.mjs +34 -15
  98. package/src/runtime/agent/orchestrator/providers/openai-compat-stream.mjs +16 -2
  99. package/src/runtime/agent/orchestrator/providers/openai-compat-wire.mjs +12 -2
  100. package/src/runtime/agent/orchestrator/providers/openai-compat-xai-send.mjs +0 -6
  101. package/src/runtime/agent/orchestrator/providers/openai-compat-xai.mjs +0 -19
  102. package/src/runtime/agent/orchestrator/providers/openai-compat.mjs +12 -43
  103. package/src/runtime/agent/orchestrator/providers/openai-direct-request.mjs +6 -0
  104. package/src/runtime/agent/orchestrator/providers/openai-http-sse-response-state/response-events/terminal-frames.mjs +39 -9
  105. package/src/runtime/agent/orchestrator/providers/openai-oauth-catalog.mjs +31 -9
  106. package/src/runtime/agent/orchestrator/providers/openai-oauth-dispatch.mjs +13 -38
  107. package/src/runtime/agent/orchestrator/providers/openai-oauth-login.mjs +5 -2
  108. package/src/runtime/agent/orchestrator/providers/openai-oauth-tokens.mjs +40 -9
  109. package/src/runtime/agent/orchestrator/providers/openai-oauth-ws.mjs +7 -39
  110. package/src/runtime/agent/orchestrator/providers/openai-oauth.mjs +28 -101
  111. package/src/runtime/agent/orchestrator/providers/openai-responses-input.mjs +8 -4
  112. package/src/runtime/agent/orchestrator/providers/openai-responses-payload.mjs +3 -6
  113. package/src/runtime/agent/orchestrator/providers/openai-service-tier.mjs +19 -0
  114. package/src/runtime/agent/orchestrator/providers/openai-startup-prewarm.mjs +5 -195
  115. package/src/runtime/agent/orchestrator/providers/openai-ws-delta.mjs +9 -18
  116. package/src/runtime/agent/orchestrator/providers/openai-ws-events.mjs +4 -66
  117. package/src/runtime/agent/orchestrator/providers/openai-ws-response-state.mjs +11 -5
  118. package/src/runtime/agent/orchestrator/providers/openai-ws-send/acquire-attempt.mjs +3 -15
  119. package/src/runtime/agent/orchestrator/providers/openai-ws-send/attempt-request.mjs +6 -56
  120. package/src/runtime/agent/orchestrator/providers/openai-ws-send/send-context.mjs +1 -19
  121. package/src/runtime/agent/orchestrator/providers/openai-ws-send-attempts/attempt-context.mjs +2 -2
  122. package/src/runtime/agent/orchestrator/providers/openai-ws-send-attempts/handshake-failure.mjs +2 -1
  123. package/src/runtime/agent/orchestrator/providers/openai-ws-send-attempts/policy.mjs +3 -0
  124. package/src/runtime/agent/orchestrator/providers/openai-ws-send-attempts/stream-failure-stamps.mjs +0 -1
  125. package/src/runtime/agent/orchestrator/providers/openai-ws-send-attempts/stream-failure.mjs +3 -1
  126. package/src/runtime/agent/orchestrator/providers/openai-ws-send-attempts.mjs +3 -5
  127. package/src/runtime/agent/orchestrator/providers/openai-ws-send-outcome.mjs +10 -89
  128. package/src/runtime/agent/orchestrator/providers/openai-ws-send-span.mjs +1 -1
  129. package/src/runtime/agent/orchestrator/providers/openai-ws-send-trace.mjs +0 -6
  130. package/src/runtime/agent/orchestrator/providers/openai-ws-stream/terminal-frames.mjs +34 -11
  131. package/src/runtime/agent/orchestrator/providers/openai-ws-stream.mjs +0 -1
  132. package/src/runtime/agent/orchestrator/providers/openai-ws-watchdogs.mjs +3 -7
  133. package/src/runtime/agent/orchestrator/providers/openai-ws.mjs +44 -19
  134. package/src/runtime/agent/orchestrator/providers/opencode-go.mjs +40 -12
  135. package/src/runtime/agent/orchestrator/providers/quota-reading.mjs +70 -0
  136. package/src/runtime/agent/orchestrator/providers/registry.mjs +38 -3
  137. package/src/runtime/agent/orchestrator/providers/retry-classification.mjs +4 -0
  138. package/src/runtime/agent/orchestrator/providers/retry-classifier.mjs +1 -0
  139. package/src/runtime/agent/orchestrator/providers/retry-executor.mjs +2 -0
  140. package/src/runtime/agent/orchestrator/providers/retry-midstream.mjs +11 -0
  141. package/src/runtime/agent/orchestrator/runtime-core/builtin-features.mjs +31 -41
  142. package/src/runtime/agent/orchestrator/runtime-core/effort.mjs +5 -0
  143. package/src/runtime/agent/orchestrator/runtime-core/goal-mutations.mjs +0 -17
  144. package/src/runtime/agent/orchestrator/runtime-core/goal-state.mjs +0 -3
  145. package/src/runtime/agent/orchestrator/runtime-core/goal-store.mjs +0 -1
  146. package/src/runtime/agent/orchestrator/runtime-core/goal-text.mjs +1 -1
  147. package/src/runtime/agent/orchestrator/runtime-core/goal-tool-defs.mjs +1 -1
  148. package/src/runtime/agent/orchestrator/runtime-core/goal-tool-exec.mjs +1 -2
  149. package/src/runtime/agent/orchestrator/runtime-core/goal-turns.mjs +18 -4
  150. package/src/runtime/agent/orchestrator/runtime-core/model-capabilities.mjs +8 -1
  151. package/src/runtime/agent/orchestrator/runtime-core/orchestration.mjs +7 -1
  152. package/src/runtime/agent/orchestrator/runtime-core/session-route-policy.mjs +16 -0
  153. package/src/runtime/agent/orchestrator/runtime-core/tool-catalog.mjs +2 -0
  154. package/src/runtime/agent/orchestrator/runtime-core/tool-defs.mjs +6 -2
  155. package/src/runtime/agent/orchestrator/runtime-core/workflow/context.mjs +7 -7
  156. package/src/runtime/agent/orchestrator/runtime-core/workflow.mjs +6 -0
  157. package/src/runtime/agent/orchestrator/session/compact/observation-supersession.mjs +45 -2
  158. package/src/runtime/agent/orchestrator/session/compact/runner.mjs +5 -3
  159. package/src/runtime/agent/orchestrator/session/eager-dispatch/entry.mjs +5 -0
  160. package/src/runtime/agent/orchestrator/session/loop/compact-policy.mjs +6 -13
  161. package/src/runtime/agent/orchestrator/session/loop/request-boundary.mjs +6 -2
  162. package/src/runtime/agent/orchestrator/session/loop/step-auto-effort.mjs +114 -0
  163. package/src/runtime/agent/orchestrator/session/loop/tool-phase.mjs +2 -0
  164. package/src/runtime/agent/orchestrator/session/loop/usage.mjs +5 -9
  165. package/src/runtime/agent/orchestrator/session/manager/ask-turn-auto-effort.mjs +51 -18
  166. package/src/runtime/agent/orchestrator/session/manager/ask-turn-execute.mjs +7 -4
  167. package/src/runtime/agent/orchestrator/session/manager/ask-turn-loop-options.mjs +3 -1
  168. package/src/runtime/agent/orchestrator/session/manager/ask-turn-prepare.mjs +0 -2
  169. package/src/runtime/agent/orchestrator/session/manager/ask-turn-settle.mjs +6 -9
  170. package/src/runtime/agent/orchestrator/session/manager/session-lifecycle.mjs +63 -3
  171. package/src/runtime/agent/orchestrator/session/manager/session-owner-liveness.mjs +10 -28
  172. package/src/runtime/agent/orchestrator/session/manager/session-tool-surface.mjs +4 -4
  173. package/src/runtime/agent/orchestrator/session/manager/status-telemetry.mjs +13 -0
  174. package/src/runtime/agent/orchestrator/session/manager/usage-metrics.mjs +10 -19
  175. package/src/runtime/agent/orchestrator/session/tool-batch/execute-call.mjs +7 -1
  176. package/src/runtime/agent/orchestrator/session/tool-result-offload.mjs +1 -0
  177. package/src/runtime/agent/orchestrator/session/transcript-restore/restore.mjs +1 -3
  178. package/src/runtime/agent/orchestrator/stall-policy.mjs +0 -1
  179. package/src/runtime/agent/orchestrator/tools/builtin/atomic-write.mjs +18 -8
  180. package/src/runtime/agent/orchestrator/tools/builtin/cache-layers.mjs +19 -20
  181. package/src/runtime/agent/orchestrator/tools/builtin/external-tool-adapters.mjs +6 -11
  182. package/src/runtime/agent/orchestrator/tools/builtin/file-version-test-helpers.mjs +11 -0
  183. package/src/runtime/agent/orchestrator/tools/builtin/file-version.mjs +13 -0
  184. package/src/runtime/agent/orchestrator/tools/builtin/lib/grep-single-file-rescue.mjs +8 -5
  185. package/src/runtime/agent/orchestrator/tools/builtin/lib/shell-task-output.mjs +25 -12
  186. package/src/runtime/agent/orchestrator/tools/builtin/raw-content-publication.mjs +17 -0
  187. package/src/runtime/agent/orchestrator/tools/builtin/read-range-index.mjs +136 -76
  188. package/src/runtime/agent/orchestrator/tools/builtin/read-single-render.mjs +15 -17
  189. package/src/runtime/agent/orchestrator/tools/builtin/read-single-tool.mjs +4 -2
  190. package/src/runtime/agent/orchestrator/tools/builtin/read-snapshot-runtime.mjs +11 -10
  191. package/src/runtime/agent/orchestrator/tools/builtin/read-source-windows.mjs +5 -3
  192. package/src/runtime/agent/orchestrator/tools/builtin/read-streaming.mjs +30 -16
  193. package/src/runtime/agent/orchestrator/tools/builtin/shell-lossless-compact.mjs +2 -2
  194. package/src/runtime/agent/orchestrator/tools/builtin/snapshot-helpers.mjs +4 -11
  195. package/src/runtime/agent/orchestrator/tools/builtin/snapshot-store.mjs +7 -3
  196. package/src/runtime/agent/orchestrator/tools/builtin/snapshot-validation.mjs +16 -19
  197. package/src/runtime/agent/orchestrator/tools/graph-manifest.json +13 -13
  198. package/src/runtime/agent/orchestrator/tools/lib/shell-run-background.mjs +4 -1
  199. package/src/runtime/agent/orchestrator/tools/lib/shell-run-settle.mjs +14 -4
  200. package/src/runtime/agent/orchestrator/tools/patch/apply-patch/codex-batch.mjs +58 -8
  201. package/src/runtime/agent/orchestrator/tools/patch/content-guard.mjs +47 -0
  202. package/src/runtime/agent/orchestrator/tools/patch/delete-quarantine.mjs +155 -0
  203. package/src/runtime/agent/orchestrator/tools/patch/dispatch/native-proofs.mjs +6 -2
  204. package/src/runtime/agent/orchestrator/tools/patch/dispatch/native-snapshots.mjs +6 -2
  205. package/src/runtime/agent/orchestrator/tools/patch/dispatch.mjs +19 -16
  206. package/src/runtime/agent/orchestrator/tools/patch/matcher.mjs +13 -44
  207. package/src/runtime/agent/orchestrator/tools/patch/orchestrator.mjs +2 -2
  208. package/src/runtime/agent/orchestrator/tools/patch/post-patch-excerpts.mjs +5 -2
  209. package/src/runtime/agent/orchestrator/tools/patch/replay-capture.mjs +47 -7
  210. package/src/runtime/agent/orchestrator/tools/patch/rollback-state.mjs +72 -8
  211. package/src/runtime/agent/orchestrator/tools/patch/section-coalesce.mjs +3 -2
  212. package/src/runtime/agent/orchestrator/tools/patch/sequence/run.mjs +9 -1
  213. package/src/runtime/agent/orchestrator/tools/patch/sequence/units.mjs +9 -1
  214. package/src/runtime/agent/orchestrator/tools/patch/sequence.mjs +6 -6
  215. package/src/runtime/agent/orchestrator/tools/patch/ui-diff.mjs +16 -4
  216. package/src/runtime/agent/orchestrator/tools/patch/v4a-convert.mjs +35 -14
  217. package/src/runtime/agent/orchestrator/tools/patch/wave.mjs +42 -4
  218. package/src/runtime/agent/orchestrator/tools/progress-message.mjs +2 -0
  219. package/src/runtime/agent/orchestrator/tools/shell-codepage.mjs +296 -0
  220. package/src/runtime/agent/orchestrator/tools/shell-exec-output.mjs +75 -24
  221. package/src/runtime/browser-bridge/tool-defs.mjs +1 -0
  222. package/src/runtime/channels/lib/config.mjs +3 -8
  223. package/src/runtime/channels/lib/voice-runtime-fetcher.mjs +7 -3
  224. package/src/{tui → runtime/channels}/lib/voice-setup.mjs +38 -22
  225. package/src/runtime/channels/lib/webhook/request-handler.mjs +42 -8
  226. package/src/runtime/computer-bridge/actions.mjs +2 -0
  227. package/src/runtime/effort-judge/judge-client.mjs +125 -25
  228. package/src/runtime/effort-judge/judge-input.mjs +96 -0
  229. package/src/runtime/effort-judge/judge-worker.mjs +52 -20
  230. package/src/runtime/effort-judge/model-install.mjs +74 -0
  231. package/src/runtime/effort-judge/model-manifest.json +21 -0
  232. package/src/runtime/effort-judge/previous-human-request.mjs +162 -0
  233. package/src/runtime/effort-judge/verified-context-input.mjs +10 -0
  234. package/src/runtime/github/tool.mjs +214 -14
  235. package/src/runtime/local-provider/context-settings.mjs +15 -6
  236. package/src/runtime/local-provider/gguf-header.mjs +13 -5
  237. package/src/runtime/local-provider/hugging-face.mjs +27 -5
  238. package/src/runtime/local-provider/install-progress.mjs +7 -0
  239. package/src/runtime/local-provider/managed-runtime.mjs +2 -1
  240. package/src/runtime/local-provider/model-maintenance.mjs +15 -6
  241. package/src/runtime/local-provider/resumable-installations.mjs +40 -1
  242. package/src/runtime/local-provider/server.mjs +2 -0
  243. package/src/runtime/memory/lib/embedding-provider.mjs +12 -0
  244. package/src/runtime/memory/lib/http-router/session-routes.mjs +2 -1
  245. package/src/runtime/memory/lib/memory-config-flags.mjs +3 -2
  246. package/src/runtime/memory/lib/memory-embed.mjs +5 -0
  247. package/src/runtime/memory/lib/pg/process.mjs +57 -5
  248. package/src/runtime/office/README.md +13 -7
  249. package/src/runtime/office/authoring/docx-html-build.mjs +4 -4
  250. package/src/runtime/office/authoring/docx-html-measure.mjs +60 -0
  251. package/src/runtime/office/authoring/pdf-author-action.mjs +6 -1
  252. package/src/runtime/office/authoring/pptx-brief.mjs +40 -1
  253. package/src/runtime/office/authoring/pptx-html-build.mjs +1 -1
  254. package/src/runtime/office/authoring/pptx-html-measure.mjs +1 -1
  255. package/src/runtime/office/bench/deck-bench.mjs +1 -1
  256. package/src/runtime/office/com/office-com-host.ps1 +8 -0
  257. package/src/runtime/office/core/office-actions-render.mjs +2 -0
  258. package/src/runtime/office/design/design-art-direction.mjs +10 -2
  259. package/src/runtime/office/design/design-discipline.mjs +4 -5
  260. package/src/runtime/office/design/design-tokens.mjs +20 -1
  261. package/src/runtime/office/design/docx/design-docx/front-matter.mjs +7 -4
  262. package/src/runtime/office/design/docx/design-docx/section.mjs +3 -1
  263. package/src/runtime/office/design/docx/design-docx/writer.mjs +1 -0
  264. package/src/runtime/office/design/docx/design-docx-components.mjs +19 -15
  265. package/src/runtime/office/design/docx/design-docx.mjs +5 -6
  266. package/src/runtime/office/design/docx/document-typography.mjs +20 -6
  267. package/src/runtime/office/design/xlsx/design-xlsx.mjs +9 -2
  268. package/src/runtime/office/pdf/document-preview.mjs +133 -12
  269. package/src/runtime/office/pdf/pdf-writer.mjs +56 -22
  270. package/src/runtime/office/portable/portable-snapshot-docx.mjs +46 -3
  271. package/src/runtime/office/portable/portable-snapshot-shared.mjs +27 -1
  272. package/src/runtime/office/quality/assurance-rendered.mjs +21 -5
  273. package/src/runtime/office/quality/assurance-structure-docx.mjs +41 -9
  274. package/src/runtime/office/quality/design-aesthetics.mjs +4 -2
  275. package/src/runtime/office/quality/design-deck-diversity.mjs +15 -3
  276. package/src/runtime/office/quality/design-review.mjs +13 -5
  277. package/src/runtime/office/quality/document-brief.mjs +8 -2
  278. package/src/runtime/office/quality/forced-break-pages.mjs +203 -0
  279. package/src/runtime/office/quality/pptx-deck-rubric.mjs +21 -3
  280. package/src/runtime/office/quality/quality-pipeline.mjs +14 -17
  281. package/src/runtime/session-search/session-search-db.mjs +183 -0
  282. package/src/runtime/session-search/session-search-ingest.mjs +106 -0
  283. package/src/runtime/shared/agent-route-config.mjs +50 -2
  284. package/src/runtime/shared/bounded-file-read.mjs +166 -0
  285. package/src/runtime/shared/builtin-grandfathering.mjs +37 -0
  286. package/src/runtime/shared/config.mjs +24 -4
  287. package/src/runtime/shared/defaults-separation.mjs +263 -0
  288. package/src/runtime/shared/error-presentation.mjs +8 -1
  289. package/src/runtime/shared/llm/anthropic-effort.mjs +4 -0
  290. package/src/runtime/shared/llm/cost.mjs +4 -2
  291. package/src/runtime/shared/llm/model-catalog-projection.mjs +1 -1
  292. package/src/runtime/shared/llm/model-catalog.mjs +25 -0
  293. package/src/runtime/shared/llm/reasoning-usage.mjs +1 -2
  294. package/src/runtime/shared/llm/usage-accounting.mjs +14 -4
  295. package/src/runtime/shared/llm/usage-context.mjs +11 -1
  296. package/src/runtime/shared/llm/usage-ledger-repair.mjs +3 -1
  297. package/src/runtime/shared/llm/usage-ledger-rollup.mjs +105 -1
  298. package/src/runtime/shared/llm/usage-ledger-worker.mjs +2 -1
  299. package/src/runtime/shared/llm/usage-ledger.mjs +72 -5
  300. package/src/runtime/shared/onnx-runtime-support.mjs +6 -0
  301. package/src/runtime/shared/orchestration.mjs +14 -6
  302. package/src/runtime/shared/pristine-execution-contract.json +7 -2
  303. package/src/runtime/shared/projects.mjs +65 -48
  304. package/src/runtime/shared/provider-accounts.mjs +47 -6
  305. package/src/runtime/shared/quota-resume-store.mjs +255 -0
  306. package/src/runtime/shared/shipped-definitions.mjs +275 -0
  307. package/src/runtime/shared/tool-card-model/agent-surface.mjs +30 -9
  308. package/src/runtime/shared/tool-card-model/aggregate-card.mjs +7 -3
  309. package/src/runtime/shared/tool-card-model/background-task.mjs +17 -1
  310. package/src/runtime/shared/tool-card-model/card-detail.mjs +10 -4
  311. package/src/runtime/shared/tool-card-model/card-header.mjs +10 -4
  312. package/src/runtime/shared/tool-card-model/card-status.mjs +22 -5
  313. package/src/runtime/shared/tool-card-model/displayed-result.mjs +6 -1
  314. package/src/runtime/shared/tool-card-model/media-result.mjs +53 -0
  315. package/src/runtime/shared/tool-card-model/terminal-status.mjs +17 -1
  316. package/src/runtime/shared/tool-card-model.golden-cases.mjs +1 -1
  317. package/src/runtime/shared/tool-card-model.golden.json +75 -66
  318. package/src/runtime/shared/tool-card-model.mjs +1 -0
  319. package/src/runtime/shared/tool-output-limit.mjs +3 -0
  320. package/src/runtime/shared/tool-primitives.mjs +24 -18
  321. package/src/runtime/shared/tool-result-summary.mjs +128 -17
  322. package/src/runtime/shared/tool-status.mjs +20 -7
  323. package/src/runtime/shared/tool-surface.mjs +105 -28
  324. package/src/runtime/shared/tool-work-units.mjs +221 -18
  325. package/src/runtime/shared/transcript-metadata.mjs +2 -0
  326. package/src/runtime/shared/turn-review-reply.mjs +2 -0
  327. package/src/runtime/shared/turn-snapshot.mjs +65 -6
  328. package/src/runtime/shared/turn-worktree-snapshot.mjs +202 -22
  329. package/src/runtime/shared/worker-requests.mjs +14 -2
  330. package/src/runtime/terminal-bridge/client.mjs +311 -0
  331. package/src/runtime/terminal-bridge/tool-defs.mjs +36 -0
  332. package/src/runtime/web-search/lib/ssrf-guard.mjs +12 -56
  333. package/src/runtime/web-search/tool-defs.mjs +2 -0
  334. package/src/session-runtime/boot/apis.mjs +30 -5
  335. package/src/session-runtime/boot/config.mjs +4 -0
  336. package/src/session-runtime/boot/facade.mjs +4 -1
  337. package/src/session-runtime/boot/infrastructure.mjs +21 -2
  338. package/src/session-runtime/boot/session.mjs +5 -5
  339. package/src/session-runtime/boot/tools.mjs +2 -0
  340. package/src/session-runtime/builtin-features.d.mts +1 -0
  341. package/src/session-runtime/channel-config-api.mjs +5 -0
  342. package/src/session-runtime/config-lifecycle/config-writers.mjs +3 -0
  343. package/src/session-runtime/config-lifecycle.mjs +31 -6
  344. package/src/session-runtime/goal-facade-api.mjs +4 -0
  345. package/src/session-runtime/internal-tool-executor/bridge-tools.mjs +15 -3
  346. package/src/session-runtime/lifecycle/inheritance.mjs +28 -6
  347. package/src/session-runtime/lifecycle/session-switch/context-switch.mjs +3 -0
  348. package/src/session-runtime/lifecycle/session-switch/resume.mjs +7 -1
  349. package/src/session-runtime/lifecycle/session-switch/session-delete.mjs +9 -0
  350. package/src/session-runtime/lifecycle/teardown/session-close.mjs +14 -2
  351. package/src/session-runtime/lifecycle/teardown.mjs +5 -0
  352. package/src/session-runtime/local-provider-settings.mjs +10 -0
  353. package/src/session-runtime/media-api.mjs +32 -22
  354. package/src/session-runtime/model-recency.mjs +14 -0
  355. package/src/session-runtime/model-route/route-persist.mjs +17 -2
  356. package/src/session-runtime/model-route/route-tuning.mjs +16 -5
  357. package/src/session-runtime/model-route/set-route.mjs +55 -22
  358. package/src/session-runtime/model-route/web-search-route.mjs +2 -2
  359. package/src/session-runtime/model-route-api.mjs +2 -1
  360. package/src/session-runtime/notification-bus.mjs +31 -6
  361. package/src/session-runtime/provider-auth/login.mjs +6 -0
  362. package/src/session-runtime/provider-models/catalog-load.mjs +3 -1
  363. package/src/session-runtime/provider-models/row-hydration.mjs +36 -10
  364. package/src/session-runtime/quick-model-rows/model-meta.mjs +26 -0
  365. package/src/session-runtime/quick-model-rows/provider-rows.mjs +40 -14
  366. package/src/session-runtime/resource-api.mjs +8 -1
  367. package/src/session-runtime/route-state.mjs +9 -0
  368. package/src/session-runtime/runtime-core.mjs +4 -0
  369. package/src/session-runtime/runtime-facade.mjs +20 -1
  370. package/src/session-runtime/runtime-feature-gates.mjs +2 -0
  371. package/src/session-runtime/runtime-review-api.mjs +12 -1
  372. package/src/session-runtime/services/agent-tool/helpers.mjs +14 -1
  373. package/src/session-runtime/services/agent-tool/index-write-queue.mjs +10 -15
  374. package/src/session-runtime/services/agent-tool/lead-worker-index/reap-timers.mjs +6 -1
  375. package/src/session-runtime/services/agent-tool/lead-worker-index.mjs +20 -2
  376. package/src/session-runtime/services/agent-tool/spawn-flow/spawn-prep.mjs +14 -6
  377. package/src/session-runtime/services/agent-tool/spawn-preset.mjs +2 -0
  378. package/src/session-runtime/services/agent-tool/tag-registry.mjs +12 -1
  379. package/src/session-runtime/services/agent-tool/worker-index.mjs +17 -1
  380. package/src/session-runtime/services/agent-tool.mjs +1 -0
  381. package/src/session-runtime/services/channel-admin.mjs +87 -13
  382. package/src/session-runtime/services/provider-admin.mjs +306 -66
  383. package/src/session-runtime/services/seeds.mjs +73 -142
  384. package/src/session-runtime/services/usage-dashboard-model.mjs +29 -0
  385. package/src/session-runtime/services/usage-dashboard.mjs +7 -0
  386. package/src/session-runtime/session-address.mjs +125 -0
  387. package/src/session-runtime/session-create.mjs +57 -2
  388. package/src/session-runtime/settings-api.mjs +1 -0
  389. package/src/session-runtime/settings-builtin-tools-api.mjs +15 -10
  390. package/src/session-runtime/settings-compaction-api.mjs +13 -0
  391. package/src/session-runtime/setup-tool/executor.mjs +93 -40
  392. package/src/session-runtime/setup-tool/extended-actions.mjs +64 -5
  393. package/src/session-runtime/setup-tool/settings-contract.mjs +46 -3
  394. package/src/session-runtime/setup-tool/tool-defs.mjs +14 -6
  395. package/src/session-runtime/tool-surface.mjs +16 -9
  396. package/src/session-runtime/turn/session-ops.mjs +3 -0
  397. package/src/session-runtime/turn/share-ops.mjs +4 -1
  398. package/src/session-runtime/turn/turn-run/turn-prepare.mjs +6 -0
  399. package/src/session-runtime/usage-stats-api.mjs +43 -3
  400. package/src/session-runtime/workflow-agents-api/agent-editor.mjs +31 -5
  401. package/src/session-runtime/workflow-agents-api/agent-route.mjs +6 -2
  402. package/src/session-runtime/workflow-agents-api/workflow-packs.mjs +27 -7
  403. package/src/standalone/daemon-boot-coordinator.mjs +10 -0
  404. package/src/standalone/daemon-desktop-runtime.mjs +1 -0
  405. package/src/standalone/daemon-drain-policy.mjs +9 -0
  406. package/src/standalone/daemon-stored-session-views.mjs +7 -8
  407. package/src/standalone/daemon.mjs +36 -8
  408. package/src/standalone/local-session-runtime.mjs +11 -0
  409. package/src/standalone/session-client.mjs +52 -7
  410. package/src/standalone/session-protocol.mjs +9 -0
  411. package/src/standalone/session-service/agent-tree/agent-child.mjs +2 -0
  412. package/src/standalone/session-service/entries/lifecycle.mjs +2 -0
  413. package/src/standalone/session-service/entries/session-loads.mjs +9 -0
  414. package/src/standalone/session-service/projection/revisions.mjs +28 -4
  415. package/src/standalone/session-service/projection.mjs +1 -0
  416. package/src/standalone/session-service/quota-resume.mjs +140 -0
  417. package/src/standalone/session-service/session-calls/session-action.mjs +2 -2
  418. package/src/standalone/session-service/session-calls.mjs +10 -2
  419. package/src/standalone/session-service/stored-reader.mjs +26 -1
  420. package/src/standalone/session-service.mjs +21 -0
  421. package/src/standalone/session-transport/routes.mjs +2 -0
  422. package/src/tui/app/doctor.mjs +7 -11
  423. package/src/tui/app/maintenance-pickers/auto-clear-picker.mjs +3 -5
  424. package/src/tui/app/model-picker/model-footer.mjs +2 -2
  425. package/src/tui/app/model-picker/route-selection/fast-parameters.mjs +21 -2
  426. package/src/tui/app/model-picker/route-selection.mjs +6 -1
  427. package/src/tui/app/settings-picker/settings-rows.mjs +4 -6
  428. package/src/tui/app/settings-picker/settings-toggles/store-toggles.mjs +1 -1
  429. package/src/tui/app/slash-commands.mjs +1 -1
  430. package/src/tui/app/slash-dispatch/route-commands.mjs +5 -3
  431. package/src/tui/app/transcript-row-estimate.mjs +17 -5
  432. package/src/tui/components/ContextPanel.jsx +5 -1
  433. package/src/tui/components/Spinner.jsx +34 -319
  434. package/src/tui/components/SpinnerByline.jsx +256 -0
  435. package/src/tui/components/tool-execution/aggregate-card.jsx +4 -2
  436. package/src/tui/components/tool-execution/text-format.mjs +1 -0
  437. package/src/tui/components/use-spinner-progress.mjs +113 -0
  438. package/src/tui/dist/index.mjs +15896 -14452
  439. package/src/tui/session/agent-job-feed/execution-delivery.mjs +13 -1
  440. package/src/tui/session/agent-job-feed/notification-router.mjs +3 -0
  441. package/src/tui/session/agent-job-feed/pending-resume.mjs +14 -1
  442. package/src/tui/session/agent-job-feed.mjs +4 -0
  443. package/src/tui/session/context-state.mjs +13 -1
  444. package/src/tui/session/initial-state.mjs +6 -0
  445. package/src/tui/session/quota-resume.mjs +263 -0
  446. package/src/tui/session/session-api/intake/abort.mjs +39 -35
  447. package/src/tui/session/session-api/intake/submission.mjs +13 -21
  448. package/src/tui/session/session-api/intake.mjs +3 -3
  449. package/src/tui/session/session-api/integrations.mjs +5 -1
  450. package/src/tui/session/session-api/lifecycle/dispose.mjs +1 -0
  451. package/src/tui/session/session-api/lifecycle/inheritance.mjs +2 -2
  452. package/src/tui/session/session-api/lifecycle/session-reset.mjs +4 -0
  453. package/src/tui/session/session-api/lifecycle.mjs +71 -2
  454. package/src/tui/session/session-api/media.mjs +2 -2
  455. package/src/tui/session/session-api/quota-resume.mjs +21 -0
  456. package/src/tui/session/session-api/routes.mjs +5 -2
  457. package/src/tui/session/session-api/settings.mjs +2 -0
  458. package/src/tui/session/session-api.mjs +2 -0
  459. package/src/tui/session/session-flow/auto-clear.mjs +14 -6
  460. package/src/tui/session/session-flow/drain.mjs +52 -5
  461. package/src/tui/session/session-flow/queue/take-entries.mjs +9 -4
  462. package/src/tui/session/session-flow/queue.mjs +4 -0
  463. package/src/tui/session/session-flow/steering.mjs +11 -0
  464. package/src/tui/session/session-flow.mjs +1 -0
  465. package/src/tui/session/tool-approval.mjs +7 -2
  466. package/src/tui/session/transcript-intake.mjs +1 -0
  467. package/src/tui/session/turn-tool-cards.mjs +4 -6
  468. package/src/tui/session/turn.mjs +40 -4
  469. package/src/vendor/statusline/bin/statusline-route.mjs +3 -2
  470. package/src/vendor/statusline/src/gateway/route-meta.mjs +1 -1
  471. package/src/runtime/agent/orchestrator/providers/openai-ws-warmup.mjs +0 -165
@@ -10,13 +10,13 @@
10
10
  "callFailedCount": 0,
11
11
  "exitFailedCount": 0,
12
12
  "terminalStatus": "running",
13
+ "hasResult": false,
14
+ "hasRawResult": false,
13
15
  "labelText": "Running 1 command",
14
16
  "summaryText": "npm test",
15
17
  "headerFailureText": "",
16
18
  "detailLine": "Running · 19s",
17
19
  "detailIsPlaceholder": true,
18
- "hasResult": false,
19
- "hasRawResult": false,
20
20
  "hasDisplayResult": false,
21
21
  "hasDisplayBody": false,
22
22
  "displayedResultBodyText": "",
@@ -50,13 +50,13 @@
50
50
  "callFailedCount": 0,
51
51
  "exitFailedCount": 0,
52
52
  "terminalStatus": "completed",
53
+ "hasResult": true,
54
+ "hasRawResult": false,
53
55
  "labelText": "Ran 1 command",
54
56
  "summaryText": "ls",
55
57
  "headerFailureText": "",
56
58
  "detailLine": "[elapsed: 2500 ms] · 2s",
57
59
  "detailIsPlaceholder": false,
58
- "hasResult": true,
59
- "hasRawResult": false,
60
60
  "hasDisplayResult": true,
61
61
  "hasDisplayBody": true,
62
62
  "displayedResultBodyText": "[elapsed: 2500 ms]\nfile-a\nfile-b",
@@ -90,13 +90,13 @@
90
90
  "callFailedCount": 0,
91
91
  "exitFailedCount": 1,
92
92
  "terminalStatus": "failed",
93
+ "hasResult": true,
94
+ "hasRawResult": false,
93
95
  "labelText": "Ran 1 command",
94
96
  "summaryText": "false",
95
97
  "headerFailureText": "",
96
98
  "detailLine": "Failed · exit 1",
97
99
  "detailIsPlaceholder": false,
98
- "hasResult": true,
99
- "hasRawResult": false,
100
100
  "hasDisplayResult": true,
101
101
  "hasDisplayBody": true,
102
102
  "displayedResultBodyText": "exit 1",
@@ -130,13 +130,13 @@
130
130
  "callFailedCount": 0,
131
131
  "exitFailedCount": 0,
132
132
  "terminalStatus": "completed",
133
+ "hasResult": true,
134
+ "hasRawResult": false,
133
135
  "labelText": "Verified 2 commands",
134
136
  "summaryText": "npm test",
135
137
  "headerFailureText": "",
136
138
  "detailLine": "ok",
137
139
  "detailIsPlaceholder": false,
138
- "hasResult": true,
139
- "hasRawResult": false,
140
140
  "hasDisplayResult": true,
141
141
  "hasDisplayBody": true,
142
142
  "displayedResultBodyText": "ok",
@@ -171,13 +171,13 @@
171
171
  "callFailedCount": 0,
172
172
  "exitFailedCount": 0,
173
173
  "terminalStatus": "running",
174
+ "hasResult": false,
175
+ "hasRawResult": false,
174
176
  "labelText": "Spawn Worker (GPT-5, lens-a)",
175
177
  "summaryText": "",
176
178
  "headerFailureText": "",
177
179
  "detailLine": "",
178
180
  "detailIsPlaceholder": false,
179
- "hasResult": false,
180
- "hasRawResult": false,
181
181
  "hasDisplayResult": false,
182
182
  "hasDisplayBody": false,
183
183
  "displayedResultBodyText": "",
@@ -214,13 +214,13 @@
214
214
  "callFailedCount": 0,
215
215
  "exitFailedCount": 0,
216
216
  "terminalStatus": "completed",
217
+ "hasResult": true,
218
+ "hasRawResult": false,
217
219
  "labelText": "Response Heavy Worker",
218
220
  "summaryText": "",
219
221
  "headerFailureText": "",
220
222
  "detailLine": "",
221
223
  "detailIsPlaceholder": false,
222
- "hasResult": true,
223
- "hasRawResult": false,
224
224
  "hasDisplayResult": true,
225
225
  "hasDisplayBody": true,
226
226
  "displayedResultBodyText": "Here is the review summary.\nmore",
@@ -233,7 +233,7 @@
233
233
  "normalizedName": "agent",
234
234
  "label": "Agent",
235
235
  "parsedArgs": {
236
- "type": "send",
236
+ "type": "result",
237
237
  "agent": "heavy-worker",
238
238
  "status": "completed"
239
239
  },
@@ -256,13 +256,13 @@
256
256
  "callFailedCount": 0,
257
257
  "exitFailedCount": 0,
258
258
  "terminalStatus": "running",
259
+ "hasResult": false,
260
+ "hasRawResult": false,
259
261
  "labelText": "Spawn Worker",
260
262
  "summaryText": "",
261
263
  "headerFailureText": "",
262
264
  "detailLine": "Running",
263
265
  "detailIsPlaceholder": true,
264
- "hasResult": false,
265
- "hasRawResult": false,
266
266
  "hasDisplayResult": false,
267
267
  "hasDisplayBody": false,
268
268
  "displayedResultBodyText": "",
@@ -299,13 +299,13 @@
299
299
  "callFailedCount": 0,
300
300
  "exitFailedCount": 0,
301
301
  "terminalStatus": "completed",
302
+ "hasResult": true,
303
+ "hasRawResult": false,
302
304
  "labelText": "Agent status",
303
- "summaryText": "list",
305
+ "summaryText": "",
304
306
  "headerFailureText": "",
305
307
  "detailLine": "",
306
308
  "detailIsPlaceholder": false,
307
- "hasResult": true,
308
- "hasRawResult": false,
309
309
  "hasDisplayResult": true,
310
310
  "hasDisplayBody": true,
311
311
  "displayedResultBodyText": "(no agents or tasks)",
@@ -339,20 +339,20 @@
339
339
  "callFailedCount": 0,
340
340
  "exitFailedCount": 0,
341
341
  "terminalStatus": "running",
342
+ "hasResult": true,
343
+ "hasRawResult": false,
342
344
  "labelText": "Started Shell",
343
345
  "summaryText": "",
344
346
  "headerFailureText": "",
345
- "detailLine": "Running · background task",
347
+ "detailLine": "Running · building…",
346
348
  "detailIsPlaceholder": false,
347
- "hasResult": true,
348
- "hasRawResult": false,
349
349
  "hasDisplayResult": true,
350
350
  "hasDisplayBody": true,
351
351
  "displayedResultBodyText": "background task\ntask_id: t1\nsurface: shell\nstatus: running\nstarted: 2024-01-01T00:00:00Z\n\nbuilding…",
352
352
  "firstResultLine": "background task",
353
353
  "totalLines": 7,
354
- "resultSummary": "background task",
355
- "shellCollapsedSummary": "background task",
354
+ "resultSummary": "building…",
355
+ "shellCollapsedSummary": "building…",
356
356
  "agentSurfaceBrief": "",
357
357
  "toolArgPath": "",
358
358
  "normalizedName": "shell",
@@ -392,13 +392,13 @@
392
392
  "callFailedCount": 0,
393
393
  "exitFailedCount": 0,
394
394
  "terminalStatus": "completed",
395
+ "hasResult": true,
396
+ "hasRawResult": false,
395
397
  "labelText": "Shell output",
396
398
  "summaryText": "",
397
399
  "headerFailureText": "",
398
400
  "detailLine": "all good",
399
401
  "detailIsPlaceholder": false,
400
- "hasResult": true,
401
- "hasRawResult": false,
402
402
  "hasDisplayResult": true,
403
403
  "hasDisplayBody": true,
404
404
  "displayedResultBodyText": "all good\nline2",
@@ -443,13 +443,13 @@
443
443
  "callFailedCount": 0,
444
444
  "exitFailedCount": 0,
445
445
  "terminalStatus": "failed",
446
+ "hasResult": true,
447
+ "hasRawResult": false,
446
448
  "labelText": "Web Search status",
447
449
  "summaryText": "",
448
450
  "headerFailureText": "",
449
451
  "detailLine": "Failed · task_id: t3",
450
452
  "detailIsPlaceholder": false,
451
- "hasResult": true,
452
- "hasRawResult": false,
453
453
  "hasDisplayResult": true,
454
454
  "hasDisplayBody": true,
455
455
  "displayedResultBodyText": "background task\ntask_id: t3\nsurface: web_search\nstatus: failed\nerror: boom",
@@ -494,13 +494,13 @@
494
494
  "callFailedCount": 0,
495
495
  "exitFailedCount": 0,
496
496
  "terminalStatus": "completed",
497
+ "hasResult": true,
498
+ "hasRawResult": false,
497
499
  "labelText": "Loaded office, media",
498
500
  "summaryText": "Loaded: office · Already active: media",
499
501
  "headerFailureText": "",
500
502
  "detailLine": "Finished",
501
503
  "detailIsPlaceholder": false,
502
- "hasResult": true,
503
- "hasRawResult": false,
504
504
  "hasDisplayResult": true,
505
505
  "hasDisplayBody": true,
506
506
  "displayedResultBodyText": "{\"selected\":{\"tools\":{\"added\":[\"office\"],\"already\":[\"media\"]}}}",
@@ -513,7 +513,10 @@
513
513
  "normalizedName": "load_tool",
514
514
  "label": "Load Tools",
515
515
  "parsedArgs": {
516
- "names": ["office", "media"]
516
+ "names": [
517
+ "office",
518
+ "media"
519
+ ]
517
520
  },
518
521
  "isShellSurface": false,
519
522
  "isSkillSurface": false,
@@ -534,13 +537,13 @@
534
537
  "callFailedCount": 0,
535
538
  "exitFailedCount": 0,
536
539
  "terminalStatus": "failed",
537
- "labelText": "Loaded pdf",
540
+ "hasResult": true,
541
+ "hasRawResult": false,
542
+ "labelText": "Failed while loading pdf",
538
543
  "summaryText": "",
539
544
  "headerFailureText": "",
540
545
  "detailLine": "Failed to load",
541
546
  "detailIsPlaceholder": false,
542
- "hasResult": true,
543
- "hasRawResult": false,
544
547
  "hasDisplayResult": true,
545
548
  "hasDisplayBody": true,
546
549
  "displayedResultBodyText": "Failed to load",
@@ -574,13 +577,13 @@
574
577
  "callFailedCount": 0,
575
578
  "exitFailedCount": 0,
576
579
  "terminalStatus": "completed",
580
+ "hasResult": true,
581
+ "hasRawResult": false,
577
582
  "labelText": "Loaded pdf",
578
583
  "summaryText": "",
579
584
  "headerFailureText": "",
580
585
  "detailLine": "",
581
586
  "detailIsPlaceholder": false,
582
- "hasResult": true,
583
- "hasRawResult": false,
584
587
  "hasDisplayResult": true,
585
588
  "hasDisplayBody": true,
586
589
  "displayedResultBodyText": "loaded",
@@ -614,13 +617,13 @@
614
617
  "callFailedCount": 0,
615
618
  "exitFailedCount": 0,
616
619
  "terminalStatus": "completed",
620
+ "hasResult": true,
621
+ "hasRawResult": false,
617
622
  "labelText": "Read 1 file",
618
623
  "summaryText": "y.mjs",
619
624
  "headerFailureText": "",
620
625
  "detailLine": "2 lines",
621
626
  "detailIsPlaceholder": false,
622
- "hasResult": true,
623
- "hasRawResult": false,
624
627
  "hasDisplayResult": true,
625
628
  "hasDisplayBody": true,
626
629
  "displayedResultBodyText": "1→line\n2→line",
@@ -654,13 +657,13 @@
654
657
  "callFailedCount": 0,
655
658
  "exitFailedCount": 0,
656
659
  "terminalStatus": "completed",
660
+ "hasResult": true,
661
+ "hasRawResult": false,
657
662
  "labelText": "Read 1 image",
658
663
  "summaryText": "a.png",
659
664
  "headerFailureText": "",
660
665
  "detailLine": "1 line",
661
666
  "detailIsPlaceholder": false,
662
- "hasResult": true,
663
- "hasRawResult": false,
664
667
  "hasDisplayResult": true,
665
668
  "hasDisplayBody": true,
666
669
  "displayedResultBodyText": "ok",
@@ -694,13 +697,13 @@
694
697
  "callFailedCount": 0,
695
698
  "exitFailedCount": 0,
696
699
  "terminalStatus": "completed",
700
+ "hasResult": true,
701
+ "hasRawResult": false,
697
702
  "labelText": "Researched 1 query",
698
703
  "summaryText": "\"node test runner\"",
699
704
  "headerFailureText": "",
700
705
  "detailLine": "1 result · 2s",
701
706
  "detailIsPlaceholder": false,
702
- "hasResult": true,
703
- "hasRawResult": false,
704
707
  "hasDisplayResult": true,
705
708
  "hasDisplayBody": true,
706
709
  "displayedResultBodyText": "Result 1\nResult 2",
@@ -734,13 +737,13 @@
734
737
  "callFailedCount": 0,
735
738
  "exitFailedCount": 0,
736
739
  "terminalStatus": "running",
740
+ "hasResult": false,
741
+ "hasRawResult": false,
737
742
  "labelText": "Calling 2 tools, Calling 1 tool",
738
743
  "summaryText": "",
739
744
  "headerFailureText": "",
740
745
  "detailLine": "Running",
741
746
  "detailIsPlaceholder": true,
742
- "hasResult": false,
743
- "hasRawResult": false,
744
747
  "displayedResultBodyText": "",
745
748
  "firstResultLine": "",
746
749
  "totalLines": 0,
@@ -749,7 +752,10 @@
749
752
  "normalizedName": "",
750
753
  "label": "",
751
754
  "parsedArgs": {
752
- "categoryOrder": ["read", "search"]
755
+ "categoryOrder": [
756
+ "read",
757
+ "search"
758
+ ]
753
759
  },
754
760
  "isShellSurface": false,
755
761
  "isSkillSurface": false,
@@ -770,13 +776,13 @@
770
776
  "callFailedCount": 0,
771
777
  "exitFailedCount": 0,
772
778
  "terminalStatus": "completed",
779
+ "hasResult": true,
780
+ "hasRawResult": false,
773
781
  "labelText": "Called 2 tools",
774
782
  "summaryText": "",
775
783
  "headerFailureText": "",
776
784
  "detailLine": "Loaded 2 files",
777
785
  "detailIsPlaceholder": false,
778
- "hasResult": true,
779
- "hasRawResult": false,
780
786
  "displayedResultBodyText": "Loaded 2 files",
781
787
  "firstResultLine": "Loaded 2 files",
782
788
  "totalLines": 1,
@@ -804,13 +810,13 @@
804
810
  "callFailedCount": 0,
805
811
  "exitFailedCount": 0,
806
812
  "terminalStatus": "completed",
813
+ "hasResult": false,
814
+ "hasRawResult": false,
807
815
  "labelText": "Loaded office, media",
808
816
  "summaryText": "",
809
817
  "headerFailureText": "",
810
818
  "detailLine": "Finished",
811
819
  "detailIsPlaceholder": true,
812
- "hasResult": false,
813
- "hasRawResult": false,
814
820
  "displayedResultBodyText": "",
815
821
  "firstResultLine": "",
816
822
  "totalLines": 0,
@@ -819,7 +825,10 @@
819
825
  "normalizedName": "",
820
826
  "label": "",
821
827
  "parsedArgs": {
822
- "loadingTargets": ["office", "media"]
828
+ "loadingTargets": [
829
+ "office",
830
+ "media"
831
+ ]
823
832
  },
824
833
  "isShellSurface": false,
825
834
  "isSkillSurface": false,
@@ -840,13 +849,13 @@
840
849
  "callFailedCount": 1,
841
850
  "exitFailedCount": 0,
842
851
  "terminalStatus": "failed",
852
+ "hasResult": true,
853
+ "hasRawResult": false,
843
854
  "labelText": "Searched 1 pattern",
844
855
  "summaryText": "pattern: \"foo\"",
845
856
  "headerFailureText": "",
846
857
  "detailLine": "Failed · 2 matches",
847
858
  "detailIsPlaceholder": false,
848
- "hasResult": true,
849
- "hasRawResult": false,
850
859
  "hasDisplayResult": true,
851
860
  "hasDisplayBody": true,
852
861
  "displayedResultBodyText": "a\tb\r\nc",
@@ -880,20 +889,20 @@
880
889
  "callFailedCount": 0,
881
890
  "exitFailedCount": 0,
882
891
  "terminalStatus": "failed",
892
+ "hasResult": true,
893
+ "hasRawResult": false,
883
894
  "labelText": "Edited 1 file",
884
895
  "summaryText": "file_path=x.mjs",
885
896
  "headerFailureText": "",
886
- "detailLine": "Failed",
897
+ "detailLine": "Failed · no match",
887
898
  "detailIsPlaceholder": false,
888
- "hasResult": true,
889
- "hasRawResult": false,
890
- "hasDisplayResult": false,
891
- "hasDisplayBody": false,
892
- "displayedResultBodyText": "",
893
- "firstResultLine": "",
894
- "totalLines": 0,
895
- "resultSummary": null,
896
- "shellCollapsedSummary": null,
899
+ "hasDisplayResult": true,
900
+ "hasDisplayBody": true,
901
+ "displayedResultBodyText": "Error: no match",
902
+ "firstResultLine": "Error: no match",
903
+ "totalLines": 1,
904
+ "resultSummary": "no match",
905
+ "shellCollapsedSummary": "no match",
897
906
  "agentSurfaceBrief": "",
898
907
  "toolArgPath": "x.mjs",
899
908
  "normalizedName": "edit",
@@ -920,13 +929,13 @@
920
929
  "callFailedCount": 0,
921
930
  "exitFailedCount": 0,
922
931
  "terminalStatus": "failed",
923
- "labelText": "Response Worker",
932
+ "hasResult": true,
933
+ "hasRawResult": false,
934
+ "labelText": "Spawn Worker",
924
935
  "summaryText": "",
925
936
  "headerFailureText": "",
926
- "detailLine": "status: failed",
937
+ "detailLine": "Failed · status: failed",
927
938
  "detailIsPlaceholder": false,
928
- "hasResult": true,
929
- "hasRawResult": false,
930
939
  "hasDisplayResult": true,
931
940
  "hasDisplayBody": true,
932
941
  "displayedResultBodyText": "Agent result\nstatus: failed\n\nThe worker failed after a very long explanation that keeps going and going",
@@ -947,7 +956,7 @@
947
956
  "isShellSurface": false,
948
957
  "isSkillSurface": false,
949
958
  "isAgentSurfaceCard": true,
950
- "isAgentResponse": true,
959
+ "isAgentResponse": false,
951
960
  "isBackgroundResponse": false,
952
961
  "isBackgroundMetadataResult": false,
953
962
  "backgroundMeta": null
@@ -62,6 +62,7 @@ export {
62
62
  agentResponseTitle,
63
63
  agentTerminalDetail,
64
64
  hasAgentResponseResult,
65
+ isAgentResponseResult,
65
66
  isAgentTool,
66
67
  SKILL_SURFACE_NAMES,
67
68
  } from './tool-card-model/agent-surface.mjs';
@@ -19,6 +19,9 @@ export const CODE_GRAPH_OUTPUT_MAX_BYTES = positiveEnvInt('MIXDOG_CODE_GRAPH_OUT
19
19
  // browses were observed injecting 42KB in one call (2026-08-05 audit). Same
20
20
  // class as locators: 20KB with a factual continuation footer.
21
21
  export const RECALL_OUTPUT_MAX_BYTES = positiveEnvInt('MIXDOG_RECALL_OUTPUT_MAX_BYTES', 20 * 1024);
22
+ // github results after field reduction; the full response stays in a raw
23
+ // artifact. Provisional: reduced pr.list/run.list pages measured ~2k tokens.
24
+ export const GITHUB_OUTPUT_MAX_BYTES = positiveEnvInt('MIXDOG_GITHUB_OUTPUT_MAX_BYTES', 10 * 1024);
22
25
 
23
26
  function _prefixByBytes(value, maxBytes) {
24
27
  const text = String(value || '');
@@ -234,13 +234,12 @@ export function bridgeAgentModelSummary(args) {
234
234
  }
235
235
 
236
236
  export function summarizeLineWindow(a) {
237
- const hasOffset = a.offset != null;
238
237
  const offset = a.offset ?? a.start_line ?? a.startLine ?? a.line;
239
238
  const limit = a.limit ?? a.line_count ?? a.lineCount ?? a.lines;
240
239
  if (offset == null && limit == null) return '';
241
- // `read` uses a zero-based offset, while legacy start_line/line inputs are
242
- // already one-based. Surface the human line number, never a raw array index.
243
- const start = Number(offset) + (hasOffset ? 1 : 0);
240
+ // The public `read` schema's offset and the legacy start_line/line inputs
241
+ // are all one-based line numbers.
242
+ const start = Number(offset);
244
243
  const count = Number(limit);
245
244
  if (Number.isFinite(start) && Number.isFinite(count) && count > 0) {
246
245
  return `lines ${start}-${Math.max(start, start + count - 1)}`;
@@ -298,25 +297,32 @@ export function patchFileCount(args = {}) {
298
297
  export function codeGraphLabel(args) {
299
298
  const mode = String(args.mode || args.action || '').toLowerCase();
300
299
  if (mode === 'prewarm' || mode === 'index' || mode === 'build' || mode === 'refresh') return 'Setup';
301
- if (mode === 'search' || mode === 'find_symbol' || mode === 'references' || mode === 'callers' || mode === 'callees')
300
+ if (
301
+ mode === 'search' ||
302
+ mode === 'symbol_search' ||
303
+ mode === 'find_symbol' ||
304
+ mode === 'references' ||
305
+ mode === 'callers' ||
306
+ mode === 'callees'
307
+ )
302
308
  return 'Search';
303
309
  return 'Read';
304
310
  }
305
311
 
312
+ const CODE_GRAPH_FILE_MODES = new Set(['overview', 'imports', 'dependents', 'related', 'impact']);
313
+
314
+ /** A scalar-or-array argument as its non-empty entries. */
315
+ function listOf(value) {
316
+ const items = Array.isArray(value) ? value : [value];
317
+ return items.map((item) => String(item ?? '').trim()).filter(Boolean);
318
+ }
319
+
306
320
  export function codeGraphSummary(args, max) {
307
- return compactParts([
308
- args.mode || args.action || '',
309
- truncateToolText(
310
- firstText(
311
- args.symbol,
312
- Array.isArray(args.symbols) ? args.symbols.join(', ') : '',
313
- args.file,
314
- args.path,
315
- args.query
316
- ),
317
- max
318
- ),
319
- ]);
321
+ const mode = String(args.mode || args.action || '');
322
+ const symbols = listOf(args.symbols ?? args.symbol);
323
+ const files = listOf(args.files ?? args.file ?? args.path).map(displayToolPath);
324
+ const targets = CODE_GRAPH_FILE_MODES.has(mode) ? files.concat(symbols) : symbols.concat(files);
325
+ return compactParts([mode, truncateToolText(targets.join(', ') || firstText(args.query), max)]);
320
326
  }
321
327
 
322
328
  export function pluralize(count, singular, pluralText = `${singular}s`) {