@comma-agents/tui 2.0.0-rc.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 (256) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +10 -0
  3. package/dist/App/App.d.ts +24 -0
  4. package/dist/App/App.theme.d.ts +12 -0
  5. package/dist/App/App.types.d.ts +8 -0
  6. package/dist/App/index.d.ts +4 -0
  7. package/dist/Theme/DefineTheme.d.ts +53 -0
  8. package/dist/Theme/Theme.d.ts +11 -0
  9. package/dist/Theme/Theme.types.d.ts +100 -0
  10. package/dist/Theme/index.d.ts +9 -0
  11. package/dist/Theme/themes/dark.d.ts +14 -0
  12. package/dist/Theme/themes/dracula.d.ts +9 -0
  13. package/dist/Theme/themes/index.d.ts +25 -0
  14. package/dist/Theme/themes/light.d.ts +10 -0
  15. package/dist/Theme/themes/solarized-dark.d.ts +9 -0
  16. package/dist/Theme/useTheme/index.d.ts +3 -0
  17. package/dist/Theme/useTheme/useTheme.context.d.ts +31 -0
  18. package/dist/Theme/useTheme/useTheme.d.ts +11 -0
  19. package/dist/Theme/useTheme/useTheme.types.d.ts +10 -0
  20. package/dist/components/BorderedPanel/BorderedPanel.d.ts +70 -0
  21. package/dist/components/BorderedPanel/BorderedPanel.theme.d.ts +59 -0
  22. package/dist/components/BorderedPanel/index.d.ts +4 -0
  23. package/dist/components/Button/Button.d.ts +69 -0
  24. package/dist/components/Button/Button.theme.d.ts +50 -0
  25. package/dist/components/Button/Button.types.d.ts +9 -0
  26. package/dist/components/Button/index.d.ts +4 -0
  27. package/dist/components/ChatTextArea/ChatTextArea.d.ts +85 -0
  28. package/dist/components/ChatTextArea/ChatTextArea.theme.d.ts +34 -0
  29. package/dist/components/ChatTextArea/index.d.ts +2 -0
  30. package/dist/components/CodeView/CodeView.constants.d.ts +9 -0
  31. package/dist/components/CodeView/CodeView.d.ts +23 -0
  32. package/dist/components/CodeView/CodeView.theme.d.ts +26 -0
  33. package/dist/components/CodeView/index.d.ts +4 -0
  34. package/dist/components/CommandPalette/CommandPalette.constants.d.ts +8 -0
  35. package/dist/components/CommandPalette/CommandPalette.d.ts +62 -0
  36. package/dist/components/CommandPalette/CommandPalette.theme.d.ts +50 -0
  37. package/dist/components/CommandPalette/CommandPalette.types.d.ts +50 -0
  38. package/dist/components/CommandPalette/CommandPalette.utils.d.ts +6 -0
  39. package/dist/components/CommandPalette/index.d.ts +5 -0
  40. package/dist/components/CommandPalette/pages/HelpPage/HelpPage.constants.d.ts +2 -0
  41. package/dist/components/CommandPalette/pages/HelpPage/HelpPage.d.ts +12 -0
  42. package/dist/components/CommandPalette/pages/HelpPage/HelpPage.types.d.ts +5 -0
  43. package/dist/components/CommandPalette/pages/HelpPage/index.d.ts +3 -0
  44. package/dist/components/CommandPalette/pages/ListProvidersPage/ListProvidersPage.d.ts +42 -0
  45. package/dist/components/CommandPalette/pages/ListProvidersPage/index.d.ts +1 -0
  46. package/dist/components/CommandPalette/pages/RegisteredProvidersPage/RegisteredProvidersPage.constants.d.ts +3 -0
  47. package/dist/components/CommandPalette/pages/RegisteredProvidersPage/RegisteredProvidersPage.d.ts +40 -0
  48. package/dist/components/CommandPalette/pages/RegisteredProvidersPage/RegisteredProvidersPage.types.d.ts +13 -0
  49. package/dist/components/CommandPalette/pages/RegisteredProvidersPage/RegisteredProvidersPage.utils.d.ts +9 -0
  50. package/dist/components/CommandPalette/pages/RegisteredProvidersPage/index.d.ts +2 -0
  51. package/dist/components/CommandPalette/pages/RunPickerPage/RunPickerPage.constants.d.ts +3 -0
  52. package/dist/components/CommandPalette/pages/RunPickerPage/RunPickerPage.d.ts +31 -0
  53. package/dist/components/CommandPalette/pages/RunPickerPage/RunPickerPage.types.d.ts +8 -0
  54. package/dist/components/CommandPalette/pages/RunPickerPage/RunPickerPage.utils.d.ts +7 -0
  55. package/dist/components/CommandPalette/pages/RunPickerPage/index.d.ts +3 -0
  56. package/dist/components/CommandPalette/pages/SettingsPage/SettingsPage.d.ts +24 -0
  57. package/dist/components/CommandPalette/pages/SettingsPage/index.d.ts +2 -0
  58. package/dist/components/Frame/Frame.d.ts +48 -0
  59. package/dist/components/Frame/Frame.theme.d.ts +52 -0
  60. package/dist/components/Frame/index.d.ts +4 -0
  61. package/dist/components/Hide/Hide.d.ts +20 -0
  62. package/dist/components/Hide/Hide.types.d.ts +12 -0
  63. package/dist/components/Hide/index.d.ts +2 -0
  64. package/dist/components/MessageList/AgentMessage/AgentMessage.d.ts +71 -0
  65. package/dist/components/MessageList/AgentMessage/index.d.ts +2 -0
  66. package/dist/components/MessageList/ContextUsageModal/ContextUsageModal.constants.d.ts +2 -0
  67. package/dist/components/MessageList/ContextUsageModal/ContextUsageModal.d.ts +9 -0
  68. package/dist/components/MessageList/ContextUsageModal/ContextUsageModal.types.d.ts +12 -0
  69. package/dist/components/MessageList/ContextUsageModal/index.d.ts +4 -0
  70. package/dist/components/MessageList/MarkdownView/MarkdownView.constants.d.ts +51 -0
  71. package/dist/components/MessageList/MarkdownView/MarkdownView.d.ts +34 -0
  72. package/dist/components/MessageList/MarkdownView/MarkdownView.theme.d.ts +89 -0
  73. package/dist/components/MessageList/MarkdownView/MarkdownView.types.d.ts +96 -0
  74. package/dist/components/MessageList/MarkdownView/MarkdownView.utils.d.ts +58 -0
  75. package/dist/components/MessageList/MarkdownView/index.d.ts +6 -0
  76. package/dist/components/MessageList/MessageList.d.ts +20 -0
  77. package/dist/components/MessageList/MessageList.theme.d.ts +170 -0
  78. package/dist/components/MessageList/MessageList.types.d.ts +26 -0
  79. package/dist/components/MessageList/OutputModal/OutputModal.constants.d.ts +22 -0
  80. package/dist/components/MessageList/OutputModal/OutputModal.d.ts +37 -0
  81. package/dist/components/MessageList/OutputModal/OutputModal.theme.d.ts +68 -0
  82. package/dist/components/MessageList/OutputModal/OutputModal.types.d.ts +56 -0
  83. package/dist/components/MessageList/OutputModal/OutputModal.utils.d.ts +3 -0
  84. package/dist/components/MessageList/OutputModal/index.d.ts +6 -0
  85. package/dist/components/MessageList/SpawnedStrategyView/SpawnedStrategyView.d.ts +47 -0
  86. package/dist/components/MessageList/SpawnedStrategyView/SpawnedStrategyView.theme.d.ts +58 -0
  87. package/dist/components/MessageList/SpawnedStrategyView/index.d.ts +4 -0
  88. package/dist/components/MessageList/SystemMessage/SystemMessage.d.ts +21 -0
  89. package/dist/components/MessageList/SystemMessage/index.d.ts +2 -0
  90. package/dist/components/MessageList/ToolCallView/ToolCallView.constants.d.ts +42 -0
  91. package/dist/components/MessageList/ToolCallView/ToolCallView.d.ts +71 -0
  92. package/dist/components/MessageList/ToolCallView/ToolCallView.theme.d.ts +47 -0
  93. package/dist/components/MessageList/ToolCallView/ToolCallView.types.d.ts +60 -0
  94. package/dist/components/MessageList/ToolCallView/ToolCallView.utils.d.ts +40 -0
  95. package/dist/components/MessageList/ToolCallView/index.d.ts +8 -0
  96. package/dist/components/MessageList/UserMessage/UserMessage.d.ts +25 -0
  97. package/dist/components/MessageList/UserMessage/index.d.ts +2 -0
  98. package/dist/components/MessageList/index.d.ts +14 -0
  99. package/dist/components/Modal/Modal.d.ts +64 -0
  100. package/dist/components/Modal/Modal.theme.d.ts +29 -0
  101. package/dist/components/Modal/index.d.ts +4 -0
  102. package/dist/components/MouseProvider/MouseContext.d.ts +36 -0
  103. package/dist/components/MouseProvider/MouseProvider.d.ts +20 -0
  104. package/dist/components/MouseProvider/index.d.ts +4 -0
  105. package/dist/components/PermissionPrompt/PermissionPrompt.d.ts +33 -0
  106. package/dist/components/PermissionPrompt/index.d.ts +2 -0
  107. package/dist/components/QuestionPrompt/QuestionPrompt.d.ts +4 -0
  108. package/dist/components/QuestionPrompt/QuestionPrompt.types.d.ts +18 -0
  109. package/dist/components/QuestionPrompt/index.d.ts +2 -0
  110. package/dist/components/ScrollableList/ScrollableList.d.ts +33 -0
  111. package/dist/components/ScrollableList/ScrollableList.theme.d.ts +33 -0
  112. package/dist/components/ScrollableList/ScrollableList.types.d.ts +66 -0
  113. package/dist/components/ScrollableList/index.d.ts +4 -0
  114. package/dist/components/ScrollableView/ScrollableView.d.ts +34 -0
  115. package/dist/components/ScrollableView/ScrollableView.theme.d.ts +34 -0
  116. package/dist/components/ScrollableView/ScrollableView.types.d.ts +113 -0
  117. package/dist/components/ScrollableView/index.d.ts +4 -0
  118. package/dist/components/Scrollbar/Scrollbar.d.ts +21 -0
  119. package/dist/components/Scrollbar/Scrollbar.theme.d.ts +16 -0
  120. package/dist/components/Scrollbar/Scrollbar.types.d.ts +27 -0
  121. package/dist/components/Scrollbar/Scrollbar.utils.d.ts +21 -0
  122. package/dist/components/Scrollbar/index.d.ts +4 -0
  123. package/dist/components/SearchInput/SearchInput.d.ts +22 -0
  124. package/dist/components/SearchInput/SearchInput.theme.d.ts +30 -0
  125. package/dist/components/SearchInput/SearchInput.types.d.ts +25 -0
  126. package/dist/components/SearchInput/SearchInput.utils.d.ts +22 -0
  127. package/dist/components/SearchInput/index.d.ts +5 -0
  128. package/dist/components/Separator/Separator.d.ts +39 -0
  129. package/dist/components/Separator/Separator.theme.d.ts +22 -0
  130. package/dist/components/Separator/index.d.ts +4 -0
  131. package/dist/components/StatusBar/StatusBar.d.ts +4 -0
  132. package/dist/components/StatusBar/StatusBar.theme.d.ts +35 -0
  133. package/dist/components/StatusBar/StatusBar.types.d.ts +24 -0
  134. package/dist/components/StatusBar/index.d.ts +2 -0
  135. package/dist/components/TextAreaInput/TextAreaInput.d.ts +68 -0
  136. package/dist/components/TextAreaInput/TextAreaInput.theme.d.ts +14 -0
  137. package/dist/components/TextAreaInput/TextAreaInput.utils.d.ts +69 -0
  138. package/dist/components/TextAreaInput/index.d.ts +2 -0
  139. package/dist/components/TitleIcon/TitleIcon.d.ts +13 -0
  140. package/dist/components/TitleIcon/TitleIcon.theme.d.ts +19 -0
  141. package/dist/components/TitleIcon/index.d.ts +1 -0
  142. package/dist/components/index.d.ts +61 -0
  143. package/dist/hooks/index.d.ts +27 -0
  144. package/dist/hooks/useBreakpoint/index.d.ts +2 -0
  145. package/dist/hooks/useBreakpoint/useBreakpoint.d.ts +15 -0
  146. package/dist/hooks/useBreakpoint/useBreakpoint.types.d.ts +18 -0
  147. package/dist/hooks/useChat/index.d.ts +22 -0
  148. package/dist/hooks/useChat/useChat.context.d.ts +7 -0
  149. package/dist/hooks/useChat/useChat.d.ts +11 -0
  150. package/dist/hooks/useChat/useChat.types.d.ts +209 -0
  151. package/dist/hooks/useChat/useChat.utils.d.ts +18 -0
  152. package/dist/hooks/useChat/useChatActions.d.ts +10 -0
  153. package/dist/hooks/useChat/useChatAgentMessages/index.d.ts +1 -0
  154. package/dist/hooks/useChat/useChatAgentMessages/useChatAgentMessages.d.ts +2 -0
  155. package/dist/hooks/useChat/useChatInputRequests/index.d.ts +2 -0
  156. package/dist/hooks/useChat/useChatInputRequests/useChatInputRequests.d.ts +3 -0
  157. package/dist/hooks/useChat/useChatInputRequests/useChatInputRequests.types.d.ts +4 -0
  158. package/dist/hooks/useChat/useChatLifecycle.d.ts +5 -0
  159. package/dist/hooks/useChat/useChatPermissionRequests/index.d.ts +2 -0
  160. package/dist/hooks/useChat/useChatPermissionRequests/useChatPermissionRequestSubscriptions.d.ts +2 -0
  161. package/dist/hooks/useChat/useChatPermissionRequests/useChatPermissionRequests.d.ts +3 -0
  162. package/dist/hooks/useChat/useChatPermissionRequests/useChatPermissionRequests.types.d.ts +4 -0
  163. package/dist/hooks/useChat/useChatQuestionRequests/index.d.ts +2 -0
  164. package/dist/hooks/useChat/useChatQuestionRequests/useChatQuestionRequestSubscriptions.d.ts +2 -0
  165. package/dist/hooks/useChat/useChatQuestionRequests/useChatQuestionRequests.d.ts +3 -0
  166. package/dist/hooks/useChat/useChatQuestionRequests/useChatQuestionRequests.types.d.ts +4 -0
  167. package/dist/hooks/useChat/useChatRunLifecycle/index.d.ts +2 -0
  168. package/dist/hooks/useChat/useChatRunLifecycle/useChatRunLifecycle.d.ts +3 -0
  169. package/dist/hooks/useChat/useChatRunLifecycle/useChatRunLifecycle.types.d.ts +11 -0
  170. package/dist/hooks/useChat/useChatRunLifecycle/useChatRunLifecycleSubscriptions.d.ts +2 -0
  171. package/dist/hooks/useChat/useChatRunStore/index.d.ts +1 -0
  172. package/dist/hooks/useChat/useChatRunStore/useChatRunStore.d.ts +3 -0
  173. package/dist/hooks/useChat/useChatRuns.d.ts +10 -0
  174. package/dist/hooks/useChat/useChatState.d.ts +17 -0
  175. package/dist/hooks/useChat/useChatSteering/index.d.ts +2 -0
  176. package/dist/hooks/useChat/useChatSteering/useChatSteering.d.ts +3 -0
  177. package/dist/hooks/useChat/useChatSteering/useChatSteering.types.d.ts +4 -0
  178. package/dist/hooks/useChat/useChatStepMessages/index.d.ts +1 -0
  179. package/dist/hooks/useChat/useChatStepMessages/useChatStepMessages.d.ts +2 -0
  180. package/dist/hooks/useChat/usePersistedRunList/index.d.ts +2 -0
  181. package/dist/hooks/useChat/usePersistedRunList/usePersistedRunList.d.ts +3 -0
  182. package/dist/hooks/useChat/usePersistedRunList/usePersistedRunList.types.d.ts +5 -0
  183. package/dist/hooks/useDaemon/index.d.ts +6 -0
  184. package/dist/hooks/useDaemon/useDaemon.context.d.ts +18 -0
  185. package/dist/hooks/useDaemon/useDaemon.d.ts +7 -0
  186. package/dist/hooks/useDaemon/useDaemon.types.d.ts +62 -0
  187. package/dist/hooks/useDaemon/useDaemonCommand/index.d.ts +2 -0
  188. package/dist/hooks/useDaemon/useDaemonCommand/useDaemonCommand.d.ts +20 -0
  189. package/dist/hooks/useDaemon/useDaemonCommand/useDaemonCommand.types.d.ts +28 -0
  190. package/dist/hooks/useDaemon/useDaemonSubscription/index.d.ts +1 -0
  191. package/dist/hooks/useDaemon/useDaemonSubscription/useDaemonSubscription.d.ts +18 -0
  192. package/dist/hooks/useDebugRender/index.d.ts +2 -0
  193. package/dist/hooks/useDebugRender/useDebugRender.constants.d.ts +18 -0
  194. package/dist/hooks/useDebugRender/useDebugRender.d.ts +35 -0
  195. package/dist/hooks/useDebugRender/useDebugRender.types.d.ts +60 -0
  196. package/dist/hooks/useDebugRender/useDebugRender.utils.d.ts +34 -0
  197. package/dist/hooks/useLogs/index.d.ts +3 -0
  198. package/dist/hooks/useLogs/logStore.d.ts +18 -0
  199. package/dist/hooks/useLogs/useLogs.constants.d.ts +2 -0
  200. package/dist/hooks/useLogs/useLogs.d.ts +15 -0
  201. package/dist/hooks/useLogs/useLogs.types.d.ts +47 -0
  202. package/dist/hooks/useLogs/useLogs.utils.d.ts +13 -0
  203. package/dist/hooks/useModal/index.d.ts +3 -0
  204. package/dist/hooks/useModal/useModal.context.d.ts +20 -0
  205. package/dist/hooks/useModal/useModal.d.ts +22 -0
  206. package/dist/hooks/useModal/useModal.types.d.ts +49 -0
  207. package/dist/hooks/useMouse/index.d.ts +2 -0
  208. package/dist/hooks/useMouse/useMouse.types.d.ts +43 -0
  209. package/dist/hooks/useMouse/useMouse.utils.d.ts +30 -0
  210. package/dist/hooks/useMouseClick/index.d.ts +2 -0
  211. package/dist/hooks/useMouseClick/useMouseClick.d.ts +23 -0
  212. package/dist/hooks/useMouseClick/useMouseClick.types.d.ts +28 -0
  213. package/dist/hooks/useMouseHover/index.d.ts +2 -0
  214. package/dist/hooks/useMouseHover/useMouseHover.d.ts +25 -0
  215. package/dist/hooks/useMouseHover/useMouseHover.types.d.ts +38 -0
  216. package/dist/hooks/useMouseWheelScroll/index.d.ts +2 -0
  217. package/dist/hooks/useMouseWheelScroll/useMouseWheelScroll.d.ts +28 -0
  218. package/dist/hooks/useMouseWheelScroll/useMouseWheelScroll.types.d.ts +32 -0
  219. package/dist/hooks/useRegion/index.d.ts +3 -0
  220. package/dist/hooks/useRegion/useRegion.d.ts +21 -0
  221. package/dist/hooks/useRegion/useRegion.types.d.ts +41 -0
  222. package/dist/hooks/useRegion/useRegion.utils.d.ts +51 -0
  223. package/dist/hooks/useStrategies/useStrategies.d.ts +10 -0
  224. package/dist/hooks/useToolSpinner/index.d.ts +1 -0
  225. package/dist/hooks/useToolSpinner/useToolSpinner.d.ts +28 -0
  226. package/dist/hooks/useUserConfig/index.d.ts +4 -0
  227. package/dist/hooks/useUserConfig/useUserConfig.constants.d.ts +17 -0
  228. package/dist/hooks/useUserConfig/useUserConfig.context.d.ts +9 -0
  229. package/dist/hooks/useUserConfig/useUserConfig.d.ts +9 -0
  230. package/dist/hooks/useUserConfig/useUserConfig.types.d.ts +30 -0
  231. package/dist/hooks/useUserConfig/useUserConfig.utils.d.ts +19 -0
  232. package/dist/hooks/useWebSocket/index.d.ts +2 -0
  233. package/dist/hooks/useWebSocket/useWebSocket.d.ts +17 -0
  234. package/dist/hooks/useWebSocket/useWebSocket.types.d.ts +27 -0
  235. package/dist/index.d.ts +2 -0
  236. package/dist/index.js +10592 -0
  237. package/dist/main.js +10655 -0
  238. package/dist/pages/ChatPage/ChatPage.constants.d.ts +2 -0
  239. package/dist/pages/ChatPage/ChatPage.d.ts +25 -0
  240. package/dist/pages/ChatPage/ChatPage.theme.d.ts +56 -0
  241. package/dist/pages/ChatPage/index.d.ts +4 -0
  242. package/dist/pages/IntroPage/IntroPage.d.ts +14 -0
  243. package/dist/pages/IntroPage/IntroPage.theme.d.ts +13 -0
  244. package/dist/pages/IntroPage/index.d.ts +4 -0
  245. package/dist/pages/LogsPage/LogsPage.d.ts +14 -0
  246. package/dist/pages/LogsPage/LogsPage.theme.d.ts +49 -0
  247. package/dist/pages/LogsPage/LogsPage.utils.d.ts +5 -0
  248. package/dist/pages/LogsPage/index.d.ts +4 -0
  249. package/dist/pages/SpawnedStrategyPage/SpawnedStrategyPage.d.ts +12 -0
  250. package/dist/pages/SpawnedStrategyPage/index.d.ts +2 -0
  251. package/dist/run-tui.d.ts +12 -0
  252. package/dist/run-tui.types.d.ts +12 -0
  253. package/dist/utils/debug.d.ts +12 -0
  254. package/dist/utils/mouseEscape.d.ts +29 -0
  255. package/dist/utils/yogaLayout.d.ts +32 -0
  256. package/package.json +66 -0
