@athenaintel/react 0.42.2 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (685) hide show
  1. package/README.md +225 -3
  2. package/dist/agent-runtime/src/answer-label.cjs +137 -0
  3. package/dist/agent-runtime/src/answer-label.cjs.map +1 -0
  4. package/dist/agent-runtime/src/answer-label.d.ts +104 -0
  5. package/dist/agent-runtime/src/answer-label.js +137 -0
  6. package/dist/agent-runtime/src/answer-label.js.map +1 -0
  7. package/dist/agent-runtime/src/answer-rows.cjs +180 -0
  8. package/dist/agent-runtime/src/answer-rows.cjs.map +1 -0
  9. package/dist/agent-runtime/src/answer-rows.d.ts +86 -0
  10. package/dist/agent-runtime/src/answer-rows.js +180 -0
  11. package/dist/agent-runtime/src/answer-rows.js.map +1 -0
  12. package/dist/agent-runtime/src/client-tool-bridge.cjs +15 -15
  13. package/dist/agent-runtime/src/client-tool-bridge.cjs.map +1 -1
  14. package/dist/agent-runtime/src/conversation-index.cjs +8 -8
  15. package/dist/agent-runtime/src/conversation-index.cjs.map +1 -1
  16. package/dist/agent-runtime/src/conversation-list-groups.d.ts +74 -0
  17. package/dist/agent-runtime/src/decision-checks.cjs +207 -0
  18. package/dist/agent-runtime/src/decision-checks.cjs.map +1 -0
  19. package/dist/agent-runtime/src/decision-checks.d.ts +142 -0
  20. package/dist/agent-runtime/src/decision-checks.js +207 -0
  21. package/dist/agent-runtime/src/decision-checks.js.map +1 -0
  22. package/dist/agent-runtime/src/desktop-handoff.d.ts +12 -0
  23. package/dist/agent-runtime/src/errors.cjs +18 -0
  24. package/dist/agent-runtime/src/errors.cjs.map +1 -1
  25. package/dist/agent-runtime/src/errors.d.ts +7 -0
  26. package/dist/agent-runtime/src/errors.js +18 -0
  27. package/dist/agent-runtime/src/errors.js.map +1 -1
  28. package/dist/agent-runtime/src/generated/runconfig-contract.cjs +12 -0
  29. package/dist/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
  30. package/dist/agent-runtime/src/generated/runconfig-contract.d.ts +6 -6
  31. package/dist/agent-runtime/src/generated/runconfig-contract.js +12 -0
  32. package/dist/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
  33. package/dist/agent-runtime/src/handoff-arrival.cjs +60 -0
  34. package/dist/agent-runtime/src/handoff-arrival.cjs.map +1 -0
  35. package/dist/agent-runtime/src/handoff-arrival.d.ts +46 -0
  36. package/dist/agent-runtime/src/handoff-arrival.js +60 -0
  37. package/dist/agent-runtime/src/handoff-arrival.js.map +1 -0
  38. package/dist/agent-runtime/src/index.d.ts +15 -8
  39. package/dist/agent-runtime/src/interrupts.cjs +43 -18
  40. package/dist/agent-runtime/src/interrupts.cjs.map +1 -1
  41. package/dist/agent-runtime/src/interrupts.d.ts +19 -2
  42. package/dist/agent-runtime/src/interrupts.js +28 -3
  43. package/dist/agent-runtime/src/interrupts.js.map +1 -1
  44. package/dist/agent-runtime/src/lane-history.cjs +8 -8
  45. package/dist/agent-runtime/src/lane-history.cjs.map +1 -1
  46. package/dist/agent-runtime/src/messages.cjs +43 -8
  47. package/dist/agent-runtime/src/messages.cjs.map +1 -1
  48. package/dist/agent-runtime/src/messages.d.ts +25 -3
  49. package/dist/agent-runtime/src/messages.js +43 -8
  50. package/dist/agent-runtime/src/messages.js.map +1 -1
  51. package/dist/agent-runtime/src/offline-status.cjs +36 -0
  52. package/dist/agent-runtime/src/offline-status.cjs.map +1 -0
  53. package/dist/agent-runtime/src/offline-status.d.ts +118 -3
  54. package/dist/agent-runtime/src/offline-status.js +36 -0
  55. package/dist/agent-runtime/src/offline-status.js.map +1 -0
  56. package/dist/agent-runtime/src/queue.cjs +0 -9
  57. package/dist/agent-runtime/src/queue.cjs.map +1 -1
  58. package/dist/agent-runtime/src/queue.js +0 -9
  59. package/dist/agent-runtime/src/queue.js.map +1 -1
  60. package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs +9 -9
  61. package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -1
  62. package/dist/agent-runtime/src/runtime-catalog.cjs +42 -0
  63. package/dist/agent-runtime/src/runtime-catalog.cjs.map +1 -0
  64. package/dist/agent-runtime/src/runtime-catalog.d.ts +35 -0
  65. package/dist/agent-runtime/src/runtime-catalog.js +42 -0
  66. package/dist/agent-runtime/src/runtime-catalog.js.map +1 -0
  67. package/dist/agent-runtime/src/runtime-messages.cjs.map +1 -1
  68. package/dist/agent-runtime/src/runtime-messages.d.ts +1 -1
  69. package/dist/agent-runtime/src/runtime-messages.js.map +1 -1
  70. package/dist/agent-runtime/src/runtime.d.ts +40 -0
  71. package/dist/agent-runtime/src/statewire-suspended.cjs +3 -3
  72. package/dist/agent-runtime/src/statewire-suspended.cjs.map +1 -1
  73. package/dist/agent-runtime/src/subagents.cjs +32 -2
  74. package/dist/agent-runtime/src/subagents.cjs.map +1 -1
  75. package/dist/agent-runtime/src/subagents.d.ts +9 -0
  76. package/dist/agent-runtime/src/subagents.js +30 -0
  77. package/dist/agent-runtime/src/subagents.js.map +1 -1
  78. package/dist/agent-runtime/src/thread-driver.cjs +67 -0
  79. package/dist/agent-runtime/src/thread-driver.cjs.map +1 -0
  80. package/dist/agent-runtime/src/thread-driver.d.ts +49 -0
  81. package/dist/agent-runtime/src/thread-driver.js +67 -0
  82. package/dist/agent-runtime/src/thread-driver.js.map +1 -0
  83. package/dist/agent-runtime/src/thread-handoff-flow-machine.d.ts +172 -0
  84. package/dist/agent-runtime/src/thread-handoff-protocol.d.ts +756 -0
  85. package/dist/agent-runtime/src/thread-handoff-qr.d.ts +11 -0
  86. package/dist/agent-runtime/src/thread-handoff.d.ts +3 -364
  87. package/dist/agent-runtime/src/thread-status.cjs +3 -3
  88. package/dist/agent-runtime/src/thread-status.cjs.map +1 -1
  89. package/dist/agent-runtime/src/tool-metadata.cjs +210 -33
  90. package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -1
  91. package/dist/agent-runtime/src/tool-metadata.d.ts +12 -0
  92. package/dist/agent-runtime/src/tool-metadata.js +210 -33
  93. package/dist/agent-runtime/src/tool-metadata.js.map +1 -1
  94. package/dist/agent-runtime/src/tool-names.cjs +2 -0
  95. package/dist/agent-runtime/src/tool-names.cjs.map +1 -1
  96. package/dist/agent-runtime/src/tool-names.d.ts +2 -0
  97. package/dist/agent-runtime/src/tool-names.js +2 -0
  98. package/dist/agent-runtime/src/tool-names.js.map +1 -1
  99. package/dist/agent-runtime/src/types.d.ts +10 -2
  100. package/dist/agent-runtime/src/use-conversation-list.cjs +11 -11
  101. package/dist/agent-runtime/src/use-conversation-list.cjs.map +1 -1
  102. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs +24 -19
  103. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs.map +1 -1
  104. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.d.ts +2 -1
  105. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js +6 -1
  106. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js.map +1 -1
  107. package/dist/agent-runtime/src/use-deep-agent-config.cjs +14 -14
  108. package/dist/agent-runtime/src/use-deep-agent-config.cjs.map +1 -1
  109. package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs +6 -6
  110. package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -1
  111. package/dist/agent-runtime/src/use-deep-agent-runtime.cjs +16 -16
  112. package/dist/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -1
  113. package/dist/agent-runtime/src/use-deep-agent-thread.cjs +45 -45
  114. package/dist/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
  115. package/dist/agent-runtime/src/use-deep-agent-voice.cjs +572 -134
  116. package/dist/agent-runtime/src/use-deep-agent-voice.cjs.map +1 -1
  117. package/dist/agent-runtime/src/use-deep-agent-voice.d.ts +137 -10
  118. package/dist/agent-runtime/src/use-deep-agent-voice.js +514 -76
  119. package/dist/agent-runtime/src/use-deep-agent-voice.js.map +1 -1
  120. package/dist/agent-runtime/src/use-deep-agent-window-sync.cjs +26 -26
  121. package/dist/agent-runtime/src/use-deep-agent-window-sync.cjs.map +1 -1
  122. package/dist/agent-runtime/src/use-historical-edit-attachments.cjs +4 -4
  123. package/dist/agent-runtime/src/use-historical-edit-attachments.cjs.map +1 -1
  124. package/dist/agent-runtime/src/use-thread-handoff-flow.d.ts +28 -26
  125. package/dist/agent-runtime/src/voice-media.cjs +117 -0
  126. package/dist/agent-runtime/src/voice-media.cjs.map +1 -0
  127. package/dist/agent-runtime/src/voice-media.d.ts +49 -0
  128. package/dist/agent-runtime/src/voice-media.js +117 -0
  129. package/dist/agent-runtime/src/voice-media.js.map +1 -0
  130. package/dist/agent-runtime/src/voice-wire-types.d.ts +32 -0
  131. package/dist/assets/AssetPanel.cjs +11 -11
  132. package/dist/assets/AssetPanel.cjs.map +1 -1
  133. package/dist/assets/AthenaAssetEmbed.cjs +11 -9
  134. package/dist/assets/AthenaAssetEmbed.cjs.map +1 -1
  135. package/dist/assets/AthenaAssetEmbed.d.ts +7 -0
  136. package/dist/assets/AthenaAssetEmbed.js +4 -2
  137. package/dist/assets/AthenaAssetEmbed.js.map +1 -1
  138. package/dist/assets/AthenaLayout.cjs +16 -16
  139. package/dist/assets/AthenaLayout.cjs.map +1 -1
  140. package/dist/assets/use-asset-content.cjs +4 -4
  141. package/dist/assets/use-asset-content.cjs.map +1 -1
  142. package/dist/assets/use-asset-embed.cjs +14 -7
  143. package/dist/assets/use-asset-embed.cjs.map +1 -1
  144. package/dist/assets/use-asset-embed.d.ts +11 -1
  145. package/dist/assets/use-asset-embed.js +10 -3
  146. package/dist/assets/use-asset-embed.js.map +1 -1
  147. package/dist/auth/AthenaAuthContext.cjs +3 -3
  148. package/dist/auth/AthenaAuthContext.cjs.map +1 -1
  149. package/dist/auth/AthenaAuthProvider.cjs +8 -8
  150. package/dist/auth/AthenaAuthProvider.cjs.map +1 -1
  151. package/dist/auth/AthenaCredentialSourceContext.cjs +5 -5
  152. package/dist/auth/AthenaCredentialSourceContext.cjs.map +1 -1
  153. package/dist/auth/AthenaSSOProvider.cjs +14 -14
  154. package/dist/auth/AthenaSSOProvider.cjs.map +1 -1
  155. package/dist/auth/credential-source.cjs +26 -13
  156. package/dist/auth/credential-source.cjs.map +1 -1
  157. package/dist/auth/credential-source.d.ts +8 -0
  158. package/dist/auth/credential-source.js +26 -13
  159. package/dist/auth/credential-source.js.map +1 -1
  160. package/dist/catalog/agent-model-options.cjs +25 -17
  161. package/dist/catalog/agent-model-options.cjs.map +1 -1
  162. package/dist/catalog/agent-model-options.d.ts +38 -5
  163. package/dist/catalog/agent-model-options.js +25 -17
  164. package/dist/catalog/agent-model-options.js.map +1 -1
  165. package/dist/catalog/channel-refusal.cjs +36 -0
  166. package/dist/catalog/channel-refusal.cjs.map +1 -0
  167. package/dist/catalog/channel-refusal.d.ts +29 -0
  168. package/dist/catalog/channel-refusal.js +36 -0
  169. package/dist/catalog/channel-refusal.js.map +1 -0
  170. package/dist/catalog/chat-pickers.cjs +60 -24
  171. package/dist/catalog/chat-pickers.cjs.map +1 -1
  172. package/dist/catalog/chat-pickers.d.ts +12 -2
  173. package/dist/catalog/chat-pickers.js +56 -20
  174. package/dist/catalog/chat-pickers.js.map +1 -1
  175. package/dist/catalog/runtime-catalog.cjs +89 -23
  176. package/dist/catalog/runtime-catalog.cjs.map +1 -1
  177. package/dist/catalog/runtime-catalog.d.ts +8 -2
  178. package/dist/catalog/runtime-catalog.js +83 -17
  179. package/dist/catalog/runtime-catalog.js.map +1 -1
  180. package/dist/catalog/use-athena-chat-mode.cjs +12 -12
  181. package/dist/catalog/use-athena-chat-mode.cjs.map +1 -1
  182. package/dist/chat/AthenaChat.cjs +155 -67
  183. package/dist/chat/AthenaChat.cjs.map +1 -1
  184. package/dist/chat/AthenaChat.d.ts +42 -2
  185. package/dist/chat/AthenaChat.js +106 -18
  186. package/dist/chat/AthenaChat.js.map +1 -1
  187. package/dist/chat/AthenaChatErrorBoundary.cjs +3 -3
  188. package/dist/chat/AthenaChatErrorBoundary.cjs.map +1 -1
  189. package/dist/chat/DrivingOnChip.cjs +23 -0
  190. package/dist/chat/DrivingOnChip.cjs.map +1 -0
  191. package/dist/chat/DrivingOnChip.d.ts +17 -0
  192. package/dist/chat/DrivingOnChip.js +23 -0
  193. package/dist/chat/DrivingOnChip.js.map +1 -0
  194. package/dist/chat/StatewireApprovalCard.cjs +125 -31
  195. package/dist/chat/StatewireApprovalCard.cjs.map +1 -1
  196. package/dist/chat/StatewireApprovalCard.d.ts +73 -1
  197. package/dist/chat/StatewireApprovalCard.js +115 -21
  198. package/dist/chat/StatewireApprovalCard.js.map +1 -1
  199. package/dist/chat/StatewireClientToolBridge.cjs +2 -2
  200. package/dist/chat/StatewireClientToolBridge.cjs.map +1 -1
  201. package/dist/chat/StatewireQueuedMessages.cjs +25 -63
  202. package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
  203. package/dist/chat/StatewireQueuedMessages.d.ts +11 -13
  204. package/dist/chat/StatewireQueuedMessages.js +16 -54
  205. package/dist/chat/StatewireQueuedMessages.js.map +1 -1
  206. package/dist/chat/WaitingOnYouBanner.cjs +3 -3
  207. package/dist/chat/WaitingOnYouBanner.cjs.map +1 -1
  208. package/dist/chat/athena-chat-welcome.cjs +2 -2
  209. package/dist/chat/athena-chat-welcome.cjs.map +1 -1
  210. package/dist/chat/athena-citation-links.cjs +5 -5
  211. package/dist/chat/athena-citation-links.cjs.map +1 -1
  212. package/dist/chat/athena-composer-controls.cjs +26 -16
  213. package/dist/chat/athena-composer-controls.cjs.map +1 -1
  214. package/dist/chat/athena-composer-controls.d.ts +6 -0
  215. package/dist/chat/athena-composer-controls.js +26 -16
  216. package/dist/chat/athena-composer-controls.js.map +1 -1
  217. package/dist/chat/athena-turn-end-status.cjs +42 -0
  218. package/dist/chat/athena-turn-end-status.cjs.map +1 -0
  219. package/dist/chat/athena-turn-end-status.d.ts +24 -0
  220. package/dist/chat/athena-turn-end-status.js +42 -0
  221. package/dist/chat/athena-turn-end-status.js.map +1 -0
  222. package/dist/chat/browser-decision-check.cjs +131 -0
  223. package/dist/chat/browser-decision-check.cjs.map +1 -0
  224. package/dist/chat/browser-decision-check.d.ts +61 -0
  225. package/dist/chat/browser-decision-check.js +131 -0
  226. package/dist/chat/browser-decision-check.js.map +1 -0
  227. package/dist/chat/chat-outbox-rows.cjs +3 -3
  228. package/dist/chat/chat-outbox-rows.cjs.map +1 -1
  229. package/dist/chat/chat-voice-controls.cjs +93 -28
  230. package/dist/chat/chat-voice-controls.cjs.map +1 -1
  231. package/dist/chat/chat-voice-controls.d.ts +36 -2
  232. package/dist/chat/chat-voice-controls.js +89 -24
  233. package/dist/chat/chat-voice-controls.js.map +1 -1
  234. package/dist/chat/composer-keyboard-hint.cjs +5 -5
  235. package/dist/chat/composer-keyboard-hint.cjs.map +1 -1
  236. package/dist/chat/device-operation.cjs +29 -0
  237. package/dist/chat/device-operation.cjs.map +1 -0
  238. package/dist/chat/device-operation.d.ts +34 -0
  239. package/dist/chat/device-operation.js +29 -0
  240. package/dist/chat/device-operation.js.map +1 -0
  241. package/dist/chat/super-grouping/CollapsibleGroup.cjs +14 -14
  242. package/dist/chat/super-grouping/CollapsibleGroup.cjs.map +1 -1
  243. package/dist/chat/super-grouping/GroupedMessageParts.cjs +4 -4
  244. package/dist/chat/super-grouping/GroupedMessageParts.cjs.map +1 -1
  245. package/dist/chat/super-grouping/SuperGroupingCard.cjs +60 -38
  246. package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -1
  247. package/dist/chat/super-grouping/SuperGroupingCard.d.ts +24 -4
  248. package/dist/chat/super-grouping/SuperGroupingCard.js +37 -15
  249. package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -1
  250. package/dist/chat/super-grouping/SuperGroupingTranscript.cjs +32 -32
  251. package/dist/chat/super-grouping/SuperGroupingTranscript.cjs.map +1 -1
  252. package/dist/chat/super-grouping/SuperGroupingTranscript.js +3 -3
  253. package/dist/chat/super-grouping/SuperGroupingTranscript.js.map +1 -1
  254. package/dist/chat/super-grouping/ToolTimeline.cjs +97 -37
  255. package/dist/chat/super-grouping/ToolTimeline.cjs.map +1 -1
  256. package/dist/chat/super-grouping/ToolTimeline.d.ts +14 -2
  257. package/dist/chat/super-grouping/ToolTimeline.js +94 -34
  258. package/dist/chat/super-grouping/ToolTimeline.js.map +1 -1
  259. package/dist/chat/super-grouping/activity-timeline.cjs +47 -12
  260. package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
  261. package/dist/chat/super-grouping/activity-timeline.d.ts +21 -0
  262. package/dist/chat/super-grouping/activity-timeline.js +47 -12
  263. package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
  264. package/dist/chat/super-grouping/grouping-function.cjs +4 -0
  265. package/dist/chat/super-grouping/grouping-function.cjs.map +1 -1
  266. package/dist/chat/super-grouping/grouping-function.d.ts +7 -0
  267. package/dist/chat/super-grouping/grouping-function.js +5 -1
  268. package/dist/chat/super-grouping/grouping-function.js.map +1 -1
  269. package/dist/chat/super-grouping/index.cjs +6 -0
  270. package/dist/chat/super-grouping/index.cjs.map +1 -1
  271. package/dist/chat/super-grouping/index.d.ts +6 -2
  272. package/dist/chat/super-grouping/index.js +7 -1
  273. package/dist/chat/super-grouping/index.js.map +1 -1
  274. package/dist/chat/super-grouping/timeline-step.cjs +61 -2
  275. package/dist/chat/super-grouping/timeline-step.cjs.map +1 -1
  276. package/dist/chat/super-grouping/timeline-step.d.ts +13 -1
  277. package/dist/chat/super-grouping/timeline-step.js +61 -2
  278. package/dist/chat/super-grouping/timeline-step.js.map +1 -1
  279. package/dist/chat/super-grouping/tool-part-placement.cjs +17 -0
  280. package/dist/chat/super-grouping/tool-part-placement.cjs.map +1 -0
  281. package/dist/chat/super-grouping/tool-part-placement.d.ts +22 -0
  282. package/dist/chat/super-grouping/tool-part-placement.js +17 -0
  283. package/dist/chat/super-grouping/tool-part-placement.js.map +1 -0
  284. package/dist/chat/thread-scroll-to-bottom.cjs +2 -2
  285. package/dist/chat/thread-scroll-to-bottom.cjs.map +1 -1
  286. package/dist/chat/thread-scroll-to-bottom.d.ts +10 -7
  287. package/dist/chat/thread-scroll-to-bottom.js +2 -2
  288. package/dist/chat/thread-scroll-to-bottom.js.map +1 -1
  289. package/dist/chat/tooltip-icon-button.cjs +2 -2
  290. package/dist/chat/tooltip-icon-button.cjs.map +1 -1
  291. package/dist/chat/use-athena-voice-live.cjs +11 -0
  292. package/dist/chat/use-athena-voice-live.cjs.map +1 -0
  293. package/dist/chat/use-athena-voice-live.d.ts +11 -0
  294. package/dist/chat/use-athena-voice-live.js +11 -0
  295. package/dist/chat/use-athena-voice-live.js.map +1 -0
  296. package/dist/chat/use-statewire-approval-request.cjs +56 -24
  297. package/dist/chat/use-statewire-approval-request.cjs.map +1 -1
  298. package/dist/chat/use-statewire-approval-request.d.ts +33 -4
  299. package/dist/chat/use-statewire-approval-request.js +41 -9
  300. package/dist/chat/use-statewire-approval-request.js.map +1 -1
  301. package/dist/chat-ui/auth/sign-in-card.cjs +2 -2
  302. package/dist/chat-ui/auth/sign-in-card.cjs.map +1 -1
  303. package/dist/chat-ui/composer/tiptap-composer.cjs +138 -107
  304. package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
  305. package/dist/chat-ui/composer/tiptap-composer.d.ts +20 -4
  306. package/dist/chat-ui/composer/tiptap-composer.js +85 -54
  307. package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
  308. package/dist/chat-ui/header/conversation-history-panel.cjs +49 -23
  309. package/dist/chat-ui/header/conversation-history-panel.cjs.map +1 -1
  310. package/dist/chat-ui/header/conversation-history-panel.d.ts +12 -1
  311. package/dist/chat-ui/header/conversation-history-panel.js +38 -12
  312. package/dist/chat-ui/header/conversation-history-panel.js.map +1 -1
  313. package/dist/chat-ui/index.cjs +18 -0
  314. package/dist/chat-ui/index.cjs.map +1 -1
  315. package/dist/chat-ui/index.d.ts +7 -1
  316. package/dist/chat-ui/index.js +18 -0
  317. package/dist/chat-ui/index.js.map +1 -1
  318. package/dist/chat-ui/mentions/mention-chip.cjs +147 -38
  319. package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
  320. package/dist/chat-ui/mentions/mention-chip.d.ts +17 -1
  321. package/dist/chat-ui/mentions/mention-chip.js +146 -37
  322. package/dist/chat-ui/mentions/mention-chip.js.map +1 -1
  323. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.cjs +10 -9
  324. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.cjs.map +1 -1
  325. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.js +3 -2
  326. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.js.map +1 -1
  327. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs +2 -2
  328. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs.map +1 -1
  329. package/dist/chat-ui/mentions/suggestions/components/menu-list.cjs +29 -6
  330. package/dist/chat-ui/mentions/suggestions/components/menu-list.cjs.map +1 -1
  331. package/dist/chat-ui/mentions/suggestions/components/menu-list.d.ts +7 -1
  332. package/dist/chat-ui/mentions/suggestions/components/menu-list.js +25 -2
  333. package/dist/chat-ui/mentions/suggestions/components/menu-list.js.map +1 -1
  334. package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.cjs +2 -2
  335. package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.cjs.map +1 -1
  336. package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.cjs +2 -2
  337. package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.cjs.map +1 -1
  338. package/dist/chat-ui/mentions/suggestions/data/api-client.cjs +3 -3
  339. package/dist/chat-ui/mentions/suggestions/data/api-client.cjs.map +1 -1
  340. package/dist/chat-ui/mentions/suggestions/data/orchestrator.cjs +56 -2
  341. package/dist/chat-ui/mentions/suggestions/data/orchestrator.cjs.map +1 -1
  342. package/dist/chat-ui/mentions/suggestions/data/orchestrator.d.ts +12 -0
  343. package/dist/chat-ui/mentions/suggestions/data/orchestrator.js +56 -2
  344. package/dist/chat-ui/mentions/suggestions/data/orchestrator.js.map +1 -1
  345. package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +24 -3
  346. package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -1
  347. package/dist/chat-ui/mentions/suggestions/data/sources/index.d.ts +7 -0
  348. package/dist/chat-ui/mentions/suggestions/data/sources/index.js +24 -3
  349. package/dist/chat-ui/mentions/suggestions/data/sources/index.js.map +1 -1
  350. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs +35 -13
  351. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs.map +1 -1
  352. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.d.ts +15 -1
  353. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js +28 -6
  354. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js.map +1 -1
  355. package/dist/chat-ui/mentions/suggestions/data/use-menu-items.cjs +9 -6
  356. package/dist/chat-ui/mentions/suggestions/data/use-menu-items.cjs.map +1 -1
  357. package/dist/chat-ui/mentions/suggestions/data/use-menu-items.d.ts +3 -0
  358. package/dist/chat-ui/mentions/suggestions/data/use-menu-items.js +5 -2
  359. package/dist/chat-ui/mentions/suggestions/data/use-menu-items.js.map +1 -1
  360. package/dist/chat-ui/mentions/use-account-workspace-id.cjs +45 -10
  361. package/dist/chat-ui/mentions/use-account-workspace-id.cjs.map +1 -1
  362. package/dist/chat-ui/mentions/use-account-workspace-id.d.ts +24 -1
  363. package/dist/chat-ui/mentions/use-account-workspace-id.js +46 -11
  364. package/dist/chat-ui/mentions/use-account-workspace-id.js.map +1 -1
  365. package/dist/chat-ui/mentions/use-member-avatar.cjs +4 -4
  366. package/dist/chat-ui/mentions/use-member-avatar.cjs.map +1 -1
  367. package/dist/chat-ui/mentions/use-mention-asset.cjs +140 -0
  368. package/dist/chat-ui/mentions/use-mention-asset.cjs.map +1 -0
  369. package/dist/chat-ui/mentions/use-mention-asset.d.ts +16 -0
  370. package/dist/chat-ui/mentions/use-mention-asset.js +140 -0
  371. package/dist/chat-ui/mentions/use-mention-asset.js.map +1 -0
  372. package/dist/chat-ui/messages/answer-label.cjs +42 -0
  373. package/dist/chat-ui/messages/answer-label.cjs.map +1 -0
  374. package/dist/chat-ui/messages/answer-label.d.ts +33 -0
  375. package/dist/chat-ui/messages/answer-label.js +42 -0
  376. package/dist/chat-ui/messages/answer-label.js.map +1 -0
  377. package/dist/chat-ui/messages/arrival-animation.cjs +13 -0
  378. package/dist/chat-ui/messages/arrival-animation.cjs.map +1 -0
  379. package/dist/chat-ui/messages/arrival-animation.d.ts +14 -0
  380. package/dist/chat-ui/messages/arrival-animation.js +13 -0
  381. package/dist/chat-ui/messages/arrival-animation.js.map +1 -0
  382. package/dist/chat-ui/messages/continue-pill.cjs +5 -5
  383. package/dist/chat-ui/messages/continue-pill.cjs.map +1 -1
  384. package/dist/chat-ui/messages/handoff-arrival-divider.cjs +44 -0
  385. package/dist/chat-ui/messages/handoff-arrival-divider.cjs.map +1 -0
  386. package/dist/chat-ui/messages/handoff-arrival-divider.d.ts +17 -0
  387. package/dist/chat-ui/messages/handoff-arrival-divider.js +44 -0
  388. package/dist/chat-ui/messages/handoff-arrival-divider.js.map +1 -0
  389. package/dist/chat-ui/messages/message-actions-config.cjs +3 -3
  390. package/dist/chat-ui/messages/message-actions-config.cjs.map +1 -1
  391. package/dist/chat-ui/messages/message-components.cjs +8 -4
  392. package/dist/chat-ui/messages/message-components.cjs.map +1 -1
  393. package/dist/chat-ui/messages/message-components.js +5 -1
  394. package/dist/chat-ui/messages/message-components.js.map +1 -1
  395. package/dist/chat-ui/messages/message-images.cjs +66 -0
  396. package/dist/chat-ui/messages/message-images.cjs.map +1 -0
  397. package/dist/chat-ui/messages/message-images.d.ts +16 -0
  398. package/dist/chat-ui/messages/message-images.js +66 -0
  399. package/dist/chat-ui/messages/message-images.js.map +1 -0
  400. package/dist/chat-ui/messages/user-edit-composer.cjs +2 -2
  401. package/dist/chat-ui/messages/user-edit-composer.cjs.map +1 -1
  402. package/dist/chat-ui/messages/wake-marker.cjs +3 -3
  403. package/dist/chat-ui/messages/wake-marker.cjs.map +1 -1
  404. package/dist/chat-ui/rich-text/chat-link.cjs +7 -6
  405. package/dist/chat-ui/rich-text/chat-link.cjs.map +1 -1
  406. package/dist/chat-ui/rich-text/chat-link.d.ts +2 -3
  407. package/dist/chat-ui/rich-text/chat-link.js +6 -5
  408. package/dist/chat-ui/rich-text/chat-link.js.map +1 -1
  409. package/dist/chat-ui/rich-text/chat-message-body.cjs +8 -8
  410. package/dist/chat-ui/rich-text/chat-message-body.cjs.map +1 -1
  411. package/dist/chat-ui/rich-text/chat-node-views.cjs +7 -6
  412. package/dist/chat-ui/rich-text/chat-node-views.cjs.map +1 -1
  413. package/dist/chat-ui/rich-text/chat-node-views.js +1 -0
  414. package/dist/chat-ui/rich-text/chat-node-views.js.map +1 -1
  415. package/dist/chat-ui/rich-text/dom-output-spec.cjs +2 -2
  416. package/dist/chat-ui/rich-text/dom-output-spec.cjs.map +1 -1
  417. package/dist/chat-ui/statewire.cjs +3 -0
  418. package/dist/chat-ui/statewire.cjs.map +1 -1
  419. package/dist/chat-ui/statewire.d.ts +2 -1
  420. package/dist/chat-ui/statewire.js +3 -0
  421. package/dist/chat-ui/statewire.js.map +1 -1
  422. package/dist/chat-ui/thread/chat-thread-shell.cjs +43 -14
  423. package/dist/chat-ui/thread/chat-thread-shell.cjs.map +1 -1
  424. package/dist/chat-ui/thread/chat-thread-shell.d.ts +16 -2
  425. package/dist/chat-ui/thread/chat-thread-shell.js +35 -6
  426. package/dist/chat-ui/thread/chat-thread-shell.js.map +1 -1
  427. package/dist/chat-ui/thread/composer-send-or-stop.cjs +30 -20
  428. package/dist/chat-ui/thread/composer-send-or-stop.cjs.map +1 -1
  429. package/dist/chat-ui/thread/composer-send-or-stop.d.ts +8 -0
  430. package/dist/chat-ui/thread/composer-send-or-stop.js +29 -19
  431. package/dist/chat-ui/thread/composer-send-or-stop.js.map +1 -1
  432. package/dist/chat-ui/thread/statewire-history-edge.cjs +20 -21
  433. package/dist/chat-ui/thread/statewire-history-edge.cjs.map +1 -1
  434. package/dist/chat-ui/thread/statewire-history-edge.js +3 -4
  435. package/dist/chat-ui/thread/statewire-history-edge.js.map +1 -1
  436. package/dist/chat-ui/thread/thread-loading-overlay.cjs +5 -5
  437. package/dist/chat-ui/thread/thread-loading-overlay.cjs.map +1 -1
  438. package/dist/collab/client.cjs +40 -3
  439. package/dist/collab/client.cjs.map +1 -1
  440. package/dist/collab/client.d.ts +25 -0
  441. package/dist/collab/client.js +40 -3
  442. package/dist/collab/client.js.map +1 -1
  443. package/dist/collab/document-status.cjs +150 -0
  444. package/dist/collab/document-status.cjs.map +1 -0
  445. package/dist/collab/document-status.d.ts +68 -0
  446. package/dist/collab/document-status.js +150 -0
  447. package/dist/collab/document-status.js.map +1 -0
  448. package/dist/collab/index.cjs +7 -0
  449. package/dist/collab/index.cjs.map +1 -1
  450. package/dist/collab/index.d.ts +6 -1
  451. package/dist/collab/index.js +7 -0
  452. package/dist/collab/index.js.map +1 -1
  453. package/dist/collab/presence-react.cjs +11 -11
  454. package/dist/collab/presence-react.cjs.map +1 -1
  455. package/dist/collab/react.cjs +6 -6
  456. package/dist/collab/react.cjs.map +1 -1
  457. package/dist/composer/AttachmentContext.cjs +24 -11
  458. package/dist/composer/AttachmentContext.cjs.map +1 -1
  459. package/dist/composer/AttachmentContext.js +18 -5
  460. package/dist/composer/AttachmentContext.js.map +1 -1
  461. package/dist/composer/ComposerAttachmentPreview.cjs +78 -23
  462. package/dist/composer/ComposerAttachmentPreview.cjs.map +1 -1
  463. package/dist/composer/ComposerAttachmentPreview.d.ts +5 -3
  464. package/dist/composer/ComposerAttachmentPreview.js +79 -24
  465. package/dist/composer/ComposerAttachmentPreview.js.map +1 -1
  466. package/dist/composer/ComposerDropZone.cjs +7 -7
  467. package/dist/composer/ComposerDropZone.cjs.map +1 -1
  468. package/dist/composer/FileUploadButton.cjs +37 -22
  469. package/dist/composer/FileUploadButton.cjs.map +1 -1
  470. package/dist/composer/FileUploadButton.d.ts +6 -0
  471. package/dist/composer/FileUploadButton.js +34 -19
  472. package/dist/composer/FileUploadButton.js.map +1 -1
  473. package/dist/composer/QuoteContext.cjs +8 -8
  474. package/dist/composer/QuoteContext.cjs.map +1 -1
  475. package/dist/composer/composer-handoff.cjs +4 -4
  476. package/dist/composer/composer-handoff.cjs.map +1 -1
  477. package/dist/composer/useAppendToComposer.cjs +4 -4
  478. package/dist/composer/useAppendToComposer.cjs.map +1 -1
  479. package/dist/composer/useAttachFiles.cjs +23 -6
  480. package/dist/composer/useAttachFiles.cjs.map +1 -1
  481. package/dist/composer/useAttachFiles.d.ts +15 -7
  482. package/dist/composer/useAttachFiles.js +22 -5
  483. package/dist/composer/useAttachFiles.js.map +1 -1
  484. package/dist/composer/useComposerAttachment.cjs +4 -4
  485. package/dist/composer/useComposerAttachment.cjs.map +1 -1
  486. package/dist/composer/useFileUpload.cjs +21 -16
  487. package/dist/composer/useFileUpload.cjs.map +1 -1
  488. package/dist/composer/useFileUpload.d.ts +12 -0
  489. package/dist/composer/useFileUpload.js +12 -7
  490. package/dist/composer/useFileUpload.js.map +1 -1
  491. package/dist/composer/useReadComposerDraft.cjs +2 -2
  492. package/dist/composer/useReadComposerDraft.cjs.map +1 -1
  493. package/dist/composer/useSendMessage.cjs +4 -4
  494. package/dist/composer/useSendMessage.cjs.map +1 -1
  495. package/dist/diagnostics/useAthenaDiagnostics.cjs +4 -4
  496. package/dist/diagnostics/useAthenaDiagnostics.cjs.map +1 -1
  497. package/dist/dictation/audio-level-history.cjs +3 -3
  498. package/dist/dictation/audio-level-history.cjs.map +1 -1
  499. package/dist/dictation/dictation-controls.cjs +24 -20
  500. package/dist/dictation/dictation-controls.cjs.map +1 -1
  501. package/dist/dictation/dictation-controls.d.ts +6 -1
  502. package/dist/dictation/dictation-controls.js +24 -20
  503. package/dist/dictation/dictation-controls.js.map +1 -1
  504. package/dist/dictation/use-athena-dictation-engine.cjs +3 -3
  505. package/dist/dictation/use-athena-dictation-engine.cjs.map +1 -1
  506. package/dist/dictation/use-dictation.cjs +22 -22
  507. package/dist/dictation/use-dictation.cjs.map +1 -1
  508. package/dist/index.cjs +26 -2
  509. package/dist/index.cjs.map +1 -1
  510. package/dist/index.d.ts +15 -3
  511. package/dist/index.js +26 -2
  512. package/dist/index.js.map +1 -1
  513. package/dist/keryx-http/src/receive-only-socket.cjs +40 -0
  514. package/dist/keryx-http/src/receive-only-socket.cjs.map +1 -0
  515. package/dist/keryx-http/src/receive-only-socket.d.ts +27 -0
  516. package/dist/keryx-http/src/receive-only-socket.js +40 -0
  517. package/dist/keryx-http/src/receive-only-socket.js.map +1 -0
  518. package/dist/keryx-http/src/update-attributions.cjs +111 -0
  519. package/dist/keryx-http/src/update-attributions.cjs.map +1 -0
  520. package/dist/keryx-http/src/update-attributions.d.ts +75 -0
  521. package/dist/keryx-http/src/update-attributions.js +111 -0
  522. package/dist/keryx-http/src/update-attributions.js.map +1 -0
  523. package/dist/lib/owner-document.cjs +6 -6
  524. package/dist/lib/owner-document.cjs.map +1 -1
  525. package/dist/lib/use-athena-rest-query.cjs +4 -4
  526. package/dist/lib/use-athena-rest-query.cjs.map +1 -1
  527. package/dist/lib/use-document-active.cjs +4 -4
  528. package/dist/lib/use-document-active.cjs.map +1 -1
  529. package/dist/lib/use-prefers-reduced-motion.cjs +2 -2
  530. package/dist/lib/use-prefers-reduced-motion.cjs.map +1 -1
  531. package/dist/offline/offline-history.cjs +7 -7
  532. package/dist/offline/offline-history.cjs.map +1 -1
  533. package/dist/provider/AthenaContext.cjs +3 -3
  534. package/dist/provider/AthenaContext.cjs.map +1 -1
  535. package/dist/provider/AthenaProvider.cjs +116 -79
  536. package/dist/provider/AthenaProvider.cjs.map +1 -1
  537. package/dist/provider/AthenaProvider.js +40 -3
  538. package/dist/provider/AthenaProvider.js.map +1 -1
  539. package/dist/provider/PostHogProvider.cjs +2 -2
  540. package/dist/provider/PostHogProvider.cjs.map +1 -1
  541. package/dist/provider/agent-selection-context.cjs +2 -2
  542. package/dist/provider/agent-selection-context.cjs.map +1 -1
  543. package/dist/provider/chat-mode-context.cjs +2 -2
  544. package/dist/provider/chat-mode-context.cjs.map +1 -1
  545. package/dist/provider/session-persistence-context.cjs +10 -0
  546. package/dist/provider/session-persistence-context.cjs.map +1 -0
  547. package/dist/provider/session-persistence-context.d.ts +15 -0
  548. package/dist/provider/session-persistence-context.js +10 -0
  549. package/dist/provider/session-persistence-context.js.map +1 -0
  550. package/dist/provider/statewire-history-context.cjs +4 -4
  551. package/dist/provider/statewire-history-context.cjs.map +1 -1
  552. package/dist/provider/statewire-lifecycle-context.cjs +3 -3
  553. package/dist/provider/statewire-lifecycle-context.cjs.map +1 -1
  554. package/dist/provider/statewire-window-context.cjs +3 -3
  555. package/dist/provider/statewire-window-context.cjs.map +1 -1
  556. package/dist/provider/theme-style-context.cjs +3 -3
  557. package/dist/provider/theme-style-context.cjs.map +1 -1
  558. package/dist/react/package.json.cjs +1 -1
  559. package/dist/react/package.json.js +1 -1
  560. package/dist/references/src/tool-option-schemas.d.ts +0 -34
  561. package/dist/runtime/StatewireThreadConfigLaneSync.cjs +10 -10
  562. package/dist/runtime/StatewireThreadConfigLaneSync.cjs.map +1 -1
  563. package/dist/runtime/auth-refusal-restart.cjs +7 -7
  564. package/dist/runtime/auth-refusal-restart.cjs.map +1 -1
  565. package/dist/runtime/auth.cjs +13 -13
  566. package/dist/runtime/auth.cjs.map +1 -1
  567. package/dist/runtime/statewire-lifecycle.cjs +1 -0
  568. package/dist/runtime/statewire-lifecycle.cjs.map +1 -1
  569. package/dist/runtime/statewire-lifecycle.d.ts +3 -1
  570. package/dist/runtime/statewire-lifecycle.js +2 -1
  571. package/dist/runtime/statewire-lifecycle.js.map +1 -1
  572. package/dist/runtime/statewire-server-lane-context.cjs +2 -2
  573. package/dist/runtime/statewire-server-lane-context.cjs.map +1 -1
  574. package/dist/runtime/statewire-session-lane.cjs +4 -4
  575. package/dist/runtime/statewire-session-lane.cjs.map +1 -1
  576. package/dist/runtime/useAthenaStatewireRuntime.cjs +10 -8
  577. package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
  578. package/dist/runtime/useAthenaStatewireRuntime.d.ts +2 -0
  579. package/dist/runtime/useAthenaStatewireRuntime.js +2 -0
  580. package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
  581. package/dist/styles.css +1 -1
  582. package/dist/threads/Inbox.cjs +8 -8
  583. package/dist/threads/Inbox.cjs.map +1 -1
  584. package/dist/threads/SessionList.cjs +9 -9
  585. package/dist/threads/SessionList.cjs.map +1 -1
  586. package/dist/threads/SessionsPage.cjs +11 -11
  587. package/dist/threads/SessionsPage.cjs.map +1 -1
  588. package/dist/threads/index-triggered-refresh.cjs +10 -10
  589. package/dist/threads/index-triggered-refresh.cjs.map +1 -1
  590. package/dist/threads/mark-viewed-thread-read.cjs +12 -12
  591. package/dist/threads/mark-viewed-thread-read.cjs.map +1 -1
  592. package/dist/threads/offline-session-list.cjs +3 -3
  593. package/dist/threads/offline-session-list.cjs.map +1 -1
  594. package/dist/threads/session-list-tab-share.cjs +5 -5
  595. package/dist/threads/session-list-tab-share.cjs.map +1 -1
  596. package/dist/threads/statewire-thread-list.cjs +55 -51
  597. package/dist/threads/statewire-thread-list.cjs.map +1 -1
  598. package/dist/threads/statewire-thread-list.js +6 -2
  599. package/dist/threads/statewire-thread-list.js.map +1 -1
  600. package/dist/threads/thread-id-context.cjs +5 -5
  601. package/dist/threads/thread-id-context.cjs.map +1 -1
  602. package/dist/threads/use-athena-session-attention.cjs +2 -2
  603. package/dist/threads/use-athena-session-attention.cjs.map +1 -1
  604. package/dist/threads/use-athena-sessions.cjs +10 -10
  605. package/dist/threads/use-athena-sessions.cjs.map +1 -1
  606. package/dist/threads/use-athena-thread-model.cjs +3 -3
  607. package/dist/threads/use-athena-thread-model.cjs.map +1 -1
  608. package/dist/threads/use-rest-conversation-history.cjs +3 -3
  609. package/dist/threads/use-rest-conversation-history.cjs.map +1 -1
  610. package/dist/threads/use-statewire-conversation-history.cjs +8 -8
  611. package/dist/threads/use-statewire-conversation-history.cjs.map +1 -1
  612. package/dist/threads/use-thread-archive.cjs +9 -9
  613. package/dist/threads/use-thread-archive.cjs.map +1 -1
  614. package/dist/threads/use-thread-favorite.cjs +2 -2
  615. package/dist/threads/use-thread-favorite.cjs.map +1 -1
  616. package/dist/threads/use-thread-field-override.cjs +20 -20
  617. package/dist/threads/use-thread-field-override.cjs.map +1 -1
  618. package/dist/threads/use-thread-read-state.cjs +4 -4
  619. package/dist/threads/use-thread-read-state.cjs.map +1 -1
  620. package/dist/threads/use-thread-rename.cjs +2 -2
  621. package/dist/threads/use-thread-rename.cjs.map +1 -1
  622. package/dist/threads/useAthenaThreadManager.cjs +2 -2
  623. package/dist/threads/useAthenaThreadManager.cjs.map +1 -1
  624. package/dist/tools/NestedPtcMessages.cjs +6 -6
  625. package/dist/tools/NestedPtcMessages.cjs.map +1 -1
  626. package/dist/tools/append-document-tool-ui.cjs +7 -7
  627. package/dist/tools/append-document-tool-ui.cjs.map +1 -1
  628. package/dist/tools/file-tool-uis.cjs +2 -2
  629. package/dist/tools/file-tool-uis.cjs.map +1 -1
  630. package/dist/tools/misc-tool-uis.cjs +2 -2
  631. package/dist/tools/misc-tool-uis.cjs.map +1 -1
  632. package/dist/tools/primitives.cjs +6 -6
  633. package/dist/tools/primitives.cjs.map +1 -1
  634. package/dist/tools/read-asset-tool-ui.cjs +6 -6
  635. package/dist/tools/read-asset-tool-ui.cjs.map +1 -1
  636. package/dist/tools/subagent-task-tool-ui.cjs +21 -21
  637. package/dist/tools/subagent-task-tool-ui.cjs.map +1 -1
  638. package/dist/tools/test-recording-tool-uis.cjs +16 -16
  639. package/dist/tools/test-recording-tool-uis.cjs.map +1 -1
  640. package/dist/tools/todo-plan-store.cjs +4 -4
  641. package/dist/tools/todo-plan-store.cjs.map +1 -1
  642. package/dist/tools/tool-appearance.cjs +3 -3
  643. package/dist/tools/tool-appearance.cjs.map +1 -1
  644. package/dist/tools/tool-fallback.cjs +14 -14
  645. package/dist/tools/tool-fallback.cjs.map +1 -1
  646. package/dist/tools/tool-summary.cjs +0 -2
  647. package/dist/tools/tool-summary.cjs.map +1 -1
  648. package/dist/tools/tool-summary.js +0 -2
  649. package/dist/tools/tool-summary.js.map +1 -1
  650. package/dist/tools/tool-uis.cjs +74 -74
  651. package/dist/tools/tool-uis.cjs.map +1 -1
  652. package/dist/tools/use-elapsed-seconds.cjs +3 -3
  653. package/dist/tools/use-elapsed-seconds.cjs.map +1 -1
  654. package/dist/tools/write-todos-tool-ui.cjs +9 -9
  655. package/dist/tools/write-todos-tool-ui.cjs.map +1 -1
  656. package/dist/ui/image-viewer.cjs +382 -0
  657. package/dist/ui/image-viewer.cjs.map +1 -0
  658. package/dist/ui/image-viewer.d.ts +50 -0
  659. package/dist/ui/image-viewer.js +382 -0
  660. package/dist/ui/image-viewer.js.map +1 -0
  661. package/dist/voice/chat.cjs +6 -0
  662. package/dist/voice/chat.cjs.map +1 -1
  663. package/dist/voice/chat.d.ts +1 -1
  664. package/dist/voice/chat.js +8 -2
  665. package/dist/voice/livekit-join.cjs +52 -101
  666. package/dist/voice/livekit-join.cjs.map +1 -1
  667. package/dist/voice/livekit-join.d.ts +1 -6
  668. package/dist/voice/livekit-join.js +52 -101
  669. package/dist/voice/livekit-join.js.map +1 -1
  670. package/dist/voice/livekit.cjs.map +1 -1
  671. package/dist/voice/livekit.d.ts +11 -1
  672. package/dist/voice/livekit.js.map +1 -1
  673. package/dist/voice/use-athena-voice-session.cjs +34 -34
  674. package/dist/voice/use-athena-voice-session.cjs.map +1 -1
  675. package/dist/workbench/ComputerLiveDesktop.cjs +13 -13
  676. package/dist/workbench/ComputerLiveDesktop.cjs.map +1 -1
  677. package/dist/workbench/SessionWorkbench.cjs +22 -22
  678. package/dist/workbench/SessionWorkbench.cjs.map +1 -1
  679. package/dist/workbench/session-workbench-context.cjs +3 -3
  680. package/dist/workbench/session-workbench-context.cjs.map +1 -1
  681. package/dist/workbench/session-workbench-panes.cjs +8 -8
  682. package/dist/workbench/session-workbench-panes.cjs.map +1 -1
  683. package/dist/workbench/workbench-layout-context.cjs +3 -3
  684. package/dist/workbench/workbench-layout-context.cjs.map +1 -1
  685. package/package.json +2 -1
