@opengeni/react 4.2.1-canary.39642758903001 → 4.3.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 (693) hide show
  1. package/dist/app/app-state.js +27 -27
  2. package/dist/app/components/Composer.js +27 -26
  3. package/dist/app/components/agent/agent-capability-picker.js +5 -5
  4. package/dist/app/components/artifacts/artifact-library.js +19 -19
  5. package/dist/app/components/artifacts/chat-interactive-block.js +16 -16
  6. package/dist/app/components/artifacts/inline-chat-image.js +31 -30
  7. package/dist/app/components/artifacts/retained-file-preview.js +35 -34
  8. package/dist/app/components/artifacts/retained-text-preview.js +5 -5
  9. package/dist/app/components/artifacts/site-audience.js +5 -5
  10. package/dist/app/components/artifacts/site-conversations.js +24 -22
  11. package/dist/app/components/artifacts/site-data.js +20 -20
  12. package/dist/app/components/artifacts/site-publishing.js +39 -39
  13. package/dist/app/components/artifacts/site-settings.js +48 -48
  14. package/dist/app/components/billing-class-mark.js +5 -5
  15. package/dist/app/components/capabilities/capability-detail-sheet.js +9 -9
  16. package/dist/app/components/capabilities/capability-logo-source.js +13 -12
  17. package/dist/app/components/capabilities/connection-account-picker.js +2 -2
  18. package/dist/app/components/capabilities/connector-tool-permissions.js +5 -5
  19. package/dist/app/components/capabilities/native-connect-setup.js +14 -13
  20. package/dist/app/components/capabilities/native-connect-setup.js.map +1 -1
  21. package/dist/app/components/capabilities/perform-capability-action.js +3 -3
  22. package/dist/app/components/capabilities/prepared-mcp-setup-card.js +15 -14
  23. package/dist/app/components/capabilities/session-capability-card.js +78 -77
  24. package/dist/app/components/capabilities/session-capability-card.js.map +1 -1
  25. package/dist/app/components/capabilities/session-custom-mcp-card.js +20 -19
  26. package/dist/app/components/capabilities/session-github-card.js +25 -24
  27. package/dist/app/components/capabilities/session-machine-card.js +38 -38
  28. package/dist/app/components/capabilities/use-capabilities-catalog.js +3 -3
  29. package/dist/app/components/capabilities/use-connection-accounts.js +1 -1
  30. package/dist/app/components/command-menu/chat-switcher.d.ts +12 -0
  31. package/dist/app/components/command-menu/chat-switcher.js +142 -0
  32. package/dist/app/components/command-menu/chat-switcher.js.map +1 -0
  33. package/dist/app/components/command-menu/command-menu.d.ts +15 -0
  34. package/dist/app/components/command-menu/command-menu.js +812 -0
  35. package/dist/app/components/command-menu/command-menu.js.map +1 -0
  36. package/dist/app/components/command-menu/keycaps.d.ts +21 -0
  37. package/dist/app/components/command-menu/keycaps.js +12 -0
  38. package/dist/app/components/command-menu/shortcut-sheet.d.ts +12 -0
  39. package/dist/app/components/command-menu/shortcut-sheet.js +150 -0
  40. package/dist/app/components/command-menu/shortcut-sheet.js.map +1 -0
  41. package/dist/app/components/composer-capabilities-menu-body.js +3 -3
  42. package/dist/app/components/composer-mobile-plus-panel.js +21 -21
  43. package/dist/app/components/composer-mobile-plus.js +3 -3
  44. package/dist/app/components/credit-required-gate.js +1 -1
  45. package/dist/app/components/credit-required-prompt.js +16 -16
  46. package/dist/app/components/credits/coupon-redeem.js +2 -2
  47. package/dist/app/components/credits/credit-refusal-notice.d.ts +18 -0
  48. package/dist/app/components/credits/credit-refusal-notice.js +17 -0
  49. package/dist/app/components/cross-slot-deep-link-recovery.js +1 -1
  50. package/dist/app/components/desktop/app-shots.js +6 -6
  51. package/dist/app/components/desktop/this-computer.js +4 -4
  52. package/dist/app/components/feedback.js +5 -5
  53. package/dist/app/components/follow-up-repository-menu-body.js +7 -7
  54. package/dist/app/components/follow-up-repository-picker.js +3 -3
  55. package/dist/app/components/github-app-connect-launcher.js +1 -1
  56. package/dist/app/components/knowledge/agent-learning-settings.js +6 -6
  57. package/dist/app/components/machines/connect-machine-dialog.js +18 -18
  58. package/dist/app/components/manual-repository-editor.js +2 -2
  59. package/dist/app/components/markdown.js +10 -9
  60. package/dist/app/components/message-context-pills.js +2 -2
  61. package/dist/app/components/models/models-ui.js +10 -10
  62. package/dist/app/components/pickers.js +10 -10
  63. package/dist/app/components/rail/rail-context.d.ts +6 -0
  64. package/dist/app/components/rail/rail-context.js +3 -3
  65. package/dist/app/components/rail/rail-sections.js +61 -55
  66. package/dist/app/components/rail/session-browse-order-controls.js +2 -2
  67. package/dist/app/components/rail/session-header.js +50 -36
  68. package/dist/app/components/rail/session-list.js +59 -52
  69. package/dist/app/components/rail/session-row-hover-details.js +25 -23
  70. package/dist/app/components/rail/session-shell.js +96 -91
  71. package/dist/app/components/repository-picker.js +7 -7
  72. package/dist/app/components/secrets/session-secrets-panel.js +4 -4
  73. package/dist/app/components/session/agent-configuration-panel.js +34 -34
  74. package/dist/app/components/session/banners.js +12 -11
  75. package/dist/app/components/session/codex-account-indicator.js +12 -12
  76. package/dist/app/components/session/composer-menu-radio.js +2 -2
  77. package/dist/app/components/session/conversation-find.js +1 -1
  78. package/dist/app/components/session/editable-artifacts-workspace.js +45 -45
  79. package/dist/app/components/session/failed-session-banner.js +12 -12
  80. package/dist/app/components/session/human-input.js +48 -47
  81. package/dist/app/components/session/inspector.js +80 -79
  82. package/dist/app/components/session/inspector.js.map +1 -1
  83. package/dist/app/components/session/message-actions.js +5 -5
  84. package/dist/app/components/session/message-resource-attachments.js +21 -20
  85. package/dist/app/components/session/message-resource-attachments.js.map +1 -1
  86. package/dist/app/components/session/model-account-indicator.js +11 -11
  87. package/dist/app/components/session/model-context-inspector.js +2 -2
  88. package/dist/app/components/session/model-recovery-notice.js +3 -3
  89. package/dist/app/components/session/new-session-settings-menu.js +13 -13
  90. package/dist/app/components/session/sandbox-switcher.js +16 -16
  91. package/dist/app/components/session/sandbox-workspace.js +68 -67
  92. package/dist/app/components/session/search-markdown-highlight.js +11 -10
  93. package/dist/app/components/session/search-results-view.js +12 -11
  94. package/dist/app/components/session/session-admin-access.js +11 -11
  95. package/dist/app/components/session/session-retention.js +4 -4
  96. package/dist/app/components/session/session-search-dialog.d.ts +5 -0
  97. package/dist/app/components/session/session-search-dialog.js +22 -12
  98. package/dist/app/components/session/session-search-dialog.js.map +1 -1
  99. package/dist/app/components/session/session-skill-reviews.js +3 -3
  100. package/dist/app/components/session/session-tenancy-control.js +25 -25
  101. package/dist/app/components/session/session-usage-limit-section.js +9 -9
  102. package/dist/app/components/session/session-wait-status.js +11 -9
  103. package/dist/app/components/session/session-wait-status.js.map +1 -1
  104. package/dist/app/components/session/subagents.js +17 -15
  105. package/dist/app/components/session/subscription-account-menu.js +2 -2
  106. package/dist/app/components/session-connectors-menu-body.js +6 -6
  107. package/dist/app/components/settings/row-select.js +1 -1
  108. package/dist/app/components/transcription-settings.js +2 -2
  109. package/dist/app/components/ui/destructive-confirm.js +8 -8
  110. package/dist/app/components/usage/usage-entry.js +6 -6
  111. package/dist/app/components/workspace-composer-plus.js +22 -21
  112. package/dist/app/embed/session-app.js +264 -258
  113. package/dist/app/lib/actions/actions-provider.d.ts +30 -0
  114. package/dist/app/lib/actions/actions-provider.js +32 -0
  115. package/dist/app/lib/actions/chat-directory.d.ts +30 -0
  116. package/dist/app/lib/actions/chat-operations.d.ts +11 -0
  117. package/dist/app/lib/actions/chat-switcher.d.ts +31 -0
  118. package/dist/app/lib/actions/chords.d.ts +40 -0
  119. package/dist/app/lib/actions/events.d.ts +6 -0
  120. package/dist/app/lib/actions/rank.d.ts +17 -0
  121. package/dist/app/lib/actions/registry.d.ts +71 -0
  122. package/dist/app/lib/codex-usage-query.js +3 -3
  123. package/dist/app/lib/composer-connectors.js +14 -13
  124. package/dist/app/lib/console-text.js +2 -2
  125. package/dist/app/lib/credit-coverage.d.ts +21 -0
  126. package/dist/app/lib/credit-coverage.js +15 -0
  127. package/dist/app/lib/deployment-free-model.js +2 -2
  128. package/dist/app/lib/events.js +19 -18
  129. package/dist/app/lib/failed-session-copy.js +5 -5
  130. package/dist/app/lib/free-credit-gap.d.ts +9 -0
  131. package/dist/app/lib/free-credit-gap.js +4 -2
  132. package/dist/app/lib/integration-connect-analytics.d.ts +1 -1
  133. package/dist/app/lib/integration-connect-analytics.js +1 -1
  134. package/dist/app/lib/integration-connect-redirect.js +1 -1
  135. package/dist/app/lib/model-access-onboarding.js +4 -4
  136. package/dist/app/lib/model-policy.js +1 -1
  137. package/dist/app/lib/models-route.d.ts +6 -2
  138. package/dist/app/lib/models-route.js +6 -3
  139. package/dist/app/lib/models-route.js.map +1 -1
  140. package/dist/app/lib/move-chat-to-machine.js +3 -3
  141. package/dist/app/lib/session-branch-cache.js +15 -13
  142. package/dist/app/lib/session-create.js +2 -2
  143. package/dist/app/lib/session-group-pagination.js +15 -13
  144. package/dist/app/lib/session-hover-facts.js +16 -14
  145. package/dist/app/lib/session-model.js +3 -3
  146. package/dist/app/lib/session-rail.js +11 -9
  147. package/dist/app/lib/session-rename.js +3 -3
  148. package/dist/app/lib/session-search-route.d.ts +1 -1
  149. package/dist/app/lib/session-search-route.js +1 -1
  150. package/dist/app/lib/session-ui-features.d.ts +11 -3
  151. package/dist/app/lib/session-ui-features.js +1 -1
  152. package/dist/app/lib/sessions-group.js +15 -13
  153. package/dist/app/lib/turn-failure-analytics.js +7 -7
  154. package/dist/app/lib/unavailable-session-model.js +2 -2
  155. package/dist/app/lib/use-duplicate-site.js +2 -2
  156. package/dist/app/lib/use-follow-up-repositories.js +3 -3
  157. package/dist/app/lib/use-workspace-machines.js +8 -8
  158. package/dist/app/lib/use-workspace-model-catalog.js +6 -6
  159. package/dist/app/lib/use-workspace-rigs.js +4 -4
  160. package/dist/app/lib/workspace-navigation-preference.js +5 -5
  161. package/dist/app/lib/workspace-scope-context.js +4 -4
  162. package/dist/app/routes/artifacts.js +124 -122
  163. package/dist/app/routes/artifacts.js.map +1 -1
  164. package/dist/app/routes/retained-artifact.js +69 -68
  165. package/dist/app/routes/retained-artifact.js.map +1 -1
  166. package/dist/app/routes/session-unavailable.js +3 -3
  167. package/dist/app/routes/session.js +168 -166
  168. package/dist/app/routes/sessions-index-hydration.js +3 -3
  169. package/dist/app/routes/sessions-index.js +122 -116
  170. package/dist/artifacts-document.js +4 -4
  171. package/dist/artifacts-presentation.js +4 -4
  172. package/dist/artifacts-spreadsheet.js +4 -4
  173. package/dist/artifacts.js +39 -39
  174. package/dist/{browser-viewer-ZRFZX3VN.js → browser-viewer-HPUMK7UP.js} +7 -7
  175. package/dist/{chat-interactive-block-HUMYWVCK.js → chat-interactive-block-22PPECCT.js} +6 -6
  176. package/dist/{chunk-GVIQ7H62.js → chunk-2LUBBDZV.js} +5 -5
  177. package/dist/{chunk-SWWYYGQO.js → chunk-325C2TCI.js} +5 -2
  178. package/dist/chunk-325C2TCI.js.map +1 -0
  179. package/dist/{chunk-XMMVIY7B.js → chunk-3CCJWHQY.js} +2 -2
  180. package/dist/{chunk-XS2FZ6DX.js → chunk-3F5ZPIWI.js} +2 -2
  181. package/dist/{chunk-72US6QNB.js → chunk-3J2YZRY5.js} +2 -2
  182. package/dist/{chunk-D4YQF4E3.js → chunk-3SMJ2BIQ.js} +2 -2
  183. package/dist/{chunk-TBJINQXA.js → chunk-3WCYK36X.js} +17 -17
  184. package/dist/{chunk-WPCF34V6.js → chunk-3WG3CRL7.js} +14 -14
  185. package/dist/{chunk-JI5BYQKO.js → chunk-3X46PNBX.js} +14 -14
  186. package/dist/{chunk-UO36FC3S.js → chunk-46I7MMAL.js} +6 -2
  187. package/dist/chunk-46I7MMAL.js.map +1 -0
  188. package/dist/{chunk-PBK44WJC.js → chunk-4GJ37O6G.js} +2 -2
  189. package/dist/chunk-4IWBQUQU.js +152 -0
  190. package/dist/chunk-4IWBQUQU.js.map +1 -0
  191. package/dist/{chunk-LEXPBQ56.js → chunk-4SKJX3C4.js} +6 -6
  192. package/dist/{chunk-ZA6YD2LW.js → chunk-57SYK776.js} +2 -2
  193. package/dist/{chunk-22LBKJDE.js → chunk-5DIAN5GQ.js} +12 -12
  194. package/dist/{chunk-LJ3TDK2L.js → chunk-5FA455GR.js} +4 -4
  195. package/dist/{chunk-N2BEUKXT.js → chunk-5FBZDEHE.js} +228 -228
  196. package/dist/chunk-5FBZDEHE.js.map +1 -0
  197. package/dist/{chunk-YPR5INHV.js → chunk-5X3E2Z3D.js} +4 -4
  198. package/dist/{chunk-OXNWZTEU.js → chunk-5ZJCL6X4.js} +5 -5
  199. package/dist/{chunk-62OAZ4LO.js → chunk-6C5GQQMC.js} +12 -12
  200. package/dist/{chunk-VGITH57T.js → chunk-6ERTXDZM.js} +4 -4
  201. package/dist/{chunk-ZQ7XQZCF.js → chunk-6FX73Y4I.js} +8 -8
  202. package/dist/{chunk-QZO2KK2F.js → chunk-6P44NG6Y.js} +2 -2
  203. package/dist/{chunk-N2DDJLTM.js → chunk-6T7Y33JA.js} +3 -3
  204. package/dist/{chunk-RBAGC2MJ.js → chunk-75VE5QUS.js} +22 -22
  205. package/dist/{chunk-MRXOGI3O.js → chunk-77CUDSHG.js} +9 -9
  206. package/dist/{chunk-F2GXK2Z6.js → chunk-7G446JFO.js} +431 -348
  207. package/dist/chunk-7G446JFO.js.map +1 -0
  208. package/dist/{chunk-GZ65XQR5.js → chunk-7T7FHSGS.js} +3 -3
  209. package/dist/{chunk-YGAH34CD.js → chunk-A3S26JSP.js} +8 -8
  210. package/dist/{chunk-GYPAO6RS.js → chunk-A664GSDM.js} +8 -8
  211. package/dist/{chunk-JSZSNMDR.js → chunk-ASUYLXKO.js} +2 -2
  212. package/dist/{chunk-RTK7SUPL.js → chunk-AUUJLVA3.js} +7 -7
  213. package/dist/{chunk-OOTBYSCA.js → chunk-BBWKPNJB.js} +5 -5
  214. package/dist/{chunk-BGZIMIUU.js → chunk-BCUYWOQU.js} +2 -2
  215. package/dist/{chunk-EKN4N4LS.js → chunk-BDFMNJZJ.js} +2 -2
  216. package/dist/{chunk-YZKGOWCC.js → chunk-BIDXQAGO.js} +2 -2
  217. package/dist/{chunk-Q2UUANHF.js → chunk-BIKAJ4DY.js} +5 -5
  218. package/dist/{chunk-5IQBF2X3.js → chunk-BJPJ2OUX.js} +3 -3
  219. package/dist/{chunk-EY2EMHZW.js → chunk-BPM2OTYK.js} +8 -8
  220. package/dist/{chunk-MT4TBRQB.js → chunk-BSWS2RUZ.js} +2 -2
  221. package/dist/{chunk-T7YD3VGK.js → chunk-C52MNKXU.js} +12 -12
  222. package/dist/{chunk-THNW33K7.js → chunk-CEUDV4OA.js} +18 -18
  223. package/dist/{chunk-GRLPRM56.js → chunk-CFEFYPNR.js} +8 -2
  224. package/dist/chunk-CFEFYPNR.js.map +1 -0
  225. package/dist/{chunk-LHGIS6SZ.js → chunk-CVK74BH7.js} +2 -2
  226. package/dist/{chunk-DFO2UCYG.js → chunk-CW5I65ZX.js} +11 -11
  227. package/dist/chunk-DKNTQDVL.js +86 -0
  228. package/dist/chunk-DKNTQDVL.js.map +1 -0
  229. package/dist/{chunk-SKRLKQEG.js → chunk-DOSC2HRQ.js} +79 -79
  230. package/dist/{chunk-KVB6XDLP.js → chunk-DPJ2CWVN.js} +2 -2
  231. package/dist/{chunk-4J6V4DH7.js → chunk-DXMRO2MU.js} +3 -3
  232. package/dist/{chunk-42I4O4WQ.js → chunk-EE55IDDR.js} +26 -26
  233. package/dist/{chunk-2RA6XABP.js → chunk-EEERTLFF.js} +12 -12
  234. package/dist/{chunk-PTOTKUKO.js → chunk-EEO744XR.js} +8 -8
  235. package/dist/{chunk-LD3HVI2J.js → chunk-EMFGBAQL.js} +6 -6
  236. package/dist/{chunk-FQGUK4ST.js → chunk-ENPJKVMN.js} +38 -38
  237. package/dist/{chunk-HDHK3SXK.js → chunk-EU6RLHMP.js} +4 -4
  238. package/dist/{chunk-G7VLL3PG.js → chunk-F2YABPRJ.js} +13 -4
  239. package/dist/chunk-F2YABPRJ.js.map +1 -0
  240. package/dist/{chunk-MRUWRQBX.js → chunk-FET6XHGS.js} +2 -2
  241. package/dist/{chunk-M6KUY3YH.js → chunk-FIICQA55.js} +2 -2
  242. package/dist/{chunk-NLWLCYCT.js → chunk-FTZXCPE3.js} +19 -19
  243. package/dist/{chunk-FN2KA3MJ.js → chunk-FUS76DO4.js} +3 -3
  244. package/dist/{chunk-AM4IIPWI.js → chunk-G7N5NPRJ.js} +2 -2
  245. package/dist/{chunk-CCQ7YKOD.js → chunk-GBYZ6653.js} +2 -2
  246. package/dist/{chunk-SOOWLNC5.js → chunk-GJUPLSC5.js} +330 -109
  247. package/dist/chunk-GJUPLSC5.js.map +1 -0
  248. package/dist/{chunk-YKKVIJVX.js → chunk-GQDSC6QZ.js} +5 -5
  249. package/dist/chunk-GQGNRL2L.js +53 -0
  250. package/dist/chunk-GQGNRL2L.js.map +1 -0
  251. package/dist/{chunk-5X6JP75Q.js → chunk-GRSODLVO.js} +4 -4
  252. package/dist/{chunk-73YP3R5X.js → chunk-GSESCQFY.js} +4 -4
  253. package/dist/{chunk-KWB5U3ZT.js → chunk-GWRW4N3T.js} +199 -137
  254. package/dist/chunk-GWRW4N3T.js.map +1 -0
  255. package/dist/{chunk-RTR7RNG4.js → chunk-GYRU4PNM.js} +9 -7
  256. package/dist/{chunk-RTR7RNG4.js.map → chunk-GYRU4PNM.js.map} +1 -1
  257. package/dist/{chunk-MZLEBFUZ.js → chunk-GZD6VBIK.js} +3 -3
  258. package/dist/{chunk-IZR2QRFF.js → chunk-H3HH5AHS.js} +4 -4
  259. package/dist/{chunk-DN3TKURW.js → chunk-H3LIIAGE.js} +4 -54
  260. package/dist/chunk-H3LIIAGE.js.map +1 -0
  261. package/dist/{chunk-NPLEQMNM.js → chunk-H5GWAG4I.js} +7 -5
  262. package/dist/{chunk-NPLEQMNM.js.map → chunk-H5GWAG4I.js.map} +1 -1
  263. package/dist/{chunk-OJPUVUB6.js → chunk-HAOZCLLA.js} +3 -3
  264. package/dist/{chunk-ZBHDGAYL.js → chunk-HEFE4OZJ.js} +2 -2
  265. package/dist/{chunk-WTG34JVA.js → chunk-HI75UTI6.js} +2 -2
  266. package/dist/{chunk-OMBIG3NC.js → chunk-HM633ROV.js} +14 -14
  267. package/dist/{chunk-WDFZWSKD.js → chunk-HRIP4M6H.js} +3 -3
  268. package/dist/{chunk-A2BCW6CQ.js → chunk-HU2DRFFI.js} +3 -3
  269. package/dist/{chunk-PO35PBAB.js → chunk-HVH7FFJH.js} +2 -2
  270. package/dist/{chunk-EG7KNUF7.js → chunk-HYTXTKST.js} +18 -18
  271. package/dist/{chunk-TFHG75A4.js → chunk-I4XMDFUJ.js} +7 -7
  272. package/dist/{chunk-IZHVZZQA.js → chunk-ICAUYWSL.js} +9 -9
  273. package/dist/{chunk-ZSERYHHT.js → chunk-IDMXEPHL.js} +150 -150
  274. package/dist/chunk-IDMXEPHL.js.map +1 -0
  275. package/dist/{chunk-DCLPWYP3.js → chunk-IEVPJ3G6.js} +2 -2
  276. package/dist/{chunk-EVWZHDSF.js → chunk-IKH3VTA4.js} +2 -2
  277. package/dist/{chunk-L5UCO2UV.js → chunk-ILBSBZGC.js} +13 -4
  278. package/dist/chunk-ILBSBZGC.js.map +1 -0
  279. package/dist/{chunk-IO6K6UYJ.js → chunk-IQ64BNAG.js} +4 -2
  280. package/dist/chunk-IQ64BNAG.js.map +1 -0
  281. package/dist/{chunk-TYHLEFD2.js → chunk-IZJNMRIR.js} +9 -9
  282. package/dist/{chunk-D2SR3TEB.js → chunk-J243WGUA.js} +2 -2
  283. package/dist/{chunk-QGSGIYE3.js → chunk-J2C6LB6W.js} +4 -4
  284. package/dist/{chunk-MT6TRTXF.js → chunk-J5MEDX7C.js} +9 -9
  285. package/dist/{chunk-6QHUKBJP.js → chunk-J7SKOO44.js} +2 -2
  286. package/dist/{chunk-W2QK7PYS.js → chunk-JAAST75A.js} +11 -11
  287. package/dist/{chunk-NQCMS4AJ.js → chunk-JQCGPTZ6.js} +9 -9
  288. package/dist/chunk-JRJUSKDY.js +832 -0
  289. package/dist/chunk-JRJUSKDY.js.map +1 -0
  290. package/dist/{chunk-CMUXJHGH.js → chunk-JRSCWQMC.js} +9 -9
  291. package/dist/{chunk-Q4OHNGGB.js → chunk-JRXHSVD5.js} +4 -4
  292. package/dist/{chunk-SD2K5ZN5.js → chunk-JXYLDT6X.js} +4 -4
  293. package/dist/{chunk-S3M5WCZW.js → chunk-KA4LV7G6.js} +35 -50
  294. package/dist/chunk-KA4LV7G6.js.map +1 -0
  295. package/dist/{chunk-IXX6ZOL2.js → chunk-KGTMHEAP.js} +7 -7
  296. package/dist/{chunk-22OBGVEJ.js → chunk-KOXVGPW4.js} +3 -3
  297. package/dist/{chunk-NOZ5CGZE.js → chunk-L5GPPMUB.js} +2 -2
  298. package/dist/{chunk-KIHYJM5F.js → chunk-LXJT4WAW.js} +58 -58
  299. package/dist/{chunk-KIHYJM5F.js.map → chunk-LXJT4WAW.js.map} +1 -1
  300. package/dist/{chunk-4FOOHMTU.js → chunk-LY6727IF.js} +1 -1
  301. package/dist/{chunk-PT7MTXRE.js → chunk-MAOCN7J6.js} +2 -2
  302. package/dist/{chunk-4K2JSJNX.js → chunk-MB5LZVDO.js} +2 -2
  303. package/dist/chunk-MF464AKA.js +139 -0
  304. package/dist/chunk-MF464AKA.js.map +1 -0
  305. package/dist/{chunk-UYSZKDQY.js → chunk-MK54JLE4.js} +1 -1
  306. package/dist/chunk-MK54JLE4.js.map +1 -0
  307. package/dist/{chunk-5LES64PP.js → chunk-MKOQAVOE.js} +21 -21
  308. package/dist/{chunk-BMV2SNYX.js → chunk-MUPWNSEJ.js} +18 -18
  309. package/dist/{chunk-Y5TRG22C.js → chunk-NRXIECWC.js} +2 -2
  310. package/dist/{chunk-GOE7G5JX.js → chunk-NWSAF6P5.js} +2 -2
  311. package/dist/chunk-OB3YGXHQ.js +158 -0
  312. package/dist/chunk-OB3YGXHQ.js.map +1 -0
  313. package/dist/{chunk-DUM363VS.js → chunk-OFZQJNF6.js} +5 -5
  314. package/dist/{chunk-CKN5QPEL.js → chunk-OMF7POEY.js} +2 -2
  315. package/dist/{chunk-MVXKO2BD.js → chunk-OXD6ET34.js} +1 -1
  316. package/dist/{chunk-47JUEVME.js → chunk-PALX6HWV.js} +21 -21
  317. package/dist/{chunk-B6OGSG7I.js → chunk-PE3BLBDT.js} +3 -3
  318. package/dist/{chunk-RVISSNVE.js → chunk-PMZKJOG6.js} +15 -15
  319. package/dist/{chunk-CESAMXWX.js → chunk-PQUTMG3S.js} +2 -2
  320. package/dist/{chunk-7VFCOKPG.js → chunk-PWBGODZU.js} +3 -3
  321. package/dist/{chunk-MOPAXD2H.js → chunk-QCADUTYX.js} +2 -2
  322. package/dist/{chunk-CT5FBO7E.js → chunk-RPOUJI25.js} +1 -1
  323. package/dist/{chunk-VE3FKXJ7.js → chunk-RUSXEE7X.js} +35 -32
  324. package/dist/chunk-RUSXEE7X.js.map +1 -0
  325. package/dist/{chunk-WKHYOS72.js → chunk-RW4GFE56.js} +3 -3
  326. package/dist/{chunk-FH4GO7HO.js → chunk-RYLVVDR7.js} +1 -1
  327. package/dist/{chunk-QZRDCFHI.js → chunk-S66SBBFQ.js} +5 -5
  328. package/dist/{chunk-CQJFIPAH.js → chunk-S7TNV2I7.js} +14 -14
  329. package/dist/{chunk-ZBQSIGGR.js → chunk-SC773IMJ.js} +13 -13
  330. package/dist/{chunk-RZV7SXED.js → chunk-SF3M27AN.js} +37 -12
  331. package/dist/chunk-SF3M27AN.js.map +1 -0
  332. package/dist/{chunk-FBJ2HK7A.js → chunk-SGPJ3YS2.js} +20 -20
  333. package/dist/{chunk-A2EWJQXX.js → chunk-SM5QX6UK.js} +4 -4
  334. package/dist/chunk-SWCLN6JE.js +40 -0
  335. package/dist/chunk-SWCLN6JE.js.map +1 -0
  336. package/dist/{chunk-OS3EQOIS.js → chunk-T4F5TW2X.js} +29 -24
  337. package/dist/chunk-T4F5TW2X.js.map +1 -0
  338. package/dist/{chunk-RKZWCTXV.js → chunk-TAEKDMEF.js} +2 -2
  339. package/dist/{chunk-6AVCAUGL.js → chunk-TASEV25T.js} +3 -3
  340. package/dist/{chunk-3XOISKZC.js → chunk-TLGDPMUX.js} +6 -6
  341. package/dist/{chunk-MOF3XSUM.js → chunk-TREHTIBD.js} +3 -2
  342. package/dist/chunk-TREHTIBD.js.map +1 -0
  343. package/dist/{chunk-HUQHJSPV.js → chunk-TTPXGD5S.js} +68 -33
  344. package/dist/chunk-TTPXGD5S.js.map +1 -0
  345. package/dist/{chunk-NFCYIZHX.js → chunk-TXIIBNCA.js} +7 -3
  346. package/dist/{chunk-NFCYIZHX.js.map → chunk-TXIIBNCA.js.map} +1 -1
  347. package/dist/{chunk-5IUW34PG.js → chunk-TY3QYPJ6.js} +7 -7
  348. package/dist/{chunk-VQFR4EU4.js → chunk-U3JK5VJV.js} +2 -2
  349. package/dist/{chunk-2AWMJO54.js → chunk-U42P3RMZ.js} +5 -5
  350. package/dist/{chunk-2RIUMV7S.js → chunk-UBIJBLUK.js} +234 -234
  351. package/dist/chunk-UBIJBLUK.js.map +1 -0
  352. package/dist/{chunk-GUU75DES.js → chunk-UEJTOPLW.js} +8 -8
  353. package/dist/{chunk-QWCTYLMD.js → chunk-URDONAEJ.js} +240 -204
  354. package/dist/chunk-URDONAEJ.js.map +1 -0
  355. package/dist/{chunk-OZOEWLGR.js → chunk-UT6JAORE.js} +4 -4
  356. package/dist/{chunk-5TELOQA6.js → chunk-UTHPUINA.js} +3 -3
  357. package/dist/{chunk-SOV7DTTU.js → chunk-V6HZ2HJZ.js} +67 -67
  358. package/dist/{chunk-SOV7DTTU.js.map → chunk-V6HZ2HJZ.js.map} +1 -1
  359. package/dist/{chunk-26RQ6JBR.js → chunk-VBVCNH6D.js} +5 -5
  360. package/dist/{chunk-P646DND6.js → chunk-VCMQPCME.js} +2 -2
  361. package/dist/{chunk-LV7FMIMM.js → chunk-VGUHAHHV.js} +2 -2
  362. package/dist/{chunk-GYVXARCY.js → chunk-VIBPFVU4.js} +41 -41
  363. package/dist/{chunk-KHPOKZ6Z.js → chunk-VMAC66JX.js} +6 -6
  364. package/dist/{chunk-SHKRS6I5.js → chunk-VRPNETPK.js} +3 -3
  365. package/dist/{chunk-6U4J6RVS.js → chunk-WCHW4XN7.js} +14 -14
  366. package/dist/{chunk-CJH6QUQJ.js → chunk-WD3UXNJV.js} +3 -3
  367. package/dist/{chunk-H5EVWF6L.js → chunk-WR67FJMX.js} +4 -4
  368. package/dist/{chunk-XLIJ36RG.js → chunk-WRMQ7EX4.js} +5 -5
  369. package/dist/{chunk-VVFWOBAM.js → chunk-WTJUKYB2.js} +15 -16
  370. package/dist/chunk-WTJUKYB2.js.map +1 -0
  371. package/dist/{chunk-7KLCFJ5G.js → chunk-X4PPGXQG.js} +2 -2
  372. package/dist/{chunk-ZE2JTVCQ.js → chunk-X5BMQXFD.js} +11 -11
  373. package/dist/{chunk-OYJY4Y4A.js → chunk-XFNLU7EW.js} +14 -7
  374. package/dist/chunk-XFNLU7EW.js.map +1 -0
  375. package/dist/{chunk-UECU6LZI.js → chunk-XXRBOSWV.js} +3 -3
  376. package/dist/{chunk-SPKAIDWX.js → chunk-XZEFCPBL.js} +2 -2
  377. package/dist/{chunk-EZ5NYRHK.js → chunk-YL6N7QLA.js} +5 -5
  378. package/dist/{chunk-Q2ZJOECN.js → chunk-YMVTIV5L.js} +19 -19
  379. package/dist/chunk-YMVTIV5L.js.map +1 -0
  380. package/dist/{chunk-VAIESMPY.js → chunk-YVBHGMKC.js} +4 -4
  381. package/dist/{chunk-AR62NQXE.js → chunk-Z2S5VQG7.js} +2 -2
  382. package/dist/{chunk-2MXUB3ZO.js → chunk-Z5OGTWMZ.js} +15 -2
  383. package/dist/chunk-Z5OGTWMZ.js.map +1 -0
  384. package/dist/{chunk-7UQJEADK.js → chunk-ZL2O4BYP.js} +2 -2
  385. package/dist/{chunk-FOOITLHR.js → chunk-ZZHBT5WQ.js} +2 -2
  386. package/dist/{chunk-X6VJQJYY.js → chunk-ZZWHKC6A.js} +3 -3
  387. package/dist/components/timeline-annotation-shared.d.ts +1 -9
  388. package/dist/composer-messages.js +2 -2
  389. package/dist/composer.js +15 -15
  390. package/dist/{computer-viewer-D4NHQB5D.js → computer-viewer-S6TE6TN7.js} +8 -8
  391. package/dist/connect.js +12 -11
  392. package/dist/desktop.js +2 -2
  393. package/dist/editor.js +2 -2
  394. package/dist/{embedded-new-voice-X4ZW6SY4.js → embedded-new-voice-ZDZPGX25.js} +8 -8
  395. package/dist/{embedded-voice-4OD6Z3HU.js → embedded-voice-FKCUXSJO.js} +8 -8
  396. package/dist/{fleet-decision-row-5UCJXTDP.js → fleet-decision-row-VCGWYJAV.js} +2 -2
  397. package/dist/hooks/page-wake.d.ts +21 -0
  398. package/dist/hooks/use-session-events.d.ts +1 -0
  399. package/dist/index.js +206 -205
  400. package/dist/interaction.js +9 -9
  401. package/dist/{latest-question-VGVNUGAU.js → latest-question-SINEV4U6.js} +3 -3
  402. package/dist/lib/format.d.ts +3 -2
  403. package/dist/machines.js +6 -6
  404. package/dist/messages/en.d.ts +12 -3
  405. package/dist/messages.js +1 -1
  406. package/dist/model-picker-model.js +2 -2
  407. package/dist/{model-policy-picker-menu-XOPYY6YA.js → model-policy-picker-menu-66JPM3G5.js} +6 -6
  408. package/dist/model-policy-picker-menu-66JPM3G5.js.map +1 -0
  409. package/dist/model-policy.js +1 -1
  410. package/dist/native-previews.js +3 -3
  411. package/dist/{platform-activity-row-56XOVTRA.js → platform-activity-row-LU5WABI2.js} +2 -2
  412. package/dist/{queue-surface-implementation-OZDOBJ6W.js → queue-surface-implementation-Y4OUVS7N.js} +8 -7
  413. package/dist/{queue-surface-implementation-OZDOBJ6W.js.map → queue-surface-implementation-Y4OUVS7N.js.map} +1 -1
  414. package/dist/realtime.js +7 -7
  415. package/dist/{sandbox-files-LJCR437H.js → sandbox-files-NBIVKVCZ.js} +11 -11
  416. package/dist/sandbox-files-NBIVKVCZ.js.map +1 -0
  417. package/dist/session-app.js +266 -260
  418. package/dist/session-list-model.js +3 -3
  419. package/dist/{session-realtime-UISLBZ4A.js → session-realtime-3PALSNMJ.js} +3 -3
  420. package/dist/session-realtime-3PALSNMJ.js.map +1 -0
  421. package/dist/session-realtime.js +2 -2
  422. package/dist/session-ui.js +62 -61
  423. package/dist/session.d.ts +1 -1
  424. package/dist/session.js +17 -17
  425. package/dist/sites.js +2 -2
  426. package/dist/terminal.js +2 -2
  427. package/dist/this-computer.js +3 -3
  428. package/dist/timeline/annotation-model.d.ts +48 -0
  429. package/dist/{timeline-annotation-markers-ACT7XRMW.js → timeline-annotation-markers-6526H2NM.js} +11 -9
  430. package/dist/{timeline-annotation-markers-ACT7XRMW.js.map → timeline-annotation-markers-6526H2NM.js.map} +1 -1
  431. package/dist/{timeline-annotation-selection-2IA7T5VR.js → timeline-annotation-selection-KV5SM6TA.js} +16 -62
  432. package/dist/timeline-annotation-selection-KV5SM6TA.js.map +1 -0
  433. package/dist/{timeline-annotations-dialog-W5B2HMYY.js → timeline-annotations-dialog-7CDHWC7Y.js} +12 -10
  434. package/dist/{timeline-annotations-dialog-W5B2HMYY.js.map → timeline-annotations-dialog-7CDHWC7Y.js.map} +1 -1
  435. package/dist/timeline-model.d.ts +3 -0
  436. package/dist/timeline-model.js +40 -14
  437. package/dist/ui/access-list.js +24 -24
  438. package/dist/ui/choice-cards.js +2 -2
  439. package/dist/ui/composer-menu-action.js +2 -2
  440. package/dist/ui/context-menu.d.ts +3 -1
  441. package/dist/ui/context-menu.js +3 -1
  442. package/dist/ui/detail-page.js +3 -3
  443. package/dist/ui/detail-sheet.js +3 -3
  444. package/dist/ui/diff-view.js +3 -3
  445. package/dist/ui/disclosure.js +5 -5
  446. package/dist/ui/dropdown-menu.js +1 -1
  447. package/dist/ui/flush-form-page.js +5 -5
  448. package/dist/ui/form-dialog.js +4 -4
  449. package/dist/ui/list-row.js +5 -5
  450. package/dist/ui/load-failure.js +3 -3
  451. package/dist/ui/page-actions.js +3 -3
  452. package/dist/ui/revision-history.js +11 -11
  453. package/dist/ui/role-select.js +8 -8
  454. package/dist/ui/segmented-control.js +1 -1
  455. package/dist/ui/settings-nav.js +3 -3
  456. package/dist/ui/toolbar.js +3 -3
  457. package/dist/usage.js +2 -2
  458. package/dist/workbench.js +11 -11
  459. package/package.json +4 -4
  460. package/src/app/app-state.tsx +2 -1
  461. package/src/app/components/command-menu/chat-switcher.tsx +135 -0
  462. package/src/app/components/command-menu/command-menu.tsx +840 -0
  463. package/src/app/components/command-menu/keycaps.tsx +56 -0
  464. package/src/app/components/command-menu/shortcut-sheet.tsx +155 -0
  465. package/src/app/components/credits/credit-refusal-notice.test.tsx +132 -0
  466. package/src/app/components/credits/credit-refusal-notice.tsx +92 -0
  467. package/src/app/components/rail/rail-context.tsx +28 -5
  468. package/src/app/components/rail/rail-sections.tsx +3 -5
  469. package/src/app/components/rail/session-header-mute.test.tsx +23 -1
  470. package/src/app/components/rail/session-header.test.tsx +21 -2
  471. package/src/app/components/rail/session-header.tsx +31 -1
  472. package/src/app/components/rail/session-list.tsx +89 -16
  473. package/src/app/components/rail/session-shell.tsx +0 -14
  474. package/src/app/components/session/session-search-dialog.tsx +12 -1
  475. package/src/app/embed/session-app.tsx +6 -3
  476. package/src/app/lib/actions/actions-provider.tsx +486 -0
  477. package/src/app/lib/actions/actions.test.ts +249 -0
  478. package/src/app/lib/actions/chat-directory.ts +231 -0
  479. package/src/app/lib/actions/chat-operations.ts +145 -0
  480. package/src/app/lib/actions/chat-switcher.ts +62 -0
  481. package/src/app/lib/actions/chords.ts +185 -0
  482. package/src/app/lib/actions/events.ts +10 -0
  483. package/src/app/lib/actions/rank.ts +119 -0
  484. package/src/app/lib/actions/registry.ts +333 -0
  485. package/src/app/lib/credit-coverage.test.ts +83 -0
  486. package/src/app/lib/credit-coverage.tsx +48 -0
  487. package/src/app/lib/free-credit-gap.test.ts +32 -1
  488. package/src/app/lib/free-credit-gap.tsx +32 -2
  489. package/src/app/lib/integration-connect-analytics.test.ts +1 -0
  490. package/src/app/lib/integration-connect-analytics.tsx +4 -0
  491. package/src/app/lib/models-route.test.ts +18 -0
  492. package/src/app/lib/models-route.tsx +26 -4
  493. package/src/app/lib/session-search-route.tsx +6 -1
  494. package/src/app/lib/session-ui-features.tsx +28 -9
  495. package/src/app/routes/session.tsx +74 -16
  496. package/src/app/routes/sessions-index.tsx +83 -4
  497. package/src/components/timeline-annotation-selection.tsx +9 -64
  498. package/src/components/timeline-annotation-shared.ts +9 -57
  499. package/src/hooks/page-wake.ts +80 -0
  500. package/src/hooks/use-session-events.ts +309 -81
  501. package/src/lib/format.ts +3 -2
  502. package/src/messages/en.ts +13 -3
  503. package/src/model-picker-model.ts +3 -0
  504. package/src/model-policy.ts +9 -1
  505. package/src/session.ts +1 -0
  506. package/src/timeline/annotation-model.ts +217 -0
  507. package/src/timeline/projection.ts +27 -21
  508. package/src/timeline-model.ts +14 -0
  509. package/src/ui/context-menu.tsx +16 -0
  510. package/src/ui/dropdown-menu.tsx +4 -1
  511. package/src/ui/segmented-control.tsx +3 -0
  512. package/styles/compiled.css +92 -0
  513. package/dist/app/lib/keyboard-shortcuts.d.ts +0 -51
  514. package/dist/app/lib/keyboard-shortcuts.js +0 -16
  515. package/dist/chunk-2MXUB3ZO.js.map +0 -1
  516. package/dist/chunk-2RIUMV7S.js.map +0 -1
  517. package/dist/chunk-53IXIUYP.js +0 -39
  518. package/dist/chunk-53IXIUYP.js.map +0 -1
  519. package/dist/chunk-DN3TKURW.js.map +0 -1
  520. package/dist/chunk-F2GXK2Z6.js.map +0 -1
  521. package/dist/chunk-G7VLL3PG.js.map +0 -1
  522. package/dist/chunk-GRLPRM56.js.map +0 -1
  523. package/dist/chunk-HUQHJSPV.js.map +0 -1
  524. package/dist/chunk-IO6K6UYJ.js.map +0 -1
  525. package/dist/chunk-KWB5U3ZT.js.map +0 -1
  526. package/dist/chunk-L5UCO2UV.js.map +0 -1
  527. package/dist/chunk-MOF3XSUM.js.map +0 -1
  528. package/dist/chunk-N2BEUKXT.js.map +0 -1
  529. package/dist/chunk-OS3EQOIS.js.map +0 -1
  530. package/dist/chunk-OYJY4Y4A.js.map +0 -1
  531. package/dist/chunk-Q2ZJOECN.js.map +0 -1
  532. package/dist/chunk-QWCTYLMD.js.map +0 -1
  533. package/dist/chunk-RZV7SXED.js.map +0 -1
  534. package/dist/chunk-S3M5WCZW.js.map +0 -1
  535. package/dist/chunk-SOOWLNC5.js.map +0 -1
  536. package/dist/chunk-SWWYYGQO.js.map +0 -1
  537. package/dist/chunk-UO36FC3S.js.map +0 -1
  538. package/dist/chunk-UYSZKDQY.js.map +0 -1
  539. package/dist/chunk-VE3FKXJ7.js.map +0 -1
  540. package/dist/chunk-VVFWOBAM.js.map +0 -1
  541. package/dist/chunk-ZSERYHHT.js.map +0 -1
  542. package/dist/timeline-annotation-selection-2IA7T5VR.js.map +0 -1
  543. package/src/app/lib/keyboard-shortcuts.test.ts +0 -47
  544. package/src/app/lib/keyboard-shortcuts.tsx +0 -58
  545. /package/dist/app/{lib/keyboard-shortcuts.js.map → components/command-menu/keycaps.js.map} +0 -0
  546. /package/dist/{browser-viewer-ZRFZX3VN.js.map → app/components/credits/credit-refusal-notice.js.map} +0 -0
  547. /package/dist/{chat-interactive-block-HUMYWVCK.js.map → app/lib/actions/actions-provider.js.map} +0 -0
  548. /package/dist/{computer-viewer-D4NHQB5D.js.map → app/lib/credit-coverage.js.map} +0 -0
  549. /package/dist/{embedded-new-voice-X4ZW6SY4.js.map → browser-viewer-HPUMK7UP.js.map} +0 -0
  550. /package/dist/{embedded-voice-4OD6Z3HU.js.map → chat-interactive-block-22PPECCT.js.map} +0 -0
  551. /package/dist/{chunk-GVIQ7H62.js.map → chunk-2LUBBDZV.js.map} +0 -0
  552. /package/dist/{chunk-XMMVIY7B.js.map → chunk-3CCJWHQY.js.map} +0 -0
  553. /package/dist/{chunk-XS2FZ6DX.js.map → chunk-3F5ZPIWI.js.map} +0 -0
  554. /package/dist/{chunk-72US6QNB.js.map → chunk-3J2YZRY5.js.map} +0 -0
  555. /package/dist/{chunk-D4YQF4E3.js.map → chunk-3SMJ2BIQ.js.map} +0 -0
  556. /package/dist/{chunk-TBJINQXA.js.map → chunk-3WCYK36X.js.map} +0 -0
  557. /package/dist/{chunk-WPCF34V6.js.map → chunk-3WG3CRL7.js.map} +0 -0
  558. /package/dist/{chunk-JI5BYQKO.js.map → chunk-3X46PNBX.js.map} +0 -0
  559. /package/dist/{chunk-PBK44WJC.js.map → chunk-4GJ37O6G.js.map} +0 -0
  560. /package/dist/{chunk-LEXPBQ56.js.map → chunk-4SKJX3C4.js.map} +0 -0
  561. /package/dist/{chunk-ZA6YD2LW.js.map → chunk-57SYK776.js.map} +0 -0
  562. /package/dist/{chunk-22LBKJDE.js.map → chunk-5DIAN5GQ.js.map} +0 -0
  563. /package/dist/{chunk-LJ3TDK2L.js.map → chunk-5FA455GR.js.map} +0 -0
  564. /package/dist/{chunk-YPR5INHV.js.map → chunk-5X3E2Z3D.js.map} +0 -0
  565. /package/dist/{chunk-OXNWZTEU.js.map → chunk-5ZJCL6X4.js.map} +0 -0
  566. /package/dist/{chunk-62OAZ4LO.js.map → chunk-6C5GQQMC.js.map} +0 -0
  567. /package/dist/{chunk-VGITH57T.js.map → chunk-6ERTXDZM.js.map} +0 -0
  568. /package/dist/{chunk-ZQ7XQZCF.js.map → chunk-6FX73Y4I.js.map} +0 -0
  569. /package/dist/{chunk-QZO2KK2F.js.map → chunk-6P44NG6Y.js.map} +0 -0
  570. /package/dist/{chunk-N2DDJLTM.js.map → chunk-6T7Y33JA.js.map} +0 -0
  571. /package/dist/{chunk-RBAGC2MJ.js.map → chunk-75VE5QUS.js.map} +0 -0
  572. /package/dist/{chunk-MRXOGI3O.js.map → chunk-77CUDSHG.js.map} +0 -0
  573. /package/dist/{chunk-GZ65XQR5.js.map → chunk-7T7FHSGS.js.map} +0 -0
  574. /package/dist/{chunk-YGAH34CD.js.map → chunk-A3S26JSP.js.map} +0 -0
  575. /package/dist/{chunk-GYPAO6RS.js.map → chunk-A664GSDM.js.map} +0 -0
  576. /package/dist/{chunk-JSZSNMDR.js.map → chunk-ASUYLXKO.js.map} +0 -0
  577. /package/dist/{chunk-RTK7SUPL.js.map → chunk-AUUJLVA3.js.map} +0 -0
  578. /package/dist/{chunk-OOTBYSCA.js.map → chunk-BBWKPNJB.js.map} +0 -0
  579. /package/dist/{chunk-BGZIMIUU.js.map → chunk-BCUYWOQU.js.map} +0 -0
  580. /package/dist/{chunk-EKN4N4LS.js.map → chunk-BDFMNJZJ.js.map} +0 -0
  581. /package/dist/{chunk-YZKGOWCC.js.map → chunk-BIDXQAGO.js.map} +0 -0
  582. /package/dist/{chunk-Q2UUANHF.js.map → chunk-BIKAJ4DY.js.map} +0 -0
  583. /package/dist/{chunk-5IQBF2X3.js.map → chunk-BJPJ2OUX.js.map} +0 -0
  584. /package/dist/{chunk-EY2EMHZW.js.map → chunk-BPM2OTYK.js.map} +0 -0
  585. /package/dist/{chunk-MT4TBRQB.js.map → chunk-BSWS2RUZ.js.map} +0 -0
  586. /package/dist/{chunk-T7YD3VGK.js.map → chunk-C52MNKXU.js.map} +0 -0
  587. /package/dist/{chunk-THNW33K7.js.map → chunk-CEUDV4OA.js.map} +0 -0
  588. /package/dist/{chunk-LHGIS6SZ.js.map → chunk-CVK74BH7.js.map} +0 -0
  589. /package/dist/{chunk-DFO2UCYG.js.map → chunk-CW5I65ZX.js.map} +0 -0
  590. /package/dist/{chunk-SKRLKQEG.js.map → chunk-DOSC2HRQ.js.map} +0 -0
  591. /package/dist/{chunk-KVB6XDLP.js.map → chunk-DPJ2CWVN.js.map} +0 -0
  592. /package/dist/{chunk-4J6V4DH7.js.map → chunk-DXMRO2MU.js.map} +0 -0
  593. /package/dist/{chunk-42I4O4WQ.js.map → chunk-EE55IDDR.js.map} +0 -0
  594. /package/dist/{chunk-2RA6XABP.js.map → chunk-EEERTLFF.js.map} +0 -0
  595. /package/dist/{chunk-PTOTKUKO.js.map → chunk-EEO744XR.js.map} +0 -0
  596. /package/dist/{chunk-LD3HVI2J.js.map → chunk-EMFGBAQL.js.map} +0 -0
  597. /package/dist/{chunk-FQGUK4ST.js.map → chunk-ENPJKVMN.js.map} +0 -0
  598. /package/dist/{chunk-HDHK3SXK.js.map → chunk-EU6RLHMP.js.map} +0 -0
  599. /package/dist/{chunk-MRUWRQBX.js.map → chunk-FET6XHGS.js.map} +0 -0
  600. /package/dist/{chunk-M6KUY3YH.js.map → chunk-FIICQA55.js.map} +0 -0
  601. /package/dist/{chunk-NLWLCYCT.js.map → chunk-FTZXCPE3.js.map} +0 -0
  602. /package/dist/{chunk-FN2KA3MJ.js.map → chunk-FUS76DO4.js.map} +0 -0
  603. /package/dist/{chunk-AM4IIPWI.js.map → chunk-G7N5NPRJ.js.map} +0 -0
  604. /package/dist/{chunk-CCQ7YKOD.js.map → chunk-GBYZ6653.js.map} +0 -0
  605. /package/dist/{chunk-YKKVIJVX.js.map → chunk-GQDSC6QZ.js.map} +0 -0
  606. /package/dist/{chunk-5X6JP75Q.js.map → chunk-GRSODLVO.js.map} +0 -0
  607. /package/dist/{chunk-73YP3R5X.js.map → chunk-GSESCQFY.js.map} +0 -0
  608. /package/dist/{chunk-MZLEBFUZ.js.map → chunk-GZD6VBIK.js.map} +0 -0
  609. /package/dist/{chunk-IZR2QRFF.js.map → chunk-H3HH5AHS.js.map} +0 -0
  610. /package/dist/{chunk-OJPUVUB6.js.map → chunk-HAOZCLLA.js.map} +0 -0
  611. /package/dist/{chunk-ZBHDGAYL.js.map → chunk-HEFE4OZJ.js.map} +0 -0
  612. /package/dist/{chunk-WTG34JVA.js.map → chunk-HI75UTI6.js.map} +0 -0
  613. /package/dist/{chunk-OMBIG3NC.js.map → chunk-HM633ROV.js.map} +0 -0
  614. /package/dist/{chunk-WDFZWSKD.js.map → chunk-HRIP4M6H.js.map} +0 -0
  615. /package/dist/{chunk-A2BCW6CQ.js.map → chunk-HU2DRFFI.js.map} +0 -0
  616. /package/dist/{chunk-PO35PBAB.js.map → chunk-HVH7FFJH.js.map} +0 -0
  617. /package/dist/{chunk-EG7KNUF7.js.map → chunk-HYTXTKST.js.map} +0 -0
  618. /package/dist/{chunk-TFHG75A4.js.map → chunk-I4XMDFUJ.js.map} +0 -0
  619. /package/dist/{chunk-IZHVZZQA.js.map → chunk-ICAUYWSL.js.map} +0 -0
  620. /package/dist/{chunk-DCLPWYP3.js.map → chunk-IEVPJ3G6.js.map} +0 -0
  621. /package/dist/{chunk-EVWZHDSF.js.map → chunk-IKH3VTA4.js.map} +0 -0
  622. /package/dist/{chunk-TYHLEFD2.js.map → chunk-IZJNMRIR.js.map} +0 -0
  623. /package/dist/{chunk-D2SR3TEB.js.map → chunk-J243WGUA.js.map} +0 -0
  624. /package/dist/{chunk-QGSGIYE3.js.map → chunk-J2C6LB6W.js.map} +0 -0
  625. /package/dist/{chunk-MT6TRTXF.js.map → chunk-J5MEDX7C.js.map} +0 -0
  626. /package/dist/{chunk-6QHUKBJP.js.map → chunk-J7SKOO44.js.map} +0 -0
  627. /package/dist/{chunk-W2QK7PYS.js.map → chunk-JAAST75A.js.map} +0 -0
  628. /package/dist/{chunk-NQCMS4AJ.js.map → chunk-JQCGPTZ6.js.map} +0 -0
  629. /package/dist/{chunk-CMUXJHGH.js.map → chunk-JRSCWQMC.js.map} +0 -0
  630. /package/dist/{chunk-Q4OHNGGB.js.map → chunk-JRXHSVD5.js.map} +0 -0
  631. /package/dist/{chunk-SD2K5ZN5.js.map → chunk-JXYLDT6X.js.map} +0 -0
  632. /package/dist/{chunk-IXX6ZOL2.js.map → chunk-KGTMHEAP.js.map} +0 -0
  633. /package/dist/{chunk-22OBGVEJ.js.map → chunk-KOXVGPW4.js.map} +0 -0
  634. /package/dist/{chunk-NOZ5CGZE.js.map → chunk-L5GPPMUB.js.map} +0 -0
  635. /package/dist/{chunk-4FOOHMTU.js.map → chunk-LY6727IF.js.map} +0 -0
  636. /package/dist/{chunk-PT7MTXRE.js.map → chunk-MAOCN7J6.js.map} +0 -0
  637. /package/dist/{chunk-4K2JSJNX.js.map → chunk-MB5LZVDO.js.map} +0 -0
  638. /package/dist/{chunk-5LES64PP.js.map → chunk-MKOQAVOE.js.map} +0 -0
  639. /package/dist/{chunk-BMV2SNYX.js.map → chunk-MUPWNSEJ.js.map} +0 -0
  640. /package/dist/{chunk-Y5TRG22C.js.map → chunk-NRXIECWC.js.map} +0 -0
  641. /package/dist/{chunk-GOE7G5JX.js.map → chunk-NWSAF6P5.js.map} +0 -0
  642. /package/dist/{chunk-DUM363VS.js.map → chunk-OFZQJNF6.js.map} +0 -0
  643. /package/dist/{chunk-CKN5QPEL.js.map → chunk-OMF7POEY.js.map} +0 -0
  644. /package/dist/{chunk-MVXKO2BD.js.map → chunk-OXD6ET34.js.map} +0 -0
  645. /package/dist/{chunk-47JUEVME.js.map → chunk-PALX6HWV.js.map} +0 -0
  646. /package/dist/{chunk-B6OGSG7I.js.map → chunk-PE3BLBDT.js.map} +0 -0
  647. /package/dist/{chunk-RVISSNVE.js.map → chunk-PMZKJOG6.js.map} +0 -0
  648. /package/dist/{chunk-CESAMXWX.js.map → chunk-PQUTMG3S.js.map} +0 -0
  649. /package/dist/{chunk-7VFCOKPG.js.map → chunk-PWBGODZU.js.map} +0 -0
  650. /package/dist/{chunk-MOPAXD2H.js.map → chunk-QCADUTYX.js.map} +0 -0
  651. /package/dist/{chunk-CT5FBO7E.js.map → chunk-RPOUJI25.js.map} +0 -0
  652. /package/dist/{chunk-WKHYOS72.js.map → chunk-RW4GFE56.js.map} +0 -0
  653. /package/dist/{chunk-FH4GO7HO.js.map → chunk-RYLVVDR7.js.map} +0 -0
  654. /package/dist/{chunk-QZRDCFHI.js.map → chunk-S66SBBFQ.js.map} +0 -0
  655. /package/dist/{chunk-CQJFIPAH.js.map → chunk-S7TNV2I7.js.map} +0 -0
  656. /package/dist/{chunk-ZBQSIGGR.js.map → chunk-SC773IMJ.js.map} +0 -0
  657. /package/dist/{chunk-FBJ2HK7A.js.map → chunk-SGPJ3YS2.js.map} +0 -0
  658. /package/dist/{chunk-A2EWJQXX.js.map → chunk-SM5QX6UK.js.map} +0 -0
  659. /package/dist/{chunk-RKZWCTXV.js.map → chunk-TAEKDMEF.js.map} +0 -0
  660. /package/dist/{chunk-6AVCAUGL.js.map → chunk-TASEV25T.js.map} +0 -0
  661. /package/dist/{chunk-3XOISKZC.js.map → chunk-TLGDPMUX.js.map} +0 -0
  662. /package/dist/{chunk-5IUW34PG.js.map → chunk-TY3QYPJ6.js.map} +0 -0
  663. /package/dist/{chunk-VQFR4EU4.js.map → chunk-U3JK5VJV.js.map} +0 -0
  664. /package/dist/{chunk-2AWMJO54.js.map → chunk-U42P3RMZ.js.map} +0 -0
  665. /package/dist/{chunk-GUU75DES.js.map → chunk-UEJTOPLW.js.map} +0 -0
  666. /package/dist/{chunk-OZOEWLGR.js.map → chunk-UT6JAORE.js.map} +0 -0
  667. /package/dist/{chunk-5TELOQA6.js.map → chunk-UTHPUINA.js.map} +0 -0
  668. /package/dist/{chunk-26RQ6JBR.js.map → chunk-VBVCNH6D.js.map} +0 -0
  669. /package/dist/{chunk-P646DND6.js.map → chunk-VCMQPCME.js.map} +0 -0
  670. /package/dist/{chunk-LV7FMIMM.js.map → chunk-VGUHAHHV.js.map} +0 -0
  671. /package/dist/{chunk-GYVXARCY.js.map → chunk-VIBPFVU4.js.map} +0 -0
  672. /package/dist/{chunk-KHPOKZ6Z.js.map → chunk-VMAC66JX.js.map} +0 -0
  673. /package/dist/{chunk-SHKRS6I5.js.map → chunk-VRPNETPK.js.map} +0 -0
  674. /package/dist/{chunk-6U4J6RVS.js.map → chunk-WCHW4XN7.js.map} +0 -0
  675. /package/dist/{chunk-CJH6QUQJ.js.map → chunk-WD3UXNJV.js.map} +0 -0
  676. /package/dist/{chunk-H5EVWF6L.js.map → chunk-WR67FJMX.js.map} +0 -0
  677. /package/dist/{chunk-XLIJ36RG.js.map → chunk-WRMQ7EX4.js.map} +0 -0
  678. /package/dist/{chunk-7KLCFJ5G.js.map → chunk-X4PPGXQG.js.map} +0 -0
  679. /package/dist/{chunk-ZE2JTVCQ.js.map → chunk-X5BMQXFD.js.map} +0 -0
  680. /package/dist/{chunk-UECU6LZI.js.map → chunk-XXRBOSWV.js.map} +0 -0
  681. /package/dist/{chunk-SPKAIDWX.js.map → chunk-XZEFCPBL.js.map} +0 -0
  682. /package/dist/{chunk-EZ5NYRHK.js.map → chunk-YL6N7QLA.js.map} +0 -0
  683. /package/dist/{chunk-VAIESMPY.js.map → chunk-YVBHGMKC.js.map} +0 -0
  684. /package/dist/{chunk-AR62NQXE.js.map → chunk-Z2S5VQG7.js.map} +0 -0
  685. /package/dist/{chunk-7UQJEADK.js.map → chunk-ZL2O4BYP.js.map} +0 -0
  686. /package/dist/{chunk-FOOITLHR.js.map → chunk-ZZHBT5WQ.js.map} +0 -0
  687. /package/dist/{chunk-X6VJQJYY.js.map → chunk-ZZWHKC6A.js.map} +0 -0
  688. /package/dist/{model-policy-picker-menu-XOPYY6YA.js.map → computer-viewer-S6TE6TN7.js.map} +0 -0
  689. /package/dist/{sandbox-files-LJCR437H.js.map → embedded-new-voice-ZDZPGX25.js.map} +0 -0
  690. /package/dist/{session-realtime-UISLBZ4A.js.map → embedded-voice-FKCUXSJO.js.map} +0 -0
  691. /package/dist/{fleet-decision-row-5UCJXTDP.js.map → fleet-decision-row-VCGWYJAV.js.map} +0 -0
  692. /package/dist/{latest-question-VGVNUGAU.js.map → latest-question-SINEV4U6.js.map} +0 -0
  693. /package/dist/{platform-activity-row-56XOVTRA.js.map → platform-activity-row-LU5WABI2.js.map} +0 -0
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  isPresentedSessionToolName,
3
+ isRetryableStreamError,
3
4
  isSessionModelResponsePhase,
