@dxos/plugin-automation 0.7.5-labs.5f04cf6 → 0.7.5-labs.e27f9b9

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 (242) hide show
  1. package/dist/lib/browser/AutomationPanel-WFJZAW4F.mjs +8 -0
  2. package/dist/lib/browser/AutomationPanel-WFJZAW4F.mjs.map +7 -0
  3. package/dist/lib/browser/ChatContainer-OFCOZ5T2.mjs +12 -0
  4. package/dist/lib/browser/ChatContainer-OFCOZ5T2.mjs.map +7 -0
  5. package/dist/lib/browser/{ai-client-6CRYUC6D.mjs → ai-client-AARXEMMJ.mjs} +2 -2
  6. package/dist/lib/browser/{ai-client-6CRYUC6D.mjs.map → ai-client-AARXEMMJ.mjs.map} +3 -3
  7. package/dist/lib/browser/{app-graph-builder-IJTTULDP.mjs → app-graph-builder-B4U34VSR.mjs} +32 -1
  8. package/dist/lib/browser/{app-graph-builder-IJTTULDP.mjs.map → app-graph-builder-B4U34VSR.mjs.map} +3 -3
  9. package/dist/lib/browser/chunk-5SLV6AUA.mjs +1367 -0
  10. package/dist/lib/browser/chunk-5SLV6AUA.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-7XADMUOW.mjs +205 -0
  12. package/dist/lib/browser/chunk-7XADMUOW.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-EKJVAFT2.mjs → chunk-IYSMXX6Q.mjs} +64 -7
  14. package/dist/lib/{node-esm/chunk-5QUXIXNB.mjs.map → browser/chunk-IYSMXX6Q.mjs.map} +4 -4
  15. package/dist/lib/browser/chunk-RAVNWHNE.mjs +242 -0
  16. package/dist/lib/browser/chunk-RAVNWHNE.mjs.map +7 -0
  17. package/dist/lib/browser/index.mjs +43 -38
  18. package/dist/lib/browser/index.mjs.map +3 -3
  19. package/dist/lib/browser/intent-resolver-754MPV7H.mjs +29 -0
  20. package/dist/lib/browser/intent-resolver-754MPV7H.mjs.map +7 -0
  21. package/dist/lib/browser/meta.json +1 -1
  22. package/dist/lib/browser/{react-surface-IGMBLSV7.mjs → react-surface-4QZ6AKBF.mjs} +22 -21
  23. package/dist/lib/browser/react-surface-4QZ6AKBF.mjs.map +7 -0
  24. package/dist/lib/browser/types/index.mjs +9 -3
  25. package/dist/lib/node/AutomationPanel-LRDEDGXI.cjs +26 -0
  26. package/dist/lib/node/AutomationPanel-LRDEDGXI.cjs.map +7 -0
  27. package/dist/lib/node/ChatContainer-6LZX4K2Z.cjs +33 -0
  28. package/dist/lib/node/ChatContainer-6LZX4K2Z.cjs.map +7 -0
  29. package/dist/lib/node/{ai-client-A3RRU55B.cjs → ai-client-SA35GN5Q.cjs} +5 -5
  30. package/dist/lib/node/{ai-client-A3RRU55B.cjs.map → ai-client-SA35GN5Q.cjs.map} +3 -3
  31. package/dist/lib/node/{app-graph-builder-MF5M4QRS.cjs → app-graph-builder-ENVDOPS4.cjs} +35 -4
  32. package/dist/lib/node/{app-graph-builder-MF5M4QRS.cjs.map → app-graph-builder-ENVDOPS4.cjs.map} +3 -3
  33. package/dist/lib/node/chunk-6VMSH4P6.cjs +1364 -0
  34. package/dist/lib/node/chunk-6VMSH4P6.cjs.map +7 -0
  35. package/dist/lib/node/{chunk-VEGLN4YN.cjs → chunk-HEYQONXC.cjs} +76 -24
  36. package/dist/lib/node/chunk-HEYQONXC.cjs.map +7 -0
  37. package/dist/lib/node/chunk-LU4HQWJD.cjs +226 -0
  38. package/dist/lib/node/chunk-LU4HQWJD.cjs.map +7 -0
  39. package/dist/lib/node/{AutomationPanel-RXJDVLCF.cjs → chunk-WWU5FVAO.cjs} +120 -7
  40. package/dist/lib/node/chunk-WWU5FVAO.cjs.map +7 -0
  41. package/dist/lib/node/index.cjs +72 -66
  42. package/dist/lib/node/index.cjs.map +3 -3
  43. package/dist/lib/node/{intent-resolver-TBHYXBDI.cjs → intent-resolver-CNVBSG4E.cjs} +19 -14
  44. package/dist/lib/node/intent-resolver-CNVBSG4E.cjs.map +7 -0
  45. package/dist/lib/node/meta.json +1 -1
  46. package/dist/lib/node/{react-surface-BVUZMKYS.cjs → react-surface-5HYLBDC3.cjs} +23 -22
  47. package/dist/lib/node/react-surface-5HYLBDC3.cjs.map +7 -0
  48. package/dist/lib/node/types/index.cjs +14 -8
  49. package/dist/lib/node/types/index.cjs.map +2 -2
  50. package/dist/lib/node-esm/AutomationPanel-ZV7VEEPP.mjs +9 -0
  51. package/dist/lib/node-esm/AutomationPanel-ZV7VEEPP.mjs.map +7 -0
  52. package/dist/lib/node-esm/ChatContainer-PPVMC2FC.mjs +13 -0
  53. package/dist/lib/node-esm/ChatContainer-PPVMC2FC.mjs.map +7 -0
  54. package/dist/lib/node-esm/{ai-client-2GBZRHBA.mjs → ai-client-2ZA4TYFZ.mjs} +2 -2
  55. package/dist/lib/node-esm/{ai-client-2GBZRHBA.mjs.map → ai-client-2ZA4TYFZ.mjs.map} +3 -3
  56. package/dist/lib/node-esm/{app-graph-builder-5N7OK23B.mjs → app-graph-builder-IYOUCQZT.mjs} +32 -1
  57. package/dist/lib/node-esm/{app-graph-builder-5N7OK23B.mjs.map → app-graph-builder-IYOUCQZT.mjs.map} +3 -3
  58. package/dist/lib/node-esm/{chunk-5QUXIXNB.mjs → chunk-3KB5HRXA.mjs} +64 -7
  59. package/dist/lib/{browser/chunk-EKJVAFT2.mjs.map → node-esm/chunk-3KB5HRXA.mjs.map} +4 -4
  60. package/dist/lib/node-esm/chunk-EVTLHDM2.mjs +206 -0
  61. package/dist/lib/node-esm/chunk-EVTLHDM2.mjs.map +7 -0
  62. package/dist/lib/node-esm/chunk-MS7OIGVR.mjs +243 -0
  63. package/dist/lib/node-esm/chunk-MS7OIGVR.mjs.map +7 -0
  64. package/dist/lib/node-esm/chunk-WISKXX7U.mjs +1368 -0
  65. package/dist/lib/node-esm/chunk-WISKXX7U.mjs.map +7 -0
  66. package/dist/lib/node-esm/index.mjs +43 -38
  67. package/dist/lib/node-esm/index.mjs.map +3 -3
  68. package/dist/lib/node-esm/{intent-resolver-DPJJHFGK.mjs → intent-resolver-RQBXW442.mjs} +18 -13
  69. package/dist/lib/node-esm/intent-resolver-RQBXW442.mjs.map +7 -0
  70. package/dist/lib/node-esm/meta.json +1 -1
  71. package/dist/lib/node-esm/{react-surface-77S6XJOM.mjs → react-surface-SS5WCRJ2.mjs} +22 -21
  72. package/dist/lib/node-esm/react-surface-SS5WCRJ2.mjs.map +7 -0
  73. package/dist/lib/node-esm/types/index.mjs +9 -3
  74. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  75. package/dist/types/src/artifacts.stories.d.ts +10 -24
  76. package/dist/types/src/artifacts.stories.d.ts.map +1 -1
  77. package/dist/types/src/capabilities/app-graph-builder.d.ts +22 -22
  78. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  79. package/dist/types/src/capabilities/index.d.ts +27 -27
  80. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  81. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  82. package/dist/types/src/components/{ChatContainer.d.ts → ChatContainer/ChatContainer.d.ts} +2 -2
  83. package/dist/types/src/components/ChatContainer/ChatContainer.d.ts.map +1 -0
  84. package/dist/types/src/components/ChatContainer/index.d.ts +4 -0
  85. package/dist/types/src/components/ChatContainer/index.d.ts.map +1 -0
  86. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts +14 -0
  87. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts.map +1 -0
  88. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts +8 -0
  89. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts.map +1 -0
  90. package/dist/types/src/components/MarkdownViewer/index.d.ts +2 -0
  91. package/dist/types/src/components/MarkdownViewer/index.d.ts.map +1 -0
  92. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts +6 -0
  93. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts.map +1 -0
  94. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts +8 -0
  95. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts.map +1 -0
  96. package/dist/types/src/components/ServiceRegistry/index.d.ts +2 -0
  97. package/dist/types/src/components/ServiceRegistry/index.d.ts.map +1 -0
  98. package/dist/types/src/components/Thread/ScrollContainer.d.ts +15 -0
  99. package/dist/types/src/components/Thread/ScrollContainer.d.ts.map +1 -0
  100. package/dist/types/src/components/Thread/StatusLine.d.ts +11 -0
  101. package/dist/types/src/components/Thread/StatusLine.d.ts.map +1 -0
  102. package/dist/types/src/components/Thread/StatusLine.stories.d.ts +9 -0
  103. package/dist/types/src/components/Thread/StatusLine.stories.d.ts.map +1 -0
  104. package/dist/types/src/components/Thread/Tabbed.d.ts +9 -0
  105. package/dist/types/src/components/Thread/Tabbed.d.ts.map +1 -0
  106. package/dist/types/src/components/Thread/Tabbed.stories.d.ts +8 -0
  107. package/dist/types/src/components/Thread/Tabbed.stories.d.ts.map +1 -0
  108. package/dist/types/src/components/Thread/Thread.d.ts +6 -9
  109. package/dist/types/src/components/Thread/Thread.d.ts.map +1 -1
  110. package/dist/types/src/components/Thread/Thread.stories.d.ts +2 -4
  111. package/dist/types/src/components/Thread/Thread.stories.d.ts.map +1 -1
  112. package/dist/types/src/components/Thread/ThreadMessage.d.ts +12 -0
  113. package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +1 -0
  114. package/dist/types/src/components/Thread/ToggleContainer.d.ts +13 -0
  115. package/dist/types/src/components/Thread/ToggleContainer.d.ts.map +1 -0
  116. package/dist/types/src/components/Thread/ToggleContainer.stories.d.ts +9 -0
  117. package/dist/types/src/components/Thread/ToggleContainer.stories.d.ts.map +1 -0
  118. package/dist/types/src/components/index.d.ts +5 -2
  119. package/dist/types/src/components/index.d.ts.map +1 -1
  120. package/dist/types/src/hooks/index.d.ts +1 -0
  121. package/dist/types/src/hooks/index.d.ts.map +1 -1
  122. package/dist/types/src/hooks/processor.d.ts +32 -13
  123. package/dist/types/src/hooks/processor.d.ts.map +1 -1
  124. package/dist/types/src/hooks/useServiceRegistry.d.ts +3 -0
  125. package/dist/types/src/hooks/useServiceRegistry.d.ts.map +1 -0
  126. package/dist/types/src/tools/function.d.ts +5 -0
  127. package/dist/types/src/tools/function.d.ts.map +1 -0
  128. package/dist/types/src/tools/index.d.ts +3 -0
  129. package/dist/types/src/tools/index.d.ts.map +1 -0
  130. package/dist/types/src/tools/openapi.d.ts +10 -0
  131. package/dist/types/src/tools/openapi.d.ts.map +1 -0
  132. package/dist/types/src/tools/openapi.test.d.ts +2 -0
  133. package/dist/types/src/tools/openapi.test.d.ts.map +1 -0
  134. package/dist/types/src/translations.d.ts +9 -6
  135. package/dist/types/src/translations.d.ts.map +1 -1
  136. package/dist/types/src/types/index.d.ts +1 -0
  137. package/dist/types/src/types/index.d.ts.map +1 -1
  138. package/dist/types/src/types/registry.d.ts +9 -0
  139. package/dist/types/src/types/registry.d.ts.map +1 -0
  140. package/dist/types/src/types/schema.d.ts +131 -7
  141. package/dist/types/src/types/schema.d.ts.map +1 -1
  142. package/dist/types/src/types/types.d.ts +2 -2
  143. package/dist/types/src/types/types.d.ts.map +1 -1
  144. package/dist/types/tsconfig.tsbuildinfo +1 -1
  145. package/package.json +54 -49
  146. package/src/AutomationPlugin.tsx +12 -20
  147. package/src/artifacts.stories.tsx +126 -65
  148. package/src/capabilities/ai-client.ts +1 -1
  149. package/src/capabilities/app-graph-builder.ts +31 -2
  150. package/src/capabilities/intent-resolver.ts +14 -9
  151. package/src/capabilities/react-surface.tsx +11 -11
  152. package/src/components/ChatContainer/ChatContainer.tsx +117 -0
  153. package/src/components/ChatContainer/index.ts +8 -0
  154. package/src/components/MarkdownViewer/MarkdownViewer.stories.tsx +56 -0
  155. package/src/components/MarkdownViewer/MarkdownViewer.tsx +79 -0
  156. package/src/components/MarkdownViewer/index.ts +5 -0
  157. package/src/components/ServiceRegistry/ServiceRegistry.stories.tsx +48 -0
  158. package/src/components/ServiceRegistry/ServiceRegistry.tsx +75 -0
  159. package/src/components/ServiceRegistry/index.ts +5 -0
  160. package/src/components/Thread/ScrollContainer.tsx +92 -0
  161. package/src/components/Thread/StatusLine.stories.tsx +52 -0
  162. package/src/components/Thread/StatusLine.tsx +76 -0
  163. package/src/components/Thread/Tabbed.stories.tsx +52 -0
  164. package/src/components/Thread/Tabbed.tsx +72 -0
  165. package/src/components/Thread/Thread.stories.tsx +145 -97
  166. package/src/components/Thread/Thread.tsx +115 -108
  167. package/src/components/Thread/ThreadMessage.tsx +195 -0
  168. package/src/components/Thread/ToggleContainer.stories.tsx +111 -0
  169. package/src/components/Thread/ToggleContainer.tsx +103 -0
  170. package/src/components/index.ts +4 -1
  171. package/src/hooks/index.ts +2 -0
  172. package/src/hooks/processor.ts +100 -60
  173. package/src/hooks/useServiceRegistry.ts +22 -0
  174. package/src/tools/function.ts +47 -0
  175. package/src/tools/index.ts +6 -0
  176. package/src/tools/openapi.test.ts +227 -0
  177. package/src/tools/openapi.ts +331 -0
  178. package/src/translations.ts +8 -6
  179. package/src/types/index.ts +1 -0
  180. package/src/types/registry.ts +89 -0
  181. package/src/types/schema.ts +78 -3
  182. package/src/types/types.ts +2 -2
  183. package/dist/lib/browser/AssistantPanel-KO6DZBTU.mjs +0 -340
  184. package/dist/lib/browser/AssistantPanel-KO6DZBTU.mjs.map +0 -7
  185. package/dist/lib/browser/AutomationPanel-BMLM533Z.mjs +0 -131
  186. package/dist/lib/browser/AutomationPanel-BMLM533Z.mjs.map +0 -7
  187. package/dist/lib/browser/ChatContainer-SIAJFRFF.mjs +0 -300
  188. package/dist/lib/browser/ChatContainer-SIAJFRFF.mjs.map +0 -7
  189. package/dist/lib/browser/chunk-C3VRGDR6.mjs +0 -75
  190. package/dist/lib/browser/chunk-C3VRGDR6.mjs.map +0 -7
  191. package/dist/lib/browser/chunk-JSNPW6JF.mjs +0 -14
  192. package/dist/lib/browser/chunk-JSNPW6JF.mjs.map +0 -7
  193. package/dist/lib/browser/chunk-KPSDH6XZ.mjs +0 -118
  194. package/dist/lib/browser/chunk-KPSDH6XZ.mjs.map +0 -7
  195. package/dist/lib/browser/chunk-YZF3SDZL.mjs +0 -139
  196. package/dist/lib/browser/chunk-YZF3SDZL.mjs.map +0 -7
  197. package/dist/lib/browser/intent-resolver-AHDQ3KQP.mjs +0 -24
  198. package/dist/lib/browser/intent-resolver-AHDQ3KQP.mjs.map +0 -7
  199. package/dist/lib/browser/react-surface-IGMBLSV7.mjs.map +0 -7
  200. package/dist/lib/node/AssistantPanel-PPFS2HKK.cjs +0 -360
  201. package/dist/lib/node/AssistantPanel-PPFS2HKK.cjs.map +0 -7
  202. package/dist/lib/node/AutomationPanel-RXJDVLCF.cjs.map +0 -7
  203. package/dist/lib/node/ChatContainer-GS2SC5OG.cjs +0 -318
  204. package/dist/lib/node/ChatContainer-GS2SC5OG.cjs.map +0 -7
  205. package/dist/lib/node/chunk-BUQOZA4N.cjs +0 -97
  206. package/dist/lib/node/chunk-BUQOZA4N.cjs.map +0 -7
  207. package/dist/lib/node/chunk-DNLBVFR7.cjs +0 -147
  208. package/dist/lib/node/chunk-DNLBVFR7.cjs.map +0 -7
  209. package/dist/lib/node/chunk-TWDGP26W.cjs +0 -172
  210. package/dist/lib/node/chunk-TWDGP26W.cjs.map +0 -7
  211. package/dist/lib/node/chunk-VEGLN4YN.cjs.map +0 -7
  212. package/dist/lib/node/chunk-Z2YFE5SJ.cjs +0 -49
  213. package/dist/lib/node/chunk-Z2YFE5SJ.cjs.map +0 -7
  214. package/dist/lib/node/intent-resolver-TBHYXBDI.cjs.map +0 -7
  215. package/dist/lib/node/react-surface-BVUZMKYS.cjs.map +0 -7
  216. package/dist/lib/node-esm/AssistantPanel-XSSKKCJY.mjs +0 -341
  217. package/dist/lib/node-esm/AssistantPanel-XSSKKCJY.mjs.map +0 -7
  218. package/dist/lib/node-esm/AutomationPanel-GQZZ4UBI.mjs +0 -132
  219. package/dist/lib/node-esm/AutomationPanel-GQZZ4UBI.mjs.map +0 -7
  220. package/dist/lib/node-esm/ChatContainer-57ILGC3R.mjs +0 -301
  221. package/dist/lib/node-esm/ChatContainer-57ILGC3R.mjs.map +0 -7
  222. package/dist/lib/node-esm/chunk-ICHNUP5M.mjs +0 -119
  223. package/dist/lib/node-esm/chunk-ICHNUP5M.mjs.map +0 -7
  224. package/dist/lib/node-esm/chunk-JCYVS5GG.mjs +0 -76
  225. package/dist/lib/node-esm/chunk-JCYVS5GG.mjs.map +0 -7
  226. package/dist/lib/node-esm/chunk-L2B6VGMG.mjs +0 -16
  227. package/dist/lib/node-esm/chunk-L2B6VGMG.mjs.map +0 -7
  228. package/dist/lib/node-esm/chunk-U7HXYMPZ.mjs +0 -141
  229. package/dist/lib/node-esm/chunk-U7HXYMPZ.mjs.map +0 -7
  230. package/dist/lib/node-esm/intent-resolver-DPJJHFGK.mjs.map +0 -7
  231. package/dist/lib/node-esm/react-surface-77S6XJOM.mjs.map +0 -7
  232. package/dist/types/src/components/AssistantPanel/AssistantPanel.d.ts +0 -8
  233. package/dist/types/src/components/AssistantPanel/AssistantPanel.d.ts.map +0 -1
  234. package/dist/types/src/components/AssistantPanel/index.d.ts +0 -3
  235. package/dist/types/src/components/AssistantPanel/index.d.ts.map +0 -1
  236. package/dist/types/src/components/AssistantPanel/system-instructions.d.ts +0 -6
  237. package/dist/types/src/components/AssistantPanel/system-instructions.d.ts.map +0 -1
  238. package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
  239. package/src/components/AssistantPanel/AssistantPanel.tsx +0 -232
  240. package/src/components/AssistantPanel/index.ts +0 -7
  241. package/src/components/AssistantPanel/system-instructions.ts +0 -166
  242. package/src/components/ChatContainer.tsx +0 -80
