@athenaintel/react 0.57.2 → 0.59.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 (799) hide show
  1. package/README.md +759 -9
  2. package/dist/agent-runtime/src/addressed-agents.cjs +16 -0
  3. package/dist/agent-runtime/src/addressed-agents.cjs.map +1 -0
  4. package/dist/agent-runtime/src/addressed-agents.d.ts +30 -0
  5. package/dist/agent-runtime/src/addressed-agents.js +16 -0
  6. package/dist/agent-runtime/src/addressed-agents.js.map +1 -0
  7. package/dist/agent-runtime/src/answer-label.cjs +4 -3
  8. package/dist/agent-runtime/src/answer-label.cjs.map +1 -1
  9. package/dist/agent-runtime/src/answer-label.d.ts +13 -6
  10. package/dist/agent-runtime/src/answer-label.js +4 -3
  11. package/dist/agent-runtime/src/answer-label.js.map +1 -1
  12. package/dist/agent-runtime/src/chat-outbox-attachments.cjs.map +1 -1
  13. package/dist/agent-runtime/src/chat-outbox-attachments.d.ts +1 -1
  14. package/dist/agent-runtime/src/chat-outbox-attachments.js.map +1 -1
  15. package/dist/agent-runtime/src/chat-outbox-entry.cjs +101 -0
  16. package/dist/agent-runtime/src/chat-outbox-entry.cjs.map +1 -0
  17. package/dist/agent-runtime/src/chat-outbox-entry.d.ts +99 -0
  18. package/dist/agent-runtime/src/chat-outbox-entry.js +101 -0
  19. package/dist/agent-runtime/src/chat-outbox-entry.js.map +1 -0
  20. package/dist/agent-runtime/src/chat-outbox-legacy.cjs +252 -0
  21. package/dist/agent-runtime/src/chat-outbox-legacy.cjs.map +1 -0
  22. package/dist/agent-runtime/src/chat-outbox-legacy.d.ts +96 -0
  23. package/dist/agent-runtime/src/chat-outbox-legacy.js +252 -0
  24. package/dist/agent-runtime/src/chat-outbox-legacy.js.map +1 -0
  25. package/dist/agent-runtime/src/chat-outbox-policy.cjs +30 -0
  26. package/dist/agent-runtime/src/chat-outbox-policy.cjs.map +1 -0
  27. package/dist/agent-runtime/src/chat-outbox-policy.d.ts +42 -0
  28. package/dist/agent-runtime/src/chat-outbox-policy.js +30 -0
  29. package/dist/agent-runtime/src/chat-outbox-policy.js.map +1 -0
  30. package/dist/agent-runtime/src/chat-outbox-storage.cjs +306 -0
  31. package/dist/agent-runtime/src/chat-outbox-storage.cjs.map +1 -0
  32. package/dist/agent-runtime/src/chat-outbox-storage.d.ts +194 -0
  33. package/dist/agent-runtime/src/chat-outbox-storage.js +306 -0
  34. package/dist/agent-runtime/src/chat-outbox-storage.js.map +1 -0
  35. package/dist/agent-runtime/src/chat-outbox-thread.cjs +21 -94
  36. package/dist/agent-runtime/src/chat-outbox-thread.cjs.map +1 -1
  37. package/dist/agent-runtime/src/chat-outbox-thread.d.ts +22 -18
  38. package/dist/agent-runtime/src/chat-outbox-thread.js +21 -94
  39. package/dist/agent-runtime/src/chat-outbox-thread.js.map +1 -1
  40. package/dist/agent-runtime/src/chat-outbox.cjs +492 -547
  41. package/dist/agent-runtime/src/chat-outbox.cjs.map +1 -1
  42. package/dist/agent-runtime/src/chat-outbox.d.ts +110 -142
  43. package/dist/agent-runtime/src/chat-outbox.js +492 -547
  44. package/dist/agent-runtime/src/chat-outbox.js.map +1 -1
  45. package/dist/agent-runtime/src/composer-markdown.cjs.map +1 -1
  46. package/dist/agent-runtime/src/composer-markdown.d.ts +1 -1
  47. package/dist/agent-runtime/src/composer-markdown.js.map +1 -1
  48. package/dist/agent-runtime/src/deep-agent-transport-recipe.cjs +3 -1
  49. package/dist/agent-runtime/src/deep-agent-transport-recipe.cjs.map +1 -1
  50. package/dist/agent-runtime/src/deep-agent-transport-recipe.d.ts +8 -1
  51. package/dist/agent-runtime/src/deep-agent-transport-recipe.js +3 -1
  52. package/dist/agent-runtime/src/deep-agent-transport-recipe.js.map +1 -1
  53. package/dist/agent-runtime/src/dictation-preferences.d.ts +356 -0
  54. package/dist/agent-runtime/src/dictation-record.d.ts +279 -0
  55. package/dist/agent-runtime/src/dictation-session.d.ts +106 -7
  56. package/dist/agent-runtime/src/dictation-snippets.d.ts +9 -0
  57. package/dist/agent-runtime/src/dictation-transfer.d.ts +142 -0
  58. package/dist/agent-runtime/src/edit-command.cjs.map +1 -1
  59. package/dist/agent-runtime/src/edit-command.d.ts +1 -1
  60. package/dist/agent-runtime/src/edit-command.js.map +1 -1
  61. package/dist/agent-runtime/src/errors.cjs +1 -0
  62. package/dist/agent-runtime/src/errors.cjs.map +1 -1
  63. package/dist/agent-runtime/src/errors.js +1 -0
  64. package/dist/agent-runtime/src/errors.js.map +1 -1
  65. package/dist/agent-runtime/src/generated/runconfig-contract.cjs +24 -0
  66. package/dist/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
  67. package/dist/agent-runtime/src/generated/runconfig-contract.d.ts +3 -3
  68. package/dist/agent-runtime/src/generated/runconfig-contract.js +24 -0
  69. package/dist/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
  70. package/dist/agent-runtime/src/index.d.ts +14 -8
  71. package/dist/agent-runtime/src/lane-follow.cjs +289 -0
  72. package/dist/agent-runtime/src/lane-follow.cjs.map +1 -0
  73. package/dist/agent-runtime/src/lane-follow.js +289 -0
  74. package/dist/agent-runtime/src/lane-follow.js.map +1 -0
  75. package/dist/agent-runtime/src/lane-images.cjs +387 -0
  76. package/dist/agent-runtime/src/lane-images.cjs.map +1 -0
  77. package/dist/agent-runtime/src/lane-images.js +387 -0
  78. package/dist/agent-runtime/src/lane-images.js.map +1 -0
  79. package/dist/agent-runtime/src/message-window.js +1 -1
  80. package/dist/agent-runtime/src/messages.cjs +19 -1
  81. package/dist/agent-runtime/src/messages.cjs.map +1 -1
  82. package/dist/agent-runtime/src/messages.d.ts +8 -0
  83. package/dist/agent-runtime/src/messages.js +21 -3
  84. package/dist/agent-runtime/src/messages.js.map +1 -1
  85. package/dist/agent-runtime/src/named-agents.cjs +301 -0
  86. package/dist/agent-runtime/src/named-agents.cjs.map +1 -0
  87. package/dist/agent-runtime/src/named-agents.d.ts +246 -0
  88. package/dist/agent-runtime/src/named-agents.js +301 -0
  89. package/dist/agent-runtime/src/named-agents.js.map +1 -0
  90. package/dist/agent-runtime/src/offline-status.cjs.map +1 -1
  91. package/dist/agent-runtime/src/offline-status.d.ts +66 -2
  92. package/dist/agent-runtime/src/offline-status.js.map +1 -1
  93. package/dist/agent-runtime/src/ptc-subcalls.cjs +41 -0
  94. package/dist/agent-runtime/src/ptc-subcalls.cjs.map +1 -0
  95. package/dist/agent-runtime/src/ptc-subcalls.js +41 -0
  96. package/dist/agent-runtime/src/ptc-subcalls.js.map +1 -0
  97. package/dist/agent-runtime/src/queue.cjs +2 -2
  98. package/dist/agent-runtime/src/queue.cjs.map +1 -1
  99. package/dist/agent-runtime/src/queue.d.ts +20 -25
  100. package/dist/agent-runtime/src/queue.js +2 -2
  101. package/dist/agent-runtime/src/queue.js.map +1 -1
  102. package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs +314 -84
  103. package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -1
  104. package/dist/agent-runtime/src/quota-safe-local-storage-session.d.ts +137 -40
  105. package/dist/agent-runtime/src/quota-safe-local-storage-session.js +318 -88
  106. package/dist/agent-runtime/src/quota-safe-local-storage-session.js.map +1 -1
  107. package/dist/agent-runtime/src/run-send.cjs +54 -0
  108. package/dist/agent-runtime/src/run-send.cjs.map +1 -0
  109. package/dist/agent-runtime/src/run-send.d.ts +51 -0
  110. package/dist/agent-runtime/src/run-send.js +54 -0
  111. package/dist/agent-runtime/src/run-send.js.map +1 -0
  112. package/dist/agent-runtime/src/running-tool-placeholder.cjs +6 -0
  113. package/dist/agent-runtime/src/running-tool-placeholder.cjs.map +1 -1
  114. package/dist/agent-runtime/src/running-tool-placeholder.js +6 -0
  115. package/dist/agent-runtime/src/running-tool-placeholder.js.map +1 -1
  116. package/dist/agent-runtime/src/runtime.d.ts +9 -5
  117. package/dist/agent-runtime/src/sealed-idb.cjs +64 -0
  118. package/dist/agent-runtime/src/sealed-idb.cjs.map +1 -1
  119. package/dist/agent-runtime/src/sealed-idb.d.ts +16 -0
  120. package/dist/agent-runtime/src/sealed-idb.js +64 -0
  121. package/dist/agent-runtime/src/sealed-idb.js.map +1 -1
  122. package/dist/agent-runtime/src/send-recovery.cjs +90 -118
  123. package/dist/agent-runtime/src/send-recovery.cjs.map +1 -1
  124. package/dist/agent-runtime/src/send-recovery.d.ts +25 -29
  125. package/dist/agent-runtime/src/send-recovery.js +90 -118
  126. package/dist/agent-runtime/src/send-recovery.js.map +1 -1
  127. package/dist/agent-runtime/src/statewire-diagnostics.d.ts +4 -1
  128. package/dist/agent-runtime/src/statewire-held-sends.cjs +191 -0
  129. package/dist/agent-runtime/src/statewire-held-sends.cjs.map +1 -0
  130. package/dist/agent-runtime/src/statewire-held-sends.d.ts +119 -0
  131. package/dist/agent-runtime/src/statewire-held-sends.js +191 -0
  132. package/dist/agent-runtime/src/statewire-held-sends.js.map +1 -0
  133. package/dist/agent-runtime/src/statewire-state.cjs +4 -0
  134. package/dist/agent-runtime/src/statewire-state.cjs.map +1 -1
  135. package/dist/agent-runtime/src/statewire-state.js +4 -0
  136. package/dist/agent-runtime/src/statewire-state.js.map +1 -1
  137. package/dist/agent-runtime/src/statewire-transport.cjs +8 -2
  138. package/dist/agent-runtime/src/statewire-transport.cjs.map +1 -1
  139. package/dist/agent-runtime/src/statewire-transport.d.ts +14 -5
  140. package/dist/agent-runtime/src/statewire-transport.js +8 -2
  141. package/dist/agent-runtime/src/statewire-transport.js.map +1 -1
  142. package/dist/agent-runtime/src/subagent-transcripts.cjs +1 -23
  143. package/dist/agent-runtime/src/subagent-transcripts.cjs.map +1 -1
  144. package/dist/agent-runtime/src/subagent-transcripts.js +3 -25
  145. package/dist/agent-runtime/src/subagent-transcripts.js.map +1 -1
  146. package/dist/agent-runtime/src/subagents.cjs +22 -29
  147. package/dist/agent-runtime/src/subagents.cjs.map +1 -1
  148. package/dist/agent-runtime/src/subagents.js +23 -30
  149. package/dist/agent-runtime/src/subagents.js.map +1 -1
  150. package/dist/agent-runtime/src/thread-extras.cjs +27 -19
  151. package/dist/agent-runtime/src/thread-extras.cjs.map +1 -1
  152. package/dist/agent-runtime/src/thread-extras.d.ts +19 -6
  153. package/dist/agent-runtime/src/thread-extras.js +27 -19
  154. package/dist/agent-runtime/src/thread-extras.js.map +1 -1
  155. package/dist/agent-runtime/src/thread-handoff-flow-machine.d.ts +8 -8
  156. package/dist/agent-runtime/src/tool-metadata.cjs +12 -0
  157. package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -1
  158. package/dist/agent-runtime/src/tool-metadata.js +12 -0
  159. package/dist/agent-runtime/src/tool-metadata.js.map +1 -1
  160. package/dist/agent-runtime/src/tool-names.cjs +21 -0
  161. package/dist/agent-runtime/src/tool-names.cjs.map +1 -1
  162. package/dist/agent-runtime/src/tool-names.d.ts +8 -0
  163. package/dist/agent-runtime/src/tool-names.js +21 -0
  164. package/dist/agent-runtime/src/tool-names.js.map +1 -1
  165. package/dist/agent-runtime/src/typed-interrupt-kinds.cjs +247 -0
  166. package/dist/agent-runtime/src/typed-interrupt-kinds.cjs.map +1 -0
  167. package/dist/agent-runtime/src/typed-interrupt-kinds.d.ts +173 -0
  168. package/dist/agent-runtime/src/typed-interrupt-kinds.js +247 -0
  169. package/dist/agent-runtime/src/typed-interrupt-kinds.js.map +1 -0
  170. package/dist/agent-runtime/src/typed-interrupts.cjs +48 -0
  171. package/dist/agent-runtime/src/typed-interrupts.cjs.map +1 -0
  172. package/dist/agent-runtime/src/typed-interrupts.d.ts +75 -0
  173. package/dist/agent-runtime/src/typed-interrupts.js +48 -0
  174. package/dist/agent-runtime/src/typed-interrupts.js.map +1 -0
  175. package/dist/agent-runtime/src/types.d.ts +1 -1
  176. package/dist/agent-runtime/src/use-conversation-list.cjs +1 -0
  177. package/dist/agent-runtime/src/use-conversation-list.cjs.map +1 -1
  178. package/dist/agent-runtime/src/use-conversation-list.d.ts +7 -0
  179. package/dist/agent-runtime/src/use-conversation-list.js +1 -0
  180. package/dist/agent-runtime/src/use-conversation-list.js.map +1 -1
  181. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs +46 -29
  182. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs.map +1 -1
  183. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.d.ts +14 -22
  184. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js +46 -29
  185. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js.map +1 -1
  186. package/dist/agent-runtime/src/use-deep-agent-runtime.cjs +78 -14
  187. package/dist/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -1
  188. package/dist/agent-runtime/src/use-deep-agent-runtime.d.ts +34 -7
  189. package/dist/agent-runtime/src/use-deep-agent-runtime.js +79 -15
  190. package/dist/agent-runtime/src/use-deep-agent-runtime.js.map +1 -1
  191. package/dist/agent-runtime/src/use-deep-agent-thread.cjs +16 -1
  192. package/dist/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
  193. package/dist/agent-runtime/src/use-deep-agent-thread.d.ts +7 -2
  194. package/dist/agent-runtime/src/use-deep-agent-thread.js +16 -1
  195. package/dist/agent-runtime/src/use-deep-agent-thread.js.map +1 -1
  196. package/dist/agent-runtime/src/use-deep-agent-voice.cjs +30 -4
  197. package/dist/agent-runtime/src/use-deep-agent-voice.cjs.map +1 -1
  198. package/dist/agent-runtime/src/use-deep-agent-voice.d.ts +22 -4
  199. package/dist/agent-runtime/src/use-deep-agent-voice.js +30 -4
  200. package/dist/agent-runtime/src/use-deep-agent-voice.js.map +1 -1
  201. package/dist/agent-runtime/src/withdrawn-turns.d.ts +5 -4
  202. package/dist/agent-runtime/src/word-device-fit.d.ts +174 -0
  203. package/dist/agent-runtime/src/work-in.d.ts +127 -0
  204. package/dist/assets/AthenaAssetEmbed.cjs.map +1 -1
  205. package/dist/assets/AthenaAssetEmbed.d.ts +6 -1
  206. package/dist/assets/AthenaAssetEmbed.js.map +1 -1
  207. package/dist/assets/asset-panel-store.cjs +13 -5
  208. package/dist/assets/asset-panel-store.cjs.map +1 -1
  209. package/dist/assets/asset-panel-store.d.ts +33 -2
  210. package/dist/assets/asset-panel-store.js +13 -5
  211. package/dist/assets/asset-panel-store.js.map +1 -1
  212. package/dist/auth/AthenaCredentialSourceContext.cjs +11 -0
  213. package/dist/auth/AthenaCredentialSourceContext.cjs.map +1 -1
  214. package/dist/auth/AthenaCredentialSourceContext.d.ts +6 -0
  215. package/dist/auth/AthenaCredentialSourceContext.js +11 -0
  216. package/dist/auth/AthenaCredentialSourceContext.js.map +1 -1
  217. package/dist/auth/account-identity.cjs +13 -2
  218. package/dist/auth/account-identity.cjs.map +1 -1
  219. package/dist/auth/account-identity.d.ts +9 -0
  220. package/dist/auth/account-identity.js +13 -2
  221. package/dist/auth/account-identity.js.map +1 -1
  222. package/dist/auth/credential-source.cjs +20 -4
  223. package/dist/auth/credential-source.cjs.map +1 -1
  224. package/dist/auth/credential-source.d.ts +9 -0
  225. package/dist/auth/credential-source.js +20 -4
  226. package/dist/auth/credential-source.js.map +1 -1
  227. package/dist/catalog/chat-pickers.cjs +31 -0
  228. package/dist/catalog/chat-pickers.cjs.map +1 -1
  229. package/dist/catalog/chat-pickers.d.ts +17 -0
  230. package/dist/catalog/chat-pickers.js +33 -2
  231. package/dist/catalog/chat-pickers.js.map +1 -1
  232. package/dist/catalog/runtime-catalog.cjs +63 -3
  233. package/dist/catalog/runtime-catalog.cjs.map +1 -1
  234. package/dist/catalog/runtime-catalog.d.ts +63 -3
  235. package/dist/catalog/runtime-catalog.js +64 -4
  236. package/dist/catalog/runtime-catalog.js.map +1 -1
  237. package/dist/chat/AthenaChat.cjs +290 -97
  238. package/dist/chat/AthenaChat.cjs.map +1 -1
  239. package/dist/chat/AthenaChat.d.ts +80 -4
  240. package/dist/chat/AthenaChat.js +290 -97
  241. package/dist/chat/AthenaChat.js.map +1 -1
  242. package/dist/chat/StatewireApprovalCard.cjs +35 -5
  243. package/dist/chat/StatewireApprovalCard.cjs.map +1 -1
  244. package/dist/chat/StatewireApprovalCard.d.ts +55 -2
  245. package/dist/chat/StatewireApprovalCard.js +37 -7
  246. package/dist/chat/StatewireApprovalCard.js.map +1 -1
  247. package/dist/chat/StatewireQueuedMessages.cjs +17 -2
  248. package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
  249. package/dist/chat/StatewireQueuedMessages.d.ts +8 -45
  250. package/dist/chat/StatewireQueuedMessages.js +18 -3
  251. package/dist/chat/StatewireQueuedMessages.js.map +1 -1
  252. package/dist/chat/chat-agent-mentions.cjs +70 -0
  253. package/dist/chat/chat-agent-mentions.cjs.map +1 -0
  254. package/dist/chat/chat-agent-mentions.d.ts +13 -0
  255. package/dist/chat/chat-agent-mentions.js +70 -0
  256. package/dist/chat/chat-agent-mentions.js.map +1 -0
  257. package/dist/chat/composer-actions.cjs +12 -0
  258. package/dist/chat/composer-actions.cjs.map +1 -0
  259. package/dist/chat/composer-actions.d.ts +22 -0
  260. package/dist/chat/composer-actions.js +12 -0
  261. package/dist/chat/composer-actions.js.map +1 -0
  262. package/dist/chat/follow-up-suggestions.cjs +185 -0
  263. package/dist/chat/follow-up-suggestions.cjs.map +1 -0
  264. package/dist/chat/follow-up-suggestions.d.ts +64 -0
  265. package/dist/chat/follow-up-suggestions.js +185 -0
  266. package/dist/chat/follow-up-suggestions.js.map +1 -0
  267. package/dist/chat/super-grouping/ToolTimeline.cjs +4 -3
  268. package/dist/chat/super-grouping/ToolTimeline.cjs.map +1 -1
  269. package/dist/chat/super-grouping/ToolTimeline.d.ts +7 -3
  270. package/dist/chat/super-grouping/ToolTimeline.js +4 -3
  271. package/dist/chat/super-grouping/ToolTimeline.js.map +1 -1
  272. package/dist/chat/turn-changes.cjs +284 -0
  273. package/dist/chat/turn-changes.cjs.map +1 -0
  274. package/dist/chat/turn-changes.d.ts +130 -0
  275. package/dist/chat/turn-changes.js +284 -0
  276. package/dist/chat/turn-changes.js.map +1 -0
  277. package/dist/chat/typed-interrupts/StatewireTypedInterruptCard.cjs +31 -0
  278. package/dist/chat/typed-interrupts/StatewireTypedInterruptCard.cjs.map +1 -0
  279. package/dist/chat/typed-interrupts/StatewireTypedInterruptCard.d.ts +31 -0
  280. package/dist/chat/typed-interrupts/StatewireTypedInterruptCard.js +31 -0
  281. package/dist/chat/typed-interrupts/StatewireTypedInterruptCard.js.map +1 -0
  282. package/dist/chat/typed-interrupts/approval-cards.cjs +250 -0
  283. package/dist/chat/typed-interrupts/approval-cards.cjs.map +1 -0
  284. package/dist/chat/typed-interrupts/approval-cards.d.ts +22 -0
  285. package/dist/chat/typed-interrupts/approval-cards.js +250 -0
  286. package/dist/chat/typed-interrupts/approval-cards.js.map +1 -0
  287. package/dist/chat/typed-interrupts/form-cards.cjs +289 -0
  288. package/dist/chat/typed-interrupts/form-cards.cjs.map +1 -0
  289. package/dist/chat/typed-interrupts/form-cards.d.ts +6 -0
  290. package/dist/chat/typed-interrupts/form-cards.js +289 -0
  291. package/dist/chat/typed-interrupts/form-cards.js.map +1 -0
  292. package/dist/chat/typed-interrupts/interrupt-card-shell.cjs +182 -0
  293. package/dist/chat/typed-interrupts/interrupt-card-shell.cjs.map +1 -0
  294. package/dist/chat/typed-interrupts/interrupt-card-shell.d.ts +47 -0
  295. package/dist/chat/typed-interrupts/interrupt-card-shell.js +182 -0
  296. package/dist/chat/typed-interrupts/interrupt-card-shell.js.map +1 -0
  297. package/dist/chat/typed-interrupts/json-schema-form.cjs +388 -0
  298. package/dist/chat/typed-interrupts/json-schema-form.cjs.map +1 -0
  299. package/dist/chat/typed-interrupts/json-schema-form.d.ts +33 -0
  300. package/dist/chat/typed-interrupts/json-schema-form.js +388 -0
  301. package/dist/chat/typed-interrupts/json-schema-form.js.map +1 -0
  302. package/dist/chat/typed-interrupts/questionnaire-card.cjs +449 -0
  303. package/dist/chat/typed-interrupts/questionnaire-card.cjs.map +1 -0
  304. package/dist/chat/typed-interrupts/questionnaire-card.d.ts +20 -0
  305. package/dist/chat/typed-interrupts/questionnaire-card.js +449 -0
  306. package/dist/chat/typed-interrupts/questionnaire-card.js.map +1 -0
  307. package/dist/chat/typed-interrupts/request-file-card.cjs +159 -0
  308. package/dist/chat/typed-interrupts/request-file-card.cjs.map +1 -0
  309. package/dist/chat/typed-interrupts/request-file-card.d.ts +2 -0
  310. package/dist/chat/typed-interrupts/request-file-card.js +159 -0
  311. package/dist/chat/typed-interrupts/request-file-card.js.map +1 -0
  312. package/dist/chat/typed-interrupts/toolkit-selection-card.cjs +189 -0
  313. package/dist/chat/typed-interrupts/toolkit-selection-card.cjs.map +1 -0
  314. package/dist/chat/typed-interrupts/toolkit-selection-card.d.ts +23 -0
  315. package/dist/chat/typed-interrupts/toolkit-selection-card.js +189 -0
  316. package/dist/chat/typed-interrupts/toolkit-selection-card.js.map +1 -0
  317. package/dist/chat/typed-interrupts/typed-interrupt-body.cjs +26 -0
  318. package/dist/chat/typed-interrupts/typed-interrupt-body.cjs.map +1 -0
  319. package/dist/chat/typed-interrupts/typed-interrupt-body.d.ts +3 -0
  320. package/dist/chat/typed-interrupts/typed-interrupt-body.js +26 -0
  321. package/dist/chat/typed-interrupts/typed-interrupt-body.js.map +1 -0
  322. package/dist/chat/typed-interrupts/typed-interrupt-graphql.cjs +105 -0
  323. package/dist/chat/typed-interrupts/typed-interrupt-graphql.cjs.map +1 -0
  324. package/dist/chat/typed-interrupts/typed-interrupt-graphql.d.ts +29 -0
  325. package/dist/chat/typed-interrupts/typed-interrupt-graphql.js +105 -0
  326. package/dist/chat/typed-interrupts/typed-interrupt-graphql.js.map +1 -0
  327. package/dist/chat/typed-interrupts/typed-interrupt-notice.cjs +70 -0
  328. package/dist/chat/typed-interrupts/typed-interrupt-notice.cjs.map +1 -0
  329. package/dist/chat/typed-interrupts/typed-interrupt-notice.d.ts +45 -0
  330. package/dist/chat/typed-interrupts/typed-interrupt-notice.js +70 -0
  331. package/dist/chat/typed-interrupts/typed-interrupt-notice.js.map +1 -0
  332. package/dist/chat/typed-interrupts/typed-interrupt-panel.cjs +76 -0
  333. package/dist/chat/typed-interrupts/typed-interrupt-panel.cjs.map +1 -0
  334. package/dist/chat/typed-interrupts/typed-interrupt-panel.d.ts +11 -0
  335. package/dist/chat/typed-interrupts/typed-interrupt-panel.js +76 -0
  336. package/dist/chat/typed-interrupts/typed-interrupt-panel.js.map +1 -0
  337. package/dist/chat/typed-interrupts/typed-interrupt-types.d.ts +46 -0
  338. package/dist/chat/typed-interrupts/use-interrupt-draft.cjs +106 -0
  339. package/dist/chat/typed-interrupts/use-interrupt-draft.cjs.map +1 -0
  340. package/dist/chat/typed-interrupts/use-interrupt-draft.d.ts +29 -0
  341. package/dist/chat/typed-interrupts/use-interrupt-draft.js +106 -0
  342. package/dist/chat/typed-interrupts/use-interrupt-draft.js.map +1 -0
  343. package/dist/chat/typed-interrupts/use-statewire-typed-interrupt.cjs +231 -0
  344. package/dist/chat/typed-interrupts/use-statewire-typed-interrupt.cjs.map +1 -0
  345. package/dist/chat/typed-interrupts/use-statewire-typed-interrupt.d.ts +66 -0
  346. package/dist/chat/typed-interrupts/use-statewire-typed-interrupt.js +231 -0
  347. package/dist/chat/typed-interrupts/use-statewire-typed-interrupt.js.map +1 -0
  348. package/dist/chat-ui/composer/composer-named-agents.cjs +13 -0
  349. package/dist/chat-ui/composer/composer-named-agents.cjs.map +1 -0
  350. package/dist/chat-ui/composer/composer-named-agents.d.ts +20 -0
  351. package/dist/chat-ui/composer/composer-named-agents.js +13 -0
  352. package/dist/chat-ui/composer/composer-named-agents.js.map +1 -0
  353. package/dist/chat-ui/composer/slash-command-menu.cjs +143 -0
  354. package/dist/chat-ui/composer/slash-command-menu.cjs.map +1 -0
  355. package/dist/chat-ui/composer/slash-command-menu.d.ts +19 -0
  356. package/dist/chat-ui/composer/slash-command-menu.js +143 -0
  357. package/dist/chat-ui/composer/slash-command-menu.js.map +1 -0
  358. package/dist/chat-ui/composer/slash-commands-extension.cjs +51 -0
  359. package/dist/chat-ui/composer/slash-commands-extension.cjs.map +1 -0
  360. package/dist/chat-ui/composer/slash-commands-extension.d.ts +39 -0
  361. package/dist/chat-ui/composer/slash-commands-extension.js +51 -0
  362. package/dist/chat-ui/composer/slash-commands-extension.js.map +1 -0
  363. package/dist/chat-ui/composer/slash-commands.cjs +74 -0
  364. package/dist/chat-ui/composer/slash-commands.cjs.map +1 -0
  365. package/dist/chat-ui/composer/slash-commands.d.ts +82 -0
  366. package/dist/chat-ui/composer/slash-commands.js +74 -0
  367. package/dist/chat-ui/composer/slash-commands.js.map +1 -0
  368. package/dist/chat-ui/composer/tiptap-composer.cjs +135 -9
  369. package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
  370. package/dist/chat-ui/composer/tiptap-composer.d.ts +61 -2
  371. package/dist/chat-ui/composer/tiptap-composer.js +135 -9
  372. package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
  373. package/dist/chat-ui/index.cjs +3 -0
  374. package/dist/chat-ui/index.cjs.map +1 -1
  375. package/dist/chat-ui/index.d.ts +3 -2
  376. package/dist/chat-ui/index.js +3 -0
  377. package/dist/chat-ui/index.js.map +1 -1
  378. package/dist/chat-ui/mentions/mention-chip.cjs +1 -1
  379. package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
  380. package/dist/chat-ui/mentions/mention-chip.js +2 -2
  381. package/dist/chat-ui/mentions/mention-chip.js.map +1 -1
  382. package/dist/chat-ui/mentions/mention-extension.cjs +8 -1
  383. package/dist/chat-ui/mentions/mention-extension.cjs.map +1 -1
  384. package/dist/chat-ui/mentions/mention-extension.js +8 -1
  385. package/dist/chat-ui/mentions/mention-extension.js.map +1 -1
  386. package/dist/chat-ui/mentions/suggestions/components/get-scope-name.cjs +1 -0
  387. package/dist/chat-ui/mentions/suggestions/components/get-scope-name.cjs.map +1 -1
  388. package/dist/chat-ui/mentions/suggestions/components/get-scope-name.js +1 -0
  389. package/dist/chat-ui/mentions/suggestions/components/get-scope-name.js.map +1 -1
  390. package/dist/chat-ui/mentions/suggestions/components/mention-icon.cjs +2 -0
  391. package/dist/chat-ui/mentions/suggestions/components/mention-icon.cjs.map +1 -1
  392. package/dist/chat-ui/mentions/suggestions/components/mention-icon.js +3 -1
  393. package/dist/chat-ui/mentions/suggestions/components/mention-icon.js.map +1 -1
  394. package/dist/chat-ui/mentions/suggestions/components/menu-item.cjs +1 -1
  395. package/dist/chat-ui/mentions/suggestions/components/menu-item.cjs.map +1 -1
  396. package/dist/chat-ui/mentions/suggestions/components/menu-item.js +1 -1
  397. package/dist/chat-ui/mentions/suggestions/components/menu-item.js.map +1 -1
  398. package/dist/chat-ui/mentions/suggestions/data/api-client.cjs +36 -0
  399. package/dist/chat-ui/mentions/suggestions/data/api-client.cjs.map +1 -1
  400. package/dist/chat-ui/mentions/suggestions/data/api-client.d.ts +42 -0
  401. package/dist/chat-ui/mentions/suggestions/data/api-client.js +36 -0
  402. package/dist/chat-ui/mentions/suggestions/data/api-client.js.map +1 -1
  403. package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +235 -19
  404. package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -1
  405. package/dist/chat-ui/mentions/suggestions/data/sources/index.d.ts +88 -10
  406. package/dist/chat-ui/mentions/suggestions/data/sources/index.js +236 -20
  407. package/dist/chat-ui/mentions/suggestions/data/sources/index.js.map +1 -1
  408. package/dist/chat-ui/mentions/suggestions/data/types.cjs.map +1 -1
  409. package/dist/chat-ui/mentions/suggestions/data/types.d.ts +27 -1
  410. package/dist/chat-ui/mentions/suggestions/data/types.js.map +1 -1
  411. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs +56 -5
  412. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs.map +1 -1
  413. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.d.ts +26 -6
  414. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js +57 -6
  415. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js.map +1 -1
  416. package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.cjs +34 -17
  417. package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.cjs.map +1 -1
  418. package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.d.ts +19 -1
  419. package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.js +35 -18
  420. package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.js.map +1 -1
  421. package/dist/chat-ui/statewire.d.ts +1 -1
  422. package/dist/chat-ui/thread/statewire-history-edge.cjs +15 -0
  423. package/dist/chat-ui/thread/statewire-history-edge.cjs.map +1 -1
  424. package/dist/chat-ui/thread/statewire-history-edge.d.ts +4 -1
  425. package/dist/chat-ui/thread/statewire-history-edge.js +15 -0
  426. package/dist/chat-ui/thread/statewire-history-edge.js.map +1 -1
  427. package/dist/collab/client.cjs +17 -5
  428. package/dist/collab/client.cjs.map +1 -1
  429. package/dist/collab/client.d.ts +22 -7
  430. package/dist/collab/client.js +17 -5
  431. package/dist/collab/client.js.map +1 -1
  432. package/dist/composer/ComposerAttachedReferences.cjs +119 -0
  433. package/dist/composer/ComposerAttachedReferences.cjs.map +1 -0
  434. package/dist/composer/ComposerAttachedReferences.d.ts +26 -0
  435. package/dist/composer/ComposerAttachedReferences.js +119 -0
  436. package/dist/composer/ComposerAttachedReferences.js.map +1 -0
  437. package/dist/composer/ComposerNamedAgents.cjs +63 -0
  438. package/dist/composer/ComposerNamedAgents.cjs.map +1 -0
  439. package/dist/composer/ComposerNamedAgents.d.ts +16 -0
  440. package/dist/composer/ComposerNamedAgents.js +63 -0
  441. package/dist/composer/ComposerNamedAgents.js.map +1 -0
  442. package/dist/composer/attached-references.cjs +159 -0
  443. package/dist/composer/attached-references.cjs.map +1 -0
  444. package/dist/composer/attached-references.d.ts +86 -0
  445. package/dist/composer/attached-references.js +159 -0
  446. package/dist/composer/attached-references.js.map +1 -0
  447. package/dist/composer/build-composed-message.cjs +14 -7
  448. package/dist/composer/build-composed-message.cjs.map +1 -1
  449. package/dist/composer/build-composed-message.d.ts +6 -1
  450. package/dist/composer/build-composed-message.js +14 -7
  451. package/dist/composer/build-composed-message.js.map +1 -1
  452. package/dist/composer/composer-handoff.cjs +6 -2
  453. package/dist/composer/composer-handoff.cjs.map +1 -1
  454. package/dist/composer/composer-handoff.d.ts +7 -1
  455. package/dist/composer/composer-handoff.js +6 -2
  456. package/dist/composer/composer-handoff.js.map +1 -1
  457. package/dist/composer/folder-upload.cjs +149 -0
  458. package/dist/composer/folder-upload.cjs.map +1 -0
  459. package/dist/composer/folder-upload.d.ts +79 -0
  460. package/dist/composer/folder-upload.js +149 -0
  461. package/dist/composer/folder-upload.js.map +1 -0
  462. package/dist/composer/index.d.ts +1 -1
  463. package/dist/composer/useAttachToChat.cjs +35 -0
  464. package/dist/composer/useAttachToChat.cjs.map +1 -0
  465. package/dist/composer/useAttachToChat.d.ts +54 -0
  466. package/dist/composer/useAttachToChat.js +35 -0
  467. package/dist/composer/useAttachToChat.js.map +1 -0
  468. package/dist/composer/useAttachedReferencesComposerProps.cjs +19 -0
  469. package/dist/composer/useAttachedReferencesComposerProps.cjs.map +1 -0
  470. package/dist/composer/useAttachedReferencesComposerProps.d.ts +12 -0
  471. package/dist/composer/useAttachedReferencesComposerProps.js +19 -0
  472. package/dist/composer/useAttachedReferencesComposerProps.js.map +1 -0
  473. package/dist/composer/useFileUpload.cjs +95 -7
  474. package/dist/composer/useFileUpload.cjs.map +1 -1
  475. package/dist/composer/useFileUpload.d.ts +21 -2
  476. package/dist/composer/useFileUpload.js +95 -7
  477. package/dist/composer/useFileUpload.js.map +1 -1
  478. package/dist/data/athena-api-error.cjs +125 -0
  479. package/dist/data/athena-api-error.cjs.map +1 -0
  480. package/dist/data/athena-api-error.d.ts +96 -0
  481. package/dist/data/athena-api-error.js +125 -0
  482. package/dist/data/athena-api-error.js.map +1 -0
  483. package/dist/data/athena-data-client.cjs +106 -0
  484. package/dist/data/athena-data-client.cjs.map +1 -0
  485. package/dist/data/athena-data-client.d.ts +74 -0
  486. package/dist/data/athena-data-client.js +106 -0
  487. package/dist/data/athena-data-client.js.map +1 -0
  488. package/dist/data/athena-member.cjs +93 -0
  489. package/dist/data/athena-member.cjs.map +1 -0
  490. package/dist/data/athena-member.d.ts +125 -0
  491. package/dist/data/athena-member.js +93 -0
  492. package/dist/data/athena-member.js.map +1 -0
  493. package/dist/data/athena-request.cjs +458 -0
  494. package/dist/data/athena-request.cjs.map +1 -0
  495. package/dist/data/athena-request.d.ts +120 -0
  496. package/dist/data/athena-request.js +458 -0
  497. package/dist/data/athena-request.js.map +1 -0
  498. package/dist/data/use-athena-fetch.cjs +14 -0
  499. package/dist/data/use-athena-fetch.cjs.map +1 -0
  500. package/dist/data/use-athena-fetch.d.ts +19 -0
  501. package/dist/data/use-athena-fetch.js +14 -0
  502. package/dist/data/use-athena-fetch.js.map +1 -0
  503. package/dist/data/use-athena-graphql.cjs +66 -0
  504. package/dist/data/use-athena-graphql.cjs.map +1 -0
  505. package/dist/data/use-athena-graphql.d.ts +56 -0
  506. package/dist/data/use-athena-graphql.js +66 -0
  507. package/dist/data/use-athena-graphql.js.map +1 -0
  508. package/dist/data/use-athena-rest.cjs +33 -0
  509. package/dist/data/use-athena-rest.cjs.map +1 -0
  510. package/dist/data/use-athena-rest.d.ts +21 -0
  511. package/dist/data/use-athena-rest.js +33 -0
  512. package/dist/data/use-athena-rest.js.map +1 -0
  513. package/dist/data/use-semantic-query.cjs +44 -0
  514. package/dist/data/use-semantic-query.cjs.map +1 -0
  515. package/dist/data/use-semantic-query.d.ts +92 -0
  516. package/dist/data/use-semantic-query.js +44 -0
  517. package/dist/data/use-semantic-query.js.map +1 -0
  518. package/dist/diagnostics/athena-diagnostics.cjs.map +1 -1
  519. package/dist/diagnostics/athena-diagnostics.d.ts +5 -1
  520. package/dist/diagnostics/athena-diagnostics.js.map +1 -1
  521. package/dist/diagnostics/errors.cjs +7 -0
  522. package/dist/diagnostics/errors.cjs.map +1 -1
  523. package/dist/diagnostics/errors.d.ts +7 -0
  524. package/dist/diagnostics/errors.js +7 -0
  525. package/dist/diagnostics/errors.js.map +1 -1
  526. package/dist/index.cjs +155 -11
  527. package/dist/index.cjs.map +1 -1
  528. package/dist/index.d.ts +72 -13
  529. package/dist/index.js +148 -4
  530. package/dist/index.js.map +1 -1
  531. package/dist/keryx-http/src/initial-sync.cjs +64 -16
  532. package/dist/keryx-http/src/initial-sync.cjs.map +1 -1
  533. package/dist/keryx-http/src/initial-sync.d.ts +31 -1
  534. package/dist/keryx-http/src/initial-sync.js +64 -16
  535. package/dist/keryx-http/src/initial-sync.js.map +1 -1
  536. package/dist/keryx-http/src/own-awareness.cjs +20 -0
  537. package/dist/keryx-http/src/own-awareness.cjs.map +1 -0
  538. package/dist/keryx-http/src/own-awareness.d.ts +50 -0
  539. package/dist/keryx-http/src/own-awareness.js +20 -0
  540. package/dist/keryx-http/src/own-awareness.js.map +1 -0
  541. package/dist/keryx-http/src/update-attributions.cjs +26 -1
  542. package/dist/keryx-http/src/update-attributions.cjs.map +1 -1
  543. package/dist/keryx-http/src/update-attributions.d.ts +10 -1
  544. package/dist/keryx-http/src/update-attributions.js +26 -1
  545. package/dist/keryx-http/src/update-attributions.js.map +1 -1
  546. package/dist/offline/chat-outbox.cjs +262 -26
  547. package/dist/offline/chat-outbox.cjs.map +1 -1
  548. package/dist/offline/chat-outbox.d.ts +90 -12
  549. package/dist/offline/chat-outbox.js +263 -27
  550. package/dist/offline/chat-outbox.js.map +1 -1
  551. package/dist/provider/AthenaProvider.cjs +56 -19
  552. package/dist/provider/AthenaProvider.cjs.map +1 -1
  553. package/dist/provider/AthenaProvider.d.ts +24 -8
  554. package/dist/provider/AthenaProvider.js +57 -20
  555. package/dist/provider/AthenaProvider.js.map +1 -1
  556. package/dist/react/package.json.cjs +1 -1
  557. package/dist/react/package.json.js +1 -1
  558. package/dist/references/src/anchors/types.cjs +5 -0
  559. package/dist/references/src/anchors/types.cjs.map +1 -1
  560. package/dist/references/src/anchors/types.js +5 -0
  561. package/dist/references/src/anchors/types.js.map +1 -1
  562. package/dist/references/src/attachable.cjs +149 -0
  563. package/dist/references/src/attachable.cjs.map +1 -0
  564. package/dist/references/src/attachable.d.ts +87 -0
  565. package/dist/references/src/attachable.js +149 -0
  566. package/dist/references/src/attachable.js.map +1 -0
  567. package/dist/runtime/StatewirePlanModeLaneSync.cjs +93 -0
  568. package/dist/runtime/StatewirePlanModeLaneSync.cjs.map +1 -0
  569. package/dist/runtime/StatewirePlanModeLaneSync.d.ts +34 -0
  570. package/dist/runtime/StatewirePlanModeLaneSync.js +93 -0
  571. package/dist/runtime/StatewirePlanModeLaneSync.js.map +1 -0
  572. package/dist/runtime/StatewireThreadConfigLaneSync.cjs +2 -0
  573. package/dist/runtime/StatewireThreadConfigLaneSync.cjs.map +1 -1
  574. package/dist/runtime/StatewireThreadConfigLaneSync.d.ts +4 -0
  575. package/dist/runtime/StatewireThreadConfigLaneSync.js +2 -0
  576. package/dist/runtime/StatewireThreadConfigLaneSync.js.map +1 -1
  577. package/dist/runtime/statewire-plan-mode.cjs +71 -0
  578. package/dist/runtime/statewire-plan-mode.cjs.map +1 -0
  579. package/dist/runtime/statewire-plan-mode.d.ts +88 -0
  580. package/dist/runtime/statewire-plan-mode.js +71 -0
  581. package/dist/runtime/statewire-plan-mode.js.map +1 -0
  582. package/dist/runtime/statewire-run-config.cjs +3 -1
  583. package/dist/runtime/statewire-run-config.cjs.map +1 -1
  584. package/dist/runtime/statewire-run-config.d.ts +7 -0
  585. package/dist/runtime/statewire-run-config.js +3 -1
  586. package/dist/runtime/statewire-run-config.js.map +1 -1
  587. package/dist/runtime/statewire-session-key.cjs +11 -5
  588. package/dist/runtime/statewire-session-key.cjs.map +1 -1
  589. package/dist/runtime/statewire-session-key.d.ts +22 -10
  590. package/dist/runtime/statewire-session-key.js +11 -5
  591. package/dist/runtime/statewire-session-key.js.map +1 -1
  592. package/dist/runtime/useAthenaStatewireRuntime.cjs +65 -8
  593. package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
  594. package/dist/runtime/useAthenaStatewireRuntime.d.ts +26 -10
  595. package/dist/runtime/useAthenaStatewireRuntime.js +67 -10
  596. package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
  597. package/dist/search/useAthenaAssets.cjs +394 -0
  598. package/dist/search/useAthenaAssets.cjs.map +1 -0
  599. package/dist/search/useAthenaAssets.d.ts +186 -0
  600. package/dist/search/useAthenaAssets.js +394 -0
  601. package/dist/search/useAthenaAssets.js.map +1 -0
  602. package/dist/sheet-range/index.cjs +4 -0
  603. package/dist/sheet-range/index.cjs.map +1 -1
  604. package/dist/sheet-range/index.d.ts +4 -2
  605. package/dist/sheet-range/index.js +4 -0
  606. package/dist/sheet-range/index.js.map +1 -1
  607. package/dist/sheet-range/query-range.cjs +102 -0
  608. package/dist/sheet-range/query-range.cjs.map +1 -0
  609. package/dist/sheet-range/query-range.d.ts +46 -0
  610. package/dist/sheet-range/query-range.js +102 -0
  611. package/dist/sheet-range/query-range.js.map +1 -0
  612. package/dist/styles.css +1 -1
  613. package/dist/subagents/index.cjs +49 -0
  614. package/dist/subagents/index.cjs.map +1 -0
  615. package/dist/subagents/index.d.ts +16 -0
  616. package/dist/subagents/index.js +49 -0
  617. package/dist/subagents/index.js.map +1 -0
  618. package/dist/subagents/lane-follow.cjs +19 -0
  619. package/dist/subagents/lane-follow.cjs.map +1 -0
  620. package/dist/subagents/lane-follow.d.ts +9 -0
  621. package/dist/subagents/lane-follow.js +19 -0
  622. package/dist/subagents/lane-follow.js.map +1 -0
  623. package/dist/subagents/lane-model.cjs +178 -0
  624. package/dist/subagents/lane-model.cjs.map +1 -0
  625. package/dist/subagents/lane-model.d.ts +140 -0
  626. package/dist/subagents/lane-model.js +178 -0
  627. package/dist/subagents/lane-model.js.map +1 -0
  628. package/dist/subagents/lane-parts.cjs +517 -0
  629. package/dist/subagents/lane-parts.cjs.map +1 -0
  630. package/dist/subagents/lane-parts.d.ts +130 -0
  631. package/dist/subagents/lane-parts.js +517 -0
  632. package/dist/subagents/lane-parts.js.map +1 -0
  633. package/dist/subagents/subagent-lane-group.cjs +215 -0
  634. package/dist/subagents/subagent-lane-group.cjs.map +1 -0
  635. package/dist/subagents/subagent-lane-group.d.ts +67 -0
  636. package/dist/subagents/subagent-lane-group.js +215 -0
  637. package/dist/subagents/subagent-lane-group.js.map +1 -0
  638. package/dist/subagents/subagent-transcript-drawer.cjs +431 -0
  639. package/dist/subagents/subagent-transcript-drawer.cjs.map +1 -0
  640. package/dist/subagents/subagent-transcript-drawer.d.ts +78 -0
  641. package/dist/subagents/subagent-transcript-drawer.js +431 -0
  642. package/dist/subagents/subagent-transcript-drawer.js.map +1 -0
  643. package/dist/subagents/task-subagent-group.cjs +115 -0
  644. package/dist/subagents/task-subagent-group.cjs.map +1 -0
  645. package/dist/subagents/task-subagent-group.d.ts +36 -0
  646. package/dist/subagents/task-subagent-group.js +115 -0
  647. package/dist/subagents/task-subagent-group.js.map +1 -0
  648. package/dist/subagents/use-omitted-images-in-view.cjs +68 -0
  649. package/dist/subagents/use-omitted-images-in-view.cjs.map +1 -0
  650. package/dist/subagents/use-omitted-images-in-view.d.ts +21 -0
  651. package/dist/subagents/use-omitted-images-in-view.js +68 -0
  652. package/dist/subagents/use-omitted-images-in-view.js.map +1 -0
  653. package/dist/threads/Inbox.cjs +2 -2
  654. package/dist/threads/Inbox.cjs.map +1 -1
  655. package/dist/threads/SessionList.cjs +6 -6
  656. package/dist/threads/SessionList.cjs.map +1 -1
  657. package/dist/threads/SessionsPage.cjs +13 -7
  658. package/dist/threads/SessionsPage.cjs.map +1 -1
  659. package/dist/threads/SessionsPage.d.ts +10 -1
  660. package/dist/threads/SessionsPage.js +9 -3
  661. package/dist/threads/SessionsPage.js.map +1 -1
  662. package/dist/threads/session-list-model.cjs.map +1 -1
  663. package/dist/threads/session-list-model.d.ts +2 -1
  664. package/dist/threads/session-list-model.js.map +1 -1
  665. package/dist/threads/session-row-parts.cjs +3 -3
  666. package/dist/threads/session-row-parts.cjs.map +1 -1
  667. package/dist/threads/sessions-page-model.cjs +13 -5
  668. package/dist/threads/sessions-page-model.cjs.map +1 -1
  669. package/dist/threads/sessions-page-model.d.ts +7 -0
  670. package/dist/threads/sessions-page-model.js +11 -3
  671. package/dist/threads/sessions-page-model.js.map +1 -1
  672. package/dist/threads/sessions-page-storage.cjs +8 -8
  673. package/dist/threads/sessions-page-storage.cjs.map +1 -1
  674. package/dist/threads/sessions-page-storage.d.ts +5 -1
  675. package/dist/threads/sessions-page-storage.js +8 -8
  676. package/dist/threads/sessions-page-storage.js.map +1 -1
  677. package/dist/threads/use-athena-sessions.cjs +1 -0
  678. package/dist/threads/use-athena-sessions.cjs.map +1 -1
  679. package/dist/threads/use-athena-sessions.d.ts +7 -0
  680. package/dist/threads/use-athena-sessions.js +1 -0
  681. package/dist/threads/use-athena-sessions.js.map +1 -1
  682. package/dist/threads/use-athena-thread-agent.cjs +31 -0
  683. package/dist/threads/use-athena-thread-agent.cjs.map +1 -0
  684. package/dist/threads/use-athena-thread-agent.d.ts +38 -0
  685. package/dist/threads/use-athena-thread-agent.js +31 -0
  686. package/dist/threads/use-athena-thread-agent.js.map +1 -0
  687. package/dist/threads/use-athena-thread-plan-mode.cjs +18 -0
  688. package/dist/threads/use-athena-thread-plan-mode.cjs.map +1 -0
  689. package/dist/threads/use-athena-thread-plan-mode.d.ts +18 -0
  690. package/dist/threads/use-athena-thread-plan-mode.js +18 -0
  691. package/dist/threads/use-athena-thread-plan-mode.js.map +1 -0
  692. package/dist/threads/use-rest-conversation-history.d.ts +1 -0
  693. package/dist/tools/agent-creations.cjs +97 -0
  694. package/dist/tools/agent-creations.cjs.map +1 -0
  695. package/dist/tools/agent-creations.d.ts +38 -0
  696. package/dist/tools/agent-creations.js +97 -0
  697. package/dist/tools/agent-creations.js.map +1 -0
  698. package/dist/tools/agent-highlights.cjs +100 -0
  699. package/dist/tools/agent-highlights.cjs.map +1 -0
  700. package/dist/tools/agent-highlights.d.ts +57 -0
  701. package/dist/tools/agent-highlights.js +100 -0
  702. package/dist/tools/agent-highlights.js.map +1 -0
  703. package/dist/tools/append-document-tool-ui.cjs +1 -0
  704. package/dist/tools/append-document-tool-ui.cjs.map +1 -1
  705. package/dist/tools/append-document-tool-ui.d.ts +7 -0
  706. package/dist/tools/append-document-tool-ui.js +2 -1
  707. package/dist/tools/append-document-tool-ui.js.map +1 -1
  708. package/dist/tools/auto-open-tools.cjs +144 -71
  709. package/dist/tools/auto-open-tools.cjs.map +1 -1
  710. package/dist/tools/auto-open-tools.d.ts +131 -1
  711. package/dist/tools/auto-open-tools.js +145 -72
  712. package/dist/tools/auto-open-tools.js.map +1 -1
  713. package/dist/tools/browser-tool-uis.cjs +594 -0
  714. package/dist/tools/browser-tool-uis.cjs.map +1 -0
  715. package/dist/tools/browser-tool-uis.d.ts +8 -0
  716. package/dist/tools/browser-tool-uis.js +594 -0
  717. package/dist/tools/browser-tool-uis.js.map +1 -0
  718. package/dist/tools/computer-asset-tool-uis.cjs +313 -0
  719. package/dist/tools/computer-asset-tool-uis.cjs.map +1 -0
  720. package/dist/tools/computer-asset-tool-uis.d.ts +5 -0
  721. package/dist/tools/computer-asset-tool-uis.js +313 -0
  722. package/dist/tools/computer-asset-tool-uis.js.map +1 -0
  723. package/dist/tools/document-edit-tool-uis.cjs +218 -0
  724. package/dist/tools/document-edit-tool-uis.cjs.map +1 -0
  725. package/dist/tools/document-edit-tool-uis.d.ts +40 -0
  726. package/dist/tools/document-edit-tool-uis.js +218 -0
  727. package/dist/tools/document-edit-tool-uis.js.map +1 -0
  728. package/dist/tools/drive-tool-uis.cjs +425 -0
  729. package/dist/tools/drive-tool-uis.cjs.map +1 -0
  730. package/dist/tools/drive-tool-uis.d.ts +120 -0
  731. package/dist/tools/drive-tool-uis.js +425 -0
  732. package/dist/tools/drive-tool-uis.js.map +1 -0
  733. package/dist/tools/email-calendar-tool-uis.cjs +789 -0
  734. package/dist/tools/email-calendar-tool-uis.cjs.map +1 -0
  735. package/dist/tools/email-calendar-tool-uis.d.ts +129 -0
  736. package/dist/tools/email-calendar-tool-uis.js +789 -0
  737. package/dist/tools/email-calendar-tool-uis.js.map +1 -0
  738. package/dist/tools/ontology-tool-uis.cjs +83 -0
  739. package/dist/tools/ontology-tool-uis.cjs.map +1 -0
  740. package/dist/tools/ontology-tool-uis.d.ts +9 -0
  741. package/dist/tools/ontology-tool-uis.js +83 -0
  742. package/dist/tools/ontology-tool-uis.js.map +1 -0
  743. package/dist/tools/orchestration-tool-uis.cjs +586 -0
  744. package/dist/tools/orchestration-tool-uis.cjs.map +1 -0
  745. package/dist/tools/orchestration-tool-uis.d.ts +141 -0
  746. package/dist/tools/orchestration-tool-uis.js +586 -0
  747. package/dist/tools/orchestration-tool-uis.js.map +1 -0
  748. package/dist/tools/presentation-edit-tool-uis.cjs +516 -0
  749. package/dist/tools/presentation-edit-tool-uis.cjs.map +1 -0
  750. package/dist/tools/presentation-edit-tool-uis.d.ts +73 -0
  751. package/dist/tools/presentation-edit-tool-uis.js +516 -0
  752. package/dist/tools/presentation-edit-tool-uis.js.map +1 -0
  753. package/dist/tools/project-tool-uis.cjs +213 -0
  754. package/dist/tools/project-tool-uis.cjs.map +1 -0
  755. package/dist/tools/project-tool-uis.d.ts +14 -0
  756. package/dist/tools/project-tool-uis.js +213 -0
  757. package/dist/tools/project-tool-uis.js.map +1 -0
  758. package/dist/tools/sandbox-tool-uis.cjs +491 -0
  759. package/dist/tools/sandbox-tool-uis.cjs.map +1 -0
  760. package/dist/tools/sandbox-tool-uis.d.ts +116 -0
  761. package/dist/tools/sandbox-tool-uis.js +491 -0
  762. package/dist/tools/sandbox-tool-uis.js.map +1 -0
  763. package/dist/tools/sheet-query-tool-ui.cjs +138 -0
  764. package/dist/tools/sheet-query-tool-ui.cjs.map +1 -0
  765. package/dist/tools/sheet-query-tool-ui.d.ts +15 -0
  766. package/dist/tools/sheet-query-tool-ui.js +138 -0
  767. package/dist/tools/sheet-query-tool-ui.js.map +1 -0
  768. package/dist/tools/studio-screenshot-tool-uis.cjs +262 -0
  769. package/dist/tools/studio-screenshot-tool-uis.cjs.map +1 -0
  770. package/dist/tools/studio-screenshot-tool-uis.d.ts +52 -0
  771. package/dist/tools/studio-screenshot-tool-uis.js +262 -0
  772. package/dist/tools/studio-screenshot-tool-uis.js.map +1 -0
  773. package/dist/tools/subagent-task-tool-ui.cjs +24 -475
  774. package/dist/tools/subagent-task-tool-ui.cjs.map +1 -1
  775. package/dist/tools/subagent-task-tool-ui.d.ts +19 -103
  776. package/dist/tools/subagent-task-tool-ui.js +28 -479
  777. package/dist/tools/subagent-task-tool-ui.js.map +1 -1
  778. package/dist/tools/tool-summary.cjs +36 -0
  779. package/dist/tools/tool-summary.cjs.map +1 -1
  780. package/dist/tools/tool-summary.js +36 -0
  781. package/dist/tools/tool-summary.js.map +1 -1
  782. package/dist/tools/tool-uis.cjs +181 -53
  783. package/dist/tools/tool-uis.cjs.map +1 -1
  784. package/dist/tools/tool-uis.d.ts +40 -0
  785. package/dist/tools/tool-uis.js +183 -55
  786. package/dist/tools/tool-uis.js.map +1 -1
  787. package/dist/typed-interrupts/index.cjs +15 -0
  788. package/dist/typed-interrupts/index.cjs.map +1 -0
  789. package/dist/typed-interrupts/index.d.ts +20 -0
  790. package/dist/typed-interrupts/index.js +15 -0
  791. package/dist/typed-interrupts/index.js.map +1 -0
  792. package/dist/workbench/session-workbench-panes.cjs +6 -6
  793. package/dist/workbench/session-workbench-panes.cjs.map +1 -1
  794. package/package.json +28 -6
  795. package/dist/agent-runtime/src/chat-outbox-store.cjs +0 -510
  796. package/dist/agent-runtime/src/chat-outbox-store.cjs.map +0 -1
  797. package/dist/agent-runtime/src/chat-outbox-store.d.ts +0 -210
  798. package/dist/agent-runtime/src/chat-outbox-store.js +0 -510
  799. package/dist/agent-runtime/src/chat-outbox-store.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statewire-held-sends.cjs","sources":["../../../../agent-runtime/src/statewire-held-sends.ts"],"sourcesContent":["import type { StatewireClient } from 'statewire';\nimport { chatOutboxWireAnchorId } from './chat-outbox-thread';\nimport { MESSAGE_RUN_METHODS, RUN_SEND_METHOD, upgradeLegacyRunCommand } from './run-send';\nimport { DEEP_AGENT_STATEWIRE_PROTOCOL } from './statewire-transport';\n\n/**\n * Failed run sends on statewire 0.24's outbox.\n *\n * statewire 0.24 has no failed list: a command the server judged (or the\n * client lost) becomes a durable `settled` update, delivered once through\n * `onCommandChange`. A run send the user should still see is put back into\n * the outbox HELD, with the failure in its `localMeta.error`\n * ({@link reholdFailedSettle}); react-statewire then folds it into\n * `runs.held`, and the user retries ({@link retryHeldRunSend}) or discards\n * ({@link discardHeldRunSend}) it. Send recovery re-queues the sends the\n * server never judged the same way, unheld.\n *\n * Every function here reads the outbox and the thread structurally, so the\n * runtime compiles against unpatched statewire typings.\n */\n\n/** The outbox verbs this module uses (`StatewireClient.Outbox`, structurally). */\nexport interface DeepAgentOutbox {\n readonly entries: readonly StatewireClient.OutboxEntry[];\n update: StatewireClient.Outbox['update'];\n insert: StatewireClient.Outbox['insert'];\n remove: StatewireClient.Outbox['remove'];\n}\n\n/** The outbox off a statewire thread's extras (`extras.outbox`), or `null` when it has none. */\nexport function readStatewireOutbox(extras: unknown): DeepAgentOutbox | null {\n const outbox = (extras as { outbox?: Partial<DeepAgentOutbox> } | null)?.outbox;\n if (\n !outbox ||\n !Array.isArray(outbox.entries) ||\n typeof outbox.update !== 'function' ||\n typeof outbox.insert !== 'function' ||\n typeof outbox.remove !== 'function'\n )\n return null;\n return outbox as DeepAgentOutbox;\n}\n\n/** A send failure as a held entry carries it in `localMeta.error`. */\nexport type DeepAgentSendFailure = StatewireClient.SendFailure;\n\n\ntype RunCommandParams = {\n type?: unknown;\n runId?: unknown;\n message?: { id?: unknown } | null;\n sourceId?: unknown;\n runAnchorMessageId?: unknown;\n [key: string]: unknown;\n};\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction isSendFailure(value: unknown): value is DeepAgentSendFailure {\n return isRecord(value) && typeof value.fate === 'string' && typeof value.cause === 'string';\n}\n\n/** The failure a held entry's `localMeta` carries, if it was held for one. */\nexport function heldSendFailure(localMeta: unknown): DeepAgentSendFailure | undefined {\n return isRecord(localMeta) && isSendFailure(localMeta.error) ? localMeta.error : undefined;\n}\n\n/** `localMeta` with the failure set (`error`), keeping what the send carried. */\nexport function withSendFailure(localMeta: unknown, error: DeepAgentSendFailure): Record<string, unknown> {\n return { ...(isRecord(localMeta) ? localMeta : {}), error };\n}\n\n/** `localMeta` without its failure; `undefined` when nothing else is left. */\nexport function withoutSendFailure(localMeta: unknown): unknown {\n if (!isRecord(localMeta) || !('error' in localMeta)) return localMeta;\n const { error: _error, ...rest } = localMeta;\n return Object.keys(rest).length > 0 ? rest : undefined;\n}\n\n/**\n * A run command as the current contract says it: a 2026-09-13 statement an\n * earlier build stored (`run/enqueue`, `run/steer`, …) becomes its `run/send`.\n */\nfunction currentRunCommand(command: { method: string; params: readonly unknown[] }): {\n method: string;\n params: readonly unknown[];\n} {\n return upgradeLegacyRunCommand(command) ?? command;\n}\n\n/** The client-minted message id a run send carries, off its command params. */\nexport function runSendMessageId(command: {\n method: string;\n params?: readonly unknown[];\n}): string | null {\n const current = currentRunCommand({ method: command.method, params: command.params ?? [] });\n if (!MESSAGE_RUN_METHODS.has(current.method)) return null;\n const id = (current.params[0] as RunCommandParams | undefined)?.message?.id;\n return typeof id === 'string' ? id : null;\n}\n\n/**\n * The thread as a re-anchor reads it: the raw wire messages of the loaded\n * window and the live run (react-statewire's `extras.state.messages` and\n * `extras.runs.runId`, or the deep-agent state `onCommandChange` hands over).\n */\nexport interface DeepAgentRunSendThread {\n wireMessages: readonly unknown[] | null | undefined;\n runId: string | null;\n}\n\n/** The re-anchor view of a deep-agent state (`{ messages, runs }`), read structurally. */\nexport function runSendThreadOfState(state: unknown): DeepAgentRunSendThread {\n const value = isRecord(state) ? state : {};\n const runs = Array.isArray(value.runs) ? value.runs : [];\n const runId = (runs[0] as { runId?: unknown } | undefined)?.runId;\n return {\n wireMessages: Array.isArray(value.messages) ? value.messages : null,\n runId: typeof runId === 'string' ? runId : null,\n };\n}\n\n/** The re-anchor view off a statewire thread's extras, read structurally. */\nexport function runSendThreadOfExtras(extras: unknown): DeepAgentRunSendThread {\n const value = isRecord(extras) ? extras : {};\n const state = isRecord(value.state) ? value.state : {};\n const runId = isRecord(value.runs) ? value.runs.runId : undefined;\n return {\n wireMessages: Array.isArray(state.messages) ? state.messages : null,\n runId: typeof runId === 'string' ? runId : null,\n };\n}\n\nfunction mintRunId(): string {\n const host = globalThis as { crypto?: { randomUUID?: () => string } };\n return host.crypto?.randomUUID?.() ?? `run-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;\n}\n\n/**\n * A run send's command re-anchored against the thread as it is now, the way\n * react-statewire anchors a fresh send: a send into the live run keeps its\n * statement; any other send becomes a `run/send` into the live run (queued\n * behind it, where an earlier run/enqueue put it) or one that starts a run at\n * the host's tail (`auto`). An edit keeps its source\n * and re-asserts the source's parent. `null` when the command is not a\n * message-carrying run send, or an edit's source is not in the loaded window.\n */\nexport function reanchorRunSend(\n command: { method: string; params: readonly unknown[] },\n thread: DeepAgentRunSendThread,\n): { method: string; params: unknown[] } | null {\n if (!MESSAGE_RUN_METHODS.has(command.method)) return null;\n const params = command.params[0] as RunCommandParams | undefined;\n if (!isRecord(params) || !isRecord(params.message)) return null;\n const rest = command.params.slice(1);\n if (command.method === 'run/edit') {\n if (typeof params.sourceId !== 'string') return null;\n // The host checks the anchor against the source's parent in its raw list\n // (`edit-command.ts`). A source first in the loaded window may have its\n // parent below it, so only a parent seen here re-anchors the edit.\n const wire = (thread.wireMessages ?? []) as readonly ({ id?: unknown } | null)[];\n const index = wire.findIndex((message) => message?.id === params.sourceId);\n const runAnchorMessageId = index > 0 ? wire[index - 1]?.id : undefined;\n if (typeof runAnchorMessageId !== 'string') return null;\n return {\n method: 'run/edit',\n params: [{ ...params, runId: thread.runId ?? mintRunId(), runAnchorMessageId }, ...rest],\n };\n }\n if (thread.runId !== null && params.runId === thread.runId) {\n return { method: command.method, params: [params, ...rest] };\n }\n const { runAnchorMessageId: _anchor, ...unanchored } = params;\n const fields =\n thread.runId !== null\n ? { runId: thread.runId }\n : {\n runId: mintRunId(),\n runAnchorMessageId:\n thread.wireMessages && thread.wireMessages.length > 0\n ? chatOutboxWireAnchorId(thread.wireMessages)\n : null,\n };\n return {\n method: RUN_SEND_METHOD,\n params: [\n {\n ...unanchored,\n type: RUN_SEND_METHOD,\n behavior: thread.runId !== null ? 'queue' : 'auto',\n ...fields,\n },\n ...rest,\n ],\n };\n}\n\n/** The settled update a re-queue consumes (`Statewire.CommandUpdate`, structurally). */\nexport interface DeepAgentSettledUpdate {\n readonly protocol?: string;\n id?: string;\n method: string;\n params: readonly unknown[];\n status: string;\n failure?: DeepAgentSendFailure;\n localMeta?: unknown;\n}\n\n/**\n * Puts a failed message-carrying run send back into the outbox, consuming the\n * `settled` update in the same write (`insert({ from })`), so a redelivery\n * never inserts twice. `held: true` re-holds it for the user with the failure\n * in `localMeta.error`; `held: false` re-queues it (send recovery) without\n * one. The command is re-anchored against `thread` when given.\n *\n * Returns the new entry's id, or `null` when the update is not a failed\n * message-carrying run send (nothing is inserted; the caller acks it).\n */\nexport function requeueFailedRunSend({\n outbox,\n update,\n held,\n thread,\n}: {\n outbox: Pick<DeepAgentOutbox, 'insert'>;\n update: DeepAgentSettledUpdate;\n held: boolean;\n thread?: DeepAgentRunSendThread | undefined;\n}): string | null {\n if (update.status !== 'settled' || update.failure === undefined) return null;\n if (runSendMessageId(update) === null) return null;\n const sent = currentRunCommand({ method: update.method, params: update.params });\n const command = (thread && reanchorRunSend(sent, thread)) ?? {\n method: sent.method,\n params: [...sent.params],\n };\n const localMeta = held\n ? withSendFailure(update.localMeta, update.failure)\n : withoutSendFailure(update.localMeta);\n return outbox.insert({\n ...(update.id !== undefined && { from: update.id }),\n protocol: update.protocol ?? DEEP_AGENT_STATEWIRE_PROTOCOL,\n command,\n held,\n ...(localMeta !== undefined && { localMeta }),\n });\n}\n\n/**\n * The generic failure re-hold: a settled failure of a message-carrying run\n * send goes back into the outbox held, with `localMeta.error`, for the user\n * to retry, edit or discard. Wire it into a durable `onCommandChange` for the\n * failures nothing else re-queues.\n */\nexport function reholdFailedSettle(\n outbox: Pick<DeepAgentOutbox, 'insert'>,\n update: DeepAgentSettledUpdate,\n): string | null {\n return requeueFailedRunSend({ outbox, update, held: true });\n}\n\n/** The held outbox entry that carries `messageId`'s run send. */\nexport function findHeldRunSend(\n outbox: Pick<DeepAgentOutbox, 'entries'>,\n messageId: string,\n): StatewireClient.OutboxEntry | undefined {\n return outbox.entries.find(\n (entry) => entry.state === 'held' && runSendMessageId(entry.command) === messageId,\n );\n}\n\nfunction unknownHeldSend(messageId: string): Error {\n return new Error(`statewire: unknown failed entry \"${messageId}\"`);\n}\n\n/**\n * Held entries a retry or discard in this page already acted on. On shared\n * storage the verbs apply under the journal lock, so the entry stays visible\n * (still held) until then; a second click must not act on it again. Entry ids\n * are random per command, so one page-wide set serves every thread.\n */\nconst claimedHeldSends = new Set<string>();\n\n/** Claims a held entry for one retry or discard; `false` when it was claimed already. */\nfunction claimHeldSend(entryId: string): boolean {\n if (claimedHeldSends.has(entryId)) return false;\n claimedHeldSends.add(entryId);\n return true;\n}\n\n/**\n * Sends a held run send again: re-anchored against `thread`, its failure\n * cleared, released in place. A send whose statement changes (a steer into a\n * run that ended becomes an enqueue) is inserted in the held entry's place\n * and the held one removed. Throws `statewire: unknown failed entry` when no\n * held entry carries the message (it landed or was discarded meanwhile).\n */\nexport function retryHeldRunSend({\n outbox,\n messageId,\n thread,\n}: {\n outbox: DeepAgentOutbox;\n messageId: string;\n thread: DeepAgentRunSendThread;\n}): void {\n const entry = findHeldRunSend(outbox, messageId);\n if (entry === undefined || !claimHeldSend(entry.id)) throw unknownHeldSend(messageId);\n const next = reanchorRunSend(entry.command, thread) ?? {\n method: entry.command.method,\n params: [...entry.command.params],\n };\n const localMeta = withoutSendFailure(entry.localMeta);\n try {\n if (next.method === entry.command.method) {\n outbox.update(entry.id, () => ({ held: false, localMeta, command: { params: next.params } }));\n return;\n }\n outbox.insert({\n protocol: entry.protocol,\n command: next,\n before: entry.id,\n ...(localMeta !== undefined && { localMeta }),\n });\n outbox.remove(entry.id);\n } catch (error) {\n claimedHeldSends.delete(entry.id);\n throw error;\n }\n}\n\n/** Drops a held run send. Throws `statewire: unknown failed entry` when none carries the message. */\nexport function discardHeldRunSend({\n outbox,\n messageId,\n}: {\n outbox: Pick<DeepAgentOutbox, 'entries' | 'remove'>;\n messageId: string;\n}): void {\n const entry = findHeldRunSend(outbox, messageId);\n if (entry === undefined || !claimHeldSend(entry.id)) throw unknownHeldSend(messageId);\n try {\n outbox.remove(entry.id);\n } catch (error) {\n claimedHeldSends.delete(entry.id);\n throw error;\n }\n}\n"],"names":["upgradeLegacyRunCommand","MESSAGE_RUN_METHODS","chatOutboxWireAnchorId","RUN_SEND_METHOD","DEEP_AGENT_STATEWIRE_PROTOCOL"],"mappings":";;;;;AA8BO,SAAS,oBAAoB,QAAyC;AAC3E,QAAM,SAAU,iCAAyD;AACzE,MACE,CAAC,UACD,CAAC,MAAM,QAAQ,OAAO,OAAO,KAC7B,OAAO,OAAO,WAAW,cACzB,OAAO,OAAO,WAAW,cACzB,OAAO,OAAO,WAAW;AAEzB,WAAO;AACT,SAAO;AACT;AAeA,SAAS,SAAS,OAAkD;AAClE,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,cAAc,OAA+C;AACpE,SAAO,SAAS,KAAK,KAAK,OAAO,MAAM,SAAS,YAAY,OAAO,MAAM,UAAU;AACrF;AAGO,SAAS,gBAAgB,WAAsD;AACpF,SAAO,SAAS,SAAS,KAAK,cAAc,UAAU,KAAK,IAAI,UAAU,QAAQ;AACnF;AAGO,SAAS,gBAAgB,WAAoB,OAAsD;AACxG,SAAO,EAAE,GA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;;;;"}