4
5
  SESSION_EVENT_COMPAT_EXCLUDED_STEP_TYPES,
5
6
  SESSION_EVENT_CONTENT_STEP_TYPES,
@@ -22,6 +23,7 @@ import type { EmbeddedSessionClientLike } from "../client";
22
23
  import { normalizeError } from "../lib/error-message";
23
24
  import { joinSessionDetailRead, sessionDetailReadMark } from "../lib/session-detail-read";
24
25
  import { usePageLiveActivity } from "./internal";
26
+ import { subscribePageWake } from "./page-wake";
25
27
  import { deniesRetainedView, useRetainedSessionView } from "./session-view-cache";
26
28
  import { markTurnlessOutputGap } from "./turnless-output-gaps";
27
29
  import type { LatestQuestionOptions } from "./latest-question";
@@ -130,12 +132,22 @@ const BOUNDARY_PAGE_CAP = 1;
130
132
  // The first window keeps the plain caps, so opening a chat stays one read.
131
133
  const FILTERED_PAGE_CAP = 32;
132
134
  // Rejoining the live tip (first open of a working turn, a return to a hidden
133
- // tab, catching up from history) replays a tiny raw gap over SSE. A larger gap
134
- // catches up the conversation only and reads the working turn's latest steps,
135
- // instead of replaying every step since the last conversation event. Only a
136
- // gap of more than this many pages of conversation reloads the latest window.
135
+ // tab or from a sleep, any stream reconnect, catching up from history)
136
+ // replays a tiny raw gap over SSE. A larger gap catches up the conversation
137
+ // only and reads the working turn's latest steps, instead of replaying every
138
+ // step since the last conversation event. Only a gap of more than this many
139
+ // pages of conversation reloads the latest window.
137
140
  const DIRECT_REPLAY_MAX_SEQUENCES = 16;
