@opengeni/react 0.48.0 → 0.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. package/README.md +138 -2
  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 +199 -0
  13. package/dist/artifacts.js.map +1 -0
  14. package/dist/{chunk-NJ7M2B6Z.js → chunk-5UQPNLIO.js} +16 -8
  15. package/dist/{chunk-NJ7M2B6Z.js.map → chunk-5UQPNLIO.js.map} +1 -1
  16. package/dist/{chunk-LHLYWG5R.js → chunk-6KLX2RH5.js} +461 -38
  17. package/dist/chunk-6KLX2RH5.js.map +1 -0
  18. package/dist/chunk-7WCLAEFV.js +2828 -0
  19. package/dist/chunk-7WCLAEFV.js.map +1 -0
  20. package/dist/{chunk-I4MPFDRP.js → chunk-B6WPZSTT.js} +104 -104
  21. package/dist/{chunk-I4MPFDRP.js.map → chunk-B6WPZSTT.js.map} +1 -1
  22. package/dist/{chunk-EKZH6IDG.js → chunk-C5ZPSSS5.js} +111 -1
  23. package/dist/chunk-C5ZPSSS5.js.map +1 -0
  24. package/dist/{chunk-OL6QVXGF.js → chunk-HA46CYQK.js} +152 -8
  25. package/dist/chunk-HA46CYQK.js.map +1 -0
  26. package/dist/chunk-HUIKIDM5.js +2148 -0
  27. package/dist/chunk-HUIKIDM5.js.map +1 -0
  28. package/dist/{chunk-FWXGSNXT.js → chunk-IGC6A2ZI.js} +585 -34
  29. package/dist/chunk-IGC6A2ZI.js.map +1 -0
  30. package/dist/chunk-JVYQRRC4.js +53 -0
  31. package/dist/chunk-JVYQRRC4.js.map +1 -0
  32. package/dist/chunk-KCGXPP5V.js +157 -0
  33. package/dist/chunk-KCGXPP5V.js.map +1 -0
  34. package/dist/chunk-LLOLUHVG.js +5937 -0
  35. package/dist/chunk-LLOLUHVG.js.map +1 -0
  36. package/dist/{chunk-WYA65Y3F.js → chunk-MKPIAGVL.js} +13 -3
  37. package/dist/chunk-MKPIAGVL.js.map +1 -0
  38. package/dist/chunk-PEI6RANI.js +3234 -0
  39. package/dist/chunk-PEI6RANI.js.map +1 -0
  40. package/dist/chunk-R3AZOAB5.js +933 -0
  41. package/dist/chunk-R3AZOAB5.js.map +1 -0
  42. package/dist/{chunk-O4VXOBGF.js → chunk-WSK7G5LE.js} +70 -2
  43. package/dist/chunk-WSK7G5LE.js.map +1 -0
  44. package/dist/{chunk-23EJ676W.js → chunk-XBZWOM2K.js} +9 -4
  45. package/dist/chunk-XBZWOM2K.js.map +1 -0
  46. package/dist/{chunk-XCNTXWBB.js → chunk-Y7OEDUJ5.js} +856 -338
  47. package/dist/chunk-Y7OEDUJ5.js.map +1 -0
  48. package/dist/client.d.ts +10 -2
  49. package/dist/clipboard.d.ts +1 -0
  50. package/dist/clipboard.js +7 -0
  51. package/dist/clipboard.js.map +1 -0
  52. package/dist/commands/index.d.ts +3 -3
  53. package/dist/commands/registry.d.ts +1 -1
  54. package/dist/commands/types.d.ts +1 -1
  55. package/dist/components/approval-surface.d.ts +2 -2
  56. package/dist/components/artifacts/artifact-surface.d.ts +18 -0
  57. package/dist/components/artifacts/document-editor.d.ts +172 -0
  58. package/dist/components/artifacts/editable-artifact-ui.d.ts +13 -0
  59. package/dist/components/artifacts/editable-artifact-workbench.d.ts +49 -0
  60. package/dist/components/artifacts/editable-document.d.ts +24 -0
  61. package/dist/components/artifacts/editable-presentation.d.ts +24 -0
  62. package/dist/components/artifacts/editable-spreadsheet.d.ts +32 -0
  63. package/dist/components/artifacts/index.d.ts +9 -0
  64. package/dist/components/artifacts/presentation-editor.d.ts +297 -0
  65. package/dist/components/artifacts/published-html-artifact-frame.d.ts +14 -0
  66. package/dist/components/artifacts/spreadsheet-canvas.d.ts +120 -0
  67. package/dist/components/artifacts/spreadsheet-grid.d.ts +113 -0
  68. package/dist/components/browser-input.d.ts +7 -0
  69. package/dist/components/browser-viewer.d.ts +30 -0
  70. package/dist/components/chat-composer.d.ts +8 -8
  71. package/dist/components/code-editor.d.ts +25 -3
  72. package/dist/components/command-palette.d.ts +2 -2
  73. package/dist/components/composer-transcription-control.d.ts +2 -2
  74. package/dist/components/composer.d.ts +17 -17
  75. package/dist/components/computer-viewer.d.ts +24 -0
  76. package/dist/components/copy-button.d.ts +2 -2
  77. package/dist/components/desktop-viewer.d.ts +50 -22
  78. package/dist/components/diff-view.d.ts +1 -1
  79. package/dist/components/enrollment-consent.d.ts +1 -1
  80. package/dist/components/enrollment-device-flow.d.ts +1 -1
  81. package/dist/components/file-browser.d.ts +2 -2
  82. package/dist/components/fleet-tile.d.ts +1 -1
  83. package/dist/components/generated-video-player.d.ts +10 -0
  84. package/dist/components/human-input-form.d.ts +1 -1
  85. package/dist/components/human-input-surface.d.ts +2 -2
  86. package/dist/components/interaction-intervention-banner.d.ts +11 -0
  87. package/dist/components/interactive-workbench-viewers.d.ts +2 -0
  88. package/dist/components/machine-card.d.ts +2 -2
  89. package/dist/components/machine-dock-bar.d.ts +3 -3
  90. package/dist/components/machine-health-pill.d.ts +2 -2
  91. package/dist/components/machine-input-display.d.ts +1 -1
  92. package/dist/components/machine-metrics.d.ts +2 -2
  93. package/dist/components/machine-status-pill.d.ts +4 -4
  94. package/dist/components/machines/health.d.ts +1 -1
  95. package/dist/components/machines/machine-detail.d.ts +3 -3
  96. package/dist/components/machines/metric-history-chart.d.ts +1 -1
  97. package/dist/components/machines/metric-sparkline.d.ts +2 -2
  98. package/dist/components/machines/series.d.ts +2 -2
  99. package/dist/components/machines-dashboard.d.ts +2 -2
  100. package/dist/components/markdown.d.ts +1 -1
  101. package/dist/components/message-timeline.d.ts +12 -5
  102. package/dist/components/model-picker.d.ts +2 -2
  103. package/dist/components/model-policy-picker.d.ts +7 -7
  104. package/dist/components/pierre-diff.d.ts +1 -1
  105. package/dist/components/pierre-file.d.ts +1 -1
  106. package/dist/components/queue-draft-policy.d.ts +1 -1
  107. package/dist/components/queue-surface-implementation.d.ts +3 -3
  108. package/dist/components/queue-surface-state.d.ts +4 -4
  109. package/dist/components/queue-surface.d.ts +5 -5
  110. package/dist/components/sandbox-files.d.ts +3 -3
  111. package/dist/components/sandbox-terminal.d.ts +24 -4
  112. package/dist/components/sandbox-workspace.d.ts +28 -9
  113. package/dist/components/session-chrome.d.ts +4 -4
  114. package/dist/components/session-status.d.ts +2 -2
  115. package/dist/components/timeline-annotation-selection.d.ts +9 -0
  116. package/dist/components/timeline-annotations-dialog.d.ts +16 -0
  117. package/dist/components/timeline-annotations.d.ts +13 -0
  118. package/dist/components/tooltip.d.ts +4 -4
  119. package/dist/components/user-message-body.d.ts +2 -2
  120. package/dist/components/workbench-changes.d.ts +2 -2
  121. package/dist/components/workspace-dock.d.ts +1 -1
  122. package/dist/composer.d.ts +11 -11
  123. package/dist/composer.js +7 -7
  124. package/dist/hooks/internal.d.ts +1 -1
  125. package/dist/hooks/use-attached-browsers.d.ts +21 -0
  126. package/dist/hooks/use-auth-runs.d.ts +32 -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-downloads.d.ts +25 -0
  130. package/dist/hooks/use-browser-frame-stream.d.ts +28 -0
  131. package/dist/hooks/use-browser-identities.d.ts +30 -0
  132. package/dist/hooks/use-browser-session.d.ts +29 -0
  133. package/dist/hooks/use-browser-sessions.d.ts +32 -0
  134. package/dist/hooks/use-channels.d.ts +26 -0
  135. package/dist/hooks/use-codex-accounts.d.ts +2 -2
  136. package/dist/hooks/use-composer.d.ts +36 -9
  137. package/dist/hooks/use-computer-frame-stream.d.ts +24 -0
  138. package/dist/hooks/use-computer-session.d.ts +29 -0
  139. package/dist/hooks/use-computer-sessions.d.ts +28 -0
  140. package/dist/hooks/use-desktop-stream.d.ts +5 -1
  141. package/dist/hooks/use-environments.d.ts +1 -1
  142. package/dist/hooks/use-file-attachments.d.ts +1 -1
  143. package/dist/hooks/use-goal.d.ts +2 -2
  144. package/dist/hooks/use-human-input.d.ts +2 -2
  145. package/dist/hooks/use-interaction-interventions.d.ts +27 -0
  146. package/dist/hooks/use-interaction-invalidation.d.ts +19 -0
  147. package/dist/hooks/use-last-started-turn-policy.d.ts +2 -2
  148. package/dist/hooks/use-machine-chip.d.ts +2 -2
  149. package/dist/hooks/use-machines.d.ts +4 -4
  150. package/dist/hooks/use-network-routes.d.ts +25 -0
  151. package/dist/hooks/use-packs.d.ts +7 -2
  152. package/dist/hooks/use-rigs.d.ts +1 -1
  153. package/dist/hooks/use-sandbox-files.d.ts +6 -4
  154. package/dist/hooks/use-sandbox-git.d.ts +6 -5
  155. package/dist/hooks/use-sandbox-terminal.d.ts +1 -1
  156. package/dist/hooks/use-scheduled-tasks.d.ts +1 -1
  157. package/dist/hooks/use-session-capabilities.d.ts +5 -4
  158. package/dist/hooks/use-session-control.d.ts +1 -1
  159. package/dist/hooks/use-session-events.d.ts +2 -2
  160. package/dist/hooks/use-session-lineage.d.ts +1 -1
  161. package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
  162. package/dist/hooks/use-session.d.ts +2 -2
  163. package/dist/hooks/use-site-auth-connections.d.ts +25 -0
  164. package/dist/hooks/use-slash-commands.d.ts +1 -1
  165. package/dist/hooks/use-supergrok-accounts.d.ts +26 -0
  166. package/dist/hooks/use-terminal-stream.d.ts +11 -2
  167. package/dist/hooks/use-turn-queue.d.ts +2 -2
  168. package/dist/hooks/use-video-artifact-playback.d.ts +9 -0
  169. package/dist/hooks/use-voice-input.d.ts +1 -1
  170. package/dist/hooks/use-workspace-capture.d.ts +1 -1
  171. package/dist/hooks/use-workspace-edit.d.ts +1 -1
  172. package/dist/hooks/use-workspace-sessions.d.ts +1 -1
  173. package/dist/hooks/use-workspaces.d.ts +1 -1
  174. package/dist/index.d.ts +162 -155
  175. package/dist/index.js +1822 -1703
  176. package/dist/index.js.map +1 -1
  177. package/dist/interaction.d.ts +33 -0
  178. package/dist/interaction.js +550 -0
  179. package/dist/interaction.js.map +1 -0
  180. package/dist/interactive-workbench-viewers-TOHBXJEE.js +15 -0
  181. package/dist/interactive-workbench-viewers-TOHBXJEE.js.map +1 -0
  182. package/dist/lib/host-platform.d.ts +5 -0
  183. package/dist/lib/relay-wire.d.ts +24 -1
  184. package/dist/lib/sandbox-liveness.d.ts +9 -0
  185. package/dist/lib/terminal-capability.d.ts +5 -0
  186. package/dist/lib/xterm-theme.d.ts +1 -1
  187. package/dist/machines.d.ts +30 -30
  188. package/dist/machines.js +2 -2
  189. package/dist/model-policy.d.ts +1 -1
  190. package/dist/model-policy.js +1 -1
  191. package/dist/provider.d.ts +6 -5
  192. package/dist/{queue-surface-implementation-U5JFG7HT.js → queue-surface-implementation-2KVJTYXH.js} +100 -48
  193. package/dist/queue-surface-implementation-2KVJTYXH.js.map +1 -0
  194. package/dist/realtime/dropdown-menu.d.ts +8 -8
  195. package/dist/realtime/realtime-control.d.ts +8 -8
  196. package/dist/realtime.d.ts +4 -4
  197. package/dist/realtime.js +38 -11
  198. package/dist/realtime.js.map +1 -1
  199. package/dist/session-context.d.ts +28 -2
  200. package/dist/session-ui.d.ts +14 -14
  201. package/dist/session-ui.js +5 -4
  202. package/dist/session.d.ts +28 -28
  203. package/dist/session.js +10 -10
  204. package/dist/timeline/activity-rail.d.ts +5 -3
  205. package/dist/timeline/disclosure-context.d.ts +1 -1
  206. package/dist/timeline/fleet-decision-projection.d.ts +1 -1
  207. package/dist/timeline/fleet-decision-row.d.ts +3 -3
  208. package/dist/timeline/index.d.ts +19 -19
  209. package/dist/timeline/parsers.d.ts +4 -1
  210. package/dist/timeline/projection.d.ts +3 -3
  211. package/dist/timeline/registry.d.ts +8 -2
  212. package/dist/timeline/screenshot-lightbox.d.ts +2 -2
  213. package/dist/timeline/shared.d.ts +21 -10
  214. package/dist/timeline/tool-diff.d.ts +2 -2
  215. package/dist/timeline/tool-renderers.d.ts +1 -1
  216. package/dist/timeline/turn-summary.d.ts +3 -3
  217. package/dist/timeline/types.d.ts +44 -3
  218. package/dist/timeline-annotation-selection-3L7LHGG2.js +187 -0
  219. package/dist/timeline-annotation-selection-3L7LHGG2.js.map +1 -0
  220. package/dist/timeline-annotations-dialog-U7EVLR75.js +196 -0
  221. package/dist/timeline-annotations-dialog-U7EVLR75.js.map +1 -0
  222. package/package.json +36 -7
  223. package/src/artifacts-document.ts +31 -0
  224. package/src/artifacts-presentation.ts +36 -0
  225. package/src/artifacts-spreadsheet.ts +21 -0
  226. package/src/artifacts.ts +89 -0
  227. package/src/client.ts +157 -1
  228. package/src/clipboard.ts +2 -0
  229. package/src/components/artifacts/artifact-surface.tsx +93 -0
  230. package/src/components/artifacts/document-editor.tsx +2255 -0
  231. package/src/components/artifacts/editable-artifact-ui.tsx +89 -0
  232. package/src/components/artifacts/editable-artifact-workbench.tsx +203 -0
  233. package/src/components/artifacts/editable-document.tsx +657 -0
  234. package/src/components/artifacts/editable-presentation.tsx +1020 -0
  235. package/src/components/artifacts/editable-spreadsheet.tsx +733 -0
  236. package/src/components/artifacts/index.ts +104 -0
  237. package/src/components/artifacts/presentation-editor.tsx +3148 -0
  238. package/src/components/artifacts/published-html-artifact-frame.tsx +38 -0
  239. package/src/components/artifacts/spreadsheet-canvas.ts +799 -0
  240. package/src/components/artifacts/spreadsheet-grid.tsx +2129 -0
  241. package/src/components/browser-input.ts +65 -0
  242. package/src/components/browser-viewer.tsx +2702 -0
  243. package/src/components/chat-composer.tsx +13 -0
  244. package/src/components/code-editor.tsx +89 -30
  245. package/src/components/composer-transcription-control.tsx +10 -6
  246. package/src/components/computer-viewer.tsx +1636 -0
  247. package/src/components/desktop-viewer.tsx +215 -74
  248. package/src/components/generated-video-player.tsx +89 -0
  249. package/src/components/interaction-intervention-banner.tsx +99 -0
  250. package/src/components/interactive-workbench-viewers.ts +2 -0
  251. package/src/components/machine-input-display.ts +3 -0
  252. package/src/components/machines/machine-detail.tsx +1 -1
  253. package/src/components/message-timeline.tsx +289 -32
  254. package/src/components/model-policy-picker.tsx +15 -0
  255. package/src/components/queue-surface-implementation.tsx +116 -60
  256. package/src/components/sandbox-files.tsx +2 -2
  257. package/src/components/sandbox-terminal.tsx +128 -46
  258. package/src/components/sandbox-workspace.tsx +256 -90
  259. package/src/components/session-chrome.tsx +53 -13
  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/workbench-changes.tsx +188 -31
  264. package/src/components/workspace-dock.tsx +59 -5
  265. package/src/hooks/use-attached-browsers.ts +154 -0
  266. package/src/hooks/use-auth-runs.ts +278 -0
  267. package/src/hooks/use-browser-downloads.ts +218 -0
  268. package/src/hooks/use-browser-frame-stream.ts +425 -0
  269. package/src/hooks/use-browser-identities.ts +266 -0
  270. package/src/hooks/use-browser-session.ts +543 -0
  271. package/src/hooks/use-browser-sessions.ts +286 -0
  272. package/src/hooks/use-channels.ts +99 -0
  273. package/src/hooks/use-composer.ts +769 -24
  274. package/src/hooks/use-computer-frame-stream.ts +434 -0
  275. package/src/hooks/use-computer-session.ts +462 -0
  276. package/src/hooks/use-computer-sessions.ts +251 -0
  277. package/src/hooks/use-desktop-stream.ts +39 -7
  278. package/src/hooks/use-interaction-interventions.ts +242 -0
  279. package/src/hooks/use-interaction-invalidation.ts +66 -0
  280. package/src/hooks/use-machine-chip.ts +15 -3
  281. package/src/hooks/use-machines.ts +33 -3
  282. package/src/hooks/use-network-routes.ts +214 -0
  283. package/src/hooks/use-packs.ts +51 -0
  284. package/src/hooks/use-sandbox-files.ts +98 -55
  285. package/src/hooks/use-sandbox-git.ts +93 -38
  286. package/src/hooks/use-sandbox-terminal.ts +3 -2
  287. package/src/hooks/use-session-capabilities.ts +59 -46
  288. package/src/hooks/use-site-auth-connections.ts +226 -0
  289. package/src/hooks/use-supergrok-accounts.ts +81 -0
  290. package/src/hooks/use-terminal-stream.ts +359 -47
  291. package/src/hooks/use-video-artifact-playback.ts +28 -0
  292. package/src/hooks/use-workspace-edit.ts +2 -1
  293. package/src/index.ts +18 -0
  294. package/src/interaction.ts +101 -0
  295. package/src/lib/host-platform.ts +10 -0
  296. package/src/lib/relay-wire.ts +47 -4
  297. package/src/lib/sandbox-liveness.ts +11 -0
  298. package/src/lib/terminal-capability.ts +10 -0
  299. package/src/model-policy.ts +19 -4
  300. package/src/provider.tsx +133 -1
  301. package/src/realtime/realtime-control.tsx +34 -6
  302. package/src/session-context.ts +156 -1
  303. package/src/timeline/activity-rail.tsx +25 -3
  304. package/src/timeline/index.ts +3 -0
  305. package/src/timeline/parsers.ts +14 -1
  306. package/src/timeline/projection.ts +269 -14
  307. package/src/timeline/registry.ts +13 -1
  308. package/src/timeline/screenshot-lightbox.tsx +19 -9
  309. package/src/timeline/shared.tsx +56 -8
  310. package/src/timeline/tool-renderers.tsx +303 -50
  311. package/src/timeline/types.ts +57 -3
  312. package/styles/compiled.css +312 -21
  313. package/styles/index.css +15 -0
  314. package/styles/responsive.css +13 -1
  315. package/dist/chunk-23EJ676W.js.map +0 -1
  316. package/dist/chunk-EKZH6IDG.js.map +0 -1
  317. package/dist/chunk-FWXGSNXT.js.map +0 -1
  318. package/dist/chunk-LHLYWG5R.js.map +0 -1
  319. package/dist/chunk-O4VXOBGF.js.map +0 -1
  320. package/dist/chunk-OL6QVXGF.js.map +0 -1
  321. package/dist/chunk-WYA65Y3F.js.map +0 -1
  322. package/dist/chunk-XCNTXWBB.js.map +0 -1
  323. package/dist/fleet-decision-projection-SLNZMS42.js +0 -241
  324. package/dist/fleet-decision-projection-SLNZMS42.js.map +0 -1
  325. package/dist/queue-surface-implementation-U5JFG7HT.js.map +0 -1