@@ -0,0 +1,119 @@
1
+ import type { StatewireClient } from 'statewire';
2
+ /**
3
+ * Failed run sends on statewire 0.24's outbox.
4
+ *
5
+ * statewire 0.24 has no failed list: a command the server judged (or the
6
+ * client lost) becomes a durable `settled` update, delivered once through
7
+ * `onCommandChange`. A run send the user should still see is put back into
8
+ * the outbox HELD, with the failure in its `localMeta.error`
9
+ * ({@link reholdFailedSettle}); react-statewire then folds it into
10
+ * `runs.held`, and the user retries ({@link retryHeldRunSend}) or discards
11
+ * ({@link discardHeldRunSend}) it. Send recovery re-queues the sends the
12
+ * server never judged the same way, unheld.
13
+ *
14
+ * Every function here reads the outbox and the thread structurally, so the
15
+ * runtime compiles against unpatched statewire typings.
16
+ */
17
+ /** The outbox verbs this module uses (`StatewireClient.Outbox`, structurally). */
18
+ export interface DeepAgentOutbox {
19
+ readonly entries: readonly StatewireClient.OutboxEntry[];
20
+ update: StatewireClient.Outbox['update'];
21
+ insert: StatewireClient.Outbox['insert'];
22
+ remove: StatewireClient.Outbox['remove'];
23
+ }
24
+ /** The outbox off a statewire thread's extras (`extras.outbox`), or `null` when it has none. */
25
+ export declare function readStatewireOutbox(extras: unknown): DeepAgentOutbox | null;
26
+ /** A send failure as a held entry carries it in `localMeta.error`. */
27
+ export type DeepAgentSendFailure = StatewireClient.SendFailure;
28
+ /** The failure a held entry's `localMeta` carries, if it was held for one. */
29
+ export declare function heldSendFailure(localMeta: unknown): DeepAgentSendFailure | undefined;
30
+ /** `localMeta` with the failure set (`error`), keeping what the send carried. */
31
+ export declare function withSendFailure(localMeta: unknown, error: DeepAgentSendFailure): Record<string, unknown>;
32
+ /** `localMeta` without its failure; `undefined` when nothing else is left. */
33
+ export declare function withoutSendFailure(localMeta: unknown): unknown;
34
+ /** The client-minted message id a run send carries, off its command params. */
35
+ export declare function runSendMessageId(command: {
36
+ method: string;
37
+ params?: readonly unknown[];
38
+ }): string | null;
39
+ /**
40
+ * The thread as a re-anchor reads it: the raw wire messages of the loaded
41
+ * window and the live run (react-statewire's `extras.state.messages` and
42
+ * `extras.runs.runId`, or the deep-agent state `onCommandChange` hands over).
43
+ */
44
+ export interface DeepAgentRunSendThread {
45
+ wireMessages: readonly unknown[] | null | undefined;
46
+ runId: string | null;
47
+ }
48
+ /** The re-anchor view of a deep-agent state (`{ messages, runs }`), read structurally. */
49
+ export declare function runSendThreadOfState(state: unknown): DeepAgentRunSendThread;
50
+ /** The re-anchor view off a statewire thread's extras, read structurally. */
51
+ export declare function runSendThreadOfExtras(extras: unknown): DeepAgentRunSendThread;
52
+ /**
53
+ * A run send's command re-anchored against the thread as it is now, the way
54
+ * react-statewire anchors a fresh send: a send into the live run keeps its
55
+ * statement; any other send becomes a `run/send` into the live run (queued
56
+ * behind it, where an earlier run/enqueue put it) or one that starts a run at
57
+ * the host's tail (`auto`). An edit keeps its source
58
+ * and re-asserts the source's parent. `null` when the command is not a
59
+ * message-carrying run send, or an edit's source is not in the loaded window.
60
+ */
61
+ export declare function reanchorRunSend(command: {
62
+ method: string;
63
+ params: readonly unknown[];
64
+ }, thread: DeepAgentRunSendThread): {
65
+ method: string;
66
+ params: unknown[];
67
+ } | null;
68
+ /** The settled update a re-queue consumes (`Statewire.CommandUpdate`, structurally). */
69
+ export interface DeepAgentSettledUpdate {
70
+ readonly protocol?: string;
71
+ id?: string;
72
+ method: string;
73
+ params: readonly unknown[];
74
+ status: string;
75
+ failure?: DeepAgentSendFailure;
76
+ localMeta?: unknown;
77
+ }
78
+ /**
79
+ * Puts a failed message-carrying run send back into the outbox, consuming the
80
+ * `settled` update in the same write (`insert({ from })`), so a redelivery
81
+ * never inserts twice. `held: true` re-holds it for the user with the failure
82
+ * in `localMeta.error`; `held: false` re-queues it (send recovery) without
83
+ * one. The command is re-anchored against `thread` when given.
84
+ *
85
+ * Returns the new entry's id, or `null` when the update is not a failed
86
+ * message-carrying run send (nothing is inserted; the caller acks it).
87
+ */
88
+ export declare function requeueFailedRunSend({ outbox, update, held, thread, }: {
89
+ outbox: Pick<DeepAgentOutbox, 'insert'>;
90
+ update: DeepAgentSettledUpdate;
91
+ held: boolean;
92
+ thread?: DeepAgentRunSendThread | undefined;
93
+ }): string | null;
94
+ /**
95
+ * The generic failure re-hold: a settled failure of a message-carrying run
96
+ * send goes back into the outbox held, with `localMeta.error`, for the user
97
+ * to retry, edit or discard. Wire it into a durable `onCommandChange` for the
98
+ * failures nothing else re-queues.
99
+ */
100
+ export declare function reholdFailedSettle(outbox: Pick<DeepAgentOutbox, 'insert'>, update: DeepAgentSettledUpdate): string | null;
101
+ /** The held outbox entry that carries `messageId`'s run send. */
102
+ export declare function findHeldRunSend(outbox: Pick<DeepAgentOutbox, 'entries'>, messageId: string): StatewireClient.OutboxEntry | undefined;
103
+ /**
104
+ * Sends a held run send again: re-anchored against `thread`, its failure
105
+ * cleared, released in place. A send whose statement changes (a steer into a
106
+ * run that ended becomes an enqueue) is inserted in the held entry's place
107
+ * and the held one removed. Throws `statewire: unknown failed entry` when no
108
+ * held entry carries the message (it landed or was discarded meanwhile).
109
+ */
110
+ export declare function retryHeldRunSend({ outbox, messageId, thread, }: {
111
+ outbox: DeepAgentOutbox;
112
+ messageId: string;
113
+ thread: DeepAgentRunSendThread;
114
+ }): void;
115
+ /** Drops a held run send. Throws `statewire: unknown failed entry` when none carries the message. */
116
+ export declare function discardHeldRunSend({ outbox, messageId, }: {
117
+ outbox: Pick<DeepAgentOutbox, 'entries' | 'remove'>;
118
+ messageId: string;
119
+ }): void;
@@ -0,0 +1,191 @@
1
+ import { chatOutboxWireAnchorId } from "./chat-outbox-thread.js";
2
+ import { MESSAGE_RUN_METHODS, upgradeLegacyRunCommand, RUN_SEND_METHOD } from "./run-send.js";
3
+ import { DEEP_AGENT_STATEWIRE_PROTOCOL } from "./statewire-transport.js";
4
+ function readStatewireOutbox(extras) {
5
+ const outbox = extras == null ? void 0 : extras.outbox;
6
+ if (!outbox || !Array.isArray(outbox.entries) || typeof outbox.update !== "function" || typeof outbox.insert !== "function" || typeof outbox.remove !== "function")
7
+ return null;
8
+ return outbox;
9
+ }
10
+ function isRecord(value) {
11
+ return typeof value === "object" && value !== null && !Array.isArray(value);
12
+ }
13
+ function isSendFailure(value) {
14
+ return isRecord(value) && typeof value.fate === "string" && typeof value.cause === "string";
15
+ }
16
+ function heldSendFailure(localMeta) {
17
+ return isRecord(localMeta) && isSendFailure(localMeta.error) ? localMeta.error : void 0;
18
+ }
19
+ function withSendFailure(localMeta, error) {
20
+ return { ...isRecord(localMeta) ? localMeta : {}, error };
21
+ }
22
+ function withoutSendFailure(localMeta) {
23
+ if (!isRecord(localMeta) || !("error" in localMeta)) return localMeta;
24
+ const { error: _error, ...rest } = localMeta;
25
+ return Object.keys(rest).length > 0 ? rest : void 0;
26
+ }
27
+ function currentRunCommand(command) {
28
+ return upgradeLegacyRunCommand(command) ?? command;
29
+ }
30
+ function runSendMessageId(command) {
31
+ var _a, _b;
32
+ const current = currentRunCommand({ method: command.method, params: command.params ?? [] });
33
+ if (!MESSAGE_RUN_METHODS.has(current.method)) return null;
34
+ const id = (_b = (_a = current.params[0]) == null ? void 0 : _a.message) == null ? void 0 : _b.id;
35
+ return typeof id === "string" ? id : null;
36
+ }
37
+ function runSendThreadOfState(state) {
38
+ var _a;
39
+ const value = isRecord(state) ? state : {};
40
+ const runs = Array.isArray(value.runs) ? value.runs : [];
41
+ const runId = (_a = runs[0]) == null ? void 0 : _a.runId;
42
+ return {
43
+ wireMessages: Array.isArray(value.messages) ? value.messages : null,
44
+ runId: typeof runId === "string" ? runId : null
45
+ };
46
+ }
47
+ function runSendThreadOfExtras(extras) {
48
+ const value = isRecord(extras) ? extras : {};
49
+ const state = isRecord(value.state) ? value.state : {};
50
+ const runId = isRecord(value.runs) ? value.runs.runId : void 0;
51
+ return {
52
+ wireMessages: Array.isArray(state.messages) ? state.messages : null,
53
+ runId: typeof runId === "string" ? runId : null
54
+ };
55
+ }
56
+ function mintRunId() {
57
+ var _a, _b;
58
+ const host = globalThis;
59
+ return ((_b = (_a = host.crypto) == null ? void 0 : _a.randomUUID) == null ? void 0 : _b.call(_a)) ?? `run-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
60
+ }
61
+ function reanchorRunSend(command, thread) {
62
+ var _a;
63
+ if (!MESSAGE_RUN_METHODS.has(command.method)) return null;
64
+ const params = command.params[0];
65
+ if (!isRecord(params) || !isRecord(params.message)) return null;
66
+ const rest = command.params.slice(1);
67
+ if (command.method === "run/edit") {
68
+ if (typeof params.sourceId !== "string") return null;
69
+ const wire = thread.wireMessages ?? [];
70
+ const index = wire.findIndex((message) => (message == null ? void 0 : message.id) === params.sourceId);
71
+ const runAnchorMessageId = index > 0 ? (_a = wire[index - 1]) == null ? void 0 : _a.id : void 0;
72
+ if (typeof runAnchorMessageId !== "string") return null;
73
+ return {
74
+ method: "run/edit",
75
+ params: [{ ...params, runId: thread.runId ?? mintRunId(), runAnchorMessageId }, ...rest]
76
+ };
77
+ }
78
+ if (thread.runId !== null && params.runId === thread.runId) {
79
+ return { method: command.method, params: [params, ...rest] };
80
+ }
81
+ const { runAnchorMessageId: _anchor, ...unanchored } = params;
82
+ const fields = thread.runId !== null ? { runId: thread.runId } : {
83
+ runId: mintRunId(),
84
+ runAnchorMessageId: thread.wireMessages && thread.wireMessages.length > 0 ? chatOutboxWireAnchorId(thread.wireMessages) : null
85
+ };
86
+ return {
87
+ method: RUN_SEND_METHOD,
88
+ params: [
89
+ {
90
+ ...unanchored,
91
+ type: RUN_SEND_METHOD,
92
+ behavior: thread.runId !== null ? "queue" : "auto",
93
+ ...fields
94
+ },
95
+ ...rest
96
+ ]
97
+ };
98
+ }
99
+ function requeueFailedRunSend({
100
+ outbox,
101
+ update,
102
+ held,
103
+ thread
104
+ }) {
105
+ if (update.status !== "settled" || update.failure === void 0) return null;
106
+ if (runSendMessageId(update) === null) return null;
107
+ const sent = currentRunCommand({ method: update.method, params: update.params });
108
+ const command = (thread && reanchorRunSend(sent, thread)) ?? {
109
+ method: sent.method,
110
+ params: [...sent.params]
111
+ };
112
+ const localMeta = held ? withSendFailure(update.localMeta, update.failure) : withoutSendFailure(update.localMeta);
113
+ return outbox.insert({
114
+ ...update.id !== void 0 && { from: update.id },
115
+ protocol: update.protocol ?? DEEP_AGENT_STATEWIRE_PROTOCOL,
116
+ command,
117
+ held,
118
+ ...localMeta !== void 0 && { localMeta }
119
+ });
120
+ }
121
+ function findHeldRunSend(outbox, messageId) {
122
+ return outbox.entries.find(
123
+ (entry) => entry.state === "held" && runSendMessageId(entry.command) === messageId
124
+ );
125
+ }
126
+ function unknownHeldSend(messageId) {
127
+ return new Error(`statewire: unknown failed entry "${messageId}"`);
128
+ }
129
+ const claimedHeldSends = /* @__PURE__ */ new Set();
130
+ function claimHeldSend(entryId) {
131
+ if (claimedHeldSends.has(entryId)) return false;
132
+ claimedHeldSends.add(entryId);
133
+ return true;
134
+ }
135
+ function retryHeldRunSend({
136
+ outbox,
137
+ messageId,
138
+ thread
139
+ }) {
140
+ const entry = findHeldRunSend(outbox, messageId);
141
+ if (entry === void 0 || !claimHeldSend(entry.id)) throw unknownHeldSend(messageId);
142
+ const next = reanchorRunSend(entry.command, thread) ?? {
143
+ method: entry.command.method,
144
+ params: [...entry.command.params]
145
+ };
146
+ const localMeta = withoutSendFailure(entry.localMeta);
147
+ try {
148
+ if (next.method === entry.command.method) {
149
+ outbox.update(entry.id, () => ({ held: false, localMeta, command: { params: next.params } }));
150
+ return;
151
+ }
152
+ outbox.insert({
153
+ protocol: entry.protocol,
154
+ command: next,
155
+ before: entry.id,
156
+ ...localMeta !== void 0 && { localMeta }
157
+ });
158
+ outbox.remove(entry.id);
159
+ } catch (error) {
160
+ claimedHeldSends.delete(entry.id);
161
+ throw error;
162
+ }
163
+ }
164
+ function discardHeldRunSend({
165
+ outbox,
166
+ messageId
167
+ }) {
168
+ const entry = findHeldRunSend(outbox, messageId);
169
+ if (entry === void 0 || !claimHeldSend(entry.id)) throw unknownHeldSend(messageId);
170
+ try {
171
+ outbox.remove(entry.id);
172
+ } catch (error) {
173
+ claimedHeldSends.delete(entry.id);
174
+ throw error;
175
+ }
176
+ }
177
+ export {
178
+ discardHeldRunSend,
179
+ findHeldRunSend,
180
+ heldSendFailure,
181
+ readStatewireOutbox,
182
+ reanchorRunSend,
183
+ requeueFailedRunSend,
184
+ retryHeldRunSend,
185
+ runSendMessageId,
186
+ runSendThreadOfExtras,
187
+ runSendThreadOfState,
188
+ withSendFailure,
189
+ withoutSendFailure
190
+ };
191
+ //# sourceMappingURL=statewire-held-sends.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statewire-held-sends.js","sources":["../../../../agent-runtime/src/statewire-held-sends.ts"],"sourcesContent":["import type { StatewireClient } from 'statewire';\nimport { chatOutboxWireAnchorId } from './chat-outbox-thread';\nimport { MESSAGE_RUN_METHODS, RUN_SEND_METHOD, upgradeLegacyRunCommand } from './run-send';\nimport { DEEP_AGENT_STATEWIRE_PROTOCOL } from './statewire-transport';\n\n/**\n * Failed run sends on statewire 0.24's outbox.\n *\n * statewire 0.24 has no failed list: a command the server judged (or the\n * client lost) becomes a durable `settled` update, delivered once through\n * `onCommandChange`. A run send the user should still see is put back into\n * the outbox HELD, with the failure in its `localMeta.error`\n * ({@link reholdFailedSettle}); react-statewire then folds it into\n * `runs.held`, and the user retries ({@link retryHeldRunSend}) or discards\n * ({@link discardHeldRunSend}) it. Send recovery re-queues the sends the\n * server never judged the same way, unheld.\n *\n * Every function here reads the outbox and the thread structurally, so the\n * runtime compiles against unpatched statewire typings.\n */\n\n/** The outbox verbs this module uses (`StatewireClient.Outbox`, structurally). */\nexport interface DeepAgentOutbox {\n readonly entries: readonly StatewireClient.OutboxEntry[];\n update: StatewireClient.Outbox['update'];\n insert: StatewireClient.Outbox['insert'];\n remove: StatewireClient.Outbox['remove'];\n}\n\n/** The outbox off a statewire thread's extras (`extras.outbox`), or `null` when it has none. */\nexport function readStatewireOutbox(extras: unknown): DeepAgentOutbox | null {\n const outbox = (extras as { outbox?: Partial<DeepAgentOutbox> } | null)?.outbox;\n if (\n !outbox ||\n !Array.isArray(outbox.entries) ||\n typeof outbox.update !== 'function' ||\n typeof outbox.insert !== 'function' ||\n typeof outbox.remove !== 'function'\n )\n return null;\n return outbox as DeepAgentOutbox;\n}\n\n/** A send failure as a held entry carries it in `localMeta.error`. */\nexport type DeepAgentSendFailure = StatewireClient.SendFailure;\n\n\ntype RunCommandParams = {\n type?: unknown;\n runId?: unknown;\n message?: { id?: unknown } | null;\n sourceId?: unknown;\n runAnchorMessageId?: unknown;\n [key: string]: unknown;\n};\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction isSendFailure(value: unknown): value is DeepAgentSendFailure {\n return isRecord(value) && typeof value.fate === 'string' && typeof value.cause === 'string';\n}\n\n/** The failure a held entry's `localMeta` carries, if it was held for one. */\nexport function heldSendFailure(localMeta: unknown): DeepAgentSendFailure | undefined {\n return isRecord(localMeta) && isSendFailure(localMeta.error) ? localMeta.error : undefined;\n}\n\n/** `localMeta` with the failure set (`error`), keeping what the send carried. */\nexport function withSendFailure(localMeta: unknown, error: DeepAgentSendFailure): Record<string, unknown> {\n return { ...(isRecord(localMeta) ? localMeta : {}), error };\n}\n\n/** `localMeta` without its failure; `undefined` when nothing else is left. */\nexport function withoutSendFailure(localMeta: unknown): unknown {\n if (!isRecord(localMeta) || !('error' in localMeta)) return localMeta;\n const { error: _error, ...rest } = localMeta;\n return Object.keys(rest).length > 0 ? rest : undefined;\n}\n\n/**\n * A run command as the current contract says it: a 2026-09-13 statement an\n * earlier build stored (`run/enqueue`, `run/steer`, …) becomes its `run/send`.\n */\nfunction currentRunCommand(command: { method: string; params: readonly unknown[] }): {\n method: string;\n params: readonly unknown[];\n} {\n return upgradeLegacyRunCommand(command) ?? command;\n}\n\n/** The client-minted message id a run send carries, off its command params. */\nexport function runSendMessageId(command: {\n method: string;\n params?: readonly unknown[];\n}): string | null {\n const current = currentRunCommand({ method: command.method, params: command.params ?? [] });\n if (!MESSAGE_RUN_METHODS.has(current.method)) return null;\n const id = (current.params[0] as RunCommandParams | undefined)?.message?.id;\n return typeof id === 'string' ? id : null;\n}\n\n/**\n * The thread as a re-anchor reads it: the raw wire messages of the loaded\n * window and the live run (react-statewire's `extras.state.messages` and\n * `extras.runs.runId`, or the deep-agent state `onCommandChange` hands over).\n */\nexport interface DeepAgentRunSendThread {\n wireMessages: readonly unknown[] | null | undefined;\n runId: string | null;\n}\n\n/** The re-anchor view of a deep-agent state (`{ messages, runs }`), read structurally. */\nexport function runSendThreadOfState(state: unknown): DeepAgentRunSendThread {\n const value = isRecord(state) ? state : {};\n const runs = Array.isArray(value.runs) ? value.runs : [];\n const runId = (runs[0] as { runId?: unknown } | undefined)?.runId;\n return {\n wireMessages: Array.isArray(value.messages) ? value.messages : null,\n runId: typeof runId === 'string' ? runId : null,\n };\n}\n\n/** The re-anchor view off a statewire thread's extras, read structurally. */\nexport function runSendThreadOfExtras(extras: unknown): DeepAgentRunSendThread {\n const value = isRecord(extras) ? extras : {};\n const state = isRecord(value.state) ? value.state : {};\n const runId = isRecord(value.runs) ? value.runs.runId : undefined;\n return {\n wireMessages: Array.isArray(state.messages) ? state.messages : null,\n runId: typeof runId === 'string' ? runId : null,\n };\n}\n\nfunction mintRunId(): string {\n const host = globalThis as { crypto?: { randomUUID?: () => string } };\n return host.crypto?.randomUUID?.() ?? `run-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;\n}\n\n/**\n * A run send's command re-anchored against the thread as it is now, the way\n * react-statewire anchors a fresh send: a send into the live run keeps its\n * statement; any other send becomes a `run/send` into the live run (queued\n * behind it, where an earlier run/enqueue put it) or one that starts a run at\n * the host's tail (`auto`). An edit keeps its source\n * and re-asserts the source's parent. `null` when the command is not a\n * message-carrying run send, or an edit's source is not in the loaded window.\n */\nexport function reanchorRunSend(\n command: { method: string; params: readonly unknown[] },\n thread: DeepAgentRunSendThread,\n): { method: string; params: unknown[] } | null {\n if (!MESSAGE_RUN_METHODS.has(command.method)) return null;\n const params = command.params[0] as RunCommandParams | undefined;\n if (!isRecord(params) || !isRecord(params.message)) return null;\n const rest = command.params.slice(1);\n if (command.method === 'run/edit') {\n if (typeof params.sourceId !== 'string') return null;\n // The host checks the anchor against the source's parent in its raw list\n // (`edit-command.ts`). A source first in the loaded window may have its\n // parent below it, so only a parent seen here re-anchors the edit.\n const wire = (thread.wireMessages ?? []) as readonly ({ id?: unknown } | null)[];\n const index = wire.findIndex((message) => message?.id === params.sourceId);\n const runAnchorMessageId = index > 0 ? wire[index - 1]?.id : undefined;\n if (typeof runAnchorMessageId !== 'string') return null;\n return {\n method: 'run/edit',\n params: [{ ...params, runId: thread.runId ?? mintRunId(), runAnchorMessageId }, ...rest],\n };\n }\n if (thread.runId !== null && params.runId === thread.runId) {\n return { method: command.method, params: [params, ...rest] };\n }\n const { runAnchorMessageId: _anchor, ...unanchored } = params;\n const fields =\n thread.runId !== null\n ? { runId: thread.runId }\n : {\n runId: mintRunId(),\n runAnchorMessageId:\n thread.wireMessages && thread.wireMessages.length > 0\n ? chatOutboxWireAnchorId(thread.wireMessages)\n : null,\n };\n return {\n method: RUN_SEND_METHOD,\n params: [\n {\n ...unanchored,\n type: RUN_SEND_METHOD,\n behavior: thread.runId !== null ? 'queue' : 'auto',\n ...fields,\n },\n ...rest,\n ],\n };\n}\n\n/** The settled update a re-queue consumes (`Statewire.CommandUpdate`, structurally). */\nexport interface DeepAgentSettledUpdate {\n readonly protocol?: string;\n id?: string;\n method: string;\n params: readonly unknown[];\n status: string;\n failure?: DeepAgentSendFailure;\n localMeta?: unknown;\n}\n\n/**\n * Puts a failed message-carrying run send back into the outbox, consuming the\n * `settled` update in the same write (`insert({ from })`), so a redelivery\n * never inserts twice. `held: true` re-holds it for the user with the failure\n * in `localMeta.error`; `held: false` re-queues it (send recovery) without\n * one. The command is re-anchored against `thread` when given.\n *\n * Returns the new entry's id, or `null` when the update is not a failed\n * message-carrying run send (nothing is inserted; the caller acks it).\n */\nexport function requeueFailedRunSend({\n outbox,\n update,\n held,\n thread,\n}: {\n outbox: Pick<DeepAgentOutbox, 'insert'>;\n update: DeepAgentSettledUpdate;\n held: boolean;\n thread?: DeepAgentRunSendThread | undefined;\n}): string | null {\n if (update.status !== 'settled' || update.failure === undefined) return null;\n if (runSendMessageId(update) === null) return null;\n const sent = currentRunCommand({ method: update.method, params: update.params });\n const command = (thread && reanchorRunSend(sent, thread)) ?? {\n method: sent.method,\n params: [...sent.params],\n };\n const localMeta = held\n ? withSendFailure(update.localMeta, update.failure)\n : withoutSendFailure(update.localMeta);\n return outbox.insert({\n ...(update.id !== undefined && { from: update.id }),\n protocol: update.protocol ?? DEEP_AGENT_STATEWIRE_PROTOCOL,\n command,\n held,\n ...(localMeta !== undefined && { localMeta }),\n });\n}\n\n/**\n * The generic failure re-hold: a settled failure of a message-carrying run\n * send goes back into the outbox held, with `localMeta.error`, for the user\n * to retry, edit or discard. Wire it into a durable `onCommandChange` for the\n * failures nothing else re-queues.\n */\nexport function reholdFailedSettle(\n outbox: Pick<DeepAgentOutbox, 'insert'>,\n update: DeepAgentSettledUpdate,\n): string | null {\n return requeueFailedRunSend({ outbox, update, held: true });\n}\n\n/** The held outbox entry that carries `messageId`'s run send. */\nexport function findHeldRunSend(\n outbox: Pick<DeepAgentOutbox, 'entries'>,\n messageId: string,\n): StatewireClient.OutboxEntry | undefined {\n return outbox.entries.find(\n (entry) => entry.state === 'held' && runSendMessageId(entry.command) === messageId,\n );\n}\n\nfunction unknownHeldSend(messageId: string): Error {\n return new Error(`statewire: unknown failed entry \"${messageId}\"`);\n}\n\n/**\n * Held entries a retry or discard in this page already acted on. On shared\n * storage the verbs apply under the journal lock, so the entry stays visible\n * (still held) until then; a second click must not act on it again. Entry ids\n * are random per command, so one page-wide set serves every thread.\n */\nconst claimedHeldSends = new Set<string>();\n\n/** Claims a held entry for one retry or discard; `false` when it was claimed already. */\nfunction claimHeldSend(entryId: string): boolean {\n if (claimedHeldSends.has(entryId)) return false;\n claimedHeldSends.add(entryId);\n return true;\n}\n\n/**\n * Sends a held run send again: re-anchored against `thread`, its failure\n * cleared, released in place. A send whose statement changes (a steer into a\n * run that ended becomes an enqueue) is inserted in the held entry's place\n * and the held one removed. Throws `statewire: unknown failed entry` when no\n * held entry carries the message (it landed or was discarded meanwhile).\n */\nexport function retryHeldRunSend({\n outbox,\n messageId,\n thread,\n}: {\n outbox: DeepAgentOutbox;\n messageId: string;\n thread: DeepAgentRunSendThread;\n}): void {\n const entry = findHeldRunSend(outbox, messageId);\n if (entry === undefined || !claimHeldSend(entry.id)) throw unknownHeldSend(messageId);\n const next = reanchorRunSend(entry.command, thread) ?? {\n method: entry.command.method,\n params: [...entry.command.params],\n };\n const localMeta = withoutSendFailure(entry.localMeta);\n try {\n if (next.method === entry.command.method) {\n outbox.update(entry.id, () => ({ held: false, localMeta, command: { params: next.params } }));\n return;\n }\n outbox.insert({\n protocol: entry.protocol,\n command: next,\n before: entry.id,\n ...(localMeta !== undefined && { localMeta }),\n });\n outbox.remove(entry.id);\n } catch (error) {\n claimedHeldSends.delete(entry.id);\n throw error;\n }\n}\n\n/** Drops a held run send. Throws `statewire: unknown failed entry` when none carries the message. */\nexport function discardHeldRunSend({\n outbox,\n messageId,\n}: {\n outbox: Pick<DeepAgentOutbox, 'entries' | 'remove'>;\n messageId: string;\n}): void {\n const entry = findHeldRunSend(outbox, messageId);\n if (entry === undefined || !claimHeldSend(entry.id)) throw unknownHeldSend(messageId);\n try {\n outbox.remove(entry.id);\n } catch (error) {\n claimedHeldSends.delete(entry.id);\n throw error;\n }\n}\n"],"names":[],"mappings":";;;AA8BO,SAAS,oBAAoB,QAAyC;AAC3E,QAAM,SAAU,iCAAyD;AACzE,MACE,CAAC,UACD,CAAC,MAAM,QAAQ,OAAO,OAAO,KAC7B,OAAO,OAAO,WAAW,cACzB,OAAO,OAAO,WAAW,cACzB,OAAO,OAAO,WAAW;AAEzB,WAAO;AACT,SAAO;AACT;AAeA,SAAS,SAA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;AAAA,EACjC;AAAA,EACA;AACF,GAGS;AACP,QAAM,QAAQ,gBAAgB,QAAQ,SAAS;AAC/C,MAAI,UAAU,UAAa,CAAC,cAAc,MAAM,EAAE,EAAG,OAAM,gBAAgB,SAAS;AACpF,MAAI;AACF,WAAO,OAAO,MAAM,EAAE;AAAA,EACxB,SAAS,OAAO;AACd,qBAAiB,OAAO,MAAM,EAAE;AAChC,UAAM;AAAA,EACR;AACF;"}
@@ -17,8 +17,12 @@ function pairDeepAgentStateWithThread({
17
17
  }) {
18
18
  stateThreadIds.set(state, threadId);
19
19
  }
20
+ function readDeepAgentStateThreadId(state) {
21
+ return typeof state === "object" && state !== null ? stateThreadIds.get(state) ?? null : null;
22
+ }
20
23
  exports.DEEP_AGENT_PRE_STREAM_STATE = DEEP_AGENT_PRE_STREAM_STATE;
21
24
  exports.isDeepAgentStateHydrated = isDeepAgentStateHydrated;
22
25
  exports.pairDeepAgentStateWithThread = pairDeepAgentStateWithThread;
26
+ exports.readDeepAgentStateThreadId = readDeepAgentStateThreadId;
23
27
  exports.readDeepAgentStreamValues = readDeepAgentStreamValues;
24
28
  //# sourceMappingURL=statewire-state.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"statewire-state.cjs","sources":["../../../../agent-runtime/src/statewire-state.ts"],"sourcesContent":["import type { DeepAgentStreamValues } from './types';\n\n/**\n * Typed pre-stream default for the deep-agent statewire state.\n *\n * The statewire client's replicated state is `undefined` (and can transiently\n * be `null`/non-object on a replay boundary) until an attach snapshot applies —\n * `@assistant-ui/react-statewire` derives its `\"loading\"` thread status from\n * exactly that absence, so the raw wire value must keep carrying it. Consumers\n * of OUR conversion layer, however, should never have to null-check the whole\n * state: they read through {@link readDeepAgentStreamValues}, which substitutes\n * this constant while the state is not hydrated.\n *\n * Module-level constant on purpose: selector fallbacks must be referentially\n * stable (`useStatewireState` compares selector results with `Object.is`, so a\n * fresh `[]`/`{}` per call re-renders forever). Frozen so a consumer cannot\n * mutate the shared default.\n */\nconst preStreamState: DeepAgentStreamValues = { messages: [], todos: [] };\nObject.freeze(preStreamState.messages);\nObject.freeze(preStreamState.todos);\nexport const DEEP_AGENT_PRE_STREAM_STATE: DeepAgentStreamValues = Object.freeze(preStreamState);\n\n/**\n * Read the deep-agent stream values off a raw statewire state, substituting\n * {@link DEEP_AGENT_PRE_STREAM_STATE} while the state is not an object yet\n * (pre-attach, or a replay boundary republishing `undefined`).\n *\n * Identity-preserving: a hydrated state returns the same object reference it\n * was given and the pre-stream branch always returns the same module constant,\n * so this is safe to call inside `useStatewireState` selectors.\n */\nexport function readDeepAgentStreamValues(state: unknown): DeepAgentStreamValues {\n return typeof state === 'object' && state !== null\n ? (state as DeepAgentStreamValues)\n : DEEP_AGENT_PRE_STREAM_STATE;\n}\n\n/**\n * Whether a state (raw, or already normalized through\n * {@link readDeepAgentStreamValues}) carries a real wire payload. `false`\n * exactly while the pre-stream default stands in — the explicit signal for\n * code that must distinguish \"empty thread\" from \"no snapshot yet\".\n */\nexport function isDeepAgentStateHydrated(state: unknown): boolean {\n return typeof state === 'object' && state !== null && state !== DEEP_AGENT_PRE_STREAM_STATE;\n}\n\n/**\n * The thread whose attach produced each state `useDeepAgentThread`'s\n * converter publishes.\n *\n * A thread switch commits the incoming thread's per-attach children (keyed by\n * thread) in the same render that hands the assistant-ui client the new thread\n * element, but the client's projected thread state only changes once that\n * element's resource re-renders: a child's first render still reads the\n * OUTGOING attach's state. A binding that writes a lane of that state into the\n * new thread's storage — the server config lane, mirrored into the panel config\n * and the version that narrows every send — would hand the new thread the\n * previous thread's values. Pairing each state with its thread lets such a\n * binding ignore a state its own thread did not produce.\n *\n * Kept beside the state rather than on it: the state is the replicated wire\n * document that the snapshot cache remembers and other readers compare, so a\n * client-only key would ride every one of them.\n */\nconst stateThreadIds = new WeakMap<object, string>();\n\n/** Record that `threadId`'s attach produced `state` (the converter's output). */\nexport function pairDeepAgentStateWithThread({\n state,\n threadId,\n}: {\n state: object;\n threadId: string;\n}): void {\n stateThreadIds.set(state, threadId);\n}\n\n/**\n * The thread whose attach produced `state`, or `null` for a state no deep-agent\n * converter published (the pre-stream default, a state built elsewhere).\n */\nexport function readDeepAgentStateThreadId(state: unknown): string | null {\n return typeof state === 'object' && state !== null ? (stateThreadIds.get(state) ?? null) : null;\n}\n"],"names":[],"mappings":";;AAkBA,MAAM,iBAAwC,EAAE,UAAU,IAAI,OAAO,CAAA,EAAC;AACtE,OAAO,OAAO,eAAe,QAAQ;AACrC,OAAO,OAAO,eAAe,KAAK;AAC3B,MAAM,8BAAqD,OAAO,OAAO,cAAc;AAWvF,SAAS,0BAA0B,OAAuC;AAC/E,SAAO,OAAO,UAAU,YAAY,UAAU,OACzC,QACD;AACN;AAQO,SAAS,yBAAyB,OAAyB;AAChE,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU;AAClE;AAoBA,MAAM,qCAAqB,QAAA;AAGpB,SAAS,6BAA6B;AAAA,EAC3C;AAAA,EACA;AACF,GAGS;AACP,iBAAe,IAAI,OAAO,QAAQ;AACpC;;;;;"}
1
+ {"version":3,"file":"statewire-state.cjs","sources":["../../../../agent-runtime/src/statewire-state.ts"],"sourcesContent":["import type { DeepAgentStreamValues } from './types';\n\n/**\n * Typed pre-stream default for the deep-agent statewire state.\n *\n * The statewire client's replicated state is `undefined` (and can transiently\n * be `null`/non-object on a replay boundary) until an attach snapshot applies —\n * `@assistant-ui/react-statewire` derives its `\"loading\"` thread status from\n * exactly that absence, so the raw wire value must keep carrying it. Consumers\n * of OUR conversion layer, however, should never have to null-check the whole\n * state: they read through {@link readDeepAgentStreamValues}, which substitutes\n * this constant while the state is not hydrated.\n *\n * Module-level constant on purpose: selector fallbacks must be referentially\n * stable (`useStatewireState` compares selector results with `Object.is`, so a\n * fresh `[]`/`{}` per call re-renders forever). Frozen so a consumer cannot\n * mutate the shared default.\n */\nconst preStreamState: DeepAgentStreamValues = { messages: [], todos: [] };\nObject.freeze(preStreamState.messages);\nObject.freeze(preStreamState.todos);\nexport const DEEP_AGENT_PRE_STREAM_STATE: DeepAgentStreamValues = Object.freeze(preStreamState);\n\n/**\n * Read the deep-agent stream values off a raw statewire state, substituting\n * {@link DEEP_AGENT_PRE_STREAM_STATE} while the state is not an object yet\n * (pre-attach, or a replay boundary republishing `undefined`).\n *\n * Identity-preserving: a hydrated state returns the same object reference it\n * was given and the pre-stream branch always returns the same module constant,\n * so this is safe to call inside `useStatewireState` selectors.\n */\nexport function readDeepAgentStreamValues(state: unknown): DeepAgentStreamValues {\n return typeof state === 'object' && state !== null\n ? (state as DeepAgentStreamValues)\n : DEEP_AGENT_PRE_STREAM_STATE;\n}\n\n/**\n * Whether a state (raw, or already normalized through\n * {@link readDeepAgentStreamValues}) carries a real wire payload. `false`\n * exactly while the pre-stream default stands in — the explicit signal for\n * code that must distinguish \"empty thread\" from \"no snapshot yet\".\n */\nexport function isDeepAgentStateHydrated(state: unknown): boolean {\n return typeof state === 'object' && state !== null && state !== DEEP_AGENT_PRE_STREAM_STATE;\n}\n\n/**\n * The thread whose attach produced each state `useDeepAgentThread`'s\n * converter publishes.\n *\n * A thread switch commits the incoming thread's per-attach children (keyed by\n * thread) in the same render that hands the assistant-ui client the new thread\n * element, but the client's projected thread state only changes once that\n * element's resource re-renders: a child's first render still reads the\n * OUTGOING attach's state. A binding that writes a lane of that state into the\n * new thread's storage — the server config lane, mirrored into the panel config\n * and the version that narrows every send — would hand the new thread the\n * previous thread's values. Pairing each state with its thread lets such a\n * binding ignore a state its own thread did not produce.\n *\n * Kept beside the state rather than on it: the state is the replicated wire\n * document that the snapshot cache remembers and other readers compare, so a\n * client-only key would ride every one of them.\n */\nconst stateThreadIds = new WeakMap<object, string>();\n\n/** Record that `threadId`'s attach produced `state` (the converter's output). */\nexport function pairDeepAgentStateWithThread({\n state,\n threadId,\n}: {\n state: object;\n threadId: string;\n}): void {\n stateThreadIds.set(state, threadId);\n}\n\n/**\n * The thread whose attach produced `state`, or `null` for a state no deep-agent\n * converter published (the pre-stream default, a state built elsewhere).\n */\nexport function readDeepAgentStateThreadId(state: unknown): string | null {\n return typeof state === 'object' && state !== null ? (stateThreadIds.get(state) ?? null) : null;\n}\n"],"names":[],"mappings":";;AAkBA,MAAM,iBAAwC,EAAE,UAAU,IAAI,OAAO,CAAA,EAAC;AACtE,OAAO,OAAO,eAAe,QAAQ;AACrC,OAAO,OAAO,eAAe,KAAK;AAC3B,MAAM,8BAAqD,OAAO,OAAO,cAAc;AAWvF,SAAS,0BAA0B,OAAuC;AAC/E,SAAO,OAAO,UAAU,YAAY,UAAU,OACzC,QACD;AACN;AAQO,SAAS,yBAAyB,OAAyB;AAChE,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU;AAClE;AAoBA,MAAM,qCAAqB,QAAA;AAGpB,SAAS,6BAA6B;AAAA,EAC3C;AAAA,EACA;AACF,GAGS;AACP,iBAAe,IAAI,OAAO,QAAQ;AACpC;AAMO,SAAS,2BAA2B,OAA+B;AACxE,SAAO,OAAO,UAAU,YAAY,UAAU,OAAQ,eAAe,IAAI,KAAK,KAAK,OAAQ;AAC7F;;;;;;"}
@@ -15,10 +15,14 @@ function pairDeepAgentStateWithThread({
15
15
  }) {
16
16
  stateThreadIds.set(state, threadId);
17
17
  }
18
+ function readDeepAgentStateThreadId(state) {
19
+ return typeof state === "object" && state !== null ? stateThreadIds.get(state) ?? null : null;
20
+ }
18
21
  export {
19
22
  DEEP_AGENT_PRE_STREAM_STATE,
20
23
  isDeepAgentStateHydrated,
21
24
  pairDeepAgentStateWithThread,
25
+ readDeepAgentStateThreadId,
22
26
  readDeepAgentStreamValues
23
27
  };
24
28
  //# sourceMappingURL=statewire-state.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"statewire-state.js","sources":["../../../../agent-runtime/src/statewire-state.ts"],"sourcesContent":["import type { DeepAgentStreamValues } from './types';\n\n/**\n * Typed pre-stream default for the deep-agent statewire state.\n *\n * The statewire client's replicated state is `undefined` (and can transiently\n * be `null`/non-object on a replay boundary) until an attach snapshot applies —\n * `@assistant-ui/react-statewire` derives its `\"loading\"` thread status from\n * exactly that absence, so the raw wire value must keep carrying it. Consumers\n * of OUR conversion layer, however, should never have to null-check the whole\n * state: they read through {@link readDeepAgentStreamValues}, which substitutes\n * this constant while the state is not hydrated.\n *\n * Module-level constant on purpose: selector fallbacks must be referentially\n * stable (`useStatewireState` compares selector results with `Object.is`, so a\n * fresh `[]`/`{}` per call re-renders forever). Frozen so a consumer cannot\n * mutate the shared default.\n */\nconst preStreamState: DeepAgentStreamValues = { messages: [], todos: [] };\nObject.freeze(preStreamState.messages);\nObject.freeze(preStreamState.todos);\nexport const DEEP_AGENT_PRE_STREAM_STATE: DeepAgentStreamValues = Object.freeze(preStreamState);\n\n/**\n * Read the deep-agent stream values off a raw statewire state, substituting\n * {@link DEEP_AGENT_PRE_STREAM_STATE} while the state is not an object yet\n * (pre-attach, or a replay boundary republishing `undefined`).\n *\n * Identity-preserving: a hydrated state returns the same object reference it\n * was given and the pre-stream branch always returns the same module constant,\n * so this is safe to call inside `useStatewireState` selectors.\n */\nexport function readDeepAgentStreamValues(state: unknown): DeepAgentStreamValues {\n return typeof state === 'object' && state !== null\n ? (state as DeepAgentStreamValues)\n : DEEP_AGENT_PRE_STREAM_STATE;\n}\n\n/**\n * Whether a state (raw, or already normalized through\n * {@link readDeepAgentStreamValues}) carries a real wire payload. `false`\n * exactly while the pre-stream default stands in — the explicit signal for\n * code that must distinguish \"empty thread\" from \"no snapshot yet\".\n */\nexport function isDeepAgentStateHydrated(state: unknown): boolean {\n return typeof state === 'object' && state !== null && state !== DEEP_AGENT_PRE_STREAM_STATE;\n}\n\n/**\n * The thread whose attach produced each state `useDeepAgentThread`'s\n * converter publishes.\n *\n * A thread switch commits the incoming thread's per-attach children (keyed by\n * thread) in the same render that hands the assistant-ui client the new thread\n * element, but the client's projected thread state only changes once that\n * element's resource re-renders: a child's first render still reads the\n * OUTGOING attach's state. A binding that writes a lane of that state into the\n * new thread's storage — the server config lane, mirrored into the panel config\n * and the version that narrows every send — would hand the new thread the\n * previous thread's values. Pairing each state with its thread lets such a\n * binding ignore a state its own thread did not produce.\n *\n * Kept beside the state rather than on it: the state is the replicated wire\n * document that the snapshot cache remembers and other readers compare, so a\n * client-only key would ride every one of them.\n */\nconst stateThreadIds = new WeakMap<object, string>();\n\n/** Record that `threadId`'s attach produced `state` (the converter's output). */\nexport function pairDeepAgentStateWithThread({\n state,\n threadId,\n}: {\n state: object;\n threadId: string;\n}): void {\n stateThreadIds.set(state, threadId);\n}\n\n/**\n * The thread whose attach produced `state`, or `null` for a state no deep-agent\n * converter published (the pre-stream default, a state built elsewhere).\n */\nexport function readDeepAgentStateThreadId(state: unknown): string | null {\n return typeof state === 'object' && state !== null ? (stateThreadIds.get(state) ?? null) : null;\n}\n"],"names":[],"mappings":"AAkBA,MAAM,iBAAwC,EAAE,UAAU,IAAI,OAAO,CAAA,EAAC;AACtE,OAAO,OAAO,eAAe,QAAQ;AACrC,OAAO,OAAO,eAAe,KAAK;AAC3B,MAAM,8BAAqD,OAAO,OAAO,cAAc;AAWvF,SAAS,0BAA0B,OAAuC;AAC/E,SAAO,OAAO,UAAU,YAAY,UAAU,OACzC,QACD;AACN;AAQO,SAAS,yBAAyB,OAAyB;AAChE,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU;AAClE;AAoBA,MAAM,qCAAqB,QAAA;AAGpB,SAAS,6BAA6B;AAAA,EAC3C;AAAA,EACA;AACF,GAGS;AACP,iBAAe,IAAI,OAAO,QAAQ;AACpC;"}
1
+ {"version":3,"file":"statewire-state.js","sources":["../../../../agent-runtime/src/statewire-state.ts"],"sourcesContent":["import type { DeepAgentStreamValues } from './types';\n\n/**\n * Typed pre-stream default for the deep-agent statewire state.\n *\n * The statewire client's replicated state is `undefined` (and can transiently\n * be `null`/non-object on a replay boundary) until an attach snapshot applies —\n * `@assistant-ui/react-statewire` derives its `\"loading\"` thread status from\n * exactly that absence, so the raw wire value must keep carrying it. Consumers\n * of OUR conversion layer, however, should never have to null-check the whole\n * state: they read through {@link readDeepAgentStreamValues}, which substitutes\n * this constant while the state is not hydrated.\n *\n * Module-level constant on purpose: selector fallbacks must be referentially\n * stable (`useStatewireState` compares selector results with `Object.is`, so a\n * fresh `[]`/`{}` per call re-renders forever). Frozen so a consumer cannot\n * mutate the shared default.\n */\nconst preStreamState: DeepAgentStreamValues = { messages: [], todos: [] };\nObject.freeze(preStreamState.messages);\nObject.freeze(preStreamState.todos);\nexport const DEEP_AGENT_PRE_STREAM_STATE: DeepAgentStreamValues = Object.freeze(preStreamState);\n\n/**\n * Read the deep-agent stream values off a raw statewire state, substituting\n * {@link DEEP_AGENT_PRE_STREAM_STATE} while the state is not an object yet\n * (pre-attach, or a replay boundary republishing `undefined`).\n *\n * Identity-preserving: a hydrated state returns the same object reference it\n * was given and the pre-stream branch always returns the same module constant,\n * so this is safe to call inside `useStatewireState` selectors.\n */\nexport function readDeepAgentStreamValues(state: unknown): DeepAgentStreamValues {\n return typeof state === 'object' && state !== null\n ? (state as DeepAgentStreamValues)\n : DEEP_AGENT_PRE_STREAM_STATE;\n}\n\n/**\n * Whether a state (raw, or already normalized through\n * {@link readDeepAgentStreamValues}) carries a real wire payload. `false`\n * exactly while the pre-stream default stands in — the explicit signal for\n * code that must distinguish \"empty thread\" from \"no snapshot yet\".\n */\nexport function isDeepAgentStateHydrated(state: unknown): boolean {\n return typeof state === 'object' && state !== null && state !== DEEP_AGENT_PRE_STREAM_STATE;\n}\n\n/**\n * The thread whose attach produced each state `useDeepAgentThread`'s\n * converter publishes.\n *\n * A thread switch commits the incoming thread's per-attach children (keyed by\n * thread) in the same render that hands the assistant-ui client the new thread\n * element, but the client's projected thread state only changes once that\n * element's resource re-renders: a child's first render still reads the\n * OUTGOING attach's state. A binding that writes a lane of that state into the\n * new thread's storage — the server config lane, mirrored into the panel config\n * and the version that narrows every send — would hand the new thread the\n * previous thread's values. Pairing each state with its thread lets such a\n * binding ignore a state its own thread did not produce.\n *\n * Kept beside the state rather than on it: the state is the replicated wire\n * document that the snapshot cache remembers and other readers compare, so a\n * client-only key would ride every one of them.\n */\nconst stateThreadIds = new WeakMap<object, string>();\n\n/** Record that `threadId`'s attach produced `state` (the converter's output). */\nexport function pairDeepAgentStateWithThread({\n state,\n threadId,\n}: {\n state: object;\n threadId: string;\n}): void {\n stateThreadIds.set(state, threadId);\n}\n\n/**\n * The thread whose attach produced `state`, or `null` for a state no deep-agent\n * converter published (the pre-stream default, a state built elsewhere).\n */\nexport function readDeepAgentStateThreadId(state: unknown): string | null {\n return typeof state === 'object' && state !== null ? (stateThreadIds.get(state) ?? null) : null;\n}\n"],"names":[],"mappings":"AAkBA,MAAM,iBAAwC,EAAE,UAAU,IAAI,OAAO,CAAA,EAAC;AACtE,OAAO,OAAO,eAAe,QAAQ;AACrC,OAAO,OAAO,eAAe,KAAK;AAC3B,MAAM,8BAAqD,OAAO,OAAO,cAAc;AAWvF,SAAS,0BAA0B,OAAuC;AAC/E,SAAO,OAAO,UAAU,YAAY,UAAU,OACzC,QACD;AACN;AAQO,SAAS,yBAAyB,OAAyB;AAChE,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU;AAClE;AAoBA,MAAM,qCAAqB,QAAA;AAGpB,SAAS,6BAA6B;AAAA,EAC3C;AAAA,EACA;AACF,GAGS;AACP,iBAAe,IAAI,OAAO,QAAQ;AACpC;AAMO,SAAS,2BAA2B,OAA+B;AACxE,SAAO,OAAO,UAAU,YAAY,UAAU,OAAQ,eAAe,IAAI,KAAK,KAAK,OAAQ;AAC7F;"}
@@ -1,11 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const statewire = require("statewire");
4
+ const chatOutboxPolicy = require("./chat-outbox-policy.cjs");
4
5
  const DEEP_AGENT_STATEWIRE_PROTOCOL = "athena";
5
- const DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION = "2026-09-13";
6
+ const DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION = "2026-11-04";
7
+ const DEEP_AGENT_LEGACY_STATEWIRE_PROTOCOL_VERSION = "2026-09-13";
6
8
  const DEEP_AGENT_STATEWIRE_WIRE_VERSION = {
7
- version: "2026-09-30"
9
+ version: "2026-11-01"
8
10
  };
11
+ const canOvertake = { [DEEP_AGENT_STATEWIRE_PROTOCOL]: chatOutboxPolicy.athenaCanOvertake };
9
12
  function resolveStatewireTransportKind({ sse }) {
10
13
  return sse ? "sse" : "websocket";
11
14
  }
@@ -19,13 +22,16 @@ const statewireTransport = (options, { sse = false } = {}) => resolveStatewireTr
19
22
  protocol: DEEP_AGENT_STATEWIRE_PROTOCOL,
20
23
  wireVersion: DEEP_AGENT_STATEWIRE_WIRE_VERSION,
21
24
  applicationProtocols,
25
+ canOvertake,
22
26
  ...options
23
27
  }) : statewire.StatewireWebsocket({
24
28
  protocol: DEEP_AGENT_STATEWIRE_PROTOCOL,
25
29
  wireVersion: DEEP_AGENT_STATEWIRE_WIRE_VERSION,
26
30
  applicationProtocols,
31
+ canOvertake,
27
32
  ...options
28
33
  });
