arco-workbench 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/CONTRIBUTING.md +1 -1
  2. package/THIRD_PARTY_NOTICES +2 -2
  3. package/client/dist/assets/{PhosphorBackdrop-CHXVFLGT.js → PhosphorBackdrop-YsHTmZJh.js} +1 -1
  4. package/client/dist/assets/{ThemedBackgroundShaderImpl-Bhs4I9jA.js → ThemedBackgroundShaderImpl-BEjpgoBW.js} +1 -1
  5. package/client/dist/assets/{XtermView-CdfurwFx.js → XtermView-wh7jNKvk.js} +1 -1
  6. package/client/dist/assets/{galleryEditor-DYjZZ4cf.js → galleryEditor-CaOS2mmM.js} +1 -1
  7. package/client/dist/assets/{index-BjDmFvqG.js → index-j68SfA-l.js} +271 -271
  8. package/client/dist/index.html +1 -1
  9. package/client/src/App.tsx +2 -2
  10. package/client/src/components/AuthReloginNotice.tsx +7 -6
  11. package/client/src/components/ChatMessage.tsx +41 -29
  12. package/client/src/components/ChatPanel.tsx +17 -4
  13. package/client/src/components/ClaudeNativeAccountPicker.tsx +32 -0
  14. package/client/src/components/ClaudeNativeAuthRow.tsx +71 -19
  15. package/client/src/components/ClusterRightPanel/AddWorkerSection.tsx +11 -281
  16. package/client/src/components/ClusterRightPanel/AutoPickupControl.tsx +1 -1
  17. package/client/src/components/ClusterRightPanel/FreshMemberForm.tsx +315 -0
  18. package/client/src/components/ClusterRightPanel/ReplaceMemberDialog.tsx +17 -7
  19. package/client/src/components/ClusterRightPanel/index.tsx +1 -1
  20. package/client/src/components/ClusterRightPanel/useFreshMemberPicker.ts +6 -4
  21. package/client/src/components/ClusterTab.tsx +2 -2
  22. package/client/src/components/Connections/Connections.tsx +5 -9
  23. package/client/src/components/Connections/model.ts +3 -1
  24. package/client/src/components/FileViewerModal.tsx +54 -17
  25. package/client/src/components/GitHubPanel/index.tsx +9 -5
  26. package/client/src/components/HandoffDialog.tsx +5 -3
  27. package/client/src/components/MobileShell.tsx +1 -33
  28. package/client/src/components/OperatorQuestionNotice.tsx +5 -4
  29. package/client/src/components/ProvidersPopover.tsx +6 -2
  30. package/client/src/components/RightPanel/ActivityTab.tsx +2 -1
  31. package/client/src/components/RightPanel/ConfigTab.tsx +23 -5
  32. package/client/src/components/RightPanel/OutputsPanel.tsx +21 -9
  33. package/client/src/components/RightPanel/outputsReconcile.ts +31 -0
  34. package/client/src/components/SettingsPanel.tsx +7 -10
  35. package/client/src/components/SpawnDialog.tsx +14 -3
  36. package/client/src/components/TabBar.tsx +2 -2
  37. package/client/src/components/TabContextMenu.tsx +73 -133
  38. package/client/src/components/TerminalInput.tsx +4 -3
  39. package/client/src/components/TranscriptWorkerDialog.tsx +14 -4
  40. package/client/src/components/UpdateAction.tsx +30 -7
  41. package/client/src/components/UsageBar.tsx +37 -18
  42. package/client/src/components/WorkflowCreator/ClusterMembersSection.tsx +29 -3
  43. package/client/src/components/WorkflowCreator/index.tsx +29 -15
  44. package/client/src/components/WorkflowView.tsx +1 -1
  45. package/client/src/components/providerIndicator.ts +7 -3
  46. package/client/src/components/settings/GitHubAuthRow.tsx +34 -0
  47. package/client/src/explorer/ArtifactsLens.tsx +17 -8
  48. package/client/src/explorer/ExplorerApp.tsx +3 -3
  49. package/client/src/explorer/types.ts +3 -1
  50. package/client/src/help/content/cluster.tsx +10 -4
  51. package/client/src/help/content/composer.tsx +3 -2
  52. package/client/src/help/content/header.tsx +11 -4
  53. package/client/src/help/content/misc.tsx +7 -5
  54. package/client/src/help/content/rightPanel.tsx +8 -4
  55. package/client/src/help/content/settings.tsx +15 -4
  56. package/client/src/help/content/tabbar.tsx +1 -1
  57. package/client/src/help/manualSections/actions.tsx +5 -1
  58. package/client/src/help/manualSections/clusters.tsx +20 -14
  59. package/client/src/help/manualSections/configuration.tsx +6 -4
  60. package/client/src/help/manualSections/gettingStarted.tsx +4 -2
  61. package/client/src/help/manualSections/maintenance.tsx +31 -0
  62. package/client/src/help/manualSections/powerFeatures.tsx +1 -0
  63. package/client/src/help/manualSections/providers.tsx +11 -4
  64. package/client/src/help/manualSections/workspace.tsx +3 -3
  65. package/client/src/hooks/useClaudeNativeCatalog.ts +26 -0
  66. package/client/src/hooks/useClaudeNativeLogin.ts +16 -11
  67. package/client/src/hooks/useWebSocket.ts +4 -2
  68. package/client/src/layout/layoutRange.ts +4 -5
  69. package/client/src/questions/waitingQuestion.ts +2 -0
  70. package/client/src/stores/appStore.ts +5 -1
  71. package/client/src/stores/appStore.types.ts +2 -0
  72. package/client/src/stores/replayContext.ts +20 -0
  73. package/client/src/utils/chatFileLinks.ts +34 -3
  74. package/client/src/utils/claudeAuth.ts +9 -1
  75. package/client/src/ws/handleServerMessage.ts +11 -3
  76. package/docs/ARCHITECTURE.md +3 -3
  77. package/docs/BACKUP.md +1 -1
  78. package/docs/CLIENT.md +10 -5
  79. package/docs/EXTENDING.md +1 -1
  80. package/docs/FEATURES.md +3 -3
  81. package/docs/GETTING_STARTED.md +5 -4
  82. package/docs/GIT_WORKBENCH.md +8 -0
  83. package/docs/GLOSSARY.md +2 -2
  84. package/docs/GOTCHAS.md +4 -4
  85. package/docs/HTTP_API.md +54 -23
  86. package/docs/OPERATIONS.md +17 -1
  87. package/docs/OPERATOR_ACTIONS.md +2 -2
  88. package/docs/OUTPUTS.md +48 -6
  89. package/docs/PERSISTENCE.md +1 -1
  90. package/docs/PRIMITIVES.md +4 -2
  91. package/docs/PROTOCOL_CLUSTER.md +12 -6
  92. package/docs/PROTOCOL_PRIMITIVES.md +1 -1
  93. package/docs/PROVIDERS.md +46 -9
  94. package/docs/RESEARCH.md +1 -1
  95. package/docs/SETTINGS.md +9 -4
  96. package/node_modules/@arco/shared/dist/protocol/clusters.d.ts +15 -3
  97. package/node_modules/@arco/shared/dist/protocol/clusters.js +1 -1
  98. package/node_modules/@arco/shared/dist/protocol/models.d.ts +6 -1
  99. package/node_modules/@arco/shared/dist/protocol/operatorQuestions.d.ts +2 -1
  100. package/node_modules/@arco/shared/dist/protocol/settings.d.ts +3 -0
  101. package/node_modules/@arco/shared/dist/protocol/settings.js +5 -0
  102. package/node_modules/@arco/shared/dist/protocol/workflows.d.ts +1 -0
  103. package/node_modules/@arco/shared/dist/protocol/workflows.js +0 -2
  104. package/node_modules/@arco/shared/package.json +1 -1
  105. package/package.json +2 -2
  106. package/scripts/packaging/services.mjs +20 -1
  107. package/scripts/packaging/update.mjs +37 -2
  108. package/server/dist/attention.d.ts +6 -0
  109. package/server/dist/attention.js +6 -0
  110. package/server/dist/auth.d.ts +5 -0
  111. package/server/dist/auth.js +31 -20
  112. package/server/dist/clusterAutoTurn.d.ts +5 -1
  113. package/server/dist/clusterAutoTurn.js +31 -9
  114. package/server/dist/clusterPresets.js +3 -3
  115. package/server/dist/effortValidation.d.ts +2 -2
  116. package/server/dist/effortValidation.js +4 -4
  117. package/server/dist/explorerArtifacts.d.ts +1 -0
  118. package/server/dist/explorerArtifacts.js +12 -1
  119. package/server/dist/geminiMembers.d.ts +7 -1
  120. package/server/dist/geminiMembers.js +28 -14
  121. package/server/dist/http/conversationFiles.d.ts +36 -0
  122. package/server/dist/http/conversationFiles.js +222 -0
  123. package/server/dist/http/fileBytes.d.ts +3 -0
  124. package/server/dist/http/fileBytes.js +33 -0
  125. package/server/dist/http/fileContentRoute.d.ts +2 -0
  126. package/server/dist/http/fileContentRoute.js +139 -0
  127. package/server/dist/http/fileRead.d.ts +54 -2
  128. package/server/dist/http/fileRead.js +31 -24
  129. package/server/dist/http/outputRoutes.js +14 -21
  130. package/server/dist/http/readConfinement.d.ts +0 -11
  131. package/server/dist/http/readConfinement.js +4 -30
  132. package/server/dist/http/router.js +40 -66
  133. package/server/dist/index.js +26 -12
  134. package/server/dist/management/initHubLink.js +1 -1
  135. package/server/dist/outputs.js +8 -0
  136. package/server/dist/primitives/exportContext.d.ts +2 -0
  137. package/server/dist/primitives/exportContext.js +13 -2
  138. package/server/dist/primitives/runCompare.d.ts +7 -1
  139. package/server/dist/primitives/runCompare.js +44 -20
  140. package/server/dist/project/taskLedger.js +46 -34
  141. package/server/dist/providerAccounts.d.ts +4 -0
  142. package/server/dist/providerAccounts.js +20 -1
  143. package/server/dist/providers/antigravity/artifacts.d.ts +23 -0
  144. package/server/dist/providers/antigravity/artifacts.js +140 -0
  145. package/server/dist/providers/antigravity/index.js +85 -7
  146. package/server/dist/providers/antigravity/questions.d.ts +2 -0
  147. package/server/dist/providers/antigravity/questions.js +58 -0
  148. package/server/dist/providers/claude-native/auth.d.ts +9 -8
  149. package/server/dist/providers/claude-native/auth.js +50 -58
  150. package/server/dist/providers/claude-native/authStatus.d.ts +2 -2
  151. package/server/dist/providers/claude-native/authStatus.js +9 -7
  152. package/server/dist/providers/claude-native/catalog.d.ts +6 -5
  153. package/server/dist/providers/claude-native/catalog.js +50 -39
  154. package/server/dist/providers/claude-native/oauth.d.ts +10 -9
  155. package/server/dist/providers/claude-native/oauth.js +120 -96
  156. package/server/dist/providers/claude-native/worker.d.ts +1 -0
  157. package/server/dist/providers/claude-native/worker.js +38 -23
  158. package/server/dist/providers/codex-appserver/operatorQuestions.d.ts +5 -3
  159. package/server/dist/providers/codex-appserver/operatorQuestions.js +27 -13
  160. package/server/dist/server/broadcast.js +6 -0
  161. package/server/dist/settings.d.ts +1 -0
  162. package/server/dist/settings.js +39 -7
  163. package/server/dist/skills.js +1 -1
  164. package/server/dist/smartPickupAdapters.d.ts +1 -0
  165. package/server/dist/smartPickupAdapters.js +2 -2
  166. package/server/dist/smartPickupObserver.js +8 -5
  167. package/server/dist/thirdPartySkills.js +11 -5
  168. package/server/dist/usage.d.ts +1 -1
  169. package/server/dist/usage.js +39 -27
  170. package/server/dist/workers/WorkerManager.d.ts +1 -0
  171. package/server/dist/workers/WorkerManager.js +1 -0
  172. package/server/dist/workers/processKill.js +37 -24
  173. package/server/dist/workflowMeta.js +2 -2
  174. package/server/dist/ws/clusterHandlers.d.ts +2 -2
  175. package/server/dist/ws/clusterHandlers.js +127 -113
  176. package/server/dist/ws/clusterMembers.d.ts +1 -1
  177. package/server/dist/ws/clusterMembers.js +34 -4
  178. package/server/dist/ws/compactHandlers.js +30 -14
  179. package/server/dist/ws/compareHandlers.js +53 -21
  180. package/server/dist/ws/gateHandlers.js +2 -0
  181. package/server/dist/ws/genesisHandlers.js +5 -3
  182. package/server/dist/ws/handoffHandlers.d.ts +1 -1
  183. package/server/dist/ws/handoffHandlers.js +115 -39
  184. package/server/dist/ws/transcriptWorkerHandlers.js +7 -2
  185. package/server/dist/ws/turnEngine.js +33 -18
  186. package/server/dist/ws/updatePrimaryConfig.d.ts +3 -2
  187. package/server/dist/ws/updatePrimaryConfig.js +236 -133
  188. package/server/dist/ws/workflowHandlers.js +21 -4
  189. package/server/package.json +1 -1
  190. package/server/src/attention.ts +7 -0
  191. package/server/src/auth.ts +33 -20
  192. package/server/src/clusterAutoTurn.ts +31 -11
  193. package/server/src/clusterPresets.ts +2 -2
  194. package/server/src/effortValidation.ts +4 -4
  195. package/server/src/explorerArtifacts.ts +12 -1
  196. package/server/src/geminiMembers.ts +26 -15
  197. package/server/src/http/conversationFiles.ts +231 -0
  198. package/server/src/http/fileBytes.ts +34 -0
  199. package/server/src/http/fileContentRoute.ts +123 -0
  200. package/server/src/http/fileRead.ts +30 -25
  201. package/server/src/http/outputRoutes.ts +13 -13
  202. package/server/src/http/readConfinement.ts +3 -30
  203. package/server/src/http/router.ts +38 -62
  204. package/server/src/index.ts +27 -18
  205. package/server/src/management/initHubLink.ts +1 -1
  206. package/server/src/outputs.ts +8 -0
  207. package/server/src/primitives/exportContext.ts +14 -2
  208. package/server/src/primitives/runCompare.ts +73 -46
  209. package/server/src/project/taskLedger.ts +47 -30
  210. package/server/src/providerAccounts.ts +20 -1
  211. package/server/src/providers/antigravity/artifacts.ts +121 -0
  212. package/server/src/providers/antigravity/index.ts +64 -6
  213. package/server/src/providers/antigravity/questions.ts +52 -0
  214. package/server/src/providers/claude-native/auth.ts +45 -60
  215. package/server/src/providers/claude-native/authStatus.ts +9 -8
  216. package/server/src/providers/claude-native/catalog.ts +52 -35
  217. package/server/src/providers/claude-native/oauth.ts +101 -77
  218. package/server/src/providers/claude-native/worker.ts +38 -22
  219. package/server/src/providers/codex-appserver/operatorQuestions.ts +26 -12
  220. package/server/src/server/broadcast.ts +4 -0
  221. package/server/src/settings.ts +36 -8
  222. package/server/src/skills.ts +1 -1
  223. package/server/src/smartPickupAdapters.ts +3 -2
  224. package/server/src/smartPickupObserver.ts +8 -5
  225. package/server/src/thirdPartySkills.ts +11 -5
  226. package/server/src/usage.ts +30 -22
  227. package/server/src/workers/WorkerManager.ts +2 -0
  228. package/server/src/workers/processKill.ts +37 -23
  229. package/server/src/workflowMeta.ts +2 -2
  230. package/server/src/ws/clusterHandlers.ts +107 -104
  231. package/server/src/ws/clusterMembers.ts +25 -6
  232. package/server/src/ws/compactHandlers.ts +29 -15
  233. package/server/src/ws/compareHandlers.ts +59 -25
  234. package/server/src/ws/gateHandlers.ts +2 -0
  235. package/server/src/ws/genesisHandlers.ts +5 -4
  236. package/server/src/ws/handoffHandlers.ts +105 -37
  237. package/server/src/ws/transcriptWorkerHandlers.ts +6 -2
  238. package/server/src/ws/turnEngine.ts +32 -17
  239. package/server/src/ws/updatePrimaryConfig.ts +230 -132
  240. package/server/src/ws/workflowHandlers.ts +20 -4
  241. package/shared/dist/protocol/clusters.d.ts +15 -3
  242. package/shared/dist/protocol/clusters.js +1 -1
  243. package/shared/dist/protocol/models.d.ts +6 -1
  244. package/shared/dist/protocol/operatorQuestions.d.ts +2 -1
  245. package/shared/dist/protocol/settings.d.ts +3 -0
  246. package/shared/dist/protocol/settings.js +5 -0
  247. package/shared/dist/protocol/workflows.d.ts +1 -0
  248. package/shared/dist/protocol/workflows.js +0 -2
  249. package/shared/src/protocol/clusters.ts +23 -5
  250. package/shared/src/protocol/compare.ts +2 -2
  251. package/shared/src/protocol/models.ts +8 -4
  252. package/shared/src/protocol/operatorQuestions.ts +2 -1
  253. package/shared/src/protocol/settings.ts +8 -1
  254. package/shared/src/protocol/workflows.ts +1 -1
