@athenaintel/react 0.22.4 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/README.md +390 -4
  2. package/dist/chat/AthenaChat.cjs +346 -244
  3. package/dist/chat/AthenaChat.cjs.map +1 -1
  4. package/dist/chat/AthenaChat.d.ts +19 -8
  5. package/dist/chat/AthenaChat.js +350 -248
  6. package/dist/chat/AthenaChat.js.map +1 -1
  7. package/dist/chat/StatewireApprovalCard.cjs +2 -1
  8. package/dist/chat/StatewireApprovalCard.cjs.map +1 -1
  9. package/dist/chat/StatewireApprovalCard.js +2 -1
  10. package/dist/chat/StatewireApprovalCard.js.map +1 -1
  11. package/dist/chat/StatewireClientToolBridge.cjs +1 -0
  12. package/dist/chat/StatewireClientToolBridge.cjs.map +1 -1
  13. package/dist/chat/StatewireClientToolBridge.js +1 -0
  14. package/dist/chat/StatewireClientToolBridge.js.map +1 -1
  15. package/dist/chat/StatewireQueuedMessages.cjs +1 -0
  16. package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
  17. package/dist/chat/StatewireQueuedMessages.js +1 -0
  18. package/dist/chat/StatewireQueuedMessages.js.map +1 -1
  19. package/dist/chat/WaitingOnYouBanner.cjs +100 -0
  20. package/dist/chat/WaitingOnYouBanner.cjs.map +1 -0
  21. package/dist/chat/WaitingOnYouBanner.d.ts +29 -0
  22. package/dist/chat/WaitingOnYouBanner.js +100 -0
  23. package/dist/chat/WaitingOnYouBanner.js.map +1 -0
  24. package/dist/chat/athena-chat-welcome.cjs +148 -0
  25. package/dist/chat/athena-chat-welcome.cjs.map +1 -0
  26. package/dist/chat/athena-chat-welcome.d.ts +54 -0
  27. package/dist/chat/athena-chat-welcome.js +148 -0
  28. package/dist/chat/athena-chat-welcome.js.map +1 -0
  29. package/dist/chat/athena-composer-controls.cjs +76 -0
  30. package/dist/chat/athena-composer-controls.cjs.map +1 -0
  31. package/dist/chat/athena-composer-controls.d.ts +21 -0
  32. package/dist/chat/athena-composer-controls.js +76 -0
  33. package/dist/chat/athena-composer-controls.js.map +1 -0
  34. package/dist/chat/composer-keyboard-hint.cjs +61 -0
  35. package/dist/chat/composer-keyboard-hint.cjs.map +1 -0
  36. package/dist/chat/composer-keyboard-hint.d.ts +33 -0
  37. package/dist/chat/composer-keyboard-hint.js +61 -0
  38. package/dist/chat/composer-keyboard-hint.js.map +1 -0
  39. package/dist/chat/message-time.cjs +64 -0
  40. package/dist/chat/message-time.cjs.map +1 -0
  41. package/dist/chat/message-time.d.ts +45 -0
  42. package/dist/chat/message-time.js +64 -0
  43. package/dist/chat/message-time.js.map +1 -0
  44. package/dist/chat/run-activity.cjs +38 -7
  45. package/dist/chat/run-activity.cjs.map +1 -1
  46. package/dist/chat/run-activity.d.ts +14 -3
  47. package/dist/chat/run-activity.js +39 -8
  48. package/dist/chat/run-activity.js.map +1 -1
  49. package/dist/chat/statewire-client-tools.cjs +2 -1
  50. package/dist/chat/statewire-client-tools.cjs.map +1 -1
  51. package/dist/chat/statewire-client-tools.js +2 -1
  52. package/dist/chat/statewire-client-tools.js.map +1 -1
  53. package/dist/chat/super-grouping/activity-timeline.cjs +2 -1
  54. package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
  55. package/dist/chat/super-grouping/activity-timeline.js +2 -1
  56. package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
  57. package/dist/chat/thread-scroll-to-bottom.cjs +24 -0
  58. package/dist/chat/thread-scroll-to-bottom.cjs.map +1 -0
  59. package/dist/chat/thread-scroll-to-bottom.d.ts +11 -0
  60. package/dist/chat/thread-scroll-to-bottom.js +24 -0
  61. package/dist/chat/thread-scroll-to-bottom.js.map +1 -0
  62. package/dist/chat/tiptap-text.cjs +26 -95
  63. package/dist/chat/tiptap-text.cjs.map +1 -1
  64. package/dist/chat/tiptap-text.d.ts +13 -0
  65. package/dist/chat/tiptap-text.js +26 -95
  66. package/dist/chat/tiptap-text.js.map +1 -1
  67. package/dist/chat/use-athena-run-live.cjs +2 -1
  68. package/dist/chat/use-athena-run-live.cjs.map +1 -1
  69. package/dist/chat/use-athena-run-live.js +2 -1
  70. package/dist/chat/use-athena-run-live.js.map +1 -1
  71. package/dist/chat/use-statewire-approval-request.cjs +1 -0
  72. package/dist/chat/use-statewire-approval-request.cjs.map +1 -1
  73. package/dist/chat/use-statewire-approval-request.js +1 -0
  74. package/dist/chat/use-statewire-approval-request.js.map +1 -1
  75. package/dist/chat-ui/composer/tiptap-composer.cjs +39 -4
  76. package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
  77. package/dist/chat-ui/composer/tiptap-composer.d.ts +21 -0
  78. package/dist/chat-ui/composer/tiptap-composer.js +39 -4
  79. package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
  80. package/dist/chat-ui/index.cjs +15 -1
  81. package/dist/chat-ui/index.cjs.map +1 -1
  82. package/dist/chat-ui/index.d.ts +6 -3
  83. package/dist/chat-ui/index.js +16 -2
  84. package/dist/chat-ui/index.js.map +1 -1
  85. package/dist/chat-ui/mentions/mention-chip.cjs +31 -4
  86. package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
  87. package/dist/chat-ui/mentions/mention-chip.js +31 -4
  88. package/dist/chat-ui/mentions/mention-chip.js.map +1 -1
  89. package/dist/chat-ui/messages/message-components.cjs +19 -1
  90. package/dist/chat-ui/messages/message-components.cjs.map +1 -1
  91. package/dist/chat-ui/messages/message-components.d.ts +13 -0
  92. package/dist/chat-ui/messages/message-components.js +19 -1
  93. package/dist/chat-ui/messages/message-components.js.map +1 -1
  94. package/dist/chat-ui/messages/runtime-message.cjs +2 -1
  95. package/dist/chat-ui/messages/runtime-message.cjs.map +1 -1
  96. package/dist/chat-ui/messages/runtime-message.js +2 -1
  97. package/dist/chat-ui/messages/runtime-message.js.map +1 -1
  98. package/dist/chat-ui/messages/statewire-continue-run.cjs +1 -0
  99. package/dist/chat-ui/messages/statewire-continue-run.cjs.map +1 -1
  100. package/dist/chat-ui/messages/statewire-continue-run.js +1 -0
  101. package/dist/chat-ui/messages/statewire-continue-run.js.map +1 -1
  102. package/dist/chat-ui/messages/user-edit-composer.cjs +3 -1
  103. package/dist/chat-ui/messages/user-edit-composer.cjs.map +1 -1
  104. package/dist/chat-ui/messages/user-edit-composer.js +3 -1
  105. package/dist/chat-ui/messages/user-edit-composer.js.map +1 -1
  106. package/dist/chat-ui/messages/wake-marker.cjs +84 -0
  107. package/dist/chat-ui/messages/wake-marker.cjs.map +1 -0
  108. package/dist/chat-ui/messages/wake-marker.d.ts +16 -0
  109. package/dist/chat-ui/messages/wake-marker.js +84 -0
  110. package/dist/chat-ui/messages/wake-marker.js.map +1 -0
  111. package/dist/chat-ui/rich-text/chat-blocks.cjs +177 -0
  112. package/dist/chat-ui/rich-text/chat-blocks.cjs.map +1 -0
  113. package/dist/chat-ui/rich-text/chat-blocks.d.ts +58 -0
  114. package/dist/chat-ui/rich-text/chat-blocks.js +177 -0
  115. package/dist/chat-ui/rich-text/chat-blocks.js.map +1 -0
  116. package/dist/chat-ui/rich-text/chat-link.cjs +69 -0
  117. package/dist/chat-ui/rich-text/chat-link.cjs.map +1 -0
  118. package/dist/chat-ui/rich-text/chat-link.d.ts +24 -0
  119. package/dist/chat-ui/rich-text/chat-link.js +69 -0
  120. package/dist/chat-ui/rich-text/chat-link.js.map +1 -0
  121. package/dist/chat-ui/rich-text/chat-message-body.cjs +144 -18
  122. package/dist/chat-ui/rich-text/chat-message-body.cjs.map +1 -1
  123. package/dist/chat-ui/rich-text/chat-message-body.d.ts +10 -1
  124. package/dist/chat-ui/rich-text/chat-message-body.js +149 -23
  125. package/dist/chat-ui/rich-text/chat-message-body.js.map +1 -1
  126. package/dist/chat-ui/rich-text/chat-node-views.cjs +38 -5
  127. package/dist/chat-ui/rich-text/chat-node-views.cjs.map +1 -1
  128. package/dist/chat-ui/rich-text/chat-node-views.d.ts +11 -0
  129. package/dist/chat-ui/rich-text/chat-node-views.js +39 -6
  130. package/dist/chat-ui/rich-text/chat-node-views.js.map +1 -1
  131. package/dist/chat-ui/rich-text/chat-text-schema.cjs +20 -3
  132. package/dist/chat-ui/rich-text/chat-text-schema.cjs.map +1 -1
  133. package/dist/chat-ui/rich-text/chat-text-schema.d.ts +15 -2
  134. package/dist/chat-ui/rich-text/chat-text-schema.js +20 -3
  135. package/dist/chat-ui/rich-text/chat-text-schema.js.map +1 -1
  136. package/dist/chat-ui/rich-text/citation-anchors.cjs +139 -0
  137. package/dist/chat-ui/rich-text/citation-anchors.cjs.map +1 -0
  138. package/dist/chat-ui/rich-text/citation-anchors.d.ts +74 -0
  139. package/dist/chat-ui/rich-text/citation-anchors.js +139 -0
  140. package/dist/chat-ui/rich-text/citation-anchors.js.map +1 -0
  141. package/dist/chat-ui/statewire.cjs +8 -1
  142. package/dist/chat-ui/statewire.cjs.map +1 -1
  143. package/dist/chat-ui/statewire.d.ts +2 -0
  144. package/dist/chat-ui/statewire.js +8 -1
  145. package/dist/chat-ui/statewire.js.map +1 -1
  146. package/dist/chat-ui/thread/chat-composer-dock.cjs +27 -6
  147. package/dist/chat-ui/thread/chat-composer-dock.cjs.map +1 -1
  148. package/dist/chat-ui/thread/chat-composer-dock.d.ts +21 -1
  149. package/dist/chat-ui/thread/chat-composer-dock.js +28 -7
  150. package/dist/chat-ui/thread/chat-composer-dock.js.map +1 -1
  151. package/dist/chat-ui/thread/statewire-history-edge.cjs +12 -13
  152. package/dist/chat-ui/thread/statewire-history-edge.cjs.map +1 -1
  153. package/dist/chat-ui/thread/statewire-history-edge.d.ts +11 -10
  154. package/dist/chat-ui/thread/statewire-history-edge.js +13 -14
  155. package/dist/chat-ui/thread/statewire-history-edge.js.map +1 -1
  156. package/dist/chat-ui/thread/thread-loading-overlay.cjs +31 -0
  157. package/dist/chat-ui/thread/thread-loading-overlay.cjs.map +1 -0
  158. package/dist/chat-ui/thread/thread-loading-overlay.d.ts +14 -0
  159. package/dist/chat-ui/thread/thread-loading-overlay.js +31 -0
  160. package/dist/chat-ui/thread/thread-loading-overlay.js.map +1 -0
  161. package/dist/composer/ComposerDropZone.cjs +8 -1
  162. package/dist/composer/ComposerDropZone.cjs.map +1 -1
  163. package/dist/composer/ComposerDropZone.d.ts +6 -0
  164. package/dist/composer/ComposerDropZone.js +9 -2
  165. package/dist/composer/ComposerDropZone.js.map +1 -1
  166. package/dist/diagnostics/errors.cjs +20 -0
  167. package/dist/diagnostics/errors.cjs.map +1 -1
  168. package/dist/diagnostics/errors.d.ts +20 -0
  169. package/dist/diagnostics/errors.js +20 -0
  170. package/dist/diagnostics/errors.js.map +1 -1
  171. package/dist/index.cjs +47 -1
  172. package/dist/index.cjs.map +1 -1
  173. package/dist/index.d.ts +26 -7
  174. package/dist/index.js +51 -5
  175. package/dist/index.js.map +1 -1
  176. package/dist/lib/use-prefers-reduced-motion.cjs +29 -0
  177. package/dist/lib/use-prefers-reduced-motion.cjs.map +1 -0
  178. package/dist/lib/use-prefers-reduced-motion.d.ts +6 -0
  179. package/dist/lib/use-prefers-reduced-motion.js +29 -0
  180. package/dist/lib/use-prefers-reduced-motion.js.map +1 -0
  181. package/dist/packages/agent-runtime/src/conversation-index.cjs.map +1 -1
  182. package/dist/packages/agent-runtime/src/conversation-index.js.map +1 -1
  183. package/dist/packages/agent-runtime/src/conversation-list.cjs +59 -0
  184. package/dist/packages/agent-runtime/src/conversation-list.cjs.map +1 -1
  185. package/dist/packages/agent-runtime/src/conversation-list.js +60 -1
  186. package/dist/packages/agent-runtime/src/conversation-list.js.map +1 -1
  187. package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.cjs +5 -3
  188. package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.cjs.map +1 -1
  189. package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.js +5 -3
  190. package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.js.map +1 -1
  191. package/dist/packages/agent-runtime/src/edit-command.cjs +21 -17
  192. package/dist/packages/agent-runtime/src/edit-command.cjs.map +1 -1
  193. package/dist/packages/agent-runtime/src/edit-command.js +22 -18
  194. package/dist/packages/agent-runtime/src/edit-command.js.map +1 -1
  195. package/dist/packages/agent-runtime/src/generated/runconfig-contract.cjs +9 -11
  196. package/dist/packages/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
  197. package/dist/packages/agent-runtime/src/generated/runconfig-contract.js +9 -11
  198. package/dist/packages/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
  199. package/dist/packages/agent-runtime/src/github-wake-event.cjs +86 -0
  200. package/dist/packages/agent-runtime/src/github-wake-event.cjs.map +1 -0
  201. package/dist/packages/agent-runtime/src/github-wake-event.js +86 -0
  202. package/dist/packages/agent-runtime/src/github-wake-event.js.map +1 -0
  203. package/dist/packages/agent-runtime/src/message-window.cjs +150 -42
  204. package/dist/packages/agent-runtime/src/message-window.cjs.map +1 -1
  205. package/dist/packages/agent-runtime/src/message-window.js +151 -43
  206. package/dist/packages/agent-runtime/src/message-window.js.map +1 -1
  207. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.cjs +13 -9
  208. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -1
  209. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.js +13 -9
  210. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.js.map +1 -1
  211. package/dist/packages/agent-runtime/src/statewire-suspended.cjs +1 -3
  212. package/dist/packages/agent-runtime/src/statewire-suspended.cjs.map +1 -1
  213. package/dist/packages/agent-runtime/src/statewire-suspended.js +1 -3
  214. package/dist/packages/agent-runtime/src/statewire-suspended.js.map +1 -1
  215. package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -1
  216. package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.js.map +1 -1
  217. package/dist/packages/agent-runtime/src/use-deep-agent-thread.cjs +61 -30
  218. package/dist/packages/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
  219. package/dist/packages/agent-runtime/src/use-deep-agent-thread.js +59 -28
  220. package/dist/packages/agent-runtime/src/use-deep-agent-thread.js.map +1 -1
  221. package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.cjs +56 -36
  222. package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.cjs.map +1 -1
  223. package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.js +59 -39
  224. package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.js.map +1 -1
  225. package/dist/packages/react/package.json.cjs +1 -1
  226. package/dist/packages/react/package.json.js +1 -1
  227. package/dist/provider/AthenaContext.cjs.map +1 -1
  228. package/dist/provider/AthenaContext.d.ts +3 -0
  229. package/dist/provider/AthenaContext.js.map +1 -1
  230. package/dist/provider/AthenaProvider.cjs +93 -45
  231. package/dist/provider/AthenaProvider.cjs.map +1 -1
  232. package/dist/provider/AthenaProvider.d.ts +6 -1
  233. package/dist/provider/AthenaProvider.js +97 -49
  234. package/dist/provider/AthenaProvider.js.map +1 -1
  235. package/dist/runtime/statewire-lifecycle.cjs +2 -1
  236. package/dist/runtime/statewire-lifecycle.cjs.map +1 -1
  237. package/dist/runtime/statewire-lifecycle.js +2 -1
  238. package/dist/runtime/statewire-lifecycle.js.map +1 -1
  239. package/dist/runtime/useAthenaStatewireRuntime.cjs +3 -2
  240. package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
  241. package/dist/runtime/useAthenaStatewireRuntime.d.ts +8 -12
  242. package/dist/runtime/useAthenaStatewireRuntime.js +3 -2
  243. package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
  244. package/dist/search/useAthenaRepoSearch.cjs +94 -0
  245. package/dist/search/useAthenaRepoSearch.cjs.map +1 -0
  246. package/dist/search/useAthenaRepoSearch.d.ts +95 -0
  247. package/dist/search/useAthenaRepoSearch.js +94 -0
  248. package/dist/search/useAthenaRepoSearch.js.map +1 -0
  249. package/dist/styles.css +1 -1
  250. package/dist/threads/SessionList.cjs +486 -0
  251. package/dist/threads/SessionList.cjs.map +1 -0
  252. package/dist/threads/SessionList.d.ts +60 -0
  253. package/dist/threads/SessionList.js +486 -0
  254. package/dist/threads/SessionList.js.map +1 -0
  255. package/dist/threads/api.cjs +112 -4
  256. package/dist/threads/api.cjs.map +1 -1
  257. package/dist/threads/api.d.ts +128 -1
  258. package/dist/threads/api.js +113 -5
  259. package/dist/threads/api.js.map +1 -1
  260. package/dist/threads/conversation-list-fetcher.cjs +27 -3
  261. package/dist/threads/conversation-list-fetcher.cjs.map +1 -1
  262. package/dist/threads/conversation-list-fetcher.d.ts +16 -3
  263. package/dist/threads/conversation-list-fetcher.js +27 -3
  264. package/dist/threads/conversation-list-fetcher.js.map +1 -1
  265. package/dist/threads/index.d.ts +5 -1
  266. package/dist/threads/session-list-model.cjs +130 -0
  267. package/dist/threads/session-list-model.cjs.map +1 -0
  268. package/dist/threads/session-list-model.d.ts +62 -0
  269. package/dist/threads/session-list-model.js +130 -0
  270. package/dist/threads/session-list-model.js.map +1 -0
  271. package/dist/threads/statewire-thread-list.cjs +220 -38
  272. package/dist/threads/statewire-thread-list.cjs.map +1 -1
  273. package/dist/threads/statewire-thread-list.d.ts +152 -2
  274. package/dist/threads/statewire-thread-list.js +222 -40
  275. package/dist/threads/statewire-thread-list.js.map +1 -1
  276. package/dist/threads/thread-prefetcher.cjs +63 -0
  277. package/dist/threads/thread-prefetcher.cjs.map +1 -0
  278. package/dist/threads/thread-prefetcher.d.ts +54 -0
  279. package/dist/threads/thread-prefetcher.js +63 -0
  280. package/dist/threads/thread-prefetcher.js.map +1 -0
  281. package/dist/threads/use-athena-session-attention.cjs +22 -0
  282. package/dist/threads/use-athena-session-attention.cjs.map +1 -0
  283. package/dist/threads/use-athena-session-attention.d.ts +24 -0
  284. package/dist/threads/use-athena-session-attention.js +22 -0
  285. package/dist/threads/use-athena-session-attention.js.map +1 -0
  286. package/dist/threads/use-rest-conversation-history.cjs +25 -2
  287. package/dist/threads/use-rest-conversation-history.cjs.map +1 -1
  288. package/dist/threads/use-rest-conversation-history.d.ts +8 -1
  289. package/dist/threads/use-rest-conversation-history.js +25 -2
  290. package/dist/threads/use-rest-conversation-history.js.map +1 -1
  291. package/dist/threads/use-statewire-conversation-history.cjs +40 -16
  292. package/dist/threads/use-statewire-conversation-history.cjs.map +1 -1
  293. package/dist/threads/use-statewire-conversation-history.d.ts +13 -0
  294. package/dist/threads/use-statewire-conversation-history.js +40 -16
  295. package/dist/threads/use-statewire-conversation-history.js.map +1 -1
  296. package/dist/threads/use-thread-archive.cjs +128 -0
  297. package/dist/threads/use-thread-archive.cjs.map +1 -0
  298. package/dist/threads/use-thread-archive.d.ts +26 -0
  299. package/dist/threads/use-thread-archive.js +128 -0
  300. package/dist/threads/use-thread-archive.js.map +1 -0
  301. package/dist/threads/use-thread-favorite.cjs +53 -0
  302. package/dist/threads/use-thread-favorite.cjs.map +1 -0
  303. package/dist/threads/use-thread-favorite.d.ts +49 -0
  304. package/dist/threads/use-thread-favorite.js +53 -0
  305. package/dist/threads/use-thread-favorite.js.map +1 -0
  306. package/dist/threads/use-thread-field-override.cjs +184 -0
  307. package/dist/threads/use-thread-field-override.cjs.map +1 -0
  308. package/dist/threads/use-thread-field-override.d.ts +55 -0
  309. package/dist/threads/use-thread-field-override.js +184 -0
  310. package/dist/threads/use-thread-field-override.js.map +1 -0
  311. package/dist/threads/use-thread-rename.cjs +53 -0
  312. package/dist/threads/use-thread-rename.cjs.map +1 -0
  313. package/dist/threads/use-thread-rename.d.ts +48 -0
  314. package/dist/threads/use-thread-rename.js +53 -0
  315. package/dist/threads/use-thread-rename.js.map +1 -0
  316. package/dist/tools/index.cjs +5 -1
  317. package/dist/tools/index.cjs.map +1 -1
  318. package/dist/tools/index.d.ts +1 -1
  319. package/dist/tools/index.js +7 -3
  320. package/dist/tools/index.js.map +1 -1
  321. package/dist/tools/misc-tool-uis.cjs +2 -1
  322. package/dist/tools/misc-tool-uis.cjs.map +1 -1
  323. package/dist/tools/misc-tool-uis.js +2 -1
  324. package/dist/tools/misc-tool-uis.js.map +1 -1
  325. package/dist/tools/primitives.cjs +25 -2
  326. package/dist/tools/primitives.cjs.map +1 -1
  327. package/dist/tools/primitives.d.ts +9 -2
  328. package/dist/tools/primitives.js +26 -3
  329. package/dist/tools/primitives.js.map +1 -1
  330. package/dist/tools/tool-appearance.cjs +11 -0
  331. package/dist/tools/tool-appearance.cjs.map +1 -0
  332. package/dist/tools/tool-appearance.d.ts +29 -0
  333. package/dist/tools/tool-appearance.js +11 -0
  334. package/dist/tools/tool-appearance.js.map +1 -0
  335. package/dist/tools/tool-fallback.cjs +211 -13
  336. package/dist/tools/tool-fallback.cjs.map +1 -1
  337. package/dist/tools/tool-fallback.d.ts +31 -4
  338. package/dist/tools/tool-fallback.js +214 -16
  339. package/dist/tools/tool-fallback.js.map +1 -1
  340. package/dist/tools/use-elapsed-seconds.cjs +24 -0
  341. package/dist/tools/use-elapsed-seconds.cjs.map +1 -0
  342. package/dist/tools/use-elapsed-seconds.d.ts +10 -0
  343. package/dist/tools/use-elapsed-seconds.js +24 -0
  344. package/dist/tools/use-elapsed-seconds.js.map +1 -0
  345. package/dist/tools/voice-update-tool-ui.cjs +2 -1
  346. package/dist/tools/voice-update-tool-ui.cjs.map +1 -1
  347. package/dist/tools/voice-update-tool-ui.js +2 -1
  348. package/dist/tools/voice-update-tool-ui.js.map +1 -1
  349. package/package.json +1 -1
  350. package/src/chat-ui/tailwind-preset.js +14 -1
