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

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 (107) hide show
  1. package/dist/lib/browser/{AssistantPanel-32FH2RA6.mjs → AssistantPanel-N276BTPV.mjs} +2 -2
  2. package/dist/lib/browser/AutomationPanel-IHZ4JKVS.mjs +232 -0
  3. package/dist/lib/browser/AutomationPanel-IHZ4JKVS.mjs.map +7 -0
  4. package/dist/lib/browser/app-graph-builder-IJTTULDP.mjs +131 -0
  5. package/dist/lib/browser/app-graph-builder-IJTTULDP.mjs.map +7 -0
  6. package/dist/lib/browser/chunk-4AIMDHKY.mjs +10 -0
  7. package/dist/lib/browser/chunk-4AIMDHKY.mjs.map +7 -0
  8. package/dist/lib/browser/{chunk-DN5M2QL5.mjs → chunk-DL6LB2NI.mjs} +2 -8
  9. package/dist/lib/browser/{chunk-DN5M2QL5.mjs.map → chunk-DL6LB2NI.mjs.map} +4 -4
  10. package/dist/lib/browser/{chunk-X5KMOH3I.mjs → chunk-HKX3D3ZP.mjs} +3 -3
  11. package/dist/lib/browser/chunk-HKX3D3ZP.mjs.map +7 -0
  12. package/dist/lib/browser/index.mjs +89 -236
  13. package/dist/lib/browser/index.mjs.map +4 -4
  14. package/dist/lib/browser/meta.json +1 -1
  15. package/dist/lib/browser/react-surface-LL72F3F4.mjs +34 -0
  16. package/dist/lib/browser/react-surface-LL72F3F4.mjs.map +7 -0
  17. package/dist/lib/browser/types/index.mjs +1 -3
  18. package/dist/lib/node/{AssistantPanel-XANI7YNV.cjs → AssistantPanel-Z4GVHUF3.cjs} +6 -6
  19. package/dist/lib/node/{AutomationPanel-VADY3HMP.cjs → AutomationPanel-PPODB5XA.cjs} +113 -32
  20. package/dist/lib/node/AutomationPanel-PPODB5XA.cjs.map +7 -0
  21. package/dist/lib/node/app-graph-builder-MF5M4QRS.cjs +147 -0
  22. package/dist/lib/node/app-graph-builder-MF5M4QRS.cjs.map +7 -0
  23. package/dist/lib/node/chunk-25AQIF3L.cjs +43 -0
  24. package/dist/lib/node/chunk-25AQIF3L.cjs.map +7 -0
  25. package/dist/lib/node/{chunk-DTJ7XVO2.cjs → chunk-5VF5JKUN.cjs} +7 -7
  26. package/dist/lib/node/chunk-5VF5JKUN.cjs.map +7 -0
  27. package/dist/lib/node/{chunk-NIL4TP6U.cjs → chunk-JNDMZQH7.cjs} +4 -9
  28. package/dist/lib/node/chunk-JNDMZQH7.cjs.map +7 -0
  29. package/dist/lib/node/index.cjs +112 -258
  30. package/dist/lib/node/index.cjs.map +4 -4
  31. package/dist/lib/node/meta.json +1 -1
  32. package/dist/lib/node/react-surface-DVAU4MGD.cjs +57 -0
  33. package/dist/lib/node/react-surface-DVAU4MGD.cjs.map +7 -0
  34. package/dist/lib/node/types/index.cjs +5 -7
  35. package/dist/lib/node/types/index.cjs.map +2 -2
  36. package/dist/lib/node-esm/{AssistantPanel-5M6O6JV7.mjs → AssistantPanel-DDCQHBJX.mjs} +2 -2
  37. package/dist/lib/node-esm/AutomationPanel-R3D6CRF5.mjs +233 -0
  38. package/dist/lib/node-esm/AutomationPanel-R3D6CRF5.mjs.map +7 -0
  39. package/dist/lib/node-esm/app-graph-builder-5N7OK23B.mjs +132 -0
  40. package/dist/lib/node-esm/app-graph-builder-5N7OK23B.mjs.map +7 -0
  41. package/dist/lib/node-esm/{chunk-GCHXTXVT.mjs → chunk-GIAYUM5I.mjs} +2 -8
  42. package/dist/lib/node-esm/{chunk-GCHXTXVT.mjs.map → chunk-GIAYUM5I.mjs.map} +4 -4
  43. package/dist/lib/node-esm/{chunk-HNOBZHWK.mjs → chunk-X3LPRWIL.mjs} +3 -3
  44. package/dist/lib/node-esm/chunk-X3LPRWIL.mjs.map +7 -0
  45. package/dist/lib/node-esm/chunk-XW7TEQA3.mjs +12 -0
  46. package/dist/lib/node-esm/chunk-XW7TEQA3.mjs.map +7 -0
  47. package/dist/lib/node-esm/index.mjs +89 -236
  48. package/dist/lib/node-esm/index.mjs.map +4 -4
  49. package/dist/lib/node-esm/meta.json +1 -1
  50. package/dist/lib/node-esm/react-surface-4BED2PZ4.mjs +35 -0
  51. package/dist/lib/node-esm/react-surface-4BED2PZ4.mjs.map +7 -0
  52. package/dist/lib/node-esm/types/index.mjs +1 -3
  53. package/dist/types/src/AutomationPlugin.d.ts +1 -3
  54. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  55. package/dist/types/src/capabilities/app-graph-builder.d.ts +180 -0
  56. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  57. package/dist/types/src/capabilities/index.d.ts +179 -0
  58. package/dist/types/src/capabilities/index.d.ts.map +1 -0
  59. package/dist/types/src/capabilities/react-surface.d.ts +4 -0
  60. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  61. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -1
  62. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  63. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -2
  64. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  65. package/dist/types/src/components/index.d.ts +1 -1
  66. package/dist/types/src/components/index.d.ts.map +1 -1
  67. package/dist/types/src/index.d.ts +1 -2
  68. package/dist/types/src/index.d.ts.map +1 -1
  69. package/dist/types/src/meta.d.ts +1 -2
  70. package/dist/types/src/meta.d.ts.map +1 -1
  71. package/dist/types/src/translations.d.ts +7 -0
  72. package/dist/types/src/translations.d.ts.map +1 -1
  73. package/dist/types/src/types/index.d.ts +0 -1
  74. package/dist/types/src/types/index.d.ts.map +1 -1
  75. package/dist/types/tsconfig.tsbuildinfo +1 -1
  76. package/package.json +38 -46
  77. package/src/AutomationPlugin.tsx +55 -193
  78. package/src/capabilities/app-graph-builder.ts +127 -0
  79. package/src/capabilities/index.ts +8 -0
  80. package/src/capabilities/react-surface.tsx +27 -0
  81. package/src/components/AutomationPanel/AutomationPanel.tsx +54 -37
  82. package/src/components/TriggerEditor/TriggerEditor.tsx +63 -6
  83. package/src/index.ts +1 -4
  84. package/src/meta.ts +1 -1
  85. package/src/translations.ts +9 -0
  86. package/src/types/index.ts +0 -1
  87. package/dist/lib/browser/AutomationPanel-ABGPG5LE.mjs +0 -151
  88. package/dist/lib/browser/AutomationPanel-ABGPG5LE.mjs.map +0 -7
  89. package/dist/lib/browser/chunk-X5KMOH3I.mjs.map +0 -7
  90. package/dist/lib/browser/meta.mjs +0 -9
  91. package/dist/lib/browser/meta.mjs.map +0 -7
  92. package/dist/lib/node/AutomationPanel-VADY3HMP.cjs.map +0 -7
  93. package/dist/lib/node/chunk-DTJ7XVO2.cjs.map +0 -7
  94. package/dist/lib/node/chunk-NIL4TP6U.cjs.map +0 -7
  95. package/dist/lib/node/meta.cjs +0 -30
  96. package/dist/lib/node/meta.cjs.map +0 -7
  97. package/dist/lib/node-esm/AutomationPanel-EETYIDPA.mjs +0 -152
  98. package/dist/lib/node-esm/AutomationPanel-EETYIDPA.mjs.map +0 -7
  99. package/dist/lib/node-esm/chunk-HNOBZHWK.mjs.map +0 -7
  100. package/dist/lib/node-esm/meta.mjs +0 -10
  101. package/dist/lib/node-esm/meta.mjs.map +0 -7
  102. package/dist/types/src/types/types.d.ts +0 -7
  103. package/dist/types/src/types/types.d.ts.map +0 -1
  104. package/src/types/types.ts +0 -27
  105. /package/dist/lib/browser/{AssistantPanel-32FH2RA6.mjs.map → AssistantPanel-N276BTPV.mjs.map} +0 -0
  106. /package/dist/lib/node/{AssistantPanel-XANI7YNV.cjs.map → AssistantPanel-Z4GVHUF3.cjs.map} +0 -0
  107. /package/dist/lib/node-esm/{AssistantPanel-5M6O6JV7.mjs.map → AssistantPanel-DDCQHBJX.mjs.map} +0 -0