@@ -0,0 +1,756 @@
1
+ /**
2
+ * Cross-surface "Continue on…" thread handoff — the client half of agora's
3
+ * `/api/handoffs` protocol shared by Spaces, the mobile app, Athena in Chrome,
4
+ * the desktop app and the Office add-ins.
5
+ *
6
+ * A handoff carries no conversation content beyond the source composer's
7
+ * unsent draft. The server binds an opaque `handoff_id` to the durable thread,
8
+ * and the destination surface claims that id and acknowledges once it owns the
9
+ * thread. The source surface closes its own copilot only after that
10
+ * acknowledgement; nothing switches surfaces on its own.
11
+ */
12
+ import { z } from 'zod';
13
+ /** Destinations a readiness response reports a row for (a closed set older readers validate). */
14
+ export declare const HANDOFF_DESTINATIONS: readonly ['chrome', 'mobile', 'word', 'powerpoint', 'excel'];
15
+ export type HandoffDestination = (typeof HANDOFF_DESTINATIONS)[number];
16
+ /**
17
+ * Every destination a handoff record can name. `spaces` lands on a Spaces link
18
+ * or an open Spaces tab; `next` is "wherever I pick up next" (the first of the
19
+ * four surfaces to come to the front and accept it); `desktop` is the desktop
20
+ * app, created through `/api/handoffs/desktop` but polled like the rest.
21
+ */
22
+ export declare const THREAD_HANDOFF_DESTINATIONS: readonly ["chrome", "mobile", "word", "powerpoint", "excel", "spaces", "next", "desktop"];
23
+ export type ThreadHandoffDestination = (typeof THREAD_HANDOFF_DESTINATIONS)[number];
24
+ /** The four surfaces of a phase-one handover; each can claim a `next` handoff. */
25
+ export declare const PICKUP_SURFACES: readonly ['spaces', 'mobile', 'chrome', 'desktop'];
26
+ export type PickupSurface = (typeof PICKUP_SURFACES)[number];
27
+ /** What "Continue on…" offers among the four surfaces, in picker order. */
28
+ export declare const SURFACE_HANDOFF_DESTINATIONS: readonly ['spaces', 'mobile', 'chrome', 'desktop', 'next'];
29
+ export type SurfaceHandoffDestination = (typeof SURFACE_HANDOFF_DESTINATIONS)[number];
30
+ /** The source composer's unsent text that travels prefilled, never sent. */
31
+ export declare const MAX_HANDOFF_DRAFT_LENGTH = 4000;
32
+ /**
33
+ * How the person chose to continue. `voice` is an offer the destination shows
34
+ * ("Continue by voice"); it never starts a microphone by itself. Older servers
35
+ * omit it, which reads as `text`.
36
+ */
37
+ export declare const handoffModeSchema: z.ZodEnum<{
38
+ text: "text";
39
+ voice: "voice";
40
+ }>;
41
+ export type HandoffMode = z.infer<typeof handoffModeSchema>;
42
+ /** Destinations that can continue by voice: the four surfaces and "next". */
43
+ export declare const isVoiceHandoffDestination: (destination: ThreadHandoffDestination) => boolean;
44
+ export declare const OFFICE_HANDOFF_DESTINATIONS: readonly ['word', 'powerpoint', 'excel'];
45
+ export type OfficeHandoffDestination = (typeof OFFICE_HANDOFF_DESTINATIONS)[number];
46
+ export declare const officeLaunchModeSchema: z.ZodEnum<{
47
+ invitation: "invitation";
48
+ new_document: "new_document";
49
+ }>;
50
+ export type OfficeLaunchMode = z.infer<typeof officeLaunchModeSchema>;
51
+ /** Destinations agora brokers; Chrome is launched page-side by the extension. */
52
+ export declare const SERVER_HANDOFF_DESTINATIONS: readonly ["mobile", "word", "powerpoint", "excel"];
53
+ export type ServerHandoffDestination = (typeof SERVER_HANDOFF_DESTINATIONS)[number];
54
+ export type HandoffSource = 'spaces' | 'chrome' | 'mobile' | 'word' | 'powerpoint' | 'excel' | 'desktop';
55
+ export declare const handoffEnvironmentSchema: z.ZodEnum<{
56
+ localhost: "localhost";
57
+ production: "production";
58
+ staging: "staging";
59
+ }>;
60
+ export type HandoffEnvironment = z.infer<typeof handoffEnvironmentSchema>;
61
+ export declare const handoffStateSchema: z.ZodEnum<{
62
+ acknowledged: "acknowledged";
63
+ claimed: "claimed";
64
+ failed: "failed";
65
+ issued: "issued";
66
+ launched: "launched";
67
+ }>;
68
+ export type HandoffState = z.infer<typeof handoffStateSchema>;
69
+ export declare const handoffReadinessStateSchema: z.ZodEnum<{
70
+ not_registered: "not_registered";
71
+ registered: "registered";
72
+ stale: "stale";
73
+ unknown: "unknown";
74
+ unsupported: "unsupported";
75
+ }>;
76
+ export type HandoffReadinessState = z.infer<typeof handoffReadinessStateSchema>;
77
+ export declare const destinationReadinessSchema: z.ZodObject<{
78
+ destination: z.ZodEnum<{
79
+ chrome: "chrome";
80
+ excel: "excel";
81
+ mobile: "mobile";
82
+ powerpoint: "powerpoint";
83
+ word: "word";
84
+ }>;
85
+ state: z.ZodEnum<{
86
+ not_registered: "not_registered";
87
+ registered: "registered";
88
+ stale: "stale";
89
+ unknown: "unknown";
90
+ unsupported: "unsupported";
91
+ }>;
92
+ last_seen_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
93
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
+ marketplace_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
+ }, z.core.$strip>;
96
+ export type DestinationReadiness = z.infer<typeof destinationReadinessSchema>;
97
+ export declare const handoffReadinessResponseSchema: z.ZodObject<{
98
+ environment: z.ZodEnum<{
99
+ localhost: "localhost";
100
+ production: "production";
101
+ staging: "staging";
102
+ }>;
103
+ destinations: z.ZodArray<z.ZodObject<{
104
+ destination: z.ZodEnum<{
105
+ chrome: "chrome";
106
+ excel: "excel";
107
+ mobile: "mobile";
108
+ powerpoint: "powerpoint";
109
+ word: "word";
110
+ }>;
111
+ state: z.ZodEnum<{
112
+ not_registered: "not_registered";
113
+ registered: "registered";
114
+ stale: "stale";
115
+ unknown: "unknown";
116
+ unsupported: "unsupported";
117
+ }>;
118
+ last_seen_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
120
+ marketplace_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
+ }, z.core.$strip>>;
122
+ supports_office_invitations: z.ZodOptional<z.ZodBoolean>;
123
+ supports_desktop_source: z.ZodOptional<z.ZodBoolean>;
124
+ supports_surface_destinations: z.ZodOptional<z.ZodBoolean>;
125
+ }, z.core.$strip>;
126
+ export type HandoffReadinessResponse = z.infer<typeof handoffReadinessResponseSchema>;
127
+ export declare const supportsDesktopHandoffSource: (readiness: HandoffReadinessResponse | null | undefined) => boolean;
128
+ /** Whether the server can broker the four-surface destinations; absent means an older agora. */
129
+ export declare const supportsSurfaceHandoffDestinations: (readiness: HandoffReadinessResponse | null | undefined) => boolean;
130
+ export declare const threadHandoffViewSchema: z.ZodObject<{
131
+ handoff_id: z.ZodString;
132
+ thread_id: z.ZodString;
133
+ session_asset_id: z.ZodNullable<z.ZodString>;
134
+ source: z.ZodString;
135
+ destination: z.ZodEnum<{
136
+ chrome: "chrome";
137
+ desktop: "desktop";
138
+ excel: "excel";
139
+ mobile: "mobile";
140
+ next: "next";
141
+ powerpoint: "powerpoint";
142
+ spaces: "spaces";
143
+ word: "word";
144
+ }>;
145
+ office_launch_mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
146
+ invitation: "invitation";
147
+ new_document: "new_document";
148
+ }>>>;
149
+ environment: z.ZodEnum<{
150
+ localhost: "localhost";
151
+ production: "production";
152
+ staging: "staging";
153
+ }>;
154
+ state: z.ZodEnum<{
155
+ acknowledged: "acknowledged";
156
+ claimed: "claimed";
157
+ failed: "failed";
158
+ issued: "issued";
159
+ launched: "launched";
160
+ }>;
161
+ issued_at: z.ZodString;
162
+ expires_at: z.ZodString;
163
+ claimed_at: z.ZodNullable<z.ZodString>;
164
+ acknowledged_at: z.ZodNullable<z.ZodString>;
165
+ failure_reason: z.ZodNullable<z.ZodString>;
166
+ push_delivered: z.ZodNullable<z.ZodBoolean>;
167
+ claimed_surface: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
168
+ chrome: "chrome";
169
+ desktop: "desktop";
170
+ mobile: "mobile";
171
+ spaces: "spaces";
172
+ }>>>;
173
+ mode: z.ZodOptional<z.ZodEnum<{
174
+ text: "text";
175
+ voice: "voice";
176
+ }>>;
177
+ draft: z.ZodOptional<z.ZodNullable<z.ZodString>>;
178
+ }, z.core.$strip>;
179
+ export type ThreadHandoffView = z.infer<typeof threadHandoffViewSchema>;
180
+ export declare const mobileHandoffLaunchSchema: z.ZodObject<{
181
+ kind: z.ZodLiteral<"mobile">;
182
+ push_attempted: z.ZodBoolean;
183
+ push_delivered: z.ZodBoolean;
184
+ device_count: z.ZodNumber;
185
+ link_url: z.ZodString;
186
+ scheme_url: z.ZodString;
187
+ }, z.core.$strip>;
188
+ export type MobileHandoffLaunch = z.infer<typeof mobileHandoffLaunchSchema>;
189
+ export declare const officeHandoffLaunchSchema: z.ZodObject<{
190
+ kind: z.ZodLiteral<"office">;
191
+ host: z.ZodEnum<{
192
+ excel: "excel";
193
+ powerpoint: "powerpoint";
194
+ word: "word";
195
+ }>;
196
+ desktop_url: z.ZodString;
197
+ template_url: z.ZodString;
198
+ web_url: z.ZodString;
199
+ marketplace_url: z.ZodNullable<z.ZodString>;
200
+ }, z.core.$strip>;
201
+ export type OfficeHandoffLaunch = z.infer<typeof officeHandoffLaunchSchema>;
202
+ export declare const officeInvitationLaunchSchema: z.ZodObject<{
203
+ kind: z.ZodLiteral<"office_invitation">;
204
+ host: z.ZodEnum<{
205
+ excel: "excel";
206
+ powerpoint: "powerpoint";
207
+ word: "word";
208
+ }>;
209
+ }, z.core.$strip>;
210
+ export type OfficeInvitationLaunch = z.infer<typeof officeInvitationLaunchSchema>;
211
+ export declare const chromeHandoffLaunchSchema: z.ZodObject<{
212
+ kind: z.ZodLiteral<"chrome">;
213
+ }, z.core.$strip>;
214
+ /** Spaces lands on `url`; an open Spaces tab also finds the record on its own. */
215
+ export declare const spacesHandoffLaunchSchema: z.ZodObject<{
216
+ kind: z.ZodLiteral<"spaces">;
217
+ url: z.ZodString;
218
+ }, z.core.$strip>;
219
+ export type SpacesHandoffLaunch = z.infer<typeof spacesHandoffLaunchSchema>;
220
+ /** Nothing to open: the next surface to come to the front offers it. */
221
+ export declare const nextHandoffLaunchSchema: z.ZodObject<{
222
+ kind: z.ZodLiteral<"next">;
223
+ }, z.core.$strip>;
224
+ /** The desktop app: `scheme_url` on the same computer; from a phone, it finds the record itself. */
225
+ export declare const desktopThreadHandoffLaunchSchema: z.ZodObject<{
226
+ kind: z.ZodLiteral<"desktop">;
227
+ scheme_url: z.ZodString;
228
+ download_url: z.ZodString;
229
+ deployment_url: z.ZodString;
230
+ protocol_version: z.ZodLiteral<1>;
231
+ }, z.core.$strip>;
232
+ export type DesktopThreadHandoffLaunch = z.infer<typeof desktopThreadHandoffLaunchSchema>;
233
+ export declare const handoffLaunchSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
234
+ kind: z.ZodLiteral<"mobile">;
235
+ push_attempted: z.ZodBoolean;
236
+ push_delivered: z.ZodBoolean;
237
+ device_count: z.ZodNumber;
238
+ link_url: z.ZodString;
239
+ scheme_url: z.ZodString;
240
+ }, z.core.$strip>, z.ZodObject<{
241
+ kind: z.ZodLiteral<"office">;
242
+ host: z.ZodEnum<{
243
+ excel: "excel";
244
+ powerpoint: "powerpoint";
245
+ word: "word";
246
+ }>;
247
+ desktop_url: z.ZodString;
248
+ template_url: z.ZodString;
249
+ web_url: z.ZodString;
250
+ marketplace_url: z.ZodNullable<z.ZodString>;
251
+ }, z.core.$strip>, z.ZodObject<{
252
+ kind: z.ZodLiteral<"office_invitation">;
253
+ host: z.ZodEnum<{
254
+ excel: "excel";
255
+ powerpoint: "powerpoint";
256
+ word: "word";
257
+ }>;
258
+ }, z.core.$strip>, z.ZodObject<{
259
+ kind: z.ZodLiteral<"chrome">;
260
+ }, z.core.$strip>, z.ZodObject<{
261
+ kind: z.ZodLiteral<"spaces">;
262
+ url: z.ZodString;
263
+ }, z.core.$strip>, z.ZodObject<{
264
+ kind: z.ZodLiteral<"next">;
265
+ }, z.core.$strip>, z.ZodObject<{
266
+ kind: z.ZodLiteral<"desktop">;
267
+ scheme_url: z.ZodString;
268
+ download_url: z.ZodString;
269
+ deployment_url: z.ZodString;
270
+ protocol_version: z.ZodLiteral<1>;
271
+ }, z.core.$strip>], "kind">;
272
+ export type HandoffLaunch = z.infer<typeof handoffLaunchSchema>;
273
+ export declare const createThreadHandoffResponseSchema: z.ZodObject<{
274
+ handoff: z.ZodObject<{
275
+ handoff_id: z.ZodString;
276
+ thread_id: z.ZodString;
277
+ session_asset_id: z.ZodNullable<z.ZodString>;
278
+ source: z.ZodString;
279
+ destination: z.ZodEnum<{
280
+ chrome: "chrome";
281
+ desktop: "desktop";
282
+ excel: "excel";
283
+ mobile: "mobile";
284
+ next: "next";
285
+ powerpoint: "powerpoint";
286
+ spaces: "spaces";
287
+ word: "word";
288
+ }>;
289
+ office_launch_mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
290
+ invitation: "invitation";
291
+ new_document: "new_document";
292
+ }>>>;
293
+ environment: z.ZodEnum<{
294
+ localhost: "localhost";
295
+ production: "production";
296
+ staging: "staging";
297
+ }>;
298
+ state: z.ZodEnum<{
299
+ acknowledged: "acknowledged";
300
+ claimed: "claimed";
301
+ failed: "failed";
302
+ issued: "issued";
303
+ launched: "launched";
304
+ }>;
305
+ issued_at: z.ZodString;
306
+ expires_at: z.ZodString;
307
+ claimed_at: z.ZodNullable<z.ZodString>;
308
+ acknowledged_at: z.ZodNullable<z.ZodString>;
309
+ failure_reason: z.ZodNullable<z.ZodString>;
310
+ push_delivered: z.ZodNullable<z.ZodBoolean>;
311
+ claimed_surface: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
312
+ chrome: "chrome";
313
+ desktop: "desktop";
314
+ mobile: "mobile";
315
+ spaces: "spaces";
316
+ }>>>;
317
+ mode: z.ZodOptional<z.ZodEnum<{
318
+ text: "text";
319
+ voice: "voice";
320
+ }>>;
321
+ draft: z.ZodOptional<z.ZodNullable<z.ZodString>>;
322
+ }, z.core.$strip>;
323
+ launch: z.ZodDiscriminatedUnion<[z.ZodObject<{
324
+ kind: z.ZodLiteral<"mobile">;
325
+ push_attempted: z.ZodBoolean;
326
+ push_delivered: z.ZodBoolean;
327
+ device_count: z.ZodNumber;
328
+ link_url: z.ZodString;
329
+ scheme_url: z.ZodString;
330
+ }, z.core.$strip>, z.ZodObject<{
331
+ kind: z.ZodLiteral<"office">;
332
+ host: z.ZodEnum<{
333
+ excel: "excel";
334
+ powerpoint: "powerpoint";
335
+ word: "word";
336
+ }>;
337
+ desktop_url: z.ZodString;
338
+ template_url: z.ZodString;
339
+ web_url: z.ZodString;
340
+ marketplace_url: z.ZodNullable<z.ZodString>;
341
+ }, z.core.$strip>, z.ZodObject<{
342
+ kind: z.ZodLiteral<"office_invitation">;
343
+ host: z.ZodEnum<{
344
+ excel: "excel";
345
+ powerpoint: "powerpoint";
346
+ word: "word";
347
+ }>;
348
+ }, z.core.$strip>, z.ZodObject<{
349
+ kind: z.ZodLiteral<"chrome">;
350
+ }, z.core.$strip>, z.ZodObject<{
351
+ kind: z.ZodLiteral<"spaces">;
352
+ url: z.ZodString;
353
+ }, z.core.$strip>, z.ZodObject<{
354
+ kind: z.ZodLiteral<"next">;
355
+ }, z.core.$strip>, z.ZodObject<{
356
+ kind: z.ZodLiteral<"desktop">;
357
+ scheme_url: z.ZodString;
358
+ download_url: z.ZodString;
359
+ deployment_url: z.ZodString;
360
+ protocol_version: z.ZodLiteral<1>;
361
+ }, z.core.$strip>], "kind">;
362
+ }, z.core.$strip>;
363
+ export type CreateThreadHandoffResponse = z.infer<typeof createThreadHandoffResponseSchema>;
364
+ export interface CreateThreadHandoffInput {
365
+ threadId: string;
366
+ destination: ThreadHandoffDestination;
367
+ source: HandoffSource;
368
+ officeLaunchMode?: OfficeLaunchMode;
369
+ /** An observed workspace precondition, never an authorization grant. */
370
+ expectedWorkspaceId?: string;
371
+ /** The composer's unsent text; the destination prefills it and never sends it. */
372
+ draft?: string;
373
+ /** `voice` offers "Continue by voice" on the destination. Omitted means text. */
374
+ mode?: HandoffMode;
375
+ }
376
+ /** A phone invites the computer's pane; other sources keep their existing launch. */
377
+ export declare function resolveOfficeHandoffLaunchMode({ source, destination, officeLaunchMode, }: CreateThreadHandoffInput): OfficeLaunchMode | undefined;
378
+ /** The same request body for every host's authenticated HTTP adapter. */
379
+ export declare function threadHandoffCreateBody({ threadId, destination, source, officeLaunchMode, expectedWorkspaceId, draft, mode: handoffMode, }: CreateThreadHandoffInput): {
380
+ thread_id: string;
381
+ destination: "chrome" | "desktop" | "excel" | "mobile" | "next" | "powerpoint" | "spaces" | "word";
382
+ source: HandoffSource;
383
+ expected_workspace_id?: string | undefined;
384
+ office_launch_mode?: "invitation" | "new_document" | undefined;
385
+ draft?: string | undefined;
386
+ mode?: "voice" | undefined;
387
+ };
388
+ /** Keep a draft within the server's limit at a character boundary; never send more. */
389
+ export declare const clampHandoffDraft: (draft: string) => string;
390
+ /**
391
+ * Where an HTTP adapter sends a create. The desktop app has its own protocol
392
+ * (its record also carries asset tabs), so `desktop` posts a conversation-only
393
+ * desktop handoff to `/desktop`; everything else posts to `/api/handoffs`.
394
+ * Pair with {@link parseThreadHandoffCreateResponse}.
395
+ */
396
+ export declare function threadHandoffCreateRequest(input: CreateThreadHandoffInput): {
397
+ path: '' | '/desktop';
398
+ body: Record<string, unknown>;
399
+ };
400
+ /** Parse either create reply into the one shape the shared flow waits on. */
401
+ export declare function parseThreadHandoffCreateResponse(input: Pick<CreateThreadHandoffInput, 'destination'>, payload: unknown): CreateThreadHandoffResponse;
402
+ /** Body of `POST /api/handoffs/claim`. `surface` is required for a `next` pickup. */
403
+ export declare function threadHandoffClaimBody({ handoffId, destination, surfaceInstance, surface, }: {
404
+ handoffId?: string;
405
+ destination: Exclude<ThreadHandoffDestination, 'desktop'>;
406
+ surfaceInstance: string;
407
+ surface?: PickupSurface;
408
+ }): {
409
+ handoff_id?: string | undefined;
410
+ destination: "chrome" | "excel" | "mobile" | "next" | "powerpoint" | "spaces" | "word";
411
+ surface_instance: string;
412
+ surface?: "chrome" | "desktop" | "mobile" | "spaces" | undefined;
413
+ };
414
+ /** The most ticket ids a receiver may ask `/pending` to skip. */
415
+ export declare const MAX_PENDING_EXCLUDE = 20;
416
+ /**
417
+ * The ids a receiver asks `/pending` to skip (declined here, or issued here),
418
+ * newest last in, bounded to the server's limit and to the id shape it issues.
419
+ * A filter only: the server still binds every candidate to the caller.
420
+ */
421
+ export declare function pendingExcludeIds(ids: Iterable<string>): string[];
422
+ /**
423
+ * A receiver's `exclude`: the newest half of what it issued and the newest half of what it
424
+ * declined (each oldest first, as a Set keeps them). Neither kind can crowd the other out of
425
+ * the server's bound, so a long-lived tab's old declines never hide its newest own ticket and
426
+ * many sends never drop its latest "Not now".
427
+ */
428
+ export declare function pickupExcludeIds({ issuedHere, declined, }: {
429
+ issuedHere: Iterable<string>;
430
+ declined: Iterable<string>;
431
+ }): string[];
432
+ /** `/pending?destination=…&exclude=…` relative to `/api/handoffs`. */
433
+ export declare function pendingHandoffPath({ destination, exclude, }: {
434
+ destination: Exclude<ThreadHandoffDestination, 'desktop'> | 'desktop';
435
+ exclude?: Iterable<string>;
436
+ }): string;
437
+ export declare const claimThreadHandoffResponseSchema: z.ZodObject<{
438
+ handoff: z.ZodObject<{
439
+ handoff_id: z.ZodString;
440
+ thread_id: z.ZodString;
441
+ session_asset_id: z.ZodNullable<z.ZodString>;
442
+ source: z.ZodString;
443
+ destination: z.ZodEnum<{
444
+ chrome: "chrome";
445
+ desktop: "desktop";
446
+ excel: "excel";
447
+ mobile: "mobile";
448
+ next: "next";
449
+ powerpoint: "powerpoint";
450
+ spaces: "spaces";
451
+ word: "word";
452
+ }>;
453
+ office_launch_mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
454
+ invitation: "invitation";
455
+ new_document: "new_document";
456
+ }>>>;
457
+ environment: z.ZodEnum<{
458
+ localhost: "localhost";
459
+ production: "production";
460
+ staging: "staging";
461
+ }>;
462
+ state: z.ZodEnum<{
463
+ acknowledged: "acknowledged";
464
+ claimed: "claimed";
465
+ failed: "failed";
466
+ issued: "issued";
467
+ launched: "launched";
468
+ }>;
469
+ issued_at: z.ZodString;
470
+ expires_at: z.ZodString;
471
+ claimed_at: z.ZodNullable<z.ZodString>;
472
+ acknowledged_at: z.ZodNullable<z.ZodString>;
473
+ failure_reason: z.ZodNullable<z.ZodString>;
474
+ push_delivered: z.ZodNullable<z.ZodBoolean>;
475
+ claimed_surface: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
476
+ chrome: "chrome";
477
+ desktop: "desktop";
478
+ mobile: "mobile";
479
+ spaces: "spaces";
480
+ }>>>;
481
+ mode: z.ZodOptional<z.ZodEnum<{
482
+ text: "text";
483
+ voice: "voice";
484
+ }>>;
485
+ draft: z.ZodOptional<z.ZodNullable<z.ZodString>>;
486
+ }, z.core.$strip>;
487
+ }, z.core.$strip>;
488
+ export type ClaimThreadHandoffResponse = z.infer<typeof claimThreadHandoffResponseSchema>;
489
+ /** `GET /api/handoffs/pending` answers `null` (not 404) when nothing waits. */
490
+ export declare const pendingThreadHandoffResponseSchema: z.ZodNullable<z.ZodObject<{
491
+ handoff: z.ZodObject<{
492
+ handoff_id: z.ZodString;
493
+ thread_id: z.ZodString;
494
+ session_asset_id: z.ZodNullable<z.ZodString>;
495
+ source: z.ZodString;
496
+ destination: z.ZodEnum<{
497
+ chrome: "chrome";
498
+ desktop: "desktop";
499
+ excel: "excel";
500
+ mobile: "mobile";
501
+ next: "next";
502
+ powerpoint: "powerpoint";
503
+ spaces: "spaces";
504
+ word: "word";
505
+ }>;
506
+ office_launch_mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
507
+ invitation: "invitation";
508
+ new_document: "new_document";
509
+ }>>>;
510
+ environment: z.ZodEnum<{
511
+ localhost: "localhost";
512
+ production: "production";
513
+ staging: "staging";
514
+ }>;
515
+ state: z.ZodEnum<{
516
+ acknowledged: "acknowledged";
517
+ claimed: "claimed";
518
+ failed: "failed";
519
+ issued: "issued";
520
+ launched: "launched";
521
+ }>;
522
+ issued_at: z.ZodString;
523
+ expires_at: z.ZodString;
524
+ claimed_at: z.ZodNullable<z.ZodString>;
525
+ acknowledged_at: z.ZodNullable<z.ZodString>;
526
+ failure_reason: z.ZodNullable<z.ZodString>;
527
+ push_delivered: z.ZodNullable<z.ZodBoolean>;
528
+ claimed_surface: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
529
+ chrome: "chrome";
530
+ desktop: "desktop";
531
+ mobile: "mobile";
532
+ spaces: "spaces";
533
+ }>>>;
534
+ mode: z.ZodOptional<z.ZodEnum<{
535
+ text: "text";
536
+ voice: "voice";
537
+ }>>;
538
+ draft: z.ZodOptional<z.ZodNullable<z.ZodString>>;
539
+ }, z.core.$strip>;
540
+ }, z.core.$strip>>;
541
+ /**
542
+ * Receiving half of the protocol: an open Spaces tab, the extension or the
543
+ * phone finds a handoff sent to it (or to `next`), claims it exactly once and
544
+ * reports the outcome. Every call is bound server-side to the signed-in
545
+ * person, workspace and environment. The desktop app is not a destination
546
+ * here: its own receiver claims `/api/handoffs/desktop` and acknowledges with
547
+ * per-asset results, which is why `desktop` is excluded from these calls.
548
+ */
549
+ export interface ThreadHandoffReceiverTransport {
550
+ getPending: (options: {
551
+ destination: Exclude<ThreadHandoffDestination, 'desktop'>;
552
+ /** Tickets this receiver declined or issued itself; the newest other one is returned. */
553
+ exclude?: readonly string[];
554
+ signal?: AbortSignal;
555
+ }) => Promise<ClaimThreadHandoffResponse | null>;
556
+ claim: (options: {
557
+ handoffId?: string;
558
+ destination: Exclude<ThreadHandoffDestination, 'desktop'>;
559
+ surfaceInstance: string;
560
+ surface?: PickupSurface;
561
+ signal?: AbortSignal;
562
+ }) => Promise<ClaimThreadHandoffResponse>;
563
+ acknowledge: (options: {
564
+ handoffId: string;
565
+ outcome: 'acknowledged' | 'failed';
566
+ reason?: string;
567
+ surfaceInstance: string;
568
+ signal?: AbortSignal;
569
+ }) => Promise<ThreadHandoffView>;
570
+ }
571
+ /**
572
+ * Whether a pending handoff should be offered on this surface: still open,
573
+ * not one this device issued itself, and not one it already declined.
574
+ * Offering never claims; the person's tap does.
575
+ */
576
+ export declare function shouldOfferPendingHandoff({ pending, issuedHere, declined, now, }: {
577
+ pending: ThreadHandoffView | null | undefined;
578
+ issuedHere: ReadonlySet<string>;
579
+ declined: ReadonlySet<string>;
580
+ now?: number;
581
+ }): boolean;
582
+ /**
583
+ * Surface-specific HTTP adapter. Olympus binds it to `apiClient`; the
584
+ * extension binds it to its authenticated fetch. Both must resolve (not
585
+ * reject) with parsed responses so the flow can attribute failures.
586
+ */
587
+ export interface ThreadHandoffTransport {
588
+ getReadiness: (options: {
589
+ signal?: AbortSignal;
590
+ }) => Promise<HandoffReadinessResponse>;
591
+ createHandoff: (input: CreateThreadHandoffInput & {
592
+ signal?: AbortSignal;
593
+ }) => Promise<CreateThreadHandoffResponse>;
594
+ getHandoff: (options: {
595
+ handoffId: string;
596
+ signal?: AbortSignal;
597
+ }) => Promise<ThreadHandoffView>;
598
+ }
599
+ export declare const HANDOFF_DESTINATION_LABELS: Record<HandoffDestination, string>;
600
+ /** Picker labels for every destination a "Continue on…" row can name. */
601
+ export declare const THREAD_HANDOFF_DESTINATION_LABELS: Record<ThreadHandoffDestination, string>;
602
+ /** "Pick up your conversation from your phone?" — a destination's offer, before any claim. */
603
+ export declare const pickUpOfferLabel: (source: string) => string;
604
+ /** "Continued from your phone" — the divider a destination shows where it picked up. */
605
+ export declare const continuedFromLabel: (source: string) => string;
606
+ /** "Pick up your conversation from your phone?" — a destination's offer outside its own window. */
607
+ export declare const pickUpFromLabel: (source: string) => string;
608
+ /** What a source says once a `next` handoff was picked up somewhere. */
609
+ export declare const pickedUpOnLabel: (surface: PickupSurface | null | undefined) => string;
610
+ export declare const driverSurfaceForChannel: (channel: string | null | undefined) => PickupSurface | null;
611
+ /**
612
+ * "Driving on your phone" when another of the four surfaces sent last;
613
+ * `null` when this surface is the driver or the driver is unknown.
614
+ */
615
+ export declare const drivingOnLabel: ({ lastChannel, here, }: {
616
+ lastChannel: string | null | undefined;
617
+ here: PickupSurface;
618
+ }) => string | null;
619
+ /** A landing the destination shows once it owns the thread. */
620
+ export interface HandoffLanding {
621
+ handoffId: string;
622
+ threadId: string;
623
+ /** The raw `source` of the record (`spaces`, `mobile`, …). */
624
+ source: string;
625
+ /** Prefill it; never send it. `null` when the source had nothing typed. */
626
+ draft: string | null;
627
+ /**
628
+ * The person chose to continue by voice. The host offers a one-tap
629
+ * "Continue by voice"; nothing starts the microphone on its own.
630
+ */
631
+ continueByVoice: boolean;
632
+ }
633
+ export declare const handoffLandingFromView: (view: ThreadHandoffView) => HandoffLanding;
634
+ export declare const isOfficeHandoffDestination: (destination: ThreadHandoffDestination) => destination is OfficeHandoffDestination;
635
+ export declare const isServerHandoffDestination: (destination: HandoffDestination) => destination is ServerHandoffDestination;
636
+ export declare const isPickupSurface: (value: unknown) => value is PickupSurface;
637
+ /** Index a readiness response by destination; missing rows read as `unknown`. */
638
+ export declare const readinessByDestination: (response: HandoffReadinessResponse | null | undefined) => Record<HandoffDestination, DestinationReadiness>;
639
+ /**
640
+ * How a mobile handoff should be presented before the phone answers.
641
+ *
642
+ * - `app`: a fresh push token exists — the phone gets a notification and the
643
+ * QR is only offered as a secondary path.
644
+ * - `qr`: no usable device is known — lead with the QR / link.
645
+ */
646
+ export type MobileLaunchMode = 'app' | 'qr';
647
+ export declare const selectMobileLaunchMode: (readiness: DestinationReadiness | null | undefined) => MobileLaunchMode;
648
+ /**
649
+ * What a "Continue in…" row should say for a destination given its readiness.
650
+ * Shared so Spaces and the extension render identical copy.
651
+ */
652
+ export interface HandoffDestinationPresentation {
653
+ destination: HandoffDestination;
654
+ label: string;
655
+ /** Secondary line under the label; `null` when the row needs no caveat. */
656
+ detail: string | null;
657
+ /**
658
+ * `install` rows do not create a handoff — they point at install help;
659
+ * `unavailable` rows are disabled.
660
+ */
661
+ action: 'handoff' | 'install' | 'unavailable';
662
+ }
663
+ export declare const presentHandoffDestination: ({ destination, readiness, }: {
664
+ destination: HandoffDestination;
665
+ readiness: DestinationReadiness | null | undefined;
666
+ }) => HandoffDestinationPresentation;
667
+ export type HandoffOutcome = {
668
+ status: 'acknowledged';
669
+ handoff: ThreadHandoffView;
670
+ } | {
671
+ status: 'failed';
672
+ handoff: ThreadHandoffView | null;
673
+ reason: string;
674
+ } | {
675
+ status: 'timeout';
676
+ handoff: ThreadHandoffView | null;
677
+ } | {
678
+ status: 'cancelled';
679
+ handoff: ThreadHandoffView | null;
680
+ };
681
+ export declare const isTerminalHandoffState: (state: HandoffState) => boolean;
682
+ export interface WaitForHandoffOutcomeOptions {
683
+ transport: Pick<ThreadHandoffTransport, 'getHandoff'>;
684
+ handoffId: string;
685
+ /** Wall-clock budget; mobile pushes typically land in seconds, Office launches in tens of seconds. */
686
+ timeoutMs: number;
687
+ pollIntervalMs?: number;
688
+ signal?: AbortSignal;
689
+ onUpdate?: (handoff: ThreadHandoffView) => void;
690
+ /** Injected for tests. */
691
+ now?: () => number;
692
+ sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
693
+ }
694
+ /**
695
+ * Poll one handoff until the destination acknowledges, the server marks it
696
+ * failed, the budget elapses, or the caller aborts. Each request is bound to
697
+ * the remaining budget so a stalled response cannot outlive the deadline.
698
+ * Retryable transport errors are retried within the budget; permanent ones
699
+ * (auth, wrong deployment, malformed payload) fail immediately with their
700
+ * actionable message. The last known view is reported.
701
+ */
702
+ export declare function waitForHandoffOutcome({ transport, handoffId, timeoutMs, pollIntervalMs, signal, onUpdate, now, sleep, }: WaitForHandoffOutcomeOptions): Promise<HandoffOutcome>;
703
+ /** Error raised by a transport when the server no longer knows the handoff (404). */
704
+ export declare class HandoffGoneError extends Error {
705
+ constructor(handoffId: string);
706
+ }
707
+ export declare const isHandoffGoneError: (error: unknown) => error is HandoffGoneError;
708
+ /**
709
+ * Transport failure that polling the same handoff can never recover from:
710
+ * the session is signed out, the token belongs to another deployment, the
711
+ * server rejected the request, or the payload did not match the schema.
712
+ */
713
+ export declare class HandoffPermanentError extends Error {
714
+ constructor(message: string, options?: {
715
+ cause?: unknown;
716
+ });
717
+ }
718
+ export declare const isHandoffPermanentError: (error: unknown) => error is HandoffPermanentError;
719
+ export type HandoffTransportErrorKind = 'gone' | 'permanent' | 'retryable';
720
+ /**
721
+ * Shared classification for both transports: only network failures and
722
+ * retryable server statuses keep the poll alive. Schema mismatches surface as
723
+ * `ZodError` from either adapter and are permanent.
724
+ */
725
+ export declare const classifyHandoffTransportError: (error: unknown) => HandoffTransportErrorKind;
726
+ /** 5xx, timeouts and rate limits may clear on the next poll; any other 4xx will not. */
727
+ export declare const isRetryableHandoffHttpStatus: (status: number) => boolean;
728
+ /**
729
+ * Map a non-2xx status to the transport error the poll loop understands.
730
+ * `detail` is the server's actionable message when it sent one.
731
+ */
732
+ export declare const handoffHttpError: ({ handoffId, status, detail, }: {
733
+ handoffId: string;
734
+ status: number;
735
+ detail: string | null;
736
+ }) => Error;
737
+ export declare const describeHandoffTransportError: (error: unknown) => string;
738
+ /** `?handoff=<id>` — the query parameter mobile-web and QR links carry. */
739
+ export declare const HANDOFF_URL_PARAM = "handoff";
740
+ /** `?continue_handoff=<id>` — where a continuation lands in Spaces (never a phone's ticket). */
741
+ export declare const SPACES_HANDOFF_URL_PARAM = "continue_handoff";
742
+ /**
743
+ * Read a handoff id from a URL. Ids are server-issued, URL-safe tokens; anything
744
+ * else is rejected so a tampered link never reaches the claim path.
745
+ */
746
+ export declare const parseHandoffIdParam: (value: string | null | undefined) => string | null;
747
+ /** Athena Mobile's custom URL scheme (`mobile-app-react-native/app.json` → `scheme`). */
748
+ export declare const MOBILE_APP_SCHEME = "athenavisionapplication";
749
+ /**
750
+ * Custom-scheme launch for a handoff — what a phone's browser opens when the
751
+ * Universal/App Link landed on mobile web instead of in the app. Mirrors
752
+ * agora's `_mobile_scheme_url`; carries only the opaque handoff id.
753
+ */
754
+ export declare const buildMobileHandoffSchemeUrl: ({ handoffId }: {
755
+ handoffId: string;
756
+ }) => string;