@wzrhine/agent 0.0.0-stage → 0.1.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 (347) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/LICENSE +21 -0
  3. package/README.md +29 -3
  4. package/dist/agent.css +15 -0
  5. package/dist/components/artifact/ArtifactCard.d.ts +56 -0
  6. package/dist/components/artifact/ArtifactCard.d.ts.map +1 -0
  7. package/dist/components/artifact/ArtifactCard.js +78 -0
  8. package/dist/components/artifact/ArtifactCard.js.map +1 -0
  9. package/dist/components/artifact/FilePreview.d.ts +117 -0
  10. package/dist/components/artifact/FilePreview.d.ts.map +1 -0
  11. package/dist/components/artifact/FilePreview.js +207 -0
  12. package/dist/components/artifact/FilePreview.js.map +1 -0
  13. package/dist/components/artifact/FilePreviewTabs.d.ts +51 -0
  14. package/dist/components/artifact/FilePreviewTabs.d.ts.map +1 -0
  15. package/dist/components/artifact/FilePreviewTabs.js +150 -0
  16. package/dist/components/artifact/FilePreviewTabs.js.map +1 -0
  17. package/dist/components/composer/AttachmentList.d.ts +33 -0
  18. package/dist/components/composer/AttachmentList.d.ts.map +1 -0
  19. package/dist/components/composer/AttachmentList.js +56 -0
  20. package/dist/components/composer/AttachmentList.js.map +1 -0
  21. package/dist/components/composer/Composer.d.ts +113 -0
  22. package/dist/components/composer/Composer.d.ts.map +1 -0
  23. package/dist/components/composer/Composer.js +327 -0
  24. package/dist/components/composer/Composer.js.map +1 -0
  25. package/dist/components/composer/ComposerInput.d.ts +101 -0
  26. package/dist/components/composer/ComposerInput.d.ts.map +1 -0
  27. package/dist/components/composer/ComposerInput.js +301 -0
  28. package/dist/components/composer/ComposerInput.js.map +1 -0
  29. package/dist/components/composer/ComposerNotice.d.ts +38 -0
  30. package/dist/components/composer/ComposerNotice.d.ts.map +1 -0
  31. package/dist/components/composer/ComposerNotice.js +16 -0
  32. package/dist/components/composer/ComposerNotice.js.map +1 -0
  33. package/dist/components/composer/MentionMenu.d.ts +37 -0
  34. package/dist/components/composer/MentionMenu.d.ts.map +1 -0
  35. package/dist/components/composer/MentionMenu.js +55 -0
  36. package/dist/components/composer/MentionMenu.js.map +1 -0
  37. package/dist/components/composer/MenuPanel.d.ts +49 -0
  38. package/dist/components/composer/MenuPanel.d.ts.map +1 -0
  39. package/dist/components/composer/MenuPanel.js +50 -0
  40. package/dist/components/composer/MenuPanel.js.map +1 -0
  41. package/dist/components/composer/ModelPicker.d.ts +40 -0
  42. package/dist/components/composer/ModelPicker.d.ts.map +1 -0
  43. package/dist/components/composer/ModelPicker.js +115 -0
  44. package/dist/components/composer/ModelPicker.js.map +1 -0
  45. package/dist/components/composer/PermissionPicker.d.ts +31 -0
  46. package/dist/components/composer/PermissionPicker.d.ts.map +1 -0
  47. package/dist/components/composer/PermissionPicker.js +43 -0
  48. package/dist/components/composer/PermissionPicker.js.map +1 -0
  49. package/dist/components/composer/SendStopButton.d.ts +71 -0
  50. package/dist/components/composer/SendStopButton.d.ts.map +1 -0
  51. package/dist/components/composer/SendStopButton.js +87 -0
  52. package/dist/components/composer/SendStopButton.js.map +1 -0
  53. package/dist/components/composer/SlashCommandMenu.d.ts +33 -0
  54. package/dist/components/composer/SlashCommandMenu.d.ts.map +1 -0
  55. package/dist/components/composer/SlashCommandMenu.js +43 -0
  56. package/dist/components/composer/SlashCommandMenu.js.map +1 -0
  57. package/dist/components/composer/composer-text.d.ts +10 -0
  58. package/dist/components/composer/composer-text.d.ts.map +1 -0
  59. package/dist/components/composer/composer-text.js +26 -0
  60. package/dist/components/composer/composer-text.js.map +1 -0
  61. package/dist/components/composer/composer-utils.d.ts +74 -0
  62. package/dist/components/composer/composer-utils.d.ts.map +1 -0
  63. package/dist/components/composer/composer-utils.js +133 -0
  64. package/dist/components/composer/composer-utils.js.map +1 -0
  65. package/dist/components/conversation/ConversationList.d.ts +88 -0
  66. package/dist/components/conversation/ConversationList.d.ts.map +1 -0
  67. package/dist/components/conversation/ConversationList.js +81 -0
  68. package/dist/components/conversation/ConversationList.js.map +1 -0
  69. package/dist/components/conversation/ConversationRow.d.ts +66 -0
  70. package/dist/components/conversation/ConversationRow.d.ts.map +1 -0
  71. package/dist/components/conversation/ConversationRow.js +65 -0
  72. package/dist/components/conversation/ConversationRow.js.map +1 -0
  73. package/dist/components/conversation/conversation-status.d.ts +21 -0
  74. package/dist/components/conversation/conversation-status.d.ts.map +1 -0
  75. package/dist/components/conversation/conversation-status.js +33 -0
  76. package/dist/components/conversation/conversation-status.js.map +1 -0
  77. package/dist/components/intervention/ApprovalDiff.d.ts +14 -0
  78. package/dist/components/intervention/ApprovalDiff.d.ts.map +1 -0
  79. package/dist/components/intervention/ApprovalDiff.js +25 -0
  80. package/dist/components/intervention/ApprovalDiff.js.map +1 -0
  81. package/dist/components/intervention/ApprovalPanel.d.ts +57 -0
  82. package/dist/components/intervention/ApprovalPanel.d.ts.map +1 -0
  83. package/dist/components/intervention/ApprovalPanel.js +111 -0
  84. package/dist/components/intervention/ApprovalPanel.js.map +1 -0
  85. package/dist/components/intervention/ErrorRecoveryNotice.d.ts +28 -0
  86. package/dist/components/intervention/ErrorRecoveryNotice.d.ts.map +1 -0
  87. package/dist/components/intervention/ErrorRecoveryNotice.js +30 -0
  88. package/dist/components/intervention/ErrorRecoveryNotice.js.map +1 -0
  89. package/dist/components/intervention/GrantList.d.ts +49 -0
  90. package/dist/components/intervention/GrantList.d.ts.map +1 -0
  91. package/dist/components/intervention/GrantList.js +58 -0
  92. package/dist/components/intervention/GrantList.js.map +1 -0
  93. package/dist/components/intervention/InterventionDock.d.ts +24 -0
  94. package/dist/components/intervention/InterventionDock.d.ts.map +1 -0
  95. package/dist/components/intervention/InterventionDock.js +18 -0
  96. package/dist/components/intervention/InterventionDock.js.map +1 -0
  97. package/dist/components/intervention/QuestionnaireCard.d.ts +60 -0
  98. package/dist/components/intervention/QuestionnaireCard.d.ts.map +1 -0
  99. package/dist/components/intervention/QuestionnaireCard.js +322 -0
  100. package/dist/components/intervention/QuestionnaireCard.js.map +1 -0
  101. package/dist/components/intervention/action-lock.d.ts +20 -0
  102. package/dist/components/intervention/action-lock.d.ts.map +1 -0
  103. package/dist/components/intervention/action-lock.js +65 -0
  104. package/dist/components/intervention/action-lock.js.map +1 -0
  105. package/dist/components/intervention/icons.d.ts +8 -0
  106. package/dist/components/intervention/icons.d.ts.map +1 -0
  107. package/dist/components/intervention/icons.js +11 -0
  108. package/dist/components/intervention/icons.js.map +1 -0
  109. package/dist/components/intervention/questionnaire-answers.d.ts +29 -0
  110. package/dist/components/intervention/questionnaire-answers.d.ts.map +1 -0
  111. package/dist/components/intervention/questionnaire-answers.js +81 -0
  112. package/dist/components/intervention/questionnaire-answers.js.map +1 -0
  113. package/dist/components/message/AgentMessage.d.ts +98 -0
  114. package/dist/components/message/AgentMessage.d.ts.map +1 -0
  115. package/dist/components/message/AgentMessage.js +94 -0
  116. package/dist/components/message/AgentMessage.js.map +1 -0
  117. package/dist/components/message/CitationChip.d.ts +34 -0
  118. package/dist/components/message/CitationChip.d.ts.map +1 -0
  119. package/dist/components/message/CitationChip.js +30 -0
  120. package/dist/components/message/CitationChip.js.map +1 -0
  121. package/dist/components/message/CodeBlock.d.ts +45 -0
  122. package/dist/components/message/CodeBlock.d.ts.map +1 -0
  123. package/dist/components/message/CodeBlock.js +21 -0
  124. package/dist/components/message/CodeBlock.js.map +1 -0
  125. package/dist/components/message/JumpToLatest.d.ts +27 -0
  126. package/dist/components/message/JumpToLatest.d.ts.map +1 -0
  127. package/dist/components/message/JumpToLatest.js +17 -0
  128. package/dist/components/message/JumpToLatest.js.map +1 -0
  129. package/dist/components/message/Markdown.d.ts +21 -0
  130. package/dist/components/message/Markdown.d.ts.map +1 -0
  131. package/dist/components/message/Markdown.js +21 -0
  132. package/dist/components/message/Markdown.js.map +1 -0
  133. package/dist/components/message/MessageActions.d.ts +63 -0
  134. package/dist/components/message/MessageActions.d.ts.map +1 -0
  135. package/dist/components/message/MessageActions.js +83 -0
  136. package/dist/components/message/MessageActions.js.map +1 -0
  137. package/dist/components/message/MessageList.d.ts +100 -0
  138. package/dist/components/message/MessageList.d.ts.map +1 -0
  139. package/dist/components/message/MessageList.js +266 -0
  140. package/dist/components/message/MessageList.js.map +1 -0
  141. package/dist/components/message/MessagePart.d.ts +44 -0
  142. package/dist/components/message/MessagePart.d.ts.map +1 -0
  143. package/dist/components/message/MessagePart.js +146 -0
  144. package/dist/components/message/MessagePart.js.map +1 -0
  145. package/dist/components/message/RunDetails.d.ts +26 -0
  146. package/dist/components/message/RunDetails.d.ts.map +1 -0
  147. package/dist/components/message/RunDetails.js +113 -0
  148. package/dist/components/message/RunDetails.js.map +1 -0
  149. package/dist/components/message/SkillUseList.d.ts +22 -0
  150. package/dist/components/message/SkillUseList.d.ts.map +1 -0
  151. package/dist/components/message/SkillUseList.js +20 -0
  152. package/dist/components/message/SkillUseList.js.map +1 -0
  153. package/dist/components/message/ThinkingBlock.d.ts +44 -0
  154. package/dist/components/message/ThinkingBlock.d.ts.map +1 -0
  155. package/dist/components/message/ThinkingBlock.js +34 -0
  156. package/dist/components/message/ThinkingBlock.js.map +1 -0
  157. package/dist/components/message/icons.d.ts +14 -0
  158. package/dist/components/message/icons.d.ts.map +1 -0
  159. package/dist/components/message/icons.js +16 -0
  160. package/dist/components/message/icons.js.map +1 -0
  161. package/dist/components/message/plain-text.d.ts +11 -0
  162. package/dist/components/message/plain-text.d.ts.map +1 -0
  163. package/dist/components/message/plain-text.js +58 -0
  164. package/dist/components/message/plain-text.js.map +1 -0
  165. package/dist/components/message/renderers.d.ts +30 -0
  166. package/dist/components/message/renderers.d.ts.map +1 -0
  167. package/dist/components/message/renderers.js +2 -0
  168. package/dist/components/message/renderers.js.map +1 -0
  169. package/dist/components/message/use-copy.d.ts +18 -0
  170. package/dist/components/message/use-copy.d.ts.map +1 -0
  171. package/dist/components/message/use-copy.js +65 -0
  172. package/dist/components/message/use-copy.js.map +1 -0
  173. package/dist/components/process/AgentProcess.d.ts +47 -0
  174. package/dist/components/process/AgentProcess.d.ts.map +1 -0
  175. package/dist/components/process/AgentProcess.js +78 -0
  176. package/dist/components/process/AgentProcess.js.map +1 -0
  177. package/dist/components/process/RunStatus.d.ts +60 -0
  178. package/dist/components/process/RunStatus.d.ts.map +1 -0
  179. package/dist/components/process/RunStatus.js +34 -0
  180. package/dist/components/process/RunStatus.js.map +1 -0
  181. package/dist/components/shell/AgentEmptyState.d.ts +35 -0
  182. package/dist/components/shell/AgentEmptyState.d.ts.map +1 -0
  183. package/dist/components/shell/AgentEmptyState.js +20 -0
  184. package/dist/components/shell/AgentEmptyState.js.map +1 -0
  185. package/dist/components/shell/AgentHeader.d.ts +84 -0
  186. package/dist/components/shell/AgentHeader.d.ts.map +1 -0
  187. package/dist/components/shell/AgentHeader.js +38 -0
  188. package/dist/components/shell/AgentHeader.js.map +1 -0
  189. package/dist/components/shell/AgentShell.d.ts +138 -0
  190. package/dist/components/shell/AgentShell.d.ts.map +1 -0
  191. package/dist/components/shell/AgentShell.js +206 -0
  192. package/dist/components/shell/AgentShell.js.map +1 -0
  193. package/dist/components/shell/AgentSidePane.d.ts +54 -0
  194. package/dist/components/shell/AgentSidePane.d.ts.map +1 -0
  195. package/dist/components/shell/AgentSidePane.js +26 -0
  196. package/dist/components/shell/AgentSidePane.js.map +1 -0
  197. package/dist/components/shell/ResizeHandle.d.ts +50 -0
  198. package/dist/components/shell/ResizeHandle.d.ts.map +1 -0
  199. package/dist/components/shell/ResizeHandle.js +84 -0
  200. package/dist/components/shell/ResizeHandle.js.map +1 -0
  201. package/dist/components/shell/use-controllable.d.ts +9 -0
  202. package/dist/components/shell/use-controllable.d.ts.map +1 -0
  203. package/dist/components/shell/use-controllable.js +26 -0
  204. package/dist/components/shell/use-controllable.js.map +1 -0
  205. package/dist/components/tools/ChunkPager.d.ts +48 -0
  206. package/dist/components/tools/ChunkPager.d.ts.map +1 -0
  207. package/dist/components/tools/ChunkPager.js +68 -0
  208. package/dist/components/tools/ChunkPager.js.map +1 -0
  209. package/dist/components/tools/CodeModeToolTree.d.ts +64 -0
  210. package/dist/components/tools/CodeModeToolTree.d.ts.map +1 -0
  211. package/dist/components/tools/CodeModeToolTree.js +97 -0
  212. package/dist/components/tools/CodeModeToolTree.js.map +1 -0
  213. package/dist/components/tools/DiffPreview.d.ts +83 -0
  214. package/dist/components/tools/DiffPreview.d.ts.map +1 -0
  215. package/dist/components/tools/DiffPreview.js +95 -0
  216. package/dist/components/tools/DiffPreview.js.map +1 -0
  217. package/dist/components/tools/ToolActivity.d.ts +63 -0
  218. package/dist/components/tools/ToolActivity.d.ts.map +1 -0
  219. package/dist/components/tools/ToolActivity.js +45 -0
  220. package/dist/components/tools/ToolActivity.js.map +1 -0
  221. package/dist/components/tools/ToolDetails.d.ts +106 -0
  222. package/dist/components/tools/ToolDetails.d.ts.map +1 -0
  223. package/dist/components/tools/ToolDetails.js +247 -0
  224. package/dist/components/tools/ToolDetails.js.map +1 -0
  225. package/dist/components/tools/ToolHistory.d.ts +48 -0
  226. package/dist/components/tools/ToolHistory.d.ts.map +1 -0
  227. package/dist/components/tools/ToolHistory.js +37 -0
  228. package/dist/components/tools/ToolHistory.js.map +1 -0
  229. package/dist/components/tools/ToolOutput.d.ts +61 -0
  230. package/dist/components/tools/ToolOutput.d.ts.map +1 -0
  231. package/dist/components/tools/ToolOutput.js +45 -0
  232. package/dist/components/tools/ToolOutput.js.map +1 -0
  233. package/dist/components/tools/ToolRecord.d.ts +54 -0
  234. package/dist/components/tools/ToolRecord.d.ts.map +1 -0
  235. package/dist/components/tools/ToolRecord.js +78 -0
  236. package/dist/components/tools/ToolRecord.js.map +1 -0
  237. package/dist/components/tools/shared.d.ts +93 -0
  238. package/dist/components/tools/shared.d.ts.map +1 -0
  239. package/dist/components/tools/shared.js +160 -0
  240. package/dist/components/tools/shared.js.map +1 -0
  241. package/dist/components/workspace/ActivityLedger.d.ts +44 -0
  242. package/dist/components/workspace/ActivityLedger.d.ts.map +1 -0
  243. package/dist/components/workspace/ActivityLedger.js +63 -0
  244. package/dist/components/workspace/ActivityLedger.js.map +1 -0
  245. package/dist/components/workspace/CompactionNotice.d.ts +63 -0
  246. package/dist/components/workspace/CompactionNotice.d.ts.map +1 -0
  247. package/dist/components/workspace/CompactionNotice.js +36 -0
  248. package/dist/components/workspace/CompactionNotice.js.map +1 -0
  249. package/dist/components/workspace/ContextUsage.d.ts +44 -0
  250. package/dist/components/workspace/ContextUsage.d.ts.map +1 -0
  251. package/dist/components/workspace/ContextUsage.js +106 -0
  252. package/dist/components/workspace/ContextUsage.js.map +1 -0
  253. package/dist/components/workspace/PersistentTerminal.d.ts +86 -0
  254. package/dist/components/workspace/PersistentTerminal.d.ts.map +1 -0
  255. package/dist/components/workspace/PersistentTerminal.js +155 -0
  256. package/dist/components/workspace/PersistentTerminal.js.map +1 -0
  257. package/dist/components/workspace/PinnedSummary.d.ts +43 -0
  258. package/dist/components/workspace/PinnedSummary.d.ts.map +1 -0
  259. package/dist/components/workspace/PinnedSummary.js +33 -0
  260. package/dist/components/workspace/PinnedSummary.js.map +1 -0
  261. package/dist/components/workspace/RunSummary.d.ts +35 -0
  262. package/dist/components/workspace/RunSummary.d.ts.map +1 -0
  263. package/dist/components/workspace/RunSummary.js +46 -0
  264. package/dist/components/workspace/RunSummary.js.map +1 -0
  265. package/dist/components/workspace/SubAgentCard.d.ts +60 -0
  266. package/dist/components/workspace/SubAgentCard.d.ts.map +1 -0
  267. package/dist/components/workspace/SubAgentCard.js +73 -0
  268. package/dist/components/workspace/SubAgentCard.js.map +1 -0
  269. package/dist/components/workspace/TerminalRow.d.ts +51 -0
  270. package/dist/components/workspace/TerminalRow.d.ts.map +1 -0
  271. package/dist/components/workspace/TerminalRow.js +62 -0
  272. package/dist/components/workspace/TerminalRow.js.map +1 -0
  273. package/dist/components/workspace/shared.d.ts +22 -0
  274. package/dist/components/workspace/shared.d.ts.map +1 -0
  275. package/dist/components/workspace/shared.js +36 -0
  276. package/dist/components/workspace/shared.js.map +1 -0
  277. package/dist/index.d.ts +130 -0
  278. package/dist/index.d.ts.map +1 -0
  279. package/dist/index.js +76 -0
  280. package/dist/index.js.map +1 -0
  281. package/dist/motion/agent-motion.d.ts +62 -0
  282. package/dist/motion/agent-motion.d.ts.map +1 -0
  283. package/dist/motion/agent-motion.js +61 -0
  284. package/dist/motion/agent-motion.js.map +1 -0
  285. package/dist/primitives/AgentSpark.d.ts +17 -0
  286. package/dist/primitives/AgentSpark.d.ts.map +1 -0
  287. package/dist/primitives/AgentSpark.js +11 -0
  288. package/dist/primitives/AgentSpark.js.map +1 -0
  289. package/dist/primitives/AgentStatus.d.ts +32 -0
  290. package/dist/primitives/AgentStatus.d.ts.map +1 -0
  291. package/dist/primitives/AgentStatus.js +13 -0
  292. package/dist/primitives/AgentStatus.js.map +1 -0
  293. package/dist/primitives/StatusGlyph.d.ts +10 -0
  294. package/dist/primitives/StatusGlyph.d.ts.map +1 -0
  295. package/dist/primitives/StatusGlyph.js +31 -0
  296. package/dist/primitives/StatusGlyph.js.map +1 -0
  297. package/dist/primitives/icons.d.ts +7 -0
  298. package/dist/primitives/icons.d.ts.map +1 -0
  299. package/dist/primitives/icons.js +55 -0
  300. package/dist/primitives/icons.js.map +1 -0
  301. package/dist/provider/AgentMessages.d.ts +51 -0
  302. package/dist/provider/AgentMessages.d.ts.map +1 -0
  303. package/dist/provider/AgentMessages.js +77 -0
  304. package/dist/provider/AgentMessages.js.map +1 -0
  305. package/dist/provider/messages/composer.d.ts +90 -0
  306. package/dist/provider/messages/composer.d.ts.map +1 -0
  307. package/dist/provider/messages/composer.js +155 -0
  308. package/dist/provider/messages/composer.js.map +1 -0
  309. package/dist/provider/messages/intervention.d.ts +135 -0
  310. package/dist/provider/messages/intervention.d.ts.map +1 -0
  311. package/dist/provider/messages/intervention.js +321 -0
  312. package/dist/provider/messages/intervention.js.map +1 -0
  313. package/dist/provider/messages/message.d.ts +118 -0
  314. package/dist/provider/messages/message.d.ts.map +1 -0
  315. package/dist/provider/messages/message.js +224 -0
  316. package/dist/provider/messages/message.js.map +1 -0
  317. package/dist/provider/messages/shell.d.ts +70 -0
  318. package/dist/provider/messages/shell.d.ts.map +1 -0
  319. package/dist/provider/messages/shell.js +109 -0
  320. package/dist/provider/messages/shell.js.map +1 -0
  321. package/dist/provider/messages/status.d.ts +20 -0
  322. package/dist/provider/messages/status.d.ts.map +1 -0
  323. package/dist/provider/messages/status.js +195 -0
  324. package/dist/provider/messages/status.js.map +1 -0
  325. package/dist/provider/messages/tools.d.ts +210 -0
  326. package/dist/provider/messages/tools.d.ts.map +1 -0
  327. package/dist/provider/messages/tools.js +482 -0
  328. package/dist/provider/messages/tools.js.map +1 -0
  329. package/dist/provider/messages/workspace.d.ts +176 -0
  330. package/dist/provider/messages/workspace.d.ts.map +1 -0
  331. package/dist/provider/messages/workspace.js +325 -0
  332. package/dist/provider/messages/workspace.js.map +1 -0
  333. package/dist/styles/artifact.css +564 -0
  334. package/dist/styles/base.css +220 -0
  335. package/dist/styles/composer.css +1001 -0
  336. package/dist/styles/conversation.css +275 -0
  337. package/dist/styles/intervention.css +929 -0
  338. package/dist/styles/message.css +917 -0
  339. package/dist/styles/process.css +207 -0
  340. package/dist/styles/shell.css +441 -0
  341. package/dist/styles/tools.css +929 -0
  342. package/dist/styles/workspace.css +1294 -0
  343. package/dist/utils/cx.d.ts +3 -0
  344. package/dist/utils/cx.d.ts.map +1 -0
  345. package/dist/utils/cx.js +5 -0
  346. package/dist/utils/cx.js.map +1 -0
  347. package/package.json +64 -3
