arco-workbench 0.1.7 → 0.1.9

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 (301) hide show
  1. package/CONTRIBUTING.md +63 -12
  2. package/README.md +21 -17
  3. package/client/dist/assets/{PhosphorBackdrop-DVQdBrTw.js → PhosphorBackdrop-DRu16-Is.js} +1 -1
  4. package/client/dist/assets/{ThemedBackgroundShaderImpl-BfSs2tB4.js → ThemedBackgroundShaderImpl-BLdwwQ4D.js} +1 -1
  5. package/client/dist/assets/{XtermView-DaMjC8Ny.js → XtermView-Xk7_9JaH.js} +1 -1
  6. package/client/dist/assets/{galleryEditor-BCQnXj7R.js → galleryEditor-CI8ClzBa.js} +1 -1
  7. package/client/dist/assets/{index-DD9kFGsF.css → index-BEFgrUJJ.css} +1 -1
  8. package/client/dist/assets/{index-COfbHCYv.js → index-C7WzZfsr.js} +257 -255
  9. package/client/dist/index.html +2 -2
  10. package/client/src/App.tsx +2 -0
  11. package/client/src/components/ChatMessage.tsx +33 -8
  12. package/client/src/components/ChatModeView.tsx +2 -0
  13. package/client/src/components/ClusterRightPanel/ReplaceMemberDialog.tsx +65 -15
  14. package/client/src/components/ClusterRightPanel/SkillsControl.tsx +124 -0
  15. package/client/src/components/ClusterRightPanel/index.tsx +4 -0
  16. package/client/src/components/ClusterTaskBoardTab.tsx +9 -22
  17. package/client/src/components/CodexLateCommand.tsx +34 -0
  18. package/client/src/components/DialogShell.tsx +2 -0
  19. package/client/src/components/MemberCard.tsx +4 -1
  20. package/client/src/components/MemberPane.tsx +3 -1
  21. package/client/src/components/NeedsYouBadge.tsx +3 -3
  22. package/client/src/components/PhoneUpload.tsx +288 -0
  23. package/client/src/components/PrimaryStatus.tsx +14 -6
  24. package/client/src/components/ProviderReleasesModal.tsx +8 -4
  25. package/client/src/components/ProvidersPopover.tsx +28 -23
  26. package/client/src/components/RuntimeStateBanner.tsx +5 -0
  27. package/client/src/components/SettingsPanel.tsx +2 -2
  28. package/client/src/components/SkillEditorDialog.tsx +2 -2
  29. package/client/src/components/SkillsSettings.tsx +21 -4
  30. package/client/src/components/TabBar.tsx +91 -9
  31. package/client/src/components/TerminalInput.tsx +15 -11
  32. package/client/src/components/TranscriptSendDialog.tsx +12 -8
  33. package/client/src/components/TranscriptWorkerDialog.tsx +119 -0
  34. package/client/src/components/WorkflowView.tsx +2 -0
  35. package/client/src/components/clusterNeedsYou.ts +11 -18
  36. package/client/src/explorer/ArtifactsLens.tsx +37 -28
  37. package/client/src/explorer/ExplorerApp.tsx +5 -4
  38. package/client/src/explorer/types.ts +8 -3
  39. package/client/src/help/content/cluster.tsx +48 -17
  40. package/client/src/help/content/composer.tsx +40 -1
  41. package/client/src/help/content/header.tsx +18 -1
  42. package/client/src/help/content/misc.tsx +9 -1
  43. package/client/src/help/content/settings.tsx +18 -4
  44. package/client/src/help/content/tabbar.tsx +5 -0
  45. package/client/src/help/manualSections/actions.tsx +31 -0
  46. package/client/src/help/manualSections/clusters.tsx +44 -20
  47. package/client/src/help/manualSections/configuration.tsx +20 -0
  48. package/client/src/help/manualSections/gettingStarted.tsx +4 -4
  49. package/client/src/help/manualSections/maintenance.tsx +25 -6
  50. package/client/src/help/manualSections/powerFeatures.tsx +3 -2
  51. package/client/src/help/manualSections/providers.tsx +32 -8
  52. package/client/src/help/manualSections/troubleshooting.tsx +2 -1
  53. package/client/src/help/manualSections/workflows.tsx +12 -0
  54. package/client/src/help/manualSections/workspace.tsx +36 -0
  55. package/client/src/stores/appStore.ts +7 -0
  56. package/client/src/stores/appStore.types.ts +4 -0
  57. package/client/src/styles/global.css +109 -0
  58. package/client/src/utils/phoneTheme.ts +38 -0
  59. package/client/src/utils/phoneUploadApi.ts +10 -0
  60. package/client/src/utils/transcriptWorkerRequest.ts +24 -0
  61. package/client/src/ws/handleServerMessage.ts +31 -8
  62. package/docs/ARCHITECTURE.md +1 -1
  63. package/docs/CLIENT.md +16 -9
  64. package/docs/FEATURES.md +13 -7
  65. package/docs/GETTING_STARTED.md +12 -6
  66. package/docs/GOTCHAS.md +2 -1
  67. package/docs/INDEX.md +1 -1
  68. package/docs/OPERATIONS.md +213 -52
  69. package/docs/PERSISTENCE.md +7 -2
  70. package/docs/PRIMITIVES.md +42 -0
  71. package/docs/PROTOCOL_CLUSTER.md +51 -4
  72. package/docs/PROTOCOL_PRIMITIVES.md +39 -0
  73. package/docs/PROVIDERS.md +84 -13
  74. package/docs/SETTINGS.md +29 -3
  75. package/docs/TASK_LEDGER.md +7 -15
  76. package/native/linux-x64/manifest.json +1 -1
  77. package/native/win32-x64/manifest.json +1 -1
  78. package/node_modules/@arco/shared/dist/clusterCoordination.d.ts +2 -0
  79. package/node_modules/@arco/shared/dist/clusterCoordination.js +5 -1
  80. package/node_modules/@arco/shared/dist/protocol/chat.d.ts +1 -0
  81. package/node_modules/@arco/shared/dist/protocol/clientMessages.d.ts +3 -2
  82. package/node_modules/@arco/shared/dist/protocol/clusters.d.ts +15 -1
  83. package/node_modules/@arco/shared/dist/protocol/index.d.ts +1 -0
  84. package/node_modules/@arco/shared/dist/protocol/index.js +1 -0
  85. package/node_modules/@arco/shared/dist/protocol/models.d.ts +4 -3
  86. package/node_modules/@arco/shared/dist/protocol/models.js +26 -2
  87. package/node_modules/@arco/shared/dist/protocol/serverMessages.d.ts +13 -1
  88. package/node_modules/@arco/shared/dist/protocol/tasks.d.ts +4 -0
  89. package/node_modules/@arco/shared/dist/protocol/transcriptWorker.d.ts +47 -0
  90. package/node_modules/@arco/shared/dist/protocol/transcriptWorker.js +2 -0
  91. package/node_modules/@arco/shared/dist/protocol/workflows.d.ts +1 -0
  92. package/node_modules/@arco/shared/dist/runtimeVersions.d.ts +1 -0
  93. package/node_modules/@arco/shared/dist/runtimeVersions.js +14 -0
  94. package/node_modules/@arco/shared/package.json +1 -1
  95. package/package.json +2 -2
  96. package/scripts/packaging/arco.mjs +1 -1
  97. package/scripts/packaging/native-repair.mjs +32 -4
  98. package/server/dist/atomicFile.js +1 -2
  99. package/server/dist/capabilities.d.ts +5 -2
  100. package/server/dist/capabilities.js +59 -9
  101. package/server/dist/cliUpdateDecision.d.ts +1 -1
  102. package/server/dist/cliUpdateDecision.js +5 -3
  103. package/server/dist/clusterDirector.js +2 -1
  104. package/server/dist/clusterPeerOps.js +14 -8
  105. package/server/dist/clusterProgress.js +1 -1
  106. package/server/dist/clusterRehydrate.js +2 -0
  107. package/server/dist/clusterSkills.d.ts +13 -0
  108. package/server/dist/clusterSkills.js +81 -0
  109. package/server/dist/clusterSnapshots.js +2 -0
  110. package/server/dist/clusterStore.d.ts +7 -2
  111. package/server/dist/clusterStore.js +42 -1
  112. package/server/dist/diagnostics/codeSkew.js +1 -0
  113. package/server/dist/eventLog.d.ts +7 -0
  114. package/server/dist/eventLog.js +70 -13
  115. package/server/dist/explorerDocs.d.ts +10 -6
  116. package/server/dist/explorerDocs.js +75 -34
  117. package/server/dist/historyLimits.d.ts +1 -0
  118. package/server/dist/historyLimits.js +3 -0
  119. package/server/dist/http/attachmentUpload.d.ts +13 -0
  120. package/server/dist/http/attachmentUpload.js +38 -0
  121. package/server/dist/http/browserWorktrees.d.ts +23 -0
  122. package/server/dist/http/browserWorktrees.js +120 -0
  123. package/server/dist/http/phoneUploadDrafts.d.ts +13 -0
  124. package/server/dist/http/phoneUploadDrafts.js +125 -0
  125. package/server/dist/http/phoneUploadListener.d.ts +17 -0
  126. package/server/dist/http/phoneUploadListener.js +81 -0
  127. package/server/dist/http/phoneUploadNetwork.d.ts +9 -0
  128. package/server/dist/http/phoneUploadNetwork.js +106 -0
  129. package/server/dist/http/phoneUploadPage.d.ts +2 -0
  130. package/server/dist/http/phoneUploadPage.js +136 -0
  131. package/server/dist/http/phoneUploadRouteHistory.d.ts +4 -0
  132. package/server/dist/http/phoneUploadRouteHistory.js +72 -0
  133. package/server/dist/http/phoneUploadRoutes.d.ts +4 -0
  134. package/server/dist/http/phoneUploadRoutes.js +419 -0
  135. package/server/dist/http/phoneUploadTheme.d.ts +17 -0
  136. package/server/dist/http/phoneUploadTheme.js +96 -0
  137. package/server/dist/http/projectBinding.d.ts +1 -0
  138. package/server/dist/http/projectBinding.js +3 -2
  139. package/server/dist/http/readConfinement.js +5 -1
  140. package/server/dist/http/router.js +14 -25
  141. package/server/dist/http/writeConfinement.js +19 -2
  142. package/server/dist/index.js +24 -1
  143. package/server/dist/jsonlLines.d.ts +4 -0
  144. package/server/dist/jsonlLines.js +53 -0
  145. package/server/dist/management/identity.js +1 -0
  146. package/server/dist/mcp/clusterMcpTools.js +4 -4
  147. package/server/dist/primitives/seedWorker.d.ts +1 -0
  148. package/server/dist/primitives/seedWorker.js +2 -1
  149. package/server/dist/project/taskLedger.d.ts +4 -0
  150. package/server/dist/project/taskLedger.js +7 -4
  151. package/server/dist/providerConversation.d.ts +1 -0
  152. package/server/dist/providerConversation.js +17 -0
  153. package/server/dist/providers/claude-native/resumeSummary.d.ts +9 -0
  154. package/server/dist/providers/claude-native/resumeSummary.js +102 -49
  155. package/server/dist/providers/claude-native/worker.js +8 -4
  156. package/server/dist/providers/claude.js +2 -1
  157. package/server/dist/providers/clusterTaskToolDefinitions.js +4 -4
  158. package/server/dist/providers/codex-appserver/catalog.js +16 -1
  159. package/server/dist/providers/codex-appserver/heldCommands.d.ts +14 -0
  160. package/server/dist/providers/codex-appserver/heldCommands.js +54 -0
  161. package/server/dist/providers/codex-appserver/index.d.ts +52 -2
  162. package/server/dist/providers/codex-appserver/index.js +239 -21
  163. package/server/dist/providers/codex-appserver/lateCommands.d.ts +62 -0
  164. package/server/dist/providers/codex-appserver/lateCommands.js +195 -0
  165. package/server/dist/providers/codex-appserver/worker.d.ts +23 -1
  166. package/server/dist/providers/codex-appserver/worker.js +89 -20
  167. package/server/dist/providers/codex.js +2 -1
  168. package/server/dist/providers/codexCodeMode.d.ts +2 -1
  169. package/server/dist/providers/codexCodeMode.js +8 -3
  170. package/server/dist/providers/cursor/print.js +2 -1
  171. package/server/dist/providers/cursor/worker.js +2 -1
  172. package/server/dist/providers/llamacpp.js +17 -8
  173. package/server/dist/providers/ollamaRecovery.js +6 -6
  174. package/server/dist/providers/ollamaResilience.js +3 -3
  175. package/server/dist/providers/ollamaTokens.js +1 -1
  176. package/server/dist/quota.d.ts +0 -18
  177. package/server/dist/quota.js +0 -44
  178. package/server/dist/replacementHistory.d.ts +19 -0
  179. package/server/dist/replacementHistory.js +49 -0
  180. package/server/dist/server/broadcast.d.ts +2 -1
  181. package/server/dist/server/broadcast.js +1 -0
  182. package/server/dist/server/prompts.d.ts +1 -0
  183. package/server/dist/server/prompts.js +6 -1
  184. package/server/dist/sessionJsonl.d.ts +1 -1
  185. package/server/dist/sessionJsonl.js +115 -40
  186. package/server/dist/smartPickupAdapters.js +15 -2
  187. package/server/dist/transcriptWorker.d.ts +34 -0
  188. package/server/dist/transcriptWorker.js +201 -0
  189. package/server/dist/workers/WorkerManager.d.ts +1 -0
  190. package/server/dist/workers/WorkerManager.js +1 -0
  191. package/server/dist/workers/processKill.d.ts +9 -1
  192. package/server/dist/workers/processKill.js +26 -10
  193. package/server/dist/workflowStore.d.ts +1 -0
  194. package/server/dist/workflowStore.js +31 -0
  195. package/server/dist/ws/clusterHandlers.d.ts +1 -0
  196. package/server/dist/ws/clusterHandlers.js +62 -26
  197. package/server/dist/ws/handoffHandlers.js +7 -2
  198. package/server/dist/ws/transcriptWorkerHandlers.d.ts +25 -0
  199. package/server/dist/ws/transcriptWorkerHandlers.js +139 -0
  200. package/server/dist/ws/turnEngine.js +40 -9
  201. package/server/dist/ws/updatePrimaryConfig.js +27 -8
  202. package/server/dist/ws/workflowHandlers.d.ts +4 -1
  203. package/server/dist/ws/workflowHandlers.js +3 -1
  204. package/server/package.json +1 -1
  205. package/server/src/atomicFile.ts +1 -2
  206. package/server/src/capabilities.ts +58 -17
  207. package/server/src/cliUpdateDecision.ts +5 -4
  208. package/server/src/clusterDirector.ts +2 -1
  209. package/server/src/clusterPeerOps.ts +15 -9
  210. package/server/src/clusterProgress.ts +1 -1
  211. package/server/src/clusterRehydrate.ts +2 -0
  212. package/server/src/clusterSkills.ts +79 -0
  213. package/server/src/clusterSnapshots.ts +1 -0
  214. package/server/src/clusterStore.ts +38 -0
  215. package/server/src/diagnostics/codeSkew.ts +1 -0
  216. package/server/src/eventLog.ts +73 -13
  217. package/server/src/explorerDocs.ts +75 -34
  218. package/server/src/historyLimits.ts +2 -0
  219. package/server/src/http/attachmentUpload.ts +49 -0
  220. package/server/src/http/browserWorktrees.ts +124 -0
  221. package/server/src/http/phoneUploadDrafts.ts +118 -0
  222. package/server/src/http/phoneUploadListener.ts +96 -0
  223. package/server/src/http/phoneUploadNetwork.ts +117 -0
  224. package/server/src/http/phoneUploadPage.ts +137 -0
  225. package/server/src/http/phoneUploadRouteHistory.ts +73 -0
  226. package/server/src/http/phoneUploadRoutes.ts +398 -0
  227. package/server/src/http/phoneUploadTheme.ts +97 -0
  228. package/server/src/http/projectBinding.ts +3 -2
  229. package/server/src/http/readConfinement.ts +5 -1
  230. package/server/src/http/router.ts +12 -26
  231. package/server/src/http/writeConfinement.ts +13 -2
  232. package/server/src/index.ts +23 -0
  233. package/server/src/jsonlLines.ts +52 -0
  234. package/server/src/management/identity.ts +1 -0
  235. package/server/src/mcp/clusterMcpTools.ts +4 -4
  236. package/server/src/primitives/seedWorker.ts +3 -1
  237. package/server/src/project/taskLedger.ts +7 -5
  238. package/server/src/providerConversation.ts +15 -0
  239. package/server/src/providers/claude-native/resumeSummary.ts +98 -50
  240. package/server/src/providers/claude-native/worker.ts +8 -4
  241. package/server/src/providers/claude.ts +2 -1
  242. package/server/src/providers/clusterTaskToolDefinitions.ts +4 -4
  243. package/server/src/providers/codex-appserver/catalog.ts +14 -1
  244. package/server/src/providers/codex-appserver/heldCommands.ts +58 -0
  245. package/server/src/providers/codex-appserver/index.ts +222 -20
  246. package/server/src/providers/codex-appserver/lateCommands.ts +225 -0
  247. package/server/src/providers/codex-appserver/worker.ts +85 -21
  248. package/server/src/providers/codex.ts +2 -1
  249. package/server/src/providers/codexCodeMode.ts +9 -4
  250. package/server/src/providers/cursor/print.ts +2 -1
  251. package/server/src/providers/cursor/worker.ts +2 -1
  252. package/server/src/providers/llamacpp.ts +18 -7
  253. package/server/src/providers/llamacppRecovery.ts +2 -0
  254. package/server/src/providers/ollamaRecovery.ts +6 -6
  255. package/server/src/providers/ollamaResilience.ts +3 -3
  256. package/server/src/providers/ollamaTokens.ts +1 -1
  257. package/server/src/providers/ollamaToolSubset.ts +3 -3
  258. package/server/src/quota.ts +0 -50
  259. package/server/src/replacementHistory.ts +44 -0
  260. package/server/src/server/broadcast.ts +2 -0
  261. package/server/src/server/prompts.ts +8 -1
  262. package/server/src/sessionJsonl.ts +92 -32
  263. package/server/src/smartPickupAdapters.ts +17 -3
  264. package/server/src/transcriptWorker.ts +182 -0
  265. package/server/src/workers/WorkerManager.ts +2 -0
  266. package/server/src/workers/processKill.ts +35 -7
  267. package/server/src/workflowStore.ts +21 -0
  268. package/server/src/ws/clusterHandlers.ts +43 -25
  269. package/server/src/ws/handoffHandlers.ts +7 -1
  270. package/server/src/ws/transcriptWorkerHandlers.ts +126 -0
  271. package/server/src/ws/turnEngine.ts +35 -8
  272. package/server/src/ws/updatePrimaryConfig.ts +25 -6
  273. package/server/src/ws/workflowHandlers.ts +3 -1
  274. package/shared/dist/clusterCoordination.d.ts +2 -0
  275. package/shared/dist/clusterCoordination.js +5 -1
  276. package/shared/dist/protocol/chat.d.ts +1 -0
  277. package/shared/dist/protocol/clientMessages.d.ts +3 -2
  278. package/shared/dist/protocol/clusters.d.ts +15 -1
  279. package/shared/dist/protocol/index.d.ts +1 -0
  280. package/shared/dist/protocol/index.js +1 -0
  281. package/shared/dist/protocol/models.d.ts +4 -3
  282. package/shared/dist/protocol/models.js +26 -2
  283. package/shared/dist/protocol/serverMessages.d.ts +13 -1
  284. package/shared/dist/protocol/tasks.d.ts +4 -0
  285. package/shared/dist/protocol/transcriptWorker.d.ts +47 -0
  286. package/shared/dist/protocol/transcriptWorker.js +2 -0
  287. package/shared/dist/protocol/workflows.d.ts +1 -0
  288. package/shared/dist/runtimeVersions.d.ts +1 -0
  289. package/shared/dist/runtimeVersions.js +14 -0
  290. package/shared/src/clusterCoordination.ts +7 -1
  291. package/shared/src/protocol/chat.ts +1 -0
  292. package/shared/src/protocol/clientMessages.ts +5 -0
  293. package/shared/src/protocol/clusters.ts +20 -6
  294. package/shared/src/protocol/index.ts +1 -0
  295. package/shared/src/protocol/models.ts +31 -5
  296. package/shared/src/protocol/serverMessages.ts +13 -0
  297. package/shared/src/protocol/settings.ts +2 -3
  298. package/shared/src/protocol/tasks.ts +4 -7
  299. package/shared/src/protocol/transcriptWorker.ts +49 -0
  300. package/shared/src/protocol/workflows.ts +4 -0
  301. package/shared/src/runtimeVersions.ts +14 -0
