@athenaintel/react 0.41.3 → 0.42.2

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 (479) hide show
  1. package/README.md +132 -10
  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.d.ts +60 -0
  48. package/dist/agent-runtime/src/edit-command.d.ts +156 -0
  49. package/dist/agent-runtime/src/errors.d.ts +174 -0
  50. package/dist/agent-runtime/src/execute-output.d.ts +31 -0
  51. package/dist/agent-runtime/src/generated/runconfig-contract.cjs +16 -2
  52. package/dist/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
  53. package/dist/agent-runtime/src/generated/runconfig-contract.d.ts +202 -0
  54. package/dist/agent-runtime/src/generated/runconfig-contract.js +16 -2
  55. package/dist/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
  56. package/dist/agent-runtime/src/github-wake-event.d.ts +77 -0
  57. package/dist/agent-runtime/src/index.d.ts +74 -0
  58. package/dist/agent-runtime/src/interrupts.cjs +17 -0
  59. package/dist/agent-runtime/src/interrupts.cjs.map +1 -1
  60. package/dist/agent-runtime/src/interrupts.d.ts +348 -0
  61. package/dist/agent-runtime/src/interrupts.js +17 -0
  62. package/dist/agent-runtime/src/interrupts.js.map +1 -1
  63. package/dist/agent-runtime/src/lane-follow.d.ts +121 -0
  64. package/dist/agent-runtime/src/lane-history.cjs +209 -0
  65. package/dist/agent-runtime/src/lane-history.cjs.map +1 -0
  66. package/dist/agent-runtime/src/lane-history.d.ts +175 -0
  67. package/dist/agent-runtime/src/lane-history.js +209 -0
  68. package/dist/agent-runtime/src/lane-history.js.map +1 -0
  69. package/dist/agent-runtime/src/lane-images.d.ts +184 -0
  70. package/dist/agent-runtime/src/message-author.d.ts +43 -0
  71. package/dist/agent-runtime/src/message-text.cjs +15 -0
  72. package/dist/agent-runtime/src/message-text.cjs.map +1 -0
  73. package/dist/agent-runtime/src/message-text.d.ts +47 -0
  74. package/dist/agent-runtime/src/message-text.js +15 -0
  75. package/dist/agent-runtime/src/message-text.js.map +1 -0
  76. package/dist/agent-runtime/src/message-window.cjs +15 -1
  77. package/dist/agent-runtime/src/message-window.cjs.map +1 -1
  78. package/dist/agent-runtime/src/message-window.d.ts +159 -0
  79. package/dist/agent-runtime/src/message-window.js +16 -2
  80. package/dist/agent-runtime/src/message-window.js.map +1 -1
  81. package/dist/agent-runtime/src/messages.cjs +123 -8
  82. package/dist/agent-runtime/src/messages.cjs.map +1 -1
  83. package/dist/agent-runtime/src/messages.d.ts +621 -0
  84. package/dist/agent-runtime/src/messages.js +123 -8
  85. package/dist/agent-runtime/src/messages.js.map +1 -1
  86. package/dist/agent-runtime/src/model-context.d.ts +22 -0
  87. package/dist/agent-runtime/src/offline-status.d.ts +157 -0
  88. package/dist/agent-runtime/src/optimistic-content.d.ts +21 -0
  89. package/dist/agent-runtime/src/protocol.cjs +12 -4
  90. package/dist/agent-runtime/src/protocol.cjs.map +1 -1
  91. package/dist/agent-runtime/src/protocol.d.ts +119 -0
  92. package/dist/agent-runtime/src/protocol.js +13 -5
  93. package/dist/agent-runtime/src/protocol.js.map +1 -1
  94. package/dist/agent-runtime/src/ptc-subcalls.d.ts +51 -0
  95. package/dist/agent-runtime/src/queue.d.ts +138 -0
  96. package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs +10 -0
  97. package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -1
  98. package/dist/agent-runtime/src/quota-safe-local-storage-session.d.ts +161 -0
  99. package/dist/agent-runtime/src/quota-safe-local-storage-session.js +10 -0
  100. package/dist/agent-runtime/src/quota-safe-local-storage-session.js.map +1 -1
  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/session-lane-scope.cjs +25 -0
  115. package/dist/agent-runtime/src/session-lane-scope.cjs.map +1 -0
  116. package/dist/agent-runtime/src/session-lane-scope.d.ts +59 -0
  117. package/dist/agent-runtime/src/session-lane-scope.js +25 -0
  118. package/dist/agent-runtime/src/session-lane-scope.js.map +1 -0
  119. package/dist/agent-runtime/src/statewire-attach-observer.d.ts +194 -0
  120. package/dist/agent-runtime/src/statewire-diagnostics.d.ts +74 -0
  121. package/dist/agent-runtime/src/statewire-state.d.ts +29 -0
  122. package/dist/agent-runtime/src/statewire-suspended.cjs.map +1 -1
  123. package/dist/agent-runtime/src/statewire-suspended.d.ts +27 -0
  124. package/dist/agent-runtime/src/statewire-suspended.js.map +1 -1
  125. package/dist/agent-runtime/src/statewire-transport.d.ts +40 -0
  126. package/dist/agent-runtime/src/streaming-markdown.d.ts +46 -0
  127. package/dist/agent-runtime/src/subagent-transcripts.cjs +209 -0
  128. package/dist/agent-runtime/src/subagent-transcripts.cjs.map +1 -0
  129. package/dist/agent-runtime/src/subagent-transcripts.d.ts +71 -0
  130. package/dist/agent-runtime/src/subagent-transcripts.js +209 -0
  131. package/dist/agent-runtime/src/subagent-transcripts.js.map +1 -0
  132. package/dist/agent-runtime/src/subagents.cjs +253 -0
  133. package/dist/agent-runtime/src/subagents.cjs.map +1 -0
  134. package/dist/agent-runtime/src/subagents.d.ts +311 -0
  135. package/dist/agent-runtime/src/subagents.js +253 -0
  136. package/dist/agent-runtime/src/subagents.js.map +1 -0
  137. package/dist/agent-runtime/src/subscription-wake-event.d.ts +111 -0
  138. package/dist/agent-runtime/src/thread-extras.d.ts +43 -0
  139. package/dist/agent-runtime/src/thread-handoff.d.ts +364 -0
  140. package/dist/agent-runtime/src/thread-prewarm-controller.d.ts +76 -0
  141. package/dist/agent-runtime/src/thread-prewarm.d.ts +118 -0
  142. package/dist/agent-runtime/src/thread-snapshot-cache.d.ts +99 -0
  143. package/dist/agent-runtime/src/thread-snapshot-mirror.cjs +46 -117
  144. package/dist/agent-runtime/src/thread-snapshot-mirror.cjs.map +1 -1
  145. package/dist/agent-runtime/src/thread-snapshot-mirror.d.ts +101 -0
  146. package/dist/agent-runtime/src/thread-snapshot-mirror.js +17 -88
  147. package/dist/agent-runtime/src/thread-snapshot-mirror.js.map +1 -1
  148. package/dist/agent-runtime/src/thread-status.d.ts +53 -0
  149. package/dist/agent-runtime/src/tool-metadata.d.ts +146 -0
  150. package/dist/agent-runtime/src/tool-names.cjs +71 -0
  151. package/dist/agent-runtime/src/tool-names.cjs.map +1 -1
  152. package/dist/agent-runtime/src/tool-names.d.ts +67 -0
  153. package/dist/agent-runtime/src/tool-names.js +72 -1
  154. package/dist/agent-runtime/src/tool-names.js.map +1 -1
  155. package/dist/agent-runtime/src/tool-outputs.d.ts +35 -0
  156. package/dist/agent-runtime/src/tool-result.cjs +1 -0
  157. package/dist/agent-runtime/src/tool-result.cjs.map +1 -1
  158. package/dist/agent-runtime/src/tool-result.d.ts +126 -0
  159. package/dist/agent-runtime/src/tool-result.js +1 -0
  160. package/dist/agent-runtime/src/tool-result.js.map +1 -1
  161. package/dist/agent-runtime/src/types.d.ts +159 -0
  162. package/dist/agent-runtime/src/use-conversation-list.d.ts +76 -0
  163. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs +136 -0
  164. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs.map +1 -0
  165. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.d.ts +64 -0
  166. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js +136 -0
  167. package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js.map +1 -0
  168. package/dist/agent-runtime/src/use-deep-agent-config.d.ts +169 -0
  169. package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs +13 -0
  170. package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -1
  171. package/dist/agent-runtime/src/use-deep-agent-edit-submit.d.ts +22 -0
  172. package/dist/agent-runtime/src/use-deep-agent-edit-submit.js +13 -0
  173. package/dist/agent-runtime/src/use-deep-agent-edit-submit.js.map +1 -1
  174. package/dist/agent-runtime/src/use-deep-agent-runtime.cjs +37 -2
  175. package/dist/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -1
  176. package/dist/agent-runtime/src/use-deep-agent-runtime.d.ts +177 -0
  177. package/dist/agent-runtime/src/use-deep-agent-runtime.js +38 -3
  178. package/dist/agent-runtime/src/use-deep-agent-runtime.js.map +1 -1
  179. package/dist/agent-runtime/src/use-deep-agent-thread.cjs +39 -13
  180. package/dist/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
  181. package/dist/agent-runtime/src/use-deep-agent-thread.d.ts +352 -0
  182. package/dist/agent-runtime/src/use-deep-agent-thread.js +39 -13
  183. package/dist/agent-runtime/src/use-deep-agent-thread.js.map +1 -1
  184. package/dist/agent-runtime/src/use-deep-agent-voice.cjs +1019 -0
  185. package/dist/agent-runtime/src/use-deep-agent-voice.cjs.map +1 -0
  186. package/dist/agent-runtime/src/use-deep-agent-voice.d.ts +409 -0
  187. package/dist/agent-runtime/src/use-deep-agent-voice.js +1019 -0
  188. package/dist/agent-runtime/src/use-deep-agent-voice.js.map +1 -0
  189. package/dist/agent-runtime/src/use-deep-agent-window-sync.d.ts +102 -0
  190. package/dist/agent-runtime/src/use-historical-edit-attachments.d.ts +2 -0
  191. package/dist/agent-runtime/src/use-thread-handoff-flow.d.ts +84 -0
  192. package/dist/agent-runtime/src/voice-presentation.cjs +2 -0
  193. package/dist/agent-runtime/src/voice-presentation.cjs.map +1 -1
  194. package/dist/agent-runtime/src/voice-presentation.d.ts +80 -0
  195. package/dist/agent-runtime/src/voice-presentation.js +2 -0
  196. package/dist/agent-runtime/src/voice-presentation.js.map +1 -1
  197. package/dist/agent-runtime/src/voice-turn-grouping.d.ts +28 -0
  198. package/dist/agent-runtime/src/voice-wire-types.d.ts +15 -0
  199. package/dist/agent-runtime/src/withdrawn-turns.d.ts +97 -0
  200. package/dist/catalog/runtime-catalog.js +1 -1
  201. package/dist/chat/AthenaChat.cjs +192 -103
  202. package/dist/chat/AthenaChat.cjs.map +1 -1
  203. package/dist/chat/AthenaChat.d.ts +9 -0
  204. package/dist/chat/AthenaChat.js +194 -105
  205. package/dist/chat/AthenaChat.js.map +1 -1
  206. package/dist/chat/StatewireApprovalCard.d.ts +1 -1
  207. package/dist/chat/StatewireClientToolBridge.d.ts +1 -1
  208. package/dist/chat/StatewireQueuedMessages.cjs +11 -4
  209. package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
  210. package/dist/chat/StatewireQueuedMessages.d.ts +1 -1
  211. package/dist/chat/StatewireQueuedMessages.js +11 -4
  212. package/dist/chat/StatewireQueuedMessages.js.map +1 -1
  213. package/dist/chat/chat-outbox-rows.cjs +223 -0
  214. package/dist/chat/chat-outbox-rows.cjs.map +1 -0
  215. package/dist/chat/chat-outbox-rows.d.ts +29 -0
  216. package/dist/chat/chat-outbox-rows.js +223 -0
  217. package/dist/chat/chat-outbox-rows.js.map +1 -0
  218. package/dist/chat/chat-voice-controls.cjs +128 -0
  219. package/dist/chat/chat-voice-controls.cjs.map +1 -0
  220. package/dist/chat/chat-voice-controls.d.ts +19 -0
  221. package/dist/chat/chat-voice-controls.js +128 -0
  222. package/dist/chat/chat-voice-controls.js.map +1 -0
  223. package/dist/chat/statewire-approval.d.ts +1 -1
  224. package/dist/chat/statewire-client-tools.d.ts +1 -1
  225. package/dist/chat/super-grouping/SuperGroupingCard.cjs +3 -1
  226. package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -1
  227. package/dist/chat/super-grouping/SuperGroupingCard.d.ts +7 -1
  228. package/dist/chat/super-grouping/SuperGroupingCard.js +3 -1
  229. package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -1
  230. package/dist/chat/super-grouping/SuperGroupingTranscript.cjs +7 -2
  231. package/dist/chat/super-grouping/SuperGroupingTranscript.cjs.map +1 -1
  232. package/dist/chat/super-grouping/SuperGroupingTranscript.d.ts +2 -2
  233. package/dist/chat/super-grouping/SuperGroupingTranscript.js +7 -2
  234. package/dist/chat/super-grouping/SuperGroupingTranscript.js.map +1 -1
  235. package/dist/chat/super-grouping/activity-timeline.cjs +15 -8
  236. package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
  237. package/dist/chat/super-grouping/activity-timeline.d.ts +18 -8
  238. package/dist/chat/super-grouping/activity-timeline.js +15 -8
  239. package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
  240. package/dist/chat/use-statewire-approval-request.cjs +36 -0
  241. package/dist/chat/use-statewire-approval-request.cjs.map +1 -1
  242. package/dist/chat/use-statewire-approval-request.d.ts +49 -1
  243. package/dist/chat/use-statewire-approval-request.js +39 -3
  244. package/dist/chat/use-statewire-approval-request.js.map +1 -1
  245. package/dist/chat-ui/composer/tiptap-composer.cjs +133 -14
  246. package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
  247. package/dist/chat-ui/composer/tiptap-composer.d.ts +33 -1
  248. package/dist/chat-ui/composer/tiptap-composer.js +135 -16
  249. package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
  250. package/dist/chat-ui/header/conversation-history-panel.d.ts +1 -1
  251. package/dist/chat-ui/index.d.ts +1 -1
  252. package/dist/chat-ui/mentions/suggestions/data/api-client.cjs +2 -1
  253. package/dist/chat-ui/mentions/suggestions/data/api-client.cjs.map +1 -1
  254. package/dist/chat-ui/mentions/suggestions/data/api-client.d.ts +3 -1
  255. package/dist/chat-ui/mentions/suggestions/data/api-client.js +2 -1
  256. package/dist/chat-ui/mentions/suggestions/data/api-client.js.map +1 -1
  257. package/dist/chat-ui/mentions/use-account-workspace-id.cjs +29 -51
  258. package/dist/chat-ui/mentions/use-account-workspace-id.cjs.map +1 -1
  259. package/dist/chat-ui/mentions/use-account-workspace-id.d.ts +2 -2
  260. package/dist/chat-ui/mentions/use-account-workspace-id.js +30 -52
  261. package/dist/chat-ui/mentions/use-account-workspace-id.js.map +1 -1
  262. package/dist/chat-ui/messages/message-components.cjs +15 -0
  263. package/dist/chat-ui/messages/message-components.cjs.map +1 -1
  264. package/dist/chat-ui/messages/message-components.js +15 -0
  265. package/dist/chat-ui/messages/message-components.js.map +1 -1
  266. package/dist/chat-ui/messages/runtime-message.d.ts +1 -1
  267. package/dist/chat-ui/messages/statewire-continue-run.d.ts +1 -1
  268. package/dist/chat-ui/messages/user-edit-composer.cjs +15 -2
  269. package/dist/chat-ui/messages/user-edit-composer.cjs.map +1 -1
  270. package/dist/chat-ui/messages/user-edit-composer.d.ts +4 -2
  271. package/dist/chat-ui/messages/user-edit-composer.js +15 -2
  272. package/dist/chat-ui/messages/user-edit-composer.js.map +1 -1
  273. package/dist/chat-ui/messages/wake-marker.d.ts +1 -1
  274. package/dist/chat-ui/rich-text/chat-text-schema.cjs +1 -0
  275. package/dist/chat-ui/rich-text/chat-text-schema.cjs.map +1 -1
  276. package/dist/chat-ui/rich-text/chat-text-schema.d.ts +3 -0
  277. package/dist/chat-ui/rich-text/chat-text-schema.js +1 -0
  278. package/dist/chat-ui/rich-text/chat-text-schema.js.map +1 -1
  279. package/dist/chat-ui/statewire.cjs +1 -0
  280. package/dist/chat-ui/statewire.cjs.map +1 -1
  281. package/dist/chat-ui/statewire.d.ts +2 -2
  282. package/dist/chat-ui/statewire.js +2 -1
  283. package/dist/chat-ui/thread/composer-send-or-stop.cjs +2 -1
  284. package/dist/chat-ui/thread/composer-send-or-stop.cjs.map +1 -1
  285. package/dist/chat-ui/thread/composer-send-or-stop.d.ts +2 -0
  286. package/dist/chat-ui/thread/composer-send-or-stop.js +2 -1
  287. package/dist/chat-ui/thread/composer-send-or-stop.js.map +1 -1
  288. package/dist/chat-ui/thread/statewire-history-edge.d.ts +1 -1
  289. package/dist/composer/AttachmentContext.cjs +8 -4
  290. package/dist/composer/AttachmentContext.cjs.map +1 -1
  291. package/dist/composer/AttachmentContext.d.ts +7 -0
  292. package/dist/composer/AttachmentContext.js +8 -4
  293. package/dist/composer/AttachmentContext.js.map +1 -1
  294. package/dist/composer/build-composed-message.cjs +34 -0
  295. package/dist/composer/build-composed-message.cjs.map +1 -1
  296. package/dist/composer/build-composed-message.d.ts +20 -0
  297. package/dist/composer/build-composed-message.js +35 -1
  298. package/dist/composer/build-composed-message.js.map +1 -1
  299. package/dist/composer/composer-handoff.cjs +39 -2
  300. package/dist/composer/composer-handoff.cjs.map +1 -1
  301. package/dist/composer/composer-handoff.d.ts +28 -3
  302. package/dist/composer/composer-handoff.js +39 -2
  303. package/dist/composer/composer-handoff.js.map +1 -1
  304. package/dist/composer/useAttachFiles.cjs +15 -2
  305. package/dist/composer/useAttachFiles.cjs.map +1 -1
  306. package/dist/composer/useAttachFiles.d.ts +11 -0
  307. package/dist/composer/useAttachFiles.js +15 -2
  308. package/dist/composer/useAttachFiles.js.map +1 -1
  309. package/dist/composer/useSendMessage.cjs.map +1 -1
  310. package/dist/composer/useSendMessage.d.ts +4 -3
  311. package/dist/composer/useSendMessage.js.map +1 -1
  312. package/dist/diagnostics/athena-diagnostics.cjs.map +1 -1
  313. package/dist/diagnostics/athena-diagnostics.d.ts +3 -1
  314. package/dist/diagnostics/athena-diagnostics.js.map +1 -1
  315. package/dist/index.cjs +13 -0
  316. package/dist/index.cjs.map +1 -1
  317. package/dist/index.d.ts +14 -7
  318. package/dist/index.js +14 -1
  319. package/dist/index.js.map +1 -1
  320. package/dist/offline/chat-outbox.cjs +57 -0
  321. package/dist/offline/chat-outbox.cjs.map +1 -0
  322. package/dist/offline/chat-outbox.d.ts +80 -0
  323. package/dist/offline/chat-outbox.js +57 -0
  324. package/dist/offline/chat-outbox.js.map +1 -0
  325. package/dist/offline/offline-history.d.ts +1 -1
  326. package/dist/provider/AthenaProvider.cjs +162 -8
  327. package/dist/provider/AthenaProvider.cjs.map +1 -1
  328. package/dist/provider/AthenaProvider.d.ts +15 -1
  329. package/dist/provider/AthenaProvider.js +163 -9
  330. package/dist/provider/AthenaProvider.js.map +1 -1
  331. package/dist/provider/statewire-window-context.d.ts +1 -1
  332. package/dist/react/package.json.cjs +1 -1
  333. package/dist/react/package.json.js +1 -1
  334. package/dist/references/src/anchors/file-line-range.d.ts +58 -0
  335. package/dist/references/src/anchors/format.d.ts +21 -0
  336. package/dist/references/src/anchors/message-anchors.d.ts +71 -0
  337. package/dist/references/src/anchors/parse.d.ts +8 -0
  338. package/dist/references/src/anchors/registry-contract.d.ts +24 -0
  339. package/dist/references/src/anchors/registry.d.ts +19 -0
  340. package/dist/references/src/anchors/schemas.d.ts +194 -0
  341. package/dist/references/src/anchors/serialize.d.ts +8 -0
  342. package/dist/references/src/anchors/time.d.ts +78 -0
  343. package/dist/references/src/anchors/types.d.ts +474 -0
  344. package/dist/references/src/asset-bounds.d.ts +27 -0
  345. package/dist/references/src/asset-links.d.ts +23 -0
  346. package/dist/references/src/asset-reference.d.ts +16 -0
  347. package/dist/references/src/formats/format-catalog.d.ts +79 -0
  348. package/dist/references/src/formats/markdown/parse-reference-markdown.d.ts +28 -0
  349. package/dist/references/src/formats/markdown/reference-display-name.d.ts +6 -0
  350. package/dist/references/src/formats/object/asset-object.d.ts +9 -0
  351. package/dist/references/src/formats/object/callable-object.d.ts +6 -0
  352. package/dist/references/src/formats/object/decode-reference-object-payload.d.ts +3 -0
  353. package/dist/references/src/formats/object/external-url-object.d.ts +9 -0
  354. package/dist/references/src/formats/object/group-object.d.ts +9 -0
  355. package/dist/references/src/formats/object/navigation-object.d.ts +9 -0
  356. package/dist/references/src/formats/object/parse-reference-object.d.ts +11 -0
  357. package/dist/references/src/formats/object/person-object.d.ts +9 -0
  358. package/dist/references/src/formats/uri/asset-mention-uri.d.ts +9 -0
  359. package/dist/references/src/formats/uri/asset-spaces-url.d.ts +9 -0
  360. package/dist/references/src/formats/uri/callable-mention-uris.d.ts +9 -0
  361. package/dist/references/src/formats/uri/detect-uri-wire.d.ts +9 -0
  362. package/dist/references/src/formats/uri/group-mention-uri.d.ts +12 -0
  363. package/dist/references/src/formats/uri/navigation-spaces-url.d.ts +14 -0
  364. package/dist/references/src/formats/uri/parse-reference-uri.d.ts +20 -0
  365. package/dist/references/src/formats/uri/person-mention-uri.d.ts +9 -0
  366. package/dist/references/src/formats/uri/template-placeholder.d.ts +12 -0
  367. package/dist/references/src/index.d.ts +47 -0
  368. package/dist/references/src/legacy/index.d.ts +14 -0
  369. package/dist/references/src/legacy/pre-reference-asset-url.d.ts +57 -0
  370. package/dist/references/src/legacy/pre-reference-citation-bridge.d.ts +22 -0
  371. package/dist/references/src/legacy/pre-reference-citation.d.ts +138 -0
  372. package/dist/references/src/legacy/pre-reference-external-url.d.ts +31 -0
  373. package/dist/references/src/legacy/pre-reference-format.d.ts +8 -0
  374. package/dist/references/src/legacy/pre-reference-mention.d.ts +27 -0
  375. package/dist/references/src/legacy/pre-reference-object.d.ts +8 -0
  376. package/dist/references/src/legacy/pre-reference-uri.d.ts +12 -0
  377. package/dist/references/src/legacy.d.ts +2 -0
  378. package/dist/references/src/mention-href-patterns.d.ts +19 -0
  379. package/dist/references/src/mention-node/index.d.ts +5 -0
  380. package/dist/references/src/mention-node/mention-node.d.ts +31 -0
  381. package/dist/references/src/mention-node/resolve-node-attrs.d.ts +27 -0
  382. package/dist/references/src/parse-reference.d.ts +23 -0
  383. package/dist/references/src/schemas.d.ts +463 -0
  384. package/dist/references/src/serialize-reference.d.ts +50 -0
  385. package/dist/references/src/sheet-name.d.ts +10 -0
  386. package/dist/references/src/tool-option-schemas.d.ts +597 -0
  387. package/dist/references/src/types.d.ts +125 -0
  388. package/dist/references/src/version-ref.d.ts +30 -0
  389. package/dist/runtime/statewire-lifecycle.d.ts +1 -1
  390. package/dist/runtime/statewire-model-lane.d.ts +1 -1
  391. package/dist/runtime/statewire-server-lane-context.d.ts +1 -1
  392. package/dist/runtime/statewire-session-key.cjs +7 -0
  393. package/dist/runtime/statewire-session-key.cjs.map +1 -1
  394. package/dist/runtime/statewire-session-key.d.ts +19 -0
  395. package/dist/runtime/statewire-session-key.js +8 -1
  396. package/dist/runtime/statewire-session-key.js.map +1 -1
  397. package/dist/runtime/statewire-session-lane.cjs +48 -0
  398. package/dist/runtime/statewire-session-lane.cjs.map +1 -0
  399. package/dist/runtime/statewire-session-lane.d.ts +29 -0
  400. package/dist/runtime/statewire-session-lane.js +48 -0
  401. package/dist/runtime/statewire-session-lane.js.map +1 -0
  402. package/dist/runtime/statewire-thread-config-lane.d.ts +1 -1
  403. package/dist/runtime/useAthenaStatewireRuntime.cjs +19 -5
  404. package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
  405. package/dist/runtime/useAthenaStatewireRuntime.d.ts +15 -1
  406. package/dist/runtime/useAthenaStatewireRuntime.js +20 -6
  407. package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
  408. package/dist/styles.css +1 -1
  409. package/dist/threads/api.d.ts +1 -1
  410. package/dist/threads/conversation-list-fetcher.d.ts +1 -1
  411. package/dist/threads/index-triggered-refresh.cjs +164 -0
  412. package/dist/threads/index-triggered-refresh.cjs.map +1 -0
  413. package/dist/threads/index-triggered-refresh.d.ts +70 -0
  414. package/dist/threads/index-triggered-refresh.js +164 -0
  415. package/dist/threads/index-triggered-refresh.js.map +1 -0
  416. package/dist/threads/offline-session-list.d.ts +1 -1
  417. package/dist/threads/pull-request-display.d.ts +1 -1
  418. package/dist/threads/session-list-model.d.ts +1 -1
  419. package/dist/threads/session-list-tab-share.cjs +150 -0
  420. package/dist/threads/session-list-tab-share.cjs.map +1 -0
  421. package/dist/threads/session-list-tab-share.d.ts +73 -0
  422. package/dist/threads/session-list-tab-share.js +150 -0
  423. package/dist/threads/session-list-tab-share.js.map +1 -0
  424. package/dist/threads/session-row-parts.d.ts +1 -1
  425. package/dist/threads/sessions-query.d.ts +1 -1
  426. package/dist/threads/statewire-thread-list.cjs +42 -16
  427. package/dist/threads/statewire-thread-list.cjs.map +1 -1
  428. package/dist/threads/statewire-thread-list.d.ts +11 -2
  429. package/dist/threads/statewire-thread-list.js +43 -17
  430. package/dist/threads/statewire-thread-list.js.map +1 -1
  431. package/dist/threads/thread-prefetcher.d.ts +1 -1
  432. package/dist/threads/use-athena-session-attention.d.ts +1 -1
  433. package/dist/threads/use-athena-sessions.cjs +32 -22
  434. package/dist/threads/use-athena-sessions.cjs.map +1 -1
  435. package/dist/threads/use-athena-sessions.js +33 -23
  436. package/dist/threads/use-athena-sessions.js.map +1 -1
  437. package/dist/threads/use-rest-conversation-history.d.ts +1 -1
  438. package/dist/threads/use-statewire-conversation-history.d.ts +5 -5
  439. package/dist/tiptap-markdown-table/src/markdown-table-serializer.d.ts +56 -0
  440. package/dist/tools/NestedPtcMessages.cjs +14 -9
  441. package/dist/tools/NestedPtcMessages.cjs.map +1 -1
  442. package/dist/tools/NestedPtcMessages.d.ts +9 -0
  443. package/dist/tools/NestedPtcMessages.js +6 -1
  444. package/dist/tools/NestedPtcMessages.js.map +1 -1
  445. package/dist/tools/index.d.ts +1 -1
  446. package/dist/tools/primitives.d.ts +1 -1
  447. package/dist/tools/subagent-task-tool-ui.cjs +494 -0
  448. package/dist/tools/subagent-task-tool-ui.cjs.map +1 -0
  449. package/dist/tools/subagent-task-tool-ui.d.ts +109 -0
  450. package/dist/tools/subagent-task-tool-ui.js +494 -0
  451. package/dist/tools/subagent-task-tool-ui.js.map +1 -0
  452. package/dist/tools/tool-fallback.d.ts +1 -1
  453. package/dist/tools/tool-icons.d.ts +1 -1
  454. package/dist/tools/tool-summary.d.ts +1 -1
  455. package/dist/tools/tool-uis.cjs +4 -0
  456. package/dist/tools/tool-uis.cjs.map +1 -1
  457. package/dist/tools/tool-uis.js +4 -0
  458. package/dist/tools/tool-uis.js.map +1 -1
  459. package/dist/voice/chat.cjs +6 -0
  460. package/dist/voice/chat.cjs.map +1 -0
  461. package/dist/voice/chat.d.ts +2 -0
  462. package/dist/voice/chat.js +6 -0
  463. package/dist/voice/chat.js.map +1 -0
  464. package/dist/voice/livekit-join.cjs +119 -0
  465. package/dist/voice/livekit-join.cjs.map +1 -0
  466. package/dist/voice/livekit-join.d.ts +8 -0
  467. package/dist/voice/livekit-join.js +119 -0
  468. package/dist/voice/livekit-join.js.map +1 -0
  469. package/dist/voice/livekit.cjs +32 -0
  470. package/dist/voice/livekit.cjs.map +1 -0
  471. package/dist/voice/livekit.d.ts +80 -0
  472. package/dist/voice/livekit.js +32 -0
  473. package/dist/voice/livekit.js.map +1 -0
  474. package/dist/voice/use-chat-voice-enabled.cjs +43 -0
  475. package/dist/voice/use-chat-voice-enabled.cjs.map +1 -0
  476. package/dist/voice/use-chat-voice-enabled.d.ts +9 -0
  477. package/dist/voice/use-chat-voice-enabled.js +43 -0
  478. package/dist/voice/use-chat-voice-enabled.js.map +1 -0
  479. package/package.json +22 -16