@@ -0,0 +1,51 @@
1
+ import * as React from 'react';
2
+ import type { AgentActionHandler, TerminalView } from '@wzrhine/agent-core';
3
+ import type { WorkspaceMessagesProp } from './shared.js';
4
+ import type { TerminalGroupKey } from '../../provider/messages/workspace.js';
5
+ export type TerminalRowProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {
6
+ terminal: TerminalView;
7
+ /** Opens the terminal (row button). Without it the row is plain text. */
8
+ onOpen?: (terminal: TerminalView) => void;
9
+ /** Stop action; a separate button, drawn only when the terminal is stoppable. */
10
+ onStop?: AgentActionHandler<[terminal: TerminalView]>;
11
+ /** Marks the open terminal (`aria-current`). */
12
+ current?: boolean;
13
+ messages?: WorkspaceMessagesProp;
14
+ };
15
+ /**
16
+ * TerminalRow (atlas 23): sidebar summary of one terminal. Opening and stopping are two separate
17
+ * buttons (never nested). The long cwd is truncated visually, the full path is in the title and
18
+ * in the open button's description. Read-only rows say so in text, not only by missing controls.
19
+ * Motion: none beyond the colour transitions of the buttons.
20
+ */
21
+ export declare const TerminalRow: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & {
22
+ terminal: TerminalView;
23
+ /** Opens the terminal (row button). Without it the row is plain text. */
24
+ onOpen?: (terminal: TerminalView) => void;
25
+ /** Stop action; a separate button, drawn only when the terminal is stoppable. */
26
+ onStop?: AgentActionHandler<[terminal: TerminalView]>;
27
+ /** Marks the open terminal (`aria-current`). */
28
+ current?: boolean;
29
+ messages?: WorkspaceMessagesProp;
30
+ } & React.RefAttributes<HTMLDivElement>>;
31
+ /** Which TerminalList group a terminal belongs to. Inherited first, then status. */
32
+ export declare function terminalGroup(terminal: TerminalView): TerminalGroupKey;
33
+ export type TerminalListProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {
34
+ terminals: TerminalView[];
35
+ currentId?: string;
36
+ onOpen?: TerminalRowProps['onOpen'];
37
+ onStop?: TerminalRowProps['onStop'];
38
+ /** `false` hides the 「加载更多终端」 button even when `onLoadMore` is given. */
39
+ hasMore?: boolean;
40
+ onLoadMore?: () => void;
41
+ /** Groups collapsed on first render (uncontrolled per group). Default: inherited. */
42
+ defaultCollapsed?: TerminalGroupKey[];
43
+ messages?: WorkspaceMessagesProp;
44
+ };
45
+ /**
46
+ * Terminals grouped into 未关闭 / 状态待确认 / 已结束 / 继承记录, each a Collapsible with a count.
47
+ * Within a group the given order is kept: a status flicker moves a row between groups at most,
48
+ * never reshuffles a group. Empty groups are not drawn.
49
+ */
50
+ export declare function TerminalList({ terminals, currentId, onOpen, onStop, hasMore, onLoadMore, defaultCollapsed, messages: override, className, ...rest }: TerminalListProps): React.JSX.Element;
51
+ //# sourceMappingURL=TerminalRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TerminalRow.d.ts","sourceRoot":"","sources":["../../../src/components/workspace/TerminalRow.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAO5E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG;IACtF,QAAQ,EAAE,YAAY,CAAC;IACvB,yEAAyE;IACzE,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C,iFAAiF;IACjF,MAAM,CAAC,EAAE,kBAAkB,CAAC,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IACtD,gDAAgD;IAChD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,qBAAqB,CAAC;CAClC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW;cAhBZ,YAAY;IACtB,yEAAyE;aAChE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI;IACzC,iFAAiF;aACxE,kBAAkB,CAAC,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACrD,gDAAgD;cACtC,OAAO;eACN,qBAAqB;wCAgFhC,CAAC;AAEH,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,QAAQ,EAAE,YAAY,GAAG,gBAAgB,CAKtE;AAID,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG;IACvF,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACpC,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,qFAAqF;IACrF,gBAAgB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACtC,QAAQ,CAAC,EAAE,qBAAqB,CAAC;CAClC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,SAAS,EACT,MAAM,EACN,MAAM,EACN,OAAO,EACP,UAAU,EACV,gBAAgC,EAChC,QAAQ,EAAE,QAAQ,EAClB,SAAS,EACT,GAAG,IAAI,EACR,EAAE,iBAAiB,qBA8CnB"}
@@ -0,0 +1,62 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import { Button, Collapsible, IconButton } from '@wzrhine/react';
5
+ import { terminalStatusMeta } from '@wzrhine/agent-core';
6
+ import { useAgentMessages } from '../../provider/AgentMessages.js';
7
+ import { AgentStatus, statusProps } from '../../primitives/AgentStatus.js';
8
+ import { AgentIcon } from '../../primitives/icons.js';
9
+ import { cx } from '../../utils/cx.js';
10
+ import { isTerminalReadOnly } from './PersistentTerminal.js';
11
+ import { useWorkspaceMessages } from './shared.js';
12
+ /**
13
+ * TerminalRow (atlas 23): sidebar summary of one terminal. Opening and stopping are two separate
14
+ * buttons (never nested). The long cwd is truncated visually, the full path is in the title and
15
+ * in the open button's description. Read-only rows say so in text, not only by missing controls.
16
+ * Motion: none beyond the colour transitions of the buttons.
17
+ */
18
+ export const TerminalRow = React.forwardRef(function TerminalRow({ terminal, onOpen, onStop, current, messages: override, className, ...rest }, ref) {
19
+ const m = useWorkspaceMessages(override);
20
+ const status = useAgentMessages().status;
21
+ const id = React.useId();
22
+ const descId = `${id}-desc`;
23
+ const readOnly = isTerminalReadOnly(terminal);
24
+ const meta = terminalStatusMeta[terminal.status];
25
+ const canStop = Boolean(onStop) && Boolean(terminal.stoppable) && !readOnly && !meta.settled && terminal.status !== 'stop-pending' && terminal.status !== 'closing';
26
+ const name = (_jsxs(_Fragment, { children: [_jsx("span", { className: "rl-agent-terminal-row__name", children: terminal.name }), terminal.backend && _jsx("span", { className: "rl-agent-terminal-row__backend", children: m.terminalBackend[terminal.backend] })] }));
27
+ const description = (_jsxs("span", { id: descId, className: "rl-agent-terminal-row__detail", children: [terminal.lastCommand && (_jsxs("span", { className: "rl-agent-terminal-row__command", title: terminal.lastCommand, children: [_jsxs("span", { className: "rl-agent-sr", children: [m.terminalLastCommand, " "] }), terminal.lastCommand] })), terminal.cwd && (_jsxs("span", { className: "rl-agent-terminal-row__cwd", title: terminal.cwd, children: [_jsxs("span", { className: "rl-agent-sr", children: [m.terminalCwd, " "] }), terminal.cwd] })), _jsxs("span", { className: "rl-agent-terminal-row__meta", children: [terminal.calls !== undefined && _jsx("span", { children: m.terminalCalls(terminal.calls) }), readOnly && _jsx("span", { className: "rl-agent-terminal-row__readonly", children: m.terminalReadOnlyDescription })] })] }));
28
+ return (_jsxs("div", { ...rest, ref: ref, className: cx('rl-agent-terminal-row', className), "data-status": terminal.status, "data-readonly": readOnly || undefined, "data-current": current || undefined, children: [_jsxs("div", { className: "rl-agent-terminal-row__main", children: [onOpen ? (_jsx("button", { type: "button", className: "rl-agent-terminal-row__open", "aria-label": m.terminalOpen(terminal.name), "aria-describedby": descId, "aria-current": current ? 'true' : undefined, onClick: () => onOpen(terminal), children: name })) : (_jsx("span", { className: "rl-agent-terminal-row__title", children: name })), _jsx(AgentStatus, { className: "rl-agent-terminal-row__status", ...statusProps(meta, status.terminal[terminal.status]) }), canStop && (_jsx(IconButton, { size: "sm", variant: "ghost", icon: _jsx(AgentIcon, { name: "stop" }), label: m.terminalStop(terminal.name), onClick: () => void onStop(terminal) }))] }), description] }));
29
+ });
30
+ /** Which TerminalList group a terminal belongs to. Inherited first, then status. */
31
+ export function terminalGroup(terminal) {
32
+ if (isTerminalReadOnly(terminal))
33
+ return 'inherited';
34
+ if (terminal.status === 'unknown')
35
+ return 'unknown';
36
+ if (terminal.status === 'ended' || terminal.status === 'failed')
37
+ return 'ended';
38
+ return 'open';
39
+ }
40
+ const GROUP_ORDER = ['open', 'unknown', 'ended', 'inherited'];
41
+ /**
42
+ * Terminals grouped into 未关闭 / 状态待确认 / 已结束 / 继承记录, each a Collapsible with a count.
43
+ * Within a group the given order is kept: a status flicker moves a row between groups at most,
44
+ * never reshuffles a group. Empty groups are not drawn.
45
+ */
46
+ export function TerminalList({ terminals, currentId, onOpen, onStop, hasMore, onLoadMore, defaultCollapsed = ['inherited'], messages: override, className, ...rest }) {
47
+ const m = useWorkspaceMessages(override);
48
+ const groups = React.useMemo(() => {
49
+ const map = new Map();
50
+ const seen = new Set();
51
+ for (const terminal of terminals) {
52
+ if (seen.has(terminal.id))
53
+ continue;
54
+ seen.add(terminal.id);
55
+ const key = terminalGroup(terminal);
56
+ map.set(key, [...(map.get(key) ?? []), terminal]);
57
+ }
58
+ return GROUP_ORDER.filter((key) => map.has(key)).map((key) => ({ key, items: map.get(key) }));
59
+ }, [terminals]);
60
+ return (_jsxs("div", { ...rest, className: cx('rl-agent-terminal-list', className), role: "group", "aria-label": m.terminalList, children: [groups.length === 0 && _jsx("p", { className: "rl-agent-terminal-list__empty", children: m.terminalEmpty }), groups.map(({ key, items }) => (_jsx(Collapsible, { className: "rl-agent-terminal-list__group", "data-group": key, defaultOpen: !defaultCollapsed.includes(key), trigger: _jsxs(_Fragment, { children: [_jsx("span", { className: "rl-agent-terminal-list__label", children: m.terminalGroup[key] }), _jsx("span", { className: "rl-agent-terminal-list__count", children: items.length })] }), children: _jsx("ul", { className: "rl-agent-terminal-list__items", children: items.map((terminal) => (_jsx("li", { children: _jsx(TerminalRow, { terminal: terminal, onOpen: onOpen, onStop: onStop, current: terminal.id === currentId, messages: override }) }, terminal.id))) }) }, key))), hasMore !== false && onLoadMore && (_jsx(Button, { size: "sm", variant: "ghost", className: "rl-agent-terminal-list__more", onClick: onLoadMore, children: m.terminalLoadMore }))] }));
61
+ }
62
+ //# sourceMappingURL=TerminalRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TerminalRow.js","sourceRoot":"","sources":["../../../src/components/workspace/TerminalRow.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAenD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAmC,SAAS,WAAW,CAChG,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAC7E,GAAG;IAEH,MAAM,CAAC,GAAG,oBAAoB,CAAC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AQ,CAAC,EAAE,KAAK,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAI,IADpH,QAAQ,CAAC,EAAE,CAEf,CACN,CAAC,GACC,IAjBA,GAAG,CAkBI,CACf,CAAC,EACD,OAAO,KAAK,KAAK,IAAI,UAAU,IAAI,CAClC,KAAC,MAAM,IAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,8BAA8B,EAAC,OAAO,EAAE,UAAU,YAC3F,CAAC,CAAC,gBAAgB,GACZ,CACV,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ import type { Completeness } from '@wzrhine/agent-core';
3
+ import type { AgentWorkspaceMessages } from '../../provider/messages/workspace.js';
4
+ /**
5
+ * Small helpers shared by the workspace and artifact families. Not exported from the package
6
+ * entry: every component re-exposes what it needs through its own props.
7
+ */
8
+ /** Per-instance copy override (prop) merged over the nearest `AgentMessagesProvider`. */
9
+ export type WorkspaceMessagesProp = Partial<AgentWorkspaceMessages>;
10
+ export declare function useWorkspaceMessages(override?: WorkspaceMessagesProp): AgentWorkspaceMessages;
11
+ export type HeadingLevel = 2 | 3 | 4 | 5 | 6;
12
+ export declare function Heading({ level, ...rest }: React.HTMLAttributes<HTMLHeadingElement> & {
13
+ level: HeadingLevel;
14
+ }): React.JSX.Element;
15
+ /**
16
+ * Ids present on the first render are "history" and must not play an entrance; ids that appear
17
+ * later are new. The decision per id is frozen by `AgentEntrance` at its mount.
18
+ */
19
+ export declare function useIsNewId(ids: readonly string[]): (id: string) => boolean;
20
+ /** Label for a non-exact number, or `undefined` for exact values. */
21
+ export declare function completenessTag(completeness: Completeness, labels: Record<Completeness, string>): string | undefined;
22
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/components/workspace/shared.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAEnF;;;GAGG;AAEH,yFAAyF;AACzF,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAEpE,wBAAgB,oBAAoB,CAAC,QAAQ,CAAC,EAAE,qBAAqB,GAAG,sBAAsB,CAQ7F;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAE7C,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,qBAG7G;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAK1E;AAED,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS,CAEpH"}
@@ -0,0 +1,36 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import { useAgentMessages } from '../../provider/AgentMessages.js';
5
+ export function useWorkspaceMessages(override) {
6
+ const base = useAgentMessages().workspace;
7
+ return React.useMemo(() => {
8
+ if (!override)
9
+ return base;
10
+ const merged = { ...base };
11
+ for (const [key, value] of Object.entries(override))
12
+ if (value !== undefined)
13
+ merged[key] = value;
14
+ return merged;
15
+ }, [base, override]);
16
+ }
17
+ export function Heading({ level, ...rest }) {
18
+ const Tag = `h${level}`;
19
+ return _jsx(Tag, { ...rest });
20
+ }
21
+ /**
22
+ * Ids present on the first render are "history" and must not play an entrance; ids that appear
23
+ * later are new. The decision per id is frozen by `AgentEntrance` at its mount.
24
+ */
25
+ export function useIsNewId(ids) {
26
+ const initial = React.useRef(null);
27
+ if (initial.current === null)
28
+ initial.current = new Set(ids);
29
+ const seen = initial.current;
30
+ return React.useCallback((id) => !seen.has(id), [seen]);
31
+ }
32
+ /** Label for a non-exact number, or `undefined` for exact values. */
33
+ export function completenessTag(completeness, labels) {
34
+ return completeness === 'exact' ? undefined : labels[completeness];
35
+ }
36
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/components/workspace/shared.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAWnE,MAAM,UAAU,oBAAoB,CAAC,QAAgC;IACnE,MAAM,IAAI,GAAG,gBAAgB,EAAE,CAAC,SAAS,CAAC;IAC1C,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACxB,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC3B,MAAM,MAAM,GAAG,EAAE,GAAG,IAAI,EAA6B,CAAC;QACtD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;YAAE,IAAI,KAAK,KAAK,SAAS;gBAAE,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAClG,OAAO,MAA2C,CAAC;IACrD,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;AACvB,CAAC;AAID,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAsE;IAC5G,MAAM,GAAG,GAAG,IAAI,KAAK,EAAU,CAAC;IAChC,OAAO,KAAC,GAAG,OAAK,IAAI,GAAI,CAAC;AAC3B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,GAAsB;IAC/C,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAqB,IAAI,CAAC,CAAC;IACvD,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI;QAAE,OAAO,CAAC,OAAO,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC;IAC7B,OAAO,KAAK,CAAC,WAAW,CAAC,CAAC,EAAU,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,eAAe,CAAC,YAA0B,EAAE,MAAoC;IAC9F,OAAO,YAAY,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AACrE,CAAC"}
@@ -0,0 +1,130 @@
1
+ export { AgentMessagesProvider, agentEnUS, agentZhCN, mergeAgentMessages, useAgentFormat, useAgentMessages } from './provider/AgentMessages.js';
2
+ export type { AgentFormat, AgentMessages, AgentMessagesOverrides, AgentMessagesProviderProps } from './provider/AgentMessages.js';
3
+ export { AgentIcon } from './primitives/icons.js';
4
+ export type { AgentIconName, AgentIconProps } from './primitives/icons.js';
5
+ export { StatusGlyph } from './primitives/StatusGlyph.js';
6
+ export type { StatusGlyphProps } from './primitives/StatusGlyph.js';
7
+ export { AgentStatus, statusProps } from './primitives/AgentStatus.js';
8
+ export type { AgentStatusProps } from './primitives/AgentStatus.js';
9
+ export { AgentSpark } from './primitives/AgentSpark.js';
10
+ export type { AgentSparkProps } from './primitives/AgentSpark.js';
11
+ export { AGENT_STAGGER_CAP_MS, AGENT_STAGGER_MS, AgentEntrance, agentStaggerDelay, loopAttributes, useAgentLoop, useSwapTransition } from './motion/agent-motion.js';
12
+ export type { AgentEntranceKind, AgentEntranceProps } from './motion/agent-motion.js';
13
+ export * from '@wzrhine/agent-core';
14
+ export { AgentShell, useAgentContextPresentation, useAgentShell } from './components/shell/AgentShell.js';
15
+ export type { AgentContextPresentation, AgentShellContextValue, AgentShellLayout, AgentShellOpenReason, AgentShellProps } from './components/shell/AgentShell.js';
16
+ export { ResizeHandle } from './components/shell/ResizeHandle.js';
17
+ export type { ResizeHandleProps } from './components/shell/ResizeHandle.js';
18
+ export { AgentHeader } from './components/shell/AgentHeader.js';
19
+ export type { AgentHeaderBadge, AgentHeaderProps } from './components/shell/AgentHeader.js';
20
+ export { AgentSidePane } from './components/shell/AgentSidePane.js';
21
+ export type { AgentSidePaneProps, AgentSidePaneSection } from './components/shell/AgentSidePane.js';
22
+ export { AgentEmptyState, AgentWorkspaceEmpty } from './components/shell/AgentEmptyState.js';
23
+ export type { AgentEmptyStateProps } from './components/shell/AgentEmptyState.js';
24
+ export { ConversationList } from './components/conversation/ConversationList.js';
25
+ export type { ConversationListProps } from './components/conversation/ConversationList.js';
26
+ export { ConversationRow } from './components/conversation/ConversationRow.js';
27
+ export type { ConversationRowProps } from './components/conversation/ConversationRow.js';
28
+ export type { AgentShellMessages } from './provider/messages/shell.js';
29
+ export { FOLLOW_THRESHOLD_PX, MessageList } from './components/message/MessageList.js';
30
+ export type { MessageListHandle, MessageListProps } from './components/message/MessageList.js';
31
+ export { JumpToLatest } from './components/message/JumpToLatest.js';
32
+ export type { JumpToLatestProps } from './components/message/JumpToLatest.js';
33
+ export { AgentMessage, messagePlainText } from './components/message/AgentMessage.js';
34
+ export type { AgentMessagePartHandlers, AgentMessageProps } from './components/message/AgentMessage.js';
35
+ export { ArtifactFallback, MessageErrorNotice, MessagePart, ToolFallback, UnsupportedPart } from './components/message/MessagePart.js';
36
+ export type { MessagePartProps } from './components/message/MessagePart.js';
37
+ export type { ArtifactRenderer, CodePart, CustomPart, MarkdownRenderContext, MessagePartRenderers, ToolRenderer } from './components/message/renderers.js';
38
+ export { CodeBlock } from './components/message/CodeBlock.js';
39
+ export type { CodeBlockProps } from './components/message/CodeBlock.js';
40
+ export { ThinkingBlock } from './components/message/ThinkingBlock.js';
41
+ export type { ThinkingBlockProps } from './components/message/ThinkingBlock.js';
42
+ export { CitationChip } from './components/message/CitationChip.js';
43
+ export type { CitationChipProps } from './components/message/CitationChip.js';
44
+ export { MessageActions } from './components/message/MessageActions.js';
45
+ export type { MessageActionCapabilities, MessageActionKey, MessageActionsProps, MessageFeedback } from './components/message/MessageActions.js';
46
+ export { RunDetails, hasRunDetails } from './components/message/RunDetails.js';
47
+ export type { RunDetailsProps } from './components/message/RunDetails.js';
48
+ export { DIGEST_LENGTH, SkillUseList } from './components/message/SkillUseList.js';
49
+ export type { SkillUseListProps } from './components/message/SkillUseList.js';
50
+ export { COPY_FEEDBACK_MS } from './components/message/use-copy.js';
51
+ export type { CopyHandler, CopyState } from './components/message/use-copy.js';
52
+ export { AgentProcess } from './components/process/AgentProcess.js';
53
+ export type { AgentProcessProps } from './components/process/AgentProcess.js';
54
+ export { RunStatus } from './components/process/RunStatus.js';
55
+ export type { RunStatusProps } from './components/process/RunStatus.js';
56
+ export { ToolRecord } from './components/tools/ToolRecord.js';
57
+ export type { ToolRecordProps } from './components/tools/ToolRecord.js';
58
+ export { ToolActivity, orderTools } from './components/tools/ToolActivity.js';
59
+ export type { ToolActivityProps, ToolRowSharedProps } from './components/tools/ToolActivity.js';
60
+ export { CodeModeToolTree, ScriptDisclosure, childOutcome } from './components/tools/CodeModeToolTree.js';
61
+ export type { CodeModeToolTreeProps } from './components/tools/CodeModeToolTree.js';
62
+ export { ToolOutput } from './components/tools/ToolOutput.js';
63
+ export type { ToolOutputProps } from './components/tools/ToolOutput.js';
64
+ export { ChunkPager } from './components/tools/ChunkPager.js';
65
+ export type { ChunkPagerActions, ChunkPagerProps } from './components/tools/ChunkPager.js';
66
+ export { ToolHistory, useStableOrder } from './components/tools/ToolHistory.js';
67
+ export type { ToolHistoryProps } from './components/tools/ToolHistory.js';
68
+ export { DiffPreview, DiffStats, DiffStatusPill, MultiFileDiff, resolveDiff } from './components/tools/DiffPreview.js';
69
+ export type { DiffPreviewProps, MultiFileDiffProps } from './components/tools/DiffPreview.js';
70
+ export { ApplyPatchDetail, EditFileDetail, FileReadDetail, FileWriteDetail, GenericToolDetail, MCPExecuteDetail, ManageFilesDetail, NativeModelDetail, QuestionToolDetail, RunCommandDetail, SubagentToolDetail, ToolDetail } from './components/tools/ToolDetails.js';
71
+ export type { ApplyPatchDetailProps, EditFileDetailProps, FileReadDetailProps, FileWriteDetailProps, GenericToolDetailProps, MCPExecuteDetailProps, ManageFilesDetailProps, NativeModelDetailProps, QuestionToolDetailProps, RunCommandDetailProps, SubagentToolDetailProps, ToolDetailActions, ToolDetailProps } from './components/tools/ToolDetails.js';
72
+ export { ToolCategoryChip, ToolStatusPill } from './components/tools/shared.js';
73
+ export { Composer } from './components/composer/Composer.js';
74
+ export type { ComposerProps } from './components/composer/Composer.js';
75
+ export { ComposerInput } from './components/composer/ComposerInput.js';
76
+ export type { ComposerInputHandle, ComposerInputProps, ComposerSelection, ComposerTokenKind } from './components/composer/ComposerInput.js';
77
+ export { MentionMenu } from './components/composer/MentionMenu.js';
78
+ export type { MentionMenuProps } from './components/composer/MentionMenu.js';
79
+ export { SlashCommandMenu } from './components/composer/SlashCommandMenu.js';
80
+ export type { SlashCommandMenuProps } from './components/composer/SlashCommandMenu.js';
81
+ export { AttachmentList } from './components/composer/AttachmentList.js';
82
+ export type { AttachmentListProps } from './components/composer/AttachmentList.js';
83
+ export { SendStopButton } from './components/composer/SendStopButton.js';
84
+ export type { SendStopButtonProps } from './components/composer/SendStopButton.js';
85
+ export { ModelPicker } from './components/composer/ModelPicker.js';
86
+ export type { ModelPickerProps } from './components/composer/ModelPicker.js';
87
+ export { PermissionPicker } from './components/composer/PermissionPicker.js';
88
+ export type { PermissionPickerProps } from './components/composer/PermissionPicker.js';
89
+ export { ComposerNotice } from './components/composer/ComposerNotice.js';
90
+ export type { ComposerNoticeAction, ComposerNoticeProps, ComposerNoticeTone } from './components/composer/ComposerNotice.js';
91
+ export { defaultMentionTokenName, drillQuery, filterCommandOptions, filterMentionOptions, moveActiveIndex, orderCommandOptions, removeTokens, resolveSendStop, splitMentionQuery, } from './components/composer/composer-utils.js';
92
+ export type { SendStopInput, SendStopResolved, SendStopState } from './components/composer/composer-utils.js';
93
+ export type { AgentComposerMessages } from './provider/messages/composer.js';
94
+ export { ApprovalPanel } from './components/intervention/ApprovalPanel.js';
95
+ export type { ApprovalPanelProps } from './components/intervention/ApprovalPanel.js';
96
+ export { QuestionnaireCard } from './components/intervention/QuestionnaireCard.js';
97
+ export type { QuestionnaireCardHandle, QuestionnaireCardProps } from './components/intervention/QuestionnaireCard.js';
98
+ export { answerState, answerText, isOverLimit, isQuestionOptional, normalizeAnswers } from './components/intervention/questionnaire-answers.js';
99
+ export type { QuestionAnswerState } from './components/intervention/questionnaire-answers.js';
100
+ export { ErrorRecoveryNotice } from './components/intervention/ErrorRecoveryNotice.js';
101
+ export type { ErrorRecoveryNoticeProps } from './components/intervention/ErrorRecoveryNotice.js';
102
+ export { InterventionDock } from './components/intervention/InterventionDock.js';
103
+ export type { InterventionDockProps } from './components/intervention/InterventionDock.js';
104
+ export { GrantList } from './components/intervention/GrantList.js';
105
+ export type { GrantListProps } from './components/intervention/GrantList.js';
106
+ export type { AgentInterventionMessages } from './provider/messages/intervention.js';
107
+ export { PersistentTerminal, TerminalTabs, isTerminalReadOnly } from './components/workspace/PersistentTerminal.js';
108
+ export type { PersistentTerminalProps, TerminalTabsProps } from './components/workspace/PersistentTerminal.js';
109
+ export { TerminalList, TerminalRow, terminalGroup } from './components/workspace/TerminalRow.js';
110
+ export type { TerminalListProps, TerminalRowProps } from './components/workspace/TerminalRow.js';
111
+ export { SubAgentCard, SubAgentList, subagentSparkPhase } from './components/workspace/SubAgentCard.js';
112
+ export type { SubAgentCardProps, SubAgentListProps } from './components/workspace/SubAgentCard.js';
113
+ export { ContextUsage } from './components/workspace/ContextUsage.js';
114
+ export type { ContextUsageProps, ContextUsageVariant } from './components/workspace/ContextUsage.js';
115
+ export { PinnedSummary } from './components/workspace/PinnedSummary.js';
116
+ export type { PinnedSummaryProps } from './components/workspace/PinnedSummary.js';
117
+ export { ActivityLedger, orderLedger } from './components/workspace/ActivityLedger.js';
118
+ export type { ActivityLedgerProps } from './components/workspace/ActivityLedger.js';
119
+ export { RunSummary } from './components/workspace/RunSummary.js';
120
+ export type { RunSummaryProps } from './components/workspace/RunSummary.js';
121
+ export { CompactionNotice } from './components/workspace/CompactionNotice.js';
122
+ export type { CompactionNoticeProps, CompactionPhase, CompactionStatus } from './components/workspace/CompactionNotice.js';
123
+ export { ArtifactCard, ArtifactList, artifactKindIcon } from './components/artifact/ArtifactCard.js';
124
+ export type { ArtifactCardProps, ArtifactListProps } from './components/artifact/ArtifactCard.js';
125
+ export { FilePreview, pathCrumbs } from './components/artifact/FilePreview.js';
126
+ export type { FileOpenTarget, FilePreviewProps, FilePreviewZoom } from './components/artifact/FilePreview.js';
127
+ export { FilePreviewTabs } from './components/artifact/FilePreviewTabs.js';
128
+ export type { FilePreviewTab, FilePreviewTabsProps } from './components/artifact/FilePreviewTabs.js';
129
+ export type { AgentWorkspaceMessages, LedgerFilterKey, TerminalGroupKey } from './provider/messages/workspace.js';
130
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAChJ,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAGlI,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,YAAY,EAAE,aAAa,EAA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AsC,CAAC;AAClE,YAAY,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,YAAY,EAAE,qBAAqB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC3H,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACrG,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAC/E,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC9G,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrG,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,76 @@
1
+ // @wzrhine/agent: Agent UI components (ADR-0010 … ADR-0012). View-models in (`@wzrhine/agent-core`),
2
+ // actions out; no runtime, transport, cache or SDK dependency. Styles are opt-in via
3
+ // `@wzrhine/agent/styles.css`; this entry has no CSS side effects.
4
+ // ---------- provider & copy ----------
5
+ export { AgentMessagesProvider, agentEnUS, agentZhCN, mergeAgentMessages, useAgentFormat, useAgentMessages } from './provider/AgentMessages.js';
6
+ // ---------- primitives & motion ----------
7
+ export { AgentIcon } from './primitives/icons.js';
8
+ export { StatusGlyph } from './primitives/StatusGlyph.js';
9
+ export { AgentStatus, statusProps } from './primitives/AgentStatus.js';
10
+ export { AgentSpark } from './primitives/AgentSpark.js';
11
+ export { AGENT_STAGGER_CAP_MS, AGENT_STAGGER_MS, AgentEntrance, agentStaggerDelay, loopAttributes, useAgentLoop, useSwapTransition } from './motion/agent-motion.js';
12
+ // ---------- contracts (re-exported for convenience) ----------
13
+ export * from '@wzrhine/agent-core';
14
+ // ---------- shell & conversation ----------
15
+ export { AgentShell, useAgentContextPresentation, useAgentShell } from './components/shell/AgentShell.js';
16
+ export { ResizeHandle } from './components/shell/ResizeHandle.js';
17
+ export { AgentHeader } from './components/shell/AgentHeader.js';
18
+ export { AgentSidePane } from './components/shell/AgentSidePane.js';
19
+ export { AgentEmptyState, AgentWorkspaceEmpty } from './components/shell/AgentEmptyState.js';
20
+ export { ConversationList } from './components/conversation/ConversationList.js';
21
+ export { ConversationRow } from './components/conversation/ConversationRow.js';
22
+ // ---------- message, thinking & process ----------
23
+ export { FOLLOW_THRESHOLD_PX, MessageList } from './components/message/MessageList.js';
24
+ export { JumpToLatest } from './components/message/JumpToLatest.js';
25
+ export { AgentMessage, messagePlainText } from './components/message/AgentMessage.js';
26
+ export { ArtifactFallback, MessageErrorNotice, MessagePart, ToolFallback, UnsupportedPart } from './components/message/MessagePart.js';
27
+ export { CodeBlock } from './components/message/CodeBlock.js';
28
+ export { ThinkingBlock } from './components/message/ThinkingBlock.js';
29
+ export { CitationChip } from './components/message/CitationChip.js';
30
+ export { MessageActions } from './components/message/MessageActions.js';
31
+ export { RunDetails, hasRunDetails } from './components/message/RunDetails.js';
32
+ export { DIGEST_LENGTH, SkillUseList } from './components/message/SkillUseList.js';
33
+ export { COPY_FEEDBACK_MS } from './components/message/use-copy.js';
34
+ export { AgentProcess } from './components/process/AgentProcess.js';
35
+ export { RunStatus } from './components/process/RunStatus.js';
36
+ // ---------- tools & execution ----------
37
+ export { ToolRecord } from './components/tools/ToolRecord.js';
38
+ export { ToolActivity, orderTools } from './components/tools/ToolActivity.js';
39
+ export { CodeModeToolTree, ScriptDisclosure, childOutcome } from './components/tools/CodeModeToolTree.js';
40
+ export { ToolOutput } from './components/tools/ToolOutput.js';
41
+ export { ChunkPager } from './components/tools/ChunkPager.js';
42
+ export { ToolHistory, useStableOrder } from './components/tools/ToolHistory.js';
43
+ export { DiffPreview, DiffStats, DiffStatusPill, MultiFileDiff, resolveDiff } from './components/tools/DiffPreview.js';
44
+ export { ApplyPatchDetail, EditFileDetail, FileReadDetail, FileWriteDetail, GenericToolDetail, MCPExecuteDetail, ManageFilesDetail, NativeModelDetail, QuestionToolDetail, RunCommandDetail, SubagentToolDetail, ToolDetail } from './components/tools/ToolDetails.js';
45
+ export { ToolCategoryChip, ToolStatusPill } from './components/tools/shared.js';
46
+ // ---------- composer & selection ----------
47
+ export { Composer } from './components/composer/Composer.js';
48
+ export { ComposerInput } from './components/composer/ComposerInput.js';
49
+ export { MentionMenu } from './components/composer/MentionMenu.js';
50
+ export { SlashCommandMenu } from './components/composer/SlashCommandMenu.js';
51
+ export { AttachmentList } from './components/composer/AttachmentList.js';
52
+ export { SendStopButton } from './components/composer/SendStopButton.js';
53
+ export { ModelPicker } from './components/composer/ModelPicker.js';
54
+ export { PermissionPicker } from './components/composer/PermissionPicker.js';
55
+ export { ComposerNotice } from './components/composer/ComposerNotice.js';
56
+ export { defaultMentionTokenName, drillQuery, filterCommandOptions, filterMentionOptions, moveActiveIndex, orderCommandOptions, removeTokens, resolveSendStop, splitMentionQuery, } from './components/composer/composer-utils.js';
57
+ // ---------- approval & questionnaire ----------
58
+ export { ApprovalPanel } from './components/intervention/ApprovalPanel.js';
59
+ export { QuestionnaireCard } from './components/intervention/QuestionnaireCard.js';
60
+ export { answerState, answerText, isOverLimit, isQuestionOptional, normalizeAnswers } from './components/intervention/questionnaire-answers.js';
61
+ export { ErrorRecoveryNotice } from './components/intervention/ErrorRecoveryNotice.js';
62
+ export { InterventionDock } from './components/intervention/InterventionDock.js';
63
+ export { GrantList } from './components/intervention/GrantList.js';
64
+ // ---------- terminals, sub-agents, context & artifacts ----------
65
+ export { PersistentTerminal, TerminalTabs, isTerminalReadOnly } from './components/workspace/PersistentTerminal.js';
66
+ export { TerminalList, TerminalRow, terminalGroup } from './components/workspace/TerminalRow.js';
67
+ export { SubAgentCard, SubAgentList, subagentSparkPhase } from './components/workspace/SubAgentCard.js';
68
+ export { ContextUsage } from './components/workspace/ContextUsage.js';
69
+ export { PinnedSummary } from './components/workspace/PinnedSummary.js';
70
+ export { ActivityLedger, orderLedger } from './components/workspace/ActivityLedger.js';
71
+ export { RunSummary } from './components/workspace/RunSummary.js';
72
+ export { CompactionNotice } from './components/workspace/CompactionNotice.js';
73
+ export { ArtifactCard, ArtifactList, artifactKindIcon } from './components/artifact/ArtifactCard.js';
74
+ export { FilePreview, pathCrumbs } from './components/artifact/FilePreview.js';
75
+ export { FilePreviewTabs } from './components/artifact/FilePreviewTabs.js';
76
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,qFAAqF;AACrF,mEAAmE;AAEnE,wCAAwC;AACxC,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAGhJ,4CAA4C;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAGrK,gEAAgE;AAChE,cAAc,qBAAqB,CAAC;AAEpC,6CAA6C;AAC7C,OAAO,EAAE,UAAU,EAAE,2BAA2B,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAE1G,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAo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AAC;AAIjD,iDAAiD;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAEnF,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AAEhJ,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AAEvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAEjF,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAInE,mEAAmE;AACnE,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAEpH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAEjG,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAExG,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvF,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAE9E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAErG,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC"}
@@ -0,0 +1,62 @@
1
+ import * as React from 'react';
2
+ import type { Transition } from 'motion/react';
3
+ import type { MotionLifecycle } from '@wzrhine/react';
4
+ /** First-entrance kinds. `message` = new message; `row` = tool / ledger row; `card` = intervention card. */
5
+ export type AgentEntranceKind = 'message' | 'row' | 'card';
6
+ /** Stagger step and cap for rows that arrive together (MOTION.md: 20–30ms per item, capped). */
7
+ export declare const AGENT_STAGGER_MS = 24;
8
+ export declare const AGENT_STAGGER_CAP_MS = 120;
9
+ export declare function agentStaggerDelay(index: number, reduced: boolean, speed?: number): number;
10
+ type MotionConflictingProps = 'onDrag' | 'onDragStart' | 'onDragEnd' | 'onAnimationStart' | 'onAnimationEnd' | 'onAnimationIteration';
11
+ declare const tags: {
12
+ readonly div: import("motion/react").ForwardRefComponent<HTMLDivElement, import("motion/react").HTMLMotionProps<"div">>;
13
+ readonly li: import("motion/react").ForwardRefComponent<HTMLLIElement, import("motion/react").HTMLMotionProps<"li">>;
14
+ readonly article: import("motion/react").ForwardRefComponent<HTMLElement, import("motion/react").HTMLMotionProps<"article">>;
15
+ readonly section: import("motion/react").ForwardRefComponent<HTMLElement, import("motion/react").HTMLMotionProps<"section">>;
16
+ };
17
+ export type AgentEntranceProps = Omit<React.HTMLAttributes<HTMLElement>, MotionConflictingProps> & {
18
+ kind?: AgentEntranceKind;
19
+ /** Animate this mount. Pass `false` for items present on first render or restored from history. */
20
+ animate?: boolean;
21
+ /** Position among items that arrived together (stagger). */
22
+ index?: number;
23
+ as?: keyof typeof tags;
24
+ };
25
+ /**
26
+ * Plays a single first entrance and never again: later re-renders (streaming text, status changes)
27
+ * do not replay it, because the decision is frozen at mount. Content is visible from the first
28
+ * frame under reduced motion (no transform, ≤ fast opacity fade).
29
+ */
30
+ export declare const AgentEntrance: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, MotionConflictingProps> & {
31
+ kind?: AgentEntranceKind;
32
+ /** Animate this mount. Pass `false` for items present on first render or restored from history. */
33
+ animate?: boolean;
34
+ /** Position among items that arrived together (stagger). */
35
+ index?: number;
36
+ as?: keyof typeof tags;
37
+ } & React.RefAttributes<HTMLElement>>;
38
+ /**
39
+ * Loop lifecycle for agent activity indicators (AgentSpark, breathing dots, shimmer). Runs only
40
+ * while `active`, the page is visible, the element is on screen and motion is not reduced.
41
+ * Returns the lifecycle plus a ref to attach to the animated element.
42
+ */
43
+ export declare function useAgentLoop<T extends Element>(active: boolean): {
44
+ ref: React.RefObject<T | null>;
45
+ lifecycle: MotionLifecycle;
46
+ };
47
+ /**
48
+ * Data attributes that drive CSS loops: `data-loop="running" | "paused"` and the pause reason.
49
+ * CSS only animates `[data-loop='running']`, so hidden pages and off-screen items cost nothing.
50
+ */
51
+ export declare function loopAttributes(lifecycle: MotionLifecycle): {
52
+ 'data-loop': 'running' | 'paused' | 'idle';
53
+ 'data-loop-paused'?: string;
54
+ };
55
+ /** Cross-fade transition for two stacked icons (send ↔ stop). Reduced: instant swap. */
56
+ export declare function useSwapTransition(): {
57
+ enter: Transition;
58
+ exit: Transition;
59
+ reduced: boolean;
60
+ };
61
+ export {};
62
+ //# sourceMappingURL=agent-motion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-motion.d.ts","sourceRoot":"","sources":["../../src/motion/agent-motion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAetD,4GAA4G;AAC5G,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AAQ3D,gGAAgG;AAChG,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,SAAI,GAAG,MAAM,CAGpF;AAED,KAAK,sBAAsB,GAAG,QAAQ,GAAG,aAAa,GAAG,WAAW,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,sBAAsB,CAAC;AAEtI,QAAA,MAAM,IAAI;;;;;CAAgG,CAAC;AAE3G,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,sBAAsB,CAAC,GAAG;IACjG,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,mGAAmG;IACnG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,OAAO,IAAI,CAAC;CACxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa;WAbjB,iBAAiB;IACxB,mGAAmG;cACzF,OAAO;IACjB,4DAA4D;YACpD,MAAM;SACT,MAAM,OAAO,IAAI;qCA+BtB,CAAC;AAEH;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG;IAAE,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAAC,SAAS,EAAE,eAAe,CAAA;CAAE,CAI/H;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,eAAe,GAAG;IAAE,WAAW,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAE,CAItI;AAED,wFAAwF;AACxF,wBAAgB,iBAAiB,IAAI;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAG7F"}
@@ -0,0 +1,61 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import { motion } from 'motion/react';
5
+ import { useMotionLifecycle, useRhineMotion } from '@wzrhine/react';
6
+ const entranceSpec = {
7
+ message: { y: 6, scale: 1, name: 'base' },
8
+ row: { y: 4, scale: 1, name: 'fast' },
9
+ card: { y: 8, scale: 0.985, name: 'panel' },
10
+ };
11
+ /** Stagger step and cap for rows that arrive together (MOTION.md: 20–30ms per item, capped). */
12
+ export const AGENT_STAGGER_MS = 24;
13
+ export const AGENT_STAGGER_CAP_MS = 120;
14
+ export function agentStaggerDelay(index, reduced, speed = 1) {
15
+ if (reduced || index <= 0)
16
+ return 0;
17
+ return Math.min(index * AGENT_STAGGER_MS, AGENT_STAGGER_CAP_MS) / 1000 / speed;
18
+ }
19
+ const tags = { div: motion.div, li: motion.li, article: motion.article, section: motion.section };
20
+ /**
21
+ * Plays a single first entrance and never again: later re-renders (streaming text, status changes)
22
+ * do not replay it, because the decision is frozen at mount. Content is visible from the first
23
+ * frame under reduced motion (no transform, ≤ fast opacity fade).
24
+ */
25
+ export const AgentEntrance = React.forwardRef(function AgentEntrance({ kind = 'row', animate = true, index = 0, as = 'div', children, ...rest }, ref) {
26
+ const { reduced, speed, resolve } = useRhineMotion();
27
+ const [play] = React.useState(animate);
28
+ const spec = entranceSpec[kind];
29
+ const Comp = tags[as];
30
+ const delay = agentStaggerDelay(index, reduced, speed);
31
+ const opacity = { ...resolve('opacity', spec.name), delay };
32
+ const move = { ...resolve('transform', spec.name), delay };
33
+ return (_jsx(Comp, { ...rest, ref: ref, "data-agent-entrance": kind, initial: play ? { opacity: 0, y: reduced ? 0 : spec.y, scale: reduced ? 1 : spec.scale } : false, animate: { opacity: 1, y: 0, scale: 1 }, transition: { opacity, y: move, scale: move }, children: children }));
34
+ });
35
+ /**
36
+ * Loop lifecycle for agent activity indicators (AgentSpark, breathing dots, shimmer). Runs only
37
+ * while `active`, the page is visible, the element is on screen and motion is not reduced.
38
+ * Returns the lifecycle plus a ref to attach to the animated element.
39
+ */
40
+ export function useAgentLoop(active) {
41
+ const ref = React.useRef(null);
42
+ const lifecycle = useMotionLifecycle({ active, viewportRef: ref });
43
+ return { ref, lifecycle };
44
+ }
45
+ /**
46
+ * Data attributes that drive CSS loops: `data-loop="running" | "paused"` and the pause reason.
47
+ * CSS only animates `[data-loop='running']`, so hidden pages and off-screen items cost nothing.
48
+ */
49
+ export function loopAttributes(lifecycle) {
50
+ if (lifecycle.running)
51
+ return { 'data-loop': 'running' };
52
+ if (lifecycle.pauseReason)
53
+ return { 'data-loop': 'paused', 'data-loop-paused': lifecycle.pauseReason };
54
+ return { 'data-loop': 'idle' };
55
+ }
56
+ /** Cross-fade transition for two stacked icons (send ↔ stop). Reduced: instant swap. */
57
+ export function useSwapTransition() {
58
+ const { reduced, resolve } = useRhineMotion();
59
+ return { enter: resolve('opacity', 'base'), exit: resolve('opacity', 'fast'), reduced };
60
+ }
61
+ //# sourceMappingURL=agent-motion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-motion.js","sourceRoot":"","sources":["../../src/motion/agent-motion.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAmBpE,MAAM,YAAY,GAA6F;IAC7G,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;IACzC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;IACrC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE;CAC5C,CAAC;AAEF,gGAAgG;AAChG,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAExC,MAAM,UAAU,iBAAiB,CAAC,KAAa,EAAE,OAAgB,EAAE,KAAK,GAAG,CAAC;IAC1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AAO,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;AAC1F,CAAC"}
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ import type { SparkPhase } from '@wzrhine/agent-core';
3
+ /**
4
+ * AgentSpark (atlas 25): a 3 × 3 dot matrix hinting at what the agent is doing. Purely visual
5
+ * (`aria-hidden`); the text next to it carries the status. Each phase has its own rhythm, all
6
+ * driven by CSS keyframes over `--rl-motion-loop` multiples. The loop runs only while the phase
7
+ * is active, the page is visible and the matrix is on screen (shared motion lifecycle); reduced
8
+ * motion and settled phases render one static frame that still differs per phase.
9
+ */
10
+ export type AgentSparkProps = Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> & {
11
+ phase: SparkPhase;
12
+ size?: 'sm' | 'md';
13
+ /** Force the static frame (e.g. twelve sparks in a dense list). Default: animate when active. */
14
+ animate?: boolean;
15
+ };
16
+ export declare function AgentSpark({ phase, size, animate, className, ...rest }: AgentSparkProps): React.JSX.Element;
17
+ //# sourceMappingURL=AgentSpark.d.ts.map