@opengeni/react 0.46.1 → 0.52.1

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 (341) hide show
  1. package/README.md +158 -14
  2. package/dist/artifacts-document.d.ts +3 -0
  3. package/dist/artifacts-document.js +17 -0
  4. package/dist/artifacts-document.js.map +1 -0
  5. package/dist/artifacts-presentation.d.ts +3 -0
  6. package/dist/artifacts-presentation.js +17 -0
  7. package/dist/artifacts-presentation.js.map +1 -0
  8. package/dist/artifacts-spreadsheet.d.ts +3 -0
  9. package/dist/artifacts-spreadsheet.js +17 -0
  10. package/dist/artifacts-spreadsheet.js.map +1 -0
  11. package/dist/artifacts.d.ts +2 -0
  12. package/dist/artifacts.js +170 -0
  13. package/dist/artifacts.js.map +1 -0
  14. package/dist/chunk-6BBWWOOU.js +82 -0
  15. package/dist/chunk-6BBWWOOU.js.map +1 -0
  16. package/dist/{chunk-HFO4ERGQ.js → chunk-724BW4TW.js} +586 -35
  17. package/dist/chunk-724BW4TW.js.map +1 -0
  18. package/dist/chunk-7I2KB3OK.js +3895 -0
  19. package/dist/chunk-7I2KB3OK.js.map +1 -0
  20. package/dist/chunk-7WCLAEFV.js +2828 -0
  21. package/dist/chunk-7WCLAEFV.js.map +1 -0
  22. package/dist/{chunk-U3CSCMWA.js → chunk-FK6VG4LL.js} +9 -13
  23. package/dist/chunk-FK6VG4LL.js.map +1 -0
  24. package/dist/{chunk-SRFUT2ZU.js → chunk-FWS3KC3Z.js} +120 -64
  25. package/dist/chunk-FWS3KC3Z.js.map +1 -0
  26. package/dist/{chunk-EKZH6IDG.js → chunk-HDBG7XGO.js} +62 -1
  27. package/dist/chunk-HDBG7XGO.js.map +1 -0
  28. package/dist/chunk-HUIKIDM5.js +2148 -0
  29. package/dist/chunk-HUIKIDM5.js.map +1 -0
  30. package/dist/{chunk-LGVMUIRV.js → chunk-JAGDUCZQ.js} +1053 -390
  31. package/dist/chunk-JAGDUCZQ.js.map +1 -0
  32. package/dist/{chunk-LWR4MXSS.js → chunk-JR3QFY6B.js} +420 -35
  33. package/dist/chunk-JR3QFY6B.js.map +1 -0
  34. package/dist/chunk-JVYQRRC4.js +53 -0
  35. package/dist/chunk-JVYQRRC4.js.map +1 -0
  36. package/dist/chunk-KCGXPP5V.js +157 -0
  37. package/dist/chunk-KCGXPP5V.js.map +1 -0
  38. package/dist/{chunk-EB67J347.js → chunk-KZ73RL76.js} +111 -31
  39. package/dist/chunk-KZ73RL76.js.map +1 -0
  40. package/dist/chunk-PEI6RANI.js +3234 -0
  41. package/dist/chunk-PEI6RANI.js.map +1 -0
  42. package/dist/{chunk-3PB7MIT6.js → chunk-ROIRTM37.js} +220 -72
  43. package/dist/chunk-ROIRTM37.js.map +1 -0
  44. package/dist/chunk-VZTQ73XT.js +86 -0
  45. package/dist/chunk-VZTQ73XT.js.map +1 -0
  46. package/dist/{chunk-VCBFUSUZ.js → chunk-WSK7G5LE.js} +72 -4
  47. package/dist/chunk-WSK7G5LE.js.map +1 -0
  48. package/dist/{chunk-FGZUCXZF.js → chunk-WYA65Y3F.js} +16 -16
  49. package/dist/chunk-WYA65Y3F.js.map +1 -0
  50. package/dist/{chunk-6EDV6YFE.js → chunk-X4S56Y2H.js} +147 -35
  51. package/dist/chunk-X4S56Y2H.js.map +1 -0
  52. package/dist/client.d.ts +7 -1
  53. package/dist/clipboard.d.ts +1 -0
  54. package/dist/clipboard.js +7 -0
  55. package/dist/clipboard.js.map +1 -0
  56. package/dist/commands/index.d.ts +3 -3
  57. package/dist/commands/registry.d.ts +1 -1
  58. package/dist/commands/types.d.ts +1 -1
  59. package/dist/components/approval-surface.d.ts +2 -2
  60. package/dist/components/artifacts/artifact-surface.d.ts +18 -0
  61. package/dist/components/artifacts/document-editor.d.ts +172 -0
  62. package/dist/components/artifacts/editable-artifact-ui.d.ts +13 -0
  63. package/dist/components/artifacts/editable-artifact-workbench.d.ts +49 -0
  64. package/dist/components/artifacts/editable-document.d.ts +24 -0
  65. package/dist/components/artifacts/editable-presentation.d.ts +24 -0
  66. package/dist/components/artifacts/editable-spreadsheet.d.ts +32 -0
  67. package/dist/components/artifacts/index.d.ts +8 -0
  68. package/dist/components/artifacts/presentation-editor.d.ts +297 -0
  69. package/dist/components/artifacts/spreadsheet-canvas.d.ts +120 -0
  70. package/dist/components/artifacts/spreadsheet-grid.d.ts +113 -0
  71. package/dist/components/browser-viewer.d.ts +29 -0
  72. package/dist/components/chat-composer.d.ts +13 -8
  73. package/dist/components/code-editor.d.ts +25 -3
  74. package/dist/components/command-palette.d.ts +2 -2
  75. package/dist/components/composer-transcription-control.d.ts +4 -2
  76. package/dist/components/composer.d.ts +29 -15
  77. package/dist/components/computer-viewer.d.ts +23 -0
  78. package/dist/components/copy-button.d.ts +2 -2
  79. package/dist/components/desktop-viewer.d.ts +25 -21
  80. package/dist/components/diff-view.d.ts +1 -1
  81. package/dist/components/enrollment-consent.d.ts +1 -1
  82. package/dist/components/enrollment-device-flow.d.ts +1 -1
  83. package/dist/components/file-browser.d.ts +2 -2
  84. package/dist/components/fleet-tile.d.ts +1 -1
  85. package/dist/components/generated-video-player.d.ts +10 -0
  86. package/dist/components/human-input-form.d.ts +1 -1
  87. package/dist/components/human-input-surface.d.ts +2 -2
  88. package/dist/components/interactive-workbench-viewers.d.ts +2 -0
  89. package/dist/components/machine-card.d.ts +2 -2
  90. package/dist/components/machine-dock-bar.d.ts +3 -3
  91. package/dist/components/machine-health-pill.d.ts +2 -2
  92. package/dist/components/machine-input-display.d.ts +1 -1
  93. package/dist/components/machine-metrics.d.ts +2 -2
  94. package/dist/components/machine-status-pill.d.ts +4 -4
  95. package/dist/components/machines/health.d.ts +1 -1
  96. package/dist/components/machines/machine-detail.d.ts +5 -3
  97. package/dist/components/machines/metric-history-chart.d.ts +1 -1
  98. package/dist/components/machines/metric-sparkline.d.ts +2 -2
  99. package/dist/components/machines/series.d.ts +2 -2
  100. package/dist/components/machines-dashboard.d.ts +5 -5
  101. package/dist/components/markdown.d.ts +1 -1
  102. package/dist/components/message-timeline.d.ts +22 -5
  103. package/dist/components/model-picker.d.ts +2 -2
  104. package/dist/components/model-policy-picker.d.ts +7 -7
  105. package/dist/components/pierre-diff.d.ts +1 -1
  106. package/dist/components/pierre-file.d.ts +1 -1
  107. package/dist/components/queue-draft-policy.d.ts +1 -1
  108. package/dist/components/queue-surface-implementation.d.ts +3 -3
  109. package/dist/components/queue-surface-state.d.ts +4 -4
  110. package/dist/components/queue-surface.d.ts +5 -5
  111. package/dist/components/sandbox-files.d.ts +5 -5
  112. package/dist/components/sandbox-terminal.d.ts +50 -4
  113. package/dist/components/sandbox-workspace.d.ts +30 -10
  114. package/dist/components/session-chrome.d.ts +4 -4
  115. package/dist/components/session-status.d.ts +2 -2
  116. package/dist/components/timeline-annotation-selection.d.ts +9 -0
  117. package/dist/components/timeline-annotations-dialog.d.ts +16 -0
  118. package/dist/components/timeline-annotations.d.ts +13 -0
  119. package/dist/components/tooltip.d.ts +4 -4
  120. package/dist/components/user-message-body.d.ts +2 -2
  121. package/dist/components/workbench-changes.d.ts +2 -2
  122. package/dist/components/workspace-dock.d.ts +3 -1
  123. package/dist/composer.d.ts +11 -11
  124. package/dist/composer.js +7 -7
  125. package/dist/hooks/internal.d.ts +7 -1
  126. package/dist/hooks/use-attached-browsers.d.ts +21 -0
  127. package/dist/hooks/use-available-models.d.ts +2 -2
  128. package/dist/hooks/use-billing-usage.d.ts +1 -1
  129. package/dist/hooks/use-browser-frame-stream.d.ts +28 -0
  130. package/dist/hooks/use-browser-identities.d.ts +26 -0
  131. package/dist/hooks/use-browser-session.d.ts +28 -0
  132. package/dist/hooks/use-browser-sessions.d.ts +32 -0
  133. package/dist/hooks/use-codex-accounts.d.ts +3 -3
  134. package/dist/hooks/use-composer.d.ts +36 -9
  135. package/dist/hooks/use-computer-frame-stream.d.ts +24 -0
  136. package/dist/hooks/use-computer-session.d.ts +28 -0
  137. package/dist/hooks/use-computer-sessions.d.ts +28 -0
  138. package/dist/hooks/use-desktop-stream.d.ts +1 -1
  139. package/dist/hooks/use-environments.d.ts +11 -5
  140. package/dist/hooks/use-file-attachments.d.ts +1 -1
  141. package/dist/hooks/use-goal.d.ts +2 -2
  142. package/dist/hooks/use-human-input.d.ts +2 -2
  143. package/dist/hooks/use-last-started-turn-policy.d.ts +2 -2
  144. package/dist/hooks/use-machine-chip.d.ts +2 -2
  145. package/dist/hooks/use-machines.d.ts +10 -3
  146. package/dist/hooks/use-packs.d.ts +7 -2
  147. package/dist/hooks/use-rigs.d.ts +1 -1
  148. package/dist/hooks/use-sandbox-files.d.ts +25 -4
  149. package/dist/hooks/use-sandbox-git.d.ts +13 -5
  150. package/dist/hooks/use-sandbox-terminal.d.ts +1 -1
  151. package/dist/hooks/use-scheduled-tasks.d.ts +1 -1
  152. package/dist/hooks/use-session-capabilities.d.ts +5 -4
  153. package/dist/hooks/use-session-control.d.ts +1 -1
  154. package/dist/hooks/use-session-events.d.ts +2 -2
  155. package/dist/hooks/use-session-lineage.d.ts +1 -1
  156. package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
  157. package/dist/hooks/use-session.d.ts +2 -2
  158. package/dist/hooks/use-slash-commands.d.ts +1 -1
  159. package/dist/hooks/use-terminal-stream.d.ts +8 -2
  160. package/dist/hooks/use-transcription.d.ts +2 -2
  161. package/dist/hooks/use-turn-queue.d.ts +2 -2
  162. package/dist/hooks/use-video-artifact-playback.d.ts +9 -0
  163. package/dist/hooks/use-voice-input.d.ts +6 -4
  164. package/dist/hooks/use-workspace-capture.d.ts +1 -1
  165. package/dist/hooks/use-workspace-edit.d.ts +1 -1
  166. package/dist/hooks/use-workspace-sessions.d.ts +1 -1
  167. package/dist/hooks/use-workspaces.d.ts +1 -1
  168. package/dist/index.d.ts +158 -154
  169. package/dist/index.js +1718 -908
  170. package/dist/index.js.map +1 -1
  171. package/dist/interaction.d.ts +23 -0
  172. package/dist/interaction.js +36 -0
  173. package/dist/interaction.js.map +1 -0
  174. package/dist/interactive-workbench-viewers-KHNOHWQE.js +13 -0
  175. package/dist/interactive-workbench-viewers-KHNOHWQE.js.map +1 -0
  176. package/dist/lib/composer-responsive-context.d.ts +9 -0
  177. package/dist/lib/relay-wire.d.ts +4 -0
  178. package/dist/lib/sandbox-liveness.d.ts +9 -0
  179. package/dist/lib/terminal-capability.d.ts +5 -0
  180. package/dist/lib/use-portal-token-style.d.ts +14 -3
  181. package/dist/lib/xterm-theme.d.ts +1 -1
  182. package/dist/machines.d.ts +30 -30
  183. package/dist/machines.js +3 -3
  184. package/dist/provider.d.ts +4 -4
  185. package/dist/{queue-surface-implementation-J4XJFKRW.js → queue-surface-implementation-2KVJTYXH.js} +117 -64
  186. package/dist/queue-surface-implementation-2KVJTYXH.js.map +1 -0
  187. package/dist/realtime/dropdown-menu.d.ts +8 -8
  188. package/dist/realtime/realtime-control.d.ts +15 -6
  189. package/dist/realtime.d.ts +4 -4
  190. package/dist/realtime.js +30 -33
  191. package/dist/realtime.js.map +1 -1
  192. package/dist/session-context.d.ts +19 -1
  193. package/dist/session-ui.d.ts +14 -14
  194. package/dist/session-ui.js +6 -5
  195. package/dist/session.d.ts +28 -28
  196. package/dist/session.js +5 -5
  197. package/dist/timeline/activity-rail.d.ts +6 -3
  198. package/dist/timeline/disclosure-context.d.ts +1 -1
  199. package/dist/timeline/fleet-decision-projection.d.ts +1 -1
  200. package/dist/timeline/fleet-decision-row.d.ts +3 -3
  201. package/dist/timeline/index.d.ts +19 -19
  202. package/dist/timeline/parsers.d.ts +6 -3
  203. package/dist/timeline/projection.d.ts +3 -3
  204. package/dist/timeline/registry.d.ts +10 -1
  205. package/dist/timeline/screenshot-lightbox.d.ts +2 -2
  206. package/dist/timeline/shared.d.ts +21 -10
  207. package/dist/timeline/tool-diff.d.ts +2 -2
  208. package/dist/timeline/tool-renderers.d.ts +1 -1
  209. package/dist/timeline/turn-summary.d.ts +3 -3
  210. package/dist/timeline/types.d.ts +42 -2
  211. package/dist/timeline-annotation-selection-3L7LHGG2.js +187 -0
  212. package/dist/timeline-annotation-selection-3L7LHGG2.js.map +1 -0
  213. package/dist/timeline-annotations-dialog-U7EVLR75.js +196 -0
  214. package/dist/timeline-annotations-dialog-U7EVLR75.js.map +1 -0
  215. package/dist/voice-recording-store.d.ts +8 -2
  216. package/package.json +52 -7
  217. package/src/artifacts-document.ts +31 -0
  218. package/src/artifacts-presentation.ts +36 -0
  219. package/src/artifacts-spreadsheet.ts +21 -0
  220. package/src/artifacts.ts +86 -0
  221. package/src/client.ts +90 -1
  222. package/src/clipboard.ts +2 -0
  223. package/src/components/artifacts/artifact-surface.tsx +93 -0
  224. package/src/components/artifacts/document-editor.tsx +2255 -0
  225. package/src/components/artifacts/editable-artifact-ui.tsx +89 -0
  226. package/src/components/artifacts/editable-artifact-workbench.tsx +203 -0
  227. package/src/components/artifacts/editable-document.tsx +657 -0
  228. package/src/components/artifacts/editable-presentation.tsx +1020 -0
  229. package/src/components/artifacts/editable-spreadsheet.tsx +733 -0
  230. package/src/components/artifacts/index.ts +99 -0
  231. package/src/components/artifacts/presentation-editor.tsx +3148 -0
  232. package/src/components/artifacts/spreadsheet-canvas.ts +799 -0
  233. package/src/components/artifacts/spreadsheet-grid.tsx +2129 -0
  234. package/src/components/browser-viewer.tsx +1592 -0
  235. package/src/components/chat-composer.tsx +25 -2
  236. package/src/components/code-editor.tsx +90 -31
  237. package/src/components/command-palette.tsx +1 -1
  238. package/src/components/composer-transcription-control.tsx +51 -22
  239. package/src/components/composer.tsx +49 -23
  240. package/src/components/computer-viewer.tsx +1139 -0
  241. package/src/components/copy-button.tsx +1 -1
  242. package/src/components/desktop-viewer.tsx +103 -75
  243. package/src/components/file-browser.tsx +39 -17
  244. package/src/components/generated-video-player.tsx +89 -0
  245. package/src/components/human-input-form.tsx +2 -2
  246. package/src/components/interactive-workbench-viewers.ts +2 -0
  247. package/src/components/machine-card.tsx +1 -1
  248. package/src/components/machine-input-display.ts +3 -0
  249. package/src/components/machines/machine-detail.tsx +39 -15
  250. package/src/components/machines-dashboard.tsx +7 -6
  251. package/src/components/message-timeline.tsx +327 -37
  252. package/src/components/model-picker.tsx +2 -2
  253. package/src/components/model-policy-picker.tsx +16 -15
  254. package/src/components/queue-surface-implementation.tsx +135 -75
  255. package/src/components/queue-surface-state.tsx +2 -2
  256. package/src/components/sandbox-files.tsx +142 -62
  257. package/src/components/sandbox-terminal.tsx +119 -35
  258. package/src/components/sandbox-workspace.tsx +394 -228
  259. package/src/components/session-chrome.tsx +67 -27
  260. package/src/components/timeline-annotation-selection.tsx +221 -0
  261. package/src/components/timeline-annotations-dialog.tsx +213 -0
  262. package/src/components/timeline-annotations.tsx +84 -0
  263. package/src/components/tooltip.tsx +13 -16
  264. package/src/components/user-message-body.tsx +1 -1
  265. package/src/components/workbench-changes.tsx +192 -35
  266. package/src/components/workspace-dock.tsx +13 -5
  267. package/src/composer.ts +3 -0
  268. package/src/hooks/internal.ts +132 -38
  269. package/src/hooks/use-attached-browsers.ts +152 -0
  270. package/src/hooks/use-browser-frame-stream.ts +316 -0
  271. package/src/hooks/use-browser-identities.ts +225 -0
  272. package/src/hooks/use-browser-session.ts +476 -0
  273. package/src/hooks/use-browser-sessions.ts +281 -0
  274. package/src/hooks/use-codex-accounts.ts +4 -4
  275. package/src/hooks/use-composer.ts +769 -24
  276. package/src/hooks/use-computer-frame-stream.ts +311 -0
  277. package/src/hooks/use-computer-session.ts +442 -0
  278. package/src/hooks/use-computer-sessions.ts +245 -0
  279. package/src/hooks/use-environments.ts +24 -5
  280. package/src/hooks/use-file-attachments.ts +70 -32
  281. package/src/hooks/use-goal.ts +17 -5
  282. package/src/hooks/use-machine-chip.ts +5 -3
  283. package/src/hooks/use-machines.ts +79 -3
  284. package/src/hooks/use-packs.ts +51 -0
  285. package/src/hooks/use-sandbox-files.ts +382 -88
  286. package/src/hooks/use-sandbox-git.ts +208 -46
  287. package/src/hooks/use-sandbox-terminal.ts +3 -2
  288. package/src/hooks/use-session-capabilities.ts +94 -70
  289. package/src/hooks/use-session-events.ts +18 -4
  290. package/src/hooks/use-terminal-stream.ts +102 -23
  291. package/src/hooks/use-transcription.ts +4 -14
  292. package/src/hooks/use-turn-queue.ts +17 -5
  293. package/src/hooks/use-video-artifact-playback.ts +28 -0
  294. package/src/hooks/use-voice-input.ts +163 -19
  295. package/src/hooks/use-windowed-sections.ts +9 -7
  296. package/src/hooks/use-workspace-edit.ts +2 -1
  297. package/src/index.ts +21 -6
  298. package/src/interaction.ts +71 -0
  299. package/src/lib/composer-responsive-context.ts +15 -0
  300. package/src/lib/relay-wire.ts +4 -0
  301. package/src/lib/sandbox-liveness.ts +11 -0
  302. package/src/lib/terminal-capability.ts +10 -0
  303. package/src/lib/use-portal-token-style.ts +60 -15
  304. package/src/provider.tsx +52 -7
  305. package/src/realtime/dropdown-menu.tsx +15 -19
  306. package/src/realtime/realtime-control.tsx +16 -5
  307. package/src/session-context.ts +90 -0
  308. package/src/timeline/activity-rail.tsx +31 -6
  309. package/src/timeline/index.ts +4 -1
  310. package/src/timeline/parsers.ts +46 -20
  311. package/src/timeline/projection.ts +233 -13
  312. package/src/timeline/registry.ts +19 -0
  313. package/src/timeline/screenshot-lightbox.tsx +30 -9
  314. package/src/timeline/shared.tsx +59 -11
  315. package/src/timeline/tool-renderers.tsx +421 -24
  316. package/src/timeline/turn-summary.tsx +2 -2
  317. package/src/timeline/types.ts +58 -2
  318. package/src/voice-recording-store.ts +15 -0
  319. package/styles/compiled.css +5298 -0
  320. package/styles/compiled.d.ts +2 -0
  321. package/styles/effective-tokens.css +27 -0
  322. package/styles/index.css +18 -0
  323. package/styles/responsive.css +208 -0
  324. package/styles/responsive.d.ts +2 -0
  325. package/styles/tokens.css +50 -17
  326. package/dist/chunk-3PB7MIT6.js.map +0 -1
  327. package/dist/chunk-6EDV6YFE.js.map +0 -1
  328. package/dist/chunk-EB67J347.js.map +0 -1
  329. package/dist/chunk-EKZH6IDG.js.map +0 -1
  330. package/dist/chunk-FGZUCXZF.js.map +0 -1
  331. package/dist/chunk-HFO4ERGQ.js.map +0 -1
  332. package/dist/chunk-JB5725BI.js +0 -48
  333. package/dist/chunk-JB5725BI.js.map +0 -1
  334. package/dist/chunk-LGVMUIRV.js.map +0 -1
  335. package/dist/chunk-LWR4MXSS.js.map +0 -1
  336. package/dist/chunk-SRFUT2ZU.js.map +0 -1
  337. package/dist/chunk-U3CSCMWA.js.map +0 -1
  338. package/dist/chunk-VCBFUSUZ.js.map +0 -1
  339. package/dist/fleet-decision-projection-SLNZMS42.js +0 -241
  340. package/dist/fleet-decision-projection-SLNZMS42.js.map +0 -1
  341. package/dist/queue-surface-implementation-J4XJFKRW.js.map +0 -1
