@opengeni/react 1.4.4 → 1.4.5-canary.37458084490001

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 (234) hide show
  1. package/README.md +17 -6
  2. package/dist/artifacts.d.ts +1 -0
  3. package/dist/artifacts.js +22 -15
  4. package/dist/artifacts.js.map +1 -1
  5. package/dist/{browser-viewer-5EEAS3IU.js → browser-viewer-CV23VIHB.js} +8 -6
  6. package/dist/chunk-3ZC6QPOM.js +174 -0
  7. package/dist/chunk-3ZC6QPOM.js.map +1 -0
  8. package/dist/{chunk-YVFRBXST.js → chunk-4BCVCJSU.js} +2 -2
  9. package/dist/{chunk-JHTIMBOL.js → chunk-5JSUNNQN.js} +26 -4
  10. package/dist/{chunk-JHTIMBOL.js.map → chunk-5JSUNNQN.js.map} +1 -1
  11. package/dist/{chunk-I6OY3MWC.js → chunk-6FOTSVWU.js} +2 -2
  12. package/dist/{chunk-IUHHPMAX.js → chunk-7RRBX5EM.js} +14 -85
  13. package/dist/chunk-7RRBX5EM.js.map +1 -0
  14. package/dist/{chunk-L2J3PU7A.js → chunk-7ZB7I3KP.js} +24 -98
  15. package/dist/chunk-7ZB7I3KP.js.map +1 -0
  16. package/dist/{chunk-LVS3MH5T.js → chunk-ATIRUHBZ.js} +128 -10
  17. package/dist/chunk-ATIRUHBZ.js.map +1 -0
  18. package/dist/chunk-BOFEQC6K.js +162 -0
  19. package/dist/chunk-BOFEQC6K.js.map +1 -0
  20. package/dist/{chunk-2OQA3CPB.js → chunk-CESBPQP5.js} +19 -5
  21. package/dist/chunk-CESBPQP5.js.map +1 -0
  22. package/dist/{chunk-IYQCWGU5.js → chunk-GHJU7XG7.js} +35 -62
  23. package/dist/chunk-GHJU7XG7.js.map +1 -0
  24. package/dist/{chunk-G6YRCIYJ.js → chunk-HNVWMDNN.js} +55 -60
  25. package/dist/chunk-HNVWMDNN.js.map +1 -0
  26. package/dist/{chunk-PHBFJCEU.js → chunk-I5EGRXXG.js} +110 -7
  27. package/dist/chunk-I5EGRXXG.js.map +1 -0
  28. package/dist/{chunk-PBCZL4JP.js → chunk-INIZSNXT.js} +2 -2
  29. package/dist/{chunk-XS67YG5R.js → chunk-IX3K4THH.js} +24 -3
  30. package/dist/chunk-IX3K4THH.js.map +1 -0
  31. package/dist/chunk-IZV5FTJC.js +55 -0
  32. package/dist/chunk-IZV5FTJC.js.map +1 -0
  33. package/dist/chunk-JDJJMBB3.js +1883 -0
  34. package/dist/chunk-JDJJMBB3.js.map +1 -0
  35. package/dist/{chunk-C5BF4L26.js → chunk-KHF2VRXF.js} +7 -7
  36. package/dist/{chunk-QMMCJGFI.js → chunk-L5OKM2VX.js} +2 -2
  37. package/dist/chunk-LHF6BVM4.js +83 -0
  38. package/dist/chunk-LHF6BVM4.js.map +1 -0
  39. package/dist/chunk-N7S72EXK.js +25 -0
  40. package/dist/chunk-N7S72EXK.js.map +1 -0
  41. package/dist/{chunk-CVYCLFMH.js → chunk-PEHTX3V7.js} +19 -1
  42. package/dist/chunk-PEHTX3V7.js.map +1 -0
  43. package/dist/chunk-R5R5RQQD.js +51 -0
  44. package/dist/chunk-R5R5RQQD.js.map +1 -0
  45. package/dist/chunk-RI42H5IU.js +326 -0
  46. package/dist/chunk-RI42H5IU.js.map +1 -0
  47. package/dist/{chunk-JH7V627O.js → chunk-SHLZMAJN.js} +2 -11
  48. package/dist/chunk-SHLZMAJN.js.map +1 -0
  49. package/dist/{chunk-EAOSEIXB.js → chunk-TZQSHCZN.js} +692 -1996
  50. package/dist/chunk-TZQSHCZN.js.map +1 -0
  51. package/dist/chunk-ZIB4H5LN.js +101 -0
  52. package/dist/chunk-ZIB4H5LN.js.map +1 -0
  53. package/dist/client.d.ts +9 -3
  54. package/dist/clipboard.js +1 -1
  55. package/dist/components/browser-viewer.d.ts +6 -0
  56. package/dist/components/composer.d.ts +3 -69
  57. package/dist/components/human-input-form.d.ts +3 -32
  58. package/dist/components/markdown.d.ts +8 -0
  59. package/dist/components/model-policy-picker.d.ts +4 -37
  60. package/dist/components/opper-mark.d.ts +7 -0
  61. package/dist/components/provider-recovery-notice.d.ts +15 -0
  62. package/dist/components/remark-soft-line-breaks.d.ts +38 -0
  63. package/dist/components/sandbox-workspace.d.ts +13 -0
  64. package/dist/components/session-chrome.d.ts +5 -3
  65. package/dist/components/session-conversation.d.ts +15 -3
  66. package/dist/composer-messages.d.ts +74 -0
  67. package/dist/composer-messages.js +9 -0
  68. package/dist/composer.js +15 -10
  69. package/dist/{computer-viewer-ELNLZGHI.js → computer-viewer-K4CKYRX6.js} +4 -4
  70. package/dist/connect-setup.d.ts +2 -0
  71. package/dist/connect.d.ts +1 -1
  72. package/dist/connect.js +21 -6
  73. package/dist/connect.js.map +1 -1
  74. package/dist/{embedded-voice-NIL4RDX3.js → embedded-voice-3ZFWWJ6O.js} +6 -4
  75. package/dist/{embedded-voice-NIL4RDX3.js.map → embedded-voice-3ZFWWJ6O.js.map} +1 -1
  76. package/dist/hooks/shared-machines-list.d.ts +4 -0
  77. package/dist/hooks/use-client-config-flags.d.ts +6 -0
  78. package/dist/hooks/use-goal.d.ts +2 -1
  79. package/dist/human-input-model.d.ts +40 -0
  80. package/dist/index.d.ts +4 -1
  81. package/dist/index.js +116 -73
  82. package/dist/index.js.map +1 -1
  83. package/dist/interaction.js +5 -5
  84. package/dist/{latest-question-2POFPYNB.js → latest-question-SWC6QEVN.js} +3 -3
  85. package/dist/lib/clipboard.d.ts +7 -0
  86. package/dist/lib/provider-recovery.d.ts +49 -0
  87. package/dist/machines.js +2 -2
  88. package/dist/model-mark-paths.d.ts +34 -0
  89. package/dist/model-mark-paths.js +16 -0
  90. package/dist/model-picker-model.d.ts +111 -0
  91. package/dist/model-picker-model.js +25 -0
  92. package/dist/model-picker-model.js.map +1 -0
  93. package/dist/{model-policy-picker-menu-WRNSRFQC.js → model-policy-picker-menu-NM4RPTY6.js} +6 -4
  94. package/dist/model-policy-picker-menu-NM4RPTY6.js.map +1 -0
  95. package/dist/model-policy.d.ts +10 -0
  96. package/dist/model-policy.js +5 -1
  97. package/dist/organization-model.d.ts +32 -0
  98. package/dist/organization-model.js +65 -0
  99. package/dist/organization-model.js.map +1 -0
  100. package/dist/{platform-activity-row-PJJVATTZ.js → platform-activity-row-NJ47YBXW.js} +7 -84
  101. package/dist/platform-activity-row-NJ47YBXW.js.map +1 -0
  102. package/dist/queue-presentation-model.d.ts +72 -0
  103. package/dist/queue-presentation-model.js +38 -0
  104. package/dist/queue-presentation-model.js.map +1 -0
  105. package/dist/{queue-surface-implementation-67FS7FUI.js → queue-surface-implementation-YPJFQ3O6.js} +24 -252
  106. package/dist/queue-surface-implementation-YPJFQ3O6.js.map +1 -0
  107. package/dist/realtime.js +5 -3
  108. package/dist/{sandbox-files-34CJJNOY.js → sandbox-files-RCVCMXG7.js} +5 -5
  109. package/dist/sandbox-files-RCVCMXG7.js.map +1 -0
  110. package/dist/sandbox-label-model.d.ts +23 -0
  111. package/dist/sandbox-label-model.js +28 -0
  112. package/dist/sandbox-label-model.js.map +1 -0
  113. package/dist/session-attention-model.d.ts +8 -0
  114. package/dist/session-attention-model.js +46 -0
  115. package/dist/session-attention-model.js.map +1 -0
  116. package/dist/session-feedback-model.d.ts +20 -0
  117. package/dist/session-feedback-model.js +56 -0
  118. package/dist/session-feedback-model.js.map +1 -0
  119. package/dist/session-list-model.d.ts +96 -0
  120. package/dist/session-list-model.js +219 -0
  121. package/dist/session-list-model.js.map +1 -0
  122. package/dist/session-status-model.d.ts +19 -0
  123. package/dist/session-ui.js +26 -17
  124. package/dist/session-ui.js.map +1 -1
  125. package/dist/session.js +8 -6
  126. package/dist/testing/session-scenarios.d.ts +10 -0
  127. package/dist/testing/session-scenarios.js +303 -0
  128. package/dist/testing/session-scenarios.js.map +1 -0
  129. package/dist/timeline/genie-copy.d.ts +3 -0
  130. package/dist/timeline/genie-loading.d.ts +11 -0
  131. package/dist/timeline/index.d.ts +1 -1
  132. package/dist/timeline/notice-presentation.d.ts +7 -0
  133. package/dist/timeline/patch-apply-command.d.ts +18 -0
  134. package/dist/timeline/platform-activity-presentation.d.ts +7 -0
  135. package/dist/timeline/presented-image.d.ts +6 -1
  136. package/dist/timeline/question-nav-model.d.ts +23 -0
  137. package/dist/timeline/registry.d.ts +10 -1
  138. package/dist/timeline/retained-loaders.d.ts +1 -1
  139. package/dist/timeline/tool-presentation.d.ts +172 -0
  140. package/dist/timeline/turn-summary-model.d.ts +90 -0
  141. package/dist/timeline/turn-summary.d.ts +4 -74
  142. package/dist/timeline/work-presentation.d.ts +42 -0
  143. package/dist/timeline-model.d.ts +24 -0
  144. package/dist/timeline-model.js +152 -0
  145. package/dist/timeline-model.js.map +1 -0
  146. package/package.json +47 -3
  147. package/src/artifacts.ts +1 -0
  148. package/src/client.ts +9 -3
  149. package/src/components/browser-viewer.tsx +23 -2
  150. package/src/components/claude-mark.tsx +2 -1
  151. package/src/components/composer.tsx +4 -144
  152. package/src/components/grok-mark.tsx +2 -1
  153. package/src/components/human-input-form.tsx +13 -124
  154. package/src/components/markdown.tsx +19 -1
  155. package/src/components/message-timeline.tsx +45 -99
  156. package/src/components/model-mark.tsx +2 -1
  157. package/src/components/model-policy-picker-menu.tsx +30 -85
  158. package/src/components/model-policy-picker.tsx +15 -148
  159. package/src/components/opper-mark.tsx +18 -0
  160. package/src/components/provider-recovery-notice.tsx +41 -0
  161. package/src/components/queue-surface-implementation.tsx +20 -349
  162. package/src/components/remark-soft-line-breaks.ts +166 -0
  163. package/src/components/sandbox-workspace.tsx +17 -1
  164. package/src/components/session-chrome.tsx +114 -99
  165. package/src/components/session-conversation.tsx +55 -6
  166. package/src/components/session-status.tsx +17 -16
  167. package/src/composer-messages.ts +150 -0
  168. package/src/connect-setup.tsx +45 -11
  169. package/src/connect.ts +1 -1
  170. package/src/hooks/shared-machines-list.ts +34 -1
  171. package/src/hooks/use-client-config-flags.ts +8 -0
  172. package/src/hooks/use-goal.ts +66 -10
  173. package/src/human-input-model.ts +147 -0
  174. package/src/index.ts +16 -0
  175. package/src/lib/clipboard.ts +29 -0
  176. package/src/lib/format.ts +7 -0
  177. package/src/lib/provider-recovery.ts +202 -0
  178. package/src/model-mark-paths.ts +53 -0
  179. package/src/model-picker-model.ts +330 -0
  180. package/src/model-policy.ts +43 -2
  181. package/src/organization-model.ts +118 -0
  182. package/src/queue-presentation-model.ts +464 -0
  183. package/src/sandbox-label-model.ts +41 -0
  184. package/src/session-attention-model.ts +59 -0
  185. package/src/session-feedback-model.ts +95 -0
  186. package/src/session-list-model.ts +327 -0
  187. package/src/session-status-model.ts +62 -0
  188. package/src/testing/session-scenarios.ts +326 -0
  189. package/src/timeline/activity-rail.tsx +5 -17
  190. package/src/timeline/genie-copy.ts +19 -0
  191. package/src/timeline/genie-loading.tsx +13 -18
  192. package/src/timeline/index.ts +1 -0
  193. package/src/timeline/notice-presentation.ts +22 -0
  194. package/src/timeline/patch-apply-command.tsx +135 -0
  195. package/src/timeline/platform-activity-presentation.ts +122 -0
  196. package/src/timeline/platform-activity-row.tsx +6 -96
  197. package/src/timeline/presented-image.ts +16 -2
  198. package/src/timeline/question-nav-model.ts +28 -0
  199. package/src/timeline/registry.ts +11 -1
  200. package/src/timeline/retained-loaders.ts +9 -4
  201. package/src/timeline/rolling-activity.tsx +7 -19
  202. package/src/timeline/tool-presentation.ts +1316 -0
  203. package/src/timeline/tool-renderers.tsx +226 -1025
  204. package/src/timeline/turn-summary-model.ts +338 -0
  205. package/src/timeline/turn-summary.tsx +21 -326
  206. package/src/timeline/work-presentation.ts +139 -0
  207. package/src/timeline-model.ts +108 -0
  208. package/styles/compiled.css +3 -0
  209. package/styles/connect.css +4 -0
  210. package/dist/chunk-2OQA3CPB.js.map +0 -1
  211. package/dist/chunk-CVYCLFMH.js.map +0 -1
  212. package/dist/chunk-EAOSEIXB.js.map +0 -1
  213. package/dist/chunk-G6YRCIYJ.js.map +0 -1
  214. package/dist/chunk-HXYOSSQO.js +0 -117
  215. package/dist/chunk-HXYOSSQO.js.map +0 -1
  216. package/dist/chunk-IUHHPMAX.js.map +0 -1
  217. package/dist/chunk-IYQCWGU5.js.map +0 -1
  218. package/dist/chunk-JH7V627O.js.map +0 -1
  219. package/dist/chunk-L2J3PU7A.js.map +0 -1
  220. package/dist/chunk-LVS3MH5T.js.map +0 -1
  221. package/dist/chunk-PHBFJCEU.js.map +0 -1
  222. package/dist/chunk-XS67YG5R.js.map +0 -1
  223. package/dist/platform-activity-row-PJJVATTZ.js.map +0 -1
  224. package/dist/queue-surface-implementation-67FS7FUI.js.map +0 -1
  225. /package/dist/{browser-viewer-5EEAS3IU.js.map → browser-viewer-CV23VIHB.js.map} +0 -0
  226. /package/dist/{chunk-YVFRBXST.js.map → chunk-4BCVCJSU.js.map} +0 -0
  227. /package/dist/{chunk-I6OY3MWC.js.map → chunk-6FOTSVWU.js.map} +0 -0
  228. /package/dist/{chunk-PBCZL4JP.js.map → chunk-INIZSNXT.js.map} +0 -0
  229. /package/dist/{chunk-C5BF4L26.js.map → chunk-KHF2VRXF.js.map} +0 -0
  230. /package/dist/{chunk-QMMCJGFI.js.map → chunk-L5OKM2VX.js.map} +0 -0
  231. /package/dist/{computer-viewer-ELNLZGHI.js.map → composer-messages.js.map} +0 -0
  232. /package/dist/{model-policy-picker-menu-WRNSRFQC.js.map → computer-viewer-K4CKYRX6.js.map} +0 -0
  233. /package/dist/{latest-question-2POFPYNB.js.map → latest-question-SWC6QEVN.js.map} +0 -0
  234. /package/dist/{sandbox-files-34CJJNOY.js.map → model-mark-paths.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/session-ui.ts"],"sourcesContent":["// @opengeni/react/session-ui — styled surfaces used by the session route.\n// Keep these separate from the hook-only session entry and the broad root barrel\n// so session hosts do not pay for unrelated React surfaces.\nexport { HumanInputForm } from \"./components/human-input-form\";\nexport type {\n HumanInputAnswerDraft,\n HumanInputFormMessages,\n HumanInputFormProps,\n} from \"./components/human-input-form\";\nexport { HumanInputSurface } from \"./components/human-input-surface\";\nexport { ApprovalSurface } from \"./components/approval-surface\";\nexport { ToolActionReviewCard, ToolActionReviewDetails } from \"./components/tool-action-review\";\nexport type { ToolReviewDetailsLoader } from \"./components/tool-action-review\";\nexport type { ApprovalSurfaceProps, ApprovalSurfaceMessages } from \"./components/approval-surface\";\nexport type { HumanInputSurfaceProps } from \"./components/human-input-surface\";\nexport { MessageTimeline, TimelineRow } from \"./components/message-timeline\";\nexport type { MessageTimelineProps } from \"./components/message-timeline\";\nexport type { RenderAllowanceExhausted } from \"./timeline/allowance-exhausted-row\";\nexport type { AllowanceLabels, AllowanceScope } from \"./usage/allowance-copy\";\nexport {\n OpenGeniLinkProvider,\n chainLinkResolvers,\n sessionLinkResolver,\n useOpenGeniLinkResolver,\n viewerLinkResolver,\n} from \"./components/open-geni-links\";\nexport type {\n OpenGeniLinkResolution,\n OpenGeniLinkResolver,\n OpenGeniLinkTarget,\n OpenGeniViewerTarget,\n} from \"./components/open-geni-links\";\nexport { parseOpenGeniLink } from \"@opengeni/sdk\";\nexport {\n ArtifactLabelsProvider,\n DEFAULT_ARTIFACT_LABELS,\n type ArtifactLabels,\n} from \"./components/artifacts/artifact-chrome\";\nexport type { TimelineSearchTarget } from \"./components/timeline-search\";\nexport { createOlderHistoryLoadReceipt } from \"./older-history\";\nexport type { OlderHistoryLoader, OlderHistoryLoadReceipt } from \"./older-history\";\nexport { UserMessageBody, userMessageLikelyNeedsDisclosure } from \"./components/user-message-body\";\nexport type {\n UserMessageBodyProps,\n UserMessageDisclosureLabels,\n} from \"./components/user-message-body\";\nexport { BUILT_IN_TURN_SUMMARY_FACET_IDS } from \"./timeline/turn-summary\";\nexport type {\n BuiltInTurnSummaryFacetId,\n TurnSummaryContext,\n TurnSummaryFacet,\n TurnSummaryFacetConfiguration,\n TurnSummaryFacetResult,\n TurnSummaryOptions,\n} from \"./timeline/turn-summary\";\nexport { QueueSurface } from \"./components/queue-surface\";\n// The provider too, so a host needs only this entry (the root also exports the\n// workbench, whose editors, terminal and desktop are optional peers).\nexport { OpenGeniProvider } from \"./provider\";\nexport type { OpenGeniProviderProps, ErrorMessageFormatter } from \"./provider\";\n// The tool-renderer registry, so custom tool renderers need no root import.\nexport { createDefaultToolRegistry, createToolRegistry, defaultToolRegistry } from \"./timeline\";\nexport type {\n CreateToolRegistryOptions,\n ToolRegistry,\n ToolRegistryEntry,\n ToolRenderer,\n ToolRendererProps,\n} from \"./timeline\";\nexport { SessionConversation } from \"./components/session-conversation\";\nexport { SessionList } from \"./components/session-list\";\nexport type { SessionListLabels, SessionListProps } from \"./components/session-list\";\nexport { OpenGeniChat } from \"./components/open-geni-chat\";\nexport type {\n OpenGeniChatCreateOptions,\n OpenGeniChatLabels,\n OpenGeniChatProps,\n} from \"./components/open-geni-chat\";\nexport type {\n SessionConversationLabels,\n SessionConversationProps,\n} from \"./components/session-conversation\";\nexport type { QueueSurfaceProps } from \"./components/queue-surface\";\nexport {\n SessionChrome,\n sessionChromeGoalPillExplanation,\n sessionChromeGoalPillLabel,\n sessionChromeGoalPillState,\n} from \"./components/session-chrome\";\nexport type {\n SessionChromeAgentsSignal,\n SessionChromeProps,\n SessionChromeSignalId,\n SessionChromeSignalTone,\n} from \"./components/session-chrome\";\nexport { SessionCommandsPanel } from \"./components/session-commands-panel\";\nexport { SessionCommands } from \"./components/session-commands\";\n\nexport { KnowledgeActivityProvider } from \"./timeline/knowledge-receipt\";\nexport type { KnowledgeActivityActions } from \"./timeline/knowledge-receipt\";\nexport { StartupTimings } from \"./timeline/startup-timings\";\nexport { useStartupDetails, setStartupDetails } from \"./timeline/startup-preference\";\nexport type { GenieLoadingOptions } from \"./timeline/genie-loading\";\n\nexport { ToolReviewHistoryProvider } from \"./components/tool-review-history\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAS,yBAAyB;","names":[]}
1
+ {"version":3,"sources":["../src/session-ui.ts"],"sourcesContent":["// @opengeni/react/session-ui — styled surfaces used by the session route.\n// Keep these separate from the hook-only session entry and the broad root barrel\n// so session hosts do not pay for unrelated React surfaces.\nexport { HumanInputForm } from \"./components/human-input-form\";\nexport type {\n HumanInputAnswerDraft,\n HumanInputFormMessages,\n HumanInputFormProps,\n} from \"./components/human-input-form\";\nexport { HumanInputSurface } from \"./components/human-input-surface\";\nexport { ApprovalSurface } from \"./components/approval-surface\";\nexport { ToolActionReviewCard, ToolActionReviewDetails } from \"./components/tool-action-review\";\nexport type { ToolReviewDetailsLoader } from \"./components/tool-action-review\";\nexport type { ApprovalSurfaceProps, ApprovalSurfaceMessages } from \"./components/approval-surface\";\nexport type { HumanInputSurfaceProps } from \"./components/human-input-surface\";\nexport { MessageTimeline, TimelineRow } from \"./components/message-timeline\";\nexport type { MessageTimelineProps } from \"./components/message-timeline\";\nexport type { RenderAllowanceExhausted } from \"./timeline/allowance-exhausted-row\";\nexport type { AllowanceLabels, AllowanceScope } from \"./usage/allowance-copy\";\nexport {\n OpenGeniLinkProvider,\n chainLinkResolvers,\n sessionLinkResolver,\n useOpenGeniLinkResolver,\n viewerLinkResolver,\n} from \"./components/open-geni-links\";\nexport type {\n OpenGeniLinkResolution,\n OpenGeniLinkResolver,\n OpenGeniLinkTarget,\n OpenGeniViewerTarget,\n} from \"./components/open-geni-links\";\nexport { parseOpenGeniLink } from \"@opengeni/sdk\";\nexport {\n ArtifactLabelsProvider,\n DEFAULT_ARTIFACT_LABELS,\n type ArtifactLabels,\n} from \"./components/artifacts/artifact-chrome\";\nexport type { TimelineSearchTarget } from \"./components/timeline-search\";\nexport { createOlderHistoryLoadReceipt } from \"./older-history\";\nexport type { OlderHistoryLoader, OlderHistoryLoadReceipt } from \"./older-history\";\nexport { UserMessageBody, userMessageLikelyNeedsDisclosure } from \"./components/user-message-body\";\nexport type {\n UserMessageBodyProps,\n UserMessageDisclosureLabels,\n} from \"./components/user-message-body\";\nexport { BUILT_IN_TURN_SUMMARY_FACET_IDS } from \"./timeline/turn-summary\";\nexport type {\n BuiltInTurnSummaryFacetId,\n TurnSummaryContext,\n TurnSummaryFacet,\n TurnSummaryFacetConfiguration,\n TurnSummaryFacetResult,\n TurnSummaryOptions,\n} from \"./timeline/turn-summary\";\nexport { QueueSurface } from \"./components/queue-surface\";\n// The provider too, so a host needs only this entry (the root also exports the\n// workbench, whose editors, terminal and desktop are optional peers).\nexport { OpenGeniProvider } from \"./provider\";\nexport type { OpenGeniProviderProps, ErrorMessageFormatter } from \"./provider\";\n// The tool-renderer registry, so custom tool renderers need no root import.\nexport { createDefaultToolRegistry, createToolRegistry, defaultToolRegistry } from \"./timeline\";\nexport type {\n CreateToolRegistryOptions,\n ToolRegistry,\n ToolRegistryEntry,\n ToolRenderer,\n ToolRendererProps,\n} from \"./timeline\";\nexport { SessionConversation } from \"./components/session-conversation\";\nexport { SessionList } from \"./components/session-list\";\nexport type { SessionListLabels, SessionListProps } from \"./components/session-list\";\nexport { OpenGeniChat } from \"./components/open-geni-chat\";\nexport type {\n OpenGeniChatCreateOptions,\n OpenGeniChatLabels,\n OpenGeniChatProps,\n} from \"./components/open-geni-chat\";\nexport type {\n SessionConversationLabels,\n SessionConversationProps,\n} from \"./components/session-conversation\";\nexport type { QueueSurfaceProps } from \"./components/queue-surface\";\nexport {\n SessionChrome,\n sessionChromeGoalPillExplanation,\n sessionChromeGoalPillLabel,\n sessionChromeGoalPillState,\n} from \"./components/session-chrome\";\nexport type {\n SessionChromeAgentsSignal,\n SessionChromeProps,\n SessionChromeSignalId,\n SessionChromeSignalTone,\n} from \"./components/session-chrome\";\nexport { SessionCommandsPanel } from \"./components/session-commands-panel\";\nexport { SessionCommands } from \"./components/session-commands\";\n\nexport { KnowledgeActivityProvider } from \"./timeline/knowledge-receipt\";\nexport type { KnowledgeActivityActions } from \"./timeline/knowledge-receipt\";\nexport { StartupTimings } from \"./timeline/startup-timings\";\nexport { useStartupDetails, setStartupDetails } from \"./timeline/startup-preference\";\nexport type { GenieLoadingOptions } from \"./timeline/genie-loading\";\n\nexport { ToolReviewHistoryProvider } from \"./components/tool-review-history\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAS,yBAAyB;","names":[]}
package/dist/session.js CHANGED
@@ -10,13 +10,11 @@ import {
10
10
  approvalsFromRequiresAction,
11
11
  conversationTimeline,
12
12
  createOlderHistoryLoadReceipt,
13
- humanInputRequestFromEvent,
14
13
  isGoalEvent,
15
14
  isHumanInputEvent,
16
15
  isTitleEvent,
17
16
  isTurnQueueEvent,
18
17
  projectPendingApprovals,
19
- projectPendingHumanInputRequests,
20
18
  useFileAttachments,
21
19
  useGoal,
22
20
  useHumanInputRequests,
@@ -24,14 +22,18 @@ import {
24
22
  useSessionControl,
25
23
  useSessionEvents,
26
24
  useTurnQueue
27
- } from "./chunk-G6YRCIYJ.js";
25
+ } from "./chunk-HNVWMDNN.js";
28
26
  import {
29
27
  buildTimeline,
30
28
  creditExhaustedFromEvents,
31
29
  extractSessionRef,
32
30
  groupTimeline,
33
31
  sessionStatusFromEvents
34
- } from "./chunk-QMMCJGFI.js";
32
+ } from "./chunk-L5OKM2VX.js";
33
+ import {
34
+ humanInputRequestFromEvent,
35
+ projectPendingHumanInputRequests
36
+ } from "./chunk-IZV5FTJC.js";
35
37
  import {
36
38
  toolDisplayName
37
39
  } from "./chunk-T46QZH3E.js";
@@ -41,8 +43,8 @@ import {
41
43
  shouldSteerOnKey,
42
44
  shouldSubmitOnKey,
43
45
  useComposer
44
- } from "./chunk-PBCZL4JP.js";
45
- import "./chunk-LVS3MH5T.js";
46
+ } from "./chunk-INIZSNXT.js";
47
+ import "./chunk-ATIRUHBZ.js";
46
48
  import "./chunk-QHUE7E4N.js";
