@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,23 @@
1
+ import type { DetectedUriFormat, DetectedObjectFormat } from './formats/format-catalog';
2
+ import type { Reference, Referenced } from './types';
3
+ export { parseReferenceURI } from './formats/uri/parse-reference-uri';
4
+ export { parseReferenceObject } from './formats/object/parse-reference-object';
5
+ export type DetectedFormat = DetectedUriFormat | DetectedObjectFormat;
6
+ /**
7
+ * Detect the format of an unknown input.
8
+ *
9
+ * For strings: URI wire detection.
10
+ * For plain objects: object wire detection.
11
+ */
12
+ export declare function detectFormat(input: unknown): DetectedFormat;
13
+ /**
14
+ * Parse any input (URI string or stored object) into runtime Reference.
15
+ *
16
+ * Dispatches by JavaScript shape: string → URI codec; plain object → object codec.
17
+ */
18
+ export declare function parseReference(input: unknown): Reference;
19
+ /**
20
+ * Quick Level 1 extraction without full parse.
21
+ * Returns the discriminator or undefined for unrecognized input.
22
+ */
23
+ export declare function getReferencedEntity(input: unknown): Referenced | undefined;
@@ -0,0 +1,463 @@
1
+ /**
2
+ * Zod schemas for the reference system — runtime validation at storage boundaries.
3
+ *
4
+ * Primary use: validating `thread.data.reference` read from Y.Doc, which is
5
+ * typed as `Record<string, unknown>` at the Yjs layer.
6
+ */
7
+ import * as z from 'zod';
8
+ import type { AssetReference } from './types';
9
+ export declare const assetMetaSchema: z.ZodObject<{
10
+ title: z.ZodOptional<z.ZodString>;
11
+ excerpt: z.ZodOptional<z.ZodString>;
12
+ assetType: z.ZodOptional<z.ZodString>;
13
+ provider: z.ZodOptional<z.ZodString>;
14
+ providerLocation: z.ZodOptional<z.ZodString>;
15
+ sheetName: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ export declare const callableMetaSchema: z.ZodObject<{
18
+ title: z.ZodOptional<z.ZodString>;
19
+ description: z.ZodOptional<z.ZodString>;
20
+ icon: z.ZodOptional<z.ZodString>;
21
+ }, z.core.$strip>;
22
+ export declare const personMetaSchema: z.ZodObject<{
23
+ name: z.ZodOptional<z.ZodString>;
24
+ avatar: z.ZodOptional<z.ZodString>;
25
+ phone: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strip>;
27
+ export declare const groupMetaSchema: z.ZodObject<{
28
+ name: z.ZodOptional<z.ZodString>;
29
+ }, z.core.$strip>;
30
+ export declare const externalUrlMetaSchema: z.ZodObject<{
31
+ title: z.ZodOptional<z.ZodString>;
32
+ description: z.ZodOptional<z.ZodString>;
33
+ excerpt: z.ZodOptional<z.ZodString>;
34
+ thumbnailUrl: z.ZodOptional<z.ZodString>;
35
+ }, z.core.$strip>;
36
+ export declare const navigationMetaSchema: z.ZodObject<{
37
+ title: z.ZodOptional<z.ZodString>;
38
+ description: z.ZodOptional<z.ZodString>;
39
+ }, z.core.$strip>;
40
+ export declare const assetVersionRefSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
41
+ kind: z.ZodLiteral<"latest">;
42
+ }, z.core.$strip>, z.ZodObject<{
43
+ kind: z.ZodLiteral<"pinned">;
44
+ versionId: z.ZodString;
45
+ }, z.core.$strip>, z.ZodObject<{
46
+ kind: z.ZodLiteral<"as_of">;
47
+ at: z.ZodString;
48
+ keryxClock: z.ZodOptional<z.ZodNumber>;
49
+ }, z.core.$strip>], "kind">;
50
+ export declare const recordSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
51
+ export declare const callableKindSchema: z.ZodEnum<{
52
+ tool: "tool";
53
+ toolkit: "toolkit";
54
+ workspace_item: "workspace_item";
55
+ }>;
56
+ export declare const referencedSchema: z.ZodEnum<{
57
+ asset: "asset";
58
+ callable: "callable";
59
+ external_url: "external_url";
60
+ group: "group";
61
+ navigation: "navigation";
62
+ person: "person";
63
+ }>;
64
+ export declare const assetReferenceSchema: z.ZodObject<{
65
+ referenced: z.ZodLiteral<"asset">;
66
+ id: z.ZodString;
67
+ anchor: z.ZodOptional<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
68
+ type: z.ZodLiteral<"cell">;
69
+ cellId: z.ZodString;
70
+ }, z.core.$strip>, z.ZodObject<{
71
+ type: z.ZodLiteral<"cell_range">;
72
+ startCellId: z.ZodString;
73
+ endCellId: z.ZodString;
74
+ }, z.core.$strip>, z.ZodObject<{
75
+ type: z.ZodLiteral<"comment">;
76
+ threadId: z.ZodString;
77
+ commentId: z.ZodString;
78
+ }, z.core.$strip>, z.ZodObject<{
79
+ type: z.ZodLiteral<"comment_thread">;
80
+ threadId: z.ZodString;
81
+ }, z.core.$strip>, z.ZodObject<{
82
+ type: z.ZodLiteral<"file_line_range">;
83
+ path: z.ZodString;
84
+ startLine: z.ZodNumber;
85
+ endLine: z.ZodNumber;
86
+ }, z.core.$strip>, z.ZodObject<{
87
+ type: z.ZodLiteral<"line">;
88
+ line: z.ZodNumber;
89
+ }, z.core.$strip>, z.ZodObject<{
90
+ type: z.ZodLiteral<"line_range">;
91
+ startLine: z.ZodNumber;
92
+ endLine: z.ZodNumber;
93
+ }, z.core.$strip>, z.ZodObject<{
94
+ type: z.ZodLiteral<"msg">;
95
+ messageId: z.ZodString;
96
+ }, z.core.$strip>, z.ZodObject<{
97
+ type: z.ZodLiteral<"msg_range">;
98
+ startMessageId: z.ZodString;
99
+ endMessageId: z.ZodString;
100
+ }, z.core.$strip>, z.ZodObject<{
101
+ type: z.ZodLiteral<"msg_block">;
102
+ messageId: z.ZodString;
103
+ block: z.ZodNumber;
104
+ hash: z.ZodOptional<z.ZodString>;
105
+ }, z.core.$strip>, z.ZodObject<{
106
+ type: z.ZodLiteral<"msg_section">;
107
+ messageId: z.ZodString;
108
+ heading: z.ZodString;
109
+ nth: z.ZodOptional<z.ZodNumber>;
110
+ }, z.core.$strip>, z.ZodObject<{
111
+ type: z.ZodLiteral<"msg_text">;
112
+ messageId: z.ZodString;
113
+ text: z.ZodString;
114
+ block: z.ZodOptional<z.ZodNumber>;
115
+ prefix: z.ZodOptional<z.ZodString>;
116
+ suffix: z.ZodOptional<z.ZodString>;
117
+ }, z.core.$strip>, z.ZodObject<{
118
+ type: z.ZodLiteral<"page">;
119
+ page: z.ZodNumber;
120
+ }, z.core.$strip>, z.ZodObject<{
121
+ type: z.ZodLiteral<"page_range">;
122
+ startPage: z.ZodNumber;
123
+ endPage: z.ZodNumber;
124
+ }, z.core.$strip>, z.ZodObject<{
125
+ type: z.ZodLiteral<"page_rect">;
126
+ page: z.ZodNumber;
127
+ x: z.ZodNumber;
128
+ y: z.ZodNumber;
129
+ width: z.ZodNumber;
130
+ height: z.ZodNumber;
131
+ unit: z.ZodOptional<z.ZodEnum<{
132
+ percent: "percent";
133
+ point: "point";
134
+ }>>;
135
+ }, z.core.$strip>, z.ZodObject<{
136
+ type: z.ZodLiteral<"page_text">;
137
+ page: z.ZodNumber;
138
+ text: z.ZodString;
139
+ prefix: z.ZodOptional<z.ZodString>;
140
+ suffix: z.ZodOptional<z.ZodString>;
141
+ hash: z.ZodOptional<z.ZodString>;
142
+ }, z.core.$strip>, z.ZodObject<{
143
+ type: z.ZodLiteral<"path">;
144
+ path: z.ZodString;
145
+ line: z.ZodOptional<z.ZodNumber>;
146
+ column: z.ZodOptional<z.ZodNumber>;
147
+ }, z.core.$strip>, z.ZodObject<{
148
+ type: z.ZodLiteral<"pixel_range">;
149
+ x: z.ZodNumber;
150
+ y: z.ZodNumber;
151
+ width: z.ZodNumber;
152
+ height: z.ZodNumber;
153
+ }, z.core.$strip>, z.ZodObject<{
154
+ type: z.ZodLiteral<"pm_node">;
155
+ nodeId: z.ZodString;
156
+ }, z.core.$strip>, z.ZodObject<{
157
+ type: z.ZodLiteral<"pm_node_range">;
158
+ startNodeId: z.ZodString;
159
+ endNodeId: z.ZodString;
160
+ }, z.core.$strip>, z.ZodObject<{
161
+ type: z.ZodLiteral<"pm_mark">;
162
+ markId: z.ZodString;
163
+ }, z.core.$strip>, z.ZodObject<{
164
+ type: z.ZodLiteral<"rect">;
165
+ x: z.ZodNumber;
166
+ y: z.ZodNumber;
167
+ width: z.ZodNumber;
168
+ height: z.ZodNumber;
169
+ }, z.core.$strip>, z.ZodObject<{
170
+ type: z.ZodLiteral<"section">;
171
+ section: z.ZodString;
172
+ topic: z.ZodOptional<z.ZodNumber>;
173
+ }, z.core.$strip>, z.ZodObject<{
174
+ type: z.ZodLiteral<"semantic_query">;
175
+ query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
176
+ field: z.ZodOptional<z.ZodString>;
177
+ rowKey: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
178
+ rowIndex: z.ZodOptional<z.ZodNumber>;
179
+ relationship: z.ZodOptional<z.ZodEnum<{
180
+ exact: "exact";
181
+ supporting: "supporting";
182
+ }>>;
183
+ schemaVersion: z.ZodOptional<z.ZodNumber>;
184
+ schemaHash: z.ZodOptional<z.ZodString>;
185
+ sourceSnapshots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
186
+ dataAsOf: z.ZodOptional<z.ZodString>;
187
+ }, z.core.$strip>, z.ZodObject<{
188
+ type: z.ZodLiteral<"shape">;
189
+ slideId: z.ZodString;
190
+ slideIndex: z.ZodNumber;
191
+ shapeIds: z.ZodArray<z.ZodString>;
192
+ }, z.core.$strip>, z.ZodObject<{
193
+ type: z.ZodLiteral<"sheet_cell">;
194
+ sheetId: z.ZodNumber;
195
+ cell: z.ZodString;
196
+ chartId: z.ZodOptional<z.ZodString>;
197
+ }, z.core.$strip>, z.ZodObject<{
198
+ type: z.ZodLiteral<"sheet_range">;
199
+ sheetId: z.ZodNumber;
200
+ range: z.ZodString;
201
+ frontier: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
202
+ }, z.core.$strip>, z.ZodObject<{
203
+ type: z.ZodLiteral<"sheet_tab">;
204
+ sheetId: z.ZodNumber;
205
+ }, z.core.$strip>, z.ZodObject<{
206
+ type: z.ZodLiteral<"sheet_table">;
207
+ sheetId: z.ZodNumber;
208
+ tableName: z.ZodString;
209
+ fallbackRange: z.ZodOptional<z.ZodString>;
210
+ }, z.core.$strip>, z.ZodObject<{
211
+ type: z.ZodLiteral<"lakehouse_table">;
212
+ table: z.ZodString;
213
+ tableUuid: z.ZodOptional<z.ZodString>;
214
+ snapshotId: z.ZodOptional<z.ZodString>;
215
+ }, z.core.$strip>, z.ZodObject<{
216
+ type: z.ZodLiteral<"slide">;
217
+ slideId: z.ZodString;
218
+ slideIndex: z.ZodNumber;
219
+ }, z.core.$strip>, z.ZodObject<{
220
+ type: z.ZodLiteral<"sql_query">;
221
+ sql: z.ZodOptional<z.ZodString>;
222
+ querySnippetAssetId: z.ZodOptional<z.ZodString>;
223
+ dialect: z.ZodOptional<z.ZodString>;
224
+ field: z.ZodOptional<z.ZodString>;
225
+ rowKey: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
226
+ rowIndex: z.ZodOptional<z.ZodNumber>;
227
+ relationship: z.ZodOptional<z.ZodEnum<{
228
+ exact: "exact";
229
+ supporting: "supporting";
230
+ }>>;
231
+ }, z.core.$strip>, z.ZodObject<{
232
+ type: z.ZodLiteral<"time">;
233
+ time: z.ZodString;
234
+ }, z.core.$strip>, z.ZodObject<{
235
+ type: z.ZodLiteral<"time_range">;
236
+ startTime: z.ZodString;
237
+ endTime: z.ZodString;
238
+ }, z.core.$strip>, z.ZodObject<{
239
+ type: z.ZodLiteral<"tool_call">;
240
+ toolCallId: z.ZodString;
241
+ messageId: z.ZodOptional<z.ZodString>;
242
+ }, z.core.$strip>], "type">>>;
243
+ version: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
244
+ kind: z.ZodLiteral<"latest">;
245
+ }, z.core.$strip>, z.ZodObject<{
246
+ kind: z.ZodLiteral<"pinned">;
247
+ versionId: z.ZodString;
248
+ }, z.core.$strip>, z.ZodObject<{
249
+ kind: z.ZodLiteral<"as_of">;
250
+ at: z.ZodString;
251
+ keryxClock: z.ZodOptional<z.ZodNumber>;
252
+ }, z.core.$strip>], "kind">>;
253
+ meta: z.ZodOptional<z.ZodObject<{
254
+ title: z.ZodOptional<z.ZodString>;
255
+ excerpt: z.ZodOptional<z.ZodString>;
256
+ assetType: z.ZodOptional<z.ZodString>;
257
+ provider: z.ZodOptional<z.ZodString>;
258
+ providerLocation: z.ZodOptional<z.ZodString>;
259
+ sheetName: z.ZodOptional<z.ZodString>;
260
+ }, z.core.$strip>>;
261
+ }, z.core.$strip>;
262
+ export declare const threadReferenceDataSchema: z.ZodObject<{
263
+ reference: z.ZodObject<{
264
+ referenced: z.ZodLiteral<"asset">;
265
+ id: z.ZodString;
266
+ anchor: z.ZodOptional<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
267
+ type: z.ZodLiteral<"cell">;
268
+ cellId: z.ZodString;
269
+ }, z.core.$strip>, z.ZodObject<{
270
+ type: z.ZodLiteral<"cell_range">;
271
+ startCellId: z.ZodString;
272
+ endCellId: z.ZodString;
273
+ }, z.core.$strip>, z.ZodObject<{
274
+ type: z.ZodLiteral<"comment">;
275
+ threadId: z.ZodString;
276
+ commentId: z.ZodString;
277
+ }, z.core.$strip>, z.ZodObject<{
278
+ type: z.ZodLiteral<"comment_thread">;
279
+ threadId: z.ZodString;
280
+ }, z.core.$strip>, z.ZodObject<{
281
+ type: z.ZodLiteral<"file_line_range">;
282
+ path: z.ZodString;
283
+ startLine: z.ZodNumber;
284
+ endLine: z.ZodNumber;
285
+ }, z.core.$strip>, z.ZodObject<{
286
+ type: z.ZodLiteral<"line">;
287
+ line: z.ZodNumber;
288
+ }, z.core.$strip>, z.ZodObject<{
289
+ type: z.ZodLiteral<"line_range">;
290
+ startLine: z.ZodNumber;
291
+ endLine: z.ZodNumber;
292
+ }, z.core.$strip>, z.ZodObject<{
293
+ type: z.ZodLiteral<"msg">;
294
+ messageId: z.ZodString;
295
+ }, z.core.$strip>, z.ZodObject<{
296
+ type: z.ZodLiteral<"msg_range">;
297
+ startMessageId: z.ZodString;
298
+ endMessageId: z.ZodString;
299
+ }, z.core.$strip>, z.ZodObject<{
300
+ type: z.ZodLiteral<"msg_block">;
301
+ messageId: z.ZodString;
302
+ block: z.ZodNumber;
303
+ hash: z.ZodOptional<z.ZodString>;
304
+ }, z.core.$strip>, z.ZodObject<{
305
+ type: z.ZodLiteral<"msg_section">;
306
+ messageId: z.ZodString;
307
+ heading: z.ZodString;
308
+ nth: z.ZodOptional<z.ZodNumber>;
309
+ }, z.core.$strip>, z.ZodObject<{
310
+ type: z.ZodLiteral<"msg_text">;
311
+ messageId: z.ZodString;
312
+ text: z.ZodString;
313
+ block: z.ZodOptional<z.ZodNumber>;
314
+ prefix: z.ZodOptional<z.ZodString>;
315
+ suffix: z.ZodOptional<z.ZodString>;
316
+ }, z.core.$strip>, z.ZodObject<{
317
+ type: z.ZodLiteral<"page">;
318
+ page: z.ZodNumber;
319
+ }, z.core.$strip>, z.ZodObject<{
320
+ type: z.ZodLiteral<"page_range">;
321
+ startPage: z.ZodNumber;
322
+ endPage: z.ZodNumber;
323
+ }, z.core.$strip>, z.ZodObject<{
324
+ type: z.ZodLiteral<"page_rect">;
325
+ page: z.ZodNumber;
326
+ x: z.ZodNumber;
327
+ y: z.ZodNumber;
328
+ width: z.ZodNumber;
329
+ height: z.ZodNumber;
330
+ unit: z.ZodOptional<z.ZodEnum<{
331
+ percent: "percent";
332
+ point: "point";
333
+ }>>;
334
+ }, z.core.$strip>, z.ZodObject<{
335
+ type: z.ZodLiteral<"page_text">;
336
+ page: z.ZodNumber;
337
+ text: z.ZodString;
338
+ prefix: z.ZodOptional<z.ZodString>;
339
+ suffix: z.ZodOptional<z.ZodString>;
340
+ hash: z.ZodOptional<z.ZodString>;
341
+ }, z.core.$strip>, z.ZodObject<{
342
+ type: z.ZodLiteral<"path">;
343
+ path: z.ZodString;
344
+ line: z.ZodOptional<z.ZodNumber>;
345
+ column: z.ZodOptional<z.ZodNumber>;
346
+ }, z.core.$strip>, z.ZodObject<{
347
+ type: z.ZodLiteral<"pixel_range">;
348
+ x: z.ZodNumber;
349
+ y: z.ZodNumber;
350
+ width: z.ZodNumber;
351
+ height: z.ZodNumber;
352
+ }, z.core.$strip>, z.ZodObject<{
353
+ type: z.ZodLiteral<"pm_node">;
354
+ nodeId: z.ZodString;
355
+ }, z.core.$strip>, z.ZodObject<{
356
+ type: z.ZodLiteral<"pm_node_range">;
357
+ startNodeId: z.ZodString;
358
+ endNodeId: z.ZodString;
359
+ }, z.core.$strip>, z.ZodObject<{
360
+ type: z.ZodLiteral<"pm_mark">;
361
+ markId: z.ZodString;
362
+ }, z.core.$strip>, z.ZodObject<{
363
+ type: z.ZodLiteral<"rect">;
364
+ x: z.ZodNumber;
365
+ y: z.ZodNumber;
366
+ width: z.ZodNumber;
367
+ height: z.ZodNumber;
368
+ }, z.core.$strip>, z.ZodObject<{
369
+ type: z.ZodLiteral<"section">;
370
+ section: z.ZodString;
371
+ topic: z.ZodOptional<z.ZodNumber>;
372
+ }, z.core.$strip>, z.ZodObject<{
373
+ type: z.ZodLiteral<"semantic_query">;
374
+ query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
375
+ field: z.ZodOptional<z.ZodString>;
376
+ rowKey: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
377
+ rowIndex: z.ZodOptional<z.ZodNumber>;
378
+ relationship: z.ZodOptional<z.ZodEnum<{
379
+ exact: "exact";
380
+ supporting: "supporting";
381
+ }>>;
382
+ schemaVersion: z.ZodOptional<z.ZodNumber>;
383
+ schemaHash: z.ZodOptional<z.ZodString>;
384
+ sourceSnapshots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
385
+ dataAsOf: z.ZodOptional<z.ZodString>;
386
+ }, z.core.$strip>, z.ZodObject<{
387
+ type: z.ZodLiteral<"shape">;
388
+ slideId: z.ZodString;
389
+ slideIndex: z.ZodNumber;
390
+ shapeIds: z.ZodArray<z.ZodString>;
391
+ }, z.core.$strip>, z.ZodObject<{
392
+ type: z.ZodLiteral<"sheet_cell">;
393
+ sheetId: z.ZodNumber;
394
+ cell: z.ZodString;
395
+ chartId: z.ZodOptional<z.ZodString>;
396
+ }, z.core.$strip>, z.ZodObject<{
397
+ type: z.ZodLiteral<"sheet_range">;
398
+ sheetId: z.ZodNumber;
399
+ range: z.ZodString;
400
+ frontier: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
401
+ }, z.core.$strip>, z.ZodObject<{
402
+ type: z.ZodLiteral<"sheet_tab">;
403
+ sheetId: z.ZodNumber;
404
+ }, z.core.$strip>, z.ZodObject<{
405
+ type: z.ZodLiteral<"sheet_table">;
406
+ sheetId: z.ZodNumber;
407
+ tableName: z.ZodString;
408
+ fallbackRange: z.ZodOptional<z.ZodString>;
409
+ }, z.core.$strip>, z.ZodObject<{
410
+ type: z.ZodLiteral<"lakehouse_table">;
411
+ table: z.ZodString;
412
+ tableUuid: z.ZodOptional<z.ZodString>;
413
+ snapshotId: z.ZodOptional<z.ZodString>;
414
+ }, z.core.$strip>, z.ZodObject<{
415
+ type: z.ZodLiteral<"slide">;
416
+ slideId: z.ZodString;
417
+ slideIndex: z.ZodNumber;
418
+ }, z.core.$strip>, z.ZodObject<{
419
+ type: z.ZodLiteral<"sql_query">;
420
+ sql: z.ZodOptional<z.ZodString>;
421
+ querySnippetAssetId: z.ZodOptional<z.ZodString>;
422
+ dialect: z.ZodOptional<z.ZodString>;
423
+ field: z.ZodOptional<z.ZodString>;
424
+ rowKey: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
425
+ rowIndex: z.ZodOptional<z.ZodNumber>;
426
+ relationship: z.ZodOptional<z.ZodEnum<{
427
+ exact: "exact";
428
+ supporting: "supporting";
429
+ }>>;
430
+ }, z.core.$strip>, z.ZodObject<{
431
+ type: z.ZodLiteral<"time">;
432
+ time: z.ZodString;
433
+ }, z.core.$strip>, z.ZodObject<{
434
+ type: z.ZodLiteral<"time_range">;
435
+ startTime: z.ZodString;
436
+ endTime: z.ZodString;
437
+ }, z.core.$strip>, z.ZodObject<{
438
+ type: z.ZodLiteral<"tool_call">;
439
+ toolCallId: z.ZodString;
440
+ messageId: z.ZodOptional<z.ZodString>;
441
+ }, z.core.$strip>], "type">>>;
442
+ version: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
443
+ kind: z.ZodLiteral<"latest">;
444
+ }, z.core.$strip>, z.ZodObject<{
445
+ kind: z.ZodLiteral<"pinned">;
446
+ versionId: z.ZodString;
447
+ }, z.core.$strip>, z.ZodObject<{
448
+ kind: z.ZodLiteral<"as_of">;
449
+ at: z.ZodString;
450
+ keryxClock: z.ZodOptional<z.ZodNumber>;
451
+ }, z.core.$strip>], "kind">>;
452
+ meta: z.ZodOptional<z.ZodObject<{
453
+ title: z.ZodOptional<z.ZodString>;
454
+ excerpt: z.ZodOptional<z.ZodString>;
455
+ assetType: z.ZodOptional<z.ZodString>;
456
+ provider: z.ZodOptional<z.ZodString>;
457
+ providerLocation: z.ZodOptional<z.ZodString>;
458
+ sheetName: z.ZodOptional<z.ZodString>;
459
+ }, z.core.$strip>>;
460
+ }, z.core.$strip>;
461
+ }, z.core.$strip>;
462
+ export declare function parseAssetReference(value: unknown): AssetReference | undefined;
463
+ export declare function parseThreadReference(data: Record<string, unknown> | undefined): AssetReference | undefined;
@@ -0,0 +1,50 @@
1
+ import type { Reference } from './types';
2
+ export type AssetLinkFormat = 'spaces_url' | 'mention_uri';
3
+ export interface SerializeUriOptions {
4
+ linkFormat?: AssetLinkFormat;
5
+ }
6
+ /**
7
+ * Serialize a runtime Reference to canonical storage format.
8
+ *
9
+ * - `'uri'` (default) → canonical URI string
10
+ * - `'object'` → canonical storage object with `format` discriminator
11
+ */
12
+ export declare function serializeReference(ref: Reference, format?: 'uri' | 'object'): string | Record<string, unknown>;
13
+ /**
14
+ * Serialize a runtime Reference to its canonical URI string.
15
+ * For assets, `linkFormat` selects between Spaces URL (default) and `mention://asset` URI.
16
+ */
17
+ export declare function serializeReferenceToURI(ref: Reference, opts?: SerializeUriOptions): string;
18
+ /**
19
+ * Serialize a runtime Reference to its canonical storage object.
20
+ */
21
+ export declare function serializeReferenceToObject(ref: Reference): Record<string, unknown>;
22
+ export interface SerializeUrlOptions extends SerializeUriOptions {
23
+ origin: string;
24
+ }
25
+ /**
26
+ * Serialize a runtime Reference to a navigable absolute URL.
27
+ *
28
+ * Prepends `origin` to the canonical URI when that URI is a site-relative
29
+ * path (assets, navigation). URIs that already carry a scheme — external
30
+ * `https://` URLs, `mention://` people, groups and tools — are returned as-is.
31
+ * Use this when the output is for browser navigation, clipboard sharing,
32
+ * or backend storage that requires scheme + host.
33
+ *
34
+ * For storage/wire identifiers, prefer {@link serializeReferenceToURI}.
35
+ */
36
+ export declare function serializeReferenceToURL(ref: Reference, opts: SerializeUrlOptions): string;
37
+ export type SerializeReferenceToMarkdownOptions = SerializeUriOptions & {
38
+ /** Visible label inside `[@…](url)`; overrides {@link getDisplayNameFromReference}. */
39
+ linkLabel?: string;
40
+ /** When set, `href` is absolute: `linkOrigin` + canonical path (composer, clipboard, share). */
41
+ linkOrigin?: string;
42
+ };
43
+ /**
44
+ * Serialize to markdown at-link: `[@label](uri)` where `uri` is the canonical
45
+ * URI for this reference. Standalone utility — not part of `serializeReference`.
46
+ *
47
+ * Use {@link SerializeReferenceToMarkdownOptions.linkLabel} to override the bracket text;
48
+ * use {@link SerializeReferenceToMarkdownOptions.linkOrigin} for an absolute URL in the link.
49
+ */
50
+ export declare function serializeReferenceToMarkdown(ref: Reference, opts?: SerializeReferenceToMarkdownOptions): string;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Quote a sheet name for Excel cross-sheet reference notation.
3
+ *
4
+ * A name that is not a bare run of ASCII letters and digits is wrapped in
5
+ * single quotes with embedded apostrophes doubled, so `1. Form Factor SKUs`
6
+ * renders as `'1. Form Factor SKUs'` and `O'Brien` as `'O''Brien'`. Mirrors
7
+ * `sanitizeSheetName` in `@rowsncolumns/utils` (kept local so the citation
8
+ * label formatter does not import the sheets engine).
9
+ */
10
+ export declare function quoteSheetName(name: string): string;