@@ -0,0 +1,226 @@
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_LU4HQWJD_exports = {};
20
+ __export(chunk_LU4HQWJD_exports, {
21
+ AIChatType: () => AIChatType,
22
+ ApiAuthorization: () => ApiAuthorization,
23
+ AutomationAction: () => AutomationAction,
24
+ ChainInputSchema: () => ChainInputSchema,
25
+ ChainInputType: () => ChainInputType,
26
+ ChainPromptType: () => ChainPromptType,
27
+ ChainType: () => ChainType,
28
+ MockServiceRegistry: () => MockServiceRegistry,
29
+ ServiceType: () => ServiceType
30
+ });
31
+ module.exports = __toCommonJS(chunk_LU4HQWJD_exports);
32
+ var import_chunk_5VF5JKUN = require("./chunk-5VF5JKUN.cjs");
33
+ var import_echo_schema = require("@dxos/echo-schema");
34
+ var import_conductor = require("@dxos/conductor");
35
+ var import_echo_schema2 = require("@dxos/echo-schema");
36
+ var import_functions = require("@dxos/functions");
37
+ var import_echo_schema3 = require("@dxos/echo-schema");
38
+ var ChainInputType;
39
+ (function(ChainInputType2) {
40
+ ChainInputType2[ChainInputType2["VALUE"] = 0] = "VALUE";
41
+ ChainInputType2[ChainInputType2["PASS_THROUGH"] = 1] = "PASS_THROUGH";
42
+ ChainInputType2[ChainInputType2["RETRIEVER"] = 2] = "RETRIEVER";
43
+ ChainInputType2[ChainInputType2["FUNCTION"] = 3] = "FUNCTION";
44
+ ChainInputType2[ChainInputType2["QUERY"] = 4] = "QUERY";
45
+ ChainInputType2[ChainInputType2["RESOLVER"] = 5] = "RESOLVER";
46
+ ChainInputType2[ChainInputType2["CONTEXT"] = 6] = "CONTEXT";
47
+ ChainInputType2[ChainInputType2["SCHEMA"] = 7] = "SCHEMA";
48
+ })(ChainInputType || (ChainInputType = {}));
49
+ var ChainInputSchema = import_echo_schema2.S.mutable(import_echo_schema2.S.Struct({
50
+ name: import_echo_schema2.S.String,
51
+ type: import_echo_schema2.S.optional(import_echo_schema2.S.Enums(ChainInputType)),
52
+ value: import_echo_schema2.S.optional(import_echo_schema2.S.String)
53
+ }));
54
+ var ChainPromptType = class extends (0, import_echo_schema2.TypedObject)({
55
+ typename: "dxos.org/type/ChainPrompt",
56
+ version: "0.1.0"
57
+ })({
58
+ command: import_echo_schema2.S.optional(import_echo_schema2.S.String),
59
+ template: import_echo_schema2.S.String,
60
+ inputs: import_echo_schema2.S.optional(import_echo_schema2.S.mutable(import_echo_schema2.S.Array(ChainInputSchema)))
61
+ }) {
62
+ };
63
+ var ChainType = class extends (0, import_echo_schema2.TypedObject)({
64
+ typename: "dxos.org/type/Chain",
65
+ version: "0.1.0"
66
+ })({
67
+ name: import_echo_schema2.S.optional(import_echo_schema2.S.String),
68
+ prompts: import_echo_schema2.S.optional(import_echo_schema2.S.mutable(import_echo_schema2.S.Array((0, import_echo_schema2.Ref)(ChainPromptType))))
69
+ }) {
70
+ };
71
+ var AIChatType = class extends (0, import_echo_schema2.TypedObject)({
72
+ typename: "dxos.org/type/AIChat",
73
+ version: "0.1.0"
74
+ })({
75
+ name: import_echo_schema2.S.optional(import_echo_schema2.S.String),
76
+ // TODO(wittjosiah): Should be a ref to a Queue.
77
+ queue: (0, import_echo_schema2.Ref)(import_echo_schema2.Expando)
78
+ }) {
79
+ };
80
+ var ApiAuthorizationKey = import_echo_schema2.S.Struct({
81
+ type: import_echo_schema2.S.Literal("api-key"),
82
+ key: import_echo_schema2.S.String,
83
+ placement: import_echo_schema2.S.Union(import_echo_schema2.S.Struct({
84
+ type: import_echo_schema2.S.Literal("authorization-header")
85
+ }), import_echo_schema2.S.Struct({
86
+ type: import_echo_schema2.S.Literal("query"),
87
+ name: import_echo_schema2.S.String
88
+ }))
89
+ });
90
+ var ApiAuthorizationOauth = import_echo_schema2.S.Struct({
91
+ type: import_echo_schema2.S.Literal("oauth"),
92
+ clientId: import_echo_schema2.S.String,
93
+ clientSecret: import_echo_schema2.S.String,
94
+ tokenUrl: import_echo_schema2.S.String,
95
+ grantType: import_echo_schema2.S.String
96
+ });
97
+ var ApiAuthorization = import_echo_schema2.S.Union(ApiAuthorizationKey, ApiAuthorizationOauth);
98
+ var ServiceInterfaceFunction = import_echo_schema2.S.Struct({
99
+ kind: import_echo_schema2.S.Literal("function"),
100
+ fn: (0, import_echo_schema2.Ref)(import_functions.FunctionType)
101
+ });
102
+ var ServiceInterfaceWorkflow = import_echo_schema2.S.Struct({
103
+ kind: import_echo_schema2.S.Literal("workflow"),
104
+ workflow: (0, import_echo_schema2.Ref)(import_conductor.ComputeGraph)
105
+ });
106
+ var ServiceInterfaceApi = import_echo_schema2.S.Struct({
107
+ kind: import_echo_schema2.S.Literal("api"),
108
+ /**
109
+ * URL to fetch the openapi schema.
110
+ */
111
+ schemaUrl: import_echo_schema2.S.optional(import_echo_schema2.S.String),
112
+ /**
113
+ * Inlined openapi schema.
114
+ */
115
+ schema: import_echo_schema2.S.optional(import_echo_schema2.S.Any),
116
+ /**
117
+ * Authorization configuration if required.
118
+ */
119
+ authorization: import_echo_schema2.S.optional(ApiAuthorization)
120
+ });
121
+ var ServiceInterface = import_echo_schema2.S.Union(ServiceInterfaceFunction, ServiceInterfaceWorkflow, ServiceInterfaceApi);
122
+ var ServiceType = import_echo_schema2.S.Struct({
123
+ serviceId: import_echo_schema2.S.String,
124
+ name: import_echo_schema2.S.optional(import_echo_schema2.S.String),
125
+ description: import_echo_schema2.S.optional(import_echo_schema2.S.String),
126
+ enabled: import_echo_schema2.S.optional(import_echo_schema2.S.Boolean),
127
+ /**
128
+ * Entries exposed: functions, workflows, and APIs.
129
+ */
130
+ interfaces: import_echo_schema2.S.optional(import_echo_schema2.S.Array(ServiceInterface))
131
+ }).pipe((0, import_echo_schema2.EchoObject)("dxos.org/type/Service", "0.1.0"));
132
+ var MockServiceRegistry = class {
133
+ async queryServices(query) {
134
+ return TEST_SERVICES;
135
+ }
136
+ };
137
+ var AMADEUS_AUTH = {
138
+ type: "oauth",
139
+ clientId: "BOEnpLd1sMyKjAPGKYeAPFFy60u53QEG",
140
+ clientSecret: "n4qldSN7usvD57gm",
141
+ tokenUrl: "https://test.api.amadeus.com/v1/security/oauth2/token",
142
+ grantType: "client_credentials"
143
+ };
144
+ var VISUAL_CROSSING_CREDENTIALS = {
145
+ type: "api-key",
146
+ key: "FDPRVS953KB4GQQLD25GRT975",
147
+ placement: {
148
+ type: "query",
149
+ name: "key"
150
+ }
151
+ };
152
+ var TEST_SERVICES = [
153
+ /**
154
+ * dxn:service:example.com/service/FlightSearch
155
+ */
156
+ (0, import_echo_schema.createStatic)(ServiceType, {
157
+ serviceId: "example.com/service/FlightSearch",
158
+ name: "Amadeus Flight Search",
159
+ description: "Search for local and international flights.",
160
+ interfaces: [
161
+ {
162
+ kind: "api",
163
+ schemaUrl: "https://api.apis.guru/v2/specs/amadeus.com/amadeus-flight-availabilities-search/1.0.2/swagger.json",
164
+ authorization: AMADEUS_AUTH
165
+ }
166
+ ]
167
+ }),
168
+ /**
169
+ * dxn:service:example.com/service/HotelSearch
170
+ */
171
+ // TODO(burdon): Not working.
172
+ (0, import_echo_schema.createStatic)(ServiceType, {
173
+ serviceId: "example.com/service/HotelSearch",
174
+ name: "Amadeus Hotel Search",
175
+ description: "Search for local and international hotels.",
176
+ interfaces: [
177
+ {
178
+ kind: "api",
179
+ schemaUrl: "https://api.apis.guru/v2/specs/amadeus.com/amadeus-hotel-search/3.0.8/swagger.json",
180
+ authorization: AMADEUS_AUTH
181
+ }
182
+ ]
183
+ }),
184
+ /**
185
+ * dxn:service:example.com/service/Weather
186
+ */
187
+ (0, import_echo_schema.createStatic)(ServiceType, {
188
+ serviceId: "example.com/service/Weather",
189
+ name: "Visual Crossing Weather",
190
+ description: "Search for global weather forecasts.",
191
+ interfaces: [
192
+ {
193
+ kind: "api",
194
+ schemaUrl: "https://api.apis.guru/v2/specs/visualcrossing.com/weather/4.6/openapi.json",
195
+ authorization: VISUAL_CROSSING_CREDENTIALS
196
+ }
197
+ ]
198
+ })
199
+ ];
200
+ var AutomationAction;
201
+ (function(AutomationAction2) {
202
+ const AUTOMATION_ACTION = `${import_chunk_5VF5JKUN.AUTOMATION_PLUGIN}/action`;
203
+ class Create extends import_echo_schema3.S.TaggedClass()(`${AUTOMATION_ACTION}/create`, {
204
+ input: import_echo_schema3.S.Struct({
205
+ name: import_echo_schema3.S.optional(import_echo_schema3.S.String)
206
+ }),
207
+ output: import_echo_schema3.S.Struct({
208
+ object: AIChatType
209
+ })
210
+ }) {
211
+ }
212
+ AutomationAction2.Create = Create;
213
+ })(AutomationAction || (AutomationAction = {}));
214
+ // Annotate the CommonJS export names for ESM import in node:
215
+ 0 && (module.exports = {
216
+ AIChatType,
217
+ ApiAuthorization,
218
+ AutomationAction,
219
+ ChainInputSchema,
220
+ ChainInputType,
221
+ ChainPromptType,
222
+ ChainType,
223
+ MockServiceRegistry,
224
+ ServiceType
225
+ });
226
+ //# sourceMappingURL=chunk-LU4HQWJD.cjs.map
@@ -0,0 +1,7 @@
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 { createStatic } from '@dxos/echo-schema';\n\nimport { type ApiAuthorization, ServiceType } from './schema';\n\nexport type ServiceQuery = {};\n\nexport interface BaseServiceRegistry {\n queryServices(query: ServiceQuery): Promise<ServiceType[]>;\n}\n\nexport class MockServiceRegistry implements BaseServiceRegistry {\n async queryServices(query: ServiceQuery): Promise<ServiceType[]> {\n return TEST_SERVICES;\n }\n}\n\n// TODO(burdon): Can we generalize credentials?\n\nconst AMADEUS_AUTH: ApiAuthorization = {\n type: 'oauth',\n clientId: 'BOEnpLd1sMyKjAPGKYeAPFFy60u53QEG',\n clientSecret: 'n4qldSN7usvD57gm',\n tokenUrl: 'https://test.api.amadeus.com/v1/security/oauth2/token',\n grantType: 'client_credentials',\n};\n\nconst VISUAL_CROSSING_CREDENTIALS: ApiAuthorization = {\n type: 'api-key',\n key: 'FDPRVS953KB4GQQLD25GRT975',\n placement: {\n type: 'query',\n name: 'key',\n },\n};\n\nconst TEST_SERVICES: ServiceType[] = [\n /**\n * dxn:service:example.com/service/FlightSearch\n */\n createStatic(ServiceType, {\n serviceId: 'example.com/service/FlightSearch',\n name: 'Amadeus Flight Search',\n description: 'Search for local and international flights.',\n interfaces: [\n {\n kind: 'api',\n schemaUrl: 'https://api.apis.guru/v2/specs/amadeus.com/amadeus-flight-availabilities-search/1.0.2/swagger.json',\n authorization: AMADEUS_AUTH,\n },\n ],\n }),\n\n /**\n * dxn:service:example.com/service/HotelSearch\n */\n // TODO(burdon): Not working.\n createStatic(ServiceType, {\n serviceId: 'example.com/service/HotelSearch',\n name: 'Amadeus Hotel Search',\n description: 'Search for local and international hotels.',\n interfaces: [\n {\n kind: 'api',\n schemaUrl: 'https://api.apis.guru/v2/specs/amadeus.com/amadeus-hotel-search/3.0.8/swagger.json',\n authorization: AMADEUS_AUTH,\n },\n ],\n }),\n\n /**\n * dxn:service:example.com/service/Weather\n */\n createStatic(ServiceType, {\n serviceId: 'example.com/service/Weather',\n name: 'Visual Crossing Weather',\n description: 'Search for global weather forecasts.',\n interfaces: [\n {\n kind: 'api',\n schemaUrl: 'https://api.apis.guru/v2/specs/visualcrossing.com/weather/4.6/openapi.json',\n authorization: VISUAL_CROSSING_CREDENTIALS,\n },\n ],\n }),\n] as const;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { ComputeGraph } from '@dxos/conductor';\nimport { Expando, Ref, S, TypedObject, type Ref$, EchoObject } 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\nexport const ServiceType = S.Struct({\n serviceId: S.String,\n\n name: S.optional(S.String),\n description: S.optional(S.String),\n\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\nexport type ServiceType = S.Schema.Type<typeof ServiceType>;\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,yBAA6B;ACA7B,uBAA6B;AAC7B,IAAAA,sBAAoE;AACpE,uBAA6B;ACF7B,IAAAA,sBAAkB;;UDKNC,iBAAAA;;;;;;;;;GAAAA,mBAAAA,iBAAAA,CAAAA,EAAAA;AAWL,IAAMC,mBAAmBC,sBAAEC,QAChCD,sBAAEE,OAAO;EACPC,MAAMH,sBAAEI;EACRC,MAAML,sBAAEM,SAASN,sBAAEO,MAAMT,cAAAA,CAAAA;EACzBU,OAAOR,sBAAEM,SAASN,sBAAEI,MAA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xBC,WAAW;IACX7C,MAAM;IACN8C,aAAa;IACbG,YAAY;MACV;QACEjB,MAAM;QACNO,WAAW;QACXG,eAAec;MACjB;;EAEJ,CAAA;;;;;MAMAE,iCAAad,aAAa;IACxBC,WAAW;IACX7C,MAAM;IACN8C,aAAa;IACbG,YAAY;MACV;QACEjB,MAAM;QACNO,WAAW;QACXG,eAAec;MACjB;;EAEJ,CAAA;;;;MAKAE,iCAAad,aAAa;IACxBC,WAAW;IACX7C,MAAM;IACN8C,aAAa;IACbG,YAAY;MACV;QACEjB,MAAM;QACNO,WAAW;QACXG,eAAee;MACjB;;EAEJ,CAAA;;;UE9EeE,mBAAAA;AACf,QAAMC,oBAAoB,GAAGC,uCAAAA;EAEtB,MAAMC,eAAejE,oBAAAA,EAAEkE,YAAW,EAAW,GAAGH,iBAAAA,WAA4B;IACjFI,OAAOnE,oBAAAA,EAAEE,OAAO;MACdC,MAAMH,oBAAAA,EAAEM,SAASN,oBAAAA,EAAEI,MAAM;IAC3B,CAAA;IACAgE,QAAQpE,oBAAAA,EAAEE,OAAO;MACfmE,QAAQjD;IACV,CAAA;EACF,CAAA,EAAA;EAAI;oBAPS6C,SAAAA;AAQf,GAXiBH,qBAAAA,mBAAAA,CAAAA,EAAAA;",
6
+ "names": ["import_echo_schema", "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", "enabled", "Boolean", "interfaces", "pipe", "EchoObject", "MockServiceRegistry", "queryServices", "query", "TEST_SERVICES", "AMADEUS_AUTH", "VISUAL_CROSSING_CREDENTIALS", "createStatic", "AutomationAction", "AUTOMATION_ACTION", "AUTOMATION_PLUGIN", "Create", "TaggedClass", "input", "output", "object"]
7
+ }
@@ -26,12 +26,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var AutomationPanel_RXJDVLCF_exports = {};
30
- __export(AutomationPanel_RXJDVLCF_exports, {
31
- default: () => AutomationPanel_default
29
+ var chunk_WWU5FVAO_exports = {};
30
+ __export(chunk_WWU5FVAO_exports, {
31
+ AutomationPanel_default: () => AutomationPanel_default,
32
+ TriggerEditor: () => TriggerEditor
32
33
  });
33
- module.exports = __toCommonJS(AutomationPanel_RXJDVLCF_exports);
34
- var import_chunk_DNLBVFR7 = require("./chunk-DNLBVFR7.cjs");
34
+ module.exports = __toCommonJS(chunk_WWU5FVAO_exports);
35
35
  var import_chunk_5VF5JKUN = require("./chunk-5VF5JKUN.cjs");
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_echo_schema = require("@dxos/echo-schema");
@@ -41,6 +41,114 @@ var import_echo = require("@dxos/react-client/echo");
41
41
  var import_react_ui = require("@dxos/react-ui");
42
42
  var import_react_ui_list = require("@dxos/react-ui-list");
43
43
  var import_react_ui_theme = require("@dxos/react-ui-theme");
44
+ var import_react2 = __toESM(require("react"));
45
+ var import_conductor = require("@dxos/conductor");
46
+ var import_functions2 = require("@dxos/functions");
47
+ var import_echo2 = require("@dxos/react-client/echo");
48
+ var import_react_ui2 = require("@dxos/react-ui");
49
+ var import_react_ui_form = require("@dxos/react-ui-form");
50
+ var TriggerEditor = ({ space, trigger, onSave, onCancel }) => {
51
+ const { t } = (0, import_react_ui2.useTranslation)(import_chunk_5VF5JKUN.AUTOMATION_PLUGIN);
52
+ const functions = (0, import_echo2.useQuery)(space, import_echo2.Filter.schema(import_functions2.FunctionType));
53
+ const workflows = (0, import_echo2.useQuery)(space, import_echo2.Filter.schema(import_conductor.ComputeGraph));
54
+ const scripts = (0, import_echo2.useQuery)(space, import_echo2.Filter.schema(import_functions2.ScriptType));
55
+ const handleSave = (values) => {
56
+ onSave?.(values);
57
+ };
58
+ return /* @__PURE__ */ import_react2.default.createElement(import_react_ui_form.Form, {
59
+ schema: import_functions2.FunctionTriggerSchema,
60
+ values: trigger,
61
+ onSave: handleSave,
62
+ onCancel,
63
+ Custom: {
64
+ ["function"]: (props) => /* @__PURE__ */ import_react2.default.createElement(import_react_ui_form.SelectInput, {
65
+ ...props,
66
+ options: getWorkflowOptions(workflows).concat(getFunctionOptions(scripts, functions))
67
+ }),
68
+ ["spec.type"]: (props) => /* @__PURE__ */ import_react2.default.createElement(import_react_ui_form.SelectInput, {
69
+ ...props,
70
+ options: Object.values(import_functions2.TriggerKind).map((kind) => ({
71
+ value: kind,
72
+ label: t(`trigger type ${kind}`)
73
+ }))
74
+ }),
75
+ ["meta"]: (props) => {
76
+ const meta = props.getValue();
77
+ const [newMetaFieldName, setNewMetaFieldName] = (0, import_react2.useState)("");
78
+ import_react2.default.useEffect(() => props.onValueChange("object", {
79
+ ...meta
80
+ }), []);
81
+ return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("div", null, props.label), [
82
+ ...Object.keys(meta)
83
+ ].map((key) => {
84
+ const compositeKey = `meta.${key}`;
85
+ return /* @__PURE__ */ import_react2.default.createElement("div", {
86
+ key: compositeKey,
87
+ role: "none",
88
+ className: "flex items-center mt-2 gap-1"
89
+ }, /* @__PURE__ */ import_react2.default.createElement("div", {
90
+ role: "none",
91
+ className: "flex-1"
92
+ }, /* @__PURE__ */ import_react2.default.createElement(import_react_ui_form.TextInput, {
93
+ ...props,
94
+ type: "string",
95
+ label: key
96
+ })), /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.IconButton, {
97
+ icon: "ph--trash--regular",
98
+ iconOnly: true,
99
+ classNames: "mt-6",
100
+ label: t("trigger meta remove"),
101
+ onClick: () => {
102
+ const newValues = {
103
+ ...props.getValue()
104
+ };
105
+ delete newValues[key];
106
+ props.onValueChange("object", newValues);
107
+ }
108
+ }));
109
+ }), /* @__PURE__ */ import_react2.default.createElement("div", {
110
+ role: "none",
111
+ className: "flex items-center mt-2 gap-1 plb-1"
112
+ }, /* @__PURE__ */ import_react2.default.createElement("div", {
113
+ role: "none",
114
+ className: "flex-1"
115
+ }, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Input.Root, null, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Input.TextInput, {
116
+ placeholder: t("trigger meta prop name placeholder"),
117
+ value: newMetaFieldName,
118
+ onChange: (event) => setNewMetaFieldName(event.target.value)
119
+ }))), /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.IconButton, {
120
+ icon: "ph--plus--regular",
121
+ iconOnly: true,
122
+ label: t("trigger meta add"),
123
+ onClick: () => {
124
+ if (newMetaFieldName.length) {
125
+ const meta2 = props.getValue() ?? {};
126
+ const metaWithNewProp = {
127
+ ...meta2,
128
+ [newMetaFieldName]: ""
129
+ };
130
+ setNewMetaFieldName("");
131
+ props.onValueChange("object", metaWithNewProp);
132
+ }
133
+ }
134
+ })));
135
+ }
136
+ }
137
+ });
138
+ };
139
+ var getWorkflowOptions = (graphs) => {
140
+ return graphs.map((graph) => ({
141
+ label: `compute-${graph.id}`,
142
+ value: `dxn:echo:@:${graph.id}`
143
+ }));
144
+ };
145
+ var getFunctionOptions = (scripts, functions) => {
146
+ const getLabel = (fn) => scripts.find((s) => fn.source?.target?.id === s.id)?.name ?? fn.name;
147
+ return functions.map((fn) => ({
148
+ label: getLabel(fn),
149
+ value: `dxn:worker:${fn.name}`
150
+ }));
151
+ };
44
152
  var grid = "grid grid-cols-[40px_1fr_32px] min-bs-[2.5rem]";