@@ -1,9 +1,11 @@
1
1
  import { type ReactNode } from "react";
2
2
  import type { SessionEvent } from "@opengeni/sdk";
3
- import { type ClientOverride } from "../provider";
4
- import { type MachineChip } from "../hooks/use-machine-chip";
5
- import type { MachineView } from "../types/machines";
6
- import { type WorkspaceDockProps, type WorkspaceTab } from "./workspace-dock";
3
+ import { type ClientOverride } from "../provider.js";
4
+ import type { BrowserFrameWebSocketFactory } from "../hooks/use-browser-frame-stream.js";
5
+ import type { ComputerFrameWebSocketFactory } from "../hooks/use-computer-frame-stream.js";
6
+ import { type MachineChip } from "../hooks/use-machine-chip.js";
7
+ import type { MachineView } from "../types/machines.js";
8
+ import { type WorkspaceDockProps, type WorkspaceTab } from "./workspace-dock.js";
7
9
  /** A host-routed notification (replaces the app-only `sonner` toast coupling). */
8
10
  export type WorkspaceNotification = {
9
11
  kind: "error" | "info";
@@ -13,13 +15,14 @@ export type WorkspaceNotification = {
13
15
  export declare const WORKBENCH_TAB_CHANGES = "changes";
14
16
  export declare const WORKBENCH_TAB_FILES = "files";
15
17
  export declare const WORKBENCH_TAB_TERMINAL = "terminal";
18
+ export declare const WORKBENCH_TAB_BROWSER = "browser";
16
19
  export declare const WORKBENCH_TAB_DESKTOP = "desktop";
17
20
  /**
18
21
  * The built-in workbench surfaces in their canonical display order. Hosts can
19
22
  * pass a subset through `surfaces`; omission preserves the complete standalone
20
23
  * workbench.
21
24
  */
22
- export declare const WORKBENCH_SURFACES: readonly ["changes", "files", "terminal", "desktop"];
25
+ export declare const WORKBENCH_SURFACES: readonly ["changes", "files", "terminal", "browser", "desktop"];
23
26
  export type SandboxWorkspaceSurface = (typeof WORKBENCH_SURFACES)[number];
24
27
  /**
25
28
  * Decide a workspace tab from an already-local event log: the newest
@@ -49,7 +52,7 @@ export type UseSandboxWorkspaceTabsOptions = ClientOverride & {
49
52
  /** Live event log (usually `useSessionEvents().events`). */
50
53
  events: SessionEvent[];
51
54
  /**
52
- * Built-in surfaces this host wants to expose. Omit for all four. A disabled
55
+ * Built-in surfaces this host wants to expose. Omit for all five. A disabled
53
56
  * surface is behaviorally dormant: its data hooks, warm intents, stream
54
57
  * attachment, and navigation callbacks are not activated.
55
58
  */
@@ -57,9 +60,15 @@ export type UseSandboxWorkspaceTabsOptions = ClientOverride & {
57
60
  /** Override the source-driven default tab (e.g. a host landing tab id). When
58
61
  * omitted the workbench picks Changes-vs-Files from capture or live Git. */
59
62
  initialTab?: string | null | undefined;
63
+ /** Actually selected dock tab. Inactive data surfaces retain cache but issue no live reads. */
64
+ activeTab?: string | null | undefined;
60
65
  /** Host-routed notifications (mutation errors, desktop-consent failures). The
61
66
  * package never imports a toast library — the host decides how to surface. */
62
67
  onNotify?: ((notification: WorkspaceNotification) => void) | undefined;
68
+ /** Alternate frame transport for non-browser runtimes and deterministic tests. */
69
+ browserWebSocketFactory?: BrowserFrameWebSocketFactory | undefined;
70
+ /** Alternate Computer frame transport for non-browser runtimes and deterministic tests. */
71
+ computerWebSocketFactory?: ComputerFrameWebSocketFactory | undefined;
63
72
  /** File requested by a Changes guard. The Files surface defers the read until
64
73
  * the sandbox is live, then reveals this path. */
65
74
  requestedFilePath?: string | null | undefined;
@@ -68,9 +77,13 @@ export type UseSandboxWorkspaceTabsOptions = ClientOverride & {
68
77
  requestedFileRequestId?: string | number | null | undefined;
69
78
  /** Route a guarded diff into the host's Files tab. */
70
79
  onOpenFile?: ((path: string) => void) | undefined;
80
+ /** Navigate the host dock to one exact linked ComputerSession. */
81
+ onOpenComputerSession?: ((computerSessionId: string) => void) | undefined;
82
+ requestedComputerSessionId?: string | null | undefined;
83
+ requestedComputerRequestId?: string | number | null | undefined;
71
84
  };
72
85
  export type UseSandboxWorkspaceTabsResult = {
73
- /** Changes | Files | Terminal | Desktop (capability-gated where noted). */
86
+ /** Changes | Files | Terminal | Browser | Desktop (capability-gated where noted). */
74
87
  tabs: WorkspaceTab[];
75
88
  /** The source-driven default tab: Changes when the first authoritative capture
76
89
  * or live Git result has changes, else Files (a host `initialTab` overrides).
@@ -83,7 +96,8 @@ export type UseSandboxWorkspaceTabsResult = {
83
96
  /**
84
97
  * Build the workbench tabs + the machine-chip model for one session. This is the
85
98
  * dock "brain": capability negotiation, capture-backed cold reads, prewarm
86
- * flags, desktop consent, and the xterm theme observer — all package-local.
99
+ * flags, automatic desktop acknowledgment, and the xterm theme observer — all
100
+ * package-local.
87
101
  */
88
102
  export declare function useSandboxWorkspaceTabs(options: UseSandboxWorkspaceTabsOptions): UseSandboxWorkspaceTabsResult;
89
103
  export type SandboxWorkspaceProps = ClientOverride & {
@@ -94,7 +108,7 @@ export type SandboxWorkspaceProps = ClientOverride & {
94
108
  primary: ReactNode;
95
109
  /**
96
110
  * Built-in surfaces this host wants to expose. Omit for Changes, Files,
97
- * Terminal, and Desktop. Disabled surfaces remain behaviorally dormant.
111
+ * Terminal, Browser, and Desktop. Disabled surfaces remain behaviorally dormant.
98
112
  */
99
113
  surfaces?: readonly SandboxWorkspaceSurface[] | undefined;
100
114
  /** Host tabs injected BEFORE the workbench tabs (e.g. a "Run" landing tab). */
@@ -106,9 +120,15 @@ export type SandboxWorkspaceProps = ClientOverride & {
106
120
  initialTab?: string | undefined;
107
121
  /** Host-routed notifications (no toast dependency in the package). */
108
122
  onNotify?: ((notification: WorkspaceNotification) => void) | undefined;
123
+ /** Alternate Browser frame transport for non-browser runtimes and deterministic tests. */
124
+ browserWebSocketFactory?: BrowserFrameWebSocketFactory | undefined;
125
+ /** Alternate Computer frame transport for non-browser runtimes and deterministic tests. */
126
+ computerWebSocketFactory?: ComputerFrameWebSocketFactory | undefined;
109
127
  /** Controlled collapsed state for hosts with their own dock toggle. */
110
128
  collapsed?: boolean | undefined;
111
129
  onCollapsedChange?: ((collapsed: boolean) => void) | undefined;
130
+ /** Keep the dock's built-in collapse control with controlled collapsed state. */
131
+ showCollapseControl?: boolean | undefined;
112
132
  /** Host navigation shown only in the phone workspace overlay header. */
113
133
  mobileLeadingControl?: ReactNode | undefined;
114
134
  autoSaveId?: string | undefined;
@@ -121,7 +141,7 @@ export type SandboxWorkspaceProps = ClientOverride & {
121
141
  * The whole session workspace, ready to mount: `<SandboxWorkspace>` assembles the
122
142
  * capability-gated tabs, pins the machine-state chip in the dock header, and
123
143
  * renders the resizable `<WorkspaceDock>`. Wrap the tree in `<OpenGeniProvider>`
124
- * (client + workspaceId) and import `@opengeni/react/styles.css`; that is the
144
+ * (client + workspaceId) and import `@opengeni/react/compiled.css`; that is the
125
145
  * entire integration (see `docs/embedding-workbench.md`).
126
146
  */
127
147
  export declare function SandboxWorkspace(props: SandboxWorkspaceProps): ReactNode;
@@ -33,9 +33,9 @@
33
33
  */
34
34
  import type { SessionGoal } from "@opengeni/sdk";
35
35
  import { type ReactNode } from "react";
36
- import type { ComposerState } from "../hooks/use-composer";
37
- import type { UseGoalResult } from "../hooks/use-goal";
38
- import type { UseTurnQueueResult } from "../hooks/use-turn-queue";
36
+ import type { ComposerState } from "../hooks/use-composer.js";
37
+ import type { UseGoalResult } from "../hooks/use-goal.js";
38
+ import type { UseTurnQueueResult } from "../hooks/use-turn-queue.js";
39
39
  export type SessionChromeSignalId = "incoming" | "steering" | "queue" | "goal" | "agents";
40
40
  export type SessionChromeSignalTone = "neutral" | "accent" | "waiting" | "running";
41
41
  export type SessionChromeAgentsSignal = {
@@ -67,5 +67,5 @@ export type SessionChromeProps = {
67
67
  type GoalPillState = "pursuing" | "scheduled" | "blocked" | "held" | "paused" | "invariant_broken" | "completed";
68
68
  /** Select pill state from the goal's authoritative continuation projection. */
69
69
  export declare function sessionChromeGoalPillState(goalStatus: "active" | "paused" | "completed", continuation: SessionGoal["continuation"] | null | undefined): GoalPillState;
70
- export declare function SessionChrome({ queue, composer, goal, agentsPanel, agentsSignal, onDismissIncoming, readOnly, className, active: activeControlled, defaultActive, onActiveChange, }: SessionChromeProps): import("react/jsx-runtime").JSX.Element | null;
70
+ export declare function SessionChrome({ queue, composer, goal, agentsPanel, agentsSignal, onDismissIncoming, readOnly, className, active: activeControlled, defaultActive, onActiveChange, }: SessionChromeProps): import("react").JSX.Element | null;
71
71
  export {};
@@ -16,10 +16,10 @@ export type SessionStatusProps = {
16
16
  className?: string | undefined;
17
17
  };
18
18
  /** Status badge with a breathing dot for live states. */
19
- export declare function SessionStatus({ status, label, size, className }: SessionStatusProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function SessionStatus({ status, label, size, className }: SessionStatusProps): import("react").JSX.Element;
20
20
  export type StatusDotProps = {
21
21
  status: SessionStatusValue;
22
22
  className?: string | undefined;
23
23
  };
24
24
  /** Just the dot — for dense rows and tiles. */
25
- export declare function StatusDot({ status, className }: StatusDotProps): import("react/jsx-runtime").JSX.Element;
25
+ export declare function StatusDot({ status, className }: StatusDotProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { DraftTimelineAnnotation } from "@opengeni/sdk";
2
+ import { type RefObject } from "react";
3
+ import type { TimelineAnnotationSourceDescriptor } from "../timeline/index.js";
4
+ export declare function TimelineAnnotationSelection({ rootRef, sources, onAnnotate, }: {
5
+ rootRef: RefObject<HTMLElement | null>;
6
+ sources: ReadonlyMap<string, TimelineAnnotationSourceDescriptor>;
7
+ onAnnotate?: ((annotation: DraftTimelineAnnotation) => void) | undefined;
8
+ }): import("react").ReactPortal | null;
9
+ export default TimelineAnnotationSelection;
@@ -0,0 +1,16 @@
1
+ import type { TimelineAnnotationSource } from "@opengeni/sdk";
2
+ import { type RefObject } from "react";
3
+ import type { TimelineAnnotationLike } from "./timeline-annotations.js";
4
+ export declare function TimelineAnnotationsDialog({ annotations, editable, focusAnnotationId, onFocusConsumed, onUpdate, onRemove, onRevealSource, triggerRef, countLabel, onDismiss, }: {
5
+ annotations: readonly TimelineAnnotationLike[];
6
+ editable: boolean;
7
+ focusAnnotationId?: string | null | undefined;
8
+ onFocusConsumed?: (() => void) | undefined;
9
+ onUpdate?: ((id: string, note: string) => void) | undefined;
10
+ onRemove?: ((id: string) => void) | undefined;
11
+ onRevealSource?: ((source: TimelineAnnotationSource) => boolean) | undefined;
12
+ triggerRef: RefObject<HTMLButtonElement | null>;
13
+ countLabel: string;
14
+ onDismiss: (restoreFocus: boolean) => void;
15
+ }): import("react").ReactPortal | null;
16
+ export default TimelineAnnotationsDialog;
@@ -0,0 +1,13 @@
1
+ import type { DraftTimelineAnnotation, TimelineAnnotation, TimelineAnnotationSource } from "@opengeni/sdk";
2
+ export type TimelineAnnotationLike = DraftTimelineAnnotation | TimelineAnnotation;
3
+ export declare function TimelineAnnotationsChip({ annotations, editable, focusAnnotationId, onFocusConsumed, onUpdate, onRemove, onRevealSource, className, }: {
4
+ annotations: readonly TimelineAnnotationLike[];
5
+ editable?: boolean | undefined;
6
+ focusAnnotationId?: string | null | undefined;
7
+ onFocusConsumed?: (() => void) | undefined;
8
+ onUpdate?: ((id: string, note: string) => void) | undefined;
9
+ onRemove?: ((id: string) => void) | undefined;
10
+ onRevealSource?: ((source: TimelineAnnotationSource) => boolean) | undefined;
11
+ className?: string | undefined;
12
+ }): import("react").JSX.Element | null;
13
+ export default TimelineAnnotationsChip;
@@ -9,8 +9,8 @@
9
9
  */
10
10
  import { Tooltip as TooltipPrimitive } from "radix-ui";
11
11
  import { type ComponentProps } from "react";
12
- declare function TooltipProvider({ delayDuration, ...props }: ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
13
- declare function Tooltip({ children, ...props }: ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
14
- declare function TooltipTrigger({ asChild, ...props }: ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
15
- declare function TooltipContent({ className, sideOffset, children, style, ...props }: ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
12
+ declare function TooltipProvider({ delayDuration, ...props }: ComponentProps<typeof TooltipPrimitive.Provider>): import("react").JSX.Element;
13
+ declare function Tooltip({ children, ...props }: ComponentProps<typeof TooltipPrimitive.Root>): import("react").JSX.Element;
14
+ declare function TooltipTrigger({ asChild, ...props }: ComponentProps<typeof TooltipPrimitive.Trigger>): import("react").JSX.Element;
15
+ declare function TooltipContent({ className, sideOffset, children, style, ...props }: ComponentProps<typeof TooltipPrimitive.Content>): import("react").JSX.Element;
16
16
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -7,7 +7,7 @@ export type UserMessageDisclosureContextValue = {
7
7
  export declare function UserMessageDisclosureProvider({ value, children, }: {
8
8
  value: UserMessageDisclosureContextValue;
9
9
  children: ReactNode;
10
- }): import("react/jsx-runtime").JSX.Element;
10
+ }): import("react").JSX.Element;
11
11
  /**
12
12
  * Deterministic first-paint fallback for runtimes without layout measurement.
13
13
  * Real browsers replace this estimate with the rendered-height decision in the
@@ -32,5 +32,5 @@ export type UserMessageBodyProps = {
32
32
  * remembers expansion per durable message id and preserves the reader's scroll
33
33
  * anchor when height changes.
34
34
  */
35
- export declare function UserMessageBody({ messageId, text, children, className }: UserMessageBodyProps): import("react/jsx-runtime").JSX.Element;
35
+ export declare function UserMessageBody({ messageId, text, children, className }: UserMessageBodyProps): import("react").JSX.Element;
36
36
  export {};
@@ -1,4 +1,4 @@
1
- import type { SandboxGitFileDiff } from "../hooks/use-sandbox-git";
1
+ import type { SandboxGitFileDiff } from "../hooks/use-sandbox-git.js";
2
2
  export type WorkbenchChangesProps = {
3
3
  /** The changed files (`useSandboxGit().diff`). Assumed non-empty by the caller. */
4
4
  diff: SandboxGitFileDiff[];
@@ -30,5 +30,5 @@ export declare function buildRail(files: SandboxGitFileDiff[]): {
30
30
  rows: RailRow[];
31
31
  grouped: boolean;
32
32
  };
33
- export declare function WorkbenchChanges({ diff, source, capturedAt, captureRevision, themeType, onOpenFile, className, }: WorkbenchChangesProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare function WorkbenchChanges({ diff, source, capturedAt, captureRevision, themeType, onOpenFile, className, }: WorkbenchChangesProps): import("react").JSX.Element;
34
34
  export {};
@@ -17,6 +17,8 @@ export type WorkspaceDockProps = {
17
17
  /** Controlled collapsed state for hosts that expose their own dock toggle. */
18
18
  collapsed?: boolean | undefined;
19
19
  onCollapsedChange?: ((collapsed: boolean) => void) | undefined;
20
+ /** Keep the built-in collapse control when the host controls collapsed state. */
21
+ showCollapseControl?: boolean | undefined;
20
22
  /** A status accessory pinned to the right of the tab strip, left of the
21
23
  * maximize/collapse controls (e.g. the machine-state chip). Renders in both
22
24
  * the docked header and the full-screen overlay header. */
@@ -32,4 +34,4 @@ export type WorkspaceDockProps = {
32
34
  maxSize?: number | undefined;
33
35
  className?: string | undefined;
34
36
  };
35
- export declare function WorkspaceDock({ primary, tabs, activeTab, onActiveTabChange, collapsed: collapsedProp, onCollapsedChange, headerAccessory, mobileLeadingControl, autoSaveId, defaultSize, minSize, maxSize, className, }: WorkspaceDockProps): import("react/jsx-runtime").JSX.Element;
37
+ export declare function WorkspaceDock({ primary, tabs, activeTab, onActiveTabChange, collapsed: collapsedProp, onCollapsedChange, showCollapseControl, headerAccessory, mobileLeadingControl, autoSaveId, defaultSize, minSize, maxSize, className, }: WorkspaceDockProps): import("react").JSX.Element;
@@ -3,14 +3,14 @@
3
3
  *
4
4
  * `import * as Composer from "@opengeni/react/composer"`.
5
5
  */
6
- export { OPEN_WORKSTREAM_CONTROL_EVENT } from "./workstream-control-event";
7
- export { BillingClassMark, ModelPolicyPicker, ModelPolicyPickerMenu, PickerAnimatedPage, PickerBackHeader, PickerNavRow, defaultModelPolicyPickerMessages, } from "./components/model-policy-picker";
8
- export type { ModelPolicyPickerMessages, ModelPolicyPickerProps, } from "./components/model-policy-picker";
9
- export { Actions, AttachButton, Attachments, CommandPalette, Confirmation, Controls, Footer, Frame, Help, Hint, Input, ModelPicker, PauseButton, PausedState, RestoredResources, Root, SendButton, Status, Surface, defaultChatComposerMessages, useChatComposer, useChatComposerController, } from "./components/composer";
10
- export type { ChatComposerController, ChatComposerContextValue, ChatComposerMessages, ComposerActionsProps, ComposerAttachButtonProps, ComposerCommandPaletteProps, ComposerControlLinks, ComposerControlState, ComposerControlsProps, ComposerDelivery, ComposerDraftState, ComposerFooterProps, ComposerFrameProps, ComposerHintProps, ComposerInputProps, ComposerModelPickerProps, ComposerPauseButtonProps, ComposerRootProps, ComposerSendButtonProps, ComposerSubmitBlocker, ComposerSubmitMode, ComposerSurfaceProps, UseChatComposerControllerOptions, } from "./components/composer";
11
- export { ComposerTranscriptionControl } from "./components/composer-transcription-control";
12
- export type { ComposerTranscriptionControlProps, ComposerTranscriptionMessages, } from "./components/composer-transcription-control";
13
- export { VOICE_RECORDING_CLIENT_MAX_DURATION_SECONDS, VOICE_RECORDING_OWNER_HEARTBEAT_MILLISECONDS, VOICE_RECORDING_OWNER_STALE_MILLISECONDS, VOICE_RECORDING_TIMESLICE_MILLISECONDS, useVoiceInput, } from "./hooks/use-voice-input";
14
- export type { UseVoiceInputOptions, UseVoiceInputResult, VoiceInputStatus, } from "./hooks/use-voice-input";
15
- export { IndexedDbVoiceRecordingStore, VoiceRecordingChunkConflictError, VoiceRecordingChunkSequenceError, VoiceRecordingNotFoundError, VoiceRecordingOwnedError, VoiceRecordingStorageUnavailableError, createVoiceRecordingManifest, planVoiceRecordingChunkCommit, prepareVoiceRecordingChunk, } from "./voice-recording-store";
16
- export type { PersistVoiceRecordingChunkInput, PersistVoiceRecordingChunkResult, VoiceRecordingCaptureState, VoiceRecordingChunk, VoiceRecordingChunkUploadState, VoiceRecordingFinalizationState, VoiceRecordingManifest, VoiceRecordingStore, VoiceRecordingTranscriptionState, VoiceRecordingUploadState, } from "./voice-recording-store";
6
+ export { OPEN_WORKSTREAM_CONTROL_EVENT } from "./workstream-control-event.js";
7
+ export { BillingClassMark, ModelPolicyPicker, ModelPolicyPickerMenu, PickerAnimatedPage, PickerBackHeader, PickerNavRow, defaultModelPolicyPickerMessages, } from "./components/model-policy-picker.js";
8
+ export type { ModelPolicyPickerMessages, ModelPolicyPickerProps, } from "./components/model-policy-picker.js";
9
+ export { Actions, AttachButton, Attachments, CommandPalette, Confirmation, Controls, Footer, Frame, Help, Hint, Input, ModelPicker, PauseButton, PausedState, RestoredResources, Root, SendButton, Status, Surface, defaultChatComposerMessages, useChatComposer, useChatComposerController, } from "./components/composer.js";
10
+ export type { ChatComposerController, ChatComposerContextValue, ChatComposerMessages, ComposerActionsProps, ComposerAttachButtonProps, ComposerCommandPaletteProps, ComposerControlLinks, ComposerControlState, ComposerControlsProps, ComposerDelivery, ComposerDraftState, ComposerFooterProps, ComposerFrameProps, ComposerHintProps, ComposerInputProps, ComposerModelPickerProps, ComposerPauseButtonProps, ComposerRootProps, ComposerSendButtonProps, ComposerSubmitBlocker, ComposerSubmitMode, ComposerSurfaceProps, ResponsiveBasis, UseChatComposerControllerOptions, } from "./components/composer.js";
11
+ export { ComposerTranscriptionControl } from "./components/composer-transcription-control.js";
12
+ export type { ComposerTranscriptionControlProps, ComposerTranscriptionMessages, } from "./components/composer-transcription-control.js";
13
+ export { VOICE_RECORDING_CLIENT_MAX_DURATION_SECONDS, VOICE_RECORDING_OWNER_HEARTBEAT_MILLISECONDS, VOICE_RECORDING_OWNER_STALE_MILLISECONDS, VOICE_RECORDING_TIMESLICE_MILLISECONDS, useVoiceInput, } from "./hooks/use-voice-input.js";
14
+ export type { UseVoiceInputOptions, UseVoiceInputResult, VoiceInputStatus, } from "./hooks/use-voice-input.js";
15
+ export { IndexedDbVoiceRecordingStore, VoiceRecordingChunkConflictError, VoiceRecordingChunkSequenceError, VoiceRecordingNotFoundError, VoiceRecordingOwnedError, VoiceRecordingStorageUnavailableError, createVoiceRecordingManifest, planVoiceRecordingChunkCommit, prepareVoiceRecordingChunk, } from "./voice-recording-store.js";
16
+ export type { PersistVoiceRecordingChunkInput, PersistVoiceRecordingChunkResult, VoiceRecordingCaptureState, VoiceRecordingChunk, VoiceRecordingChunkUploadState, VoiceRecordingFinalizationState, VoiceRecordingHandoffMode, VoiceRecordingManifest, VoiceRecordingRecoveryMode, VoiceRecordingStore, VoiceRecordingTranscriptionState, VoiceRecordingUploadState, } from "./voice-recording-store.js";
package/dist/composer.js CHANGED
@@ -37,9 +37,7 @@ import {
37
37
  useChatComposer,
38
38
  useChatComposerController,
39
39
  useVoiceInput
40
- } from "./chunk-3PB7MIT6.js";
41
- import "./chunk-HFO4ERGQ.js";
42
- import "./chunk-EB67J347.js";
40
+ } from "./chunk-ROIRTM37.js";
43
41
  import {
44
42
  BillingClassMark,
45
43
  ModelPolicyPicker,
@@ -48,12 +46,14 @@ import {
48
46
  PickerBackHeader,
49
47
  PickerNavRow,
50
48
  defaultModelPolicyPickerMessages
51
- } from "./chunk-FGZUCXZF.js";
52
- import "./chunk-EKZH6IDG.js";
49
+ } from "./chunk-WYA65Y3F.js";
53
50
  import "./chunk-23EJ676W.js";
54
- import "./chunk-U3CSCMWA.js";
51
+ import "./chunk-FK6VG4LL.js";
52
+ import "./chunk-VZTQ73XT.js";
53
+ import "./chunk-724BW4TW.js";
55
54
  import "./chunk-LAKLF4PA.js";
56
- import "./chunk-JB5725BI.js";
55
+ import "./chunk-KZ73RL76.js";
56
+ import "./chunk-HDBG7XGO.js";
57
57
  import "./chunk-22KP6LR5.js";
58
58
  export {
59
59
  Actions,
@@ -1,5 +1,11 @@
1
1
  import type { SessionEvent } from "@opengeni/sdk";
2
- import type { EmbeddedSessionEventClientLike } from "../client";
2
+ import type { EmbeddedSessionEventClientLike } from "../client.js";
3
+ /**
4
+ * Keep live browser work active while the page is visible, then suspend it
5
+ * after a short hidden-tab grace period. Returning to the page re-enables the
6
+ * caller, which must reconcile durable state before resuming live delivery.
7
+ */
8
+ export declare function usePageLiveActivity(hiddenGraceMs?: number): boolean;
3
9
  export type AsyncListState<T> = {
4
10
  data: T | null;
5
11
  loading: boolean;
@@ -0,0 +1,21 @@
1
+ import type { AttachedBrowserDevice } from "@opengeni/sdk/interaction";
2
+ import type { EmbeddedBrowserInteractionClientLike } from "../client.js";
3
+ import { type EmbeddedBrowserInteractionClientOverride } from "../session-context.js";
4
+ export type UseAttachedBrowsersOptions = EmbeddedBrowserInteractionClientOverride & {
5
+ enabled?: boolean | undefined;
6
+ includeDisconnected?: boolean | undefined;
7
+ pollIntervalMs?: number | undefined;
8
+ };
9
+ export type UseAttachedBrowsersResult = {
10
+ revision: number;
11
+ devices: AttachedBrowserDevice[];
12
+ loading: boolean;
13
+ refreshing: boolean;
14
+ error: Error | null;
15
+ refresh: () => Promise<void>;
16
+ };
17
+ /** Workspace-wide inventory of Chrome profiles currently connected through an
18
+ * enrolled OpenGeni machine. BrowserSessions remain the execution authority. */
19
+ export declare function useAttachedBrowsers(options?: UseAttachedBrowsersOptions): UseAttachedBrowsersResult;
20
+ /** Exported for narrow proxy implementations and tests. */
21
+ export type AttachedBrowsersClient = EmbeddedBrowserInteractionClientLike;
@@ -1,6 +1,6 @@
1
1
  import type { WorkspaceModelCatalogModel } from "@opengeni/sdk";
2
- import { type PickerModelRow } from "../model-policy";
3
- import { type ClientOverride } from "../provider";
2
+ import { type PickerModelRow } from "../model-policy.js";
3
+ import { type ClientOverride } from "../provider.js";
4
4
  export type UseAvailableModelsOptions = Pick<ClientOverride, "client"> & {
5
5
  /** Refresh interval (ms). Off by default — the host model list rarely moves. */
6
6
  pollIntervalMs?: number | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { BillingBalance, UsageEvent } from "@opengeni/sdk";
2
- import { type ClientOverride } from "../provider";
2
+ import { type ClientOverride } from "../provider.js";
3
3
  export type UseBillingUsageOptions = Pick<ClientOverride, "client"> & {
4
4
  /** Account to read. Defaults to the caller's default account server-side. */
5
5
  accountId?: string | undefined;
@@ -0,0 +1,28 @@
1
+ import { type BrowserFrame, type BrowserFrameStreamOptions, type BrowserSessionAttachment } from "@opengeni/sdk/interaction";
2
+ import { type EmbeddedBrowserInteractionClientOverride } from "../session-context.js";
3
+ export type BrowserFrameConnectionState = "idle" | "attaching" | "connecting" | "live" | "reconnecting" | "error";
4
+ export type BrowserFrameWebSocket = Pick<WebSocket, "binaryType" | "readyState" | "close" | "addEventListener" | "removeEventListener"> & {
5
+ send(data: ArrayBuffer): void;
6
+ };
7
+ export type BrowserFrameWebSocketFactory = (url: string, protocols: string[]) => BrowserFrameWebSocket;
8
+ export type UseBrowserFrameStreamOptions = EmbeddedBrowserInteractionClientOverride & {
9
+ browserSessionId: string | null;
10
+ targetId: string | null;
11
+ enabled?: boolean | undefined;
12
+ stream?: BrowserFrameStreamOptions | undefined;
13
+ webSocketFactory?: BrowserFrameWebSocketFactory | undefined;
14
+ };
15
+ export type UseBrowserFrameStreamResult = {
16
+ state: BrowserFrameConnectionState;
17
+ frame: BrowserFrame | null;
18
+ attachment: Pick<BrowserSessionAttachment, "browserSessionId" | "controllerGeneration" | "targetId" | "expiresAt"> | null;
19
+ error: Error | null;
20
+ reconnect: () => void;
21
+ };
22
+ /**
23
+ * Reconnecting, latest-only BrowserSession media attachment. Direct placement
24
+ * grants travel as a WebSocket subprotocol; connected-machine grants stay in the
25
+ * relay's first authenticated binary message. Neither transport puts a grant in
26
+ * a URL, event, log, or separately exposed React state.
27
+ */
28
+ export declare function useBrowserFrameStream(options: UseBrowserFrameStreamOptions): UseBrowserFrameStreamResult;
@@ -0,0 +1,26 @@
1
+ import type { BrowserIdentity, BrowserIdentityMutationResponse, BrowserRevisionListResponse, CreateBrowserIdentityRequest, PublishBrowserRevisionRequest, PublishBrowserRevisionResponse } from "@opengeni/sdk/interaction";
2
+ import type { EmbeddedBrowserInteractionClientLike } from "../client.js";
3
+ import { type EmbeddedBrowserInteractionClientOverride } from "../session-context.js";
4
+ export type UseBrowserIdentitiesOptions = EmbeddedBrowserInteractionClientOverride & {
5
+ enabled?: boolean | undefined;
6
+ };
7
+ export type UseBrowserIdentitiesResult = {
8
+ revision: number;
9
+ identities: BrowserIdentity[];
10
+ loading: boolean;
11
+ refreshing: boolean;
12
+ mutating: boolean;
13
+ error: Error | null;
14
+ refresh: () => Promise<void>;
15
+ create: (request: Omit<CreateBrowserIdentityRequest, "operationId"> & {
16
+ operationId?: string;
17
+ }) => Promise<BrowserIdentityMutationResponse>;
18
+ revisions: (identityId: string) => Promise<BrowserRevisionListResponse>;
19
+ publish: (browserSessionId: string, request: Omit<PublishBrowserRevisionRequest, "operationId"> & {
20
+ operationId?: string;
21
+ }) => Promise<PublishBrowserRevisionResponse>;
22
+ };
23
+ /** Workspace browser-profile library and explicit immutable-version mutations. */
24
+ export declare function useBrowserIdentities(options?: UseBrowserIdentitiesOptions): UseBrowserIdentitiesResult;
25
+ /** Exported for narrow proxy implementations and tests. */
26
+ export type BrowserIdentitiesClient = EmbeddedBrowserInteractionClientLike;
@@ -0,0 +1,28 @@
1
+ import type { BrowserAction, BrowserActionBatch, BrowserActionReceipt, BrowserDiagnosticBatch, BrowserDiagnosticsOptions, BrowserFrame, BrowserObservation, BrowserSession, BrowserTarget } from "@opengeni/sdk/interaction";
2
+ import { type EmbeddedBrowserInteractionClientOverride } from "../session-context.js";
3
+ export type UseBrowserSessionOptions = EmbeddedBrowserInteractionClientOverride & {
4
+ browserSessionId: string | null;
5
+ enabled?: boolean | undefined;
6
+ pollIntervalMs?: number | undefined;
7
+ };
8
+ export type UseBrowserSessionResult = {
9
+ session: BrowserSession | null;
10
+ targets: BrowserTarget[];
11
+ selectedTarget: BrowserTarget | null;
12
+ observation: BrowserObservation | null;
13
+ loading: boolean;
14
+ mutating: boolean;
15
+ error: Error | null;
16
+ refresh: () => Promise<void>;
17
+ selectTarget: (targetId: string) => Promise<BrowserTarget>;
18
+ openTarget: (url?: string) => Promise<BrowserTarget>;
19
+ closeTarget: (targetId: string) => Promise<void>;
20
+ act: (action: BrowserAction | BrowserActionBatch, operationId?: string) => Promise<BrowserActionReceipt>;
21
+ /** Dispatch input against the exact image a human saw. Stale images fail at
22
+ * the controller fence instead of targeting a newer page. */
23
+ actFromFrame: (action: BrowserAction | BrowserActionBatch, frame: BrowserFrame, operationId?: string) => Promise<BrowserActionReceipt>;
24
+ diagnostics: (options?: BrowserDiagnosticsOptions) => Promise<BrowserDiagnosticBatch>;
25
+ };
26
+ /** Selected BrowserSession control state. All human actions use the same
27
+ * generation-fenced controller operation stream as agent actions. */
28
+ export declare function useBrowserSession(options: UseBrowserSessionOptions): UseBrowserSessionResult;
@@ -0,0 +1,32 @@
1
+ import type { BrowserSession, BrowserSessionMutationResponse, CreateBrowserSessionRequest } from "@opengeni/sdk/interaction";
2
+ import type { EmbeddedBrowserInteractionClientLike } from "../client.js";
3
+ import { type EmbeddedBrowserInteractionClientOverride } from "../session-context.js";
4
+ export type UseBrowserSessionsOptions = EmbeddedBrowserInteractionClientOverride & {
5
+ /** Current agent/session relevance. Workspace peers remain in `sessions`. */
6
+ sessionId?: string | undefined;
7
+ enabled?: boolean | undefined;
8
+ /** Temporary invalidation path until the interaction event stream lands. */
9
+ pollIntervalMs?: number | undefined;
10
+ };
11
+ export type UseBrowserSessionsResult = {
12
+ revision: number;
13
+ sessions: BrowserSession[];
14
+ relevantSessions: BrowserSession[];
15
+ loading: boolean;
16
+ refreshing: boolean;
17
+ error: Error | null;
18
+ refresh: () => Promise<void>;
19
+ create: (request: Omit<CreateBrowserSessionRequest, "operationId"> & {
20
+ operationId?: string;
21
+ }) => Promise<BrowserSessionMutationResponse>;
22
+ suspend: (browserSessionId: string, operationId?: string) => Promise<BrowserSessionMutationResponse>;
23
+ resume: (browserSessionId: string, operationId?: string) => Promise<BrowserSessionMutationResponse>;
24
+ end: (browserSessionId: string, operationId?: string) => Promise<BrowserSessionMutationResponse>;
25
+ };
26
+ /**
27
+ * Workspace-wide BrowserSession registry. Associations rank relevance but never
28
+ * hide peer resources; no explicit share ceremony or per-view ownership exists.
29
+ */
30
+ export declare function useBrowserSessions(options?: UseBrowserSessionsOptions): UseBrowserSessionsResult;
31
+ /** Exported for narrow proxy implementations and tests. */
32
+ export type BrowserSessionsClient = EmbeddedBrowserInteractionClientLike;
@@ -1,6 +1,6 @@
1
1
  import type { CodexAccount, CodexAccountsResponse, CodexRotationSettings, SessionEvent } from "@opengeni/sdk";
2
- import { type ClientOverride } from "../provider";
3
- import { type SessionEventFeedOptions } from "./internal";
2
+ import { type ClientOverride } from "../provider.js";
3
+ import { type SessionEventFeedOptions } from "./internal.js";
4
4
  /** Events that change which Codex account a session runs on (or just ran). */
5
5
  export declare function isCodexAccountEvent(event: Pick<SessionEvent, "type">): boolean;
6
6
  /**
@@ -63,7 +63,7 @@ export type UseCodexAccountsResult = {
63
63
  * The workspace's Codex accounts + the per-workspace active pointer + (when
64
64
  * session-scoped) the session pin and last-ran-on account. Composed like
65
65
  * `useMachines`: slow polling (the realtime work is done by the
66
- * `codex.account.switched` / `turn.started` event trigger) + a `pin` mutation.
66
+ * `codex.account.switched` event trigger) + a `pin` mutation.
67
67
  * Dual-consumer safe via the structural `CodexAccountsClientLike` surface.
68
68
  */
69
69
  export declare function useCodexAccounts(options?: UseCodexAccountsOptions): UseCodexAccountsResult;
@@ -1,8 +1,10 @@
1
- import { type ComposerDraft, type EffectiveControlResumeOption, type EffectiveSessionControl, type ResourceRef, type SendMessageInput, type SessionEvent } from "@opengeni/sdk";
2
- import { type EmbeddedSessionClientOverride } from "../session-context";
3
- import { type SessionEventFeedOptions } from "./internal";
4
- export type ComposerSendExtras = Omit<SendMessageInput, "text" | "clientEventId">;
1
+ import { type ComposerDraft, type DraftTimelineAnnotation, type EffectiveControlResumeOption, type EffectiveSessionControl, type ResourceRef, type SendMessageInput, type SessionEvent } from "@opengeni/sdk";
2
+ import { type EmbeddedSessionClientOverride } from "../session-context.js";
3
+ import { type SessionEventFeedOptions } from "./internal.js";
4
+ export type ComposerSendExtras = Omit<SendMessageInput, "text" | "clientEventId" | "annotations">;
5
5
  export type UseComposerOptions = EmbeddedSessionClientOverride & SessionEventFeedOptions & {
6
+ /** Called synchronously after an ordinary Send is accepted by the local UI. */
7
+ onSubmitted?: ((text: string, input: SendMessageInput) => void) | undefined;
6
8
  /** Called with the exact accepted wire input after a successful send. */
7
9
  onSent?: ((text: string, input: SendMessageInput) => void) | undefined;
8
10
  /**
@@ -24,17 +26,40 @@ export type UseComposerOptions = EmbeddedSessionClientOverride & SessionEventFee
24
26
  /** Disable remote composer-draft reads and writes for embedded hosts. */
25
27
  draftPersistence?: "durable" | "disabled" | undefined;
26
28
  };
29
+ export type ComposerOptimisticMessage = {
30
+ clientEventId: string;
31
+ text: string;
32
+ annotations: DraftTimelineAnnotation[];
33
+ resources: ResourceRef[];
34
+ occurredAt: string;
35
+ state: "sending" | "queued" | "failed";
36
+ error?: string | undefined;
37
+ outcomeUnknown?: boolean | undefined;
38
+ };
27
39
  export type ComposerState = {
28
40
  value: string;
29
41
  setValue: (value: string) => void;
42
+ annotations?: DraftTimelineAnnotation[] | undefined;
43
+ addAnnotation?: ((annotation: DraftTimelineAnnotation) => void) | undefined;
44
+ updateAnnotation?: ((id: string, note: string) => void) | undefined;
45
+ removeAnnotation?: ((id: string) => void) | undefined;
46
+ /** Newly captured annotation the review surface should focus. */
47
+ annotationReviewTargetId?: string | null | undefined;
48
+ clearAnnotationReviewTarget?: (() => void) | undefined;
30
49
  /** Read the current draft synchronously before a destructive replacement. */
31
50
  hasDraftContent: () => boolean;
32
51
  /** Append the draft behind prompts already visible in the queue. */
33
52
  send: (text?: string) => Promise<boolean>;
53
+ /** Locally acknowledged ordinary sends awaiting durable timeline reconciliation. */
54
+ optimisticMessages?: ComposerOptimisticMessage[] | undefined;
55
+ retryOptimisticMessage?: ((clientEventId: string) => void) | undefined;
56
+ removeOptimisticMessage?: ((clientEventId: string) => void) | undefined;
34
57
  /** Supersede current direction with the draft. */
35
58
  steer: (text?: string) => Promise<boolean>;
36
59
  /** Optimistic-to-durable projection for a Steer that has not started yet. */
37
60
  steering?: ComposerSteeringState | null | undefined;
61
+ /** Immediate mutation-receipt projection while physical cancellation settles. */
62
+ stoppingAttempt?: "current" | "previous" | null | undefined;
38
63
  sending: boolean;
39
64
  canSend: boolean;
40
65
  /** Pause the session without deleting its prompt queue. */
@@ -65,6 +90,8 @@ export type ComposerSteeringState = {
65
90
  clientEventId: string | null;
66
91
  triggerEventId: string | null;
67
92
  turnId: string | null;
93
+ /** True only when the accepted Steer durably interrupted a live attempt. */
94
+ stoppingPreviousAttempt?: boolean | undefined;
68
95
  };
69
96
  /**
70
97
  * Draft + send + Pause/Resume state for the chat composer — the only
@@ -76,12 +103,12 @@ export declare function useComposer(sessionId: string | null | undefined, option
76
103
  /** Events that can atomically replace or clear this subject's durable draft. */
77
104
  export declare function isComposerDraftEvent(event: Pick<SessionEvent, "type">): boolean;
78
105
  /**
79
- * Default text for a file-only message (attachment(s) present, no typed draft).
80
- * Kept non-empty so the wire contract (`text: z.string().min(1)`) and the
81
- * worker's non-whitespace guard accept it; the attached files still ride in
82
- * `resources`. Exported for tests.
106
+ * Default text for a resource-only message (attachments present, no typed
107
+ * draft). Kept non-empty so the wire contract (`text: z.string().min(1)`) and
108
+ * the worker's non-whitespace guard accept it. The export name is retained for
109
+ * compatibility now that repositories can ride beside files in `resources`.
83
110
  */
84
- export declare const FILE_ONLY_MESSAGE_TEXT = "(see attached files)";
111
+ export declare const FILE_ONLY_MESSAGE_TEXT = "(see attached context)";
85
112
  /** Resolve possibly-deferred extras to a concrete bag (function evaluated now). */
86
113
  export declare function resolveSendExtras(extras: ComposerSendExtras | (() => ComposerSendExtras) | undefined): ComposerSendExtras;
87
114
  /**
@@ -0,0 +1,24 @@
1
+ import { type ComputerFrame, type ComputerFrameStreamOptions, type ComputerSessionAttachment } from "@opengeni/sdk/interaction";
2
+ import { type EmbeddedComputerInteractionClientOverride } from "../session-context.js";
3
+ export type ComputerFrameConnectionState = "idle" | "attaching" | "connecting" | "live" | "reconnecting" | "error";
4
+ export type ComputerFrameWebSocket = Pick<WebSocket, "binaryType" | "readyState" | "close" | "addEventListener" | "removeEventListener"> & {
5
+ send(data: ArrayBuffer): void;
6
+ };
7
+ export type ComputerFrameWebSocketFactory = (url: string, protocols: string[]) => ComputerFrameWebSocket;
8
+ export type UseComputerFrameStreamOptions = EmbeddedComputerInteractionClientOverride & {
9
+ computerSessionId: string | null;
10
+ targetId: string | null;
11
+ enabled?: boolean | undefined;
12
+ stream?: ComputerFrameStreamOptions | undefined;
13
+ webSocketFactory?: ComputerFrameWebSocketFactory | undefined;
14
+ };
15
+ export type UseComputerFrameStreamResult = {
16
+ state: ComputerFrameConnectionState;
17
+ frame: ComputerFrame | null;
18
+ attachment: Pick<ComputerSessionAttachment, "computerSessionId" | "controllerGeneration" | "targetId" | "expiresAt"> | null;
19
+ error: Error | null;
20
+ reconnect: () => void;
21
+ };
22
+ /** Reconnecting, latest-only ComputerSession media attachment. Grants remain in
23
+ * WebSocket subprotocols or the relay's authenticated first binary message. */
24
+ export declare function useComputerFrameStream(options: UseComputerFrameStreamOptions): UseComputerFrameStreamResult;