package/docs/RESEARCH.md CHANGED
@@ -109,7 +109,7 @@ A research project opens in an ordinary cluster tab (`ClusterTab`) with these ad
109
109
 
110
110
  - **Rounds strip** (`client/src/components/research/ResearchRoundsStrip.tsx`) above the member cards: the project name, saved folder and `OPEN FOLDER`, the default location in Settings > Projects > Research folder, `BRIEF` to show the brief, Blind, Revealed or Not blind, `REVEAL` while blind, and one row per round (latest three, `ALL N ROUNDS` for the rest) with each researcher's state and the elapsed time. A row expands to each outcome, "taken from final reply", the failure reason, the deadline and the count of targeted messages; in a released round each replied line opens that researcher's `report-<letter>.md` in the file viewer. It replaces the empty-plan hint. The question expands when chosen; `REVEAL` asks in an Arco confirmation; actions are at least 44 px square.
111
111
  - **Member cards** keep their live state and `STOP`. A researcher's card shows a markdown link to a path inside its sandbox (`/work/...`) as the link text only. It adds one wrapping line: letter, provider and model, isolation, web searches counted once per call from its loaded tool activity, and its state in the latest round. The operator always sees provider and model; blind applies to the Director.
112
- - **Controls:** the research cluster bar offers Auto-compaction and SKILLS. With a Gemini member, a notice above the conversation names it and says it takes a turn only from NUDGE or its own composer; Auto-compaction names it as skipped, and `/compact` in its session compacts it. PLAN lets the Research Director attach and edit the project plan; researchers cannot read or change it. Generic member add, replacement and detachment, board controls, cluster snapshots, and unrelated coordination controls are not offered. The server refuses ordinary member additions, access-mode changes, board changes and hidden coordination settings for research projects. Member settings and the per-member web switch remain available in CONFIG and MEMBERS. FILES shows the research folder without the Git sub-tabs or researcher-private locations.
112
+ - **Controls:** the research cluster bar offers Auto-compaction and SKILLS. With a Gemini member, a notice above the conversation names it and says it takes a turn only from NUDGE or its own composer; An isolated Gemini researcher uses manual COMPACT in its own sandbox. Arco does not apply an automatic threshold to that researcher. PLAN lets the Research Director attach and edit the project plan; researchers cannot read or change it. Generic member add, replacement and detachment, board controls, cluster snapshots, and unrelated coordination controls are not offered. The server refuses ordinary member additions, access-mode changes, board changes and hidden coordination settings for research projects. Member settings and the per-member web switch remain available in CONFIG and MEMBERS. FILES shows the research folder without the Git sub-tabs or researcher-private locations.
113
113
  - **Narrow layout:** the member rail labels the Director `RD` and researchers by letter. The rounds strip is at the top of the member list (☰), and the right strip shows `RESULTS` in place of `BOARD`. A stored `BOARD` tab opens as `RESULTS` in a research project.