package/README.md CHANGED
@@ -14,6 +14,58 @@ If you use the PropelAuth-specific provider from `@athenaintel/react/auth`, also
14
14
  npm install @propelauth/react
15
15
  ```
16
16
 
17
+ ## Upgrading
18
+
19
+ The SDK pins its assistant-ui runtime (`@assistant-ui/tap`, `store`, `core`,
20
+ `react`, `react-statewire`, `statewire`) at exact versions, and those packages
21
+ carry React contexts and module singletons: an app must resolve exactly **one**
22
+ copy of each. A fresh install does. An existing app does not necessarily — bun
23
+ keeps a `bun.lock`'s existing resolutions on `bun add`, so after an SDK bump the
24
+ transitive `@assistant-ui/react-statewire` / `statewire` dependencies can keep
25
+ an older nested `@assistant-ui/tap` next to the SDK's new one. Two tap contexts
26
+ mount and the page renders blank with:
27
+
28
+ ```
29
+ Error: AssistantTapContext is not available
30
+ ```
31
+
32
+ Make the app immune with a `resolve.dedupe` list in `vite.config.ts` (the Athena
33
+ computer templates ship it; other bundlers have an equivalent single-instance
34
+ setting):
35
+
36
+ ```ts
37
+ export default defineConfig({
38
+ resolve: {
39
+ dedupe: [
40
+ '@assistant-ui/tap',
41
+ '@assistant-ui/store',
42
+ '@assistant-ui/core',
43
+ '@assistant-ui/react',
44
+ '@assistant-ui/react-statewire',
45
+ 'react',
46
+ 'react-dom',
47
+ ],
48
+ },
49
+ });
50
+ ```
51
+
52
+ Then bump to the release you want and re-resolve from scratch.
53
+ Lockfile-preserving commands do not do it — `bun update` and
54
+ `bun install --force` keep the nested lockfile entries, and `bun remove` +
55
+ `bun add` (or deleting only `bun.lock`) rewrites the lockfile but bun leaves
56
+ the nested directories in `node_modules`, which Node still resolves first:
57
+
58
+ ```bash
59
+ bun add @athenaintel/react@<version> # the release you are upgrading to
60
+ rm -rf node_modules bun.lock && bun install
61
+ find node_modules -path '*/@assistant-ui/tap/package.json' | wc -l # expect 1
62
+ ```
63
+
64
+ Do not add `@assistant-ui/*` packages to your own `dependencies` to pin them:
65
+ `bun update @assistant-ui/tap` on a package that is not a direct dependency
66
+ behaves like `bun add` at the latest version and produces more copies, not
67
+ fewer.
68
+
17
69
  ## Quick Start
18
70
 
19
71
  ```tsx
@@ -146,9 +198,19 @@ What the statewire transport wires up in `AthenaChat`:
146
198
  runtime is refused with a dismissible read-only notice (start a new chat).
147
199
  Custom hosts can read all of it via `useAthenaStatewireLifecycle`.
148
200
  - **Thread list:** `enableThreadList` provides the persisted Agora session
149
- list; switching threads re-attaches the statewire session to the selected
150
- thread. `ThreadList`, `useAthenaThreadManager`, and `useRefreshThreadList`
151
- read that state (and render nothing / return `null` without it).
201
+ list; switching threads (or starting a new chat) re-attaches the statewire
202
+ session to the selected thread while the host's own `children` stay
203
+ mounted — sidebars keep their scroll position and search text, custom hooks
204
+ keep their state, and only the per-thread pieces reset: the runtime and its
205
+ client, `AthenaChat`'s surface (composer draft, viewport scroll, approval
206
+ cards, banners), and the thread-id contexts. A host composing its own chat
207
+ from the statewire pieces keys any per-thread UI on
208
+ `useAthenaStatewireThreadId()` (the attached thread's id, defined for a
209
+ never-started chat too) the way `AthenaChat` does.
210
+ `ThreadList`, `SessionList`, `useAthenaThreadManager`,
211
+ `useAthenaSessionAttention`, and `useRefreshThreadList` read that state
212
+ (and render nothing / return `null` without it). See
213
+ [Session list, attention and wake markers](#session-list-attention-and-wake-markers).
152
214
 
153
215
  The `agent` prop only accepts `collab_agent:<asset_id>` refs (see below),
154
216
  because the statewire host always runs the Athena deep agent. **Any other
@@ -157,6 +219,169 @@ silently ignored selector would let a deployment answer as the wrong agent.
157
219
  `model` defaults to the deep-agent default model (`DEFAULT_STATEWIRE_MODEL`)
158
220
  unless a collab agent supplies one.
159
221
 
222
+ ## Session list, attention and wake markers
223
+
224
+ A Devin-style session list on top of `enableThreadList`: every row says what
225
+ the session asks of the viewer, what to do next, and which pull requests it
226
+ opened; the active thread gets a persistent "waiting on you" strip; and a
227
+ GitHub wake renders as a runtime marker instead of a user bubble.
228
+
229
+ ```tsx
230
+ import { AthenaChat, AthenaProvider, SessionList } from '@athenaintel/react';
231
+
232
+ <AthenaProvider enableThreadList config={{ token }}>
233
+ <aside><SessionList /></aside>
234
+ <AthenaChat />
235
+ </AthenaProvider>
236
+ ```
237
+
238
+ ### Field contract (v1)
239
+
240
+ Rows of `POST /api/conversations/threads/list` carry, all optional (an older
241
+ server omits them and the SDK reads `undefined`):
242
+
243
+ | REST field | SDK field (`ConversationSummary` / `AthenaStatewireThreadSummary`) | Values |
244
+ |---|---|---|
245
+ | `session_status` / `run_status` | `sessionStatus` / `runStatus` | status_v2 planes |
246
+ | `attention` | `attention` | `needs_you` · `working` · `ready` · `watching` · `done` · `error` |
247
+ | `next_action` | `nextAction` | one line, ≤ 80 chars |
248
+ | `attention_source` | `attentionSource` | `interrupt` · `run` · `pull_request` · `termination` · `wake` · `handoff` |
249
+ | `is_favorited` | `isFavorited` | boolean — toggled through `setFavorited` / `POST /api/conversations/threads/favorite` |
250
+ | `last_wake` | `lastWake` | `{ source, reason, at }` |
251
+ | `pull_requests` (opt-in: `include_pull_requests`) | `pullRequests` | `[{ repoFullName, number, url, title, state OPEN/CLOSED/MERGED, isDraft, reviewDecision, checksState SUCCESS/FAILURE/PENDING/NONE, updatedAt }]` — `[]` none, `null` unreadable right now |
252
+
253
+ The per-user conversation index pushes `attention`, `next_action`,
254
+ `attention_source` and `is_favorited` (never pull-request state), and the
255
+ thread list folds every push into its rows through the same
256
+ `summaryFromConversationIndexEntry` that renames them — a session flips to
257
+ "needs you" live. `deriveConversationAttention` (exported) is the one
258
+ attention rule: the server value when reported, else `needs_you` for a human
259
+ gate, `working` for a live run, `error` for a failed one.
260
+
261
+ ### `SessionList`
262
+
263
+ Same visual language as `ThreadList` (Tailwind via `cn`, lucide icons), plus:
264
+
265
+ - a status indicator per row — `needs_you` an orange dot, `working` a spinner,
266
+ unread (and not needs-you) a blue dot, `watching` a clock, otherwise none;
267
+ - a second line — `nextAction` coloured by attention (needs-you orange, ready
268
+ green, error red), else the muted relative time of the last update;
269
+ - one pull-request chip (`#123`, or `3 PRs`) with the state icon of the
270
+ primary pull request (open / draft / merged / closed) linking to it — a
271
+ sibling of the row button, so a click on it never selects the row;
272
+ - an origin badge from `appId` / `startChannel` / `triggerType` (Chrome,
273
+ Word, Computer, GitHub, API, …);
274
+ - a trailing action cluster per row, revealed on hover / focus (a pinned pin
275
+ and any action whose write is in flight stay visible) — every action a
276
+ labelled `<button>` that is a sibling of the row control, never nested:
277
+ - **Rename** (prop `showRename`, default `true`): the title becomes an
278
+ input in place; Enter commits, Escape cancels, blur commits; an unchanged
279
+ or empty title is never sent; the row shows the new title at once and
280
+ rolls back on failure (`POST /api/conversations/threads/rename`,
281
+ `{ thread_id, title }` → the stored, trimmed title; 1–200 characters).
282
+ A viewer who can pin a shared session cannot retitle it (the route runs
283
+ the same EDIT gate as `updateAsset(title)`); the row rolls back on the
284
+ 403. On an agora that predates the route (404 / 405) the action is
285
+ withdrawn (`renameAvailable`) after one console warning.
286
+ - **Pin / Unpin** (prop `showPinToggle`, default `true`): a `<button
287
+ aria-pressed>`, filled while the session is pinned.
288
+ - **Archive** (prop `showArchive`, default `true`): the row leaves the list
289
+ at once and stays hidden until both list sources stop reporting it; a
290
+ failure brings it back (`POST /api/conversations/threads/archive`).
291
+ Archiving the active session moves the chat to a new one once the server
292
+ has confirmed. Withdrawn on a backend without the route
293
+ (`archiveAvailable`).
294
+ - groups `Needs you` → `Working` → `Pinned` → `Recent` (prop `grouped`,
295
+ default `true`; a session appears once, in the first group that applies),
296
+ labelled in 11 px uppercase muted text; the active row has a `bg-muted`
297
+ background and a 2 px accent bar; titles are `text-sm font-medium`, the
298
+ next-action line `text-xs` in its attention tone and never bolder than the
299
+ title; the pull-request chip sits on the meta line; every row control and
300
+ action has a `focus-visible` ring;
301
+ - hover prefetch (prop `prefetchOnHover`, default `true`): after the pointer
302
+ has rested on a row for 120 ms (or when the row control takes focus) the
303
+ list warms the provider's thread snapshot cache with that thread's REST
304
+ state — once per thread per identity, at most two fetches in flight,
305
+ failures ignored — so selecting it paints the transcript on the first
306
+ frame instead of the loading scrim while the statewire attach lands
307
+ (`useAthenaStatewireThreadList().prefetchThread(threadId)` for hosts
308
+ drawing their own rows);
309
+ - skeleton rows (indicator, title line, meta line) while the first page
310
+ loads — including while no credential has resolved — and for a refresh
311
+ that has no rows to keep; "No sessions yet." only after a settled empty
312
+ answer (`hasResolvedFirstPage`); a background refresh keeps the rows it has;
313
+ - a search box wired to the server-side `search` (prop `showSearch`, default
314
+ `true`), `Load more` over the shared pager, and `New Chat` / refresh as in
315
+ `ThreadList`.
316
+
317
+ The pin writes `POST /api/conversations/threads/favorite`
318
+ (`{ thread_id, is_favorited }` → the server's state after the write) with the
319
+ same credential as the other thread endpoints — `setThreadFavorite` is
320
+ exported for hosts calling it themselves. The toggle is optimistic: the row
321
+ flips (and moves between `Pinned` and `Recent`) on the click, the server's
322
+ answer is written back, and a failure restores the previous state. The
323
+ optimistic value is held as an override over both list sources — the fetched
324
+ page and the pushed conversation index — until they report the toggled value,
325
+ so a push that predates the write cannot flip the row back. Writes for one
326
+ session are serialized: the row's pin is disabled while its write is in
327
+ flight (`favoritePendingThreadIds`), and a `setFavorited` call made meanwhile
328
+ records the value and sends at most one follow-up write once the first has
329
+ answered, so the server never ends on an earlier click. Overrides and
330
+ in-flight writes are scoped to the `(backendUrl, principal)` pair — a
331
+ credential swap reads an empty map and drops the previous identity's
332
+ answers. On an agora that
333
+ predates the route the first toggle gets a 404 / 405
334
+ (`isThreadFavoriteUnavailableError`): the row is restored, one console
335
+ warning is logged, `favoriteToggleAvailable` on the thread-list state turns
336
+ `false`, and the row shows a pinned session's pin read-only, as before. The
337
+ conversation-history hooks (`useStatewireConversationHistory`,
338
+ `useRestConversationHistory`) expose the same toggle as
339
+ `setConversationFavorited` / `favoritePending` / `favoriteToggleAvailable`
340
+ beside `setConversationReadState`.
341
+
342
+ The provider asks for pull-request state by default in thread-list mode
343
+ (`threadListIncludePullRequests`, default `true`; turn it off in a host that
344
+ never shows the chips to spare the server the lookup). The pure rules behind
345
+ the rows — `groupSessions`, `sessionIndicator`, `sessionSecondaryLine`,
346
+ `pullRequestChip`, `sessionOriginLabel` — are exported for hosts drawing their
347
+ own rows; `useAthenaStatewireThreadList().setFavorited({ threadId,
348
+ isFavorited })` is the toggle behind them.
349
+
350
+ ### `useAthenaSessionAttention(threadId?)`
351
+
352
+ `{ threadId, attention, nextAction, attentionSource, pullRequests, isUnread }`
353
+ for the active (or given) thread, from the thread-list state; `null` outside
354
+ thread-list mode or for a thread the list does not hold. Updates live with the
355
+ index pushes.
356
+
357
+ ### `WaitingOnYouBanner`
358
+
359
+ Mounted by `AthenaChat` above the thread viewport: a persistent strip while
360
+ the active thread's attention is `needs_you` or the approval hook
361
+ (`useStatewireApprovalRequest`) reports a pending request. Its text is the
362
+ server's `nextAction`, else a summary of the pending request; a click scrolls
363
+ to the approval card (or to the composer when there is none). It never
364
+ duplicates the card's Approve / Reject buttons. `WaitingOnYouBannerView` is
365
+ the pure presenter for hosts that resolve the inputs themselves.
366
+
367
+ ### Wake markers
368
+
369
+ A user turn injected by a GitHub webhook wake carries a provenance envelope
370
+ under `metadata.custom.github_event_source`. `AthenaChat`'s user message (and
371
+ the `chat-ui` `UserMessage`) render such a turn as a compact runtime marker —
372
+ "Woke: review comment on #36337", linked, with the sender and the comment
373
+ excerpt — in the same style as the runtime-ending card, instead of a bubble
374
+ quoting the whole wake text. `readGithubWakeEvent`, `isGithubWakeMessage`,
375
+ `githubWakeMarkerText`, `WakeMarkerCard` and `WakeMarkerMessage` are exported
376
+ (also on `@athenaintel/react/chat-ui` and `/chat-ui/statewire`).
377
+
378
+ The envelope is message metadata, so the reader trusts only the shape the
379
+ wake handler stamps: the repository must be `owner/name`, and the link is kept
380
+ only when it is an `https://github.com/<repo>/…` URL for that repository
381
+ (`githubWakeEventUrl`) — anything else renders the reference as plain text.
382
+ The full message text always reaches the model; the marker is provenance for
383
+ rendering only.
384
+
160
385
  ## Voice Sessions (`@athenaintel/react/voice`)
161
386
 
162
387
  `useAthenaVoiceSession` runs a real-time voice conversation with an Athena
@@ -234,6 +459,93 @@ Both use the same bearer / API key as session creation. The full recipe
234
459
  template skill `voice-session-guide.md`. `createAthenaVoiceSession` is also
235
460
  exported if you hold the bridge state yourself.
236
461
 
462
+ ## What's new in 0.23.0
463
+
464
+ 0.23.0 is the Devin-style sessions release: a session list that says what
465
+ each session asks of you, live pull-request state, a "waiting on you" strip,
466
+ wake markers, hover actions (rename / pin / archive) with skeleton loading
467
+ and hover prefetch on that list, a provider whose host UI survives thread
468
+ switches, a paper composer with a staged welcome, a 46rem reading column with
469
+ one tool-card anatomy and grouped turns by default, assistant text that keeps
470
+ its source links and read_asset citations as chips, and the AI Chat computer
471
+ template rebuilt around them. No breaking changes to the API; `<AthenaChat
472
+ groupToolCalls>` now defaults to `true` (pass `false` for the previous inline
473
+ tool cards) and the AI Chat template's `VITE_CONVERSATIONAL_VIEW` defaults on.
474
+ Shipped in this release, by pull request:
475
+
476
+ - fix(react): AthenaProvider keys only the per-thread runtime so host UI survives thread switches; new export `useAthenaStatewireThreadId` (#36402)
477
+ - feat(react): SessionList with attention, next action and pull-request chips; waiting-on-you banner; wake markers (#36365)
478
+ - feat(react): SessionList pin toggle via `POST /api/conversations/threads/favorite` (#36371)
479
+ - fix(react): pin toggle serializes same-thread writes and scopes overrides per identity (#36373)
480
+ - feat(agora,react): admin-only repository code search route + `useAthenaRepoSearch` (Devin-style Ask) (#36302)
481
+ - feat(agora): live pull-request state on the session list from `agent_pr_threads` (Devin-style sessions) (#36306)
482
+ - feat(deep-agent): the message window per viewer, rebuilt on Statewire documents and per-attach interests (#36322)
483
+ - fix(athena-app): dedupe `@assistant-ui` runtime packages so an SDK upgrade cannot mount two tap contexts (#36395)
484
+ - feat(react): paper composer with clear send states, Enter-to-send hint and a staged welcome screen (#36412)
485
+ - feat(react): thread reading column, scannable turns, one tool-card anatomy, anchored scroll and a quiet thinking line (#36413) — see [the thread's reading column](#styling) under Styling
486
+ - feat(react): one tool-card anatomy for the SDK thread — `ToolFallback` thread appearance, grouped turns by default (#36411) — see [Tool cards in the thread](#tool-cards-in-the-thread)
487
+ - feat(react): SessionList hover actions with inline rename, skeleton loading, hover prefetch and tighter rhythm; props `showRename` / `showArchive` / `prefetchOnHover`, thread-list state `renameThread` / `prefetchThread` / `renameAvailable` / `archiveAvailable` / `hasResolvedFirstPage` (#36415) — see [`SessionList`](#sessionlist)
488
+ - feat(agora): REST rename for session threads (`POST /api/conversations/threads/rename`), the backend of the inline rename (#36409)
489
+ - fix(react): assistant text keeps source links and read_asset citations as clickable chips; `TiptapText` renders through `ChatMessageBody` (#36414)
490
+ - fix(react): message body re-parses only the trailing block and settles streamed words — block memoization, settled streamed words, deferred fence rendering while a reply streams (#36426)
491
+
492
+ ### Sources and citations (#36414)
493
+
494
+ - **Sources and citations render as chips in every SDK chat surface.** The
495
+ static message body (`MarkdownText` / `ChatMessageBody`, and `AthenaChat`'s
496
+ default `TiptapText`, which now renders through it instead of a live Tiptap
497
+ editor per message) turns the deep agent's citation anchors into chips: a web
498
+ source (`<a class="mention" data-type="url" data-url="…" data-excerpt="…">`,
499
+ or any `<a href data-excerpt>`) becomes a favicon chip whose tooltip is the
500
+ excerpt and which opens the page at the excerpt (`#:~:text=`); a read_asset
501
+ citation (`<a class="mention" data-type="pdf" data-id="asset_…"
502
+ data-page-number=… data-excerpt="…">`) becomes an asset chip deep-linked to
503
+ the cited page (`anchor=page` / `page_range`) with the excerpt as its
504
+ tooltip; a citation the model left unlabelled reads `Page N` instead of an
505
+ empty chip. Markdown links, bare URLs and `mailto:` stay plain links; only
506
+ `http(s):`, `mailto:`, `athena-point:` and app-relative Spaces hrefs pass
507
+ (`javascript:`, `ftp:`, `data:`, `//host` are stripped to their label). Every
508
+ anchor click goes through `useAthenaLinkClickHandler` (`linkClicks`, then
509
+ the asset panel for an Athena citation); modified clicks stay with the
510
+ browser. Favicons are requested only for public-looking hosts.
511
+
512
+ ### Composer and welcome (#36412)
513
+
514
+ - **Paper composer.** `<AthenaChat>` renders the shared composer dock's
515
+ `appearance="paper"` chrome: a card-toned surface (`bg-card`, hairline
516
+ `border`, 22px radius — still bound to the `composerBorder` /
517
+ `composerRadius` theme keys), a visible `focus-within` ring with a soft
518
+ shadow, a `data-drag-active="true"` tint while files hover, and a bottom
519
+ rail with attach + `@` mention on the left and send / stop on the right.
520
+ Send is an ink circle with the arrow that reads inert at 30% while the
521
+ draft is empty; stop is the same circle with a filled square. The draft
522
+ grows to about eight lines (`12rem`) before it scrolls. The first time the
523
+ composer is focused in a browser it shows "Enter to send · Shift+Enter for
524
+ a new line" underneath, until the first send (`localStorage`
525
+ `athena-sdk:composer-hint-seen`). Enter sends and Shift+Enter breaks the
526
+ line on every surface, as before.
527
+ - **Staged welcome.** The greeting (`h2`) fades and rises in, the suggestion
528
+ cards stagger in at 120 ms + 70 ms × index directly above the composer
529
+ (equal-width in one row from a 40rem-wide thread, a two-column grid below),
530
+ and the composer arrives last when the thread mounts empty — at 360 ms
531
+ behind the default four cards, behind the last card when a host passes more.
532
+ `prefers-reduced-motion` renders all of it in place with no motion.
533
+ - `@athenaintel/react/chat-ui`: `ChatComposerDock` gains `appearance`
534
+ (`"default" | "paper"`, default unchanged), `dragActive` and
535
+ `belowSurface`; `TiptapComposer` gains `appearance`, `onSubmitted` and the
536
+ handle method `openMentionMenu()`; `ComposerDropZone` gains
537
+ `onDragActiveChange`. The Chrome extension and Office add-in keep the
538
+ default chrome and are unaffected.
539
+
540
+ The AI Chat computer template (`docker/athena-app`) pinned to this version
541
+ mounts `SessionList` in its sidebar (hover rename / pin / archive, skeleton
542
+ loading and hover prefetch at their defaults), shows the active session's title and
543
+ attention state in its header, keeps `?session_id` in step with the active
544
+ thread (restored once per page load; one history entry per switch, so Back /
545
+ Forward walk sessions), scopes the thread-loading overlay to the chat column,
546
+ and adds a Cmd/Ctrl+K command palette with `Cmd/Ctrl+Shift+O` (new chat) and
547
+ `Cmd/Ctrl+]` / `Cmd/Ctrl+[` (next / previous session).
548
+
237
549
  ## What's new in 0.22.4
238
550
 
239
551
  Message actions catch up with Olympus Spaces: assistant replies gain a Regenerate button and a branch picker; user bubbles gain a hover-revealed Copy / Edit bar (Edit hides on read-only threads, while a run is live, or when the runtime lacks the capability) plus a branch picker; code blocks in replies get a copy button; the composer placeholder now hints at `@` mentions. New optional `readOnly` prop on `AthenaChat` hides Edit and Regenerate for transcripts whose server rejects dispatch.
@@ -708,6 +1020,62 @@ text anchors, and positioned citations are also preserved by `parseAthenaCitatio
708
1020
  `page_rect` may include `unit=percent` (the default) or `unit=point`; retain the unit so the region
709
1021
  maps to the correct PDF coordinates.
710
1022
 
1023
+ ## Repository Code Search (platform staff only, managed cloud)
1024
+
1025
+ `useAthenaRepoSearch` searches the workspace's indexed GitHub repositories
1026
+ (Clio's repository source) through `POST /api/search/repositories`, without an
1027
+ agent turn — the building block for a Devin-style "Ask" surface. It is a
1028
+ TanStack Query hook keyed by the request (never by the credential) and uses
1029
+ the provider's `backendUrl` and credentials; it works under any
1030
+ `<AthenaProvider>`, with or without `enableThreadList`.
1031
+
1032
+ The route is limited to **Athena platform staff** (the account-level `is_admin`
1033
+ flag — a workspace-role admin is not enough; it is the Clio internal-phase
1034
+ audience) and offered on Athena's managed cloud only: a non-staff caller reads
1035
+ `403`, a private deployment `404`, both surfaced as an `AthenaSdkError`
1036
+ (`auth_rejected` / `repo_search_failed`).
1037
+
1038
+ ```tsx
1039
+ import { useAthenaRepoSearch } from '@athenaintel/react';
1040
+
1041
+ function Ask({ query }: { query: string }) {
1042
+ const search = useAthenaRepoSearch({
1043
+ query,
1044
+ limit: 10, // 1–25
1045
+ mode: 'hybrid', // or 'lexical'
1046
+ paths: ['agora/**/*.py'], // gitignore-style globs (optional)
1047
+ languages: ['python'], // Clio language names (optional)
1048
+ repositoryAssetIds: [], // scope to GitHub catalog assets (optional)
1049
+ });
1050
+ if (search.isPending) return <p>Searching…</p>;
1051
+ if (search.isError) return <p>{search.error.message}</p>;
1052
+ return (
1053
+ <ul>
1054
+ {search.data.hits.map((hit) => (
1055
+ <li key={hit.readAssetReference}>
1056
+ <a href={hit.githubUrl ?? undefined}>
1057
+ {hit.path}:{hit.startLine}-{hit.endLine}
1058
+ </a>
1059
+ {hit.symbol ? ` · ${hit.symbol}` : null}
1060
+ <pre>{hit.snippet}</pre>
1061
+ </li>
1062
+ ))}
1063
+ </ul>
1064
+ );
1065
+ }
1066
+ ```
1067
+
1068
+ Each hit carries `catalogAssetId`, `repoFullName`, `path`, `startLine` /
1069
+ `endLine`, `symbol`, `language`, `unitType` (`code` or `window`), `score`,
1070
+ `commitSha`, a GHES-aware `githubUrl` permalink at the indexed commit, the
1071
+ `snippet` (header line removed, line breaks kept) and `readAssetReference`
1072
+ (`asset_<catalog>?anchor=file_line_range&…`, what `read_asset` and a citation
1073
+ take). Without the SDK, call the route directly: `POST
1074
+ {backendUrl}/api/search/repositories` with `Content-Type: application/json`,
1075
+ `Authorization: Bearer <token>` (or `X-API-KEY: <workspace API key>`) and the
1076
+ body `{ query, limit?, mode?, repository_asset_ids?, paths?, languages? }`;
1077
+ `fetchRepoSearch` and `repoSearchRequestBody` are exported for that too.
1078
+
711
1079
  ## Live Collaboration (`@athenaintel/react/collab`)
712
1080
 
713
1081
  The `collab` entry hosts the Keryx-backed live surfaces: `useGenericDoc` /
@@ -779,6 +1147,8 @@ Hosts that already run **Tailwind v4** (like the athena-app template) may instea
779
1147
 
780
1148
  Importing `styles.css` alongside a host Tailwind build is harmless (utilities are identical and layered). One caveat for themed Tailwind hosts: token values set on the `.athena-sdk` element shadow values inherited from `:root`, so define your app's token overrides on `.athena-sdk` too (`:root, .athena-sdk { --primary: …; }`) — or use the `theme` prop below, which always wins.
781
1149
 
1150
+ The thread's reading column defaults to a 46rem measure (set it with `<AthenaChat maxWidth>`; the chat passes that value to the thread, so the `threadMaxWidth` theme token does not reach it), 15px body text on a relaxed leading, and the `--font-sans` stack (`Inter, ui-sans-serif, system-ui, …` — a stack only, the SDK downloads no webfont). Override the face with `theme.fontFamily`, or `.athena-sdk { --font-sans: …; }`. Assistant turns carry a quiet 2px leading rule (replace it with `components.AssistantAvatar`); every message shows its time on hover beside its action bar, and a day separator marks the first message of a new calendar day.
1151
+
782
1152
  ## Theming
783
1153
 
784
1154
  ```tsx