@@ -0,0 +1,297 @@
1
+ import { type ReactNode } from "react";
2
+ import type { Presentation, PresentationElement, PresentationPosition, Slide } from "@opengeni/artifact-tool/reference";
3
+ type PresentationObject = PresentationElement;
4
+ export type PresentationCommit = {
5
+ kind: "slide-insert";
6
+ slideId: string;
7
+ index: number;
8
+ revision?: string | number;
9
+ } | {
10
+ kind: "slide-delete";
11
+ slideId: string;
12
+ index: number;
13
+ revision?: string | number;
14
+ } | {
15
+ kind: "object-insert";
16
+ slideId: string;
17
+ objectId: string;
18
+ index: number;
19
+ position: PresentationPosition;
20
+ revision?: string | number;
21
+ } | {
22
+ kind: "object-delete";
23
+ slideId: string;
24
+ objectId: string;
25
+ revision?: string | number;
26
+ } | {
27
+ kind: "move" | "resize";
28
+ slideId: string;
29
+ objectId: string;
30
+ before: PresentationPosition;
31
+ after: PresentationPosition;
32
+ revision?: string | number;
33
+ } | {
34
+ kind: "text";
35
+ slideId: string;
36
+ objectId: string;
37
+ before: string;
38
+ after: string;
39
+ revision?: string | number;
40
+ };
41
+ export type PresentationCommitHandler = ((commit: PresentationCommit) => void) | ((commit: PresentationCommit) => Promise<void>);
42
+ export type PresentationProjectionPosition = Readonly<{
43
+ left: number;
44
+ top: number;
45
+ width: number;
46
+ height: number;
47
+ }>;
48
+ export type PresentationProjectionFill = string | Readonly<{
49
+ type?: "solid";
50
+ color: string;
51
+ }>;
52
+ export type PresentationProjectionLine = Readonly<{
53
+ style?: "solid" | "dash" | "dot" | "none";
54
+ fill?: PresentationProjectionFill;
55
+ width?: number;
56
+ }>;
57
+ export type PresentationProjectionTextStyle = Readonly<{
58
+ fontFamily?: string;
59
+ fontSize?: number;
60
+ bold?: boolean;
61
+ italic?: boolean;
62
+ underline?: boolean;
63
+ color?: string;
64
+ alignment?: "left" | "center" | "right" | "justify";
65
+ verticalAlignment?: "top" | "middle" | "bottom";
66
+ }>;
67
+ export type PresentationProjectionTextRun = Readonly<{
68
+ text: string;
69
+ style: PresentationProjectionTextStyle;
70
+ language?: string | null;
71
+ }>;
72
+ export type PresentationProjectionTextParagraph = Readonly<{
73
+ runs: readonly PresentationProjectionTextRun[];
74
+ alignment: "left" | "center" | "right" | "justify";
75
+ }>;
76
+ export type PresentationProjectionRichText = Readonly<{
77
+ paragraphs: readonly PresentationProjectionTextParagraph[];
78
+ verticalAlignment: "top" | "middle" | "bottom";
79
+ }>;
80
+ export type PresentationProjectionElementMetadata = Readonly<{
81
+ nodeSource?: Readonly<{
82
+ kind: "master" | "layout" | "slide";
83
+ id: string;
84
+ }>;
85
+ inherited?: boolean;
86
+ parentId?: string | null;
87
+ order?: number;
88
+ /** Inherited master/layout nodes remain visible but cannot be edited in slide mode. */
89
+ readOnly?: boolean;
90
+ }>;
91
+ export type PresentationProjectionShape = Readonly<{
92
+ kind: "shape";
93
+ id: string;
94
+ name: string;
95
+ geometry: "textbox" | "rect" | "roundRect" | "ellipse" | "triangle" | "rightArrow" | "line";
96
+ position: PresentationProjectionPosition;
97
+ fill?: PresentationProjectionFill;
98
+ line?: PresentationProjectionLine;
99
+ rotation?: number;
100
+ borderRadius?: number | string;
101
+ text: string;
102
+ textStyle?: PresentationProjectionTextStyle;
103
+ richText?: PresentationProjectionRichText;
104
+ }> & PresentationProjectionElementMetadata;
105
+ export type PresentationProjectionChartSeries = Readonly<{
106
+ name: string;
107
+ categories?: readonly string[];
108
+ values: readonly number[];
109
+ xValues?: readonly number[];
110
+ bubbleSizes?: readonly number[];
111
+ fill?: PresentationProjectionFill;
112
+ line?: PresentationProjectionLine;
113
+ }>;
114
+ export type PresentationProjectionChart = Readonly<{
115
+ kind: "chart";
116
+ id: string;
117
+ name: string;
118
+ type: "bar" | "line" | "area" | "pie" | "doughnut" | "scatter" | "bubble" | "radar";
119
+ position: PresentationProjectionPosition;
120
+ title?: string;
121
+ titleRichText?: PresentationProjectionRichText;
122
+ hasLegend?: boolean;
123
+ series: readonly PresentationProjectionChartSeries[];
124
+ xAxis?: Readonly<{
125
+ visible?: boolean;
126
+ title?: string;
127
+ min?: number;
128
+ max?: number;
129
+ }>;
130
+ yAxis?: Readonly<{
131
+ visible?: boolean;
132
+ title?: string;
133
+ min?: number;
134
+ max?: number;
135
+ }>;
136
+ dataLabels?: Readonly<{
137
+ showValue?: boolean;
138
+ showSeriesName?: boolean;
139
+ showCategoryName?: boolean;
140
+ showPercent?: boolean;
141
+ position?: "center" | "inEnd" | "outEnd";
142
+ }>;
143
+ }> & PresentationProjectionElementMetadata;
144
+ export type PresentationProjectionImage = Readonly<{
145
+ kind: "image";
146
+ id: string;
147
+ name: string;
148
+ position: PresentationProjectionPosition;
149
+ /** Host-resolved data/blob/same-origin URL. Arbitrary remote URLs are ignored. */
150
+ source?: string;
151
+ alt?: string;
152
+ prompt?: string;
153
+ fit?: "contain" | "cover";
154
+ crop?: Readonly<{
155
+ left: number;
156
+ top: number;
157
+ right: number;
158
+ bottom: number;
159
+ }>;
160
+ geometry?: "rect" | "roundRect" | "ellipse";
161
+ borderRadius?: number | string;
162
+ rotation?: number;
163
+ flipHorizontal?: boolean;
164
+ flipVertical?: boolean;
165
+ digest?: string;
166
+ contentType?: string;
167
+ intrinsicWidth?: number;
168
+ intrinsicHeight?: number;
169
+ }> & PresentationProjectionElementMetadata;
170
+ export type PresentationProjectionTableCell = Readonly<{
171
+ text: string;
172
+ richText?: PresentationProjectionRichText;
173
+ fill?: PresentationProjectionFill;
174
+ textStyle?: PresentationProjectionTextStyle;
175
+ rowSpan?: number;
176
+ colSpan?: number;
177
+ }>;
178
+ export type PresentationProjectionTable = Readonly<{
179
+ kind: "table";
180
+ id: string;
181
+ name: string;
182
+ position: PresentationProjectionPosition;
183
+ rows: readonly (readonly (PresentationProjectionTableCell | null)[])[];
184
+ columnWidths?: readonly number[];
185
+ rowHeights?: readonly number[];
186
+ fill?: PresentationProjectionFill;
187
+ line?: PresentationProjectionLine;
188
+ textStyle?: PresentationProjectionTextStyle;
189
+ }> & PresentationProjectionElementMetadata;
190
+ export type PresentationProjectionGroup = Readonly<{
191
+ kind: "group";
192
+ id: string;
193
+ name: string;
194
+ position: PresentationProjectionPosition;
195
+ childOffset: Readonly<{
196
+ left: number;
197
+ top: number;
198
+ }>;
199
+ childExtent: Readonly<{
200
+ width: number;
201
+ height: number;
202
+ }>;
203
+ rotation?: number;
204
+ flipHorizontal?: boolean;
205
+ flipVertical?: boolean;
206
+ children: readonly PresentationProjectionElement[];
207
+ }> & PresentationProjectionElementMetadata;
208
+ export type PresentationProjectionConnector = Readonly<{
209
+ kind: "connector";
210
+ id: string;
211
+ name: string;
212
+ connectorKind: "straight" | "elbow" | "curved";
213
+ position: PresentationProjectionPosition;
214
+ start: Readonly<{
215
+ nodeId: string | null;
216
+ x: number;
217
+ y: number;
218
+ }>;
219
+ end: Readonly<{
220
+ nodeId: string | null;
221
+ x: number;
222
+ y: number;
223
+ }>;
224
+ line?: PresentationProjectionLine;
225
+ }> & PresentationProjectionElementMetadata;
226
+ export type PresentationProjectionElement = PresentationProjectionShape | PresentationProjectionChart | PresentationProjectionImage | PresentationProjectionTable | PresentationProjectionGroup | PresentationProjectionConnector;
227
+ export type PresentationSlideProjection = Readonly<{
228
+ id: string;
229
+ title?: string;
230
+ background?: PresentationProjectionFill;
231
+ elements: readonly PresentationProjectionElement[];
232
+ layout?: Readonly<{
233
+ id: string;
234
+ name: string;
235
+ masterId: string | null;
236
+ background: PresentationProjectionFill;
237
+ }> | null;
238
+ notes?: PresentationProjectionRichText | null;
239
+ }>;
240
+ /** Immutable render/edit projection; the host keeps the canonical deck off the React thread. */
241
+ export type PresentationEditorProjection = Readonly<{
242
+ revision: string | number;
243
+ slideSize: Readonly<{
244
+ width: number;
245
+ height: number;
246
+ }>;
247
+ slides: readonly PresentationSlideProjection[];
248
+ }>;
249
+ export type PresentationProjectionEditorProps = Omit<PresentationEditorProps, "presentation" | "revision" | "onSlideChange" | "onSelectionChange" | "onCommit"> & {
250
+ projection: PresentationEditorProjection;
251
+ commit?: PresentationCommitHandler | undefined;
252
+ onCommandError?: ((error: Error) => void) | undefined;
253
+ onSlideChange?: ((slide: PresentationSlideProjection, index: number) => void) | undefined;
254
+ onSelectionChange?: ((object: PresentationProjectionElement | null, slide: PresentationSlideProjection) => void) | undefined;
255
+ };
256
+ export type PresentationProjectionArtifactSurfaceProps = PresentationProjectionEditorProps & {
257
+ title?: string | undefined;
258
+ subtitle?: ReactNode | undefined;
259
+ actions?: ReactNode | undefined;
260
+ busy?: boolean | undefined;
261
+ };
262
+ export type PresentationEditorProps = {
263
+ presentation: Presentation;
264
+ /** Increment/change after a host applies an out-of-band model mutation. */
265
+ revision?: string | number | undefined;
266
+ activeSlideId?: string | undefined;
267
+ defaultActiveSlideId?: string | undefined;
268
+ selectedObjectId?: string | null | undefined;
269
+ defaultSelectedObjectId?: string | null | undefined;
270
+ zoom?: number | undefined;
271
+ defaultZoom?: number | undefined;
272
+ readOnly?: boolean | undefined;
273
+ className?: string | undefined;
274
+ onSlideChange?: ((slide: Slide, index: number) => void) | undefined;
275
+ onSelectionChange?: ((object: PresentationObject | null, slide: Slide) => void) | undefined;
276
+ onCommit?: PresentationCommitHandler | undefined;
277
+ onCommandError?: ((error: Error) => void) | undefined;
278
+ onZoomChange?: ((zoom: number) => void) | undefined;
279
+ };
280
+ export type PresentationArtifactSurfaceProps = PresentationEditorProps & {
281
+ title?: string | undefined;
282
+ subtitle?: ReactNode | undefined;
283
+ actions?: ReactNode | undefined;
284
+ busy?: boolean | undefined;
285
+ };
286
+ /** Compatibility adapter for the public authoring model. */
287
+ export declare function PresentationEditor(props: PresentationEditorProps): import("react").JSX.Element;
288
+ /**
289
+ * Projection-first editor. It creates only a disposable render view; all
290
+ * durable mutations leave through the async command port.
291
+ */
292
+ export declare function PresentationProjectionEditor({ projection, commit, onCommandError, onSlideChange, onSelectionChange, readOnly, ...props }: PresentationProjectionEditorProps): import("react").JSX.Element;
293
+ /** Artifact chrome plus the editor, for drop-in SDK embedding. */
294
+ export declare function PresentationArtifactSurface({ presentation, title, subtitle, actions, busy, className, ...editorProps }: PresentationArtifactSurfaceProps): import("react").JSX.Element;
295
+ /** Artifact chrome over the projection-first editor. */
296
+ export declare function PresentationProjectionArtifactSurface({ projection, title, subtitle, actions, busy, className, ...editorProps }: PresentationProjectionArtifactSurfaceProps): import("react").JSX.Element;
297
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { CSSProperties } from "react";
2
+ export declare const PUBLISHED_HTML_ARTIFACT_IFRAME_SANDBOX: string;
3
+ export type PublishedHtmlArtifactFrameProps = {
4
+ html: string;
5
+ title: string;
6
+ className?: string;
7
+ style?: CSSProperties;
8
+ };
9
+ /**
10
+ * Render exact published HTML in an opaque-origin iframe. Artifact scripts,
11
+ * external resources, forms, popups, and downloads work without granting
12
+ * parent-origin authority, shared cookies/storage, or top-level navigation.
13
+ */
14
+ export declare function PublishedHtmlArtifactFrame(props: PublishedHtmlArtifactFrameProps): import("react").JSX.Element;
@@ -0,0 +1,120 @@
1
+ export type SpreadsheetCanvasCellFormat = {
2
+ fill?: string | undefined;
3
+ font?: {
4
+ name?: string | undefined;
5
+ size?: number | undefined;
6
+ bold?: boolean | undefined;
7
+ italic?: boolean | undefined;
8
+ underline?: boolean | undefined;
9
+ color?: string | undefined;
10
+ } | undefined;
11
+ horizontalAlignment?: "left" | "center" | "right" | "justify" | undefined;
12
+ verticalAlignment?: "top" | "center" | "bottom" | undefined;
13
+ wrapText?: boolean | undefined;
14
+ };
15
+ /** One sparse, already-authorized cell projected into the renderer. */
16
+ export type SpreadsheetCanvasCell = {
17
+ row: number;
18
+ col: number;
19
+ value: unknown;
20
+ formula?: string | null | undefined;
21
+ format: SpreadsheetCanvasCellFormat;
22
+ };
23
+ export type SpreadsheetCanvasCoverage = {
24
+ rowStart: number;
25
+ rowEnd: number;
26
+ columnStart: number;
27
+ columnEnd: number;
28
+ };
29
+ /**
30
+ * A bounded value projection. `coverage` is end-exclusive; omitting it means
31
+ * the source can answer for the entire sheet. A session-backed adapter can
32
+ * replace this object as viewport subscriptions advance without making the
33
+ * React layer or renderer own the canonical workbook model.
34
+ */
35
+ export type SpreadsheetCanvasProjection = {
36
+ sheetId: string;
37
+ generationId: string | null;
38
+ revision: string | number;
39
+ coverage?: SpreadsheetCanvasCoverage | undefined;
40
+ cells: SpreadsheetCanvasCellSource;
41
+ valueAt: (cell: SpreadsheetCanvasCell) => unknown;
42
+ };
43
+ export type SpreadsheetCanvasCellSource = {
44
+ forEachInRange: (rowStart: number, rowEnd: number, columnStart: number, columnEnd: number, visit: (cell: SpreadsheetCanvasCell) => void) => void;
45
+ };
46
+ export type SpreadsheetCanvasAxis = {
47
+ count: number;
48
+ total: number;
49
+ offsetAt: (index: number) => number;
50
+ sizeAt: (index: number) => number;
51
+ indexAtOffset: (offset: number) => number;
52
+ };
53
+ export type SpreadsheetCanvasSelection = {
54
+ top: number;
55
+ bottom: number;
56
+ left: number;
57
+ right: number;
58
+ focusRow: number;
59
+ focusColumn: number;
60
+ };
61
+ export type SpreadsheetCanvasTheme = {
62
+ background: string;
63
+ headerBackground: string;
64
+ border: string;
65
+ foreground: string;
66
+ mutedForeground: string;
67
+ accent: string;
68
+ error: string;
69
+ fontFamily: string;
70
+ fontSize: number;
71
+ headerFontSize: number;
72
+ signature: string;
73
+ };
74
+ export type SpreadsheetCanvasPaint = {
75
+ canvas: HTMLCanvasElement;
76
+ projection: SpreadsheetCanvasProjection;
77
+ rows: SpreadsheetCanvasAxis;
78
+ columns: SpreadsheetCanvasAxis;
79
+ selection: SpreadsheetCanvasSelection;
80
+ logicalScrollLeft: number;
81
+ logicalScrollTop: number;
82
+ viewportWidth: number;
83
+ viewportHeight: number;
84
+ rowHeaderWidth: number;
85
+ columnHeaderHeight: number;
86
+ dimensionRevision: string | number;
87
+ devicePixelRatio: number;
88
+ theme: SpreadsheetCanvasTheme;
89
+ };
90
+ export type SpreadsheetCanvasPaintStats = {
91
+ cacheSize: number;
92
+ paintedTiles: number;
93
+ reusedTiles: number;
94
+ uncachedTiles: number;
95
+ devicePixelRatio: number;
96
+ };
97
+ /**
98
+ * A row-major sparse index over stored worksheet cells. Empty cells never enter
99
+ * this structure, so a tile query costs O(log k + v), where v is the number of
100
+ * stored cells intersecting that tile.
101
+ */
102
+ export declare class SparseSpreadsheetCellIndex {
103
+ readonly size: number;
104
+ private readonly rows;
105
+ constructor(entries: Iterable<SpreadsheetCanvasCell>);
106
+ forEachInRange(rowStart: number, rowEnd: number, columnStart: number, columnEnd: number, visit: (cell: SpreadsheetCanvasCell) => void): void;
107
+ }
108
+ export declare function spreadsheetCanvasDevicePixelRatio(value: number): number;
109
+ /** Caps backing-store allocation while retaining the full CSS viewport. */
110
+ export declare function spreadsheetCanvasBackingScale(width: number, height: number, devicePixelRatio: number): number;
111
+ /** Retained 2D tile renderer. Dynamic selection and headers are painted above cached body tiles. */
112
+ export declare class SpreadsheetCanvasRenderer {
113
+ private readonly tiles;
114
+ private generation;
115
+ private clock;
116
+ dispose(): void;
117
+ paint(input: SpreadsheetCanvasPaint): SpreadsheetCanvasPaintStats | null;
118
+ private paintTile;
119
+ private evictTiles;
120
+ }
@@ -0,0 +1,113 @@
1
+ import type { Workbook, Worksheet } from "@opengeni/artifact-tool/reference";
2
+ import { type ReactNode } from "react";
3
+ import { type SpreadsheetCanvasCellFormat, type SpreadsheetCanvasProjection } from "./spreadsheet-canvas.js";
4
+ type CellCoordinate = {
5
+ row: number;
6
+ col: number;
7
+ };
8
+ export type SpreadsheetSelection = {
9
+ sheetId: string;
10
+ anchor: CellCoordinate;
11
+ focus: CellCoordinate;
12
+ };
13
+ export type SpreadsheetCommit = {
14
+ sheetId: string;
15
+ cell: CellCoordinate;
16
+ input: string;
17
+ kind: "formula" | "value";
18
+ };
19
+ /** Row-major rectangular input submitted as one durable spreadsheet command. */
20
+ export type SpreadsheetRangeCommit = {
21
+ sheetId: string;
22
+ anchor: CellCoordinate;
23
+ rows: number;
24
+ columns: number;
25
+ inputs: readonly string[];
26
+ };
27
+ /** End-exclusive logical windows emitted at most once per animation frame. */
28
+ export type SpreadsheetViewport = {
29
+ sheetId: string;
30
+ rowStart: number;
31
+ rowEnd: number;
32
+ columnStart: number;
33
+ columnEnd: number;
34
+ overscanRowStart: number;
35
+ overscanRowEnd: number;
36
+ overscanColumnStart: number;
37
+ overscanColumnEnd: number;
38
+ logicalScrollLeft: number;
39
+ logicalScrollTop: number;
40
+ viewportWidth: number;
41
+ viewportHeight: number;
42
+ };
43
+ export type SpreadsheetGridProps = {
44
+ workbook: Workbook;
45
+ worksheet: Worksheet;
46
+ readOnly?: boolean | undefined;
47
+ /** Addressable rows in the interactive projection. Grows to include used data. */
48
+ rowCount?: number | undefined;
49
+ /** Addressable columns in the interactive projection. Grows to include used data. */
50
+ columnCount?: number | undefined;
51
+ overscanRows?: number | undefined;
52
+ overscanColumns?: number | undefined;
53
+ onSelectionChange?: ((selection: SpreadsheetSelection) => void) | undefined;
54
+ onCommit?: ((commit: SpreadsheetCommit) => void) | undefined;
55
+ onViewportChange?: ((viewport: SpreadsheetViewport) => void) | undefined;
56
+ className?: string | undefined;
57
+ };
58
+ export type SpreadsheetProjectionCell = {
59
+ value: unknown;
60
+ input: string;
61
+ format: SpreadsheetCanvasCellFormat;
62
+ };
63
+ /**
64
+ * Synchronous, bounded view state consumed by the React editor. Durable model
65
+ * ownership stays with the caller (legacy Workbook, SDK Worker, or another
66
+ * projection adapter); edits return through `commit` / `clear` ports.
67
+ */
68
+ export type SpreadsheetGridProjection = SpreadsheetCanvasProjection & {
69
+ sheetName: string;
70
+ rowCount: number;
71
+ columnCount: number;
72
+ defaultRowHeight?: number | undefined;
73
+ defaultColumnWidth?: number | undefined;
74
+ rowHeights?: readonly (readonly [number, number])[] | undefined;
75
+ columnWidths?: readonly (readonly [number, number])[] | undefined;
76
+ dimensionRevision?: string | number | undefined;
77
+ usedRange?: {
78
+ row: number;
79
+ col: number;
80
+ rowCount: number;
81
+ colCount: number;
82
+ } | null | undefined;
83
+ readCell: (row: number, column: number) => SpreadsheetProjectionCell | null;
84
+ };
85
+ export type SpreadsheetProjectionGridProps = {
86
+ projection: SpreadsheetGridProjection;
87
+ readOnly?: boolean | undefined;
88
+ overscanRows?: number | undefined;
89
+ overscanColumns?: number | undefined;
90
+ onSelectionChange?: ((selection: SpreadsheetSelection) => void) | undefined;
91
+ commit?: ((commit: SpreadsheetCommit) => void | Promise<void>) | undefined;
92
+ commitRange?: ((commit: SpreadsheetRangeCommit) => void | Promise<void>) | undefined;
93
+ clear?: ((selection: SpreadsheetSelection) => void | Promise<void>) | undefined;
94
+ onCommandError?: ((error: Error) => void) | undefined;
95
+ onViewportChange?: ((viewport: SpreadsheetViewport) => void) | undefined;
96
+ className?: string | undefined;
97
+ };
98
+ export type SpreadsheetArtifactSurfaceProps = Omit<SpreadsheetGridProps, "worksheet"> & {
99
+ title?: string | undefined;
100
+ subtitle?: ReactNode | undefined;
101
+ actions?: ReactNode | undefined;
102
+ initialSheetId?: string | undefined;
103
+ allowAddSheet?: boolean | undefined;
104
+ };
105
+ /** A reusable workbook shell with first-class sheet switching. */
106
+ export declare function SpreadsheetArtifactSurface({ workbook, title, subtitle, actions, initialSheetId, allowAddSheet, readOnly, ...gridProps }: SpreadsheetArtifactSurfaceProps): import("react").JSX.Element;
107
+ export declare function SpreadsheetGrid({ workbook, worksheet, readOnly, rowCount: requestedRowCount, columnCount: requestedColumnCount, overscanRows, overscanColumns, onSelectionChange, onCommit, onViewportChange, className, }: SpreadsheetGridProps): import("react").JSX.Element;
108
+ /**
109
+ * Two-axis virtualized, accessible spreadsheet projection. The caller owns
110
+ * durable model state; React owns only viewport, selection, and edit state.
111
+ */
112
+ export declare function SpreadsheetProjectionGrid({ projection, readOnly, overscanRows, overscanColumns, onSelectionChange, commit, commitRange, clear, onCommandError, onViewportChange, className, }: SpreadsheetProjectionGridProps): import("react").JSX.Element;
113
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { KeyboardEvent } from "react";
2
+ import { type InteractionHostPlatform } from "../lib/host-platform.js";
3
+ export declare const HUMAN_BROWSER_HOME_URL = "https://www.google.com/";
4
+ /** Apply browser-style omnibox behavior: navigate hosts, search ordinary text. */
5
+ export declare function normalizeBrowserAddress(value: string): string | null;
6
+ /** Translate executable keyboard chords for the BrowserSession action API. */
7
+ export declare function browserKey(event: Pick<KeyboardEvent<HTMLTextAreaElement>, "altKey" | "ctrlKey" | "key" | "metaKey" | "shiftKey">, hostPlatform?: InteractionHostPlatform): string | null;
@@ -0,0 +1,30 @@
1
+ import type { ComputerSession, InteractionPlacement } from "@opengeni/sdk/interaction";
2
+ import { type ReactNode } from "react";
3
+ import { type BrowserFrameWebSocketFactory } from "../hooks/use-browser-frame-stream.js";
4
+ import type { EmbeddedBrowserInteractionClientOverride } from "../session-context.js";
5
+ export type BrowserViewerNotification = {
6
+ kind: "error" | "info";
7
+ message: string;
8
+ };
9
+ export type BrowserViewerProps = EmbeddedBrowserInteractionClientOverride & {
10
+ /** The selected OpenGeni agent/session. Peer BrowserSessions stay discoverable. */
11
+ sessionId: string;
12
+ enabled?: boolean | undefined;
13
+ className?: string | undefined;
14
+ onNotify?: ((notification: BrowserViewerNotification) => void) | undefined;
15
+ /** Tests/demos only. Production uses the browser's native WebSocket. */
16
+ webSocketFactory?: BrowserFrameWebSocketFactory | undefined;
17
+ renderEmpty?: ((create: () => void, creating: boolean) => ReactNode) | undefined;
18
+ /** Optional host capability for placing a human-created headed browser inside
19
+ * an exact ComputerSession. Browser-only embedders still create a headed
20
+ * browser; they simply omit the linked desktop resource. */
21
+ createLinkedComputer?: ((name: string, placement?: InteractionPlacement) => Promise<Pick<ComputerSession, "id" | "placement">>) | undefined;
22
+ /** Navigate to the exact linked ComputerSession; never a lookalike desktop. */
23
+ onOpenComputer?: ((computerSessionId: string) => void) | undefined;
24
+ };
25
+ /**
26
+ * Complete browser-native session surface: workspace discovery, agent relevance,
27
+ * browser/tab switching, live frames, semantic fallback, direct human input,
28
+ * address navigation, diagnostics, and reconnect. Closing it never closes the browser.
29
+ */
30
+ export declare function BrowserViewer({ sessionId, enabled, className, onNotify, webSocketFactory, renderEmpty, createLinkedComputer, onOpenComputer, ...override }: BrowserViewerProps): import("react").JSX.Element | null;
@@ -1,12 +1,12 @@
1
1
  import type { ClientModel, EffectiveSessionControl } from "@opengeni/sdk";