47
49
  import "./chunk-CM7LVUKC.js";
48
50
  import "./chunk-XTD7TZHW.js";
@@ -0,0 +1,10 @@
1
+ import type { SessionEvent } from "@opengeni/sdk";
2
+ export type LabScenarioId = "answer" | "working" | "needs-you" | "history" | "failure" | "long";
3
+ export interface LabScenario {
4
+ id: LabScenarioId;
5
+ title: string;
6
+ events: SessionEvent[];
7
+ /** Whether the session is currently running a turn. */
8
+ running: boolean;
9
+ }
10
+ export declare function labScenarios(): LabScenario[];
@@ -0,0 +1,303 @@
1
+ "use client";
2
+
3
+ // src/testing/session-scenarios.ts
4
+ function recorder(sessionId) {
5
+ const events = [];
6
+ let clock = Date.parse("2026-10-03T09:00:00Z");
7
+ const push = (type, payload, turnId, advanceMs = 2e3) => {
8
+ clock += advanceMs;
9
+ events.push({
10
+ id: `${sessionId}-evt-${events.length + 1}`,
11
+ workspaceId: "lab-workspace",
12
+ sessionId,
13
+ sequence: events.length + 1,
14
+ type,
15
+ payload,
16
+ turnId,
17
+ occurredAt: new Date(clock).toISOString()
18
+ });
19
+ };
20
+ const tool = (turnId, id, name, args, output, durationMs = 3e3) => {
21
+ push("agent.toolCall.created", { id, name, arguments: args }, turnId, 800);
22
+ if (output !== void 0) push("agent.toolCall.output", { id, output }, turnId, durationMs);
23
+ };
24
+ return { events, push, tool };
25
+ }
26
+ function answer() {
27
+ const r = recorder("lab-answer");
28
+ const t = "turn-answer";
29
+ r.push(
30
+ "user.message",
31
+ { text: "What's the difference between a retry and a resume for a failed run?" },
32
+ t
33
+ );
34
+ r.push("turn.started", {}, t, 400);
35
+ r.push(
36
+ "agent.reasoning.delta",
37
+ { text: "The user wants a crisp conceptual distinction, with an example." },
38
+ t,
39
+ 1500
40
+ );
41
+ const text = [
42
+ "**Retry** starts the failed step again from its last durable checkpoint. **Resume** continues the whole run from where it paused, keeping everything already done.",
43
+ "",
44
+ "### When to use which",
45
+ "",
46
+ "- **Retry** when a single step failed for a transient reason (timeout, rate limit).",
47
+ "- **Resume** when the run was *waiting* \u2014 for an approval, an answer, or capacity.",
48
+ "",
49
+ "```bash",
50
+ "opengeni sessions retry 7f3c --step build",
51
+ "```",
52
+ "",
53
+ "Neither replays side effects that already succeeded."
54
+ ].join("\n");
55
+ r.push("agent.message.delta", { text }, t, 2500);
56
+ r.push("agent.message.completed", { text }, t, 300);
57
+ r.push("turn.completed", { output: text }, t, 200);
58
+ return { id: "answer", title: "Quick answer", events: r.events, running: false };
59
+ }
60
+ function working() {
61
+ const r = recorder("lab-working");
62
+ const t = "turn-working";
63
+ r.push(
64
+ "user.message",
65
+ {
66
+ text: "The checkout tests started failing after the currency change. Can you find out why and fix it?"
67
+ },
68
+ t
69
+ );
70
+ r.push("turn.started", {}, t, 400);
71
+ r.push(
72
+ "agent.reasoning.delta",
73
+ { text: "Start by reproducing the failure, then narrow to the currency formatting path." },
74
+ t,
75
+ 1800
76
+ );
77
+ r.tool(
78
+ t,
79
+ "c1",
80
+ "exec_command",
81
+ { cmd: "bun test checkout" },
82
+ "3 failed, 41 passed\n\u2717 formats totals in NOK\n\u2717 rounds VAT per line\n\u2717 shows discount",
83
+ 6e3
84
+ );
85
+ r.tool(
86
+ t,
87
+ "c2",
88
+ "search_files",
89
+ { query: "formatCurrency(" },
90
+ "src/money/format.ts:12\nsrc/checkout/summary.tsx:48\nsrc/checkout/line.tsx:31"
91
+ );
92
+ r.push(
93
+ "agent.message.delta",
94
+ {
95
+ text: "Found it: the currency change switched to minor units, but the summary still divides by 100.",
96
+ phase: "commentary"
97
+ },
98
+ t,
99
+ 1200
100
+ );
101
+ r.push(
102
+ "agent.message.completed",
103
+ {
104
+ text: "Found it: the currency change switched to minor units, but the summary still divides by 100.",
105
+ phase: "commentary"
106
+ },
107
+ t,
108
+ 200
109
+ );
110
+ r.tool(t, "c3", "apply_patch", { path: "src/checkout/summary.tsx" }, "Updated 1 file (+3 \u22125)");
111
+ r.tool(t, "c4", "exec_command", { cmd: "bun test checkout" });
112
+ return { id: "working", title: "Working", events: r.events, running: true };
113
+ }
114
+ function needsYou() {
115
+ const r = recorder("lab-needs-you");
116
+ const t = "turn-needs-you";
117
+ r.push("user.message", { text: "Ship the fix to the preview environment and tell the team." }, t);
118
+ r.push("turn.started", {}, t, 400);
119
+ r.tool(t, "n1", "exec_command", { cmd: "bun run build" }, "Build completed in 41s", 8e3);
120
+ r.tool(t, "n2", "list_channels", { query: "release" }, "#releases, #release-ops");
121
+ r.push(
122
+ "agent.toolCall.created",
123
+ {
124
+ id: "n3",
125
+ name: "deploy_preview",
126
+ arguments: { environment: "preview", ref: "fix/checkout-minor-units" }
127
+ },
128
+ t,
129
+ 900
130
+ );
131
+ r.push(
132
+ "session.requiresAction",
133
+ {
134
+ approvals: [
135
+ {
136
+ id: "n3",
137
+ name: "deploy_preview",
138
+ arguments: { environment: "preview", ref: "fix/checkout-minor-units" }
139
+ }
140
+ ]
141
+ },
142
+ t,
143
+ 300
144
+ );
145
+ r.push(
146
+ "session.humanInput.requested",
147
+ {
148
+ request: {
149
+ id: "hi-1",
150
+ allowSkip: true,
151
+ questions: [
152
+ {
153
+ id: "channel",
154
+ kind: "single_select",
155
+ prompt: "Where should I announce the preview?",
156
+ label: "Announcement",
157
+ required: true,
158
+ options: [
159
+ { id: "releases", label: "#releases", description: "Team-wide release notes" },
160
+ { id: "release-ops", label: "#release-ops", description: "Operators only" }
161
+ ]
162
+ }
163
+ ]
164
+ }
165
+ },
166
+ t,
167
+ 300
168
+ );
169
+ return { id: "needs-you", title: "Needs you", events: r.events, running: true };
170
+ }
171
+ function history() {
172
+ const r = recorder("lab-history");
173
+ const a = "turn-h1";
174
+ r.push("user.message", { text: "Summarise yesterday's support tickets." }, a);
175
+ r.push("turn.started", {}, a, 400);
176
+ r.tool(a, "h1", "search_tickets", { since: "yesterday" }, "38 tickets", 4e3);
177
+ r.tool(a, "h2", "read_ticket", { id: "T-1182" }, "Customer cannot export invoices to PDF");
178
+ r.tool(a, "h3", "read_ticket", { id: "T-1190" }, "Login loop on Android 15");
179
+ const summary = "38 tickets yesterday. The two themes:\n\n1. **PDF export** fails for invoices with attachments (11 tickets).\n2. **Android login loop** after the last release (7 tickets).\n\nEverything else was routine.";
180
+ r.push("agent.message.delta", { text: summary }, a, 2e3);
181
+ r.push("agent.message.completed", { text: summary }, a, 200);
182
+ r.push("turn.completed", { output: summary }, a, 200);
183
+ const b = "turn-h2";
184
+ r.push(
185
+ "user.message",
186
+ { text: "Open an issue for the Android one and assign it to mobile." },
187
+ b,
188
+ 6e4
189
+ );
190
+ r.push("turn.started", {}, b, 400);
191
+ r.tool(
192
+ b,
193
+ "h4",
194
+ "create_issue",
195
+ { title: "Android login loop after release", team: "mobile" },
196
+ "Error: tracker token expired",
197
+ 2e3
198
+ );
199
+ r.push(
200
+ "turn.failed",
201
+ { error: "The issue tracker connection needs to be reauthorized." },
202
+ b,
203
+ 400
204
+ );
205
+ const c = "turn-h3";
206
+ r.push("user.message", { text: "Reconnected. Try again." }, c, 3e4);
207
+ r.push("turn.started", {}, c, 400);
208
+ r.tool(
209
+ c,
210
+ "h5",
211
+ "create_issue",
212
+ { title: "Android login loop after release", team: "mobile" },
213
+ "Created MOB-412",
214
+ 2e3
215
+ );
216
+ const done = "Created **MOB-412** and assigned it to the mobile team.";
217
+ r.push("agent.message.delta", { text: done }, c, 1e3);
218
+ r.push("agent.message.completed", { text: done }, c, 200);
219
+ r.push("turn.completed", { output: done }, c, 200);
220
+ return { id: "history", title: "History", events: r.events, running: false };
221
+ }
222
+ function failure() {
223
+ const r = recorder("lab-failure");
224
+ const t = "turn-failure";
225
+ r.push("user.message", { text: "Deploy the latest build to staging." }, t);
226
+ r.push("turn.started", {}, t, 400);
227
+ r.tool(t, "f1", "exec_command", { cmd: "bun run build" }, "Build completed in 38s", 7e3);
228
+ r.tool(
229
+ t,
230
+ "f2",
231
+ "exec_command",
232
+ { cmd: "deploy --env staging" },
233
+ "error: staging cluster unreachable (connection refused after 3 attempts)",
234
+ 4e3
235
+ );
236
+ r.push(
237
+ "turn.failed",
238
+ { error: "The staging cluster refused the connection. Nothing was deployed." },
239
+ t,
240
+ 400
241
+ );
242
+ return { id: "failure", title: "Failure", events: r.events, running: false };
243
+ }
244
+ function longContent() {
245
+ const r = recorder("lab-long");
246
+ const t = "turn-long";
247
+ const question = [
248
+ "Here is the incident timeline from the on-call channel. Please turn it into a short postmortem with a summary, impact, root cause, a table of the timeline and the follow-ups.",
249
+ "",
250
+ "09:02 alerts fire for elevated 5xx on the checkout API; 09:05 on-call acknowledges; 09:11 rollback of release 412 starts; 09:19 error rate back to baseline; 09:40 root cause identified as a missing index after the orders migration; 10:15 index added and release 412 redeployed."
251
+ ].join("\n");
252
+ r.push("user.message", { text: question }, t);
253
+ r.push("turn.started", {}, t, 400);
254
+ r.push(
255
+ "agent.reasoning.delta",
256
+ { text: "Structure it as a standard postmortem with a timeline table." },
257
+ t,
258
+ 1500
259
+ );
260
+ const text = [
261
+ "## Postmortem: checkout 5xx after release 412",
262
+ "",
263
+ "**Summary.** For 17 minutes the checkout API returned elevated server errors after release 412. Rolling back restored service; the fix shipped the same morning.",
264
+ "",
265
+ "**Impact.** Roughly 6% of checkout attempts failed between 09:02 and 09:19. No orders were lost, but some customers had to retry.",
266
+ "",
267
+ "**Root cause.** The orders migration in release 412 dropped and recreated a table without its `customer_id` index, so a hot query fell back to a sequential scan and timed out under load.",
268
+ "",
269
+ "### Timeline",
270
+ "",
271
+ "| Time | Event |",
272
+ "| --- | --- |",
273
+ "| 09:02 | Alerts fire for elevated 5xx on checkout |",
274
+ "| 09:05 | On-call acknowledges |",
275
+ "| 09:11 | Rollback of release 412 starts |",
276
+ "| 09:19 | Error rate back to baseline |",
277
+ "| 09:40 | Missing index identified |",
278
+ "| 10:15 | Index added, release 412 redeployed |",
279
+ "",
280
+ "### Follow-ups",
281
+ "",
282
+ "1. Add a migration check that fails when an index disappears.",
283
+ "2. Alert on query latency, not only error rate.",
284
+ "3. Document the rollback runbook link in the alert itself.",
285
+ "",
286
+ "```sql",
287
+ "CREATE INDEX CONCURRENTLY orders_customer_id_idx ON orders (customer_id);",
288
+ "```",
289
+ "",
290
+ "> Rollback was the right first move: it bought time to find the cause without pressure."
291
+ ].join("\n");
292
+ r.push("agent.message.delta", { text }, t, 3e3);
293
+ r.push("agent.message.completed", { text }, t, 300);
294
+ r.push("turn.completed", { output: text }, t, 200);
295
+ return { id: "long", title: "Long content", events: r.events, running: false };
296
+ }
297
+ function labScenarios() {
298
+ return [answer(), working(), needsYou(), history(), failure(), longContent()];
299
+ }
300
+ export {
301
+ labScenarios
302
+ };
303
+ //# sourceMappingURL=session-scenarios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/testing/session-scenarios.ts"],"sourcesContent":["// Deterministic session scenarios for visual harnesses (web dev gallery and native lab).\n// They use the same durable event shapes a live session produces, so every renderer\n// replays identical input through the official projection with no model calls.\nimport type { SessionEvent } from \"@opengeni/sdk\";\n\nexport type LabScenarioId = \"answer\" | \"working\" | \"needs-you\" | \"history\" | \"failure\" | \"long\";\n\nexport interface LabScenario {\n id: LabScenarioId;\n title: string;\n events: SessionEvent[];\n /** Whether the session is currently running a turn. */\n running: boolean;\n}\n\nfunction recorder(sessionId: string) {\n const events: SessionEvent[] = [];\n let clock = Date.parse(\"2026-10-03T09:00:00Z\");\n const push = (type: string, payload: unknown, turnId: string | null, advanceMs = 2_000) => {\n clock += advanceMs;\n events.push({\n id: `${sessionId}-evt-${events.length + 1}`,\n workspaceId: \"lab-workspace\",\n sessionId,\n sequence: events.length + 1,\n type,\n payload,\n turnId,\n occurredAt: new Date(clock).toISOString(),\n } as SessionEvent);\n };\n const tool = (\n turnId: string,\n id: string,\n name: string,\n args: unknown,\n output?: unknown,\n durationMs = 3_000,\n ) => {\n push(\"agent.toolCall.created\", { id, name, arguments: args }, turnId, 800);\n if (output !== undefined) push(\"agent.toolCall.output\", { id, output }, turnId, durationMs);\n };\n return { events, push, tool };\n}\n\nfunction answer(): LabScenario {\n const r = recorder(\"lab-answer\");\n const t = \"turn-answer\";\n r.push(\n \"user.message\",\n { text: \"What's the difference between a retry and a resume for a failed run?\" },\n t,\n );\n r.push(\"turn.started\", {}, t, 400);\n r.push(\n \"agent.reasoning.delta\",\n { text: \"The user wants a crisp conceptual distinction, with an example.\" },\n t,\n 1_500,\n );\n const text = [\n \"**Retry** starts the failed step again from its last durable checkpoint. **Resume** continues the whole run from where it paused, keeping everything already done.\",\n \"\",\n \"### When to use which\",\n \"\",\n \"- **Retry** when a single step failed for a transient reason (timeout, rate limit).\",\n \"- **Resume** when the run was *waiting* — for an approval, an answer, or capacity.\",\n \"\",\n \"```bash\",\n \"opengeni sessions retry 7f3c --step build\",\n \"```\",\n \"\",\n \"Neither replays side effects that already succeeded.\",\n ].join(\"\\n\");\n r.push(\"agent.message.delta\", { text }, t, 2_500);\n r.push(\"agent.message.completed\", { text }, t, 300);\n r.push(\"turn.completed\", { output: text }, t, 200);\n return { id: \"answer\", title: \"Quick answer\", events: r.events, running: false };\n}\n\nfunction working(): LabScenario {\n const r = recorder(\"lab-working\");\n const t = \"turn-working\";\n r.push(\n \"user.message\",\n {\n text: \"The checkout tests started failing after the currency change. Can you find out why and fix it?\",\n },\n t,\n );\n r.push(\"turn.started\", {}, t, 400);\n r.push(\n \"agent.reasoning.delta\",\n { text: \"Start by reproducing the failure, then narrow to the currency formatting path.\" },\n t,\n 1_800,\n );\n r.tool(\n t,\n \"c1\",\n \"exec_command\",\n { cmd: \"bun test checkout\" },\n \"3 failed, 41 passed\\n✗ formats totals in NOK\\n✗ rounds VAT per line\\n✗ shows discount\",\n 6_000,\n );\n r.tool(\n t,\n \"c2\",\n \"search_files\",\n { query: \"formatCurrency(\" },\n \"src/money/format.ts:12\\nsrc/checkout/summary.tsx:48\\nsrc/checkout/line.tsx:31\",\n );\n r.push(\n \"agent.message.delta\",\n {\n text: \"Found it: the currency change switched to minor units, but the summary still divides by 100.\",\n phase: \"commentary\",\n },\n t,\n 1_200,\n );\n r.push(\n \"agent.message.completed\",\n {\n text: \"Found it: the currency change switched to minor units, but the summary still divides by 100.\",\n phase: \"commentary\",\n },\n t,\n 200,\n );\n r.tool(t, \"c3\", \"apply_patch\", { path: \"src/checkout/summary.tsx\" }, \"Updated 1 file (+3 −5)\");\n r.tool(t, \"c4\", \"exec_command\", { cmd: \"bun test checkout\" });\n return { id: \"working\", title: \"Working\", events: r.events, running: true };\n}\n\nfunction needsYou(): LabScenario {\n const r = recorder(\"lab-needs-you\");\n const t = \"turn-needs-you\";\n r.push(\"user.message\", { text: \"Ship the fix to the preview environment and tell the team.\" }, t);\n r.push(\"turn.started\", {}, t, 400);\n r.tool(t, \"n1\", \"exec_command\", { cmd: \"bun run build\" }, \"Build completed in 41s\", 8_000);\n r.tool(t, \"n2\", \"list_channels\", { query: \"release\" }, \"#releases, #release-ops\");\n r.push(\n \"agent.toolCall.created\",\n {\n id: \"n3\",\n name: \"deploy_preview\",\n arguments: { environment: \"preview\", ref: \"fix/checkout-minor-units\" },\n },\n t,\n 900,\n );\n r.push(\n \"session.requiresAction\",\n {\n approvals: [\n {\n id: \"n3\",\n name: \"deploy_preview\",\n arguments: { environment: \"preview\", ref: \"fix/checkout-minor-units\" },\n },\n ],\n },\n t,\n 300,\n );\n r.push(\n \"session.humanInput.requested\",\n {\n request: {\n id: \"hi-1\",\n allowSkip: true,\n questions: [\n {\n id: \"channel\",\n kind: \"single_select\",\n prompt: \"Where should I announce the preview?\",\n label: \"Announcement\",\n required: true,\n options: [\n { id: \"releases\", label: \"#releases\", description: \"Team-wide release notes\" },\n { id: \"release-ops\", label: \"#release-ops\", description: \"Operators only\" },\n ],\n },\n ],\n },\n },\n t,\n 300,\n );\n return { id: \"needs-you\", title: \"Needs you\", events: r.events, running: true };\n}\n\nfunction history(): LabScenario {\n const r = recorder(\"lab-history\");\n const a = \"turn-h1\";\n r.push(\"user.message\", { text: \"Summarise yesterday's support tickets.\" }, a);\n r.push(\"turn.started\", {}, a, 400);\n r.tool(a, \"h1\", \"search_tickets\", { since: \"yesterday\" }, \"38 tickets\", 4_000);\n r.tool(a, \"h2\", \"read_ticket\", { id: \"T-1182\" }, \"Customer cannot export invoices to PDF\");\n r.tool(a, \"h3\", \"read_ticket\", { id: \"T-1190\" }, \"Login loop on Android 15\");\n const summary =\n \"38 tickets yesterday. The two themes:\\n\\n1. **PDF export** fails for invoices with attachments (11 tickets).\\n2. **Android login loop** after the last release (7 tickets).\\n\\nEverything else was routine.\";\n r.push(\"agent.message.delta\", { text: summary }, a, 2_000);\n r.push(\"agent.message.completed\", { text: summary }, a, 200);\n r.push(\"turn.completed\", { output: summary }, a, 200);\n const b = \"turn-h2\";\n r.push(\n \"user.message\",\n { text: \"Open an issue for the Android one and assign it to mobile.\" },\n b,\n 60_000,\n );\n r.push(\"turn.started\", {}, b, 400);\n r.tool(\n b,\n \"h4\",\n \"create_issue\",\n { title: \"Android login loop after release\", team: \"mobile\" },\n \"Error: tracker token expired\",\n 2_000,\n );\n r.push(\n \"turn.failed\",\n { error: \"The issue tracker connection needs to be reauthorized.\" },\n b,\n 400,\n );\n const c = \"turn-h3\";\n r.push(\"user.message\", { text: \"Reconnected. Try again.\" }, c, 30_000);\n r.push(\"turn.started\", {}, c, 400);\n r.tool(\n c,\n \"h5\",\n \"create_issue\",\n { title: \"Android login loop after release\", team: \"mobile\" },\n \"Created MOB-412\",\n 2_000,\n );\n const done = \"Created **MOB-412** and assigned it to the mobile team.\";\n r.push(\"agent.message.delta\", { text: done }, c, 1_000);\n r.push(\"agent.message.completed\", { text: done }, c, 200);\n r.push(\"turn.completed\", { output: done }, c, 200);\n return { id: \"history\", title: \"History\", events: r.events, running: false };\n}\n\nfunction failure(): LabScenario {\n const r = recorder(\"lab-failure\");\n const t = \"turn-failure\";\n r.push(\"user.message\", { text: \"Deploy the latest build to staging.\" }, t);\n r.push(\"turn.started\", {}, t, 400);\n r.tool(t, \"f1\", \"exec_command\", { cmd: \"bun run build\" }, \"Build completed in 38s\", 7_000);\n r.tool(\n t,\n \"f2\",\n \"exec_command\",\n { cmd: \"deploy --env staging\" },\n \"error: staging cluster unreachable (connection refused after 3 attempts)\",\n 4_000,\n );\n r.push(\n \"turn.failed\",\n { error: \"The staging cluster refused the connection. Nothing was deployed.\" },\n t,\n 400,\n );\n return { id: \"failure\", title: \"Failure\", events: r.events, running: false };\n}\n\nfunction longContent(): LabScenario {\n const r = recorder(\"lab-long\");\n const t = \"turn-long\";\n const question = [\n \"Here is the incident timeline from the on-call channel. Please turn it into a short postmortem with a summary, impact, root cause, a table of the timeline and the follow-ups.\",\n \"\",\n \"09:02 alerts fire for elevated 5xx on the checkout API; 09:05 on-call acknowledges; 09:11 rollback of release 412 starts; 09:19 error rate back to baseline; 09:40 root cause identified as a missing index after the orders migration; 10:15 index added and release 412 redeployed.\",\n ].join(\"\\n\");\n r.push(\"user.message\", { text: question }, t);\n r.push(\"turn.started\", {}, t, 400);\n r.push(\n \"agent.reasoning.delta\",\n { text: \"Structure it as a standard postmortem with a timeline table.\" },\n t,\n 1_500,\n );\n const text = [\n \"## Postmortem: checkout 5xx after release 412\",\n \"\",\n \"**Summary.** For 17 minutes the checkout API returned elevated server errors after release 412. Rolling back restored service; the fix shipped the same morning.\",\n \"\",\n \"**Impact.** Roughly 6% of checkout attempts failed between 09:02 and 09:19. No orders were lost, but some customers had to retry.\",\n \"\",\n \"**Root cause.** The orders migration in release 412 dropped and recreated a table without its `customer_id` index, so a hot query fell back to a sequential scan and timed out under load.\",\n \"\",\n \"### Timeline\",\n \"\",\n \"| Time | Event |\",\n \"| --- | --- |\",\n \"| 09:02 | Alerts fire for elevated 5xx on checkout |\",\n \"| 09:05 | On-call acknowledges |\",\n \"| 09:11 | Rollback of release 412 starts |\",\n \"| 09:19 | Error rate back to baseline |\",\n \"| 09:40 | Missing index identified |\",\n \"| 10:15 | Index added, release 412 redeployed |\",\n \"\",\n \"### Follow-ups\",\n \"\",\n \"1. Add a migration check that fails when an index disappears.\",\n \"2. Alert on query latency, not only error rate.\",\n \"3. Document the rollback runbook link in the alert itself.\",\n \"\",\n \"```sql\",\n \"CREATE INDEX CONCURRENTLY orders_customer_id_idx ON orders (customer_id);\",\n \"```\",\n \"\",\n \"> Rollback was the right first move: it bought time to find the cause without pressure.\",\n ].join(\"\\n\");\n r.push(\"agent.message.delta\", { text }, t, 3_000);\n r.push(\"agent.message.completed\", { text }, t, 300);\n r.push(\"turn.completed\", { output: text }, t, 200);\n return { id: \"long\", title: \"Long content\", events: r.events, running: false };\n}\n\nexport function labScenarios(): LabScenario[] {\n return [answer(), working(), needsYou(), history(), failure(), longContent()];\n}\n"],"mappings":";;;AAeA,SAAS,SAAS,WAAmB;AACnC,QAAM,SAAyB,CAAC;AAChC,MAAI,QAAQ,KAAK,MAAM,sBAAsB;AAC7C,QAAM,OAAO,CAAC,MAAc,SAAkB,QAAuB,YAAY,QAAU;AACzF,aAAS;AACT,WAAO,KAAK;AAAA,MACV,IAAI,GAAG,SAAS,QAAQ,OAAO,SAAS,CAAC;AAAA,MACzC,aAAa;AAAA,MACb;AAAA,MACA,UAAU,OAAO,SAAS;AAAA,MAC1B;AAAA,MACA;AAAA,MACA;AAAA,MACA,YAAY,IAAI,KAAK,KAAK,EAAE,YAAY;AAAA,IAC1C,CAAiB;AAAA,EACnB;AACA,QAAM,OAAO,CACX,QACA,IACA,MACA,MACA,QACA,aAAa,QACV;AACH,SAAK,0BAA0B,EAAE,IAAI,MAAM,WAAW,KAAK,GAAG,QAAQ,GAAG;AACzE,QAAI,WAAW,OAAW,MAAK,yBAAyB,EAAE,IAAI,OAAO,GAAG,QAAQ,UAAU;AAAA,EAC5F;AACA,SAAO,EAAE,QAAQ,MAAM,KAAK;AAC9B;AAEA,SAAS,SAAsB;AAC7B,QAAM,IAAI,SAAS,YAAY;AAC/B,QAAM,IAAI;AACV,IAAE;AAAA,IACA;AAAA,IACA,EAAE,MAAM,uEAAuE;AAAA,IAC/E;AAAA,EACF;AACA,IAAE,KAAK,gBAAgB,CAAC,GAAG,GAAG,GAAG;AACjC,IAAE;AAAA,IACA;AAAA,IACA,EAAE,MAAM,kEAAkE;AAAA,IAC1E;AAAA,IACA;AAAA,EACF;AACA,QAAM,OAAO;AAAA,IACX;AAAA,IACA;AAAA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A,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,KAAK,IAAI;AACX,IAAE,KAAK,uBAAuB,EAAE,KAAK,GAAG,GAAG,GAAK;AAChD,IAAE,KAAK,2BAA2B,EAAE,KAAK,GAAG,GAAG,GAAG;AAClD,IAAE,KAAK,kBAAkB,EAAE,QAAQ,KAAK,GAAG,GAAG,GAAG;AACjD,SAAO,EAAE,IAAI,QAAQ,OAAO,gBAAgB,QAAQ,EAAE,QAAQ,SAAS,MAAM;AAC/E;AAEO,SAAS,eAA8B;AAC5C,SAAO,CAAC,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,CAAC;AAC9E;","names":[]}
@@ -0,0 +1,3 @@
1
+ /** Decorative loading copy shared by every renderer of the preparing state. */
2
+ export declare const GENIE_PREPARING_PHRASES: readonly string[];
3
+ export declare const GENIE_WAITING_PHRASES: readonly string[];
@@ -25,6 +25,17 @@ export type GenieLoadingOptions = {
25
25
  };