114
114
  - **Right panel:** `RESULTS` (new, `ResearchResultsTab.tsx`) opens `brief.md`, `synthesis.md`, `director-log.md`, `exports.md`, each round's `round.md` and the released reports in the file viewer. RESULTS is laid out as bordered cards in the style of the cluster ACTIVITY pane. The project card holds the file links as chips and, once a round exists, a project action row: `Rerun` always, `Start project` and `Chat` when a released summary exists (`Start project` also when every normal round is released), and `Send project` and `Export` only when every normal round is released. Each round or catch-up is one card, newest first: its heading, `Record` (the round's `round.md`) and `Summary` chips, the release time and, on the right, an `Actions` button; an independence or sandbox warning is one tagged line inside the card. Each researcher is one row in the card: the name in its ACTIVITY colour, `Report`, `Files (n)`, a `Late` tag or the outcome when there is no report, and an `Actions` button. `Actions` opens the send, start, chat (summaries only) and export choices under its row; Escape closes them and returns focus to `Actions`. `Files (n)` opens under its row the files that researcher returned in that round, by their original names, opening the copies in `sources/`; a report with no returned files has no `Files` control. Catch-ups and late reports from RETRY are listed the same way. In a narrow panel a researcher is named by letter and the release time is left out. Both RESULTS and the rounds strip name a researcher by letter only while reports are blind, and add provider and model after REVEAL or when the project is not blind. `RESULTS` is first in a research project; `BOARD` and `PLAN` are hidden there, and `RESULTS` is hidden in every other cluster. Each round links its summary (`syntheses/round-N.md`, or `synthesis.md` for the latest round), read from `GET /api/research/<clusterId>/summaries`; the Summary chip in the project card says Awaiting summary until `synthesis.md` exists.
115
115
  - **Send to a project:** `Send report`, `Send summary` and `Send project` choose released material, including catch-up reports from researchers who were later removed. The dialog opens with a project folder already chosen: the folder this research was last sent to or started a project in, read from `exports.md`, otherwise the project the research was started from, and never the research folder itself. With neither it asks for the folder; `CHANGE FOLDER` replaces it. Then independently choose a new copy under `research/`, a reference in an existing plan in that folder, or `Attach to conversation draft`, which shows the list of open conversations only while ticked. `SEND` is available as soon as a folder is chosen. The draft is not sent. A plan reference owns its linked files beside it; deleting the reference removes those files. A Research Director can propose a selection with `research_send_to_project`; `REVIEW SEND` lets the operator choose its destination. Successful destinations are recorded in `exports.md`; partial copies and receipt failures are reported separately. Existing files are not overwritten.
package/docs/SETTINGS.md CHANGED
@@ -60,7 +60,7 @@ Sections: 29.
60
60
  | `phosphor` | Appearance | Phosphor effects and softness | Global | Phosphor glow, effects and softness (shown with a Phosphor theme) |
61
61
  | `font-pack-override` | Appearance | Font pack override | Global | Font pack selector; default Victor Mono |
62
62
  | `interface-text-size` | Appearance | Interface text size | Global | 90% to 150%; fresh installs default to 110%, existing installs keep their size |
63
- | `layout` | Appearance | Layout | Global (this browser) | Automatic (default: Narrow under 1500, Compact from 1500, Standard from 2000 interface pixels), Standard, Compact or Narrow. Fixed choices apply at every width. Top-bar switch and command palette make the same choice |
63
+ | `layout` | Appearance | Layout | Global (this browser) | Automatic (default: Narrow under 1200, Compact from 1200, Standard from 1380 interface pixels), Standard, Compact or Narrow. Fixed choices apply at every width. Top-bar switch and command palette make the same choice |
64
64
  | `message-box-size` | Appearance | Message box size | Global (this browser) | Small (default), Medium or Large starting height for every message box |
65
65
  | `theme-brightness` | Appearance | Background and text brightness | Global | Background brightness, text brightness (default +25) |
66
66
  | `crisp-text` | Appearance | Crisp text | Global | Crisp text toggle |
@@ -69,7 +69,7 @@ Sections: 29.
69
69
  | `projects` | Projects | Project locations and bookmarks | Global | Project locations with folded Add/Edit and duplicate/alias rename feedback; Bookmarked folders for optional Bookmark folder/Remove bookmark controls; Research folder (`researchFolder`, where each research project gets its dated subfolder; affects only new projects); Research time limit (`researchTimeLimitMinutes`, 30 to 240 minutes, default 45, for each new round or catch-up); Advanced folder options for independent browsing defaults; non-destructive multi-location Run setup again |
70
70
  | `project-trust` | Projects | Project trust | Project, rules kept globally | Searchable, scrollable trusted and blocked project list, default trust |
71
71
  | `enabled-providers` | Providers and models | Enabled providers | Global | Per-provider on/off toggles |
72
- | `authentication` | Providers and models | Sign-in, accounts and local endpoints | Global | Provider sign-in, status and endpoint controls appear only for enabled providers: Claude group (Native sign-in first, then CLI sign-in), Codex accounts and profiles, Cursor, Antigravity CLI and GEMINI FOR RESEARCH (separate sign-in for Gemini researchers, shown when Antigravity CLI is enabled and its sandbox check passes; on Windows and macOS a note says Gemini for Research is Linux-only), Ollama endpoint and discovery, LM Studio endpoint, Strata endpoint, DeepSeek through Xolotl, and the Ollama, llama.cpp, LM Studio and Strata rows. Always shown: Ollama compaction utility model (compaction summaries, session titles) and the GitHub row; the Ollama endpoint also stays shown while an enabled Ollama utility model is configured with Ollama off |
72
+ | `authentication` | Providers and models | Sign-in, accounts and local endpoints | Global | Provider sign-in, status and endpoint controls appear only for enabled providers: Claude group (Default and additional Native accounts, then CLI sign-in), Codex accounts and profiles, Cursor, Antigravity CLI and GEMINI FOR RESEARCH (separate sign-in for Gemini researchers, shown when Antigravity CLI is enabled and its sandbox check passes; on Windows and macOS a note says Gemini for Research is Linux-only), Ollama endpoint and discovery, LM Studio endpoint, Strata endpoint, DeepSeek through Xolotl, and the Ollama, llama.cpp, LM Studio and Strata rows. Always shown: Ollama compaction utility model (compaction summaries, session titles) and the GitHub row; the Ollama endpoint also stays shown while an enabled Ollama utility model is configured with Ollama off |
73
73
  | `llamacpp-catalog` | Providers and models | llama.cpp model registry | Global | llama.cpp registry editor and preload (shown when llama.cpp is enabled and installed) |