138
141
  const CATCHUP_MAX_PAGES = 2;
142
+ // Rejoining the tip after a reconnect or a wake is bounded: an attempt that
143
+ // completes no read for REJOIN_STALL_TIMEOUT_MS is abandoned (a slow but
144
+ // progressing catch-up is never cut short), a transient failure retries (with
145
+ // backoff) only this many times in a row, and after that the stream replays
146
+ // exactly from where the view stands rather than staying stuck "reconnecting".
147
+ const STRICT_REJOIN_ATTEMPTS = 5;
148
+ export const REJOIN_STALL_TIMEOUT_MS = 30_000;
149
+ const FOREGROUND_REJOIN_RETRY_MS = 500;
150
+ const FOREGROUND_REJOIN_RETRY_MAX_MS = 8_000;
139
151
  const EMPTY_EVENTS: SessionEvent[] = [];
140
152
  const encoder = new TextEncoder();
141
153
  // Durable history remains on the server and is available through bounded
@@ -827,52 +839,68 @@ export function useSessionEvents(
827
839
  * append (the caller then loads the latest window).
828
840
  */
829
841
  // The durable head: the conversation's fresh detail read when one started
830
- // since this stream began loading (the session view's own), else a new one.
831
- const readSessionHead = async () => {
832
- const joined = joinSessionDetailRead(client, workspaceId, sessionId, detailReadMark);
842
+ // since `mark` (the session view's own), else a new one.
843
+ const effectScope: RejoinScope = { signal: controller.signal, isCurrent };
844
+ const readSessionHead = async (mark: number, scope: RejoinScope) => {
845
+ const joined = joinSessionDetailRead(client, workspaceId, sessionId, mark);
833
846
  if (joined) {
834
847
  try {
835
848
  return await joined;
836
849
  } catch (cause) {
837
- if (controller.signal.aborted) throw cause;
850
+ if (scope.signal.aborted) throw cause;
838
851
  }
839
852
  }
840
853
  return await client.getSession(workspaceId, sessionId, {
841
854
  fresh: true,
842
- signal: controller.signal,
855
+ signal: scope.signal,
843
856
  });
844
857
  };
845
- const rejoinLive = async (force: boolean): Promise<"joined" | "reload"> => {
858
+ // `strict` (a stream reconnect) fails on a transient read failure, so the
859
+ // stream backs off and retries the whole check instead of replaying a
860
+ // backlog it could not size; any other failed read replays the gap.
861
+ const rejoinLive = async (
862
+ force: boolean,
863
+ {
864
+ strict = false,
865
+ mark = detailReadMark,
866
+ scope = effectScope,
867
+ }: { strict?: boolean; mark?: number; scope?: RejoinScope } = {},
868
+ ): Promise<RejoinOutcome> => {
846
869
  const activeTurn = activeConversationTurn(eventWindowRef.current.events);
847
870
  if (!force && !activeTurn) return "joined";
848
871
  const cursor = streamResumeSequenceRef.current;
849
872
  let head: number;
850
873
  let sessionActiveTurn: string | null = null;
851
874
  try {
852
- const session = await readSessionHead();
875
+ const session = await readSessionHead(mark, scope);
876
+ scope.progress?.();
853
877
  head = session.lastSequence;
854
878
  sessionActiveTurn = session.activeTurnId;
855
879
  } catch (cause) {
856
- if (controller.signal.aborted) throw cause;
880
+ if (!scope.isCurrent() || (strict && isRetryableStreamError(cause))) throw cause;
857
881
  // An optimization read: replay from the exact cursor instead.
858
882
  return "joined";
859
883
  }
860
- if (!isCurrent()) throw abortError();
884
+ if (!scope.isCurrent()) throw abortError();
861
885
  // A head the client does not report is unknown: replay from the cursor.
862
886
  if (!Number.isSafeInteger(head) || head - cursor <= DIRECT_REPLAY_MAX_SEQUENCES) {
863
887
  return "joined";
864
888
  }
865
889
  let catchup: SessionEvent[] | null;
866
890
  try {
867
- catchup = await loadConversationCatchup(client, workspaceId, sessionId, cursor, head, {
868
- signal: controller.signal,
869
- isCurrent,
870
- });
891
+ catchup = await loadConversationCatchup(
892
+ client,
893
+ workspaceId,
894
+ sessionId,
895
+ cursor,
896
+ head,
897
+ scope,
898
+ );
871
899
  } catch (cause) {
872
- if (!isCurrent()) throw cause;
900
+ if (!scope.isCurrent() || (strict && isRetryableStreamError(cause))) throw cause;
873
901
  return "joined";
874
902
  }
875
- if (!isCurrent()) throw abortError();
903
+ if (!scope.isCurrent()) throw abortError();
876
904
  if (catchup === null) return "reload";
877
905
  // Continuity broke: steps of turns still working before the catch-up
878
906
  // may be missing, so those stores go (the working one is re-read).
@@ -889,13 +917,216 @@ export function useSessionEvents(
889
917
  return "joined";
890
918
  };
891
919
 
920
+ // Replace the browser window with the newest conversation window. The
921
+ // previous window stays on screen until the replacement is installed.
922
+ const loadLatestWindow = async (scope: RejoinScope = effectScope): Promise<boolean> => {
923
+ // First paint is ONE compact fetch of the conversation — the newest
924
+ // window, revealed at the bottom in a few hundred ms. Deeper history
925
+ // loads only when the reader scrolls up (the sentinel drives
926
+ // loadOlder); a turn's steps load when the reader opens it.
927
+ const window = await loadEventWindow(t, client, workspaceId, sessionId, {
928
+ before: Number.MAX_SAFE_INTEGER,
929
+ pageSize: SESSION_HISTORY_PAGE_SIZE,
930
+ targetGroups: Number.POSITIVE_INFINITY,
931
+ maxFetches: INITIAL_FETCH_CAP,
932
+ boundaryPageCap: BOUNDARY_PAGE_CAP,
933
+ signal: scope.signal,
934
+ ...(scope.progress ? { progress: scope.progress } : {}),
935
+ filter: CONVERSATION_FILTER,
936
+ });
937
+ if (!scope.isCurrent()) {
938
+ return false;
939
+ }
940
+ const status = observeSessionStatus(window.events, sessionStatusRef);
941
+ const retained = boundBrowserSessionEventWindow(window.events);
942
+ // A replacement tail retires requests against the discarded window.
943
+ // Ordinary SSE reconnects preserve navigation, but splicing an old
944
+ // page into this new tail could leave an inaccessible history gap.
945
+ navigationGenerationRef.current += 1;
946
+ loadingOlderRef.current = false;
947
+ loadingNewerRef.current = false;
948
+ loadingOldestRef.current = false;
949
+ setLoadingOlder(false);
950
+ setLoadingNewer(false);
951
+ setLoadingOldest(false);
952
+ const previous = eventWindowRef.current.events;
953
+ eventWindowRef.current = retained;
954
+ pruneStepStores(retained.events, previous);
955
+ oldestSequenceRef.current =
956
+ retained.events[0]?.sequence ?? window.oldestSequence ?? window.scanCursor;
957
+ newestSequenceRef.current = maxResumeSequenceOrNull(retained.events) ?? window.newestSequence;
958
+ hasOlderRef.current = window.hasOlder || retained.truncated;
959
+ hasNewerRef.current = false;
960
+ lastSequenceRef.current = Math.max(lastSequenceRef.current, window.newestSequence);
961
+ streamResumeSequenceRef.current = window.newestSequence;
962
+ skippedStepsThroughRef.current =
963
+ retained.events.length === 0 && window.newestSequence > 0 ? window.newestSequence : null;
964
+ initialWindowLoadedRef.current = true;
965
+ setInitialHistoryReady(true);
966
+ setError(null);
967
+ if (status !== undefined) {
968
+ setSessionStatusProjection(status);
969
+ }
970
+ setEventWindow(retained);
971
+ setHasOlder(window.hasOlder || retained.truncated);
972
+ setHasNewer(false);
973
+ setInitialLoading(false);
974
+ return true;
975
+ };
976
+
977
+ // The stream starts past what it last delivered: a window load,
978
+ // catch-up, page or jump moved the cursor with conversation reads, which
979
+ // carry no terminal output, so the sandbox terminal reads it again.
980
+ const noteStreamResume = () => {
981
+ if (!fullReplay && streamResumeSequenceRef.current > liveThroughRef.current) {
982
+ markTurnlessOutputGap(workspaceId, sessionId);
983
+ }
984
+ liveThroughRef.current = Math.max(liveThroughRef.current, streamResumeSequenceRef.current);
985
+ };
986
+
987
+ // One bounded rejoin attempt: it is abandoned once no read completes for
988
+ // REJOIN_STALL_TIMEOUT_MS, and a late result is fenced out of the view
989
+ // (reads without a signal can only be outwaited). A `strict` attempt
990
+ // that failed transiently or stalled resolves the cause so the caller
991
+ // retries; a lenient one that stalled resolves "joined", which replays
992
+ // exactly from where the view stands. Read failures are translated where
993
+ // they happen, so anything else is a bug applying the result: it throws
994
+ // rather than passing for a rejoin.
995
+ const boundedRejoin = async (
996
+ strict: boolean,
997
+ join: (scope: RejoinScope) => Promise<RejoinOutcome>,
998
+ ): Promise<RejoinOutcome | { retry: unknown }> => {
999
+ if (!isCurrent()) throw abortError();
1000
+ const attempt = new AbortController();
1001
+ let timedOut = false;
1002
+ const abortAttempt = () => attempt.abort();
1003
+ controller.signal.addEventListener("abort", abortAttempt, { once: true });
1004
+ const stalled = () => {
1005
+ timedOut = true;
1006
+ attempt.abort();
1007
+ };
1008
+ let timer = setTimeout(stalled, REJOIN_STALL_TIMEOUT_MS);
1009
+ let stopWaiting: (() => void) | undefined;
1010
+ const stopped = new Promise<never>((_resolve, reject) => {
1011
+ stopWaiting = () => reject(abortError());
1012
+ attempt.signal.addEventListener("abort", stopWaiting, { once: true });
1013
+ });
1014
+ const scope: RejoinScope = {
1015
+ signal: attempt.signal,
1016
+ isCurrent: () => isCurrent() && !attempt.signal.aborted,
1017
+ progress: () => {
1018
+ if (attempt.signal.aborted) return;
1019
+ clearTimeout(timer);
1020
+ timer = setTimeout(stalled, REJOIN_STALL_TIMEOUT_MS);
1021
+ },
1022
+ };
1023
+ try {
1024
+ return await Promise.race([join(scope), stopped]);
1025
+ } catch (cause) {
1026
+ if (!isCurrent()) throw cause;
1027
+ if (timedOut) {
1028
+ return strict
1029
+ ? {
1030
+ retry: new TypeError(
1031
+ `rejoining the live session stalled for ${REJOIN_STALL_TIMEOUT_MS}ms`,
1032
+ ),
1033
+ }
1034
+ : "joined";
1035
+ }
1036
+ if (strict && isRetryableStreamError(cause)) return { retry: cause };
1037
+ throw cause;
1038
+ } finally {
1039
+ clearTimeout(timer);
1040
+ controller.signal.removeEventListener("abort", abortAttempt);
1041
+ if (stopWaiting) attempt.signal.removeEventListener("abort", stopWaiting);
1042
+ }
1043
+ };
1044
+ // A bounded rejoin whose failure replays exactly (the first open after
1045
+ // a window load, or a return from history: their gaps are short).
1046
+ const leniently = async (
1047
+ join: (scope: RejoinScope) => Promise<RejoinOutcome>,
1048
+ ): Promise<RejoinOutcome> => {
1049
+ const result = await boundedRejoin(false, join);
1050
+ return typeof result === "string" ? result : "joined";
1051
+ };
1052
+
1053
+ // Every reconnect after the stream first opened (a dropped connection, a
1054
+ // heartbeat timeout, a sleep) joins the tip like a hidden-tab return: a
1055
+ // short gap replays over SSE, a long one is caught up or reloaded instead
1056
+ // of being poured through the live stream. A transient failure makes the
1057
+ // SDK back off and call this again, at most STRICT_REJOIN_ATTEMPTS times
1058
+ // in a row (until a connection opens); after that the reconnect replays
1059
+ // exactly rather than staying stuck.
1060
+ let strictFailures = 0;
1061
+ const beforeReconnect = async (cursor: number): Promise<number> => {
1062
+ // Deliver what the broken connection already yielded first.
1063
+ flush();
1064
+ if (!isCurrent()) throw abortError();
1065
+ const strict = strictFailures < STRICT_REJOIN_ATTEMPTS;
1066
+ const mark = sessionDetailReadMark();
1067
+ let result: RejoinOutcome | { retry: unknown };
1068
+ try {
1069
+ result = await boundedRejoin(strict, async (scope) => {
1070
+ if ((await rejoinLive(true, { strict, mark, scope })) === "joined") return "joined";
1071
+ let loaded: boolean;
1072
+ try {
1073
+ loaded = await loadLatestWindow(scope);
1074
+ } catch (cause) {
1075
+ if (!scope.isCurrent() || (strict && isRetryableStreamError(cause))) throw cause;
1076
+ // A window that cannot be read: replay exactly instead.
1077
+ return "joined";
1078
+ }
1079
+ if (!loaded) throw abortError();
1080
+ // The fresh window's own gap is short: join its head the same way.
1081
+ if ((await rejoinLive(true, { strict, mark, scope })) === "reload" && strict) {
1082
+ throw new TypeError("the session outran a fresh window while rejoining it");
1083
+ }
1084
+ return "joined";
1085
+ });
1086
+ } catch (cause) {
1087
+ if (!isCurrent()) throw abortError();
1088
+ // Not a read failure: end the stream visibly instead of letting the
1089
+ // SDK retry it forever.
1090
+ if (!isRetryableStreamError(cause)) throw cause;
1091
+ throw new Error(
1092
+ `rejoining the live session failed: ${cause instanceof Error ? cause.message : String(cause)}`,
1093
+ { cause },
1094
+ );
1095
+ }
1096
+ if (!isCurrent()) throw abortError();
1097
+ if (typeof result === "object") {
1098
+ strictFailures += 1;
1099
+ throw result.retry;
1100
+ }
1101
+ noteStreamResume();
1102
+ return Math.max(cursor, streamResumeSequenceRef.current);
1103
+ };
1104
+
892
1105
  void (async () => {
893
1106
  try {
894
1107
  if (reconcileForegroundResume) {
895
1108
  setConnectionState("connecting");
896
1109
  // A short gap replays over SSE into the loaded steps; a longer one
897
1110
  // drops the steps of turns that were working and re-reads the tail.
898
- if ((await rejoinLive(true)) === "reload") {
1111
+ // A transient failure (the network often returns just after a wake)
1112
+ // retries with backoff instead of replaying the backlog it could
1113
+ // not size; only after that does the stream replay exactly.
1114
+ let outcome: RejoinOutcome;
1115
+ for (let attempt = 0; ; attempt += 1) {
1116
+ const strict = attempt < STRICT_REJOIN_ATTEMPTS;
1117
+ const result = await boundedRejoin(strict, (scope) =>
1118
+ rejoinLive(true, { strict, scope }),
1119
+ );
1120
+ if (typeof result === "string") {
1121
+ outcome = result;
1122
+ break;
1123
+ }
1124
+ await abortableDelay(
1125
+ Math.min(FOREGROUND_REJOIN_RETRY_MS * 2 ** attempt, FOREGROUND_REJOIN_RETRY_MAX_MS),
1126
+ controller.signal,
1127
+ );
1128
+ }
1129
+ if (outcome === "reload") {
899
1130
  // Keep the last known window visible until the bounded latest
900
1131
  // replacement is ready, then install that replacement below.
901
1132
  initialWindowLoadedRef.current = false;
@@ -903,7 +1134,7 @@ export function useSessionEvents(
903
1134
  }
904
1135
  } else if (!fullReplay && initialWindowLoadedRef.current && rejoinPendingRef.current) {
905
1136
  rejoinPendingRef.current = false;
906
- if ((await rejoinLive(false)) === "reload") {
1137
+ if ((await leniently((scope) => rejoinLive(false, { scope }))) === "reload") {
907
1138
  initialWindowLoadedRef.current = false;
908
1139
  }
909
1140
  }
@@ -917,80 +1148,29 @@ export function useSessionEvents(
917
1148
  attempt += 1
918
1149
  ) {
919
1150
  setConnectionState("connecting");
920
- // First paint is ONE compact fetch of the conversation — the newest
921
- // window, revealed at the bottom in a few hundred ms. Deeper history
922
- // loads only when the reader scrolls up (the sentinel drives
923
- // loadOlder); a turn's steps load when the reader opens it.
924
- const window = await loadEventWindow(t, client, workspaceId, sessionId, {
925
- before: Number.MAX_SAFE_INTEGER,
926
- pageSize: SESSION_HISTORY_PAGE_SIZE,
927
- targetGroups: Number.POSITIVE_INFINITY,
928
- maxFetches: INITIAL_FETCH_CAP,
929
- boundaryPageCap: BOUNDARY_PAGE_CAP,
930
- signal: controller.signal,
931
- filter: CONVERSATION_FILTER,
932
- });
933
- if (!isCurrent()) {
1151
+ if (!(await loadLatestWindow())) {
934
1152
  return;
935
1153
  }
936
- const status = observeSessionStatus(window.events, sessionStatusRef);
937
- const retained = boundBrowserSessionEventWindow(window.events);
938
- // A replacement tail retires requests against the discarded window.
939
- // Ordinary SSE reconnects preserve navigation, but splicing an old
940
- // page into this new tail could leave an inaccessible history gap.
941
- navigationGenerationRef.current += 1;
942
- loadingOlderRef.current = false;
943
- loadingNewerRef.current = false;
944
- loadingOldestRef.current = false;
945
- setLoadingOlder(false);
946
- setLoadingNewer(false);
947
- setLoadingOldest(false);
948
- const previous = eventWindowRef.current.events;
949
- eventWindowRef.current = retained;
950
- pruneStepStores(retained.events, previous);
951
- oldestSequenceRef.current =
952
- retained.events[0]?.sequence ?? window.oldestSequence ?? window.scanCursor;
953
- newestSequenceRef.current =
954
- maxResumeSequenceOrNull(retained.events) ?? window.newestSequence;
955
- hasOlderRef.current = window.hasOlder || retained.truncated;
956
- hasNewerRef.current = false;
957
- lastSequenceRef.current = Math.max(lastSequenceRef.current, window.newestSequence);
958
- streamResumeSequenceRef.current = window.newestSequence;
959
- skippedStepsThroughRef.current =
960
- retained.events.length === 0 && window.newestSequence > 0
961
- ? window.newestSequence
962
- : null;
963
- initialWindowLoadedRef.current = true;
964
- setInitialHistoryReady(true);
965
- setError(null);
966
- if (status !== undefined) {
967
- setSessionStatusProjection(status);
968
- }
969
- setEventWindow(retained);
970
- setHasOlder(window.hasOlder || retained.truncated);
971
- setHasNewer(false);
972
- setInitialLoading(false);
973
1154
  // Join at the durable head rather than replaying every row since the
974
1155
  // window's last conversation event: a working turn's steps (its
975
1156
  // latest are read), or terminal output written after the last turn,
976
1157
  // which only the sandbox dock reads.
977
- if ((await rejoinLive(true)) === "reload" && attempt === 0) {
1158
+ if (
1159
+ (await leniently((scope) => rejoinLive(true, { scope }))) === "reload" &&
1160
+ attempt === 0
1161
+ ) {
978
1162
  initialWindowLoadedRef.current = false;
979
1163
  }
980
1164
  }
981
1165
  if (fullReplay) {
982
1166
  setInitialLoading(false);
983
1167
  }
984
- // The stream starts past what it last delivered: a window load,
985
- // catch-up, page or jump moved the cursor with conversation reads, which
986
- // carry no terminal output, so the sandbox terminal reads it again.
987
- if (!fullReplay && streamResumeSequenceRef.current > liveThroughRef.current) {
988
- markTurnlessOutputGap(workspaceId, sessionId);
989
- }
990
- liveThroughRef.current = Math.max(liveThroughRef.current, streamResumeSequenceRef.current);
1168
+ noteStreamResume();
991
1169
  const stream = client.streamEvents(workspaceId, sessionId, {
992
1170
  after: streamResumeSequenceRef.current,
993
1171
  signal: controller.signal,
1172
+ // Full replay keeps the SDK's exactly-once reconnects.
1173
+ ...(fullReplay ? {} : { beforeReconnect }),
994
1174
  onOpen: () => {
995
1175
  // The first open after this mount's initial tail: every read hook
996
1176
  // read its projection alongside that tail, and the shared feed
@@ -998,6 +1178,7 @@ export function useSessionEvents(
998
1178
  // foreground resumes) repair every projection.
999
1179
  const initialOpen = openedStreamKeyRef.current !== streamKey;
1000
1180
  openedStreamKeyRef.current = streamKey;
1181
+ strictFailures = 0;
1001
1182
  // Reconciliation repairs projections, but it must not block reading
1002
1183
  // the already-open SSE body. Otherwise live events accumulate in the
1003
1184
  // browser and appear as one delayed burst after every reconciler ends.
@@ -1088,6 +1269,22 @@ export function useSessionEvents(
1088
1269
  startupTurns,
1089
1270
  ]);
1090
1271
 
1272
+ // A sleep, frozen tab or lost network usually killed the stream without the
1273
+ // page ever going hidden. Rejoin at once, like a hidden-tab return, instead
1274
+ // of waiting for the heartbeat timeout and then replaying the backlog.
1275
+ useEffect(() => {
1276
+ if (!sessionId || !streamEnabled) return;
1277
+ return subscribePageWake(() => {
1278
+ const stream = streamAbortRef.current;
1279
+ // History views and paused streams have no live connection to restore.
1280
+ if (!stream || stream.signal.aborted || viewModeRef.current !== "live") return;
1281
+ if (!fullReplay && initialWindowLoadedRef.current) {
1282
+ reconcileAfterPageResumeRef.current = true;
1283
+ }
1284
+ setStreamEpoch((epoch) => epoch + 1);
1285
+ });
1286
+ }, [sessionId, streamEnabled, fullReplay]);
1287
+
1091
1288
  const navigationBusy = (): boolean =>
1092
1289
  loadingTargetRef.current ||
1093
1290
  loadingOlderRef.current ||
@@ -1988,7 +2185,7 @@ async function loadConversationCatchup(
1988
2185
  sessionId: string,
1989
2186
  cursor: number,
1990
2187
  head: number,
1991
- options: { signal?: AbortSignal; isCurrent: () => boolean },
2188
+ options: { signal?: AbortSignal; isCurrent: () => boolean; progress?: () => void },
1992
2189
  ): Promise<SessionEvent[] | null> {
1993
2190
  const events: SessionEvent[] = [];
1994
2191
  let after = cursor;
@@ -2003,6 +2200,7 @@ async function loadConversationCatchup(
2003
2200
  payloadMode: "full",
2004
2201
  });
2005
2202
  if (!options.isCurrent()) throw abortError();
2203
+ options.progress?.();
2006
2204
  const fresh = page.filter((event) => eventResumeSequence(event) > after);
2007
2205
  assertAscending(fresh);
2008
2206
  events.push(...fresh);
@@ -2047,6 +2245,8 @@ async function loadEventWindow(
2047
2245
  filteredPageCap?: number;
2048
2246
  signal?: AbortSignal;
2049
2247
  isCurrent?: () => boolean;
2248
+ /** Called after each completed page read. */
2249
+ progress?: () => void;
2050
2250
  filter?: HistoryFilter | undefined;
2051
2251
  },
2052
2252
  ): Promise<LoadedEventWindow> {
@@ -2073,6 +2273,7 @@ async function loadEventWindow(
2073
2273
  ...(options.signal ? { signal: options.signal } : {}),
2074
2274
  });
2075
2275
  if (options.isCurrent?.() === false) throw abortError();
2276
+ options.progress?.();
2076
2277
  if (page.raw.oldest === null) {
2077
2278
  reachedStart = true;
2078
2279
  break;
@@ -2106,6 +2307,7 @@ async function loadEventWindow(
2106
2307
  ...(options.signal ? { signal: options.signal } : {}),
2107
2308
  });
2108
2309
  if (options.isCurrent?.() === false) throw abortError();
2310
+ options.progress?.();
2109
2311
  if (page.raw.oldest === null) {
2110
2312
  reachedStart = true;
2111
2313
  break;
@@ -2441,6 +2643,32 @@ function abortError(): Error {
2441
2643
  return error;
2442
2644
  }
2443
2645
 
2646
+ function abortableDelay(ms: number, signal: AbortSignal): Promise<void> {
2647
+ return new Promise((resolve, reject) => {
2648
+ if (signal.aborted) {
2649
+ reject(abortError());
2650
+ return;
2651
+ }
2652
+ const onAbort = () => {
2653
+ clearTimeout(timer);
2654
+ reject(abortError());
2655
+ };
2656
+ const timer = setTimeout(() => {
2657
+ signal.removeEventListener("abort", onAbort);
2658
+ resolve();
2659
+ }, ms);
2660
+ signal.addEventListener("abort", onAbort, { once: true });
2661
+ });
2662
+ }
2663
+
2664
+ /**
2665
+ * One rejoin attempt's cancellation: its signal, whether it still owns state,
2666
+ * and `progress`, reported after each completed read (it keeps a slow but
2667
+ * progressing attempt from being abandoned as stalled).
2668
+ */
2669
+ type RejoinScope = { signal: AbortSignal; isCurrent: () => boolean; progress?: () => void };
2670
+ type RejoinOutcome = "joined" | "reload";
2671
+
2444
2672
  /* ----------------------------------------------------------------------------
2445
2673
  Conversation-first history
2446
2674
 
package/src/lib/format.ts CHANGED
@@ -114,8 +114,9 @@ export function tryParseJson(text: string): unknown {
114
114
 
115
115
  /**
116
116
  * The canonical credit-death sentence. Credit exhaustion is the one failure a
117
- * user can fix themselves — the copy must say what happened (no usable credit for this model),
118
- * what to do (add credits), and what is safe (nothing was lost). Crucially it
117
+ * user can fix themselves — the copy must say what happened (the remaining
118
+ * credit does not cover this model, though it may cover others), what to do
119
+ * (choose a covered model or add credits), and what is safe (nothing was lost). Crucially it
119
120
  * must NOT say "send a message to revive": a revive turn burns credits the
120
121
  * workspace no longer has.
121
122
  */
@@ -1303,7 +1303,7 @@ export const englishMessages = {
1303
1303
  "This chat's model is no longer available. Choose another model to continue. Your message is saved.",
1304
1304
  "lib.format.now": "now",
1305
1305
  "lib.format.outOfCreditsThisWorkspace":
1306
- "Out of credits for this model. Add credits to continue; the conversation is preserved.",
1306
+ "Your remaining credits don't cover this model. Choose a model they cover or add credits. The conversation is preserved.",
1307
1307
  "lib.format.providerBlockedRequest": "The model provider blocked this request.",
1308
1308
  "lib.format.providerBlockedRequestDetail": "The model provider blocked this request. {detail}",
1309
1309
  "lib.format.reconcileBeforeRetry":
@@ -1331,7 +1331,7 @@ export const englishMessages = {
1331
1331
  "lib.format.workspaceUsageLimitReachedAn":
1332
1332
  "Workspace usage limit reached. An organization admin can raise the workspace budget. Your draft is preserved.",
1333
1333
  "lib.format.yourOrganizationDoesnTHave":
1334
- "Your organization doesn't have enough credits to send this message. Add credits or choose a model with another payment source. Your message and attachments are saved.",
1334
+ "Your remaining credits don't cover this model. Choose a model they cover or add credits. Your message and attachments are saved.",
1335
1335
  "lib.providerRecovery.anImageFromEarlierIn":
1336
1336
  "An image from earlier in this conversation can't be read from storage",
1337
1337
  "lib.providerRecovery.opengeniToolServiceUnavailable":
@@ -1795,6 +1795,9 @@ export const englishMessages = {
1795
1795
  "Billed to the organization Anthropic API account",
1796
1796
  "modelPolicy.billedToTheOrganizationOpenrouter": "Billed to the organization OpenRouter account",
1797
1797
  "modelPolicy.billedToTheOrganizationOpper": "Billed to the organization Opper account",
1798
+ "modelPolicy.billedToTheOrganizationOpenai": "Billed to the organization OpenAI API account",
1799
+ "modelPolicy.billedToTheOrganizationAzureOpenai":
1800
+ "Billed to the organization Azure OpenAI account",
1798
1801
  "modelPolicy.billedToTheOrganizationProvider": "Billed to the organization provider account",
1799
1802
  "modelPolicy.billedToTheOrganizationVercel": "Billed to the organization Vercel account",
1800
1803
  "modelPolicy.billedToTheWorkspaceAnthropic": "Billed to the workspace Anthropic API account",
@@ -1822,7 +1825,7 @@ export const englishMessages = {
1822
1825
  "modelPolicy.freeCredits": "Free credits",
1823
1826
  "modelPolicy.freeInThisDeployment": "Free in this deployment",
1824
1827
  "modelPolicy.models": "Models",
1825
- "modelPolicy.needsCredits": "Needs credits",
1828
+ "modelPolicy.needsCredits": "Not covered by your credits",
1826
1829
  "modelPolicy.notEntitled": "Not entitled",
1827
1830
  "modelPolicy.opengeniCredits": "{product} credits",
1828
1831
  "modelPolicy.opengeniCreditsAutomaticManagedRoute": "{product} credits · automatic managed route",
@@ -2002,6 +2005,13 @@ export const englishMessages = {
2002
2005
  "results folded into model context — no list available.",
2003
2006
  "native.timeline.activity.thinking": "Thinking",
2004
2007
  "native.timeline.activity.thought": "Thought",
2008
+ "native.timeline.annotations.done": "Done",
2009
+ "native.timeline.annotations.removeAllTitle_one": "Remove this annotation?",
2010
+ "native.timeline.annotations.removeAllTitle_other": "Remove {count} annotations?",
2011
+ "native.timeline.annotations.removeAllMessage_one": "Your note will be lost.",
2012
+ "native.timeline.annotations.removeAllMessage_other": "Your notes will be lost.",
2013
+ "native.timeline.annotations.removeAllConfirm": "Remove",
2014
+ "native.timeline.annotations.cancel": "Cancel",
2005
2015
  "native.timeline.composer.errorDismiss": "{error} Dismiss",
2006
2016
  "native.timeline.composer.fast": "Fast",
2007
2017
  "native.timeline.composer.ultrafast": "Ultrafast",
@@ -130,6 +130,9 @@ export function billingClassForMissingSelection(modelId: string): PickerBillingC
130
130
  if (modelId.startsWith("workspace-anthropic/")) return "byok";
131
131
  if (modelId.startsWith("organization-claude-subscription/")) return "claude_subscription";
132
132
  if (modelId.startsWith("organization-anthropic/")) return "organization_byok";
133
+ // Every organization OpenAI or Azure OpenAI id is an organization-paid model.
134
+ if (modelId.startsWith("organization-openai/")) return "organization_byok";
135
+ if (modelId.startsWith("organization-azure-openai/")) return "organization_byok";
133
136
  if (modelId.startsWith("workspace-gateway/")) return "byok";
134
137
  if (modelId.startsWith("workspace-openrouter/")) return "byok";
135
138
  if (modelId.startsWith("workspace-opper/")) return "byok";
@@ -60,7 +60,9 @@ export function billingClassForModel(model: ClientModel): PickerBillingClass {
60
60
  if (
61
61
  model.provider === "organization-gateway" ||
62
62
  model.provider === "organization-openrouter" ||
63
- model.provider === "organization-opper"
63
+ model.provider === "organization-opper" ||
64
+ model.provider === "organization-openai" ||
65
+ model.provider === "organization-azure-openai"
64
66
  ) {
65
67
  return "organization_byok";
66
68
  }
@@ -297,6 +299,12 @@ function organizationProviderPayerSummary(t: OpenGeniText, model: ClientModel):
297
299
  if (model.provider === "organization-opper") {
298
300
  return t("modelPolicy.billedToTheOrganizationOpper");
299
301
  }
302
+ if (model.provider === "organization-openai") {
303
+ return t("modelPolicy.billedToTheOrganizationOpenai");
304
+ }
305
+ if (model.provider === "organization-azure-openai") {
306
+ return t("modelPolicy.billedToTheOrganizationAzureOpenai");
307
+ }
300
308
  if (model.provider === "organization-gateway") {
301
309
  return t("modelPolicy.billedToTheOrganizationVercel");
302
310
  }
package/src/session.ts CHANGED
@@ -150,6 +150,7 @@ export type {
150
150
  TurnEndItem,
151
151
  TurnStepsItem,
152
152
  TurnStepsState,
153
+ TimelineAnnotationSourceDescriptor,
153
154
  UserMessageItem,
154
155
  WorkerCompletionItem,
155
156
  WorkerItem,