@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,173 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_GB7245FH_exports = {};
20
- __export(chunk_GB7245FH_exports, {
21
- AIChatType: () => AIChatType,
22
- ApiAuthorization: () => ApiAuthorization,
23
- AutomationAction: () => AutomationAction,
24
- ChainInputSchema: () => ChainInputSchema,
25
- ChainInputType: () => ChainInputType,
26
- ChainPromptType: () => ChainPromptType,
27
- ChainType: () => ChainType,
28
- ServiceType: () => ServiceType,
29
- categoryIcons: () => categoryIcons
30
- });
31
- module.exports = __toCommonJS(chunk_GB7245FH_exports);
32
- var import_chunk_EQYHOTGG = require("./chunk-EQYHOTGG.cjs");
33
- var import_conductor = require("@dxos/conductor");
34
- var import_echo_schema = require("@dxos/echo-schema");
35
- var import_functions = require("@dxos/functions");
36
- var import_echo_schema2 = require("@dxos/echo-schema");
37
- var categoryIcons = {
38
- finance: "ph--bank--regular",
39
- health: "ph--heart--regular",
40
- geolocation: "ph--globe-simple--regular",
41
- education: "ph--books--regular",
42
- entertainment: "ph--music-notes--regular",
43
- shopping: "ph--shopping-cart--regular",
44
- travel: "ph--airplane-takeoff--regular",
45
- utilities: "ph--lightning--regular",
46
- weather: "ph--cloud-rain--regular"
47
- };
48
- var ChainInputType;
49
- (function(ChainInputType2) {
50
- ChainInputType2[ChainInputType2["VALUE"] = 0] = "VALUE";
51
- ChainInputType2[ChainInputType2["PASS_THROUGH"] = 1] = "PASS_THROUGH";
52
- ChainInputType2[ChainInputType2["RETRIEVER"] = 2] = "RETRIEVER";
53
- ChainInputType2[ChainInputType2["FUNCTION"] = 3] = "FUNCTION";
54
- ChainInputType2[ChainInputType2["QUERY"] = 4] = "QUERY";
55
- ChainInputType2[ChainInputType2["RESOLVER"] = 5] = "RESOLVER";
56
- ChainInputType2[ChainInputType2["CONTEXT"] = 6] = "CONTEXT";
57
- ChainInputType2[ChainInputType2["SCHEMA"] = 7] = "SCHEMA";
58
- })(ChainInputType || (ChainInputType = {}));
59
- var ChainInputSchema = import_echo_schema.S.mutable(import_echo_schema.S.Struct({
60
- name: import_echo_schema.S.String,
61
- type: import_echo_schema.S.optional(import_echo_schema.S.Enums(ChainInputType)),
62
- value: import_echo_schema.S.optional(import_echo_schema.S.String)
63
- }));
64
- var ChainPromptType = class extends (0, import_echo_schema.TypedObject)({
65
- typename: "dxos.org/type/ChainPrompt",
66
- version: "0.1.0"
67
- })({
68
- command: import_echo_schema.S.optional(import_echo_schema.S.String),
69
- template: import_echo_schema.S.String,
70
- inputs: import_echo_schema.S.optional(import_echo_schema.S.mutable(import_echo_schema.S.Array(ChainInputSchema)))
71
- }) {
72
- };
73
- var ChainType = class extends (0, import_echo_schema.TypedObject)({
74
- typename: "dxos.org/type/Chain",
75
- version: "0.1.0"
76
- })({
77
- name: import_echo_schema.S.optional(import_echo_schema.S.String),
78
- prompts: import_echo_schema.S.optional(import_echo_schema.S.mutable(import_echo_schema.S.Array((0, import_echo_schema.Ref)(ChainPromptType))))
79
- }) {
80
- };
81
- var AIChatType = class extends (0, import_echo_schema.TypedObject)({
82
- typename: "dxos.org/type/AIChat",
83
- version: "0.1.0"
84
- })({
85
- name: import_echo_schema.S.optional(import_echo_schema.S.String),
86
- // TODO(wittjosiah): Should be a ref to a Queue.
87
- queue: (0, import_echo_schema.Ref)(import_echo_schema.Expando)
88
- }) {
89
- };
90
- var ApiAuthorizationKey = import_echo_schema.S.Struct({
91
- type: import_echo_schema.S.Literal("api-key"),
92
- key: import_echo_schema.S.String,
93
- placement: import_echo_schema.S.Union(import_echo_schema.S.Struct({
94
- type: import_echo_schema.S.Literal("authorization-header")
95
- }), import_echo_schema.S.Struct({
96
- type: import_echo_schema.S.Literal("query"),
97
- name: import_echo_schema.S.String
98
- }))
99
- });
100
- var ApiAuthorizationOauth = import_echo_schema.S.Struct({
101
- type: import_echo_schema.S.Literal("oauth"),
102
- clientId: import_echo_schema.S.String,
103
- clientSecret: import_echo_schema.S.String,
104
- tokenUrl: import_echo_schema.S.String,
105
- grantType: import_echo_schema.S.String
106
- });
107
- var ApiAuthorization = import_echo_schema.S.Union(ApiAuthorizationKey, ApiAuthorizationOauth);
108
- var ServiceInterfaceFunction = import_echo_schema.S.Struct({
109
- kind: import_echo_schema.S.Literal("function"),
110
- fn: (0, import_echo_schema.Ref)(import_functions.FunctionType)
111
- });
112
- var ServiceInterfaceWorkflow = import_echo_schema.S.Struct({
113
- kind: import_echo_schema.S.Literal("workflow"),
114
- workflow: (0, import_echo_schema.Ref)(import_conductor.ComputeGraph)
115
- });
116
- var ServiceInterfaceApi = import_echo_schema.S.Struct({
117
- kind: import_echo_schema.S.Literal("api"),
118
- /**
119
- * URL to fetch the openapi schema.
120
- */
121
- schemaUrl: import_echo_schema.S.optional(import_echo_schema.S.String),
122
- /**
123
- * Inlined openapi schema.
124
- */
125
- schema: import_echo_schema.S.optional(import_echo_schema.S.Any),
126
- /**
127
- * Authorization configuration if required.
128
- */
129
- authorization: import_echo_schema.S.optional(ApiAuthorization)
130
- });
131
- var ServiceInterface = import_echo_schema.S.Union(ServiceInterfaceFunction, ServiceInterfaceWorkflow, ServiceInterfaceApi);
132
- var ServiceType = class extends (0, import_echo_schema.TypedObject)({
133
- typename: "dxos.org/type/ServiceType",
134
- version: "0.1.0"
135
- })({
136
- serviceId: import_echo_schema.S.String,
137
- name: import_echo_schema.S.optional(import_echo_schema.S.String),
138
- description: import_echo_schema.S.optional(import_echo_schema.S.String),
139
- category: import_echo_schema.S.optional(import_echo_schema.S.String),
140
- enabled: import_echo_schema.S.optional(import_echo_schema.S.Boolean),
141
- /**
142
- * Entries exposed: functions, workflows, and APIs.
143
- */
144
- interfaces: import_echo_schema.S.optional(import_echo_schema.S.Array(ServiceInterface))
145
- }) {
146
- };
147
- var AutomationAction;
148
- (function(AutomationAction2) {
149
- const AUTOMATION_ACTION = `${import_chunk_EQYHOTGG.AUTOMATION_PLUGIN}/action`;
150
- class Create extends import_echo_schema2.S.TaggedClass()(`${AUTOMATION_ACTION}/create`, {
151
- input: import_echo_schema2.S.Struct({
152
- name: import_echo_schema2.S.optional(import_echo_schema2.S.String)
153
- }),
154
- output: import_echo_schema2.S.Struct({
155
- object: AIChatType
156
- })
157
- }) {
158
- }
159
- AutomationAction2.Create = Create;
160
- })(AutomationAction || (AutomationAction = {}));
161
- // Annotate the CommonJS export names for ESM import in node:
162
- 0 && (module.exports = {
163
- AIChatType,
164
- ApiAuthorization,
165
- AutomationAction,
166
- ChainInputSchema,
167
- ChainInputType,
168
- ChainPromptType,
169
- ChainType,
170
- ServiceType,
171
- categoryIcons
172
- });
173
- //# sourceMappingURL=chunk-GB7245FH.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types/registry.ts", "../../../src/types/schema.ts", "../../../src/types/types.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ServiceType } from './schema';\n\nexport type ServiceQuery = {\n name?: string;\n category?: string;\n};\n\nexport interface BaseServiceRegistry {\n queryServices(query?: ServiceQuery): Promise<ServiceType[]>;\n}\n\nexport const categoryIcons: Record<string, string> = {\n finance: 'ph--bank--regular',\n health: 'ph--heart--regular',\n geolocation: 'ph--globe-simple--regular',\n education: 'ph--books--regular',\n entertainment: 'ph--music-notes--regular',\n shopping: 'ph--shopping-cart--regular',\n travel: 'ph--airplane-takeoff--regular',\n utilities: 'ph--lightning--regular',\n weather: 'ph--cloud-rain--regular',\n} as const;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { ComputeGraph } from '@dxos/conductor';\nimport { Expando, Ref, S, TypedObject, type Ref$ } from '@dxos/echo-schema';\nimport { FunctionType } from '@dxos/functions';\n\n// TODO(burdon): Change to S.Literal (and discriminated union).\nexport enum ChainInputType {\n VALUE = 0,\n PASS_THROUGH = 1,\n RETRIEVER = 2,\n FUNCTION = 3,\n QUERY = 4,\n RESOLVER = 5,\n CONTEXT = 6,\n SCHEMA = 7,\n}\n\nexport const ChainInputSchema = S.mutable(\n S.Struct({\n name: S.String,\n type: S.optional(S.Enums(ChainInputType)),\n value: S.optional(S.String),\n }),\n);\n\nexport type ChainInput = S.Schema.Type<typeof ChainInputSchema>;\n\nexport class ChainPromptType extends TypedObject({ typename: 'dxos.org/type/ChainPrompt', version: '0.1.0' })({\n command: S.optional(S.String),\n template: S.String,\n inputs: S.optional(S.mutable(S.Array(ChainInputSchema))),\n}) {}\n\nexport class ChainType extends TypedObject({ typename: 'dxos.org/type/Chain', version: '0.1.0' })({\n name: S.optional(S.String),\n prompts: S.optional(S.mutable(S.Array(Ref(ChainPromptType)))),\n}) {}\n\nexport class AIChatType extends TypedObject({ typename: 'dxos.org/type/AIChat', version: '0.1.0' })({\n name: S.optional(S.String),\n // TODO(wittjosiah): Should be a ref to a Queue.\n queue: Ref(Expando),\n}) {}\n\nconst ApiAuthorizationKey = S.Struct({\n type: S.Literal('api-key'),\n key: S.String,\n placement: S.Union(\n S.Struct({\n type: S.Literal('authorization-header'),\n }),\n S.Struct({\n type: S.Literal('query'),\n name: S.String,\n }),\n ),\n});\n\nconst ApiAuthorizationOauth = S.Struct({\n type: S.Literal('oauth'),\n clientId: S.String,\n clientSecret: S.String,\n tokenUrl: S.String,\n grantType: S.String,\n});\n\nexport const ApiAuthorization = S.Union(ApiAuthorizationKey, ApiAuthorizationOauth);\nexport type ApiAuthorization = S.Schema.Type<typeof ApiAuthorization>;\n\nconst ServiceInterfaceFunction = S.Struct({\n kind: S.Literal('function'),\n fn: Ref(FunctionType) as Ref$<FunctionType>,\n});\n\nconst ServiceInterfaceWorkflow = S.Struct({\n kind: S.Literal('workflow'),\n workflow: Ref(ComputeGraph) as Ref$<ComputeGraph>,\n});\n\nconst ServiceInterfaceApi = S.Struct({\n kind: S.Literal('api'),\n\n /**\n * URL to fetch the openapi schema.\n */\n schemaUrl: S.optional(S.String),\n\n /**\n * Inlined openapi schema.\n */\n schema: S.optional(S.Any),\n\n /**\n * Authorization configuration if required.\n */\n authorization: S.optional(ApiAuthorization),\n});\n\nconst ServiceInterface = S.Union(ServiceInterfaceFunction, ServiceInterfaceWorkflow, ServiceInterfaceApi);\nexport type ServiceInterface = S.Schema.Type<typeof ServiceInterface>;\n\n// export const ServiceType = S.Struct({\n// serviceId: S.String,\n// name: S.optional(S.String),\n// description: S.optional(S.String),\n// category: S.optional(S.String),\n// enabled: S.optional(S.Boolean),\n\n// /**\n// * Entries exposed: functions, workflows, and APIs.\n// */\n// interfaces: S.optional(S.Array(ServiceInterface)),\n// }).pipe(EchoObject('dxos.org/type/Service', '0.1.0'));\n// dxn:type:dxos.org/type/Service\n\n// export type ServiceType = S.Schema.Type<typeof ServiceType>;\n\nexport class ServiceType extends TypedObject({ typename: 'dxos.org/type/ServiceType', version: '0.1.0' })({\n serviceId: S.String,\n name: S.optional(S.String),\n description: S.optional(S.String),\n category: S.optional(S.String),\n enabled: S.optional(S.Boolean),\n\n /**\n * Entries exposed: functions, workflows, and APIs.\n */\n interfaces: S.optional(S.Array(ServiceInterface)),\n}) {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { S } from '@dxos/echo-schema';\n\nimport { AIChatType } from './schema';\nimport { AUTOMATION_PLUGIN } from '../meta';\n\nexport namespace AutomationAction {\n const AUTOMATION_ACTION = `${AUTOMATION_PLUGIN}/action`;\n\n export class Create extends S.TaggedClass<Create>()(`${AUTOMATION_ACTION}/create`, {\n input: S.Struct({\n name: S.optional(S.String),\n }),\n output: S.Struct({\n object: AIChatType,\n }),\n }) {}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACIA,uBAA6B;AAC7B,yBAAwD;AACxD,uBAA6B;ACF7B,IAAAA,sBAAkB;AFWX,IAAMC,gBAAwC;EACn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AAO;;;;EAK7BC,YAAYrD,qBAAEM,SAASN,qBAAEgB,MAAM8B,gBAAAA,CAAAA;AACjC,CAAA,EAAA;AAAI;;UC1HaQ,mBAAAA;AACf,QAAMC,oBAAoB,GAAGC,uCAAAA;EAEtB,MAAMC,eAAezD,oBAAAA,EAAE0D,YAAW,EAAW,GAAGH,iBAAAA,WAA4B;IACjFI,OAAO3D,oBAAAA,EAAEE,OAAO;MACdC,MAAMH,oBAAAA,EAAEM,SAASN,oBAAAA,EAAEI,MAAM;IAC3B,CAAA;IACAwD,QAAQ5D,oBAAAA,EAAEE,OAAO;MACf2D,QAAQzC;IACV,CAAA;EACF,CAAA,EAAA;EAAI;oBAPSqC,SAAAA;AAQf,GAXiBH,qBAAAA,mBAAAA,CAAAA,EAAAA;",
6
- "names": ["import_echo_schema", "categoryIcons", "finance", "health", "geolocation", "education", "entertainment", "shopping", "travel", "utilities", "weather", "ChainInputType", "ChainInputSchema", "S", "mutable", "Struct", "name", "String", "type", "optional", "Enums", "value", "ChainPromptType", "TypedObject", "typename", "version", "command", "template", "inputs", "Array", "ChainType", "prompts", "Ref", "AIChatType", "queue", "Expando", "ApiAuthorizationKey", "Literal", "key", "placement", "Union", "ApiAuthorizationOauth", "clientId", "clientSecret", "tokenUrl", "grantType", "ApiAuthorization", "ServiceInterfaceFunction", "kind", "fn", "FunctionType", "ServiceInterfaceWorkflow", "workflow", "ComputeGraph", "ServiceInterfaceApi", "schemaUrl", "schema", "Any", "authorization", "ServiceInterface", "ServiceType", "serviceId", "description", "category", "enabled", "Boolean", "interfaces", "AutomationAction", "AUTOMATION_ACTION", "AUTOMATION_PLUGIN", "Create", "TaggedClass", "input", "output", "object"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/AutomationPanel/AutomationPanel.tsx", "../../../src/components/TriggerEditor/TriggerEditor.tsx", "../../../src/components/AutomationPanel/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { S } from '@dxos/echo-schema';\nimport {\n FunctionType,\n FunctionTrigger,\n FunctionTriggerSchema,\n TriggerKind,\n type FunctionTriggerType,\n ScriptType,\n} from '@dxos/functions';\nimport { type Client, useClient } from '@dxos/react-client';\nimport { create, Filter, useQuery, type Space, type ReactiveObject, getSpace } from '@dxos/react-client/echo';\nimport { IconButton, Input, useTranslation, Button } from '@dxos/react-ui';\nimport { List } from '@dxos/react-ui-list';\nimport { ghostHover, mx } from '@dxos/react-ui-theme';\n\nimport { AUTOMATION_PLUGIN } from '../../meta';\nimport { TriggerEditor, type TriggerEditorProps } from '../TriggerEditor';\n\nconst grid = 'grid grid-cols-[40px_1fr_32px] min-bs-[2.5rem]';\n\nexport type AutomationPanelProps = {\n space: Space;\n object?: ReactiveObject<any>;\n};\n\n// TODO(burdon): Factor out common layout with ViewEditor.\nexport const AutomationPanel = ({ space, object }: AutomationPanelProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n const client = useClient();\n const triggers = useQuery(space, Filter.schema(FunctionTrigger));\n const functions = useQuery(space, Filter.schema(FunctionType));\n const scripts = useQuery(space, Filter.schema(ScriptType));\n\n const [trigger, setTrigger] = useState<FunctionTriggerType>();\n const [selected, setSelected] = useState<FunctionTrigger>();\n\n const handleSelect = (trigger: FunctionTrigger) => {\n const { id: _, ...values } = trigger;\n setTrigger(values);\n setSelected(trigger);\n };\n\n const handleAdd = () => {\n setTrigger(create(FunctionTriggerSchema, { meta: {} }));\n setSelected(undefined);\n };\n\n const handleDelete = (trigger: FunctionTrigger) => {\n space.db.remove(trigger);\n setTrigger(undefined);\n setSelected(undefined);\n };\n\n const handleSave: TriggerEditorProps['onSave'] = (trigger) => {\n if (selected) {\n Object.assign(selected, trigger);\n } else {\n space.db.add(create(FunctionTrigger, trigger));\n }\n\n setTrigger(undefined);\n setSelected(undefined);\n };\n\n const handleCancel: TriggerEditorProps['onCancel'] = () => {\n setTrigger(undefined);\n };\n\n return (\n <div className='flex flex-col w-full divide-y divide-separator overflow-y-auto'>\n <List.Root<FunctionTrigger> items={triggers} isItem={S.is(FunctionTrigger)} getId={(field) => field.id}>\n {({ items: triggers }) => (\n <div role='list' className='flex flex-col w-full'>\n {triggers?.map((trigger) => {\n const copyAction = getCopyAction(client, trigger);\n return (\n <List.Item<FunctionTrigger>\n key={trigger.id}\n item={trigger}\n classNames={mx(grid, ghostHover, 'items-center', 'px-2')}\n >\n <Input.Root>\n <Input.Switch\n checked={trigger.enabled}\n onCheckedChange={(checked) => (trigger.enabled = checked)}\n />\n </Input.Root>\n\n <div className={'flex'}>\n <List.ItemTitle\n classNames='px-1 cursor-pointer w-0 shrink truncate'\n onClick={() => handleSelect(trigger)}\n >\n {getFunctionName(scripts, functions, trigger) ?? '∅'}\n </List.ItemTitle>\n\n {/* TODO: a better way to expose copy action */}\n {copyAction && (\n <Button onClick={() => navigator.clipboard.writeText(copyAction.contentProvider())}>\n {t(copyAction.translationKey)}\n </Button>\n )}\n </div>\n\n <List.ItemDeleteButton onClick={() => handleDelete(trigger)} />\n </List.Item>\n );\n })}\n </div>\n )}\n </List.Root>\n\n {trigger && <TriggerEditor space={space} trigger={trigger} onSave={handleSave} onCancel={handleCancel} />}\n\n {!trigger && (\n <div className='flex p-2 justify-center'>\n <IconButton icon='ph--plus--regular' label={t('new trigger')} onClick={handleAdd} />\n </div>\n )}\n </div>\n );\n};\n\nconst getCopyAction = (client: Client, trigger: FunctionTrigger | undefined) => {\n if (trigger?.spec?.type === TriggerKind.Email) {\n return { translationKey: 'trigger copy email', contentProvider: () => `${getSpace(trigger)!.id}@dxos.network` };\n }\n\n if (trigger?.spec?.type === TriggerKind.Webhook) {\n return { translationKey: 'trigger copy url', contentProvider: () => getWebhookUrl(client, trigger) };\n }\n\n return undefined;\n};\n\nconst getWebhookUrl = (client: Client, trigger: FunctionTrigger) => {\n const spaceId = getSpace(trigger)!.id;\n const edgeUrl = new URL(client.config.values.runtime!.services!.edge!.url!);\n const isSecure = edgeUrl.protocol.startsWith('https') || edgeUrl.protocol.startsWith('wss');\n edgeUrl.protocol = isSecure ? 'https' : 'http';\n return new URL(`/webhook/${spaceId}:${trigger.id}`, edgeUrl).toString();\n};\n\nconst getFunctionName = (scripts: ScriptType[], functions: FunctionType[], trigger: FunctionTriggerType) => {\n const shortId = trigger.function && `${trigger.function?.slice(0, 16)}…`;\n const functionObject = functions.find((fn) => fn.name === trigger.function);\n if (!functionObject) {\n return shortId;\n }\n return scripts.find((s) => functionObject.source?.target?.id === s.id)?.name ?? shortId;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useEffect, useState } from 'react';\n\nimport { ComputeGraph } from '@dxos/conductor';\nimport {\n FunctionType,\n FunctionTriggerSchema,\n type FunctionTriggerType,\n type FunctionTrigger,\n ScriptType,\n TriggerKind,\n} from '@dxos/functions';\nimport { Filter, useQuery, type Space } from '@dxos/react-client/echo';\nimport { IconButton, Input, useTranslation } from '@dxos/react-ui';\nimport { Form, SelectInput, TextInput } from '@dxos/react-ui-form';\n\nimport { AUTOMATION_PLUGIN } from '../../meta';\n\nexport type TriggerEditorProps = {\n space: Space;\n trigger: FunctionTriggerType;\n onSave?: (trigger: Omit<FunctionTrigger, 'id'>) => void;\n onCancel?: () => void;\n};\n\nexport const TriggerEditor = ({ space, trigger, onSave, onCancel }: TriggerEditorProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n\n const functions = useQuery(space, Filter.schema(FunctionType));\n const workflows = useQuery(space, Filter.schema(ComputeGraph));\n const scripts = useQuery(space, Filter.schema(ScriptType));\n\n const handleSave = (values: FunctionTriggerType) => {\n onSave?.(values);\n };\n\n return (\n <Form<FunctionTriggerType>\n schema={FunctionTriggerSchema}\n values={trigger}\n onSave={handleSave}\n onCancel={onCancel}\n Custom={{\n ['function' satisfies keyof FunctionTriggerType]: (props) => (\n <SelectInput\n {...props}\n options={getWorkflowOptions(workflows).concat(getFunctionOptions(scripts, functions))}\n />\n ),\n ['spec.type' as const]: (props) => (\n <SelectInput\n {...props}\n options={Object.values(TriggerKind).map((kind) => ({\n value: kind,\n label: t(`trigger type ${kind}`),\n }))}\n />\n ),\n ['meta' as const]: (props) => {\n const meta = props.getValue()!;\n useEffect(() => props.onValueChange('object', { ...meta }), []);\n const [newMetaFieldName, setNewMetaFieldName] = useState('');\n\n return (\n <>\n <div>{props.label}</div>\n {[...Object.keys(meta)].map((key) => {\n const compositeKey: any = `meta.${key}`;\n return (\n <div key={compositeKey} role='none' className='flex items-center mt-2 gap-1'>\n <div role='none' className='flex-1'>\n <TextInput\n {...props}\n getValue={() => (props.getValue() as any)[key]}\n type={'string'}\n label={key}\n />\n </div>\n <IconButton\n icon='ph--trash--regular'\n iconOnly\n classNames={'mt-6'}\n label={t('trigger meta remove')}\n onClick={() => {\n const newValues: any = { ...props.getValue() };\n delete newValues[key];\n props.onValueChange('object', newValues);\n }}\n />\n </div>\n );\n })}\n <div role='none' className='flex items-center mt-2 gap-1 plb-1'>\n <div role='none' className='flex-1'>\n <Input.Root>\n <Input.TextInput\n placeholder={t('trigger meta prop name placeholder')}\n value={newMetaFieldName}\n onChange={(event) => setNewMetaFieldName(event.target.value)}\n />\n </Input.Root>\n </div>\n <IconButton\n icon='ph--plus--regular'\n iconOnly\n label={t('trigger meta add')}\n onClick={() => {\n if (newMetaFieldName.length) {\n const meta = props.getValue() ?? {};\n const metaWithNewProp = { ...meta, [newMetaFieldName]: '' };\n setNewMetaFieldName('');\n props.onValueChange('object', metaWithNewProp);\n }\n }}\n />\n </div>\n </>\n );\n },\n }}\n />\n );\n};\n\nconst getWorkflowOptions = (graphs: ComputeGraph[]) => {\n return graphs.map((graph) => ({ label: `compute-${graph.id}`, value: `dxn:echo:@:${graph.id}` }));\n};\n\nconst getFunctionOptions = (scripts: ScriptType[], functions: FunctionType[]) => {\n const getLabel = (fn: FunctionType) => scripts.find((s) => fn.source?.target?.id === s.id)?.name ?? fn.name;\n return functions.map((fn) => ({ label: getLabel(fn), value: `dxn:worker:${fn.name}` }));\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { AutomationPanel } from './AutomationPanel';\n\nexport default AutomationPanel;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAgC;AAEhC,yBAAkB;AAClB,uBAOO;AACP,0BAAuC;AACvC,kBAAoF;AACpF,sBAA0D;AAC1D,2BAAqB;AACrB,4BAA+B;ACf/B,IAAAA,gBAA2C;AAE3C,uBAA6B;AAC7B,IAAAC,oBAOO;AACP,IAAAC,eAA6C;AAC7C,IAAAC,mBAAkD;AAClD,2BAA6C;AAWtC,IAAMC,gBAAgB,CAAC,EAAEC,OAAOC,SAASC,QAAQC,SAAQ,MAAsB;AACpF,QAAM,EAAEC,EAAC,QAAKC,iCAAeC,uCAAAA;AAE7B,QAAMC,gBAAYC,uBAASR,OAAOS,oBAAOC,OAAOC,8BAAAA,CAAAA;AAChD,QAAMC,gBAAYJ,uBAASR,OAAOS,oBAAOC,OAAOG,6BAAAA,CAAAA;AAChD,QAAMC,cAAUN,uBAASR,OAAOS,oBAAOC,OAAOK,4BAAAA,CAAAA;AAE9C,QAAMC,aAAa,CAACC,WAAAA;AAClBf,aAASe,MAAAA;EACX;AAEA,SACE,8BAAAC,QAAA,cAACC,2BAAAA;IACCT,QAAQU;IACRH,QAAQhB;IACRC,QAAQc;IACRb;IACAkB,QAAQ;MACN,CAAC,UAAA,GAAiD,CAACC,UACjD,8BAAAJ,QAAA,cAACK,kCAAAA;QACE,GAAGD;QACJE,SAASC,mBAAmBb,SAAAA,EAAWc,OAAOC,mBAAmBb,SAASP,SAAAA,CAAAA;;MAG9E,CAAC,WAAA,GAAuB,CAACe,UACvB,8BAAAJ,QAAA,cAACK,kCAAAA;QACE,GAAGD;QACJE,SAASI,OAAOX,OAAOY,6BAAAA,EAAaC,IAAI,CAACC,UAAU;UACjDC,OAAOD;UACPE,OAAO7B,EAAE,gBAAgB2B,IAAAA,EAAM;QACjC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iB,MAAM,OAAGK,sBAASxH,OAAAA,EAAUgE,EAAE;IAAgB;EAChH;AAEA,MAAIhE,SAASsH,MAAMvE,SAASnB,iBAAAA,YAAY6F,SAAS;AAC/C,WAAO;MAAEL,gBAAgB;MAAoBD,iBAAiB,MAAMO,cAAchD,QAAQ1E,OAAAA;IAAS;EACrG;AAEA,SAAOqF;AACT;AAEA,IAAMqC,gBAAgB,CAAChD,QAAgB1E,YAAAA;AACrC,QAAM2H,cAAUH,sBAASxH,OAAAA,EAAUgE;AACnC,QAAM4D,UAAU,IAAIC,IAAInD,OAAOoD,OAAO9G,OAAO+G,QAASC,SAAUC,KAAMC,GAAG;AACzE,QAAMC,WAAWP,QAAQQ,SAASC,WAAW,OAAA,KAAYT,QAAQQ,SAASC,WAAW,KAAA;AACrFT,UAAQQ,WAAWD,WAAW,UAAU;AACxC,SAAO,IAAIN,IAAI,YAAYF,OAAAA,IAAW3H,QAAQgE,EAAE,IAAI4D,OAAAA,EAASU,SAAQ;AACvE;AAEA,IAAMxB,kBAAkB,CAACjG,SAAuBP,WAA2BN,YAAAA;AACzE,QAAMuI,UAAUvI,QAAQwI,YAAY,GAAGxI,QAAQwI,UAAUC,MAAM,GAAG,EAAA,CAAA;AAClE,QAAMC,iBAAiBpI,UAAU6D,KAAK,CAACD,OAAOA,GAAGI,SAAStE,QAAQwI,QAAQ;AAC1E,MAAI,CAACE,gBAAgB;AACnB,WAAOH;EACT;AACA,SAAO1H,QAAQsD,KAAK,CAACC,MAAMsE,eAAerE,QAAQV,QAAQK,OAAOI,EAAEJ,EAAE,GAAGM,QAAQiE;AAClF;AEtJA,IAAA,0BAAe/D;",
6
- "names": ["import_react", "import_functions", "import_echo", "import_react_ui", "TriggerEditor", "space", "trigger", "onSave", "onCancel", "t", "useTranslation", "AUTOMATION_PLUGIN", "functions", "useQuery", "Filter", "schema", "FunctionType", "workflows", "ComputeGraph", "scripts", "ScriptType", "handleSave", "values", "React", "Form", "FunctionTriggerSchema", "Custom", "props", "SelectInput", "options", "getWorkflowOptions", "concat", "getFunctionOptions", "Object", "TriggerKind", "map", "kind", "value", "label", "meta", "getValue", "useEffect", "onValueChange", "newMetaFieldName", "setNewMetaFieldName", "useState", "div", "keys", "key", "compositeKey", "role", "className", "TextInput", "type", "IconButton", "icon", "iconOnly", "classNames", "onClick", "newValues", "Input", "Root", "placeholder", "onChange", "event", "target", "length", "metaWithNewProp", "graphs", "graph", "id", "getLabel", "fn", "find", "s", "source", "name", "grid", "AutomationPanel", "object", "client", "useClient", "triggers", "FunctionTrigger", "setTrigger", "selected", "setSelected", "handleSelect", "_", "handleAdd", "create", "undefined", "handleDelete", "db", "remove", "assign", "add", "handleCancel", "List", "items", "isItem", "S", "is", "getId", "field", "copyAction", "getCopyAction", "Item", "item", "mx", "ghostHover", "Switch", "checked", "enabled", "onCheckedChange", "ItemTitle", "getFunctionName", "Button", "navigator", "clipboard", "writeText", "contentProvider", "translationKey", "ItemDeleteButton", "spec", "Email", "getSpace", "Webhook", "getWebhookUrl", "spaceId", "edgeUrl", "URL", "config", "runtime", "services", "edge", "url", "isSecure", "protocol", "startsWith", "toString", "shortId", "function", "slice", "functionObject"]
7
- }
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_U5Z7LFWB_exports = {};
20
- __export(chunk_U5Z7LFWB_exports, {
21
- AutomationCapabilities: () => AutomationCapabilities
22
- });
23
- module.exports = __toCommonJS(chunk_U5Z7LFWB_exports);
24
- var import_chunk_EQYHOTGG = require("./chunk-EQYHOTGG.cjs");
25
- var import_app_framework = require("@dxos/app-framework");
26
- var AutomationCapabilities;
27
- (function(AutomationCapabilities2) {
28
- AutomationCapabilities2.AiClient = (0, import_app_framework.defineCapability)(`${import_chunk_EQYHOTGG.AUTOMATION_PLUGIN}/capability/ai-client`);
29
- })(AutomationCapabilities || (AutomationCapabilities = {}));
30
- // Annotate the CommonJS export names for ESM import in node:
31
- 0 && (module.exports = {
32
- AutomationCapabilities
33
- });
34
- //# sourceMappingURL=chunk-U5Z7LFWB.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/capabilities.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type AIServiceClientImpl } from '@dxos/assistant';\n\nimport { AUTOMATION_PLUGIN } from '../meta';\n\nexport namespace AutomationCapabilities {\n export const AiClient = defineCapability<AIServiceClientImpl>(`${AUTOMATION_PLUGIN}/capability/ai-client`);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAiC;;UAKhBA,yBAAAA;0BACFC,eAAWC,uCAAsC,GAAGC,uCAAAA,uBAAwC;AAC3G,GAFiBH,2BAAAA,yBAAAA,CAAAA,EAAAA;",
6
- "names": ["AutomationCapabilities", "AiClient", "defineCapability", "AUTOMATION_PLUGIN"]
7
- }
@@ -1,44 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var intent_resolver_C6OKFVEW_exports = {};
20
- __export(intent_resolver_C6OKFVEW_exports, {
21
- default: () => intent_resolver_default
22
- });
23
- module.exports = __toCommonJS(intent_resolver_C6OKFVEW_exports);
24
- var import_chunk_GB7245FH = require("./chunk-GB7245FH.cjs");
25
- var import_chunk_EQYHOTGG = require("./chunk-EQYHOTGG.cjs");
26
- var import_app_framework = require("@dxos/app-framework");
27
- var import_echo_schema = require("@dxos/echo-schema");
28
- var import_live_object = require("@dxos/live-object");
29
- var intent_resolver_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.IntentResolver, (0, import_app_framework.createResolver)({
30
- intent: import_chunk_GB7245FH.AutomationAction.Create,
31
- resolve: ({ name }) => ({
32
- data: {
33
- object: (0, import_live_object.create)(import_chunk_GB7245FH.AIChatType, {
34
- name,
35
- // TODO(burdon): ???
36
- // new DXN(DXN.kind.QUEUE, [QueueSubspaceTags.DATA, SpaceId.random(), ObjectId.random()]).toString(),
37
- queue: (0, import_live_object.makeRef)({
38
- id: import_echo_schema.ObjectId.random()
39
- })
40
- })
41
- }
42
- })
43
- }));
44
- //# sourceMappingURL=intent-resolver-C6OKFVEW.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/intent-resolver.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, createResolver } from '@dxos/app-framework';\nimport { ObjectId } from '@dxos/echo-schema';\nimport { create, makeRef } from '@dxos/live-object';\n\nimport { AutomationAction, AIChatType } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: AutomationAction.Create,\n resolve: ({ name }) => ({\n data: {\n object: create(AIChatType, {\n name,\n // TODO(burdon): ???\n // new DXN(DXN.kind.QUEUE, [QueueSubspaceTags.DATA, SpaceId.random(), ObjectId.random()]).toString(),\n queue: makeRef({ id: ObjectId.random() }),\n }),\n },\n }),\n }),\n );\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAA0D;AAC1D,yBAAyB;AACzB,yBAAgC;AAIhC,IAAA,0BAAe,UACbA,kCACEC,kCAAaC,oBACbC,qCAAe;EACbC,QAAQC,uCAAiBC;EACzBC,SAAS,CAAC,EAAEC,KAAI,OAAQ;IACtBC,MAAM;MACJC,YAAQC,2BAAOC,kCAAY;QACzBJ;;;QAGAK,WAAOC,4BAAQ;UAAEC,IAAIC,4BAASC,OAAM;QAAG,CAAA;MACzC,CAAA;IACF;EACF;AACF,CAAA,CAAA;",
6
- "names": ["contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "AutomationAction", "Create", "resolve", "name", "data", "object", "create", "AIChatType", "queue", "makeRef", "id", "ObjectId", "random"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/react-surface.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { getSpace, isEchoObject, isSpace, type ReactiveEchoObject } from '@dxos/react-client/echo';\n\nimport { AmbientChatDialog, AutomationPanel, ChatContainer, ServiceRegistry } from '../components';\nimport { AUTOMATION_PLUGIN, AMBIENT_CHAT_DIALOG } from '../meta';\nimport { AIChatType } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${AUTOMATION_PLUGIN}/ai-chat`,\n role: 'article',\n filter: (data): data is { subject: AIChatType } => data.subject instanceof AIChatType,\n component: ({ data, role }) => <ChatContainer role={role} chat={data.subject} />,\n }),\n createSurface({\n id: `${AUTOMATION_PLUGIN}/service-registry`,\n role: 'complementary--service-registry',\n component: ({ data }) => (\n <ServiceRegistry space={isSpace(data.subject) ? data.subject : getSpace(data.subject)!} />\n ),\n }),\n createSurface({\n id: AMBIENT_CHAT_DIALOG,\n role: 'dialog',\n filter: (data): data is any => data.component === AMBIENT_CHAT_DIALOG,\n component: () => <AmbientChatDialog />,\n }),\n createSurface({\n id: `${AUTOMATION_PLUGIN}/automation`,\n role: 'complementary--automation',\n filter: (data): data is { subject: ReactiveEchoObject<any> } =>\n isEchoObject(data.subject) && !!getSpace(data.subject),\n component: ({ data }) => <AutomationPanel space={getSpace(data.subject)!} object={data.subject} />,\n }),\n ]);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,2BAAyD;AACzD,kBAAyE;AAMzE,IAAA,wBAAe,UACbA,kCAAYC,kCAAaC,cAAc;MACrCC,oCAAc;IACZC,IAAI,GAAGC,uCAAAA;IACPC,MAAM;IACNC,QAAQ,CAACC,SAA0CA,KAAKC,mBAAmBC;IAC3EC,WAAW,CAAC,EAAEH,MAAMF,KAAI,MAAO,6BAAAM,QAAA,cAACC,qCAAAA;MAAcP;MAAYQ,MAAMN,KAAKC;;EACvE,CAAA;MACAN,oCAAc;IACZC,IAAI,GAAGC,uCAAAA;IACPC,MAAM;IACNK,WAAW,CAAC,EAAEH,KAAI,MAChB,6BAAAI,QAAA,cAACG,uCAAAA;MAAgBC,WAAOC,qBAAQT,KAAKC,OAAO,IAAID,KAAKC,cAAUS,sBAASV,KAAKC,OAAO;;EAExF,CAAA;MACAN,oCAAc;IACZC,IAAIe;IACJb,MAAM;IACNC,QAAQ,CAACC,SAAsBA,KAAKG,cAAcQ;IAClDR,WAAW,MAAM,6BAAAC,QAAA,cAACQ,yCAAAA,IAAAA;EACpB,CAAA;MACAjB,oCAAc;IACZC,IAAI,GAAGC,uCAAAA;IACPC,MAAM;IACNC,QAAQ,CAACC,aACPa,0BAAab,KAAKC,OAAO,KAAK,CAAC,KAACS,sBAASV,KAAKC,OAAO;IACvDE,WAAW,CAAC,EAAEH,KAAI,MAAO,6BAAAI,QAAA,cAACU,uCAAAA;MAAgBN,WAAOE,sBAASV,KAAKC,OAAO;MAAIc,QAAQf,KAAKC;;EACzF,CAAA;CACD;",
6
- "names": ["contributes", "Capabilities", "ReactSurface", "createSurface", "id", "AUTOMATION_PLUGIN", "role", "filter", "data", "subject", "AIChatType", "component", "React", "ChatContainer", "chat", "ServiceRegistry", "space", "isSpace", "getSpace", "AMBIENT_CHAT_DIALOG", "AmbientChatDialog", "isEchoObject", "AutomationPanel", "object"]
7
- }
@@ -1,46 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var types_exports = {};
20
- __export(types_exports, {
21
- AIChatType: () => import_chunk_GB7245FH.AIChatType,
22
- ApiAuthorization: () => import_chunk_GB7245FH.ApiAuthorization,
23
- AutomationAction: () => import_chunk_GB7245FH.AutomationAction,
24
- ChainInputSchema: () => import_chunk_GB7245FH.ChainInputSchema,
25
- ChainInputType: () => import_chunk_GB7245FH.ChainInputType,
26
- ChainPromptType: () => import_chunk_GB7245FH.ChainPromptType,
27
- ChainType: () => import_chunk_GB7245FH.ChainType,
28
- ServiceType: () => import_chunk_GB7245FH.ServiceType,
29
- categoryIcons: () => import_chunk_GB7245FH.categoryIcons
30
- });
31
- module.exports = __toCommonJS(types_exports);
32
- var import_chunk_GB7245FH = require("../chunk-GB7245FH.cjs");
33
- var import_chunk_EQYHOTGG = require("../chunk-EQYHOTGG.cjs");
34
- // Annotate the CommonJS export names for ESM import in node:
35
- 0 && (module.exports = {
36
- AIChatType,
37
- ApiAuthorization,
38
- AutomationAction,
39
- ChainInputSchema,
40
- ChainInputType,
41
- ChainPromptType,
42
- ChainType,
43
- ServiceType,
44
- categoryIcons
45
- });
46
- //# sourceMappingURL=index.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["index.cjs"],
4
- "sourcesContent": ["import {\n AIChatType,\n ApiAuthorization,\n AutomationAction,\n ChainInputSchema,\n ChainInputType,\n ChainPromptType,\n ChainType,\n ServiceType,\n categoryIcons\n} from \"../chunk-GB7245FH.cjs\";\nimport \"../chunk-EQYHOTGG.cjs\";\nexport {\n AIChatType,\n ApiAuthorization,\n AutomationAction,\n ChainInputSchema,\n ChainInputType,\n ChainPromptType,\n ChainType,\n ServiceType,\n categoryIcons\n};\n//# sourceMappingURL=index.cjs.map\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAUO;AACP,4BAAO;",
6
- "names": []
7
- }
@@ -1,9 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- AutomationPanel_default
4
- } from "./chunk-6HLBYDUI.mjs";
5
- import "./chunk-EMVA6QUT.mjs";
6
- export {
7
- AutomationPanel_default as default
8
- };
9
- //# sourceMappingURL=AutomationPanel-V3IWQAMO.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }
@@ -1,13 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- ChatContainer,
4
- ChatContainer_default
5
- } from "./chunk-7VPT3OO3.mjs";
6
- import "./chunk-IJRTDSKN.mjs";
7
- import "./chunk-DNCXRGAF.mjs";
8
- import "./chunk-EMVA6QUT.mjs";
9
- export {
10
- ChatContainer,
11
- ChatContainer_default as default
12
- };
13
- //# sourceMappingURL=ChatContainer-ORVWQPJO.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }
@@ -1,23 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- AutomationCapabilities
4
- } from "./chunk-IJRTDSKN.mjs";
5
- import "./chunk-EMVA6QUT.mjs";
6
-
7
- // packages/plugins/experimental/plugin-automation/src/capabilities/ai-client.ts
8
- import { contributes } from "@dxos/app-framework";
9
- import { AIServiceClientImpl } from "@dxos/assistant";
10
- import { ClientCapabilities } from "@dxos/plugin-client";
11
- var DEFAULT_AI_SERVICE_URL = "http://localhost:8788";
12
- var ai_client_default = (context) => {
13
- const client = context.requestCapability(ClientCapabilities.Client);
14
- const endpoint = client.config.values.runtime?.services?.ai?.server ?? DEFAULT_AI_SERVICE_URL;
15
- const aiClient = new AIServiceClientImpl({
16
- endpoint
17
- });
18
- return contributes(AutomationCapabilities.AiClient, aiClient);
19
- };
20
- export {
21
- ai_client_default as default
22
- };
23
- //# sourceMappingURL=ai-client-XGNA6SJ5.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/ai-client.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { contributes, type PluginsContext } from '@dxos/app-framework';\nimport { AIServiceClientImpl } from '@dxos/assistant';\nimport { ClientCapabilities } from '@dxos/plugin-client';\n\nimport { AutomationCapabilities } from './capabilities';\n\n// TODO(wittjosiah): Factor out.\nconst DEFAULT_AI_SERVICE_URL = 'http://localhost:8788';\n\nexport default (context: PluginsContext) => {\n const client = context.requestCapability(ClientCapabilities.Client);\n const endpoint = client.config.values.runtime?.services?.ai?.server ?? DEFAULT_AI_SERVICE_URL;\n const aiClient = new AIServiceClientImpl({ endpoint });\n return contributes(AutomationCapabilities.AiClient, aiClient);\n};\n"],
5
- "mappings": ";;;;;;;AAIA,SAASA,mBAAwC;AACjD,SAASC,2BAA2B;AACpC,SAASC,0BAA0B;AAKnC,IAAMC,yBAAyB;AAE/B,IAAA,oBAAe,CAACC,YAAAA;AACd,QAAMC,SAASD,QAAQE,kBAAkBC,mBAAmBC,MAAM;AAClE,QAAMC,WAAWJ,OAAOK,OAAOC,OAAOC,SAASC,UAAUC,IAAIC,UAAUZ;AACvE,QAAMa,WAAW,IAAIC,oBAAoB;IAAER;EAAS,CAAA;AACpD,SAAOS,YAAYC,uBAAuBC,UAAUJ,QAAAA;AACtD;",
6
- "names": ["contributes", "AIServiceClientImpl", "ClientCapabilities", "DEFAULT_AI_SERVICE_URL", "context", "client", "requestCapability", "ClientCapabilities", "Client", "endpoint", "config", "values", "runtime", "services", "ai", "server", "aiClient", "AIServiceClientImpl", "contributes", "AutomationCapabilities", "AiClient"]
7
- }