@dxos/plugin-automation 0.7.5-labs.c0e040f → 0.7.5-labs.d199c0f

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 (320) 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-JT6SVCPK.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 -74
  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-OLRZNGWK.mjs +0 -12
  87. package/dist/lib/browser/ChatContainer-OLRZNGWK.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-6H7MDCXE.mjs +0 -197
  91. package/dist/lib/browser/app-graph-builder-6H7MDCXE.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-ITG6CBKL.mjs +0 -1602
  95. package/dist/lib/browser/chunk-ITG6CBKL.mjs.map +0 -7
  96. package/dist/lib/browser/chunk-MRBC5J4T.mjs +0 -518
  97. package/dist/lib/browser/chunk-MRBC5J4T.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-O6SHIBCA.mjs +0 -58
  106. package/dist/lib/browser/react-surface-O6SHIBCA.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-GRZDJIG5.cjs +0 -33
  112. package/dist/lib/node/ChatContainer-GRZDJIG5.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-7JMJLZIE.cjs +0 -212
  116. package/dist/lib/node/app-graph-builder-7JMJLZIE.cjs.map +0 -7
  117. package/dist/lib/node/chunk-CFBERLTN.cjs +0 -1586
  118. package/dist/lib/node/chunk-CFBERLTN.cjs.map +0 -7
  119. package/dist/lib/node/chunk-EQYHOTGG.cjs.map +0 -7
  120. package/dist/lib/node/chunk-FQUY77HT.cjs +0 -527
  121. package/dist/lib/node/chunk-FQUY77HT.cjs.map +0 -7
  122. package/dist/lib/node/chunk-GB7245FH.cjs +0 -173
  123. package/dist/lib/node/chunk-GB7245FH.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-JT6SVCPK.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-ORVWQPJO.mjs +0 -13
  135. package/dist/lib/node-esm/ChatContainer-ORVWQPJO.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-C6NUQGCU.mjs +0 -198
  139. package/dist/lib/node-esm/app-graph-builder-C6NUQGCU.mjs.map +0 -7
  140. package/dist/lib/node-esm/chunk-2OKJZ4ZW.mjs +0 -519
  141. package/dist/lib/node-esm/chunk-2OKJZ4ZW.mjs.map +0 -7
  142. package/dist/lib/node-esm/chunk-6HLBYDUI.mjs +0 -244
  143. package/dist/lib/node-esm/chunk-6HLBYDUI.mjs.map +0 -7
  144. package/dist/lib/node-esm/chunk-7VPT3OO3.mjs +0 -1603
  145. package/dist/lib/node-esm/chunk-7VPT3OO3.mjs.map +0 -7
  146. package/dist/lib/node-esm/chunk-DNCXRGAF.mjs +0 -151
  147. package/dist/lib/node-esm/chunk-DNCXRGAF.mjs.map +0 -7
  148. package/dist/lib/node-esm/chunk-EMVA6QUT.mjs.map +0 -7
  149. package/dist/lib/node-esm/chunk-IJRTDSKN.mjs +0 -16
  150. package/dist/lib/node-esm/chunk-IJRTDSKN.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-DSVM33SA.mjs +0 -59
  154. package/dist/lib/node-esm/react-surface-DSVM33SA.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/AmbientChatDialog.stories.d.ts +0 -8
  169. package/dist/types/src/components/AmbientChatDialog/AmbientChatDialog.stories.d.ts.map +0 -1
  170. package/dist/types/src/components/AmbientChatDialog/index.d.ts +0 -2
  171. package/dist/types/src/components/AmbientChatDialog/index.d.ts.map +0 -1
  172. package/dist/types/src/components/Box/StatusLine.d.ts +0 -11
  173. package/dist/types/src/components/Box/StatusLine.d.ts.map +0 -1
  174. package/dist/types/src/components/Box/StatusLine.stories.d.ts +0 -9
  175. package/dist/types/src/components/Box/StatusLine.stories.d.ts.map +0 -1
  176. package/dist/types/src/components/Box/Tabbed.d.ts +0 -15
  177. package/dist/types/src/components/Box/Tabbed.d.ts.map +0 -1
  178. package/dist/types/src/components/Box/Tabbed.stories.d.ts +0 -8
  179. package/dist/types/src/components/Box/Tabbed.stories.d.ts.map +0 -1
  180. package/dist/types/src/components/Box/ToggleContainer.d.ts +0 -13
  181. package/dist/types/src/components/Box/ToggleContainer.d.ts.map +0 -1
  182. package/dist/types/src/components/Box/ToggleContainer.stories.d.ts +0 -9
  183. package/dist/types/src/components/Box/ToggleContainer.stories.d.ts.map +0 -1
  184. package/dist/types/src/components/Box/index.d.ts +0 -4
  185. package/dist/types/src/components/Box/index.d.ts.map +0 -1
  186. package/dist/types/src/components/ChatContainer/ChatContainer.d.ts +0 -7
  187. package/dist/types/src/components/ChatContainer/ChatContainer.d.ts.map +0 -1
  188. package/dist/types/src/components/ChatContainer/index.d.ts +0 -4
  189. package/dist/types/src/components/ChatContainer/index.d.ts.map +0 -1
  190. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts +0 -14
  191. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts.map +0 -1
  192. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts +0 -8
  193. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts.map +0 -1
  194. package/dist/types/src/components/MarkdownViewer/index.d.ts +0 -2
  195. package/dist/types/src/components/MarkdownViewer/index.d.ts.map +0 -1
  196. package/dist/types/src/components/Prompt/Prompt.d.ts +0 -7
  197. package/dist/types/src/components/Prompt/Prompt.d.ts.map +0 -1
  198. package/dist/types/src/components/Prompt/Prompt.stories.d.ts +0 -8
  199. package/dist/types/src/components/Prompt/Prompt.stories.d.ts.map +0 -1
  200. package/dist/types/src/components/Prompt/index.d.ts +0 -2
  201. package/dist/types/src/components/Prompt/index.d.ts.map +0 -1
  202. package/dist/types/src/components/Prompt/prompt-autocomplete.d.ts +0 -20
  203. package/dist/types/src/components/Prompt/prompt-autocomplete.d.ts.map +0 -1
  204. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts +0 -10
  205. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts.map +0 -1
  206. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts +0 -6
  207. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts.map +0 -1
  208. package/dist/types/src/components/PromptEditor/index.d.ts +0 -2
  209. package/dist/types/src/components/PromptEditor/index.d.ts.map +0 -1
  210. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts +0 -4
  211. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts.map +0 -1
  212. package/dist/types/src/components/PromptEditor/types.d.ts +0 -18
  213. package/dist/types/src/components/PromptEditor/types.d.ts.map +0 -1
  214. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts +0 -6
  215. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts.map +0 -1
  216. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts +0 -8
  217. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts.map +0 -1
  218. package/dist/types/src/components/ServiceRegistry/index.d.ts +0 -2
  219. package/dist/types/src/components/ServiceRegistry/index.d.ts.map +0 -1
  220. package/dist/types/src/components/Thread/Thread.d.ts +0 -11
  221. package/dist/types/src/components/Thread/Thread.d.ts.map +0 -1
  222. package/dist/types/src/components/Thread/Thread.stories.d.ts +0 -11
  223. package/dist/types/src/components/Thread/Thread.stories.d.ts.map +0 -1
  224. package/dist/types/src/components/Thread/ThreadMessage.d.ts +0 -12
  225. package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +0 -1
  226. package/dist/types/src/components/Thread/index.d.ts +0 -2
  227. package/dist/types/src/components/Thread/index.d.ts.map +0 -1
  228. package/dist/types/src/hooks/email.d.ts +0 -4
  229. package/dist/types/src/hooks/email.d.ts.map +0 -1
  230. package/dist/types/src/hooks/index.d.ts +0 -6
  231. package/dist/types/src/hooks/index.d.ts.map +0 -1
  232. package/dist/types/src/hooks/invocation-handler.d.ts +0 -5
  233. package/dist/types/src/hooks/invocation-handler.d.ts.map +0 -1
  234. package/dist/types/src/hooks/processor.d.ts +0 -70
  235. package/dist/types/src/hooks/processor.d.ts.map +0 -1
  236. package/dist/types/src/hooks/processor.test.d.ts +0 -2
  237. package/dist/types/src/hooks/processor.test.d.ts.map +0 -1
  238. package/dist/types/src/hooks/useChatProcessor.d.ts +0 -7
  239. package/dist/types/src/hooks/useChatProcessor.d.ts.map +0 -1
  240. package/dist/types/src/hooks/useLocalTriggerManager.d.ts +0 -3
  241. package/dist/types/src/hooks/useLocalTriggerManager.d.ts.map +0 -1
  242. package/dist/types/src/hooks/useMessageQueue.d.ts +0 -41
  243. package/dist/types/src/hooks/useMessageQueue.d.ts.map +0 -1
  244. package/dist/types/src/hooks/useServices.d.ts +0 -7
  245. package/dist/types/src/hooks/useServices.d.ts.map +0 -1
  246. package/dist/types/src/presets.d.ts +0 -9
  247. package/dist/types/src/presets.d.ts.map +0 -1
  248. package/dist/types/src/testing/test-services.d.ts +0 -5
  249. package/dist/types/src/testing/test-services.d.ts.map +0 -1
  250. package/dist/types/src/tools/function.d.ts +0 -5
  251. package/dist/types/src/tools/function.d.ts.map +0 -1
  252. package/dist/types/src/tools/index.d.ts +0 -3
  253. package/dist/types/src/tools/index.d.ts.map +0 -1
  254. package/dist/types/src/tools/openapi.d.ts +0 -10
  255. package/dist/types/src/tools/openapi.d.ts.map +0 -1
  256. package/dist/types/src/tools/openapi.test.d.ts +0 -2
  257. package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
  258. package/dist/types/src/types/index.d.ts +0 -4
  259. package/dist/types/src/types/index.d.ts.map +0 -1
  260. package/dist/types/src/types/registry.d.ts +0 -10
  261. package/dist/types/src/types/registry.d.ts.map +0 -1
  262. package/dist/types/src/types/schema.d.ts +0 -221
  263. package/dist/types/src/types/schema.d.ts.map +0 -1
  264. package/dist/types/src/types/types.d.ts +0 -18
  265. package/dist/types/src/types/types.d.ts.map +0 -1
  266. package/src/artifacts.stories.tsx +0 -241
  267. package/src/capabilities/ai-client.ts +0 -19
  268. package/src/capabilities/app-graph-builder.ts +0 -187
  269. package/src/capabilities/capabilities.ts +0 -12
  270. package/src/capabilities/intent-resolver.ts +0 -27
  271. package/src/components/AmbientChatDialog/AmbientChatDialog.stories.tsx +0 -44
  272. package/src/components/AmbientChatDialog/AmbientChatDialog.tsx +0 -63
  273. package/src/components/AmbientChatDialog/index.ts +0 -5
  274. package/src/components/Box/StatusLine.stories.tsx +0 -52
  275. package/src/components/Box/StatusLine.tsx +0 -76
  276. package/src/components/Box/Tabbed.stories.tsx +0 -51
  277. package/src/components/Box/Tabbed.tsx +0 -89
  278. package/src/components/Box/ToggleContainer.stories.tsx +0 -110
  279. package/src/components/Box/ToggleContainer.tsx +0 -108
  280. package/src/components/Box/index.ts +0 -7
  281. package/src/components/ChatContainer/ChatContainer.tsx +0 -52
  282. package/src/components/ChatContainer/index.ts +0 -8
  283. package/src/components/MarkdownViewer/MarkdownViewer.stories.tsx +0 -56
  284. package/src/components/MarkdownViewer/MarkdownViewer.tsx +0 -79
  285. package/src/components/MarkdownViewer/index.ts +0 -5
  286. package/src/components/Prompt/Prompt.stories.tsx +0 -50
  287. package/src/components/Prompt/Prompt.tsx +0 -39
  288. package/src/components/Prompt/index.ts +0 -5
  289. package/src/components/Prompt/prompt-autocomplete.ts +0 -200
  290. package/src/components/PromptEditor/PromptEditor.stories.tsx +0 -64
  291. package/src/components/PromptEditor/PromptEditor.tsx +0 -222
  292. package/src/components/PromptEditor/index.ts +0 -5
  293. package/src/components/PromptEditor/prompt-extension.ts +0 -43
  294. package/src/components/PromptEditor/types.tsx +0 -28
  295. package/src/components/ServiceRegistry/ServiceRegistry.stories.tsx +0 -49
  296. package/src/components/ServiceRegistry/ServiceRegistry.tsx +0 -76
  297. package/src/components/ServiceRegistry/index.ts +0 -5
  298. package/src/components/Thread/Thread.stories.tsx +0 -197
  299. package/src/components/Thread/Thread.tsx +0 -156
  300. package/src/components/Thread/ThreadMessage.tsx +0 -225
  301. package/src/components/Thread/index.ts +0 -5
  302. package/src/hooks/email.ts +0 -49
  303. package/src/hooks/index.ts +0 -10
  304. package/src/hooks/invocation-handler.ts +0 -109
  305. package/src/hooks/processor.test.ts +0 -15
  306. package/src/hooks/processor.ts +0 -210
  307. package/src/hooks/useChatProcessor.tsx +0 -86
  308. package/src/hooks/useLocalTriggerManager.ts +0 -82
  309. package/src/hooks/useMessageQueue.ts +0 -23
  310. package/src/hooks/useServices.ts +0 -28
  311. package/src/presets.ts +0 -248
  312. package/src/testing/test-services.ts +0 -131
  313. package/src/tools/function.ts +0 -47
  314. package/src/tools/index.ts +0 -6
  315. package/src/tools/openapi.test.ts +0 -224
  316. package/src/tools/openapi.ts +0 -331
  317. package/src/types/index.ts +0 -7
  318. package/src/types/registry.ts +0 -26
  319. package/src/types/schema.ts +0 -132
  320. package/src/types/types.ts +0 -21