74
74
  | `catalog` | Providers and models | Model catalog | Global | Model catalog editor |
75
75
  | `native-subagents` | Agents and clusters | Claude Native sub-agents | Global defaults, including existing workflows | Maximum running at once, maximum starts per turn, sub-agent model and Background sub-agents (Allowed or Off); each control opens this section from contextual help |
@@ -86,6 +86,11 @@ Sections: 29.
86
86
  | `app-window-browser` | Advanced | App window browser | Global | Automatic (first found, preserving the existing preference), a detected installation/channel, or another program name or path; used by `arco open`, the Arco shortcut and the explorer window; a missing choice falls back to Automatic |
87
87
  | `cli-versions` | Advanced | CLI and runtime versions | Global | Arco running version, latest release, CHECK NOW, update action or copyable command, Check for new releases, Updating Arco link; Claude, Codex CLI and Ollama daemon versions, plus the providers popover for available provider updates |
88
88
 
89
+ Claude Native profiles are available in this Settings group and in Connections > Claude.
90
+ Use ADD NATIVE ACCOUNT and SAVE ACCOUNT, then use LOGIN for that profile. Use RENAME ACCOUNT
91
+ to change its display name and LOGOUT to sign out of it. In a Native tab or cluster member,
92
+ CLAUDE NATIVE ACCOUNT selects the sign-in. Existing unbound Native tabs keep Default.
93
+
89
94
  ## Phone view
90
95
 
91
96
  The phone view at `/mobile` has one setting of its own: **THIS PHONE**, shown after the category list in Settings on a phone. It sets the text size of the phone view (100%, 110% or 120%) for this browser only; the workbench's Interface text size does not apply there. See [Use Arco from a phone](GETTING_STARTED.md#use-arco-from-a-phone).
@@ -158,7 +163,7 @@ folders, files, saved sessions or trust decisions. Missing locations stay listed
158
163
 
159
164
  ## Auto-compaction policy
160
165
 
161
- The workflow CONFIG panel has a worker auto-compaction policy and the cluster panel has a cluster default. For cluster members, No worker override means no policy is set on the tab. If the cluster also has no policy, Claude CLI and Codex compact themselves; Claude Native and Ollama use Arco compaction near the context limit. Set a shared policy in the cluster panel under AUTO-COMPACTION. Choose an explicit on or off override or inherit the cluster default; Provider is the default: Claude Native and Ollama use Arco compaction near 90%, while Claude CLI and Codex use their own compaction. Auto-handoff is off by default. The threshold is an integer from 30% through 95%, evaluated for each worker independently. Claude Native and Codex app-server use a fresh completed-turn reading; Codex also needs an existing thread. Ollama checks its estimated request size against the configured backend context window before dispatch. Other transports cannot use this policy. Unknown context never triggers a summary. For Claude Native and Codex app-server, after a successful automatic compaction, the next completed turn at or above the threshold can compact again. If three successive automatic compactions are each followed by a turn still at or above the threshold, a notice explains that compaction will continue. The notice can appear again after a turn ends below the threshold or COMPACT succeeds. A failed attempt waits for a reading more than five percentage points below the threshold before retrying. Fold creates a deterministic digest; Handoff starts a fresh session. Claude Native CONFIG > ADVANCED has the optional Claude API compaction (beta) toggle; it is separate and off for new tabs.
166
+ The workflow CONFIG panel has a worker auto-compaction policy and the cluster panel has a cluster default. For cluster members, No worker override means no policy is set on the tab. If the cluster also has no policy, Claude CLI and Codex compact themselves; Claude Native and Ollama use Arco compaction near the context limit. Set a shared policy in the cluster panel under AUTO-COMPACTION. Choose an explicit on or off override or inherit the cluster default; Provider is the default: Claude Native and Ollama use Arco compaction near 90%, while Claude CLI and Codex use their own compaction. Auto-handoff is off by default. The threshold is an integer from 30% through 95%, evaluated for each worker independently. Claude Native and Codex app-server use a fresh completed-turn reading; Codex also needs an existing thread. Ollama checks its estimated request size against the configured backend context window before dispatch. Gemini uses a fresh completed-turn reading and the CLI's /compact command. Isolated Gemini researchers use manual COMPACT in their sandboxes. After an attempt, Arco waits for a fresh reading more than five percentage points below the threshold before trying again in that session. Provider and Off keep Gemini's usual automatic compaction. Other transports cannot use this policy. For Arco-scheduled compactions, unknown context never triggers a summary. For Claude Native and Codex app-server, after a successful automatic compaction, the next completed turn at or above the threshold can compact again. If three successive automatic compactions are each followed by a turn still at or above the threshold, a notice explains that compaction will continue. The notice can appear again after a turn ends below the threshold or COMPACT succeeds. A failed attempt waits for a reading more than five percentage points below the threshold before retrying. Fold creates a deterministic digest; Handoff starts a fresh session. Claude Native CONFIG > ADVANCED has the optional Claude API compaction (beta) toggle; it is separate and off for new tabs.
162
167
 
163
168
  For Ollama, the new policy summarizes only verified completed executions outside the retained tail. The summary boundary is saved atomically in the workflow's `ollama-compact-boundary.json`, bound to project, workflow, session epoch and source events. Later turns and server restarts reuse a matching summary without rewriting raw events. Queued input is replayed in execution order, with the current prompt supplied once. Unverifiable legacy logs, partial or cancelled executions, changed source and unresolved input defer summarization with a notice. Ineffective or failed attempts wait for a lower context reading before retrying. The enabled policy defers automatic Handoff so it cannot rotate the session before the next pre-dispatch check; manual Handoff remains available. Explicit Off stops automatic compaction, including the legacy global automatic setting. Returning to Provider uses the 90% default unless an earlier global Ollama enabled or threshold setting is saved, in which case that setting remains in force. Manual COMPACT remains a next-turn action and uses the same durable boundary when a worker or Provider policy is active.
164
169
 
@@ -243,7 +248,7 @@ beyond the limit is reported in the conversation. Pinning a project skill
243
248
  explicitly approves that text even with project trust off. Save an EDITABLE
244
249
  COPY before pinning a built-in skill. No pins are added by default.
245
250
 
246
- Skill descriptions can be up to 300 characters. Settings > SKILLS lists the built-in skills with an OPERATOR or MODEL badge, TURN OFF and TURN ON. The composer SKILLS menu runs them or creates an EDITABLE COPY. A project or global skill with the same name replaces the built-in. Operator-run (slash): grill-me, grill-with-docs, wait-what, retro; Architecture review via `/improve-codebase-architecture`. Model-invoked (manifest / MODEL badge): proportionate-testing (Arco-owned), grilling, domain-modeling, tdd, diagnosing-bugs, codebase-design, prototype, writing-for-agents. `proportionate-testing` controls how much to test; `tdd` controls how to write one test. Keep it on to ask agents for one test per real fault and operator approval before new suites, gates, tooling or CI checks. Built-in third-party skills and their license are listed in [THIRD_PARTY_NOTICES](../THIRD_PARTY_NOTICES).
251
+ Skill descriptions can be up to 300 characters. Settings > SKILLS lists the built-in skills with an OPERATOR or MODEL badge, TURN OFF and TURN ON. The composer SKILLS menu runs them or creates an EDITABLE COPY. A project or global skill with the same name replaces the built-in. Operator-run (slash): grill-me, grill-with-docs, wait-what, retro, code-review; Architecture review via `/improve-codebase-architecture`. Model-invoked (manifest / MODEL badge): proportionate-testing (Arco-owned), grilling, domain-modeling, tdd, diagnosing-bugs, codebase-design, prototype, writing-for-agents. `proportionate-testing` controls how much to test; `tdd` controls how to write one test. Keep it on to ask agents for one test per real fault and operator approval before new suites, gates, tooling or CI checks. Built-in third-party skills and their license are listed in [THIRD_PARTY_NOTICES](../THIRD_PARTY_NOTICES).
247
252
 
248
253
  ## Save outcomes and rapid edits
249
254
 