@@ -653,15 +653,22 @@ export const clusters: Section[] = [
653
653
  refused; Arco never switches to another account.
654
654
  </p>
655
655
  <p>
656
- Two independent switches control what crosses the boundary:
656
+ Two independent choices control what crosses the boundary:
657
657
  </p>
658
658
  <ul>
659
659
  <li>
660
- <strong>INCLUDE PRIOR WORKFLOW HISTORY</strong> is OFF by default.
661
- When ON, Arco renders the old transcript plus an action digest
662
- into one explicit replacement-context seed turn. This costs a
663
- model call and does not resume or reuse the former provider
664
- session.
660
+ <strong>HISTORY</strong> starts at <strong>NO HISTORY</strong>.
661
+ <strong> RECENT HISTORY</strong> copies the last 10 whole turns by default;
662
+ choose 1 to 50 within 128 KiB. Text stays word for word, with tool calls and
663
+ attached files represented by receipts. <strong>FULL HISTORY</strong> keeps
664
+ the prior transcript and action digest when they fit 512 KiB. Above that
665
+ limit it copies the newest whole turns that fit, with receipts instead of
666
+ the full action digest. The preview says how many turns fit before REPLACE
667
+ becomes available. Nothing is clipped to fit. If no whole recent turn fits,
668
+ the preview says that no history will be copied.
669
+ A partial copy leaves one plain line in the replacement conversation; the
670
+ earlier history remains in the previous conversation. A nonempty imported
671
+ seed spends a model call and always starts a new provider conversation.
665
672
  </li>
666
673
  <li>
667
674
  <strong>TRANSFER ACTIVE TASK ASSIGNMENTS</strong> reassigns the
@@ -913,6 +920,9 @@ export const clusters: Section[] = [
913
920
  members&apos; conversation records.
914
921
  </li>
915
922
  </ul>
923
+ <p>A sent or received PEER card in the conversation shows a short preview.
924
+ Select it to read the full available message, sender, recipient and time. Older sent messages may have
925
+ only their saved preview. Close the dialog to return to the conversation.</p>
916
926
  <p>
917
927
  Temporary mailbox read or attachment-write failures leave pending messages
918
928
  untouched for retry. Each attachment gets a separate file, even when names
@@ -975,6 +985,22 @@ export const clusters: Section[] = [
975
985
  requested review and landing review stay unchanged.
976
986
  </p>
977
987
  <p>
988
+ The Director keeps waits under 60 seconds and delegates long checks.
989
+ Other members and standalone agents wait for results their reports need,
990
+ in steps of at most 120 seconds, repeated as needed. Between waits,
991
+ members check peer mail and act on it. They report when the result arrives.
992
+ </p>
993
+ <p>
994
+ After a progress report or an answer while assigned work remains, non-Director
995
+ members and standalone agents continue that work in the same turn; they end
996
+ the turn only when it is done or with one stated blocker.
997
+ </p>
998
+ <p>
999
+ If blocked or if a job clearly cannot finish within a reasonable time,
1000
+ the agent names what it is waiting on and says that a nudge is needed
1001
+ before ending its turn. This guidance adds no automatic completion wake.
1002
+ </p>
1003
+ <p>
978
1004
  Message guard is independent:
979
1005
  </p>
980
1006
  <ul>
@@ -1681,16 +1707,15 @@ export const clusters: Section[] = [
1681
1707
  </li>
1682
1708
  </ul>
1683
1709
  <Note>
1684
- <strong><Code>done</Code> / <Code>archived</Code> are
1685
- operator-only</strong> at every layer.{' '}
1710
+ <strong>Direct <Code>done</Code> / <Code>archived</Code> status changes are
1711
+ operator-only.</strong> A director met sign-off closes the task when Board
1712
+ auto-done is on.{' '}
1686
1713
  <Code>cluster_task_update</Code> rejects either terminal status with{' '}
1687
1714
  <Code>operator_gated</Code> - workers move finished work to{' '}
1688
1715
  <Code>review</Code> through <Code>cluster_task_complete</Code> or
1689
- report via <Code>peer_send</Code>, and the operator marks the task done
1690
- from the LEDGER tab, by dragging the card to the <Code>done</Code> column
1691
- (confirmed), or via the drawer status controls. This
1692
- re-enforces the operator-confirmed terminal-status rule at
1693
- the peer layer.
1716
+ report via <Code>peer_send</Code>. The operator can accept a task from
1717
+ the LEDGER tab, by dragging the card to <Code>done</Code> with confirmation,
1718
+ or through the drawer status controls.
1694
1719
  </Note>
1695
1720
  <p>
1696
1721
  Claims and updates are saved like operator edits. Every member&apos;s
@@ -1711,15 +1736,13 @@ export const clusters: Section[] = [
1711
1736
  </p>
1712
1737
  <ul>
1713
1738
  <li><strong>PLAN</strong> - agents follow the plan and the operator approves changes.</li>
1714
- <li><strong>BOARD</strong> - agents move tasks along; the operator accepts finished work and answers blocked tasks.</li>
1739
+ <li><strong>BOARD</strong> - agents move tasks along; the operator can accept finished work and answers blocked tasks.</li>
1715
1740
  </ul>
1716
1741
  <ul>
1717
1742
  <li>
1718
1743
  The badge above the member cards names WAITING questions that pause an
1719
- agent, tasks BLOCKED on you, ASKED questions the agent can continue past,
1720
- and signed-off tasks TO ACCEPT. Stopped kinds come first and use the
1721
- warning colour; optional kinds are muted. Accepting is optional; nothing
1722
- waits on it.
1744
+ agent, tasks BLOCKED on you, and ASKED questions the agent can continue past. Stopped kinds come first
1745
+ and use the warning colour; ASKED is muted.
1723
1746
  </li>
1724
1747
  <li>
1725
1748
  Click the badge to jump to a task or member. In Narrow layout, the compact
@@ -1746,8 +1769,9 @@ export const clusters: Section[] = [
1746
1769
  the board moved.
1747
1770
  </li>
1748
1771
  <li>
1749
- Settings &gt; Agents and clusters &gt; Board auto-done can accept met
1750
- tasks for you. It is off by default.
1772
+ Settings &gt; Agents and clusters &gt; Board auto-done is on by default.
1773
+ A new director met sign-off closes the task on the server; turn the setting
1774
+ off to accept tasks yourself. Existing review tasks stay in review.
1751
1775
  </li>
1752
1776
  </ul>
1753
1777
  </>
@@ -531,6 +531,26 @@ export const configuration: Section[] = [
531
531
  </p>
532
532
  <p>UPDATE checks every installed file against its REVIEW snapshot before replacing the folder. A later local edit refuses the update and remains intact. REVIEW again before applying.</p>
533
533
  <p>Quotes and backslashes in skill names and descriptions survive repeated edits. IMPORT, MOVE, DUPLICATE and new skill creation keep collision suffixes within the 64-character folder-name limit.</p>
534
+ <Sub>Pin to a tab, cluster or role</Sub>
535
+ <p>In Settings &gt; SKILLS, PIN TO TAB selects an Agent tab. PIN TO CLUSTER
536
+ selects a cluster and All members or one role. A custom role must match its
537
+ saved text exactly. Project skills stay within their project; global skills
538
+ can be pinned anywhere. Full text is added on every matching member's next turn.</p>
539
+ <p>The active tab or its cluster is selected when eligible. After a pin is
540
+ saved, Settings names the skill, destination and role.</p>
541
+ <p>The cluster SKILLS button beside EFFICIENCY shows the configured count.
542
+ Open it to see sources, scope and availability. ADD SKILL pins an available skill to all members or one role; UNPIN removes a pin. New and replaced
543
+ members inherit the cluster's pins. A member's composer shows FROM CLUSTER;
544
+ its direct tab pins remain separate. Only the operator can pin or unpin.</p>
545
+ <p>Tab, cluster and matching role pins share a limit of 12 unique skills and
546
+ 64 KiB of text. Duplicate references apply once. Additions over the limit are
547
+ refused with a reason. Running turns keep their existing instructions.
548
+ There are no default pins or Standing skills row during creation.</p>
549
+ <p>Missing, moved, deleted or off skills are skipped and remain visible for
550
+ removal. Edits take effect next turn; an enlarged skill that no longer fits
551
+ is reported in the conversation. Pinning project text applies it even with
552
+ project trust off. To pin a built-in, first save an EDITABLE COPY as a project
553
+ or global skill.</p>
534
554
  <Sub>Built-in skills</Sub>
535
555
  <p>Built-ins are on by default. Settings lists each with an OPERATOR or MODEL
536
556
  badge and can turn each off. A project or
@@ -124,10 +124,10 @@ export const gettingStarted: Section[] = [
124
124
  When Arco is already installed, update with <Code>arco update</Code> or{' '}
125
125
  <strong>UPDATE AND RESTART</strong>; do not install the package over a
126
126
  running service. On Windows, <Code>EEXIST</Code> on <Code>arco.cmd</Code>{' '}
127
- usually means the earlier package <Code>@ghreprimand/arco</Code> still owns
128
- the launchers; recover in{' '}
129
- <Code>docs/OPERATIONS.md#running-locally</Code>. Clear older copies before a
130
- fresh install with{' '}
127
+ can come from an earlier package or a linked checkout. Check{' '}
128
+ <Code>npm prefix -g</Code> and the launcher targets in{' '}
129
+ <Code>docs/OPERATIONS.md#windows-install-and-launcher-recovery</Code>.
130
+ Clear older copies before a fresh install with{' '}
131
131
  <Code>docs/OPERATIONS.md#before-a-fresh-install-remove-older-copies</Code>.
132
132
  </p>
133
133
  <p>
@@ -17,7 +17,8 @@ export const maintenance: Section[] = [
17
17
  <strong>ARTIFACTS</strong> starts with project cards and recent artifacts
18
18
  across projects; open a project to drill into its documents. Artifacts appear without waiting for documents. Protected file paths are omitted. Linked or unavailable workflow metadata uses an identifier instead of a title.
19
19
  </li>
20
- <li>Project documents skip hidden folders, build and dependency folders, and nested Git checkouts or worktrees. Entry and time budgets keep discovery responsive. Slow or stalled folders return an incomplete list when the scan budget ends; available results remain usable. A partial list says "Showing the newest N; open a project for more". Opening a project searches it separately. Workflow artifacts stay listed in full, with their own loading state. A failed list shows a notice while the other results remain usable. Switch away from the window and return to retry.</li>
20
+ <li>Open a project card to see documents from its Git worktrees. Each worktree document shows its branch or detached commit and opens in the read-only viewer. Arco checks that the worktree is still registered when you open the file. Protected paths stay refused.</li>
21
+ <li>The overview skips hidden folders, build and dependency folders, and nested Git checkouts. Each project shares its entry and time limits across its worktrees. A partial list keeps the results it found. Workflow artifacts have their own loading state. Switch away from the window and return to retry a failed list.</li>
21
22
  <li>
22
23
  <p><strong>CHANGED FILES</strong> lists files changed in the last 48 hours by any program. The tab and provider appear only when a matching ledger record is current. Artifacts and documents are under ARTIFACTS.</p>
23
24
  <p>The scan covers authorized project roots and the default projects folder, including registered projects outside the home folder. Prepared roots share the entry and remaining time budgets equally. Duplicate and overlapping scans are avoided.</p>
@@ -132,6 +133,17 @@ export const maintenance: Section[] = [
132
133
  Claude continues to use <Code>claude update</Code>.
133
134
  </p>
134
135
  <p>
136
+ Cursor uses <Code>cursor-agent update</Code> and rechecks its version.
137
+ The separate CURSOR CHANGELOG link opens the CLI release notes.
138
+ </p>
139
+ <p>
140
+ Cursor&apos;s update flag reads the dated release version from its public
141
+ installer without running the script. If that metadata cannot be read,
142
+ no flag appears and clicking the row still runs the updater. Builds with
143
+ different hashes on the same date have no known order and do not show
144
+ an update flag. Arco never installs a second copy as a fallback.
145
+ </p>
146
+ <p>
135
147
  During an npm publication gap, an older npm CLI can use a pinned installable
136
148
  version; a self-updater waits for the latest platform build instead.
137
149
  Arco does not downgrade a working installation. The Codex flag uses that
@@ -139,6 +151,13 @@ export const maintenance: Section[] = [
139
151
  Homebrew installations without recognised ownership require manual updates.
140
152
  </p>
141
153
  <p>
154
+ llama.cpp checks recent published numeric build tags and flags an older
155
+ installed build. Semantic milestone versions are not compared as build
156
+ numbers. If a build cannot be read, no update flag is shown. Click the row
157
+ to open upstream releases and update manually; the check does not install
158
+ anything or load a model.
159
+ </p>
160
+ <p>
142
161
  Strata's installed engine version comes from its reachable service or
143
162
  prepared BUILD.json while stopped. Arco compares engine component
144
163
  versions at boot and every four hours; the app/Terminal 0.2 version
@@ -265,11 +284,11 @@ export const maintenance: Section[] = [
265
284
  uninstall does not remove it.
266
285
  </p>
267
286
  <p>
268
- On Windows, after uninstall check{' '}
269
- <Code>npm ls -g --depth=0</Code> for the earlier package{' '}
270
- <Code>@ghreprimand/arco</Code> (it owns leftover <Code>arco</Code>,{' '}
271
- <Code>arco.cmd</Code>, and <Code>arco.ps1</Code>), uninstall it when
272
- listed, then clear any leftovers under <Code>%APPDATA%\npm</Code>.
287
+ On Windows, check <Code>npm ls -g --depth=0</Code> for the earlier package{' '}
288
+ <Code>@ghreprimand/arco</Code>. Uninstall it if you are removing that copy.
289
+ Use <Code>npm prefix -g</Code> to find <Code>arco</Code>,{' '}
290
+ <Code>arco.cmd</Code>, and <Code>arco.ps1</Code>. Open remaining launchers as text
291
+ and remove only those that point to the copies you removed.
273
292
  </p>
274
293
  <p>
275
294
  When an older copy may be a package, a source checkout, or both, clear it
@@ -483,8 +483,9 @@ export const powerFeatures: Section[] = [
483
483
  </Note>
484
484
  <p>
485
485
  File references opened from chat, help or rendered markdown use a stacked file
486
- viewer. Its raw/formatted toggle switches between highlighted or rendered
487
- output and the exact file text.
486
+ viewer. In chat, a link can open an ordinary file in a Git worktree of the tab's
487
+ repository. Arco checks the worktree when you open the link. The raw/formatted
488
+ toggle switches between the rendered view and the exact file text.
488
489
  </p>
489
490
  </>
490
491
  ),
@@ -427,14 +427,17 @@ export const providers: Section[] = [
427
427
  </p>
428
428
  <Sub>Models and effort</Sub>
429
429
  <p>
430
- Arco&apos;s default is <Code>gpt-6-astra</Code>. The picker uses the
430
+ The cold default is <Code>gpt-6.2-sol</Code>; a live account catalog supplies
431
+ its own default. The picker uses the
431
432
  selected model&apos;s live catalog, so the effort levels offered follow the
432
433
  model:
433
434
  </p>
434
435
  <Table
435
436
  headers={['Model', 'Role', 'Effort levels']}
436
437
  rows={[
437
- [<Code key="a">gpt-6-astra</Code>, 'Arco default', 'low / medium / high / xhigh / max / ultra'],
438
+ [<Code key="s62">gpt-6.2-sol</Code>, 'Cold default', 'low / medium / high / xhigh / max / ultra'],
439
+ [<Code key="a62">gpt-6.2-astra</Code>, 'Complex coding', 'low / medium / high / xhigh / max / ultra'],
440
+ [<Code key="a">gpt-6-astra</Code>, 'Earlier Astra', 'low / medium / high / xhigh / max / ultra'],
438
441
  [<Code key="s">gpt-6-sol</Code>, 'Everyday coding workhorse', 'low / medium / high / xhigh / max / ultra'],
439
442
  [<Code key="l">gpt-6-luna</Code>, 'Fast and affordable', 'Stops at max'],
440
443
  ['Older models', '-', 'Can expose fewer levels'],
@@ -445,6 +448,13 @@ export const providers: Section[] = [
445
448
  value (currently about 828K effective for Astra). CONFIG can return a tab
446
449
  to STANDARD (about 258K). A provider-reported window takes precedence.
447
450
  </p>
451
+ <p>
452
+ The catalog refreshes when the CLI changes its local model list, on the next
453
+ Arco catalog request. The browser polls every 30 minutes; reload the page to
454
+ request it sooner without restarting Arco. GPT-6.2 Sol and Astra support image
455
+ input. STANDARD is about 475K effective for Sol and 258K for Astra; MAX is
456
+ about 828K for both. Provider-reported values take precedence.
457
+ </p>
448
458
  <Note kind="warn">Codex describes ultra as maximum reasoning with automatic
449
459
  task delegation. Provider-internal delegated-agent activity is not fully
450
460
  represented in Arco&apos;s transcript. Choosing it does not create an Arco
@@ -910,8 +920,8 @@ export const providers: Section[] = [
910
920
  <Sub>Auto-recovery</Sub>
911
921
  <p>
912
922
  Local thinking models fail in specific ways the lifecycle alone can&apos;t
913
- handle. The provider runs three recovery paths in place (without spawning
914
- Handoff) and one warning:
923
+ handle. The provider runs recovery paths in place (without spawning Handoff)
924
+ and a context-fill warning:
915
925
  </p>
916
926
  <ul>
917
927
  <li><strong>Reasoning runaway</strong> - model emits{' '}
@@ -922,7 +932,12 @@ export const providers: Section[] = [
922
932
  <Code>ARCO_LLAMACPP_STALL_TIMEOUT_MS</Code> (default 90 s). Builds a
923
933
  deterministic summary (no LLM call) and continues.
924
934
  </li>
925
- <li><strong>Tool-cap exhaustion</strong> - 50-turn cap fires on a
935
+ <li><strong>Wall-clock limit</strong> - a reply reaches{' '}
936
+ <Code>ARCO_LLAMACPP_TURN_BUDGET_MS</Code> (default 120 s), even while
937
+ text keeps arriving. Cancels the stream and continues with a recap
938
+ within the recovery budget.
939
+ </li>
940
+ <li><strong>Tool-cap exhaustion</strong> - 25-turn cap fires on a
926
941
  legitimately long task. Same deterministic recap, reset counter, keep
927
942
  going.
928
943
  </li>
@@ -934,9 +949,18 @@ export const providers: Section[] = [
934
949
  </li>
935
950
  </ul>
936
951
  <p>
937
- The three recovery paths share a budget (default 2 per operator turn). Each emits a{' '}
938
- <Code>system_notice</Code> so the cause is visible without digging through
939
- logs.
952
+ Recovery paths share a budget (default 1 per operator turn), followed by
953
+ one final-summary attempt before terminating if it also fails. Each emits
954
+ a <Code>system_notice</Code> so the cause is visible without digging
955
+ through logs.
956
+ </p>
957
+ <p>
958
+ The wall-clock and no-data limits also apply with{' '}
959
+ <Code>ARCO_LLAMACPP_AUTO_RECOVER=off</Code>. Arco then cancels the stream,
960
+ attempts to free its slot and shows one plain error without retrying.
961
+ The wall-clock limit includes the request and resets for each reply in
962
+ a tool loop. Override these limits in the server environment when a
963
+ model needs longer.
940
964
  </p>
941
965
  <Sub>Serve-failure diagnosis</Sub>
942
966
  <p>
@@ -513,7 +513,8 @@ New turns blocked for 60s. Recover via Handoff.`}</Pre>
513
513
  <Sub>"Package install will not start or the page does not load"</Sub>
514
514
  <ul>
515
515
  <li>Run <Code>arco doctor</Code>: it reports the Node version (24 or newer), whether the native modules load, whether the port is free on loopback, which provider CLIs answer <Code>--version</Code>, and the service state.</li>
516
- <li>If the native modules are missing or incompatible, run <Code>arco setup --repair-native</Code> (build tools required).</li>
516
+ <li>Only run <Code>arco setup --repair-native</Code> when Arco reports that a native part will not load, including missing or incompatible native modules in <Code>arco doctor</Code>. A working platform build toolchain is required.</li>
517
+ <li>A failed repair names the compile or link step when available and repeats its decisive error. The installed native parts stay unchanged and keep working. Build tools may be missing, out of date or broken; resolve the reported error before retrying a needed repair.</li>
517
518
  <li>If the port is in use, another Arco or a different program holds it. Stop the other process or set <Code>ARCO_PORT</Code>.</li>
518
519
  <li>Run <Code>arco service logs</Code> to read the recent service logs.</li>
519
520
  </ul>
@@ -137,6 +137,18 @@ codex exec resume <thread-id> "next prompt"
137
137
  to the running server; it cannot recover an id already lost before restart.
138
138
  Claude Native and local providers can replay retained history without that id.
139
139
  </p>
140
+ <p>Claude Native rebuilds at most 1 GiB of uncached history in one parse.
141
+ A valid summary cache with a small tail can still resume a larger history.
142
+ If a rebuild exceeds the limit or fails, one notice says that the agent
143
+ continues without earlier context. Earlier messages stay in the tab; include
144
+ any context the next task needs again.</p>
145
+ <p>The older-turn digest used by Claude Native resume is limited to 128 KiB.
146
+ Compacted context and its kept-tail digest come first; oldest turn notes are
147
+ left out first. The tab and the agent receive the same line saying how many were left out.
148
+ If compacted context alone is too large, the same line says it was shortened.
149
+ Earlier messages remain in the conversation.</p>
150
+ <p>Claude CLI session loading handles 2 GB histories separately. If its session file cannot be read, a notice says
151
+ that the saved conversation is intact; new messages appear when readable.</p>
140
152
  <p>COMPACT on a lost Codex or Cursor conversation explains that the next message
141
153
  starts a new conversation. An empty tab still asks for its first turn.</p>
142
154
  <Sub>Claude CLI</Sub>
@@ -178,6 +178,12 @@ export const workspace: Section[] = [
178
178
  short account badge also appears. Click a tab to focus it; drag tabs to
179
179
  reorder them.
180
180
  </p>
181
+ <p>
182
+ Use the mouse wheel over the row to scroll sideways,
183
+ or swipe horizontally on a touch screen or trackpad. Previous tabs
184
+ and Next tabs buttons appear at edges with more tabs. Opening a tab
185
+ brings it into view; keyboard focus also keeps its control visible.
186
+ </p>
181
187
  <p>
182
188
  Click the <Code>×</Code> on a tab to close it: Arco asks for
183
189
  confirmation first, and the prompt calls out an in-progress turn (it
@@ -404,6 +410,9 @@ export const workspace: Section[] = [
404
410
  boundary, or runs as the next turn if the current turn finishes
405
411
  first. Search results and reasoning from the current work remain intact.</li>
406
412
  </ul>
413
+ <p>
414
+ If Codex finishes a reply while a shell command is still running, the tab stays WORKING and names the command. When it ends, Arco continues Codex with its result, without AUTO-PICKUP. The wait lasts at most 30 minutes per turn. STOP ends it and leaves the command running. A message you send ends the wait. Servers and watchers are not waited on; ACTIVITY records their exit.
415
+ </p>
407
416
  <h4 className="manual-sub">Slash commands &amp; references</h4>
408
417
  <p><Code>/prompt name args</Code> expands a saved template. Inserted argument text remains literal; <Code>$$1</Code> in the template produces literal <Code>$1</Code>.</p>
409
418
  <p>
@@ -437,6 +446,33 @@ export const workspace: Section[] = [
437
446
  an image or file from the clipboard, or click <Code>+ FILE</Code>.
438
447
  Arco fits images and sends them visually when the model reports vision support. SVG attachments include source text; image-capable models also receive a fitted preview when rendering succeeds, while text-only models receive an image-omission note.
439
448
  </p>
449
+ <p>
450
+ Open <Code>UPLOAD FROM PHONE</Code> beside Attach and scan the code on the same private network. Take a photo or choose files. They appear in the original draft, even after switching tabs. Press Send to submit them.
451
+ </p>
452
+ <p>
453
+ The window lists private IPv4 origins as <Code>http://&lt;ipv4&gt;:&lt;port&gt;</Code> from the listener (home LAN and Tailscale when present). It never lists MagicDNS names or the desktop page hostname. When several appear, choose one. Scan the full QR; the origin under the code is only the address and port.
454
+ </p>
455
+ <p>
456
+ When Arco listens on this computer only (the default), opening the code starts a temporary listener that serves the phone upload page alone and closes about a minute after no code is open and no upload is in progress.
457
+ </p>
458
+ <p>
459
+ The phone must open the code&apos;s address directly; a path through Tailscale Serve or another reverse proxy is refused. The phone page uses the Arco theme that was active when the code was opened.
460
+ </p>
461
+ <p>
462
+ Each address is marked <Code>UNVERIFIED</Code> until a file arrives through it, then <Code>VERIFIED BY UPLOAD</Code> with the time it last worked, each on its own line. Arco remembers this for each address and port, also after a restart.
463
+ </p>
464
+ <p>
465
+ Arco cannot tell from this computer whether the phone can reach an address, and settings can change after it has worked. <Code>More info</Code>, shown once in the window, explains this and lists what to check. If one address does not open on the phone and another is offered, close the window, open it again and choose the other address, for example the Tailscale IPv4 origin.
466
+ </p>
467
+ <p>
468
+ Same Wi-Fi: pick the LAN origin if offered, scan the QR, and avoid guest Wi-Fi that blocks connections between devices. Same Tailscale network: pick the Tailscale <Code>http://100.x...</Code> origin (not a MagicDNS name), keep both devices in the same tailnet, scan the QR, and do not put the upload URL behind Serve.
469
+ </p>
470
+ <p>
471
+ Full workbench access on a private network or via Serve is a separate bind; it is not the QR upload listener. Worked steps live under Operations - Upload from phone.
472
+ </p>
473
+ <p>
474
+ The code closes after five minutes or when Close is pressed. It accepts up to 10 files, 20 MiB each and 100 MiB total. Unsent phone files are removed after 30 minutes. Anyone who obtains the code on the private network can put files in that draft until it closes.
475
+ </p>
440
476
  <p>
441
477
  PDFs, office documents and notebooks are decoded before sending, including
442
478
  Chat tabs without file tools. Other binaries return a file note.
@@ -1,3 +1,4 @@
1
+ import { phoneUploadRequest } from '../utils/phoneUploadApi';
1
2
  import { validateSettings } from '../utils/settingsResponse';
2
3
  import { create } from 'zustand';
3
4
  import { forgetGitDialog } from '../utils/gitDialogMemory';
@@ -1538,6 +1539,9 @@ export const useAppStore = create<AppState>()(persist((set, get) => ({
1538
1539
  messages: j.messages.map((m) => (m.isStreaming ? { ...m, isStreaming: false } : m)),
1539
1540
  }))),
1540
1541
 
1542
+ setCodexLateCommands: (jobId, next) =>
1543
+ set(s => updateJob(s, jobId, j => ({ codexLateCommands: next(j.codexLateCommands ?? []) }))),
1544
+
1541
1545
  appendActivity: (jobId, entry) =>
1542
1546
  set((s) => updateJob(s, jobId, (j) => {
1543
1547
  // Defensive init: jobs that existed in memory before the activity
@@ -1661,6 +1665,9 @@ export const useAppStore = create<AppState>()(persist((set, get) => ({
1661
1665
  const existing = s.attachments[jobId];
1662
1666
  if (!existing || index < 0 || index >= existing.length) return {};
1663
1667
  const removed = existing[index];
1668
+ if (removed.phoneUpload && removed.phoneUpload.expiresAt > Date.now()) {
1669
+ void phoneUploadRequest('/draft/' + removed.phoneUpload.id, { method: 'DELETE' }).catch(() => {});
1670
+ }
1664
1671
  if (removed.previewUrl) URL.revokeObjectURL(removed.previewUrl);
1665
1672
  const next = existing.filter((_, i) => i !== index);
1666
1673
  if (next.length === 0) {
@@ -1,3 +1,4 @@
1
+ import type { CodexLateCommand } from '@arco/shared';
1
2
  // Data-shape declarations for the app store. Extracted verbatim from
2
3
  // appStore.ts (Phase 5 file-size refactor) — move-only, no behavior change.
3
4
  // This module is dependency-light: it imports only from `@arco/shared`
@@ -81,6 +82,7 @@ export interface DraftAttachment {
81
82
  path: string; // absolute path on the server's filesystem
82
83
  previewUrl?: string; // URL.createObjectURL result; revoke in store actions
83
84
  isImage: boolean;
85
+ phoneUpload?: { id: string; expiresAt: number };
84
86
  }
85
87
 
86
88
  // Phase 5 — entry-per-review for the right-pane Review tab. Built up from
@@ -301,6 +303,7 @@ export interface JobState {
301
303
  // Long-running children of the primary CLI (typically Bash calls with
302
304
  // run_in_background: true). Replaced wholesale by each `primary_activity`
303
305
  // broadcast. Empty until the server's tracker emits its first tick.
306
+ codexLateCommands?: CodexLateCommand[];
304
307
  primaryBackgroundJobs?: PrimaryBackgroundJob[];
305
308
  // Phase 1 context robustness — chat built from Claude's session JSONL
306
309
  // (not from events.jsonl). Empty for non-Claude providers. Not persisted —
@@ -967,6 +970,7 @@ export interface AppState {
967
970
  // activity lingers so operators can read what just happened.
968
971
  beginPrimaryTurn: (jobId: string, startedAt: number) => void;
969
972
  endPrimaryTurn: (jobId: string) => void;
973
+ setCodexLateCommands: (jobId: string, next: (existing: CodexLateCommand[]) => CodexLateCommand[]) => void;
970
974
  appendActivity: (jobId: string, entry: ActivityEntry) => void;
971
975
  setPrimaryBackgroundJobs: (jobId: string, jobs: PrimaryBackgroundJob[]) => void;
972
976
  // Clear activity on fresh user message (the NEW turn hasn't started yet
@@ -340,3 +340,112 @@ body {
340
340
  [data-overflowed="true"] { display: none !important; }
341
341
 
342
342
  .provider-status-link:focus-visible { outline: 2px solid var(--color-accent-primary); outline-offset: 3px; border-radius: 2px; }
343
+
344
+ .phone-upload-window {
345
+ position: fixed;
346
+ z-index: 1990;
347
+ inset: auto 1rem 1rem auto;
348
+ display: grid;
349
+ gap: .75rem;
350
+ box-sizing: border-box;
351
+ width: min(20rem, calc(100% - 2rem));
352
+ max-height: calc(100dvh / var(--ui-scale, 1) - 2rem);
353
+ overflow: auto;
354
+ padding: 1rem;
355
+ color: var(--color-fg);
356
+ background: var(--color-bg-elevated, var(--color-bg));
357
+ border: 1px solid var(--color-border);
358
+ border-radius: .5rem;
359
+ box-shadow: 0 .5rem 2rem rgb(0 0 0 / .4);
360
+ overflow-wrap: anywhere;
361
+ }
362
+
363
+ .phone-upload-window h2 {
364
+ margin: 0;
365
+ font-size: 1rem;
366
+ }
367
+
368
+ .phone-upload-window .phone-upload-unverified {
369
+ display: inline-block;
370
+ padding: 0 .3rem;
371
+ font-size: .7rem;
372
+ letter-spacing: .05em;
373
+ color: inherit;
374
+ border: 1px solid var(--color-border);
375
+ border-radius: .2rem;
376
+ }
377
+
378
+ .phone-upload-window .phone-upload-verified {
379
+ display: inline-block;
380
+ padding: 0 .3rem;
381
+ font-size: .7rem;
382
+ letter-spacing: .05em;
383
+ color: var(--color-success);
384
+ border: 1px solid currentColor;
385
+ border-radius: .2rem;
386
+ }
387
+
388
+ .phone-upload-window .phone-upload-last-worked {
389
+ font-size: .7rem;
390
+ color: var(--color-fg-muted);
391
+ }
392
+
393
+ .phone-upload-window .phone-upload-route {
394
+ font-size: .8rem;
395
+ text-align: start;
396
+ }
397
+
398
+ /* Address, status and last-worked time on separate lines, the same in the
399
+ chooser and under the code. */
400
+ .phone-upload-window .phone-upload-route-label {
401
+ display: grid;
402
+ gap: .25rem;
403
+ justify-items: start;
404
+ min-width: 0;
405
+ }
406
+
407
+ .phone-upload-window .phone-upload-address {
408
+ max-width: 100%;
409
+ font-family: var(--font-code, monospace);
410
+ overflow-wrap: anywhere;
411
+ }
412
+
413
+ .phone-upload-window .phone-upload-info {
414
+ font-size: .8rem;
415
+ }
416
+
417
+ .phone-upload-window .phone-upload-info summary {
418
+ padding-block: .75rem;
419
+ cursor: pointer;
420
+ }
421
+
422
+ .phone-upload-window .phone-upload-info summary:focus-visible {
423
+ outline: 2px solid var(--color-accent-primary);
424
+ outline-offset: 2px;
425
+ }
426
+
427
+ .phone-upload-window .phone-upload-info p {
428
+ margin: 0 0 .5rem;
429
+ }
430
+
431
+ .phone-upload-window .phone-upload-info p:last-child {
432
+ margin-bottom: 0;
433
+ }
434
+
435
+ .phone-upload-window img {
436
+ display: block;
437
+ width: min(100%, 16rem);
438
+ height: auto;
439
+ margin-inline: auto;
440
+ image-rendering: pixelated;
441
+ }
442
+
443
+ .phone-upload-window button {
444
+ min-height: 2.75rem;
445
+ padding: .35rem .65rem;
446
+ color: inherit;
447
+ background: var(--color-bg);
448
+ border: 1px solid var(--color-border);
449
+ border-radius: .3rem;
450
+ cursor: pointer;
451
+ }
@@ -0,0 +1,38 @@
1
+ // A snapshot of the Arco theme as it is applied on this page, sent with a
2
+ // new phone upload code so the phone page can look the same. Colours and
3
+ // sizes are read back from the browser in one plain form; the server checks
4
+ // every value again and drops anything else.
5
+ const COLORS = [
6
+ 'color-bg', 'color-bg-dialog', 'color-fg', 'color-fg-muted', 'color-border',
7
+ 'color-accent-primary', 'color-control-fg', 'color-success', 'color-error',
8
+ ];
9
+
10
+ export function phoneThemeSnapshot(): Record<string, string> {
11
+ const snapshot: Record<string, string> = {};
12
+ const root = getComputedStyle(document.documentElement);
13
+ const probe = document.createElement('span');
14
+ probe.style.display = 'none';
15
+ probe.style.borderStyle = 'solid';
16
+ document.body.append(probe);
17
+ try {
18
+ for (const key of COLORS) {
19
+ probe.style.color = `var(--${key})`;
20
+ const value = getComputedStyle(probe).color;
21
+ if (/^rgba?\(/.test(value)) snapshot[key] = value;
22
+ }
23
+ probe.style.borderTopWidth = 'var(--border-width)';
24
+ probe.style.borderTopLeftRadius = 'var(--radius-sm)';
25
+ const probed = getComputedStyle(probe);
26
+ snapshot['border-width'] = probed.borderTopWidth;
27
+ snapshot['radius-sm'] = probed.borderTopLeftRadius;
28
+ } finally {
29
+ probe.remove();
30
+ }
31
+ for (const key of ['font-display', 'font-body']) {
32
+ const value = root.getPropertyValue('--' + key).trim();
33
+ if (value) snapshot[key] = value;
34
+ }
35
+ const bg = /^rgba?\((\d+), (\d+), (\d+)/.exec(snapshot['color-bg'] ?? '');
36
+ if (bg) snapshot.scheme = (0.2126 * +bg[1] + 0.7152 * +bg[2] + 0.0722 * +bg[3]) / 255 < 0.5 ? 'dark' : 'light';
37
+ return snapshot;
38
+ }
@@ -0,0 +1,10 @@
1
+ // The desktop page keeps its upload ownership when its normal operator cookie
2
+ // refreshes. The server still requires a valid operator cookie on every call.
3
+ let owner: string | undefined;
4
+
5
+ export function phoneUploadRequest(path = '', init: RequestInit = {}): Promise<Response> {
6
+ owner ??= Array.from(crypto.getRandomValues(new Uint8Array(32)), byte => byte.toString(16).padStart(2, '0')).join('');
7
+ const headers = new Headers(init.headers);
8
+ headers.set('X-Arco-Phone-Owner', owner);
9
+ return fetch('/api/phone-upload' + path, { ...init, headers });
10
+ }