@athenaintel/react 0.43.0 → 0.50.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 (746) hide show
  1. package/README.md +258 -8
  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/call-recap.cjs +319 -0
  13. package/dist/agent-runtime/src/call-recap.cjs.map +1 -0
  14. package/dist/agent-runtime/src/call-recap.d.ts +142 -0
  15. package/dist/agent-runtime/src/call-recap.js +319 -0
  16. package/dist/agent-runtime/src/call-recap.js.map +1 -0
  17. package/dist/agent-runtime/src/chat-outbox-store.cjs +1 -0
  18. package/dist/agent-runtime/src/chat-outbox-store.cjs.map +1 -1
  19. package/dist/agent-runtime/src/chat-outbox-store.d.ts +7 -0
  20. package/dist/agent-runtime/src/chat-outbox-store.js +1 -0
  21. package/dist/agent-runtime/src/chat-outbox-store.js.map +1 -1
  22. package/dist/agent-runtime/src/chat-outbox.cjs +46 -5
  23. package/dist/agent-runtime/src/chat-outbox.cjs.map +1 -1
  24. package/dist/agent-runtime/src/chat-outbox.d.ts +29 -0
  25. package/dist/agent-runtime/src/chat-outbox.js +46 -5
  26. package/dist/agent-runtime/src/chat-outbox.js.map +1 -1
  27. package/dist/agent-runtime/src/client-tool-bridge.cjs +15 -15
  28. package/dist/agent-runtime/src/client-tool-bridge.cjs.map +1 -1
  29. package/dist/agent-runtime/src/conversation-index.cjs +8 -8
  30. package/dist/agent-runtime/src/conversation-index.cjs.map +1 -1
  31. package/dist/agent-runtime/src/conversation-index.d.ts +7 -0
  32. package/dist/agent-runtime/src/conversation-index.js.map +1 -1
  33. package/dist/agent-runtime/src/conversation-list.cjs +2 -1
  34. package/dist/agent-runtime/src/conversation-list.cjs.map +1 -1
  35. package/dist/agent-runtime/src/conversation-list.d.ts +19 -3
  36. package/dist/agent-runtime/src/conversation-list.js +2 -1
  37. package/dist/agent-runtime/src/conversation-list.js.map +1 -1
  38. package/dist/agent-runtime/src/decision-checks.cjs +207 -0
  39. package/dist/agent-runtime/src/decision-checks.cjs.map +1 -0
  40. package/dist/agent-runtime/src/decision-checks.d.ts +142 -0
  41. package/dist/agent-runtime/src/decision-checks.js +207 -0
  42. package/dist/agent-runtime/src/decision-checks.js.map +1 -0
  43. package/dist/agent-runtime/src/desktop-handoff.d.ts +12 -0
  44. package/dist/agent-runtime/src/errors.cjs +18 -0
  45. package/dist/agent-runtime/src/errors.cjs.map +1 -1
  46. package/dist/agent-runtime/src/errors.d.ts +7 -0
  47. package/dist/agent-runtime/src/errors.js +18 -0
  48. package/dist/agent-runtime/src/errors.js.map +1 -1
  49. package/dist/agent-runtime/src/generated/runconfig-contract.cjs +12 -0
  50. package/dist/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
  51. package/dist/agent-runtime/src/generated/runconfig-contract.d.ts +6 -6
  52. package/dist/agent-runtime/src/generated/runconfig-contract.js +12 -0
  53. package/dist/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
  54. package/dist/agent-runtime/src/handoff-arrival.cjs +60 -0
  55. package/dist/agent-runtime/src/handoff-arrival.cjs.map +1 -0
  56. package/dist/agent-runtime/src/handoff-arrival.d.ts +46 -0
  57. package/dist/agent-runtime/src/handoff-arrival.js +60 -0
  58. package/dist/agent-runtime/src/handoff-arrival.js.map +1 -0
  59. package/dist/agent-runtime/src/index.d.ts +16 -9
  60. package/dist/agent-runtime/src/interrupts.cjs +71 -19
  61. package/dist/agent-runtime/src/interrupts.cjs.map +1 -1
  62. package/dist/agent-runtime/src/interrupts.d.ts +40 -3
  63. package/dist/agent-runtime/src/interrupts.js +56 -4
  64. package/dist/agent-runtime/src/interrupts.js.map +1 -1
  65. package/dist/agent-runtime/src/lane-history.cjs +8 -8
  66. package/dist/agent-runtime/src/lane-history.cjs.map +1 -1
  67. package/dist/agent-runtime/src/messages.cjs +43 -8
  68. package/dist/agent-runtime/src/messages.cjs.map +1 -1
  69. package/dist/agent-runtime/src/messages.d.ts +25 -3
  70. package/dist/agent-runtime/src/messages.js +43 -8
  71. package/dist/agent-runtime/src/messages.js.map +1 -1
  72. package/dist/agent-runtime/src/model-context.cjs +3 -2
  73. package/dist/agent-runtime/src/model-context.cjs.map +1 -1
  74. package/dist/agent-runtime/src/model-context.d.ts +6 -1
  75. package/dist/agent-runtime/src/model-context.js +3 -2
  76. package/dist/agent-runtime/src/model-context.js.map +1 -1
  77. package/dist/agent-runtime/src/offline-status.cjs +36 -0
  78. package/dist/agent-runtime/src/offline-status.cjs.map +1 -0
  79. package/dist/agent-runtime/src/offline-status.d.ts +118 -3
  80. package/dist/agent-runtime/src/offline-status.js +36 -0
  81. package/dist/agent-runtime/src/offline-status.js.map +1 -0
  82. package/dist/agent-runtime/src/queue.cjs +0 -9
  83. package/dist/agent-runtime/src/queue.cjs.map +1 -1
  84. package/dist/agent-runtime/src/queue.js +0 -9
  85. package/dist/agent-runtime/src/queue.js.map +1 -1
  86. package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs +9 -9
  87. package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -1
  88. package/dist/agent-runtime/src/runtime-catalog.cjs +42 -0
  89. package/dist/agent-runtime/src/runtime-catalog.cjs.map +1 -0
  90. package/dist/agent-runtime/src/runtime-catalog.d.ts +35 -0
  91. package/dist/agent-runtime/src/runtime-catalog.js +42 -0
  92. package/dist/agent-runtime/src/runtime-catalog.js.map +1 -0
  93. package/dist/agent-runtime/src/runtime-messages.cjs.map +1 -1
  94. package/dist/agent-runtime/src/runtime-messages.d.ts +1 -1
  95. package/dist/agent-runtime/src/runtime-messages.js.map +1 -1
  96. package/dist/agent-runtime/src/runtime.d.ts +41 -0
  97. package/dist/agent-runtime/src/send-recovery.cjs +37 -3
  98. package/dist/agent-runtime/src/send-recovery.cjs.map +1 -1
  99. package/dist/agent-runtime/src/send-recovery.d.ts +19 -0
  100. package/dist/agent-runtime/src/send-recovery.js +37 -3
  101. package/dist/agent-runtime/src/send-recovery.js.map +1 -1
  102. package/dist/agent-runtime/src/statewire-suspended.cjs +3 -3
  103. package/dist/agent-runtime/src/statewire-suspended.cjs.map +1 -1
  104. package/dist/agent-runtime/src/subagents.cjs +32 -2
  105. package/dist/agent-runtime/src/subagents.cjs.map +1 -1
  106. package/dist/agent-runtime/src/subagents.d.ts +9 -0
  107. package/dist/agent-runtime/src/subagents.js +30 -0
  108. package/dist/agent-runtime/src/subagents.js.map +1 -1
  109. package/dist/agent-runtime/src/thread-driver.cjs +67 -0
  110. package/dist/agent-runtime/src/thread-driver.cjs.map +1 -0
  111. package/dist/agent-runtime/src/thread-driver.d.ts +49 -0
  112. package/dist/agent-runtime/src/thread-driver.js +67 -0
  113. package/dist/agent-runtime/src/thread-driver.js.map +1 -0
  114. package/dist/agent-runtime/src/thread-handoff-flow-machine.d.ts +172 -0
  115. package/dist/agent-runtime/src/thread-handoff-protocol.d.ts +868 -0
  116. package/dist/agent-runtime/src/thread-handoff-qr.d.ts +11 -0
  117. package/dist/agent-runtime/src/thread-handoff.d.ts +3 -364
  118. package/dist/agent-runtime/src/thread-status.cjs +3 -3
  119. package/dist/agent-runtime/src/thread-status.cjs.map +1 -1
  120. package/dist/agent-runtime/src/tool-metadata.cjs +210 -25
  121. package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -1
  122. package/dist/agent-runtime/src/tool-metadata.d.ts +12 -0
  123. package/dist/agent-runtime/src/tool-metadata.js +210 -25
  124. package/dist/agent-runtime/src/tool-metadata.js.map +1 -1
  125. package/dist/agent-runtime/src/tool-names.cjs +2 -0
  126. package/dist/agent-runtime/src/tool-names.cjs.map +1 -1
  127. package/dist/agent-runtime/src/tool-names.d.ts +2 -0
  128. package/dist/agent-runtime/src/tool-names.js +2 -0
  129. package/dist/agent-runtime/src/tool-names.js.map +1 -1
  130. package/dist/agent-runtime/src/types.d.ts +10 -2
  131. package/dist/agent-runtime/src/use-conversation-list.cjs +14 -13
  132. package/dist/agent-runtime/src/use-conversation-list.cjs.map +1 -1
  133. package/dist/agent-runtime/src/use-conversation-list.d.ts +6 -0
  134. package/dist/agent-runtime/src/use-conversation-list.js +3 -2
  135. package/dist/agent-runtime/src/use-conversation-list.js.map +1 -1
  136. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs +45 -20
  137. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs.map +1 -1
  138. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.d.ts +10 -3
  139. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js +27 -2
  140. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js.map +1 -1
  141. package/dist/agent-runtime/src/use-deep-agent-config.cjs +14 -14
  142. package/dist/agent-runtime/src/use-deep-agent-config.cjs.map +1 -1
  143. package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs +6 -6
  144. package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -1
  145. package/dist/agent-runtime/src/use-deep-agent-runtime.cjs +40 -22
  146. package/dist/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -1
  147. package/dist/agent-runtime/src/use-deep-agent-runtime.d.ts +17 -0
  148. package/dist/agent-runtime/src/use-deep-agent-runtime.js +24 -6
  149. package/dist/agent-runtime/src/use-deep-agent-runtime.js.map +1 -1
  150. package/dist/agent-runtime/src/use-deep-agent-thread.cjs +45 -45
  151. package/dist/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
  152. package/dist/agent-runtime/src/use-deep-agent-voice.cjs +588 -130
  153. package/dist/agent-runtime/src/use-deep-agent-voice.cjs.map +1 -1
  154. package/dist/agent-runtime/src/use-deep-agent-voice.d.ts +162 -10
  155. package/dist/agent-runtime/src/use-deep-agent-voice.js +529 -71
  156. package/dist/agent-runtime/src/use-deep-agent-voice.js.map +1 -1
  157. package/dist/agent-runtime/src/use-deep-agent-window-sync.cjs +26 -26
  158. package/dist/agent-runtime/src/use-deep-agent-window-sync.cjs.map +1 -1
  159. package/dist/agent-runtime/src/use-historical-edit-attachments.cjs +4 -4
  160. package/dist/agent-runtime/src/use-historical-edit-attachments.cjs.map +1 -1
  161. package/dist/agent-runtime/src/use-thread-handoff-flow.d.ts +34 -26
  162. package/dist/agent-runtime/src/voice-earcon.cjs +139 -0
  163. package/dist/agent-runtime/src/voice-earcon.cjs.map +1 -0
  164. package/dist/agent-runtime/src/voice-earcon.d.ts +38 -0
  165. package/dist/agent-runtime/src/voice-earcon.js +139 -0
  166. package/dist/agent-runtime/src/voice-earcon.js.map +1 -0
  167. package/dist/agent-runtime/src/voice-media.cjs +117 -0
  168. package/dist/agent-runtime/src/voice-media.cjs.map +1 -0
  169. package/dist/agent-runtime/src/voice-media.d.ts +63 -0
  170. package/dist/agent-runtime/src/voice-media.js +117 -0
  171. package/dist/agent-runtime/src/voice-media.js.map +1 -0
  172. package/dist/agent-runtime/src/voice-presentation.cjs +2 -0
  173. package/dist/agent-runtime/src/voice-presentation.cjs.map +1 -1
  174. package/dist/agent-runtime/src/voice-presentation.js +2 -0
  175. package/dist/agent-runtime/src/voice-presentation.js.map +1 -1
  176. package/dist/agent-runtime/src/voice-wire-types.d.ts +32 -0
  177. package/dist/assets/AssetPanel.cjs +11 -11
  178. package/dist/assets/AssetPanel.cjs.map +1 -1
  179. package/dist/assets/AthenaAssetEmbed.cjs +11 -9
  180. package/dist/assets/AthenaAssetEmbed.cjs.map +1 -1
  181. package/dist/assets/AthenaAssetEmbed.d.ts +18 -5
  182. package/dist/assets/AthenaAssetEmbed.js +4 -2
  183. package/dist/assets/AthenaAssetEmbed.js.map +1 -1
  184. package/dist/assets/AthenaLayout.cjs +16 -16
  185. package/dist/assets/AthenaLayout.cjs.map +1 -1
  186. package/dist/assets/use-asset-content.cjs +4 -4
  187. package/dist/assets/use-asset-content.cjs.map +1 -1
  188. package/dist/assets/use-asset-embed.cjs +14 -7
  189. package/dist/assets/use-asset-embed.cjs.map +1 -1
  190. package/dist/assets/use-asset-embed.d.ts +23 -6
  191. package/dist/assets/use-asset-embed.js +10 -3
  192. package/dist/assets/use-asset-embed.js.map +1 -1
  193. package/dist/auth/AthenaAuthContext.cjs +3 -3
  194. package/dist/auth/AthenaAuthContext.cjs.map +1 -1
  195. package/dist/auth/AthenaAuthProvider.cjs +8 -8
  196. package/dist/auth/AthenaAuthProvider.cjs.map +1 -1
  197. package/dist/auth/AthenaCredentialSourceContext.cjs +5 -5
  198. package/dist/auth/AthenaCredentialSourceContext.cjs.map +1 -1
  199. package/dist/auth/AthenaSSOProvider.cjs +14 -14
  200. package/dist/auth/AthenaSSOProvider.cjs.map +1 -1
  201. package/dist/auth/credential-source.cjs +26 -13
  202. package/dist/auth/credential-source.cjs.map +1 -1
  203. package/dist/auth/credential-source.d.ts +8 -0
  204. package/dist/auth/credential-source.js +26 -13
  205. package/dist/auth/credential-source.js.map +1 -1
  206. package/dist/catalog/agent-model-options.cjs +25 -17
  207. package/dist/catalog/agent-model-options.cjs.map +1 -1
  208. package/dist/catalog/agent-model-options.d.ts +38 -5
  209. package/dist/catalog/agent-model-options.js +25 -17
  210. package/dist/catalog/agent-model-options.js.map +1 -1
  211. package/dist/catalog/channel-refusal.cjs +36 -0
  212. package/dist/catalog/channel-refusal.cjs.map +1 -0
  213. package/dist/catalog/channel-refusal.d.ts +29 -0
  214. package/dist/catalog/channel-refusal.js +36 -0
  215. package/dist/catalog/channel-refusal.js.map +1 -0
  216. package/dist/catalog/chat-pickers.cjs +60 -24
  217. package/dist/catalog/chat-pickers.cjs.map +1 -1
  218. package/dist/catalog/chat-pickers.d.ts +12 -2
  219. package/dist/catalog/chat-pickers.js +56 -20
  220. package/dist/catalog/chat-pickers.js.map +1 -1
  221. package/dist/catalog/runtime-catalog.cjs +89 -23
  222. package/dist/catalog/runtime-catalog.cjs.map +1 -1
  223. package/dist/catalog/runtime-catalog.d.ts +8 -2
  224. package/dist/catalog/runtime-catalog.js +83 -17
  225. package/dist/catalog/runtime-catalog.js.map +1 -1
  226. package/dist/catalog/use-athena-chat-mode.cjs +12 -12
  227. package/dist/catalog/use-athena-chat-mode.cjs.map +1 -1
  228. package/dist/chat/AthenaChat.cjs +155 -67
  229. package/dist/chat/AthenaChat.cjs.map +1 -1
  230. package/dist/chat/AthenaChat.d.ts +42 -2
  231. package/dist/chat/AthenaChat.js +106 -18
  232. package/dist/chat/AthenaChat.js.map +1 -1
  233. package/dist/chat/AthenaChatErrorBoundary.cjs +3 -3
  234. package/dist/chat/AthenaChatErrorBoundary.cjs.map +1 -1
  235. package/dist/chat/DrivingOnChip.cjs +23 -0
  236. package/dist/chat/DrivingOnChip.cjs.map +1 -0
  237. package/dist/chat/DrivingOnChip.d.ts +17 -0
  238. package/dist/chat/DrivingOnChip.js +23 -0
  239. package/dist/chat/DrivingOnChip.js.map +1 -0
  240. package/dist/chat/StatewireApprovalCard.cjs +166 -37
  241. package/dist/chat/StatewireApprovalCard.cjs.map +1 -1
  242. package/dist/chat/StatewireApprovalCard.d.ts +91 -2
  243. package/dist/chat/StatewireApprovalCard.js +156 -27
  244. package/dist/chat/StatewireApprovalCard.js.map +1 -1
  245. package/dist/chat/StatewireClientToolBridge.cjs +2 -2
  246. package/dist/chat/StatewireClientToolBridge.cjs.map +1 -1
  247. package/dist/chat/StatewireQueuedMessages.cjs +81 -69
  248. package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
  249. package/dist/chat/StatewireQueuedMessages.d.ts +25 -13
  250. package/dist/chat/StatewireQueuedMessages.js +73 -61
  251. package/dist/chat/StatewireQueuedMessages.js.map +1 -1
  252. package/dist/chat/WaitingOnYouBanner.cjs +9 -5
  253. package/dist/chat/WaitingOnYouBanner.cjs.map +1 -1
  254. package/dist/chat/WaitingOnYouBanner.js +7 -3
  255. package/dist/chat/WaitingOnYouBanner.js.map +1 -1
  256. package/dist/chat/athena-chat-welcome.cjs +2 -2
  257. package/dist/chat/athena-chat-welcome.cjs.map +1 -1
  258. package/dist/chat/athena-citation-links.cjs +5 -5
  259. package/dist/chat/athena-citation-links.cjs.map +1 -1
  260. package/dist/chat/athena-composer-controls.cjs +26 -16
  261. package/dist/chat/athena-composer-controls.cjs.map +1 -1
  262. package/dist/chat/athena-composer-controls.d.ts +6 -0
  263. package/dist/chat/athena-composer-controls.js +26 -16
  264. package/dist/chat/athena-composer-controls.js.map +1 -1
  265. package/dist/chat/athena-turn-end-status.cjs +42 -0
  266. package/dist/chat/athena-turn-end-status.cjs.map +1 -0
  267. package/dist/chat/athena-turn-end-status.d.ts +24 -0
  268. package/dist/chat/athena-turn-end-status.js +42 -0
  269. package/dist/chat/athena-turn-end-status.js.map +1 -0
  270. package/dist/chat/browser-decision-check.cjs +131 -0
  271. package/dist/chat/browser-decision-check.cjs.map +1 -0
  272. package/dist/chat/browser-decision-check.d.ts +61 -0
  273. package/dist/chat/browser-decision-check.js +131 -0
  274. package/dist/chat/browser-decision-check.js.map +1 -0
  275. package/dist/chat/chat-outbox-rows.cjs +3 -3
  276. package/dist/chat/chat-outbox-rows.cjs.map +1 -1
  277. package/dist/chat/chat-voice-controls.cjs +96 -29
  278. package/dist/chat/chat-voice-controls.cjs.map +1 -1
  279. package/dist/chat/chat-voice-controls.d.ts +42 -3
  280. package/dist/chat/chat-voice-controls.js +92 -25
  281. package/dist/chat/chat-voice-controls.js.map +1 -1
  282. package/dist/chat/composer-keyboard-hint.cjs +5 -5
  283. package/dist/chat/composer-keyboard-hint.cjs.map +1 -1
  284. package/dist/chat/device-operation.cjs +29 -0
  285. package/dist/chat/device-operation.cjs.map +1 -0
  286. package/dist/chat/device-operation.d.ts +34 -0
  287. package/dist/chat/device-operation.js +29 -0
  288. package/dist/chat/device-operation.js.map +1 -0
  289. package/dist/chat/super-grouping/CollapsibleGroup.cjs +14 -14
  290. package/dist/chat/super-grouping/CollapsibleGroup.cjs.map +1 -1
  291. package/dist/chat/super-grouping/GroupedMessageParts.cjs +4 -4
  292. package/dist/chat/super-grouping/GroupedMessageParts.cjs.map +1 -1
  293. package/dist/chat/super-grouping/SuperGroupingCard.cjs +52 -36
  294. package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -1
  295. package/dist/chat/super-grouping/SuperGroupingCard.d.ts +19 -4
  296. package/dist/chat/super-grouping/SuperGroupingCard.js +29 -13
  297. package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -1
  298. package/dist/chat/super-grouping/SuperGroupingTranscript.cjs +32 -32
  299. package/dist/chat/super-grouping/SuperGroupingTranscript.cjs.map +1 -1
  300. package/dist/chat/super-grouping/SuperGroupingTranscript.js +3 -3
  301. package/dist/chat/super-grouping/SuperGroupingTranscript.js.map +1 -1
  302. package/dist/chat/super-grouping/ToolTimeline.cjs +73 -40
  303. package/dist/chat/super-grouping/ToolTimeline.cjs.map +1 -1
  304. package/dist/chat/super-grouping/ToolTimeline.d.ts +10 -2
  305. package/dist/chat/super-grouping/ToolTimeline.js +69 -36
  306. package/dist/chat/super-grouping/ToolTimeline.js.map +1 -1
  307. package/dist/chat/super-grouping/activity-timeline.cjs +47 -12
  308. package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
  309. package/dist/chat/super-grouping/activity-timeline.d.ts +21 -0
  310. package/dist/chat/super-grouping/activity-timeline.js +47 -12
  311. package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
  312. package/dist/chat/super-grouping/grouping-function.cjs +4 -0
  313. package/dist/chat/super-grouping/grouping-function.cjs.map +1 -1
  314. package/dist/chat/super-grouping/grouping-function.d.ts +7 -0
  315. package/dist/chat/super-grouping/grouping-function.js +5 -1
  316. package/dist/chat/super-grouping/grouping-function.js.map +1 -1
  317. package/dist/chat/super-grouping/index.cjs +6 -0
  318. package/dist/chat/super-grouping/index.cjs.map +1 -1
  319. package/dist/chat/super-grouping/index.d.ts +5 -2
  320. package/dist/chat/super-grouping/index.js +7 -1
  321. package/dist/chat/super-grouping/index.js.map +1 -1
  322. package/dist/chat/super-grouping/tool-part-placement.cjs +17 -0
  323. package/dist/chat/super-grouping/tool-part-placement.cjs.map +1 -0
  324. package/dist/chat/super-grouping/tool-part-placement.d.ts +22 -0
  325. package/dist/chat/super-grouping/tool-part-placement.js +17 -0
  326. package/dist/chat/super-grouping/tool-part-placement.js.map +1 -0
  327. package/dist/chat/thread-scroll-to-bottom.cjs +2 -2
  328. package/dist/chat/thread-scroll-to-bottom.cjs.map +1 -1
  329. package/dist/chat/thread-scroll-to-bottom.d.ts +10 -7
  330. package/dist/chat/thread-scroll-to-bottom.js +2 -2
  331. package/dist/chat/thread-scroll-to-bottom.js.map +1 -1
  332. package/dist/chat/tooltip-icon-button.cjs +2 -2
  333. package/dist/chat/tooltip-icon-button.cjs.map +1 -1
  334. package/dist/chat/use-athena-voice-live.cjs +11 -0
  335. package/dist/chat/use-athena-voice-live.cjs.map +1 -0
  336. package/dist/chat/use-athena-voice-live.d.ts +11 -0
  337. package/dist/chat/use-athena-voice-live.js +11 -0
  338. package/dist/chat/use-athena-voice-live.js.map +1 -0
  339. package/dist/chat/use-statewire-approval-request.cjs +56 -24
  340. package/dist/chat/use-statewire-approval-request.cjs.map +1 -1
  341. package/dist/chat/use-statewire-approval-request.d.ts +33 -4
  342. package/dist/chat/use-statewire-approval-request.js +41 -9
  343. package/dist/chat/use-statewire-approval-request.js.map +1 -1
  344. package/dist/chat-ui/auth/sign-in-card.cjs +2 -2
  345. package/dist/chat-ui/auth/sign-in-card.cjs.map +1 -1
  346. package/dist/chat-ui/composer/tiptap-composer.cjs +138 -107
  347. package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
  348. package/dist/chat-ui/composer/tiptap-composer.d.ts +20 -4
  349. package/dist/chat-ui/composer/tiptap-composer.js +85 -54
  350. package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
  351. package/dist/chat-ui/header/conversation-history-panel.cjs +49 -23
  352. package/dist/chat-ui/header/conversation-history-panel.cjs.map +1 -1
  353. package/dist/chat-ui/header/conversation-history-panel.d.ts +12 -1
  354. package/dist/chat-ui/header/conversation-history-panel.js +38 -12
  355. package/dist/chat-ui/header/conversation-history-panel.js.map +1 -1
  356. package/dist/chat-ui/index.cjs +21 -0
  357. package/dist/chat-ui/index.cjs.map +1 -1
  358. package/dist/chat-ui/index.d.ts +8 -1
  359. package/dist/chat-ui/index.js +21 -0
  360. package/dist/chat-ui/index.js.map +1 -1
  361. package/dist/chat-ui/mentions/mention-chip.cjs +4 -4
  362. package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
  363. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.cjs +10 -9
  364. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.cjs.map +1 -1
  365. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.js +3 -2
  366. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.js.map +1 -1
  367. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs +2 -2
  368. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs.map +1 -1
  369. package/dist/chat-ui/mentions/suggestions/components/menu-list.cjs +29 -6
  370. package/dist/chat-ui/mentions/suggestions/components/menu-list.cjs.map +1 -1
  371. package/dist/chat-ui/mentions/suggestions/components/menu-list.d.ts +7 -1
  372. package/dist/chat-ui/mentions/suggestions/components/menu-list.js +25 -2
  373. package/dist/chat-ui/mentions/suggestions/components/menu-list.js.map +1 -1
  374. package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.cjs +2 -2
  375. package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.cjs.map +1 -1
  376. package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.cjs +2 -2
  377. package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.cjs.map +1 -1
  378. package/dist/chat-ui/mentions/suggestions/data/api-client.cjs +3 -3
  379. package/dist/chat-ui/mentions/suggestions/data/api-client.cjs.map +1 -1
  380. package/dist/chat-ui/mentions/suggestions/data/orchestrator.cjs +56 -2
  381. package/dist/chat-ui/mentions/suggestions/data/orchestrator.cjs.map +1 -1
  382. package/dist/chat-ui/mentions/suggestions/data/orchestrator.d.ts +12 -0
  383. package/dist/chat-ui/mentions/suggestions/data/orchestrator.js +56 -2
  384. package/dist/chat-ui/mentions/suggestions/data/orchestrator.js.map +1 -1
  385. package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +24 -3
  386. package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -1
  387. package/dist/chat-ui/mentions/suggestions/data/sources/index.d.ts +7 -0
  388. package/dist/chat-ui/mentions/suggestions/data/sources/index.js +24 -3
  389. package/dist/chat-ui/mentions/suggestions/data/sources/index.js.map +1 -1
  390. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs +35 -13
  391. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs.map +1 -1
  392. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.d.ts +15 -1
  393. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js +28 -6
  394. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js.map +1 -1
  395. package/dist/chat-ui/mentions/suggestions/data/use-menu-items.cjs +9 -6
  396. package/dist/chat-ui/mentions/suggestions/data/use-menu-items.cjs.map +1 -1
  397. package/dist/chat-ui/mentions/suggestions/data/use-menu-items.d.ts +3 -0
  398. package/dist/chat-ui/mentions/suggestions/data/use-menu-items.js +5 -2
  399. package/dist/chat-ui/mentions/suggestions/data/use-menu-items.js.map +1 -1
  400. package/dist/chat-ui/mentions/use-account-workspace-id.cjs +45 -10
  401. package/dist/chat-ui/mentions/use-account-workspace-id.cjs.map +1 -1
  402. package/dist/chat-ui/mentions/use-account-workspace-id.d.ts +24 -1
  403. package/dist/chat-ui/mentions/use-account-workspace-id.js +46 -11
  404. package/dist/chat-ui/mentions/use-account-workspace-id.js.map +1 -1
  405. package/dist/chat-ui/mentions/use-member-avatar.cjs +4 -4
  406. package/dist/chat-ui/mentions/use-member-avatar.cjs.map +1 -1
  407. package/dist/chat-ui/mentions/use-mention-asset.cjs +3 -3
  408. package/dist/chat-ui/mentions/use-mention-asset.cjs.map +1 -1
  409. package/dist/chat-ui/messages/answer-label.cjs +42 -0
  410. package/dist/chat-ui/messages/answer-label.cjs.map +1 -0
  411. package/dist/chat-ui/messages/answer-label.d.ts +33 -0
  412. package/dist/chat-ui/messages/answer-label.js +42 -0
  413. package/dist/chat-ui/messages/answer-label.js.map +1 -0
  414. package/dist/chat-ui/messages/arrival-animation.cjs +13 -0
  415. package/dist/chat-ui/messages/arrival-animation.cjs.map +1 -0
  416. package/dist/chat-ui/messages/arrival-animation.d.ts +14 -0
  417. package/dist/chat-ui/messages/arrival-animation.js +13 -0
  418. package/dist/chat-ui/messages/arrival-animation.js.map +1 -0
  419. package/dist/chat-ui/messages/continue-pill.cjs +5 -5
  420. package/dist/chat-ui/messages/continue-pill.cjs.map +1 -1
  421. package/dist/chat-ui/messages/from-the-call-card.cjs +124 -0
  422. package/dist/chat-ui/messages/from-the-call-card.cjs.map +1 -0
  423. package/dist/chat-ui/messages/from-the-call-card.d.ts +17 -0
  424. package/dist/chat-ui/messages/from-the-call-card.js +124 -0
  425. package/dist/chat-ui/messages/from-the-call-card.js.map +1 -0
  426. package/dist/chat-ui/messages/handoff-arrival-divider.cjs +44 -0
  427. package/dist/chat-ui/messages/handoff-arrival-divider.cjs.map +1 -0
  428. package/dist/chat-ui/messages/handoff-arrival-divider.d.ts +17 -0
  429. package/dist/chat-ui/messages/handoff-arrival-divider.js +44 -0
  430. package/dist/chat-ui/messages/handoff-arrival-divider.js.map +1 -0
  431. package/dist/chat-ui/messages/message-actions-config.cjs +3 -3
  432. package/dist/chat-ui/messages/message-actions-config.cjs.map +1 -1
  433. package/dist/chat-ui/messages/message-components.cjs +8 -4
  434. package/dist/chat-ui/messages/message-components.cjs.map +1 -1
  435. package/dist/chat-ui/messages/message-components.js +5 -1
  436. package/dist/chat-ui/messages/message-components.js.map +1 -1
  437. package/dist/chat-ui/messages/message-images.cjs +66 -0
  438. package/dist/chat-ui/messages/message-images.cjs.map +1 -0
  439. package/dist/chat-ui/messages/message-images.d.ts +16 -0
  440. package/dist/chat-ui/messages/message-images.js +66 -0
  441. package/dist/chat-ui/messages/message-images.js.map +1 -0
  442. package/dist/chat-ui/messages/user-edit-composer.cjs +2 -2
  443. package/dist/chat-ui/messages/user-edit-composer.cjs.map +1 -1
  444. package/dist/chat-ui/messages/wake-marker.cjs +3 -3
  445. package/dist/chat-ui/messages/wake-marker.cjs.map +1 -1
  446. package/dist/chat-ui/rich-text/chat-link.cjs +3 -2
  447. package/dist/chat-ui/rich-text/chat-link.cjs.map +1 -1
  448. package/dist/chat-ui/rich-text/chat-link.d.ts +4 -0
  449. package/dist/chat-ui/rich-text/chat-link.js +4 -3
  450. package/dist/chat-ui/rich-text/chat-link.js.map +1 -1
  451. package/dist/chat-ui/rich-text/chat-message-body.cjs +9 -8
  452. package/dist/chat-ui/rich-text/chat-message-body.cjs.map +1 -1
  453. package/dist/chat-ui/rich-text/chat-message-body.d.ts +12 -0
  454. package/dist/chat-ui/rich-text/chat-message-body.js +2 -1
  455. package/dist/chat-ui/rich-text/chat-message-body.js.map +1 -1
  456. package/dist/chat-ui/rich-text/chat-node-views.cjs +6 -6
  457. package/dist/chat-ui/rich-text/chat-node-views.cjs.map +1 -1
  458. package/dist/chat-ui/rich-text/dom-output-spec.cjs +2 -2
  459. package/dist/chat-ui/rich-text/dom-output-spec.cjs.map +1 -1
  460. package/dist/chat-ui/statewire.cjs +3 -0
  461. package/dist/chat-ui/statewire.cjs.map +1 -1
  462. package/dist/chat-ui/statewire.d.ts +2 -1
  463. package/dist/chat-ui/statewire.js +3 -0
  464. package/dist/chat-ui/statewire.js.map +1 -1
  465. package/dist/chat-ui/thread/chat-thread-shell.cjs +45 -14
  466. package/dist/chat-ui/thread/chat-thread-shell.cjs.map +1 -1
  467. package/dist/chat-ui/thread/chat-thread-shell.d.ts +16 -2
  468. package/dist/chat-ui/thread/chat-thread-shell.js +37 -6
  469. package/dist/chat-ui/thread/chat-thread-shell.js.map +1 -1
  470. package/dist/chat-ui/thread/composer-send-or-stop.cjs +30 -20
  471. package/dist/chat-ui/thread/composer-send-or-stop.cjs.map +1 -1
  472. package/dist/chat-ui/thread/composer-send-or-stop.d.ts +8 -0
  473. package/dist/chat-ui/thread/composer-send-or-stop.js +29 -19
  474. package/dist/chat-ui/thread/composer-send-or-stop.js.map +1 -1
  475. package/dist/chat-ui/thread/statewire-history-edge.cjs +20 -21
  476. package/dist/chat-ui/thread/statewire-history-edge.cjs.map +1 -1
  477. package/dist/chat-ui/thread/statewire-history-edge.js +3 -4
  478. package/dist/chat-ui/thread/statewire-history-edge.js.map +1 -1
  479. package/dist/chat-ui/thread/thread-loading-overlay.cjs +5 -5
  480. package/dist/chat-ui/thread/thread-loading-overlay.cjs.map +1 -1
  481. package/dist/collab/client.cjs +52 -3
  482. package/dist/collab/client.cjs.map +1 -1
  483. package/dist/collab/client.d.ts +27 -0
  484. package/dist/collab/client.js +52 -3
  485. package/dist/collab/client.js.map +1 -1
  486. package/dist/collab/document-status.cjs +150 -0
  487. package/dist/collab/document-status.cjs.map +1 -0
  488. package/dist/collab/document-status.d.ts +68 -0
  489. package/dist/collab/document-status.js +150 -0
  490. package/dist/collab/document-status.js.map +1 -0
  491. package/dist/collab/index.cjs +7 -0
  492. package/dist/collab/index.cjs.map +1 -1
  493. package/dist/collab/index.d.ts +6 -1
  494. package/dist/collab/index.js +7 -0
  495. package/dist/collab/index.js.map +1 -1
  496. package/dist/collab/presence-react.cjs +11 -11
  497. package/dist/collab/presence-react.cjs.map +1 -1
  498. package/dist/collab/react.cjs +6 -6
  499. package/dist/collab/react.cjs.map +1 -1
  500. package/dist/composer/AttachmentContext.cjs +24 -11
  501. package/dist/composer/AttachmentContext.cjs.map +1 -1
  502. package/dist/composer/AttachmentContext.js +18 -5
  503. package/dist/composer/AttachmentContext.js.map +1 -1
  504. package/dist/composer/ComposerAttachmentPreview.cjs +78 -23
  505. package/dist/composer/ComposerAttachmentPreview.cjs.map +1 -1
  506. package/dist/composer/ComposerAttachmentPreview.d.ts +5 -3
  507. package/dist/composer/ComposerAttachmentPreview.js +79 -24
  508. package/dist/composer/ComposerAttachmentPreview.js.map +1 -1
  509. package/dist/composer/ComposerDropZone.cjs +7 -7
  510. package/dist/composer/ComposerDropZone.cjs.map +1 -1
  511. package/dist/composer/FileUploadButton.cjs +37 -22
  512. package/dist/composer/FileUploadButton.cjs.map +1 -1
  513. package/dist/composer/FileUploadButton.d.ts +6 -0
  514. package/dist/composer/FileUploadButton.js +34 -19
  515. package/dist/composer/FileUploadButton.js.map +1 -1
  516. package/dist/composer/QuoteContext.cjs +8 -8
  517. package/dist/composer/QuoteContext.cjs.map +1 -1
  518. package/dist/composer/composer-handoff.cjs +4 -4
  519. package/dist/composer/composer-handoff.cjs.map +1 -1
  520. package/dist/composer/index.d.ts +1 -1
  521. package/dist/composer/useAppendToComposer.cjs +4 -4
  522. package/dist/composer/useAppendToComposer.cjs.map +1 -1
  523. package/dist/composer/useAttachFiles.cjs +23 -6
  524. package/dist/composer/useAttachFiles.cjs.map +1 -1
  525. package/dist/composer/useAttachFiles.d.ts +15 -7
  526. package/dist/composer/useAttachFiles.js +22 -5
  527. package/dist/composer/useAttachFiles.js.map +1 -1
  528. package/dist/composer/useComposerAttachment.cjs +4 -4
  529. package/dist/composer/useComposerAttachment.cjs.map +1 -1
  530. package/dist/composer/useFileUpload.cjs +21 -16
  531. package/dist/composer/useFileUpload.cjs.map +1 -1
  532. package/dist/composer/useFileUpload.d.ts +12 -0
  533. package/dist/composer/useFileUpload.js +12 -7
  534. package/dist/composer/useFileUpload.js.map +1 -1
  535. package/dist/composer/useReadComposerDraft.cjs +27 -8
  536. package/dist/composer/useReadComposerDraft.cjs.map +1 -1
  537. package/dist/composer/useReadComposerDraft.d.ts +23 -1
  538. package/dist/composer/useReadComposerDraft.js +27 -8
  539. package/dist/composer/useReadComposerDraft.js.map +1 -1
  540. package/dist/composer/useSendMessage.cjs +4 -4
  541. package/dist/composer/useSendMessage.cjs.map +1 -1
  542. package/dist/diagnostics/useAthenaDiagnostics.cjs +4 -4
  543. package/dist/diagnostics/useAthenaDiagnostics.cjs.map +1 -1
  544. package/dist/dictation/audio-level-history.cjs +3 -3
  545. package/dist/dictation/audio-level-history.cjs.map +1 -1
  546. package/dist/dictation/dictation-controls.cjs +24 -20
  547. package/dist/dictation/dictation-controls.cjs.map +1 -1
  548. package/dist/dictation/dictation-controls.d.ts +6 -1
  549. package/dist/dictation/dictation-controls.js +24 -20
  550. package/dist/dictation/dictation-controls.js.map +1 -1
  551. package/dist/dictation/use-athena-dictation-engine.cjs +3 -3
  552. package/dist/dictation/use-athena-dictation-engine.cjs.map +1 -1
  553. package/dist/dictation/use-dictation.cjs +22 -22
  554. package/dist/dictation/use-dictation.cjs.map +1 -1
  555. package/dist/index.cjs +29 -2
  556. package/dist/index.cjs.map +1 -1
  557. package/dist/index.d.ts +18 -4
  558. package/dist/index.js +30 -3
  559. package/dist/index.js.map +1 -1
  560. package/dist/keryx-http/src/receive-only-socket.cjs +40 -0
  561. package/dist/keryx-http/src/receive-only-socket.cjs.map +1 -0
  562. package/dist/keryx-http/src/receive-only-socket.d.ts +27 -0
  563. package/dist/keryx-http/src/receive-only-socket.js +40 -0
  564. package/dist/keryx-http/src/receive-only-socket.js.map +1 -0
  565. package/dist/keryx-http/src/unconfirmed-update-attributions.cjs +190 -0
  566. package/dist/keryx-http/src/unconfirmed-update-attributions.cjs.map +1 -0
  567. package/dist/keryx-http/src/unconfirmed-update-attributions.d.ts +132 -0
  568. package/dist/keryx-http/src/unconfirmed-update-attributions.js +190 -0
  569. package/dist/keryx-http/src/unconfirmed-update-attributions.js.map +1 -0
  570. package/dist/keryx-http/src/update-attributions.cjs +141 -0
  571. package/dist/keryx-http/src/update-attributions.cjs.map +1 -0
  572. package/dist/keryx-http/src/update-attributions.d.ts +107 -0
  573. package/dist/keryx-http/src/update-attributions.js +141 -0
  574. package/dist/keryx-http/src/update-attributions.js.map +1 -0
  575. package/dist/lib/owner-document.cjs +6 -6
  576. package/dist/lib/owner-document.cjs.map +1 -1
  577. package/dist/lib/use-athena-rest-query.cjs +4 -4
  578. package/dist/lib/use-athena-rest-query.cjs.map +1 -1
  579. package/dist/lib/use-document-active.cjs +4 -4
  580. package/dist/lib/use-document-active.cjs.map +1 -1
  581. package/dist/lib/use-prefers-reduced-motion.cjs +2 -2
  582. package/dist/lib/use-prefers-reduced-motion.cjs.map +1 -1
  583. package/dist/offline/offline-history.cjs +7 -7
  584. package/dist/offline/offline-history.cjs.map +1 -1
  585. package/dist/provider/AthenaContext.cjs +3 -3
  586. package/dist/provider/AthenaContext.cjs.map +1 -1
  587. package/dist/provider/AthenaProvider.cjs +120 -79
  588. package/dist/provider/AthenaProvider.cjs.map +1 -1
  589. package/dist/provider/AthenaProvider.d.ts +11 -1
  590. package/dist/provider/AthenaProvider.js +44 -3
  591. package/dist/provider/AthenaProvider.js.map +1 -1
  592. package/dist/provider/PostHogProvider.cjs +2 -2
  593. package/dist/provider/PostHogProvider.cjs.map +1 -1
  594. package/dist/provider/agent-selection-context.cjs +2 -2
  595. package/dist/provider/agent-selection-context.cjs.map +1 -1
  596. package/dist/provider/chat-mode-context.cjs +2 -2
  597. package/dist/provider/chat-mode-context.cjs.map +1 -1
  598. package/dist/provider/session-persistence-context.cjs +10 -0
  599. package/dist/provider/session-persistence-context.cjs.map +1 -0
  600. package/dist/provider/session-persistence-context.d.ts +15 -0
  601. package/dist/provider/session-persistence-context.js +10 -0
  602. package/dist/provider/session-persistence-context.js.map +1 -0
  603. package/dist/provider/statewire-history-context.cjs +4 -4
  604. package/dist/provider/statewire-history-context.cjs.map +1 -1
  605. package/dist/provider/statewire-lifecycle-context.cjs +3 -3
  606. package/dist/provider/statewire-lifecycle-context.cjs.map +1 -1
  607. package/dist/provider/statewire-window-context.cjs +3 -3
  608. package/dist/provider/statewire-window-context.cjs.map +1 -1
  609. package/dist/provider/theme-style-context.cjs +3 -3
  610. package/dist/provider/theme-style-context.cjs.map +1 -1
  611. package/dist/react/package.json.cjs +1 -1
  612. package/dist/react/package.json.js +1 -1
  613. package/dist/runtime/StatewireThreadConfigLaneSync.cjs +10 -10
  614. package/dist/runtime/StatewireThreadConfigLaneSync.cjs.map +1 -1
  615. package/dist/runtime/auth-refusal-restart.cjs +7 -7
  616. package/dist/runtime/auth-refusal-restart.cjs.map +1 -1
  617. package/dist/runtime/auth.cjs +13 -13
  618. package/dist/runtime/auth.cjs.map +1 -1
  619. package/dist/runtime/statewire-lifecycle.cjs +1 -0
  620. package/dist/runtime/statewire-lifecycle.cjs.map +1 -1
  621. package/dist/runtime/statewire-lifecycle.d.ts +3 -1
  622. package/dist/runtime/statewire-lifecycle.js +2 -1
  623. package/dist/runtime/statewire-lifecycle.js.map +1 -1
  624. package/dist/runtime/statewire-server-lane-context.cjs +2 -2
  625. package/dist/runtime/statewire-server-lane-context.cjs.map +1 -1
  626. package/dist/runtime/statewire-session-lane.cjs +4 -4
  627. package/dist/runtime/statewire-session-lane.cjs.map +1 -1
  628. package/dist/runtime/useAthenaStatewireRuntime.cjs +10 -8
  629. package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
  630. package/dist/runtime/useAthenaStatewireRuntime.d.ts +2 -0
  631. package/dist/runtime/useAthenaStatewireRuntime.js +2 -0
  632. package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
  633. package/dist/styles.css +1 -1
  634. package/dist/threads/Inbox.cjs +8 -8
  635. package/dist/threads/Inbox.cjs.map +1 -1
  636. package/dist/threads/SessionList.cjs +9 -9
  637. package/dist/threads/SessionList.cjs.map +1 -1
  638. package/dist/threads/SessionsPage.cjs +11 -11
  639. package/dist/threads/SessionsPage.cjs.map +1 -1
  640. package/dist/threads/api.cjs.map +1 -1
  641. package/dist/threads/api.d.ts +15 -0
  642. package/dist/threads/api.js.map +1 -1
  643. package/dist/threads/conversation-list-fetcher.cjs +13 -5
  644. package/dist/threads/conversation-list-fetcher.cjs.map +1 -1
  645. package/dist/threads/conversation-list-fetcher.d.ts +4 -1
  646. package/dist/threads/conversation-list-fetcher.js +13 -5
  647. package/dist/threads/conversation-list-fetcher.js.map +1 -1
  648. package/dist/threads/index-triggered-refresh.cjs +10 -10
  649. package/dist/threads/index-triggered-refresh.cjs.map +1 -1
  650. package/dist/threads/mark-viewed-thread-read.cjs +12 -12
  651. package/dist/threads/mark-viewed-thread-read.cjs.map +1 -1
  652. package/dist/threads/offline-session-list.cjs +3 -3
  653. package/dist/threads/offline-session-list.cjs.map +1 -1
  654. package/dist/threads/session-list-tab-share.cjs +5 -5
  655. package/dist/threads/session-list-tab-share.cjs.map +1 -1
  656. package/dist/threads/statewire-thread-list.cjs +79 -57
  657. package/dist/threads/statewire-thread-list.cjs.map +1 -1
  658. package/dist/threads/statewire-thread-list.d.ts +20 -8
  659. package/dist/threads/statewire-thread-list.js +28 -6
  660. package/dist/threads/statewire-thread-list.js.map +1 -1
  661. package/dist/threads/thread-id-context.cjs +5 -5
  662. package/dist/threads/thread-id-context.cjs.map +1 -1
  663. package/dist/threads/use-athena-session-attention.cjs +2 -2
  664. package/dist/threads/use-athena-session-attention.cjs.map +1 -1
  665. package/dist/threads/use-athena-sessions.cjs +37 -15
  666. package/dist/threads/use-athena-sessions.cjs.map +1 -1
  667. package/dist/threads/use-athena-sessions.d.ts +10 -5
  668. package/dist/threads/use-athena-sessions.js +28 -6
  669. package/dist/threads/use-athena-sessions.js.map +1 -1
  670. package/dist/threads/use-athena-thread-model.cjs +3 -3
  671. package/dist/threads/use-athena-thread-model.cjs.map +1 -1
  672. package/dist/threads/use-rest-conversation-history.cjs +3 -3
  673. package/dist/threads/use-rest-conversation-history.cjs.map +1 -1
  674. package/dist/threads/use-rest-conversation-history.d.ts +1 -0
  675. package/dist/threads/use-statewire-conversation-history.cjs +8 -8
  676. package/dist/threads/use-statewire-conversation-history.cjs.map +1 -1
  677. package/dist/threads/use-thread-archive.cjs +9 -9
  678. package/dist/threads/use-thread-archive.cjs.map +1 -1
  679. package/dist/threads/use-thread-favorite.cjs +2 -2
  680. package/dist/threads/use-thread-favorite.cjs.map +1 -1
  681. package/dist/threads/use-thread-field-override.cjs +20 -20
  682. package/dist/threads/use-thread-field-override.cjs.map +1 -1
  683. package/dist/threads/use-thread-read-state.cjs +4 -4
  684. package/dist/threads/use-thread-read-state.cjs.map +1 -1
  685. package/dist/threads/use-thread-rename.cjs +2 -2
  686. package/dist/threads/use-thread-rename.cjs.map +1 -1
  687. package/dist/threads/useAthenaThreadManager.cjs +2 -2
  688. package/dist/threads/useAthenaThreadManager.cjs.map +1 -1
  689. package/dist/tools/NestedPtcMessages.cjs +6 -6
  690. package/dist/tools/NestedPtcMessages.cjs.map +1 -1
  691. package/dist/tools/append-document-tool-ui.cjs +7 -7
  692. package/dist/tools/append-document-tool-ui.cjs.map +1 -1
  693. package/dist/tools/file-tool-uis.cjs +2 -2
  694. package/dist/tools/file-tool-uis.cjs.map +1 -1
  695. package/dist/tools/misc-tool-uis.cjs +2 -2
  696. package/dist/tools/misc-tool-uis.cjs.map +1 -1
  697. package/dist/tools/primitives.cjs +6 -6
  698. package/dist/tools/primitives.cjs.map +1 -1
  699. package/dist/tools/read-asset-tool-ui.cjs +6 -6
  700. package/dist/tools/read-asset-tool-ui.cjs.map +1 -1
  701. package/dist/tools/subagent-task-tool-ui.cjs +21 -21
  702. package/dist/tools/subagent-task-tool-ui.cjs.map +1 -1
  703. package/dist/tools/test-recording-tool-uis.cjs +16 -16
  704. package/dist/tools/test-recording-tool-uis.cjs.map +1 -1
  705. package/dist/tools/todo-plan-store.cjs +4 -4
  706. package/dist/tools/todo-plan-store.cjs.map +1 -1
  707. package/dist/tools/tool-appearance.cjs +3 -3
  708. package/dist/tools/tool-appearance.cjs.map +1 -1
  709. package/dist/tools/tool-fallback.cjs +14 -14
  710. package/dist/tools/tool-fallback.cjs.map +1 -1
  711. package/dist/tools/tool-uis.cjs +74 -74
  712. package/dist/tools/tool-uis.cjs.map +1 -1
  713. package/dist/tools/use-elapsed-seconds.cjs +3 -3
  714. package/dist/tools/use-elapsed-seconds.cjs.map +1 -1
  715. package/dist/tools/write-todos-tool-ui.cjs +9 -9
  716. package/dist/tools/write-todos-tool-ui.cjs.map +1 -1
  717. package/dist/ui/image-viewer.cjs +382 -0
  718. package/dist/ui/image-viewer.cjs.map +1 -0
  719. package/dist/ui/image-viewer.d.ts +50 -0
  720. package/dist/ui/image-viewer.js +382 -0
  721. package/dist/ui/image-viewer.js.map +1 -0
  722. package/dist/voice/chat.cjs +6 -0
  723. package/dist/voice/chat.cjs.map +1 -1
  724. package/dist/voice/chat.d.ts +1 -1
  725. package/dist/voice/chat.js +8 -2
  726. package/dist/voice/livekit-join.cjs +52 -101
  727. package/dist/voice/livekit-join.cjs.map +1 -1
  728. package/dist/voice/livekit-join.d.ts +1 -6
  729. package/dist/voice/livekit-join.js +52 -101
  730. package/dist/voice/livekit-join.js.map +1 -1
  731. package/dist/voice/livekit.cjs.map +1 -1
  732. package/dist/voice/livekit.d.ts +11 -1
  733. package/dist/voice/livekit.js.map +1 -1
  734. package/dist/voice/use-athena-voice-session.cjs +34 -34
  735. package/dist/voice/use-athena-voice-session.cjs.map +1 -1
  736. package/dist/workbench/ComputerLiveDesktop.cjs +13 -13
  737. package/dist/workbench/ComputerLiveDesktop.cjs.map +1 -1
  738. package/dist/workbench/SessionWorkbench.cjs +22 -22
  739. package/dist/workbench/SessionWorkbench.cjs.map +1 -1
  740. package/dist/workbench/session-workbench-context.cjs +3 -3
  741. package/dist/workbench/session-workbench-context.cjs.map +1 -1
  742. package/dist/workbench/session-workbench-panes.cjs +8 -8
  743. package/dist/workbench/session-workbench-panes.cjs.map +1 -1
  744. package/dist/workbench/workbench-layout-context.cjs +3 -3
  745. package/dist/workbench/workbench-layout-context.cjs.map +1 -1
  746. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"runconfig-contract.js","sources":["../../../../../agent-runtime/src/generated/runconfig-contract.ts"],"sourcesContent":["// GENERATED FILE — DO NOT EDIT BY HAND.\n//\n// Source of truth (agora):\n// agora/agora/graphs/athena_deep_agent/run_config.py (_PARSED_CUSTOM_KEYS / _COMPANION_CUSTOM_KEYS / PER_SEND_CUSTOM_KEYS)\n// agora/agora/graphs/athena_deep_agent/thread_config.py (server config lane + config/* command names)\n// agora/agora/graphs/athena_deep_agent/session_asset.py (KNOWN_START_CHANNELS / DEEP_AGENT_RUNTIME_MARKER)\n// agora/agora/graphs/athena_deep_agent/client_tools.py (client-tool interrupt + result-envelope literals)\n// agora/agora/graphs/athena_deep_agent/protocol_version.py (wire-contract version negotiation)\n// agora/agora/graphs/athena_deep_agent/message_window.py (interest windows + history commands)\n// agora/agora/type_definitions/collab_agent.py (CAPABILITIES ladder: absent mode + new-agent default)\n//\n// Regenerate:\n// cd agora && mise exec -- infisical run --command 'uv run python scripts/export_runconfig_contract.py'\n//\n// CI verifies this file matches the Python source (agora-check runs the\n// exporter with --check), so hand edits and un-regenerated key changes fail.\n\n/** `runConfig.custom` keys parsed by agora's `parse_deep_agent_run_config`. */\nexport const RUN_CONFIG_PARSED_CUSTOM_KEYS = [\n \"agent_catalog_asset_ids\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"compiled_subagents\",\n \"declined_toolkit_ids\",\n \"drive_mounts\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_tools\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"outbound_approval_allowlist\",\n \"permissions\",\n \"project_id\",\n \"read_only\",\n \"recursion_limit\",\n \"run_label\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_machine\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"subagents\",\n \"system_prompt\",\n \"tool_description_overrides\",\n \"voice_update_handle\",\n \"workbench\",\n] as const;\n\n/** `runConfig.custom` keys consumed by the surrounding deep-agent request machinery rather than the capability parser. */\nexport const RUN_CONFIG_COMPANION_CUSTOM_KEYS = [\n \"agent\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"channel\",\n \"client_tools\",\n \"collab_agent_id\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"custom_tool_configs\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"dry_run\",\n \"enabled_toolkits\",\n \"entry_point\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"max_tokens\",\n \"middleware\",\n \"model\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"panel_config\",\n \"posthog_session_id\",\n \"run_budget\",\n \"runtime\",\n \"session_id\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"temperature\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"workspace_id\",\n] as const;\n\n/** Every `runConfig.custom` key some deep-agent request consumer reads. A key outside this set is invisible to the run and trips agora's unknown-key telemetry. */\nexport const RUN_CONFIG_CUSTOM_KEYS = [\n \"agent\",\n \"agent_catalog_asset_ids\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"channel\",\n \"client_tools\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"collab_agent_id\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"compiled_subagents\",\n \"custom_tool_configs\",\n \"declined_toolkit_ids\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"drive_mounts\",\n \"dry_run\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_toolkits\",\n \"enabled_tools\",\n \"entry_point\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"max_tokens\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"middleware\",\n \"model\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"outbound_approval_allowlist\",\n \"panel_config\",\n \"permissions\",\n \"posthog_session_id\",\n \"project_id\",\n \"read_only\",\n \"recursion_limit\",\n \"run_budget\",\n \"run_label\",\n \"runtime\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_id\",\n \"session_machine\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"subagents\",\n \"system_prompt\",\n \"temperature\",\n \"tool_description_overrides\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"voice_update_handle\",\n \"workbench\",\n \"workspace_id\",\n] as const;\n\nexport type RunConfigCustomKey = (typeof RUN_CONFIG_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const RUN_CONFIG_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n RUN_CONFIG_CUSTOM_KEYS,\n);\n\n/** `runConfig.custom` keys a client still carries per send on a thread with server config; every other key is dropped at dispatch. */\nexport const RUN_CONFIG_PER_SEND_CUSTOM_KEYS = [\n \"agent\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"channel\",\n \"client_tools\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"dry_run\",\n \"entry_point\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"posthog_session_id\",\n \"project_id\",\n \"read_only\",\n \"run_budget\",\n \"runtime\",\n \"session_id\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"voice_update_handle\",\n \"workspace_id\",\n] as const;\n\nexport type RunConfigPerSendCustomKey =\n (typeof RUN_CONFIG_PER_SEND_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const RUN_CONFIG_PER_SEND_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n RUN_CONFIG_PER_SEND_CUSTOM_KEYS,\n);\n\n/** Keys the thread's server config lane owns — changed only through the `config/*` commands, never per send. */\nexport const THREAD_CONFIG_CUSTOM_KEYS = [\n \"agent_catalog_asset_ids\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"collab_agent_id\",\n \"compiled_subagents\",\n \"custom_tool_configs\",\n \"declined_toolkit_ids\",\n \"drive_mounts\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_toolkits\",\n \"enabled_tools\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"max_tokens\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"middleware\",\n \"model\",\n \"outbound_approval_allowlist\",\n \"permissions\",\n \"recursion_limit\",\n \"run_label\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_machine\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"subagents\",\n \"system_prompt\",\n \"temperature\",\n \"tool_description_overrides\",\n \"workbench\",\n] as const;\n\nexport type ThreadConfigCustomKey = (typeof THREAD_CONFIG_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const THREAD_CONFIG_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n THREAD_CONFIG_CUSTOM_KEYS,\n);\n\n/** Replicated-state key of the server config lane (`{ version, custom }`). */\nexport const DEEP_AGENT_CONFIG_STATE_KEY = \"config\";\n\n/** The statewire commands that mutate the server config lane. */\nexport const DEEP_AGENT_CONFIG_COMMANDS = {\n patch: \"config/patch\",\n toolsEnable: \"config/tools/enable\",\n toolsDisable: \"config/tools/disable\",\n} as const;\n\n/** `start_channel` values the session substrate stamps as provenance; anything else clamps to \"web\". */\nexport const KNOWN_START_CHANNELS = [\n \"agent_orchestration\",\n \"api\",\n \"automation\",\n \"chrome_extension\",\n \"cli\",\n \"comment_agent\",\n \"default_voice\",\n \"desktop_app\",\n \"email\",\n \"mobile_app\",\n \"office_addin\",\n \"orchestration\",\n \"programmatic\",\n \"slack\",\n \"sms\",\n \"task\",\n \"teams\",\n \"voice\",\n \"voice_memo\",\n \"web\",\n] as const;\n\nexport type KnownStartChannel = (typeof KNOWN_START_CHANNELS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const KNOWN_START_CHANNEL_SET: ReadonlySet<string> = new Set(\n KNOWN_START_CHANNELS,\n);\n\n/** `runConfig.custom.runtime` marker selecting the deep-agent runtime. */\nexport const DEEP_AGENT_RUNTIME_MARKER = \"athena_deep_agent\";\n\n/**\n * Collab-agent capability ladder (agent schema v3): per explicit\n * capability field, what an ABSENT value means and the value stamped on\n * a new agent. Resolved by agora's `capability_decoder` and the one agent\n * compiler on every run: `passthrough` — explicit only, absent means off;\n * `off` — absent means off under every `runtime` marker; `runtime` —\n * absent derives from the `runtime` marker (`athena_deep_agent` on, any\n * other or missing marker off).\n */\nexport const COLLAB_AGENT_CAPABILITIES = {\n deepAgentBuiltinsEnabled: { absent: \"runtime\", default: true },\n interpreterEnabled: { absent: \"off\", default: false },\n sandboxEnabled: { absent: \"passthrough\", default: false },\n skillsEnabled: { absent: \"runtime\", default: true },\n} as const;\n\nexport type CollabAgentCapabilityField = keyof typeof COLLAB_AGENT_CAPABILITIES;\n\nexport type CollabAgentCapabilityAbsentMode =\n (typeof COLLAB_AGENT_CAPABILITIES)[CollabAgentCapabilityField][\"absent\"];\n\n/** `source`/`type` stamped on client-tool interrupt payloads by agora. */\nexport const CLIENT_TOOL_INTERRUPT_SOURCE = \"client_tool\";\n\n/** `status` literals of the result envelope a client resumes a parked client-tool call with. */\nexport const CLIENT_TOOL_RESULT_STATUSES = [\"error\", \"success\"] as const;\n\nexport type ClientToolResultStatus =\n (typeof CLIENT_TOOL_RESULT_STATUSES)[number];\n\nexport const CLIENT_TOOL_RESULT_STATUS_SUCCESS = \"success\";\n\nexport const CLIENT_TOOL_RESULT_STATUS_ERROR = \"error\";\n\n/**\n * Result envelope a client resumes a parked client-tool call with,\n * keyed by interrupt id:\n * `{ client_tool_results: { <interrupt_id>: <envelope> } }`.\n * Agora relays the envelope to the model verbatim.\n */\nexport type ClientToolResultEnvelopeContract =\n | { status: typeof CLIENT_TOOL_RESULT_STATUS_SUCCESS; result: unknown }\n | { status: typeof CLIENT_TOOL_RESULT_STATUS_ERROR; error: string };\n\n/**\n * The deep-agent wire-contract version this client build speaks,\n * declared on every attach. The host records it for attach telemetry\n * and per-version behaviour; it has no minimum client version, so no\n * build is refused for the version it declares (the `protocol` state\n * lane's `minClientVersion` is the constant 1).\n */\nexport const DEEP_AGENT_PROTOCOL_VERSION = 2;\n\n/**\n * The first contract version whose host a client states `follow` to (a\n * subagent lane's steps, each its own document): a client follows a\n * lane only on a host whose `protocol` lane advertises at least this\n * version. A host that predates `follow` refuses it with\n * `invalid-interest`.\n */\nexport const DEEP_AGENT_LANE_FOLLOW_PROTOCOL_VERSION = 2;\n\n/** Attach header carrying the client's declared contract version. */\nexport const DEEP_AGENT_PROTOCOL_VERSION_HEADER =\n \"x-athena-deep-agent-protocol-version\";\n\n/** Attach header declaring the head window a fresh client wants in its hello (host-clamped). */\nexport const DEEP_AGENT_MESSAGE_WINDOW_HEADER = \"x-athena-deep-agent-window\";\n\n/** Replicated-state key of the server-advertised version lane. */\nexport const DEEP_AGENT_PROTOCOL_STATE_KEY = \"protocol\";\n\n/** Ephemeral subprotocol carrying a client's message-window interests. */\nexport const DEEP_AGENT_INTEREST_PROTOCOL = \"athena/interest\";\n\n/** Ephemeral subprotocol carrying a client's synced context document. */\nexport const DEEP_AGENT_CONTEXT_PROTOCOL = \"athena/context\";\n\n/** The only interest namespace the host resolves (the linear transcript). */\nexport const DEEP_AGENT_MAIN_NS = \"main\";\n\n/** Window size (interest `before`) a client asks for by default. */\nexport const DEEP_AGENT_DEFAULT_MESSAGE_WINDOW = 40;\n\n/** Bounds on a window size. */\nexport const DEEP_AGENT_MIN_MESSAGE_WINDOW = 8;\n\nexport const DEEP_AGENT_MAX_MESSAGE_WINDOW = 200;\n\n/** Interests one attach may hold at once (the head plus its pages). */\nexport const DEEP_AGENT_MAX_INTERESTS = 16;\n\n/** Command returning a truncated tool output whole. */\nexport const DEEP_AGENT_HISTORY_TOOL_OUTPUT_COMMAND = \"history/tool_output\";\n\n/** Command returning one stored message whole (provenance and full tool output included). */\nexport const DEEP_AGENT_HISTORY_MESSAGE_COMMAND = \"history/message\";\n\n/** Wire key marking a tool message whose content was truncated. */\nexport const DEEP_AGENT_TRUNCATED_CONTENT_KEY = \"athena_content_truncated\";\n\n/**\n * Wire key on a running `task` card whose nested transcript rides cut to its\n * newest steps: `{ messages, tool_calls }` over the whole stored transcript.\n */\nexport const DEEP_AGENT_TRUNCATED_LANE_KEY = \"athena_lane_truncated\";\n\n/**\n * Wire key on a `task` card, and on an in-eval lane's `ptc_subagents` entry,\n * carrying the whole lane's token use however much of the lane the wire\n * carries: `{ input_tokens, output_tokens, cache_read_input_tokens,\n * cache_creation_input_tokens }`, the input counting its cache reads and\n * writes. Absent while the lane's steps report no usage.\n */\nexport const DEEP_AGENT_LANE_USAGE_KEY = \"athena_lane_usage\";\n\n/**\n * The newest nested messages a cut card carries whole; the entries ahead\n * of them are the older assistant turns that requested results among\n * them, cut to those calls.\n */\nexport const DEEP_AGENT_RUNNING_LANE_WIRE_MESSAGES = 8;\n\n/**\n * Key of a followed lane's window (`follows[ns]` on a resolution whose\n * request added `follow: {before}`) naming the `task` call whose card\n * holds the lane.\n */\nexport const DEEP_AGENT_FOLLOW_TOOL_CALL_ID_KEY = \"toolCallId\";\n\n/** The most lane steps one attach follows, across every lane. */\nexport const DEEP_AGENT_MAX_FOLLOWED_STEPS = 200;\n\n/**\n * The first contract version a client declares to see a finished card cut\n * like a running one (and to follow lanes and page them through\n * `history/lane`). Below it, or declaring nothing, finished cards ride whole.\n */\nexport const DEEP_AGENT_LANE_CUT_PROTOCOL_VERSION = 2;\n\n/**\n * Last element of the key a cut finished card's document rides under:\n * `[threadId, \"main\", messageId, \"cut\"]`. A view holds that key or the\n * card's own, never both.\n */\nexport const DEEP_AGENT_CUT_LANE_DOCUMENT = \"cut\";\n\n/**\n * Command returning one page of a card's nested transcript, oldest first:\n * `{ messageId, before, at? }` answers\n * `{ messageId, toolCallId, ns, steps, more: { before }, total }`; the page\n * holds the newest `before` entries, or those strictly older than `at`.\n */\nexport const DEEP_AGENT_HISTORY_LANE_COMMAND = \"history/lane\";\n\n/** The most entries one `history/lane` page asks for. */\nexport const DEEP_AGENT_MAX_LANE_PAGE = 200;\n\n/** The most encoded characters one `history/lane` page carries (at least one entry). */\nexport const DEEP_AGENT_HISTORY_LANE_PAGE_CHARS = 1048576;\n\n/**\n * Set on the last step of a cut finished card whose text is the card's own\n * `content` (the subagent's report): the step rides with empty content, and\n * the card's `content` is its text.\n */\nexport const DEEP_AGENT_REPEATS_RESULT_KEY = \"athena_content_repeats_result\";\n\n/** Most inline-image payload characters one message carries whole on the wire. */\nexport const DEEP_AGENT_INLINE_IMAGE_WIRE_BUDGET = 4194304;\n\n/** Wire key on an image block left off the wire: `{ index, chars, mediaType }`. */\nexport const DEEP_AGENT_OMITTED_IMAGE_KEY = \"athena_image_omitted\";\n\n/** The image an omitted block carries instead of its own (a neutral PNG tile). */\nexport const DEEP_AGENT_OMITTED_IMAGE_PLACEHOLDER_URL =\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4AQMAAABPbGssAAAABlBMVEXi6PCUo7jao11HAAAA6ElEQVR42u2UyW3DMBBF3wxogEd2EJbCElKQDRCwC3MpSRc5eLuYokgNLEUxctK/CHyanQts2vRO3QdlALVsXsBvecqxxr1ob0A5GlDJU+hICxN54p/qXAx/+FpoeeE8hTerzfvByn7ifzpaBtWCOwv6bMVMBgzRgNGKmUL9McDs4XOSyEHuoKCI76AiqOugg+y0gx6SN+YQg3QwALGk19pQSKV/reOocyoww27oU5sxhAbKUNgIqrVxrvnovJ80MFgxYy23wtTss44tmL+bAuOE2p2o0fJa3iW/6iR/lEfx8kv3TZtW6AFk5Sf3k+GTswAAAABJRU5ErkJggg==\";\n\n/**\n * Command returning one inline image of a stored message in chunks:\n * `{ messageId, index, offset? }` answers\n * `{ messageId, index, mediaType, offset, total, chunk, next }`; the\n * chunks joined in order are the image's `data:` URL, and `next` is\n * the offset to ask for next (`null` after the last chunk).\n */\nexport const DEEP_AGENT_HISTORY_IMAGE_COMMAND = \"history/image\";\n\n/**\n * Command returning one inline image of a lane step in chunks, as\n * `history/image` does a stored message's: `{ messageId | lane, step,\n * index, offset? }` answers `{ messageId, lane, step, index, mediaType,\n * offset, total, chunk, next }`, with `messageId` null for an in-eval\n * lane and `lane` null for a card.\n */\nexport const DEEP_AGENT_HISTORY_LANE_IMAGE_COMMAND = \"history/lane_image\";\n"],"names":[],"mappings":"AAoHO,MAAM,yBAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAK8D,IAAI;AAAA,EAChE;AACF;AAGO,MAAM,kCAAkC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAMuE,IAAI;AAAA,EACzE;AACF;AAGO,MAAM,4BAA4B;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKiE,IAAI;AAAA,EACnE;AACF;AAMO,MAAM,6BAA6B;AAAA,EACxC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,cAAc;AAChB;AAGO,MAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAK4D,IAAI;AAAA,EAC9D;AACF;AA2BO,MAAM,+BAA+B;AAQrC,MAAM,oCAAoC;AAE1C,MAAM,kCAAkC;AA+BxC,MAAM,qCACX;AAGK,MAAM,mCAAmC;AAGzC,MAAM,gCAAgC;AAGtC,MAAM,+BAA+B;AAMrC,MAAM,qBAAqB;AAG3B,MAAM,oCAAoC;AAG1C,MAAM,gCAAgC;AAEtC,MAAM,gCAAgC;AAGtC,MAAM,2BAA2B;AAGjC,MAAM,yCAAyC;AAG/C,MAAM,qCAAqC;AAG3C,MAAM,mCAAmC;AAMzC,MAAM,gCAAgC;AAStC,MAAM,4BAA4B;AAwBlC,MAAM,uCAAuC;AAO7C,MAAM,+BAA+B;AAQrC,MAAM,kCAAkC;AAGxC,MAAM,2BAA2B;AAUjC,MAAM,gCAAgC;"}