@@ -28,38 +28,35 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var node_exports = {};
30
30
  __export(node_exports, {
31
- AssistantPanel: () => AssistantPanel,
32
- AutomationAction: () => import_chunk_NIL4TP6U.AutomationAction,
33
- AutomationPanel: () => AutomationPanel,
31
+ AUTOMATION_PLUGIN: () => import_chunk_5VF5JKUN.AUTOMATION_PLUGIN,
32
+ AssistantPanel: () => import_chunk_25AQIF3L.AssistantPanel,
33
+ AutomationPanel: () => import_chunk_25AQIF3L.AutomationPanel,
34
34
  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,
35
+ ChainInputSchema: () => import_chunk_JNDMZQH7.ChainInputSchema,
36
+ ChainInputType: () => import_chunk_JNDMZQH7.ChainInputType,
37
+ ChainPromptType: () => import_chunk_JNDMZQH7.ChainPromptType,
38
+ ChainType: () => import_chunk_JNDMZQH7.ChainType,
39
39
  chainPresets: () => chainPresets,
40
- default: () => src_default,
40
+ meta: () => import_chunk_5VF5JKUN.meta,
41
41
  str: () => str
42
42
  });
43
43
  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"));
44
+ var import_chunk_JNDMZQH7 = require("./chunk-JNDMZQH7.cjs");
45
+ var import_chunk_25AQIF3L = require("./chunk-25AQIF3L.cjs");
46
+ var import_chunk_5VF5JKUN = require("./chunk-5VF5JKUN.cjs");
47
47
  var import_app_framework = require("@dxos/app-framework");