2
2
  import type { ClipboardEvent, ReactNode } from "react";
3
- import type { SlashCommand } from "../commands/types";
4
- import type { ComposerState } from "../hooks/use-composer";
5
- import type { UseFileAttachmentsResult } from "../hooks/use-file-attachments";
6
- import type { SlashCommandContext } from "../hooks/use-slash-commands";
7
- import { OPEN_WORKSTREAM_CONTROL_EVENT } from "../workstream-control-event";
8
- import { type ChatComposerMessages, type ComposerControlLinks, type ResponsiveBasis } from "./composer";
9
- import { type ComposerTranscriptionControlProps } from "./composer-transcription-control";
3
+ import type { SlashCommand } from "../commands/types.js";
4
+ import type { ComposerState } from "../hooks/use-composer.js";
5
+ import type { UseFileAttachmentsResult } from "../hooks/use-file-attachments.js";
6
+ import type { SlashCommandContext } from "../hooks/use-slash-commands.js";
7
+ import { OPEN_WORKSTREAM_CONTROL_EVENT } from "../workstream-control-event.js";
8
+ import { type ChatComposerMessages, type ComposerControlLinks, type ResponsiveBasis } from "./composer.js";
9
+ import { type ComposerTranscriptionControlProps } from "./composer-transcription-control.js";
10
10
  export { OPEN_WORKSTREAM_CONTROL_EVENT };