1
+ {"version":3,"file":"runconfig-contract.js","sources":["../../../../../agent-runtime/src/generated/runconfig-contract.ts"],"sourcesContent":["// GENERATED FILE — DO NOT EDIT BY HAND.\n//\n// Source of truth (agora):\n// agora/agora/graphs/athena_deep_agent/run_config.py (_PARSED_CUSTOM_KEYS / _COMPANION_CUSTOM_KEYS / PER_SEND_CUSTOM_KEYS)\n// agora/agora/graphs/athena_deep_agent/thread_config.py (server config lane + config/* command names)\n// agora/agora/graphs/athena_deep_agent/session_asset.py (KNOWN_START_CHANNELS / DEEP_AGENT_RUNTIME_MARKER)\n// agora/agora/graphs/athena_deep_agent/client_tools.py (client-tool interrupt + result-envelope literals)\n// agora/agora/graphs/athena_deep_agent/protocol_version.py (wire-contract version negotiation)\n// agora/agora/graphs/athena_deep_agent/message_window.py (interest windows + history commands)\n// agora/agora/type_definitions/collab_agent.py (CAPABILITIES ladder: absent mode + new-agent default)\n//\n// Regenerate:\n// cd agora && mise exec -- infisical run --command 'uv run python scripts/export_runconfig_contract.py'\n//\n// CI verifies this file matches the Python source (agora-check runs the\n// exporter with --check), so hand edits and un-regenerated key changes fail.\n\n/** `runConfig.custom` keys parsed by agora's `parse_deep_agent_run_config`. */\nexport const RUN_CONFIG_PARSED_CUSTOM_KEYS = [\n \"agent_catalog_asset_ids\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"channel_reply_turn\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"compiled_subagents\",\n \"declined_toolkit_ids\",\n \"drive_mounts\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_tools\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"outbound_approval_allowlist\",\n \"permissions\",\n \"pre_approved_tools\",\n \"project_id\",\n \"read_only\",\n \"recursion_limit\",\n \"run_label\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_machine\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"subagents\",\n \"system_prompt\",\n \"tool_description_overrides\",\n \"voice_update_handle\",\n \"workbench\",\n] as const;\n\n/** `runConfig.custom` keys consumed by the surrounding deep-agent request machinery rather than the capability parser. */\nexport const RUN_CONFIG_COMPANION_CUSTOM_KEYS = [\n \"addressed_agents\",\n \"agent\",\n \"agent_available_toolkits\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"channel\",\n \"channel_router\",\n \"client_tools\",\n \"collab_agent_id\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"custom_tool_configs\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"dry_run\",\n \"enabled_toolkits\",\n \"entry_point\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"max_tokens\",\n \"middleware\",\n \"model\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"panel_config\",\n \"posthog_session_id\",\n \"run_budget\",\n \"runtime\",\n \"session_id\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"temperature\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"workspace_id\",\n] as const;\n\n/** Every `runConfig.custom` key some deep-agent request consumer reads. A key outside this set is invisible to the run and trips agora's unknown-key telemetry. */\nexport const RUN_CONFIG_CUSTOM_KEYS = [\n \"addressed_agents\",\n \"agent\",\n \"agent_available_toolkits\",\n \"agent_catalog_asset_ids\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"channel\",\n \"channel_reply_turn\",\n \"channel_router\",\n \"client_tools\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"collab_agent_id\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"compiled_subagents\",\n \"custom_tool_configs\",\n \"declined_toolkit_ids\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"drive_mounts\",\n \"dry_run\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_toolkits\",\n \"enabled_tools\",\n \"entry_point\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"max_tokens\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"middleware\",\n \"model\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"outbound_approval_allowlist\",\n \"panel_config\",\n \"permissions\",\n \"posthog_session_id\",\n \"pre_approved_tools\",\n \"project_id\",\n \"read_only\",\n \"recursion_limit\",\n \"run_budget\",\n \"run_label\",\n \"runtime\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_id\",\n \"session_machine\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"subagents\",\n \"system_prompt\",\n \"temperature\",\n \"tool_description_overrides\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"voice_update_handle\",\n \"workbench\",\n \"workspace_id\",\n] as const;\n\nexport type RunConfigCustomKey = (typeof RUN_CONFIG_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const RUN_CONFIG_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n RUN_CONFIG_CUSTOM_KEYS,\n);\n\n/** `runConfig.custom` keys a client still carries per send on a thread with server config; every other key is dropped at dispatch. */\nexport const RUN_CONFIG_PER_SEND_CUSTOM_KEYS = [\n \"addressed_agents\",\n \"agent\",\n \"agent_available_toolkits\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"channel\",\n \"channel_reply_turn\",\n \"channel_router\",\n \"client_tools\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"dry_run\",\n \"entry_point\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"posthog_session_id\",\n \"project_id\",\n \"read_only\",\n \"run_budget\",\n \"runtime\",\n \"session_id\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"voice_update_handle\",\n \"workspace_id\",\n] as const;\n\nexport type RunConfigPerSendCustomKey =\n (typeof RUN_CONFIG_PER_SEND_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const RUN_CONFIG_PER_SEND_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n RUN_CONFIG_PER_SEND_CUSTOM_KEYS,\n);\n\n/** Keys the thread's server config lane owns — changed only through the `config/*` commands, never per send. */\nexport const THREAD_CONFIG_CUSTOM_KEYS = [\n \"agent_catalog_asset_ids\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"collab_agent_id\",\n \"compiled_subagents\",\n \"custom_tool_configs\",\n \"declined_toolkit_ids\",\n \"drive_mounts\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_toolkits\",\n \"enabled_tools\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"max_tokens\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"middleware\",\n \"model\",\n \"outbound_approval_allowlist\",\n \"permissions\",\n \"pre_approved_tools\",\n \"recursion_limit\",\n \"run_label\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_machine\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"subagents\",\n \"system_prompt\",\n \"temperature\",\n \"tool_description_overrides\",\n \"workbench\",\n] as const;\n\nexport type ThreadConfigCustomKey = (typeof THREAD_CONFIG_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const THREAD_CONFIG_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n THREAD_CONFIG_CUSTOM_KEYS,\n);\n\n/** Replicated-state key of the server config lane (`{ version, custom }`). */\nexport const DEEP_AGENT_CONFIG_STATE_KEY = \"config\";\n\n/** The statewire commands that mutate the server config lane. */\nexport const DEEP_AGENT_CONFIG_COMMANDS = {\n patch: \"config/patch\",\n toolsEnable: \"config/tools/enable\",\n toolsDisable: \"config/tools/disable\",\n} as const;\n\n/** `start_channel` values the session substrate stamps as provenance; anything else clamps to \"web\". */\nexport const KNOWN_START_CHANNELS = [\n \"agent_orchestration\",\n \"api\",\n \"automation\",\n \"chrome_extension\",\n \"cli\",\n \"comment_agent\",\n \"default_voice\",\n \"desktop_app\",\n \"email\",\n \"meetings\",\n \"mobile_app\",\n \"mobile_app_voice\",\n \"office_addin\",\n \"orchestration\",\n \"programmatic\",\n \"slack\",\n \"sms\",\n \"task\",\n \"teams\",\n \"voice\",\n \"voice_memo\",\n \"web\",\n] as const;\n\nexport type KnownStartChannel = (typeof KNOWN_START_CHANNELS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const KNOWN_START_CHANNEL_SET: ReadonlySet<string> = new Set(\n KNOWN_START_CHANNELS,\n);\n\n/** `runConfig.custom.runtime` marker selecting the deep-agent runtime. */\nexport const DEEP_AGENT_RUNTIME_MARKER = \"athena_deep_agent\";\n\n/**\n * Collab-agent capability ladder (agent schema v3): per explicit\n * capability field, what an ABSENT value means and the value stamped on\n * a new agent. Resolved by agora's `capability_decoder` and the one agent\n * compiler on every run: `passthrough` — explicit only, absent means off;\n * `off` — absent means off under every `runtime` marker; `runtime` —\n * absent derives from the `runtime` marker (`athena_deep_agent` on, any\n * other or missing marker off).\n */\nexport const COLLAB_AGENT_CAPABILITIES = {\n deepAgentBuiltinsEnabled: { absent: \"runtime\", default: true },\n interpreterEnabled: { absent: \"off\", default: false },\n sandboxEnabled: { absent: \"passthrough\", default: false },\n skillsEnabled: { absent: \"runtime\", default: true },\n} as const;\n\nexport type CollabAgentCapabilityField = keyof typeof COLLAB_AGENT_CAPABILITIES;\n\nexport type CollabAgentCapabilityAbsentMode =\n (typeof COLLAB_AGENT_CAPABILITIES)[CollabAgentCapabilityField][\"absent\"];\n\n/** `source`/`type` stamped on client-tool interrupt payloads by agora. */\nexport const CLIENT_TOOL_INTERRUPT_SOURCE = \"client_tool\";\n\n/** `status` literals of the result envelope a client resumes a parked client-tool call with. */\nexport const CLIENT_TOOL_RESULT_STATUSES = [\"error\", \"success\"] as const;\n\nexport type ClientToolResultStatus =\n (typeof CLIENT_TOOL_RESULT_STATUSES)[number];\n\nexport const CLIENT_TOOL_RESULT_STATUS_SUCCESS = \"success\";\n\nexport const CLIENT_TOOL_RESULT_STATUS_ERROR = \"error\";\n\n/**\n * Result envelope a client resumes a parked client-tool call with,\n * keyed by interrupt id:\n * `{ client_tool_results: { <interrupt_id>: <envelope> } }`.\n * Agora relays the envelope to the model verbatim.\n */\nexport type ClientToolResultEnvelopeContract =\n | { status: typeof CLIENT_TOOL_RESULT_STATUS_SUCCESS; result: unknown }\n | { status: typeof CLIENT_TOOL_RESULT_STATUS_ERROR; error: string };\n\n/**\n * The deep-agent wire-contract version this client build speaks,\n * declared on every attach. The host records it for attach telemetry\n * and per-version behaviour; it has no minimum client version, so no\n * build is refused for the version it declares (the `protocol` state\n * lane's `minClientVersion` is the constant 1).\n */\nexport const DEEP_AGENT_PROTOCOL_VERSION = 2;\n\n/**\n * The first contract version whose host a client states `follow` to (a\n * subagent lane's steps, each its own document): a client follows a\n * lane only on a host whose `protocol` lane advertises at least this\n * version. A host that predates `follow` refuses it with\n * `invalid-interest`.\n */\nexport const DEEP_AGENT_LANE_FOLLOW_PROTOCOL_VERSION = 2;\n\n/** Attach header carrying the client's declared contract version. */\nexport const DEEP_AGENT_PROTOCOL_VERSION_HEADER =\n \"x-athena-deep-agent-protocol-version\";\n\n/** Attach header declaring the head window a fresh client wants in its hello (host-clamped). */\nexport const DEEP_AGENT_MESSAGE_WINDOW_HEADER = \"x-athena-deep-agent-window\";\n\n/** Replicated-state key of the server-advertised version lane. */\nexport const DEEP_AGENT_PROTOCOL_STATE_KEY = \"protocol\";\n\n/** Ephemeral subprotocol carrying a client's message-window interests. */\nexport const DEEP_AGENT_INTEREST_PROTOCOL = \"athena/interest\";\n\n/** Ephemeral subprotocol carrying a client's synced context document. */\nexport const DEEP_AGENT_CONTEXT_PROTOCOL = \"athena/context\";\n\n/** The only interest namespace the host resolves (the linear transcript). */\nexport const DEEP_AGENT_MAIN_NS = \"main\";\n\n/** Window size (interest `before`) a client asks for by default. */\nexport const DEEP_AGENT_DEFAULT_MESSAGE_WINDOW = 40;\n\n/** Bounds on a window size. */\nexport const DEEP_AGENT_MIN_MESSAGE_WINDOW = 8;\n\nexport const DEEP_AGENT_MAX_MESSAGE_WINDOW = 200;\n\n/** Interests one attach may hold at once (the head plus its pages). */\nexport const DEEP_AGENT_MAX_INTERESTS = 16;\n\n/** Command returning a truncated tool output whole. */\nexport const DEEP_AGENT_HISTORY_TOOL_OUTPUT_COMMAND = \"history/tool_output\";\n\n/** Command returning one stored message whole (provenance and full tool output included). */\nexport const DEEP_AGENT_HISTORY_MESSAGE_COMMAND = \"history/message\";\n\n/** Wire key marking a tool message whose content was truncated. */\nexport const DEEP_AGENT_TRUNCATED_CONTENT_KEY = \"athena_content_truncated\";\n\n/**\n * Wire key on a running `task` card whose nested transcript rides cut to its\n * newest steps: `{ messages, tool_calls }` over the whole stored transcript.\n */\nexport const DEEP_AGENT_TRUNCATED_LANE_KEY = \"athena_lane_truncated\";\n\n/**\n * Wire key on a `task` card, and on an in-eval lane's `ptc_subagents` entry,\n * carrying the whole lane's token use however much of the lane the wire\n * carries: `{ input_tokens, output_tokens, cache_read_input_tokens,\n * cache_creation_input_tokens }`, the input counting its cache reads and\n * writes. Absent while the lane's steps report no usage.\n */\nexport const DEEP_AGENT_LANE_USAGE_KEY = \"athena_lane_usage\";\n\n/**\n * The newest nested messages a cut card carries whole; the entries ahead\n * of them are the older assistant turns that requested results among\n * them, cut to those calls.\n */\nexport const DEEP_AGENT_RUNNING_LANE_WIRE_MESSAGES = 8;\n\n/**\n * Key of a followed lane's window (`follows[ns]` on a resolution whose\n * request added `follow: {before}`) naming the `task` call whose card\n * holds the lane.\n */\nexport const DEEP_AGENT_FOLLOW_TOOL_CALL_ID_KEY = \"toolCallId\";\n\n/** The most lane steps one attach follows, across every lane. */\nexport const DEEP_AGENT_MAX_FOLLOWED_STEPS = 200;\n\n/**\n * The first contract version a client declares to see a finished card cut\n * like a running one (and to follow lanes and page them through\n * `history/lane`). Below it, or declaring nothing, finished cards ride whole.\n */\nexport const DEEP_AGENT_LANE_CUT_PROTOCOL_VERSION = 2;\n\n/**\n * Last element of the key a cut finished card's document rides under:\n * `[threadId, \"main\", messageId, \"cut\"]`. A view holds that key or the\n * card's own, never both.\n */\nexport const DEEP_AGENT_CUT_LANE_DOCUMENT = \"cut\";\n\n/**\n * Command returning one page of a card's nested transcript, oldest first:\n * `{ messageId, before, at? }` answers\n * `{ messageId, toolCallId, ns, steps, more: { before }, total }`; the page\n * holds the newest `before` entries, or those strictly older than `at`.\n */\nexport const DEEP_AGENT_HISTORY_LANE_COMMAND = \"history/lane\";\n\n/** The most entries one `history/lane` page asks for. */\nexport const DEEP_AGENT_MAX_LANE_PAGE = 200;\n\n/** The most encoded characters one `history/lane` page carries (at least one entry). */\nexport const DEEP_AGENT_HISTORY_LANE_PAGE_CHARS = 1048576;\n\n/**\n * Set on the last step of a cut finished card whose text is the card's own\n * `content` (the subagent's report): the step rides with empty content, and\n * the card's `content` is its text.\n */\nexport const DEEP_AGENT_REPEATS_RESULT_KEY = \"athena_content_repeats_result\";\n\n/** Most inline-image payload characters one message carries whole on the wire. */\nexport const DEEP_AGENT_INLINE_IMAGE_WIRE_BUDGET = 4194304;\n\n/** Wire key on an image block left off the wire: `{ index, chars, mediaType }`. */\nexport const DEEP_AGENT_OMITTED_IMAGE_KEY = \"athena_image_omitted\";\n\n/** The image an omitted block carries instead of its own (a neutral PNG tile). */\nexport const DEEP_AGENT_OMITTED_IMAGE_PLACEHOLDER_URL =\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4AQMAAABPbGssAAAABlBMVEXi6PCUo7jao11HAAAA6ElEQVR42u2UyW3DMBBF3wxogEd2EJbCElKQDRCwC3MpSRc5eLuYokgNLEUxctK/CHyanQts2vRO3QdlALVsXsBvecqxxr1ob0A5GlDJU+hICxN54p/qXAx/+FpoeeE8hTerzfvByn7ifzpaBtWCOwv6bMVMBgzRgNGKmUL9McDs4XOSyEHuoKCI76AiqOugg+y0gx6SN+YQg3QwALGk19pQSKV/reOocyoww27oU5sxhAbKUNgIqrVxrvnovJ80MFgxYy23wtTss44tmL+bAuOE2p2o0fJa3iW/6iR/lEfx8kv3TZtW6AFk5Sf3k+GTswAAAABJRU5ErkJggg==\";\n\n/**\n * Command returning one inline image of a stored message in chunks:\n * `{ messageId, index, offset? }` answers\n * `{ messageId, index, mediaType, offset, total, chunk, next }`; the\n * chunks joined in order are the image's `data:` URL, and `next` is\n * the offset to ask for next (`null` after the last chunk).\n */\nexport const DEEP_AGENT_HISTORY_IMAGE_COMMAND = \"history/image\";\n\n/**\n * Command returning one inline image of a lane step in chunks, as\n * `history/image` does a stored message's: `{ messageId | lane, step,\n * index, offset? }` answers `{ messageId, lane, step, index, mediaType,\n * offset, total, chunk, next }`, with `messageId` null for an in-eval\n * lane and `lane` null for a card.\n */\nexport const DEEP_AGENT_HISTORY_LANE_IMAGE_COMMAND = \"history/lane_image\";\n"],"names":[],"mappings":"AAyHO,MAAM,yBAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAK8D,IAAI;AAAA,EAChE;AACF;AAGO,MAAM,kCAAkC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAMuE,IAAI;AAAA,EACzE;AACF;AAGO,MAAM,4BAA4B;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKiE,IAAI;AAAA,EACnE;AACF;AAMO,MAAM,6BAA6B;AAAA,EACxC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,cAAc;AAChB;AAGO,MAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAK4D,IAAI;AAAA,EAC9D;AACF;AA2BO,MAAM,+BAA+B;AAQrC,MAAM,oCAAoC;AAE1C,MAAM,kCAAkC;AA+BxC,MAAM,qCACX;AAGK,MAAM,mCAAmC;AAGzC,MAAM,gCAAgC;AAGtC,MAAM,+BAA+B;AAMrC,MAAM,qBAAqB;AAG3B,MAAM,oCAAoC;AAG1C,MAAM,gCAAgC;AAEtC,MAAM,gCAAgC;AAGtC,MAAM,2BAA2B;AAGjC,MAAM,yCAAyC;AAG/C,MAAM,qCAAqC;AAG3C,MAAM,mCAAmC;AAMzC,MAAM,gCAAgC;AAStC,MAAM,4BAA4B;AAwBlC,MAAM,uCAAuC;AAO7C,MAAM,+BAA+B;AAQrC,MAAM,kCAAkC;AAGxC,MAAM,2BAA2B;AAUjC,MAAM,gCAAgC;"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const require$$0 = require("react");
4
+ const HANDOFF_ARRIVALS = Symbol.for("@athenaintel/agent-runtime/handoff-arrivals");
5
+ function registry() {
6
+ const host = globalThis;
7
+ return host[HANDOFF_ARRIVALS] ?? (host[HANDOFF_ARRIVALS] = { arrivals: /* @__PURE__ */ new Map(), listeners: /* @__PURE__ */ new Set() });
8
+ }
9
+ function publish() {
10
+ for (const listener of registry().listeners) listener();
11
+ }
12
+ function readHandoffArrival(threadId) {
13
+ return threadId && registry().arrivals.get(threadId) || null;
14
+ }
15
+ function subscribeHandoffArrivals(listener) {
16
+ const { listeners } = registry();
17
+ listeners.add(listener);
18
+ return () => {
19
+ listeners.delete(listener);
20
+ };
21
+ }
22
+ function anchorHandoffArrival({
23
+ threadId,
24
+ afterMessageId
25
+ }) {
26
+ const { arrivals } = registry();
27
+ const arrival = arrivals.get(threadId);
28
+ if (!arrival || arrival.afterMessageId !== null) return;
29
+ arrivals.set(threadId, { ...arrival, afterMessageId });
30
+ publish();
31
+ }
32
+ function useHandoffArrival({
33
+ threadId,
34
+ lastMessageId,
35
+ loading
36
+ }) {
37
+ const arrival = require$$0.useSyncExternalStore(
38
+ subscribeHandoffArrivals,
39
+ () => readHandoffArrival(threadId),
40
+ () => null
41
+ );
42
+ const unanchored = arrival !== null && arrival.afterMessageId === null;
43
+ require$$0.useEffect(() => {
44
+ if (!threadId || !unanchored || loading || !lastMessageId) return;
45
+ anchorHandoffArrival({ threadId, afterMessageId: lastMessageId });
46
+ }, [threadId, unanchored, loading, lastMessageId]);
47
+ return (arrival == null ? void 0 : arrival.afterMessageId) ? arrival : null;
48
+ }
49
+ const HandoffArrivalContext = require$$0.createContext(null);
50
+ function useHandoffArrivalAfter(messageId) {
51
+ const arrival = require$$0.useContext(HandoffArrivalContext);
52
+ return arrival && messageId && arrival.afterMessageId === messageId ? arrival.label : null;
53
+ }
54
+ exports.HandoffArrivalContext = HandoffArrivalContext;
55
+ exports.anchorHandoffArrival = anchorHandoffArrival;
56
+ exports.readHandoffArrival = readHandoffArrival;
57
+ exports.subscribeHandoffArrivals = subscribeHandoffArrivals;
58
+ exports.useHandoffArrival = useHandoffArrival;
59
+ exports.useHandoffArrivalAfter = useHandoffArrivalAfter;
60
+ //# sourceMappingURL=handoff-arrival.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handoff-arrival.cjs","sources":["../../../../agent-runtime/src/handoff-arrival.ts"],"sourcesContent":["/**\n * Where a handed-off conversation arrived on this surface: a transcript divider\n * (\"Continued from your phone\") after the last message that was already there\n * when the person picked it up.\n *\n * Ephemeral and client-side. A host records an arrival when its pick-up lands\n * (`recordHandoffArrival`); its transcript anchors it to the thread's last\n * message once that history has loaded (`useHandoffArrival`) and renders the\n * divider after that message (`useHandoffArrivalAfter`). Nothing is sent to\n * Athena or persisted; a reload forgets it.\n */\nimport { createContext, useContext, useEffect, useSyncExternalStore } from 'react';\nimport { continuedFromLabel } from './thread-handoff-protocol';\n\nexport interface HandoffArrival {\n threadId: string;\n /** \"Continued from your phone\". */\n label: string;\n /**\n * The last message present when the conversation arrived; the divider goes\n * right after it. `null` until the transcript has anchored it.\n */\n afterMessageId: string | null;\n}\n\n/** Enough for every conversation one person picks up in a session. */\nexport const MAX_HANDOFF_ARRIVALS = 20;\n\n/**\n * The arrivals live on `globalThis`, not in module scope, because two copies of\n * this module can run in one page: the SDK bundles agent-runtime into its dist\n * while a host (Spaces, the Chrome extension, Midas) imports it directly. The\n * host records through its copy and the SDK transcript reads through its own.\n */\nconst HANDOFF_ARRIVALS = Symbol.for('@athenaintel/agent-runtime/handoff-arrivals');\n\ninterface ArrivalRegistry {\n arrivals: Map<string, HandoffArrival>;\n listeners: Set<() => void>;\n}\n\ntype ArrivalRegistryHost = typeof globalThis & { [HANDOFF_ARRIVALS]?: ArrivalRegistry };\n\n// process-local: this client only — what this surface picked up; nothing is persisted\nfunction registry(): ArrivalRegistry {\n const host = globalThis as ArrivalRegistryHost;\n return (host[HANDOFF_ARRIVALS] ??= { arrivals: new Map(), listeners: new Set() });\n}\n\nfunction publish(): void {\n for (const listener of registry().listeners) listener();\n}\n\n/**\n * A pick-up landed `threadId` here from `source` (`mobile`, `chrome`, …). A\n * second pick-up of the same thread moves the divider to the new arrival.\n */\nexport function recordHandoffArrival({\n threadId,\n source,\n}: {\n threadId: string;\n source: string;\n}): void {\n if (!threadId) return;\n const { arrivals } = registry();\n arrivals.delete(threadId);\n arrivals.set(threadId, { threadId, label: continuedFromLabel(source), afterMessageId: null });\n while (arrivals.size > MAX_HANDOFF_ARRIVALS) {\n const oldest = arrivals.keys().next().value;\n if (oldest === undefined) break;\n arrivals.delete(oldest);\n }\n publish();\n}\n\n/** The arrival recorded for `threadId`, anchored or not. */\nexport function readHandoffArrival(threadId: string | null | undefined): HandoffArrival | null {\n return (threadId && registry().arrivals.get(threadId)) || null;\n}\n\nexport function subscribeHandoffArrivals(listener: () => void): () => void {\n const { listeners } = registry();\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\n/** Forgets the arrival of `threadId`: the pick-up never opened the conversation here. */\nexport function clearHandoffArrival(threadId: string): void {\n if (!registry().arrivals.delete(threadId)) return;\n publish();\n}\n\n/** The first anchor wins: later messages are what came after the arrival. */\nexport function anchorHandoffArrival({\n threadId,\n afterMessageId,\n}: {\n threadId: string;\n afterMessageId: string;\n}): void {\n const { arrivals } = registry();\n const arrival = arrivals.get(threadId);\n if (!arrival || arrival.afterMessageId !== null) return;\n arrivals.set(threadId, { ...arrival, afterMessageId });\n publish();\n}\n\n/**\n * The divider for the transcript of `threadId`, once anchored. The transcript\n * passes its last message id and whether its history is still loading; the\n * first time history has loaded with a message in it, the arrival anchors\n * after that message. A thread already on screen anchors at once.\n */\nexport function useHandoffArrival({\n threadId,\n lastMessageId,\n loading,\n}: {\n threadId: string | null | undefined;\n lastMessageId: string | null | undefined;\n loading: boolean;\n}): HandoffArrival | null {\n const arrival = useSyncExternalStore(\n subscribeHandoffArrivals,\n () => readHandoffArrival(threadId),\n () => null\n );\n const unanchored = arrival !== null && arrival.afterMessageId === null;\n useEffect(() => {\n if (!threadId || !unanchored || loading || !lastMessageId) return;\n anchorHandoffArrival({ threadId, afterMessageId: lastMessageId });\n }, [threadId, unanchored, loading, lastMessageId]);\n return arrival?.afterMessageId ? arrival : null;\n}\n\n/** The anchored arrival of the transcript being rendered, for its messages. */\nexport const HandoffArrivalContext = createContext<HandoffArrival | null>(null);\n\n/** The divider label when it goes right after `messageId`; `null` otherwise. */\nexport function useHandoffArrivalAfter(messageId: string | null | undefined): string | null {\n const arrival = useContext(HandoffArrivalContext);\n return arrival && messageId && arrival.afterMessageId === messageId ? arrival.label : null;\n}\n\nexport function resetHandoffArrivalsForTests(): void {\n registry().arrivals.clear();\n publish();\n}\n"],"names":["useSyncExternalStore","useEffect","createContext","useContext"],"mappings":";;;AAkCA,MAAM,mBAAmB,OAAO,IAAI,6CAA6C;AAUjF,SAAS,WAA4B;AACnC,QAAM,OAAO;AACb,SAAQ,oDAA2B,EAAE,UAAU,oBAAI,OAAO,WAAW,oBAAI,MAAI;AAC/E;AAEA,SAAS,UAAgB;AACvB,aAAW,YAAY,WAAW,UAAW,UAAA;AAC/C;AA0BO,SAAS,mBAAmB,UAA4D;AAC7F,SAAQ,YAAY,SAAA,EAAW,SAAS,IAAI,QAAQ,KAAM;AAC5D;AAEO,SAAS,yBAAyB,UAAkC;AACzE,QAAM,EAAE,UAAA,IAAc,SAAA;AACtB,YAAU,IAAI,QAAQ;AACtB,SAAO,MAAM;AACX,cAAU,OAAO,QAAQ;AAAA,EAC3B;AACF;AASO,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AACF,GAGS;AACP,QAAM,EAAE,SAAA,IAAa,SAAA;AACrB,QAAM,UAAU,SAAS,IAAI,QAAQ;AACrC,MAAI,CAAC,WAAW,QAAQ,mBAAmB,KAAM;AACjD,WAAS,IAAI,UAAU,EAAE,GAAG,SAAS,gBAAgB;AACrD,UAAA;AACF;AAQO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AACF,GAI0B;AACxB,QAAM,UAAUA,WAAAA;AAAAA,IACd;AAAA,IACA,MAAM,mBAAmB,QAAQ;AAAA,IACjC,MAAM;AAAA,EAAA;AAER,QAAM,aAAa,YAAY,QAAQ,QAAQ,mBAAmB;AAClEC,aAAAA,UAAU,MAAM;AACd,QAAI,CAAC,YAAY,CAAC,cAAc,WAAW,CAAC,cAAe;AAC3D,yBAAqB,EAAE,UAAU,gBAAgB,cAAA,CAAe;AAAA,EAClE,GAAG,CAAC,UAAU,YAAY,SAAS,aAAa,CAAC;AACjD,UAAO,mCAAS,kBAAiB,UAAU;AAC7C;AAGO,MAAM,wBAAwBC,WAAAA,cAAqC,IAAI;AAGvE,SAAS,uBAAuB,WAAqD;AAC1F,QAAM,UAAUC,WAAAA,WAAW,qBAAqB;AAChD,SAAO,WAAW,aAAa,QAAQ,mBAAmB,YAAY,QAAQ,QAAQ;AACxF;;;;;;;"}
@@ -0,0 +1,46 @@
1
+ export interface HandoffArrival {
2
+ threadId: string;
3
+ /** "Continued from your phone". */
4
+ label: string;
5
+ /**
6
+ * The last message present when the conversation arrived; the divider goes
7
+ * right after it. `null` until the transcript has anchored it.
8
+ */
9
+ afterMessageId: string | null;
10
+ }
11
+ /** Enough for every conversation one person picks up in a session. */
12
+ export declare const MAX_HANDOFF_ARRIVALS = 20;
13
+ /**
14
+ * A pick-up landed `threadId` here from `source` (`mobile`, `chrome`, …). A
15
+ * second pick-up of the same thread moves the divider to the new arrival.
16
+ */
17
+ export declare function recordHandoffArrival({ threadId, source, }: {
18
+ threadId: string;
19
+ source: string;
20
+ }): void;
21
+ /** The arrival recorded for `threadId`, anchored or not. */
22
+ export declare function readHandoffArrival(threadId: string | null | undefined): HandoffArrival | null;
23
+ export declare function subscribeHandoffArrivals(listener: () => void): () => void;
24
+ /** Forgets the arrival of `threadId`: the pick-up never opened the conversation here. */
25
+ export declare function clearHandoffArrival(threadId: string): void;
26
+ /** The first anchor wins: later messages are what came after the arrival. */
27
+ export declare function anchorHandoffArrival({ threadId, afterMessageId, }: {
28
+ threadId: string;
29
+ afterMessageId: string;
30
+ }): void;
31
+ /**
32
+ * The divider for the transcript of `threadId`, once anchored. The transcript
33
+ * passes its last message id and whether its history is still loading; the
34
+ * first time history has loaded with a message in it, the arrival anchors
35
+ * after that message. A thread already on screen anchors at once.
36
+ */
37
+ export declare function useHandoffArrival({ threadId, lastMessageId, loading, }: {
38
+ threadId: string | null | undefined;
39
+ lastMessageId: string | null | undefined;
40
+ loading: boolean;
41
+ }): HandoffArrival | null;
42
+ /** The anchored arrival of the transcript being rendered, for its messages. */
43
+ export declare const HandoffArrivalContext: import("react").Context<HandoffArrival | null>;
44
+ /** The divider label when it goes right after `messageId`; `null` otherwise. */
45
+ export declare function useHandoffArrivalAfter(messageId: string | null | undefined): string | null;
46
+ export declare function resetHandoffArrivalsForTests(): void;
@@ -0,0 +1,60 @@
1
+ import { useContext, useSyncExternalStore, useEffect, createContext } from "react";
2
+ const HANDOFF_ARRIVALS = Symbol.for("@athenaintel/agent-runtime/handoff-arrivals");
3
+ function registry() {
4
+ const host = globalThis;
5
+ return host[HANDOFF_ARRIVALS] ?? (host[HANDOFF_ARRIVALS] = { arrivals: /* @__PURE__ */ new Map(), listeners: /* @__PURE__ */ new Set() });
6
+ }
7
+ function publish() {
8
+ for (const listener of registry().listeners) listener();
9
+ }
10
+ function readHandoffArrival(threadId) {
11
+ return threadId && registry().arrivals.get(threadId) || null;
12
+ }
13
+ function subscribeHandoffArrivals(listener) {
14
+ const { listeners } = registry();
15
+ listeners.add(listener);
16
+ return () => {
17
+ listeners.delete(listener);
18
+ };
19
+ }
20
+ function anchorHandoffArrival({
21
+ threadId,
22
+ afterMessageId
23
+ }) {
24
+ const { arrivals } = registry();
25
+ const arrival = arrivals.get(threadId);
26
+ if (!arrival || arrival.afterMessageId !== null) return;
27
+ arrivals.set(threadId, { ...arrival, afterMessageId });
28
+ publish();
29
+ }
30
+ function useHandoffArrival({
31
+ threadId,
32
+ lastMessageId,
33
+ loading
34
+ }) {
35
+ const arrival = useSyncExternalStore(
36
+ subscribeHandoffArrivals,
37
+ () => readHandoffArrival(threadId),
38
+ () => null
39
+ );
40
+ const unanchored = arrival !== null && arrival.afterMessageId === null;
41
+ useEffect(() => {
42
+ if (!threadId || !unanchored || loading || !lastMessageId) return;
43
+ anchorHandoffArrival({ threadId, afterMessageId: lastMessageId });
44
+ }, [threadId, unanchored, loading, lastMessageId]);
45
+ return (arrival == null ? void 0 : arrival.afterMessageId) ? arrival : null;
46
+ }
47
+ const HandoffArrivalContext = createContext(null);
48
+ function useHandoffArrivalAfter(messageId) {
49
+ const arrival = useContext(HandoffArrivalContext);
50
+ return arrival && messageId && arrival.afterMessageId === messageId ? arrival.label : null;
51
+ }
52
+ export {
53
+ HandoffArrivalContext,
54
+ anchorHandoffArrival,
55
+ readHandoffArrival,
56
+ subscribeHandoffArrivals,
57
+ useHandoffArrival,
58
+ useHandoffArrivalAfter
59
+ };
60
+ //# sourceMappingURL=handoff-arrival.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handoff-arrival.js","sources":["../../../../agent-runtime/src/handoff-arrival.ts"],"sourcesContent":["/**\n * Where a handed-off conversation arrived on this surface: a transcript divider\n * (\"Continued from your phone\") after the last message that was already there\n * when the person picked it up.\n *\n * Ephemeral and client-side. A host records an arrival when its pick-up lands\n * (`recordHandoffArrival`); its transcript anchors it to the thread's last\n * message once that history has loaded (`useHandoffArrival`) and renders the\n * divider after that message (`useHandoffArrivalAfter`). Nothing is sent to\n * Athena or persisted; a reload forgets it.\n */\nimport { createContext, useContext, useEffect, useSyncExternalStore } from 'react';\nimport { continuedFromLabel } from './thread-handoff-protocol';\n\nexport interface HandoffArrival {\n threadId: string;\n /** \"Continued from your phone\". */\n label: string;\n /**\n * The last message present when the conversation arrived; the divider goes\n * right after it. `null` until the transcript has anchored it.\n */\n afterMessageId: string | null;\n}\n\n/** Enough for every conversation one person picks up in a session. */\nexport const MAX_HANDOFF_ARRIVALS = 20;\n\n/**\n * The arrivals live on `globalThis`, not in module scope, because two copies of\n * this module can run in one page: the SDK bundles agent-runtime into its dist\n * while a host (Spaces, the Chrome extension, Midas) imports it directly. The\n * host records through its copy and the SDK transcript reads through its own.\n */\nconst HANDOFF_ARRIVALS = Symbol.for('@athenaintel/agent-runtime/handoff-arrivals');\n\ninterface ArrivalRegistry {\n arrivals: Map<string, HandoffArrival>;\n listeners: Set<() => void>;\n}\n\ntype ArrivalRegistryHost = typeof globalThis & { [HANDOFF_ARRIVALS]?: ArrivalRegistry };\n\n// process-local: this client only — what this surface picked up; nothing is persisted\nfunction registry(): ArrivalRegistry {\n const host = globalThis as ArrivalRegistryHost;\n return (host[HANDOFF_ARRIVALS] ??= { arrivals: new Map(), listeners: new Set() });\n}\n\nfunction publish(): void {\n for (const listener of registry().listeners) listener();\n}\n\n/**\n * A pick-up landed `threadId` here from `source` (`mobile`, `chrome`, …). A\n * second pick-up of the same thread moves the divider to the new arrival.\n */\nexport function recordHandoffArrival({\n threadId,\n source,\n}: {\n threadId: string;\n source: string;\n}): void {\n if (!threadId) return;\n const { arrivals } = registry();\n arrivals.delete(threadId);\n arrivals.set(threadId, { threadId, label: continuedFromLabel(source), afterMessageId: null });\n while (arrivals.size > MAX_HANDOFF_ARRIVALS) {\n const oldest = arrivals.keys().next().value;\n if (oldest === undefined) break;\n arrivals.delete(oldest);\n }\n publish();\n}\n\n/** The arrival recorded for `threadId`, anchored or not. */\nexport function readHandoffArrival(threadId: string | null | undefined): HandoffArrival | null {\n return (threadId && registry().arrivals.get(threadId)) || null;\n}\n\nexport function subscribeHandoffArrivals(listener: () => void): () => void {\n const { listeners } = registry();\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\n/** Forgets the arrival of `threadId`: the pick-up never opened the conversation here. */\nexport function clearHandoffArrival(threadId: string): void {\n if (!registry().arrivals.delete(threadId)) return;\n publish();\n}\n\n/** The first anchor wins: later messages are what came after the arrival. */\nexport function anchorHandoffArrival({\n threadId,\n afterMessageId,\n}: {\n threadId: string;\n afterMessageId: string;\n}): void {\n const { arrivals } = registry();\n const arrival = arrivals.get(threadId);\n if (!arrival || arrival.afterMessageId !== null) return;\n arrivals.set(threadId, { ...arrival, afterMessageId });\n publish();\n}\n\n/**\n * The divider for the transcript of `threadId`, once anchored. The transcript\n * passes its last message id and whether its history is still loading; the\n * first time history has loaded with a message in it, the arrival anchors\n * after that message. A thread already on screen anchors at once.\n */\nexport function useHandoffArrival({\n threadId,\n lastMessageId,\n loading,\n}: {\n threadId: string | null | undefined;\n lastMessageId: string | null | undefined;\n loading: boolean;\n}): HandoffArrival | null {\n const arrival = useSyncExternalStore(\n subscribeHandoffArrivals,\n () => readHandoffArrival(threadId),\n () => null\n );\n const unanchored = arrival !== null && arrival.afterMessageId === null;\n useEffect(() => {\n if (!threadId || !unanchored || loading || !lastMessageId) return;\n anchorHandoffArrival({ threadId, afterMessageId: lastMessageId });\n }, [threadId, unanchored, loading, lastMessageId]);\n return arrival?.afterMessageId ? arrival : null;\n}\n\n/** The anchored arrival of the transcript being rendered, for its messages. */\nexport const HandoffArrivalContext = createContext<HandoffArrival | null>(null);\n\n/** The divider label when it goes right after `messageId`; `null` otherwise. */\nexport function useHandoffArrivalAfter(messageId: string | null | undefined): string | null {\n const arrival = useContext(HandoffArrivalContext);\n return arrival && messageId && arrival.afterMessageId === messageId ? arrival.label : null;\n}\n\nexport function resetHandoffArrivalsForTests(): void {\n registry().arrivals.clear();\n publish();\n}\n"],"names":[],"mappings":";AAkCA,MAAM,mBAAmB,OAAO,IAAI,6CAA6C;AAUjF,SAAS,WAA4B;AACnC,QAAM,OAAO;AACb,SAAQ,oDAA2B,EAAE,UAAU,oBAAI,OAAO,WAAW,oBAAI,MAAI;AAC/E;AAEA,SAAS,UAAgB;AACvB,aAAW,YAAY,WAAW,UAAW,UAAA;AAC/C;AA0BO,SAAS,mBAAmB,UAA4D;AAC7F,SAAQ,YAAY,SAAA,EAAW,SAAS,IAAI,QAAQ,KAAM;AAC5D;AAEO,SAAS,yBAAyB,UAAkC;AACzE,QAAM,EAAE,UAAA,IAAc,SAAA;AACtB,YAAU,IAAI,QAAQ;AACtB,SAAO,MAAM;AACX,cAAU,OAAO,QAAQ;AAAA,EAC3B;AACF;AASO,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AACF,GAGS;AACP,QAAM,EAAE,SAAA,IAAa,SAAA;AACrB,QAAM,UAAU,SAAS,IAAI,QAAQ;AACrC,MAAI,CAAC,WAAW,QAAQ,mBAAmB,KAAM;AACjD,WAAS,IAAI,UAAU,EAAE,GAAG,SAAS,gBAAgB;AACrD,UAAA;AACF;AAQO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AACF,GAI0B;AACxB,QAAM,UAAU;AAAA,IACd;AAAA,IACA,MAAM,mBAAmB,QAAQ;AAAA,IACjC,MAAM;AAAA,EAAA;AAER,QAAM,aAAa,YAAY,QAAQ,QAAQ,mBAAmB;AAClE,YAAU,MAAM;AACd,QAAI,CAAC,YAAY,CAAC,cAAc,WAAW,CAAC,cAAe;AAC3D,yBAAqB,EAAE,UAAU,gBAAgB,cAAA,CAAe;AAAA,EAClE,GAAG,CAAC,UAAU,YAAY,SAAS,aAAa,CAAC;AACjD,UAAO,mCAAS,kBAAiB,UAAU;AAC7C;AAGO,MAAM,wBAAwB,cAAqC,IAAI;AAGvE,SAAS,uBAAuB,WAAqD;AAC1F,QAAM,UAAU,WAAW,qBAAqB;AAChD,SAAO,WAAW,aAAa,QAAQ,mBAAmB,YAAY,QAAQ,QAAQ;AACxF;"}
@@ -9,13 +9,14 @@ export { CATEGORY_EMOJI, defaultToolDisplayMeta, describeDelegation, describeNam
9
9
  export { classifyToolResult, isRecord, isRejectedToolResult, isToolResultSuccess, parseJsonRecord, readRejectedToolResult, type RejectedToolResult, resultMessage, resultRecord, stringField, type ToolCallStatusLike, toolFailure, type ToolFailure, type ToolResultClassification, type ToolResultState, } from "./tool-result";
10
10
  export { type ConversationListController, useConversationList, type UseConversationListOptions, } from "./use-conversation-list";
11
11
  export { CLIENT_TOOL_RESULT_STATUS_ERROR, CLIENT_TOOL_RESULT_STATUS_SUCCESS, CLIENT_TOOL_RESULT_STATUSES, type ClientToolResultEnvelopeContract, type ClientToolResultStatus, DEEP_AGENT_CONTEXT_PROTOCOL, DEEP_AGENT_CUT_LANE_DOCUMENT, DEEP_AGENT_DEFAULT_MESSAGE_WINDOW, DEEP_AGENT_FOLLOW_TOOL_CALL_ID_KEY, DEEP_AGENT_INTEREST_PROTOCOL, DEEP_AGENT_LANE_CUT_PROTOCOL_VERSION, DEEP_AGENT_LANE_FOLLOW_PROTOCOL_VERSION, DEEP_AGENT_MAIN_NS, DEEP_AGENT_MAX_FOLLOWED_STEPS, DEEP_AGENT_MAX_LANE_PAGE, DEEP_AGENT_HISTORY_IMAGE_COMMAND, DEEP_AGENT_HISTORY_LANE_COMMAND, DEEP_AGENT_HISTORY_LANE_IMAGE_COMMAND, DEEP_AGENT_HISTORY_LANE_PAGE_CHARS, DEEP_AGENT_HISTORY_MESSAGE_COMMAND, DEEP_AGENT_HISTORY_TOOL_OUTPUT_COMMAND, DEEP_AGENT_INLINE_IMAGE_WIRE_BUDGET, DEEP_AGENT_MAX_INTERESTS, DEEP_AGENT_MAX_MESSAGE_WINDOW, DEEP_AGENT_MESSAGE_WINDOW_HEADER, DEEP_AGENT_MIN_MESSAGE_WINDOW, DEEP_AGENT_OMITTED_IMAGE_KEY, DEEP_AGENT_OMITTED_IMAGE_PLACEHOLDER_URL, DEEP_AGENT_PROTOCOL_STATE_KEY, DEEP_AGENT_PROTOCOL_VERSION, DEEP_AGENT_PROTOCOL_VERSION_HEADER, DEEP_AGENT_REPEATS_RESULT_KEY, DEEP_AGENT_RUNNING_LANE_WIRE_MESSAGES, DEEP_AGENT_RUNTIME_MARKER, DEEP_AGENT_TRUNCATED_CONTENT_KEY, DEEP_AGENT_TRUNCATED_LANE_KEY, KNOWN_START_CHANNEL_SET, KNOWN_START_CHANNELS, type KnownStartChannel, RUN_CONFIG_COMPANION_CUSTOM_KEYS, RUN_CONFIG_CUSTOM_KEY_SET, RUN_CONFIG_CUSTOM_KEYS, RUN_CONFIG_PARSED_CUSTOM_KEYS, RUN_CONFIG_PER_SEND_CUSTOM_KEY_SET, RUN_CONFIG_PER_SEND_CUSTOM_KEYS, type RunConfigCustomKey, type RunConfigPerSendCustomKey, DEEP_AGENT_CONFIG_COMMANDS, DEEP_AGENT_CONFIG_STATE_KEY, THREAD_CONFIG_CUSTOM_KEY_SET, THREAD_CONFIG_CUSTOM_KEYS, type ThreadConfigCustomKey, } from "./generated/runconfig-contract";
12
- export { COLLAB_AGENT_CHANNEL_SESSION_MISMATCH, CONVERSATION_ARCHIVED, CONVERSATION_ARCHIVED_MESSAGE, isConversationArchivedRejection, isLegacyThreadReadOnlyRejection, isStatewireChannelTeardown, isStatewireCommandAuthContextExpired, isStatewireExpiredVerdict, isStatewireRewindAnchorRejection, projectDeepAgentConnection, readRetryableCommandRejection, readRetryableRunRefusal, readRunStartRefusal, type RetryableCommandRejection, type RetryableRunRefusal, type RunStartRefusal, STATEWIRE_COMMAND_AUTH_CONTEXT_EXPIRED, statewireRejectionCode, statewireRejectionDetailMessage, statewireRejectionPayload, type StatewireRejectionPayload, statewireTransportOutcome, } from "./errors";
12
+ export { COLLAB_AGENT_CHANNEL_SESSION_MISMATCH, CONVERSATION_ARCHIVED, CONVERSATION_ARCHIVED_MESSAGE, isConversationArchivedRejection, isLegacyThreadReadOnlyRejection, isStatewireChannelTeardown, isStatewireCommandAuthContextExpired, isStatewireExpiredVerdict, isStatewireRewindAnchorRejection, projectDeepAgentConnection, readRetryableCommandRejection, readRetryableRunRefusal, readRunStartRefusal, type RetryableCommandRejection, type RetryableRunRefusal, type RunStartRefusal, STATEWIRE_COMMAND_AUTH_CONTEXT_EXPIRED, statewireRejectionCode, isVoiceCommandRejection, statewireRejectionDetailMessage, statewireRejectionPayload, type StatewireRejectionPayload, statewireTransportOutcome, } from "./errors";
13
13
  export { type ParsedExecuteOutput, parseExecuteOutput, type ShellCommandSummary, summarizeShellCommand, } from "./execute-output";
14
- export { type AbandonedInputRequest, type ApprovalResumeLock, asHitlApproval, canApproveForSession, DEFAULT_INTERRUPT_PAUSED_MESSAGE, fanLaneDecision, findAbandonedInterrupt, HITL_PENDING_RESUME_GRACE_MS, HITL_REJECT_REASON, HITL_RESUME_TRANSPORT_RETRIES, type HitlActionDecision, type HitlApprovalPayload, actionRequestToolCallIds, hitlResumeActionDecisions, hitlResumeApprove, hitlResumeApproveForSession, INTERRUPT_DECLINE_REASON, interruptMirrorPayload, interruptResumeDecline, hitlResumeReject, isApprovalCardInterrupt, isPendingInterrupt, isResumeTransportLoss, isSystemPauseInterrupt, laneInterruptIds, type PendingActionRequest, type PendingApprovalContext, type PendingApprovalFact, type PendingApprovalWarning, parsePendingApprovalContext, pendingActionRequests, readAbandonedInputRequests, readInterruptMessage, readInterruptMirror, readQueuedLaneDecisions, toolCallIdsAwaitingApproval, useApprovalResumeLock, type UseApprovalResumeLockOptions, } from "./interrupts";
14
+ export { type AbandonedInputRequest, type ApprovalResumeLock, asHitlApproval, canApproveForSession, DEFAULT_INTERRUPT_PAUSED_MESSAGE, fanLaneDecision, findAbandonedInterrupt, HITL_PENDING_RESUME_GRACE_MS, HITL_REJECT_REASON, HITL_RESUME_TRANSPORT_RETRIES, type HitlActionDecision, type HitlApprovalPayload, actionRequestToolCallIds, hitlResumeActionDecisions, hitlResumeApprove, hitlResumeApproveForSession, INTERRUPT_DECLINE_REASON, interruptMirrorPayload, interruptResumeDecline, hitlResumeReject, isApprovalCardInterrupt, isPendingInterrupt, isResumeTransportLoss, isSystemPauseInterrupt, laneInterruptIds, type PendingActionRequest, type PendingApprovalContext, type PendingApprovalFact, type PendingApprovalTitle, type PendingApprovalWarning, parsePendingApprovalContext, pendingActionRequests, pendingApprovalTitle, readAbandonedInputRequests, readInterruptMessage, readInterruptMirror, readQueuedLaneDecisions, type ResumeExtras, resumeValueApproves, toolCallIdsAwaitingApproval, useApprovalResumeLock, type UseApprovalResumeLockOptions, } from "./interrupts";
15
+ export { type AgoraFetch, bareDecisionThreadId, type BrowserDecisionCheckOutcome, DECISION_CHECK_HEADER, type DecisionCheckClient, type DecisionCheckClientKind, type DecisionCheckDescriptor, DecisionCheckKind, MAX_DECISIONS_PER_CHECK, type PendingBrowserDecisionCheck, respondDecisionDescriptor, type RunBrowserDecisionCheckOptions, runBrowserDecisionCheck, type StatewireAnswerForCheck, statewireAnswerDescriptors, } from "./decision-checks";
15
16
  export { buildQueueEditCommand, buildStatewireQueueRows, describeQueueSendFailure, isFailedSendEntryRace, isQueueEntryUnsettled, QUEUE_AUTO_CONTINUE_DELAY_MS, type QueueEditCommand, queueEntryText, queueLaneFlags, type QueueLaneFlags, readPrioritizedQueueIds, showQueueRowSendNow, showQueueRowSteer, type StatewireQueueRow, userStopBlocksQueueAutoContinue, } from "./queue";
16
17
  export { createDeepAgentSendRecovery, type DeepAgentSendRecovery, type DeepAgentSendRecoveryOptions, shouldAutoRetryFailedSend, } from "./send-recovery";
17
18
  export { hasStatewireThreadExtras, readStatewireFailedSendLane, requireStatewireFailedActions, type StatewireFailedActions, type StatewireFailedSendEntry, type StatewireFailedSendLane, } from "./thread-extras";
18
- export { applyRunErrorStatus, ATHENA_ERRORS_KEY, ATHENA_HANDOFF_KEY, ATHENA_QUEUED_LANE_KEY, ATHENA_RUN_MARKER_CANCELLED, ATHENA_RUN_MARKER_FAILED, ATHENA_RUN_MARKER_KEY, ATHENA_RUN_MARKER_SOURCE_KEY, ATHENA_STOP_SOURCE_INSTANCE_CLOSED, ATHENA_STOP_SOURCE_POD_DRAIN, ATHENA_STOP_SOURCE_SEND_NOW, ATHENA_STOP_SOURCE_VOICE_STEER, ATHENA_TERMINATION_REASON_KEY, convertDeepAgentLangChainMessage, convertDeepAgentState, type ConvertDeepAgentStateOptions, type DeepAgentMessageConversionOptions, createDeepAgentMaterialize, createDeepAgentMessageConversionCache, type DeepAgentConversionMemory, deepAgentMaterialize, type DeepAgentMaterializeOptions, DeepAgentMessageConversionCache, deepAgentRowKey, isConvertibleChatMessage, isDrainRunMarker, isLangGraphState, isMessageHiddenFromFrontend, isQueuedLaneMessage, isServerUpdateStopSource, isSilentRunMarker, laneTailMessages, liftBranchIntoMetadata, liftCompactionBoundaryIntoMetadata, liftConversationStatsIntoMetadata, liftErrorsIntoMetadata, liftHandoffSummaryIntoMetadata, liftModelIntoMetadata, liftRunMarkerIntoMetadata, liftTerminationIntoMetadata, liftToolMessageMetadataIntoArtifact, liftTruncatedToolOutputIntoArtifact, convertDeepAgentMessage, markPreliminaryToolResults, messageConverter, nativeStepUsage, PENDING_ASSISTANT_MESSAGE_ID, readMessageErrorsFromSourceMessages, readRunMarkerFromSourceMessages, readSoleRunMarker, type RunMarkerInfo, sanitizeLangChainMessages, substituteToolOutput, withPendingAssistantMessage, } from "./messages";
19
+ export { applyRunErrorStatus, ATHENA_ERRORS_KEY, ATHENA_HANDOFF_KEY, ATHENA_QUEUED_LANE_KEY, ATHENA_RUN_MARKER_CANCELLED, ATHENA_RUN_MARKER_FAILED, ATHENA_RUN_MARKER_KEY, ATHENA_RUN_MARKER_SOURCE_KEY, ATHENA_STOP_SOURCE_INSTANCE_CLOSED, ATHENA_STOP_SOURCE_POD_DRAIN, ATHENA_STOP_SOURCE_SEND_NOW, ATHENA_STOP_SOURCE_VOICE_STEER, ATHENA_TERMINATION_REASON_KEY, convertDeepAgentLangChainMessage, convertDeepAgentState, type ConvertDeepAgentStateOptions, type DeepAgentMessageConversionOptions, createDeepAgentMaterialize, createDeepAgentMessageConversionCache, type DeepAgentConversionMemory, deepAgentMaterialize, type DeepAgentMaterializeOptions, DeepAgentMessageConversionCache, deepAgentRowKey, isConvertibleChatMessage, isDrainRunMarker, isLangGraphState, isMessageHiddenFromFrontend, isQueuedLaneMessage, isServerUpdateStopSource, isSilentRunMarker, laneTailMessages, liftBranchIntoMetadata, liftCompactionBoundaryIntoMetadata, liftConversationStatsIntoMetadata, liftErrorsIntoMetadata, liftHandoffSummaryIntoMetadata, liftModelIntoMetadata, liftPlaceInstructionsIntoMetadata, liftRunMarkerIntoMetadata, liftTerminationIntoMetadata, liftToolMessageMetadataIntoArtifact, liftTruncatedToolOutputIntoArtifact, convertDeepAgentMessage, markPreliminaryToolResults, messageConverter, nativeStepUsage, PENDING_ASSISTANT_MESSAGE_ID, PLACE_INSTRUCTIONS_STAMP_KEY, readMessageErrorsFromSourceMessages, readRunMarkerFromSourceMessages, readSoleRunMarker, type RunMarkerInfo, sanitizeLangChainMessages, substituteToolOutput, withPendingAssistantMessage, } from "./messages";
19
20
  export { ATHENA_TRUNCATED_TOOL_OUTPUT_ARTIFACT_KEY, buildHistoryMessageCommand, buildToolOutputCommand, clampMessageWindowSize, type DeepAgentInterestChainEntry, type DeepAgentInterestRequest, type DeepAgentInterestResolution, type DeepAgentMessageWindow, type DeepAgentMessageWindowDeclaration, headInterestRequest, type HistoryMessageCommand, type HistoryMessageResult, interestsCovered, pageInterestRequest, pageInterestRequests, readDeepAgentInterestDocument, readDeepAgentInterestResolution, readDeepAgentMessageWindow, readHistoryMessageResult, readToolOutputResult, readTruncatedToolContent, readTruncatedToolOutputArtifact, type ToolOutputCommand, type ToolOutputResult, type TruncatedToolContent, type TruncatedToolOutputArtifact, withDeclaredMessageWindow, } from "./message-window";
20
21
  export { buildHistoryLaneCommand, type DeepAgentLaneHistoryState, type DeepAgentLaneTarget, deepAgentLaneHistoryQueryKey, type HistoryLaneCommand, type HistoryLanePage, isWholeCardRefusal, mergeLaneHistory, readHistoryLanePage, useDeepAgentLaneHistory, } from "./lane-history";
21
22
  export { buildHistoryLaneImageCommand, type DeepAgentLaneImagesState, deepAgentLaneImageQueryKey, type HistoryLaneImageChunk, type HistoryLaneImageCommand, type InlineImage, type InlineImageChunk, type LaneImageRef, laneImageKey, omittedLaneImages, readChunkedInlineImage, readHistoryLaneImageChunk, readInlineImageChunk, readLaneImage, readLaneImageTile, showLaneImages, useDeepAgentLaneImages, } from "./lane-images";
@@ -27,6 +28,8 @@ export { createDeepAgentToolOutputStore, type DeepAgentToolOutputEntry, type Dee
27
28
  export { claimDeepAgentFailedSendText, type DeepAgentFailedSend, type DeepAgentWithdrawableTurn, type DeepAgentWithdrawnFromRun, type DeepAgentWithdrawnTurns, type DeepAgentWithdrawnTurnVerdict, readDeepAgentFailedSends, readDeepAgentWithdrawableTurn, readDeepAgentWithdrawnTurnVerdict, } from "./withdrawn-turns";
28
29
  export { DEEP_AGENT_COMPOSER_MARKDOWN_KEY, isComposerMarkdownOfText, readDeepAgentComposerMarkdown, resetStagedComposerMarkdown, STAGED_COMPOSER_MARKDOWN_TTL_MS, stageComposerMarkdown, takeStagedComposerMarkdownMetadata, trimComposerDraft, withDeepAgentComposerMarkdown, withStagedComposerMarkdown, } from "./composer-markdown";
29
30
  export { ATHENA_MESSAGE_AUTHOR_KEY, type DeepAgentMessageAuthor, isSameMessageAuthor, laneEntryAuthor, readMessageAuthor, } from "./message-author";
31
+ export { answerLabelText, ATHENA_ANSWERED_BY_KEY, ATHENA_ASSISTANT_NAME, type DeepAgentAnsweredBy, readAnsweredBy, readLangChainAnswer, readMessageAnswers, showsAnswerLabel, threadShowsAnswerLabels, } from "./answer-label";
32
+ export { ADDRESSED_TURN_STATE_KEY, type DeepAgentAddressedOutcome, type DeepAgentAddressedTurn, NEXT_AGENT_PENDING_MESSAGE_ID, readAnswerRowKey, readDeepAgentAddressedTurn, withAnswerRows, } from "./answer-rows";
30
33
  export { AIMessage, enrichStreamMessage, getMessageText, modelNameFromMessage, type StreamMessage, ToolMessage, } from "./message-text";
31
34
  export { hideUnterminatedMarkdownLink, UNTERMINATED_LABEL_HOLD_LIMIT, UNTERMINATED_LINK_HOLD_LIMIT, } from "./streaming-markdown";
32
35
  export { DEFAULT_CUA_SCREENSHOT_SIZE, describeScreenPointError, findScreenPointLinks, fitScreenBasis, formatScreenPoint, isScreenPointHref, parseScreenPointHref, SCREEN_POINT_HREF_PREFIX, SCREEN_POINT_HOST, SCREEN_POINT_PROTOCOL, sameScreenSize, type ScreenBasisFit, type ScreenPoint, type ScreenPointParseError, type ScreenPointParseResult, screenPointFraction, type ScreenSize, serializeScreenPointHref, } from "./screen-point";
@@ -34,8 +37,8 @@ export { type DeepAgentModelContextHost, registerDeepAgentRunConfig, } from "./m
34
37
  export { type CompletedPtcParent, extractCompletedPtcParents, type PtcSubcall, ptcSubcallsFromArtifact, } from "./ptc-subcalls";
35
38
  export { isRunningToolPlaceholder, isRunningToolPlaceholderArtifact, } from "./running-tool-placeholder";
36
39
  export { convertSubagentTranscript, createSubagentLaneConversion, createSubagentTranscriptConversionCache, type SubagentLaneConversion, withLaneReport, withRepeatedResult, } from "./subagent-transcripts";
37
- export { countSubagentStatuses, deriveEvalSubagents, finalizeOrphanedSubagents, isTerminalSubagentStatus, nestedMessagesFromArtifact, nestedTodosFromArtifact, ORPHANED_SUBAGENT_OUTPUT, ptcSubagentsFromArtifact, readLaneUsage, readTruncatedLane, type SubagentDiscoverySnapshot, type SubagentLaneSource, type SubagentStatus, type SubagentStatusCounts, type SubagentTokenUsage, subagentAwaitingApproval, subagentToolCallAwaitingApproval, type TaskSiblingGroup, type TokenCounts, type TruncatedLane, taskSiblingGroup, taskSubagentsOfThread, taskSubagentsOfTurn, transcriptStepUsage, turnToolCallsAwaitingApproval, useTurnToolCallsAwaitingApproval, } from "./subagents";
38
- export { ASYNC_TASK_TOOL_NAMES, CANCEL_ASYNC_TASK_TOOL_NAME, CHECK_ASYNC_TASK_TOOL_NAME, EDIT_FILE_TOOL_NAME, EVAL_TOOL_NAME, EXECUTE_PRESENTATION_CODE_TOOL_NAME, EXECUTE_SPREADSHEET_CODE_TOOL_NAME, EXECUTE_TOOL_NAME, EXECUTE_WORD_DOCUMENT_CODE_TOOL_NAME, type FileToolArgs, LIST_ASYNC_TASKS_TOOL_NAME, PTC_PARENT_TOOL_NAMES, QUIET_TOOL_NAMES, RUN_PYTHON_CODE_TOOL_NAME, salientToolCallDetail, START_ASYNC_TASK_TOOL_NAME, SUBMIT_FEEDBACK_TOOL_NAME, TASK_TOOL_NAME, UPDATE_ASYNC_TASK_TOOL_NAME, WRITE_FILE_TOOL_NAME, } from "./tool-names";
40
+ export { countInEvalDispatches, countSubagentStatuses, deriveEvalSubagents, finalizeOrphanedSubagents, isTerminalSubagentStatus, nestedMessagesFromArtifact, nestedTodosFromArtifact, ORPHANED_SUBAGENT_OUTPUT, ptcSubagentsFromArtifact, readLaneUsage, readTruncatedLane, type SubagentDiscoverySnapshot, type SubagentLaneSource, type SubagentStatus, type SubagentStatusCounts, type SubagentTokenUsage, subagentAwaitingApproval, subagentToolCallAwaitingApproval, type TaskSiblingGroup, type TokenCounts, type TruncatedLane, taskSiblingGroup, taskSubagentsOfThread, taskSubagentsOfTurn, transcriptStepUsage, turnToolCallsAwaitingApproval, useTurnToolCallsAwaitingApproval, } from "./subagents";
41
+ export { ASK_AGENT_TOOL_NAME, ASYNC_TASK_TOOL_NAMES, CANCEL_ASYNC_TASK_TOOL_NAME, CHECK_ASYNC_TASK_TOOL_NAME, EDIT_FILE_TOOL_NAME, EVAL_TOOL_NAME, EXECUTE_PRESENTATION_CODE_TOOL_NAME, EXECUTE_SPREADSHEET_CODE_TOOL_NAME, EXECUTE_TOOL_NAME, EXECUTE_WORD_DOCUMENT_CODE_TOOL_NAME, type FileToolArgs, LIST_ASYNC_TASKS_TOOL_NAME, PTC_PARENT_TOOL_NAMES, QUIET_TOOL_NAMES, RUN_PYTHON_CODE_TOOL_NAME, salientToolCallDetail, START_ASYNC_TASK_TOOL_NAME, SUBMIT_FEEDBACK_TOOL_NAME, TASK_TOOL_NAME, UPDATE_ASYNC_TASK_TOOL_NAME, WRITE_FILE_TOOL_NAME, } from "./tool-names";
39
42
  export { buildOptimisticHumanContent, type OptimisticContentPart, } from "./optimistic-content";
40
43
  export { DEEP_AGENT_DEFAULT_CLIENT_PROTOCOL_VERSION, type DeepAgentProtocolDeclaration, type DeepAgentProtocolStatus, type DeepAgentWireProtocol, declaredDeepAgentProtocolVersion, isDeepAgentHostState, projectDeepAgentProtocol, readDeepAgentProtocol, withDeclaredProtocolVersion, } from "./protocol";
41
44
  export { AUTH_DENIAL_PARK_THRESHOLD, type AuthDenialTrackerState, initialAuthDenialTrackerState, observeAuthDenial, } from "./auth-denial";
@@ -45,7 +48,7 @@ export { DEEP_AGENT_PRE_STREAM_STATE, isDeepAgentStateHydrated, pairDeepAgentSta
45
48
  export { StatewireSuspended, type SuspendedStatewireOptions, } from "./statewire-suspended";
46
49
  export { createDeepAgentThreadSnapshotCache, type CreatedDeepAgentThreadSnapshotCache, type DeepAgentThreadSnapshotCache, type DeepAgentThreadSnapshotCacheChange, type DeepAgentThreadSnapshotCacheOptions, toThreadSnapshotSeed, } from "./thread-snapshot-cache";
47
50
  export { classifyThreadSnapshotForMirror, createThreadSnapshotMirror, MAX_MIRRORED_SNAPSHOT_MESSAGES, MAX_MIRRORED_SNAPSHOTS_PER_OWNER, type MirroredList, type MirroredThreadSnapshot, SNAPSHOT_MIRROR_DEBOUNCE_MS, THREAD_SNAPSHOT_MIRROR_DATABASE, type ThreadSnapshotKeyPurpose, type ThreadSnapshotMirror, type ThreadSnapshotMirrorOptions, } from "./thread-snapshot-mirror";
48
- export { CHAT_EDIT_KEPT_MESSAGE, CHAT_EDIT_UNREACHABLE_LABEL, CHAT_OUTBOX_ASK_AFTER_MS, CHAT_OUTBOX_ATTACHMENT_CHECK_TIMEOUT_MS, CHAT_OUTBOX_CLAIM_LEASE_MS, CHAT_OUTBOX_COUNTDOWN_MS, ChatEditUnreachableError, type ChatOutbox, type ChatOutboxCommandUpdate, type ChatOutboxElsewhere, type ChatOutboxEvent, type ChatOutboxInput, type ChatOutboxOptions, type ChatOutboxRow, type ChatOutboxRowState, type ChatOutboxSignal, type ChatOutboxSnapshot, type ChatOutboxThreadPort, type ChatOutboxThreadReadiness, chatOutboxCommandMessageId, chatOutboxFailureMessage, createChatOutbox, } from "./chat-outbox";
51
+ export { CHAT_EDIT_KEPT_MESSAGE, CHAT_EDIT_UNREACHABLE_LABEL, CHAT_OUTBOX_ASK_AFTER_MS, CHAT_OUTBOX_ATTACHMENT_CHECK_TIMEOUT_MS, CHAT_OUTBOX_CLAIM_LEASE_MS, CHAT_OUTBOX_COUNTDOWN_MS, ChatEditUnreachableError, type ChatOutbox, type ChatOutboxCommandUpdate, type ChatOutboxElsewhere, type ChatOutboxEvent, type ChatOutboxInput, type ChatOutboxOptions, type ChatOutboxRow, type ChatOutboxRowState, type ChatOutboxSendGate, type ChatOutboxSignal, type ChatOutboxSnapshot, type ChatOutboxThreadPort, type ChatOutboxThreadReadiness, chatOutboxCommandMessageId, chatOutboxFailureMessage, createChatOutbox, } from "./chat-outbox";
49
52
  export { CHAT_OUTBOX_DATABASE, CHAT_OUTBOX_FORMAT, type ChatOutboxAttachment, type ChatOutboxClaim, type ChatOutboxClaimResult, type ChatOutboxEntry, type ChatOutboxFailure, type ChatOutboxFailureReason, type ChatOutboxFile, type ChatOutboxKeyPurpose, type ChatOutboxRecord, type ChatOutboxStore, createIndexedDbChatOutboxStore, createMemoryChatOutboxStore, type IndexedDbChatOutboxStoreOptions, parseChatOutboxEntry, readChatOutboxClaim, readChatOutboxFailure, withChatOutboxMemoryFallback, } from "./chat-outbox-store";
50
53
  export { type ChatOutboxAssetReadResponse, type ChatOutboxAttachmentCheck, type ChatOutboxAttachmentVerdict, chatOutboxAttachmentPath, createChatOutboxAttachmentCheck, } from "./chat-outbox-attachments";
51
54
  export { buildChatOutboxSendCommand, type ChatOutboxClientHost, type ChatOutboxSendCommand, type ChatOutboxWireMessage, chatOutboxHeldIds, chatOutboxReadiness, chatOutboxWireAnchorId, chatOutboxWireMessage, createStatewireChatOutboxPort, } from "./chat-outbox-thread";
@@ -62,14 +65,18 @@ export { BACK_ONLINE_MS, chatSocketCannotReach, chatSocketOutage, useBrowserOnli
62
65
  export { type DeepAgentConfigControllerInputs, type DeepAgentConfigWriteResult, type DeepAgentServerConfig, type DeepAgentServerConfigEvent, foldPendingConfigOps, isConfigSyncUnavailableRejection, isConfigWriteForbiddenRejection, readConfigVersion, readServerConfig, readThreadServerConfig, useDeepAgentConfig, useDeepAgentConfigController, type UseDeepAgentConfigOptions, type UseDeepAgentConfigResult, } from "./use-deep-agent-config";
63
66
  export { applyConfigPatch, applyToolsDisable, applyToolsEnable, diffThreadConfig, pickPerSendCustom, pickThreadConfigCustom, readDeclinedToolkitIds, readEnabledTools, type ThreadConfigCustom, type ThreadConfigPatch, } from "./config-mutations";
64
67
  export { DEEP_AGENT_CONNECTION_STATUSES, type DeepAgentConnectionState, type DeepAgentConnectionStatus, type DeepAgentLaneProjection, type DeepAgentStreamValues, type LangGraphState, type PtcSubagentEntry, type Todo, } from "./types";
65
- export { classifyVoiceStartError, type DeepAgentVoiceDiagnostic, type DeepAgentVoiceDiagnosticEvent, type DeepAgentVoiceFailure, type DeepAgentVoiceFailureKind, type DeepAgentVoiceFailureStage, type DeepAgentVoiceLiveKitAdapter, type DeepAgentVoiceLiveKitAnswer, type DeepAgentVoiceLiveKitSession, type DeepAgentVoiceModelOption, type DeepAgentVoicePhase, type DeepAgentVoiceRemoteStream, type DeepAgentVoiceToolCall, type DeepAgentVoiceTransport, type DeepAgentVoiceWireState, describeVoiceFailure, describeVoiceWireError, float32FromPcm16, formatVoiceElapsed, parseVoiceLiveKitAnswer, parseVoiceModelOptions, pcm16FromFloat32, useDeepAgentVoice, useVoiceElapsed, type UseDeepAgentVoiceOptions, type UseDeepAgentVoiceReturn, VOICE_LIVEKIT_ANSWER_PREFIX, VOICE_LIVEKIT_OFFER, VOICE_RELAY_ANSWER_PREFIX, VOICE_RELAY_SAMPLE_RATE, VOICE_WEBSOCKET_OFFER, voiceRelayUrl, } from "./use-deep-agent-voice";
68
+ export { classifyVoiceStartError, type DeepAgentVoiceDiagnostic, type DeepAgentVoiceDiagnosticEvent, type DeepAgentVoiceFailure, type DeepAgentVoiceFailureKind, type DeepAgentVoiceFailureStage, type DeepAgentVoiceLiveKitAdapter, type DeepAgentVoiceCallMove, type DeepAgentVoiceLiveKitAnswer, type DeepAgentVoiceLiveKitSession, type DeepAgentVoiceModelOption, type DeepAgentVoiceOpening, type DeepAgentVoiceOwnerWireState, type DeepAgentVoicePhase, type DeepAgentVoiceRemoteStream, type DeepAgentVoiceStartOptions, type DeepAgentVoiceSurface, type DeepAgentVoiceToolCall, type DeepAgentVoiceTransferWireState, type DeepAgentVoiceTransport, type DeepAgentVoiceWireState, describeVoiceFailure, describeVoiceLiveElsewhere, describeVoiceMovedTo, describeVoiceWireError, float32FromPcm16, formatVoiceElapsed, parseVoiceLiveKitAnswer, parseVoiceModelOptions, parseVoiceOwner, pcm16FromFloat32, playVoiceMoveEarcon, useDeepAgentVoice, useVoiceElapsed, useVoiceMovedNotice, type UseDeepAgentVoiceOptions, type UseDeepAgentVoiceReturn, VOICE_LIVEKIT_ANSWER_PREFIX, VOICE_CONTINUE_BY_VOICE_LABEL, VOICE_LIVEKIT_OFFER, VOICE_MOVE_CALL_HERE_LABEL, VOICE_MOVE_EARCON_MS, VOICE_MOVE_EARCON_PEAK, VOICE_MOVE_EARCON_SAMPLE_RATE, VOICE_MOVE_HERE_ACTION, VOICE_MOVED_NOTICE_MS, VOICE_RELAY_ANSWER_PREFIX, VOICE_RELAY_SAMPLE_RATE, VOICE_WEBSOCKET_OFFER, voiceMoveEarconDataUri, voiceMoveEarconSamples, voiceMoveEarconWav, voiceRelayUrl, voiceSurfaceLabel, } from "./use-deep-agent-voice";
66
69
  export { type DeepAgentVoiceWireError } from "./types";
67
70
  export { describeVoiceUpdateToolCall, isSpokenTurnTextPart, isVoiceDelegationMessage, VOICE_DELEGATION_ID_PREFIX, VOICE_LIVE_KEY, VOICE_LIVE_TYPED_HINT, VOICE_SOURCE_DELEGATION, VOICE_SOURCE_SPOKEN, VOICE_SOURCE_TYPED, VOICE_TURN_IDS_KEY, VOICE_UPDATE_TOOL_NAME, type VoiceMessageMarker, type VoiceProvenance, type VoiceUpdateToolCall, voiceProvenanceLabel, voiceUpdateStatusLabel, } from "./voice-presentation";
68
71
  export { groupSpokenUserTurns, isSpokenUserTurn } from "./voice-turn-grouping";
72
+ export { CALL_RECAP_APPROVAL_LABEL, CALL_RECAP_TITLE, type CallRecap, type CallRecapApproval, type CallRecapAsset, type CallRecapItem, type CallRecapLink, type CallRecapMessage, type CallRecapOpenToolCall, type CallRecapPart, callRecapAfter, callRecapHasItems, callRecapItems, isCallUserMessage, mayHaveLiveCall, VOICE_TYPED_ID_PREFIX, } from "./call-recap";
69
73
  export { canPersistDeepAgentSession, type DeepAgentPendingSession, type DeepAgentRunConfigRegistration, type DeepAgentSessionPersistence, type DeepAgentThreadElement, type DeepAgentThreadStateClientHost, logUnhandledStatewireError, useDeepAgentRuntime, type UseDeepAgentRuntimeOptions, } from "./use-deep-agent-runtime";
70
74
  export { type DeepAgentAttachSource, type DeepAgentHeadersResolver, readSessionPersisted, type RunningSnapshot, shouldNotifyRunningChange, useDeepAgentThread, type UseDeepAgentThreadOptions, } from "./use-deep-agent-thread";
71
75
  export { GITHUB_EVENT_SOURCE_KEY, type GithubWakeEvent, githubWakeEventLabel, githubWakeEventUrl, githubWakeMarkerText, githubWakeReference, isGithubWakeMessage, readGithubWakeEvent, } from "./github-wake-event";
72
76
  export { githubSubscriptionHeadline, isSubscriptionWakeMessage, readSubscriptionWakeEvent, SUBSCRIPTION_EVENT_KEY, type SubscriptionWakeChange, type SubscriptionWakeEvent, type SubscriptionWakeGithub, subscriptionPlaceWords, subscriptionWakeDetail, subscriptionWakeGithub, subscriptionWakeHeadline, } from "./subscription-wake-event";
73
77
  export { describeTerminationReason, readRuntimeMessageFromSourceMessages, readSoleRuntimeMessageKind, readTerminationReason, runtimeMessageMarkerText, TERMINATION_REASONS, type AthenaRuntimeMessage, type AthenaRuntimeMessageKind, type AthenaRuntimeMessageSeverity, type AthenaTerminationReason, type TerminationDescription, } from "./runtime-messages";
74
- export { buildHandoffQrSvg, buildMobileHandoffSchemeUrl, classifyHandoffTransportError, type CreateThreadHandoffInput, type CreateThreadHandoffResponse, createThreadHandoffResponseSchema, describeHandoffTransportError, type DestinationReadiness, HANDOFF_DESTINATION_LABELS, HANDOFF_DESTINATIONS, HANDOFF_URL_PARAM, type HandoffDestination, type HandoffDestinationPresentation, type HandoffEnvironment, HandoffGoneError, type HandoffLaunch, type HandoffOutcome, HandoffPermanentError, type HandoffReadinessResponse, type HandoffReadinessState, type HandoffSource, type HandoffState, type HandoffTransportErrorKind, handoffHttpError, handoffReadinessResponseSchema, handoffStateSchema, isHandoffGoneError, isHandoffPermanentError, isRetryableHandoffHttpStatus, isOfficeHandoffDestination, isServerHandoffDestination, isTerminalHandoffState, type MobileHandoffLaunch, type MobileLaunchMode, mobileHandoffLaunchSchema, OFFICE_HANDOFF_DESTINATIONS, type OfficeHandoffDestination, type OfficeHandoffLaunch, officeHandoffLaunchSchema, parseHandoffIdParam, presentHandoffDestination, readinessByDestination, SERVER_HANDOFF_DESTINATIONS, type ServerHandoffDestination, selectMobileLaunchMode, type ThreadHandoffTransport, type ThreadHandoffView, threadHandoffViewSchema, waitForHandoffOutcome, type WaitForHandoffOutcomeOptions, } from "./thread-handoff";
75
- export { DEFAULT_MOBILE_HANDOFF_TIMEOUT_MS, DEFAULT_OFFICE_HANDOFF_TIMEOUT_MS, type StartThreadHandoffInput, type ThreadHandoffFlowCallbacks, type ThreadHandoffFlowController, type ThreadHandoffFlowPhase, useThreadHandoffFlow, type UseThreadHandoffFlowOptions, } from "./use-thread-handoff-flow";
78
+ export { buildHandoffQrSvg, buildMobileHandoffSchemeUrl, classifyHandoffTransportError, type CreateThreadHandoffInput, type CreateThreadHandoffResponse, createThreadHandoffResponseSchema, describeHandoffTransportError, type DestinationReadiness, HANDOFF_DESTINATION_LABELS, HANDOFF_DESTINATIONS, HANDOFF_URL_PARAM, type HandoffDestination, type HandoffDestinationPresentation, type HandoffEnvironment, HandoffGoneError, type HandoffLaunch, type HandoffOutcome, HandoffPermanentError, type HandoffReadinessResponse, type HandoffReadinessState, type HandoffSource, type HandoffState, type HandoffTransportErrorKind, handoffHttpError, handoffReadinessResponseSchema, handoffStateSchema, isHandoffGoneError, isHandoffPermanentError, isRetryableHandoffHttpStatus, isOfficeHandoffDestination, isServerHandoffDestination, isTerminalHandoffState, type MobileHandoffLaunch, type MobileLaunchMode, mobileHandoffLaunchSchema, OFFICE_HANDOFF_DESTINATIONS, type OfficeHandoffDestination, type OfficeHandoffLaunch, officeHandoffLaunchSchema, type OfficeInvitationLaunch, officeInvitationLaunchSchema, type OfficeLaunchMode, officeLaunchModeSchema, threadHandoffCreateBody, parseHandoffIdParam, presentHandoffDestination, readinessByDestination, SERVER_HANDOFF_DESTINATIONS, type ServerHandoffDestination, selectMobileLaunchMode, supportsDesktopHandoffSource, type ThreadHandoffTransport, type ThreadHandoffView, threadHandoffViewSchema, waitForHandoffOutcome, type WaitForHandoffOutcomeOptions, type ClaimThreadHandoffResponse, claimThreadHandoffResponseSchema, clampHandoffDraft, handoffDraftToCarry, continuedFromLabel, pickUpFromLabel, pickUpOfferLabel, type DesktopThreadHandoffLaunch, desktopThreadHandoffLaunchSchema, driverSurfaceForChannel, drivingOnLabel, type HandoffLanding, handoffLandingFromView, isPickupSurface, MAX_HANDOFF_DRAFT_LENGTH, nextHandoffLaunchSchema, parseThreadHandoffCreateResponse, pendingThreadHandoffResponseSchema, pickedUpOnLabel, PICKUP_SURFACES, type PickupSurface, shouldOfferPendingHandoff, SPACES_HANDOFF_URL_PARAM, type SpacesHandoffLaunch, spacesHandoffLaunchSchema, SURFACE_HANDOFF_DESTINATIONS, type SurfaceHandoffDestination, supportsSurfaceHandoffDestinations, THREAD_HANDOFF_DESTINATION_LABELS, THREAD_HANDOFF_DESTINATIONS, threadHandoffClaimBody, threadHandoffCreateRequest, type ThreadHandoffDestination, type ThreadHandoffReceiverTransport, MAX_PENDING_EXCLUDE, pendingExcludeIds, pickupExcludeIds, pendingHandoffPath, type HandoffMode, handoffModeSchema, isVoiceHandoffDestination, livenessAgo, presentSurfaceLiveness, type SurfaceLiveness, type SurfaceLivenessBasis, surfaceLivenessBasisSchema, surfaceLivenessBySurface, type SurfaceLivenessPresentation, surfaceLivenessSchema, type SurfaceLivenessState, surfaceLivenessStateSchema, type SurfaceLivenessTone, supportsSurfaceLiveness, } from "./thread-handoff";
79
+ export { DEFAULT_MOBILE_HANDOFF_TIMEOUT_MS, DEFAULT_OFFICE_HANDOFF_TIMEOUT_MS, DEFAULT_PICKUP_HANDOFF_TIMEOUT_MS, type StartThreadHandoffInput, type ThreadHandoffFlowCallbacks, type ThreadHandoffFlowController, type ThreadHandoffFlowPhase, useThreadHandoffFlow, type UseThreadHandoffFlowOptions, } from "./use-thread-handoff-flow";
80
+ export { anchorHandoffArrival, clearHandoffArrival, type HandoffArrival, HandoffArrivalContext, MAX_HANDOFF_ARRIVALS, readHandoffArrival, recordHandoffArrival, resetHandoffArrivalsForTests, subscribeHandoffArrivals, useHandoffArrival, useHandoffArrivalAfter, } from "./handoff-arrival";
81
+ export { connectVoiceMedia, VOICE_MICROPHONE_CAPTURE } from './voice-media';
82
+ export type { VoiceMediaDriver, VoiceMediaEvent, VoiceMediaEventType, VoiceMediaHandlers, VoiceMediaSession, } from './voice-media';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const react = require("react");
3
+ const require$$0 = require("react");
4
4
  const clientTools = require("./client-tools.cjs");
5
5
  const errors = require("./errors.cjs");
6
6
  const statewireState = require("./statewire-state.cjs");
@@ -36,6 +36,11 @@ const APPROVAL_WARNING_SEVERITIES = /* @__PURE__ */ new Set(["info", "warning",
36
36
  function isNullableString(value) {
37
37
  return value === null || typeof value === "string";
38
38
  }
39
+ function displayText(value) {
40
+ if (typeof value !== "string") return void 0;
41
+ const text = value.trim();
42
+ return text.length > 0 ? text : void 0;
43
+ }
39
44
  function isStringArray(value) {
40
45
  return Array.isArray(value) && value.every((entry) => typeof entry === "string");
41
46
  }
@@ -65,8 +70,16 @@ function parsePendingApprovalContext(value) {
65
70
  const severity = typeof warning.severity === "string" && APPROVAL_WARNING_SEVERITIES.has(warning.severity) ? warning.severity : "info";
66
71
  return [{ severity, message: warning.message }];
67
72
  }) : [];
73
+ const headline = displayText(value.headline);
74
+ const summary = displayText(value.summary);
68
75
  const slackTarget = parsePendingApprovalSlackTarget(value.slack_target);
69
- return facts.length > 0 || warnings.length > 0 || slackTarget ? { facts, warnings, ...slackTarget ? { slack_target: slackTarget } : {} } : void 0;
76
+ return facts.length > 0 || warnings.length > 0 || headline || summary || slackTarget ? {
77
+ facts,
78
+ warnings,
79
+ ...headline ? { headline } : {},
80
+ ...summary ? { summary } : {},
81
+ ...slackTarget ? { slack_target: slackTarget } : {}
82
+ } : void 0;
70
83
  }
71
84
  function pendingActionRequests(hitl) {
72
85
  const context = hitl == null ? void 0 : hitl.context;
@@ -85,6 +98,19 @@ function pendingActionRequests(hitl) {
85
98
  };
86
99
  });
87
100
  }
101
+ function pendingApprovalTitle({
102
+ hitl,
103
+ actionRequests
104
+ }) {
105
+ var _a, _b;
106
+ const [call, ...others] = actionRequests;
107
+ if (hitl === null || call === void 0 || others.length > 0) return void 0;
108
+ const pendingCount = (_a = hitl.context) == null ? void 0 : _a.pending_action_count;
109
+ if (pendingCount !== void 0 && pendingCount !== 1) return void 0;
110
+ const envelope = call.approvalContext ?? parsePendingApprovalContext((_b = hitl.context) == null ? void 0 : _b.approval_context);
111
+ if ((envelope == null ? void 0 : envelope.headline) === void 0) return void 0;
112
+ return envelope.summary === void 0 ? { headline: envelope.headline } : { headline: envelope.headline, summary: envelope.summary };
113
+ }
88
114
  function canApproveForSession(actionRequests) {
89
115
  return actionRequests.length > 0 && actionRequests.every((request) => request.sessionApprovalAllowed === true);
90
116
  }
@@ -171,6 +197,30 @@ function hitlResumeActionDecisions(decisions) {
171
197
  action_decisions: decisions
172
198
  };
173
199
  }
200
+ const NON_APPROVING_ACTIONS = /* @__PURE__ */ new Set(["reject", "timeout"]);
201
+ function resumeValueApproves(value) {
202
+ if (!isRecord(value)) return true;
203
+ const decisions = value.decisions;
204
+ if (Array.isArray(decisions)) {
205
+ return decisions.length === 0 || decisions.some(resumeValueApproves);
206
+ }
207
+ const perAction = value.action_decisions;
208
+ if (perAction !== void 0) {
209
+ if (!isRecord(perAction)) return true;
210
+ const answers = Object.values(perAction);
211
+ return answers.length === 0 || answers.some(resumeValueApproves);
212
+ }
213
+ const lanes = value.lane_decisions;
214
+ if (lanes !== void 0) {
215
+ if (!isRecord(lanes)) return true;
216
+ const answers = Object.values(lanes);
217
+ return answers.length === 0 || answers.some(resumeValueApproves);
218
+ }
219
+ const kind = value.type;
220
+ if (typeof kind === "string") return !NON_APPROVING_ACTIONS.has(kind);
221
+ const action = value.action;
222
+ return typeof action !== "string" || !NON_APPROVING_ACTIONS.has(action);
223
+ }
174
224
  const INTERRUPT_DECLINE_REASON = "User declined the request.";
175
225
  function interruptResumeDecline(reason = INTERRUPT_DECLINE_REASON) {
176
226
  return { action: "reject", reason };
@@ -185,15 +235,15 @@ function useApprovalResumeLock(options) {
185
235
  onResumeRetry,
186
236
  maxTransportRetries = HITL_RESUME_TRANSPORT_RETRIES
187
237
  } = options;
188
- const [pending, setPending] = react.useState(false);
189
- const [attempt, setAttempt] = react.useState(0);
190
- const prevRequestIdRef = react.useRef(requestId);
238
+ const [pending, setPending] = require$$0.useState(false);
239
+ const [attempt, setAttempt] = require$$0.useState(0);
240
+ const prevRequestIdRef = require$$0.useRef(requestId);
191
241
  if (prevRequestIdRef.current !== requestId) {
192
242
  prevRequestIdRef.current = requestId;
193
243
  if (pending) setPending(false);
194
244
  }
195
- const sawResumeRunRef = react.useRef(false);
196
- react.useEffect(() => {
245
+ const sawResumeRunRef = require$$0.useRef(false);
246
+ require$$0.useEffect(() => {
197
247
  if (!pending) {
198
248
  sawResumeRunRef.current = false;
199
249
  return;
@@ -207,34 +257,34 @@ function useApprovalResumeLock(options) {
207
257
  setPending(false);
208
258
  }
209
259
  }, [pending, isRunning]);
210
- react.useEffect(() => {
260
+ require$$0.useEffect(() => {
211
261
  if (!pending || pendingResumeGraceMs === void 0) return;
212
262
  const timer = setTimeout(() => {
213
263
  if (!sawResumeRunRef.current) setPending(false);
214
264
  }, pendingResumeGraceMs);
215
265
  return () => clearTimeout(timer);
216
266
  }, [pending, requestId, pendingResumeGraceMs, attempt]);
217
- const sendResumeRef = react.useRef(sendResume);
267
+ const sendResumeRef = require$$0.useRef(sendResume);
218
268
  sendResumeRef.current = sendResume;
219
- const onResumeRejectedRef = react.useRef(onResumeRejected);
269
+ const onResumeRejectedRef = require$$0.useRef(onResumeRejected);
220
270
  onResumeRejectedRef.current = onResumeRejected;
221
- const onResumeRetryRef = react.useRef(onResumeRetry);
271
+ const onResumeRetryRef = require$$0.useRef(onResumeRetry);
222
272
  onResumeRetryRef.current = onResumeRetry;
223
- const maxTransportRetriesRef = react.useRef(maxTransportRetries);
273
+ const maxTransportRetriesRef = require$$0.useRef(maxTransportRetries);
224
274
  maxTransportRetriesRef.current = maxTransportRetries;
225
- const currentRequestIdRef = react.useRef(requestId);
275
+ const currentRequestIdRef = require$$0.useRef(requestId);
226
276
  currentRequestIdRef.current = requestId;
227
- const pendingRef = react.useRef(pending);
277
+ const pendingRef = require$$0.useRef(pending);
228
278
  pendingRef.current = pending;
229
- const submissionRef = react.useRef(0);
230
- const resume = react.useCallback(
231
- (value) => {
279
+ const submissionRef = require$$0.useRef(0);
280
+ const resume = require$$0.useCallback(
281
+ (value, extras) => {
232
282
  if (requestId === void 0 || pendingRef.current) return void 0;
233
283
  const submission = ++submissionRef.current;
234
284
  setPending(true);
235
285
  pendingRef.current = true;
236
286
  setAttempt(0);
237
- const first = sendResumeRef.current(requestId, value);
287
+ const first = sendResumeRef.current(requestId, value, extras);
238
288
  if (!(first instanceof Promise)) return void 0;
239
289
  const outcome = new Promise((resolve, reject) => {
240
290
  const settle = (dispatched, retries) => {
@@ -251,7 +301,7 @@ function useApprovalResumeLock(options) {
251
301
  setPending(true);
252
302
  pendingRef.current = true;
253
303
  setAttempt(next);
254
- const resent = sendResumeRef.current(requestId, value);
304
+ const resent = sendResumeRef.current(requestId, value, extras);
255
305
  if (resent instanceof Promise) {
256
306
  settle(resent, next);
257
307
  return;
@@ -298,10 +348,12 @@ exports.isSystemPauseInterrupt = isSystemPauseInterrupt;
298
348
  exports.laneInterruptIds = laneInterruptIds;
299
349
  exports.parsePendingApprovalContext = parsePendingApprovalContext;
300
350
  exports.pendingActionRequests = pendingActionRequests;
351
+ exports.pendingApprovalTitle = pendingApprovalTitle;
301
352
  exports.readAbandonedInputRequests = readAbandonedInputRequests;
302
353
  exports.readInterruptMessage = readInterruptMessage;
303
354
  exports.readInterruptMirror = readInterruptMirror;
304
355
  exports.readQueuedLaneDecisions = readQueuedLaneDecisions;
356
+ exports.resumeValueApproves = resumeValueApproves;
305
357
  exports.toolCallIdsAwaitingApproval = toolCallIdsAwaitingApproval;
306
358
  exports.useApprovalResumeLock = useApprovalResumeLock;
307
359
  //# sourceMappingURL=interrupts.cjs.map