@dxos/plugin-automation 0.7.5-main.9cb18ac → 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.
- package/dist/lib/browser/{AssistantPanel-32FH2RA6.mjs → AssistantPanel-N276BTPV.mjs} +2 -2
- package/dist/lib/browser/AutomationPanel-IHZ4JKVS.mjs +232 -0
- package/dist/lib/browser/AutomationPanel-IHZ4JKVS.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-IJTTULDP.mjs +131 -0
- package/dist/lib/browser/app-graph-builder-IJTTULDP.mjs.map +7 -0
- package/dist/lib/browser/chunk-4AIMDHKY.mjs +10 -0
- package/dist/lib/browser/chunk-4AIMDHKY.mjs.map +7 -0
- package/dist/lib/browser/{chunk-DN5M2QL5.mjs → chunk-DL6LB2NI.mjs} +2 -8
- package/dist/lib/browser/{chunk-DN5M2QL5.mjs.map → chunk-DL6LB2NI.mjs.map} +4 -4
- package/dist/lib/browser/{chunk-X5KMOH3I.mjs → chunk-HKX3D3ZP.mjs} +3 -3
- package/dist/lib/browser/chunk-HKX3D3ZP.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +89 -236
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-LL72F3F4.mjs +34 -0
- package/dist/lib/browser/react-surface-LL72F3F4.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -3
- package/dist/lib/node/{AssistantPanel-XANI7YNV.cjs → AssistantPanel-Z4GVHUF3.cjs} +6 -6
- package/dist/lib/node/{AutomationPanel-VADY3HMP.cjs → AutomationPanel-PPODB5XA.cjs} +113 -32
- package/dist/lib/node/AutomationPanel-PPODB5XA.cjs.map +7 -0
- package/dist/lib/node/app-graph-builder-MF5M4QRS.cjs +147 -0
- package/dist/lib/node/app-graph-builder-MF5M4QRS.cjs.map +7 -0
- package/dist/lib/node/chunk-25AQIF3L.cjs +43 -0
- package/dist/lib/node/chunk-25AQIF3L.cjs.map +7 -0
- package/dist/lib/node/{chunk-DTJ7XVO2.cjs → chunk-5VF5JKUN.cjs} +7 -7
- package/dist/lib/node/chunk-5VF5JKUN.cjs.map +7 -0
- package/dist/lib/node/{chunk-NIL4TP6U.cjs → chunk-JNDMZQH7.cjs} +4 -9
- package/dist/lib/node/chunk-JNDMZQH7.cjs.map +7 -0
- package/dist/lib/node/index.cjs +112 -258
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react-surface-DVAU4MGD.cjs +57 -0
- package/dist/lib/node/react-surface-DVAU4MGD.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +5 -7
- package/dist/lib/node/types/index.cjs.map +2 -2
- package/dist/lib/node-esm/{AssistantPanel-5M6O6JV7.mjs → AssistantPanel-DDCQHBJX.mjs} +2 -2
- package/dist/lib/node-esm/AutomationPanel-R3D6CRF5.mjs +233 -0
- package/dist/lib/node-esm/AutomationPanel-R3D6CRF5.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-5N7OK23B.mjs +132 -0
- package/dist/lib/node-esm/app-graph-builder-5N7OK23B.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-GCHXTXVT.mjs → chunk-GIAYUM5I.mjs} +2 -8
- package/dist/lib/node-esm/{chunk-GCHXTXVT.mjs.map → chunk-GIAYUM5I.mjs.map} +4 -4
- package/dist/lib/node-esm/{chunk-HNOBZHWK.mjs → chunk-X3LPRWIL.mjs} +3 -3
- package/dist/lib/node-esm/chunk-X3LPRWIL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XW7TEQA3.mjs +12 -0
- package/dist/lib/node-esm/chunk-XW7TEQA3.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +89 -236
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-4BED2PZ4.mjs +35 -0
- package/dist/lib/node-esm/react-surface-4BED2PZ4.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -3
- package/dist/types/src/AutomationPlugin.d.ts +1 -3
- package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +180 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +179 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +4 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -2
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +7 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +0 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -46
- package/src/AutomationPlugin.tsx +55 -193
- package/src/capabilities/app-graph-builder.ts +127 -0
- package/src/capabilities/index.ts +8 -0
- package/src/capabilities/react-surface.tsx +27 -0
- package/src/components/AutomationPanel/AutomationPanel.tsx +54 -37
- package/src/components/TriggerEditor/TriggerEditor.tsx +63 -6
- package/src/index.ts +1 -4
- package/src/meta.ts +1 -1
- package/src/translations.ts +9 -0
- package/src/types/index.ts +0 -1
- package/dist/lib/browser/AutomationPanel-ABGPG5LE.mjs +0 -151
- package/dist/lib/browser/AutomationPanel-ABGPG5LE.mjs.map +0 -7
- package/dist/lib/browser/chunk-X5KMOH3I.mjs.map +0 -7
- package/dist/lib/browser/meta.mjs +0 -9
- package/dist/lib/browser/meta.mjs.map +0 -7
- package/dist/lib/node/AutomationPanel-VADY3HMP.cjs.map +0 -7
- package/dist/lib/node/chunk-DTJ7XVO2.cjs.map +0 -7
- package/dist/lib/node/chunk-NIL4TP6U.cjs.map +0 -7
- package/dist/lib/node/meta.cjs +0 -30
- package/dist/lib/node/meta.cjs.map +0 -7
- package/dist/lib/node-esm/AutomationPanel-EETYIDPA.mjs +0 -152
- package/dist/lib/node-esm/AutomationPanel-EETYIDPA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HNOBZHWK.mjs.map +0 -7
- package/dist/lib/node-esm/meta.mjs +0 -10
- package/dist/lib/node-esm/meta.mjs.map +0 -7
- package/dist/types/src/types/types.d.ts +0 -7
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/types/types.ts +0 -27
- /package/dist/lib/browser/{AssistantPanel-32FH2RA6.mjs.map → AssistantPanel-N276BTPV.mjs.map} +0 -0
- /package/dist/lib/node/{AssistantPanel-XANI7YNV.cjs.map → AssistantPanel-Z4GVHUF3.cjs.map} +0 -0
- /package/dist/lib/node-esm/{AssistantPanel-5M6O6JV7.mjs.map → AssistantPanel-DDCQHBJX.mjs.map} +0 -0
|
@@ -0,0 +1,147 @@
|
|
|
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 app_graph_builder_MF5M4QRS_exports = {};
|
|
20
|
+
__export(app_graph_builder_MF5M4QRS_exports, {
|
|
21
|
+
default: () => app_graph_builder_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(app_graph_builder_MF5M4QRS_exports);
|
|
24
|
+
var import_chunk_5VF5JKUN = require("./chunk-5VF5JKUN.cjs");
|
|
25
|
+
var import_app_framework = require("@dxos/app-framework");
|
|
26
|
+
var import_plugin_client = require("@dxos/plugin-client");
|
|
27
|
+
var import_plugin_graph = require("@dxos/plugin-graph");
|
|
28
|
+
var import_plugin_space = require("@dxos/plugin-space");
|
|
29
|
+
var import_echo = require("@dxos/react-client/echo");
|
|
30
|
+
var app_graph_builder_default = (context) => {
|
|
31
|
+
const resolve = (typename) => context.requestCapabilities(import_app_framework.Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {};
|
|
32
|
+
return (0, import_app_framework.contributes)(import_app_framework.Capabilities.AppGraphBuilder, [
|
|
33
|
+
(0, import_plugin_graph.createExtension)({
|
|
34
|
+
id: `${import_chunk_5VF5JKUN.AUTOMATION_PLUGIN}/automation-for-subject`,
|
|
35
|
+
resolver: ({ id }) => {
|
|
36
|
+
if (!id.endsWith("~automation")) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const type = "orphan-settings-for-subject";
|
|
40
|
+
const icon = "ph--magic-wand--regular";
|
|
41
|
+
const client = context.requestCapability(import_plugin_client.ClientCapabilities.Client);
|
|
42
|
+
const [subjectId] = id.split("~");
|
|
43
|
+
const { spaceId, objectId } = (0, import_echo.parseId)(subjectId);
|
|
44
|
+
const spaces = (0, import_plugin_graph.toSignal)((onChange) => client.spaces.subscribe(() => onChange()).unsubscribe, () => client.spaces.get());
|
|
45
|
+
const space = spaces?.find((space2) => space2.id === spaceId && space2.state.get() === import_echo.SpaceState.SPACE_READY);
|
|
46
|
+
if (!objectId) {
|
|
47
|
+
const label2 = space ? space.properties.name || [
|
|
48
|
+
"unnamed space label",
|
|
49
|
+
{
|
|
50
|
+
ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
|
|
51
|
+
}
|
|
52
|
+
] : [
|
|
53
|
+
"unnamed object settings label",
|
|
54
|
+
{
|
|
55
|
+
ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
|
|
56
|
+
}
|
|
57
|
+
];
|
|
58
|
+
return {
|
|
59
|
+
id,
|
|
60
|
+
type,
|
|
61
|
+
data: null,
|
|
62
|
+
properties: {
|
|
63
|
+
icon,
|
|
64
|
+
label: label2,
|
|
65
|
+
showResolvedThreads: false,
|
|
66
|
+
object: null,
|
|
67
|
+
space
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
const [object] = (0, import_plugin_space.memoizeQuery)(space, {
|
|
72
|
+
id: objectId
|
|
73
|
+
});
|
|
74
|
+
if (!object || !subjectId) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const meta = resolve((0, import_echo.getTypename)(object) ?? "");
|
|
78
|
+
const label = meta.label?.(object) || object.name || meta.placeholder || [
|
|
79
|
+
"unnamed object settings label",
|
|
80
|
+
{
|
|
81
|
+
ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
|
|
82
|
+
}
|
|
83
|
+
];
|
|
84
|
+
return {
|
|
85
|
+
id,
|
|
86
|
+
type,
|
|
87
|
+
data: null,
|
|
88
|
+
properties: {
|
|
89
|
+
icon,
|
|
90
|
+
label,
|
|
91
|
+
object
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
}),
|
|
96
|
+
(0, import_plugin_graph.createExtension)({
|
|
97
|
+
id: `${import_chunk_5VF5JKUN.AUTOMATION_PLUGIN}/assistant-for-subject`,
|
|
98
|
+
resolver: ({ id }) => {
|
|
99
|
+
if (!id.endsWith("~assistant")) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const client = context.requestCapability(import_plugin_client.ClientCapabilities.Client);
|
|
103
|
+
const [subjectId] = id.split("~");
|
|
104
|
+
const { spaceId, objectId } = (0, import_echo.parseId)(subjectId);
|
|
105
|
+
const spaces = (0, import_plugin_graph.toSignal)((onChange) => client.spaces.subscribe(() => onChange()).unsubscribe, () => client.spaces.get());
|
|
106
|
+
const space = spaces?.find((space2) => space2.id === spaceId && space2.state.get() === import_echo.SpaceState.SPACE_READY);
|
|
107
|
+
if (!objectId) {
|
|
108
|
+
return {
|
|
109
|
+
id,
|
|
110
|
+
type: "orphan-automation-for-subject",
|
|
111
|
+
data: null,
|
|
112
|
+
properties: {
|
|
113
|
+
icon: "ph--atom--regular",
|
|
114
|
+
label: [
|
|
115
|
+
"assistant panel label",
|
|
116
|
+
{
|
|
117
|
+
ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
object: null,
|
|
121
|
+
space
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const [object] = (0, import_plugin_space.memoizeQuery)(space, {
|
|
126
|
+
id: objectId
|
|
127
|
+
});
|
|
128
|
+
return {
|
|
129
|
+
id,
|
|
130
|
+
type: "orphan-automation-for-subject",
|
|
131
|
+
data: null,
|
|
132
|
+
properties: {
|
|
133
|
+
icon: "ph--atom--regular",
|
|
134
|
+
label: [
|
|
135
|
+
"assistant panel label",
|
|
136
|
+
{
|
|
137
|
+
ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
object
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
})
|
|
145
|
+
]);
|
|
146
|
+
};
|
|
147
|
+
//# sourceMappingURL=app-graph-builder-MF5M4QRS.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { createExtension, toSignal } from '@dxos/plugin-graph';\nimport { memoizeQuery } from '@dxos/plugin-space';\nimport { getTypename, parseId, SpaceState } from '@dxos/react-client/echo';\n\nimport { AUTOMATION_PLUGIN } from '../meta';\n\nexport default (context: PluginsContext) => {\n const resolve = (typename: string) =>\n context.requestCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {};\n\n return contributes(Capabilities.AppGraphBuilder, [\n createExtension({\n id: `${AUTOMATION_PLUGIN}/automation-for-subject`,\n resolver: ({ id }) => {\n if (!id.endsWith('~automation')) {\n return;\n }\n\n const type = 'orphan-settings-for-subject';\n const icon = 'ph--magic-wand--regular';\n\n const client = context.requestCapability(ClientCapabilities.Client);\n const [subjectId] = id.split('~');\n const { spaceId, objectId } = parseId(subjectId);\n const spaces = toSignal(\n (onChange) => client.spaces.subscribe(() => onChange()).unsubscribe,\n () => client.spaces.get(),\n );\n const space = spaces?.find((space) => space.id === spaceId && space.state.get() === SpaceState.SPACE_READY);\n if (!objectId) {\n // TODO(burdon): Ref SPACE_PLUGIN ns.\n const label = space\n ? space.properties.name || ['unnamed space label', { ns: AUTOMATION_PLUGIN }]\n : ['unnamed object settings label', { ns: AUTOMATION_PLUGIN }];\n\n // TODO(wittjosiah): Support comments for arbitrary subjects.\n // This is to ensure that the comments panel is not stuck on an old object.\n return {\n id,\n type,\n data: null,\n properties: {\n icon,\n label,\n showResolvedThreads: false,\n object: null,\n space,\n },\n };\n }\n\n const [object] = memoizeQuery(space, { id: objectId });\n if (!object || !subjectId) {\n return;\n }\n\n const meta = resolve(getTypename(object) ?? '');\n const label = meta.label?.(object) ||\n object.name ||\n meta.placeholder || ['unnamed object settings label', { ns: AUTOMATION_PLUGIN }];\n\n return {\n id,\n type,\n data: null,\n properties: {\n icon,\n label,\n object,\n },\n };\n },\n }),\n createExtension({\n id: `${AUTOMATION_PLUGIN}/assistant-for-subject`,\n resolver: ({ id }) => {\n // TODO(Zan): Find util (or make one). Effect schema!!\n if (!id.endsWith('~assistant')) {\n return;\n }\n\n const client = context.requestCapability(ClientCapabilities.Client);\n const [subjectId] = id.split('~');\n const { spaceId, objectId } = parseId(subjectId);\n const spaces = toSignal(\n (onChange) => client.spaces.subscribe(() => onChange()).unsubscribe,\n () => client.spaces.get(),\n );\n const space = spaces?.find((space) => space.id === spaceId && space.state.get() === SpaceState.SPACE_READY);\n if (!objectId) {\n // TODO(wittjosiah): Support assistant for arbitrary subjects.\n // This is to ensure that the assistant panel is not stuck on an old object.\n return {\n id,\n type: 'orphan-automation-for-subject',\n data: null,\n properties: {\n icon: 'ph--atom--regular',\n label: ['assistant panel label', { ns: AUTOMATION_PLUGIN }],\n object: null,\n space,\n },\n };\n }\n\n const [object] = memoizeQuery(space, { id: objectId });\n\n return {\n id,\n type: 'orphan-automation-for-subject',\n data: null,\n properties: {\n icon: 'ph--atom--regular',\n label: ['assistant panel label', { ns: AUTOMATION_PLUGIN }],\n object,\n },\n };\n },\n }),\n ]);\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["context", "resolve", "typename", "requestCapabilities", "Capabilities", "Metadata", "find", "id", "metadata", "contributes", "AppGraphBuilder", "createExtension", "AUTOMATION_PLUGIN", "resolver", "endsWith", "type", "icon", "client", "requestCapability", "ClientCapabilities", "Client", "subjectId", "split", "spaceId", "objectId", "parseId", "spaces", "toSignal", "onChange", "subscribe", "unsubscribe", "get", "space", "state", "SpaceState", "SPACE_READY", "label", "properties", "name", "ns", "data", "showResolvedThreads", "object", "memoizeQuery", "meta", "getTypename", "placeholder"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
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
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var chunk_25AQIF3L_exports = {};
|
|
30
|
+
__export(chunk_25AQIF3L_exports, {
|
|
31
|
+
AssistantPanel: () => AssistantPanel,
|
|
32
|
+
AutomationPanel: () => AutomationPanel
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(chunk_25AQIF3L_exports);
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
var AssistantPanel = (0, import_react.lazy)(() => import("./AssistantPanel-Z4GVHUF3.cjs"));
|
|
37
|
+
var AutomationPanel = (0, import_react.lazy)(() => import("./AutomationPanel-PPODB5XA.cjs"));
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
AssistantPanel,
|
|
41
|
+
AutomationPanel
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=chunk-25AQIF3L.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const AssistantPanel = lazy(() => import('./AssistantPanel'));\nexport const AutomationPanel = lazy(() => import('./AutomationPanel'));\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAqB;AAEd,IAAMA,qBAAiBC,mBAAK,MAAM,OAAO,+BAAA,CAAA;AACzC,IAAMC,sBAAkBD,mBAAK,MAAM,OAAO,gCAAA,CAAA;",
|
|
6
|
+
"names": ["AssistantPanel", "lazy", "AutomationPanel"]
|
|
7
|
+
}
|
|
@@ -16,14 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_5VF5JKUN_exports = {};
|
|
20
|
+
__export(chunk_5VF5JKUN_exports, {
|
|
21
21
|
AUTOMATION_PLUGIN: () => AUTOMATION_PLUGIN,
|
|
22
|
-
|
|
22
|
+
meta: () => meta
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_5VF5JKUN_exports);
|
|
25
25
|
var AUTOMATION_PLUGIN = "dxos.org/plugin/automation";
|
|
26
|
-
var
|
|
26
|
+
var meta = {
|
|
27
27
|
id: AUTOMATION_PLUGIN,
|
|
28
28
|
name: "Automation",
|
|
29
29
|
description: "Automation workflows.",
|
|
@@ -36,6 +36,6 @@ var meta_default = {
|
|
|
36
36
|
// Annotate the CommonJS export names for ESM import in node:
|
|
37
37
|
0 && (module.exports = {
|
|
38
38
|
AUTOMATION_PLUGIN,
|
|
39
|
-
|
|
39
|
+
meta
|
|
40
40
|
});
|
|
41
|
-
//# sourceMappingURL=chunk-
|
|
41
|
+
//# sourceMappingURL=chunk-5VF5JKUN.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const AUTOMATION_PLUGIN = 'dxos.org/plugin/automation';\n\nexport const meta = {\n id: AUTOMATION_PLUGIN,\n name: 'Automation',\n description: 'Automation workflows.',\n icon: 'ph--magic-wand--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-automation',\n tags: ['experimental'],\n} satisfies PluginMeta;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAMA,oBAAoB;AAE1B,IAAMC,OAAO;EAClBC,IAAIF;EACJG,MAAM;EACNC,aAAa;EACbC,MAAM;EACNC,QAAQ;EACRC,MAAM;IAAC;;AACT;",
|
|
6
|
+
"names": ["AUTOMATION_PLUGIN", "meta", "id", "name", "description", "icon", "source", "tags"]
|
|
7
|
+
}
|
|
@@ -16,15 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
21
|
-
AutomationAction: () => AutomationAction,
|
|
19
|
+
var chunk_JNDMZQH7_exports = {};
|
|
20
|
+
__export(chunk_JNDMZQH7_exports, {
|
|
22
21
|
ChainInputSchema: () => ChainInputSchema,
|
|
23
22
|
ChainInputType: () => ChainInputType,
|
|
24
23
|
ChainPromptType: () => ChainPromptType,
|
|
25
24
|
ChainType: () => ChainType
|
|
26
25
|
});
|
|
27
|
-
module.exports = __toCommonJS(
|
|
26
|
+
module.exports = __toCommonJS(chunk_JNDMZQH7_exports);
|
|
28
27
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
29
28
|
var ChainInputType;
|
|
30
29
|
(function(ChainInputType2) {
|
|
@@ -59,15 +58,11 @@ var ChainType = class extends (0, import_echo_schema.TypedObject)({
|
|
|
59
58
|
prompts: import_echo_schema.S.optional(import_echo_schema.S.mutable(import_echo_schema.S.Array((0, import_echo_schema.Ref)(ChainPromptType))))
|
|
60
59
|
}) {
|
|
61
60
|
};
|
|
62
|
-
var AutomationAction;
|
|
63
|
-
/* @__PURE__ */ (function(AutomationAction2) {
|
|
64
|
-
})(AutomationAction || (AutomationAction = {}));
|
|
65
61
|
// Annotate the CommonJS export names for ESM import in node:
|
|
66
62
|
0 && (module.exports = {
|
|
67
|
-
AutomationAction,
|
|
68
63
|
ChainInputSchema,
|
|
69
64
|
ChainInputType,
|
|
70
65
|
ChainPromptType,
|
|
71
66
|
ChainType
|
|
72
67
|
});
|
|
73
|
-
//# sourceMappingURL=chunk-
|
|
68
|
+
//# sourceMappingURL=chunk-JNDMZQH7.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/schema.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Ref, S, TypedObject } from '@dxos/echo-schema';\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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,yBAAoC;;UAGxBA,iBAAAA;;;;;;;;;GAAAA,mBAAAA,iBAAAA,CAAAA,EAAAA;AAWL,IAAMC,mBAAmBC,qBAAEC,QAChCD,qBAAEE,OAAO;EACPC,MAAMH,qBAAEI;EACRC,MAAML,qBAAEM,SAASN,qBAAEO,MAAMT,cAAAA,CAAAA;EACzBU,OAAOR,qBAAEM,SAASN,qBAAEI,MAAM;AAC5B,CAAA,CAAA;AAKK,IAAMK,kBAAN,kBAA8BC,gCAAY;EAAEC,UAAU;EAA6BC,SAAS;AAAQ,CAAA,EAAG;EAC5GC,SAASb,qBAAEM,SAASN,qBAAEI,MAAM;EAC5BU,UAAUd,qBAAEI;EACZW,QAAQf,qBAAEM,SAASN,qBAAEC,QAAQD,qBAAEgB,MAAMjB,gBAAAA,CAAAA,CAAAA;AACvC,CAAA,EAAA;AAAI;AAEG,IAAMkB,YAAN,kBAAwBP,gCAAY;EAAEC,UAAU;EAAuBC,SAAS;AAAQ,CAAA,EAAG;EAChGT,MAAMH,qBAAEM,SAASN,qBAAEI,MAAM;EACzBc,SAASlB,qBAAEM,SAASN,qBAAEC,QAAQD,qBAAEgB,UAAMG,wBAAIV,eAAAA,CAAAA,CAAAA,CAAAA;AAC5C,CAAA,EAAA;AAAI;",
|
|
6
|
+
"names": ["ChainInputType", "ChainInputSchema", "S", "mutable", "Struct", "name", "String", "type", "optional", "Enums", "value", "ChainPromptType", "TypedObject", "typename", "version", "command", "template", "inputs", "Array", "ChainType", "prompts", "Ref"]
|
|
7
|
+
}
|