@@ -800,12 +1170,28 @@ For CSS-level theming without the `theme` prop, set the design-token custom prop
800
1170
  }
801
1171
  ```
802
1172
 
1173
+ ## Tool cards in the thread
1174
+
1175
+ `<AthenaChat>` folds each turn's tool calls into one collapsible activity group with a count, the answer rendered below it (`groupToolCalls`, default `true`; pass `false` to list every tool card inline in call order). Every tool call it renders — the generic `ToolFallback`, the built-in tool UIs, nested sub-calls — shares one row anatomy: a status glyph (spinner / check / x / alert), the verb and its target on one line, a running call's elapsed seconds after three, a failed call tinted red, and a disclosure for the arguments and result.
1176
+
1177
+ That row is the `thread` appearance of `ToolFallback`. Hosts that render their own thread keep the boxed host card they render today (the default, `card`); to adopt the row, wrap the thread in the provider or set it per card:
1178
+
1179
+ ```tsx
1180
+ import { ToolFallback, ToolFallbackAppearanceProvider } from '@athenaintel/react/tools';
1181
+
1182
+ <ToolFallbackAppearanceProvider appearance="thread">{/* …the thread… */}</ToolFallbackAppearanceProvider>
1183
+ <ToolFallback {...props} appearance="thread" />
1184
+ ```
1185
+
1186
+ Dedicated tool UIs built on `ToolCard` follow the provider automatically; `useToolAppearance()` reads the appearance in force for a custom tool UI.
1187
+
803
1188
  ## Key Components
804
1189
 
805
1190
  - **`<AthenaProvider>`** — Runtime, auth, theming, and configuration
806
1191
  - **`<AthenaChat>`** — Full chat UI with composer, messages, and tool rendering
807
1192
  - **`<AthenaLayout>`** — Split-pane layout with asset panel
808
- - **`<ThreadList>`** — Conversation history sidebar
1193
+ - **`<SessionList>`** — Session sidebar: attention, next action, pull-request chips, pin, search (see [Session list, attention and wake markers](#session-list-attention-and-wake-markers))
1194
+ - **`<ThreadList>`** — Plain conversation history sidebar (title rows only)
809
1195
  - **`Toolkits`** — Constants for all available backend toolkits
810
1196
 
811
1197
  ## Composer Hooks