34
+ exports.DEEP_AGENT_LEGACY_STATEWIRE_PROTOCOL_VERSION = DEEP_AGENT_LEGACY_STATEWIRE_PROTOCOL_VERSION;
29
35
  exports.DEEP_AGENT_STATEWIRE_PROTOCOL = DEEP_AGENT_STATEWIRE_PROTOCOL;
30
36
  exports.DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION = DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION;
31
37
  exports.DEEP_AGENT_STATEWIRE_WIRE_VERSION = DEEP_AGENT_STATEWIRE_WIRE_VERSION;
@@ -1 +1 @@
1
- {"version":3,"file":"statewire-transport.cjs","sources":["../../../../agent-runtime/src/statewire-transport.ts"],"sourcesContent":["import { type Statewire, type StatewireClient, StatewireHttp, StatewireWebsocket } from 'statewire';\nimport type { DeepAgentStreamValues } from './types';\n\nexport type StatewireTransportOptions = StatewireClient.HttpOptions &\n StatewireClient.WebsocketOptions;\n\n/**\n * The application protocol the deep-agent transport stamps on every command.\n * The thread client must declare the same protocol: statewire's core applies\n * its optimistic folds only to commands of its own protocol, so a mismatch\n * leaves a send invisible until the server's frame lands.\n */\nexport const DEEP_AGENT_STATEWIRE_PROTOCOL = 'athena';\n\n/** Durable Athena commands keep their schema version across wire upgrades. */\nexport const DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION = '2026-09-13';\n\n/**\n * The wire contract every deep-agent transport offers. Athena's hosts (Python\n * statewire 0.20) speak 2026-09-30 natively, so no legacy context range is\n * advertised.\n */\nexport const DEEP_AGENT_STATEWIRE_WIRE_VERSION: NonNullable<\n StatewireTransportOptions['wireVersion']\n> = {\n version: '2026-09-30',\n};\n\nexport type StatewireTransportKind = 'sse' | 'websocket';\n\n/**\n * The transport a host gets: SSE when it asks for SSE, WebSocket otherwise.\n * Whatever instruments the transport must read this too, so it matches the\n * transport actually built.\n */\nexport function resolveStatewireTransportKind({ sse }: { sse: boolean }): StatewireTransportKind {\n return sse ? 'sse' : 'websocket';\n}\n\nconst applicationProtocols = [\n {\n name: DEEP_AGENT_STATEWIRE_PROTOCOL,\n version: DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION,\n },\n];\n\n/**\n * Build the deep-agent statewire transport: WebSocket by default, SSE when the\n * host app's toggle asks for it ({@link resolveStatewireTransportKind}). The\n * toggle source is host-specific (env var, extension flag, config store), so\n * the caller resolves it to a boolean.\n *\n * `TState` defaults to the deep-agent wire shape: the thread mounts that make\n * up nearly every caller get a typed state without naming it, and the other\n * mounts (the conversation index) name theirs.\n */\nexport const statewireTransport = <\n TState = DeepAgentStreamValues,\n TCommands extends Statewire.Commands = Statewire.Commands,\n>(\n options: StatewireTransportOptions,\n { sse = false }: { sse?: boolean } = {}\n) =>\n resolveStatewireTransportKind({ sse }) === 'sse'\n ? StatewireHttp<TState, TCommands>({\n protocol: DEEP_AGENT_STATEWIRE_PROTOCOL,\n wireVersion: DEEP_AGENT_STATEWIRE_WIRE_VERSION,\n applicationProtocols,\n ...options,\n })\n : StatewireWebsocket<TState, TCommands>({\n protocol: DEEP_AGENT_STATEWIRE_PROTOCOL,\n wireVersion: DEEP_AGENT_STATEWIRE_WIRE_VERSION,\n applicationProtocols,\n ...options,\n });\n"],"names":["StatewireHttp","StatewireWebsocket"],"mappings":";;;AAYO,MAAM,gCAAgC;AAGtC,MAAM,wCAAwC;AAO9C,MAAM,oCAET;AAAA,EACF,SAAS;AACX;AASO,SAAS,8BAA8B,EAAE,OAAiD;AAC/F,SAAO,MAAM,QAAQ;AACvB;AAEA,MAAM,uBAAuB;AAAA,EAC3B;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb;AAYO,MAAM,qBAAqB,CAIhC,SACA,EAAE,MAAM,MAAA,IAA6B,OAErC,8BAA8B,EAAE,IAAA,CAAK,MAAM,QACvCA,UAAAA,cAAiC;AAAA,EAC/B,UAAU;AAAA,EACV,aAAa;AAAA,EACb;AAAA,EACA,GAAG;AACL,CAAC,IACDC,UAAAA,mBAAsC;AAAA,EACpC,UAAU;AAAA,EACV,aAAa;AAAA,EACb;AAAA,EACA,GAAG;AACL,CAAC;;;;;;"}
1
+ {"version":3,"file":"statewire-transport.cjs","sources":["../../../../agent-runtime/src/statewire-transport.ts"],"sourcesContent":["import { type Statewire, type StatewireClient, StatewireHttp, StatewireWebsocket } from 'statewire';\nimport { athenaCanOvertake } from './chat-outbox-policy';\nimport type { DeepAgentStreamValues } from './types';\n\nexport type StatewireTransportOptions = StatewireClient.HttpOptions &\n StatewireClient.WebsocketOptions;\n\n/**\n * The application protocol the deep-agent transport stamps on every command.\n * The thread client must declare the same protocol: statewire's core applies\n * its optimistic folds only to commands of its own protocol, so a mismatch\n * leaves a send invisible until the server's frame lands.\n */\nexport const DEEP_AGENT_STATEWIRE_PROTOCOL = 'athena';\n\n/**\n * The athena command contract this client speaks: 2026-11-04 sends every user\n * message as `run/send` with a behavior. Hosts adapt attaches that negotiate\n * 2026-09-13 (`run/enqueue`, `run/steer`, `run/steer-live`, `run/prioritize`),\n * so installed clients keep working; this client offers only 2026-11-04.\n */\nexport const DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION = '2026-11-04';\n\n/** The athena contract before `run/send`; statements stored under it are upgraded on load. */\nexport const DEEP_AGENT_LEGACY_STATEWIRE_PROTOCOL_VERSION = '2026-09-13';\n\n/**\n * The wire contract every deep-agent transport offers: 2026-11-01 only. The\n * client always sends the attach results cursor and never re-sends a stamped\n * seq, which a 2026-09-30 attach refuses, so no older range is offered.\n * Athena's hosts (Python statewire 0.21.1 on) serve 2026-09-30 through\n * 2026-11-01, so older clients keep attaching.\n */\nexport const DEEP_AGENT_STATEWIRE_WIRE_VERSION: NonNullable<\n StatewireTransportOptions['wireVersion']\n> = {\n version: '2026-11-01',\n};\n\n/**\n * The outbox ordering of Athena's lane (`chat-outbox-policy.ts`): a message\n * never passes a held or waiting one; stop, tool results and input replies\n * pass everything. A host's own `canOvertake` option wins.\n */\nconst canOvertake = { [DEEP_AGENT_STATEWIRE_PROTOCOL]: athenaCanOvertake };\n\nexport type StatewireTransportKind = 'sse' | 'websocket';\n\n/**\n * The transport a host gets: SSE when it asks for SSE, WebSocket otherwise.\n * Whatever instruments the transport must read this too, so it matches the\n * transport actually built.\n */\nexport function resolveStatewireTransportKind({ sse }: { sse: boolean }): StatewireTransportKind {\n return sse ? 'sse' : 'websocket';\n}\n\nconst applicationProtocols = [\n {\n name: DEEP_AGENT_STATEWIRE_PROTOCOL,\n version: DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION,\n },\n];\n\n/**\n * Build the deep-agent statewire transport: WebSocket by default, SSE when the\n * host app's toggle asks for it ({@link resolveStatewireTransportKind}). The\n * toggle source is host-specific (env var, extension flag, config store), so\n * the caller resolves it to a boolean.\n *\n * `TState` defaults to the deep-agent wire shape: the thread mounts that make\n * up nearly every caller get a typed state without naming it, and the other\n * mounts (the conversation index) name theirs.\n */\nexport const statewireTransport = <\n TState = DeepAgentStreamValues,\n TCommands extends Statewire.Commands = Statewire.Commands,\n>(\n options: StatewireTransportOptions,\n { sse = false }: { sse?: boolean } = {}\n) =>\n resolveStatewireTransportKind({ sse }) === 'sse'\n ? StatewireHttp<TState, TCommands>({\n protocol: DEEP_AGENT_STATEWIRE_PROTOCOL,\n wireVersion: DEEP_AGENT_STATEWIRE_WIRE_VERSION,\n applicationProtocols,\n canOvertake,\n ...options,\n })\n : StatewireWebsocket<TState, TCommands>({\n protocol: DEEP_AGENT_STATEWIRE_PROTOCOL,\n wireVersion: DEEP_AGENT_STATEWIRE_WIRE_VERSION,\n applicationProtocols,\n canOvertake,\n ...options,\n });\n"],"names":["athenaCanOvertake","StatewireHttp","StatewireWebsocket"],"mappings":";;;;AAaO,MAAM,gCAAgC;AAQtC,MAAM,wCAAwC;AAG9C,MAAM,+CAA+C;AASrD,MAAM,oCAET;AAAA,EACF,SAAS;AACX;AAOA,MAAM,cAAc,EAAE,CAAC,6BAA6B,GAAGA,mCAAA;AAShD,SAAS,8BAA8B,EAAE,OAAiD;AAC/F,SAAO,MAAM,QAAQ;AACvB;AAEA,MAAM,uBAAuB;AAAA,EAC3B;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb;AAYO,MAAM,qBAAqB,CAIhC,SACA,EAAE,MAAM,MAAA,IAA6B,OAErC,8BAA8B,EAAE,IAAA,CAAK,MAAM,QACvCC,UAAAA,cAAiC;AAAA,EAC/B,UAAU;AAAA,EACV,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,GAAG;AACL,CAAC,IACDC,UAAAA,mBAAsC;AAAA,EACpC,UAAU;AAAA,EACV,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,GAAG;AACL,CAAC;;;;;;;"}
@@ -8,12 +8,21 @@ export type StatewireTransportOptions = StatewireClient.HttpOptions & StatewireC
8
8
  * leaves a send invisible until the server's frame lands.