48
48
  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");
52
- var import_plugin_space = require("@dxos/plugin-space");
49
+ var import_plugin_client = require("@dxos/plugin-client");
50
+ var import_plugin_deck = require("@dxos/plugin-deck");
53
51
  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");
52
+ var import_app_framework2 = require("@dxos/app-framework");
56
53
  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"));
54
+ var AppGraphBuilder = (0, import_app_framework2.lazy)(() => import("./app-graph-builder-MF5M4QRS.cjs"));
55
+ var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-DVAU4MGD.cjs"));
59
56
  var translations_default = [
60
57
  {
61
58
  "en-US": {
62
- [import_chunk_DTJ7XVO2.AUTOMATION_PLUGIN]: {
59
+ [import_chunk_5VF5JKUN.AUTOMATION_PLUGIN]: {
63
60
  "plugin name": "Automation",
64
61
  "object placeholder": "New prompt",
65
62
  "create object label": "Create prompt",
@@ -70,6 +67,7 @@ var translations_default = [
70
67
  "value placeholder": "Enter value...",
71
68
  "select preset template placeholder": "Select preset",
72
69
  "open automation panel label": "Show Automations",
70
+ "automation panel label": "Automations",
73
71
  "function select label": "Function",
74
72
  "function select placeholder": "Select function",
75
73
  "function enabled": "Enabled",
@@ -79,242 +77,98 @@ var translations_default = [
79
77
  "trigger type webhook": "Webhook",
80
78
  "trigger type websocket": "Websocket",
81
79
  "trigger type subscription": "Subscription",
80
+ "trigger type email": "Email",
82
81
  "trigger filter": "Filter",
83
82
  "trigger cron": "Cron",
84
83
  "trigger method": "Method",
85
84
  "trigger endpoint": "Endpoint",
85
+ "trigger copy url": "Copy URL",
86
+ "trigger copy email": "Copy Email",
87
+ "trigger meta add": "Add",
88
+ "trigger meta remove": "Remove",
89
+ "trigger meta prop name placeholder": "New meta property name",
86
90
  "open assistant panel label": "Show Assistant",
87
91
  "assistant panel label": "Assistant"
88
92
  }
89
93
  }
90
94
  }
91
95
  ];
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: {
96
+ var AutomationPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_5VF5JKUN.meta, [
97
+ (0, import_app_framework.defineModule)({
98
+ id: `${import_chunk_5VF5JKUN.meta.id}/module/translations`,
99
+ activatesOn: import_app_framework.Events.SetupTranslations,
100
+ activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.Translations, translations_default)
101
+ }),
102
+ (0, import_app_framework.defineModule)({
103
+ id: `${import_chunk_5VF5JKUN.meta.id}/module/metadata`,
104
+ activatesOn: (0, import_app_framework.oneOf)(import_app_framework.Events.Startup, import_app_framework.Events.SetupAppGraph),
105
+ activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.Metadata, {
106
+ id: import_chunk_JNDMZQH7.ChainType.typename,
97
107
  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 ?? [])
108
+ placeholder: [
109
+ "object placeholder",
110
+ {
111
+ ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
109
112
  }
110
- }
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: [
113
+ ],
114
+ icon: "ph--magic-wand--regular",
115
+ // TODO(wittjosiah): Move out of metadata.
116
+ loadReferences: async (chain) => await import_echo.RefArray.loadAll(chain.prompts ?? [])
117
+ }
118
+ })
119
+ }),
120
+ (0, import_app_framework.defineModule)({
121
+ id: `${import_chunk_5VF5JKUN.meta.id}/module/schema`,
122
+ activatesOn: import_plugin_client.ClientEvents.SetupClient,
123
+ activate: () => (0, import_app_framework.contributes)(import_plugin_client.ClientCapabilities.SystemSchema, [
124
+ import_chunk_JNDMZQH7.ChainType,
125
+ import_chunk_JNDMZQH7.ChainPromptType,
126
+ import_functions.FunctionTrigger
127
+ ])
128
+ }),
129
+ (0, import_app_framework.defineModule)({
130
+ id: `${import_chunk_5VF5JKUN.meta.id}/module/complementary-panels`,
131
+ activatesOn: import_app_framework.Events.Startup,
132
+ activate: () => [
133
+ (0, import_app_framework.contributes)(import_plugin_deck.DeckCapabilities.ComplementaryPanel, {
134
+ id: "automation",
135
+ label: [
136
+ "automation panel label",
125
137
  {
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
- },
138
+ ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
139
+ }
140
+ ],
141
+ icon: "ph--magic-wand--regular"
142
+ }),
143
+ (0, import_app_framework.contributes)(import_plugin_deck.DeckCapabilities.ComplementaryPanel, {
144
+ id: "assistant",
145
+ label: [
146
+ "assistant panel label",
135
147
  {
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"
148
+ ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
144
149
  }
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
- };
150
+ ],
151
+ icon: "ph--atom--regular"
152
+ })
153
+ ]
154
+ }),
155
+ (0, import_app_framework.defineModule)({
156
+ id: `${import_chunk_5VF5JKUN.meta.id}/module/react-surface`,
157
+ activatesOn: import_app_framework.Events.Startup,
158
+ activate: ReactSurface
159
+ }),
160
+ (0, import_app_framework.defineModule)({
161
+ id: `${import_chunk_5VF5JKUN.meta.id}/module/app-graph-builder`,
162
+ activatesOn: import_app_framework.Events.SetupAppGraph,
163
+ activate: AppGraphBuilder
164
+ })
165
+ ]);
312
166
  var str = (...text) => text.filter((value) => value !== void 0 && value !== false).flat().join("\n");