26
26
  };
27
27
  export declare const GenieLoadingOptionsContext: import("react").Context<GenieLoadingOptions | undefined>;
28
+ /**
29
+ * Neutral defaults for conversations embedded in another product
30
+ * (`SessionConversation`, `OpenGeniChat`), which should not carry Opengeni's
31
+ * own playful copy. The Opengeni app keeps the defaults above.
32
+ */
33
+ export declare const EMBEDDED_GENIE_LOADING: {
34
+ readonly phrases: readonly ["Thinking…"];
35
+ readonly messages: {
36
+ readonly showDetails: "Show details";
37
+ };
38
+ };
28
39
  /** Decorative copy never substitutes for a failure or claims measurable progress. */
29
40
  export declare function GenieLoading({ startedAt, phase, onShowDetails, detailsOpen, notice, }: {
30
41
  startedAt: string;
@@ -4,7 +4,7 @@ export type { ActivityItem, AgentMessageItem, AuthNeededItem, ContextCompactionI
4
4
  export { createToolRegistry, rawTypeOf } from "./registry.js";
5
5
  export { createSessionRetainedScreenshotLoader, createWorkspaceRetainedArtifactLoader, createWorkspaceRetainedVideoLoader, } from "./retained-loaders.js";
6
6
  export type { RetainedArtifactLoaderClient, RetainedScreenshotLoaderClient, RetainedVideoLoaderClient, } from "./retained-loaders.js";
7
- export type { CreateToolRegistryOptions, RetainedArtifactLoader, RetainedScreenshotLoader, VideoArtifactPlaybackLoader, ToolRegistry, ToolRegistryEntry, ToolRenderer, ToolRendererProps, } from "./registry.js";
7
+ export type { CreateToolRegistryOptions, RetainedArtifactLoader, RetainedArtifactLoadOptions, RetainedScreenshotLoader, VideoArtifactPlaybackLoader, ToolRegistry, ToolRegistryEntry, ToolRenderer, ToolRendererProps, } from "./registry.js";
8
8
  export { createDefaultToolRegistry, defaultToolRegistry } from "./tool-renderers.js";
9
9
  export { ActivityRail } from "./activity-rail.js";
10
10
  export type { ActivityRailProps } from "./activity-rail.js";
@@ -0,0 +1,7 @@
1
+ import type { NoticeItem } from "./types.js";
2
+ /** An approval notice the person has since answered. */
3
+ export declare function noticeIsResolvedApproval(item: Pick<NoticeItem, "text" | "resolvedAt">): boolean;
4
+ /** A resolved approval notice reads as history. */
5
+ export declare function noticeDisplayText(item: Pick<NoticeItem, "text" | "resolvedAt">): string;
6
+ /** Notice pill tone: failures stay red, an open wait keeps the waiting hue. */
7
+ export declare function noticeTone(item: Pick<NoticeItem, "tone" | "resolvedAt">): "failed" | "waiting" | "neutral";
@@ -0,0 +1,18 @@
1
+ import type { RetainedArtifactReference } from "@opengeni/sdk";
2
+ import type { RetainedArtifactLoader } from "./registry.js";
3
+ export { isPatchFilename } from "./presented-image.js";
4
+ /** One command that downloads this patch and applies it in the current folder. */
5
+ export declare function patchApplyCommand(url: string): string;
6
+ /** "5 minutes" from the signed URL's expiry; the default download URL lifetime otherwise. */
7
+ export declare function applyCommandLifetime(expiresAt: string | undefined, now?: number): string;
8
+ /**
9
+ * "Copy command to apply these changes": mints the existing short-lived,
10
+ * authenticated download URL for this published patch (the same authority as
11
+ * Download) and copies `curl -fsSL '<url>' | git apply`. The URL is minted on
12
+ * click, so the copied command works for the URL's lifetime only.
13
+ */
14
+ export declare function PatchApplyCommand({ artifact, filename, load, }: {
15
+ artifact: RetainedArtifactReference;
16
+ filename: string;
17
+ load: RetainedArtifactLoader | undefined;
18
+ }): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { SandboxItem, StartupPhaseItem, WorkerItem } from "./types.js";
2
+ export declare function sandboxRowTitle(item: SandboxItem, displayName: (name: string) => string): string;
3
+ export declare function startupPhaseTitle(phase: StartupPhaseItem["phase"], status: StartupPhaseItem["status"], outcome: StartupPhaseItem["outcome"]): string;
4
+ export declare const STARTUP_WAIT_TITLES: Record<NonNullable<StartupPhaseItem["blockedReason"]>, string>;
5
+ export declare function startupDuration(durationMs: number | null): string | null;
6
+ /** The worker step title for a spawn or message, by status. */
7
+ export declare function workerRowTitle(item: Pick<WorkerItem, "action" | "status">): string;
@@ -1,6 +1,11 @@
1
1
  import type { ActivityItem, TimelineGroup } from "./types.js";
2
2
  /** Shared browser preview allowlist; other published files remain downloads. */
3
3
  export declare function isRetainedImageContentType(contentType: string): boolean;
4
- /** Deliberately published images are primary output, not incidental screenshots. */
4
+ /** A published patch, applied locally with `git apply`. */
5
+ export declare function isPatchFilename(filename: string): boolean;
6
+ /**
7
+ * Deliberately published images and patches are primary output, not
8
+ * incidental screenshots or work files.
9
+ */
5
10
  export declare function activityPresentsImage(items: readonly ActivityItem[]): boolean;
6
11
  export declare function timelineGroupContainsPresentedImage(group: TimelineGroup): boolean;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * "Back to your message": which prompt the reader is reading the answer to, and
3
+ * whether that prompt has scrolled out of view. Renderer-neutral geometry so
4
+ * the web timeline (DOM rects) and native timelines (layout offsets) agree.
5
+ */
6
+ /** How far above the viewport a prompt must be before the pill appears. */
7
+ export declare const QUESTION_NAV_HIDDEN_PX = 24;
8
+ /** Breathing room above the question when the reader jumps back to it. */
9
+ export declare const QUESTION_NAV_MARGIN_PX = 12;
10
+ export type QuestionNavPrompt = {
11
+ key: string;
12
+ top: number;
13
+ bottom: number;
14
+ };
15
+ /**
16
+ * The last prompt before the reading position (the viewport's middle) owns the
17
+ * response in view; it is a target only once it has scrolled fully above the
18
+ * viewport. Prompts are in document order; coordinates share one axis.
19
+ */
20
+ export declare function questionNavTarget(prompts: readonly QuestionNavPrompt[], view: {
21
+ top: number;
22
+ height: number;
23
+ }): string | null;
@@ -7,9 +7,18 @@ export type ToolRendererProps = {
7
7
  loadRetainedArtifact?: RetainedArtifactLoader | undefined;
8
8
  };
9
9
  export type RetainedScreenshotLoader = (artifact: RetainedArtifactReference, signal: AbortSignal) => Promise<Uint8Array | null>;
10
- export type RetainedArtifactLoader = (artifact: RetainedArtifactReference, signal: AbortSignal) => Promise<Uint8Array | {
10
+ export type RetainedArtifactLoader = (artifact: RetainedArtifactReference, signal: AbortSignal, options?: RetainedArtifactLoadOptions) => Promise<Uint8Array | {
11
11
  url: string;
12
+ expiresAt?: string | undefined;
12
13
  } | null>;
14
+ export type RetainedArtifactLoadOptions = {
15
+ /**
16
+ * Ask for a short-lived download URL instead of bytes, for example to build a
17
+ * copyable `curl … | git apply` command. A loader that cannot mint one may
18
+ * still return bytes; callers must handle that.
19
+ */
20
+ prefer?: "url" | undefined;
21
+ };
13
22
  /** Mint an expiring source for native browser playback without loading video bytes in JS. */
14
23
  export type VideoArtifactPlaybackLoader = (artifactId: string, signal: AbortSignal) => Promise<VideoArtifactPlaybackSource>;
15
24
  export type ToolRenderer = ComponentType<ToolRendererProps>;
@@ -10,7 +10,7 @@ export type RetainedVideoLoaderClient = Pick<OpenGeniClient, "createVideoArtifac
10
10
  * Bind permanent retained-artifact retrieval (generated images, published
11
11
  * files) to one authenticated workspace, for `MessageTimeline`'s
12
12
  * `loadRetainedArtifact`. Images get a short-lived URL; files are assembled
13
- * from verified byte ranges.
13
+ * from verified byte ranges unless the caller asks for a URL.
14
14
  */
15
15
  export declare function createWorkspaceRetainedArtifactLoader(client: RetainedArtifactLoaderClient, workspaceId: string): RetainedArtifactLoader;
16
16
  /**