9
9
  */
10
10
  export declare const DEEP_AGENT_STATEWIRE_PROTOCOL = "athena";
11
- /** Durable Athena commands keep their schema version across wire upgrades. */
12
- export declare const DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION = "2026-09-13";
13
11
  /**
14
- * The wire contract every deep-agent transport offers. Athena's hosts (Python
15
- * statewire 0.20) speak 2026-09-30 natively, so no legacy context range is
16
- * advertised.
12
+ * The athena command contract this client speaks: 2026-11-04 sends every user
13
+ * message as `run/send` with a behavior. Hosts adapt attaches that negotiate
14
+ * 2026-09-13 (`run/enqueue`, `run/steer`, `run/steer-live`, `run/prioritize`),
15
+ * so installed clients keep working; this client offers only 2026-11-04.
16
+ */
17
+ export declare const DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION = "2026-11-04";
18
+ /** The athena contract before `run/send`; statements stored under it are upgraded on load. */
19
+ export declare const DEEP_AGENT_LEGACY_STATEWIRE_PROTOCOL_VERSION = "2026-09-13";
20
+ /**
21
+ * The wire contract every deep-agent transport offers: 2026-11-01 only. The
22
+ * client always sends the attach results cursor and never re-sends a stamped
23
+ * seq, which a 2026-09-30 attach refuses, so no older range is offered.
24
+ * Athena's hosts (Python statewire 0.21.1 on) serve 2026-09-30 through
25
+ * 2026-11-01, so older clients keep attaching.
17
26
  */