45
153
  var AutomationPanel = ({ space, object }) => {
46
154
  const { t } = (0, import_react_ui.useTranslation)(import_chunk_5VF5JKUN.AUTOMATION_PLUGIN);
@@ -106,7 +214,7 @@ var AutomationPanel = ({ space, object }) => {
106
214
  }, t(copyAction.translationKey))), /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.ItemDeleteButton, {
107
215
  onClick: () => handleDelete(trigger2)
108
216
  }));
109
- }))), trigger && /* @__PURE__ */ import_react.default.createElement(import_chunk_DNLBVFR7.TriggerEditor, {
217
+ }))), trigger && /* @__PURE__ */ import_react.default.createElement(TriggerEditor, {
110
218
  space,
111
219
  trigger,
112
220
  onSave: handleSave,
@@ -150,4 +258,9 @@ var getFunctionName = (scripts, functions, trigger) => {
150
258
  return scripts.find((s) => functionObject.source?.target?.id === s.id)?.name ?? shortId;
151
259
  };
152
260
  var AutomationPanel_default = AutomationPanel;
153
- //# sourceMappingURL=AutomationPanel-RXJDVLCF.cjs.map
261
+ // Annotate the CommonJS export names for ESM import in node:
262
+ 0 && (module.exports = {
263
+ AutomationPanel_default,
264
+ TriggerEditor
265
+ });
266
+ //# sourceMappingURL=chunk-WWU5FVAO.cjs.map
@@ -0,0 +1,7 @@
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, { 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\n const [newMetaFieldName, setNewMetaFieldName] = useState('');\n\n React.useEffect(() => props.onValueChange('object', { ...meta }), []);\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 {...props} type={'string'} label={key} />\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,gBAAgC;AAEhC,uBAA6B;AAC7B,IAAAC,oBAOO;AACP,IAAAC,eAA6C;AAC7C,IAAAC,mBAAkD;AAClD,2BAA6C;AAWtC,I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WP,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", "newMetaFieldName", "setNewMetaFieldName", "useState", "useEffect", "onValueChange", "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
+ }