@dxos/plugin-automation 0.7.5-main.9d26e3a → 0.7.5-main.b19bfc8

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 (364) hide show
  1. package/dist/lib/browser/AssistantDialog-V67OWLRP.mjs +116 -0
  2. package/dist/lib/browser/AssistantDialog-V67OWLRP.mjs.map +7 -0
  3. package/dist/lib/browser/AutomationPanel-NCKK3CFN.mjs +8 -0
  4. package/dist/lib/browser/ChatContainer-5BS6THNV.mjs +33 -0
  5. package/dist/lib/browser/ChatContainer-5BS6THNV.mjs.map +7 -0
  6. package/dist/lib/browser/TemplateContainer-HJJV44CE.mjs +23 -0
  7. package/dist/lib/browser/TemplateContainer-HJJV44CE.mjs.map +7 -0
  8. package/dist/lib/browser/ai-client-T2PBJISL.mjs +22 -0
  9. package/dist/lib/browser/ai-client-T2PBJISL.mjs.map +7 -0
  10. package/dist/lib/browser/app-graph-builder-IR3CGVM6.mjs +110 -0
  11. package/dist/lib/browser/app-graph-builder-IR3CGVM6.mjs.map +7 -0
  12. package/dist/lib/browser/chunk-62E2AEXF.mjs +162 -0
  13. package/dist/lib/browser/chunk-62E2AEXF.mjs.map +7 -0
  14. package/dist/lib/browser/chunk-67KDIIM6.mjs +15 -0
  15. package/dist/lib/browser/chunk-67KDIIM6.mjs.map +7 -0
  16. package/dist/lib/browser/chunk-BQ4WHY4D.mjs +1818 -0
  17. package/dist/lib/browser/chunk-BQ4WHY4D.mjs.map +7 -0
  18. package/dist/lib/browser/{chunk-X5KMOH3I.mjs → chunk-HZSTXZWK.mjs} +6 -4
  19. package/dist/lib/browser/chunk-HZSTXZWK.mjs.map +7 -0
  20. package/dist/lib/browser/chunk-LJ7F4KDM.mjs +243 -0
  21. package/dist/lib/browser/chunk-LJ7F4KDM.mjs.map +7 -0
  22. package/dist/lib/browser/chunk-QH5E22EL.mjs +108 -0
  23. package/dist/lib/browser/chunk-QH5E22EL.mjs.map +7 -0
  24. package/dist/lib/browser/chunk-XAIWETH6.mjs +81 -0
  25. package/dist/lib/browser/chunk-XAIWETH6.mjs.map +7 -0
  26. package/dist/lib/browser/index.mjs +210 -467
  27. package/dist/lib/browser/index.mjs.map +4 -4
  28. package/dist/lib/browser/intent-resolver-ICLE6FSI.mjs +44 -0
  29. package/dist/lib/browser/intent-resolver-ICLE6FSI.mjs.map +7 -0
  30. package/dist/lib/browser/meta.json +1 -1
  31. package/dist/lib/browser/react-surface-KEKVLCPQ.mjs +80 -0
  32. package/dist/lib/browser/react-surface-KEKVLCPQ.mjs.map +7 -0
  33. package/dist/lib/browser/settings-FE5DDWOE.mjs +22 -0
  34. package/dist/lib/browser/settings-FE5DDWOE.mjs.map +7 -0
  35. package/dist/lib/browser/types/index.mjs +18 -9
  36. package/dist/lib/node/AssistantDialog-E62O72KI.cjs +140 -0
  37. package/dist/lib/node/AssistantDialog-E62O72KI.cjs.map +7 -0
  38. package/dist/lib/node/{meta.cjs → AutomationPanel-6COLKRIB.cjs} +7 -11
  39. package/dist/lib/node/AutomationPanel-6COLKRIB.cjs.map +7 -0
  40. package/dist/lib/node/ChatContainer-4QTLL7TH.cjs +61 -0
  41. package/dist/lib/node/ChatContainer-4QTLL7TH.cjs.map +7 -0
  42. package/dist/lib/node/TemplateContainer-3YCM6XPU.cjs +53 -0
  43. package/dist/lib/node/TemplateContainer-3YCM6XPU.cjs.map +7 -0
  44. package/dist/lib/node/ai-client-L5GUSAER.cjs +38 -0
  45. package/dist/lib/node/ai-client-L5GUSAER.cjs.map +7 -0
  46. package/dist/lib/node/app-graph-builder-ECNVGTRT.cjs +122 -0
  47. package/dist/lib/node/app-graph-builder-ECNVGTRT.cjs.map +7 -0
  48. package/dist/lib/node/chunk-3QSK6IPK.cjs +133 -0
  49. package/dist/lib/node/chunk-3QSK6IPK.cjs.map +7 -0
  50. package/dist/lib/node/chunk-76F5BCJE.cjs +111 -0
  51. package/dist/lib/node/chunk-76F5BCJE.cjs.map +7 -0
  52. package/dist/lib/node/chunk-B37JIAOP.cjs +1795 -0
  53. package/dist/lib/node/chunk-B37JIAOP.cjs.map +7 -0
  54. package/dist/lib/node/{chunk-DTJ7XVO2.cjs → chunk-BAQRBGOJ.cjs} +11 -8
  55. package/dist/lib/node/chunk-BAQRBGOJ.cjs.map +7 -0
  56. package/dist/lib/node/chunk-UVWK2XJE.cjs +183 -0
  57. package/dist/lib/node/chunk-UVWK2XJE.cjs.map +7 -0
  58. package/dist/lib/node/chunk-V4L7LTWM.cjs +267 -0
  59. package/dist/lib/node/chunk-V4L7LTWM.cjs.map +7 -0
  60. package/dist/lib/node/chunk-VNBYGJ4K.cjs +34 -0
  61. package/dist/lib/node/chunk-VNBYGJ4K.cjs.map +7 -0
  62. package/dist/lib/node/index.cjs +201 -473
  63. package/dist/lib/node/index.cjs.map +4 -4
  64. package/dist/lib/node/intent-resolver-4MQZULXW.cjs +58 -0
  65. package/dist/lib/node/intent-resolver-4MQZULXW.cjs.map +7 -0
  66. package/dist/lib/node/meta.json +1 -1
  67. package/dist/lib/node/react-surface-4RVHY6WI.cjs +95 -0
  68. package/dist/lib/node/react-surface-4RVHY6WI.cjs.map +7 -0
  69. package/dist/lib/node/settings-GOIB2WJQ.cjs +36 -0
  70. package/dist/lib/node/settings-GOIB2WJQ.cjs.map +7 -0
  71. package/dist/lib/node/types/index.cjs +19 -10
  72. package/dist/lib/node/types/index.cjs.map +2 -2
  73. package/dist/lib/node-esm/AssistantDialog-IPRBJKWA.mjs +117 -0
  74. package/dist/lib/node-esm/AssistantDialog-IPRBJKWA.mjs.map +7 -0
  75. package/dist/lib/node-esm/AutomationPanel-3MPIAO7R.mjs +9 -0
  76. package/dist/lib/node-esm/ChatContainer-4IWUGMGM.mjs +34 -0
  77. package/dist/lib/node-esm/ChatContainer-4IWUGMGM.mjs.map +7 -0
  78. package/dist/lib/node-esm/TemplateContainer-YJIXR24Z.mjs +24 -0
  79. package/dist/lib/node-esm/TemplateContainer-YJIXR24Z.mjs.map +7 -0
  80. package/dist/lib/node-esm/ai-client-45LZLW7V.mjs +23 -0
  81. package/dist/lib/node-esm/ai-client-45LZLW7V.mjs.map +7 -0
  82. package/dist/lib/node-esm/app-graph-builder-HMRKSZ2X.mjs +111 -0
  83. package/dist/lib/node-esm/app-graph-builder-HMRKSZ2X.mjs.map +7 -0
  84. package/dist/lib/node-esm/chunk-5BKKHYO5.mjs +163 -0
  85. package/dist/lib/node-esm/chunk-5BKKHYO5.mjs.map +7 -0
  86. package/dist/lib/node-esm/chunk-AWAU4BHR.mjs +244 -0
  87. package/dist/lib/node-esm/chunk-AWAU4BHR.mjs.map +7 -0
  88. package/dist/lib/node-esm/chunk-CAWPHOY4.mjs +82 -0
  89. package/dist/lib/node-esm/chunk-CAWPHOY4.mjs.map +7 -0
  90. package/dist/lib/node-esm/chunk-I32H7MCF.mjs +109 -0
  91. package/dist/lib/node-esm/chunk-I32H7MCF.mjs.map +7 -0
  92. package/dist/lib/node-esm/{chunk-HNOBZHWK.mjs → chunk-IG4GSWZN.mjs} +6 -4
  93. package/dist/lib/node-esm/chunk-IG4GSWZN.mjs.map +7 -0
  94. package/dist/lib/node-esm/chunk-QHKP5HT2.mjs +1819 -0
  95. package/dist/lib/node-esm/chunk-QHKP5HT2.mjs.map +7 -0
  96. package/dist/lib/node-esm/chunk-SS7U6GCX.mjs +16 -0
  97. package/dist/lib/node-esm/chunk-SS7U6GCX.mjs.map +7 -0
  98. package/dist/lib/node-esm/index.mjs +210 -467
  99. package/dist/lib/node-esm/index.mjs.map +4 -4
  100. package/dist/lib/node-esm/intent-resolver-ZS7XTYLG.mjs +45 -0
  101. package/dist/lib/node-esm/intent-resolver-ZS7XTYLG.mjs.map +7 -0
  102. package/dist/lib/node-esm/meta.json +1 -1
  103. package/dist/lib/node-esm/react-surface-5ILD642V.mjs +81 -0
  104. package/dist/lib/node-esm/react-surface-5ILD642V.mjs.map +7 -0
  105. package/dist/lib/node-esm/settings-ANNQPPRY.mjs +23 -0
  106. package/dist/lib/node-esm/settings-ANNQPPRY.mjs.map +7 -0
  107. package/dist/lib/node-esm/types/index.mjs +18 -9
  108. package/dist/types/src/AutomationPlugin.d.ts +1 -3
  109. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  110. package/dist/types/src/capabilities/ai-client.d.ts +5 -0
  111. package/dist/types/src/capabilities/ai-client.d.ts.map +1 -0
  112. package/dist/types/src/capabilities/app-graph-builder.d.ts +181 -0
  113. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  114. package/dist/types/src/capabilities/capabilities.d.ts +5 -0
  115. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
  116. package/dist/types/src/capabilities/index.d.ts +183 -0
  117. package/dist/types/src/capabilities/index.d.ts.map +1 -0
  118. package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
  119. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
  120. package/dist/types/src/capabilities/react-surface.d.ts +4 -0
  121. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  122. package/dist/types/src/capabilities/settings.d.ts +4 -0
  123. package/dist/types/src/capabilities/settings.d.ts.map +1 -0
  124. package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts +7 -0
  125. package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts.map +1 -0
  126. package/dist/types/src/components/AmbientDialog/AmbientDialog.stories.d.ts +8 -0
  127. package/dist/types/src/components/AmbientDialog/AmbientDialog.stories.d.ts.map +1 -0
  128. package/dist/types/src/components/AmbientDialog/index.d.ts +2 -0
  129. package/dist/types/src/components/AmbientDialog/index.d.ts.map +1 -0
  130. package/dist/types/src/components/AssistantDialog.d.ts +7 -0
  131. package/dist/types/src/components/AssistantDialog.d.ts.map +1 -0
  132. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -2
  133. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  134. package/dist/types/src/components/AutomationSettings/AutomationSettings.d.ts +5 -0
  135. package/dist/types/src/components/AutomationSettings/AutomationSettings.d.ts.map +1 -0
  136. package/dist/types/src/components/AutomationSettings/index.d.ts +2 -0
  137. package/dist/types/src/components/AutomationSettings/index.d.ts.map +1 -0
  138. package/dist/types/src/components/ChatContainer.d.ts +7 -0
  139. package/dist/types/src/components/ChatContainer.d.ts.map +1 -0
  140. package/dist/types/src/components/Prompt/Prompt.d.ts +17 -0
  141. package/dist/types/src/components/Prompt/Prompt.d.ts.map +1 -0
  142. package/dist/types/src/components/Prompt/Prompt.stories.d.ts +9 -0
  143. package/dist/types/src/components/Prompt/Prompt.stories.d.ts.map +1 -0
  144. package/dist/types/src/components/Prompt/PromptBar.d.ts +10 -0
  145. package/dist/types/src/components/Prompt/PromptBar.d.ts.map +1 -0
  146. package/dist/types/src/components/Prompt/autocomplete.d.ts +21 -0
  147. package/dist/types/src/components/Prompt/autocomplete.d.ts.map +1 -0
  148. package/dist/types/src/components/Prompt/index.d.ts +3 -0
  149. package/dist/types/src/components/Prompt/index.d.ts.map +1 -0
  150. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts +5 -0
  151. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts.map +1 -0
  152. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts +8 -0
  153. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts.map +1 -0
  154. package/dist/types/src/components/ServiceRegistry/index.d.ts +2 -0
  155. package/dist/types/src/components/ServiceRegistry/index.d.ts.map +1 -0
  156. package/dist/types/src/components/TemplateContainer.d.ts +7 -0
  157. package/dist/types/src/components/TemplateContainer.d.ts.map +1 -0
  158. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +12 -0
  159. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -0
  160. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +8 -0
  161. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -0
  162. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +10 -0
  163. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -0
  164. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +8 -0
  165. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -0
  166. package/dist/types/src/components/TemplateEditor/index.d.ts +2 -0
  167. package/dist/types/src/components/TemplateEditor/index.d.ts.map +1 -0
  168. package/dist/types/src/components/TemplateEditor/types.d.ts.map +1 -0
  169. package/dist/types/src/components/Thread/Thread.d.ts +17 -0
  170. package/dist/types/src/components/Thread/Thread.d.ts.map +1 -0
  171. package/dist/types/src/components/Thread/Thread.stories.d.ts +11 -0
  172. package/dist/types/src/components/Thread/Thread.stories.d.ts.map +1 -0
  173. package/dist/types/src/components/Thread/ThreadContainer.d.ts +10 -0
  174. package/dist/types/src/components/Thread/ThreadContainer.d.ts.map +1 -0
  175. package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts +15 -0
  176. package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts.map +1 -0
  177. package/dist/types/src/components/Thread/ThreadMessage.d.ts +13 -0
  178. package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +1 -0
  179. package/dist/types/src/components/Thread/ToolInvocations.d.ts +13 -0
  180. package/dist/types/src/components/Thread/ToolInvocations.d.ts.map +1 -0
  181. package/dist/types/src/components/Thread/index.d.ts +3 -0
  182. package/dist/types/src/components/Thread/index.d.ts.map +1 -0
  183. package/dist/types/src/components/Thread/reducer.d.ts +12 -0
  184. package/dist/types/src/components/Thread/reducer.d.ts.map +1 -0
  185. package/dist/types/src/components/Toolbox/Toolbox.d.ts +19 -0
  186. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -0
  187. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +8 -0
  188. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -0
  189. package/dist/types/src/components/Toolbox/index.d.ts +2 -0
  190. package/dist/types/src/components/Toolbox/index.d.ts.map +1 -0
  191. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -3
  192. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  193. package/dist/types/src/components/index.d.ts +19 -2
  194. package/dist/types/src/components/index.d.ts.map +1 -1
  195. package/dist/types/src/hooks/index.d.ts +5 -0
  196. package/dist/types/src/hooks/index.d.ts.map +1 -1
  197. package/dist/types/src/hooks/processor.d.ts +75 -0
  198. package/dist/types/src/hooks/processor.d.ts.map +1 -0
  199. package/dist/types/src/hooks/processor.test.d.ts +2 -0
  200. package/dist/types/src/hooks/processor.test.d.ts.map +1 -0
  201. package/dist/types/src/hooks/useChatProcessor.d.ts +8 -0
  202. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -0
  203. package/dist/types/src/hooks/useMessageQueue.d.ts +41 -0
  204. package/dist/types/src/hooks/useMessageQueue.d.ts.map +1 -0
  205. package/dist/types/src/hooks/useServices.d.ts +7 -0
  206. package/dist/types/src/hooks/useServices.d.ts.map +1 -0
  207. package/dist/types/src/hooks/useTextInputEvents.d.ts +13 -0
  208. package/dist/types/src/hooks/useTextInputEvents.d.ts.map +1 -0
  209. package/dist/types/src/index.d.ts +2 -4
  210. package/dist/types/src/index.d.ts.map +1 -1
  211. package/dist/types/src/meta.d.ts +2 -2
  212. package/dist/types/src/meta.d.ts.map +1 -1
  213. package/dist/types/src/testing/index.d.ts +2 -1
  214. package/dist/types/src/testing/index.d.ts.map +1 -1
  215. package/dist/types/src/testing/{testing.d.ts → test-functions.d.ts} +3 -1
  216. package/dist/types/src/testing/test-functions.d.ts.map +1 -0
  217. package/dist/types/src/testing/test-services.d.ts +5 -0
  218. package/dist/types/src/testing/test-services.d.ts.map +1 -0
  219. package/dist/types/src/tools/function.d.ts +5 -0
  220. package/dist/types/src/tools/function.d.ts.map +1 -0
  221. package/dist/types/src/tools/index.d.ts +3 -0
  222. package/dist/types/src/tools/index.d.ts.map +1 -0
  223. package/dist/types/src/tools/openapi.d.ts +10 -0
  224. package/dist/types/src/tools/openapi.d.ts.map +1 -0
  225. package/dist/types/src/tools/openapi.test.d.ts +2 -0
  226. package/dist/types/src/tools/openapi.test.d.ts.map +1 -0
  227. package/dist/types/src/translations.d.ts +117 -2
  228. package/dist/types/src/translations.d.ts.map +1 -1
  229. package/dist/types/src/types/chat.d.ts +12 -0
  230. package/dist/types/src/types/chat.d.ts.map +1 -0
  231. package/dist/types/src/types/index.d.ts +3 -1
  232. package/dist/types/src/types/index.d.ts.map +1 -1
  233. package/dist/types/src/types/service.d.ts +160 -0
  234. package/dist/types/src/types/service.d.ts.map +1 -0
  235. package/dist/types/src/types/template.d.ts +40 -0
  236. package/dist/types/src/types/template.d.ts.map +1 -0
  237. package/dist/types/src/types/types.d.ts +35 -5
  238. package/dist/types/src/types/types.d.ts.map +1 -1
  239. package/dist/types/tsconfig.tsbuildinfo +1 -1
  240. package/package.json +62 -48
  241. package/src/AutomationPlugin.tsx +102 -193
  242. package/src/capabilities/ai-client.ts +19 -0
  243. package/src/capabilities/app-graph-builder.ts +99 -0
  244. package/src/capabilities/capabilities.ts +12 -0
  245. package/src/capabilities/index.ts +13 -0
  246. package/src/capabilities/intent-resolver.ts +38 -0
  247. package/src/capabilities/react-surface.tsx +63 -0
  248. package/src/capabilities/settings.ts +19 -0
  249. package/src/components/AmbientDialog/AmbientDialog.stories.tsx +81 -0
  250. package/src/components/AmbientDialog/AmbientDialog.tsx +103 -0
  251. package/src/components/AmbientDialog/index.ts +5 -0
  252. package/src/components/AssistantDialog.tsx +33 -0
  253. package/src/components/AutomationPanel/AutomationPanel.stories.tsx +2 -2
  254. package/src/components/AutomationPanel/AutomationPanel.tsx +54 -37
  255. package/src/components/AutomationSettings/AutomationSettings.tsx +49 -0
  256. package/src/components/AutomationSettings/index.ts +5 -0
  257. package/src/components/ChatContainer.tsx +29 -0
  258. package/src/components/Prompt/Prompt.stories.tsx +79 -0
  259. package/src/components/Prompt/Prompt.tsx +100 -0
  260. package/src/components/Prompt/PromptBar.tsx +100 -0
  261. package/src/components/Prompt/autocomplete.ts +212 -0
  262. package/src/components/Prompt/index.ts +6 -0
  263. package/src/components/ServiceRegistry/ServiceRegistry.stories.tsx +49 -0
  264. package/src/components/ServiceRegistry/ServiceRegistry.tsx +76 -0
  265. package/src/components/ServiceRegistry/index.ts +5 -0
  266. package/src/components/TemplateContainer.tsx +21 -0
  267. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +72 -0
  268. package/src/components/TemplateEditor/TemplateEditor.tsx +76 -0
  269. package/src/components/TemplateEditor/TemplateForm.stories.tsx +65 -0
  270. package/src/components/TemplateEditor/TemplateForm.tsx +184 -0
  271. package/src/components/{PromptEditor → TemplateEditor}/index.ts +1 -1
  272. package/src/components/Thread/Thread.stories.tsx +212 -0
  273. package/src/components/Thread/Thread.tsx +97 -0
  274. package/src/components/Thread/ThreadContainer.stories.tsx +258 -0
  275. package/src/components/Thread/ThreadContainer.tsx +78 -0
  276. package/src/components/Thread/ThreadMessage.tsx +187 -0
  277. package/src/components/Thread/ToolInvocations.tsx +93 -0
  278. package/src/components/Thread/index.ts +6 -0
  279. package/src/components/Thread/reducer.ts +52 -0
  280. package/src/components/Toolbox/Toolbox.stories.tsx +65 -0
  281. package/src/components/Toolbox/Toolbox.tsx +117 -0
  282. package/src/components/Toolbox/index.ts +5 -0
  283. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +2 -2
  284. package/src/components/TriggerEditor/TriggerEditor.tsx +78 -14
  285. package/src/components/index.ts +11 -1
  286. package/src/hooks/index.ts +6 -0
  287. package/src/hooks/processor.test.ts +15 -0
  288. package/src/hooks/processor.ts +219 -0
  289. package/src/hooks/useChatProcessor.tsx +77 -0
  290. package/src/hooks/useMessageQueue.ts +23 -0
  291. package/src/hooks/useServices.ts +28 -0
  292. package/src/hooks/useTextInputEvents.ts +49 -0
  293. package/src/index.ts +3 -6
  294. package/src/meta.ts +5 -2
  295. package/src/testing/index.ts +2 -1
  296. package/src/testing/{testing.ts → test-functions.ts} +9 -2
  297. package/src/testing/test-services.ts +131 -0
  298. package/src/tools/function.ts +47 -0
  299. package/src/tools/index.ts +6 -0
  300. package/src/tools/openapi.test.ts +224 -0
  301. package/src/tools/openapi.ts +331 -0
  302. package/src/translations.ts +36 -2
  303. package/src/types/chat.ts +11 -0
  304. package/src/types/index.ts +3 -1
  305. package/src/types/service.ts +102 -0
  306. package/src/types/template.ts +34 -0
  307. package/src/types/types.ts +34 -20
  308. package/src/typings.d.ts +9 -0
  309. package/dist/lib/browser/AssistantPanel-32FH2RA6.mjs +0 -339
  310. package/dist/lib/browser/AssistantPanel-32FH2RA6.mjs.map +0 -7
  311. package/dist/lib/browser/AutomationPanel-ABGPG5LE.mjs +0 -151
  312. package/dist/lib/browser/AutomationPanel-ABGPG5LE.mjs.map +0 -7
  313. package/dist/lib/browser/chunk-DN5M2QL5.mjs +0 -49
  314. package/dist/lib/browser/chunk-DN5M2QL5.mjs.map +0 -7
  315. package/dist/lib/browser/chunk-X5KMOH3I.mjs.map +0 -7
  316. package/dist/lib/browser/meta.mjs +0 -9
  317. package/dist/lib/node/AssistantPanel-XANI7YNV.cjs +0 -359
  318. package/dist/lib/node/AssistantPanel-XANI7YNV.cjs.map +0 -7
  319. package/dist/lib/node/AutomationPanel-VADY3HMP.cjs +0 -171
  320. package/dist/lib/node/AutomationPanel-VADY3HMP.cjs.map +0 -7
  321. package/dist/lib/node/chunk-DTJ7XVO2.cjs.map +0 -7
  322. package/dist/lib/node/chunk-NIL4TP6U.cjs +0 -73
  323. package/dist/lib/node/chunk-NIL4TP6U.cjs.map +0 -7
  324. package/dist/lib/node/meta.cjs.map +0 -7
  325. package/dist/lib/node-esm/AssistantPanel-5M6O6JV7.mjs +0 -340
  326. package/dist/lib/node-esm/AssistantPanel-5M6O6JV7.mjs.map +0 -7
  327. package/dist/lib/node-esm/AutomationPanel-EETYIDPA.mjs +0 -152
  328. package/dist/lib/node-esm/AutomationPanel-EETYIDPA.mjs.map +0 -7
  329. package/dist/lib/node-esm/chunk-GCHXTXVT.mjs +0 -51
  330. package/dist/lib/node-esm/chunk-GCHXTXVT.mjs.map +0 -7
  331. package/dist/lib/node-esm/chunk-HNOBZHWK.mjs.map +0 -7
  332. package/dist/lib/node-esm/meta.mjs +0 -10
  333. package/dist/types/src/components/AssistantPanel/AssistantPanel.d.ts +0 -8
  334. package/dist/types/src/components/AssistantPanel/AssistantPanel.d.ts.map +0 -1
  335. package/dist/types/src/components/AssistantPanel/index.d.ts +0 -3
  336. package/dist/types/src/components/AssistantPanel/index.d.ts.map +0 -1
  337. package/dist/types/src/components/AssistantPanel/system-instructions.d.ts +0 -6
  338. package/dist/types/src/components/AssistantPanel/system-instructions.d.ts.map +0 -1
  339. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts +0 -10
  340. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts.map +0 -1
  341. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts +0 -6
  342. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts.map +0 -1
  343. package/dist/types/src/components/PromptEditor/index.d.ts +0 -2
  344. package/dist/types/src/components/PromptEditor/index.d.ts.map +0 -1
  345. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts +0 -4
  346. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts.map +0 -1
  347. package/dist/types/src/components/PromptEditor/types.d.ts.map +0 -1
  348. package/dist/types/src/presets.d.ts +0 -9
  349. package/dist/types/src/presets.d.ts.map +0 -1
  350. package/dist/types/src/testing/testing.d.ts.map +0 -1
  351. package/dist/types/src/types/schema.d.ts +0 -63
  352. package/dist/types/src/types/schema.d.ts.map +0 -1
  353. package/src/components/AssistantPanel/AssistantPanel.tsx +0 -230
  354. package/src/components/AssistantPanel/index.ts +0 -7
  355. package/src/components/AssistantPanel/system-instructions.ts +0 -166
  356. package/src/components/PromptEditor/PromptEditor.stories.tsx +0 -64
  357. package/src/components/PromptEditor/PromptEditor.tsx +0 -222
  358. package/src/components/PromptEditor/prompt-extension.ts +0 -43
  359. package/src/presets.ts +0 -248
  360. package/src/types/schema.ts +0 -38
  361. /package/dist/lib/browser/{meta.mjs.map → AutomationPanel-NCKK3CFN.mjs.map} +0 -0
  362. /package/dist/lib/node-esm/{meta.mjs.map → AutomationPanel-3MPIAO7R.mjs.map} +0 -0
  363. /package/dist/types/src/components/{PromptEditor → TemplateEditor}/types.d.ts +0 -0
  364. /package/src/components/{PromptEditor → TemplateEditor}/types.tsx +0 -0
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,49 +15,64 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
  var node_exports = {};
