@opengeni/react 4.0.2 → 4.0.5-canary.39120434730001

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 (916) hide show
  1. package/README.md +787 -26
  2. package/dist/accounts.js +2 -0
  3. package/dist/accounts.js.map +1 -1
  4. package/dist/approvals.d.ts +2 -1
  5. package/dist/artifacts-document.js +6 -3
  6. package/dist/artifacts-presentation.js +6 -3
  7. package/dist/artifacts-spreadsheet.d.ts +1 -1
  8. package/dist/artifacts-spreadsheet.js +6 -3
  9. package/dist/artifacts.d.ts +5 -1
  10. package/dist/artifacts.js +542 -278
  11. package/dist/artifacts.js.map +1 -1
  12. package/dist/browser-viewer-GEHX3KYE.js +20 -0
  13. package/dist/capability-catalog-row.d.ts +20 -0
  14. package/dist/capability-logo-fallback.d.ts +3 -0
  15. package/dist/chat-interactive-block-5V3BGLXT.js +15 -0
  16. package/dist/chunk-2DDJ6YH6.js +41 -0
  17. package/dist/chunk-2DDJ6YH6.js.map +1 -0
  18. package/dist/chunk-2EGXXUG4.js +1161 -0
  19. package/dist/chunk-2EGXXUG4.js.map +1 -0
  20. package/dist/chunk-2XKRY4GF.js +302 -0
  21. package/dist/chunk-2XKRY4GF.js.map +1 -0
  22. package/dist/chunk-2ZUUIMBY.js +343 -0
  23. package/dist/chunk-2ZUUIMBY.js.map +1 -0
  24. package/dist/chunk-4F4FGCH2.js +34 -0
  25. package/dist/chunk-4F4FGCH2.js.map +1 -0
  26. package/dist/{chunk-Z7WBDB4E.js → chunk-4M2MJLY3.js} +848 -867
  27. package/dist/chunk-4M2MJLY3.js.map +1 -0
  28. package/dist/chunk-4U7SHFQ2.js +193 -0
  29. package/dist/chunk-4U7SHFQ2.js.map +1 -0
  30. package/dist/chunk-5I4VRWBB.js +56 -0
  31. package/dist/chunk-5I4VRWBB.js.map +1 -0
  32. package/dist/{chunk-24M4YBCL.js → chunk-62XZ3IX3.js} +1751 -845
  33. package/dist/chunk-62XZ3IX3.js.map +1 -0
  34. package/dist/chunk-77THWHSU.js +308 -0
  35. package/dist/chunk-77THWHSU.js.map +1 -0
  36. package/dist/chunk-7CZLTFXF.js +466 -0
  37. package/dist/chunk-7CZLTFXF.js.map +1 -0
  38. package/dist/chunk-7N5AD2TC.js +327 -0
  39. package/dist/chunk-7N5AD2TC.js.map +1 -0
  40. package/dist/chunk-7SZ7MMCY.js +325 -0
  41. package/dist/chunk-7SZ7MMCY.js.map +1 -0
  42. package/dist/chunk-7TG6KTR2.js +3153 -0
  43. package/dist/chunk-7TG6KTR2.js.map +1 -0
  44. package/dist/chunk-AIX25FIQ.js +409 -0
  45. package/dist/chunk-AIX25FIQ.js.map +1 -0
  46. package/dist/chunk-AT2HD6RQ.js +1936 -0
  47. package/dist/chunk-AT2HD6RQ.js.map +1 -0
  48. package/dist/chunk-B27E3V37.js +29 -0
  49. package/dist/chunk-B27E3V37.js.map +1 -0
  50. package/dist/{chunk-5M6VTFJ5.js → chunk-B4EDAXMC.js} +37 -13
  51. package/dist/chunk-B4EDAXMC.js.map +1 -0
  52. package/dist/chunk-BOG2FED3.js +35 -0
  53. package/dist/chunk-BOG2FED3.js.map +1 -0
  54. package/dist/chunk-BQYQU5QW.js +109 -0
  55. package/dist/chunk-BQYQU5QW.js.map +1 -0
  56. package/dist/{chunk-PAJU5KKL.js → chunk-BRIOXCLH.js} +68 -25
  57. package/dist/chunk-BRIOXCLH.js.map +1 -0
  58. package/dist/chunk-CM7LVUKC.js +35 -0
  59. package/dist/chunk-CM7LVUKC.js.map +1 -0
  60. package/dist/{chunk-KCGXPP5V.js → chunk-CXIGFHVL.js} +35 -23
  61. package/dist/chunk-CXIGFHVL.js.map +1 -0
  62. package/dist/chunk-DHXKEJBH.js +71 -0
  63. package/dist/chunk-DHXKEJBH.js.map +1 -0
  64. package/dist/{chunk-NOSYBS2D.js → chunk-DN3TKURW.js} +12 -9
  65. package/dist/chunk-DN3TKURW.js.map +1 -0
  66. package/dist/chunk-DNJ23AWQ.js +35 -0
  67. package/dist/chunk-DNJ23AWQ.js.map +1 -0
  68. package/dist/chunk-ESAMXNBZ.js +3237 -0
  69. package/dist/chunk-ESAMXNBZ.js.map +1 -0
  70. package/dist/{chunk-4MDLEHXL.js → chunk-EWATYP5L.js} +64 -44
  71. package/dist/chunk-EWATYP5L.js.map +1 -0
  72. package/dist/{chunk-YBM6CQRU.js → chunk-FQ5CXNUG.js} +65 -42
  73. package/dist/chunk-FQ5CXNUG.js.map +1 -0
  74. package/dist/chunk-FVROZ7HR.js +14396 -0
  75. package/dist/chunk-FVROZ7HR.js.map +1 -0
  76. package/dist/chunk-HEVQKE27.js +150 -0
  77. package/dist/chunk-HEVQKE27.js.map +1 -0
  78. package/dist/chunk-HZ47S3DP.js +1086 -0
  79. package/dist/chunk-HZ47S3DP.js.map +1 -0
  80. package/dist/chunk-I5BJ7ENY.js +174 -0
  81. package/dist/chunk-I5BJ7ENY.js.map +1 -0
  82. package/dist/chunk-IGFZFLI2.js +1390 -0
  83. package/dist/chunk-IGFZFLI2.js.map +1 -0
  84. package/dist/chunk-IGVL3ELX.js +46 -0
  85. package/dist/chunk-IGVL3ELX.js.map +1 -0
  86. package/dist/chunk-IOD24LGR.js +384 -0
  87. package/dist/chunk-IOD24LGR.js.map +1 -0
  88. package/dist/chunk-IOYHDEP3.js +38 -0
  89. package/dist/chunk-IOYHDEP3.js.map +1 -0
  90. package/dist/chunk-IQL77TMM.js +803 -0
  91. package/dist/chunk-IQL77TMM.js.map +1 -0
  92. package/dist/chunk-IZV5FTJC.js +55 -0
  93. package/dist/chunk-IZV5FTJC.js.map +1 -0
  94. package/dist/{chunk-H5YGYNXS.js → chunk-JAYYFOOB.js} +75 -28
  95. package/dist/chunk-JAYYFOOB.js.map +1 -0
  96. package/dist/chunk-KN2MYSCC.js +409 -0
  97. package/dist/chunk-KN2MYSCC.js.map +1 -0
  98. package/dist/{chunk-PEI6RANI.js → chunk-KYVJMTXL.js} +434 -145
  99. package/dist/chunk-KYVJMTXL.js.map +1 -0
  100. package/dist/{chunk-ZYRGEKWS.js → chunk-LJUMYUBO.js} +3 -1
  101. package/dist/{chunk-ZYRGEKWS.js.map → chunk-LJUMYUBO.js.map} +1 -1
  102. package/dist/{chunk-ICA6R6TW.js → chunk-LNUD3JNI.js} +1532 -395
  103. package/dist/chunk-LNUD3JNI.js.map +1 -0
  104. package/dist/chunk-M357MHH3.js +2 -0
  105. package/dist/{chunk-BV5A4OTE.js → chunk-MEL6PH2I.js} +1218 -537
  106. package/dist/chunk-MEL6PH2I.js.map +1 -0
  107. package/dist/chunk-MF6WS2XF.js +386 -0
  108. package/dist/chunk-MF6WS2XF.js.map +1 -0
  109. package/dist/chunk-MK2TQO4Y.js +24 -0
  110. package/dist/chunk-MK2TQO4Y.js.map +1 -0
  111. package/dist/chunk-N7S72EXK.js +25 -0
  112. package/dist/chunk-N7S72EXK.js.map +1 -0
  113. package/dist/{chunk-KZ73RL76.js → chunk-NAWXARTY.js} +58 -9
  114. package/dist/chunk-NAWXARTY.js.map +1 -0
  115. package/dist/chunk-NX4ADH73.js +14 -0
  116. package/dist/chunk-NX4ADH73.js.map +1 -0
  117. package/dist/chunk-OYQQJL3J.js +16 -0
  118. package/dist/chunk-OYQQJL3J.js.map +1 -0
  119. package/dist/chunk-P4MKPCTC.js +51 -0
  120. package/dist/chunk-P4MKPCTC.js.map +1 -0
  121. package/dist/{chunk-JVYQRRC4.js → chunk-PEHTX3V7.js} +21 -1
  122. package/dist/chunk-PEHTX3V7.js.map +1 -0
  123. package/dist/chunk-PMV53IMM.js +26 -0
  124. package/dist/chunk-PMV53IMM.js.map +1 -0
  125. package/dist/{chunk-HUIKIDM5.js → chunk-QOEWDOFW.js} +295 -156
  126. package/dist/chunk-QOEWDOFW.js.map +1 -0
  127. package/dist/chunk-QV3DJVRZ.js +11 -0
  128. package/dist/chunk-QV3DJVRZ.js.map +1 -0
  129. package/dist/{chunk-HUMIRRYI.js → chunk-QYUYVSNG.js} +1103 -1699
  130. package/dist/chunk-QYUYVSNG.js.map +1 -0
  131. package/dist/{chunk-6J56T3MG.js → chunk-RRAQ5FV5.js} +186 -60
  132. package/dist/chunk-RRAQ5FV5.js.map +1 -0
  133. package/dist/{chunk-5YK2ZDIG.js → chunk-TNEZNMSN.js} +4 -10
  134. package/dist/chunk-TNEZNMSN.js.map +1 -0
  135. package/dist/{chunk-22KP6LR5.js → chunk-TXS65BB2.js} +3 -1
  136. package/dist/{chunk-22KP6LR5.js.map → chunk-TXS65BB2.js.map} +1 -1
  137. package/dist/chunk-UIWIOB4U.js +2215 -0
  138. package/dist/chunk-UIWIOB4U.js.map +1 -0
  139. package/dist/chunk-UNJPZGNK.js +63 -0
  140. package/dist/chunk-UNJPZGNK.js.map +1 -0
  141. package/dist/chunk-V7UGCQHQ.js +86 -0
  142. package/dist/chunk-V7UGCQHQ.js.map +1 -0
  143. package/dist/chunk-VU4QUISJ.js +3405 -0
  144. package/dist/chunk-VU4QUISJ.js.map +1 -0
  145. package/dist/chunk-WEY5J52U.js +467 -0
  146. package/dist/chunk-WEY5J52U.js.map +1 -0
  147. package/dist/chunk-WH2CBESG.js +409 -0
  148. package/dist/chunk-WH2CBESG.js.map +1 -0
  149. package/dist/{chunk-VZTQ73XT.js → chunk-XEA5BCMA.js} +3 -1
  150. package/dist/{chunk-VZTQ73XT.js.map → chunk-XEA5BCMA.js.map} +1 -1
  151. package/dist/{chunk-NLTS7JHI.js → chunk-XEIHS3RN.js} +834 -403
  152. package/dist/chunk-XEIHS3RN.js.map +1 -0
  153. package/dist/chunk-YNXZRE3F.js +408 -0
  154. package/dist/chunk-YNXZRE3F.js.map +1 -0
  155. package/dist/chunk-YSRBFJMQ.js +43 -0
  156. package/dist/chunk-YSRBFJMQ.js.map +1 -0
  157. package/dist/{chunk-NEXLLTP4.js → chunk-ZGFU4LVW.js} +6 -5
  158. package/dist/chunk-ZGFU4LVW.js.map +1 -0
  159. package/dist/chunk-ZO35BAMO.js +172 -0
  160. package/dist/chunk-ZO35BAMO.js.map +1 -0
  161. package/dist/chunk-ZUWF4NF7.js +13 -0
  162. package/dist/chunk-ZUWF4NF7.js.map +1 -0
  163. package/dist/client.d.ts +15 -6
  164. package/dist/clipboard.js +3 -1
  165. package/dist/commands/registry.d.ts +2 -1
  166. package/dist/commands/types.d.ts +2 -0
  167. package/dist/components/anthropic-mark.d.ts +3 -0
  168. package/dist/components/approval-surface.d.ts +21 -7
  169. package/dist/components/artifacts/artifact-chrome.d.ts +121 -0
  170. package/dist/components/artifacts/artifact-sandbox.d.ts +30 -0
  171. package/dist/components/artifacts/artifact-surface.d.ts +4 -2
  172. package/dist/components/artifacts/chat-interactive-block.d.ts +29 -0
  173. package/dist/components/artifacts/deferred-chat-media.d.ts +15 -0
  174. package/dist/components/artifacts/document-editor.d.ts +4 -2
  175. package/dist/components/artifacts/editable-artifact-ui.d.ts +4 -2
  176. package/dist/components/artifacts/editable-artifact-view.d.ts +48 -0
  177. package/dist/components/artifacts/editable-document.d.ts +3 -2
  178. package/dist/components/artifacts/editable-presentation.d.ts +4 -3
  179. package/dist/components/artifacts/editable-spreadsheet.d.ts +8 -3
  180. package/dist/components/artifacts/index.d.ts +8 -1
  181. package/dist/components/artifacts/inline-html-document.d.ts +2 -0
  182. package/dist/components/artifacts/latest-task-runner.d.ts +15 -0
  183. package/dist/components/artifacts/presentation-editor.d.ts +6 -2
  184. package/dist/components/artifacts/published-html-artifact-frame.d.ts +17 -40
  185. package/dist/components/artifacts/session-artifact-viewer.d.ts +39 -0
  186. package/dist/components/artifacts/site-view.d.ts +26 -0
  187. package/dist/components/artifacts/spreadsheet-command-queue.d.ts +20 -0
  188. package/dist/components/artifacts/spreadsheet-download.d.ts +7 -0
  189. package/dist/components/artifacts/spreadsheet-general-display.d.ts +24 -0
  190. package/dist/components/artifacts/spreadsheet-grid.d.ts +11 -4
  191. package/dist/components/artifacts/spreadsheet-resize.d.ts +50 -0
  192. package/dist/components/artifacts/spreadsheet-submissions.d.ts +9 -0
  193. package/dist/components/artifacts/visualization-assets.gen.d.ts +2 -0
  194. package/dist/components/browser-select-control.d.ts +16 -0
  195. package/dist/components/browser-viewer.d.ts +11 -2
  196. package/dist/components/chat-composer.d.ts +21 -3
  197. package/dist/components/child-session-link.d.ts +5 -1
  198. package/dist/components/claude-mark.d.ts +3 -0
  199. package/dist/components/code-editor.d.ts +1 -4
  200. package/dist/components/command-palette.d.ts +1 -1
  201. package/dist/components/composer-transcription-control.d.ts +7 -0
  202. package/dist/components/composer.d.ts +30 -67
  203. package/dist/components/computer-viewer.d.ts +1 -1
  204. package/dist/components/copy-button.d.ts +3 -1
  205. package/dist/components/desktop-viewer.d.ts +1 -1
  206. package/dist/components/generated-video-player.d.ts +1 -1
  207. package/dist/components/grok-mark.d.ts +26 -0
  208. package/dist/components/human-input-form.d.ts +26 -32
  209. package/dist/components/human-input-surface.d.ts +5 -1
  210. package/dist/components/linkified-text.d.ts +18 -0
  211. package/dist/components/machine-input-display.d.ts +25 -3
  212. package/dist/components/machine-status-pill.d.ts +3 -2
  213. package/dist/components/machines/agent-status-icon.d.ts +6 -0
  214. package/dist/components/machines/health.d.ts +2 -1
  215. package/dist/components/machines/machine-detail.d.ts +7 -1
  216. package/dist/components/machines/machine-status.d.ts +49 -0
  217. package/dist/components/machines/metric-history-chart.d.ts +1 -1
  218. package/dist/components/machines/series.d.ts +3 -2
  219. package/dist/components/markdown-table-layout.d.ts +11 -2
  220. package/dist/components/markdown.d.ts +37 -4
  221. package/dist/components/message-timeline.d.ts +79 -7
  222. package/dist/components/model-mark.d.ts +29 -0
  223. package/dist/components/model-picker.d.ts +1 -1
  224. package/dist/components/model-policy-picker.d.ts +31 -22
  225. package/dist/components/new-conversation.d.ts +32 -0
  226. package/dist/components/open-geni-chat.d.ts +73 -0
  227. package/dist/components/open-geni-links.d.ts +69 -0
  228. package/dist/components/openrouter-mark.d.ts +6 -0
  229. package/dist/components/opper-mark.d.ts +7 -0
  230. package/dist/components/preview-loading.d.ts +2 -0
  231. package/dist/components/provider-recovery-notice.d.ts +17 -0
  232. package/dist/components/queue-item-content.d.ts +10 -0
  233. package/dist/components/rehype-secret-refs.d.ts +23 -0
  234. package/dist/components/remark-soft-line-breaks.d.ts +38 -0
  235. package/dist/components/sandbox-workspace.d.ts +18 -0
  236. package/dist/components/secret-question-field.d.ts +31 -0
  237. package/dist/components/secret-ref-chip.d.ts +35 -0
  238. package/dist/components/session-capability-frame.d.ts +37 -0
  239. package/dist/components/session-chrome.d.ts +20 -7
  240. package/dist/components/session-commands.d.ts +6 -0
  241. package/dist/components/session-connection-request.d.ts +8 -0
  242. package/dist/components/session-conversation.d.ts +147 -6
  243. package/dist/components/session-list.d.ts +39 -0
  244. package/dist/components/session-mcp-capability-card.d.ts +41 -0
  245. package/dist/components/session-proxy-scope.d.ts +35 -0
  246. package/dist/components/session-status.d.ts +6 -2
  247. package/dist/components/session-usage-limit-notice.d.ts +39 -0
  248. package/dist/components/this-computer/illustrations.d.ts +38 -0
  249. package/dist/components/this-computer/labels.d.ts +111 -0
  250. package/dist/components/this-computer/this-computer-card.d.ts +40 -0
  251. package/dist/components/this-computer/this-computer-setup.d.ts +35 -0
  252. package/dist/components/this-computer/this-computer-status.d.ts +42 -0
  253. package/dist/components/this-computer/use-this-computer.d.ts +29 -0
  254. package/dist/components/timeline-anchor.d.ts +3 -0
  255. package/dist/components/timeline-annotation-shared.d.ts +3 -2
  256. package/dist/components/timeline-annotations-dialog.d.ts +2 -1
  257. package/dist/components/timeline-annotations.d.ts +5 -1
  258. package/dist/components/timeline-reading-progress.d.ts +11 -0
  259. package/dist/components/timeline-search.d.ts +34 -0
  260. package/dist/components/timeline-settlement.d.ts +16 -0
  261. package/dist/components/tool-action-review.d.ts +48 -0
  262. package/dist/components/tool-review-history.d.ts +25 -0
  263. package/dist/components/usage-limit-notice.d.ts +50 -0
  264. package/dist/components/usage-member-list.d.ts +92 -0
  265. package/dist/components/usage-meter.d.ts +74 -0
  266. package/dist/components/use-viewer-menu-dismiss.d.ts +2 -0
  267. package/dist/components/user-message-body.d.ts +10 -1
  268. package/dist/components/workbench-changes.d.ts +2 -1
  269. package/dist/composer-messages.d.ts +75 -0
  270. package/dist/composer-messages.js +9 -0
  271. package/dist/composer-messages.js.map +1 -0
  272. package/dist/composer-voice-events.d.ts +8 -0
  273. package/dist/composer.d.ts +3 -3
  274. package/dist/composer.js +25 -12
  275. package/dist/computer-viewer-VOIOZGVZ.js +21 -0
  276. package/dist/computer-viewer-VOIOZGVZ.js.map +1 -0
  277. package/dist/connect-account-identity.d.ts +8 -0
  278. package/dist/connect-accounts.d.ts +15 -0
  279. package/dist/connect-chooser.d.ts +18 -0
  280. package/dist/connect-panel.d.ts +18 -0
  281. package/dist/connect-setup.d.ts +18 -0
  282. package/dist/connect.d.ts +21 -0
  283. package/dist/connect.js +2216 -0
  284. package/dist/connect.js.map +1 -0
  285. package/dist/connection-catalog.d.ts +38 -0
  286. package/dist/connection-discovery.d.ts +12 -0
  287. package/dist/connection-installed.d.ts +17 -0
  288. package/dist/connection-logo.d.ts +9 -0
  289. package/dist/connection-service-logo.d.ts +8 -0
  290. package/dist/connection-service-presentation.d.ts +13 -0
  291. package/dist/connection-skeleton.d.ts +5 -0
  292. package/dist/connection-type-picker.d.ts +6 -0
  293. package/dist/conversation-timeline.d.ts +1 -1
  294. package/dist/desktop.d.ts +7 -0
  295. package/dist/desktop.js +28 -0
  296. package/dist/desktop.js.map +1 -0
  297. package/dist/device-authorization.d.ts +23 -0
  298. package/dist/diffs.d.ts +8 -0
  299. package/dist/diffs.js +15 -0
  300. package/dist/diffs.js.map +1 -0
  301. package/dist/discovery-cache.d.ts +5 -0
  302. package/dist/editor.d.ts +7 -0
  303. package/dist/editor.js +23 -0
  304. package/dist/editor.js.map +1 -0
  305. package/dist/embedded-new-voice-KPLC5UJZ.js +19 -0
  306. package/dist/embedded-new-voice-KPLC5UJZ.js.map +1 -0
  307. package/dist/embedded-voice-V2RFSLIU.js +19 -0
  308. package/dist/embedded-voice-V2RFSLIU.js.map +1 -0
  309. package/dist/fleet-decision-row-FE73NSQ6.js +361 -0
  310. package/dist/fleet-decision-row-FE73NSQ6.js.map +1 -0
  311. package/dist/hooks/internal.d.ts +27 -2
  312. package/dist/hooks/latest-question.d.ts +26 -0
  313. package/dist/hooks/session-view-cache.d.ts +38 -0
  314. package/dist/hooks/shared-machines-list.d.ts +4 -0
  315. package/dist/hooks/shared-query.d.ts +123 -0
  316. package/dist/hooks/use-attached-browsers.d.ts +1 -1
  317. package/dist/hooks/use-auth-runs.d.ts +1 -4
  318. package/dist/hooks/use-available-models.d.ts +8 -3
  319. package/dist/hooks/use-browser-frame-stream.d.ts +1 -1
  320. package/dist/hooks/use-browser-session.d.ts +12 -1
  321. package/dist/hooks/use-client-config-flags.d.ts +49 -0
  322. package/dist/hooks/use-codex-accounts.d.ts +48 -9
  323. package/dist/hooks/use-composer.d.ts +24 -3
  324. package/dist/hooks/use-computer-frame-stream.d.ts +1 -1
  325. package/dist/hooks/use-computer-input-posture.d.ts +13 -0
  326. package/dist/hooks/use-computer-session.d.ts +5 -0
  327. package/dist/hooks/use-connect.d.ts +23 -0
  328. package/dist/hooks/use-desktop-stream.d.ts +1 -1
  329. package/dist/hooks/use-file-attachments.d.ts +4 -0
  330. package/dist/hooks/use-goal.d.ts +2 -1
  331. package/dist/hooks/use-last-started-turn-policy.d.ts +5 -1
  332. package/dist/hooks/use-machine-chip.d.ts +3 -2
  333. package/dist/hooks/use-new-conversation.d.ts +56 -0
  334. package/dist/hooks/use-new-session-draft.d.ts +74 -0
  335. package/dist/hooks/use-realtime-voice-models.d.ts +7 -0
  336. package/dist/hooks/use-sandbox-files.d.ts +3 -2
  337. package/dist/hooks/use-session-conversation.d.ts +49 -0
  338. package/dist/hooks/use-session-events.d.ts +21 -2
  339. package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
  340. package/dist/hooks/use-session-model-account.d.ts +48 -0
  341. package/dist/hooks/use-supergrok-accounts.d.ts +7 -1
  342. package/dist/hooks/use-terminal-stream.d.ts +11 -5
  343. package/dist/hooks/use-transcription.d.ts +2 -1
  344. package/dist/hooks/use-usage.d.ts +40 -0
  345. package/dist/hooks/use-vaults.d.ts +53 -0
  346. package/dist/hooks/use-voice-input.d.ts +8 -1
  347. package/dist/hooks/use-workspace-sessions.d.ts +24 -5
  348. package/dist/human-input-model.d.ts +123 -0
  349. package/dist/identity-link-accounts.d.ts +11 -0
  350. package/dist/identity-link-consent.d.ts +18 -0
  351. package/dist/index.d.ts +83 -18
  352. package/dist/index.js +2317 -6453
  353. package/dist/index.js.map +1 -1
  354. package/dist/interaction.d.ts +1 -1
  355. package/dist/interaction.js +20 -29
  356. package/dist/interaction.js.map +1 -1
  357. package/dist/latest-question-SXBXROBT.js +118 -0
  358. package/dist/latest-question-SXBXROBT.js.map +1 -0
  359. package/dist/lib/client-config-read.d.ts +31 -0
  360. package/dist/lib/clipboard.d.ts +7 -0
  361. package/dist/lib/error-message.d.ts +7 -0
  362. package/dist/lib/format.d.ts +59 -9
  363. package/dist/lib/host-theme.d.ts +77 -0
  364. package/dist/lib/interaction-errors.d.ts +3 -0
  365. package/dist/lib/menu-styles.d.ts +22 -0
  366. package/dist/lib/notify-observer.d.ts +2 -0
  367. package/dist/lib/pierre-diffs-loader.d.ts +20 -0
  368. package/dist/lib/provider-recovery.d.ts +56 -0
  369. package/dist/lib/scrollbars.d.ts +11 -0
  370. package/dist/lib/terminal-input-readiness.d.ts +11 -0
  371. package/dist/lib/transient-retry.d.ts +26 -0
  372. package/dist/lib/workbench-peers.d.ts +36 -0
  373. package/dist/lib/xterm-theme.d.ts +7 -5
  374. package/dist/machines.js +12 -6
  375. package/dist/{markdown-table-layout-3Z3AWBY7.js → markdown-table-layout-3PV2UAAH.js} +51 -9
  376. package/dist/markdown-table-layout-3PV2UAAH.js.map +1 -0
  377. package/dist/mcp-connection-status.d.ts +15 -0
  378. package/dist/messages/en.d.ts +3328 -0
  379. package/dist/messages/runtime.d.ts +69 -0
  380. package/dist/messages.d.ts +3 -0
  381. package/dist/messages.js +16 -0
  382. package/dist/messages.js.map +1 -0
  383. package/dist/model-mark-paths.d.ts +34 -0
  384. package/dist/model-mark-paths.js +16 -0
  385. package/dist/model-mark-paths.js.map +1 -0
  386. package/dist/model-picker-model.d.ts +112 -0
  387. package/dist/model-picker-model.js +25 -0
  388. package/dist/model-picker-model.js.map +1 -0
  389. package/dist/model-policy-picker-menu-NWIETWSR.js +18 -0
  390. package/dist/model-policy-picker-menu-NWIETWSR.js.map +1 -0
  391. package/dist/model-policy.d.ts +35 -10
  392. package/dist/model-policy.js +12 -1
  393. package/dist/native-previews.d.ts +29 -0
  394. package/dist/native-previews.js +82 -0
  395. package/dist/native-previews.js.map +1 -0
  396. package/dist/new-session-draft.d.ts +7 -0
  397. package/dist/new-session-draft.js +639 -0
  398. package/dist/new-session-draft.js.map +1 -0
  399. package/dist/notification-text.d.ts +27 -0
  400. package/dist/{noto-sans-arabic-loader-IA2T4X2A.js → noto-sans-arabic-loader-XSH2KYWJ.js} +3 -1
  401. package/dist/{noto-sans-arabic-loader-IA2T4X2A.js.map → noto-sans-arabic-loader-XSH2KYWJ.js.map} +1 -1
  402. package/dist/{noto-sans-jp-loader.generated-HFGLYBR3.js → noto-sans-jp-loader.generated-MR5L6V7K.js} +3 -1
  403. package/dist/{noto-sans-jp-loader.generated-HFGLYBR3.js.map → noto-sans-jp-loader.generated-MR5L6V7K.js.map} +1 -1
  404. package/dist/organization-model.d.ts +33 -0
  405. package/dist/organization-model.js +65 -0
  406. package/dist/organization-model.js.map +1 -0
  407. package/dist/platform-activity-row-VSQ2FZ5T.js +119 -0
  408. package/dist/platform-activity-row-VSQ2FZ5T.js.map +1 -0
  409. package/dist/plugin-details.d.ts +14 -0
  410. package/dist/plugin-discovery.d.ts +25 -0
  411. package/dist/preview-loading-paint.d.ts +20 -0
  412. package/dist/provider.d.ts +37 -2
  413. package/dist/queue-presentation-model.d.ts +73 -0
  414. package/dist/queue-presentation-model.js +38 -0
  415. package/dist/queue-presentation-model.js.map +1 -0
  416. package/dist/{queue-surface-implementation-LK3S4BIW.js → queue-surface-implementation-MEKXXWGR.js} +189 -343
  417. package/dist/queue-surface-implementation-MEKXXWGR.js.map +1 -0
  418. package/dist/realtime/embedded-new-voice.d.ts +1 -0
  419. package/dist/realtime/embedded-voice.d.ts +1 -0
  420. package/dist/realtime/realtime-control.d.ts +4 -65
  421. package/dist/realtime/session-realtime.d.ts +79 -0
  422. package/dist/realtime.js +26 -1333
  423. package/dist/realtime.js.map +1 -1
  424. package/dist/sandbox-files-5NRC2QUT.js +24 -0
  425. package/dist/sandbox-files-5NRC2QUT.js.map +1 -0
  426. package/dist/sandbox-label-model.d.ts +31 -0
  427. package/dist/sandbox-label-model.js +20 -0
  428. package/dist/sandbox-label-model.js.map +1 -0
  429. package/dist/scrollbars.d.ts +1 -0
  430. package/dist/scrollbars.js +10 -0
  431. package/dist/scrollbars.js.map +1 -0
  432. package/dist/secret-reference-label.d.ts +15 -0
  433. package/dist/secrets-ui.d.ts +57 -0
  434. package/dist/session-agents-model.d.ts +11 -0
  435. package/dist/session-agents-model.js +25 -0
  436. package/dist/session-agents-model.js.map +1 -0
  437. package/dist/session-attention-model.d.ts +8 -0
  438. package/dist/session-attention-model.js +47 -0
  439. package/dist/session-attention-model.js.map +1 -0
  440. package/dist/session-auth-recommendation.d.ts +6 -0
  441. package/dist/session-capability-policy.d.ts +32 -0
  442. package/dist/session-context.d.ts +9 -1
  443. package/dist/session-feedback-model.d.ts +21 -0
  444. package/dist/session-feedback-model.js +56 -0
  445. package/dist/session-feedback-model.js.map +1 -0
  446. package/dist/session-list-model.d.ts +139 -0
  447. package/dist/session-list-model.js +274 -0
  448. package/dist/session-list-model.js.map +1 -0
  449. package/dist/session-realtime-OZCE6IKP.js +22 -0
  450. package/dist/session-realtime-OZCE6IKP.js.map +1 -0
  451. package/dist/session-realtime.d.ts +7 -0
  452. package/dist/session-realtime.js +20 -0
  453. package/dist/session-realtime.js.map +1 -0
  454. package/dist/session-status-model.d.ts +37 -0
  455. package/dist/session-ui.d.ts +40 -3
  456. package/dist/session-ui.js +127 -21
  457. package/dist/session-ui.js.map +1 -1
  458. package/dist/session.d.ts +10 -2
  459. package/dist/session.js +44 -20
  460. package/dist/site-snapshot.d.ts +14 -0
  461. package/dist/sites-ui.d.ts +24 -0
  462. package/dist/sites.d.ts +3 -0
  463. package/dist/sites.js +15 -0
  464. package/dist/sites.js.map +1 -0
  465. package/dist/skill-discovery.d.ts +47 -0
  466. package/dist/terminal.d.ts +8 -0
  467. package/dist/terminal.js +33 -0
  468. package/dist/terminal.js.map +1 -0
  469. package/dist/testing/session-scenarios.d.ts +10 -0
  470. package/dist/testing/session-scenarios.js +367 -0
  471. package/dist/testing/session-scenarios.js.map +1 -0
  472. package/dist/this-computer.d.ts +8 -0
  473. package/dist/this-computer.js +1042 -0
  474. package/dist/this-computer.js.map +1 -0
  475. package/dist/timeline/activity-rail.d.ts +12 -2
  476. package/dist/timeline/agent-identity.d.ts +30 -0
  477. package/dist/timeline/agent-row.d.ts +31 -0
  478. package/dist/timeline/allowance-exhausted-row.d.ts +24 -0
  479. package/dist/timeline/compaction-copy.d.ts +47 -0
  480. package/dist/timeline/focus-sequence.d.ts +9 -0
  481. package/dist/timeline/genie-copy.d.ts +4 -0
  482. package/dist/timeline/genie-loading.d.ts +48 -0
  483. package/dist/timeline/index.d.ts +12 -5
  484. package/dist/timeline/invoked-tool.d.ts +6 -0
  485. package/dist/timeline/knowledge-receipt.d.ts +17 -0
  486. package/dist/timeline/learning-refusal-copy.d.ts +23 -0
  487. package/dist/timeline/learning-refusal-row.d.ts +19 -0
  488. package/dist/timeline/message-sender.d.ts +19 -0
  489. package/dist/timeline/notice-presentation.d.ts +14 -0
  490. package/dist/timeline/parsers.d.ts +11 -0
  491. package/dist/timeline/patch-apply-command.d.ts +19 -0
  492. package/dist/timeline/platform-activity-presentation.d.ts +26 -0
  493. package/dist/timeline/platform-activity-row.d.ts +1 -2
  494. package/dist/timeline/presented-image.d.ts +11 -0
  495. package/dist/timeline/projection.d.ts +32 -2
  496. package/dist/timeline/provider-logo.d.ts +15 -0
  497. package/dist/timeline/question-nav-model.d.ts +23 -0
  498. package/dist/timeline/registry.d.ts +10 -1
  499. package/dist/timeline/retained-image.d.ts +18 -0
  500. package/dist/timeline/retained-loaders.d.ts +27 -0
  501. package/dist/timeline/rolling-activity.d.ts +11 -0
  502. package/dist/timeline/screenshot-lightbox.d.ts +23 -1
  503. package/dist/timeline/session-usage-limit-row.d.ts +11 -0
  504. package/dist/timeline/shared.d.ts +8 -3
  505. package/dist/timeline/startup-dispatch-details.d.ts +5 -0
  506. package/dist/timeline/startup-preference.d.ts +3 -0
  507. package/dist/timeline/startup-timings.d.ts +4 -0
  508. package/dist/timeline/tool-display-name.d.ts +6 -2
  509. package/dist/timeline/tool-presentation.d.ts +185 -0
  510. package/dist/timeline/turn-summary-model.d.ts +102 -0
  511. package/dist/timeline/turn-summary.d.ts +20 -54
  512. package/dist/timeline/types.d.ts +184 -7
  513. package/dist/timeline/work-presentation.d.ts +61 -0
  514. package/dist/{timeline-annotation-markers-DRSTLEM6.js → timeline-annotation-markers-HYLRTT6S.js} +11 -6
  515. package/dist/timeline-annotation-markers-HYLRTT6S.js.map +1 -0
  516. package/dist/{timeline-annotation-selection-IHLUGVND.js → timeline-annotation-selection-LBKW5GHA.js} +15 -5
  517. package/dist/timeline-annotation-selection-LBKW5GHA.js.map +1 -0
  518. package/dist/{timeline-annotations-dialog-6Q53N5FG.js → timeline-annotations-dialog-JKVINC42.js} +34 -19
  519. package/dist/timeline-annotations-dialog-JKVINC42.js.map +1 -0
  520. package/dist/timeline-model.d.ts +29 -0
  521. package/dist/timeline-model.js +254 -0
  522. package/dist/timeline-model.js.map +1 -0
  523. package/dist/usage/allowance-copy.d.ts +26 -0
  524. package/dist/usage/session-usage-limit.d.ts +89 -0
  525. package/dist/usage/summary.d.ts +35 -0
  526. package/dist/usage.d.ts +17 -0
  527. package/dist/usage.js +1201 -0
  528. package/dist/usage.js.map +1 -0
  529. package/dist/voice-recording-owner.d.ts +7 -0
  530. package/package.json +119 -7
  531. package/src/approvals.ts +8 -1
  532. package/src/artifacts-spreadsheet.ts +1 -0
  533. package/src/artifacts.ts +41 -0
  534. package/src/assets/README.md +8 -0
  535. package/src/assets/gmail.ico +0 -0
  536. package/src/assets/outlook.ico +0 -0
  537. package/src/capability-catalog-row.tsx +96 -0
  538. package/src/capability-logo-fallback.ts +22 -0
  539. package/src/client.ts +18 -30
  540. package/src/commands/registry.ts +46 -36
  541. package/src/commands/types.ts +2 -0
  542. package/src/components/anthropic-mark.tsx +10 -0
  543. package/src/components/approval-surface.tsx +407 -142
  544. package/src/components/artifacts/artifact-chrome.tsx +425 -0
  545. package/src/components/artifacts/artifact-sandbox.tsx +193 -0
  546. package/src/components/artifacts/artifact-surface.tsx +48 -26
  547. package/src/components/artifacts/chat-interactive-block.tsx +260 -0
  548. package/src/components/artifacts/deferred-chat-media.tsx +72 -0
  549. package/src/components/artifacts/document-editor.tsx +193 -45
  550. package/src/components/artifacts/editable-artifact-ui.tsx +23 -11
  551. package/src/components/artifacts/editable-artifact-view.tsx +199 -0
  552. package/src/components/artifacts/editable-artifact-workbench.tsx +8 -3
  553. package/src/components/artifacts/editable-document.tsx +76 -54
  554. package/src/components/artifacts/editable-presentation.tsx +86 -40
  555. package/src/components/artifacts/editable-spreadsheet.tsx +581 -121
  556. package/src/components/artifacts/index.ts +42 -0
  557. package/src/components/artifacts/inline-html-document.ts +24 -0
  558. package/src/components/artifacts/latest-task-runner.ts +49 -0
  559. package/src/components/artifacts/presentation-editor.tsx +422 -122
  560. package/src/components/artifacts/published-html-artifact-frame.tsx +79 -265
  561. package/src/components/artifacts/session-artifact-viewer.tsx +381 -0
  562. package/src/components/artifacts/site-view.tsx +129 -0
  563. package/src/components/artifacts/spreadsheet-canvas.ts +5 -10
  564. package/src/components/artifacts/spreadsheet-command-queue.ts +190 -0
  565. package/src/components/artifacts/spreadsheet-download.tsx +117 -0
  566. package/src/components/artifacts/spreadsheet-general-display.ts +43 -0
  567. package/src/components/artifacts/spreadsheet-grid.tsx +390 -172
  568. package/src/components/artifacts/spreadsheet-resize.tsx +432 -0
  569. package/src/components/artifacts/spreadsheet-submissions.tsx +46 -0
  570. package/src/components/artifacts/visualization-assets/base.css +1015 -0
  571. package/src/components/artifacts/visualization-assets/helpers.html +349 -0
  572. package/src/components/artifacts/visualization-assets.gen.ts +3 -0
  573. package/src/components/browser-select-control.tsx +320 -0
  574. package/src/components/browser-viewer.tsx +1102 -505
  575. package/src/components/chat-composer.tsx +42 -3
  576. package/src/components/child-session-link.tsx +16 -5
  577. package/src/components/claude-mark.tsx +11 -0
  578. package/src/components/code-editor.tsx +38 -27
  579. package/src/components/command-palette.tsx +4 -1
  580. package/src/components/composer-transcription-control.tsx +151 -50
  581. package/src/components/composer.tsx +281 -176
  582. package/src/components/computer-viewer.tsx +1013 -341
  583. package/src/components/copy-button.tsx +17 -7
  584. package/src/components/desktop-viewer.tsx +42 -33
  585. package/src/components/diff-view.tsx +3 -1
  586. package/src/components/enrollment-consent.tsx +39 -34
  587. package/src/components/enrollment-device-flow.tsx +31 -19
  588. package/src/components/file-browser.tsx +47 -35
  589. package/src/components/fleet-tile.tsx +8 -4
  590. package/src/components/generated-video-player.tsx +10 -5
  591. package/src/components/grok-mark.tsx +34 -0
  592. package/src/components/human-input-form.tsx +438 -251
  593. package/src/components/human-input-surface.tsx +8 -0
  594. package/src/components/interaction-intervention-banner.tsx +15 -13
  595. package/src/components/linkified-text.tsx +79 -0
  596. package/src/components/machine-card.tsx +56 -89
  597. package/src/components/machine-dock-bar.tsx +10 -4
  598. package/src/components/machine-health-pill.tsx +4 -2
  599. package/src/components/machine-input-display.ts +309 -34
  600. package/src/components/machine-metrics.tsx +10 -7
  601. package/src/components/machine-status-pill.tsx +23 -15
  602. package/src/components/machines/agent-status-icon.tsx +31 -0
  603. package/src/components/machines/health.ts +53 -10
  604. package/src/components/machines/machine-detail.tsx +230 -42
  605. package/src/components/machines/machine-operation-policy.tsx +36 -29
  606. package/src/components/machines/machine-status.ts +264 -0
  607. package/src/components/machines/metric-history-chart.tsx +8 -2
  608. package/src/components/machines/series.ts +12 -11
  609. package/src/components/machines-dashboard.tsx +16 -9
  610. package/src/components/markdown-table-layout.ts +67 -9
  611. package/src/components/markdown.tsx +470 -133
  612. package/src/components/message-timeline.tsx +2290 -752
  613. package/src/components/model-mark.tsx +102 -0
  614. package/src/components/model-picker.tsx +27 -9
  615. package/src/components/model-policy-picker-menu.tsx +204 -100
  616. package/src/components/model-policy-picker.tsx +215 -152
  617. package/src/components/new-conversation.tsx +223 -0
  618. package/src/components/open-geni-chat.tsx +311 -0
  619. package/src/components/open-geni-links.tsx +183 -0
  620. package/src/components/openrouter-mark.tsx +13 -0
  621. package/src/components/opper-mark.tsx +18 -0
  622. package/src/components/pierre-diff.tsx +47 -19
  623. package/src/components/pierre-file.tsx +38 -11
  624. package/src/components/preview-loading.tsx +111 -0
  625. package/src/components/provider-recovery-notice.tsx +51 -0
  626. package/src/components/queue-item-content.ts +16 -0
  627. package/src/components/queue-surface-implementation.tsx +185 -420
  628. package/src/components/queue-surface-state.tsx +13 -8
  629. package/src/components/queue-surface.tsx +3 -1
  630. package/src/components/rehype-secret-refs.ts +98 -0
  631. package/src/components/remark-soft-line-breaks.ts +166 -0
  632. package/src/components/sandbox-files.tsx +75 -44
  633. package/src/components/sandbox-terminal.tsx +103 -22
  634. package/src/components/sandbox-workspace.tsx +168 -78
  635. package/src/components/secret-question-field.tsx +326 -0
  636. package/src/components/secret-ref-chip.tsx +187 -0
  637. package/src/components/session-capability-frame.tsx +203 -0
  638. package/src/components/session-chrome.tsx +559 -328
  639. package/src/components/session-commands-panel.tsx +34 -17
  640. package/src/components/session-commands.tsx +18 -0
  641. package/src/components/session-connection-request.tsx +99 -0
  642. package/src/components/session-conversation.tsx +853 -118
  643. package/src/components/session-list.tsx +259 -0
  644. package/src/components/session-mcp-capability-card.tsx +681 -0
  645. package/src/components/session-proxy-scope.tsx +160 -0
  646. package/src/components/session-status.tsx +35 -21
  647. package/src/components/session-usage-limit-notice.tsx +176 -0
  648. package/src/components/this-computer/illustrations.tsx +164 -0
  649. package/src/components/this-computer/labels.ts +234 -0
  650. package/src/components/this-computer/this-computer-card.tsx +203 -0
  651. package/src/components/this-computer/this-computer-setup.tsx +433 -0
  652. package/src/components/this-computer/this-computer-status.tsx +329 -0
  653. package/src/components/this-computer/use-this-computer.ts +183 -0
  654. package/src/components/timeline-anchor.tsx +43 -15
  655. package/src/components/timeline-annotation-chrome.tsx +33 -9
  656. package/src/components/timeline-annotation-markers.tsx +4 -2
  657. package/src/components/timeline-annotation-selection.tsx +11 -2
  658. package/src/components/timeline-annotation-shared.ts +9 -8
  659. package/src/components/timeline-annotations-dialog.tsx +30 -9
  660. package/src/components/timeline-annotations.tsx +24 -7
  661. package/src/components/timeline-reading-progress.ts +80 -0
  662. package/src/components/timeline-search.tsx +168 -0
  663. package/src/components/timeline-settlement.ts +60 -0
  664. package/src/components/tool-action-review.tsx +670 -0
  665. package/src/components/tool-review-history.tsx +88 -0
  666. package/src/components/usage-limit-notice.tsx +183 -0
  667. package/src/components/usage-member-list.tsx +797 -0
  668. package/src/components/usage-meter.tsx +386 -0
  669. package/src/components/use-viewer-menu-dismiss.ts +33 -0
  670. package/src/components/user-message-body.tsx +33 -2
  671. package/src/components/workbench-changes.tsx +28 -16
  672. package/src/components/workspace-dock.tsx +45 -13
  673. package/src/composer-messages.ts +153 -0
  674. package/src/composer-voice-events.ts +12 -0
  675. package/src/composer.ts +4 -0
  676. package/src/connect-account-identity.tsx +38 -0
  677. package/src/connect-accounts.tsx +233 -0
  678. package/src/connect-chooser.tsx +339 -0
  679. package/src/connect-panel.tsx +104 -0
  680. package/src/connect-setup.tsx +354 -0
  681. package/src/connect.ts +60 -0
  682. package/src/connection-assets.d.ts +4 -0
  683. package/src/connection-catalog.tsx +175 -0
  684. package/src/connection-discovery.tsx +251 -0
  685. package/src/connection-installed.tsx +56 -0
  686. package/src/connection-logo.tsx +37 -0
  687. package/src/connection-service-logo.tsx +55 -0
  688. package/src/connection-service-presentation.ts +46 -0
  689. package/src/connection-skeleton.tsx +16 -0
  690. package/src/connection-type-picker.tsx +38 -0
  691. package/src/conversation-timeline.ts +11 -2
  692. package/src/desktop.ts +24 -0
  693. package/src/device-authorization.tsx +111 -0
  694. package/src/diffs.ts +16 -0
  695. package/src/discovery-cache.ts +42 -0
  696. package/src/editor.ts +13 -0
  697. package/src/hooks/internal.ts +93 -10
  698. package/src/hooks/latest-question.ts +168 -0
  699. package/src/hooks/session-view-cache.ts +167 -0
  700. package/src/hooks/shared-machines-list.ts +34 -1
  701. package/src/hooks/shared-query.ts +744 -0
  702. package/src/hooks/use-attached-browsers.ts +1 -1
  703. package/src/hooks/use-auth-runs.ts +0 -27
  704. package/src/hooks/use-available-models.ts +20 -10
  705. package/src/hooks/use-browser-frame-stream.ts +23 -4
  706. package/src/hooks/use-browser-session.ts +684 -206
  707. package/src/hooks/use-browser-sessions.ts +32 -1
  708. package/src/hooks/use-client-config-flags.ts +102 -0
  709. package/src/hooks/use-codex-accounts.ts +216 -43
  710. package/src/hooks/use-composer.ts +240 -59
  711. package/src/hooks/use-computer-frame-stream.ts +29 -9
  712. package/src/hooks/use-computer-input-posture.ts +96 -0
  713. package/src/hooks/use-computer-session.ts +419 -100
  714. package/src/hooks/use-connect.ts +23 -0
  715. package/src/hooks/use-desktop-stream.ts +19 -28
  716. package/src/hooks/use-file-attachments.ts +19 -3
  717. package/src/hooks/use-goal.ts +172 -21
  718. package/src/hooks/use-human-input.ts +16 -2
  719. package/src/hooks/use-last-started-turn-policy.ts +37 -11
  720. package/src/hooks/use-machine-chip.ts +13 -8
  721. package/src/hooks/use-machines.ts +24 -10
  722. package/src/hooks/use-new-conversation.ts +377 -0
  723. package/src/hooks/use-new-session-draft.ts +813 -0
  724. package/src/hooks/use-realtime-voice-models.ts +46 -0
  725. package/src/hooks/use-sandbox-files.ts +22 -16
  726. package/src/hooks/use-session-background-commands.ts +2 -2
  727. package/src/hooks/use-session-capabilities.ts +3 -2
  728. package/src/hooks/use-session-conversation.ts +150 -0
  729. package/src/hooks/use-session-events.ts +403 -64
  730. package/src/hooks/use-session-lineage.ts +47 -9
  731. package/src/hooks/use-session-mcp-approval-policy.ts +13 -5
  732. package/src/hooks/use-session-model-account.ts +174 -0
  733. package/src/hooks/use-session.ts +19 -3
  734. package/src/hooks/use-slash-commands.ts +6 -11
  735. package/src/hooks/use-supergrok-accounts.ts +22 -8
  736. package/src/hooks/use-terminal-stream.ts +153 -27
  737. package/src/hooks/use-transcription.ts +45 -19
  738. package/src/hooks/use-turn-queue.ts +25 -5
  739. package/src/hooks/use-usage.ts +100 -0
  740. package/src/hooks/use-vaults.ts +153 -0
  741. package/src/hooks/use-video-artifact-playback.ts +1 -1
  742. package/src/hooks/use-voice-input.ts +127 -19
  743. package/src/hooks/use-workspace-capture.ts +3 -2
  744. package/src/hooks/use-workspace-sessions.ts +74 -7
  745. package/src/human-input-model.ts +374 -0
  746. package/src/identity-link-accounts.tsx +149 -0
  747. package/src/identity-link-consent.tsx +193 -0
  748. package/src/index.ts +282 -16
  749. package/src/interaction.ts +1 -0
  750. package/src/lib/client-config-read.ts +76 -0
  751. package/src/lib/clipboard.ts +29 -0
  752. package/src/lib/error-message.ts +37 -0
  753. package/src/lib/format.ts +231 -36
  754. package/src/lib/host-theme.ts +529 -0
  755. package/src/lib/interaction-errors.ts +15 -0
  756. package/src/lib/menu-styles.ts +44 -0
  757. package/src/lib/notify-observer.ts +15 -0
  758. package/src/lib/pierre-diffs-loader.ts +53 -0
  759. package/src/lib/provider-recovery.ts +255 -0
  760. package/src/lib/scrollbars.ts +30 -0
  761. package/src/lib/terminal-input-readiness.ts +51 -0
  762. package/src/lib/transient-retry.ts +101 -0
  763. package/src/lib/workbench-peers.ts +62 -0
  764. package/src/lib/xterm-theme.ts +23 -21
  765. package/src/mcp-connection-status.ts +39 -0
  766. package/src/messages/en.ts +3810 -0
  767. package/src/messages/runtime.tsx +175 -0
  768. package/src/messages.ts +19 -0
  769. package/src/model-mark-paths.ts +53 -0
  770. package/src/model-picker-model.ts +343 -0
  771. package/src/model-policy.ts +301 -79
  772. package/src/native-previews.ts +104 -0
  773. package/src/new-session-draft.ts +22 -0
  774. package/src/notification-text.ts +81 -0
  775. package/src/organization-model.ts +123 -0
  776. package/src/plugin-details.tsx +192 -0
  777. package/src/plugin-discovery.tsx +209 -0
  778. package/src/preview-loading-paint.ts +68 -0
  779. package/src/provider.tsx +105 -21
  780. package/src/queue-presentation-model.ts +475 -0
  781. package/src/realtime/dropdown-menu.tsx +19 -12
  782. package/src/realtime/embedded-new-voice.tsx +1 -0
  783. package/src/realtime/embedded-voice.tsx +3 -0
  784. package/src/realtime/realtime-control.tsx +240 -609
  785. package/src/realtime/session-realtime.ts +582 -0
  786. package/src/sandbox-label-model.ts +56 -0
  787. package/src/scrollbars.ts +3 -0
  788. package/src/secret-reference-label.ts +47 -0
  789. package/src/secrets-ui.tsx +59 -0
  790. package/src/session-agents-model.ts +40 -0
  791. package/src/session-attention-model.ts +62 -0
  792. package/src/session-auth-recommendation.ts +50 -0
  793. package/src/session-capability-policy.ts +200 -0
  794. package/src/session-context.ts +13 -5
  795. package/src/session-feedback-model.ts +101 -0
  796. package/src/session-list-model.ts +437 -0
  797. package/src/session-realtime.ts +18 -0
  798. package/src/session-status-model.ts +99 -0
  799. package/src/session-ui.ts +102 -3
  800. package/src/session.ts +19 -1
  801. package/src/site-snapshot.ts +74 -0
  802. package/src/sites-ui.tsx +350 -0
  803. package/src/sites.ts +3 -0
  804. package/src/skill-discovery.tsx +221 -0
  805. package/src/terminal.ts +26 -0
  806. package/src/testing/session-scenarios.ts +404 -0
  807. package/src/this-computer.ts +62 -0
  808. package/src/timeline/activity-rail.tsx +289 -119
  809. package/src/timeline/agent-identity.tsx +84 -0
  810. package/src/timeline/agent-row.tsx +235 -0
  811. package/src/timeline/allowance-exhausted-row.tsx +90 -0
  812. package/src/timeline/compaction-copy.ts +125 -0
  813. package/src/timeline/fleet-decision-row.tsx +120 -101
  814. package/src/timeline/focus-sequence.ts +44 -0
  815. package/src/timeline/genie-copy.ts +22 -0
  816. package/src/timeline/genie-loading.tsx +158 -0
  817. package/src/timeline/index.ts +37 -2
  818. package/src/timeline/invoked-tool.ts +15 -0
  819. package/src/timeline/knowledge-receipt.tsx +104 -0
  820. package/src/timeline/learning-refusal-copy.ts +67 -0
  821. package/src/timeline/learning-refusal-row.tsx +70 -0
  822. package/src/timeline/message-sender.tsx +71 -0
  823. package/src/timeline/notice-presentation.ts +67 -0
  824. package/src/timeline/parsers.ts +42 -2
  825. package/src/timeline/patch-apply-command.tsx +139 -0
  826. package/src/timeline/platform-activity-presentation.ts +219 -0
  827. package/src/timeline/platform-activity-row.tsx +34 -98
  828. package/src/timeline/presented-image.ts +63 -0
  829. package/src/timeline/projection.ts +1556 -71
  830. package/src/timeline/provider-logo.tsx +53 -0
  831. package/src/timeline/question-nav-model.ts +28 -0
  832. package/src/timeline/registry.ts +11 -1
  833. package/src/timeline/retained-image.ts +102 -0
  834. package/src/timeline/retained-loaders.ts +91 -0
  835. package/src/timeline/rolling-activity.tsx +84 -0
  836. package/src/timeline/screenshot-lightbox.tsx +250 -10
  837. package/src/timeline/session-usage-limit-row.tsx +44 -0
  838. package/src/timeline/shared.tsx +76 -29
  839. package/src/timeline/startup-dispatch-details.tsx +43 -0
  840. package/src/timeline/startup-preference.ts +33 -0
  841. package/src/timeline/startup-timings.tsx +164 -0
  842. package/src/timeline/tool-diff.tsx +3 -1
  843. package/src/timeline/tool-display-name.ts +38 -6
  844. package/src/timeline/tool-presentation.ts +1552 -0
  845. package/src/timeline/tool-renderers.tsx +1019 -1265
  846. package/src/timeline/turn-summary-model.ts +363 -0
  847. package/src/timeline/turn-summary.tsx +288 -367
  848. package/src/timeline/types.ts +191 -7
  849. package/src/timeline/work-presentation.ts +196 -0
  850. package/src/timeline-model.ts +143 -0
  851. package/src/usage/allowance-copy.ts +70 -0
  852. package/src/usage/session-usage-limit.ts +270 -0
  853. package/src/usage/summary.ts +93 -0
  854. package/src/usage.ts +70 -0
  855. package/src/voice-recording-owner.ts +22 -0
  856. package/styles/compiled.css +2010 -651
  857. package/styles/connect.css +290 -0
  858. package/styles/connect.d.ts +1 -0
  859. package/styles/effective-tokens.css +1 -0
  860. package/styles/index.css +286 -9
  861. package/styles/responsive.css +98 -6
  862. package/styles/session-capability.css +44 -0
  863. package/styles/this-computer.css +1042 -0
  864. package/styles/this-computer.d.ts +1 -0
  865. package/styles/tokens.css +132 -64
  866. package/dist/browser-viewer-NTD6UIPR.js +0 -14
  867. package/dist/chunk-24M4YBCL.js.map +0 -1
  868. package/dist/chunk-4MDLEHXL.js.map +0 -1
  869. package/dist/chunk-5M6VTFJ5.js.map +0 -1
  870. package/dist/chunk-5PQJOCX5.js +0 -902
  871. package/dist/chunk-5PQJOCX5.js.map +0 -1
  872. package/dist/chunk-5YK2ZDIG.js.map +0 -1
  873. package/dist/chunk-6J56T3MG.js.map +0 -1
  874. package/dist/chunk-BV5A4OTE.js.map +0 -1
  875. package/dist/chunk-CQG7YUJB.js +0 -10883
  876. package/dist/chunk-CQG7YUJB.js.map +0 -1
  877. package/dist/chunk-H5YGYNXS.js.map +0 -1
  878. package/dist/chunk-HUIKIDM5.js.map +0 -1
  879. package/dist/chunk-HUMIRRYI.js.map +0 -1
  880. package/dist/chunk-ICA6R6TW.js.map +0 -1
  881. package/dist/chunk-JVYQRRC4.js.map +0 -1
  882. package/dist/chunk-KCGXPP5V.js.map +0 -1
  883. package/dist/chunk-KZ73RL76.js.map +0 -1
  884. package/dist/chunk-NEXLLTP4.js.map +0 -1
  885. package/dist/chunk-NLTS7JHI.js.map +0 -1
  886. package/dist/chunk-NOSYBS2D.js.map +0 -1
  887. package/dist/chunk-PAJU5KKL.js.map +0 -1
  888. package/dist/chunk-PEI6RANI.js.map +0 -1
  889. package/dist/chunk-PLYRL5ER.js +0 -164
  890. package/dist/chunk-PLYRL5ER.js.map +0 -1
  891. package/dist/chunk-R4KRSFGA.js +0 -290
  892. package/dist/chunk-R4KRSFGA.js.map +0 -1
  893. package/dist/chunk-UMECRJRV.js +0 -223
  894. package/dist/chunk-UMECRJRV.js.map +0 -1
  895. package/dist/chunk-VRBL3F5E.js +0 -241
  896. package/dist/chunk-VRBL3F5E.js.map +0 -1
  897. package/dist/chunk-YBM6CQRU.js.map +0 -1
  898. package/dist/chunk-Z7WBDB4E.js.map +0 -1
  899. package/dist/computer-viewer-7TEZC6Y2.js +0 -16
  900. package/dist/fleet-decision-row-YZ3ZKWMM.js +0 -352
  901. package/dist/fleet-decision-row-YZ3ZKWMM.js.map +0 -1
  902. package/dist/hooks/use-environments.d.ts +0 -41
  903. package/dist/hooks/use-packs.d.ts +0 -32
  904. package/dist/markdown-table-layout-3Z3AWBY7.js.map +0 -1
  905. package/dist/model-policy-picker-menu-3R336DP2.js +0 -13
  906. package/dist/platform-activity-row-27LKAWZD.js +0 -169
  907. package/dist/platform-activity-row-27LKAWZD.js.map +0 -1
  908. package/dist/queue-surface-implementation-LK3S4BIW.js.map +0 -1
  909. package/dist/timeline-annotation-markers-DRSTLEM6.js.map +0 -1
  910. package/dist/timeline-annotation-selection-IHLUGVND.js.map +0 -1
  911. package/dist/timeline-annotations-dialog-6Q53N5FG.js.map +0 -1
  912. package/src/hooks/use-environments.ts +0 -182
  913. package/src/hooks/use-packs.ts +0 -157
  914. /package/dist/{browser-viewer-NTD6UIPR.js.map → browser-viewer-GEHX3KYE.js.map} +0 -0
  915. /package/dist/{computer-viewer-7TEZC6Y2.js.map → chat-interactive-block-5V3BGLXT.js.map} +0 -0
  916. /package/dist/{model-policy-picker-menu-3R336DP2.js.map → chunk-M357MHH3.js.map} +0 -0