@@ -5,8 +5,8 @@ export interface ClusterSkillPin extends ArcoSkillRef {
5
5
  export type ClusterMemberProvider = 'claude' | 'codex' | 'ollama' | 'llamacpp' | 'cursor' | 'antigravity-cli';
6
6
  export declare const CLUSTER_MEMBER_PROVIDERS: readonly ["claude", "codex", "ollama", "llamacpp", "cursor", "antigravity-cli"];
7
7
  export declare function isOperatorSendOnlyProvider(v: unknown): boolean;
8
- export declare const GEMINI_MEMBER_NOTE = "Mail to or from Gemini waits for your NUDGE; review or edit it in MAILBOX first. AUTO-PICKUP skips it.";
9
- export declare const GEMINI_MEMBER_CHOICE_NOTE = "Mail to or from Gemini waits for your NUDGE; review or edit it in MAILBOX first. AUTO-PICKUP skips it. Gemini members are not isolated.";
8
+ export declare const GEMINI_MEMBER_NOTE = "AUTO-PICKUP can wake Gemini for eligible incoming mail. Mail from Gemini waits for your NUDGE on the recipient.";
9
+ export declare const GEMINI_MEMBER_CHOICE_NOTE = "AUTO-PICKUP can wake Gemini for eligible incoming mail. Mail from Gemini waits for your NUDGE on the recipient. Gemini members are not isolated.";
10
10
  export declare const GEMINI_RESEARCH_DIRECTOR_NOTE = "Each step of a Gemini Research Director waits for your NUDGE, and the rounds it sends wait for your NUDGE on each researcher. Review or edit them in MAILBOX first.";
11
11
  export declare const GEMINI_RESEARCHER_NOTE = "A Gemini researcher works in the Linux worker sandbox with the separate Gemini for research sign-in, and takes each round only on your NUDGE.";
12
12
  export declare function isClusterMemberProvider(v: unknown): v is ClusterMemberProvider;
@@ -325,6 +325,18 @@ export interface ClusterCreateWithFreshWorkersMessage extends ClusterCreationSet
325
325
  model?: string;
326
326
  effort?: 'low' | 'medium' | 'high' | string;
327
327
  providerAccountRef?: string;
328
+ members?: ClusterFreshMemberSpec[];
329
+ }
330
+ export interface ClusterFreshMemberSpec extends ClusterMemberTuning {
331
+ provider?: ClusterMemberProvider;
332
+ model?: string;
333
+ effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | string;
334
+ providerAccountRef?: string;
335
+ accessMode?: ClusterMemberAccessMode;
336
+ webAccess?: boolean;
337
+ claudeTransport?: 'native' | 'cli';
338
+ name?: string;
339
+ role?: string;
328
340
  }