30
20
  __export(node_exports, {
31
- AssistantPanel: () => AssistantPanel,
32
- AutomationAction: () => import_chunk_NIL4TP6U.AutomationAction,
33
- AutomationPanel: () => AutomationPanel,
21
+ AIChatType: () => import_chunk_UVWK2XJE.AIChatType,
22
+ ASSISTANT_DIALOG: () => import_chunk_BAQRBGOJ.ASSISTANT_DIALOG,
23
+ AUTOMATION_PLUGIN: () => import_chunk_BAQRBGOJ.AUTOMATION_PLUGIN,
24
+ ApiAuthorization: () => import_chunk_UVWK2XJE.ApiAuthorization,
25
+ AssistantDialog: () => import_chunk_3QSK6IPK.AssistantDialog,
26
+ AutomationAction: () => import_chunk_UVWK2XJE.AutomationAction,
27
+ AutomationPanel: () => import_chunk_3QSK6IPK.AutomationPanel,
34
28
  AutomationPlugin: () => AutomationPlugin,
35
- ChainInputSchema: () => import_chunk_NIL4TP6U.ChainInputSchema,
36
- ChainInputType: () => import_chunk_NIL4TP6U.ChainInputType,
37
- ChainPromptType: () => import_chunk_NIL4TP6U.ChainPromptType,
38
- ChainType: () => import_chunk_NIL4TP6U.ChainType,
39
- chainPresets: () => chainPresets,
40
- default: () => src_default,
41
- str: () => str
29
+ AutomationSettings: () => import_chunk_3QSK6IPK.AutomationSettings,
30
+ AutomationSettingsSchema: () => import_chunk_UVWK2XJE.AutomationSettingsSchema,
31
+ ChatContainer: () => import_chunk_3QSK6IPK.ChatContainer,
32
+ ServiceRegistry: () => import_chunk_3QSK6IPK.ServiceRegistry,
33
+ ServiceType: () => import_chunk_UVWK2XJE.ServiceType,
34
+ TemplateContainer: () => import_chunk_3QSK6IPK.TemplateContainer,
35
+ TemplateEditor: () => import_chunk_76F5BCJE.TemplateEditor,
36
+ TemplateInputSchema: () => import_chunk_UVWK2XJE.TemplateInputSchema,
37
+ TemplateInputType: () => import_chunk_UVWK2XJE.TemplateInputType,
38
+ TemplateType: () => import_chunk_UVWK2XJE.TemplateType,
39
+ Thread: () => import_chunk_B37JIAOP.Thread,
40
+ ThreadContainer: () => import_chunk_B37JIAOP.ThreadContainer,
41
+ Toolbox: () => import_chunk_B37JIAOP.Toolbox,
42
+ ToolboxContainer: () => import_chunk_B37JIAOP.ToolboxContainer,
43
+ TriggerEditor: () => import_chunk_V4L7LTWM.TriggerEditor,
44
+ categoryIcons: () => import_chunk_UVWK2XJE.categoryIcons,
45
+ handlebarsHighlightStyle: () => import_chunk_76F5BCJE.handlebarsHighlightStyle,
46
+ meta: () => import_chunk_BAQRBGOJ.meta
42
47
  });