@@ -1,17 +1,24 @@
1
+ "use client";
1
2
  import {
2
- formatBytes,
3
- formatRelativeTime
4
- } from "./chunk-PLYRL5ER.js";
3
+ machineScopeLabel
4
+ } from "./chunk-BOG2FED3.js";
5
5
  import {
6
6
  useMutationRunner,
7
7
  usePageLiveActivity
8
- } from "./chunk-KZ73RL76.js";
8
+ } from "./chunk-NAWXARTY.js";
9
9
  import {
10
10
  useOpenGeni
11
- } from "./chunk-NEXLLTP4.js";
11
+ } from "./chunk-ZGFU4LVW.js";
12
+ import {
13
+ formatBytes,
14
+ formatRelativeTime
15
+ } from "./chunk-AIX25FIQ.js";
12
16
  import {
13
17
  cn
14
- } from "./chunk-22KP6LR5.js";
18
+ } from "./chunk-TXS65BB2.js";
19
+ import {
20
+ useOpenGeniText
21
+ } from "./chunk-VU4QUISJ.js";
15
22
 
16
23
  // src/types/machines.ts
17
24
  function connectionStatusForState(state) {
@@ -34,47 +41,48 @@ function connectionStatusForState(state) {
34
41
 
35
42
  // src/components/machine-status-pill.tsx
36
43
  import { jsx, jsxs } from "react/jsx-runtime";
37
- var CONNECTION_STATUS_META = {
44
+ var CONNECTION_STATUS_META = (t) => ({
38
45
  online: {
39
- label: "Online",
46
+ label: t("machineStatusPill.online"),
40
47
  dotClassName: "bg-og-status-running",
41
48
  badgeClassName: "text-og-status-running border-og-status-running/30 bg-og-status-running/10",
42
49
  pulse: false
43
50
  },
44
51
  reconnecting: {
45
- label: "Reconnecting",
52
+ label: t("machineStatusPill.reconnecting"),
46
53
  dotClassName: "bg-og-status-waiting",
47
54
  badgeClassName: "text-og-status-waiting border-og-status-waiting/35 bg-og-status-waiting/10",
48
55
  pulse: true
49
56
  },
50
57
  offline: {
51
- label: "Offline",
58
+ label: t("machineStatusPill.offline"),
52
59
  dotClassName: "bg-og-status-failed",
53
60
  badgeClassName: "text-og-fg-subtle border-og-border bg-og-status-failed/10",
54
61
  pulse: false
55
62
  }
56
- };
57
- var MACHINE_STATE_BADGE_META = {
63
+ });
64
+ var MACHINE_STATE_BADGE_META = (t) => ({
58
65
  consent_required: {
59
- label: "Consent required",
66
+ label: t("machineStatusPill.consentRequired"),
60
67
  badgeClassName: "text-og-status-waiting border-og-status-waiting/35 bg-og-status-waiting/10"
61
68
  },
62
69
  display_unavailable: {
63
- label: "No display",
70
+ label: t("machineStatusPill.noDisplay"),
64
71
  badgeClassName: "text-og-fg-muted border-og-border bg-og-surface-2"
65
72
  },
66
73
  enrolling: {
67
- label: "Enrolling",
74
+ label: t("machineStatusPill.enrolling"),
68
75
  badgeClassName: "text-og-accent border-og-accent/30 bg-og-accent-soft"
69
76
  }
70
- };
77
+ });
71
78
  function ConnectionStatusPill({
72
79
  status,
73
80
  label,
74
81
  size = "md",
75
82
  className
76
83
  }) {
77
- const meta = CONNECTION_STATUS_META[status];
84
+ const t = useOpenGeniText();
85
+ const meta = CONNECTION_STATUS_META(t)[status];
78
86
  return /* @__PURE__ */ jsxs(
79
87
  "span",
80
88
  {
@@ -93,7 +101,8 @@ function ConnectionStatusPill({
93
101
  );
94
102
  }
95
103
  function ConnectionDot({ status, className }) {
96
- const meta = CONNECTION_STATUS_META[status];
104
+ const t = useOpenGeniText();
105
+ const meta = CONNECTION_STATUS_META(t)[status];
97
106
  return /* @__PURE__ */ jsx(
98
107
  "span",
99
108
  {
@@ -112,7 +121,8 @@ function MachineStatusPill({
112
121
  size = "md",
113
122
  className
114
123
  }) {
115
- const stateBadge = MACHINE_STATE_BADGE_META[state];
124
+ const t = useOpenGeniText();
125
+ const stateBadge = MACHINE_STATE_BADGE_META(t)[state];
116
126
  const shared = (sharedSessionCount ?? 0) > 1;
117
127
  return /* @__PURE__ */ jsxs(
118
128
  "span",
@@ -133,7 +143,7 @@ function MachineStatusPill({
133
143
  children: stateBadge.label
134
144
  }
135
145
  ) : null,
136
- shared ? /* @__PURE__ */ jsxs(
146
+ shared ? /* @__PURE__ */ jsx(
137
147
  "span",
138
148
  {
139
149
  "data-shared-chip": true,
@@ -142,11 +152,8 @@ function MachineStatusPill({
142
152
  "text-og-accent border-og-accent/30 bg-og-accent-soft",
143
153
  size === "sm" ? "px-1.5 py-px text-og-xs" : "px-2 py-0.5 text-og-sm"
144
154
  ),
145
- title: `${sharedSessionCount} sessions are on this machine`,
146
- children: [
147
- "Shared \xB7 ",
148
- sharedSessionCount
149
- ]
155
+ title: t("machineStatusPill.sessionsOnThisMachine", { count: sharedSessionCount ?? 0 }),
156
+ children: t("machineStatusPill.sharedCount", { count: sharedSessionCount ?? 0 })
150
157
  }
151
158
  ) : null
152
159
  ]
@@ -192,6 +199,7 @@ function StatTriple({
192
199
  load15,
193
200
  runQueue
194
201
  }) {
202
+ const t = useOpenGeniText();
195
203
  const stats = [
196
204
  { label: "1m", value: load1 },
197
205
  { label: "5m", value: load5 },
@@ -199,7 +207,7 @@ function StatTriple({
199
207
  ];
200
208
  return /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between gap-3", "data-metric": "load", children: [
201
209
  /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 flex-col gap-1", children: [
202
- /* @__PURE__ */ jsx2("span", { className: "text-[10px] font-medium uppercase tracking-wide text-og-fg-subtle", children: "Load" }),
210
+ /* @__PURE__ */ jsx2("span", { className: "text-[10px] font-medium uppercase tracking-wide text-og-fg-subtle", children: t("machineMetrics.load") }),
203
211
  /* @__PURE__ */ jsx2("div", { className: "flex items-baseline gap-3", children: stats.map((s) => /* @__PURE__ */ jsxs2("div", { className: "flex items-baseline gap-1", children: [
204
212
  /* @__PURE__ */ jsx2("span", { className: "text-[10px] font-medium uppercase tracking-wide text-og-fg-subtle", children: s.label }),
205
213
  /* @__PURE__ */ jsx2("span", { className: "font-og-mono text-[12px] tabular-nums text-og-fg", children: s.value.toFixed(2) })
@@ -211,7 +219,7 @@ function StatTriple({
211
219
  className: "flex shrink-0 items-baseline gap-1.5 rounded-og-sm bg-og-surface-2 px-2 py-1 text-[11px] text-og-fg-subtle",
212
220
  "data-metric": "runqueue",
213
221
  children: [
214
- /* @__PURE__ */ jsx2("span", { className: "font-medium uppercase tracking-wide", children: "Queue" }),
222
+ /* @__PURE__ */ jsx2("span", { className: "font-medium uppercase tracking-wide", children: t("machineMetrics.queue") }),
215
223
  /* @__PURE__ */ jsx2("span", { className: "font-og-mono tabular-nums text-og-fg-muted", children: runQueue })
216
224
  ]
217
225
  }
@@ -219,8 +227,9 @@ function StatTriple({
219
227
  ] });
220
228
  }
221
229
  function MachineMetrics({ metrics, density = "compact", className }) {
230
+ const t = useOpenGeniText();
222
231
  if (!metrics) {
223
- return /* @__PURE__ */ jsx2("div", { className: cn("text-[11px] text-og-fg-subtle", className), "data-metrics-empty": true, children: "No metrics yet" });
232
+ return /* @__PURE__ */ jsx2("div", { className: cn("text-[11px] text-og-fg-subtle", className), "data-metrics-empty": true, children: t("machineMetrics.noMetricsYet") });
224
233
  }
225
234
  const memPct2 = metrics.memTotalBytes > 0 ? metrics.memUsedBytes / metrics.memTotalBytes * 100 : 0;
226
235
  const diskPct2 = metrics.diskTotalBytes > 0 ? metrics.diskUsedBytes / metrics.diskTotalBytes * 100 : 0;
@@ -232,7 +241,7 @@ function MachineMetrics({ metrics, density = "compact", className }) {
232
241
  /* @__PURE__ */ jsx2(
233
242
  Meter,
234
243
  {
235
- label: "Memory",
244
+ label: t("machineMetrics.memory"),
236
245
  value: `${formatBytes(metrics.memUsedBytes)} / ${formatBytes(metrics.memTotalBytes)}`,
237
246
  fillPct: memPct2,
238
247
  tone: toneFor(memPct2)
@@ -241,7 +250,7 @@ function MachineMetrics({ metrics, density = "compact", className }) {
241
250
  /* @__PURE__ */ jsx2(
242
251
  Meter,
243
252
  {
244
- label: "Disk",
253
+ label: t("machineMetrics.disk"),
245
254
  value: `${formatBytes(metrics.diskUsedBytes)} / ${formatBytes(metrics.diskTotalBytes)}`,
246
255
  fillPct: diskPct2,
247
256
  tone: toneFor(diskPct2)
@@ -252,7 +261,7 @@ function MachineMetrics({ metrics, density = "compact", className }) {
252
261
  /* @__PURE__ */ jsx2(
253
262
  Meter,
254
263
  {
255
- label: "CPU",
264
+ label: t("machineMetrics.cpu"),
256
265
  value: `${metrics.cpuPct.toFixed(0)}%`,
257
266
  fillPct: metrics.cpuPct,
258
267
  tone: toneFor(metrics.cpuPct)
@@ -261,7 +270,7 @@ function MachineMetrics({ metrics, density = "compact", className }) {
261
270
  hasGpu ? /* @__PURE__ */ jsx2(
262
271
  Meter,
263
272
  {
264
- label: "GPU",
273
+ label: t("machineMetrics.gpu"),
265
274
  value: gpuMemLabel ? `${metrics.gpuUtilPct.toFixed(0)}% \xB7 ${gpuMemLabel}` : `${metrics.gpuUtilPct.toFixed(0)}%`,
266
275
  fillPct: metrics.gpuUtilPct,
267
276
  tone: toneFor(metrics.gpuUtilPct)
@@ -285,12 +294,9 @@ import {
285
294
  AlertTriangleIcon,
286
295
  ArrowRightIcon,
287
296
  CpuIcon,
288
- CircleCheckIcon,
289
- DownloadIcon,
290
297
  LaptopIcon,
291
298
  MonitorIcon,
292
299
  MonitorOffIcon,
293
- LoaderCircleIcon,
294
300
  ServerIcon,
295
301
  UsersIcon
296
302
  } from "lucide-react";
@@ -306,36 +312,77 @@ function pct2(used, total) {
306
312
  if (!Number.isFinite(used) || !Number.isFinite(total) || total <= 0) return 0;
307
313
  return used / total * 100;
308
314
  }
309
- function deriveHealth(state, metrics, now = Date.now()) {
315
+ function deriveHealth(msg, state, metrics, now = Date.now()) {
310
316
  if (state === "offline") {
311
- return { level: "offline", label: "Offline", reason: "Not reachable", stale: true };
317
+ return {
318
+ level: "offline",
319
+ label: msg("machines.health.offline"),
320
+ reason: msg("machines.health.notReachable"),
321
+ stale: true
322
+ };
312
323
  }
313
324
  if (state === "enrolling") {
314
- return { level: "unknown", label: "Enrolling", reason: "Completing enrollment", stale: false };
325
+ return {
326
+ level: "unknown",
327
+ label: msg("machines.health.enrolling"),
328
+ reason: msg("machines.health.completingEnrollment"),
329
+ stale: false
330
+ };
315
331
  }
316
332
  const stale = metrics ? now - new Date(metrics.sampledAt).getTime() > STALE_AFTER_MS : true;
317
333
  if (state === "reconnecting") {
318
- return { level: "degraded", label: "Reconnecting", reason: "Re-establishing link", stale };
334
+ return {
335
+ level: "degraded",
336
+ label: msg("machines.health.reconnecting"),
337
+ reason: msg("machines.health.reEstablishingLink"),
338
+ stale
339
+ };
319
340
  }
320
341
  if (!metrics) {
321
- return { level: "unknown", label: "Online", reason: "Awaiting first sample", stale };
342
+ return {
343
+ level: "unknown",
344
+ label: msg("machines.health.online"),
345
+ reason: msg("machines.health.awaitingFirstSample"),
346
+ stale
347
+ };
322
348
  }
323
349
  if (stale) {
324
- return { level: "degraded", label: "Telemetry stale", reason: "No recent sample", stale: true };
350
+ return {
351
+ level: "degraded",
352
+ label: msg("machines.health.telemetryStale"),
353
+ reason: msg("machines.health.noRecentSample"),
354
+ stale: true
355
+ };
325
356
  }
326
357
  const memPct2 = pct2(metrics.memUsedBytes, metrics.memTotalBytes);
327
358
  const diskPct2 = pct2(metrics.diskUsedBytes, metrics.diskTotalBytes);
328
359
  const cpu = metrics.cpuPct;
329
360
  const pressures = [
330
- resolve("Disk", diskPct2, PRESSURE.disk),
331
- resolve("Memory", memPct2, PRESSURE.mem),
361
+ resolve(msg("machines.health.disk"), diskPct2, PRESSURE.disk),
362
+ resolve(msg("machines.health.memory"), memPct2, PRESSURE.mem),
332
363
  resolve("CPU", cpu, PRESSURE.cpu)
333
364
  ];
334
365
  const worst = pressures.reduce((a, b) => b.sev > a.sev ? b : a);
335
- if (worst.sev === 2) return { level: "critical", label: "Critical", reason: worst.reason, stale };
366
+ if (worst.sev === 2)
367
+ return {
368
+ level: "critical",
369
+ label: msg("machines.health.critical"),
370
+ reason: worst.reason,
371
+ stale
372
+ };
336
373
  if (worst.sev === 1)
337
- return { level: "degraded", label: "Under load", reason: worst.reason, stale };
338
- return { level: "healthy", label: "Healthy", reason: "All systems nominal", stale };
374
+ return {
375
+ level: "degraded",
376
+ label: msg("machines.health.underLoad"),
377
+ reason: worst.reason,
378
+ stale
379
+ };
380
+ return {
381
+ level: "healthy",
382
+ label: msg("machines.health.healthy"),
383
+ reason: msg("machines.health.allSystemsNominal"),
384
+ stale
385
+ };
339
386
  }
340
387
  function resolve(name, value, t) {
341
388
  const rounded = Math.round(value);
@@ -383,9 +430,10 @@ function MachineHealthPill({
383
430
  size = "sm",
384
431
  className
385
432
  }) {
386
- const health = deriveHealth(state, metrics, now ?? Date.now());
433
+ const t = useOpenGeniText();
434
+ const health = deriveHealth(t, state, metrics, now ?? Date.now());
387
435
  const tone = HEALTH_TOKEN[health.level];
388
- const badge = MACHINE_STATE_BADGE_META[state];
436
+ const badge = MACHINE_STATE_BADGE_META(t)[state];
389
437
  const pad = size === "md" ? "px-2.5 py-1 text-og-sm" : "px-2 py-0.5 text-og-xs";
390
438
  return /* @__PURE__ */ jsxs3("div", { className: cn("flex shrink-0 items-center gap-1.5", className), children: [
391
439
  badge ? /* @__PURE__ */ jsx3(
@@ -429,8 +477,201 @@ function MachineHealthPill({
429
477
  ] });
430
478
  }
431
479
 
480
+ // src/components/machines/agent-status-icon.tsx
481
+ import {
482
+ CircleAlertIcon,
483
+ CircleCheckIcon,
484
+ ClockIcon,
485
+ DownloadIcon,
486
+ LoaderCircleIcon,
487
+ TriangleAlertIcon
488
+ } from "lucide-react";
489
+ import { jsx as jsx4 } from "react/jsx-runtime";
490
+ function AgentStatusIcon({ tone, className }) {
491
+ const size = cn("size-3.5 shrink-0", className);
492
+ switch (tone) {
493
+ case "ok":
494
+ return /* @__PURE__ */ jsx4(CircleCheckIcon, { className: cn(size, "text-og-status-idle"), "aria-hidden": true });
495
+ case "progress":
496
+ return /* @__PURE__ */ jsx4(LoaderCircleIcon, { className: cn(size, "animate-og-spin text-og-accent"), "aria-hidden": true });
497
+ case "waiting":
498
+ return /* @__PURE__ */ jsx4(ClockIcon, { className: cn(size, "text-og-fg-subtle"), "aria-hidden": true });
499
+ case "attention":
500
+ return /* @__PURE__ */ jsx4(TriangleAlertIcon, { className: cn(size, "text-og-status-waiting"), "aria-hidden": true });
501
+ case "failed":
502
+ return /* @__PURE__ */ jsx4(CircleAlertIcon, { className: cn(size, "text-og-status-failed"), "aria-hidden": true });
503
+ default:
504
+ return /* @__PURE__ */ jsx4(DownloadIcon, { className: cn(size, "text-og-fg-subtle"), "aria-hidden": true });
505
+ }
506
+ }
507
+
508
+ // src/components/machines/machine-status.ts
509
+ var UPDATE_CONFIRMATION_GRACE_MS = 3e4;
510
+ function isPostponedUpdate(errorCode) {
511
+ return typeof errorCode === "string" && errorCode.startsWith("update_busy");
512
+ }
513
+ var FAILURE_REASON = (t) => ({
514
+ update_state_unavailable: t("machines.machineStatus.theAgentCouldnTCheck"),
515
+ agent_offline: t("machines.machineStatus.theMachineWasOffline"),
516
+ update_dispatch_rejected: t("machines.machineStatus.theAgentRefusedTheRequest"),
517
+ invalid_agent_response: t("machines.machineStatus.theAgentSentAnUnexpected")
518
+ });
519
+ function failureReason(t, code) {
520
+ if (!code) return null;
521
+ return FAILURE_REASON(t)[code] ?? code.replaceAll("_", " ");
522
+ }
523
+ var ACTIVE_STATUSES = /* @__PURE__ */ new Set([
524
+ "requested",
525
+ "accepted",
526
+ "waiting_for_idle",
527
+ "downloading",
528
+ "verifying",
529
+ "applying",
530
+ "restarting"
531
+ ]);
532
+ function describeAgentRuntime(t, runtime, now) {
533
+ const installed = runtime.installedVersion;
534
+ const title = installed ? t("machines.machineStatus.agentVInstalled", { installed }) : t("machines.machineStatus.agentVersionUnknown");
535
+ const blocked = runtime.updateBlockedReason?.trim() || null;
536
+ const update = runtime.update;
537
+ const target = update ? `v${update.targetVersion}` : null;
538
+ const alreadyInstalled = update !== null && (update.targetVersion === installed || runtime.versionState === "current" || runtime.versionState === "ahead");
539
+ if (update && ACTIVE_STATUSES.has(update.status) && !alreadyInstalled) {
540
+ const base = { title, tone: "progress", note: null, action: null };
541
+ switch (update.status) {
542
+ case "requested": {
543
+ const stalled = now - new Date(update.updatedAt).getTime() >= UPDATE_CONFIRMATION_GRACE_MS;
544
+ return stalled ? {
545
+ title,
546
+ status: t("machines.machineStatus.theAgentHasnTConfirmed", { target }),
547
+ tone: "attention",
548
+ note: null,
549
+ action: { kind: "resend", label: t("machines.machineStatus.sendAgain") }
550
+ } : { ...base, status: t("machines.machineStatus.sendingTheUpdateToTarget", { target }) };
551
+ }
552
+ case "accepted":
553
+ return { ...base, status: t("machines.machineStatus.updatingToTarget", { target }) };
554
+ case "waiting_for_idle":
555
+ return {
556
+ ...base,
557
+ tone: "waiting",
558
+ status: t("machines.machineStatus.updatesToTargetWhenCurrent", { target })
559
+ };
560
+ case "downloading":
561
+ return { ...base, status: `Downloading ${target}\u2026` };
562
+ case "verifying":
563
+ return { ...base, status: `Verifying ${target}\u2026` };
564
+ case "applying":
565
+ return { ...base, status: `Installing ${target}\u2026` };
566
+ default:
567
+ return { ...base, status: t("machines.machineStatus.restartingTheAgent") };
568
+ }
569
+ }
570
+ if (update?.status === "failed" && !alreadyInstalled) {
571
+ if (isPostponedUpdate(update.errorCode)) {
572
+ const browsersWouldClose = update.errorCode === "update_busy_browsers";
573
+ return {
574
+ title,
575
+ status: browsersWouldClose ? t("machines.machineStatus.updateToTargetPostponedOpen", { target }) : t("machines.machineStatus.updateToTargetPostponedWhile", { target }),
576
+ tone: "waiting",
577
+ note: blocked ?? (browsersWouldClose ? t("machines.machineStatus.theInstalledAgentClosesIts") : null),
578
+ action: blocked ? null : { kind: "update", label: t("machines.machineStatus.updateNow") }
579
+ };
580
+ }
581
+ const reason = failureReason(t, update.errorCode);
582
+ const retry = update.retryable && !blocked ? { kind: "retry", label: t("machines.machineStatus.tryAgain") } : null;
583
+ if (update.rolledBack) {
584
+ return {
585
+ title,
586
+ status: t("machines.machineStatus.couldnTUpdateToTarget", { target }),
587
+ tone: "attention",
588
+ note: blocked ?? (reason ? t("machines.machineStatus.reasonReason", { reason }) : null),
589
+ action: retry
590
+ };
591
+ }
592
+ return {
593
+ title,
594
+ status: t("machines.machineStatus.updateToTargetFailed", { target }),
595
+ tone: "failed",
596
+ note: blocked ?? (reason ? t("machines.machineStatus.reasonReason", { reason }) : null),
597
+ action: retry
598
+ };
599
+ }
600
+ const desired = runtime.desiredVersion;
601
+ switch (runtime.versionState) {
602
+ case "current":
603
+ return {
604
+ title,
605
+ status: runtime.updateChannel === "beta" ? t("machines.machineStatus.upToDateBeta") : t("machines.machineStatus.upToDate"),
606
+ tone: "ok",
607
+ note: null,
608
+ action: null
609
+ };
610
+ case "ahead":
611
+ return {
612
+ title,
613
+ status: desired ? t("machines.machineStatus.newerThanTheReleasedV", { desired }) : t("machines.machineStatus.newerThanTheRelease"),
614
+ tone: "muted",
615
+ note: null,
616
+ action: null
617
+ };
618
+ case "unknown":
619
+ return {
620
+ title,
621
+ status: desired ? t("machines.machineStatus.latestIsVDesired", { desired }) : t("machines.machineStatus.noReleaseConfigured"),
622
+ tone: "muted",
623
+ note: blocked,
624
+ action: null
625
+ };
626
+ default:
627
+ if (!desired || desired === installed) {
628
+ return {
629
+ title,
630
+ status: t("machines.machineStatus.upToDate"),
631
+ tone: "ok",
632
+ note: null,
633
+ action: null
634
+ };
635
+ }
636
+ return {
637
+ title,
638
+ status: `v${desired} available`,
639
+ tone: "waiting",
640
+ note: blocked,
641
+ action: blocked ? null : { kind: "update", label: t("machines.machineStatus.update") }
642
+ };
643
+ }
644
+ }
645
+ var RUNNER_CONFLICT_ACTIVE_MS = 2 * 6e4;
646
+ function runnerConflict(authority, now) {
647
+ if (authority.duplicateRunnerDeniedCount <= 0) return null;
648
+ const lastAt = authority.duplicateRunnerDeniedAt;
649
+ const last = lastAt ? new Date(lastAt).getTime() : Number.NaN;
650
+ return {
651
+ active: Number.isFinite(last) && now - last < RUNNER_CONFLICT_ACTIVE_MS,
652
+ count: authority.duplicateRunnerDeniedCount,
653
+ lastAt
654
+ };
655
+ }
656
+ function describeAgentConnection(t, authority) {
657
+ const label = authority.state === "active" ? t("machines.machineStatus.agentConnected") : authority.state === "expired" ? t("machines.machineStatus.agentConnectionLapsed") : t("machines.machineStatus.agentNotConnectedYet");
658
+ const n = authority.supersededCount;
659
+ return {
660
+ label,
661
+ detail: n > 0 ? t("machines.machineStatus.reconnectedTimesSinceSetup", { count: n }) : null
662
+ };
663
+ }
664
+ var STATUS_TONE_TEXT = {
665
+ ok: "text-og-status-idle",
666
+ progress: "text-og-accent",
667
+ waiting: "text-og-fg-muted",
668
+ attention: "text-og-status-waiting",
669
+ failed: "text-og-status-failed",
670
+ muted: "text-og-fg-subtle"
671
+ };
672
+
432
673
  // src/components/machines/metric-sparkline.tsx
433
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
674
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
434
675
  var VW = 120;
435
676
  function MetricSparkline({
436
677
  points,
@@ -443,7 +684,7 @@ function MetricSparkline({
443
684
  (p) => p.v != null && Number.isFinite(p.v)
444
685
  );
445
686
  if (valued.length < 2) {
446
- return /* @__PURE__ */ jsx4("div", { className, style: { height }, "aria-hidden": true });
687
+ return /* @__PURE__ */ jsx5("div", { className, style: { height }, "aria-hidden": true });
447
688
  }
448
689
  const vh = height;
449
690
  const top = yMax === "auto" ? Math.max(1, ...valued.map((p) => p.v)) * 1.1 : yMax;
@@ -472,12 +713,12 @@ function MetricSparkline({
472
713
  style: { height, width: "100%" },
473
714
  "aria-hidden": true,
474
715
  children: [
475
- /* @__PURE__ */ jsx4("defs", { children: /* @__PURE__ */ jsxs4("linearGradient", { id: gid, x1: "0", y1: "0", x2: "0", y2: "1", children: [
476
- /* @__PURE__ */ jsx4("stop", { offset: "0%", stopColor: color, stopOpacity: "0.22" }),
477
- /* @__PURE__ */ jsx4("stop", { offset: "100%", stopColor: color, stopOpacity: "0" })
716
+ /* @__PURE__ */ jsx5("defs", { children: /* @__PURE__ */ jsxs4("linearGradient", { id: gid, x1: "0", y1: "0", x2: "0", y2: "1", children: [
717
+ /* @__PURE__ */ jsx5("stop", { offset: "0%", stopColor: color, stopOpacity: "0.22" }),
718
+ /* @__PURE__ */ jsx5("stop", { offset: "100%", stopColor: color, stopOpacity: "0" })
478
719
  ] }) }),
479
- /* @__PURE__ */ jsx4("path", { d: `${d} L${last.x},${vh} L${xy[0].x},${vh} Z`, fill: `url(#${gid})` }),
480
- /* @__PURE__ */ jsx4(
720
+ /* @__PURE__ */ jsx5("path", { d: `${d} L${last.x},${vh} L${xy[0].x},${vh} Z`, fill: `url(#${gid})` }),
721
+ /* @__PURE__ */ jsx5(
481
722
  "path",
482
723
  {
483
724
  d,
@@ -489,19 +730,21 @@ function MetricSparkline({
489
730
  vectorEffect: "non-scaling-stroke"
490
731
  }
491
732
  ),
492
- /* @__PURE__ */ jsx4("circle", { cx: last.x, cy: last.y, r: 1.6, fill: color, vectorEffect: "non-scaling-stroke" })
733
+ /* @__PURE__ */ jsx5("circle", { cx: last.x, cy: last.y, r: 1.6, fill: color, vectorEffect: "non-scaling-stroke" })
493
734
  ]
494
735
  }
495
736
  );
496
737
  }
497
738
 
498
739
  // src/components/machine-card.tsx
499
- import { Fragment, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
740
+ import { Fragment, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
500
741
  function KindIcon({ machine }) {
501
- if (machine.isSessionGroup)
502
- return /* @__PURE__ */ jsx5(ServerIcon, { className: "size-4 text-og-fg-subtle", "aria-hidden": true });
503
- if (machine.kind === "modal") return /* @__PURE__ */ jsx5(CpuIcon, { className: "size-4 text-og-fg-subtle", "aria-hidden": true });
504
- return /* @__PURE__ */ jsx5(LaptopIcon, { className: "size-4 text-og-fg-subtle", "aria-hidden": true });
742
+ if (machine.kind === "local" || machine.kind === "selfhosted")
743
+ return /* @__PURE__ */ jsx6(LaptopIcon, { className: "size-4 text-og-fg-subtle", "aria-hidden": true });
744
+ if (machine.kind === "docker" || machine.isSessionGroup)
745
+ return /* @__PURE__ */ jsx6(ServerIcon, { className: "size-4 text-og-fg-subtle", "aria-hidden": true });
746
+ if (machine.kind === "modal") return /* @__PURE__ */ jsx6(CpuIcon, { className: "size-4 text-og-fg-subtle", "aria-hidden": true });
747
+ return /* @__PURE__ */ jsx6(ServerIcon, { className: "size-4 text-og-fg-subtle", "aria-hidden": true });
505
748
  }
506
749
  function MachineCard({
507
750
  machine,
@@ -514,41 +757,18 @@ function MachineCard({
514
757
  now,
515
758
  className
516
759
  }) {
760
+ const msg = useOpenGeniText();
517
761
  const offline = machine.state === "offline";
518
762
  const attachable = !machine.active && !offline && Boolean(onAttach);
519
763
  const shared = machine.sharedSessionCount > 1;
520
764
  const clockNow = now ?? Date.now();
521
- const sampledAgo = machine.metrics ? formatRelativeTime(machine.metrics.sampledAt, new Date(clockNow)) : null;
765
+ const sampledAgo = machine.metrics ? formatRelativeTime(msg, machine.metrics.sampledAt, new Date(clockNow)) : null;
522
766
  const cpuPts = (series ?? []).map((s) => ({ t: new Date(s.sampledAt).getTime(), v: s.cpuPct }));
523
767
  const openable = Boolean(onOpenDetail);
524
768
  const runtime = machine.runtime;
525
- const updateRunning = runtime?.versionState === "updating";
526
- const dispatchConfirmationStalled = runtime?.update?.status === "requested" && clockNow - new Date(runtime.update.updatedAt).getTime() >= 3e4;
527
- const canUpdate = Boolean(machine.enrollmentId && onUpdateAgent) && !offline && (runtime?.versionState === "outdated" || runtime?.versionState === "update_failed" || dispatchConfirmationStalled);
528
- const updateLabel = (() => {
529
- const update = runtime?.update;
530
- if (!update) return null;
531
- switch (update.status) {
532
- case "requested":
533
- return dispatchConfirmationStalled ? "Agent confirmation delayed" : "Confirming with agent";
534
- case "accepted":
535
- return "Update accepted";
536
- case "waiting_for_idle":
537
- return "Waiting for current work";
538
- case "downloading":
539
- case "verifying":
540
- case "applying":
541
- return `${update.status}\u2026`;
542
- case "restarting":
543
- return "Restarting agent";
544
- case "succeeded":
545
- return `Updated \xB7 v${update.targetVersion}`;
546
- case "failed": {
547
- const detail = update.errorCode?.replaceAll("_", " ");
548
- return update.rolledBack ? `Update rolled back safely${detail ? ` \xB7 ${detail}` : ""}` : `Update failed${detail ? ` \xB7 ${detail}` : ""}`;
549
- }
550
- }
551
- })();
769
+ const agent = runtime ? describeAgentRuntime(msg, runtime, clockNow) : null;
770
+ const updateAction = agent?.action && machine.enrollmentId && onUpdateAgent && !offline ? agent.action : null;
771
+ const conflict = runnerConflict(machine.connectionAuthority, clockNow);
552
772
  return /* @__PURE__ */ jsxs5(
553
773
  "div",
554
774
  {
@@ -571,41 +791,41 @@ function MachineCard({
571
791
  className
572
792
  ),
573
793
  children: [
574
- machine.active ? /* @__PURE__ */ jsx5("span", { "aria-hidden": true, className: "absolute inset-y-0 left-0 w-0.5 bg-og-accent" }) : null,
794
+ machine.active ? /* @__PURE__ */ jsx6("span", { "aria-hidden": true, className: "absolute inset-y-0 left-0 w-0.5 bg-og-accent" }) : null,
575
795
  /* @__PURE__ */ jsxs5("div", { className: "flex items-start justify-between gap-3", children: [
576
796
  /* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 items-start gap-2.5", children: [
577
- /* @__PURE__ */ jsx5("span", { className: "mt-0.5 shrink-0", children: /* @__PURE__ */ jsx5(KindIcon, { machine }) }),
797
+ /* @__PURE__ */ jsx6("span", { className: "mt-0.5 shrink-0", children: /* @__PURE__ */ jsx6(KindIcon, { machine }) }),
578
798
  /* @__PURE__ */ jsxs5("div", { className: "min-w-0", children: [
579
799
  /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2", children: [
580
- /* @__PURE__ */ jsx5("span", { className: "truncate text-og-base font-medium text-og-fg", children: machine.name }),
581
- machine.active ? /* @__PURE__ */ jsx5(
800
+ /* @__PURE__ */ jsx6("span", { className: "truncate text-og-base font-medium text-og-fg", children: machine.name }),
801
+ machine.active ? /* @__PURE__ */ jsx6(
582
802
  "span",
583
803
  {
584
804
  "data-active-marker": true,
585
805
  className: "shrink-0 rounded-full border border-og-accent/30 bg-og-accent-soft px-1.5 py-px text-og-xs font-medium text-og-accent",
586
- children: "Active"
806
+ children: msg("machineCard.active")
587
807
  }
588
808
  ) : null
589
809
  ] }),
590
810
  /* @__PURE__ */ jsxs5("div", { className: "mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-og-xs text-og-fg-subtle", children: [
591
- /* @__PURE__ */ jsx5("span", { "data-machine-scope": machine.scope, className: "capitalize", children: machine.scope === "user" ? "personal" : machine.scope }),
592
- /* @__PURE__ */ jsx5("span", { "aria-hidden": true, children: "\xB7" }),
593
- /* @__PURE__ */ jsx5("span", { className: "capitalize", children: machine.isSessionGroup ? "session sandbox" : machine.kind }),
594
- /* @__PURE__ */ jsx5("span", { "aria-hidden": true, children: "\xB7" }),
811
+ /* @__PURE__ */ jsx6("span", { "data-machine-scope": machine.scope, children: machineScopeLabel(msg, machine.scope) }),
812
+ /* @__PURE__ */ jsx6("span", { "aria-hidden": true, children: "\xB7" }),
813
+ /* @__PURE__ */ jsx6("span", { className: "capitalize", children: machine.kind }),
814
+ /* @__PURE__ */ jsx6("span", { "aria-hidden": true, children: "\xB7" }),
595
815
  /* @__PURE__ */ jsxs5("span", { className: "font-og-mono", children: [
596
816
  machine.os,
597
817
  "/",
598
818
  machine.arch
599
819
  ] }),
600
- /* @__PURE__ */ jsx5("span", { "aria-hidden": true, children: "\xB7" }),
820
+ /* @__PURE__ */ jsx6("span", { "aria-hidden": true, children: "\xB7" }),
601
821
  /* @__PURE__ */ jsxs5("span", { className: "inline-flex items-center gap-1", children: [
602
- machine.hasDisplay ? /* @__PURE__ */ jsx5(MonitorIcon, { className: "size-3", "aria-hidden": true }) : /* @__PURE__ */ jsx5(MonitorOffIcon, { className: "size-3", "aria-hidden": true }),
603
- machine.hasDisplay ? "display" : "headless"
822
+ machine.hasDisplay ? /* @__PURE__ */ jsx6(MonitorIcon, { className: "size-3", "aria-hidden": true }) : /* @__PURE__ */ jsx6(MonitorOffIcon, { className: "size-3", "aria-hidden": true }),
823
+ machine.hasDisplay ? msg("machineCard.display") : msg("machineCard.headless")
604
824
  ] })
605
825
  ] })
606
826
  ] })
607
827
  ] }),
608
- /* @__PURE__ */ jsx5(
828
+ /* @__PURE__ */ jsx6(
609
829
  MachineHealthPill,
610
830
  {
611
831
  state: machine.state,
@@ -622,25 +842,31 @@ function MachineCard({
622
842
  "data-shared-disclosure": true,
623
843
  className: "flex items-center gap-1.5 rounded-og-md border border-og-accent/25 bg-og-accent-soft px-2.5 py-1.5 text-og-xs text-og-fg-muted",
624
844
  children: [
625
- /* @__PURE__ */ jsx5(UsersIcon, { className: "size-3.5 shrink-0 text-og-accent", "aria-hidden": true }),
626
- "Shared \u2014 ",
627
- machine.sharedSessionCount,
628
- " sessions are on this machine."
845
+ /* @__PURE__ */ jsx6(UsersIcon, { className: "size-3.5 shrink-0 text-og-accent", "aria-hidden": true }),
846
+ msg("machineCard.sharedSharedsessioncountSessionsAreOn", {
847
+ sharedSessionCount: machine.sharedSessionCount
848
+ })
629
849
  ]
630
850
  }
631
851
  ) : null,
632
- machine.connectionAuthority.duplicateRunnerDeniedCount > 0 ? /* @__PURE__ */ jsxs5(
852
+ conflict?.active ? /* @__PURE__ */ jsxs5(
633
853
  "p",
634
854
  {
635
855
  "data-runner-conflict": true,
636
- className: "flex items-center gap-1.5 rounded-og-md border border-og-status-failed/30 bg-og-status-failed/5 px-2.5 py-1.5 text-og-xs text-og-status-failed",
856
+ className: "flex items-start gap-1.5 rounded-og-md border border-og-status-waiting/30 bg-og-status-waiting/5 px-2.5 py-1.5 text-og-xs text-og-fg-muted",
637
857
  children: [
638
- /* @__PURE__ */ jsx5(AlertTriangleIcon, { className: "size-3.5 shrink-0", "aria-hidden": true }),
639
- "Competing agent process blocked. Open diagnostics for details."
858
+ /* @__PURE__ */ jsx6(
859
+ AlertTriangleIcon,
860
+ {
861
+ className: "mt-px size-3.5 shrink-0 text-og-status-waiting",
862
+ "aria-hidden": true
863
+ }
864
+ ),
865
+ /* @__PURE__ */ jsx6("span", { children: msg("machineCard.aSecondCopyOfThe") })
640
866
  ]
641
867
  }
642
868
  ) : null,
643
- runtime ? /* @__PURE__ */ jsxs5(
869
+ agent ? /* @__PURE__ */ jsxs5(
644
870
  "div",
645
871
  {
646
872
  "data-agent-runtime": true,
@@ -648,46 +874,52 @@ function MachineCard({
648
874
  children: [
649
875
  /* @__PURE__ */ jsxs5("div", { className: "min-w-0", children: [
650
876
  /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-1.5 text-og-fg-muted", children: [
651
- runtime.versionState === "current" ? /* @__PURE__ */ jsx5(CircleCheckIcon, { className: "size-3.5 text-og-status-idle", "aria-hidden": true }) : updateRunning ? /* @__PURE__ */ jsx5(LoaderCircleIcon, { className: "size-3.5 animate-og-spin text-og-accent", "aria-hidden": true }) : /* @__PURE__ */ jsx5(DownloadIcon, { className: "size-3.5", "aria-hidden": true }),
652
- /* @__PURE__ */ jsxs5("span", { className: "truncate", children: [
653
- "Agent",
654
- " ",
655
- runtime.installedVersion ? `v${runtime.installedVersion}` : "version unknown"
656
- ] })
877
+ /* @__PURE__ */ jsx6(AgentStatusIcon, { tone: agent.tone }),
878
+ /* @__PURE__ */ jsx6("span", { className: "truncate", children: agent.title })
657
879
  ] }),
658
- /* @__PURE__ */ jsx5("p", { className: "mt-0.5 truncate text-og-fg-subtle", children: updateLabel ?? (runtime.versionState === "current" ? `Current \xB7 ${runtime.updateChannel ?? "channel unknown"}` : runtime.desiredVersion ? `Promoted v${runtime.desiredVersion}` : "No promoted version configured") })
880
+ /* @__PURE__ */ jsx6(
881
+ "p",
882
+ {
883
+ "data-agent-status": agent.tone,
884
+ className: cn("mt-0.5", STATUS_TONE_TEXT[agent.tone]),
885
+ children: agent.status
886
+ }
887
+ ),
888
+ agent.note ? /* @__PURE__ */ jsx6("p", { className: "mt-1 text-og-fg-muted", children: agent.note }) : null
659
889
  ] }),
660
- canUpdate ? /* @__PURE__ */ jsx5(
890
+ updateAction ? /* @__PURE__ */ jsx6(
661
891
  "button",
662
892
  {
663
893
  type: "button",
664
894
  "data-update-agent": true,
895
+ "data-update-action": updateAction.kind,
665
896
  disabled: updatingAgent,
666
897
  onClick: (event) => {
667
898
  event.stopPropagation();
668
899
  onUpdateAgent?.(machine);
669
900
  },
670
901
  className: "shrink-0 rounded-og-sm border border-og-border px-2 py-1 font-medium text-og-fg-muted transition-colors hover:border-og-border-strong hover:text-og-fg disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:min-h-11",
671
- children: updatingAgent ? "Starting\u2026" : dispatchConfirmationStalled ? "Retry delivery" : runtime.versionState === "update_failed" ? "Retry" : "Update"
902
+ children: updatingAgent ? msg("machineCard.starting") : updateAction.label
672
903
  }
673
904
  ) : null
674
905
  ]
675
906
  }
676
907
  ) : null,
677
- /* @__PURE__ */ jsx5(MachineMetrics, { metrics: machine.metrics }),
908
+ /* @__PURE__ */ jsx6(MachineMetrics, { metrics: machine.metrics }),
678
909
  cpuPts.length > 1 ? /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-1 rounded-og-md bg-og-surface-2/40 p-2.5", children: [
679
910
  /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-between text-[10px] font-medium uppercase tracking-wide text-og-fg-subtle", children: [
680
- /* @__PURE__ */ jsx5("span", { children: "CPU \xB7 last 15m" }),
911
+ /* @__PURE__ */ jsx6("span", { children: msg("machineCard.cpuLast15m") }),
681
912
  openable ? /* @__PURE__ */ jsxs5("span", { className: "flex items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100", children: [
682
- "Telemetry ",
683
- /* @__PURE__ */ jsx5(ArrowRightIcon, { className: "size-2.5", "aria-hidden": true })
913
+ msg("machineCard.telemetry"),
914
+ " ",
915
+ /* @__PURE__ */ jsx6(ArrowRightIcon, { className: "size-2.5", "aria-hidden": true })
684
916
  ] }) : null
685
917
  ] }),
686
- /* @__PURE__ */ jsx5(MetricSparkline, { points: cpuPts, color: "var(--og-color-accent)", yMax: 100, height: 26 })
918
+ /* @__PURE__ */ jsx6(MetricSparkline, { points: cpuPts, color: "var(--og-color-accent)", yMax: 100, height: 26 })
687
919
  ] }) : null,
688
920
  /* @__PURE__ */ jsxs5("div", { className: "mt-1 flex items-center justify-between gap-3 text-og-xs text-og-fg-subtle", children: [
689
- /* @__PURE__ */ jsx5("span", { className: "inline-flex items-center gap-1.5", children: sampledAgo ? /* @__PURE__ */ jsxs5(Fragment, { children: [
690
- /* @__PURE__ */ jsx5(
921
+ /* @__PURE__ */ jsx6("span", { className: "inline-flex items-center gap-1.5", children: sampledAgo ? /* @__PURE__ */ jsxs5(Fragment, { children: [
922
+ /* @__PURE__ */ jsx6(
691
923
  "span",
692
924
  {
693
925
  className: cn(
@@ -697,12 +929,13 @@ function MachineCard({
697
929
  "aria-hidden": true
698
930
  }
699
931
  ),
700
- sampledAgo === "now" ? "Live" : `Updated ${sampledAgo} ago`
932
+ sampledAgo === "now" ? msg("machineCard.live") : msg("machineCard.updatedSampledagoAgo", { sampledAgo })
701
933
  ] }) : machine.lastSeenAt ? /* @__PURE__ */ jsxs5(Fragment, { children: [
702
- "Last seen ",
703
- formatRelativeTime(machine.lastSeenAt, new Date(clockNow))
704
- ] }) : "Never connected" }),
705
- machine.active ? /* @__PURE__ */ jsx5("span", { className: "text-og-accent", children: "Routing here" }) : attachable ? /* @__PURE__ */ jsx5(
934
+ msg("machineCard.lastSeen"),
935
+ " ",
936
+ formatRelativeTime(msg, machine.lastSeenAt, new Date(clockNow))
937
+ ] }) : msg("machineCard.neverConnected") }),
938
+ machine.active ? /* @__PURE__ */ jsx6("span", { className: "text-og-accent", children: msg("machineCard.routingHere") }) : attachable ? /* @__PURE__ */ jsx6(
706
939
  "button",
707
940
  {
708
941
  type: "button",
@@ -716,9 +949,9 @@ function MachineCard({
716
949
  "rounded-og-sm border border-og-border px-2.5 py-1 text-og-xs font-medium text-og-fg-muted transition-colors pointer-coarse:min-h-11",
717
950
  "hover:border-og-border-strong hover:text-og-fg disabled:cursor-not-allowed disabled:opacity-50"
718
951
  ),
719
- children: attaching ? "Switching\u2026" : "Attach"
952
+ children: attaching ? msg("machineCard.switching") : msg("machineCard.attach")
720
953
  }
721
- ) : /* @__PURE__ */ jsx5("span", { className: "text-og-fg-subtle/70", children: offline ? "Unavailable" : "\u2014" })
954
+ ) : /* @__PURE__ */ jsx6("span", { className: "text-og-fg-subtle/70", children: offline ? msg("machineCard.unavailable") : "\u2014" })
722
955
  ] })
723
956
  ]
724
957
  }
@@ -727,7 +960,7 @@ function MachineCard({
727
960
 
728
961
  // src/components/machines/metric-history-chart.tsx
729
962
  import { useLayoutEffect, useRef, useState } from "react";
730
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
963
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
731
964
  var PAD = { top: 10, right: 12, bottom: 18, left: 40 };
732
965
  function niceCeil(v) {
733
966
  if (v <= 0) return 1;
@@ -766,9 +999,11 @@ function MetricHistoryChart({
766
999
  color = "var(--og-color-accent)",
767
1000
  thresholds,
768
1001
  height = 132,
769
- rangeLabel = "in this range",
1002
+ rangeLabel: rangeLabelProp,
770
1003
  className
771
1004
  }) {
1005
+ const msg = useOpenGeniText();
1006
+ const rangeLabel = rangeLabelProp === void 0 ? msg("machines.metricHistoryChart.inThisRange") : rangeLabelProp;
772
1007
  const ref = useRef(null);
773
1008
  const [w, setW] = useState(560);
774
1009
  const [hover, setHover] = useState(null);
@@ -812,10 +1047,7 @@ function MetricHistoryChart({
812
1047
  style: { height: H },
813
1048
  "data-metric-chart": true,
814
1049
  children: [
815
- valued.length === 0 ? /* @__PURE__ */ jsx6("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxs6("span", { className: "text-og-xs text-og-fg-subtle", children: [
816
- "No samples ",
817
- rangeLabel
818
- ] }) }) : /* @__PURE__ */ jsxs6(
1050
+ valued.length === 0 ? /* @__PURE__ */ jsx7("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx7("span", { className: "text-og-xs text-og-fg-subtle", children: msg("machines.metricHistoryChart.noSamplesRangelabel", { rangeLabel }) }) }) : /* @__PURE__ */ jsxs6(
819
1051
  "svg",
820
1052
  {
821
1053
  width: w,
@@ -838,14 +1070,14 @@ function MetricHistoryChart({
838
1070
  setHover(best);
839
1071
  },
840
1072
  children: [
841
- /* @__PURE__ */ jsx6("defs", { children: /* @__PURE__ */ jsxs6("linearGradient", { id: gid, x1: "0", y1: "0", x2: "0", y2: "1", children: [
842
- /* @__PURE__ */ jsx6("stop", { offset: "0%", stopColor: color, stopOpacity: "0.26" }),
843
- /* @__PURE__ */ jsx6("stop", { offset: "100%", stopColor: color, stopOpacity: "0" })
1073
+ /* @__PURE__ */ jsx7("defs", { children: /* @__PURE__ */ jsxs6("linearGradient", { id: gid, x1: "0", y1: "0", x2: "0", y2: "1", children: [
1074
+ /* @__PURE__ */ jsx7("stop", { offset: "0%", stopColor: color, stopOpacity: "0.26" }),
1075
+ /* @__PURE__ */ jsx7("stop", { offset: "100%", stopColor: color, stopOpacity: "0" })
844
1076
  ] }) }),
845
1077
  yTicks.map((v, i) => {
846
1078
  const y = yOf(v);
847
1079
  return /* @__PURE__ */ jsxs6("g", { children: [
848
- /* @__PURE__ */ jsx6(
1080
+ /* @__PURE__ */ jsx7(
849
1081
  "line",
850
1082
  {
851
1083
  x1: PAD.left,
@@ -857,7 +1089,7 @@ function MetricHistoryChart({
857
1089
  strokeWidth: 1
858
1090
  }
859
1091
  ),
860
- /* @__PURE__ */ jsx6(
1092
+ /* @__PURE__ */ jsx7(
861
1093
  "text",
862
1094
  {
863
1095
  x: PAD.left - 8,
@@ -876,7 +1108,7 @@ function MetricHistoryChart({
876
1108
  if (tv == null || tv > top) return null;
877
1109
  const y = yOf(tv);
878
1110
  const stroke = k === "crit" ? "var(--og-color-status-failed)" : "var(--og-color-status-waiting)";
879
- return /* @__PURE__ */ jsx6(
1111
+ return /* @__PURE__ */ jsx7(
880
1112
  "line",
881
1113
  {
882
1114
  x1: PAD.left,
@@ -891,7 +1123,7 @@ function MetricHistoryChart({
891
1123
  k
892
1124
  );
893
1125
  }),
894
- valued.length > 1 && [tMin, tMax].map((t, i) => /* @__PURE__ */ jsx6(
1126
+ valued.length > 1 && [tMin, tMax].map((t, i) => /* @__PURE__ */ jsx7(
895
1127
  "text",
896
1128
  {
897
1129
  x: i === 0 ? PAD.left : w - PAD.right,
@@ -904,8 +1136,8 @@ function MetricHistoryChart({
904
1136
  },
905
1137
  i === 0 ? "x-start" : "x-end"
906
1138
  )),
907
- area && /* @__PURE__ */ jsx6("path", { d: area, fill: `url(#${gid})` }),
908
- /* @__PURE__ */ jsx6(
1139
+ area && /* @__PURE__ */ jsx7("path", { d: area, fill: `url(#${gid})` }),
1140
+ /* @__PURE__ */ jsx7(
909
1141
  "path",
910
1142
  {
911
1143
  d: line,
@@ -918,9 +1150,9 @@ function MetricHistoryChart({
918
1150
  className: "og-mh-draw"
919
1151
  }
920
1152
  ),
921
- sparse && pxPts.map((p) => /* @__PURE__ */ jsx6("circle", { cx: p.x, cy: p.y, r: 2.5, fill: color }, `m-${p.t}`)),
1153
+ sparse && pxPts.map((p) => /* @__PURE__ */ jsx7("circle", { cx: p.x, cy: p.y, r: 2.5, fill: color }, `m-${p.t}`)),
922
1154
  hoverPt && /* @__PURE__ */ jsxs6("g", { pointerEvents: "none", children: [
923
- /* @__PURE__ */ jsx6(
1155
+ /* @__PURE__ */ jsx7(
924
1156
  "line",
925
1157
  {
926
1158
  x1: hoverPt.x,
@@ -931,7 +1163,7 @@ function MetricHistoryChart({
931
1163
  strokeWidth: 1
932
1164
  }
933
1165
  ),
934
- /* @__PURE__ */ jsx6(
1166
+ /* @__PURE__ */ jsx7(
935
1167
  "circle",
936
1168
  {
937
1169
  cx: hoverPt.x,
@@ -955,8 +1187,8 @@ function MetricHistoryChart({
955
1187
  top: Math.max(hoverPt.y - 42, 0)
956
1188
  },
957
1189
  children: [
958
- /* @__PURE__ */ jsx6("span", { className: "font-og-mono text-og-sm font-medium tabular-nums text-og-fg", children: fmt(hoverPt.v) }),
959
- /* @__PURE__ */ jsx6("span", { className: "font-og-mono text-[10px] tabular-nums text-og-fg-subtle", children: fmtClock(hoverPt.t) })
1190
+ /* @__PURE__ */ jsx7("span", { className: "font-og-mono text-og-sm font-medium tabular-nums text-og-fg", children: fmt(hoverPt.v) }),
1191
+ /* @__PURE__ */ jsx7("span", { className: "font-og-mono text-[10px] tabular-nums text-og-fg-subtle", children: fmtClock(hoverPt.t) })
960
1192
  ]
961
1193
  }
962
1194
  )
@@ -967,23 +1199,28 @@ function MetricHistoryChart({
967
1199
 
968
1200
  // src/components/machines/machine-detail.tsx
969
1201
  import {
970
- AlertTriangleIcon as AlertTriangleIcon3,
971
1202
  ArrowLeftIcon,
1203
+ BuildingIcon,
1204
+ ChevronRightIcon,
972
1205
  CpuIcon as CpuIcon2,
973
1206
  LaptopIcon as LaptopIcon2,
1207
+ PlugIcon,
974
1208
  RadioIcon,
975
1209
  ServerIcon as ServerIcon2,
976
- Trash2Icon
1210
+ TriangleAlertIcon as TriangleAlertIcon2,
1211
+ Trash2Icon,
1212
+ UserIcon,
1213
+ UsersIcon as UsersIcon2
977
1214
  } from "lucide-react";
978
1215
 
979
1216
  // src/components/machines/series.ts
980
1217
  var METRIC_WINDOWS = ["15m", "1h", "6h", "24h"];
981
- var WINDOW_LABEL = {
982
- "15m": "in the last 15 min",
983
- "1h": "in the last hour",
984
- "6h": "in the last 6 hours",
985
- "24h": "in the last 24 hours"
986
- };
1218
+ var WINDOW_LABEL = (msg) => ({
1219
+ "15m": msg("machines.series.inTheLast15Min"),
1220
+ "1h": msg("machines.series.inTheLastHour"),
1221
+ "6h": msg("machines.series.inTheLast6Hours"),
1222
+ "24h": msg("machines.series.inTheLast24Hours")
1223
+ });
987
1224
  function ptsFrom(samples, pick) {
988
1225
  return samples.map((s) => ({ t: new Date(s.sampledAt).getTime(), v: pick(s) }));
989
1226
  }
@@ -999,7 +1236,7 @@ var fmtBytes = (b) => {
999
1236
  }
1000
1237
  return `${b} B`;
1001
1238
  };
1002
- var METRICS = [
1239
+ var METRICS = (msg) => [
1003
1240
  {
1004
1241
  key: "cpu",
1005
1242
  title: "CPU",
@@ -1009,11 +1246,11 @@ var METRICS = [
1009
1246
  thresholds: { warn: 90, crit: 98 },
1010
1247
  pick: (s) => s.cpuPct,
1011
1248
  current: (s) => `${Math.round(s.cpuPct)}%`,
1012
- sub: (s) => `${s.runQueue} in run queue`
1249
+ sub: (s) => msg("machines.series.runqueueInRunQueue", { runQueue: s.runQueue })
1013
1250
  },
1014
1251
  {
1015
1252
  key: "mem",
1016
- title: "Memory",
1253
+ title: msg("machines.series.memory"),
1017
1254
  unit: "%",
1018
1255
  yMax: 100,
1019
1256
  color: "var(--og-color-status-idle)",
@@ -1024,7 +1261,7 @@ var METRICS = [
1024
1261
  },
1025
1262
  {
1026
1263
  key: "disk",
1027
- title: "Disk",
1264
+ title: msg("machines.series.disk"),
1028
1265
  unit: "%",
1029
1266
  yMax: 100,
1030
1267
  color: "var(--og-color-status-waiting)",
@@ -1035,7 +1272,7 @@ var METRICS = [
1035
1272
  },
1036
1273
  {
1037
1274
  key: "load",
1038
- title: "Load average",
1275
+ title: msg("machines.series.loadAverage"),
1039
1276
  unit: "",
1040
1277
  yMax: "auto",
1041
1278
  color: "var(--og-color-accent-strong)",
@@ -1062,31 +1299,31 @@ function pointsFor(def, samples) {
1062
1299
  // src/components/machines/machine-operation-policy.tsx
1063
1300
  import { AlertTriangleIcon as AlertTriangleIcon2, Loader2Icon } from "lucide-react";
1064
1301
  import { useEffect, useState as useState2 } from "react";
1065
- import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1302
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1066
1303
  function fieldValue(value) {
1067
1304
  return value === null ? "" : String(value);
1068
1305
  }
1069
- function parseByteCount(label, value) {
1306
+ function parseByteCount(t, label, value) {
1070
1307
  const trimmed = value.trim();
1071
1308
  if (!trimmed) return null;
1072
1309
  if (!/^\d+$/.test(trimmed)) {
1073
- throw new Error(`${label} must be a whole number of bytes or blank`);
1310
+ throw new Error(t("machines.machineOperationPolicy.bytesNotWholeNumber", { label }));
1074
1311
  }
1075
1312
  const parsed = Number(trimmed);
1076
1313
  if (!Number.isSafeInteger(parsed) || parsed <= 0) {
1077
- throw new Error(`${label} must be a positive safe-integer byte count or blank`);
1314
+ throw new Error(t("machines.machineOperationPolicy.bytesNotPositive", { label }));
1078
1315
  }
1079
1316
  return parsed;
1080
1317
  }
1081
- function parseCpuMillicores(value) {
1318
+ function parseCpuMillicores(t, value) {
1082
1319
  const trimmed = value.trim();
1083
1320
  if (!trimmed) return null;
1084
1321
  if (!/^\d+$/.test(trimmed)) {
1085
- throw new Error("CPU maximum must be a whole number of millicores or blank");
1322
+ throw new Error(t("machines.machineOperationPolicy.cpuNotWholeNumber"));
1086
1323
  }
1087
1324
  const parsed = Number(trimmed);
1088
1325
  if (!Number.isSafeInteger(parsed) || parsed <= 0 || parsed > 4294967295) {
1089
- throw new Error("CPU maximum must be between 1 and 4294967295 millicores or blank");
1326
+ throw new Error(t("machines.machineOperationPolicy.cpuOutOfRange"));
1090
1327
  }
1091
1328
  return parsed;
1092
1329
  }
@@ -1097,6 +1334,7 @@ function MachineOperationPolicyEditor({
1097
1334
  saving = false,
1098
1335
  onSave
1099
1336
  }) {
1337
+ const t = useOpenGeniText();
1100
1338
  const [memoryMaxBytes, setMemoryMaxBytes] = useState2(fieldValue(policy.memoryMaxBytes));
1101
1339
  const [memoryHighBytes, setMemoryHighBytes] = useState2(fieldValue(policy.memoryHighBytes));
1102
1340
  const [cpuMaxMillicores, setCpuMaxMillicores] = useState2(fieldValue(policy.cpuMaxMillicores));
@@ -1110,12 +1348,20 @@ function MachineOperationPolicyEditor({
1110
1348
  const submit = async (event) => {
1111
1349
  event.preventDefault();
1112
1350
  try {
1113
- const max = parseByteCount("Hard ceiling", memoryMaxBytes);
1114
- const high = parseByteCount("Reclaim threshold", memoryHighBytes);
1351
+ const max = parseByteCount(
1352
+ t,
1353
+ t("machines.machineOperationPolicy.hardCeiling"),
1354
+ memoryMaxBytes
1355
+ );
1356
+ const high = parseByteCount(
1357
+ t,
1358
+ t("machines.machineOperationPolicy.reclaimThreshold"),
1359
+ memoryHighBytes
1360
+ );
1115
1361
  if (max !== null && high !== null && high > max) {
1116
- throw new Error("Reclaim threshold cannot exceed the hard ceiling");
1362
+ throw new Error(t("machines.machineOperationPolicy.reclaimAboveCeiling"));
1117
1363
  }
1118
- const cpuMax = parseCpuMillicores(cpuMaxMillicores);
1364
+ const cpuMax = parseCpuMillicores(t, cpuMaxMillicores);
1119
1365
  setValidationError(null);
1120
1366
  await onSave({
1121
1367
  memoryMaxBytes: max,
@@ -1138,66 +1384,66 @@ function MachineOperationPolicyEditor({
1138
1384
  className: "rounded-og-lg border border-og-border bg-og-surface-1 p-4 shadow-og-sm",
1139
1385
  children: [
1140
1386
  /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-1", children: [
1141
- /* @__PURE__ */ jsx7("h2", { className: "text-og-sm font-semibold text-og-fg", children: "Per-command resource policy" }),
1142
- /* @__PURE__ */ jsx7("p", { className: "text-og-xs leading-relaxed text-og-fg-muted", children: "Optional limits applied separately to each newly admitted exec and Git command. Running commands keep their admitted policy. Blank means unrestricted. The runner or host may apply a stricter explicit policy; browser, computer-use, and terminal capabilities remain unchanged." })
1387
+ /* @__PURE__ */ jsx8("h2", { className: "text-og-sm font-semibold text-og-fg", children: t("machines.machineOperationPolicy.perCommandResourcePolicy") }),
1388
+ /* @__PURE__ */ jsx8("p", { className: "text-og-xs leading-relaxed text-og-fg-muted", children: t("machines.machineOperationPolicy.optionalLimitsAppliedSeparatelyTo") })
1143
1389
  ] }),
1144
1390
  configured && (unsupportedMemory || unsupportedCpu) ? /* @__PURE__ */ jsxs7("div", { className: "mt-3 flex gap-2 rounded-og-md border border-og-status-failed/40 bg-og-status-failed/5 p-3 text-og-xs text-og-status-failed", children: [
1145
- /* @__PURE__ */ jsx7(AlertTriangleIcon2, { className: "mt-0.5 size-3.5 shrink-0", "aria-hidden": true }),
1391
+ /* @__PURE__ */ jsx8(AlertTriangleIcon2, { className: "mt-0.5 size-3.5 shrink-0", "aria-hidden": true }),
1146
1392
  /* @__PURE__ */ jsxs7("span", { children: [
1147
- unsupportedCpu ? "This runner cannot enforce the configured CPU limit." : "This runner cannot enforce the configured memory limit.",
1393
+ unsupportedCpu ? t("machines.machineOperationPolicy.thisRunnerCannotEnforceThe") : t("machines.machineOperationPolicy.thisRunnerCannotEnforceThe2"),
1148
1394
  " ",
1149
- "Command execution fails closed until the current runner, OS, and service configuration can enforce it, or the unsupported limit is cleared. You can still save limits now for later enforcement."
1395
+ t("machines.machineOperationPolicy.commandExecutionFailsClosedUntil")
1150
1396
  ] })
1151
1397
  ] }) : null,
1152
1398
  /* @__PURE__ */ jsxs7("form", { className: "mt-4 grid gap-3 sm:grid-cols-2", onSubmit: submit, children: [
1153
1399
  /* @__PURE__ */ jsxs7("label", { className: "flex flex-col gap-1.5 text-og-xs text-og-fg-muted", children: [
1154
- "Hard ceiling (bytes)",
1155
- /* @__PURE__ */ jsx7(
1400
+ t("machines.machineOperationPolicy.hardCeilingBytes"),
1401
+ /* @__PURE__ */ jsx8(
1156
1402
  "input",
1157
1403
  {
1158
1404
  inputMode: "numeric",
1159
1405
  pattern: "[0-9]*",
1160
1406
  value: memoryMaxBytes,
1161
1407
  onChange: (event) => setMemoryMaxBytes(event.target.value),
1162
- placeholder: "Unlimited",
1408
+ placeholder: t("machines.machineOperationPolicy.unlimited"),
1163
1409
  disabled: saving,
1164
1410
  className: "min-h-9 rounded-og-sm border border-og-border bg-og-bg px-2.5 font-og-mono text-og-sm text-og-fg outline-hidden focus-visible:ring-2 focus-visible:ring-og-accent/50 disabled:opacity-60"
1165
1411
  }
1166
1412
  )
1167
1413
  ] }),
1168
1414
  /* @__PURE__ */ jsxs7("label", { className: "flex flex-col gap-1.5 text-og-xs text-og-fg-muted", children: [
1169
- "Reclaim threshold (bytes)",
1170
- /* @__PURE__ */ jsx7(
1415
+ t("machines.machineOperationPolicy.reclaimThresholdBytes"),
1416
+ /* @__PURE__ */ jsx8(
1171
1417
  "input",
1172
1418
  {
1173
1419
  inputMode: "numeric",
1174
1420
  pattern: "[0-9]*",
1175
1421
  value: memoryHighBytes,
1176
1422
  onChange: (event) => setMemoryHighBytes(event.target.value),
1177
- placeholder: "Unlimited",
1423
+ placeholder: t("machines.machineOperationPolicy.unlimited"),
1178
1424
  disabled: saving,
1179
1425
  className: "min-h-9 rounded-og-sm border border-og-border bg-og-bg px-2.5 font-og-mono text-og-sm text-og-fg outline-hidden focus-visible:ring-2 focus-visible:ring-og-accent/50 disabled:opacity-60"
1180
1426
  }
1181
1427
  )
1182
1428
  ] }),
1183
1429
  /* @__PURE__ */ jsxs7("label", { className: "flex flex-col gap-1.5 text-og-xs text-og-fg-muted", children: [
1184
- "CPU maximum (millicores)",
1185
- /* @__PURE__ */ jsx7(
1430
+ t("machines.machineOperationPolicy.cpuMaximumMillicores"),
1431
+ /* @__PURE__ */ jsx8(
1186
1432
  "input",
1187
1433
  {
1188
1434
  inputMode: "numeric",
1189
1435
  pattern: "[0-9]*",
1190
1436
  value: cpuMaxMillicores,
1191
1437
  onChange: (event) => setCpuMaxMillicores(event.target.value),
1192
- placeholder: "Unlimited",
1438
+ placeholder: t("machines.machineOperationPolicy.unlimited"),
1193
1439
  disabled: saving,
1194
1440
  className: "min-h-9 rounded-og-sm border border-og-border bg-og-bg px-2.5 font-og-mono text-og-sm text-og-fg outline-hidden focus-visible:ring-2 focus-visible:ring-og-accent/50 disabled:opacity-60"
1195
1441
  }
1196
1442
  ),
1197
- /* @__PURE__ */ jsx7("span", { children: "1000 millicores = one CPU core. Blank is unlimited." })
1443
+ /* @__PURE__ */ jsx8("span", { children: t("machines.machineOperationPolicy.n1000MillicoresOneCpuCore") })
1198
1444
  ] }),
1199
1445
  /* @__PURE__ */ jsxs7("div", { className: "flex min-h-9 items-center justify-between gap-3 sm:col-span-2", children: [
1200
- /* @__PURE__ */ jsx7(
1446
+ /* @__PURE__ */ jsx8(
1201
1447
  "span",
1202
1448
  {
1203
1449
  role: validationError ? "alert" : void 0,
@@ -1210,10 +1456,10 @@ function MachineOperationPolicyEditor({
1210
1456
  {
1211
1457
  type: "submit",
1212
1458
  disabled: saving,
1213
- className: "inline-flex min-h-9 items-center gap-1.5 rounded-og-sm bg-og-accent px-3 py-1.5 text-og-xs font-medium text-og-accent-fg transition-colors hover:bg-og-accent-strong disabled:cursor-not-allowed disabled:opacity-60",
1459
+ className: "inline-flex min-h-9 items-center gap-1.5 rounded-og-sm border border-og-primary-border bg-og-primary text-og-primary-fg px-3 py-1.5 text-og-xs font-medium transition-colors hover:bg-og-primary-hover disabled:cursor-not-allowed disabled:opacity-60",
1214
1460
  children: [
1215
- saving ? /* @__PURE__ */ jsx7(Loader2Icon, { className: "size-3.5 animate-spin", "aria-hidden": true }) : null,
1216
- "Save policy"
1461
+ saving ? /* @__PURE__ */ jsx8(Loader2Icon, { className: "size-3.5 animate-spin", "aria-hidden": true }) : null,
1462
+ t("machines.machineOperationPolicy.savePolicy")
1217
1463
  ]
1218
1464
  }
1219
1465
  )
@@ -1225,11 +1471,155 @@ function MachineOperationPolicyEditor({
1225
1471
  }
1226
1472
 
1227
1473
  // src/components/machines/machine-detail.tsx
1228
- import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
1474
+ import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1475
+ var AUDIENCE = (t) => ({
1476
+ user: {
1477
+ label: t("machines.machineDetail.onlyMe"),
1478
+ description: t("machines.machineDetail.onlyItsOwnerCanRun"),
1479
+ Icon: UserIcon
1480
+ },
1481
+ workspace: {
1482
+ label: t("machines.machineDetail.thisWorkspace"),
1483
+ description: t("machines.machineDetail.everyoneInThisWorkspaceCan"),
1484
+ Icon: UsersIcon2
1485
+ },
1486
+ organization: {
1487
+ label: t("machines.machineDetail.wholeOrganization"),
1488
+ description: t("machines.machineDetail.everyWorkspaceInTheOrganization"),
1489
+ Icon: BuildingIcon
1490
+ }
1491
+ });
1492
+ function MachineAudienceRow({
1493
+ machine,
1494
+ onChange
1495
+ }) {
1496
+ const t = useOpenGeniText();
1497
+ const audience = AUDIENCE(t)[machine.scope];
1498
+ const changeable = onChange !== void 0 && machine.scope !== "organization";
1499
+ const content = /* @__PURE__ */ jsxs8(Fragment2, { children: [
1500
+ /* @__PURE__ */ jsx9(audience.Icon, { className: "size-4 shrink-0 text-og-fg-subtle", "aria-hidden": true }),
1501
+ /* @__PURE__ */ jsxs8("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5 text-left", children: [
1502
+ /* @__PURE__ */ jsx9("span", { className: "text-og-sm font-medium text-og-fg", children: t("machines.machineDetail.whoCanUseIt") }),
1503
+ /* @__PURE__ */ jsx9("span", { className: "text-og-xs text-og-fg-muted", children: audience.description })
1504
+ ] }),
1505
+ /* @__PURE__ */ jsx9("span", { className: "shrink-0 text-og-sm text-og-fg-muted", children: audience.label }),
1506
+ changeable ? /* @__PURE__ */ jsx9(ChevronRightIcon, { className: "size-4 shrink-0 text-og-fg-subtle", "aria-hidden": true }) : null
1507
+ ] });
1508
+ const frame = "flex w-full min-h-14 items-center gap-3 rounded-og-lg border border-og-border bg-og-surface-1 px-4 py-3 shadow-og-sm";
1509
+ return changeable ? /* @__PURE__ */ jsx9(
1510
+ "button",
1511
+ {
1512
+ type: "button",
1513
+ "data-machine-audience": machine.scope,
1514
+ onClick: () => onChange(machine),
1515
+ "aria-label": t("machines.machineDetail.whoCanUseNameLabel", {
1516
+ name: machine.name,
1517
+ label: audience.label
1518
+ }),
1519
+ className: cn(
1520
+ frame,
1521
+ "transition-colors hover:bg-og-surface-2 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-og-accent/50"
1522
+ ),
1523
+ children: content
1524
+ }
1525
+ ) : /* @__PURE__ */ jsx9("div", { "data-machine-audience": machine.scope, className: frame, children: content });
1526
+ }
1229
1527
  function KindIcon2({ kind, session }) {
1230
- if (session) return /* @__PURE__ */ jsx8(ServerIcon2, { className: "size-4 text-og-fg-subtle", "aria-hidden": true });
1231
- if (kind === "modal") return /* @__PURE__ */ jsx8(CpuIcon2, { className: "size-4 text-og-fg-subtle", "aria-hidden": true });
1232
- return /* @__PURE__ */ jsx8(LaptopIcon2, { className: "size-4 text-og-fg-subtle", "aria-hidden": true });
1528
+ if (kind === "local" || kind === "selfhosted")
1529
+ return /* @__PURE__ */ jsx9(LaptopIcon2, { className: "size-4 text-og-fg-subtle", "aria-hidden": true });
1530
+ if (kind === "docker" || session)
1531
+ return /* @__PURE__ */ jsx9(ServerIcon2, { className: "size-4 text-og-fg-subtle", "aria-hidden": true });
1532
+ if (kind === "modal") return /* @__PURE__ */ jsx9(CpuIcon2, { className: "size-4 text-og-fg-subtle", "aria-hidden": true });
1533
+ return /* @__PURE__ */ jsx9(ServerIcon2, { className: "size-4 text-og-fg-subtle", "aria-hidden": true });
1534
+ }
1535
+ function MachineAgentPanel({
1536
+ machine,
1537
+ now,
1538
+ onUpdateAgent,
1539
+ updatingAgent
1540
+ }) {
1541
+ const t = useOpenGeniText();
1542
+ const authority = machine.connectionAuthority;
1543
+ const runtime = machine.runtime;
1544
+ if (!runtime && authority.state === "not_applicable") return null;
1545
+ const agent = runtime ? describeAgentRuntime(t, runtime, now) : null;
1546
+ const action = agent?.action && machine.enrollmentId && onUpdateAgent && machine.state !== "offline" ? agent.action : null;
1547
+ const connection = authority.state === "not_applicable" ? null : describeAgentConnection(t, authority);
1548
+ const conflict = runnerConflict(authority, now);
1549
+ const conflictAgo = conflict?.lastAt ? formatRelativeTime(t, conflict.lastAt, new Date(now)) : null;
1550
+ return /* @__PURE__ */ jsxs8(
1551
+ "section",
1552
+ {
1553
+ "data-machine-agent": true,
1554
+ "aria-label": t("machines.machineDetail.agent"),
1555
+ className: "flex flex-col divide-y divide-og-border rounded-og-lg border border-og-border bg-og-surface-1 shadow-og-sm",
1556
+ children: [
1557
+ agent ? /* @__PURE__ */ jsxs8("div", { "data-agent-runtime": true, className: "flex min-h-14 items-center gap-3 px-4 py-3", children: [
1558
+ /* @__PURE__ */ jsx9(AgentStatusIcon, { tone: agent.tone, className: "size-4" }),
1559
+ /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
1560
+ /* @__PURE__ */ jsx9("span", { className: "text-og-sm font-medium text-og-fg", children: agent.title }),
1561
+ /* @__PURE__ */ jsx9(
1562
+ "span",
1563
+ {
1564
+ "data-agent-status": agent.tone,
1565
+ className: cn("text-og-xs", STATUS_TONE_TEXT[agent.tone]),
1566
+ children: agent.status
1567
+ }
1568
+ ),
1569
+ agent.note ? /* @__PURE__ */ jsx9("span", { className: "text-og-xs text-og-fg-muted", children: agent.note }) : null
1570
+ ] }),
1571
+ action ? /* @__PURE__ */ jsx9(
1572
+ "button",
1573
+ {
1574
+ type: "button",
1575
+ "data-update-agent": true,
1576
+ "data-update-action": action.kind,
1577
+ disabled: updatingAgent,
1578
+ onClick: () => onUpdateAgent?.(machine),
1579
+ className: "inline-flex min-h-9 shrink-0 items-center rounded-og-sm border border-og-border px-3 py-1 text-og-xs font-medium text-og-fg-muted transition-colors hover:border-og-border-strong hover:text-og-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-og-accent/50 disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:min-h-11",
1580
+ children: updatingAgent ? t("machines.machineDetail.starting") : action.label
1581
+ }
1582
+ ) : null
1583
+ ] }) : null,
1584
+ connection ? /* @__PURE__ */ jsxs8(
1585
+ "div",
1586
+ {
1587
+ "data-connection-authority": authority.state,
1588
+ className: "flex min-h-14 items-start gap-3 px-4 py-3",
1589
+ children: [
1590
+ /* @__PURE__ */ jsx9(PlugIcon, { className: "mt-0.5 size-4 shrink-0 text-og-fg-subtle", "aria-hidden": true }),
1591
+ /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
1592
+ /* @__PURE__ */ jsx9("span", { className: "text-og-sm font-medium text-og-fg", children: connection.label }),
1593
+ connection.detail ? /* @__PURE__ */ jsx9("span", { className: "text-og-xs text-og-fg-muted", children: connection.detail }) : null,
1594
+ conflict?.active ? /* @__PURE__ */ jsxs8(
1595
+ "span",
1596
+ {
1597
+ "data-runner-conflict": "active",
1598
+ className: "mt-1 flex items-start gap-1.5 text-og-xs text-og-fg-muted",
1599
+ children: [
1600
+ /* @__PURE__ */ jsx9(
1601
+ TriangleAlertIcon2,
1602
+ {
1603
+ className: "mt-px size-3.5 shrink-0 text-og-status-waiting",
1604
+ "aria-hidden": true
1605
+ }
1606
+ ),
1607
+ t("machines.machineDetail.aSecondCopyOfThe")
1608
+ ]
1609
+ }
1610
+ ) : conflict ? /* @__PURE__ */ jsxs8("span", { "data-runner-conflict": "past", className: "text-og-xs text-og-fg-subtle", children: [
1611
+ t("machines.machineDetail.keptOutExtraCopiesOf", { count: conflict.count }),
1612
+ conflictAgo ? t("machines.machineDetail.mostRecentlyValue", {
1613
+ value: conflictAgo === "now" ? t("machines.machineDetail.justNow") : `${conflictAgo} ago`
1614
+ }) : ""
1615
+ ] }) : null
1616
+ ] })
1617
+ ]
1618
+ }
1619
+ ) : null
1620
+ ]
1621
+ }
1622
+ );
1233
1623
  }
1234
1624
  function MachineDetail({
1235
1625
  machine,
@@ -1241,32 +1631,34 @@ function MachineDetail({
1241
1631
  onRemove,
1242
1632
  onUpdateOperationPolicy,
1243
1633
  updatingOperationPolicy,
1634
+ onChangeAudience,
1635
+ onUpdateAgent,
1636
+ updatingAgent,
1244
1637
  now = Date.now(),
1245
1638
  className
1246
1639
  }) {
1247
- const health = deriveHealth(machine.state, machine.metrics, now);
1640
+ const t = useOpenGeniText();
1641
+ const health = deriveHealth(t, machine.state, machine.metrics, now);
1248
1642
  const tone = HEALTH_TOKEN[health.level];
1249
1643
  const latest = machine.metrics;
1250
- const sampledAgo = latest ? formatRelativeTime(latest.sampledAt, new Date(now)) : null;
1251
- const authority = machine.connectionAuthority;
1252
- const duplicateDeniedAgo = authority.duplicateRunnerDeniedAt ? formatRelativeTime(authority.duplicateRunnerDeniedAt, new Date(now)) : null;
1253
- const visible = METRICS.filter((m) => !(m.key === "gpu" && latest?.gpuUtilPct == null));
1644
+ const sampledAgo = latest ? formatRelativeTime(t, latest.sampledAt, new Date(now)) : null;
1645
+ const visible = METRICS(t).filter((m) => !(m.key === "gpu" && latest?.gpuUtilPct == null));
1254
1646
  const tileCols = visible.length >= 5 ? "grid-cols-2 sm:grid-cols-3 lg:grid-cols-5" : "grid-cols-2 sm:grid-cols-4";
1255
1647
  return /* @__PURE__ */ jsxs8("div", { className: cn("og-root mx-auto flex w-full max-w-5xl flex-col gap-5", className), children: [
1256
1648
  /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between gap-3", children: [
1257
1649
  /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 items-center gap-2.5", children: [
1258
- onBack && /* @__PURE__ */ jsx8(
1650
+ onBack && /* @__PURE__ */ jsx9(
1259
1651
  "button",
1260
1652
  {
1261
1653
  type: "button",
1262
1654
  onClick: onBack,
1263
1655
  className: "flex size-7 shrink-0 items-center justify-center rounded-og-sm border border-og-border bg-og-surface-1 text-og-fg-muted transition-colors hover:bg-og-surface-2 hover:text-og-fg",
1264
- "aria-label": "Back to machines",
1265
- children: /* @__PURE__ */ jsx8(ArrowLeftIcon, { className: "size-3.5", "aria-hidden": true })
1656
+ "aria-label": t("machines.machineDetail.backToMachines"),
1657
+ children: /* @__PURE__ */ jsx9(ArrowLeftIcon, { className: "size-3.5", "aria-hidden": true })
1266
1658
  }
1267
1659
  ),
1268
- /* @__PURE__ */ jsx8(KindIcon2, { kind: machine.kind, session: machine.isSessionGroup }),
1269
- /* @__PURE__ */ jsx8("h1", { className: "truncate text-og-md font-semibold text-og-fg", children: machine.name }),
1660
+ /* @__PURE__ */ jsx9(KindIcon2, { kind: machine.kind, session: machine.isSessionGroup }),
1661
+ /* @__PURE__ */ jsx9("h1", { className: "truncate text-og-md font-semibold text-og-fg", children: machine.name }),
1270
1662
  /* @__PURE__ */ jsxs8("span", { className: "hidden shrink-0 rounded-og-sm border border-og-border bg-og-surface-1 px-1.5 py-0.5 font-og-mono text-og-xs text-og-fg-subtle sm:inline", children: [
1271
1663
  machine.os,
1272
1664
  " \xB7 ",
@@ -1279,16 +1671,16 @@ function MachineDetail({
1279
1671
  {
1280
1672
  type: "button",
1281
1673
  "data-remove-machine": true,
1282
- "aria-label": `Remove machine ${machine.name}`,
1674
+ "aria-label": t("machines.machineDetail.removeMachineName", { name: machine.name }),
1283
1675
  onClick: () => onRemove(machine),
1284
1676
  className: "inline-flex min-h-9 items-center gap-1.5 rounded-og-sm border border-og-status-failed/40 px-2.5 py-1 font-medium text-og-xs text-og-status-failed transition-colors hover:bg-og-status-failed/10 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-og-status-failed/50 pointer-coarse:min-h-11",
1285
1677
  children: [
1286
- /* @__PURE__ */ jsx8(Trash2Icon, { className: "size-3.5", "aria-hidden": true }),
1287
- /* @__PURE__ */ jsx8("span", { className: "hidden sm:inline", children: "Remove machine" })
1678
+ /* @__PURE__ */ jsx9(Trash2Icon, { className: "size-3.5", "aria-hidden": true }),
1679
+ /* @__PURE__ */ jsx9("span", { className: "hidden sm:inline", children: t("machines.machineDetail.removeMachine") })
1288
1680
  ]
1289
1681
  }
1290
1682
  ) : null,
1291
- /* @__PURE__ */ jsx8("div", { className: "flex items-center gap-0.5 rounded-og-md border border-og-border bg-og-surface-1 p-0.5", children: METRIC_WINDOWS.map((w) => /* @__PURE__ */ jsx8(
1683
+ /* @__PURE__ */ jsx9("div", { className: "flex items-center gap-0.5 rounded-og-md border border-og-border bg-og-surface-1 p-0.5", children: METRIC_WINDOWS.map((w) => /* @__PURE__ */ jsx9(
1292
1684
  "button",
1293
1685
  {
1294
1686
  type: "button",
@@ -1312,11 +1704,11 @@ function MachineDetail({
1312
1704
  tone.soft
1313
1705
  ),
1314
1706
  children: [
1315
- /* @__PURE__ */ jsx8("span", { "aria-hidden": true, className: cn("absolute inset-y-0 left-0 w-1", tone.dot) }),
1707
+ /* @__PURE__ */ jsx9("span", { "aria-hidden": true, className: cn("absolute inset-y-0 left-0 w-1", tone.dot) }),
1316
1708
  /* @__PURE__ */ jsxs8("div", { className: "flex flex-wrap items-center justify-between gap-3 pl-1", children: [
1317
1709
  /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-3", children: [
1318
1710
  /* @__PURE__ */ jsxs8("span", { className: "relative flex size-3", children: [
1319
- healthPulses(health.level) && /* @__PURE__ */ jsx8(
1711
+ healthPulses(health.level) && /* @__PURE__ */ jsx9(
1320
1712
  "span",
1321
1713
  {
1322
1714
  className: cn(
@@ -1325,34 +1717,34 @@ function MachineDetail({
1325
1717
  )
1326
1718
  }
1327
1719
  ),
1328
- /* @__PURE__ */ jsx8("span", { className: cn("relative inline-flex size-3 rounded-full", tone.dot) })
1720
+ /* @__PURE__ */ jsx9("span", { className: cn("relative inline-flex size-3 rounded-full", tone.dot) })
1329
1721
  ] }),
1330
1722
  /* @__PURE__ */ jsxs8("div", { className: "flex flex-col", children: [
1331
- /* @__PURE__ */ jsx8("span", { className: cn("text-og-md font-semibold", tone.text), children: health.label }),
1332
- /* @__PURE__ */ jsx8("span", { className: "text-og-sm text-og-fg-muted", children: health.reason })
1723
+ /* @__PURE__ */ jsx9("span", { className: cn("text-og-md font-semibold", tone.text), children: health.label }),
1724
+ /* @__PURE__ */ jsx9("span", { className: "text-og-sm text-og-fg-muted", children: health.reason })
1333
1725
  ] })
1334
1726
  ] }),
1335
1727
  /* @__PURE__ */ jsxs8("div", { className: "flex items-start gap-5 pr-1", children: [
1336
1728
  sampledAgo && /* @__PURE__ */ jsxs8("div", { className: "flex flex-col items-end gap-0.5", children: [
1337
- /* @__PURE__ */ jsx8("span", { className: "text-[10px] font-medium uppercase tracking-wide text-og-fg-subtle", children: "Sampled" }),
1729
+ /* @__PURE__ */ jsx9("span", { className: "text-[10px] font-medium uppercase tracking-wide text-og-fg-subtle", children: t("machines.machineDetail.sampled") }),
1338
1730
  /* @__PURE__ */ jsxs8("span", { className: "flex items-center gap-1 font-og-mono text-og-sm tabular-nums text-og-fg", children: [
1339
- /* @__PURE__ */ jsx8(
1731
+ /* @__PURE__ */ jsx9(
1340
1732
  RadioIcon,
1341
1733
  {
1342
1734
  className: cn("size-3", health.stale ? "text-og-fg-subtle" : tone.text),
1343
1735
  "aria-hidden": true
1344
1736
  }
1345
1737
  ),
1346
- sampledAgo === "now" ? "live" : `${sampledAgo} ago`
1738
+ sampledAgo === "now" ? t("machines.machineDetail.live") : t("machines.machineDetail.sampledagoAgo", { sampledAgo })
1347
1739
  ] })
1348
1740
  ] }),
1349
1741
  machine.lastSeenAt && /* @__PURE__ */ jsxs8("div", { className: "hidden flex-col items-end gap-0.5 sm:flex", children: [
1350
- /* @__PURE__ */ jsx8("span", { className: "text-[10px] font-medium uppercase tracking-wide text-og-fg-subtle", children: "Last seen" }),
1351
- /* @__PURE__ */ jsx8("span", { className: "font-og-mono text-og-sm tabular-nums text-og-fg-muted", children: formatRelativeTime(machine.lastSeenAt, new Date(now)) })
1742
+ /* @__PURE__ */ jsx9("span", { className: "text-[10px] font-medium uppercase tracking-wide text-og-fg-subtle", children: t("machines.machineDetail.lastSeen") }),
1743
+ /* @__PURE__ */ jsx9("span", { className: "font-og-mono text-og-sm tabular-nums text-og-fg-muted", children: formatRelativeTime(t, machine.lastSeenAt, new Date(now)) })
1352
1744
  ] })
1353
1745
  ] })
1354
1746
  ] }),
1355
- latest && /* @__PURE__ */ jsx8(
1747
+ latest && /* @__PURE__ */ jsx9(
1356
1748
  "div",
1357
1749
  {
1358
1750
  className: cn(
@@ -1362,42 +1754,28 @@ function MachineDetail({
1362
1754
  children: visible.map((m) => {
1363
1755
  const pts = pointsFor(m, series);
1364
1756
  return /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-1.5 bg-og-surface-1 p-3", children: [
1365
- /* @__PURE__ */ jsx8("span", { className: "text-[10px] font-medium uppercase tracking-wide text-og-fg-subtle", children: m.title }),
1366
- /* @__PURE__ */ jsx8("span", { className: "font-og-mono text-og-md font-medium tabular-nums text-og-fg", children: m.current(latest) }),
1367
- /* @__PURE__ */ jsx8(MetricSparkline, { points: pts, color: m.color, yMax: m.yMax, height: 22 }),
1368
- m.sub && /* @__PURE__ */ jsx8("span", { className: "truncate font-og-mono text-[10px] text-og-fg-subtle", children: m.sub(latest) })
1757
+ /* @__PURE__ */ jsx9("span", { className: "text-[10px] font-medium uppercase tracking-wide text-og-fg-subtle", children: m.title }),
1758
+ /* @__PURE__ */ jsx9("span", { className: "font-og-mono text-og-md font-medium tabular-nums text-og-fg", children: m.current(latest) }),
1759
+ /* @__PURE__ */ jsx9(MetricSparkline, { points: pts, color: m.color, yMax: m.yMax, height: 22 }),
1760
+ m.sub && /* @__PURE__ */ jsx9("span", { className: "truncate font-og-mono text-[10px] text-og-fg-subtle", children: m.sub(latest) })
1369
1761
  ] }, m.key);
1370
1762
  })
1371
1763
  }
1372
- ),
1373
- authority.state !== "not_applicable" ? /* @__PURE__ */ jsxs8(
1374
- "div",
1375
- {
1376
- "data-connection-authority": authority.state,
1377
- className: "flex flex-wrap items-center justify-between gap-2 rounded-og-md border border-og-border bg-og-surface-1/75 px-3 py-2 text-og-xs",
1378
- children: [
1379
- /* @__PURE__ */ jsxs8("span", { className: "text-og-fg-muted", children: [
1380
- "Runner ",
1381
- authority.state.replace("_", " "),
1382
- " \xB7 generation ",
1383
- authority.generation,
1384
- authority.supersededCount > 0 ? ` \xB7 ${authority.supersededCount} earlier ${authority.supersededCount === 1 ? "runner" : "runners"} fenced` : ""
1385
- ] }),
1386
- authority.duplicateRunnerDeniedCount > 0 ? /* @__PURE__ */ jsxs8("span", { className: "inline-flex items-center gap-1.5 text-og-status-failed", children: [
1387
- /* @__PURE__ */ jsx8(AlertTriangleIcon3, { className: "size-3.5", "aria-hidden": true }),
1388
- "Blocked ",
1389
- authority.duplicateRunnerDeniedCount,
1390
- " competing runner",
1391
- authority.duplicateRunnerDeniedCount === 1 ? "" : "s",
1392
- duplicateDeniedAgo ? ` \xB7 ${duplicateDeniedAgo === "now" ? "now" : `${duplicateDeniedAgo} ago`}` : ""
1393
- ] }) : null
1394
- ]
1395
- }
1396
- ) : null
1764
+ )
1397
1765
  ]
1398
1766
  }
1399
1767
  ),
1400
- onUpdateOperationPolicy && machine.enrollmentId && machine.operationPolicy ? /* @__PURE__ */ jsx8(
1768
+ /* @__PURE__ */ jsx9(
1769
+ MachineAgentPanel,
1770
+ {
1771
+ machine,
1772
+ now,
1773
+ onUpdateAgent,
1774
+ updatingAgent
1775
+ }
1776
+ ),
1777
+ machine.enrollmentId && !machine.isSessionGroup ? /* @__PURE__ */ jsx9(MachineAudienceRow, { machine, onChange: onChangeAudience }) : null,
1778
+ onUpdateOperationPolicy && machine.enrollmentId && machine.operationPolicy ? /* @__PURE__ */ jsx9(
1401
1779
  MachineOperationPolicyEditor,
1402
1780
  {
1403
1781
  policy: machine.operationPolicy,
@@ -1407,7 +1785,7 @@ function MachineDetail({
1407
1785
  onSave: (request) => onUpdateOperationPolicy(machine, request)
1408
1786
  }
1409
1787
  ) : null,
1410
- /* @__PURE__ */ jsx8("div", { className: "grid grid-cols-1 gap-3 lg:grid-cols-2", children: visible.map((m) => {
1788
+ /* @__PURE__ */ jsx9("div", { className: "grid grid-cols-1 gap-3 lg:grid-cols-2", children: visible.map((m) => {
1411
1789
  const pts = pointsFor(m, series);
1412
1790
  return /* @__PURE__ */ jsxs8(
1413
1791
  "div",
@@ -1415,10 +1793,10 @@ function MachineDetail({
1415
1793
  className: "flex flex-col gap-3 rounded-og-lg border border-og-border bg-og-surface-1 p-4 shadow-og-sm",
1416
1794
  children: [
1417
1795
  /* @__PURE__ */ jsxs8("div", { className: "flex items-baseline justify-between", children: [
1418
- /* @__PURE__ */ jsx8("span", { className: "text-og-sm font-medium text-og-fg", children: m.title }),
1419
- latest && /* @__PURE__ */ jsx8("span", { className: "font-og-mono text-og-sm tabular-nums text-og-fg-muted", children: m.current(latest) })
1796
+ /* @__PURE__ */ jsx9("span", { className: "text-og-sm font-medium text-og-fg", children: m.title }),
1797
+ latest && /* @__PURE__ */ jsx9("span", { className: "font-og-mono text-og-sm tabular-nums text-og-fg-muted", children: m.current(latest) })
1420
1798
  ] }),
1421
- /* @__PURE__ */ jsx8(
1799
+ /* @__PURE__ */ jsx9(
1422
1800
  MetricHistoryChart,
1423
1801
  {
1424
1802
  points: pts,
@@ -1426,7 +1804,7 @@ function MachineDetail({
1426
1804
  unit: m.unit,
1427
1805
  color: m.color,
1428
1806
  thresholds: m.thresholds,
1429
- rangeLabel: WINDOW_LABEL[window],
1807
+ rangeLabel: WINDOW_LABEL(t)[window],
1430
1808
  height: 128,
1431
1809
  className: cn(loadingSeries && "opacity-50 transition-opacity")
1432
1810
  }
@@ -1441,18 +1819,19 @@ function MachineDetail({
1441
1819
 
1442
1820
  // src/components/machines-dashboard.tsx
1443
1821
  import { LaptopIcon as LaptopIcon3, PlusIcon, RefreshCwIcon } from "lucide-react";
1444
- import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
1822
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1445
1823
  function EmptyState({ onEnroll }) {
1824
+ const t = useOpenGeniText();
1446
1825
  return /* @__PURE__ */ jsxs9(
1447
1826
  "div",
1448
1827
  {
1449
1828
  "data-machines-empty": true,
1450
1829
  className: "flex flex-col items-center justify-center gap-3 rounded-og-lg border border-dashed border-og-border bg-og-surface-1 px-6 py-12 text-center",
1451
1830
  children: [
1452
- /* @__PURE__ */ jsx9("span", { className: "flex size-10 items-center justify-center rounded-full bg-og-surface-2 text-og-fg-subtle", children: /* @__PURE__ */ jsx9(LaptopIcon3, { className: "size-5", "aria-hidden": true }) }),
1831
+ /* @__PURE__ */ jsx10("span", { className: "flex size-10 items-center justify-center rounded-full bg-og-surface-2 text-og-fg-subtle", children: /* @__PURE__ */ jsx10(LaptopIcon3, { className: "size-5", "aria-hidden": true }) }),
1453
1832
  /* @__PURE__ */ jsxs9("div", { className: "space-y-1", children: [
1454
- /* @__PURE__ */ jsx9("p", { className: "text-og-base font-medium text-og-fg", children: "No machines yet" }),
1455
- /* @__PURE__ */ jsx9("p", { className: "max-w-xs text-og-sm text-og-fg-muted", children: "Connect your own computer to run the agent on it \u2014 your files, your terminal, your desktop." })
1833
+ /* @__PURE__ */ jsx10("p", { className: "text-og-base font-medium text-og-fg", children: t("machinesDashboard.noMachinesYet") }),
1834
+ /* @__PURE__ */ jsx10("p", { className: "max-w-xs text-og-sm text-og-fg-muted", children: t("machinesDashboard.connectYourOwnComputerTo") })
1456
1835
  ] }),
1457
1836
  onEnroll ? /* @__PURE__ */ jsxs9(
1458
1837
  "button",
@@ -1460,10 +1839,10 @@ function EmptyState({ onEnroll }) {
1460
1839
  type: "button",
1461
1840
  "data-enroll-cta": true,
1462
1841
  onClick: onEnroll,
1463
- className: "inline-flex items-center gap-1.5 rounded-og-sm bg-og-accent px-3 py-1.5 text-og-sm font-medium text-og-accent-fg transition-colors hover:bg-og-accent-strong pointer-coarse:min-h-11",
1842
+ className: "inline-flex items-center gap-1.5 rounded-og-sm border border-og-primary-border bg-og-primary text-og-primary-fg px-3 py-1.5 text-og-sm font-medium transition-colors hover:bg-og-primary-hover pointer-coarse:min-h-11",
1464
1843
  children: [
1465
- /* @__PURE__ */ jsx9(PlusIcon, { className: "size-3.5", "aria-hidden": true }),
1466
- "Connect a machine"
1844
+ /* @__PURE__ */ jsx10(PlusIcon, { className: "size-3.5", "aria-hidden": true }),
1845
+ t("machinesDashboard.connectAMachine")
1467
1846
  ]
1468
1847
  }
1469
1848
  ) : null
@@ -1475,12 +1854,13 @@ function Header({
1475
1854
  count,
1476
1855
  onEnroll
1477
1856
  }) {
1857
+ const t = useOpenGeniText();
1478
1858
  return /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between gap-3", children: [
1479
1859
  /* @__PURE__ */ jsxs9("div", { className: "flex items-baseline gap-2", children: [
1480
- /* @__PURE__ */ jsx9("h2", { className: "text-og-base font-semibold text-og-fg", children: "Machines" }),
1481
- /* @__PURE__ */ jsx9("span", { className: "font-og-mono text-og-xs text-og-fg-subtle", children: count })
1860
+ /* @__PURE__ */ jsx10("h2", { className: "text-og-base font-semibold text-og-fg", children: t("machinesDashboard.machines") }),
1861
+ /* @__PURE__ */ jsx10("span", { className: "font-og-mono text-og-xs text-og-fg-subtle", children: count })
1482
1862
  ] }),
1483
- /* @__PURE__ */ jsx9("div", { className: "flex items-center gap-1.5", children: onEnroll ? /* @__PURE__ */ jsxs9(
1863
+ /* @__PURE__ */ jsx10("div", { className: "flex items-center gap-1.5", children: onEnroll ? /* @__PURE__ */ jsxs9(
1484
1864
  "button",
1485
1865
  {
1486
1866
  type: "button",
@@ -1488,8 +1868,8 @@ function Header({
1488
1868
  onClick: onEnroll,
1489
1869
  className: "inline-flex items-center gap-1.5 rounded-og-sm border border-og-border px-2.5 py-1 text-og-sm font-medium text-og-fg-muted transition-colors hover:border-og-border-strong hover:text-og-fg pointer-coarse:min-h-11",
1490
1870
  children: [
1491
- /* @__PURE__ */ jsx9(PlusIcon, { className: "size-3.5", "aria-hidden": true }),
1492
- "Connect a machine"
1871
+ /* @__PURE__ */ jsx10(PlusIcon, { className: "size-3.5", "aria-hidden": true }),
1872
+ t("machinesDashboard.connectAMachine")
1493
1873
  ]
1494
1874
  }
1495
1875
  ) : null })
@@ -1511,19 +1891,17 @@ function MachinesDashboard({
1511
1891
  onRefresh,
1512
1892
  className
1513
1893
  }) {
1894
+ const t = useOpenGeniText();
1514
1895
  const isEmpty = !loading && !error && machines.length === 0;
1515
1896
  return /* @__PURE__ */ jsxs9("section", { "data-machines-dashboard": true, className: cn("og-root flex flex-col gap-3", className), children: [
1516
- /* @__PURE__ */ jsx9(Header, { count: machines.length, onEnroll }),
1897
+ /* @__PURE__ */ jsx10(Header, { count: machines.length, onEnroll }),
1517
1898
  error ? /* @__PURE__ */ jsxs9(
1518
1899
  "div",
1519
1900
  {
1520
1901
  "data-machines-error": true,
1521
1902
  className: "flex flex-wrap items-center justify-between gap-2 rounded-og-md border border-og-status-failed/30 bg-og-status-failed/10 px-3 py-2 text-og-sm text-og-status-failed",
1522
1903
  children: [
1523
- /* @__PURE__ */ jsxs9("span", { children: [
1524
- "Could not load machines: ",
1525
- error.message
1526
- ] }),
1904
+ /* @__PURE__ */ jsx10("span", { children: t("machinesDashboard.couldNotLoadMachinesMessage", { message: error.message }) }),
1527
1905
  onRefresh ? /* @__PURE__ */ jsxs9(
1528
1906
  "button",
1529
1907
  {
@@ -1533,21 +1911,21 @@ function MachinesDashboard({
1533
1911
  disabled: loading,
1534
1912
  className: "inline-flex items-center gap-1.5 rounded-og-sm border border-og-status-failed/30 px-2 py-1 text-og-xs font-medium transition-colors hover:border-og-status-failed/50 disabled:cursor-not-allowed disabled:opacity-60 pointer-coarse:min-h-11",
1535
1913
  children: [
1536
- /* @__PURE__ */ jsx9(RefreshCwIcon, { className: cn("size-3.5", loading && "animate-og-spin"), "aria-hidden": true }),
1537
- loading ? "Retrying\u2026" : "Retry"
1914
+ /* @__PURE__ */ jsx10(RefreshCwIcon, { className: cn("size-3.5", loading && "animate-og-spin"), "aria-hidden": true }),
1915
+ loading ? t("machinesDashboard.retrying") : t("machinesDashboard.retry")
1538
1916
  ]
1539
1917
  }
1540
1918
  ) : null
1541
1919
  ]
1542
1920
  }
1543
1921
  ) : null,
1544
- loading && machines.length === 0 ? /* @__PURE__ */ jsx9("div", { "data-machines-loading": true, className: "grid gap-3 sm:grid-cols-2", children: [0, 1].map((i) => /* @__PURE__ */ jsx9(
1922
+ loading && machines.length === 0 ? /* @__PURE__ */ jsx10("div", { "data-machines-loading": true, className: "grid gap-3 sm:grid-cols-2", children: [0, 1].map((i) => /* @__PURE__ */ jsx10(
1545
1923
  "div",
1546
1924
  {
1547
1925
  className: "h-36 animate-og-pulse rounded-og-lg border border-og-border bg-og-surface-1"
1548
1926
  },
1549
1927
  i
1550
- )) }) : isEmpty ? /* @__PURE__ */ jsx9(EmptyState, { onEnroll }) : /* @__PURE__ */ jsx9("div", { className: "grid gap-3 sm:grid-cols-2 xl:grid-cols-3", "data-machines-grid": true, children: machines.map((machine) => /* @__PURE__ */ jsx9(
1928
+ )) }) : isEmpty ? /* @__PURE__ */ jsx10(EmptyState, { onEnroll }) : /* @__PURE__ */ jsx10("div", { className: "grid gap-3 sm:grid-cols-2 xl:grid-cols-3", "data-machines-grid": true, children: machines.map((machine) => /* @__PURE__ */ jsx10(
1551
1929
  MachineCard,
1552
1930
  {
1553
1931
  machine: {
@@ -1568,11 +1946,12 @@ function MachinesDashboard({
1568
1946
  }
1569
1947
 
1570
1948
  // src/components/machine-dock-bar.tsx
1571
- import { LaptopIcon as LaptopIcon4, CpuIcon as CpuIcon3, UsersIcon as UsersIcon2 } from "lucide-react";
1572
- import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
1949
+ import { LaptopIcon as LaptopIcon4, CpuIcon as CpuIcon3, UsersIcon as UsersIcon3 } from "lucide-react";
1950
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1573
1951
  function MachineDockBar({ name, kind, state, className }) {
1574
- const Icon = kind === "selfhosted" ? LaptopIcon4 : CpuIcon3;
1575
- const stateBadge = MACHINE_STATE_BADGE_META[state];
1952
+ const t = useOpenGeniText();
1953
+ const Icon = kind === "selfhosted" || kind === "local" ? LaptopIcon4 : CpuIcon3;
1954
+ const stateBadge = MACHINE_STATE_BADGE_META(t)[state];
1576
1955
  return /* @__PURE__ */ jsxs10(
1577
1956
  "div",
1578
1957
  {
@@ -1583,9 +1962,9 @@ function MachineDockBar({ name, kind, state, className }) {
1583
1962
  ),
1584
1963
  children: [
1585
1964
  /* @__PURE__ */ jsxs10("div", { className: "flex min-w-0 items-center gap-1.5", children: [
1586
- /* @__PURE__ */ jsx10(Icon, { className: "size-3.5 shrink-0 text-og-fg-subtle", "aria-hidden": true }),
1587
- /* @__PURE__ */ jsx10("span", { className: "truncate text-[11px] font-medium text-og-fg", children: name }),
1588
- stateBadge ? /* @__PURE__ */ jsx10(
1965
+ /* @__PURE__ */ jsx11(Icon, { className: "size-3.5 shrink-0 text-og-fg-subtle", "aria-hidden": true }),
1966
+ /* @__PURE__ */ jsx11("span", { className: "truncate text-[11px] font-medium text-og-fg", children: name }),
1967
+ stateBadge ? /* @__PURE__ */ jsx11(
1589
1968
  "span",
1590
1969
  {
1591
1970
  "data-state-badge": state,
@@ -1597,7 +1976,7 @@ function MachineDockBar({ name, kind, state, className }) {
1597
1976
  }
1598
1977
  ) : null
1599
1978
  ] }),
1600
- /* @__PURE__ */ jsx10(
1979
+ /* @__PURE__ */ jsx11(
1601
1980
  ConnectionStatusPill,
1602
1981
  {
1603
1982
  status: connectionStatusForState(state),
@@ -1614,6 +1993,7 @@ function SharedMachineDisclosure({
1614
1993
  density = "compact",
1615
1994
  className
1616
1995
  }) {
1996
+ const t = useOpenGeniText();
1617
1997
  const others = Math.max(0, sharedSessionCount - 1);
1618
1998
  return /* @__PURE__ */ jsxs10(
1619
1999
  "div",
@@ -1625,11 +2005,13 @@ function SharedMachineDisclosure({
1625
2005
  className
1626
2006
  ),
1627
2007
  children: [
1628
- /* @__PURE__ */ jsx10(UsersIcon2, { className: "size-3.5 shrink-0 text-og-accent", "aria-hidden": true }),
2008
+ /* @__PURE__ */ jsx11(UsersIcon3, { className: "size-3.5 shrink-0 text-og-accent", "aria-hidden": true }),
1629
2009
  /* @__PURE__ */ jsxs10("span", { children: [
1630
- "Shared \u2014 ",
1631
- others === 1 ? "another session is" : `${others} other sessions are`,
1632
- " on this machine. They see the same terminal, files, and desktop."
2010
+ t("machineDockBar.shared"),
2011
+ " ",
2012
+ others === 1 ? t("machineDockBar.anotherSessionIs") : t("machineDockBar.othersOtherSessionsAre", { others }),
2013
+ " ",
2014
+ t("machineDockBar.onThisMachineTheySee")
1633
2015
  ] })
1634
2016
  ]
1635
2017
  }
@@ -1638,7 +2020,7 @@ function SharedMachineDisclosure({
1638
2020
 
1639
2021
  // src/components/enrollment-device-flow.tsx
1640
2022
  import { CopyIcon, ExternalLinkIcon, LaptopIcon as LaptopIcon5, TerminalIcon } from "lucide-react";
1641
- import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
2023
+ import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1642
2024
  var PHASE_TO_STATE = {
1643
2025
  pending: "enrolling",
1644
2026
  authorized: "online",
@@ -1647,14 +2029,15 @@ var PHASE_TO_STATE = {
1647
2029
  disabled: "offline"
1648
2030
  };
1649
2031
  function PhaseLabel({ phase }) {
2032
+ const t = useOpenGeniText();
1650
2033
  const text = {
1651
- pending: "Waiting for approval",
1652
- authorized: "Connected",
1653
- denied: "Denied",
1654
- expired: "Code expired",
1655
- disabled: "Enrollment disabled"
2034
+ pending: t("enrollmentDeviceFlow.waitingForApproval"),
2035
+ authorized: t("enrollmentDeviceFlow.connected"),
2036
+ denied: t("enrollmentDeviceFlow.denied"),
2037
+ expired: t("enrollmentDeviceFlow.codeExpired"),
2038
+ disabled: t("enrollmentDeviceFlow.enrollmentDisabled")
1656
2039
  };
1657
- return /* @__PURE__ */ jsx11("span", { children: text[phase] });
2040
+ return /* @__PURE__ */ jsx12("span", { children: text[phase] });
1658
2041
  }
1659
2042
  function EnrollmentDeviceFlow({
1660
2043
  userCode,
@@ -1668,6 +2051,7 @@ function EnrollmentDeviceFlow({
1668
2051
  onOpenVerification,
1669
2052
  className
1670
2053
  }) {
2054
+ const t = useOpenGeniText();
1671
2055
  const href = verificationUriComplete ?? verificationUri;
1672
2056
  const codeIsPlaceholder = !/[A-Za-z0-9]/.test(userCode);
1673
2057
  const awaitingCode = phase === "pending" && codeIsPlaceholder;
@@ -1682,42 +2066,42 @@ function EnrollmentDeviceFlow({
1682
2066
  children: [
1683
2067
  /* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between gap-3", children: [
1684
2068
  /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2", children: [
1685
- /* @__PURE__ */ jsx11("span", { className: "flex size-7 items-center justify-center rounded-full bg-og-surface-2 text-og-fg-muted", children: /* @__PURE__ */ jsx11(LaptopIcon5, { className: "size-4", "aria-hidden": true }) }),
1686
- /* @__PURE__ */ jsx11("h2", { className: "text-og-menu font-semibold text-og-fg", children: "Connect a machine" })
2069
+ /* @__PURE__ */ jsx12("span", { className: "flex size-7 items-center justify-center rounded-full bg-og-surface-2 text-og-fg-muted", children: /* @__PURE__ */ jsx12(LaptopIcon5, { className: "size-4", "aria-hidden": true }) }),
2070
+ /* @__PURE__ */ jsx12("h2", { className: "text-og-menu font-semibold text-og-fg", children: t("enrollmentDeviceFlow.connectAMachine") })
1687
2071
  ] }),
1688
- /* @__PURE__ */ jsx11(
2072
+ /* @__PURE__ */ jsx12(
1689
2073
  ConnectionStatusPill,
1690
2074
  {
1691
2075
  status: PHASE_TO_STATE[phase] === "online" ? "online" : PHASE_TO_STATE[phase] === "offline" ? "offline" : "reconnecting",
1692
- label: /* @__PURE__ */ jsx11(PhaseLabel, { phase }),
2076
+ label: /* @__PURE__ */ jsx12(PhaseLabel, { phase }),
1693
2077
  size: "sm"
1694
2078
  }
1695
2079
  )
1696
2080
  ] }),
1697
2081
  installCommand ? /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-1.5", children: [
1698
- /* @__PURE__ */ jsx11("span", { className: "text-[11px] font-medium uppercase tracking-wide text-og-fg-subtle", children: "1 \xB7 Run on the machine" }),
2082
+ /* @__PURE__ */ jsx12("span", { className: "text-[11px] font-medium uppercase tracking-wide text-og-fg-subtle", children: t("enrollmentDeviceFlow.n1RunOnTheMachine") }),
1699
2083
  /* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between gap-2 overflow-hidden rounded-og-md border border-og-border bg-og-bg px-2.5 py-1.5", children: [
1700
2084
  /* @__PURE__ */ jsxs11("code", { className: "flex min-w-0 items-center gap-2 overflow-x-auto font-og-mono text-[12px] text-og-fg", children: [
1701
- /* @__PURE__ */ jsx11(TerminalIcon, { className: "size-3.5 shrink-0 text-og-fg-subtle", "aria-hidden": true }),
2085
+ /* @__PURE__ */ jsx12(TerminalIcon, { className: "size-3.5 shrink-0 text-og-fg-subtle", "aria-hidden": true }),
1702
2086
  installCommand
1703
2087
  ] }),
1704
- /* @__PURE__ */ jsx11(
2088
+ /* @__PURE__ */ jsx12(
1705
2089
  "button",
1706
2090
  {
1707
2091
  type: "button",
1708
2092
  "data-copy-install": true,
1709
2093
  onClick: onCopyInstall,
1710
- title: "Copy command",
2094
+ title: t("enrollmentDeviceFlow.copyCommand"),
1711
2095
  className: "shrink-0 rounded-og-sm p-1.5 text-og-fg-subtle transition-colors hover:bg-og-surface-2 hover:text-og-fg",
1712
- children: /* @__PURE__ */ jsx11(CopyIcon, { className: "size-4", "aria-hidden": true })
2096
+ children: /* @__PURE__ */ jsx12(CopyIcon, { className: "size-4", "aria-hidden": true })
1713
2097
  }
1714
2098
  )
1715
2099
  ] })
1716
2100
  ] }) : null,
1717
2101
  /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-1.5", children: [
1718
- /* @__PURE__ */ jsx11("span", { className: "text-[11px] font-medium uppercase tracking-wide text-og-fg-subtle", children: installCommand ? "2 \xB7 Approve the machine" : "Approve the machine" }),
2102
+ /* @__PURE__ */ jsx12("span", { className: "text-[11px] font-medium uppercase tracking-wide text-og-fg-subtle", children: installCommand ? t("enrollmentDeviceFlow.n2ApproveTheMachine") : t("enrollmentDeviceFlow.approveTheMachine") }),
1719
2103
  /* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between gap-3 rounded-og-md border border-og-border bg-og-bg px-3 py-2.5", children: [
1720
- awaitingCode ? /* @__PURE__ */ jsx11("span", { "data-user-code": true, className: "font-og-mono text-[13px] text-og-fg-subtle", children: "Run the command above \u2014 your code appears here" }) : /* @__PURE__ */ jsx11(
2104
+ awaitingCode ? /* @__PURE__ */ jsx12("span", { "data-user-code": true, className: "font-og-mono text-[13px] text-og-fg-subtle", children: t("enrollmentDeviceFlow.runTheCommandAboveYour") }) : /* @__PURE__ */ jsx12(
1721
2105
  "span",
1722
2106
  {
1723
2107
  "data-user-code": true,
@@ -1725,16 +2109,16 @@ function EnrollmentDeviceFlow({
1725
2109
  children: userCode
1726
2110
  }
1727
2111
  ),
1728
- /* @__PURE__ */ jsx11(
2112
+ /* @__PURE__ */ jsx12(
1729
2113
  "button",
1730
2114
  {
1731
2115
  type: "button",
1732
2116
  "data-copy-code": true,
1733
2117
  onClick: onCopyCode,
1734
2118
  disabled: awaitingCode,
1735
- title: "Copy code",
2119
+ title: t("enrollmentDeviceFlow.copyCode"),
1736
2120
  className: "shrink-0 rounded-og-sm p-1.5 text-og-fg-subtle transition-colors hover:bg-og-surface-2 hover:text-og-fg disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent disabled:hover:text-og-fg-subtle",
1737
- children: /* @__PURE__ */ jsx11(CopyIcon, { className: "size-4", "aria-hidden": true })
2121
+ children: /* @__PURE__ */ jsx12(CopyIcon, { className: "size-4", "aria-hidden": true })
1738
2122
  }
1739
2123
  )
1740
2124
  ] })
@@ -1747,29 +2131,35 @@ function EnrollmentDeviceFlow({
1747
2131
  target: "_blank",
1748
2132
  rel: "noreferrer",
1749
2133
  onClick: onOpenVerification,
1750
- className: "inline-flex items-center justify-center gap-1.5 rounded-og-sm bg-og-accent px-3 py-2 text-og-menu font-medium text-og-accent-fg transition-colors hover:bg-og-accent-strong",
2134
+ className: "inline-flex items-center justify-center gap-1.5 rounded-og-sm border border-og-primary-border bg-og-primary text-og-primary-fg px-3 py-2 text-og-menu font-medium transition-colors hover:bg-og-primary-hover",
1751
2135
  children: [
1752
- "Open approval page",
1753
- /* @__PURE__ */ jsx11(ExternalLinkIcon, { className: "size-3.5", "aria-hidden": true })
2136
+ t("enrollmentDeviceFlow.openApprovalPage"),
2137
+ /* @__PURE__ */ jsx12(ExternalLinkIcon, { className: "size-3.5", "aria-hidden": true })
1754
2138
  ]
1755
2139
  }
1756
2140
  ),
1757
- /* @__PURE__ */ jsx11("p", { className: "text-center text-[11px] text-og-fg-subtle", children: awaitingCode ? /* @__PURE__ */ jsxs11(Fragment2, { children: [
1758
- "The one-liner prints a short code. Open",
2141
+ /* @__PURE__ */ jsx12("p", { className: "text-center text-[11px] text-og-fg-subtle", children: awaitingCode ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
2142
+ t("enrollmentDeviceFlow.theOneLinerPrintsA"),
2143
+ " ",
2144
+ /* @__PURE__ */ jsx12("span", { className: "font-og-mono text-og-fg-muted", children: verificationUri }),
2145
+ " ",
2146
+ t("enrollmentDeviceFlow.andConfirmTheCodeShown")
2147
+ ] }) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
2148
+ t("enrollmentDeviceFlow.confirmCode"),
2149
+ " ",
2150
+ /* @__PURE__ */ jsx12("span", { className: "font-og-mono text-og-fg-muted", children: userCode }),
1759
2151
  " ",
1760
- /* @__PURE__ */ jsx11("span", { className: "font-og-mono text-og-fg-muted", children: verificationUri }),
1761
- " and confirm the code shown there matches."
1762
- ] }) : /* @__PURE__ */ jsxs11(Fragment2, { children: [
1763
- "Confirm code ",
1764
- /* @__PURE__ */ jsx11("span", { className: "font-og-mono text-og-fg-muted", children: userCode }),
1765
- " \u2014 the one printed by the one-liner \u2014 at",
2152
+ t("enrollmentDeviceFlow.theOnePrintedByThe"),
1766
2153
  " ",
1767
- /* @__PURE__ */ jsx11("span", { className: "font-og-mono text-og-fg-muted", children: verificationUri }),
2154
+ /* @__PURE__ */ jsx12("span", { className: "font-og-mono text-og-fg-muted", children: verificationUri }),
1768
2155
  ".",
1769
- typeof expiresInSeconds === "number" ? /* @__PURE__ */ jsxs11(Fragment2, { children: [
1770
- " Expires in ",
2156
+ typeof expiresInSeconds === "number" ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
2157
+ " ",
2158
+ t("enrollmentDeviceFlow.expiresIn"),
2159
+ " ",
1771
2160
  Math.max(0, Math.round(expiresInSeconds / 60)),
1772
- " min."
2161
+ " ",
2162
+ t("enrollmentDeviceFlow.min")
1773
2163
  ] }) : null
1774
2164
  ] }) })
1775
2165
  ]
@@ -1780,21 +2170,21 @@ function EnrollmentDeviceFlow({
1780
2170
  // src/components/enrollment-consent.tsx
1781
2171
  import { useState as useState3 } from "react";
1782
2172
  import {
1783
- CircleAlertIcon,
2173
+ CircleAlertIcon as CircleAlertIcon2,
1784
2174
  LaptopIcon as LaptopIcon6,
1785
2175
  MonitorIcon as MonitorIcon2,
1786
2176
  ScreenShareIcon,
1787
2177
  ShieldAlertIcon,
1788
2178
  TerminalIcon as TerminalIcon2,
1789
- UsersIcon as UsersIcon3
2179
+ UsersIcon as UsersIcon4
1790
2180
  } from "lucide-react";
1791
- import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
2181
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1792
2182
  function Capability({ icon, title, body }) {
1793
2183
  return /* @__PURE__ */ jsxs12("li", { className: "flex items-start gap-2.5", children: [
1794
- /* @__PURE__ */ jsx12("span", { className: "mt-0.5 shrink-0 text-og-status-failed", children: icon }),
2184
+ /* @__PURE__ */ jsx13("span", { className: "mt-0.5 shrink-0 text-og-status-failed", children: icon }),
1795
2185
  /* @__PURE__ */ jsxs12("span", { className: "min-w-0", children: [
1796
- /* @__PURE__ */ jsx12("span", { className: "block text-og-base font-medium text-og-fg", children: title }),
1797
- /* @__PURE__ */ jsx12("span", { className: "block text-og-sm text-og-fg-muted", children: body })
2186
+ /* @__PURE__ */ jsx13("span", { className: "block text-og-base font-medium text-og-fg", children: title }),
2187
+ /* @__PURE__ */ jsx13("span", { className: "block text-og-sm text-og-fg-muted", children: body })
1798
2188
  ] })
1799
2189
  ] });
1800
2190
  }
@@ -1808,53 +2198,59 @@ function EnrollmentConsent({
1808
2198
  errorMessage,
1809
2199
  className
1810
2200
  }) {
2201
+ const t = useOpenGeniText();
1811
2202
  const [allowScreenControl, setAllowScreenControl] = useState3(machine.requestsScreenControl);
1812
2203
  const [scope, setScope] = useState3("user");
1813
2204
  const busy = phase === "approving";
1814
2205
  const scopeCopy = {
1815
2206
  user: {
1816
- label: "Personal",
1817
- body: "Only you can use this machine, from any workspace you can access in this organization."
2207
+ label: t("enrollmentConsent.personal"),
2208
+ body: t("enrollmentConsent.onlyYouCanUseThis")
1818
2209
  },
1819
2210
  workspace: {
1820
- label: "Workspace",
1821
- body: "Everyone with access to this workspace can use this machine."
2211
+ label: t("enrollmentConsent.workspace"),
2212
+ body: t("enrollmentConsent.everyoneWithAccessToThis")
1822
2213
  },
1823
2214
  organization: {
1824
- label: "Organization",
1825
- body: "Members of this organization can use this machine from their workspaces."
2215
+ label: t("enrollmentConsent.organization"),
2216
+ body: t("enrollmentConsent.membersOfThisOrganizationCan")
1826
2217
  }
1827
2218
  };
1828
2219
  if (phase === "approved") {
1829
- return /* @__PURE__ */ jsx12(
2220
+ return /* @__PURE__ */ jsx13(
1830
2221
  ConsentResult,
1831
2222
  {
1832
2223
  className,
1833
2224
  tone: "ok",
1834
- title: "Machine connected",
1835
- body: `${machine.machineName} is now connected with ${scopeCopy[scope].label.toLowerCase()} access. You can close this page \u2014 it will appear in your Machines dashboard.`
2225
+ title: t("enrollmentConsent.machineConnected"),
2226
+ body: t("enrollmentConsent.machinenameIsNowConnectedWith", {
2227
+ machineName: machine.machineName,
2228
+ lowerCase: scopeCopy[scope].label.toLowerCase()
2229
+ })
1836
2230
  }
1837
2231
  );
1838
2232
  }
1839
2233
  if (phase === "denied") {
1840
- return /* @__PURE__ */ jsx12(
2234
+ return /* @__PURE__ */ jsx13(
1841
2235
  ConsentResult,
1842
2236
  {
1843
2237
  className,
1844
2238
  tone: "muted",
1845
- title: "Enrollment denied",
1846
- body: `You declined to connect ${machine.machineName}. The agent has no access to this machine. You can re-run the install one-liner to try again.`
2239
+ title: t("enrollmentConsent.enrollmentDenied"),
2240
+ body: t("enrollmentConsent.youDeclinedToConnectMachinename", {
2241
+ machineName: machine.machineName
2242
+ })
1847
2243
  }
1848
2244
  );
1849
2245
  }
1850
2246
  if (phase === "error") {
1851
- return /* @__PURE__ */ jsx12(
2247
+ return /* @__PURE__ */ jsx13(
1852
2248
  ConsentResult,
1853
2249
  {
1854
2250
  className,
1855
2251
  tone: "danger",
1856
- title: "Could not complete enrollment",
1857
- body: errorMessage ?? "The code may have expired. Re-run the install one-liner on the machine for a fresh code."
2252
+ title: t("enrollmentConsent.couldNotCompleteEnrollment"),
2253
+ body: errorMessage ?? t("enrollmentConsent.theCodeMayHaveExpired")
1858
2254
  }
1859
2255
  );
1860
2256
  }
@@ -1868,59 +2264,63 @@ function EnrollmentConsent({
1868
2264
  ),
1869
2265
  children: [
1870
2266
  /* @__PURE__ */ jsxs12("div", { className: "flex items-start gap-3", children: [
1871
- /* @__PURE__ */ jsx12("span", { className: "flex size-9 shrink-0 items-center justify-center rounded-full bg-og-status-failed/15 text-og-status-failed", children: /* @__PURE__ */ jsx12(ShieldAlertIcon, { className: "size-5", "aria-hidden": true }) }),
2267
+ /* @__PURE__ */ jsx13("span", { className: "flex size-9 shrink-0 items-center justify-center rounded-full bg-og-status-failed/15 text-og-status-failed", children: /* @__PURE__ */ jsx13(ShieldAlertIcon, { className: "size-5", "aria-hidden": true }) }),
1872
2268
  /* @__PURE__ */ jsxs12("div", { className: "min-w-0", children: [
1873
- /* @__PURE__ */ jsx12("h1", { className: "text-og-md font-semibold text-og-fg", children: "Give the agent your whole machine?" }),
2269
+ /* @__PURE__ */ jsx13("h1", { className: "text-og-md font-semibold text-og-fg", children: t("enrollmentConsent.giveTheAgentYourWhole") }),
1874
2270
  /* @__PURE__ */ jsxs12("p", { className: "mt-1 text-og-base text-og-fg-muted", children: [
1875
- "Approving lets the OpenGeni agent run on",
2271
+ t("enrollmentConsent.approvingLetsTheOpengeniAgent"),
2272
+ " ",
2273
+ /* @__PURE__ */ jsx13("span", { className: "font-medium text-og-fg", children: machine.machineName }),
1876
2274
  " ",
1877
- /* @__PURE__ */ jsx12("span", { className: "font-medium text-og-fg", children: machine.machineName }),
1878
- " with full access. This is your real computer \u2014 not a sandbox."
2275
+ t("enrollmentConsent.withFullAccessThisIs")
1879
2276
  ] })
1880
2277
  ] })
1881
2278
  ] }),
1882
2279
  /* @__PURE__ */ jsxs12("div", { className: "flex flex-wrap items-center gap-2 rounded-og-md border border-og-border bg-og-surface-2 px-3 py-2 text-og-sm", children: [
1883
- /* @__PURE__ */ jsx12(LaptopIcon6, { className: "size-4 text-og-fg-subtle", "aria-hidden": true }),
1884
- /* @__PURE__ */ jsx12("span", { className: "font-medium text-og-fg", children: machine.machineName }),
2280
+ /* @__PURE__ */ jsx13(LaptopIcon6, { className: "size-4 text-og-fg-subtle", "aria-hidden": true }),
2281
+ /* @__PURE__ */ jsx13("span", { className: "font-medium text-og-fg", children: machine.machineName }),
1885
2282
  /* @__PURE__ */ jsxs12("span", { className: "font-og-mono text-og-fg-subtle", children: [
1886
2283
  machine.os,
1887
2284
  "/",
1888
2285
  machine.arch
1889
2286
  ] }),
1890
- /* @__PURE__ */ jsx12("span", { "aria-hidden": true, className: "text-og-fg-subtle", children: "\xB7" }),
2287
+ /* @__PURE__ */ jsx13("span", { "aria-hidden": true, className: "text-og-fg-subtle", children: "\xB7" }),
1891
2288
  /* @__PURE__ */ jsxs12("span", { className: "text-og-fg-subtle", children: [
1892
- "code ",
1893
- /* @__PURE__ */ jsx12("span", { className: "font-og-mono font-medium text-og-fg", children: userCode })
2289
+ t("enrollmentConsent.code"),
2290
+ " ",
2291
+ /* @__PURE__ */ jsx13("span", { className: "font-og-mono font-medium text-og-fg", children: userCode })
1894
2292
  ] })
1895
2293
  ] }),
1896
2294
  /* @__PURE__ */ jsxs12("ul", { className: "flex flex-col gap-3", children: [
1897
- /* @__PURE__ */ jsx12(
2295
+ /* @__PURE__ */ jsx13(
1898
2296
  Capability,
1899
2297
  {
1900
- icon: /* @__PURE__ */ jsx12(TerminalIcon2, { className: "size-4", "aria-hidden": true }),
1901
- title: "Read, write & run anything",
1902
- body: "The agent can read and modify any file, run any command, and use your git credentials \u2014 as if it were you at the keyboard."
2298
+ icon: /* @__PURE__ */ jsx13(TerminalIcon2, { className: "size-4", "aria-hidden": true }),
2299
+ title: t("enrollmentConsent.readWriteRunAnything"),
2300
+ body: t("enrollmentConsent.theAgentCanReadAnd")
1903
2301
  }
1904
2302
  ),
1905
- machine.canOfferDisplay ? /* @__PURE__ */ jsx12(
2303
+ machine.canOfferDisplay ? /* @__PURE__ */ jsx13(
1906
2304
  Capability,
1907
2305
  {
1908
- icon: /* @__PURE__ */ jsx12(MonitorIcon2, { className: "size-4", "aria-hidden": true }),
1909
- title: "See your screen",
1910
- body: "The agent can capture this machine's display to watch what it is doing."
2306
+ icon: /* @__PURE__ */ jsx13(MonitorIcon2, { className: "size-4", "aria-hidden": true }),
2307
+ title: t("enrollmentConsent.seeYourScreen"),
2308
+ body: t("enrollmentConsent.theAgentCanCaptureThis")
1911
2309
  }
1912
2310
  ) : null,
1913
- /* @__PURE__ */ jsx12(
2311
+ /* @__PURE__ */ jsx13(
1914
2312
  Capability,
1915
2313
  {
1916
- icon: /* @__PURE__ */ jsx12(UsersIcon3, { className: "size-4", "aria-hidden": true }),
1917
- title: `${scopeCopy[scope].label} access while connected`,
1918
- body: `${scopeCopy[scope].body} Disconnect the agent to revoke access instantly.`
2314
+ icon: /* @__PURE__ */ jsx13(UsersIcon4, { className: "size-4", "aria-hidden": true }),
2315
+ title: t("enrollmentConsent.labelAccessWhileConnected", {
2316
+ label: scopeCopy[scope].label
2317
+ }),
2318
+ body: t("enrollmentConsent.bodyDisconnectTheAgentTo", { body: scopeCopy[scope].body })
1919
2319
  }
1920
2320
  )
1921
2321
  ] }),
1922
2322
  /* @__PURE__ */ jsxs12("fieldset", { className: "flex flex-col gap-2", disabled: busy, children: [
1923
- /* @__PURE__ */ jsx12("legend", { className: "mb-1 text-og-sm font-medium text-og-fg", children: "Who can use this machine?" }),
2323
+ /* @__PURE__ */ jsx13("legend", { className: "mb-1 text-og-sm font-medium text-og-fg", children: t("enrollmentConsent.whoCanUseThisMachine") }),
1924
2324
  ["user", "workspace", "organization"].map((candidate) => {
1925
2325
  const disabled = candidate === "organization" && !allowOrganizationScope;
1926
2326
  return /* @__PURE__ */ jsxs12(
@@ -1933,7 +2333,7 @@ function EnrollmentConsent({
1933
2333
  disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
1934
2334
  ),
1935
2335
  children: [
1936
- /* @__PURE__ */ jsx12(
2336
+ /* @__PURE__ */ jsx13(
1937
2337
  "input",
1938
2338
  {
1939
2339
  type: "radio",
@@ -1950,7 +2350,7 @@ function EnrollmentConsent({
1950
2350
  scopeCopy[candidate].label,
1951
2351
  disabled ? " \xB7 organization admin required" : ""
1952
2352
  ] }),
1953
- /* @__PURE__ */ jsx12("span", { className: "block text-og-sm text-og-fg-muted", children: scopeCopy[candidate].body })
2353
+ /* @__PURE__ */ jsx13("span", { className: "block text-og-sm text-og-fg-muted", children: scopeCopy[candidate].body })
1954
2354
  ] })
1955
2355
  ]
1956
2356
  },
@@ -1964,7 +2364,7 @@ function EnrollmentConsent({
1964
2364
  "data-screen-control-toggle": true,
1965
2365
  className: "flex cursor-pointer items-start gap-3 rounded-og-md border border-og-border bg-og-bg px-3 py-2.5",
1966
2366
  children: [
1967
- /* @__PURE__ */ jsx12(
2367
+ /* @__PURE__ */ jsx13(
1968
2368
  "input",
1969
2369
  {
1970
2370
  type: "checkbox",
@@ -1976,19 +2376,19 @@ function EnrollmentConsent({
1976
2376
  ),
1977
2377
  /* @__PURE__ */ jsxs12("span", { className: "min-w-0", children: [
1978
2378
  /* @__PURE__ */ jsxs12("span", { className: "flex items-center gap-1.5 text-og-base font-medium text-og-fg", children: [
1979
- /* @__PURE__ */ jsx12(ScreenShareIcon, { className: "size-3.5 text-og-fg-muted", "aria-hidden": true }),
1980
- "Also let the agent control my mouse & keyboard"
2379
+ /* @__PURE__ */ jsx13(ScreenShareIcon, { className: "size-3.5 text-og-fg-muted", "aria-hidden": true }),
2380
+ t("enrollmentConsent.alsoLetTheAgentControl")
1981
2381
  ] }),
1982
- /* @__PURE__ */ jsx12("span", { className: "mt-0.5 block text-og-sm text-og-fg-muted", children: "Optional. Enables computer-use \u2014 the agent can move the pointer, type, and click on this machine's desktop. Leave off to let it only watch." })
2382
+ /* @__PURE__ */ jsx13("span", { className: "mt-0.5 block text-og-sm text-og-fg-muted", children: t("enrollmentConsent.optionalEnablesComputerUseThe") })
1983
2383
  ] })
1984
2384
  ]
1985
2385
  }
1986
2386
  ) : /* @__PURE__ */ jsxs12("p", { className: "flex items-start gap-2 rounded-og-md border border-og-border bg-og-bg px-3 py-2 text-og-sm text-og-fg-muted", children: [
1987
- /* @__PURE__ */ jsx12(CircleAlertIcon, { className: "mt-px size-3.5 shrink-0 text-og-fg-subtle", "aria-hidden": true }),
1988
- "This machine has no display, so screen control isn't available \u2014 files, terminal, and git only."
2387
+ /* @__PURE__ */ jsx13(CircleAlertIcon2, { className: "mt-px size-3.5 shrink-0 text-og-fg-subtle", "aria-hidden": true }),
2388
+ t("enrollmentConsent.thisMachineHasNoDisplay")
1989
2389
  ] }),
1990
2390
  /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2", children: [
1991
- /* @__PURE__ */ jsx12(
2391
+ /* @__PURE__ */ jsx13(
1992
2392
  "button",
1993
2393
  {
1994
2394
  type: "button",
@@ -1996,10 +2396,10 @@ function EnrollmentConsent({
1996
2396
  disabled: busy,
1997
2397
  onClick: () => onDeny?.(),
1998
2398
  className: "flex-1 rounded-og-sm border border-og-border px-3 py-2 text-og-sm font-medium text-og-fg-muted transition-colors hover:border-og-border-strong hover:text-og-fg disabled:opacity-50 pointer-coarse:min-h-11",
1999
- children: "Cancel"
2399
+ children: t("enrollmentConsent.cancel")
2000
2400
  }
2001
2401
  ),
2002
- /* @__PURE__ */ jsx12(
2402
+ /* @__PURE__ */ jsx13(
2003
2403
  "button",
2004
2404
  {
2005
2405
  type: "button",
@@ -2007,7 +2407,7 @@ function EnrollmentConsent({
2007
2407
  disabled: busy,
2008
2408
  onClick: () => onApprove?.(allowScreenControl, scope),
2009
2409
  className: "flex-1 rounded-og-sm bg-og-status-failed px-3 py-2 text-og-sm font-semibold text-og-accent-fg transition-colors hover:opacity-90 disabled:opacity-50 pointer-coarse:min-h-11",
2010
- children: busy ? "Connecting\u2026" : "Grant full access"
2410
+ children: busy ? t("enrollmentConsent.connecting") : t("enrollmentConsent.grantFullAccess")
2011
2411
  }
2012
2412
  )
2013
2413
  ] })
@@ -2033,18 +2433,18 @@ function ConsentResult({
2033
2433
  className
2034
2434
  ),
2035
2435
  children: [
2036
- /* @__PURE__ */ jsx12(
2436
+ /* @__PURE__ */ jsx13(
2037
2437
  "span",
2038
2438
  {
2039
2439
  className: cn(
2040
2440
  "flex size-10 items-center justify-center rounded-full bg-og-surface-2",
2041
2441
  iconClass
2042
2442
  ),
2043
- children: /* @__PURE__ */ jsx12(LaptopIcon6, { className: "size-5", "aria-hidden": true })
2443
+ children: /* @__PURE__ */ jsx13(LaptopIcon6, { className: "size-5", "aria-hidden": true })
2044
2444
  }
2045
2445
  ),
2046
- /* @__PURE__ */ jsx12("h1", { className: "text-og-md font-semibold text-og-fg", children: title }),
2047
- /* @__PURE__ */ jsx12("p", { className: "max-w-sm text-og-base text-og-fg-muted", children: body })
2446
+ /* @__PURE__ */ jsx13("h1", { className: "text-og-md font-semibold text-og-fg", children: title }),
2447
+ /* @__PURE__ */ jsx13("p", { className: "max-w-sm text-og-base text-og-fg-muted", children: body })
2048
2448
  ]
2049
2449
  }
2050
2450
  );
@@ -2061,6 +2461,11 @@ var EMPTY_MACHINES = {
2061
2461
  machines: []
2062
2462
  };
2063
2463
  var shares = /* @__PURE__ */ new Map();
2464
+ function isMachinesAccessRefusal(cause) {
2465
+ if (!cause || typeof cause !== "object" || !("status" in cause)) return false;
2466
+ const status = cause.status;
2467
+ return status === 401 || status === 403 || status === 404;
2468
+ }
2064
2469
  function emit(share) {
2065
2470
  for (const subscriber of share.subscribers) {
2066
2471
  subscriber.onChange();
@@ -2099,6 +2504,7 @@ function cancelDispose(share) {
2099
2504
  }
2100
2505
  function arm(share) {
2101
2506
  stopTimer(share);
2507
+ if (share.halted) return;
2102
2508
  const { enabled, pollIntervalMs } = effective(share);
2103
2509
  if (!enabled || pollIntervalMs === void 0) return;
2104
2510
  share.timer = setTimeout(() => {
@@ -2115,10 +2521,15 @@ async function runFresh(share) {
2115
2521
  try {
2116
2522
  const data = await load(abort.signal);
2117
2523
  if (ticket !== share.generation || abort.signal.aborted) return;
2524
+ share.halted = false;
2118
2525
  share.snapshot = { data, loading: false, error: null };
2119
2526
  emit(share);
2120
2527
  } catch (cause) {
2121
2528
  if (ticket !== share.generation || abort.signal.aborted) return;
2529
+ if (isMachinesAccessRefusal(cause)) {
2530
+ share.halted = true;
2531
+ stopTimer(share);
2532
+ }
2122
2533
  share.snapshot = {
2123
2534
  data: share.snapshot.data,
2124
2535
  loading: false,
@@ -2135,7 +2546,7 @@ function run(share, force = false) {
2135
2546
  if (share.trailing) return share.trailing;
2136
2547
  let trailing;
2137
2548
  trailing = share.inFlight.then(async () => {
2138
- if (!effective(share).enabled) return;
2549
+ if (!effective(share).enabled || share.halted) return;
2139
2550
  await run(share);
2140
2551
  }).finally(() => {
2141
2552
  if (share.trailing === trailing) share.trailing = null;
@@ -2158,12 +2569,19 @@ function reconcile(share) {
2158
2569
  share.abort = null;
2159
2570
  share.inFlight = null;
2160
2571
  stopTimer(share);
2572
+ if (share.halted) {
2573
+ share.halted = false;
2574
+ share.snapshot = { data: share.snapshot.data, loading: false, error: null };
2575
+ emit(share);
2576
+ return;
2577
+ }
2161
2578
  if (share.snapshot.loading) {
2162
2579
  share.snapshot = { ...share.snapshot, loading: false };
2163
2580
  emit(share);
2164
2581
  }
2165
2582
  return;
2166
2583
  }
2584
+ if (share.halted) return;
2167
2585
  if (share.snapshot.data !== null || share.snapshot.error) {
2168
2586
  arm(share);
2169
2587
  return;
@@ -2186,7 +2604,8 @@ function getOrCreate(shareKey) {
2186
2604
  abort: null,
2187
2605
  inFlight: null,
2188
2606
  trailing: null,
2189
- generation: 0
2607
+ generation: 0,
2608
+ halted: false
2190
2609
  };
2191
2610
  shares.set(shareKey, created);
2192
2611
  return created;
@@ -2194,7 +2613,10 @@ function getOrCreate(shareKey) {
2194
2613
  async function refreshSharedMachinesList(shareKey) {
2195
2614
  const share = shares.get(shareKey);
2196
2615
  if (!share) return;
2616
+ const wasHalted = share.halted;
2617
+ share.halted = false;
2197
2618
  await run(share, true);
2619
+ if (wasHalted) arm(share);
2198
2620
  }
2199
2621
  function useSharedMachinesList(shareKey, load, options = {}) {
2200
2622
  const enabled = options.enabled ?? true;
@@ -2252,24 +2674,33 @@ function machinesClientId(client) {
2252
2674
  machinesClientIds.set(client, id);
2253
2675
  return id;
2254
2676
  }
2255
- function swapFailureMessage(result) {
2256
- if (result.reason?.trim()) return result.reason;
2677
+ function swapFailureMessage(t, result) {
2257
2678
  switch (result.code) {
2258
2679
  case "recovery_in_progress":
2259
- return "The managed sandbox is still recovering. Try again shortly.";
2680
+ return t("hooks.useMachines.itsComputerIsStillStarting");
2260
2681
  case "recovery_degraded":
2261
- return "The managed sandbox recovery is degraded and needs attention.";
2682
+ return t("hooks.useMachines.itsComputerIsntWorking");
2262
2683
  case "recovery_unrecoverable":
2263
- return "The managed sandbox could not be recovered.";
2684
+ return t("hooks.useMachines.itsComputerCouldntBeRestored");
2264
2685
  case "offline_enrollment":
2265
- return "The selected machine is offline.";
2686
+ return t("hooks.useMachines.thatMachineIsOffline");
2687
+ case "stale_pointer":
2688
+ return t("hooks.useMachines.thatMachineIsNoLonger");
2689
+ case "unsupported_backend_context":
2690
+ case "transient_establishment":
2691
+ return t("hooks.useMachines.thatMachineCouldntBeReached");
2266
2692
  case "concurrent_swap":
2267
- return "The session route changed concurrently. Refresh and try again.";
2693
+ return t("hooks.useMachines.itWasMovedSomewhere");
2694
+ case "personal_machine_permission_required":
2695
+ return t("hooks.useMachines.theMachineSOwnerHas");
2696
+ case "personal_machine_not_permitted":
2697
+ return t("hooks.useMachines.onlyTheMachineSOwner");
2268
2698
  default:
2269
- return "The session stayed on its current sandbox.";
2699
+ return t("hooks.useMachines.tryAgain");
2270
2700
  }
2271
2701
  }
2272
2702
  function useMachines(options = {}) {
2703
+ const t = useOpenGeniText();
2273
2704
  const { client, workspaceId } = useOpenGeni(options);
2274
2705
  const machinesClient = options.machinesClient ?? client;
2275
2706
  const sessionId = options.sessionId;
@@ -2318,7 +2749,7 @@ function useMachines(options = {}) {
2318
2749
  const result = await run2(async () => {
2319
2750
  const response = await runSwap();
2320
2751
  if (response && typeof response === "object" && "swapped" in response && response.swapped === false) {
2321
- throw new Error(swapFailureMessage(response));
2752
+ throw new Error(swapFailureMessage(t, response));
2322
2753
  }
2323
2754
  return true;
2324
2755
  });
@@ -2328,7 +2759,7 @@ function useMachines(options = {}) {
2328
2759
  }
2329
2760
  return result === true;
2330
2761
  },
2331
- [machinesClient, workspaceId, sessionId, identityKey, run2, refresh]
2762
+ [machinesClient, workspaceId, sessionId, identityKey, run2, refresh, t]
2332
2763
  );
2333
2764
  const fetchSeries = useCallback2(
2334
2765
  async (enrollmentId, window = "1h") => {
@@ -2442,4 +2873,4 @@ export {
2442
2873
  EnrollmentDeviceFlow,
2443
2874
  EnrollmentConsent
2444
2875
  };
2445
- //# sourceMappingURL=chunk-NLTS7JHI.js.map
2876
+ //# sourceMappingURL=chunk-XEIHS3RN.js.map