@dxos/plugin-automation 0.7.5-labs.f5080a1 → 0.7.5-main.5ae2ba8

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 (297) hide show
  1. package/dist/lib/browser/AutomationPanel-ITYXSN5Z.mjs +132 -0
  2. package/dist/lib/browser/AutomationPanel-ITYXSN5Z.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-DQ7ZSYJJ.mjs → chunk-OFDNNRLE.mjs} +3 -6
  4. package/dist/lib/browser/{chunk-DQ7ZSYJJ.mjs.map → chunk-OFDNNRLE.mjs.map} +3 -3
  5. package/dist/lib/browser/chunk-U7QLNY2S.mjs +8 -0
  6. package/dist/lib/browser/chunk-U7QLNY2S.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-WY2C7JY4.mjs +119 -0
  8. package/dist/lib/browser/chunk-WY2C7JY4.mjs.map +7 -0
  9. package/dist/lib/browser/complementary-panel-4CPOJL4Y.mjs +56 -0
  10. package/dist/lib/browser/complementary-panel-4CPOJL4Y.mjs.map +7 -0
  11. package/dist/lib/browser/index.mjs +22 -373
  12. package/dist/lib/browser/index.mjs.map +4 -4
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/react-surface-SAPMN4PF.mjs +27 -0
  15. package/dist/lib/browser/react-surface-SAPMN4PF.mjs.map +7 -0
  16. package/dist/lib/node/{chunk-OCW5GAVZ.cjs → AutomationPanel-X33HHDMQ.cjs} +19 -131
  17. package/dist/lib/node/AutomationPanel-X33HHDMQ.cjs.map +7 -0
  18. package/dist/lib/node/chunk-7Q5SNGCL.cjs +148 -0
  19. package/dist/lib/node/chunk-7Q5SNGCL.cjs.map +7 -0
  20. package/dist/lib/node/chunk-CB5OB6JH.cjs +40 -0
  21. package/dist/lib/node/chunk-CB5OB6JH.cjs.map +7 -0
  22. package/dist/lib/node/{chunk-TQEDPRY5.cjs → chunk-ORMEYEBE.cjs} +6 -9
  23. package/dist/lib/node/{chunk-TQEDPRY5.cjs.map → chunk-ORMEYEBE.cjs.map} +3 -3
  24. package/dist/lib/node/complementary-panel-ZYJJ42ZU.cjs +72 -0
  25. package/dist/lib/node/complementary-panel-ZYJJ42ZU.cjs.map +7 -0
  26. package/dist/lib/node/index.cjs +37 -374
  27. package/dist/lib/node/index.cjs.map +4 -4
  28. package/dist/lib/node/meta.json +1 -1
  29. package/dist/lib/node/{react-surface-HDAVE6NU.cjs → react-surface-2WRVAPGR.cjs} +9 -28
  30. package/dist/lib/node/react-surface-2WRVAPGR.cjs.map +7 -0
  31. package/dist/lib/node-esm/AutomationPanel-HY3GB4BT.mjs +133 -0
  32. package/dist/lib/node-esm/AutomationPanel-HY3GB4BT.mjs.map +7 -0
  33. package/dist/lib/node-esm/{chunk-JFHI22MF.mjs → chunk-6MUUH67V.mjs} +3 -6
  34. package/dist/lib/node-esm/{chunk-JFHI22MF.mjs.map → chunk-6MUUH67V.mjs.map} +3 -3
  35. package/dist/lib/node-esm/chunk-R3P2WPBQ.mjs +10 -0
  36. package/dist/lib/node-esm/chunk-R3P2WPBQ.mjs.map +7 -0
  37. package/dist/lib/node-esm/chunk-UDD2VA6G.mjs +120 -0
  38. package/dist/lib/node-esm/chunk-UDD2VA6G.mjs.map +7 -0
  39. package/dist/lib/node-esm/complementary-panel-S42RIIAY.mjs +57 -0
  40. package/dist/lib/node-esm/complementary-panel-S42RIIAY.mjs.map +7 -0
  41. package/dist/lib/node-esm/index.mjs +22 -373
  42. package/dist/lib/node-esm/index.mjs.map +4 -4
  43. package/dist/lib/node-esm/meta.json +1 -1
  44. package/dist/lib/node-esm/react-surface-QWLPOYXO.mjs +28 -0
  45. package/dist/lib/node-esm/react-surface-QWLPOYXO.mjs.map +7 -0
  46. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  47. package/dist/types/src/capabilities/{ai-client.d.ts → complementary-panel.d.ts} +2 -3
  48. package/dist/types/src/capabilities/complementary-panel.d.ts.map +1 -0
  49. package/dist/types/src/capabilities/index.d.ts +1 -180
  50. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  51. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  52. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -2
  53. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  54. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
  55. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -2
  56. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  57. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
  58. package/dist/types/src/components/index.d.ts +1 -11
  59. package/dist/types/src/components/index.d.ts.map +1 -1
  60. package/dist/types/src/index.d.ts +1 -3
  61. package/dist/types/src/index.d.ts.map +1 -1
  62. package/dist/types/src/meta.d.ts +0 -1
  63. package/dist/types/src/meta.d.ts.map +1 -1
  64. package/dist/types/src/testing/index.d.ts +0 -1
  65. package/dist/types/src/testing/index.d.ts.map +1 -1
  66. package/dist/types/src/testing/test-functions.d.ts +0 -2
  67. package/dist/types/src/testing/test-functions.d.ts.map +1 -1
  68. package/dist/types/src/translations.d.ts +2 -92
  69. package/dist/types/src/translations.d.ts.map +1 -1
  70. package/package.json +23 -71
  71. package/src/AutomationPlugin.tsx +9 -64
  72. package/src/capabilities/complementary-panel.ts +56 -0
  73. package/src/capabilities/index.ts +1 -5
  74. package/src/capabilities/react-surface.tsx +2 -16
  75. package/src/components/AutomationPanel/AutomationPanel.stories.tsx +1 -2
  76. package/src/components/AutomationPanel/AutomationPanel.tsx +56 -49
  77. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +1 -2
  78. package/src/components/TriggerEditor/TriggerEditor.tsx +6 -1
  79. package/src/components/index.ts +0 -7
  80. package/src/index.ts +2 -3
  81. package/src/meta.ts +1 -2
  82. package/src/testing/index.ts +0 -1
  83. package/src/testing/test-functions.ts +0 -7
  84. package/src/translations.ts +2 -29
  85. package/dist/lib/browser/AutomationPanel-YPD3AGQN.mjs +0 -8
  86. package/dist/lib/browser/AutomationPanel-YPD3AGQN.mjs.map +0 -7
  87. package/dist/lib/browser/ChatContainer-ODZECATM.mjs +0 -12
  88. package/dist/lib/browser/ChatContainer-ODZECATM.mjs.map +0 -7
  89. package/dist/lib/browser/ai-client-UJLNYP7B.mjs +0 -22
  90. package/dist/lib/browser/ai-client-UJLNYP7B.mjs.map +0 -7
  91. package/dist/lib/browser/app-graph-builder-3H5TCRG4.mjs +0 -162
  92. package/dist/lib/browser/app-graph-builder-3H5TCRG4.mjs.map +0 -7
  93. package/dist/lib/browser/chunk-43WRHV2L.mjs +0 -150
  94. package/dist/lib/browser/chunk-43WRHV2L.mjs.map +0 -7
  95. package/dist/lib/browser/chunk-BQHXJZ4K.mjs +0 -15
  96. package/dist/lib/browser/chunk-BQHXJZ4K.mjs.map +0 -7
  97. package/dist/lib/browser/chunk-DL7XA62G.mjs +0 -1531
  98. package/dist/lib/browser/chunk-DL7XA62G.mjs.map +0 -7
  99. package/dist/lib/browser/chunk-PQGFC2ZO.mjs +0 -284
  100. package/dist/lib/browser/chunk-PQGFC2ZO.mjs.map +0 -7
  101. package/dist/lib/browser/chunk-Z54KIF6H.mjs +0 -242
  102. package/dist/lib/browser/chunk-Z54KIF6H.mjs.map +0 -7
  103. package/dist/lib/browser/intent-resolver-5YVZJFS3.mjs +0 -29
  104. package/dist/lib/browser/intent-resolver-5YVZJFS3.mjs.map +0 -7
  105. package/dist/lib/browser/react-surface-WRHRCEV5.mjs +0 -50
  106. package/dist/lib/browser/react-surface-WRHRCEV5.mjs.map +0 -7
  107. package/dist/lib/browser/types/index.mjs +0 -24
  108. package/dist/lib/browser/types/index.mjs.map +0 -7
  109. package/dist/lib/node/AutomationPanel-CO26O75P.cjs +0 -26
  110. package/dist/lib/node/AutomationPanel-CO26O75P.cjs.map +0 -7
  111. package/dist/lib/node/ChatContainer-5URBEXQD.cjs +0 -33
  112. package/dist/lib/node/ChatContainer-5URBEXQD.cjs.map +0 -7
  113. package/dist/lib/node/ai-client-AOB6TLNW.cjs +0 -38
  114. package/dist/lib/node/ai-client-AOB6TLNW.cjs.map +0 -7
  115. package/dist/lib/node/app-graph-builder-CDEQJEHY.cjs +0 -178
  116. package/dist/lib/node/app-graph-builder-CDEQJEHY.cjs.map +0 -7
  117. package/dist/lib/node/chunk-AWZVJZ2I.cjs +0 -34
  118. package/dist/lib/node/chunk-AWZVJZ2I.cjs.map +0 -7
  119. package/dist/lib/node/chunk-D2QQXWOY.cjs +0 -302
  120. package/dist/lib/node/chunk-D2QQXWOY.cjs.map +0 -7
  121. package/dist/lib/node/chunk-H3RSMGJG.cjs +0 -173
  122. package/dist/lib/node/chunk-H3RSMGJG.cjs.map +0 -7
  123. package/dist/lib/node/chunk-NH7STAX6.cjs +0 -1515
  124. package/dist/lib/node/chunk-NH7STAX6.cjs.map +0 -7
  125. package/dist/lib/node/chunk-OCW5GAVZ.cjs.map +0 -7
  126. package/dist/lib/node/intent-resolver-MJFZT5IU.cjs +0 -44
  127. package/dist/lib/node/intent-resolver-MJFZT5IU.cjs.map +0 -7
  128. package/dist/lib/node/react-surface-HDAVE6NU.cjs.map +0 -7
  129. package/dist/lib/node/types/index.cjs +0 -46
  130. package/dist/lib/node/types/index.cjs.map +0 -7
  131. package/dist/lib/node-esm/AutomationPanel-VQZUKPK2.mjs +0 -9
  132. package/dist/lib/node-esm/AutomationPanel-VQZUKPK2.mjs.map +0 -7
  133. package/dist/lib/node-esm/ChatContainer-23QIVDG5.mjs +0 -13
  134. package/dist/lib/node-esm/ChatContainer-23QIVDG5.mjs.map +0 -7
  135. package/dist/lib/node-esm/ai-client-RUCCJ7JZ.mjs +0 -23
  136. package/dist/lib/node-esm/ai-client-RUCCJ7JZ.mjs.map +0 -7
  137. package/dist/lib/node-esm/app-graph-builder-GR3URVNX.mjs +0 -163
  138. package/dist/lib/node-esm/app-graph-builder-GR3URVNX.mjs.map +0 -7
  139. package/dist/lib/node-esm/chunk-7JO77AAS.mjs +0 -151
  140. package/dist/lib/node-esm/chunk-7JO77AAS.mjs.map +0 -7
  141. package/dist/lib/node-esm/chunk-JJFWFS6P.mjs +0 -1532
  142. package/dist/lib/node-esm/chunk-JJFWFS6P.mjs.map +0 -7
  143. package/dist/lib/node-esm/chunk-LSSWQIQD.mjs +0 -16
  144. package/dist/lib/node-esm/chunk-LSSWQIQD.mjs.map +0 -7
  145. package/dist/lib/node-esm/chunk-NSVQZ3EH.mjs +0 -243
  146. package/dist/lib/node-esm/chunk-NSVQZ3EH.mjs.map +0 -7
  147. package/dist/lib/node-esm/chunk-VN2AFV25.mjs +0 -285
  148. package/dist/lib/node-esm/chunk-VN2AFV25.mjs.map +0 -7
  149. package/dist/lib/node-esm/intent-resolver-FCKNRTKQ.mjs +0 -30
  150. package/dist/lib/node-esm/intent-resolver-FCKNRTKQ.mjs.map +0 -7
  151. package/dist/lib/node-esm/react-surface-FZ5OFRDE.mjs +0 -51
  152. package/dist/lib/node-esm/react-surface-FZ5OFRDE.mjs.map +0 -7
  153. package/dist/lib/node-esm/types/index.mjs +0 -25
  154. package/dist/lib/node-esm/types/index.mjs.map +0 -7
  155. package/dist/types/src/artifacts.stories.d.ts +0 -16
  156. package/dist/types/src/artifacts.stories.d.ts.map +0 -1
  157. package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
  158. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -180
  159. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  160. package/dist/types/src/capabilities/capabilities.d.ts +0 -5
  161. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  162. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  163. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  164. package/dist/types/src/components/ChatContainer/ChatContainer.d.ts +0 -7
  165. package/dist/types/src/components/ChatContainer/ChatContainer.d.ts.map +0 -1
  166. package/dist/types/src/components/ChatContainer/index.d.ts +0 -4
  167. package/dist/types/src/components/ChatContainer/index.d.ts.map +0 -1
  168. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts +0 -14
  169. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts.map +0 -1
  170. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts +0 -8
  171. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts.map +0 -1
  172. package/dist/types/src/components/MarkdownViewer/index.d.ts +0 -2
  173. package/dist/types/src/components/MarkdownViewer/index.d.ts.map +0 -1
  174. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts +0 -10
  175. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts.map +0 -1
  176. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts +0 -6
  177. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts.map +0 -1
  178. package/dist/types/src/components/PromptEditor/index.d.ts +0 -2
  179. package/dist/types/src/components/PromptEditor/index.d.ts.map +0 -1
  180. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts +0 -4
  181. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts.map +0 -1
  182. package/dist/types/src/components/PromptEditor/types.d.ts +0 -18
  183. package/dist/types/src/components/PromptEditor/types.d.ts.map +0 -1
  184. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts +0 -6
  185. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts.map +0 -1
  186. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts +0 -8
  187. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts.map +0 -1
  188. package/dist/types/src/components/ServiceRegistry/index.d.ts +0 -2
  189. package/dist/types/src/components/ServiceRegistry/index.d.ts.map +0 -1
  190. package/dist/types/src/components/Thread/ScrollContainer.d.ts +0 -15
  191. package/dist/types/src/components/Thread/ScrollContainer.d.ts.map +0 -1
  192. package/dist/types/src/components/Thread/StatusLine.d.ts +0 -11
  193. package/dist/types/src/components/Thread/StatusLine.d.ts.map +0 -1
  194. package/dist/types/src/components/Thread/StatusLine.stories.d.ts +0 -9
  195. package/dist/types/src/components/Thread/StatusLine.stories.d.ts.map +0 -1
  196. package/dist/types/src/components/Thread/Tabbed.d.ts +0 -9
  197. package/dist/types/src/components/Thread/Tabbed.d.ts.map +0 -1
  198. package/dist/types/src/components/Thread/Tabbed.stories.d.ts +0 -8
  199. package/dist/types/src/components/Thread/Tabbed.stories.d.ts.map +0 -1
  200. package/dist/types/src/components/Thread/Thread.d.ts +0 -11
  201. package/dist/types/src/components/Thread/Thread.d.ts.map +0 -1
  202. package/dist/types/src/components/Thread/Thread.stories.d.ts +0 -10
  203. package/dist/types/src/components/Thread/Thread.stories.d.ts.map +0 -1
  204. package/dist/types/src/components/Thread/ThreadMessage.d.ts +0 -12
  205. package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +0 -1
  206. package/dist/types/src/components/Thread/ToggleContainer.d.ts +0 -13
  207. package/dist/types/src/components/Thread/ToggleContainer.d.ts.map +0 -1
  208. package/dist/types/src/components/Thread/ToggleContainer.stories.d.ts +0 -9
  209. package/dist/types/src/components/Thread/ToggleContainer.stories.d.ts.map +0 -1
  210. package/dist/types/src/components/Thread/index.d.ts +0 -2
  211. package/dist/types/src/components/Thread/index.d.ts.map +0 -1
  212. package/dist/types/src/hooks/email.d.ts +0 -4
  213. package/dist/types/src/hooks/email.d.ts.map +0 -1
  214. package/dist/types/src/hooks/index.d.ts +0 -6
  215. package/dist/types/src/hooks/index.d.ts.map +0 -1
  216. package/dist/types/src/hooks/invocation-handler.d.ts +0 -5
  217. package/dist/types/src/hooks/invocation-handler.d.ts.map +0 -1
  218. package/dist/types/src/hooks/processor.d.ts +0 -70
  219. package/dist/types/src/hooks/processor.d.ts.map +0 -1
  220. package/dist/types/src/hooks/processor.test.d.ts +0 -2
  221. package/dist/types/src/hooks/processor.test.d.ts.map +0 -1
  222. package/dist/types/src/hooks/useChatProcessor.d.ts +0 -7
  223. package/dist/types/src/hooks/useChatProcessor.d.ts.map +0 -1
  224. package/dist/types/src/hooks/useLocalTriggerManager.d.ts +0 -3
  225. package/dist/types/src/hooks/useLocalTriggerManager.d.ts.map +0 -1
  226. package/dist/types/src/hooks/useMessageQueue.d.ts +0 -41
  227. package/dist/types/src/hooks/useMessageQueue.d.ts.map +0 -1
  228. package/dist/types/src/hooks/useServices.d.ts +0 -7
  229. package/dist/types/src/hooks/useServices.d.ts.map +0 -1
  230. package/dist/types/src/presets.d.ts +0 -9
  231. package/dist/types/src/presets.d.ts.map +0 -1
  232. package/dist/types/src/testing/test-services.d.ts +0 -5
  233. package/dist/types/src/testing/test-services.d.ts.map +0 -1
  234. package/dist/types/src/tools/function.d.ts +0 -5
  235. package/dist/types/src/tools/function.d.ts.map +0 -1
  236. package/dist/types/src/tools/index.d.ts +0 -3
  237. package/dist/types/src/tools/index.d.ts.map +0 -1
  238. package/dist/types/src/tools/openapi.d.ts +0 -10
  239. package/dist/types/src/tools/openapi.d.ts.map +0 -1
  240. package/dist/types/src/tools/openapi.test.d.ts +0 -2
  241. package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
  242. package/dist/types/src/types/index.d.ts +0 -4
  243. package/dist/types/src/types/index.d.ts.map +0 -1
  244. package/dist/types/src/types/registry.d.ts +0 -10
  245. package/dist/types/src/types/registry.d.ts.map +0 -1
  246. package/dist/types/src/types/schema.d.ts +0 -221
  247. package/dist/types/src/types/schema.d.ts.map +0 -1
  248. package/dist/types/src/types/types.d.ts +0 -18
  249. package/dist/types/src/types/types.d.ts.map +0 -1
  250. package/src/artifacts.stories.tsx +0 -241
  251. package/src/capabilities/ai-client.ts +0 -19
  252. package/src/capabilities/app-graph-builder.ts +0 -156
  253. package/src/capabilities/capabilities.ts +0 -12
  254. package/src/capabilities/intent-resolver.ts +0 -27
  255. package/src/components/ChatContainer/ChatContainer.tsx +0 -52
  256. package/src/components/ChatContainer/index.ts +0 -8
  257. package/src/components/MarkdownViewer/MarkdownViewer.stories.tsx +0 -56
  258. package/src/components/MarkdownViewer/MarkdownViewer.tsx +0 -79
  259. package/src/components/MarkdownViewer/index.ts +0 -5
  260. package/src/components/PromptEditor/PromptEditor.stories.tsx +0 -64
  261. package/src/components/PromptEditor/PromptEditor.tsx +0 -222
  262. package/src/components/PromptEditor/index.ts +0 -5
  263. package/src/components/PromptEditor/prompt-extension.ts +0 -43
  264. package/src/components/PromptEditor/types.tsx +0 -28
  265. package/src/components/ServiceRegistry/ServiceRegistry.stories.tsx +0 -49
  266. package/src/components/ServiceRegistry/ServiceRegistry.tsx +0 -75
  267. package/src/components/ServiceRegistry/index.ts +0 -5
  268. package/src/components/Thread/ScrollContainer.tsx +0 -92
  269. package/src/components/Thread/StatusLine.stories.tsx +0 -52
  270. package/src/components/Thread/StatusLine.tsx +0 -76
  271. package/src/components/Thread/Tabbed.stories.tsx +0 -52
  272. package/src/components/Thread/Tabbed.tsx +0 -72
  273. package/src/components/Thread/Thread.stories.tsx +0 -190
  274. package/src/components/Thread/Thread.tsx +0 -156
  275. package/src/components/Thread/ThreadMessage.tsx +0 -203
  276. package/src/components/Thread/ToggleContainer.stories.tsx +0 -111
  277. package/src/components/Thread/ToggleContainer.tsx +0 -103
  278. package/src/components/Thread/index.ts +0 -5
  279. package/src/hooks/email.ts +0 -49
  280. package/src/hooks/index.ts +0 -10
  281. package/src/hooks/invocation-handler.ts +0 -109
  282. package/src/hooks/processor.test.ts +0 -15
  283. package/src/hooks/processor.ts +0 -210
  284. package/src/hooks/useChatProcessor.tsx +0 -86
  285. package/src/hooks/useLocalTriggerManager.ts +0 -82
  286. package/src/hooks/useMessageQueue.ts +0 -23
  287. package/src/hooks/useServices.ts +0 -28
  288. package/src/presets.ts +0 -248
  289. package/src/testing/test-services.ts +0 -131
  290. package/src/tools/function.ts +0 -47
  291. package/src/tools/index.ts +0 -6
  292. package/src/tools/openapi.test.ts +0 -227
  293. package/src/tools/openapi.ts +0 -331
  294. package/src/types/index.ts +0 -7
  295. package/src/types/registry.ts +0 -26
  296. package/src/types/schema.ts +0 -132
  297. package/src/types/types.ts +0 -21
