@dxos/plugin-automation 0.7.5-labs.8a82073 → 0.7.5-labs.a8b535d

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 (308) 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 +21 -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-IPCNJYQL.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-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 +36 -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-BVZ63QP4.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 +21 -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 +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 +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/index.ts +0 -7
  79. package/src/index.ts +2 -3
  80. package/src/meta.ts +1 -2
  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-CL2TWZT5.mjs +0 -8
  85. package/dist/lib/browser/AutomationPanel-CL2TWZT5.mjs.map +0 -7
  86. package/dist/lib/browser/ChatContainer-EJ3IWL7Y.mjs +0 -12
  87. package/dist/lib/browser/ChatContainer-EJ3IWL7Y.mjs.map +0 -7
  88. package/dist/lib/browser/ai-client-UJLNYP7B.mjs +0 -22
  89. package/dist/lib/browser/ai-client-UJLNYP7B.mjs.map +0 -7
  90. package/dist/lib/browser/app-graph-builder-3H5TCRG4.mjs +0 -162
  91. package/dist/lib/browser/app-graph-builder-3H5TCRG4.mjs.map +0 -7
  92. package/dist/lib/browser/chunk-43WRHV2L.mjs +0 -150
  93. package/dist/lib/browser/chunk-43WRHV2L.mjs.map +0 -7
  94. package/dist/lib/browser/chunk-4M74P6YW.mjs +0 -284
  95. package/dist/lib/browser/chunk-4M74P6YW.mjs.map +0 -7
  96. package/dist/lib/browser/chunk-6KJRL5KV.mjs +0 -243
  97. package/dist/lib/browser/chunk-6KJRL5KV.mjs.map +0 -7
  98. package/dist/lib/browser/chunk-BQHXJZ4K.mjs +0 -15
  99. package/dist/lib/browser/chunk-BQHXJZ4K.mjs.map +0 -7
  100. package/dist/lib/browser/chunk-N4SSCQ7P.mjs +0 -1602
  101. package/dist/lib/browser/chunk-N4SSCQ7P.mjs.map +0 -7
  102. package/dist/lib/browser/intent-resolver-5YVZJFS3.mjs +0 -29
  103. package/dist/lib/browser/intent-resolver-5YVZJFS3.mjs.map +0 -7
  104. package/dist/lib/browser/react-surface-RRTZFTKR.mjs +0 -50
  105. package/dist/lib/browser/react-surface-RRTZFTKR.mjs.map +0 -7
  106. package/dist/lib/browser/types/index.mjs +0 -24
  107. package/dist/lib/browser/types/index.mjs.map +0 -7
  108. package/dist/lib/node/AutomationPanel-BCEY3YXO.cjs +0 -26
  109. package/dist/lib/node/AutomationPanel-BCEY3YXO.cjs.map +0 -7
  110. package/dist/lib/node/ChatContainer-QUWFEBTI.cjs +0 -33
  111. package/dist/lib/node/ChatContainer-QUWFEBTI.cjs.map +0 -7
  112. package/dist/lib/node/ai-client-AOB6TLNW.cjs +0 -38
  113. package/dist/lib/node/ai-client-AOB6TLNW.cjs.map +0 -7
  114. package/dist/lib/node/app-graph-builder-CDEQJEHY.cjs +0 -178
  115. package/dist/lib/node/app-graph-builder-CDEQJEHY.cjs.map +0 -7
  116. package/dist/lib/node/chunk-AWZVJZ2I.cjs +0 -34
  117. package/dist/lib/node/chunk-AWZVJZ2I.cjs.map +0 -7
  118. package/dist/lib/node/chunk-DKGNORZK.cjs +0 -1586
  119. package/dist/lib/node/chunk-DKGNORZK.cjs.map +0 -7
  120. package/dist/lib/node/chunk-H3RSMGJG.cjs +0 -173
  121. package/dist/lib/node/chunk-H3RSMGJG.cjs.map +0 -7
  122. package/dist/lib/node/chunk-IPCNJYQL.cjs.map +0 -7
  123. package/dist/lib/node/chunk-LC6KNDPQ.cjs +0 -302
  124. package/dist/lib/node/chunk-LC6KNDPQ.cjs.map +0 -7
  125. package/dist/lib/node/intent-resolver-MJFZT5IU.cjs +0 -44
  126. package/dist/lib/node/intent-resolver-MJFZT5IU.cjs.map +0 -7
  127. package/dist/lib/node/react-surface-BVZ63QP4.cjs.map +0 -7
  128. package/dist/lib/node/types/index.cjs +0 -46
  129. package/dist/lib/node/types/index.cjs.map +0 -7
  130. package/dist/lib/node-esm/AutomationPanel-YTIZ74RI.mjs +0 -9
  131. package/dist/lib/node-esm/AutomationPanel-YTIZ74RI.mjs.map +0 -7
  132. package/dist/lib/node-esm/ChatContainer-QSMDZRDU.mjs +0 -13
  133. package/dist/lib/node-esm/ChatContainer-QSMDZRDU.mjs.map +0 -7
  134. package/dist/lib/node-esm/ai-client-RUCCJ7JZ.mjs +0 -23
  135. package/dist/lib/node-esm/ai-client-RUCCJ7JZ.mjs.map +0 -7
  136. package/dist/lib/node-esm/app-graph-builder-GR3URVNX.mjs +0 -163
  137. package/dist/lib/node-esm/app-graph-builder-GR3URVNX.mjs.map +0 -7
  138. package/dist/lib/node-esm/chunk-7JO77AAS.mjs +0 -151
  139. package/dist/lib/node-esm/chunk-7JO77AAS.mjs.map +0 -7
  140. package/dist/lib/node-esm/chunk-CQPQXIJP.mjs +0 -285
  141. package/dist/lib/node-esm/chunk-CQPQXIJP.mjs.map +0 -7
  142. package/dist/lib/node-esm/chunk-CZXU4CFK.mjs +0 -244
  143. package/dist/lib/node-esm/chunk-CZXU4CFK.mjs.map +0 -7
  144. package/dist/lib/node-esm/chunk-D7RARVTS.mjs +0 -1603
  145. package/dist/lib/node-esm/chunk-D7RARVTS.mjs.map +0 -7
  146. package/dist/lib/node-esm/chunk-LSSWQIQD.mjs +0 -16
  147. package/dist/lib/node-esm/chunk-LSSWQIQD.mjs.map +0 -7
  148. package/dist/lib/node-esm/intent-resolver-FCKNRTKQ.mjs +0 -30
  149. package/dist/lib/node-esm/intent-resolver-FCKNRTKQ.mjs.map +0 -7
  150. package/dist/lib/node-esm/react-surface-Y5LQHUQN.mjs +0 -51
  151. package/dist/lib/node-esm/react-surface-Y5LQHUQN.mjs.map +0 -7
  152. package/dist/lib/node-esm/types/index.mjs +0 -25
  153. package/dist/lib/node-esm/types/index.mjs.map +0 -7
  154. package/dist/types/src/artifacts.stories.d.ts +0 -16
  155. package/dist/types/src/artifacts.stories.d.ts.map +0 -1
  156. package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
  157. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -180
  158. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  159. package/dist/types/src/capabilities/capabilities.d.ts +0 -5
  160. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  161. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  162. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  163. package/dist/types/src/components/Box/StatusLine.d.ts +0 -11
  164. package/dist/types/src/components/Box/StatusLine.d.ts.map +0 -1
  165. package/dist/types/src/components/Box/StatusLine.stories.d.ts +0 -9
  166. package/dist/types/src/components/Box/StatusLine.stories.d.ts.map +0 -1
  167. package/dist/types/src/components/Box/Tabbed.d.ts +0 -15
  168. package/dist/types/src/components/Box/Tabbed.d.ts.map +0 -1
  169. package/dist/types/src/components/Box/Tabbed.stories.d.ts +0 -8
  170. package/dist/types/src/components/Box/Tabbed.stories.d.ts.map +0 -1
  171. package/dist/types/src/components/Box/ToggleContainer.d.ts +0 -13
  172. package/dist/types/src/components/Box/ToggleContainer.d.ts.map +0 -1
  173. package/dist/types/src/components/Box/ToggleContainer.stories.d.ts +0 -9
  174. package/dist/types/src/components/Box/ToggleContainer.stories.d.ts.map +0 -1
  175. package/dist/types/src/components/Box/index.d.ts +0 -4
  176. package/dist/types/src/components/Box/index.d.ts.map +0 -1
  177. package/dist/types/src/components/ChatContainer/ChatContainer.d.ts +0 -7
  178. package/dist/types/src/components/ChatContainer/ChatContainer.d.ts.map +0 -1
  179. package/dist/types/src/components/ChatContainer/index.d.ts +0 -4
  180. package/dist/types/src/components/ChatContainer/index.d.ts.map +0 -1
  181. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts +0 -14
  182. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts.map +0 -1
  183. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts +0 -8
  184. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts.map +0 -1
  185. package/dist/types/src/components/MarkdownViewer/index.d.ts +0 -2
  186. package/dist/types/src/components/MarkdownViewer/index.d.ts.map +0 -1
  187. package/dist/types/src/components/Prompt/Prompt.d.ts +0 -7
  188. package/dist/types/src/components/Prompt/Prompt.d.ts.map +0 -1
  189. package/dist/types/src/components/Prompt/Prompt.stories.d.ts +0 -8
  190. package/dist/types/src/components/Prompt/Prompt.stories.d.ts.map +0 -1
  191. package/dist/types/src/components/Prompt/index.d.ts +0 -2
  192. package/dist/types/src/components/Prompt/index.d.ts.map +0 -1
  193. package/dist/types/src/components/Prompt/prompt-autocomplete.d.ts +0 -20
  194. package/dist/types/src/components/Prompt/prompt-autocomplete.d.ts.map +0 -1
  195. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts +0 -10
  196. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts.map +0 -1
  197. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts +0 -6
  198. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts.map +0 -1
  199. package/dist/types/src/components/PromptEditor/index.d.ts +0 -2
  200. package/dist/types/src/components/PromptEditor/index.d.ts.map +0 -1
  201. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts +0 -4
  202. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts.map +0 -1
  203. package/dist/types/src/components/PromptEditor/types.d.ts +0 -18
  204. package/dist/types/src/components/PromptEditor/types.d.ts.map +0 -1
  205. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts +0 -6
  206. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts.map +0 -1
  207. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts +0 -8
  208. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts.map +0 -1
  209. package/dist/types/src/components/ServiceRegistry/index.d.ts +0 -2
  210. package/dist/types/src/components/ServiceRegistry/index.d.ts.map +0 -1
  211. package/dist/types/src/components/Thread/Thread.d.ts +0 -11
  212. package/dist/types/src/components/Thread/Thread.d.ts.map +0 -1
  213. package/dist/types/src/components/Thread/Thread.stories.d.ts +0 -11
  214. package/dist/types/src/components/Thread/Thread.stories.d.ts.map +0 -1
  215. package/dist/types/src/components/Thread/ThreadMessage.d.ts +0 -12
  216. package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +0 -1
  217. package/dist/types/src/components/Thread/index.d.ts +0 -2
  218. package/dist/types/src/components/Thread/index.d.ts.map +0 -1
  219. package/dist/types/src/hooks/email.d.ts +0 -4
  220. package/dist/types/src/hooks/email.d.ts.map +0 -1
  221. package/dist/types/src/hooks/index.d.ts +0 -6
  222. package/dist/types/src/hooks/index.d.ts.map +0 -1
  223. package/dist/types/src/hooks/invocation-handler.d.ts +0 -5
  224. package/dist/types/src/hooks/invocation-handler.d.ts.map +0 -1
  225. package/dist/types/src/hooks/processor.d.ts +0 -70
  226. package/dist/types/src/hooks/processor.d.ts.map +0 -1
  227. package/dist/types/src/hooks/processor.test.d.ts +0 -2
  228. package/dist/types/src/hooks/processor.test.d.ts.map +0 -1
  229. package/dist/types/src/hooks/useChatProcessor.d.ts +0 -7
  230. package/dist/types/src/hooks/useChatProcessor.d.ts.map +0 -1
  231. package/dist/types/src/hooks/useLocalTriggerManager.d.ts +0 -3
  232. package/dist/types/src/hooks/useLocalTriggerManager.d.ts.map +0 -1
  233. package/dist/types/src/hooks/useMessageQueue.d.ts +0 -41
  234. package/dist/types/src/hooks/useMessageQueue.d.ts.map +0 -1
  235. package/dist/types/src/hooks/useServices.d.ts +0 -7
  236. package/dist/types/src/hooks/useServices.d.ts.map +0 -1
  237. package/dist/types/src/presets.d.ts +0 -9
  238. package/dist/types/src/presets.d.ts.map +0 -1
  239. package/dist/types/src/testing/test-services.d.ts +0 -5
  240. package/dist/types/src/testing/test-services.d.ts.map +0 -1
  241. package/dist/types/src/tools/function.d.ts +0 -5
  242. package/dist/types/src/tools/function.d.ts.map +0 -1
  243. package/dist/types/src/tools/index.d.ts +0 -3
  244. package/dist/types/src/tools/index.d.ts.map +0 -1
  245. package/dist/types/src/tools/openapi.d.ts +0 -10
  246. package/dist/types/src/tools/openapi.d.ts.map +0 -1
  247. package/dist/types/src/tools/openapi.test.d.ts +0 -2
  248. package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
  249. package/dist/types/src/types/index.d.ts +0 -4
  250. package/dist/types/src/types/index.d.ts.map +0 -1
  251. package/dist/types/src/types/registry.d.ts +0 -10
  252. package/dist/types/src/types/registry.d.ts.map +0 -1
  253. package/dist/types/src/types/schema.d.ts +0 -221
  254. package/dist/types/src/types/schema.d.ts.map +0 -1
  255. package/dist/types/src/types/types.d.ts +0 -18
  256. package/dist/types/src/types/types.d.ts.map +0 -1
  257. package/src/artifacts.stories.tsx +0 -241
  258. package/src/capabilities/ai-client.ts +0 -19
  259. package/src/capabilities/app-graph-builder.ts +0 -156
  260. package/src/capabilities/capabilities.ts +0 -12
  261. package/src/capabilities/intent-resolver.ts +0 -27
  262. package/src/components/Box/StatusLine.stories.tsx +0 -52
  263. package/src/components/Box/StatusLine.tsx +0 -76
  264. package/src/components/Box/Tabbed.stories.tsx +0 -51
  265. package/src/components/Box/Tabbed.tsx +0 -89
  266. package/src/components/Box/ToggleContainer.stories.tsx +0 -110
  267. package/src/components/Box/ToggleContainer.tsx +0 -108
  268. package/src/components/Box/index.ts +0 -7
  269. package/src/components/ChatContainer/ChatContainer.tsx +0 -52
  270. package/src/components/ChatContainer/index.ts +0 -8
  271. package/src/components/MarkdownViewer/MarkdownViewer.stories.tsx +0 -56
  272. package/src/components/MarkdownViewer/MarkdownViewer.tsx +0 -79
  273. package/src/components/MarkdownViewer/index.ts +0 -5
  274. package/src/components/Prompt/Prompt.stories.tsx +0 -50
  275. package/src/components/Prompt/Prompt.tsx +0 -36
  276. package/src/components/Prompt/index.ts +0 -5
  277. package/src/components/Prompt/prompt-autocomplete.ts +0 -200
  278. package/src/components/PromptEditor/PromptEditor.stories.tsx +0 -64
  279. package/src/components/PromptEditor/PromptEditor.tsx +0 -222
  280. package/src/components/PromptEditor/index.ts +0 -5
  281. package/src/components/PromptEditor/prompt-extension.ts +0 -43
  282. package/src/components/PromptEditor/types.tsx +0 -28
  283. package/src/components/ServiceRegistry/ServiceRegistry.stories.tsx +0 -49
  284. package/src/components/ServiceRegistry/ServiceRegistry.tsx +0 -75
  285. package/src/components/ServiceRegistry/index.ts +0 -5
  286. package/src/components/Thread/Thread.stories.tsx +0 -197
  287. package/src/components/Thread/Thread.tsx +0 -156
  288. package/src/components/Thread/ThreadMessage.tsx +0 -225
  289. package/src/components/Thread/index.ts +0 -5
  290. package/src/hooks/email.ts +0 -49
  291. package/src/hooks/index.ts +0 -10
  292. package/src/hooks/invocation-handler.ts +0 -109
  293. package/src/hooks/processor.test.ts +0 -15
  294. package/src/hooks/processor.ts +0 -210
  295. package/src/hooks/useChatProcessor.tsx +0 -86
  296. package/src/hooks/useLocalTriggerManager.ts +0 -82
  297. package/src/hooks/useMessageQueue.ts +0 -23
  298. package/src/hooks/useServices.ts +0 -28
  299. package/src/presets.ts +0 -248
  300. package/src/testing/test-services.ts +0 -131
  301. package/src/tools/function.ts +0 -47
  302. package/src/tools/index.ts +0 -6
  303. package/src/tools/openapi.test.ts +0 -227
  304. package/src/tools/openapi.ts +0 -331
  305. package/src/types/index.ts +0 -7
  306. package/src/types/registry.ts +0 -26
  307. package/src/types/schema.ts +0 -132
  308. package/src/types/types.ts +0 -21
@@ -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 { 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';