@@ -0,0 +1 @@
1
+ export { TitleIcon } from "./TitleIcon";
@@ -0,0 +1,61 @@
1
+ export type { BorderedPanelProps, BorderedPanelRenderProps, BorderedPanelTheme, } from "./BorderedPanel";
2
+ export { BorderedPanel, BorderedPanelRender, useBorderedPanelTheme, } from "./BorderedPanel";
3
+ export type { ButtonProps, ButtonRenderProps, ButtonTheme, ButtonVariant, } from "./Button";
4
+ export { Button, ButtonRender, useButtonTheme } from "./Button";
5
+ export type { ChatTextAreaProps, ChatTextAreaRenderProps, } from "./ChatTextArea";
6
+ export { ChatTextArea, ChatTextAreaRender } from "./ChatTextArea";
7
+ export { useChatTextAreaTheme } from "./ChatTextArea/ChatTextArea.theme";
8
+ export type { CodeViewProps, CodeViewRenderProps } from "./CodeView";
9
+ export { CodeView, CodeViewRender } from "./CodeView";
10
+ export type { CodeViewTheme } from "./CodeView/CodeView.theme";
11
+ export { useCodeViewTheme } from "./CodeView/CodeView.theme";
12
+ export type { Command, CommandAction, CommandActionContext, CommandId, CommandPaletteProps, CommandPaletteRenderProps, } from "./CommandPalette";
13
+ export { CommandPalette, CommandPaletteRender } from "./CommandPalette";
14
+ export type { CommandPaletteTheme } from "./CommandPalette/CommandPalette.theme";
15
+ export { useCommandPaletteTheme } from "./CommandPalette/CommandPalette.theme";
16
+ export type { FrameProps, FrameRenderProps } from "./Frame";
17
+ export { Frame, FrameRender } from "./Frame";
18
+ export type { FrameTheme } from "./Frame/Frame.theme";
19
+ export { useFrameTheme } from "./Frame/Frame.theme";
20
+ export type { HideProps } from "./Hide";
21
+ export { Hide } from "./Hide";
22
+ export type { AgentMessageProps, AgentMessageRenderProps, MessageListProps, MessageListRenderProps, SystemMessageProps, SystemMessageRenderProps, UserMessageProps, UserMessageRenderProps, } from "./MessageList";
23
+ export { AgentMessage, AgentMessageRender, MessageList, MessageListRender, SystemMessage, SystemMessageRender, UserMessage, UserMessageRender, } from "./MessageList";
24
+ export type { MessageListTheme, RoleStyle, } from "./MessageList/MessageList.theme";
25
+ export { useMessageListTheme } from "./MessageList/MessageList.theme";
26
+ export type { ModalProps, ModalRenderProps, ModalSize } from "./Modal";
27
+ export { Modal, ModalRender } from "./Modal";
28
+ export type { ModalTheme } from "./Modal/Modal.theme";
29
+ export { useModalTheme } from "./Modal/Modal.theme";
30
+ export type { MouseContextValue, MouseListener, MouseProviderProps, } from "./MouseProvider";
31
+ export { MouseProvider } from "./MouseProvider";
32
+ export type { PermissionDecision, PermissionPromptProps, PermissionPromptRenderProps, } from "./PermissionPrompt";
33
+ export { PermissionPrompt, PermissionPromptRender } from "./PermissionPrompt";
34
+ export type { QuestionPromptProps, QuestionPromptRenderProps, } from "./QuestionPrompt";
35
+ export { QuestionPrompt, QuestionPromptRender } from "./QuestionPrompt";
36
+ export type { ScrollableListProps, ScrollableListRenderProps, } from "./ScrollableList";
37
+ export { ScrollableList, ScrollableListRender } from "./ScrollableList";
38
+ export type { ScrollableListTheme } from "./ScrollableList/ScrollableList.theme";
39
+ export { useScrollableListTheme } from "./ScrollableList/ScrollableList.theme";
40
+ export type { ScrollableViewProps, ScrollableViewRenderProps, ScrollableViewState, ScrollableViewTheme, } from "./ScrollableView";
41
+ export { ScrollableView, ScrollableViewRender, useScrollableViewTheme, } from "./ScrollableView";
42
+ export type { ScrollbarProps, ScrollbarRenderProps } from "./Scrollbar";
43
+ export { Scrollbar, ScrollbarRender } from "./Scrollbar";
44
+ export type { ScrollbarTheme } from "./Scrollbar/Scrollbar.theme";
45
+ export { useScrollbarTheme } from "./Scrollbar/Scrollbar.theme";
46
+ export type { SearchInputProps, SearchInputRenderProps } from "./SearchInput";
47
+ export { SearchInput, SearchInputRender } from "./SearchInput";
48
+ export type { SearchInputTheme } from "./SearchInput/SearchInput.theme";
49
+ export { useSearchInputTheme } from "./SearchInput/SearchInput.theme";
50
+ export type { SeparatorProps, SeparatorRenderProps, SeparatorTheme, } from "./Separator";
51
+ export { Separator, SeparatorRender, useSeparatorTheme } from "./Separator";
52
+ export type { StatusBarProps, StatusBarRenderProps } from "./StatusBar";
53
+ export { StatusBar, StatusBarRender } from "./StatusBar";
54
+ export type { StatusBarTheme, StatusInfo, } from "./StatusBar/StatusBar.theme";
55
+ export { useStatusBarTheme } from "./StatusBar/StatusBar.theme";
56
+ export type { TextAreaInputProps } from "./TextAreaInput";
57
+ export { TextAreaInput } from "./TextAreaInput";
58
+ export { useTextAreaInputTheme } from "./TextAreaInput/TextAreaInput.theme";
59
+ export { TitleIcon } from "./TitleIcon";
60
+ export type { TitleIconTheme } from "./TitleIcon/TitleIcon.theme";
61
+ export { useTitleIconTheme } from "./TitleIcon/TitleIcon.theme";
@@ -0,0 +1,27 @@
1
+ export type { BreakpointState } from "./useBreakpoint";
2
+ export { useBreakpoint } from "./useBreakpoint";
3
+ export type { ChatMessage, ChatRun, ChatRunId, ChatRunsContextProviderProps, ChatRunsContextType, ChatStatus, CreateRunInit, MessageRole, UseChatState, } from "./useChat";
4
+ export { ChatRunsContextProvider, useChat, useChatActions, useChatLifecycle, useChatRuns, useChatState, } from "./useChat";
5
+ export type { ClientMessageOf, ClientMessageType, DaemonCommandMap, DaemonCommandType, DaemonContextProviderProps, DaemonContextValue, DaemonMessageListener, DaemonMessageOf, DaemonMessageType, } from "./useDaemon";
6
+ export { DaemonContextProvider, useDaemon, useDaemonCommand, useDaemonSubscription, } from "./useDaemon";
7
+ export type { DebugRenderColors, DebugRenderOptions, DebugRenderRef, RenderReason, } from "./useDebugRender";
8
+ export { useDebugRender } from "./useDebugRender";
9
+ export type { LogEntry, LogLevel, LogStore, LogStoreListener, LogsState, } from "./useLogs";
10
+ export { createLogStore, useLogs } from "./useLogs";
11
+ export type { ModalContextProviderProps, ModalContextType, ModalControls, ModalEntry, ModalId, } from "./useModal";
12
+ export { ModalContextProvider, useModal } from "./useModal";
13
+ export type { MouseEvent, MouseEventKind, MouseModifiers } from "./useMouse";
14
+ export { isInsideRef, isMouseEscape, parseMouseEvents } from "./useMouse";
15
+ export type { UseMouseClickOptions } from "./useMouseClick";
16
+ export { useMouseClick } from "./useMouseClick";
17
+ export type { UseMouseHoverOptions, UseMouseHoverResult, } from "./useMouseHover";
18
+ export { useMouseHover } from "./useMouseHover";
19
+ export type { MouseScrollDirection, MouseScrollEvent, UseMouseWheelScrollOptions, } from "./useMouseWheelScroll";
20
+ export { useMouseWheelScroll } from "./useMouseWheelScroll";
21
+ export type { RegionDimensions, RegionHandle, RegionOptions, RegionPosition, } from "./useRegion";
22
+ export { useRegion } from "./useRegion";
23
+ export { TOOL_SPINNER_FRAMES, TOOL_SPINNER_INTERVAL_MS, useToolSpinner, } from "./useToolSpinner";
24
+ export type { UserConfig, UserConfigContextProviderProps, UserConfigContextType, } from "./useUserConfig";
25
+ export { DEFAULT_USER_CONFIG, resolveDefaultConfigFilePath, UserConfigContextProvider, useUserConfig, } from "./useUserConfig";
26
+ export type { UseWebSocketConfig, WebSocketState, WebSocketStatus, } from "./useWebSocket";
27
+ export { useWebSocket } from "./useWebSocket";
@@ -0,0 +1,2 @@
1
+ export { useBreakpoint } from "./useBreakpoint";
2
+ export type { BreakpointState } from "./useBreakpoint.types";
@@ -0,0 +1,15 @@
1
+ import type { BreakpointState } from "./useBreakpoint.types";
2
+ /**
3
+ * Track terminal dimensions and provide breakpoint query helpers.
4
+ *
5
+ * Uses Ink's `useStdout()` to listen for resize events and resolves the
6
+ * active breakpoint from the theme's `breakpoints` tokens (mobile-first).
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * const { breakpoint, above, below } = useBreakpoint();
11
+ * if (below("md")) return <CompactView />;
12
+ * return <FullView />;
13
+ * ```
14
+ */
15
+ export declare function useBreakpoint(): BreakpointState;
@@ -0,0 +1,18 @@
1
+ import type { BreakpointName } from "../../Theme";
2
+ /** Result returned by `useBreakpoint()`. */
3
+ export interface BreakpointState {
4
+ /** Current terminal width in columns. */
5
+ readonly columns: number;
6
+ /** Current terminal height in rows. */
7
+ readonly rows: number;
8
+ /** The active breakpoint name based on terminal width. */
9
+ readonly breakpoint: BreakpointName;
10
+ /** Resolved container width for the active breakpoint. `undefined` means full width. */
11
+ readonly containerWidth: number | undefined;
12
+ /** True when terminal width is at least the given breakpoint. */
13
+ readonly above: (name: BreakpointName) => boolean;
14
+ /** True when terminal width is below the given breakpoint. */
15
+ readonly below: (name: BreakpointName) => boolean;
16
+ /** True when terminal width is between two breakpoints (inclusive lower, exclusive upper). */
17
+ readonly between: (lower: BreakpointName, upper: BreakpointName) => boolean;
18
+ }
@@ -0,0 +1,22 @@
1
+ export { useChat } from "./useChat";
2
+ export { ChatRunsContextProvider } from "./useChat.context";
3
+ export type { ChatMessage, ChatRun, ChatRunId, ChatRunsContextProviderProps, ChatRunsContextType, ChatStatus, CreateRunInit, MessageRole, MessageSegment, PendingChatExecution, PendingPermissionRequest, PendingQuestionRequest, PersistedRunMeta, RunOverview, RunStatus, RunSummary, UseChatState, } from "./useChat.types";
4
+ export type { UseChatActionsResult } from "./useChatActions";
5
+ export { useChatActions } from "./useChatActions";
6
+ export type { ChatInputRequestResult } from "./useChatInputRequests";
7
+ export { useChatInputRequests } from "./useChatInputRequests";
8
+ export type { UseChatLifecycleResult } from "./useChatLifecycle";
9
+ export { useChatLifecycle } from "./useChatLifecycle";
10
+ export type { ChatPermissionRequestResult } from "./useChatPermissionRequests";
11
+ export { useChatPermissionRequests } from "./useChatPermissionRequests";
12
+ export type { ChatQuestionRequestResult } from "./useChatQuestionRequests";
13
+ export { useChatQuestionRequests } from "./useChatQuestionRequests";
14
+ export type { ChatRunLifecycle } from "./useChatRunLifecycle";
15
+ export { useChatRunLifecycle } from "./useChatRunLifecycle";
16
+ export { useChatRuns } from "./useChatRuns";
17
+ export type { UseChatStateResult } from "./useChatState";
18
+ export { useChatState } from "./useChatState";
19
+ export type { ChatSteeringResult } from "./useChatSteering";
20
+ export { useChatSteering } from "./useChatSteering";
21
+ export type { PersistedRunListResult } from "./usePersistedRunList";
22
+ export { usePersistedRunList } from "./usePersistedRunList";
@@ -0,0 +1,7 @@
1
+ import type { ChatRunsContextProviderProps, ChatRunsStore } from "./useChat.types";
2
+ export declare const ChatRunsContext: import("react").Context<ChatRunsStore | null>;
3
+ /**
4
+ * Provide global chat-run state and compose the hooks that own each logical
5
+ * block of run behavior.
6
+ */
7
+ export declare function ChatRunsContextProvider({ children, }: ChatRunsContextProviderProps): React.ReactElement;
@@ -0,0 +1,11 @@
1
+ import type { ChatRunId, UseChatState } from "./useChat.types";
2
+ /**
3
+ * Bind a view to a single chat run.
4
+ *
5
+ * When no matching run exists, the returned view exposes empty values;
6
+ * `startStrategy` is still functional and will create a new run.
7
+ *
8
+ * Must be called inside both a `<DaemonContextProvider>` and a
9
+ * `<ChatRunsContextProvider>`.
10
+ */
11
+ export declare function useChat(chatRunId: ChatRunId | null): UseChatState;
@@ -0,0 +1,209 @@
1
+ import type { AgentStreamEventWire, ContextUsageWire, ConversationInputWire, ConversationRecordWire, ConversationRetentionEventWire, RequestPermissionMessage, RequestQuestionMessage, RunOverview, RunStatus, RunSummary, Usage } from "@comma-agents/daemon";
2
+ import type { Dispatch, SetStateAction } from "react";
3
+ import type { WebSocketStatus } from "../useWebSocket/useWebSocket.types";
4
+ /** Stable identifier shared by the TUI and daemon for the run's life. */
5
+ export type ChatRunId = string;
6
+ /** Sender role for display purposes. */
7
+ export type MessageRole = "user" | "agent" | "system";
8
+ /** Narrow the daemon's stream event union to a specific event kind. */
9
+ type StreamEventOf<EventKind extends AgentStreamEventWire["type"]> = Extract<AgentStreamEventWire, {
10
+ type: EventKind;
11
+ }>;
12
+ /**
13
+ * A single segment within an agent's message body.
14
+ *
15
+ * Segments accumulate the daemon's `agent_streaming` wire events
16
+ * (`AgentStreamEventWire`) into render state: ordered, typed body parts the
17
+ * UI can render with the right affordance (collapsed tool call panel, dimmed
18
+ * thinking block, code-formatted result, etc.). `tool-call` and `tool-result`
19
+ * segments are the wire events verbatim; `text` and `thinking` segments add a
20
+ * `streaming` flag because consecutive deltas are folded into one segment
21
+ * that closes when the stream ends.
22
+ */
23
+ export type MessageSegment = (StreamEventOf<"text"> & {
24
+ /** Whether this text segment is still receiving streaming tokens. */
25
+ readonly streaming: boolean;
26
+ }) | StreamEventOf<"tool-call"> | StreamEventOf<"tool-result"> | StreamEventOf<"retention"> | (StreamEventOf<"thinking"> & {
27
+ /** Whether the reasoning stream is still receiving tokens. */
28
+ readonly streaming: boolean;
29
+ });
30
+ /** A single message in the chat log. */
31
+ export interface ChatMessage {
32
+ readonly id: string;
33
+ readonly role: MessageRole;
34
+ /** Agent name (or "you" for user, "system" for system messages). */
35
+ readonly sender: string;
36
+ /**
37
+ * Full accumulated text for the message.
38
+ *
39
+ * For `user` and `system` messages this is the only body. For `agent`
40
+ * messages this is a flattened concatenation of all `text`-type segments,
41
+ * preserved primarily for backwards compatibility with consumers that
42
+ * don't yet understand `segments`.
43
+ */
44
+ readonly text: string;
45
+ /**
46
+ * Ordered, typed body parts for richer rendering (tool calls, reasoning,
47
+ * MCP, etc.). When omitted, consumers should fall back to `text`.
48
+ */
49
+ readonly segments?: readonly MessageSegment[];
50
+ /** Whether this message is still receiving streaming tokens. */
51
+ readonly streaming: boolean;
52
+ /** Tool call id of the `launch_strategy` invocation that spawned this message. */
53
+ readonly parentToolCallId?: string;
54
+ /** Provider/model identifier used for this agent call. */
55
+ readonly model?: string;
56
+ /** Maximum model context tokens, when known. */
57
+ readonly contextWindow?: number;
58
+ /** Final token usage reported by the model. */
59
+ readonly usage?: Usage;
60
+ /** Final model-step context usage. */
61
+ readonly contextUsage?: ContextUsageWire;
62
+ /** Completion timestamp for finished agent calls. */
63
+ readonly completedAt?: number;
64
+ readonly timestamp: number;
65
+ }
66
+ /**
67
+ * UI lifecycle status for a chat run.
68
+ *
69
+ * Extends the daemon's `RunStatus` union (`pending | running | completed |
70
+ * error | cancelled`) with TUI-only states that the daemon does not model:
71
+ * - `idle` — run exists but hasn't started a run yet.
72
+ * - `waiting_input` — derived from an unanswered `request_input`.
73
+ * - `waiting_permission` — derived from an unanswered `request_permission`.
74
+ * - `waiting_question` — derived from an unanswered `request_question`.
75
+ */
76
+ export type ChatStatus = RunStatus | "idle" | "waiting_input" | "waiting_permission" | "waiting_question";
77
+ /** User-initiated execution waiting for daemon preparation or execution. */
78
+ export interface PendingChatExecution {
79
+ readonly mode: "start" | "continue";
80
+ readonly input: string | null;
81
+ /** Request id for the currently pending prepare/start/continue command. */
82
+ readonly requestId: string;
83
+ /** Locally queued user message for a continuation, if one was rendered. */
84
+ readonly queuedMessageId?: string;
85
+ }
86
+ /** A single chat run's state — 1:1 with a strategy run. */
87
+ export interface ChatRun {
88
+ /** Stable run identifier and map key. */
89
+ readonly id: ChatRunId;
90
+ /** Run id assigned by the daemon after `strategy_started`. */
91
+ readonly daemonRunId: string | null;
92
+ /** Human-readable label (strategy name or file path). */
93
+ readonly label: string;
94
+ /** Path to the strategy file being run. */
95
+ readonly strategyPath: string | null;
96
+ /**
97
+ * Name of the strategy used for this run, when known. Runs started via
98
+ * `startStrategy` learn this from `strategy_started`. May be null until the
99
+ * daemon reports it.
100
+ */
101
+ readonly strategyName: string | null;
102
+ /** UI lifecycle status (see `ChatStatus`). */
103
+ readonly status: ChatStatus;
104
+ /** Mirror of the daemon's `RunStatus` for this run, if known. */
105
+ readonly runStatus: RunStatus | null;
106
+ /** Latest error message, or null. */
107
+ readonly error: string | null;
108
+ /** Execution waiting for daemon preparation or execution. */
109
+ readonly pendingExecution: PendingChatExecution | null;
110
+ /** Agent currently waiting for user input, or null. */
111
+ readonly pendingInputAgent: string | null;
112
+ /**
113
+ * Queue of `request_permission` messages awaiting user decisions, stored
114
+ * as received. The head (index 0) is the currently-displayed prompt; its
115
+ * `requestId` is echoed back in the `permission_decision` reply.
116
+ */
117
+ readonly pendingPermissionRequests: readonly RequestPermissionMessage[];
118
+ /**
119
+ * Queue of `request_question` messages awaiting user answers, stored as
120
+ * received. The head's `requestId` is echoed back in `question_response`.
121
+ */
122
+ readonly pendingQuestionRequests: readonly RequestQuestionMessage[];
123
+ /** Accumulated messages for this run. */
124
+ readonly messages: readonly ChatMessage[];
125
+ /** Stack of active `launch_strategy` tool-call ids for nested strategy output. */
126
+ readonly activeLaunchStrategyIds: readonly string[];
127
+ /** Creation timestamp (ms since epoch). */
128
+ readonly createdAt: number;
129
+ /** Last-updated timestamp (ms since epoch). */
130
+ readonly updatedAt: number;
131
+ }
132
+ /** Pending daemon permission request rendered by the chat UI. */
133
+ export type PendingPermissionRequest = RequestPermissionMessage;
134
+ /** Pending daemon question request rendered by the chat UI. */
135
+ export type PendingQuestionRequest = RequestQuestionMessage;
136
+ /** @internal Shared state contracts used by the chat run operation hooks. */
137
+ export type ChatRunsState = ReadonlyMap<ChatRunId, ChatRun>;
138
+ /** @internal Setter for the provider-owned chat run collection. */
139
+ export type SetChatRuns = Dispatch<SetStateAction<ChatRunsState>>;
140
+ /** Initial overrides accepted by `createChatRun`. */
141
+ export interface CreateRunInit {
142
+ /** Human-readable label. Defaults to "New run". */
143
+ readonly label?: string;
144
+ /** Strategy file path, if known at creation time. */
145
+ readonly strategyPath?: string;
146
+ }
147
+ /** Lightweight metadata for a daemon-persisted run. */
148
+ export type PersistedRunMeta = RunOverview;
149
+ export type PersistedConversationRecord = ConversationRecordWire;
150
+ export type PersistedConversationRetentionEvent = ConversationRetentionEventWire;
151
+ export type PersistedConversationInput = ConversationInputWire;
152
+ /** Value exposed by `ChatRunsContext`. */
153
+ export interface ChatRunsContextType {
154
+ /** All runs keyed by their stable run id. */
155
+ readonly chatRuns: ReadonlyMap<ChatRunId, ChatRun>;
156
+ }
157
+ /** Internal writable store shared by chat run domain hooks. */
158
+ export interface ChatRunsStore extends ChatRunsContextType {
159
+ readonly setChatRuns: SetChatRuns;
160
+ }
161
+ /** Props for the `ChatRunsContextProvider` component. */
162
+ export interface ChatRunsContextProviderProps {
163
+ /** Child elements that can consume chat run state. */
164
+ readonly children: React.ReactNode;
165
+ }
166
+ /**
167
+ * Value returned by `useChat()` — a view of a single run with bound action methods.
168
+ *
169
+ * When the provided `chatRunId` doesn't match any run, all fields return
170
+ * empty/null values and action methods other than `startStrategy` are no-ops.
171
+ */
172
+ export interface UseChatState {
173
+ /** Id of the run this view is bound to, or null. */
174
+ readonly chatRunId: ChatRunId | null;
175
+ readonly messages: readonly ChatMessage[];
176
+ readonly status: ChatStatus;
177
+ readonly error: string | null;
178
+ readonly pendingInputAgent: string | null;
179
+ /** Name of the strategy that produced this run, if known. */
180
+ readonly strategyName: string | null;
181
+ /** Strategy file path, if known. */
182
+ readonly strategyPath: string | null;
183
+ /** Current pending permission request (head of queue), or null. */
184
+ readonly pendingPermissionRequest: RequestPermissionMessage | null;
185
+ /** Current pending question request (head of queue), or null. */
186
+ readonly pendingQuestionRequest: RequestQuestionMessage | null;
187
+ /** Alias for `daemonRunId` — preserved for back-compatibility. */
188
+ readonly runId: string | null;
189
+ /** Current daemon WebSocket connection status. */
190
+ readonly connectionStatus: WebSocketStatus;
191
+ /** Create a new run and start a strategy on it. Returns the stable run id. */
192
+ readonly startStrategy: (strategyPath: string, input?: string, cwd?: string, manifestPath?: string) => ChatRunId;
193
+ /** Send user input to the bound run. No-op if no run or no pending input. */
194
+ readonly sendInput: (text: string) => void;
195
+ /**
196
+ * Queue a steering message for the bound run. No-op unless the run is
197
+ * live and running/pending.
198
+ */
199
+ readonly sendSteer: (text: string) => void;
200
+ /** Resolve the pending permission request for the bound run. */
201
+ readonly sendPermissionDecision: (decision: "allow" | "deny" | "allow-session" | "deny-session") => void;
202
+ /** Resolve the pending question request for the bound run. */
203
+ readonly sendQuestionResponse: (response: string) => void;
204
+ /** Clear the bound run's UI projection. No-op if no run. */
205
+ readonly reset: () => void;
206
+ /** Send `stop_run` for the bound run. No-op if no run is active. */
207
+ readonly stop: () => void;
208
+ }
209
+ export type { RunOverview, RunStatus, RunSummary };
@@ -0,0 +1,18 @@
1
+ import type { ChatMessage, ChatRun, ChatRunId, CreateRunInit, PersistedConversationInput, PersistedConversationRecord, PersistedConversationRetentionEvent } from "./useChat.types";
2
+ /** Construct a fresh local chat run in the idle state. */
3
+ export declare function createInitialChatRun(chatRunId: ChatRunId, init: CreateRunInit): ChatRun;
4
+ /** Return the innermost active spawned-strategy tool-call id for a run. */
5
+ export declare function getActiveLaunchStrategyId(chatRun: ChatRun): string | undefined;
6
+ /** Create an opaque id for a TUI-local chat message. */
7
+ export declare function createLocalChatMessageId(chatRunId: ChatRunId): string;
8
+ /**
9
+ * Project daemon conversation records into chat messages for display.
10
+ *
11
+ * Human inputs come from `inputs` (the genuine run-start / continuation
12
+ * prompts), each anchored before the first agent record of its segment. A
13
+ * record's own `userMessage` is the input fed *into* that agent — which for a
14
+ * downstream agent is the upstream agent's output — so it is intentionally not
15
+ * rendered, to mirror the live (non-rehydrated) transcript and avoid duplicate,
16
+ * mislabeled bubbles.
17
+ */
18
+ export declare function conversationRecordsToChatMessages(chatRunId: ChatRunId, records: readonly PersistedConversationRecord[], retentionEvents?: readonly PersistedConversationRetentionEvent[], inputs?: readonly PersistedConversationInput[]): readonly ChatMessage[];
@@ -0,0 +1,10 @@
1
+ import type { ChatRunId } from "./useChat.types";
2
+ export interface UseChatActionsResult {
3
+ readonly sendInput: (text: string) => void;
4
+ readonly sendSteer: (text: string) => void;
5
+ readonly sendPermissionDecision: (decision: "allow" | "deny" | "allow-session" | "deny-session") => void;
6
+ readonly sendQuestionResponse: (response: string) => void;
7
+ readonly reset: () => void;
8
+ readonly stop: () => void;
9
+ }
10
+ export declare function useChatActions(chatRunId: ChatRunId | null): UseChatActionsResult;
@@ -0,0 +1 @@
1
+ export { useChatAgentMessages } from "./useChatAgentMessages";
@@ -0,0 +1,2 @@
1
+ /** Project streamed and completed agent output into local chat messages. */
2
+ export declare function useChatAgentMessages(): void;
@@ -0,0 +1,2 @@
1
+ export { useChatInputRequests } from "./useChatInputRequests";
2
+ export type { ChatInputRequestResult } from "./useChatInputRequests.types";
@@ -0,0 +1,3 @@
1
+ import type { ChatInputRequestResult } from "./useChatInputRequests.types";
2
+ /** Submit user input for a pending daemon input request. */
3
+ export declare function useChatInputRequests(subscribeToDaemon?: boolean): ChatInputRequestResult;
@@ -0,0 +1,4 @@
1
+ import type { ChatRunId } from "../useChat.types";
2
+ export interface ChatInputRequestResult {
3
+ readonly sendInput: (chatRunId: ChatRunId, text: string) => void;
4
+ }
@@ -0,0 +1,5 @@
1
+ import type { ChatRunId } from "./useChat.types";
2
+ export interface UseChatLifecycleResult {
3
+ readonly startStrategy: (strategyPath: string, input?: string, cwd?: string, manifestPath?: string) => ChatRunId;
4
+ }
5
+ export declare function useChatLifecycle(): UseChatLifecycleResult;
@@ -0,0 +1,2 @@
1
+ export { useChatPermissionRequests } from "./useChatPermissionRequests";
2
+ export type { ChatPermissionRequestResult } from "./useChatPermissionRequests.types";
@@ -0,0 +1,2 @@
1
+ /** Project daemon permission requests into local chat runs. */
2
+ export declare function useChatPermissionRequestSubscriptions(): void;
@@ -0,0 +1,3 @@
1
+ import type { ChatPermissionRequestResult } from "./useChatPermissionRequests.types";
2
+ /** Submit decisions for pending daemon permission requests. */
3
+ export declare function useChatPermissionRequests(): ChatPermissionRequestResult;
@@ -0,0 +1,4 @@
1
+ import type { ChatRunId } from "../useChat.types";
2
+ export interface ChatPermissionRequestResult {
3
+ readonly sendPermissionDecision: (chatRunId: ChatRunId, decision: "allow" | "deny" | "allow-session" | "deny-session") => void;
4
+ }
@@ -0,0 +1,2 @@
1
+ export { useChatQuestionRequests } from "./useChatQuestionRequests";
2
+ export type { ChatQuestionRequestResult } from "./useChatQuestionRequests.types";
@@ -0,0 +1,2 @@
1
+ /** Project daemon questions into local chat runs. */
2
+ export declare function useChatQuestionRequestSubscriptions(): void;
@@ -0,0 +1,3 @@
1
+ import type { ChatQuestionRequestResult } from "./useChatQuestionRequests.types";
2
+ /** Submit responses for pending daemon questions. */
3
+ export declare function useChatQuestionRequests(): ChatQuestionRequestResult;
@@ -0,0 +1,4 @@
1
+ import type { ChatRunId } from "../useChat.types";
2
+ export interface ChatQuestionRequestResult {
3
+ readonly sendQuestionResponse: (chatRunId: ChatRunId, response: string) => void;
4
+ }
@@ -0,0 +1,2 @@
1
+ export { useChatRunLifecycle } from "./useChatRunLifecycle";
2
+ export type { ChatRunLifecycle } from "./useChatRunLifecycle.types";
@@ -0,0 +1,3 @@
1
+ import type { ChatRunLifecycle } from "./useChatRunLifecycle.types";
2
+ /** Own commands initiated by the user and local run collection management. */
3
+ export declare function useChatRunLifecycle(): ChatRunLifecycle;
@@ -0,0 +1,11 @@
1
+ import type { DiscoveredStrategy } from "@comma-agents/core";
2
+ import type { ChatRunId, PersistedRunMeta } from "../useChat.types";
3
+ export interface ChatRunLifecycle {
4
+ readonly startStrategy: (strategyPath: string, input?: string, cwd?: string, manifestPath?: string) => ChatRunId;
5
+ readonly continueRun: (chatRunId: ChatRunId, strategy: DiscoveredStrategy, input: string) => void;
6
+ readonly loadPersistedRun: (meta: PersistedRunMeta) => ChatRunId;
7
+ readonly stopChatRun: (chatRunId: ChatRunId) => void;
8
+ readonly resetChatRun: (chatRunId: ChatRunId) => void;
9
+ readonly removeChatRun: (chatRunId: ChatRunId) => void;
10
+ readonly clearAllChatRuns: () => void;
11
+ }
@@ -0,0 +1,2 @@
1
+ /** Project daemon run lifecycle events into local chat runs. */
2
+ export declare function useChatRunLifecycleSubscriptions(): void;
@@ -0,0 +1 @@
1
+ export { useChatRunStore } from "./useChatRunStore";
@@ -0,0 +1,3 @@
1
+ import type { ChatRunsStore } from "../useChat.types";
2
+ /** Access the internal writable chat run store from a chat domain hook. */
3
+ export declare function useChatRunStore(): ChatRunsStore;
@@ -0,0 +1,10 @@
1
+ import type { ChatRunsContextType } from "./useChat.types";
2
+ /**
3
+ * Access shared chat run state.
4
+ *
5
+ * Use this when a component needs awareness of multiple runs at once
6
+ * (e.g. a run switcher). For single-run views, prefer `useChat()`.
7
+ *
8
+ * Must be called inside a `<ChatRunsContextProvider>`.
9
+ */
10
+ export declare function useChatRuns(): ChatRunsContextType;
@@ -0,0 +1,17 @@
1
+ import type { RequestPermissionMessage, RequestQuestionMessage } from "@comma-agents/daemon";
2
+ import type { WebSocketStatus } from "../useWebSocket/useWebSocket.types";
3
+ import type { ChatMessage, ChatRunId, ChatStatus } from "./useChat.types";
4
+ export interface UseChatStateResult {
5
+ readonly chatRunId: ChatRunId | null;
6
+ readonly messages: readonly ChatMessage[];
7
+ readonly status: ChatStatus;
8
+ readonly error: string | null;
9
+ readonly pendingInputAgent: string | null;
10
+ readonly strategyName: string | null;
11
+ readonly strategyPath: string | null;
12
+ readonly pendingPermissionRequest: RequestPermissionMessage | null;
13
+ readonly pendingQuestionRequest: RequestQuestionMessage | null;
14
+ readonly runId: string | null;
15
+ readonly connectionStatus: WebSocketStatus;
16
+ }
17
+ export declare function useChatState(chatRunId: ChatRunId | null): UseChatStateResult;
@@ -0,0 +1,2 @@
1
+ export { useChatSteering } from "./useChatSteering";
2
+ export type { ChatSteeringResult } from "./useChatSteering.types";
@@ -0,0 +1,3 @@
1
+ import type { ChatSteeringResult } from "./useChatSteering.types";
2
+ /** Send steering messages to live chat runs. */
3
+ export declare function useChatSteering(subscribeToDaemon?: boolean): ChatSteeringResult;
@@ -0,0 +1,4 @@
1
+ import type { ChatRunId } from "../useChat.types";
2
+ export interface ChatSteeringResult {
3
+ readonly sendSteer: (chatRunId: ChatRunId, text: string) => void;
4
+ }
@@ -0,0 +1 @@
1
+ export { useChatStepMessages } from "./useChatStepMessages";
@@ -0,0 +1,2 @@
1
+ /** Project daemon step lifecycle events into system chat messages. */
2
+ export declare function useChatStepMessages(): void;
@@ -0,0 +1,2 @@
1
+ export { usePersistedRunList } from "./usePersistedRunList";
2
+ export type { PersistedRunListResult } from "./usePersistedRunList.types";
@@ -0,0 +1,3 @@
1
+ import type { PersistedRunListResult } from "./usePersistedRunList.types";
2
+ /** Pair persisted run list requests with daemon run list results. */
3
+ export declare function usePersistedRunList(): PersistedRunListResult;
@@ -0,0 +1,5 @@
1
+ import type { RunOverview } from "@comma-agents/daemon";
2
+ export interface PersistedRunListResult {
3
+ readonly persistedRuns: readonly RunOverview[];
4
+ readonly fetchPersistedRuns: (cwd?: string) => void;
5
+ }
@@ -0,0 +1,6 @@
1
+ export { useDaemon } from "./useDaemon";
2
+ export { DaemonContextProvider } from "./useDaemon.context";
3
+ export type { DaemonContextProviderProps, DaemonContextValue, } from "./useDaemon.types";
4
+ export type { DaemonCommandMap, DaemonCommandType, } from "./useDaemonCommand";
5
+ export { useDaemonCommand } from "./useDaemonCommand";
6
+ export { useDaemonSubscription } from "./useDaemonSubscription";
@@ -0,0 +1,18 @@
1
+ import type { DaemonContextProviderProps, DaemonContextValue } from "./useDaemon.types";
2
+ export declare const DaemonContext: import("react").Context<DaemonContextValue | null>;
3
+ /**
4
+ * Provides a shared WebSocket connection to the daemon.
5
+ *
6
+ * Connects eagerly on mount via `useWebSocket`. Incoming daemon messages
7
+ * are validated against the DaemonMessage Zod union and dispatched to
8
+ * listeners registered via `ctx.on(type, callback)`.
9
+ *
10
+ * @param props - Provider configuration including the daemon WebSocket URL.
11
+ * @example
12
+ * ```tsx
13
+ * <DaemonContextProvider url="ws://localhost:7422/ws">
14
+ * <App />
15
+ * </DaemonContextProvider>
16
+ * ```
17
+ */
18
+ export declare function DaemonContextProvider({ url, children, }: DaemonContextProviderProps): import("react/jsx-runtime").JSX.Element;