@@ -1,76 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React, { useEffect, useRef, useState } from 'react';
6
-
7
- import { type ThemedClassName } from '@dxos/react-ui';
8
- import { mx } from '@dxos/react-ui-theme';
9
-
10
- const emptyLines: string[] = [];
11
-
12
- export type StatusLineProps = ThemedClassName<{
13
- line?: number;
14
- lines?: string[];
15
- transition?: number;
16
- advance?: number;
17
- autoAdvance?: boolean;
18
- }>;
19
-
20
- export const StatusLine = ({
21
- classNames,
22
- line = -1,
23
- lines = emptyLines,
24
- transition = 300,
25
- advance = 1_000,
26
- autoAdvance,
27
- }: StatusLineProps) => {
28
- const containerRef = useRef<HTMLDivElement>(null);
29
- const [currentLine, setCurrentLine] = useState(line);
30
- useEffect(() => {
31
- setCurrentLine(line);
32
- }, [line]);
33
-
34
- useEffect(() => {
35
- if (!autoAdvance) {
36
- return;
37
- }
38
-
39
- const next = () => {
40
- setCurrentLine((prev) => {
41
- if (prev >= lines.length - 1) {
42
- clearInterval(interval);
43
- return prev;
44
- }
45
-
46
- return prev + 1;
47
- });
48
- };
49
-
50
- next();
51
- const interval = setInterval(next, advance);
52
-
53
- return () => clearInterval(interval);
54
- }, [lines.length, autoAdvance, advance]);
55
-
56
- useEffect(() => {
57
- if (containerRef.current) {
58
- containerRef.current.style.transition = `transform ${transition}ms ease-in-out`;
59
- containerRef.current.style.transform = `translateY(-${currentLine * 24}px)`;
60
- }
61
- }, [currentLine]);
62
-
63
- return (
64
- <div className={mx('relative h-[24px] overflow-hidden', classNames)}>
65
- <div ref={containerRef} className='h-[24px]'>
66
- <div className='flex flex-col'>
67
- {lines.map((line, i) => (
68
- <div key={i} className={mx('flex h-[24px] items-center')}>
69
- <span className='truncate'>{line}</span>
70
- </div>
71
- ))}
72
- </div>
73
- </div>
74
- </div>
75
- );
76
- };
@@ -1,52 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type StoryObj, type Meta } from '@storybook/react';
8
- import React, { useState } from 'react';
9
-
10
- import { faker } from '@dxos/random';
11
- import { withLayout, withTheme, withSignals } from '@dxos/storybook-utils';
12
-
13
- import { Tabs } from './Tabbed';
14
- import { ToggleContainer } from './ToggleContainer';
15
-
16
- const content = Array.from({ length: 4 }, (_, i) => ({
17
- title: faker.lorem.paragraph(),
18
- content: faker.lorem.paragraphs(3),
19
- }));
20
-
21
- const meta: Meta<typeof Tabs> = {
22
- title: 'plugins/plugin-automation/Tabbed',
23
- component: Tabs,
24
- decorators: [withSignals, withTheme, withLayout({ fullscreen: true, classNames: 'justify-center' })],
25
- };
26
-
27
- export default meta;
28
-
29
- type Story = StoryObj<typeof Tabs>;
30
-
31
- export const Default: Story = {
32
- render: () => {
33
- const [selected, setSelected] = useState(0);
34
- return (
35
- <div className='flex flex-col w-[500px] p-4 bg-attention'>
36
- <ToggleContainer
37
- title={content[selected].title}
38
- classNames='p-1 rounded-lg bg-baseSurface border border-neutral-500'
39
- toggle
40
- defaultOpen
41
- >
42
- <div className='flex w-full overflow-hidden'>
43
- <Tabs length={content.length} selected={selected} onSelect={setSelected} />
44
- <div className='flex-1 pis-2 pie-2 overflow-y-auto'>
45
- <div>{content[selected].content}</div>
46
- </div>
47
- </div>
48
- </ToggleContainer>
49
- </div>
50
- );
51
- },
52
- };
@@ -1,72 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React, { type FC } from 'react';
6
-
7
- import { Icon, type ThemedClassName } from '@dxos/react-ui';
8
- import { mx } from '@dxos/react-ui-theme';
9
-
10
- const numbers = [
11
- { regular: 'ph--number-circle-zero--thin', active: 'ph--number-circle-zero--duotone' },
12
- { regular: 'ph--number-circle-one--thin', active: 'ph--number-circle-one--duotone' },
13
- { regular: 'ph--number-circle-two--thin', active: 'ph--number-circle-two--duotone' },
14
- { regular: 'ph--number-circle-three--thin', active: 'ph--number-circle-three--duotone' },
15
- { regular: 'ph--number-circle-four--thin', active: 'ph--number-circle-four--duotone' },
16
- { regular: 'ph--number-circle-five--thin', active: 'ph--number-circle-five--duotone' },
17
- { regular: 'ph--number-circle-six--thin', active: 'ph--number-circle-six--duotone' },
18
- { regular: 'ph--number-circle-seven--thin', active: 'ph--number-circle-seven--duotone' },
19
- { regular: 'ph--number-circle-eight--thin', active: 'ph--number-circle-eight--duotone' },
20
- { regular: 'ph--number-circle-nine--thin', active: 'ph--number-circle-nine--duotone' },
21
- ];
22
-
23
- export type TabsProps = ThemedClassName<{ length: number; selected?: number; onSelect?: (index: number) => void }>;
24
-
25
- // TODO(burdon): Key up/down.
26
- export const Tabs: FC<TabsProps> = ({ classNames, length, selected = 0, onSelect }) => {
27
- return (
28
- <div
29
- className={mx('flex flex-col overflow-hidden outline-none', classNames)}
30
- tabIndex={-1}
31
- onKeyDown={(ev) => {
32
- // TODO(burdon): Focus when open Toggle.
33
- switch (ev.key) {
34
- case 'ArrowDown':
35
- case 'ArrowRight': {
36
- if (selected < length - 1) {
37
- onSelect?.(selected + 1);
38
- }
39
- break;
40
- }
41
- case 'ArrowUp':
42
- case 'ArrowLeft': {
43
- if (selected > 0) {
44
- onSelect?.(selected - 1);
45
- }
46
- break;
47
- }
48
- }
49
- }}
50
- >
51
- {Array.from({ length }).map((_, i) => {
52
- const icon = numbers[i + 1];
53
- return (
54
- <div
55
- key={i}
56
- className={mx(
57
- 'relative flex w-[24px] h-[28px] justify-center cursor-pointer text-subdued',
58
- selected === i && '!text-green-500', // TODO(burdon): accent.
59
- )}
60
- >
61
- {i < length - 1 && <div className='absolute left-[11.5px] top-[21px] w-[1px] h-[10px] bg-neutral-400' />}
62
- <Icon
63
- icon={selected === i ? icon.regular : icon.regular}
64
- classNames='z-10 !p-0 !w-[24px] !h-[24px] outline-none'
65
- onClick={() => onSelect?.(i)}
66
- />
67
- </div>
68
- );
69
- })}
70
- </div>
71
- );
72
- };
@@ -1,190 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type StoryObj, type Meta } from '@storybook/react';
8
- import React, { useCallback, useEffect, useState } from 'react';
9
-
10
- import { type Message } from '@dxos/artifact';
11
- import { ObjectId } from '@dxos/echo-schema';
12
- import { faker } from '@dxos/random';
13
- import { withLayout, withSignals, withTheme } from '@dxos/storybook-utils';
14
-
15
- import { Thread, type ThreadProps } from './Thread';
16
- import translations from '../../translations';
17
-
18
- faker.seed(1);
19
-
20
- const Render = ({ messages: _messages, ...props }: ThreadProps) => {
21
- const [streaming, setStreaming] = useState(false);
22
- const [messages, setMessages] = useState<Message[]>(_messages ?? []);
23
- useEffect(() => {
24
- setMessages(_messages ?? []);
25
- }, [_messages]);
26
-
27
- const handleSubmit = useCallback(
28
- (text: string) => {
29
- const request: Message = { id: ObjectId.random(), role: 'user', content: [{ type: 'text', text }] };
30
- const response: Message = {
31
- id: ObjectId.random(),
32
- role: 'assistant',
33
- content: [{ type: 'text', disposition: 'cot', pending: true, text: faker.lorem.paragraphs(1) }],
34
- };
35
- setMessages([...messages, request, response]);
36
- setStreaming(true);
37
- setTimeout(() => {
38
- response.content[0].pending = false;
39
- setMessages([
40
- ...messages,
41
- request,
42
- response,
43
- {
44
- id: ObjectId.random(),
45
- role: 'assistant',
46
- content: [{ type: 'text', text: faker.lorem.paragraphs(1) }],
47
- },
48
- ]);
49
- setStreaming(false);
50
- }, 3_000);
51
- },
52
- [messages],
53
- );
54
-
55
- return (
56
- <div className='flex grow justify-center overflow-center bg-base'>
57
- <div className='flex w-[500px] bg-white dark:bg-black'>
58
- <Thread {...props} messages={messages} streaming={streaming} onSubmit={handleSubmit} onStop={() => {}} />
59
- </div>
60
- </div>
61
- );
62
- };
63
-
64
- const meta: Meta<ThreadProps> = {
65
- title: 'plugins/plugin-automation/Thread',
66
- render: Render,
67
- component: Thread,
68
- decorators: [withSignals, withTheme, withLayout({ fullscreen: true, tooltips: true })],
69
- parameters: {
70
- translations,
71
- },
72
- };
73
-
74
- export default meta;
75
-
76
- type Story = StoryObj<ThreadProps>;
77
-
78
- const TEST_MESSAGES: Message[] = [
79
- {
80
- id: ObjectId.random(),
81
- role: 'user',
82
- content: [
83
- {
84
- type: 'text',
85
- text: faker.lorem.sentence(5),
86
- },
87
- ],
88
- },
89
- {
90
- id: ObjectId.random(),
91
- role: 'assistant',
92
- content: [
93
- {
94
- type: 'text',
95
- disposition: 'cot',
96
- text: Array.from({ length: faker.number.int({ min: 3, max: 5 }) })
97
- .map((_, idx) => `${idx + 1}. ${faker.lorem.paragraph()}`)
98
- .join('\n'),
99
- },
100
- {
101
- type: 'text',
102
- text: Array.from({ length: faker.number.int({ min: 2, max: 5 }) })
103
- .map(() => faker.lorem.paragraphs())
104
- .join('\n\n'),
105
- },
106
- {
107
- type: 'tool_use',
108
- id: '1234',
109
- name: 'search',
110
- input: {},
111
- },
112
- ],
113
- },
114
- {
115
- id: ObjectId.random(),
116
- role: 'user',
117
- content: [
118
- {
119
- type: 'tool_result',
120
- toolUseId: '1234',
121
- content: 'This is a tool result.',
122
- },
123
- ],
124
- },
125
- {
126
- id: ObjectId.random(),
127
- role: 'assistant',
128
- content: [
129
- {
130
- type: 'tool_use',
131
- id: '4567',
132
- name: 'create',
133
- input: {},
134
- },
135
- ],
136
- },
137
- {
138
- id: ObjectId.random(),
139
- role: 'user',
140
- content: [
141
- {
142
- type: 'tool_result',
143
- toolUseId: '4567',
144
- content: 'This is a tool result.',
145
- },
146
- ],
147
- },
148
- {
149
- id: ObjectId.random(),
150
- role: 'assistant',
151
- content: [
152
- {
153
- type: 'text',
154
- text: faker.lorem.paragraphs(1),
155
- },
156
- ],
157
- },
158
- ];
159
-
160
- export const Default: Story = {
161
- args: {
162
- debug: true,
163
- messages: TEST_MESSAGES,
164
- },
165
- };
166
-
167
- export const Input: Story = {
168
- args: {
169
- streaming: true,
170
- },
171
- };
172
-
173
- export const Incremental: Story = {
174
- render: () => {
175
- const [messages, setMessages] = useState<Message[]>([]);
176
- useEffect(() => {
177
- let i = 0;
178
- const interval = setInterval(() => {
179
- setMessages((messages) => [...messages, TEST_MESSAGES[i++]]);
180
- if (i >= TEST_MESSAGES.length) {
181
- clearInterval(interval);
182
- }
183
- }, 2_000);
184
-
185
- return () => clearInterval(interval);
186
- }, []);
187
-
188
- return <Render messages={messages} collapse />;
189
- },
190
- };
@@ -1,156 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React, { type KeyboardEventHandler, useCallback, useMemo, useRef, useState } from 'react';
6
-
7
- import { type Message } from '@dxos/artifact';
8
- import { IconButton, Input, useTranslation } from '@dxos/react-ui';
9
- import { Spinner } from '@dxos/react-ui-sfx';
10
- import { mx } from '@dxos/react-ui-theme';
11
-
12
- import { ScrollContainer, type ScrollController } from './ScrollContainer';
13
- import { ThreadMessage, type ThreadMessageProps } from './ThreadMessage';
14
- import { AUTOMATION_PLUGIN } from '../../meta';
15
-
16
- export type ThreadProps = {
17
- messages?: Message[];
18
- streaming?: boolean;
19
- onSubmit?: (message: string) => void;
20
- onStop?: () => void;
21
- } & Pick<ThreadMessageProps, 'collapse' | 'debug' | 'onSuggest' | 'onDelete'>;
22
-
23
- // TODO(burdon): Factor out scroll logic.
24
- export const Thread = ({
25
- messages,
26
- streaming,
27
- collapse,
28
- debug,
29
- onSubmit,
30
- onStop,
31
- onSuggest,
32
- onDelete,
33
- }: ThreadProps) => {
34
- const { t } = useTranslation(AUTOMATION_PLUGIN);
35
- const scroller = useRef<ScrollController>(null);
36
-
37
- const [text, setText] = useState('');
38
- const handleKeyDown = useCallback<KeyboardEventHandler<HTMLInputElement>>(
39
- (ev) => {
40
- switch (ev.key) {
41
- case 'Escape': {
42
- setText('');
43
- break;
44
- }
45
-
46
- case 'Enter': {
47
- const value = text.trim();
48
- if (value.length > 0) {
49
- scroller.current?.scrollToBottom();
50
- onSubmit?.(value);
51
- setText('');
52
- }
53
- break;
54
- }
55
- }
56
- },
57
- [text],
58
- );
59
-
60
- /**
61
- * Reduce message blocks into collections of messages that contain related contiguous blocks.
62
- * For example, collapse all tool request/response pairs into a single message.
63
- */
64
- // TODO(dmaretskyi): This needs to be a separate type: `id` is not a valid ObjectId, this needs to accommodate messageId for deletion.
65
- const { messages: lines = [] } = useMemo(() => {
66
- if (!collapse) {
67
- return { messages: messages ?? [] };
68
- }
69
-
70
- return (messages ?? []).reduce<{ messages: Message[]; current?: Message }>(
71
- ({ current, messages }, message) => {
72
- let i = 0;
73
- for (const block of message.content) {
74
- switch (block.type) {
75
- case 'tool_use':
76
- case 'tool_result': {
77
- if (current) {
78
- current.content.push(block);
79
- } else {
80
- current = {
81
- id: [message.id, i].join('_'),
82
- role: message.role,
83
- content: [block],
84
- };
85
- messages.push(current);
86
- }
87
- break;
88
- }
89
-
90
- case 'text':
91
- default: {
92
- current = undefined;
93
- messages.push({
94
- id: [message.id, i].join('_'),
95
- role: message.role,
96
- content: [block],
97
- });
98
- break;
99
- }
100
- }
101
-
102
- i++;
103
- }
104
-
105
- return { current, messages };
106
- },
107
- { messages: [] as Message[] },
108
- );
109
- }, [messages, collapse]);
110
-
111
- return (
112
- <div className='flex flex-col grow overflow-hidden'>
113
- <ScrollContainer ref={scroller} classNames='py-2 gap-2 overflow-x-hidden'>
114
- {lines.map((message) => (
115
- <ThreadMessage
116
- key={message.id}
117
- classNames='px-4'
118
- message={message}
119
- collapse={collapse}
120
- debug={debug}
121
- onSuggest={onSuggest}
122
- onDelete={onDelete}
123
- />
124
- ))}
125
- </ScrollContainer>
126
-
127
- {onSubmit && (
128
- <div className='flex p-4 gap-3 items-center'>
129
- <Spinner active={streaming} />
130
- <Input.Root>
131
- <Input.TextInput
132
- autoFocus
133
- classNames='px-2 baseSurface rounded'
134
- placeholder={t('chat input placeholder')}
135
- value={text}
136
- onChange={(ev) => setText(ev.target.value)}
137
- onKeyDown={handleKeyDown}
138
- />
139
- </Input.Root>
140
- {onStop && (
141
- <IconButton
142
- disabled={!streaming}
143
- classNames={mx('!p-1 !opacity-20 transition', streaming && '!opacity-80')}
144
- variant='ghost'
145
- size={5}
146
- onClick={onStop}
147
- icon='ph--x--regular'
148
- label={t('chat stop')}
149
- iconOnly
150
- />
151
- )}
152
- </div>
153
- )}
154
- </div>
155
- );
156
- };