18
27
  export declare const DEEP_AGENT_STATEWIRE_WIRE_VERSION: NonNullable<StatewireTransportOptions['wireVersion']>;
19
28
  export type StatewireTransportKind = 'sse' | 'websocket';
@@ -1,9 +1,12 @@
1
1
  import { StatewireHttp, StatewireWebsocket } from "statewire";
2
+ import { athenaCanOvertake } from "./chat-outbox-policy.js";
2
3
  const DEEP_AGENT_STATEWIRE_PROTOCOL = "athena";
3
- const DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION = "2026-09-13";
4
+ const DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION = "2026-11-04";
5
+ const DEEP_AGENT_LEGACY_STATEWIRE_PROTOCOL_VERSION = "2026-09-13";
4
6
  const DEEP_AGENT_STATEWIRE_WIRE_VERSION = {
5
- version: "2026-09-30"
7
+ version: "2026-11-01"
6
8
  };
9
+ const canOvertake = { [DEEP_AGENT_STATEWIRE_PROTOCOL]: athenaCanOvertake };
7
10
  function resolveStatewireTransportKind({ sse }) {
8
11
  return sse ? "sse" : "websocket";
9
12
  }
@@ -17,14 +20,17 @@ const statewireTransport = (options, { sse = false } = {}) => resolveStatewireTr
17
20
  protocol: DEEP_AGENT_STATEWIRE_PROTOCOL,