43
48
  module.exports = __toCommonJS(node_exports);
44
- var import_chunk_NIL4TP6U = require("./chunk-NIL4TP6U.cjs");
45
- var import_chunk_DTJ7XVO2 = require("./chunk-DTJ7XVO2.cjs");
46
- var import_react = __toESM(require("react"));
49
+ var import_chunk_3QSK6IPK = require("./chunk-3QSK6IPK.cjs");
50
+ var import_chunk_B37JIAOP = require("./chunk-B37JIAOP.cjs");
51
+ var import_chunk_76F5BCJE = require("./chunk-76F5BCJE.cjs");
52
+ var import_chunk_V4L7LTWM = require("./chunk-V4L7LTWM.cjs");
53
+ var import_chunk_VNBYGJ4K = require("./chunk-VNBYGJ4K.cjs");
54
+ var import_chunk_UVWK2XJE = require("./chunk-UVWK2XJE.cjs");
55
+ var import_chunk_BAQRBGOJ = require("./chunk-BAQRBGOJ.cjs");
47
56
  var import_app_framework = require("@dxos/app-framework");
48
57
  var import_functions = require("@dxos/functions");
49
- var import_invariant = require("@dxos/invariant");
50
- var import_types = require("@dxos/plugin-client/types");
51
- var import_plugin_graph = require("@dxos/plugin-graph");
58
+ var import_plugin_client = require("@dxos/plugin-client");
59
+ var import_plugin_deck = require("@dxos/plugin-deck");
52
60
  var import_plugin_space = require("@dxos/plugin-space");