329
341
  export interface ClusterCreateFromScratchMessage extends ClusterCreationSettings {
330
342
  type: 'cluster_create_from_scratch';
@@ -767,7 +779,7 @@ export interface ClusterAutoTurnFiredMessage {
767
779
  workflowId: string;
768
780
  sender: string;
769
781
  chainDepth: number;
770
- reason: 'mailbox_arrival' | 'rate_capped' | 'depth_capped' | 'cooldown' | 'recipient_busy' | 'disabled' | 'ack_only' | 'budget_paused' | 'member_capped' | 'pair_paused' | 'operator_send_only' | 'gemini_mail';
782
+ reason: 'mailbox_arrival' | 'rate_capped' | 'depth_capped' | 'cooldown' | 'recipient_busy' | 'disabled' | 'ack_only' | 'budget_paused' | 'member_capped' | 'pair_paused' | 'operator_send_only' | 'gemini_mail' | 'member_blocked';
771
783
  notice?: string;
772
784
  fired: boolean;
773
785
  }
@@ -4,7 +4,7 @@ export const CLUSTER_MEMBER_PROVIDERS = ['claude', 'codex', 'ollama', 'llamacpp'
4
4
  export function isOperatorSendOnlyProvider(v) {
5
5
  return v === 'antigravity-cli';
6
6
  }
7
- export const GEMINI_MEMBER_NOTE = 'Mail to or from Gemini waits for your NUDGE; review or edit it in MAILBOX first. AUTO-PICKUP skips it.';
7
+ export const GEMINI_MEMBER_NOTE = 'AUTO-PICKUP can wake Gemini for eligible incoming mail. Mail from Gemini waits for your NUDGE on the recipient.';
8
8
  // Shown where a Gemini member is chosen: it runs in the project folder.
9
9
  export const GEMINI_MEMBER_CHOICE_NOTE = `${GEMINI_MEMBER_NOTE} Gemini members are not isolated.`;
10
10
  // Shown where a Gemini Research Director is chosen.
@@ -181,7 +181,7 @@ export interface Capabilities {
181
181
  }
182
182
  export interface ClaudeCredentialBinding {
183
183
  source: 'claude-native' | 'claude-cli';
184
- storeId: 'claude.native' | 'claude-cli-default';
184
+ storeId: 'claude.native' | 'claude-cli-default' | `claude.native:${string}`;
185
185
  revision?: string;
186
186
  }
187
187
  export interface ClaudeCliAuthStatus {
@@ -213,8 +213,10 @@ export interface ClaudeNativeAuthStatus {
213
213
  export interface AuthStatus {
214
214
  loggedIn: boolean;
215
215
  native?: ClaudeNativeAuthStatus;
216
+ nativeAccounts?: Record<string, ClaudeNativeAuthStatus>;
216
217
  cli?: ClaudeCliAuthStatus;
217
218
  probeFailed?: boolean;
219
+ githubState?: 'missing' | 'signed-out' | 'probe-failed';
218
220
  email?: string;
219
221
  subscriptionType?: string;
220
222
  orgName?: string;
@@ -271,9 +273,12 @@ export interface ClaudeNativeAuthFlow {
271
273
  bindingBefore: ClaudeCredentialBinding;
272
274
  binding?: ClaudeCredentialBinding;
273
275
  workflowId?: string;
276
+ accountRef?: string;
274
277
  error?: string;
275
278
  }
276
279
  export interface AuthRecoveryContext {
277
280
  transport: 'native' | 'cli';
278
281
  binding?: ClaudeCredentialBinding;
282
+ accountRef?: string;
283
+ accountUnavailable?: boolean;
279
284
  }
@@ -8,10 +8,11 @@ export interface OperatorQuestion {
8
8
  }>;
9
9
  allowOther: boolean;
10
10
  secret: boolean;
11
+ optional?: boolean;
11
12
  }
12
13
  export interface OperatorQuestionState {
13
14
  requestId: string;
14
- provider: 'codex';
15
+ provider: 'codex' | 'antigravity-cli';
15
16
  threadId: string;
16
17
  turnId: string;
17
18
  itemId: string;
@@ -1,4 +1,6 @@
1
1
  export declare const TERMINAL_CODEX_ACCOUNT = "@terminal";
2
+ export declare const DEFAULT_CLAUDE_NATIVE_ACCOUNT = "@native-default";
3
+ export declare function isClaudeNativeProfileId(id: unknown): id is string;
2
4
  import type { EffortLevel, ModelName, ProviderName } from './providers.js';
3
5
  import type { FallbackChainsConfig } from './fallback.js';
4
6
  export interface NativeSubagentPolicy {
@@ -58,6 +60,7 @@ export interface ProviderAccountProfile {
58
60
  export interface ProviderAccountsConfig {
59
61
  codex?: ProviderAccountProfile[];
60
62
  claude?: ProviderAccountProfile[];
63
+ claudeNative?: ProviderAccountProfile[];
61
64
  }
62
65
  export interface ArcoSettings {
63
66
  previewPorts?: string;
@@ -1,5 +1,10 @@
1
1
  // Reserved account selector for a terminal-owned Codex session in CODEX_HOME.
2
2
  export const TERMINAL_CODEX_ACCOUNT = '@terminal';
3
+ // An explicit selection of the original Claude Native credential store.
4
+ export const DEFAULT_CLAUDE_NATIVE_ACCOUNT = '@native-default';
5
+ export function isClaudeNativeProfileId(id) {
6
+ return typeof id === 'string' && /^native-[0-9a-f]{24}$/.test(id);
7
+ }
3
8
  export function sanitizeNativeSubagents(value) {
4
9
  if (!value || typeof value !== 'object' || Array.isArray(value))
5
10
  return undefined;
@@ -193,6 +193,7 @@ export type FileContextReference = {
193
193
  };
194
194
  export interface WorkerConfig {
195
195
  antigravityInteractive?: boolean;
196
+ antigravityHandoffWriter?: boolean;
196
197
  antigravityChatWorkspace?: boolean;
197
198
  priorFiles?: FileContextReference[];
198
199
  fileContextCwd?: string;
@@ -15,8 +15,6 @@ export function resolveAutoCompactionPolicy(worker, cluster) {
15
15
  }
16
16
  // Leave ten percent of the context window for the compaction request itself.
17
17
  export function resolveProviderAutoCompaction(worker, cluster, provider, transport, serverCompact, savedOllamaPolicy = false) {
18
- if (provider === 'antigravity-cli')
19
- return undefined;
20
18
  const explicit = resolveAutoCompactionPolicy(worker, cluster);
21
19
  if (explicit)
22
20
  return explicit;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arco/shared",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "node-pty": "1.1.0"
5
5
  },
6
6
  "name": "arco-workbench",
7
- "version": "0.2.4",
7
+ "version": "0.2.6",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+https://github.com/ghreprimand/arco.git"
@@ -67,7 +67,7 @@
67
67
  "word-extractor": "1.0.4",
68
68
  "ws": "8.22.0",
69
69
  "xlsx": "0.20.3",
70
- "@arco/shared": "0.2.4"
70
+ "@arco/shared": "0.2.6"
71
71
  },
72
72
  "bundleDependencies": [
73
73
  "@arco/shared",
@@ -103,11 +103,30 @@ export function runWindowsProbe(command, args, { timeout = 30_000, env = process
103
103
  timer = setTimeout(() => { child.stdout.destroy(); try { child.kill(); } catch { /* already gone */ } child.unref(); finish({ error: Object.assign(new Error('Process inspection timed out.'), { code: 'ETIMEDOUT' }) }); }, timeout);
104
104
  });
105
105
  }
106
+ // Reads the Linux user service state and any queued job without changing it.
107
+ // Returns null when systemd cannot be asked, so callers treat it as unknown.
108
+ export function linuxServiceState(deps = {}) {
109
+ const run = deps.run ?? ((cmd, args) => spawnSync(cmd, args, { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf8', timeout: 10_000 }));
110
+ const show = run('systemctl', ['--user', 'show', '--property=ActiveState', 'arco.service']);
111
+ const active = /^ActiveState=([a-z-]+)\s*$/m.exec(show.stdout || '')?.[1];
112
+ if (show.error || show.status !== 0 || !active) return null;
113
+ const jobs = run('systemctl', ['--user', 'list-jobs', '--no-legend', 'arco.service']);
114
+ if (jobs.error || jobs.status !== 0) return null;
115
+ const job = String(jobs.stdout || '').split('\n').map((line) => line.trim().split(/\s+/)).find((fields) => fields[1] === 'arco.service')?.[2] ?? null;
116
+ return { active, job };
117
+ }
106
118
  export async function serviceAction(action, deps = {}) {
107
119
  const platform = deps.platform ?? process.platform, env = deps.env ?? process.env;
108
120
  const paths = deps.paths ?? servicePaths(platform, env);
109
121
  const run = deps.run ?? ((cmd, args, options = {}) => spawnSync(cmd, args, { stdio: 'inherit', windowsHide: true, ...options }));
110
- const call = (cmd, args) => { const r = run(cmd, args); if (r.error || r.status !== 0) throw new Error(`${cmd} ${args[0]} failed${r.error ? `: ${r.error.message}` : ''}`); };
122
+ // Name the failed step (command, action, unit) without dashed options,
123
+ // user ids or paths, so the message is safe to show and to save.
124
+ const call = (cmd, args) => {
125
+ const r = run(cmd, args);
126
+ if (!r.error && r.status === 0) return;
127
+ const step = [cmd, args.find((arg) => !arg.startsWith('-')), ...(args.includes('arco.service') ? ['arco.service'] : [])].join(' ');
128
+ throw new Error(`${step} failed${r.error ? `: ${r.error.message}` : Number.isInteger(r.status) ? ` (exit ${r.status})` : ''}`);
129
+ };
111
130
  const uid = deps.uid ?? process.getuid?.();
112
131
  const domain = env.USERDOMAIN, username = env.USERNAME;
113
132
  const user = domain && username ? `${domain}\\${username}` : username;
@@ -3,7 +3,7 @@ import { spawnSync } from 'node:child_process';
3
3
  import { closeSync, cpSync, existsSync, lstatSync, mkdtempSync, mkdirSync, openSync, readFileSync, renameSync, rmSync, unlinkSync, writeFileSync } from 'node:fs';
4
4
  import { basename, dirname, join, resolve } from 'node:path';
5
5
  import { npmCliPath } from './native-repair.mjs';
6
- import { readWindowsServicePid, runWindowsProbe, serviceAction, servicePaths } from './services.mjs';
6
+ import { linuxServiceState, readWindowsServicePid, runWindowsProbe, serviceAction, servicePaths } from './services.mjs';
7
7
 
8
8
  export function compareVersions(a, b) {
9
9
  const pattern = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/;
@@ -132,7 +132,15 @@ export async function updatePackage(manifest, packageRoot, deps = {}) {
132
132
  const config = deps.config ?? servicePaths(platform, env).config;
133
133
  const managed = deps.managed ?? existsSync(config);
134
134
  const servicePid = platform === 'win32' && managed ? readWindowsServicePid(home) : null;
135
- if (managed) { await service('stop'); stopped = true; }
135
+ // On Linux, record whether the service ran before the stop. A stop can be
136
+ // canceled by another start or restart of the service while it waits.
137
+ const linuxState = platform === 'linux' && managed ? deps.serviceState ?? (deps.service ? null : () => linuxServiceState()) : null;
138
+ const before = linuxState ? await linuxState() : null;
139
+ if (managed) {
140
+ try { await service('stop'); }
141
+ catch (error) { if (linuxState) throw await afterFailedStop(error, before, linuxState, service, deps); throw error; }
142
+ stopped = true;
143
+ }
136
144
  if (platform === 'win32') {
137
145
  const running = servicePid ? await waitForRecordedPid(servicePid, deps) : await windowsRunning();
138
146
  if (running) throw new Error(servicePid ? `The Arco service process ${servicePid} is still running. Stop it before updating on Windows.` : 'Stop all Arco processes before updating on Windows.');
@@ -191,6 +199,33 @@ export async function updatePackage(manifest, packageRoot, deps = {}) {
191
199
  }
192
200
  }
193
201
 
202
+ const settlingStates = new Set(['activating', 'deactivating', 'reloading', 'refreshing']);
203
+ // A failed stop leaves the package untouched. Wait a bounded time for queued
204
+ // service jobs to finish, then report the settled state. Start the service only
205
+ // when it was confirmed active before the update, is now stopped and no job is
206
+ // pending. An unread or transitional earlier state is reported, not acted on.
207
+ export async function afterFailedStop(error, before, readState, service, deps = {}) {
208
+ const now = deps.now ?? (() => performance.now());
209
+ const sleep = deps.sleep ?? ((ms) => new Promise((done) => setTimeout(done, ms)));
210
+ const deadline = now() + (deps.settleMs ?? 120_000);
211
+ let state = await readState();
212
+ while (state && (state.job || settlingStates.has(state.active)) && now() < deadline) {
213
+ await sleep(Math.max(0, Math.min(1000, deadline - now())));
214
+ state = await readState();
215
+ }
216
+ const cause = `${String(error.message).replace(/[.\s]+$/, '')}. The installed package was left unchanged`;
217
+ if (!state) return new Error(`${cause}. The service state could not be read. Run arco service status, and arco service start if Arco is stopped`);
218
+ if (state.active === 'active' && !state.job) return new Error(`${cause} and Arco is still running. The stop was canceled or did not finish, which happens when Arco is started or restarted during an update. Try the update again and do not start or restart Arco until it finishes`);
219
+ if ((state.active === 'inactive' || state.active === 'failed') && !state.job) {
220
+ if (before?.active === 'inactive' || before?.active === 'failed') return new Error(`${cause}. Arco was not running before the update and was left stopped`);
221
+ if (before?.active !== 'active') return new Error(`${cause}. Arco is stopped, and whether it ran before the update could not be confirmed, so it was not started. Run arco service status, and arco service start if Arco should be running`);
222
+ try { await service('start'); }
223
+ catch { return new Error(`${cause}. Arco is stopped and could not be started. Run arco service start`); }
224
+ return new Error(`${cause}. Arco was started again on the installed version. Try the update again`);
225
+ }
226
+ return new Error(`${cause}. The service is still ${state.active}${state.job ? ` with a pending ${state.job} job` : ''}, so it was not started or stopped again. Run arco service status, and arco service start if Arco stays stopped`);
227
+ }
228
+
194
229
  export async function waitForRecordedPid(pid, deps = {}) {
195
230
  const now = deps.now ?? (() => performance.now());
196
231
  const sleep = deps.sleep ?? ((ms) => new Promise((done) => setTimeout(done, ms)));
@@ -2,6 +2,12 @@ import type { AttentionKind, NotificationChannels, NotificationChannelsView, Ser
2
2
  export declare const MIN_FINISHED_TURN_MS = 15000;
3
3
  export declare function _setChannelsPathForTest(p: string): void;
4
4
  export declare function _setFetchForTest(f: typeof fetch): void;
5
+ /**
6
+ * A question or gate Arco announced before a restart and shows again now. It is
7
+ * marked seen so the restored card does not raise a second desktop or phone
8
+ * alert (the BELL entry and the phone message went out the first time).
9
+ */
10
+ export declare function acknowledgeSighting(id: string): void;
5
11
  export declare function loadChannels(): Promise<NotificationChannels>;
6
12
  export declare function getChannels(): NotificationChannels;
7
13
  export declare function saveChannels(value: unknown): Promise<NotificationChannels>;
@@ -37,6 +37,12 @@ function firstSighting(id) {
37
37
  seenRequests.add(id);
38
38
  return true;
39
39
  }
40
+ /**
41
+ * A question or gate Arco announced before a restart and shows again now. It is
42
+ * marked seen so the restored card does not raise a second desktop or phone
43
+ * alert (the BELL entry and the phone message went out the first time).
44
+ */
45
+ export function acknowledgeSighting(id) { firstSighting(id); }
40
46
  export async function loadChannels() {
41
47
  try {
42
48
  const parsed = JSON.parse(await readFile(channelsPath, 'utf-8'));
@@ -2,8 +2,10 @@ import type { LoginSessionTarget, AuthLoginTarget, AuthLoginResult, ClaudeCliAut
2
2
  export interface AuthStatus {
3
3
  loggedIn: boolean;
4
4
  native?: ClaudeNativeAuthStatus;
5
+ nativeAccounts?: Record<string, ClaudeNativeAuthStatus>;
5
6
  cli?: ClaudeCliAuthStatus;
6
7
  probeFailed?: boolean;
8
+ githubState?: 'missing' | 'signed-out' | 'probe-failed';
7
9
  email?: string;
8
10
  subscriptionType?: string;
9
11
  orgName?: string;
@@ -44,6 +46,9 @@ export interface AuthStatusByProvider {
44
46
  'antigravity-cli'?: AuthStatus;
45
47
  }
46
48
  export declare function getClaudeAuthStatus(): Promise<AuthStatus>;
49
+ export declare function githubStatusFromProbe(stdout: string, stderr: string, failure?: {
50
+ code?: unknown;
51
+ }): AuthStatus;
47
52
  export declare function getAuthStatus(): Promise<AuthStatusByProvider>;
48
53
  export declare function getConnectionStatus(provider: AuthLoginTarget): Promise<AuthStatus>;
49
54
  export declare function triggerAuthLogin(provider?: LoginSessionTarget, accountRef?: string): Promise<AuthLoginResult>;
@@ -1,3 +1,4 @@
1
+ import { readSettings } from './settings.js';
1
2
  import { antigravityStatus } from './providers/antigravity/status.js';
2
3
  import { authLoginInstructions } from './authLoginInstructions.js';
3
4
  import { execFile } from 'child_process';
@@ -59,10 +60,15 @@ async function probeClaudeAuthStatus() {
59
60
  }
60
61
  }
61
62
  export async function getClaudeAuthStatus() {
62
- const [status, native] = await Promise.all([
63
+ const [status, native, settings] = await Promise.all([
63
64
  probeClaudeAuthStatus().then(async (result) => result ?? await probeClaudeAuthStatus()),
64
65
  getClaudeNativeAuthStatus(),
66
+ readSettings(),
65
67
  ]);
68
+ const legacyIds = new Set(settings.providerAccounts?.claude?.map(profile => profile.id));
69
+ const nativeAccounts = Object.fromEntries(await Promise.all((settings.providerAccounts?.claudeNative ?? [])
70
+ .filter(profile => !legacyIds.has(profile.id))
71
+ .map(async (profile) => [profile.id, await getClaudeNativeAuthStatus(profile.id)])));
66
72
  const binding = await getCliUsageBinding();
67
73
  const cli = status
68
74
  ? { ...status, binding, checkedAt: Date.now() }
@@ -71,40 +77,45 @@ export async function getClaudeAuthStatus() {
71
77
  cli.bindingCheckedAt = Date.now();
72
78
  if (status)
73
79
  lastClaudeStatus = cli;
74
- const nativeAvailable = native.credentialsPresent && native.state !== 'needs-attention';
80
+ const nativeAvailable = [native, ...Object.values(nativeAccounts)].some(account => account.credentialsPresent && account.state !== 'needs-attention');
75
81
  const probeFailed = (cli.probeFailed && !nativeAvailable) || (native.probeFailed && !cli.loggedIn);
76
82
  return {
77
- native, cli,
83
+ native, cli, ...(Object.keys(nativeAccounts).length ? { nativeAccounts } : {}),
78
84
  email: cli.email, subscriptionType: cli.subscriptionType, orgName: cli.orgName, apiProvider: cli.apiProvider,
79
85
  loggedIn: cli.loggedIn || nativeAvailable,
80
86
  probeFailed: probeFailed || undefined,
81
87
  error: nativeAvailable ? undefined : cli.error ?? native.error,
82
88
  };
83
89
  }
84
- // `gh auth status` exits non-zero when not logged in and prints to stderr.
85
- // We shell out, then parse the active account / scopes. The `--active` flag
86
- // restricts to the currently-active host/account so multi-host users don't
87
- // produce ambiguous status.
90
+ // Human-readable gh status has appeared on either stream in supported versions.
91
+ // Never turn an unrecognized error or output into a signed-out verdict.
92
+ export function githubStatusFromProbe(stdout, stderr, failure) {
93
+ if (failure?.code === 'ENOENT')
94
+ return { loggedIn: false, githubState: 'missing', error: 'GitHub CLI was not found. Install gh in the Arco server environment, then check again.' };
95
+ const output = `${stdout}\n${stderr}`;
96
+ if (!failure) {
97
+ const account = output.match(/Logged in to \S+ (?:account|as) (\S+)/)?.[1];
98
+ if (account) {
99
+ const scopes = output.match(/Token scopes: (.+)/)?.[1];
100
+ return { loggedIn: true, email: account, apiProvider: 'github-cli', subscriptionType: scopes ? `gh (${scopes.replace(/'/g, '')})` : 'gh' };
101
+ }
102
+ }
103
+ if (/You are not logged into any (?:GitHub hosts|accounts)/i.test(output) || /Failed to log in to \S+ (?:account|using token)/i.test(output) && /token .* invalid/i.test(output)) {
104
+ return { loggedIn: false, githubState: 'signed-out', error: 'GitHub CLI is not signed in. Sign in, then check again.' };
105
+ }
106
+ return { loggedIn: false, githubState: 'probe-failed', probeFailed: true, error: 'GitHub CLI status could not be checked. Run gh auth status in the Arco server environment, then check again.' };
107
+ }
88
108
  async function getGithubAuthStatus() {
89
109
  try {
90
- const { stdout } = await execFileAsync('gh', ['auth', 'status', '--active'], {
110
+ const { stdout, stderr } = await execFileAsync('gh', ['auth', 'status', '--active'], {
91
111
  maxBuffer: 256 * 1024,
92
112
  timeout: 10_000,
93
113
  });
94
- const account = stdout.match(/Logged in to \S+ account (\S+)/)?.[1];
95
- const scopes = stdout.match(/Token scopes: (.+)/)?.[1];
96
- return {
97
- loggedIn: Boolean(account),
98
- email: account,
99
- apiProvider: 'github-cli',
100
- subscriptionType: scopes ? `gh (${scopes.replace(/'/g, '')})` : 'gh',
101
- };
114
+ return githubStatusFromProbe(stdout, stderr);
102
115
  }
103
116
  catch (err) {
104
- return {
105
- loggedIn: false,
106
- error: err instanceof Error && 'stderr' in err ? String(err.stderr).slice(0, 200) : 'gh auth status failed',
107
- };
117
+ const failure = err;
118
+ return githubStatusFromProbe(failure.stdout ?? '', failure.stderr ?? '', failure);
108
119
  }
109
120
  }
110
121
  // Ollama is auth-less — there's no login flow. The "loggedIn" semantics here
@@ -4,6 +4,10 @@ export declare const GEMINI_MAIL_SKIP = "Mail from a Gemini member waits for you
4
4
  export declare const AUTO_TURN_COOLDOWN_MS: number;
5
5
  export declare const AUTO_TURN_RATE_CAP_PER_MINUTE: number;
6
6
  export declare const AUTO_TURN_MAX_CHAIN_DEPTH: number;
7
+ export declare const MEMBER_BLOCKED_NOTICE = "Its conversation is too large for the provider. Hand off or replace this member, then NUDGE it; its mail is kept.";
8
+ export declare function isOversizeError(error: string): boolean;
9
+ export declare function noteTurnOutcome(workflowId: string, error?: string | null): void;
10
+ export declare function isMemberBlocked(workflowId: string): boolean;
7
11
  export declare function resumeRulePickup(clusterId: string): void;
8
12
  export declare function resetRulePickup(clusterId: string): void;
9
13
  export declare function interruptRulePickup(clusterId: string, member?: string): void;
@@ -56,7 +60,7 @@ export declare function debugRulePickup(opts: {
56
60
  incomingChainDepth: number;
57
61
  }): void;
58
62
  export declare function smartChainDepthLimit(configured: number): number;
59
- export declare function sharedGuardProblem(clusterId: string, recipientWfid: string, incomingChainDepth: number, now?: number, depthLimit?: number): 'depth_capped' | 'cooldown' | 'rate_capped' | null;
63
+ export declare function sharedGuardProblem(clusterId: string, recipientWfid: string, incomingChainDepth: number, now?: number, depthLimit?: number): 'depth_capped' | 'cooldown' | 'rate_capped' | 'member_blocked' | null;
60
64
  export declare function stampSharedGuards(clusterId: string, recipientWfid: string, incomingChainDepth: number, now?: number): void;
61
65
  export declare function _peekState(): {
62
66
  clusters: Array<{
@@ -43,7 +43,7 @@ import { join } from 'node:path';
43
43
  // outbound peer_message_sent.
44
44
  import * as clusterStore from './clusterStore.js';
45
45
  import * as clusterMailbox from './clusterMailbox.js';
46
- import { isGeminiMember } from './geminiMembers.js';
46
+ import { geminiPickupAllowed, isGeminiMember } from './geminiMembers.js';
47
47
  export const GEMINI_AUTO_PICKUP_SKIP = 'Skipped a Gemini member: its mail waits for your NUDGE.';
48
48
  export const GEMINI_MAIL_SKIP = 'Mail from a Gemini member waits for your NUDGE.';
49
49
  // Per-recipient cooldown — once an auto-turn fires for R, the next auto-turn
@@ -101,6 +101,23 @@ catch (error) {
101
101
  throw error;
102
102
  } }, (cluster, content) => { atomicWriteFileSync(join(clusterStore.clusterDir(cluster), 'rule-pickup-ledger.json'), content, { mode: 0o600 }); });
103
103
  const pendingChecks = new Set();
104
+ // Members whose last turn ended in a terminal request_too_large. Automatic
105
+ // pickup stops waking them (their mail stays unread) until a turn succeeds or
106
+ // the member is dropped; a wake only adds to a history that is already too big.
107
+ const tooLargeMembers = new Set();
108
+ export const MEMBER_BLOCKED_NOTICE = 'Its conversation is too large for the provider. Hand off or replace this member, then NUDGE it; its mail is kept.';
109
+ // Provider rejections that repeat for as long as the stored conversation stays
110
+ // the same size: Anthropic's request_too_large (413), its total-text-bytes
111
+ // limit (400 invalid_request_error), and context-window overflows.
112
+ const OVERSIZE_ERROR = /request_too_large|too many total text bytes|prompt is too long|context[ _]length|exceeds? the (?:maximum )?context/i;
113
+ export function isOversizeError(error) { return OVERSIZE_ERROR.test(error); }
114
+ export function noteTurnOutcome(workflowId, error) {
115
+ if (error && isOversizeError(error))
116
+ tooLargeMembers.add(workflowId);
117
+ else if (!error)
118
+ tooLargeMembers.delete(workflowId);
119
+ }
120
+ export function isMemberBlocked(workflowId) { return tooLargeMembers.has(workflowId); }
104
121
  export function resumeRulePickup(clusterId) { ruleGuard.resume(clusterId); }
105
122
  export function resetRulePickup(clusterId) { ruleGuard.reset(clusterId); }
106
123
  export function interruptRulePickup(clusterId, member) { if (clusterStore.isAutoTurnOnMailboxEnabled(clusterId)) {
@@ -204,7 +221,7 @@ export async function pickupWaitingMail(clusterId, liveMembers = resolveMembersF
204
221
  return;
205
222
  for (const m of liveMembers) {
206
223
  if (m.busy) {
207
- if (dispatchBusyReminderFn)
224
+ if (!isGeminiMember(m.workflowId) && dispatchBusyReminderFn)
208
225
  await remindBusyMember(clusterId, m.workflowId, { isBusy: isBusyFn, hasClusterTools: hasClusterToolsFn, dispatch: dispatchBusyReminderFn });
209
226
  continue;
210
227
  }
@@ -265,6 +282,7 @@ export function clearAutoTurnDepth(workflowId) {
265
282
  export function dropMember(workflowId) {
266
283
  memberState.delete(workflowId);
267
284
  pendingDepth.delete(workflowId);
285
+ tooLargeMembers.delete(workflowId);
268
286
  }
269
287
  // Chain depth the resume sweeps use for a member's pending mail.
270
288
  export function pendingChainDepth(workflowId) {
@@ -326,17 +344,15 @@ function emitSkip(clusterId, recipientWfid, senderWfid, chainDepth, reason, now,
326
344
  // `currentAutoTurnDepth(senderWfid)`). The detector treats undefined as 0
327
345
  // per the operator-initiated default.
328
346
  export function onPeerMessageSent(opts) {
329
- // docs/PROTOCOL_CLUSTER.md "Gemini members": mail to or from a Gemini
330
- // member waits for the operator's NUDGE on the recipient; no automatic
331
- // wake or busy reminder.
332
347
  const geminiRecipient = isGeminiMember(opts.recipientWfid);
333
- if (geminiRecipient || isGeminiMember(opts.senderWfid)) {
348
+ const recipientHeld = geminiRecipient && !geminiPickupAllowed(opts.recipientWfid);
349
+ if (recipientHeld || isGeminiMember(opts.senderWfid)) {
334
350
  if (clusterStore.isAutoTurnOnMailboxEnabled(opts.clusterId) && !clusterStore.isAutoPickupPaused(opts.clusterId)) {
335
- emitSkip(opts.clusterId, opts.recipientWfid, opts.senderWfid, opts.incomingChainDepth, geminiRecipient ? 'operator_send_only' : 'gemini_mail', Date.now(), geminiRecipient ? GEMINI_AUTO_PICKUP_SKIP : GEMINI_MAIL_SKIP);
351
+ emitSkip(opts.clusterId, opts.recipientWfid, opts.senderWfid, opts.incomingChainDepth, recipientHeld ? 'operator_send_only' : 'gemini_mail', Date.now(), recipientHeld ? GEMINI_AUTO_PICKUP_SKIP : GEMINI_MAIL_SKIP);
336
352
  }
337
353
  return;
338
354
  }
339
- if (isBusyFn && dispatchBusyReminderFn)
355
+ if (!geminiRecipient && isBusyFn && dispatchBusyReminderFn)
340
356
  void remindBusyMember(opts.clusterId, opts.recipientWfid, { isBusy: isBusyFn, hasClusterTools: hasClusterToolsFn, dispatch: dispatchBusyReminderFn });
341
357
  if (!clusterStore.isAutoTurnOnMailboxEnabled(opts.clusterId))
342
358
  return;
@@ -372,10 +388,14 @@ function fireRulePickup(opts) {
372
388
  return;
373
389
  const { clusterId, senderWfid, recipientWfid, incomingChainDepth } = opts;
374
390
  const now = Date.now();
375
- if (isGeminiMember(recipientWfid)) {
391
+ if (isGeminiMember(recipientWfid) && !geminiPickupAllowed(recipientWfid)) {
376
392
  emitSkip(clusterId, recipientWfid, senderWfid, incomingChainDepth, 'operator_send_only', now, GEMINI_AUTO_PICKUP_SKIP);
377
393
  return;
378
394
  }
395
+ if (isMemberBlocked(recipientWfid)) {
396
+ emitSkip(clusterId, recipientWfid, senderWfid, incomingChainDepth, 'member_blocked', now, MEMBER_BLOCKED_NOTICE);
397
+ return;
398
+ }
379
399
  // Guard 0: cluster toggle armed. Most clusters won't have this on; the
380
400
  // gate is the first check so the hot path is one map lookup when off.
381
401
  if (!clusterStore.isAutoTurnOnMailboxEnabled(clusterId) || clusterStore.isAutoPickupPaused(clusterId))
@@ -476,6 +496,8 @@ export function smartChainDepthLimit(configured) {
476
496
  return process.env.ARCO_CLUSTER_AUTO_TURN_MAX_CHAIN_DEPTH ? AUTO_TURN_MAX_CHAIN_DEPTH : configured;
477
497
  }
478
498
  export function sharedGuardProblem(clusterId, recipientWfid, incomingChainDepth, now = Date.now(), depthLimit = AUTO_TURN_MAX_CHAIN_DEPTH) {
499
+ if (isMemberBlocked(recipientWfid))
500
+ return 'member_blocked';
479
501
  if (incomingChainDepth >= depthLimit)
480
502
  return 'depth_capped';
481
503
  const ms = getMemberState(recipientWfid);