18
21
  wireVersion: DEEP_AGENT_STATEWIRE_WIRE_VERSION,
19
22
  applicationProtocols,
23
+ canOvertake,
20
24
  ...options
21
25
  }) : StatewireWebsocket({
22
26
  protocol: DEEP_AGENT_STATEWIRE_PROTOCOL,
23
27
  wireVersion: DEEP_AGENT_STATEWIRE_WIRE_VERSION,
24
28
  applicationProtocols,
29
+ canOvertake,
25
30
  ...options
26
31
  });
27
32
  export {
33
+ DEEP_AGENT_LEGACY_STATEWIRE_PROTOCOL_VERSION,
28
34
  DEEP_AGENT_STATEWIRE_PROTOCOL,
29
35
  DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION,
30
36
  DEEP_AGENT_STATEWIRE_WIRE_VERSION,
@@ -1 +1 @@
1
- {"version":3,"file":"statewire-transport.js","sources":["../../../../agent-runtime/src/statewire-transport.ts"],"sourcesContent":["import { type Statewire, type StatewireClient, StatewireHttp, StatewireWebsocket } from 'statewire';\nimport type { DeepAgentStreamValues } from './types';\n\nexport type StatewireTransportOptions = StatewireClient.HttpOptions &\n StatewireClient.WebsocketOptions;\n\n/**\n * The application protocol the deep-agent transport stamps on every command.\n * The thread client must declare the same protocol: statewire's core applies\n * its optimistic folds only to commands of its own protocol, so a mismatch\n * leaves a send invisible until the server's frame lands.\n */\nexport const DEEP_AGENT_STATEWIRE_PROTOCOL = 'athena';\n\n/** Durable Athena commands keep their schema version across wire upgrades. */\nexport const DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION = '2026-09-13';\n\n/**\n * The wire contract every deep-agent transport offers. Athena's hosts (Python\n * statewire 0.20) speak 2026-09-30 natively, so no legacy context range is\n * advertised.\n */\nexport const DEEP_AGENT_STATEWIRE_WIRE_VERSION: NonNullable<\n StatewireTransportOptions['wireVersion']\n> = {\n version: '2026-09-30',\n};\n\nexport type StatewireTransportKind = 'sse' | 'websocket';\n\n/**\n * The transport a host gets: SSE when it asks for SSE, WebSocket otherwise.\n * Whatever instruments the transport must read this too, so it matches the\n * transport actually built.\n */\nexport function resolveStatewireTransportKind({ sse }: { sse: boolean }): StatewireTransportKind {\n return sse ? 'sse' : 'websocket';\n}\n\nconst applicationProtocols = [\n {\n name: DEEP_AGENT_STATEWIRE_PROTOCOL,\n version: DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION,\n },\n];\n\n/**\n * Build the deep-agent statewire transport: WebSocket by default, SSE when the\n * host app's toggle asks for it ({@link resolveStatewireTransportKind}). The\n * toggle source is host-specific (env var, extension flag, config store), so\n * the caller resolves it to a boolean.\n *\n * `TState` defaults to the deep-agent wire shape: the thread mounts that make\n * up nearly every caller get a typed state without naming it, and the other\n * mounts (the conversation index) name theirs.\n */\nexport const statewireTransport = <\n TState = DeepAgentStreamValues,\n TCommands extends Statewire.Commands = Statewire.Commands,\n>(\n options: StatewireTransportOptions,\n { sse = false }: { sse?: boolean } = {}\n) =>\n resolveStatewireTransportKind({ sse }) === 'sse'\n ? StatewireHttp<TState, TCommands>({\n protocol: DEEP_AGENT_STATEWIRE_PROTOCOL,\n wireVersion: DEEP_AGENT_STATEWIRE_WIRE_VERSION,\n applicationProtocols,\n ...options,\n })\n : StatewireWebsocket<TState, TCommands>({\n protocol: DEEP_AGENT_STATEWIRE_PROTOCOL,\n wireVersion: DEEP_AGENT_STATEWIRE_WIRE_VERSION,\n applicationProtocols,\n ...options,\n });\n"],"names":[],"mappings":";AAYO,MAAM,gCAAgC;AAGtC,MAAM,wCAAwC;AAO9C,MAAM,oCAET;AAAA,EACF,SAAS;AACX;AASO,SAAS,8BAA8B,EAAE,OAAiD;AAC/F,SAAO,MAAM,QAAQ;AACvB;AAEA,MAAM,uBAAuB;AAAA,EAC3B;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb;AAYO,MAAM,qBAAqB,CAIhC,SACA,EAAE,MAAM,MAAA,IAA6B,OAErC,8BAA8B,EAAE,IAAA,CAAK,MAAM,QACvC,cAAiC;AAAA,EAC/B,UAAU;AAAA,EACV,aAAa;AAAA,EACb;AAAA,EACA,GAAG;AACL,CAAC,IACD,mBAAsC;AAAA,EACpC,UAAU;AAAA,EACV,aAAa;AAAA,EACb;AAAA,EACA,GAAG;AACL,CAAC;"}
1
+ {"version":3,"file":"statewire-transport.js","sources":["../../../../agent-runtime/src/statewire-transport.ts"],"sourcesContent":["import { type Statewire, type StatewireClient, StatewireHttp, StatewireWebsocket } from 'statewire';\nimport { athenaCanOvertake } from './chat-outbox-policy';\nimport type { DeepAgentStreamValues } from './types';\n\nexport type StatewireTransportOptions = StatewireClient.HttpOptions &\n StatewireClient.WebsocketOptions;\n\n/**\n * The application protocol the deep-agent transport stamps on every command.\n * The thread client must declare the same protocol: statewire's core applies\n * its optimistic folds only to commands of its own protocol, so a mismatch\n * leaves a send invisible until the server's frame lands.\n */\nexport const DEEP_AGENT_STATEWIRE_PROTOCOL = 'athena';\n\n/**\n * The athena command contract this client speaks: 2026-11-04 sends every user\n * message as `run/send` with a behavior. Hosts adapt attaches that negotiate\n * 2026-09-13 (`run/enqueue`, `run/steer`, `run/steer-live`, `run/prioritize`),\n * so installed clients keep working; this client offers only 2026-11-04.\n */\nexport const DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION = '2026-11-04';\n\n/** The athena contract before `run/send`; statements stored under it are upgraded on load. */\nexport const DEEP_AGENT_LEGACY_STATEWIRE_PROTOCOL_VERSION = '2026-09-13';\n\n/**\n * The wire contract every deep-agent transport offers: 2026-11-01 only. The\n * client always sends the attach results cursor and never re-sends a stamped\n * seq, which a 2026-09-30 attach refuses, so no older range is offered.\n * Athena's hosts (Python statewire 0.21.1 on) serve 2026-09-30 through\n * 2026-11-01, so older clients keep attaching.\n */\nexport const DEEP_AGENT_STATEWIRE_WIRE_VERSION: NonNullable<\n StatewireTransportOptions['wireVersion']\n> = {\n version: '2026-11-01',\n};\n\n/**\n * The outbox ordering of Athena's lane (`chat-outbox-policy.ts`): a message\n * never passes a held or waiting one; stop, tool results and input replies\n * pass everything. A host's own `canOvertake` option wins.\n */\nconst canOvertake = { [DEEP_AGENT_STATEWIRE_PROTOCOL]: athenaCanOvertake };\n\nexport type StatewireTransportKind = 'sse' | 'websocket';\n\n/**\n * The transport a host gets: SSE when it asks for SSE, WebSocket otherwise.\n * Whatever instruments the transport must read this too, so it matches the\n * transport actually built.\n */\nexport function resolveStatewireTransportKind({ sse }: { sse: boolean }): StatewireTransportKind {\n return sse ? 'sse' : 'websocket';\n}\n\nconst applicationProtocols = [\n {\n name: DEEP_AGENT_STATEWIRE_PROTOCOL,\n version: DEEP_AGENT_STATEWIRE_PROTOCOL_VERSION,\n },\n];\n\n/**\n * Build the deep-agent statewire transport: WebSocket by default, SSE when the\n * host app's toggle asks for it ({@link resolveStatewireTransportKind}). The\n * toggle source is host-specific (env var, extension flag, config store), so\n * the caller resolves it to a boolean.\n *\n * `TState` defaults to the deep-agent wire shape: the thread mounts that make\n * up nearly every caller get a typed state without naming it, and the other\n * mounts (the conversation index) name theirs.\n */\nexport const statewireTransport = <\n TState = DeepAgentStreamValues,\n TCommands extends Statewire.Commands = Statewire.Commands,\n>(\n options: StatewireTransportOptions,\n { sse = false }: { sse?: boolean } = {}\n) =>\n resolveStatewireTransportKind({ sse }) === 'sse'\n ? StatewireHttp<TState, TCommands>({\n protocol: DEEP_AGENT_STATEWIRE_PROTOCOL,\n wireVersion: DEEP_AGENT_STATEWIRE_WIRE_VERSION,\n applicationProtocols,\n canOvertake,\n ...options,\n })\n : StatewireWebsocket<TState, TCommands>({\n protocol: DEEP_AGENT_STATEWIRE_PROTOCOL,\n wireVersion: DEEP_AGENT_STATEWIRE_WIRE_VERSION,\n applicationProtocols,\n canOvertake,\n ...options,\n });\n"],"names":[],"mappings":";;AAaO,MAAM,gCAAgC;AAQtC,MAAM,wCAAwC;AAG9C,MAAM,+CAA+C;AASrD,MAAM,oCAET;AAAA,EACF,SAAS;AACX;AAOA,MAAM,cAAc,EAAE,CAAC,6BAA6B,GAAG,kBAAA;AAShD,SAAS,8BAA8B,EAAE,OAAiD;AAC/F,SAAO,MAAM,QAAQ;AACvB;AAEA,MAAM,uBAAuB;AAAA,EAC3B;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb;AAYO,MAAM,qBAAqB,CAIhC,SACA,EAAE,MAAM,MAAA,IAA6B,OAErC,8BAA8B,EAAE,IAAA,CAAK,MAAM,QACvC,cAAiC;AAAA,EAC/B,UAAU;AAAA,EACV,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,GAAG;AACL,CAAC,IACD,mBAAsC;AAAA,EACpC,UAAU;AAAA,EACV,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,GAAG;AACL,CAAC;"}