@dxos/plugin-automation 0.7.5-labs.ff2ff30 → 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 (317) 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-R4JH4TLE.mjs → chunk-OFDNNRLE.mjs} +3 -8
  4. package/dist/lib/browser/chunk-OFDNNRLE.mjs.map +7 -0
  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 +21 -377
  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-QXIHYOMF.cjs → AutomationPanel-X33HHDMQ.cjs} +19 -132
  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-EQYHOTGG.cjs → chunk-ORMEYEBE.cjs} +6 -12
  23. package/dist/lib/node/chunk-ORMEYEBE.cjs.map +7 -0
  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 +36 -378
  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-LWDY7SQG.cjs → react-surface-2WRVAPGR.cjs} +9 -34
  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-EMVA6QUT.mjs → chunk-6MUUH67V.mjs} +3 -8
  34. package/dist/lib/node-esm/chunk-6MUUH67V.mjs.map +7 -0
  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 +21 -377
  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 -12
  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 -2
  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 +1 -94
  69. package/dist/types/src/translations.d.ts.map +1 -1
  70. package/package.json +23 -73
  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 +3 -23
  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/index.ts +0 -8
  79. package/src/index.ts +2 -3
  80. package/src/meta.ts +1 -4
  81. package/src/testing/index.ts +0 -1
  82. package/src/testing/test-functions.ts +0 -7
  83. package/src/translations.ts +1 -29
  84. package/dist/lib/browser/AutomationPanel-VW2XIUPU.mjs +0 -8
  85. package/dist/lib/browser/AutomationPanel-VW2XIUPU.mjs.map +0 -7
  86. package/dist/lib/browser/ChatContainer-5TAVTN3T.mjs +0 -12
  87. package/dist/lib/browser/ChatContainer-5TAVTN3T.mjs.map +0 -7
  88. package/dist/lib/browser/ai-client-5CNY6JBF.mjs +0 -22
  89. package/dist/lib/browser/ai-client-5CNY6JBF.mjs.map +0 -7
  90. package/dist/lib/browser/app-graph-builder-FZGK55G7.mjs +0 -197
  91. package/dist/lib/browser/app-graph-builder-FZGK55G7.mjs.map +0 -7
  92. package/dist/lib/browser/chunk-2H2EUYXL.mjs +0 -15
  93. package/dist/lib/browser/chunk-2H2EUYXL.mjs.map +0 -7
  94. package/dist/lib/browser/chunk-DVE33EZL.mjs +0 -1602
  95. package/dist/lib/browser/chunk-DVE33EZL.mjs.map +0 -7
  96. package/dist/lib/browser/chunk-MJK7GL5P.mjs +0 -307
  97. package/dist/lib/browser/chunk-MJK7GL5P.mjs.map +0 -7
  98. package/dist/lib/browser/chunk-NQFZ6XRX.mjs +0 -243
  99. package/dist/lib/browser/chunk-NQFZ6XRX.mjs.map +0 -7
  100. package/dist/lib/browser/chunk-Q4IMHYGH.mjs +0 -150
  101. package/dist/lib/browser/chunk-Q4IMHYGH.mjs.map +0 -7
  102. package/dist/lib/browser/chunk-R4JH4TLE.mjs.map +0 -7
  103. package/dist/lib/browser/intent-resolver-BWAXKT27.mjs +0 -29
  104. package/dist/lib/browser/intent-resolver-BWAXKT27.mjs.map +0 -7
  105. package/dist/lib/browser/react-surface-ILBDBZCN.mjs +0 -58
  106. package/dist/lib/browser/react-surface-ILBDBZCN.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-G6EDDYWW.cjs +0 -26
  110. package/dist/lib/node/AutomationPanel-G6EDDYWW.cjs.map +0 -7
  111. package/dist/lib/node/ChatContainer-EN24W3K4.cjs +0 -33
  112. package/dist/lib/node/ChatContainer-EN24W3K4.cjs.map +0 -7
  113. package/dist/lib/node/ai-client-FKLPDELV.cjs +0 -38
  114. package/dist/lib/node/ai-client-FKLPDELV.cjs.map +0 -7
  115. package/dist/lib/node/app-graph-builder-T76NYV42.cjs +0 -212
  116. package/dist/lib/node/app-graph-builder-T76NYV42.cjs.map +0 -7
  117. package/dist/lib/node/chunk-CJGJXNY3.cjs +0 -1586
  118. package/dist/lib/node/chunk-CJGJXNY3.cjs.map +0 -7
  119. package/dist/lib/node/chunk-EQYHOTGG.cjs.map +0 -7
  120. package/dist/lib/node/chunk-GB7245FH.cjs +0 -173
  121. package/dist/lib/node/chunk-GB7245FH.cjs.map +0 -7
  122. package/dist/lib/node/chunk-HMBKP6VG.cjs +0 -324
  123. package/dist/lib/node/chunk-HMBKP6VG.cjs.map +0 -7
  124. package/dist/lib/node/chunk-QXIHYOMF.cjs.map +0 -7
  125. package/dist/lib/node/chunk-U5Z7LFWB.cjs +0 -34
  126. package/dist/lib/node/chunk-U5Z7LFWB.cjs.map +0 -7
  127. package/dist/lib/node/intent-resolver-C6OKFVEW.cjs +0 -44
  128. package/dist/lib/node/intent-resolver-C6OKFVEW.cjs.map +0 -7
  129. package/dist/lib/node/react-surface-LWDY7SQG.cjs.map +0 -7
  130. package/dist/lib/node/types/index.cjs +0 -46
  131. package/dist/lib/node/types/index.cjs.map +0 -7
  132. package/dist/lib/node-esm/AutomationPanel-V3IWQAMO.mjs +0 -9
  133. package/dist/lib/node-esm/AutomationPanel-V3IWQAMO.mjs.map +0 -7
  134. package/dist/lib/node-esm/ChatContainer-CNTY3C2D.mjs +0 -13
  135. package/dist/lib/node-esm/ChatContainer-CNTY3C2D.mjs.map +0 -7
  136. package/dist/lib/node-esm/ai-client-XGNA6SJ5.mjs +0 -23
  137. package/dist/lib/node-esm/ai-client-XGNA6SJ5.mjs.map +0 -7
  138. package/dist/lib/node-esm/app-graph-builder-IJQEN7WT.mjs +0 -198
  139. package/dist/lib/node-esm/app-graph-builder-IJQEN7WT.mjs.map +0 -7
  140. package/dist/lib/node-esm/chunk-6HLBYDUI.mjs +0 -244
  141. package/dist/lib/node-esm/chunk-6HLBYDUI.mjs.map +0 -7
  142. package/dist/lib/node-esm/chunk-DNCXRGAF.mjs +0 -151
  143. package/dist/lib/node-esm/chunk-DNCXRGAF.mjs.map +0 -7
  144. package/dist/lib/node-esm/chunk-EMVA6QUT.mjs.map +0 -7
  145. package/dist/lib/node-esm/chunk-IJRTDSKN.mjs +0 -16
  146. package/dist/lib/node-esm/chunk-IJRTDSKN.mjs.map +0 -7
  147. package/dist/lib/node-esm/chunk-QP47VJT6.mjs +0 -1603
  148. package/dist/lib/node-esm/chunk-QP47VJT6.mjs.map +0 -7
  149. package/dist/lib/node-esm/chunk-ZLIAMW45.mjs +0 -308
  150. package/dist/lib/node-esm/chunk-ZLIAMW45.mjs.map +0 -7
  151. package/dist/lib/node-esm/intent-resolver-DCP4ZDBA.mjs +0 -30
  152. package/dist/lib/node-esm/intent-resolver-DCP4ZDBA.mjs.map +0 -7
  153. package/dist/lib/node-esm/react-surface-SBDXFVIN.mjs +0 -59
  154. package/dist/lib/node-esm/react-surface-SBDXFVIN.mjs.map +0 -7
  155. package/dist/lib/node-esm/types/index.mjs +0 -25
  156. package/dist/lib/node-esm/types/index.mjs.map +0 -7
  157. package/dist/types/src/artifacts.stories.d.ts +0 -16
  158. package/dist/types/src/artifacts.stories.d.ts.map +0 -1
  159. package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
  160. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -181
  161. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  162. package/dist/types/src/capabilities/capabilities.d.ts +0 -5
  163. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  164. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  165. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  166. package/dist/types/src/components/AmbientChatDialog/AmbientChatDialog.d.ts +0 -3
  167. package/dist/types/src/components/AmbientChatDialog/AmbientChatDialog.d.ts.map +0 -1
  168. package/dist/types/src/components/AmbientChatDialog/index.d.ts +0 -2
  169. package/dist/types/src/components/AmbientChatDialog/index.d.ts.map +0 -1
  170. package/dist/types/src/components/Box/StatusLine.d.ts +0 -11
  171. package/dist/types/src/components/Box/StatusLine.d.ts.map +0 -1
  172. package/dist/types/src/components/Box/StatusLine.stories.d.ts +0 -9
  173. package/dist/types/src/components/Box/StatusLine.stories.d.ts.map +0 -1
  174. package/dist/types/src/components/Box/Tabbed.d.ts +0 -15
  175. package/dist/types/src/components/Box/Tabbed.d.ts.map +0 -1
  176. package/dist/types/src/components/Box/Tabbed.stories.d.ts +0 -8
  177. package/dist/types/src/components/Box/Tabbed.stories.d.ts.map +0 -1
  178. package/dist/types/src/components/Box/ToggleContainer.d.ts +0 -13
  179. package/dist/types/src/components/Box/ToggleContainer.d.ts.map +0 -1
  180. package/dist/types/src/components/Box/ToggleContainer.stories.d.ts +0 -9
  181. package/dist/types/src/components/Box/ToggleContainer.stories.d.ts.map +0 -1
  182. package/dist/types/src/components/Box/index.d.ts +0 -4
  183. package/dist/types/src/components/Box/index.d.ts.map +0 -1
  184. package/dist/types/src/components/ChatContainer/ChatContainer.d.ts +0 -7
  185. package/dist/types/src/components/ChatContainer/ChatContainer.d.ts.map +0 -1
  186. package/dist/types/src/components/ChatContainer/index.d.ts +0 -4
  187. package/dist/types/src/components/ChatContainer/index.d.ts.map +0 -1
  188. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts +0 -14
  189. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts.map +0 -1
  190. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts +0 -8
  191. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts.map +0 -1
  192. package/dist/types/src/components/MarkdownViewer/index.d.ts +0 -2
  193. package/dist/types/src/components/MarkdownViewer/index.d.ts.map +0 -1
  194. package/dist/types/src/components/Prompt/Prompt.d.ts +0 -7
  195. package/dist/types/src/components/Prompt/Prompt.d.ts.map +0 -1
  196. package/dist/types/src/components/Prompt/Prompt.stories.d.ts +0 -8
  197. package/dist/types/src/components/Prompt/Prompt.stories.d.ts.map +0 -1
  198. package/dist/types/src/components/Prompt/index.d.ts +0 -2
  199. package/dist/types/src/components/Prompt/index.d.ts.map +0 -1
  200. package/dist/types/src/components/Prompt/prompt-autocomplete.d.ts +0 -20
  201. package/dist/types/src/components/Prompt/prompt-autocomplete.d.ts.map +0 -1
  202. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts +0 -10
  203. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts.map +0 -1
  204. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts +0 -6
  205. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts.map +0 -1
  206. package/dist/types/src/components/PromptEditor/index.d.ts +0 -2
  207. package/dist/types/src/components/PromptEditor/index.d.ts.map +0 -1
  208. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts +0 -4
  209. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts.map +0 -1
  210. package/dist/types/src/components/PromptEditor/types.d.ts +0 -18
  211. package/dist/types/src/components/PromptEditor/types.d.ts.map +0 -1
  212. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts +0 -6
  213. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts.map +0 -1
  214. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts +0 -8
  215. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts.map +0 -1
  216. package/dist/types/src/components/ServiceRegistry/index.d.ts +0 -2
  217. package/dist/types/src/components/ServiceRegistry/index.d.ts.map +0 -1
  218. package/dist/types/src/components/Thread/Thread.d.ts +0 -11
  219. package/dist/types/src/components/Thread/Thread.d.ts.map +0 -1
  220. package/dist/types/src/components/Thread/Thread.stories.d.ts +0 -11
  221. package/dist/types/src/components/Thread/Thread.stories.d.ts.map +0 -1
  222. package/dist/types/src/components/Thread/ThreadMessage.d.ts +0 -12
  223. package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +0 -1
  224. package/dist/types/src/components/Thread/index.d.ts +0 -2
  225. package/dist/types/src/components/Thread/index.d.ts.map +0 -1
  226. package/dist/types/src/hooks/email.d.ts +0 -4
  227. package/dist/types/src/hooks/email.d.ts.map +0 -1
  228. package/dist/types/src/hooks/index.d.ts +0 -6
  229. package/dist/types/src/hooks/index.d.ts.map +0 -1
  230. package/dist/types/src/hooks/invocation-handler.d.ts +0 -5
  231. package/dist/types/src/hooks/invocation-handler.d.ts.map +0 -1
  232. package/dist/types/src/hooks/processor.d.ts +0 -70
  233. package/dist/types/src/hooks/processor.d.ts.map +0 -1
  234. package/dist/types/src/hooks/processor.test.d.ts +0 -2
  235. package/dist/types/src/hooks/processor.test.d.ts.map +0 -1
  236. package/dist/types/src/hooks/useChatProcessor.d.ts +0 -7
  237. package/dist/types/src/hooks/useChatProcessor.d.ts.map +0 -1
  238. package/dist/types/src/hooks/useLocalTriggerManager.d.ts +0 -3
  239. package/dist/types/src/hooks/useLocalTriggerManager.d.ts.map +0 -1
  240. package/dist/types/src/hooks/useMessageQueue.d.ts +0 -41
  241. package/dist/types/src/hooks/useMessageQueue.d.ts.map +0 -1
  242. package/dist/types/src/hooks/useServices.d.ts +0 -7
  243. package/dist/types/src/hooks/useServices.d.ts.map +0 -1
  244. package/dist/types/src/presets.d.ts +0 -9
  245. package/dist/types/src/presets.d.ts.map +0 -1
  246. package/dist/types/src/testing/test-services.d.ts +0 -5
  247. package/dist/types/src/testing/test-services.d.ts.map +0 -1
  248. package/dist/types/src/tools/function.d.ts +0 -5
  249. package/dist/types/src/tools/function.d.ts.map +0 -1
  250. package/dist/types/src/tools/index.d.ts +0 -3
  251. package/dist/types/src/tools/index.d.ts.map +0 -1
  252. package/dist/types/src/tools/openapi.d.ts +0 -10
  253. package/dist/types/src/tools/openapi.d.ts.map +0 -1
  254. package/dist/types/src/tools/openapi.test.d.ts +0 -2
  255. package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
  256. package/dist/types/src/types/index.d.ts +0 -4
  257. package/dist/types/src/types/index.d.ts.map +0 -1
  258. package/dist/types/src/types/registry.d.ts +0 -10
  259. package/dist/types/src/types/registry.d.ts.map +0 -1
  260. package/dist/types/src/types/schema.d.ts +0 -221
  261. package/dist/types/src/types/schema.d.ts.map +0 -1
  262. package/dist/types/src/types/types.d.ts +0 -18
  263. package/dist/types/src/types/types.d.ts.map +0 -1
  264. package/src/artifacts.stories.tsx +0 -241
  265. package/src/capabilities/ai-client.ts +0 -19
  266. package/src/capabilities/app-graph-builder.ts +0 -187
  267. package/src/capabilities/capabilities.ts +0 -12
  268. package/src/capabilities/intent-resolver.ts +0 -27
  269. package/src/components/AmbientChatDialog/AmbientChatDialog.tsx +0 -26
  270. package/src/components/AmbientChatDialog/index.ts +0 -5
  271. package/src/components/Box/StatusLine.stories.tsx +0 -52
  272. package/src/components/Box/StatusLine.tsx +0 -76
  273. package/src/components/Box/Tabbed.stories.tsx +0 -51
  274. package/src/components/Box/Tabbed.tsx +0 -89
  275. package/src/components/Box/ToggleContainer.stories.tsx +0 -110
  276. package/src/components/Box/ToggleContainer.tsx +0 -108
  277. package/src/components/Box/index.ts +0 -7
  278. package/src/components/ChatContainer/ChatContainer.tsx +0 -52
  279. package/src/components/ChatContainer/index.ts +0 -8
  280. package/src/components/MarkdownViewer/MarkdownViewer.stories.tsx +0 -56
  281. package/src/components/MarkdownViewer/MarkdownViewer.tsx +0 -79
  282. package/src/components/MarkdownViewer/index.ts +0 -5
  283. package/src/components/Prompt/Prompt.stories.tsx +0 -50
  284. package/src/components/Prompt/Prompt.tsx +0 -36
  285. package/src/components/Prompt/index.ts +0 -5
  286. package/src/components/Prompt/prompt-autocomplete.ts +0 -200
  287. package/src/components/PromptEditor/PromptEditor.stories.tsx +0 -64
  288. package/src/components/PromptEditor/PromptEditor.tsx +0 -222
  289. package/src/components/PromptEditor/index.ts +0 -5
  290. package/src/components/PromptEditor/prompt-extension.ts +0 -43
  291. package/src/components/PromptEditor/types.tsx +0 -28
  292. package/src/components/ServiceRegistry/ServiceRegistry.stories.tsx +0 -49
  293. package/src/components/ServiceRegistry/ServiceRegistry.tsx +0 -75
  294. package/src/components/ServiceRegistry/index.ts +0 -5
  295. package/src/components/Thread/Thread.stories.tsx +0 -197
  296. package/src/components/Thread/Thread.tsx +0 -156
  297. package/src/components/Thread/ThreadMessage.tsx +0 -225
  298. package/src/components/Thread/index.ts +0 -5
  299. package/src/hooks/email.ts +0 -49
  300. package/src/hooks/index.ts +0 -10
  301. package/src/hooks/invocation-handler.ts +0 -109
  302. package/src/hooks/processor.test.ts +0 -15
  303. package/src/hooks/processor.ts +0 -210
  304. package/src/hooks/useChatProcessor.tsx +0 -86
  305. package/src/hooks/useLocalTriggerManager.ts +0 -82
  306. package/src/hooks/useMessageQueue.ts +0 -23
  307. package/src/hooks/useServices.ts +0 -28
  308. package/src/presets.ts +0 -248
  309. package/src/testing/test-services.ts +0 -131
  310. package/src/tools/function.ts +0 -47
  311. package/src/tools/index.ts +0 -6
  312. package/src/tools/openapi.test.ts +0 -227
  313. package/src/tools/openapi.ts +0 -331
  314. package/src/types/index.ts +0 -7
  315. package/src/types/registry.ts +0 -26
  316. package/src/types/schema.ts +0 -132
  317. package/src/types/types.ts +0 -21