11
11
  export type ChatComposerProps = {
12
12
  composer: ComposerState;
@@ -64,4 +64,4 @@ export type ChatComposerProps = {
64
64
  * the public controller and compound primitives exported by the composer
65
65
  * subpath, so custom and default layouts share one behavioral implementation.
66
66
  */
67
- export declare function ChatComposer({ composer, responsiveBasis, effectiveControl, queuedAheadCount, canControlWorkspace, controlLinks, placeholder, disabled, autoFocus, hint, controlsLeading, controlsStart, actionsStart, attachButtonClassName, transcription, transcriptionClassName, transcriptionSuppressed, header, onPaste, attachments, models, selectedModel, onSelectModel, className, commands, commandContext, onClearView, messages, }: ChatComposerProps): import("react/jsx-runtime").JSX.Element;
67
+ export declare function ChatComposer({ composer, responsiveBasis, effectiveControl, queuedAheadCount, canControlWorkspace, controlLinks, placeholder, disabled, autoFocus, hint, controlsLeading, controlsStart, actionsStart, attachButtonClassName, transcription, transcriptionClassName, transcriptionSuppressed, header, onPaste, attachments, models, selectedModel, onSelectModel, className, commands, commandContext, onClearView, messages, }: ChatComposerProps): import("react").JSX.Element;
@@ -8,8 +8,13 @@ export type CodeEditorProps = {
8
8
  path: string;
9
9
  /** The decoded text contents to seed the editor with. */
10
10
  initialContents: string;
11
- /** Persist the current buffer. Resolves when the write lands; rejects to surface an error. */
12
- onSave: (contents: string) => Promise<unknown>;
11
+ /**
12
+ * Persist the current buffer against the exact contents it was edited from.
13
+ * The second argument is the immutable compare-and-swap baseline; hosts must
14
+ * not replace it with a newer remote snapshot or concurrent writes can be
15
+ * silently overwritten.
16
+ */
17
+ onSave: (contents: string, expectedContents: string) => Promise<unknown>;
13
18
  /** Explicitly overwrite after a visible expected-content conflict. */
14
19
  onOverwrite?: ((contents: string) => Promise<unknown>) | undefined;
15
20
  /** Re-read the selected file after a visible save conflict. */
@@ -27,6 +32,23 @@ export type CodeEditorProps = {
27
32
  fallback?: ReactNode | undefined;
28
33
  className?: string | undefined;
29
34
  };
35
+ export type EditorBufferState = {
36
+ path: string;
37
+ value: string;
38
+ baseline: string;
39
+ };
40
+ /**
41
+ * Reconcile a remote file snapshot without destroying unsaved local work.
42
+ *
43
+ * A different path is a new document and always resets. For the same path, a
44
+ * clean editor follows the remote snapshot while a dirty editor retains both
45
+ * its local value and the original CAS baseline. The eventual save will then
46
+ * either succeed against that baseline or surface a typed conflict.
47
+ */
48
+ export declare function reconcileEditorBuffer(current: EditorBufferState, incoming: {
49
+ path: string;
50
+ contents: string;
51
+ }): EditorBufferState;
30
52
  /**
31
53
  * The EDITABLE single-file pane: CodeMirror 6 with a per-language grammar chosen
32
54
  * from the filename, og-* themed, with dirty tracking and a save path wired to
@@ -39,5 +61,5 @@ export type CodeEditorProps = {
39
61
  * `readOnly` suppresses every mutation path so a truncated/binary file can never
40
62
  * be saved back (which would corrupt it by writing the truncated prefix).
41
63
  */
42
- export declare function CodeEditor({ path, initialContents, onSave, onOverwrite, onReload, onEditIntent, readOnly, themeType, loading, fallback, className, }: CodeEditorProps): import("react/jsx-runtime").JSX.Element;
64
+ export declare function CodeEditor({ path, initialContents, onSave, onOverwrite, onReload, onEditIntent, readOnly, themeType, loading, fallback, className, }: CodeEditorProps): import("react").JSX.Element;
43
65
  export {};
@@ -1,4 +1,4 @@
1
- import type { SlashCommand } from "../commands/types";
1
+ import type { SlashCommand } from "../commands/types.js";
2
2
  export type CommandPaletteProps = {
3
3
  open: boolean;
4
4
  items: SlashCommand[];
@@ -22,4 +22,4 @@ export type CommandPaletteProps = {
22
22
  * the opengeni#46 design tokens. Full keyboard nav lives in useSlashCommands;
23
23
  * this component is presentational + aria.
24
24
  */
25
- export declare function CommandPalette({ open, items, highlight, onHighlight, onRun, argHintText, listboxId, label, dangerLabel, }: CommandPaletteProps): import("react/jsx-runtime").JSX.Element;
25
+ export declare function CommandPalette({ open, items, highlight, onHighlight, onRun, argHintText, listboxId, label, dangerLabel, }: CommandPaletteProps): import("react").JSX.Element;