@@ -1,39 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React from 'react';
6
-
7
- import { type ThemedClassName, useThemeContext } from '@dxos/react-ui';
8
- import {
9
- type BasicExtensionsOptions,
10
- createBasicExtensions,
11
- createThemeExtensions,
12
- useTextEditor,
13
- type UseTextEditorProps,
14
- } from '@dxos/react-ui-editor';
15
- import { mx } from '@dxos/react-ui-theme';
16
-
17
- import { createAutocompleteExtension, type AutocompleteOptions } from './prompt-autocomplete';
18
-
19
- export type PromptProps = ThemedClassName<
20
- AutocompleteOptions & Pick<UseTextEditorProps, 'autoFocus'> & Pick<BasicExtensionsOptions, 'lineWrapping'>
21
- >;
22
-
23
- export const Prompt = ({ classNames, autoFocus, lineWrapping = false, onEnter, onSuggest }: PromptProps) => {
24
- const { themeMode } = useThemeContext();
25
- const { parentRef } = useTextEditor({
26
- autoFocus,
27
- extensions: [
28
- createBasicExtensions({
29
- bracketMatching: false,
30
- lineWrapping,
31
- placeholder: 'Ask a question...',
32
- }),
33
- createThemeExtensions({ themeMode }),
34
- createAutocompleteExtension({ onEnter, onSuggest }),
35
- ],
36
- });
37
-
38
- return <div ref={parentRef} className={mx(classNames)} />;
39
- };
@@ -1,5 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- export * from './Prompt';
@@ -1,200 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Prec, type Extension } from '@codemirror/state';
6
- import {
7
- EditorView,
8
- Decoration,
9
- ViewPlugin,
10
- keymap,
11
- type DecorationSet,
12
- type ViewUpdate,
13
- WidgetType,
14
- } from '@codemirror/view';
15
-
16
- export type AutocompleteOptions = {
17
- /**
18
- * Callback triggered when Enter is pressed.
19
- * @param text The current text in the editor
20
- */
21
- onEnter?: (text: string) => void;
22
-
23
- /**
24
- * Function that returns a list of suggestions based on the current text.
25
- * @param text The current text before the cursor
26
- * @returns Array of suggestion strings
27
- */
28
- onSuggest?: (text: string) => string[];
29
- };
30
-
31
- class InlineSuggestionWidget extends WidgetType {
32
- constructor(private suffix: string) {
33
- super();
34
- }
35
-
36
- override toDOM() {
37
- const span = document.createElement('span');
38
- span.textContent = this.suffix;
39
- span.className = 'cm-inline-suggestion';
40
- return span;
41
- }
42
-
43
- override eq(other: InlineSuggestionWidget) {
44
- return other.suffix === this.suffix;
45
- }
46
- }
47
-
48
- /**
49
- * Creates an autocomplete extension that shows inline suggestions.
50
- * Pressing Tab will complete the suggestion.
51
- */
52
- export const createAutocompleteExtension = ({ onEnter, onSuggest }: AutocompleteOptions): Extension => {
53
- const suggestionPlugin = ViewPlugin.fromClass(
54
- class {
55
- _decorations: DecorationSet;
56
- _currentSuggestion: string | null = null;
57
-
58
- constructor(view: EditorView) {
59
- this._decorations = this.computeDecorations(view);
60
- }
61
-
62
- update(update: ViewUpdate) {
63
- if (update.docChanged || update.selectionSet) {
64
- this._decorations = this.computeDecorations(update.view);
65
- }
66
- }
67
-
68
- private computeDecorations(view: EditorView): DecorationSet {
69
- const text = view.state.doc.toString();
70
- const suggestions = onSuggest?.(text) ?? [];
71
- if (!suggestions.length) {
72
- this._currentSuggestion = null;
73
- return Decoration.none;
74
- }
75
-
76
- // Get the first suggestion.
77
- this._currentSuggestion = suggestions[0];
78
- const suffix = this._currentSuggestion.slice(text.length);
79
- if (!suffix) {
80
- return Decoration.none;
81
- }
82
-
83
- // Always show ghost text at the end of the document.
84
- return Decoration.set([
85
- Decoration.widget({
86
- widget: new InlineSuggestionWidget(suffix),
87
- side: 1,
88
- }).range(view.state.doc.length),
89
- ]);
90
- }
91
-
92
- completeSuggestion(view: EditorView): boolean {
93
- if (!this._currentSuggestion) {
94
- return false;
95
- }
96
-
97
- const text = view.state.doc.toString();
98
- const suffix = this._currentSuggestion.slice(text.length);
99
- if (!suffix) {
100
- return false;
101
- }
102
-
103
- view.dispatch({
104
- changes: {
105
- from: view.state.doc.length,
106
- insert: suffix,
107
- },
108
- selection: {
109
- anchor: view.state.doc.length + suffix.length,
110
- },
111
- });
112
-
113
- return true;
114
- }
115
- },
116
- {
117
- decorations: (v) => v._decorations,
118
- },
119
- );
120
-
121
- return [
122
- suggestionPlugin,
123
- EditorView.theme({
124
- '.cm-inline-suggestion': {
125
- opacity: 0.4,
126
- },
127
- }),
128
-
129
- // Accept the current suggestion.
130
- Prec.highest(
131
- keymap.of([
132
- {
133
- key: 'Tab',
134
- run: (view) => {
135
- const plugin = view.plugin(suggestionPlugin);
136
- return plugin?.completeSuggestion(view) ?? false;
137
- },
138
- },
139
- {
140
- key: 'ArrowRight',
141
- run: (view) => {
142
- // Only complete if cursor is at the end
143
- if (view.state.selection.main.head !== view.state.doc.length) {
144
- return false;
145
- }
146
-
147
- const plugin = view.plugin(suggestionPlugin);
148
- return plugin?.completeSuggestion(view) ?? false;
149
- },
150
- },
151
- {
152
- key: 'Enter',
153
- preventDefault: true,
154
- run: (view) => {
155
- const text = view.state.doc.toString();
156
- if (onEnter) {
157
- onEnter(text);
158
- // Clear the document after calling onEnter
159
- view.dispatch({
160
- changes: {
161
- from: 0,
162
- to: view.state.doc.length,
163
- insert: '',
164
- },
165
- });
166
- return true;
167
- }
168
- return false;
169
- },
170
- },
171
- {
172
- key: 'Shift-Enter',
173
- run: (view) => {
174
- view.dispatch({
175
- changes: {
176
- from: view.state.selection.main.head,
177
- insert: '\n',
178
- },
179
- });
180
- return true;
181
- },
182
- },
183
- {
184
- key: 'Escape',
185
- run: (view) => {
186
- // Clear the entire document.
187
- view.dispatch({
188
- changes: {
189
- from: 0,
190
- to: view.state.doc.length,
191
- insert: '',
192
- },
193
- });
194
- return true;
195
- },
196
- },
197
- ]),
198
- ),
199
- ];
200
- };
@@ -1,64 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type Meta } from '@storybook/react';
8
- import React, { useState } from 'react';
9
-
10
- import { create, makeRef } from '@dxos/live-object';
11
- import { useClient } from '@dxos/react-client';
12
- import { withClientProvider } from '@dxos/react-client/testing';
13
- import { withLayout, withTheme } from '@dxos/storybook-utils';
14
-
15
- import { PromptEditor } from './PromptEditor';
16
- import translations from '../../translations';
17
- import { ChainPromptType, ChainType } from '../../types';
18
-
19
- const template = [
20
- '# Comment',
21
- '',
22
- 'You are a machine that is an expert chess player.',
23
- 'The move history of the current game is: {history}',
24
- 'If asked to suggest a move explain why it is a good move.',
25
- '',
26
- '---',
27
- '',
28
- '{input}',
29
- ].join('\n');
30
-
31
- const Render = () => {
32
- const client = useClient();
33
- const [chain] = useState(() => {
34
- const space = client.spaces.default;
35
- return space.db.add(
36
- create(ChainType, {
37
- prompts: [makeRef(create(ChainPromptType, { command: 'test', template, inputs: [] }))],
38
- }),
39
- );
40
- });
41
-
42
- return (
43
- <div role='none' className='flex w-[350px] border border-separator overflow-hidden'>
44
- <PromptEditor prompt={chain.prompts![0]!.target!} />
45
- </div>
46
- );
47
- };
48
-
49
- export const Default = {};
50
-
51
- const meta: Meta = {
52
- title: 'plugins/plugin-automation/PromptEditor',
53
- render: Render,
54
- decorators: [
55
- withClientProvider({ createIdentity: true, createSpace: true, types: [ChainType, ChainPromptType] }),
56
- withLayout({ fullscreen: true, classNames: 'flex justify-center m-2' }),
57
- withTheme,
58
- ],
59
- parameters: {
60
- translations,
61
- },
62
- };
63
-
64
- export default meta;
@@ -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 { isNonNullable } 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(isNonNullable).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(isNonNullable).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
- };