@@ -1,222 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import { type Schema as S } from '@effect/schema';
6
- import React, { useEffect } from 'react';
7
-
8
- import { createDocAccessor } from '@dxos/react-client/echo';
9
- import { Input, Select, useThemeContext, useTranslation } from '@dxos/react-ui';
10
- import {
11
- createBasicExtensions,
12
- createDataExtensions,
13
- createThemeExtensions,
14
- useTextEditor,
15
- } from '@dxos/react-ui-editor';
16
- import { attentionSurface, groupBorder, mx } from '@dxos/react-ui-theme';
17
- import { nonNullable } from '@dxos/util';
18
-
19
- import { nameRegex, promptExtension } from './prompt-extension';
20
- import { AUTOMATION_PLUGIN } from '../../meta';
21
- import { type ChainInput, ChainInputType, type ChainPromptType } from '../../types';
22
-
23
- const inputTypes = [
24
- {
25
- value: ChainInputType.VALUE,
26
- label: 'Value',
27
- },
28
- {
29
- value: ChainInputType.PASS_THROUGH,
30
- label: 'Pass through',
31
- },
32
- {
33
- value: ChainInputType.RETRIEVER,
34
- label: 'Retriever',
35
- },
36
- // {
37
- // value: ChainInputType.FUNCTION,
38
- // label: 'Function',
39
- // },
40
- // {
41
- // value: ChainInputType.QUERY,
42
- // label: 'Query',
43
- // },
44
- {
45
- value: ChainInputType.RESOLVER,
46
- label: 'Resolver',
47
- },
48
- {
49
- value: ChainInputType.CONTEXT,
50
- label: 'Context',
51
- },
52
- {
53
- value: ChainInputType.SCHEMA,
54
- label: 'Schema',
55
- },
56
- ];
57
-
58
- const getInputType = (type: string) => inputTypes.find(({ value }) => String(value) === type)?.value;
59
-
60
- const usePromptInputs = (prompt: ChainPromptType) => {
61
- useEffect(() => {
62
- const text = prompt.template ?? '';
63
- if (!prompt.inputs) {
64
- prompt.inputs = []; // TODO(burdon): Required?
65
- }
66
-
67
- const regex = new RegExp(nameRegex, 'g');
68
- const variables = new Set<string>([...text.matchAll(regex)].map((m) => m[1]));
69
-
70
- // Create map of unclaimed inputs.
71
- const unclaimed = new Map<string, ChainInput>(
72
- prompt.inputs?.filter(nonNullable).map((input) => [input.name, input]),
73
- );
74
- const missing: string[] = [];
75
- Array.from(variables.values()).forEach((name) => {
76
- if (unclaimed.has(name)) {
77
- unclaimed.delete(name);
78
- } else {
79
- missing.push(name);
80
- }
81
- });
82
-
83
- // Match or create new inputs.
84
- const values = unclaimed.values();
85
- missing.forEach((name) => {
86
- const next = values.next().value;
87
- if (next) {
88
- next.name = name;
89
- } else {
90
- prompt.inputs?.push({ name });
91
- }
92
- });
93
-
94
- // Remove unclaimed (deleted) inputs.
95
- // TODO(burdon): If user types incorrect name value, it will be deleted. Garbage collect?
96
- for (const input of values) {
97
- prompt.inputs.splice(prompt.inputs.indexOf(input), 1);
98
- }
99
- }, [prompt.template]);
100
- };
101
-
102
- export type PromptEditorProps = {
103
- prompt: ChainPromptType;
104
- commandEditable?: boolean;
105
- schema?: S.Schema<any, any, any>;
106
- };
107
-
108
- export const PromptEditor = ({ prompt, commandEditable = true }: PromptEditorProps) => {
109
- const { t } = useTranslation(AUTOMATION_PLUGIN);
110
- const { themeMode } = useThemeContext();
111
-
112
- const { parentRef } = useTextEditor(
113
- () => ({
114
- initialValue: prompt.template,
115
- extensions: [
116
- createDataExtensions({
117
- id: prompt.id,
118
- text: prompt.template !== undefined ? createDocAccessor(prompt, ['template']) : undefined,
119
- }),
120
- createBasicExtensions({
121
- bracketMatching: false,
122
- lineWrapping: true,
123
- placeholder: t('template placeholder'),
124
- }),
125
- createThemeExtensions({
126
- themeMode,
127
- slots: {
128
- content: { className: '!p-3' },
129
- },
130
- }),
131
- promptExtension,
132
- ],
133
- }),
134
- [themeMode, prompt],
135
- );
136
-
137
- usePromptInputs(prompt);
138
-
139
- return (
140
- <div className={mx('flex flex-col w-full overflow-hidden gap-4', groupBorder)}>
141
- {commandEditable && (
142
- <div className='flex items-center pl-4'>
143
- <span className='text-neutral-500'>/</span>
144
- <Input.Root>
145
- <Input.TextInput
146
- placeholder={t('command placeholder')}
147
- classNames={mx('is-full bg-transparent m-2')}
148
- value={prompt.command ?? ''}
149
- onChange={(event) => {
150
- prompt.command = event.target.value.replace(/\w/g, '');
151
- }}
152
- />
153
- </Input.Root>
154
- </div>
155
- )}
156
-
157
- <div ref={parentRef} className={mx(attentionSurface, 'rounded', 'min-h-[120px]')} />
158
-
159
- {(prompt.inputs?.length ?? 0) > 0 && (
160
- <div className='flex flex-col'>
161
- {/* TODO(zan): Improve layout with grid */}
162
- <table className='w-full table-fixed border-collapse my-2'>
163
- <tbody>
164
- {prompt.inputs?.filter(nonNullable).map((input) => (
165
- <tr key={input.name}>
166
- <td className='w-[160px] p-1 font-mono text-sm whitespace-nowrap truncate'>
167
- <code className='px-2'>{input.name}</code>
168
- </td>
169
- <td className='w-[120px] p-1'>
170
- <Input.Root>
171
- <Select.Root
172
- value={String(input.type)}
173
- onValueChange={(type) => {
174
- input.type = getInputType(type) ?? ChainInputType.VALUE;
175
- }}
176
- >
177
- <Select.TriggerButton placeholder='Type' classNames='is-full' />
178
- <Select.Portal>
179
- <Select.Content>
180
- <Select.Viewport>
181
- {inputTypes.map(({ value, label }) => (
182
- <Select.Option key={value} value={String(value)}>
183
- {label}
184
- </Select.Option>
185
- ))}
186
- </Select.Viewport>
187
- </Select.Content>
188
- </Select.Portal>
189
- </Select.Root>
190
- </Input.Root>
191
- </td>
192
- <td className='p-1 pr-2'>
193
- {input.type !== undefined &&
194
- [
195
- ChainInputType.VALUE,
196
- ChainInputType.CONTEXT,
197
- ChainInputType.RESOLVER,
198
- ChainInputType.SCHEMA,
199
- ].includes(input.type) && (
200
- <div>
201
- <Input.Root>
202
- <Input.TextInput
203
- placeholder={t('command placeholder')}
204
- classNames={mx('is-full bg-transparent')}
205
- value={input.value ?? ''}
206
- onChange={(event) => {
207
- input.value = event.target.value;
208
- }}
209
- />
210
- </Input.Root>
211
- </div>
212
- )}
213
- </td>
214
- </tr>
215
- ))}
216
- </tbody>
217
- </table>
218
- </div>
219
- )}
220
- </div>
221
- );
222
- };
@@ -1,5 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- export * from './PromptEditor';
@@ -1,43 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import { HighlightStyle, StreamLanguage, syntaxHighlighting } from '@codemirror/language';
6
- import { type Extension } from '@codemirror/state';
7
-
8
- import { tags } from '@dxos/react-ui-editor';
9
- import { mx } from '@dxos/react-ui-theme';
10
-
11
- export const nameRegex = /\{([\w-]+)}/;
12
-
13
- const parser = StreamLanguage.define({
14
- token: (stream) => {
15
- if (stream.eatSpace()) {
16
- return null;
17
- }
18
- if (stream.match(/^#.*/)) {
19
- return 'lineComment';
20
- }
21
- if (stream.match(/^-+$/)) {
22
- return 'lineComment';
23
- }
24
- if (stream.match(nameRegex)) {
25
- return 'variableName';
26
- }
27
- stream.next();
28
- return null;
29
- },
30
- });
31
-
32
- /**
33
- * https://codemirror.net/examples/styling
34
- * https://lezer.codemirror.net/docs/ref/#highlight
35
- */
36
- const highlightStyles = HighlightStyle.define([
37
- {
38
- tag: tags.variableName,
39
- class: mx('rounded border border-yellow-500 bg-yellow-100 text-black font-mono text-sm'),
40
- },
41
- ]);
42
-
43
- export const promptExtension: Extension = [parser, syntaxHighlighting(highlightStyles)];
@@ -1,28 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- // TODO(burdon): Factor out (shared with backend). core/chain (@dxos/chain).
6
- // TODO(burdon): Agent/plan-and-execute (with tools). Create design doc/ontology of sequence/agent.
7
-
8
- export type Step = {
9
- id: string;
10
- };
11
-
12
- export type Variable = {
13
- name: string;
14
- type: 'value' | 'function' | 'query' | 'retriever' | 'pass-through';
15
- };
16
-
17
- export type Prompt = Step & {
18
- title?: string;
19
- description?: string;
20
- template: string;
21
- variables: Variable[];
22
- };
23
-
24
- export type Sequence = Step & {
25
- runnable: Step[];
26
- };
27
-
28
- export type Chain = {};
@@ -1,49 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type Meta, type StoryObj } from '@storybook/react';
8
- import React from 'react';
9
-
10
- import { useSpace } from '@dxos/react-client/echo';
11
- import { withClientProvider } from '@dxos/react-client/testing';
12
- import { withLayout, withTheme } from '@dxos/storybook-utils';
13
-
14
- import { ServiceRegistry } from './ServiceRegistry';
15
- import { ServiceType } from '../../types';
16
-
17
- const meta: Meta<typeof ServiceRegistry> = {
18
- title: 'plugins/plugin-automation/ServiceRegistry',
19
- component: ServiceRegistry,
20
- render: ({ space: _ignore, ...args }) => {
21
- const space = useSpace();
22
- if (!space) {
23
- return <div />;
24
- }
25
-
26
- return (
27
- <div className='h-full w-[300px] overflow-hidden'>
28
- <ServiceRegistry space={space} {...args} />
29
- </div>
30
- );
31
- },
32
- decorators: [
33
- withClientProvider({
34
- createIdentity: true,
35
- createSpace: true,
36
- types: [ServiceType],
37
- }),
38
- withLayout({ fullscreen: true, tooltips: true, classNames: 'flex justify-center' }),
39
- withTheme,
40
- ],
41
- };
42
-
43
- export default meta;
44
-
45
- type Story = StoryObj<typeof ServiceRegistry>;
46
-
47
- export const Default: Story = {
48
- args: {},
49
- };
@@ -1,75 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React, { useMemo } from 'react';
6
-
7
- import { Filter, type Space } from '@dxos/client/echo';
8
- import { useQuery } from '@dxos/react-client/echo';
9
- import { Icon, Input, List, ListItem } from '@dxos/react-ui';
10
-
11
- import { useServices } from '../../hooks';
12
- import { categoryIcons, ServiceType } from '../../types';
13
-
14
- // TODO(burdon): Option to show all/enabled/filter.
15
- export const ServiceRegistry = ({ space }: { space: Space }) => {
16
- const matchingServices = useServices(space);
17
- const enabledServices = useQuery(space, Filter.schema(ServiceType));
18
-
19
- // Join matching services with enabled services.
20
- const services = useMemo(() => {
21
- return matchingServices.map((service) => enabledServices.find((s) => s.serviceId === service.serviceId) ?? service);
22
- }, [matchingServices, enabledServices]);
23
-
24
- const handleSetEnabled = (service: ServiceType, enabled: boolean) => {
25
- if (enabled) {
26
- space.db.add(service);
27
- } else {
28
- // TODO(burdon): Remove or disable?
29
- space.db.remove(service);
30
- }
31
- };
32
-
33
- return (
34
- <List classNames='h-full grid auto-rows-[5rem] gap-2 p-2 pis-2 pie-2 overflow-y-auto scrollbar-thin'>
35
- {services.map((service) => (
36
- <ServiceItem
37
- key={service.serviceId}
38
- service={service}
39
- enabled={service.enabled}
40
- setEnabled={(enabled) => handleSetEnabled(service, enabled)}
41
- />
42
- ))}
43
- </List>
44
- );
45
- };
46
-
47
- const ServiceItem = ({
48
- service,
49
- enabled,
50
- setEnabled,
51
- }: {
52
- service: ServiceType;
53
- enabled?: boolean;
54
- setEnabled?: (enabled: boolean) => void;
55
- }) => {
56
- return (
57
- <ListItem.Root classNames='flex flex-col gap-1 p-1 overflow-hidden rounded-md border border-separator'>
58
- <div className='grid grid-cols-[40px_1fr_40px]'>
59
- <div className='flex gow justify-center items-center'>
60
- <Icon icon={categoryIcons[service.category ?? 'default'] ?? 'ph--placeholder--regular'} size={6} />
61
- </div>
62
- <div className='grow items-center truncate mie-2'>{service.name}</div>
63
- <div className='flex gow justify-center items-center'>
64
- <Input.Root>
65
- <Input.Switch checked={enabled} onClick={() => setEnabled?.(!enabled)} />
66
- </Input.Root>
67
- </div>
68
- </div>
69
- <div className='grid grid-cols-[40px_1fr]'>
70
- <div />
71
- <div className='text-sm text-subdued line-clamp-2 mie-1'>{service.description}</div>
72
- </div>
73
- </ListItem.Root>
74
- );
75
- };
@@ -1,5 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- export * from './ServiceRegistry';
@@ -1,197 +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 Collapse: Story = {
174
- args: {
175
- collapse: true,
176
- messages: TEST_MESSAGES,
177
- },
178
- };
179
-
180
- export const Incremental: Story = {
181
- render: () => {
182
- const [messages, setMessages] = useState<Message[]>([]);
183
- useEffect(() => {
184
- let i = 0;
185
- const interval = setInterval(() => {
186
- setMessages((messages) => [...messages, TEST_MESSAGES[i++]]);
187
- if (i >= TEST_MESSAGES.length) {
188
- clearInterval(interval);
189
- }
190
- }, 2_000);
191
-
192
- return () => clearInterval(interval);
193
- }, []);
194
-
195
- return <Render messages={messages} collapse />;
196
- },
197
- };