@@ -0,0 +1,9 @@
1
+ import type { ExternalUrlReference } from '../../types';
2
+ /**
3
+ * Decode: `{ format: 'external_url_object', ... }` → ExternalUrlReference
4
+ */
5
+ export declare function decodeFromExternalUrlObject(data: Record<string, unknown>): ExternalUrlReference;
6
+ /**
7
+ * Encode: ExternalUrlReference → object with `format: 'external_url_object'`
8
+ */
9
+ export declare function encodeToExternalUrlObject(ref: ExternalUrlReference): Record<string, unknown>;
@@ -0,0 +1,9 @@
1
+ import type { GroupReference } from '../../types';
2
+ /**
3
+ * Decode: `{ format: 'group_object', ... }` → GroupReference
4
+ */
5
+ export declare function decodeFromGroupObject(data: Record<string, unknown>): GroupReference;
6
+ /**
7
+ * Encode: GroupReference → object with `format: 'group_object'`
8
+ */
9
+ export declare function encodeToGroupObject(ref: GroupReference): Record<string, unknown>;
@@ -0,0 +1,9 @@
1
+ import type { NavigationReference } from '../../types';
2
+ /**
3
+ * Decode: `{ format: 'navigation_object', ... }` → NavigationReference
4
+ */
5
+ export declare function decodeFromNavigationObject(data: Record<string, unknown>): NavigationReference;
6
+ /**
7
+ * Encode: NavigationReference → object with `format: 'navigation_object'`
8
+ */
9
+ export declare function encodeToNavigationObject(ref: NavigationReference): Record<string, unknown>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Object wire: canonical `{ format: … }` first, then pre-reference inference.
3
+ */
4
+ import { type DetectedObjectFormat } from '../format-catalog';
5
+ import type { Reference } from '../../types';
6
+ export { ObjectFormat, type DetectedObjectFormat } from '../format-catalog';
7
+ /**
8
+ * Parse a stored object into a runtime Reference.
9
+ */
10
+ export declare function parseReferenceObject(input: Record<string, unknown>): Reference;
11
+ export declare function detectObjectFormat(input: Record<string, unknown>): DetectedObjectFormat;
@@ -0,0 +1,9 @@
1
+ import type { PersonReference } from '../../types';
2
+ /**
3
+ * Decode: `{ format: 'person_object', ... }` → PersonReference
4
+ */
5
+ export declare function decodeFromPersonObject(data: Record<string, unknown>): PersonReference;
6
+ /**
7
+ * Encode: PersonReference → object with `format: 'person_object'`
8
+ */
9
+ export declare function encodeToPersonObject(ref: PersonReference): Record<string, unknown>;
@@ -0,0 +1,9 @@
1
+ import type { AssetReference } from '../../types';
2
+ /**
3
+ * Decode: `mention://asset?id=X&anchor=page&page=5` → AssetReference
4
+ */
5
+ export declare function decodeFromAssetMentionUri(url: URL): AssetReference;
6
+ /**
7
+ * Encode: AssetReference → `mention://asset?id=X&anchor=page&page=5`
8
+ */
9
+ export declare function encodeToAssetMentionUri(reference: AssetReference): string;
@@ -0,0 +1,9 @@
1
+ import type { AssetReference } from '../../types';
2
+ /**
3
+ * Decode: `/dashboard/spaces?asset_ids=X&...` → AssetReference
4
+ */
5
+ export declare function decodeFromAssetSpacesUrl(url: URL): AssetReference;
6
+ /**
7
+ * Encode: AssetReference → `/dashboard/spaces?asset_ids=X&...`
8
+ */
9
+ export declare function encodeToAssetSpacesUrl(reference: AssetReference): string;
@@ -0,0 +1,9 @@
1
+ import type { CallableReference } from '../../types';
2
+ /**
3
+ * Decode: `mention://tool|toolkit|workspaceitem?...` → CallableReference (`kind` from hostname).
4
+ */
5
+ export declare function decodeFromCallableMentionUri(url: URL): CallableReference;
6
+ /**
7
+ * Encode: CallableReference → `mention://tool|toolkit|workspaceitem?name=X&...`
8
+ */
9
+ export declare function encodeCallableToMentionUri(ref: CallableReference): string;
@@ -0,0 +1,9 @@
1
+ import { type DetectedUriFormat } from '../format-catalog';
2
+ /**
3
+ * Detect URI format from a string.
4
+ *
5
+ * Checks canonical wire signatures (asset Spaces URL, asset/callable/person/group `mention://`,
6
+ * then legacy `pre_reference_uri`). Callable `mention://tool|toolkit|workspaceitem` share one format:
7
+ * `callable_mention_uri` (`kind` is determined from the hostname when decoding).
8
+ */
9
+ export declare function detectUriFormat(input: string): DetectedUriFormat;
@@ -0,0 +1,12 @@
1
+ import type { GroupReference } from '../../types';
2
+ /**
3
+ * Decode: `mention://group?id=X&name=Y` → GroupReference
4
+ *
5
+ * `id` is the workspace group id (`group_<uuid>`); `name` is display-only and
6
+ * lands in `meta.name`, mirroring `mention://person`'s `name` param.
7
+ */
8
+ export declare function decodeFromGroupMentionUri(url: URL): GroupReference;
9
+ /**
10
+ * Encode: GroupReference → `mention://group?id=X&name=Y`
11
+ */
12
+ export declare function encodeToGroupMentionUri(ref: GroupReference): string;
@@ -0,0 +1,14 @@
1
+ import type { NavigationReference } from '../../types';
2
+ /**
3
+ * True when `asset_ids` lists only Spaces drive tab slots (`drive`, `drive1`, …),
4
+ * not normal asset UUIDs. Used to distinguish navigation URLs from asset Spaces URLs.
5
+ */
6
+ export declare function isDriveTabAssetIds(assetIds: string): boolean;
7
+ /**
8
+ * Decode: `/dashboard/spaces?...` where `asset_ids` is drive-tab-only → NavigationReference
9
+ */
10
+ export declare function decodeFromNavigationSpacesUrl(url: URL): NavigationReference;
11
+ /**
12
+ * Encode: NavigationReference → relative Spaces path (pathname + search)
13
+ */
14
+ export declare function encodeToNavigationSpacesUrl(ref: NavigationReference): string;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * URI format: detection + parsing.
3
+ *
4
+ * Detects the URI sub-format and dispatches to the appropriate decoder.
5
+ * Canonical URI wires are handled directly. `pre_reference_uri`
6
+ * is routed to the legacy decoder which handles all pre-reference URI types.
7
+ */
8
+ import type { Reference, Referenced } from '../../types';
9
+ export { UriFormat, type DetectedUriFormat } from '../format-catalog';
10
+ export { detectUriFormat } from './detect-uri-wire';
11
+ /**
12
+ * Parse a URI string into a runtime Reference.
13
+ *
14
+ * Never fails on a valid URL — unrecognized strings degrade to ExternalUrlReference.
15
+ */
16
+ export declare function parseReferenceURI(input: string): Reference;
17
+ /**
18
+ * Level-1 `Referenced` discriminator from a URI string without full decode.
19
+ */
20
+ export declare function getReferencedFromUriString(input: string): Referenced | undefined;
@@ -0,0 +1,9 @@
1
+ import type { PersonReference } from '../../types';
2
+ /**
3
+ * Decode: `mention://person?id=X&email=Y` → PersonReference
4
+ */
5
+ export declare function decodeFromPersonMentionUri(url: URL): PersonReference;
6
+ /**
7
+ * Encode: PersonReference → `mention://person?id=X&email=Y`
8
+ */
9
+ export declare function encodeToPersonMentionUri(ref: PersonReference): string;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Unwraps a query value an agent copied from a link template with the
3
+ * template's brackets kept, e.g. `asset_ids=[asset_x]` from
4
+ * `asset_ids=[ASSET_ID]`. Kept verbatim, the id never resolves and the mention
5
+ * reads "Asset Not Found" for an asset that exists.
6
+ *
7
+ * Only a single bracketed token is unwrapped; anything containing a comma,
8
+ * whitespace or nested brackets is returned unchanged. So is the template's own
9
+ * placeholder (`[ASSET_ID]`, `[ASSET_TYPE]`): a prompt that teaches the link
10
+ * template must read back exactly as written.
11
+ */
12
+ export declare function unwrapTemplatePlaceholder(value: string): string;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @athenaintel/references — Core reference system (parse, serialize, types).
3
+ *
4
+ * Pure TypeScript, no React or frontend dependencies.
5
+ *
6
+ * Pre-reference (TipTap-era) codecs are exported from `@athenaintel/references/legacy`.
7
+ * Olympus extends the core with UI-specific layers (anchor editors, renderers).
8
+ * `@athenaintel/references/asset-links` is the zod-free slice the React SDK bundles.
9
+ *
10
+ * The only exception is the TipTap node -> {reference} transform, which
11
+ * stays in Olympus because it is deeply coupled to the TipTap mention
12
+ * extension. That will migrate once the mention system uses runtime
13
+ * References directly.
14
+ */
15
+ export { type AssetLike, assetToReference } from './asset-reference';
16
+ export { anchorSchema, parseAnchor, } from './anchors/schemas';
17
+ export { parseAnchorFromParams, } from './anchors/parse';
18
+ export { serializeAnchorToParams, } from './anchors/serialize';
19
+ export { formatReferenceAnchor, type ReferenceAnchorFormatMode } from './anchors/format';
20
+ export { FILE_LINE_RANGE_BOUNDS, fileLineRangeAnchorByteLength, fileLineRangeAnchorProblem, repoPathProblem, type FileLineRangeFields, } from './anchors/file-line-range';
21
+ export { findMessageText, messageBlockHash, messageHeadingSlug, messageTextContext, normalizeMessageText, type MessageTextMatch, } from './anchors/message-anchors';
22
+ export { ASSET_ANCHOR_REGISTRY, getAnchorSupport, isAnchorAllowed, isAnchorPreferred, } from './anchors/registry';
23
+ export { AnchorType, QueryResultRelationship } from './anchors/types';
24
+ export type { Anchor, CellAnchor, CellRangeAnchor, CommentAnchor, CommentThreadAnchor, FileLineRangeAnchor, LineAnchor, LineRangeAnchor, MessageAnchor, MessageBlockAnchor, MessageRangeAnchor, MessageSectionAnchor, MessageTextAnchor, PageAnchor, PageRangeAnchor, PageRectAnchor, PageTextAnchor, PathAnchor, PixelRangeAnchor, PmMarkAnchor, PmNodeAnchor, PmNodeRangeAnchor, RectAnchor, SectionAnchor, SemanticQueryAnchor, ShapeAnchor, SheetCellAnchor, SheetRangeAnchor, SheetTabAnchor, SheetTableAnchor, LakehouseTableAnchor, SlideAnchor, SqlQueryAnchor, TimeAnchor, TimeRangeAnchor, TimeAnchorSeconds, TimeRangeAnchorSeconds, ToolCallAnchor, } from './anchors/types';
25
+ export { isAnchor, isAnchorType, LEGACY_ANCHOR_TYPES } from './anchors/types';
26
+ export { formatSecondsForCitation, formatSecondsForDisplay, formatTimestampForDisplay, getAnchorTimeSeconds, getTimeAnchorSeconds, parseTimeInput, parseTimestampToSeconds, timeSecondsToAnchor, } from './anchors/time';
27
+ export { quoteSheetName } from './sheet-name';
28
+ export type { AssetBounds } from './asset-bounds';
29
+ export { FORMAT_CATALOG, getFormatEntry, getPreferredFormat, getReferencedForFormat, isCanonicalObjectFormat, ObjectFormat, UriFormat, } from './formats/format-catalog';
30
+ export type { DetectedObjectFormat, DetectedUriFormat, FormatEntry, WireType, } from './formats/format-catalog';
31
+ export { detectUriFormat, getReferencedFromUriString, } from './formats/uri/parse-reference-uri';
32
+ export { detectObjectFormat } from './formats/object/parse-reference-object';
33
+ export { MARKDOWN_AT_LINK, parseReferenceMarkdownChunks, } from './formats/markdown/parse-reference-markdown';
34
+ export { getDisplayNameFromReference } from './formats/markdown/reference-display-name';
35
+ export { encodeToAssetSpacesUrl } from './formats/uri/asset-spaces-url';
36
+ export { encodeToAssetMentionUri } from './formats/uri/asset-mention-uri';
37
+ export { encodeToNavigationSpacesUrl, isDriveTabAssetIds } from './formats/uri/navigation-spaces-url';
38
+ export { detectFormat, parseReference, parseReferenceURI, parseReferenceObject, getReferencedEntity, } from './parse-reference';
39
+ export type { DetectedFormat } from './parse-reference';
40
+ export type { AssetLinkFormat, SerializeReferenceToMarkdownOptions, SerializeUriOptions, SerializeUrlOptions, } from './serialize-reference';
41
+ export { serializeReference, serializeReferenceToMarkdown, serializeReferenceToObject, serializeReferenceToURI, serializeReferenceToURL, } from './serialize-reference';
42
+ export { getPinnedVersionId, normalizeAssetReference, parseVersionRefFromParams, serializeVersionRefToParams, splitVersionedAssetId, } from './version-ref';
43
+ export { assetReferenceSchema, assetVersionRefSchema, threadReferenceDataSchema, parseAssetReference, parseThreadReference, } from './schemas';
44
+ export { addDisplayNameToReference, resolveNodeAttrsToReference, } from './mention-node/resolve-node-attrs';
45
+ export { MENTION_HREF_PATTERNS, isMentionLikeHref } from './mention-href-patterns';
46
+ export type { AssetMeta, AssetReference, AssetVersionRef, CallableMeta, CallableReference, ExternalUrlMeta, ExternalUrlReference, GroupMeta, GroupReference, NavigationMeta, NavigationReference, PersonMeta, PersonReference, Reference, } from './types';
47
+ export { Referenced, CallableKind, isAssetReference, isCallableReference, isCitation, isExternalUrlReference, isGroupReference, isNavigationReference, isPersonReference, } from './types';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Pre-reference codecs and types for backward compatibility.
3
+ *
4
+ * Consolidated into @athenaintel/references so pre-reference and current codecs
5
+ * live in one shared package.
6
+ */
7
+ export { CitationDefinitionSchema, CitationLineSchema, CitationNodeSchema, CitationNotebookSchema, CitationPaginationSchema, CitationPlaybackSchema, CitationSpreadsheetSchema, } from './pre-reference-citation';
8
+ export type { CitationDefinition, CitationLine, CitationNode, CitationNotebook, CitationPagination, CitationPlayback, CitationSpreadsheet, } from './pre-reference-citation';
9
+ export { anchorToCitationDefinition, citationDefinitionToAnchor, } from './pre-reference-citation-bridge';
10
+ export { preReferenceMentionToReference, referenceToPreReferenceMention, } from './pre-reference-mention';
11
+ export type { CitationMentionParams } from './pre-reference-mention';
12
+ export { decodePreReferenceAssetUrl, extractCitation, } from './pre-reference-asset-url';
13
+ export { encodeUrlCitation, parseUrlCitation, referenceToUrlCitation, urlCitationToReference, } from './pre-reference-external-url';
14
+ export type { UrlCitationData } from './pre-reference-external-url';
@@ -0,0 +1,57 @@
1
+ /**
2
+ * @legacy Asset URL codecs for the old spaces URL format.
3
+ *
4
+ * The old format uses flat query params like `?page=5&line=3` without an `anchor=`
5
+ * discriminator. The new canonical format uses `?anchor=page&page=5`.
6
+ *
7
+ * This module provides:
8
+ * - extractCitation: flat URL params -> CitationDefinition
9
+ * - decodePreReferenceAssetUrl: old-style spaces URL -> AssetReference
10
+ *
11
+ * Once all producers emit the new anchor-based format, this decoder will only
12
+ * be needed for reading old legacy URLs.
13
+ */
14
+ import type { AssetReference } from '../types';
15
+ import type { CitationDefinition } from './pre-reference-citation';
16
+ /**
17
+ * @legacy Extract a CitationDefinition from flat URL search params.
18
+ *
19
+ * Handles the old param naming conventions (page, line, cell, sheet_id, etc.)
20
+ * used before the anchor-based URL format was introduced.
21
+ */
22
+ export declare function extractCitation(params: {
23
+ time?: string;
24
+ startTime?: string;
25
+ endTime?: string;
26
+ page?: number;
27
+ startPage?: number;
28
+ endPage?: number;
29
+ bboxLeft?: number;
30
+ bboxTop?: number;
31
+ bboxWidth?: number;
32
+ bboxHeight?: number;
33
+ line?: number;
34
+ startLine?: number;
35
+ endLine?: number;
36
+ sheetId?: number;
37
+ sheetName?: string;
38
+ range?: string;
39
+ cell?: string;
40
+ startCell?: string;
41
+ endCell?: string;
42
+ nodeId?: string;
43
+ startNodeId?: string;
44
+ endNodeId?: string;
45
+ }): CitationDefinition | undefined;
46
+ /**
47
+ * @legacy Parse an old-style spaces URL into an AssetReference.
48
+ *
49
+ * Old format: `/dashboard/spaces?asset_ids=X&page=5&line=3`
50
+ * (flat citation params, no `anchor=` discriminator)
51
+ *
52
+ * Supports legacy param names: `page` vs `page_number`, `cell` vs `cell_id`,
53
+ * `sheet_id` vs `sheet_idx`, etc.
54
+ *
55
+ * Returns null if the URL doesn't contain `asset_ids`.
56
+ */
57
+ export declare function decodePreReferenceAssetUrl(urlString: string): AssetReference | null;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @legacy Bridge between mention CitationDefinition and reference Anchor types.
3
+ *
4
+ * CitationDefinition is used by the old mention system (mentions.config, assetMentionToUrl).
5
+ * Anchor is the canonical reference system type. This module provides bidirectional
6
+ * conversion so both systems can interoperate while we migrate to Anchor everywhere.
7
+ *
8
+ * Once the mention system is updated to use runtime References directly, this
9
+ * bridge will only be needed for reading old legacy content.
10
+ */
11
+ import type { Anchor } from '../anchors/types';
12
+ import type { CitationDefinition } from './pre-reference-citation';
13
+ /**
14
+ * @legacy Convert CitationDefinition (mention schema) to Anchor (reference schema).
15
+ * Returns null if the citation type has no Anchor equivalent.
16
+ */
17
+ export declare function citationDefinitionToAnchor(citation: CitationDefinition): Anchor | null;
18
+ /**
19
+ * @legacy Convert Anchor (reference schema) to CitationDefinition (mention schema).
20
+ * Used when mention components need to display or edit anchor data.
21
+ */
22
+ export declare function anchorToCitationDefinition(anchor: Anchor): CitationDefinition | null;
@@ -0,0 +1,138 @@
1
+ /**
2
+ * CitationDefinition — mention-system citation shapes (pre-Anchor).
3
+ *
4
+ * Stored in mention node params before the Anchor type was introduced.
5
+ * New code should use Anchor from the core types where possible.
6
+ */
7
+ import { z } from 'zod';
8
+ /** Page-based citations for PDFs, presentations, etc. */
9
+ export declare const CitationPaginationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
10
+ type: z.ZodLiteral<"page">;
11
+ page: z.ZodNumber;
12
+ }, z.core.$strict>, z.ZodObject<{
13
+ type: z.ZodLiteral<"page_range">;
14
+ startPage: z.ZodNumber;
15
+ endPage: z.ZodNumber;
16
+ }, z.core.$strict>, z.ZodObject<{
17
+ type: z.ZodLiteral<"page_bbox">;
18
+ page: z.ZodNumber;
19
+ bboxLeft: z.ZodNumber;
20
+ bboxTop: z.ZodNumber;
21
+ bboxWidth: z.ZodNumber;
22
+ bboxHeight: z.ZodNumber;
23
+ }, z.core.$strict>], "type">;
24
+ export type CitationPagination = z.infer<typeof CitationPaginationSchema>;
25
+ /** Time-based citations for video/audio assets. */
26
+ export declare const CitationPlaybackSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
27
+ type: z.ZodLiteral<"time">;
28
+ time: z.ZodString;
29
+ }, z.core.$strict>, z.ZodObject<{
30
+ type: z.ZodLiteral<"duration">;
31
+ startTime: z.ZodString;
32
+ endTime: z.ZodString;
33
+ }, z.core.$strict>], "type">;
34
+ export type CitationPlayback = z.infer<typeof CitationPlaybackSchema>;
35
+ /** Line-based citations for text/code assets. */
36
+ export declare const CitationLineSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
37
+ type: z.ZodLiteral<"line">;
38
+ line: z.ZodNumber;
39
+ }, z.core.$strict>, z.ZodObject<{
40
+ type: z.ZodLiteral<"line_range">;
41
+ startLine: z.ZodNumber;
42
+ endLine: z.ZodNumber;
43
+ }, z.core.$strict>], "type">;
44
+ export type CitationLine = z.infer<typeof CitationLineSchema>;
45
+ /** Spreadsheet citations (sheet_range). */
46
+ export declare const CitationSpreadsheetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
47
+ type: z.ZodLiteral<"sheet_range">;
48
+ sheetId: z.ZodNumber;
49
+ sheetName: z.ZodOptional<z.ZodString>;
50
+ range: z.ZodOptional<z.ZodString>;
51
+ }, z.core.$strict>], "type">;
52
+ export type CitationSpreadsheet = z.infer<typeof CitationSpreadsheetSchema>;
53
+ /** Notebook cell citations. */
54
+ export declare const CitationNotebookSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
55
+ type: z.ZodLiteral<"notebook-cell">;
56
+ cell: z.ZodString;
57
+ }, z.core.$strict>, z.ZodObject<{
58
+ type: z.ZodLiteral<"notebook-cell-range">;
59
+ startCell: z.ZodString;
60
+ endCell: z.ZodString;
61
+ }, z.core.$strict>], "type">;
62
+ export type CitationNotebook = z.infer<typeof CitationNotebookSchema>;
63
+ /** TipTap document node citations. */
64
+ export declare const CitationNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
65
+ type: z.ZodLiteral<"node">;
66
+ nodeId: z.ZodString;
67
+ }, z.core.$strict>, z.ZodObject<{
68
+ type: z.ZodLiteral<"node_range">;
69
+ startNodeId: z.ZodString;
70
+ endNodeId: z.ZodString;
71
+ }, z.core.$strict>], "type">;
72
+ export type CitationNode = z.infer<typeof CitationNodeSchema>;
73
+ /** Pixel-region citations for image assets (no page; coords in natural pixels). */
74
+ export declare const CitationImageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
75
+ type: z.ZodLiteral<"pixel_bbox">;
76
+ bboxLeft: z.ZodNumber;
77
+ bboxTop: z.ZodNumber;
78
+ bboxWidth: z.ZodNumber;
79
+ bboxHeight: z.ZodNumber;
80
+ }, z.core.$strict>], "type">;
81
+ export type CitationImage = z.infer<typeof CitationImageSchema>;
82
+ /** Union of all citation sub-types used by the mention system. */
83
+ export declare const CitationDefinitionSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
84
+ type: z.ZodLiteral<"page">;
85
+ page: z.ZodNumber;
86
+ }, z.core.$strict>, z.ZodObject<{
87
+ type: z.ZodLiteral<"page_range">;
88
+ startPage: z.ZodNumber;
89
+ endPage: z.ZodNumber;
90
+ }, z.core.$strict>, z.ZodObject<{
91
+ type: z.ZodLiteral<"page_bbox">;
92
+ page: z.ZodNumber;
93
+ bboxLeft: z.ZodNumber;
94
+ bboxTop: z.ZodNumber;
95
+ bboxWidth: z.ZodNumber;
96
+ bboxHeight: z.ZodNumber;
97
+ }, z.core.$strict>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
98
+ type: z.ZodLiteral<"time">;
99
+ time: z.ZodString;
100
+ }, z.core.$strict>, z.ZodObject<{
101
+ type: z.ZodLiteral<"duration">;
102
+ startTime: z.ZodString;
103
+ endTime: z.ZodString;
104
+ }, z.core.$strict>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
105
+ type: z.ZodLiteral<"line">;
106
+ line: z.ZodNumber;
107
+ }, z.core.$strict>, z.ZodObject<{
108
+ type: z.ZodLiteral<"line_range">;
109
+ startLine: z.ZodNumber;
110
+ endLine: z.ZodNumber;
111
+ }, z.core.$strict>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
112
+ type: z.ZodLiteral<"sheet_range">;
113
+ sheetId: z.ZodNumber;
114
+ sheetName: z.ZodOptional<z.ZodString>;
115
+ range: z.ZodOptional<z.ZodString>;
116
+ }, z.core.$strict>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
117
+ type: z.ZodLiteral<"notebook-cell">;
118
+ cell: z.ZodString;
119
+ }, z.core.$strict>, z.ZodObject<{
120
+ type: z.ZodLiteral<"notebook-cell-range">;
121
+ startCell: z.ZodString;
122
+ endCell: z.ZodString;
123
+ }, z.core.$strict>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
124
+ type: z.ZodLiteral<"node">;
125
+ nodeId: z.ZodString;
126
+ }, z.core.$strict>, z.ZodObject<{
127
+ type: z.ZodLiteral<"node_range">;
128
+ startNodeId: z.ZodString;
129
+ endNodeId: z.ZodString;
130
+ }, z.core.$strict>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
131
+ type: z.ZodLiteral<"pixel_bbox">;
132
+ bboxLeft: z.ZodNumber;
133
+ bboxTop: z.ZodNumber;
134
+ bboxWidth: z.ZodNumber;
135
+ bboxHeight: z.ZodNumber;
136
+ }, z.core.$strict>], "type">]>;
137
+ /** The mention-system citation type (union of sub-shapes). */
138
+ export type CitationDefinition = CitationPagination | CitationPlayback | CitationLine | CitationSpreadsheet | CitationNotebook | CitationNode | CitationImage;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @legacy External URL citation codec.
3
+ *
4
+ * Encodes/decodes external URL citations where the URL itself is the reference
5
+ * and an optional `excerpt` search param carries a text snippet.
6
+ *
7
+ * Used by the old Citation/url mention type.
8
+ */
9
+ import type { ExternalUrlReference } from '../types';
10
+ export interface UrlCitationData {
11
+ url: string;
12
+ excerpt?: string;
13
+ }
14
+ /**
15
+ * @legacy Encode a URL citation — appends optional `excerpt` search param.
16
+ */
17
+ export declare function encodeUrlCitation(data: UrlCitationData): string;
18
+ /**
19
+ * @legacy Parse a URL citation — extracts optional `excerpt` search param.
20
+ *
21
+ * Includes recovery logic for malformed URLs with `&excerpt=` instead of `?excerpt=`.
22
+ */
23
+ export declare function parseUrlCitation(url: string): UrlCitationData | null;
24
+ /**
25
+ * @legacy Convert UrlCitationData to an ExternalUrlReference.
26
+ */
27
+ export declare function urlCitationToReference(data: UrlCitationData): ExternalUrlReference;
28
+ /**
29
+ * @legacy Convert an ExternalUrlReference to UrlCitationData.
30
+ */
31
+ export declare function referenceToUrlCitation(ref: ExternalUrlReference): UrlCitationData;
@@ -0,0 +1,8 @@
1
+ import type { Referenced } from '../types';
2
+ /**
3
+ * Fallback for objects with wrong `format` strings
4
+ * (e.g. `asset_mention`, `asset_citation`, `callable_tool`) that were
5
+ * proliferated before the 4 canonical ObjectFormats existed.
6
+ * Infers the `Referenced` entity kind by prefix matching.
7
+ */
8
+ export declare function getReferencedFromPreReferenceFormat(format: unknown): Referenced | undefined;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @legacy Bidirectional adapter between runtime Reference objects and legacy mention params.
3
+ *
4
+ * - preReferenceMentionToReference: old mention params -> Reference
5
+ * - referenceToPreReferenceMention: Reference -> old mention params (for TipTap renderers)
6
+ *
7
+ * Once the mention system is updated to use runtime References directly, this
8
+ * adapter will only be needed for reading old legacy content.
9
+ */
10
+ import type { Reference } from '../types';
11
+ export type CitationMentionParams = Record<string, unknown>;
12
+ /**
13
+ * @legacy Derive a Reference from legacy mention node params + mention type string.
14
+ *
15
+ * Used when reading mention nodes that don't have `params.reference` yet.
16
+ */
17
+ export declare function preReferenceMentionToReference(mentionType: string, params: CitationMentionParams): Reference | null;
18
+ /**
19
+ * @legacy Convert a Reference back to the legacy param shape expected by existing mention renderers.
20
+ *
21
+ * Returns { mentionType, params } where mentionType is the MENTION_TYPES key
22
+ * and params matches the schema for that type.
23
+ */
24
+ export declare function referenceToPreReferenceMention(ref: Reference): {
25
+ mentionType: string;
26
+ params: CitationMentionParams;
27
+ } | null;
@@ -0,0 +1,8 @@
1
+ import { type DetectedObjectFormat } from '../formats/format-catalog';
2
+ import type { Reference } from '../types';
3
+ /**
4
+ * Stored objects that are not in canonical `{ format: asset_object | … }` shape:
5
+ * infer from `referenced`, old `format` strings, or TipTap `{ type, params }`.
6
+ */
7
+ export declare function detectPreReferenceObject(input: Record<string, unknown>): DetectedObjectFormat;
8
+ export declare function parsePreReferenceObject(input: Record<string, unknown>): Reference;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Pre-reference URI decoder — handles all legacy URI formats.
3
+ *
4
+ * - Spaces URLs without `anchor=` → decodePreReferenceAssetUrl (flat citation params)
5
+ * - mention://reference → asset mention (legacy host)
6
+ * - mention://tool without `name=` → lenient callable decoder
7
+ * - mention://toolkit without `name=` → lenient callable decoder
8
+ * - mention://group without `id=` → group decoder (empty id)
9
+ * - Any other mention:// → lenient decoders by host
10
+ */
11
+ import type { Reference } from '../types';
12
+ export declare function parsePreReferenceUri(url: URL, rawInput: string): Reference;
@@ -0,0 +1,2 @@
1
+ /** npm: `@athenaintel/references/legacy` — pre-reference codecs only. */
2
+ export * from './legacy/index';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Shared href patterns that identify mention-like anchors.
3
+ *
4
+ * Used by:
5
+ * - MentionNode.parseHTML (table-cell safety-net rule)
6
+ * - converter-olympus promoteTableCellMentionAnchors (pre-parseHTML pass)
7
+ *
8
+ * Add new mention URI schemes here — both consumers pick them up automatically.
9
+ */
10
+ /**
11
+ * Substrings whose presence in an anchor's `href` indicates the link
12
+ * represents a mention (asset, tool/toolkit, person, etc.).
13
+ */
14
+ export declare const MENTION_HREF_PATTERNS: readonly string[];
15
+ /**
16
+ * Returns `true` when `href` contains at least one of the known mention
17
+ * URI patterns, meaning the anchor should be treated as a mention chip.
18
+ */
19
+ export declare function isMentionLikeHref(href: string): boolean;
@@ -0,0 +1,5 @@
1
+ /** @athenaintel/references/mention-node — Shared TipTap mention node + resolution. */
2
+ export { MentionNode, getNodeDisplayName, preReferenceFromReference } from './mention-node';
3
+ export type { MentionNodeOptions } from './mention-node';
4
+ export { addDisplayNameToReference, resolveNodeAttrsToReference } from './resolve-node-attrs';
5
+ export { MENTION_HREF_PATTERNS, isMentionLikeHref } from '../mention-href-patterns';
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @athenaintel/references/mention-node — Shared TipTap mention node.
3
+ *
4
+ * `MentionNode` is a TipTap Node with the canonical attribute schema,
5
+ * comprehensive parseHTML rules, and reference-aware renderHTML/renderText.
6
+ *
7
+ * Consumers extend it for environment-specific behavior:
8
+ * - Olympus: .extend({ addNodeView, addKeyboardShortcuts, addPasteRules })
9
+ * - Agora converter: use directly (no React needed)
10
+ */
11
+ import { Node } from '@tiptap/core';
12
+ import type { Reference } from '../types';
13
+ /**
14
+ * Derive pre-reference `type`/`params` from a Reference for backward compat
15
+ * with old Yjs clients that read those attributes.
16
+ */
17
+ export declare function preReferenceFromReference(ref: Reference): Record<string, unknown>;
18
+ export { resolveNodeAttrsToReference } from './resolve-node-attrs';
19
+ export { addDisplayNameToReference } from './resolve-node-attrs';
20
+ /**
21
+ * Resolve the display name for a mention node from the reference in its attrs.
22
+ *
23
+ * Shared by renderHTML, renderText, and the markdown serializer so the
24
+ * display-name resolution is identical everywhere.
25
+ */
26
+ export declare function getNodeDisplayName(attrs: Record<string, unknown>): string;
27
+ export interface MentionNodeOptions {
28
+ HTMLAttributes: Record<string, unknown>;
29
+ }
30
+ export declare const MentionNode: Node<MentionNodeOptions, any>;
31
+ export default MentionNode;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Resolve raw TipTap mention node attributes into a canonical Reference.
3
+ *
4
+ * Two paths:
5
+ * 1. Primary: `reference` attr (JSON string or object) → parseReference()
6
+ * 2. Fallback: legacy `type`/`params` → preReferenceMentionToReference()
7
+ *
8
+ * Both paths are synchronous. The function handles JSON string parsing,
9
+ * Zod validation, legacy pageNumber/excerpt injection, and (on the legacy
10
+ * path only) merging the top-level `name` attr into meta as the display title.
11
+ *
12
+ * No TipTap dependency — this is pure data normalization.
13
+ */
14
+ import type { Reference } from '../types';
15
+ /**
16
+ * Enrich a Reference with a display name in its meta.
17
+ * Person and group references get `meta.name`, everything else gets `meta.title`.
18
+ */
19
+ export declare function addDisplayNameToReference(ref: Reference, displayName: string): Reference;
20
+ /**
21
+ * Resolve a bag of mention node attributes into a canonical Reference.
22
+ *
23
+ * Handles both the canonical `reference` attribute (object or JSON string)
24
+ * and the legacy `type`/`name`/`params` triple. When both are present,
25
+ * `reference` wins.
26
+ */
27
+ export declare function resolveNodeAttrsToReference(attrs: Record<string, unknown>): Reference | null;