313
167
  var chainPresets = [
314
168
  {
315
169
  id: "dxos.org/prompt/translate",
316
170
  title: "Translate",
317
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
171
+ createPrompt: () => (0, import_live_object.create)(import_chunk_JNDMZQH7.ChainPromptType, {
318
172
  command: "say",
319
173
  template: str(
320
174
  // prettier-ignore
@@ -326,12 +180,12 @@ var chainPresets = [
326
180
  ),
327
181
  inputs: [
328
182
  {
329
- type: import_chunk_NIL4TP6U.ChainInputType.VALUE,
183
+ type: import_chunk_JNDMZQH7.ChainInputType.VALUE,
330
184
  name: "language",
331
185
  value: "japanese"
332
186
  },
333
187
  {
334
- type: import_chunk_NIL4TP6U.ChainInputType.PASS_THROUGH,
188
+ type: import_chunk_JNDMZQH7.ChainInputType.PASS_THROUGH,
335
189
  name: "input"
336
190
  }
337
191
  ]
@@ -340,7 +194,7 @@ var chainPresets = [
340
194
  {
341
195
  id: "dxos.org/prompt/chess",
342
196
  title: "Chess",
343
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
197
+ createPrompt: () => (0, import_live_object.create)(import_chunk_JNDMZQH7.ChainPromptType, {
344
198
  command: "hint",
345
199
  template: str(
346
200
  // prettier-ignore
@@ -352,7 +206,7 @@ var chainPresets = [
352
206
  ),
353
207
  inputs: [
354
208
  {
355
- type: import_chunk_NIL4TP6U.ChainInputType.CONTEXT,
209
+ type: import_chunk_JNDMZQH7.ChainInputType.CONTEXT,
356
210
  name: "history",
357
211
  value: "object.pgn"
358
212
  }
@@ -362,7 +216,7 @@ var chainPresets = [
362
216
  {
363
217
  id: "dxos.org/prompt/mermaid",
364
218
  title: "Mermaid",
365
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
219
+ createPrompt: () => (0, import_live_object.create)(import_chunk_JNDMZQH7.ChainPromptType, {
366
220
  command: "draw",
367
221
  template: str(
368
222
  // prettier-ignore
@@ -375,7 +229,7 @@ var chainPresets = [
375
229
  ),
376
230
  inputs: [
377
231
  {
378
- type: import_chunk_NIL4TP6U.ChainInputType.PASS_THROUGH,
232
+ type: import_chunk_JNDMZQH7.ChainInputType.PASS_THROUGH,
379
233
  name: "input"
380
234
  }
381
235
  ]
@@ -384,7 +238,7 @@ var chainPresets = [
384
238
  {
385
239
  id: "dxos.org/prompt/list",
386
240
  title: "List",
387
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
241
+ createPrompt: () => (0, import_live_object.create)(import_chunk_JNDMZQH7.ChainPromptType, {
388
242
  command: "list",
389
243
  template: str(
390
244
  // prettier-ignore
@@ -401,12 +255,12 @@ var chainPresets = [
401
255
  ),
402
256
  inputs: [
403
257
  {
404
- type: import_chunk_NIL4TP6U.ChainInputType.SCHEMA,
258
+ type: import_chunk_JNDMZQH7.ChainInputType.SCHEMA,
405
259
  name: "schema",
406
260
  value: "example.com/type/project"
407
261
  },
408
262
  {
409
- type: import_chunk_NIL4TP6U.ChainInputType.PASS_THROUGH,
263
+ type: import_chunk_JNDMZQH7.ChainInputType.PASS_THROUGH,
410
264
  name: "question"
411
265
  }
412
266
  ]
@@ -415,7 +269,7 @@ var chainPresets = [
415
269
  {
416
270
  id: "dxos.org/prompt/base",
417
271
  title: "RAG",
418
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
272
+ createPrompt: () => (0, import_live_object.create)(import_chunk_JNDMZQH7.ChainPromptType, {
419
273
  command: "rag",
420
274
  template: str(
421
275
  // prettier-ignore
@@ -430,11 +284,11 @@ var chainPresets = [
430
284
  ),
431
285
  inputs: [
432
286
  {
433
- type: import_chunk_NIL4TP6U.ChainInputType.RETRIEVER,
287
+ type: import_chunk_JNDMZQH7.ChainInputType.RETRIEVER,
434
288
  name: "context"
435
289
  },
436
290
  {
437
- type: import_chunk_NIL4TP6U.ChainInputType.CONTEXT,
291
+ type: import_chunk_JNDMZQH7.ChainInputType.CONTEXT,
438
292
  name: "question",
439
293
  value: "object.text"
440
294
  }
@@ -444,7 +298,7 @@ var chainPresets = [
444
298
  {
445
299
  id: "dxos.org/prompt/lookup",
446
300
  title: "Lookup",
447
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
301
+ createPrompt: () => (0, import_live_object.create)(import_chunk_JNDMZQH7.ChainPromptType, {
448
302
  command: "lookup",
449
303
  template: str(
450
304
  // prettier-ignore
@@ -456,7 +310,7 @@ var chainPresets = [
456
310
  ),
457
311
  inputs: [
458
312
  {
459
- type: import_chunk_NIL4TP6U.ChainInputType.CONTEXT,
313
+ type: import_chunk_JNDMZQH7.ChainInputType.CONTEXT,
460
314
  name: "input",
461
315
  value: "text"
462
316
  }
@@ -466,7 +320,7 @@ var chainPresets = [
466
320
  {
467
321
  id: "dxos.org/prompt/extract",
468
322
  title: "Extract",
469
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
323
+ createPrompt: () => (0, import_live_object.create)(import_chunk_JNDMZQH7.ChainPromptType, {
470
324
  command: "extract",
471
325
  template: str(
472
326
  // prettier-ignore
@@ -484,17 +338,17 @@ var chainPresets = [
484
338
  ),
485
339
  inputs: [
486
340
  {
487
- type: import_chunk_NIL4TP6U.ChainInputType.SCHEMA,
341
+ type: import_chunk_JNDMZQH7.ChainInputType.SCHEMA,
488
342
  name: "contact",
489
343
  value: "example.com/type/contact"
490
344
  },
491
345
  {
492
- type: import_chunk_NIL4TP6U.ChainInputType.SCHEMA,
346
+ type: import_chunk_JNDMZQH7.ChainInputType.SCHEMA,
493
347
  name: "company",
494
348
  value: "example.com/type/organization"
495
349
  },
496
350
  {
497
- type: import_chunk_NIL4TP6U.ChainInputType.CONTEXT,
351
+ type: import_chunk_JNDMZQH7.ChainInputType.CONTEXT,
498
352
  name: "input",
499
353
  value: "text"
500
354
  }
@@ -504,7 +358,7 @@ var chainPresets = [
504
358
  {
505
359
  id: "dxos.org/prompt/discord",
506
360
  title: "Summarize",
507
- createPrompt: () => (0, import_live_object.create)(import_chunk_NIL4TP6U.ChainPromptType, {
361
+ createPrompt: () => (0, import_live_object.create)(import_chunk_JNDMZQH7.ChainPromptType, {
508
362
  command: "summarize",
509
363
  template: str(
510
364
  // prettier-ignore
@@ -516,7 +370,7 @@ var chainPresets = [
516
370
  ),
517
371
  inputs: [
518
372
  {
519
- type: import_chunk_NIL4TP6U.ChainInputType.RESOLVER,
373
+ type: import_chunk_JNDMZQH7.ChainInputType.RESOLVER,
520
374
  name: "context",
521
375
  value: "discord.messages.recent"
522
376
  }
@@ -524,11 +378,10 @@ var chainPresets = [
524
378
  })
525
379
  }
526
380
  ];
527
- var src_default = AutomationPlugin;
528
381
  // Annotate the CommonJS export names for ESM import in node:
529
382
  0 && (module.exports = {
383
+ AUTOMATION_PLUGIN,
530
384
  AssistantPanel,
531
- AutomationAction,
532
385
  AutomationPanel,
533
386
  AutomationPlugin,
534
387
  ChainInputSchema,
@@ -536,6 +389,7 @@ var src_default = AutomationPlugin;
536
389
  ChainPromptType,
537
390
  ChainType,
538
391
  chainPresets,
392
+ meta,
539
393
  str
540
394
  });
541
395
  //# sourceMappingURL=index.cjs.map