@athenaintel/react 0.41.2 → 0.42.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/README.md +108 -9
  2. package/dist/agent-runtime/src/asset-attachment.d.ts +98 -0
  3. package/dist/agent-runtime/src/athena-asset-drag.d.ts +32 -0
  4. package/dist/agent-runtime/src/auth-denial.d.ts +29 -0
  5. package/dist/agent-runtime/src/chat-outbox-attachments.cjs +41 -0
  6. package/dist/agent-runtime/src/chat-outbox-attachments.cjs.map +1 -0
  7. package/dist/agent-runtime/src/chat-outbox-attachments.d.ts +38 -0
  8. package/dist/agent-runtime/src/chat-outbox-attachments.js +41 -0
  9. package/dist/agent-runtime/src/chat-outbox-attachments.js.map +1 -0
  10. package/dist/agent-runtime/src/chat-outbox-signals.cjs +63 -0
  11. package/dist/agent-runtime/src/chat-outbox-signals.cjs.map +1 -0
  12. package/dist/agent-runtime/src/chat-outbox-signals.d.ts +12 -0
  13. package/dist/agent-runtime/src/chat-outbox-signals.js +63 -0
  14. package/dist/agent-runtime/src/chat-outbox-signals.js.map +1 -0
  15. package/dist/agent-runtime/src/chat-outbox-store.cjs +509 -0
  16. package/dist/agent-runtime/src/chat-outbox-store.cjs.map +1 -0
  17. package/dist/agent-runtime/src/chat-outbox-store.d.ts +203 -0
  18. package/dist/agent-runtime/src/chat-outbox-store.js +509 -0
  19. package/dist/agent-runtime/src/chat-outbox-store.js.map +1 -0
  20. package/dist/agent-runtime/src/chat-outbox-thread.cjs +136 -0
  21. package/dist/agent-runtime/src/chat-outbox-thread.cjs.map +1 -0
  22. package/dist/agent-runtime/src/chat-outbox-thread.d.ts +118 -0
  23. package/dist/agent-runtime/src/chat-outbox-thread.js +136 -0
  24. package/dist/agent-runtime/src/chat-outbox-thread.js.map +1 -0
  25. package/dist/agent-runtime/src/chat-outbox.cjs +696 -0
  26. package/dist/agent-runtime/src/chat-outbox.cjs.map +1 -0
  27. package/dist/agent-runtime/src/chat-outbox.d.ts +285 -0
  28. package/dist/agent-runtime/src/chat-outbox.js +696 -0
  29. package/dist/agent-runtime/src/chat-outbox.js.map +1 -0
  30. package/dist/agent-runtime/src/chat-socket-reachability.d.ts +45 -0
  31. package/dist/agent-runtime/src/client-tool-bridge.d.ts +152 -0
  32. package/dist/agent-runtime/src/client-tools.d.ts +133 -0
  33. package/dist/agent-runtime/src/composer-markdown.cjs +10 -0
  34. package/dist/agent-runtime/src/composer-markdown.cjs.map +1 -1
  35. package/dist/agent-runtime/src/composer-markdown.d.ts +108 -0
  36. package/dist/agent-runtime/src/composer-markdown.js +10 -0
  37. package/dist/agent-runtime/src/composer-markdown.js.map +1 -1
  38. package/dist/agent-runtime/src/config-mutations.d.ts +51 -0
  39. package/dist/agent-runtime/src/conversation-index.d.ts +110 -0
  40. package/dist/agent-runtime/src/conversation-list.d.ts +343 -0
  41. package/dist/agent-runtime/src/deep-agent-transport-recipe.cjs +3 -2
  42. package/dist/agent-runtime/src/deep-agent-transport-recipe.cjs.map +1 -1
  43. package/dist/agent-runtime/src/deep-agent-transport-recipe.d.ts +166 -0
  44. package/dist/agent-runtime/src/deep-agent-transport-recipe.js +3 -2
  45. package/dist/agent-runtime/src/deep-agent-transport-recipe.js.map +1 -1
  46. package/dist/agent-runtime/src/desktop-handoff.d.ts +139 -0
  47. package/dist/agent-runtime/src/durable-thread-snapshot-cache.cjs +158 -0
  48. package/dist/agent-runtime/src/durable-thread-snapshot-cache.cjs.map +1 -0
  49. package/dist/agent-runtime/src/durable-thread-snapshot-cache.d.ts +60 -0
  50. package/dist/agent-runtime/src/durable-thread-snapshot-cache.js +158 -0
  51. package/dist/agent-runtime/src/durable-thread-snapshot-cache.js.map +1 -0
  52. package/dist/agent-runtime/src/edit-command.d.ts +156 -0
  53. package/dist/agent-runtime/src/errors.d.ts +174 -0
  54. package/dist/agent-runtime/src/execute-output.d.ts +31 -0
  55. package/dist/agent-runtime/src/generated/runconfig-contract.cjs +16 -2
  56. package/dist/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
  57. package/dist/agent-runtime/src/generated/runconfig-contract.d.ts +202 -0
  58. package/dist/agent-runtime/src/generated/runconfig-contract.js +16 -2
  59. package/dist/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
  60. package/dist/agent-runtime/src/github-wake-event.d.ts +77 -0
  61. package/dist/agent-runtime/src/index.d.ts +74 -0
  62. package/dist/agent-runtime/src/interrupts.cjs +17 -0
  63. package/dist/agent-runtime/src/interrupts.cjs.map +1 -1
  64. package/dist/agent-runtime/src/interrupts.d.ts +348 -0
  65. package/dist/agent-runtime/src/interrupts.js +17 -0
  66. package/dist/agent-runtime/src/interrupts.js.map +1 -1
  67. package/dist/agent-runtime/src/lane-follow.d.ts +121 -0
  68. package/dist/agent-runtime/src/lane-history.cjs +209 -0
  69. package/dist/agent-runtime/src/lane-history.cjs.map +1 -0
  70. package/dist/agent-runtime/src/lane-history.d.ts +175 -0
  71. package/dist/agent-runtime/src/lane-history.js +209 -0
  72. package/dist/agent-runtime/src/lane-history.js.map +1 -0
  73. package/dist/agent-runtime/src/lane-images.d.ts +184 -0
  74. package/dist/agent-runtime/src/message-author.d.ts +43 -0
  75. package/dist/agent-runtime/src/message-text.cjs +15 -0
  76. package/dist/agent-runtime/src/message-text.cjs.map +1 -0
  77. package/dist/agent-runtime/src/message-text.d.ts +47 -0
  78. package/dist/agent-runtime/src/message-text.js +15 -0
  79. package/dist/agent-runtime/src/message-text.js.map +1 -0
  80. package/dist/agent-runtime/src/message-window.cjs +15 -1
  81. package/dist/agent-runtime/src/message-window.cjs.map +1 -1
  82. package/dist/agent-runtime/src/message-window.d.ts +159 -0
  83. package/dist/agent-runtime/src/message-window.js +16 -2
  84. package/dist/agent-runtime/src/message-window.js.map +1 -1
  85. package/dist/agent-runtime/src/messages.cjs +88 -4
  86. package/dist/agent-runtime/src/messages.cjs.map +1 -1
  87. package/dist/agent-runtime/src/messages.d.ts +603 -0
  88. package/dist/agent-runtime/src/messages.js +88 -4
  89. package/dist/agent-runtime/src/messages.js.map +1 -1
  90. package/dist/agent-runtime/src/model-context.d.ts +22 -0
  91. package/dist/agent-runtime/src/offline-status.d.ts +157 -0
  92. package/dist/agent-runtime/src/optimistic-content.d.ts +21 -0
  93. package/dist/agent-runtime/src/protocol.cjs +12 -4
  94. package/dist/agent-runtime/src/protocol.cjs.map +1 -1
  95. package/dist/agent-runtime/src/protocol.d.ts +119 -0
  96. package/dist/agent-runtime/src/protocol.js +13 -5
  97. package/dist/agent-runtime/src/protocol.js.map +1 -1
  98. package/dist/agent-runtime/src/ptc-subcalls.d.ts +51 -0
  99. package/dist/agent-runtime/src/queue.d.ts +138 -0
  100. package/dist/agent-runtime/src/quota-safe-local-storage-session.d.ts +154 -0
  101. package/dist/agent-runtime/src/running-tool-placeholder.cjs +11 -0
  102. package/dist/agent-runtime/src/running-tool-placeholder.cjs.map +1 -0
  103. package/dist/agent-runtime/src/running-tool-placeholder.d.ts +25 -0
  104. package/dist/agent-runtime/src/running-tool-placeholder.js +11 -0
  105. package/dist/agent-runtime/src/running-tool-placeholder.js.map +1 -0
  106. package/dist/agent-runtime/src/runtime-messages.d.ts +104 -0
  107. package/dist/agent-runtime/src/screen-point.d.ts +151 -0
  108. package/dist/agent-runtime/src/sealed-idb.cjs +112 -0
  109. package/dist/agent-runtime/src/sealed-idb.cjs.map +1 -0
  110. package/dist/agent-runtime/src/sealed-idb.d.ts +106 -0
  111. package/dist/agent-runtime/src/sealed-idb.js +112 -0
  112. package/dist/agent-runtime/src/sealed-idb.js.map +1 -0
  113. package/dist/agent-runtime/src/send-recovery.d.ts +40 -0
  114. package/dist/agent-runtime/src/statewire-attach-observer.d.ts +194 -0
  115. package/dist/agent-runtime/src/statewire-diagnostics.d.ts +74 -0
  116. package/dist/agent-runtime/src/statewire-state.d.ts +29 -0
  117. package/dist/agent-runtime/src/statewire-suspended.cjs.map +1 -1
  118. package/dist/agent-runtime/src/statewire-suspended.d.ts +27 -0
  119. package/dist/agent-runtime/src/statewire-suspended.js.map +1 -1
  120. package/dist/agent-runtime/src/statewire-transport.d.ts +40 -0
  121. package/dist/agent-runtime/src/streaming-markdown.d.ts +46 -0
  122. package/dist/agent-runtime/src/subagent-transcripts.cjs +209 -0
  123. package/dist/agent-runtime/src/subagent-transcripts.cjs.map +1 -0
  124. package/dist/agent-runtime/src/subagent-transcripts.d.ts +71 -0
  125. package/dist/agent-runtime/src/subagent-transcripts.js +209 -0
  126. package/dist/agent-runtime/src/subagent-transcripts.js.map +1 -0
  127. package/dist/agent-runtime/src/subagents.cjs +253 -0
  128. package/dist/agent-runtime/src/subagents.cjs.map +1 -0
  129. package/dist/agent-runtime/src/subagents.d.ts +311 -0
  130. package/dist/agent-runtime/src/subagents.js +253 -0
  131. package/dist/agent-runtime/src/subagents.js.map +1 -0
  132. package/dist/agent-runtime/src/subscription-wake-event.d.ts +111 -0
  133. package/dist/agent-runtime/src/thread-extras.d.ts +43 -0
  134. package/dist/agent-runtime/src/thread-handoff.d.ts +364 -0
  135. package/dist/agent-runtime/src/thread-prewarm-controller.d.ts +76 -0
  136. package/dist/agent-runtime/src/thread-prewarm.d.ts +118 -0
  137. package/dist/agent-runtime/src/thread-snapshot-cache.d.ts +99 -0
  138. package/dist/agent-runtime/src/thread-snapshot-mirror.cjs +329 -0
  139. package/dist/agent-runtime/src/thread-snapshot-mirror.cjs.map +1 -0
  140. package/dist/agent-runtime/src/thread-snapshot-mirror.d.ts +101 -0
  141. package/dist/agent-runtime/src/thread-snapshot-mirror.js +329 -0
  142. package/dist/agent-runtime/src/thread-snapshot-mirror.js.map +1 -0
  143. package/dist/agent-runtime/src/thread-status.d.ts +53 -0
  144. package/dist/agent-runtime/src/tool-metadata.d.ts +146 -0
  145. package/dist/agent-runtime/src/tool-names.cjs +67 -0
  146. package/dist/agent-runtime/src/tool-names.cjs.map +1 -1
  147. package/dist/agent-runtime/src/tool-names.d.ts +60 -0
  148. package/dist/agent-runtime/src/tool-names.js +68 -1
  149. package/dist/agent-runtime/src/tool-names.js.map +1 -1
  150. package/dist/agent-runtime/src/tool-outputs.d.ts +35 -0
  151. package/dist/agent-runtime/src/tool-result.cjs +1 -0
  152. package/dist/agent-runtime/src/tool-result.cjs.map +1 -1
  153. package/dist/agent-runtime/src/tool-result.d.ts +126 -0
  154. package/dist/agent-runtime/src/tool-result.js +1 -0
  155. package/dist/agent-runtime/src/tool-result.js.map +1 -1
  156. package/dist/agent-runtime/src/types.d.ts +159 -0
  157. package/dist/agent-runtime/src/use-conversation-list.d.ts +76 -0
  158. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs +136 -0
  159. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs.map +1 -0
  160. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.d.ts +64 -0
  161. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js +136 -0
  162. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js.map +1 -0
  163. package/dist/agent-runtime/src/use-deep-agent-config.d.ts +169 -0
  164. package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs +13 -0
  165. package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -1
  166. package/dist/agent-runtime/src/use-deep-agent-edit-submit.d.ts +22 -0
  167. package/dist/agent-runtime/src/use-deep-agent-edit-submit.js +13 -0
  168. package/dist/agent-runtime/src/use-deep-agent-edit-submit.js.map +1 -1
  169. package/dist/agent-runtime/src/use-deep-agent-runtime.cjs +20 -2
  170. package/dist/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -1
  171. package/dist/agent-runtime/src/use-deep-agent-runtime.d.ts +168 -0
  172. package/dist/agent-runtime/src/use-deep-agent-runtime.js +20 -2
  173. package/dist/agent-runtime/src/use-deep-agent-runtime.js.map +1 -1
  174. package/dist/agent-runtime/src/use-deep-agent-thread.cjs +12 -4
  175. package/dist/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
  176. package/dist/agent-runtime/src/use-deep-agent-thread.d.ts +320 -0
  177. package/dist/agent-runtime/src/use-deep-agent-thread.js +12 -4
  178. package/dist/agent-runtime/src/use-deep-agent-thread.js.map +1 -1
  179. package/dist/agent-runtime/src/use-deep-agent-voice.cjs +999 -0
  180. package/dist/agent-runtime/src/use-deep-agent-voice.cjs.map +1 -0
  181. package/dist/agent-runtime/src/use-deep-agent-voice.d.ts +409 -0
  182. package/dist/agent-runtime/src/use-deep-agent-voice.js +999 -0
  183. package/dist/agent-runtime/src/use-deep-agent-voice.js.map +1 -0
  184. package/dist/agent-runtime/src/use-deep-agent-window-sync.d.ts +102 -0
  185. package/dist/agent-runtime/src/use-historical-edit-attachments.d.ts +2 -0
  186. package/dist/agent-runtime/src/use-thread-handoff-flow.d.ts +84 -0
  187. package/dist/agent-runtime/src/voice-presentation.d.ts +80 -0
  188. package/dist/agent-runtime/src/voice-turn-grouping.d.ts +28 -0
  189. package/dist/agent-runtime/src/voice-wire-types.d.ts +15 -0
  190. package/dist/agent-runtime/src/withdrawn-turns.d.ts +97 -0
  191. package/dist/chat/AthenaChat.cjs +77 -6
  192. package/dist/chat/AthenaChat.cjs.map +1 -1
  193. package/dist/chat/AthenaChat.js +78 -7
  194. package/dist/chat/AthenaChat.js.map +1 -1
  195. package/dist/chat/StatewireApprovalCard.d.ts +1 -1
  196. package/dist/chat/StatewireClientToolBridge.d.ts +1 -1
  197. package/dist/chat/StatewireQueuedMessages.cjs +11 -4
  198. package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
  199. package/dist/chat/StatewireQueuedMessages.d.ts +1 -1
  200. package/dist/chat/StatewireQueuedMessages.js +11 -4
  201. package/dist/chat/StatewireQueuedMessages.js.map +1 -1
  202. package/dist/chat/chat-outbox-rows.cjs +223 -0
  203. package/dist/chat/chat-outbox-rows.cjs.map +1 -0
  204. package/dist/chat/chat-outbox-rows.d.ts +29 -0
  205. package/dist/chat/chat-outbox-rows.js +223 -0
  206. package/dist/chat/chat-outbox-rows.js.map +1 -0
  207. package/dist/chat/statewire-approval.d.ts +1 -1
  208. package/dist/chat/statewire-client-tools.d.ts +1 -1
  209. package/dist/chat/super-grouping/SuperGroupingCard.cjs +3 -1
  210. package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -1
  211. package/dist/chat/super-grouping/SuperGroupingCard.d.ts +7 -1
  212. package/dist/chat/super-grouping/SuperGroupingCard.js +3 -1
  213. package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -1
  214. package/dist/chat/super-grouping/SuperGroupingTranscript.cjs +7 -2
  215. package/dist/chat/super-grouping/SuperGroupingTranscript.cjs.map +1 -1
  216. package/dist/chat/super-grouping/SuperGroupingTranscript.d.ts +2 -2
  217. package/dist/chat/super-grouping/SuperGroupingTranscript.js +7 -2
  218. package/dist/chat/super-grouping/SuperGroupingTranscript.js.map +1 -1
  219. package/dist/chat/super-grouping/activity-timeline.cjs +19 -11
  220. package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
  221. package/dist/chat/super-grouping/activity-timeline.d.ts +25 -9
  222. package/dist/chat/super-grouping/activity-timeline.js +19 -11
  223. package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
  224. package/dist/chat/use-statewire-approval-request.cjs +36 -0
  225. package/dist/chat/use-statewire-approval-request.cjs.map +1 -1
  226. package/dist/chat/use-statewire-approval-request.d.ts +49 -1
  227. package/dist/chat/use-statewire-approval-request.js +39 -3
  228. package/dist/chat/use-statewire-approval-request.js.map +1 -1
  229. package/dist/chat-ui/composer/tiptap-composer.cjs +102 -3
  230. package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
  231. package/dist/chat-ui/composer/tiptap-composer.d.ts +32 -1
  232. package/dist/chat-ui/composer/tiptap-composer.js +103 -4
  233. package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
  234. package/dist/chat-ui/header/conversation-history-panel.d.ts +1 -1
  235. package/dist/chat-ui/index.d.ts +1 -1
  236. package/dist/chat-ui/messages/message-components.cjs +15 -0
  237. package/dist/chat-ui/messages/message-components.cjs.map +1 -1
  238. package/dist/chat-ui/messages/message-components.js +15 -0
  239. package/dist/chat-ui/messages/message-components.js.map +1 -1
  240. package/dist/chat-ui/messages/runtime-message.d.ts +1 -1
  241. package/dist/chat-ui/messages/statewire-continue-run.d.ts +1 -1
  242. package/dist/chat-ui/messages/user-edit-composer.cjs +15 -2
  243. package/dist/chat-ui/messages/user-edit-composer.cjs.map +1 -1
  244. package/dist/chat-ui/messages/user-edit-composer.d.ts +4 -2
  245. package/dist/chat-ui/messages/user-edit-composer.js +15 -2
  246. package/dist/chat-ui/messages/user-edit-composer.js.map +1 -1
  247. package/dist/chat-ui/messages/wake-marker.d.ts +1 -1
  248. package/dist/chat-ui/rich-text/chat-text-schema.cjs +1 -0
  249. package/dist/chat-ui/rich-text/chat-text-schema.cjs.map +1 -1
  250. package/dist/chat-ui/rich-text/chat-text-schema.d.ts +3 -0
  251. package/dist/chat-ui/rich-text/chat-text-schema.js +1 -0
  252. package/dist/chat-ui/rich-text/chat-text-schema.js.map +1 -1
  253. package/dist/chat-ui/statewire.cjs +1 -0
  254. package/dist/chat-ui/statewire.cjs.map +1 -1
  255. package/dist/chat-ui/statewire.d.ts +2 -2
  256. package/dist/chat-ui/statewire.js +2 -1
  257. package/dist/chat-ui/thread/statewire-history-edge.d.ts +1 -1
  258. package/dist/composer/AttachmentContext.cjs +8 -4
  259. package/dist/composer/AttachmentContext.cjs.map +1 -1
  260. package/dist/composer/AttachmentContext.d.ts +7 -0
  261. package/dist/composer/AttachmentContext.js +8 -4
  262. package/dist/composer/AttachmentContext.js.map +1 -1
  263. package/dist/composer/build-composed-message.cjs +34 -0
  264. package/dist/composer/build-composed-message.cjs.map +1 -1
  265. package/dist/composer/build-composed-message.d.ts +20 -0
  266. package/dist/composer/build-composed-message.js +35 -1
  267. package/dist/composer/build-composed-message.js.map +1 -1
  268. package/dist/composer/composer-handoff.cjs +39 -2
  269. package/dist/composer/composer-handoff.cjs.map +1 -1
  270. package/dist/composer/composer-handoff.d.ts +28 -3
  271. package/dist/composer/composer-handoff.js +39 -2
  272. package/dist/composer/composer-handoff.js.map +1 -1
  273. package/dist/composer/useAttachFiles.cjs +15 -2
  274. package/dist/composer/useAttachFiles.cjs.map +1 -1
  275. package/dist/composer/useAttachFiles.d.ts +11 -0
  276. package/dist/composer/useAttachFiles.js +15 -2
  277. package/dist/composer/useAttachFiles.js.map +1 -1
  278. package/dist/composer/useSendMessage.cjs.map +1 -1
  279. package/dist/composer/useSendMessage.d.ts +4 -3
  280. package/dist/composer/useSendMessage.js.map +1 -1
  281. package/dist/diagnostics/athena-diagnostics.cjs.map +1 -1
  282. package/dist/diagnostics/athena-diagnostics.d.ts +3 -1
  283. package/dist/diagnostics/athena-diagnostics.js.map +1 -1
  284. package/dist/index.cjs +18 -0
  285. package/dist/index.cjs.map +1 -1
  286. package/dist/index.d.ts +15 -6
  287. package/dist/index.js +19 -1
  288. package/dist/index.js.map +1 -1
  289. package/dist/offline/chat-outbox.cjs +57 -0
  290. package/dist/offline/chat-outbox.cjs.map +1 -0
  291. package/dist/offline/chat-outbox.d.ts +80 -0
  292. package/dist/offline/chat-outbox.js +57 -0
  293. package/dist/offline/chat-outbox.js.map +1 -0
  294. package/dist/offline/offline-history.cjs +77 -0
  295. package/dist/offline/offline-history.cjs.map +1 -0
  296. package/dist/offline/offline-history.d.ts +60 -0
  297. package/dist/offline/offline-history.js +77 -0
  298. package/dist/offline/offline-history.js.map +1 -0
  299. package/dist/provider/AthenaProvider.cjs +206 -9
  300. package/dist/provider/AthenaProvider.cjs.map +1 -1
  301. package/dist/provider/AthenaProvider.d.ts +22 -1
  302. package/dist/provider/AthenaProvider.js +207 -10
  303. package/dist/provider/AthenaProvider.js.map +1 -1
  304. package/dist/provider/statewire-window-context.d.ts +1 -1
  305. package/dist/react/package.json.cjs +1 -1
  306. package/dist/react/package.json.js +1 -1
  307. package/dist/references/src/anchors/file-line-range.d.ts +58 -0
  308. package/dist/references/src/anchors/format.d.ts +21 -0
  309. package/dist/references/src/anchors/message-anchors.d.ts +71 -0
  310. package/dist/references/src/anchors/parse.d.ts +8 -0
  311. package/dist/references/src/anchors/registry-contract.d.ts +24 -0
  312. package/dist/references/src/anchors/registry.d.ts +19 -0
  313. package/dist/references/src/anchors/schemas.d.ts +194 -0
  314. package/dist/references/src/anchors/serialize.d.ts +8 -0
  315. package/dist/references/src/anchors/time.d.ts +78 -0
  316. package/dist/references/src/anchors/types.d.ts +474 -0
  317. package/dist/references/src/asset-bounds.d.ts +27 -0
  318. package/dist/references/src/asset-links.d.ts +23 -0
  319. package/dist/references/src/asset-reference.d.ts +16 -0
  320. package/dist/references/src/formats/format-catalog.d.ts +79 -0
  321. package/dist/references/src/formats/markdown/parse-reference-markdown.d.ts +28 -0
  322. package/dist/references/src/formats/markdown/reference-display-name.d.ts +6 -0
  323. package/dist/references/src/formats/object/asset-object.d.ts +9 -0
  324. package/dist/references/src/formats/object/callable-object.d.ts +6 -0
  325. package/dist/references/src/formats/object/decode-reference-object-payload.d.ts +3 -0
  326. package/dist/references/src/formats/object/external-url-object.d.ts +9 -0
  327. package/dist/references/src/formats/object/group-object.d.ts +9 -0
  328. package/dist/references/src/formats/object/navigation-object.d.ts +9 -0
  329. package/dist/references/src/formats/object/parse-reference-object.d.ts +11 -0
  330. package/dist/references/src/formats/object/person-object.d.ts +9 -0
  331. package/dist/references/src/formats/uri/asset-mention-uri.d.ts +9 -0
  332. package/dist/references/src/formats/uri/asset-spaces-url.d.ts +9 -0
  333. package/dist/references/src/formats/uri/callable-mention-uris.d.ts +9 -0
  334. package/dist/references/src/formats/uri/detect-uri-wire.d.ts +9 -0
  335. package/dist/references/src/formats/uri/group-mention-uri.d.ts +12 -0
  336. package/dist/references/src/formats/uri/navigation-spaces-url.d.ts +14 -0
  337. package/dist/references/src/formats/uri/parse-reference-uri.d.ts +20 -0
  338. package/dist/references/src/formats/uri/person-mention-uri.d.ts +9 -0
  339. package/dist/references/src/formats/uri/template-placeholder.d.ts +12 -0
  340. package/dist/references/src/index.d.ts +47 -0
  341. package/dist/references/src/legacy/index.d.ts +14 -0
  342. package/dist/references/src/legacy/pre-reference-asset-url.d.ts +57 -0
  343. package/dist/references/src/legacy/pre-reference-citation-bridge.d.ts +22 -0
  344. package/dist/references/src/legacy/pre-reference-citation.d.ts +138 -0
  345. package/dist/references/src/legacy/pre-reference-external-url.d.ts +31 -0
  346. package/dist/references/src/legacy/pre-reference-format.d.ts +8 -0
  347. package/dist/references/src/legacy/pre-reference-mention.d.ts +27 -0
  348. package/dist/references/src/legacy/pre-reference-object.d.ts +8 -0
  349. package/dist/references/src/legacy/pre-reference-uri.d.ts +12 -0
  350. package/dist/references/src/legacy.d.ts +2 -0
  351. package/dist/references/src/mention-href-patterns.d.ts +19 -0
  352. package/dist/references/src/mention-node/index.d.ts +5 -0
  353. package/dist/references/src/mention-node/mention-node.d.ts +31 -0
  354. package/dist/references/src/mention-node/resolve-node-attrs.d.ts +27 -0
  355. package/dist/references/src/parse-reference.d.ts +23 -0
  356. package/dist/references/src/schemas.d.ts +463 -0
  357. package/dist/references/src/serialize-reference.d.ts +50 -0
  358. package/dist/references/src/sheet-name.d.ts +10 -0
  359. package/dist/references/src/tool-option-schemas.d.ts +597 -0
  360. package/dist/references/src/types.d.ts +125 -0
  361. package/dist/references/src/version-ref.d.ts +30 -0
  362. package/dist/runtime/statewire-lifecycle.d.ts +1 -1
  363. package/dist/runtime/statewire-model-lane.d.ts +1 -1
  364. package/dist/runtime/statewire-server-lane-context.d.ts +1 -1
  365. package/dist/runtime/statewire-session-key.cjs +7 -0
  366. package/dist/runtime/statewire-session-key.cjs.map +1 -1
  367. package/dist/runtime/statewire-session-key.d.ts +16 -0
  368. package/dist/runtime/statewire-session-key.js +8 -1
  369. package/dist/runtime/statewire-session-key.js.map +1 -1
  370. package/dist/runtime/statewire-session-lane.cjs +48 -0
  371. package/dist/runtime/statewire-session-lane.cjs.map +1 -0
  372. package/dist/runtime/statewire-session-lane.d.ts +29 -0
  373. package/dist/runtime/statewire-session-lane.js +48 -0
  374. package/dist/runtime/statewire-session-lane.js.map +1 -0
  375. package/dist/runtime/statewire-thread-config-lane.d.ts +1 -1
  376. package/dist/runtime/useAthenaStatewireRuntime.cjs +16 -5
  377. package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
  378. package/dist/runtime/useAthenaStatewireRuntime.d.ts +15 -1
  379. package/dist/runtime/useAthenaStatewireRuntime.js +17 -6
  380. package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
  381. package/dist/styles.css +1 -1
  382. package/dist/threads/api.d.ts +1 -1
  383. package/dist/threads/conversation-list-fetcher.d.ts +1 -1
  384. package/dist/threads/index-triggered-refresh.cjs +164 -0
  385. package/dist/threads/index-triggered-refresh.cjs.map +1 -0
  386. package/dist/threads/index-triggered-refresh.d.ts +70 -0
  387. package/dist/threads/index-triggered-refresh.js +164 -0
  388. package/dist/threads/index-triggered-refresh.js.map +1 -0
  389. package/dist/threads/offline-session-list.cjs +75 -0
  390. package/dist/threads/offline-session-list.cjs.map +1 -0
  391. package/dist/threads/offline-session-list.d.ts +27 -0
  392. package/dist/threads/offline-session-list.js +75 -0
  393. package/dist/threads/offline-session-list.js.map +1 -0
  394. package/dist/threads/pull-request-display.d.ts +1 -1
  395. package/dist/threads/session-list-model.d.ts +1 -1
  396. package/dist/threads/session-list-tab-share.cjs +150 -0
  397. package/dist/threads/session-list-tab-share.cjs.map +1 -0
  398. package/dist/threads/session-list-tab-share.d.ts +73 -0
  399. package/dist/threads/session-list-tab-share.js +150 -0
  400. package/dist/threads/session-list-tab-share.js.map +1 -0
  401. package/dist/threads/session-row-parts.d.ts +1 -1
  402. package/dist/threads/sessions-query.d.ts +1 -1
  403. package/dist/threads/statewire-thread-list.cjs +105 -20
  404. package/dist/threads/statewire-thread-list.cjs.map +1 -1
  405. package/dist/threads/statewire-thread-list.d.ts +31 -3
  406. package/dist/threads/statewire-thread-list.js +107 -22
  407. package/dist/threads/statewire-thread-list.js.map +1 -1
  408. package/dist/threads/thread-prefetcher.d.ts +1 -1
  409. package/dist/threads/use-athena-session-attention.d.ts +1 -1
  410. package/dist/threads/use-athena-sessions.cjs +32 -22
  411. package/dist/threads/use-athena-sessions.cjs.map +1 -1
  412. package/dist/threads/use-athena-sessions.js +33 -23
  413. package/dist/threads/use-athena-sessions.js.map +1 -1
  414. package/dist/threads/use-rest-conversation-history.d.ts +1 -1
  415. package/dist/threads/use-statewire-conversation-history.d.ts +5 -5
  416. package/dist/tiptap-markdown-table/src/markdown-table-serializer.d.ts +56 -0
  417. package/dist/tools/NestedPtcMessages.cjs +14 -9
  418. package/dist/tools/NestedPtcMessages.cjs.map +1 -1
  419. package/dist/tools/NestedPtcMessages.d.ts +9 -0
  420. package/dist/tools/NestedPtcMessages.js +6 -1
  421. package/dist/tools/NestedPtcMessages.js.map +1 -1
  422. package/dist/tools/index.d.ts +1 -1
  423. package/dist/tools/primitives.d.ts +1 -1
  424. package/dist/tools/subagent-task-tool-ui.cjs +494 -0
  425. package/dist/tools/subagent-task-tool-ui.cjs.map +1 -0
  426. package/dist/tools/subagent-task-tool-ui.d.ts +109 -0
  427. package/dist/tools/subagent-task-tool-ui.js +494 -0
  428. package/dist/tools/subagent-task-tool-ui.js.map +1 -0
  429. package/dist/tools/tool-fallback.d.ts +1 -1
  430. package/dist/tools/tool-icons.d.ts +1 -1
  431. package/dist/tools/tool-summary.d.ts +1 -1
  432. package/dist/tools/tool-uis.cjs +4 -0
  433. package/dist/tools/tool-uis.cjs.map +1 -1
  434. package/dist/tools/tool-uis.js +4 -0
  435. package/dist/tools/tool-uis.js.map +1 -1
  436. package/dist/voice/chat.cjs +6 -0
  437. package/dist/voice/chat.cjs.map +1 -0
  438. package/dist/voice/chat.d.ts +2 -0
  439. package/dist/voice/chat.js +6 -0
  440. package/dist/voice/chat.js.map +1 -0
  441. package/dist/voice/livekit-join.cjs +119 -0
  442. package/dist/voice/livekit-join.cjs.map +1 -0
  443. package/dist/voice/livekit-join.d.ts +8 -0
  444. package/dist/voice/livekit-join.js +119 -0
  445. package/dist/voice/livekit-join.js.map +1 -0
  446. package/dist/voice/livekit.cjs +32 -0
  447. package/dist/voice/livekit.cjs.map +1 -0
  448. package/dist/voice/livekit.d.ts +80 -0
  449. package/dist/voice/livekit.js +32 -0
  450. package/dist/voice/livekit.js.map +1 -0
  451. package/package.json +20 -10