61
+ var import_types = require("@dxos/plugin-space/types");
53
62
  var import_echo = require("@dxos/react-client/echo");
54
- var import_react_ui_form = require("@dxos/react-ui-form");
55
- var import_react2 = require("react");
56
- var import_live_object = require("@dxos/live-object");
57
- var AssistantPanel = (0, import_react2.lazy)(() => import("./AssistantPanel-XANI7YNV.cjs"));
58
- var AutomationPanel = (0, import_react2.lazy)(() => import("./AutomationPanel-VADY3HMP.cjs"));
59
63
  var translations_default = [
60
64
  {
61
65
  "en-US": {
62
- [import_chunk_DTJ7XVO2.AUTOMATION_PLUGIN]: {
66
+ [import_chunk_UVWK2XJE.AIChatType.typename]: {
67
+ "typename label": "AI Chat"
68
+ },
69
+ [import_chunk_UVWK2XJE.TemplateType.typename]: {
70
+ "typename label": "Template"
71
+ },
72
+ [import_chunk_BAQRBGOJ.AUTOMATION_PLUGIN]: {
73
+ "chat title placeholder": "AI Chat",
74
+ "template title placeholder": "Template",
75
+ "open ambient chat label": "Open AI chat",
63
76
  "plugin name": "Automation",
64
77
  "object placeholder": "New prompt",
65
78
  "create object label": "Create prompt",
@@ -70,6 +83,12 @@ var translations_default = [
70
83
  "value placeholder": "Enter value...",
71
84
  "select preset template placeholder": "Select preset",
72
85
  "open automation panel label": "Show Automations",
86
+ "automation panel label": "Automations",
87
+ "service registry label": "Service Registry",
88
+ "assistant dialog title": "Assistant",
89
+ "open assistant label": "Open assistant",
90
+ "chat input placeholder": "Ask a question...",
91
+ "chat stop": "Cancel request.",
73
92
  "function select label": "Function",
74
93
  "function select placeholder": "Select function",
75
94
  "function enabled": "Enabled",
@@ -79,463 +98,172 @@ var translations_default = [
79
98
  "trigger type webhook": "Webhook",
80
99
  "trigger type websocket": "Websocket",
81
100
  "trigger type subscription": "Subscription",
101
+ "trigger type email": "Email",
102
+ "trigger type queue": "Queue",
82
103
  "trigger filter": "Filter",
83
104
  "trigger cron": "Cron",
84
105
  "trigger method": "Method",
85
106
  "trigger endpoint": "Endpoint",
86
- "open assistant panel label": "Show Assistant",
87
- "assistant panel label": "Assistant"
107
+ "trigger copy url": "Copy URL",
108
+ "trigger copy email": "Copy Email",
109
+ "trigger meta add": "Add",
110
+ "trigger meta remove": "Remove",
111
+ "trigger meta prop name placeholder": "New meta property name",
112
+ "prompt placeholder": "Ask a question...",
113
+ "microphone button": "Click to speak",
114
+ "cancel processing button": "Stop processing",
115
+ "settings custom prompts label": "Custom prompts",
116
+ "settings llm model label": "LLM model",
117
+ "settings default llm model label": "Default Model"
88
118
  }
89
119
  }
90
120
  }
91
121
  ];
92
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx";
93
- var AutomationPlugin = () => {
94
- return {
95
- meta: import_chunk_DTJ7XVO2.meta_default,
96
- provides: {
97
- metadata: {
98
- records: {
99
- [import_chunk_NIL4TP6U.ChainType.typename]: {
100
- placeholder: [
101
- "object placeholder",
102
- {
103
- ns: import_chunk_DTJ7XVO2.AUTOMATION_PLUGIN
104
- }
105
- ],
106
- icon: "ph--magic-wand--regular",
107
- // TODO(wittjosiah): Move out of metadata.
108
- loadReferences: async (chain) => await import_echo.RefArray.loadAll(chain.prompts ?? [])
109
- }
122
+ var AutomationPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_BAQRBGOJ.meta, [
123
+ (0, import_app_framework.defineModule)({
124
+ id: `${import_chunk_BAQRBGOJ.meta.id}/module/translations`,
125
+ activatesOn: import_app_framework.Events.SetupTranslations,
126
+ activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.Translations, translations_default)
127
+ }),
128
+ (0, import_app_framework.defineModule)({
129
+ id: `${import_chunk_BAQRBGOJ.meta.id}/module/settings`,
130
+ activatesOn: import_app_framework.Events.SetupSettings,
131
+ activate: import_chunk_B37JIAOP.AutomationSettings
132
+ }),
133
+ (0, import_app_framework.defineModule)({
134
+ id: `${import_chunk_BAQRBGOJ.meta.id}/module/metadata`,
135
+ activatesOn: import_app_framework.Events.SetupMetadata,
136
+ activate: () => [
137
+ (0, import_app_framework.contributes)(import_app_framework.Capabilities.Metadata, {
138
+ id: import_chunk_UVWK2XJE.TemplateType.typename,
139
+ metadata: {
140
+ placeholder: [
141
+ "template title placeholder",
142
+ {
143
+ ns: import_chunk_BAQRBGOJ.AUTOMATION_PLUGIN
144
+ }
145
+ ],
146
+ icon: "ph--code-block--regular"
110
147
  }
111
- },
112
- translations: [
113
- ...translations_default,
114
- ...import_react_ui_form.translations
115
- ],
116
- echo: {
117
- system: [
118
- import_chunk_NIL4TP6U.ChainType,
119
- import_chunk_NIL4TP6U.ChainPromptType,
120
- import_functions.FunctionTrigger
121
- ]
122
- },
123
- complementary: {
124
- panels: [
148
+ }),
149
+ (0, import_app_framework.contributes)(import_app_framework.Capabilities.Metadata, {
150
+ id: import_chunk_UVWK2XJE.AIChatType.typename,
151
+ metadata: {
152
+ placeholder: [
153
+ "chat title placeholder",
154
+ {
155
+ ns: import_chunk_BAQRBGOJ.AUTOMATION_PLUGIN
156
+ }
157
+ ],
158
+ icon: "ph--atom--regular"
159
+ }
160
+ })
161
+ ]
162
+ }),
163
+ (0, import_app_framework.defineModule)({
164
+ id: `${import_chunk_BAQRBGOJ.meta.id}/module/object-form`,
165
+ activatesOn: import_plugin_client.ClientEvents.SetupSchema,
166
+ activate: () => [
167
+ (0, import_app_framework.contributes)(import_plugin_space.SpaceCapabilities.ObjectForm, (0, import_types.defineObjectForm)({
168
+ objectSchema: import_chunk_UVWK2XJE.AIChatType,
169
+ getIntent: (_, options) => (0, import_app_framework.createIntent)(import_chunk_UVWK2XJE.AutomationAction.CreateChat, {
170
+ spaceId: options.space.id
171
+ })
172
+ })),
173
+ (0, import_app_framework.contributes)(import_plugin_space.SpaceCapabilities.ObjectForm, (0, import_types.defineObjectForm)({
174
+ objectSchema: import_chunk_UVWK2XJE.TemplateType,
175
+ getIntent: () => (0, import_app_framework.createIntent)(import_chunk_UVWK2XJE.AutomationAction.CreateTemplate)
176
+ }))
177
+ ]
178
+ }),
179
+ (0, import_app_framework.defineModule)({
180
+ id: `${import_chunk_BAQRBGOJ.meta.id}/module/schema`,
181
+ activatesOn: import_plugin_client.ClientEvents.SetupSchema,
182
+ activate: () => (0, import_app_framework.contributes)(import_plugin_client.ClientCapabilities.Schema, [
183
+ import_functions.FunctionTrigger,
184
+ import_chunk_UVWK2XJE.ServiceType,
185
+ import_chunk_UVWK2XJE.TemplateType
186
+ ])
187
+ }),
188
+ (0, import_app_framework.defineModule)({
189
+ id: `${import_chunk_BAQRBGOJ.meta.id}/module/complementary-panels`,
190
+ activatesOn: import_plugin_deck.DeckEvents.SetupComplementaryPanels,
191
+ activate: () => [
192
+ (0, import_app_framework.contributes)(import_plugin_deck.DeckCapabilities.ComplementaryPanel, {
193
+ id: "service-registry",
194
+ label: [
195
+ "service registry label",
125
196
  {
126
- id: "automation",
127
- label: [
128
- "open automation panel label",
129
- {
130
- ns: import_chunk_DTJ7XVO2.AUTOMATION_PLUGIN
131
- }
132
- ],
133
- icon: "ph--magic-wand--regular"
134
- },
197
+ ns: import_chunk_BAQRBGOJ.AUTOMATION_PLUGIN
198
+ }
199
+ ],
200
+ icon: "ph--plugs--regular"
201
+ }),
202
+ (0, import_app_framework.contributes)(import_plugin_deck.DeckCapabilities.ComplementaryPanel, {
203
+ id: "automation",
204
+ label: [
205
+ "automation panel label",
135
206
  {
136
- id: "assistant",
137
- label: [
138
- "open assistant panel label",
139
- {
140
- ns: import_chunk_DTJ7XVO2.AUTOMATION_PLUGIN
141
- }
142
- ],
143
- icon: "ph--atom--regular"
207
+ ns: import_chunk_BAQRBGOJ.AUTOMATION_PLUGIN
144
208
  }
145
- ]
146
- },
147
- graph: {
148
- builder: (plugins) => {
149
- const clientPlugin = (0, import_app_framework.resolvePlugin)(plugins, import_types.parseClientPlugin);
150
- const metadataPlugin = (0, import_app_framework.resolvePlugin)(plugins, import_app_framework.parseMetadataResolverPlugin);
151
- const resolve = metadataPlugin?.provides.metadata.resolver;
152
- const client = clientPlugin?.provides.client;
153
- (0, import_invariant.invariant)(resolve, void 0, {
154
- F: __dxlog_file,
155
- L: 67,
156
- S: void 0,
157
- A: [
158
- "resolve",
159
- ""
160
- ]
161
- });
162
- (0, import_invariant.invariant)(client, void 0, {
163
- F: __dxlog_file,
164
- L: 68,
165
- S: void 0,
166
- A: [
167
- "client",
168
- ""
169
- ]
170
- });
171
- return [
172
- // Create nodes for object settings.
173
- (0, import_plugin_graph.createExtension)({
174
- id: `${import_chunk_DTJ7XVO2.AUTOMATION_PLUGIN}/automation-for-subject`,
175
- resolver: ({ id }) => {
176
- if (!id.endsWith("~automation")) {
177
- return;
178
- }
179
- const type = "orphan-settings-for-subject";
180
- const icon = "ph--magic-wand--regular";
181
- const [subjectId] = id.split("~");
182
- const { spaceId, objectId } = (0, import_echo.parseId)(subjectId);
183
- const spaces = (0, import_plugin_graph.toSignal)((onChange) => client.spaces.subscribe(() => onChange()).unsubscribe, () => client.spaces.get());
184
- const space = spaces?.find((space2) => space2.id === spaceId && space2.state.get() === import_echo.SpaceState.SPACE_READY);
185
- if (!objectId) {
186
- const label2 = space ? space.properties.name || [
187
- "unnamed space label",
188
- {
189
- ns: import_chunk_DTJ7XVO2.AUTOMATION_PLUGIN
190
- }
191
- ] : [
192
- "unnamed object settings label",
193
- {
194
- ns: import_chunk_DTJ7XVO2.AUTOMATION_PLUGIN
195
- }
196
- ];
197
- return {
198
- id,
199
- type,
200
- data: null,
201
- properties: {
202
- icon,
203
- label: label2,
204
- showResolvedThreads: false,
205
- object: null,
206
- space
207
- }
208
- };
209
- }
210
- const [object] = (0, import_plugin_space.memoizeQuery)(space, {
211
- id: objectId
212
- });
213
- if (!object || !subjectId) {
214
- return;
215
- }
216
- const meta = resolve((0, import_echo.getTypename)(object) ?? "");
217
- const label = meta.label?.(object) || object.name || meta.placeholder || [
218
- "unnamed object settings label",
219
- {
220
- ns: import_chunk_DTJ7XVO2.AUTOMATION_PLUGIN
221
- }
222
- ];
223
- return {
224
- id,
225
- type,
226
- data: null,
227
- properties: {
228
- icon,
229
- label,
230
- object
231
- }
232
- };
233
- }
234
- }),
235
- (0, import_plugin_graph.createExtension)({
236
- id: `${import_chunk_DTJ7XVO2.AUTOMATION_PLUGIN}/assistant-for-subject`,
237
- resolver: ({ id }) => {
238
- if (!id.endsWith("~assistant")) {
239
- return;
240
- }
241
- const [subjectId] = id.split("~");
242
- const { spaceId, objectId } = (0, import_echo.parseId)(subjectId);
243
- const spaces = (0, import_plugin_graph.toSignal)((onChange) => client.spaces.subscribe(() => onChange()).unsubscribe, () => client.spaces.get());
244
- const space = spaces?.find((space2) => space2.id === spaceId && space2.state.get() === import_echo.SpaceState.SPACE_READY);
245
- if (!objectId) {
246
- return {
247
- id,
248
- type: "orphan-automation-for-subject",
249
- data: null,
250
- properties: {
251
- icon: "ph--atom--regular",
252
- label: [
253
- "assistant panel label",
254
- {
255
- ns: import_chunk_DTJ7XVO2.AUTOMATION_PLUGIN
256
- }
257
- ],
258
- object: null,
259
- space
260
- }
261
- };
262
- }
263
- const [object] = (0, import_plugin_space.memoizeQuery)(space, {
264
- id: objectId
265
- });
266
- return {
267
- id,
268
- type: "orphan-automation-for-subject",
269
- data: null,
270
- properties: {
271
- icon: "ph--atom--regular",
272
- label: [
273
- "assistant panel label",
274
- {
275
- ns: import_chunk_DTJ7XVO2.AUTOMATION_PLUGIN
276
- }
277
- ],
278
- object
279
- }
280
- };
281
- }
282
- })
283
- ];
284
- }
285
- },
286
- surface: {
287
- definitions: () => [
288
- (0, import_app_framework.createSurface)({
289
- id: `${import_chunk_DTJ7XVO2.AUTOMATION_PLUGIN}/assistant`,
290
- role: "complementary--assistant",
291
- component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(AssistantPanel, {
292
- subject: data.subject
293
- })
294
- }),
295
- (0, import_app_framework.createSurface)({
296
- id: `${import_chunk_DTJ7XVO2.AUTOMATION_PLUGIN}/automation`,
297
- role: "complementary--automation",
298
- filter: (data) => (0, import_echo.isEchoObject)(data.subject) && !!(0, import_echo.getSpace)(data.subject),
299
- component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(AutomationPanel, {
300
- space: (0, import_echo.getSpace)(data.subject),
301
- object: data.subject
302
- })
303
- })
304
- ]
305
- },
306
- intent: {
307
- resolvers: () => []
308
- }
309
- }
310
- };
311
- };
312
- var str = (...text) => text.filter((value) => value !== void 0 && value !== false).flat().join("\n");
313
- var chainPresets = [
314
- {
315
- id: "dxos.org/prompt/translate",
316
- title: "Translate",
317
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
318
- command: "say",
319
- template: str(
320
- // prettier-ignore
321
- "Translate the following into {language}:",
322
- "",
323
- "---",
324
- "",
325
- "{input}"
326
- ),
327
- inputs: [
328
- {
329
- type: import_chunk_NIL4TP6U.ChainInputType.VALUE,
330
- name: "language",
331
- value: "japanese"
332
- },
333
- {
334
- type: import_chunk_NIL4TP6U.ChainInputType.PASS_THROUGH,
335
- name: "input"
336
- }
337
- ]
338
- })
339
- },
340
- {
341
- id: "dxos.org/prompt/chess",
342
- title: "Chess",
343
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
344
- command: "hint",
345
- template: str(
346
- // prettier-ignore
347
- "You are a machine that is an expert chess player.",
348
- "",
349
- "The move history of the current game is: {history}",
350
- "",
351
- "Suggest the next move and very briefly explain your strategy in a couple of sentences."
352
- ),
353
- inputs: [
354
- {
355
- type: import_chunk_NIL4TP6U.ChainInputType.CONTEXT,
356
- name: "history",
357
- value: "object.pgn"
358
- }
359
- ]
360
- })
361
- },
362
- {
363
- id: "dxos.org/prompt/mermaid",
364
- title: "Mermaid",
365
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
366
- command: "draw",
367
- template: str(
368
- // prettier-ignore
369
- "Create a simplified mermaid graph representing the text below.",
370
- "Do not explain anything.",
371
- "",
372
- "---",
373
- "",
374
- "{input}"
375
- ),
376
- inputs: [
377
- {
378
- type: import_chunk_NIL4TP6U.ChainInputType.PASS_THROUGH,
379
- name: "input"
380
- }
381
- ]
382
- })
383
- },
384
- {
385
- id: "dxos.org/prompt/list",
386
- title: "List",
387
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
388
- command: "list",
389
- template: str(
390
- // prettier-ignore
391
- "You are a machine that only replies with valid, iterable RFC8259 compliant JSON in your responses.",
392
- "Your entire response should be a single array of JSON objects.",
393
- "",
394
- "Your entire response should be a map where the key is the type and the value is a single array of JSON objects conforming to the following types:",
395
- "",
396
- "{schema}",
397
- "",
398
- "---",
399
- "",
400
- "{question}"
401
- ),
402
- inputs: [
403
- {
404
- type: import_chunk_NIL4TP6U.ChainInputType.SCHEMA,
405
- name: "schema",
406
- value: "example.com/type/project"
407
- },
408
- {
409
- type: import_chunk_NIL4TP6U.ChainInputType.PASS_THROUGH,
410
- name: "question"
411
- }
412
- ]
413
- })
414
- },
415
- {
416
- id: "dxos.org/prompt/base",
417
- title: "RAG",
418
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
419
- command: "rag",
420
- template: str(
421
- // prettier-ignore
422
- "Very briefly answer the question based only on the following context and say if you don't know the answer.",
423
- // 'answer the question using the following context as well as your training data:',
424
- "",
425
- "{context}",
426
- "",
427
- "---",
428
- "",
429
- "question: {question}"
430
- ),
431
- inputs: [
432
- {
433
- type: import_chunk_NIL4TP6U.ChainInputType.RETRIEVER,
434
- name: "context"
435
- },
436
- {
437
- type: import_chunk_NIL4TP6U.ChainInputType.CONTEXT,
438
- name: "question",
439
- value: "object.text"
440
- }
441
- ]
442
- })
443
- },
444
- {
445
- id: "dxos.org/prompt/lookup",
446
- title: "Lookup",
447
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
448
- command: "lookup",
449
- template: str(
450
- // prettier-ignore
451
- "Lookup and very briefly summarize the following topic in one or two sentences:",
452
- "",
453
- "---",
454
- "",
455
- "{input}"
456
- ),
457
- inputs: [
458
- {
459
- type: import_chunk_NIL4TP6U.ChainInputType.CONTEXT,
460
- name: "input",
461
- value: "text"
462
- }
463
- ]
464
- })
465
- },
466
- {
467
- id: "dxos.org/prompt/extract",
468
- title: "Extract",
469
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
470
- command: "extract",
471
- template: str(
472
- // prettier-ignore
473
- "List all people and companies mentioned in the text below.",
474
- "",
475
- "You are a machine that only replies with valid, iterable RFC8259 compliant JSON in your responses.",
476
- "Your entire response should be a map where the key is the type and the value is a single array of JSON objects conforming to the following types:",
477
- "",
478
- "{contact}",
479
- "{company}",
480
- "",
481
- "---",
482
- "",
483
- "{input}"
484
- ),
485
- inputs: [
486
- {
487
- type: import_chunk_NIL4TP6U.ChainInputType.SCHEMA,
488
- name: "contact",
489
- value: "example.com/type/contact"
490
- },
491
- {
492
- type: import_chunk_NIL4TP6U.ChainInputType.SCHEMA,
493
- name: "company",
494
- value: "example.com/type/organization"
495
- },
496
- {
497
- type: import_chunk_NIL4TP6U.ChainInputType.CONTEXT,
498
- name: "input",
499
- value: "text"
500
- }
501
- ]
502
- })
503
- },
504
- {
505
- id: "dxos.org/prompt/discord",
506
- title: "Summarize",
507
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
508
- command: "summarize",
509
- template: str(
510
- // prettier-ignore
511
- "Summarize what the team is working on and format it as a markdown table without any explanation.",
512
- "",
513
- "---",
514
- "",
515
- "{context}"
516
- ),
517
- inputs: [
518
- {
519
- type: import_chunk_NIL4TP6U.ChainInputType.RESOLVER,
520
- name: "context",
521
- value: "discord.messages.recent"
522
- }
523
- ]
524
- })
525
- }
526
- ];
527
- var src_default = AutomationPlugin;
209
+ ],
210
+ icon: "ph--magic-wand--regular",
211
+ filter: (node) => (0, import_echo.isEchoObject)(node.data) && !!(0, import_echo.getSpace)(node.data)
212
+ })
213
+ ]
214
+ }),
215
+ (0, import_app_framework.defineModule)({
216
+ id: `${import_chunk_BAQRBGOJ.meta.id}/module/react-surface`,
217
+ activatesOn: import_app_framework.Events.SetupReactSurface,
218
+ // TODO(wittjosiah): Should occur before the chat is loaded when surfaces activation is more granular.
219
+ activatesBefore: [
220
+ import_app_framework.Events.SetupArtifactDefinition
221
+ ],
222
+ activate: import_chunk_B37JIAOP.ReactSurface
223
+ }),
224
+ (0, import_app_framework.defineModule)({
225
+ id: `${import_chunk_BAQRBGOJ.meta.id}/module/app-graph-builder`,
226
+ activatesOn: import_app_framework.Events.SetupAppGraph,
227
+ activate: import_chunk_B37JIAOP.AppGraphBuilder
228
+ }),
229
+ (0, import_app_framework.defineModule)({
230
+ id: `${import_chunk_BAQRBGOJ.meta.id}/module/intent-resolver`,
231
+ activatesOn: import_app_framework.Events.SetupIntentResolver,
232
+ activate: import_chunk_B37JIAOP.IntentResolver
233
+ }),
234
+ (0, import_app_framework.defineModule)({
235
+ id: `${import_chunk_BAQRBGOJ.meta.id}/module/ai-client`,
236
+ activatesOn: import_plugin_client.ClientEvents.ClientReady,
237
+ activate: import_chunk_B37JIAOP.AiClient
238
+ })
239
+ ]);
528
240
  // Annotate the CommonJS export names for ESM import in node:
529
241
  0 && (module.exports = {
530
- AssistantPanel,
242
+ AIChatType,
243
+ ASSISTANT_DIALOG,
244
+ AUTOMATION_PLUGIN,
245
+ ApiAuthorization,
246
+ AssistantDialog,
531
247
  AutomationAction,
532
248
  AutomationPanel,
533
249
  AutomationPlugin,
534
- ChainInputSchema,
535
- ChainInputType,
536
- ChainPromptType,
537
- ChainType,
538
- chainPresets,
539
- str
250
+ AutomationSettings,
251
+ AutomationSettingsSchema,
252
+ ChatContainer,
253
+ ServiceRegistry,
254
+ ServiceType,
255
+ TemplateContainer,
256
+ TemplateEditor,
257
+ TemplateInputSchema,
258
+ TemplateInputType,
259
+ TemplateType,
260
+ Thread,
261
+ ThreadContainer,
262
+ Toolbox,
263
+ ToolboxContainer,
264
+ TriggerEditor,
265
+ categoryIcons,
266
+ handlebarsHighlightStyle,
267
+ meta
540
268
  });
541
269
  //# sourceMappingURL=index.cjs.map