@@ -0,0 +1,156 @@
1
+ import type { StatewireThread } from '@assistant-ui/react-statewire';
2
+ import { type DeepAgentMessageWindow } from './message-window';
3
+ /**
4
+ * Wire-accurate `run/edit` construction for deep-agent retry/edit, shared by
5
+ * every surface that resubmits a user message.
6
+ *
7
+ * assistant-ui builds the command's `runAnchorMessageId` from the CONVERTED
8
+ * thread messages (`resolveEditCommand`: `messages[index - 1].id`), but the
9
+ * deep-agent host validates that anchor against the edited message's parent in
10
+ * its RAW message list (`harness_sdk.linear_thread`: the entry before it in
11
+ * `state["messages"]`). Those two lists do not line up:
12
+ *
13
+ * - the converter chunks an assistant turn and its tool messages into ONE
14
+ * thread message carrying only the FIRST wire id, so the anchor names the
15
+ * head of the previous turn instead of its last tool message;
16
+ * - `sanitizeLangChainMessages` drops hidden-from-frontend and unconvertible
17
+ * entries, so a dropped tail message is invisible to the anchor too.
18
+ *
19
+ * Either way the host rejects the command with `wrong-anchor`
20
+ * (`runAnchorMessageId … is not the source's parent`) AFTER the composer's
21
+ * synchronous `send()` returned, so the retry/edit silently does nothing.
22
+ *
23
+ * Building the command here off the replicated raw state makes the anchor the
24
+ * same value the host computes.
25
+ *
26
+ * The raw list is the loaded interest window, so the first loaded message's
27
+ * parent is not in it while older messages exist — an edit there must not
28
+ * anchor on `null` (the root, rejected `wrong-anchor`); a message below the
29
+ * window has no parent on this client at all. {@link resolveDeepAgentEditCommand}
30
+ * states older page interests until the parent is loaded.
31
+ */
32
+ /**
33
+ * Host metadata frozen at submission, settling once the async capture does.
34
+ * The message-metadata preparation surface — `prepareMessageMetadata`,
35
+ * `discardPreparedMessageMetadata`, `sendPreparedEdit` and `sendCommand`'s
36
+ * `preparedMetadata` option — is what the monorepo patches into
37
+ * `@assistant-ui/react-statewire@0.31.0` (`patches/`). It is declared
38
+ * structurally here rather than as `StatewireThread.Extras[...]` so that the
39
+ * published sources also compile against the unpatched upstream typings, where
40
+ * those members are absent and the edit path's optional calls never run.
41
+ */
42
+ export type DeepAgentPreparedMessageMetadata = Promise<Record<string, unknown> | undefined>;
43
+ /** The pieces of the statewire thread extras the edit path reads. */
44
+ export interface DeepAgentStatewireExtras {
45
+ /** The library's dispatch; it resolves with the host's reply to the command. */
46
+ sendCommand: (command: StatewireThread.Command, options?: {
47
+ preparedMetadata?: DeepAgentPreparedMessageMetadata | undefined;
48
+ }) => Promise<unknown> | void;
49
+ /** Optional on older hosts; capture before loading an edit's history anchor. */
50
+ prepareMessageMetadata?: (() => DeepAgentPreparedMessageMetadata) | undefined;
51
+ discardPreparedMessageMetadata?: ((prepared: DeepAgentPreparedMessageMetadata) => void) | undefined;
52
+ sendPreparedEdit?: ((sourceId: string, prepared: DeepAgentPreparedMessageMetadata) => void) | undefined;
53
+ isPreparingSubmission?: boolean;
54
+ /** The composed thread state — its `messages` are the raw wire messages of the loaded window. */
55
+ state: {
56
+ messages?: readonly {
57
+ id?: unknown;
58
+ }[];
59
+ } | null;
60
+ /** The mounted documents (the interest window), absent on a wire without documents. */
61
+ documents?: StatewireThread.Extras['documents'];
62
+ invoke?: StatewireThread.Extras['invoke'];
63
+ /** The live run, when one is in flight; `epoch` advances on each dispatch. */
64
+ runs: {
65
+ runId?: string | null;
66
+ epoch?: number;
67
+ };
68
+ /** The host's replicated run status; absent on a surface that predates it. */
69
+ status?: StatewireThread.ThreadStatus;
70
+ }
71
+ /**
72
+ * The statewire extras of the nearest aui thread, or `null` when the thread is
73
+ * not a statewire thread (e.g. a read-only subagent transcript runtime).
74
+ * Gated on {@link hasStatewireThreadExtras} for the same reason the approval
75
+ * card is: the library's own hooks throw on a non-statewire thread.
76
+ */
77
+ export declare function readDeepAgentStatewireExtras(extras: unknown): DeepAgentStatewireExtras | null;
78
+ /**
79
+ * The host's parent of `sourceId`: the raw wire message directly before it
80
+ * (`null` when it is the first of the whole transcript). Returns `undefined`
81
+ * when `sourceId` is not in the raw list at all — an optimistic bubble the
82
+ * host has not settled yet, a message below the loaded window, or a surface
83
+ * whose state this module cannot read — or when it is the first loaded
84
+ * message while older ones exist (`hasOlder`), so the caller can load more or
85
+ * fall back to the library's own path instead of asserting a wrong anchor.
86
+ */
87
+ export declare function resolveWireAnchorMessageId({ wireMessages, sourceId, hasOlder, }: {
88
+ wireMessages: readonly {
89
+ id?: unknown;
90
+ }[] | undefined;
91
+ sourceId: string;
92
+ hasOlder?: boolean;
93
+ }): string | null | undefined;
94
+ /**
95
+ * Whether `sourceId`'s parent lies below the loaded window: the message is
96
+ * absent from the raw list, or its first entry, while older messages exist.
97
+ * The caller loads older history before an edit can be anchored.
98
+ */
99
+ export declare function isSourceBelowLoadedWindow({ wireMessages, sourceId, window, }: {
100
+ wireMessages: readonly {
101
+ id?: unknown;
102
+ }[] | undefined;
103
+ sourceId: string;
104
+ window: DeepAgentMessageWindow | null;
105
+ }): boolean;
106
+ /**
107
+ * The `run/edit` command for resubmitting `sourceId` with `text`, anchored on
108
+ * the host's own parent. `null` when the anchor cannot be resolved from the
109
+ * replicated state.
110
+ */
111
+ export declare function buildDeepAgentEditCommand({ extras, sourceId, text, }: {
112
+ extras: DeepAgentStatewireExtras;
113
+ sourceId: string;
114
+ text: string;
115
+ }): StatewireThread.RunEditCommand | null;
116
+ /**
117
+ * State one more page of older history for a windowed thread: the next page
118
+ * past the loaded window's oldest message. Resolves `true` once the host has
119
+ * mounted it (it answers the statement after mounting), `false` when there is
120
+ * nothing older, the thread is not a windowed statewire thread, or no page can
121
+ * be stated. For a reader that needs a message below the loaded window — a
122
+ * search result revealing an older turn of a long conversation — and pages
123
+ * until it renders.
124
+ */
125
+ export declare function loadOlderDeepAgentHistoryPage({ readExtras, pageSize, }: {
126
+ readExtras: () => DeepAgentStatewireExtras | null;
127
+ pageSize?: number;
128
+ }): Promise<boolean>;
129
+ /**
130
+ * Pages of older history stated while looking for an edited message's host
131
+ * parent. Each page is up to a window's worth of messages, so an edit reaches
132
+ * this many windows below what was loaded before it gives up.
133
+ */
134
+ export declare const MAX_EDIT_ANCHOR_HISTORY_LOADS = 5;
135
+ /**
136
+ * The anchored `run/edit` for `sourceId`, stating older page interests one at
137
+ * a time when the message's parent lies below the loaded window. Every page
138
+ * is read back from the live documents (`readExtras` — the host mounts them
139
+ * before it answers the statement), so the anchor is always the host's own
140
+ * parent id.
141
+ *
142
+ * Resolves `null` — the caller's cue for the library's composer path, whose
143
+ * failure it reports — when the thread is not a statewire thread, the host has
144
+ * not settled the message, the history is exhausted without it, or the page
145
+ * budget ({@link MAX_EDIT_ANCHOR_HISTORY_LOADS}) is spent. A synchronous
146
+ * resolution never awaits: the first read either anchors at once or decides
147
+ * that pages are needed.
148
+ */
149
+ export declare function resolveDeepAgentEditCommand({ readExtras, sourceId, text, pageSize, maxHistoryLoads, }: {
150
+ /** The live thread extras — re-read per page so each anchor attempt sees the widened window. */
151
+ readExtras: () => DeepAgentStatewireExtras | null;
152
+ sourceId: string;
153
+ text: string;
154
+ pageSize?: number;
155
+ maxHistoryLoads?: number;
156
+ }): Promise<StatewireThread.RunEditCommand | null>;
@@ -0,0 +1,174 @@
1
+ import type { StatewireClient } from 'statewire';
2
+ import type { DeepAgentConnectionState } from './types';
3
+ /** Structured payload attached to a server-rejected Statewire command. */
4
+ export interface StatewireRejectionPayload {
5
+ status: number;
6
+ detail: unknown;
7
+ }
8
+ /** Return a rejected command's structured `{ status, detail }` payload. */
9
+ export declare function statewireRejectionPayload(error: unknown): StatewireRejectionPayload | null;
10
+ /**
11
+ * The server's human-readable reason for a rejected command — `detail.message`
12
+ * (or a plain-string `detail`) — else `null`. Hosts surface it as send
13
+ * feedback so the user sees the actionable cause instead of the generic
14
+ * client-side `command rejected (<status>)`.
15
+ */
16
+ export declare function statewireRejectionDetailMessage(error: unknown): string | null;
17
+ /**
18
+ * A structured, retryable refusal the host recorded as the run error
19
+ * (`runs.error`): the dispatch never started — the pod or instance was
20
+ * closing (`pod_draining`) — and the entries stayed in their lanes for the
21
+ * thread's next placement. Distinct from a rejected COMMAND
22
+ * ({@link statewireRejectionPayload}): this is the shape harness-sdk writes
23
+ * when the run executor raises the rejection, so it lives on the replicated
24
+ * run entry, not on a command settle.
25
+ */
26
+ export interface RetryableRunRefusal {
27
+ /** The structured `detail.code` (`pod_draining`). */
28
+ code: string;
29
+ /** The server's human-readable reason, when it sent one. */
30
+ message: string | null;
31
+ }
32
+ export declare function readRetryableRunRefusal(error: unknown): RetryableRunRefusal | null;
33
+ /**
34
+ * The `detail.code` agora answers when a send names another channel of the
35
+ * collab agent a session started on (`collab_agent_bridge.py`): a session
36
+ * keeps its channel — the SDK app's Agent / Ask mode — for its lifetime, and
37
+ * the way to the other mode is a new session. Wire-frozen.
38
+ */
39
+ export declare const COLLAB_AGENT_CHANNEL_SESSION_MISMATCH = "collab_agent_channel_session_mismatch";
40
+ /**
41
+ * A structured refusal the host recorded as the run error when the run could
42
+ * not START: the run executor raised the gate's `{status, detail: {code,
43
+ * message}}` envelope (agora's `_status_reject`) before it accepted the
44
+ * dispatched input, so the message went back to its lane and the thread rests
45
+ * `error` with it still queued. Unlike a retryable refusal
46
+ * ({@link readRetryableRunRefusal}) nothing will dispatch it later: resending
47
+ * the same input is refused the same way, so the server's message is the only
48
+ * explanation the person gets.
49
+ */
50
+ export interface RunStartRefusal {
51
+ /** The structured `detail.code` (`collab_agent_channel_session_mismatch`, …). */
52
+ code: string;
53
+ /** The server's human-readable reason, when it sent one. */
54
+ message: string | null;
55
+ /** The HTTP-style status the gate raised with, when recorded. */
56
+ status: number | null;
57
+ }
58
+ /**
59
+ * The non-retryable structured refusal off a replicated run error
60
+ * (`runs.error`), or `null` — for a run that failed while it was running (a
61
+ * plain `{message}`), a retryable refusal, or no error at all.
62
+ */
63
+ export declare function readRunStartRefusal(error: unknown): RunStartRefusal | null;
64
+ /** The structured `detail.code` of a rejected command, or `null`. */
65
+ export declare function statewireRejectionCode(error: unknown): string | null;
66
+ /**
67
+ * A structured, retryable refusal of a COMMAND, read off its rejection
68
+ * ({@link statewireRejectionPayload}): the host's `_structured_reject(...,
69
+ * retryable=True)` envelope — `command_auth_context_expired` when a pod
70
+ * replacement dropped the socket-scoped auth a replayed command needed,
71
+ * `pod_draining` when the host was closing. The command never ran, and the
72
+ * host itself says a resend after the reconnect will; `detail.code` is the
73
+ * wire-frozen contract clients classify on. Same shape as
74
+ * {@link readRetryableRunRefusal}, which reads it off a replicated run entry.
75
+ */
76
+ export interface RetryableCommandRejection {
77
+ /** The structured `detail.code`. */
78
+ code: string;
79
+ /** The server's human-readable reason, when it sent one. */
80
+ message: string | null;
81
+ }
82
+ export declare function readRetryableCommandRejection(error: unknown): RetryableCommandRejection | null;
83
+ /** The host's `detail.code` for a command replayed onto a pod that could not restore its auth context. */
84
+ export declare const STATEWIRE_COMMAND_AUTH_CONTEXT_EXPIRED = "command_auth_context_expired";
85
+ /**
86
+ * Whether a rejected command hit the host's fail-closed auth recovery: the
87
+ * command was replayed onto a replacement pod that could not restore the
88
+ * attach's auth context, so it was refused unrun (503, retryable). The
89
+ * reconnect already under way restores the context; a single resend after it
90
+ * is the recovery, not a failure to report.
91
+ */
92
+ export declare function isStatewireCommandAuthContextExpired(error: unknown): boolean;
93
+ /**
94
+ * The `detail.code` agora answers for a write to an archived (trashed)
95
+ * conversation (`host_rejects._conversation_archived_reject`, a 409): it
96
+ * takes no new turns, config writes or approval answers until it is
97
+ * restored, and stopping still works. Wire-frozen.
98
+ */
99
+ export declare const CONVERSATION_ARCHIVED = "conversation_archived";
100
+ /** What a person is told when that refusal comes back (the server says the same). */
101
+ export declare const CONVERSATION_ARCHIVED_MESSAGE = "This conversation is archived. Restore it to continue.";
102
+ /**
103
+ * Whether a rejected command was refused because the conversation is archived
104
+ * ({@link CONVERSATION_ARCHIVED}). Not retriable: nothing changes until a
105
+ * restore, so callers show {@link CONVERSATION_ARCHIVED_MESSAGE} rather than a
106
+ * "try again".
107
+ */
108
+ export declare function isConversationArchivedRejection(error: unknown): boolean;
109
+ /**
110
+ * Whether a rejected command hit the legacy-thread dispatch fence: the
111
+ * structured 409 the server answers when an out-of-band run is writing a
112
+ * pre-cutover thread (or its adoption failed). A per-send failure — the
113
+ * snapshot never carries a standing read-only flag.
114
+ */
115
+ export declare function isLegacyThreadReadOnlyRejection(error: unknown): boolean;
116
+ /**
117
+ * Whether a rejected command was refused because its rewind anchor no longer
118
+ * matches the host's parent for the edited message (`wrong-anchor`).
119
+ *
120
+ * A retry/edit resubmit is dispatched optimistically, so this rejection lands
121
+ * after the UI already cleared its edit affordances: the turn simply never
122
+ * re-runs. Callers use this to tell the user the resubmit was dropped instead
123
+ * of leaving a console-only failure.
124
+ */
125
+ export declare function isStatewireRewindAnchorRejection(error: unknown): boolean;
126
+ /**
127
+ * Whether a statewire send failure is the host's `expired` verdict
128
+ * (`result-unavailable`): the command's seq was at or below the host's
129
+ * admitted watermark and no retained result was left for it. Either the
130
+ * command ran and settled but the client re-asked for the answer (a resend
131
+ * after the stream came back) only after the host had let the retained result
132
+ * go, or the seq was already admitted and the command was absorbed as a
133
+ * duplicate without ever running — a client whose shared session record fell
134
+ * behind the watermark stays there until a reconnect re-syncs it. The library
135
+ * never reruns the command on replay, so for an idempotent read the answer is
136
+ * simply gone — asking again is the correct reaction, not reporting a failure;
137
+ * a write cannot assume it was applied.
138
+ */
139
+ export declare function isStatewireExpiredVerdict(error: unknown): boolean;
140
+ /**
141
+ * Whether a statewire send failure is a local channel death rather than a
142
+ * command error.
143
+ *
144
+ * The library's contract for `SendFailure.cause`: `"server"` is the server's
145
+ * own answer; every other cause is "a channel death the client settled
146
+ * locally" — `unmount`, `stream-gone`, and `session-lost`. A thread switch
147
+ * settles every in-flight command that way, so logging these at error level
148
+ * reports two failures for an ordinary switch and buries the ones that mean
149
+ * something.
150
+ *
151
+ * Channel health is already surfaced where it belongs: the connection
152
+ * indicator renders the connection state. This
153
+ * predicate only decides the log level.
154
+ */
155
+ export declare function isStatewireChannelTeardown(error: unknown): boolean;
156
+ /**
157
+ * The low-cardinality reason a statewire send settled as transport weather
158
+ * rather than a defect, or `null` when the failure is a real error.
159
+ *
160
+ * Three families qualify: a channel death the client settled locally
161
+ * ({@link isStatewireChannelTeardown} — the cause: `unmount`, `stream-gone`,
162
+ * `session-lost`), the host's `expired` verdict
163
+ * ({@link isStatewireExpiredVerdict} — the answer outlived the host's
164
+ * retention before the post-reconnect resend collected it), and a retryable
165
+ * structured rejection ({@link readRetryableCommandRejection} — its code: the
166
+ * host asked for a resend). In every case the sender's own retry or poll is
167
+ * the recovery and the connection indicator already shows the channel, so
168
+ * error reporting counts the outcome instead of paging on it. Handler
169
+ * failures, crashes, and non-retryable rejections stay `null`: those are
170
+ * defects to page on.
171
+ */
172
+ export declare function statewireTransportOutcome(error: unknown): string | null;
173
+ /** Preserve the Statewire lifecycle and sanitize host detail for display. */
174
+ export declare function projectDeepAgentConnection(connection: StatewireClient.ConnectionState): DeepAgentConnectionState;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Reading the deepagents `execute` (shell) tool: the command's headline and
3
+ * the status notes the backend appends to its output. Pure, so every surface
4
+ * that lists shell commands (a tool card, a session's Shell pane) agrees on
5
+ * what succeeded.
6
+ */
7
+ export interface ShellCommandSummary {
8
+ /** The first non-blank line of the command, trimmed. */
9
+ firstLine: string;
10
+ /** How many lines follow it. */
11
+ extraLines: number;
12
+ }
13
+ /** A shell command's first non-blank line plus how many lines follow it. */
14
+ export declare function summarizeShellCommand(command: string): ShellCommandSummary;
15
+ export interface ParsedExecuteOutput {
16
+ /** The command's output with the trailing status notes removed. */
17
+ body: string;
18
+ /** The exit code from the status note, or `null` when the output carries none. */
19
+ exitCode: number | null;
20
+ /** Whether the backend cut the output (`[Output was truncated due to size limits]`). */
21
+ truncated: boolean;
22
+ }
23
+ /**
24
+ * Split an `execute` result into its output and the notes agora's execute
25
+ * router appends (`_format_execute_output` in `asset_execute.py`, mirroring
26
+ * the SDK tool): `[Command succeeded with exit code 0]`, `[Command failed with
27
+ * exit code 1]` and `[Output was truncated due to size limits]`. A result
28
+ * without an exit note (an `Error: …` refusal before the command ran, an
29
+ * output the live window cut) reports `exitCode: null`.
30
+ */
31
+ export declare function parseExecuteOutput(raw: string): ParsedExecuteOutput;
@@ -227,7 +227,6 @@ new Set(
227
227
  const CLIENT_TOOL_INTERRUPT_SOURCE = "client_tool";
228
228
  const CLIENT_TOOL_RESULT_STATUS_SUCCESS = "success";
229
229
  const CLIENT_TOOL_RESULT_STATUS_ERROR = "error";
230
- const DEEP_AGENT_PROTOCOL_VERSION = 1;
231
230
  const DEEP_AGENT_PROTOCOL_VERSION_HEADER = "x-athena-deep-agent-protocol-version";
232
231
  const DEEP_AGENT_MESSAGE_WINDOW_HEADER = "x-athena-deep-agent-window";
233
232
  const DEEP_AGENT_PROTOCOL_STATE_KEY = "protocol";
@@ -238,23 +237,38 @@ const DEEP_AGENT_MIN_MESSAGE_WINDOW = 8;
238
237
  const DEEP_AGENT_MAX_MESSAGE_WINDOW = 200;
239
238
  const DEEP_AGENT_MAX_INTERESTS = 16;
240
239
  const DEEP_AGENT_HISTORY_TOOL_OUTPUT_COMMAND = "history/tool_output";
240
+ const DEEP_AGENT_HISTORY_MESSAGE_COMMAND = "history/message";
241
241
  const DEEP_AGENT_TRUNCATED_CONTENT_KEY = "athena_content_truncated";
242
+ const DEEP_AGENT_TRUNCATED_LANE_KEY = "athena_lane_truncated";
243
+ const DEEP_AGENT_LANE_USAGE_KEY = "athena_lane_usage";
244
+ const DEEP_AGENT_LANE_CUT_PROTOCOL_VERSION = 2;
245
+ const DEEP_AGENT_CUT_LANE_DOCUMENT = "cut";
246
+ const DEEP_AGENT_HISTORY_LANE_COMMAND = "history/lane";
247
+ const DEEP_AGENT_MAX_LANE_PAGE = 200;
248
+ const DEEP_AGENT_REPEATS_RESULT_KEY = "athena_content_repeats_result";
242
249
  exports.CLIENT_TOOL_INTERRUPT_SOURCE = CLIENT_TOOL_INTERRUPT_SOURCE;
243
250
  exports.CLIENT_TOOL_RESULT_STATUS_ERROR = CLIENT_TOOL_RESULT_STATUS_ERROR;
244
251
  exports.CLIENT_TOOL_RESULT_STATUS_SUCCESS = CLIENT_TOOL_RESULT_STATUS_SUCCESS;
245
252
  exports.DEEP_AGENT_CONFIG_COMMANDS = DEEP_AGENT_CONFIG_COMMANDS;
253
+ exports.DEEP_AGENT_CUT_LANE_DOCUMENT = DEEP_AGENT_CUT_LANE_DOCUMENT;
246
254
  exports.DEEP_AGENT_DEFAULT_MESSAGE_WINDOW = DEEP_AGENT_DEFAULT_MESSAGE_WINDOW;
255
+ exports.DEEP_AGENT_HISTORY_LANE_COMMAND = DEEP_AGENT_HISTORY_LANE_COMMAND;
256
+ exports.DEEP_AGENT_HISTORY_MESSAGE_COMMAND = DEEP_AGENT_HISTORY_MESSAGE_COMMAND;
247
257
  exports.DEEP_AGENT_HISTORY_TOOL_OUTPUT_COMMAND = DEEP_AGENT_HISTORY_TOOL_OUTPUT_COMMAND;
248
258
  exports.DEEP_AGENT_INTEREST_PROTOCOL = DEEP_AGENT_INTEREST_PROTOCOL;
259
+ exports.DEEP_AGENT_LANE_CUT_PROTOCOL_VERSION = DEEP_AGENT_LANE_CUT_PROTOCOL_VERSION;
260
+ exports.DEEP_AGENT_LANE_USAGE_KEY = DEEP_AGENT_LANE_USAGE_KEY;
249
261
  exports.DEEP_AGENT_MAIN_NS = DEEP_AGENT_MAIN_NS;
250
262
  exports.DEEP_AGENT_MAX_INTERESTS = DEEP_AGENT_MAX_INTERESTS;
263
+ exports.DEEP_AGENT_MAX_LANE_PAGE = DEEP_AGENT_MAX_LANE_PAGE;
251
264
  exports.DEEP_AGENT_MAX_MESSAGE_WINDOW = DEEP_AGENT_MAX_MESSAGE_WINDOW;
252
265
  exports.DEEP_AGENT_MESSAGE_WINDOW_HEADER = DEEP_AGENT_MESSAGE_WINDOW_HEADER;
253
266
  exports.DEEP_AGENT_MIN_MESSAGE_WINDOW = DEEP_AGENT_MIN_MESSAGE_WINDOW;
254
267
  exports.DEEP_AGENT_PROTOCOL_STATE_KEY = DEEP_AGENT_PROTOCOL_STATE_KEY;
255
- exports.DEEP_AGENT_PROTOCOL_VERSION = DEEP_AGENT_PROTOCOL_VERSION;
256
268
  exports.DEEP_AGENT_PROTOCOL_VERSION_HEADER = DEEP_AGENT_PROTOCOL_VERSION_HEADER;
269
+ exports.DEEP_AGENT_REPEATS_RESULT_KEY = DEEP_AGENT_REPEATS_RESULT_KEY;
257
270
  exports.DEEP_AGENT_TRUNCATED_CONTENT_KEY = DEEP_AGENT_TRUNCATED_CONTENT_KEY;
271
+ exports.DEEP_AGENT_TRUNCATED_LANE_KEY = DEEP_AGENT_TRUNCATED_LANE_KEY;
258
272
  exports.KNOWN_START_CHANNELS = KNOWN_START_CHANNELS;
259
273
  exports.RUN_CONFIG_CUSTOM_KEYS = RUN_CONFIG_CUSTOM_KEYS;
260
274
  exports.RUN_CONFIG_PER_SEND_CUSTOM_KEYS = RUN_CONFIG_PER_SEND_CUSTOM_KEYS;
@@ -1 +1 @@
1
- {"version":3,"file":"runconfig-contract.cjs","sources":["../../../../../agent-runtime/src/generated/runconfig-contract.ts"],"sourcesContent":["// GENERATED FILE — DO NOT EDIT BY HAND.\n//\n// Source of truth (agora):\n// agora/agora/graphs/athena_deep_agent/run_config.py (_PARSED_CUSTOM_KEYS / _COMPANION_CUSTOM_KEYS / PER_SEND_CUSTOM_KEYS)\n// agora/agora/graphs/athena_deep_agent/thread_config.py (server config lane + config/* command names)\n// agora/agora/graphs/athena_deep_agent/session_asset.py (KNOWN_START_CHANNELS / DEEP_AGENT_RUNTIME_MARKER)\n// agora/agora/graphs/athena_deep_agent/client_tools.py (client-tool interrupt + result-envelope literals)\n// agora/agora/graphs/athena_deep_agent/protocol_version.py (wire-contract version negotiation)\n// agora/agora/graphs/athena_deep_agent/message_window.py (interest windows + history commands)\n// agora/agora/type_definitions/collab_agent.py (CAPABILITIES ladder: absent mode + new-agent default)\n//\n// Regenerate:\n// cd agora && mise exec -- infisical run --command 'uv run python scripts/export_runconfig_contract.py'\n//\n// CI verifies this file matches the Python source (agora-check runs the\n// exporter with --check), so hand edits and un-regenerated key changes fail.\n\n/** `runConfig.custom` keys parsed by agora's `parse_deep_agent_run_config`. */\nexport const RUN_CONFIG_PARSED_CUSTOM_KEYS = [\n \"agent_catalog_asset_ids\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"compiled_subagents\",\n \"declined_toolkit_ids\",\n \"drive_mounts\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_tools\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"outbound_approval_allowlist\",\n \"permissions\",\n \"project_id\",\n \"read_only\",\n \"recursion_limit\",\n \"run_label\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_machine\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"subagents\",\n \"system_prompt\",\n \"tool_description_overrides\",\n \"voice_update_handle\",\n \"workbench\",\n] as const;\n\n/** `runConfig.custom` keys consumed by the surrounding deep-agent request machinery rather than the capability parser. */\nexport const RUN_CONFIG_COMPANION_CUSTOM_KEYS = [\n \"agent\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"channel\",\n \"client_tools\",\n \"collab_agent_id\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"custom_tool_configs\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"dry_run\",\n \"enabled_toolkits\",\n \"entry_point\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"max_tokens\",\n \"middleware\",\n \"model\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"panel_config\",\n \"posthog_session_id\",\n \"run_budget\",\n \"runtime\",\n \"session_id\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"temperature\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"workspace_id\",\n] as const;\n\n/** Every `runConfig.custom` key some deep-agent request consumer reads. A key outside this set is invisible to the run and trips agora's unknown-key telemetry. */\nexport const RUN_CONFIG_CUSTOM_KEYS = [\n \"agent\",\n \"agent_catalog_asset_ids\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"channel\",\n \"client_tools\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"collab_agent_id\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"compiled_subagents\",\n \"custom_tool_configs\",\n \"declined_toolkit_ids\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"drive_mounts\",\n \"dry_run\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_toolkits\",\n \"enabled_tools\",\n \"entry_point\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"max_tokens\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"middleware\",\n \"model\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"outbound_approval_allowlist\",\n \"panel_config\",\n \"permissions\",\n \"posthog_session_id\",\n \"project_id\",\n \"read_only\",\n \"recursion_limit\",\n \"run_budget\",\n \"run_label\",\n \"runtime\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_id\",\n \"session_machine\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"subagents\",\n \"system_prompt\",\n \"temperature\",\n \"tool_description_overrides\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"voice_update_handle\",\n \"workbench\",\n \"workspace_id\",\n] as const;\n\nexport type RunConfigCustomKey = (typeof RUN_CONFIG_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const RUN_CONFIG_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n RUN_CONFIG_CUSTOM_KEYS,\n);\n\n/** `runConfig.custom` keys a client still carries per send on a thread with server config; every other key is dropped at dispatch. */\nexport const RUN_CONFIG_PER_SEND_CUSTOM_KEYS = [\n \"agent\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"channel\",\n \"client_tools\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"dry_run\",\n \"entry_point\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"posthog_session_id\",\n \"project_id\",\n \"read_only\",\n \"run_budget\",\n \"runtime\",\n \"session_id\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"voice_update_handle\",\n \"workspace_id\",\n] as const;\n\nexport type RunConfigPerSendCustomKey =\n (typeof RUN_CONFIG_PER_SEND_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const RUN_CONFIG_PER_SEND_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n RUN_CONFIG_PER_SEND_CUSTOM_KEYS,\n);\n\n/** Keys the thread's server config lane owns — changed only through the `config/*` commands, never per send. */\nexport const THREAD_CONFIG_CUSTOM_KEYS = [\n \"agent_catalog_asset_ids\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"collab_agent_id\",\n \"compiled_subagents\",\n \"custom_tool_configs\",\n \"declined_toolkit_ids\",\n \"drive_mounts\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_toolkits\",\n \"enabled_tools\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"max_tokens\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"middleware\",\n \"model\",\n \"outbound_approval_allowlist\",\n \"permissions\",\n \"recursion_limit\",\n \"run_label\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_machine\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"subagents\",\n \"system_prompt\",\n \"temperature\",\n \"tool_description_overrides\",\n \"workbench\",\n] as const;\n\nexport type ThreadConfigCustomKey = (typeof THREAD_CONFIG_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const THREAD_CONFIG_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n THREAD_CONFIG_CUSTOM_KEYS,\n);\n\n/** Replicated-state key of the server config lane (`{ version, custom }`). */\nexport const DEEP_AGENT_CONFIG_STATE_KEY = \"config\";\n\n/** The statewire commands that mutate the server config lane. */\nexport const DEEP_AGENT_CONFIG_COMMANDS = {\n patch: \"config/patch\",\n toolsEnable: \"config/tools/enable\",\n toolsDisable: \"config/tools/disable\",\n} as const;\n\n/** `start_channel` values the session substrate stamps as provenance; anything else clamps to \"web\". */\nexport const KNOWN_START_CHANNELS = [\n \"agent_orchestration\",\n \"api\",\n \"automation\",\n \"chrome_extension\",\n \"cli\",\n \"comment_agent\",\n \"default_voice\",\n \"desktop_app\",\n \"email\",\n \"mobile_app\",\n \"office_addin\",\n \"orchestration\",\n \"programmatic\",\n \"slack\",\n \"sms\",\n \"task\",\n \"teams\",\n \"voice\",\n \"voice_memo\",\n \"web\",\n] as const;\n\nexport type KnownStartChannel = (typeof KNOWN_START_CHANNELS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const KNOWN_START_CHANNEL_SET: ReadonlySet<string> = new Set(\n KNOWN_START_CHANNELS,\n);\n\n/** `runConfig.custom.runtime` marker selecting the deep-agent runtime. */\nexport const DEEP_AGENT_RUNTIME_MARKER = \"athena_deep_agent\";\n\n/**\n * Collab-agent capability ladder (agent schema v3): per explicit\n * capability field, what an ABSENT value means and the value stamped on\n * a new agent. Resolved by agora's `capability_decoder` and the one agent\n * compiler on every run: `passthrough` — explicit only, absent means off;\n * `off` — absent means off under every `runtime` marker; `runtime` —\n * absent derives from the `runtime` marker (`athena_deep_agent` on, any\n * other or missing marker off).\n */\nexport const COLLAB_AGENT_CAPABILITIES = {\n deepAgentBuiltinsEnabled: { absent: \"runtime\", default: true },\n interpreterEnabled: { absent: \"off\", default: false },\n sandboxEnabled: { absent: \"passthrough\", default: false },\n skillsEnabled: { absent: \"runtime\", default: true },\n} as const;\n\nexport type CollabAgentCapabilityField = keyof typeof COLLAB_AGENT_CAPABILITIES;\n\nexport type CollabAgentCapabilityAbsentMode =\n (typeof COLLAB_AGENT_CAPABILITIES)[CollabAgentCapabilityField][\"absent\"];\n\n/** `source`/`type` stamped on client-tool interrupt payloads by agora. */\nexport const CLIENT_TOOL_INTERRUPT_SOURCE = \"client_tool\";\n\n/** `status` literals of the result envelope a client resumes a parked client-tool call with. */\nexport const CLIENT_TOOL_RESULT_STATUSES = [\"error\", \"success\"] as const;\n\nexport type ClientToolResultStatus =\n (typeof CLIENT_TOOL_RESULT_STATUSES)[number];\n\nexport const CLIENT_TOOL_RESULT_STATUS_SUCCESS = \"success\";\n\nexport const CLIENT_TOOL_RESULT_STATUS_ERROR = \"error\";\n\n/**\n * Result envelope a client resumes a parked client-tool call with,\n * keyed by interrupt id:\n * `{ client_tool_results: { <interrupt_id>: <envelope> } }`.\n * Agora relays the envelope to the model verbatim.\n */\nexport type ClientToolResultEnvelopeContract =\n | { status: typeof CLIENT_TOOL_RESULT_STATUS_SUCCESS; result: unknown }\n | { status: typeof CLIENT_TOOL_RESULT_STATUS_ERROR; error: string };\n\n/**\n * The deep-agent wire-contract version this client build speaks,\n * declared on every attach. The host records it for attach telemetry\n * and per-version behaviour; it has no minimum client version, so no\n * build is refused for the version it declares (the `protocol` state\n * lane's `minClientVersion` is the constant 1).\n */\nexport const DEEP_AGENT_PROTOCOL_VERSION = 1;\n\n/** Attach header carrying the client's declared contract version. */\nexport const DEEP_AGENT_PROTOCOL_VERSION_HEADER =\n \"x-athena-deep-agent-protocol-version\";\n\n/** Attach header declaring the head window a fresh client wants in its hello (host-clamped). */\nexport const DEEP_AGENT_MESSAGE_WINDOW_HEADER = \"x-athena-deep-agent-window\";\n\n/** Replicated-state key of the server-advertised version lane. */\nexport const DEEP_AGENT_PROTOCOL_STATE_KEY = \"protocol\";\n\n/** Ephemeral subprotocol carrying a client's message-window interests. */\nexport const DEEP_AGENT_INTEREST_PROTOCOL = \"athena/interest\";\n\n/** Ephemeral subprotocol carrying a client's synced context document. */\nexport const DEEP_AGENT_CONTEXT_PROTOCOL = \"athena/context\";\n\n/** The only interest namespace the host resolves (the linear transcript). */\nexport const DEEP_AGENT_MAIN_NS = \"main\";\n\n/** Window size (interest `before`) a client asks for by default. */\nexport const DEEP_AGENT_DEFAULT_MESSAGE_WINDOW = 40;\n\n/** Bounds on a window size. */\nexport const DEEP_AGENT_MIN_MESSAGE_WINDOW = 8;\n\nexport const DEEP_AGENT_MAX_MESSAGE_WINDOW = 200;\n\n/** Interests one attach may hold at once (the head plus its pages). */\nexport const DEEP_AGENT_MAX_INTERESTS = 16;\n\n/** Command returning a truncated tool output whole. */\nexport const DEEP_AGENT_HISTORY_TOOL_OUTPUT_COMMAND = \"history/tool_output\";\n\n/** Command returning one stored message whole (provenance and full tool output included). */\nexport const DEEP_AGENT_HISTORY_MESSAGE_COMMAND = \"history/message\";\n\n/** Wire key marking a tool message whose content was truncated. */\nexport const DEEP_AGENT_TRUNCATED_CONTENT_KEY = \"athena_content_truncated\";\n\n/** Most inline-image payload characters one message carries whole on the wire. */\nexport const DEEP_AGENT_INLINE_IMAGE_WIRE_BUDGET = 4194304;\n\n/** Wire key on an image block left off the wire: `{ index, chars, mediaType }`. */\nexport const DEEP_AGENT_OMITTED_IMAGE_KEY = \"athena_image_omitted\";\n\n/** The image an omitted block carries instead of its own (a neutral PNG tile). */\nexport const DEEP_AGENT_OMITTED_IMAGE_PLACEHOLDER_URL =\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4AQMAAABPbGssAAAABlBMVEXi6PCUo7jao11HAAAA6ElEQVR42u2UyW3DMBBF3wxogEd2EJbCElKQDRCwC3MpSRc5eLuYokgNLEUxctK/CHyanQts2vRO3QdlALVsXsBvecqxxr1ob0A5GlDJU+hICxN54p/qXAx/+FpoeeE8hTerzfvByn7ifzpaBtWCOwv6bMVMBgzRgNGKmUL9McDs4XOSyEHuoKCI76AiqOugg+y0gx6SN+YQg3QwALGk19pQSKV/reOocyoww27oU5sxhAbKUNgIqrVxrvnovJ80MFgxYy23wtTss44tmL+bAuOE2p2o0fJa3iW/6iR/lEfx8kv3TZtW6AFk5Sf3k+GTswAAAABJRU5ErkJggg==\";\n\n/**\n * Command returning one inline image of a stored message in chunks:\n * `{ messageId, index, offset? }` answers\n * `{ messageId, index, mediaType, offset, total, chunk, next }`; the\n * chunks joined in order are the image's `data:` URL, and `next` is\n * the offset to ask for next (`null` after the last chunk).\n */\nexport const DEEP_AGENT_HISTORY_IMAGE_COMMAND = \"history/image\";\n"],"names":[],"mappings":";;AAoHO,MAAM,yBAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAK8D,IAAI;AAAA,EAChE;AACF;AAGO,MAAM,kCAAkC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAMuE,IAAI;AAAA,EACzE;AACF;AAGO,MAAM,4BAA4B;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKiE,IAAI;AAAA,EACnE;AACF;AAMO,MAAM,6BAA6B;AAAA,EACxC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,cAAc;AAChB;AAGO,MAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAK4D,IAAI;AAAA,EAC9D;AACF;AA2BO,MAAM,+BAA+B;AAQrC,MAAM,oCAAoC;AAE1C,MAAM,kCAAkC;AAmBxC,MAAM,8BAA8B;AAGpC,MAAM,qCACX;AAGK,MAAM,mCAAmC;AAGzC,MAAM,gCAAgC;AAGtC,MAAM,+BAA+B;AAMrC,MAAM,qBAAqB;AAG3B,MAAM,oCAAoC;AAG1C,MAAM,gCAAgC;AAEtC,MAAM,gCAAgC;AAGtC,MAAM,2BAA2B;AAGjC,MAAM,yCAAyC;AAM/C,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"runconfig-contract.cjs","sources":["../../../../../agent-runtime/src/generated/runconfig-contract.ts"],"sourcesContent":["// GENERATED FILE — DO NOT EDIT BY HAND.\n//\n// Source of truth (agora):\n// agora/agora/graphs/athena_deep_agent/run_config.py (_PARSED_CUSTOM_KEYS / _COMPANION_CUSTOM_KEYS / PER_SEND_CUSTOM_KEYS)\n// agora/agora/graphs/athena_deep_agent/thread_config.py (server config lane + config/* command names)\n// agora/agora/graphs/athena_deep_agent/session_asset.py (KNOWN_START_CHANNELS / DEEP_AGENT_RUNTIME_MARKER)\n// agora/agora/graphs/athena_deep_agent/client_tools.py (client-tool interrupt + result-envelope literals)\n// agora/agora/graphs/athena_deep_agent/protocol_version.py (wire-contract version negotiation)\n// agora/agora/graphs/athena_deep_agent/message_window.py (interest windows + history commands)\n// agora/agora/type_definitions/collab_agent.py (CAPABILITIES ladder: absent mode + new-agent default)\n//\n// Regenerate:\n// cd agora && mise exec -- infisical run --command 'uv run python scripts/export_runconfig_contract.py'\n//\n// CI verifies this file matches the Python source (agora-check runs the\n// exporter with --check), so hand edits and un-regenerated key changes fail.\n\n/** `runConfig.custom` keys parsed by agora's `parse_deep_agent_run_config`. */\nexport const RUN_CONFIG_PARSED_CUSTOM_KEYS = [\n \"agent_catalog_asset_ids\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"compiled_subagents\",\n \"declined_toolkit_ids\",\n \"drive_mounts\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_tools\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"outbound_approval_allowlist\",\n \"permissions\",\n \"project_id\",\n \"read_only\",\n \"recursion_limit\",\n \"run_label\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_machine\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"subagents\",\n \"system_prompt\",\n \"tool_description_overrides\",\n \"voice_update_handle\",\n \"workbench\",\n] as const;\n\n/** `runConfig.custom` keys consumed by the surrounding deep-agent request machinery rather than the capability parser. */\nexport const RUN_CONFIG_COMPANION_CUSTOM_KEYS = [\n \"agent\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"channel\",\n \"client_tools\",\n \"collab_agent_id\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"custom_tool_configs\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"dry_run\",\n \"enabled_toolkits\",\n \"entry_point\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"max_tokens\",\n \"middleware\",\n \"model\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"panel_config\",\n \"posthog_session_id\",\n \"run_budget\",\n \"runtime\",\n \"session_id\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"temperature\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"workspace_id\",\n] as const;\n\n/** Every `runConfig.custom` key some deep-agent request consumer reads. A key outside this set is invisible to the run and trips agora's unknown-key telemetry. */\nexport const RUN_CONFIG_CUSTOM_KEYS = [\n \"agent\",\n \"agent_catalog_asset_ids\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"channel\",\n \"client_tools\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"collab_agent_id\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"compiled_subagents\",\n \"custom_tool_configs\",\n \"declined_toolkit_ids\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"drive_mounts\",\n \"dry_run\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_toolkits\",\n \"enabled_tools\",\n \"entry_point\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"max_tokens\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"middleware\",\n \"model\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"outbound_approval_allowlist\",\n \"panel_config\",\n \"permissions\",\n \"posthog_session_id\",\n \"project_id\",\n \"read_only\",\n \"recursion_limit\",\n \"run_budget\",\n \"run_label\",\n \"runtime\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_id\",\n \"session_machine\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"subagents\",\n \"system_prompt\",\n \"temperature\",\n \"tool_description_overrides\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"voice_update_handle\",\n \"workbench\",\n \"workspace_id\",\n] as const;\n\nexport type RunConfigCustomKey = (typeof RUN_CONFIG_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const RUN_CONFIG_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n RUN_CONFIG_CUSTOM_KEYS,\n);\n\n/** `runConfig.custom` keys a client still carries per send on a thread with server config; every other key is dropped at dispatch. */\nexport const RUN_CONFIG_PER_SEND_CUSTOM_KEYS = [\n \"agent\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"channel\",\n \"client_tools\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"dry_run\",\n \"entry_point\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"posthog_session_id\",\n \"project_id\",\n \"read_only\",\n \"run_budget\",\n \"runtime\",\n \"session_id\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"voice_update_handle\",\n \"workspace_id\",\n] as const;\n\nexport type RunConfigPerSendCustomKey =\n (typeof RUN_CONFIG_PER_SEND_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const RUN_CONFIG_PER_SEND_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n RUN_CONFIG_PER_SEND_CUSTOM_KEYS,\n);\n\n/** Keys the thread's server config lane owns — changed only through the `config/*` commands, never per send. */\nexport const THREAD_CONFIG_CUSTOM_KEYS = [\n \"agent_catalog_asset_ids\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"collab_agent_id\",\n \"compiled_subagents\",\n \"custom_tool_configs\",\n \"declined_toolkit_ids\",\n \"drive_mounts\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_toolkits\",\n \"enabled_tools\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"max_tokens\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"middleware\",\n \"model\",\n \"outbound_approval_allowlist\",\n \"permissions\",\n \"recursion_limit\",\n \"run_label\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_machine\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"subagents\",\n \"system_prompt\",\n \"temperature\",\n \"tool_description_overrides\",\n \"workbench\",\n] as const;\n\nexport type ThreadConfigCustomKey = (typeof THREAD_CONFIG_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const THREAD_CONFIG_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n THREAD_CONFIG_CUSTOM_KEYS,\n);\n\n/** Replicated-state key of the server config lane (`{ version, custom }`). */\nexport const DEEP_AGENT_CONFIG_STATE_KEY = \"config\";\n\n/** The statewire commands that mutate the server config lane. */\nexport const DEEP_AGENT_CONFIG_COMMANDS = {\n patch: \"config/patch\",\n toolsEnable: \"config/tools/enable\",\n toolsDisable: \"config/tools/disable\",\n} as const;\n\n/** `start_channel` values the session substrate stamps as provenance; anything else clamps to \"web\". */\nexport const KNOWN_START_CHANNELS = [\n \"agent_orchestration\",\n \"api\",\n \"automation\",\n \"chrome_extension\",\n \"cli\",\n \"comment_agent\",\n \"default_voice\",\n \"desktop_app\",\n \"email\",\n \"mobile_app\",\n \"office_addin\",\n \"orchestration\",\n \"programmatic\",\n \"slack\",\n \"sms\",\n \"task\",\n \"teams\",\n \"voice\",\n \"voice_memo\",\n \"web\",\n] as const;\n\nexport type KnownStartChannel = (typeof KNOWN_START_CHANNELS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const KNOWN_START_CHANNEL_SET: ReadonlySet<string> = new Set(\n KNOWN_START_CHANNELS,\n);\n\n/** `runConfig.custom.runtime` marker selecting the deep-agent runtime. */\nexport const DEEP_AGENT_RUNTIME_MARKER = \"athena_deep_agent\";\n\n/**\n * Collab-agent capability ladder (agent schema v3): per explicit\n * capability field, what an ABSENT value means and the value stamped on\n * a new agent. Resolved by agora's `capability_decoder` and the one agent\n * compiler on every run: `passthrough` — explicit only, absent means off;\n * `off` — absent means off under every `runtime` marker; `runtime` —\n * absent derives from the `runtime` marker (`athena_deep_agent` on, any\n * other or missing marker off).\n */\nexport const COLLAB_AGENT_CAPABILITIES = {\n deepAgentBuiltinsEnabled: { absent: \"runtime\", default: true },\n interpreterEnabled: { absent: \"off\", default: false },\n sandboxEnabled: { absent: \"passthrough\", default: false },\n skillsEnabled: { absent: \"runtime\", default: true },\n} as const;\n\nexport type CollabAgentCapabilityField = keyof typeof COLLAB_AGENT_CAPABILITIES;\n\nexport type CollabAgentCapabilityAbsentMode =\n (typeof COLLAB_AGENT_CAPABILITIES)[CollabAgentCapabilityField][\"absent\"];\n\n/** `source`/`type` stamped on client-tool interrupt payloads by agora. */\nexport const CLIENT_TOOL_INTERRUPT_SOURCE = \"client_tool\";\n\n/** `status` literals of the result envelope a client resumes a parked client-tool call with. */\nexport const CLIENT_TOOL_RESULT_STATUSES = [\"error\", \"success\"] as const;\n\nexport type ClientToolResultStatus =\n (typeof CLIENT_TOOL_RESULT_STATUSES)[number];\n\nexport const CLIENT_TOOL_RESULT_STATUS_SUCCESS = \"success\";\n\nexport const CLIENT_TOOL_RESULT_STATUS_ERROR = \"error\";\n\n/**\n * Result envelope a client resumes a parked client-tool call with,\n * keyed by interrupt id:\n * `{ client_tool_results: { <interrupt_id>: <envelope> } }`.\n * Agora relays the envelope to the model verbatim.\n */\nexport type ClientToolResultEnvelopeContract =\n | { status: typeof CLIENT_TOOL_RESULT_STATUS_SUCCESS; result: unknown }\n | { status: typeof CLIENT_TOOL_RESULT_STATUS_ERROR; error: string };\n\n/**\n * The deep-agent wire-contract version this client build speaks,\n * declared on every attach. The host records it for attach telemetry\n * and per-version behaviour; it has no minimum client version, so no\n * build is refused for the version it declares (the `protocol` state\n * lane's `minClientVersion` is the constant 1).\n */\nexport const DEEP_AGENT_PROTOCOL_VERSION = 2;\n\n/**\n * The first contract version whose host a client states `follow` to (a\n * subagent lane's steps, each its own document): a client follows a\n * lane only on a host whose `protocol` lane advertises at least this\n * version. A host that predates `follow` refuses it with\n * `invalid-interest`.\n */\nexport const DEEP_AGENT_LANE_FOLLOW_PROTOCOL_VERSION = 2;\n\n/** Attach header carrying the client's declared contract version. */\nexport const DEEP_AGENT_PROTOCOL_VERSION_HEADER =\n \"x-athena-deep-agent-protocol-version\";\n\n/** Attach header declaring the head window a fresh client wants in its hello (host-clamped). */\nexport const DEEP_AGENT_MESSAGE_WINDOW_HEADER = \"x-athena-deep-agent-window\";\n\n/** Replicated-state key of the server-advertised version lane. */\nexport const DEEP_AGENT_PROTOCOL_STATE_KEY = \"protocol\";\n\n/** Ephemeral subprotocol carrying a client's message-window interests. */\nexport const DEEP_AGENT_INTEREST_PROTOCOL = \"athena/interest\";\n\n/** Ephemeral subprotocol carrying a client's synced context document. */\nexport const DEEP_AGENT_CONTEXT_PROTOCOL = \"athena/context\";\n\n/** The only interest namespace the host resolves (the linear transcript). */\nexport const DEEP_AGENT_MAIN_NS = \"main\";\n\n/** Window size (interest `before`) a client asks for by default. */\nexport const DEEP_AGENT_DEFAULT_MESSAGE_WINDOW = 40;\n\n/** Bounds on a window size. */\nexport const DEEP_AGENT_MIN_MESSAGE_WINDOW = 8;\n\nexport const DEEP_AGENT_MAX_MESSAGE_WINDOW = 200;\n\n/** Interests one attach may hold at once (the head plus its pages). */\nexport const DEEP_AGENT_MAX_INTERESTS = 16;\n\n/** Command returning a truncated tool output whole. */\nexport const DEEP_AGENT_HISTORY_TOOL_OUTPUT_COMMAND = \"history/tool_output\";\n\n/** Command returning one stored message whole (provenance and full tool output included). */\nexport const DEEP_AGENT_HISTORY_MESSAGE_COMMAND = \"history/message\";\n\n/** Wire key marking a tool message whose content was truncated. */\nexport const DEEP_AGENT_TRUNCATED_CONTENT_KEY = \"athena_content_truncated\";\n\n/**\n * Wire key on a running `task` card whose nested transcript rides cut to its\n * newest steps: `{ messages, tool_calls }` over the whole stored transcript.\n */\nexport const DEEP_AGENT_TRUNCATED_LANE_KEY = \"athena_lane_truncated\";\n\n/**\n * Wire key on a `task` card, and on an in-eval lane's `ptc_subagents` entry,\n * carrying the whole lane's token use however much of the lane the wire\n * carries: `{ input_tokens, output_tokens, cache_read_input_tokens,\n * cache_creation_input_tokens }`, the input counting its cache reads and\n * writes. Absent while the lane's steps report no usage.\n */\nexport const DEEP_AGENT_LANE_USAGE_KEY = \"athena_lane_usage\";\n\n/**\n * The newest nested messages a cut card carries whole; the entries ahead\n * of them are the older assistant turns that requested results among\n * them, cut to those calls.\n */\nexport const DEEP_AGENT_RUNNING_LANE_WIRE_MESSAGES = 8;\n\n/**\n * Key of a followed lane's window (`follows[ns]` on a resolution whose\n * request added `follow: {before}`) naming the `task` call whose card\n * holds the lane.\n */\nexport const DEEP_AGENT_FOLLOW_TOOL_CALL_ID_KEY = \"toolCallId\";\n\n/** The most lane steps one attach follows, across every lane. */\nexport const DEEP_AGENT_MAX_FOLLOWED_STEPS = 200;\n\n/**\n * The first contract version a client declares to see a finished card cut\n * like a running one (and to follow lanes and page them through\n * `history/lane`). Below it, or declaring nothing, finished cards ride whole.\n */\nexport const DEEP_AGENT_LANE_CUT_PROTOCOL_VERSION = 2;\n\n/**\n * Last element of the key a cut finished card's document rides under:\n * `[threadId, \"main\", messageId, \"cut\"]`. A view holds that key or the\n * card's own, never both.\n */\nexport const DEEP_AGENT_CUT_LANE_DOCUMENT = \"cut\";\n\n/**\n * Command returning one page of a card's nested transcript, oldest first:\n * `{ messageId, before, at? }` answers\n * `{ messageId, toolCallId, ns, steps, more: { before }, total }`; the page\n * holds the newest `before` entries, or those strictly older than `at`.\n */\nexport const DEEP_AGENT_HISTORY_LANE_COMMAND = \"history/lane\";\n\n/** The most entries one `history/lane` page asks for. */\nexport const DEEP_AGENT_MAX_LANE_PAGE = 200;\n\n/** The most encoded characters one `history/lane` page carries (at least one entry). */\nexport const DEEP_AGENT_HISTORY_LANE_PAGE_CHARS = 1048576;\n\n/**\n * Set on the last step of a cut finished card whose text is the card's own\n * `content` (the subagent's report): the step rides with empty content, and\n * the card's `content` is its text.\n */\nexport const DEEP_AGENT_REPEATS_RESULT_KEY = \"athena_content_repeats_result\";\n\n/** Most inline-image payload characters one message carries whole on the wire. */\nexport const DEEP_AGENT_INLINE_IMAGE_WIRE_BUDGET = 4194304;\n\n/** Wire key on an image block left off the wire: `{ index, chars, mediaType }`. */\nexport const DEEP_AGENT_OMITTED_IMAGE_KEY = \"athena_image_omitted\";\n\n/** The image an omitted block carries instead of its own (a neutral PNG tile). */\nexport const DEEP_AGENT_OMITTED_IMAGE_PLACEHOLDER_URL =\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4AQMAAABPbGssAAAABlBMVEXi6PCUo7jao11HAAAA6ElEQVR42u2UyW3DMBBF3wxogEd2EJbCElKQDRCwC3MpSRc5eLuYokgNLEUxctK/CHyanQts2vRO3QdlALVsXsBvecqxxr1ob0A5GlDJU+hICxN54p/qXAx/+FpoeeE8hTerzfvByn7ifzpaBtWCOwv6bMVMBgzRgNGKmUL9McDs4XOSyEHuoKCI76AiqOugg+y0gx6SN+YQg3QwALGk19pQSKV/reOocyoww27oU5sxhAbKUNgIqrVxrvnovJ80MFgxYy23wtTss44tmL+bAuOE2p2o0fJa3iW/6iR/lEfx8kv3TZtW6AFk5Sf3k+GTswAAAABJRU5ErkJggg==\";\n\n/**\n * Command returning one inline image of a stored message in chunks:\n * `{ messageId, index, offset? }` answers\n * `{ messageId, index, mediaType, offset, total, chunk, next }`; the\n * chunks joined in order are the image's `data:` URL, and `next` is\n * the offset to ask for next (`null` after the last chunk).\n */\nexport const DEEP_AGENT_HISTORY_IMAGE_COMMAND = \"history/image\";\n\n/**\n * Command returning one inline image of a lane step in chunks, as\n * `history/image` does a stored message's: `{ messageId | lane, step,\n * index, offset? }` answers `{ messageId, lane, step, index, mediaType,\n * offset, total, chunk, next }`, with `messageId` null for an in-eval\n * lane and `lane` null for a card.\n */\nexport const DEEP_AGENT_HISTORY_LANE_IMAGE_COMMAND = \"history/lane_image\";\n"],"names":[],"mappings":";;AAoHO,MAAM,yBAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAK8D,IAAI;AAAA,EAChE;AACF;AAGO,MAAM,kCAAkC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAMuE,IAAI;AAAA,EACzE;AACF;AAGO,MAAM,4BAA4B;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKiE,IAAI;AAAA,EACnE;AACF;AAMO,MAAM,6BAA6B;AAAA,EACxC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,cAAc;AAChB;AAGO,MAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAK4D,IAAI;AAAA,EAC9D;AACF;AA2BO,MAAM,+BAA+B;AAQrC,MAAM,oCAAoC;AAE1C,MAAM,kCAAkC;AA+BxC,MAAM,qCACX;AAGK,MAAM,mCAAmC;AAGzC,MAAM,gCAAgC;AAGtC,MAAM,+BAA+B;AAMrC,MAAM,qBAAqB;AAG3B,MAAM,oCAAoC;AAG1C,MAAM,gCAAgC;AAEtC,MAAM,gCAAgC;AAGtC,MAAM,2BAA2B;AAGjC,MAAM,yCAAyC;AAG/C,MAAM,qCAAqC;AAG3C,MAAM,mCAAmC;AAMzC,MAAM,gCAAgC;AAStC,MAAM,4BAA4B;AAwBlC,MAAM,uCAAuC;AAO7C,MAAM,+BAA+B;AAQrC,MAAM,kCAAkC;AAGxC,MAAM,2BAA2B;AAUjC,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}