@dxos/plugin-automation 0.7.5-labs.e27f9b9 → 0.7.5-labs.f400bbc
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/AutomationPanel-ITYXSN5Z.mjs +132 -0
- package/dist/lib/browser/AutomationPanel-ITYXSN5Z.mjs.map +7 -0
- package/dist/lib/browser/{chunk-HKX3D3ZP.mjs → chunk-OFDNNRLE.mjs} +4 -7
- package/dist/lib/browser/{chunk-HKX3D3ZP.mjs.map → chunk-OFDNNRLE.mjs.map} +3 -3
- package/dist/lib/browser/chunk-U7QLNY2S.mjs +8 -0
- package/dist/lib/browser/chunk-U7QLNY2S.mjs.map +7 -0
- package/dist/lib/browser/chunk-WY2C7JY4.mjs +119 -0
- package/dist/lib/browser/chunk-WY2C7JY4.mjs.map +7 -0
- package/dist/lib/browser/complementary-panel-4CPOJL4Y.mjs +56 -0
- package/dist/lib/browser/complementary-panel-4CPOJL4Y.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +22 -372
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-SAPMN4PF.mjs +27 -0
- package/dist/lib/browser/react-surface-SAPMN4PF.mjs.map +7 -0
- package/dist/lib/node/{chunk-WWU5FVAO.cjs → AutomationPanel-X33HHDMQ.cjs} +19 -131
- package/dist/lib/node/AutomationPanel-X33HHDMQ.cjs.map +7 -0
- package/dist/lib/node/chunk-7Q5SNGCL.cjs +148 -0
- package/dist/lib/node/chunk-7Q5SNGCL.cjs.map +7 -0
- package/dist/lib/node/chunk-CB5OB6JH.cjs +40 -0
- package/dist/lib/node/chunk-CB5OB6JH.cjs.map +7 -0
- package/dist/lib/node/{chunk-5VF5JKUN.cjs → chunk-ORMEYEBE.cjs} +7 -10
- package/dist/lib/node/{chunk-5VF5JKUN.cjs.map → chunk-ORMEYEBE.cjs.map} +3 -3
- package/dist/lib/node/complementary-panel-ZYJJ42ZU.cjs +72 -0
- package/dist/lib/node/complementary-panel-ZYJJ42ZU.cjs.map +7 -0
- package/dist/lib/node/index.cjs +37 -373
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-5HYLBDC3.cjs → react-surface-2WRVAPGR.cjs} +9 -28
- package/dist/lib/node/react-surface-2WRVAPGR.cjs.map +7 -0
- package/dist/lib/node-esm/AutomationPanel-HY3GB4BT.mjs +133 -0
- package/dist/lib/node-esm/AutomationPanel-HY3GB4BT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-X3LPRWIL.mjs → chunk-6MUUH67V.mjs} +4 -7
- package/dist/lib/node-esm/{chunk-X3LPRWIL.mjs.map → chunk-6MUUH67V.mjs.map} +3 -3
- package/dist/lib/node-esm/chunk-R3P2WPBQ.mjs +10 -0
- package/dist/lib/node-esm/chunk-R3P2WPBQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-UDD2VA6G.mjs +120 -0
- package/dist/lib/node-esm/chunk-UDD2VA6G.mjs.map +7 -0
- package/dist/lib/node-esm/complementary-panel-S42RIIAY.mjs +57 -0
- package/dist/lib/node-esm/complementary-panel-S42RIIAY.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +22 -372
- 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-SS5WCRJ2.mjs → react-surface-QWLPOYXO.mjs} +5 -28
- package/dist/lib/node-esm/react-surface-QWLPOYXO.mjs.map +7 -0
- package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/{ai-client.d.ts → complementary-panel.d.ts} +2 -3
- package/dist/types/src/capabilities/complementary-panel.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +1 -180
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -2
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.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/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -11
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/{testing.d.ts → test-functions.d.ts} +1 -3
- package/dist/types/src/testing/test-functions.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -92
- package/dist/types/src/translations.d.ts.map +1 -1
- package/package.json +23 -71
- package/src/AutomationPlugin.tsx +9 -64
- package/src/capabilities/complementary-panel.ts +56 -0
- package/src/capabilities/index.ts +1 -5
- package/src/capabilities/react-surface.tsx +1 -13
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +1 -2
- package/src/components/AutomationPanel/AutomationPanel.tsx +56 -49
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +1 -2
- package/src/components/TriggerEditor/TriggerEditor.tsx +8 -5
- package/src/components/index.ts +0 -7
- package/src/index.ts +2 -3
- package/src/meta.ts +3 -3
- package/src/testing/index.ts +1 -1
- package/src/testing/{testing.ts → test-functions.ts} +0 -7
- package/src/translations.ts +2 -29
- package/dist/lib/browser/AutomationPanel-WFJZAW4F.mjs +0 -8
- package/dist/lib/browser/AutomationPanel-WFJZAW4F.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-OFCOZ5T2.mjs +0 -12
- package/dist/lib/browser/ChatContainer-OFCOZ5T2.mjs.map +0 -7
- package/dist/lib/browser/ai-client-AARXEMMJ.mjs +0 -22
- package/dist/lib/browser/ai-client-AARXEMMJ.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-B4U34VSR.mjs +0 -162
- package/dist/lib/browser/app-graph-builder-B4U34VSR.mjs.map +0 -7
- package/dist/lib/browser/chunk-5SLV6AUA.mjs +0 -1367
- package/dist/lib/browser/chunk-5SLV6AUA.mjs.map +0 -7
- package/dist/lib/browser/chunk-7XADMUOW.mjs +0 -205
- package/dist/lib/browser/chunk-7XADMUOW.mjs.map +0 -7
- package/dist/lib/browser/chunk-HZ4TA7HY.mjs +0 -15
- package/dist/lib/browser/chunk-HZ4TA7HY.mjs.map +0 -7
- package/dist/lib/browser/chunk-IYSMXX6Q.mjs +0 -283
- package/dist/lib/browser/chunk-IYSMXX6Q.mjs.map +0 -7
- package/dist/lib/browser/chunk-RAVNWHNE.mjs +0 -242
- package/dist/lib/browser/chunk-RAVNWHNE.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-754MPV7H.mjs +0 -29
- package/dist/lib/browser/intent-resolver-754MPV7H.mjs.map +0 -7
- package/dist/lib/browser/react-surface-4QZ6AKBF.mjs +0 -50
- package/dist/lib/browser/react-surface-4QZ6AKBF.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -24
- package/dist/lib/browser/types/index.mjs.map +0 -7
- package/dist/lib/node/AutomationPanel-LRDEDGXI.cjs +0 -26
- package/dist/lib/node/AutomationPanel-LRDEDGXI.cjs.map +0 -7
- package/dist/lib/node/ChatContainer-6LZX4K2Z.cjs +0 -33
- package/dist/lib/node/ChatContainer-6LZX4K2Z.cjs.map +0 -7
- package/dist/lib/node/ai-client-SA35GN5Q.cjs +0 -38
- package/dist/lib/node/ai-client-SA35GN5Q.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-ENVDOPS4.cjs +0 -178
- package/dist/lib/node/app-graph-builder-ENVDOPS4.cjs.map +0 -7
- package/dist/lib/node/chunk-6VMSH4P6.cjs +0 -1364
- package/dist/lib/node/chunk-6VMSH4P6.cjs.map +0 -7
- package/dist/lib/node/chunk-HEYQONXC.cjs +0 -302
- package/dist/lib/node/chunk-HEYQONXC.cjs.map +0 -7
- package/dist/lib/node/chunk-LU4HQWJD.cjs +0 -226
- package/dist/lib/node/chunk-LU4HQWJD.cjs.map +0 -7
- package/dist/lib/node/chunk-WWU5FVAO.cjs.map +0 -7
- package/dist/lib/node/chunk-ZS5RZ7RM.cjs +0 -34
- package/dist/lib/node/chunk-ZS5RZ7RM.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-CNVBSG4E.cjs +0 -44
- package/dist/lib/node/intent-resolver-CNVBSG4E.cjs.map +0 -7
- package/dist/lib/node/react-surface-5HYLBDC3.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -46
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/AutomationPanel-ZV7VEEPP.mjs +0 -9
- package/dist/lib/node-esm/AutomationPanel-ZV7VEEPP.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-PPVMC2FC.mjs +0 -13
- package/dist/lib/node-esm/ChatContainer-PPVMC2FC.mjs.map +0 -7
- package/dist/lib/node-esm/ai-client-2ZA4TYFZ.mjs +0 -23
- package/dist/lib/node-esm/ai-client-2ZA4TYFZ.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-IYOUCQZT.mjs +0 -163
- package/dist/lib/node-esm/app-graph-builder-IYOUCQZT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3KB5HRXA.mjs +0 -284
- package/dist/lib/node-esm/chunk-3KB5HRXA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-EVTLHDM2.mjs +0 -206
- package/dist/lib/node-esm/chunk-EVTLHDM2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ISYLEDVU.mjs +0 -16
- package/dist/lib/node-esm/chunk-ISYLEDVU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MS7OIGVR.mjs +0 -243
- package/dist/lib/node-esm/chunk-MS7OIGVR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WISKXX7U.mjs +0 -1368
- package/dist/lib/node-esm/chunk-WISKXX7U.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-RQBXW442.mjs +0 -30
- package/dist/lib/node-esm/intent-resolver-RQBXW442.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-SS5WCRJ2.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -25
- package/dist/lib/node-esm/types/index.mjs.map +0 -7
- package/dist/types/src/artifacts.stories.d.ts +0 -16
- package/dist/types/src/artifacts.stories.d.ts.map +0 -1
- package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -180
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -5
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer/ChatContainer.d.ts +0 -8
- package/dist/types/src/components/ChatContainer/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer/index.d.ts +0 -4
- package/dist/types/src/components/ChatContainer/index.d.ts.map +0 -1
- package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts +0 -14
- package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts.map +0 -1
- package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts +0 -8
- package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts.map +0 -1
- package/dist/types/src/components/MarkdownViewer/index.d.ts +0 -2
- package/dist/types/src/components/MarkdownViewer/index.d.ts.map +0 -1
- package/dist/types/src/components/PromptEditor/PromptEditor.d.ts +0 -10
- package/dist/types/src/components/PromptEditor/PromptEditor.d.ts.map +0 -1
- package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts +0 -6
- package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/PromptEditor/index.d.ts +0 -2
- package/dist/types/src/components/PromptEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/PromptEditor/prompt-extension.d.ts +0 -4
- package/dist/types/src/components/PromptEditor/prompt-extension.d.ts.map +0 -1
- package/dist/types/src/components/PromptEditor/types.d.ts +0 -18
- package/dist/types/src/components/PromptEditor/types.d.ts.map +0 -1
- package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts +0 -6
- package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts.map +0 -1
- package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts +0 -8
- package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts.map +0 -1
- package/dist/types/src/components/ServiceRegistry/index.d.ts +0 -2
- package/dist/types/src/components/ServiceRegistry/index.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ScrollContainer.d.ts +0 -15
- package/dist/types/src/components/Thread/ScrollContainer.d.ts.map +0 -1
- package/dist/types/src/components/Thread/StatusLine.d.ts +0 -11
- package/dist/types/src/components/Thread/StatusLine.d.ts.map +0 -1
- package/dist/types/src/components/Thread/StatusLine.stories.d.ts +0 -9
- package/dist/types/src/components/Thread/StatusLine.stories.d.ts.map +0 -1
- package/dist/types/src/components/Thread/Tabbed.d.ts +0 -9
- package/dist/types/src/components/Thread/Tabbed.d.ts.map +0 -1
- package/dist/types/src/components/Thread/Tabbed.stories.d.ts +0 -8
- package/dist/types/src/components/Thread/Tabbed.stories.d.ts.map +0 -1
- package/dist/types/src/components/Thread/Thread.d.ts +0 -11
- package/dist/types/src/components/Thread/Thread.d.ts.map +0 -1
- package/dist/types/src/components/Thread/Thread.stories.d.ts +0 -10
- package/dist/types/src/components/Thread/Thread.stories.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ThreadMessage.d.ts +0 -12
- package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ToggleContainer.d.ts +0 -13
- package/dist/types/src/components/Thread/ToggleContainer.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ToggleContainer.stories.d.ts +0 -9
- package/dist/types/src/components/Thread/ToggleContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/Thread/index.d.ts +0 -2
- package/dist/types/src/components/Thread/index.d.ts.map +0 -1
- package/dist/types/src/hooks/email.d.ts +0 -4
- package/dist/types/src/hooks/email.d.ts.map +0 -1
- package/dist/types/src/hooks/index.d.ts +0 -4
- package/dist/types/src/hooks/index.d.ts.map +0 -1
- package/dist/types/src/hooks/invocation-handler.d.ts +0 -5
- package/dist/types/src/hooks/invocation-handler.d.ts.map +0 -1
- package/dist/types/src/hooks/processor.d.ts +0 -65
- package/dist/types/src/hooks/processor.d.ts.map +0 -1
- package/dist/types/src/hooks/processor.test.d.ts +0 -2
- package/dist/types/src/hooks/processor.test.d.ts.map +0 -1
- package/dist/types/src/hooks/useLocalTriggerManager.d.ts +0 -3
- package/dist/types/src/hooks/useLocalTriggerManager.d.ts.map +0 -1
- package/dist/types/src/hooks/useServiceRegistry.d.ts +0 -3
- package/dist/types/src/hooks/useServiceRegistry.d.ts.map +0 -1
- package/dist/types/src/presets.d.ts +0 -9
- package/dist/types/src/presets.d.ts.map +0 -1
- package/dist/types/src/testing/testing.d.ts.map +0 -1
- package/dist/types/src/tools/function.d.ts +0 -5
- package/dist/types/src/tools/function.d.ts.map +0 -1
- package/dist/types/src/tools/index.d.ts +0 -3
- package/dist/types/src/tools/index.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.d.ts +0 -10
- package/dist/types/src/tools/openapi.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.test.d.ts +0 -2
- package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
- package/dist/types/src/types/index.d.ts +0 -4
- package/dist/types/src/types/index.d.ts.map +0 -1
- package/dist/types/src/types/registry.d.ts +0 -9
- package/dist/types/src/types/registry.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -196
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/dist/types/src/types/types.d.ts +0 -18
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/artifacts.stories.tsx +0 -241
- package/src/capabilities/ai-client.ts +0 -19
- package/src/capabilities/app-graph-builder.ts +0 -156
- package/src/capabilities/capabilities.ts +0 -12
- package/src/capabilities/intent-resolver.ts +0 -27
- package/src/components/ChatContainer/ChatContainer.tsx +0 -117
- package/src/components/ChatContainer/index.ts +0 -8
- package/src/components/MarkdownViewer/MarkdownViewer.stories.tsx +0 -56
- package/src/components/MarkdownViewer/MarkdownViewer.tsx +0 -79
- package/src/components/MarkdownViewer/index.ts +0 -5
- package/src/components/PromptEditor/PromptEditor.stories.tsx +0 -64
- package/src/components/PromptEditor/PromptEditor.tsx +0 -222
- package/src/components/PromptEditor/index.ts +0 -5
- package/src/components/PromptEditor/prompt-extension.ts +0 -43
- package/src/components/PromptEditor/types.tsx +0 -28
- package/src/components/ServiceRegistry/ServiceRegistry.stories.tsx +0 -48
- package/src/components/ServiceRegistry/ServiceRegistry.tsx +0 -75
- package/src/components/ServiceRegistry/index.ts +0 -5
- package/src/components/Thread/ScrollContainer.tsx +0 -92
- package/src/components/Thread/StatusLine.stories.tsx +0 -52
- package/src/components/Thread/StatusLine.tsx +0 -76
- package/src/components/Thread/Tabbed.stories.tsx +0 -52
- package/src/components/Thread/Tabbed.tsx +0 -72
- package/src/components/Thread/Thread.stories.tsx +0 -190
- package/src/components/Thread/Thread.tsx +0 -156
- package/src/components/Thread/ThreadMessage.tsx +0 -195
- package/src/components/Thread/ToggleContainer.stories.tsx +0 -111
- package/src/components/Thread/ToggleContainer.tsx +0 -103
- package/src/components/Thread/index.ts +0 -5
- package/src/hooks/email.ts +0 -49
- package/src/hooks/index.ts +0 -8
- package/src/hooks/invocation-handler.ts +0 -109
- package/src/hooks/processor.test.ts +0 -15
- package/src/hooks/processor.ts +0 -201
- package/src/hooks/useLocalTriggerManager.ts +0 -82
- package/src/hooks/useServiceRegistry.ts +0 -22
- package/src/presets.ts +0 -248
- package/src/tools/function.ts +0 -47
- package/src/tools/index.ts +0 -6
- package/src/tools/openapi.test.ts +0 -227
- package/src/tools/openapi.ts +0 -331
- package/src/types/index.ts +0 -7
- package/src/types/registry.ts +0 -89
- package/src/types/schema.ts +0 -120
- package/src/types/types.ts +0 -21
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var chunk_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
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/registry.ts", "../../../src/types/schema.ts", "../../../src/types/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { 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,MAAM;AAC5B,CAAA,CAAA;AAKK,IAAMK,kBAAN,kBAA8BC,iCAAY;EAAEC,UAAU;EAA6BC,SAAS;AAAQ,CAAA,EAAG;EAC5GC,SAASb,sBAAEM,SAASN,sBAAEI,MAAM;EAC5BU,UAAUd,sBAAEI;EACZW,QAAQf,sBAAEM,SAASN,sBAAEC,QAAQD,sBAAEgB,MAAMjB,gBAAAA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J,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
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/AutomationPanel/AutomationPanel.tsx", "../../../src/components/TriggerEditor/TriggerEditor.tsx", "../../../src/components/AutomationPanel/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { S } from '@dxos/echo-schema';\nimport {\n FunctionType,\n FunctionTrigger,\n FunctionTriggerSchema,\n TriggerKind,\n type FunctionTriggerType,\n ScriptType,\n} from '@dxos/functions';\nimport { type Client, useClient } from '@dxos/react-client';\nimport { create, Filter, useQuery, type Space, type ReactiveObject, getSpace } from '@dxos/react-client/echo';\nimport { IconButton, Input, useTranslation, Button } from '@dxos/react-ui';\nimport { List } from '@dxos/react-ui-list';\nimport { ghostHover, mx } from '@dxos/react-ui-theme';\n\nimport { AUTOMATION_PLUGIN } from '../../meta';\nimport { TriggerEditor, type TriggerEditorProps } from '../TriggerEditor';\n\nconst grid = 'grid grid-cols-[40px_1fr_32px] min-bs-[2.5rem]';\n\nexport type AutomationPanelProps = {\n space: Space;\n object?: ReactiveObject<any>;\n};\n\n// TODO(burdon): Factor out common layout with ViewEditor.\nexport const AutomationPanel = ({ space, object }: AutomationPanelProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n const client = useClient();\n const triggers = useQuery(space, Filter.schema(FunctionTrigger));\n const functions = useQuery(space, Filter.schema(FunctionType));\n const scripts = useQuery(space, Filter.schema(ScriptType));\n\n const [trigger, setTrigger] = useState<FunctionTriggerType>();\n const [selected, setSelected] = useState<FunctionTrigger>();\n\n const handleSelect = (trigger: FunctionTrigger) => {\n const { id: _, ...values } = trigger;\n setTrigger(values);\n setSelected(trigger);\n };\n\n const handleAdd = () => {\n setTrigger(create(FunctionTriggerSchema, { meta: {} }));\n setSelected(undefined);\n };\n\n const handleDelete = (trigger: FunctionTrigger) => {\n space.db.remove(trigger);\n setTrigger(undefined);\n setSelected(undefined);\n };\n\n const handleSave: TriggerEditorProps['onSave'] = (trigger) => {\n if (selected) {\n Object.assign(selected, trigger);\n } else {\n space.db.add(create(FunctionTrigger, trigger));\n }\n\n setTrigger(undefined);\n setSelected(undefined);\n };\n\n const handleCancel: TriggerEditorProps['onCancel'] = () => {\n setTrigger(undefined);\n };\n\n return (\n <div className='flex flex-col w-full divide-y divide-separator overflow-y-auto'>\n <List.Root<FunctionTrigger> items={triggers} isItem={S.is(FunctionTrigger)} getId={(field) => field.id}>\n {({ items: triggers }) => (\n <div role='list' className='flex flex-col w-full'>\n {triggers?.map((trigger) => {\n const copyAction = getCopyAction(client, trigger);\n return (\n <List.Item<FunctionTrigger>\n key={trigger.id}\n item={trigger}\n classNames={mx(grid, ghostHover, 'items-center', 'px-2')}\n >\n <Input.Root>\n <Input.Switch\n checked={trigger.enabled}\n onCheckedChange={(checked) => (trigger.enabled = checked)}\n />\n </Input.Root>\n\n <div className={'flex'}>\n <List.ItemTitle\n classNames='px-1 cursor-pointer w-0 shrink truncate'\n onClick={() => handleSelect(trigger)}\n >\n {getFunctionName(scripts, functions, trigger) ?? '∅'}\n </List.ItemTitle>\n\n {/* TODO: a better way to expose copy action */}\n {copyAction && (\n <Button onClick={() => navigator.clipboard.writeText(copyAction.contentProvider())}>\n {t(copyAction.translationKey)}\n </Button>\n )}\n </div>\n\n <List.ItemDeleteButton onClick={() => handleDelete(trigger)} />\n </List.Item>\n );\n })}\n </div>\n )}\n </List.Root>\n\n {trigger && <TriggerEditor space={space} trigger={trigger} onSave={handleSave} onCancel={handleCancel} />}\n\n {!trigger && (\n <div className='flex p-2 justify-center'>\n <IconButton icon='ph--plus--regular' label={t('new trigger')} onClick={handleAdd} />\n </div>\n )}\n </div>\n );\n};\n\nconst getCopyAction = (client: Client, trigger: FunctionTrigger | undefined) => {\n if (trigger?.spec?.type === TriggerKind.Email) {\n return { translationKey: 'trigger copy email', contentProvider: () => `${getSpace(trigger)!.id}@dxos.network` };\n }\n\n if (trigger?.spec?.type === TriggerKind.Webhook) {\n return { translationKey: 'trigger copy url', contentProvider: () => getWebhookUrl(client, trigger) };\n }\n\n return undefined;\n};\n\nconst getWebhookUrl = (client: Client, trigger: FunctionTrigger) => {\n const spaceId = getSpace(trigger)!.id;\n const edgeUrl = new URL(client.config.values.runtime!.services!.edge!.url!);\n const isSecure = edgeUrl.protocol.startsWith('https') || edgeUrl.protocol.startsWith('wss');\n edgeUrl.protocol = isSecure ? 'https' : 'http';\n return new URL(`/webhook/${spaceId}:${trigger.id}`, edgeUrl).toString();\n};\n\nconst getFunctionName = (scripts: ScriptType[], functions: FunctionType[], trigger: FunctionTriggerType) => {\n const shortId = trigger.function && `${trigger.function?.slice(0, 16)}…`;\n const functionObject = functions.find((fn) => fn.name === trigger.function);\n if (!functionObject) {\n return shortId;\n }\n return scripts.find((s) => functionObject.source?.target?.id === s.id)?.name ?? shortId;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { 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,IAAMC,gBAAgB,CAAC,EAAEC,OAAOC,SAASC,QAAQC,SAAQ,MAAsB;AACpF,QAAM,EAAEC,EAAC,QAAKC,iCAAeC,uCAAAA;AAE7B,QAAMC,gBAAYC,uBAASR,OAAOS,oBAAOC,OAAOC,8BAAAA,CAAAA;AAChD,QAAMC,gBAAYJ,uBAASR,OAAOS,oBAAOC,OAAOG,6BAAAA,CAAAA;AAChD,QAAMC,cAAUN,uBAASR,OAAOS,oBAAOC,OAAOK,4BAAAA,CAAAA;AAE9C,QAAMC,aAAa,CAACC,WAAAA;AAClBf,aAASe,MAAAA;EACX;AAEA,SACE,8BAAAC,QAAA,cAACC,2BAAAA;IACCT,QAAQU;IACRH,QAAQhB;IACRC,QAAQc;IACRb;IACAkB,QAAQ;MACN,CAAC,UAAA,GAAiD,CAACC,UACjD,8BAAAJ,QAAA,cAACK,kCAAAA;QACE,GAAGD;QACJE,SAASC,mBAAmBb,SAAAA,EAAWc,OAAOC,mBAAmBb,SAASP,SAAAA,CAAAA;;MAG9E,CAAC,WAAA,GAAuB,CAACe,UACvB,8BAAAJ,QAAA,cAACK,kCAAAA;QACE,GAAGD;QACJ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MAAIA,SAASsH,MAAMvE,SAASnB,iBAAAA,YAAY2F,OAAO;AAC7C,WAAO;MAAEH,gBAAgB;MAAsBD,iBAAiB,MAAM,OAAGK,sBAASxH,OAAAA,EAAUgE,EAAE;IAAgB;EAChH;AAEA,MAAIhE,SAASsH,MAAMvE,SAASnB,iBAAAA,YAAY6F,SAAS;AAC/C,WAAO;MAAEL,gBAAgB;MAAoBD,iBAAiB,MAAMO,cAAchD,QAAQ1E,OAAAA;IAAS;EACrG;AAEA,SAAOqF;AACT;AAEA,IAAMqC,gBAAgB,CAAChD,QAAgB1E,YAAAA;AACrC,QAAM2H,cAAUH,sBAASxH,OAAAA,EAAUgE;AACnC,QAAM4D,UAAU,IAAIC,IAAInD,OAAOoD,OAAO9G,OAAO+G,QAASC,SAAUC,KAAMC,GAAG;AACzE,QAAMC,WAAWP,QAAQQ,SAASC,WAAW,OAAA,KAAYT,QAAQQ,SAASC,WAAW,KAAA;AACrFT,UAAQQ,WAAWD,WAAW,UAAU;AACxC,SAAO,IAAIN,IAAI,YAAYF,OAAAA,IAAW3H,QAAQgE,EAAE,IAAI4D,OAAAA,EAASU,SAAQ;AACvE;AAEA,IAAMxB,kBAAkB,CAACjG,SAAuBP,WAA2BN,YAAAA;AACzE,QAAMuI,UAAUvI,QAAQwI,YAAY,GAAGxI,QAAQwI,UAAUC,MAAM,GAAG,EAAA,CAAA;AAClE,QAAMC,iBAAiBpI,UAAU6D,KAAK,CAACD,OAAOA,GAAGI,SAAStE,QAAQwI,QAAQ;AAC1E,MAAI,CAACE,gBAAgB;AACnB,WAAOH;EACT;AACA,SAAO1H,QAAQsD,KAAK,CAACC,MAAMsE,eAAerE,QAAQV,QAAQK,OAAOI,EAAEJ,EAAE,GAAGM,QAAQiE;AAClF;AEtJA,IAAA,0BAAe/D;",
|
|
6
|
-
"names": ["import_react", "import_functions", "import_echo", "import_react_ui", "TriggerEditor", "space", "trigger", "onSave", "onCancel", "t", "useTranslation", "AUTOMATION_PLUGIN", "functions", "useQuery", "Filter", "schema", "FunctionType", "workflows", "ComputeGraph", "scripts", "ScriptType", "handleSave", "values", "React", "Form", "FunctionTriggerSchema", "Custom", "props", "SelectInput", "options", "getWorkflowOptions", "concat", "getFunctionOptions", "Object", "TriggerKind", "map", "kind", "value", "label", "meta", "getValue", "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
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var chunk_ZS5RZ7RM_exports = {};
|
|
20
|
-
__export(chunk_ZS5RZ7RM_exports, {
|
|
21
|
-
AutomationCapabilities: () => AutomationCapabilities
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(chunk_ZS5RZ7RM_exports);
|
|
24
|
-
var import_chunk_5VF5JKUN = require("./chunk-5VF5JKUN.cjs");
|
|
25
|
-
var import_app_framework = require("@dxos/app-framework");
|
|
26
|
-
var AutomationCapabilities;
|
|
27
|
-
(function(AutomationCapabilities2) {
|
|
28
|
-
AutomationCapabilities2.AiClient = (0, import_app_framework.defineCapability)(`${import_chunk_5VF5JKUN.AUTOMATION_PLUGIN}/capability/ai-client`);
|
|
29
|
-
})(AutomationCapabilities || (AutomationCapabilities = {}));
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
AutomationCapabilities
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=chunk-ZS5RZ7RM.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/capabilities.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type AIServiceClientImpl } from '@dxos/assistant';\n\nimport { AUTOMATION_PLUGIN } from '../meta';\n\nexport namespace AutomationCapabilities {\n export const AiClient = defineCapability<AIServiceClientImpl>(`${AUTOMATION_PLUGIN}/capability/ai-client`);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAiC;;UAKhBA,yBAAAA;0BACFC,eAAWC,uCAAsC,GAAGC,uCAAAA,uBAAwC;AAC3G,GAFiBH,2BAAAA,yBAAAA,CAAAA,EAAAA;",
|
|
6
|
-
"names": ["AutomationCapabilities", "AiClient", "defineCapability", "AUTOMATION_PLUGIN"]
|
|
7
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var intent_resolver_CNVBSG4E_exports = {};
|
|
20
|
-
__export(intent_resolver_CNVBSG4E_exports, {
|
|
21
|
-
default: () => intent_resolver_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(intent_resolver_CNVBSG4E_exports);
|
|
24
|
-
var import_chunk_LU4HQWJD = require("./chunk-LU4HQWJD.cjs");
|
|
25
|
-
var import_chunk_5VF5JKUN = require("./chunk-5VF5JKUN.cjs");
|
|
26
|
-
var import_app_framework = require("@dxos/app-framework");
|
|
27
|
-
var import_echo_schema = require("@dxos/echo-schema");
|
|
28
|
-
var import_live_object = require("@dxos/live-object");
|
|
29
|
-
var intent_resolver_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.IntentResolver, (0, import_app_framework.createResolver)({
|
|
30
|
-
intent: import_chunk_LU4HQWJD.AutomationAction.Create,
|
|
31
|
-
resolve: ({ name }) => ({
|
|
32
|
-
data: {
|
|
33
|
-
object: (0, import_live_object.create)(import_chunk_LU4HQWJD.AIChatType, {
|
|
34
|
-
name,
|
|
35
|
-
// TODO(burdon): ???
|
|
36
|
-
// new DXN(DXN.kind.QUEUE, [QueueSubspaceTags.DATA, SpaceId.random(), ObjectId.random()]).toString(),
|
|
37
|
-
queue: (0, import_live_object.makeRef)({
|
|
38
|
-
id: import_echo_schema.ObjectId.random()
|
|
39
|
-
})
|
|
40
|
-
})
|
|
41
|
-
}
|
|
42
|
-
})
|
|
43
|
-
}));
|
|
44
|
-
//# sourceMappingURL=intent-resolver-CNVBSG4E.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, createResolver } from '@dxos/app-framework';\nimport { ObjectId } from '@dxos/echo-schema';\nimport { create, makeRef } from '@dxos/live-object';\n\nimport { AutomationAction, AIChatType } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: AutomationAction.Create,\n resolve: ({ name }) => ({\n data: {\n object: create(AIChatType, {\n name,\n // TODO(burdon): ???\n // new DXN(DXN.kind.QUEUE, [QueueSubspaceTags.DATA, SpaceId.random(), ObjectId.random()]).toString(),\n queue: makeRef({ id: ObjectId.random() }),\n }),\n },\n }),\n }),\n );\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAA0D;AAC1D,yBAAyB;AACzB,yBAAgC;AAIhC,IAAA,0BAAe,UACbA,kCACEC,kCAAaC,oBACbC,qCAAe;EACbC,QAAQC,uCAAiBC;EACzBC,SAAS,CAAC,EAAEC,KAAI,OAAQ;IACtBC,MAAM;MACJC,YAAQC,2BAAOC,kCAAY;QACzBJ;;;QAGAK,WAAOC,4BAAQ;UAAEC,IAAIC,4BAASC,OAAM;QAAG,CAAA;MACzC,CAAA;IACF;EACF;AACF,CAAA,CAAA;",
|
|
6
|
-
"names": ["contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "AutomationAction", "Create", "resolve", "name", "data", "object", "create", "AIChatType", "queue", "makeRef", "id", "ObjectId", "random"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { getSpace, isEchoObject, type ReactiveEchoObject } from '@dxos/react-client/echo';\n\nimport { AutomationPanel, ChatContainer, ServiceRegistry } from '../components';\nimport { AUTOMATION_PLUGIN } from '../meta';\nimport { AIChatType } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${AUTOMATION_PLUGIN}/ai-chat`,\n role: 'article',\n filter: (data): data is { subject: AIChatType } => data.subject instanceof AIChatType,\n component: ({ data, role }) => <ChatContainer role={role} chat={data.subject} />,\n }),\n createSurface({\n id: `${AUTOMATION_PLUGIN}/service-registry`,\n role: 'complementary--service-registry',\n component: ({ data }) => <ServiceRegistry space={getSpace(data.subject)!} />,\n }),\n createSurface({\n id: `${AUTOMATION_PLUGIN}/automation`,\n role: 'complementary--automation',\n filter: (data): data is { subject: ReactiveEchoObject<any> } =>\n isEchoObject(data.subject) && !!getSpace(data.subject),\n component: ({ data }) => <AutomationPanel space={getSpace(data.subject)!} object={data.subject} />,\n }),\n ]);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,2BAAyD;AACzD,kBAAgE;AAMhE,IAAA,wBAAe,UACbA,kCAAYC,kCAAaC,cAAc;MACrCC,oCAAc;IACZC,IAAI,GAAGC,uCAAAA;IACPC,MAAM;IACNC,QAAQ,CAACC,SAA0CA,KAAKC,mBAAmBC;IAC3EC,WAAW,CAAC,EAAEH,MAAMF,KAAI,MAAO,6BAAAM,QAAA,cAACC,qCAAAA;MAAcP;MAAYQ,MAAMN,KAAKC;;EACvE,CAAA;MACAN,oCAAc;IACZC,IAAI,GAAGC,uCAAAA;IACPC,MAAM;IACNK,WAAW,CAAC,EAAEH,KAAI,MAAO,6BAAAI,QAAA,cAACG,uCAAAA;MAAgBC,WAAOC,sBAAST,KAAKC,OAAO;;EACxE,CAAA;MACAN,oCAAc;IACZC,IAAI,GAAGC,uCAAAA;IACPC,MAAM;IACNC,QAAQ,CAACC,aACPU,0BAAaV,KAAKC,OAAO,KAAK,CAAC,KAACQ,sBAAST,KAAKC,OAAO;IACvDE,WAAW,CAAC,EAAEH,KAAI,MAAO,6BAAAI,QAAA,cAACO,uCAAAA;MAAgBH,WAAOC,sBAAST,KAAKC,OAAO;MAAIW,QAAQZ,KAAKC;;EACzF,CAAA;CACD;",
|
|
6
|
-
"names": ["contributes", "Capabilities", "ReactSurface", "createSurface", "id", "AUTOMATION_PLUGIN", "role", "filter", "data", "subject", "AIChatType", "component", "React", "ChatContainer", "chat", "ServiceRegistry", "space", "getSpace", "isEchoObject", "AutomationPanel", "object"]
|
|
7
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var types_exports = {};
|
|
20
|
-
__export(types_exports, {
|
|
21
|
-
AIChatType: () => import_chunk_LU4HQWJD.AIChatType,
|
|
22
|
-
ApiAuthorization: () => import_chunk_LU4HQWJD.ApiAuthorization,
|
|
23
|
-
AutomationAction: () => import_chunk_LU4HQWJD.AutomationAction,
|
|
24
|
-
ChainInputSchema: () => import_chunk_LU4HQWJD.ChainInputSchema,
|
|
25
|
-
ChainInputType: () => import_chunk_LU4HQWJD.ChainInputType,
|
|
26
|
-
ChainPromptType: () => import_chunk_LU4HQWJD.ChainPromptType,
|
|
27
|
-
ChainType: () => import_chunk_LU4HQWJD.ChainType,
|
|
28
|
-
MockServiceRegistry: () => import_chunk_LU4HQWJD.MockServiceRegistry,
|
|
29
|
-
ServiceType: () => import_chunk_LU4HQWJD.ServiceType
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(types_exports);
|
|
32
|
-
var import_chunk_LU4HQWJD = require("../chunk-LU4HQWJD.cjs");
|
|
33
|
-
var import_chunk_5VF5JKUN = require("../chunk-5VF5JKUN.cjs");
|
|
34
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
-
0 && (module.exports = {
|
|
36
|
-
AIChatType,
|
|
37
|
-
ApiAuthorization,
|
|
38
|
-
AutomationAction,
|
|
39
|
-
ChainInputSchema,
|
|
40
|
-
ChainInputType,
|
|
41
|
-
ChainPromptType,
|
|
42
|
-
ChainType,
|
|
43
|
-
MockServiceRegistry,
|
|
44
|
-
ServiceType
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["index.cjs"],
|
|
4
|
-
"sourcesContent": ["import {\n AIChatType,\n ApiAuthorization,\n AutomationAction,\n ChainInputSchema,\n ChainInputType,\n ChainPromptType,\n ChainType,\n MockServiceRegistry,\n ServiceType\n} from \"../chunk-LU4HQWJD.cjs\";\nimport \"../chunk-5VF5JKUN.cjs\";\nexport {\n AIChatType,\n ApiAuthorization,\n AutomationAction,\n ChainInputSchema,\n ChainInputType,\n ChainPromptType,\n ChainType,\n MockServiceRegistry,\n ServiceType\n};\n//# sourceMappingURL=index.cjs.map\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAUO;AACP,4BAAO;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
AutomationPanel_default
|
|
4
|
-
} from "./chunk-MS7OIGVR.mjs";
|
|
5
|
-
import "./chunk-X3LPRWIL.mjs";
|
|
6
|
-
export {
|
|
7
|
-
AutomationPanel_default as default
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=AutomationPanel-ZV7VEEPP.mjs.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
ChatContainer,
|
|
4
|
-
ChatContainer_default
|
|
5
|
-
} from "./chunk-WISKXX7U.mjs";
|
|
6
|
-
import "./chunk-ISYLEDVU.mjs";
|
|
7
|
-
import "./chunk-EVTLHDM2.mjs";
|
|
8
|
-
import "./chunk-X3LPRWIL.mjs";
|
|
9
|
-
export {
|
|
10
|
-
ChatContainer,
|
|
11
|
-
ChatContainer_default as default
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=ChatContainer-PPVMC2FC.mjs.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
AutomationCapabilities
|
|
4
|
-
} from "./chunk-ISYLEDVU.mjs";
|
|
5
|
-
import "./chunk-X3LPRWIL.mjs";
|
|
6
|
-
|
|
7
|
-
// packages/plugins/experimental/plugin-automation/src/capabilities/ai-client.ts
|
|
8
|
-
import { contributes } from "@dxos/app-framework";
|
|
9
|
-
import { AIServiceClientImpl } from "@dxos/assistant";
|
|
10
|
-
import { ClientCapabilities } from "@dxos/plugin-client";
|
|
11
|
-
var DEFAULT_AI_SERVICE_URL = "http://localhost:8788";
|
|
12
|
-
var ai_client_default = (context) => {
|
|
13
|
-
const client = context.requestCapability(ClientCapabilities.Client);
|
|
14
|
-
const endpoint = client.config.values.runtime?.services?.ai?.server ?? DEFAULT_AI_SERVICE_URL;
|
|
15
|
-
const aiClient = new AIServiceClientImpl({
|
|
16
|
-
endpoint
|
|
17
|
-
});
|
|
18
|
-
return contributes(AutomationCapabilities.AiClient, aiClient);
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
ai_client_default as default
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=ai-client-2ZA4TYFZ.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/ai-client.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { contributes, type PluginsContext } from '@dxos/app-framework';\nimport { AIServiceClientImpl } from '@dxos/assistant';\nimport { ClientCapabilities } from '@dxos/plugin-client';\n\nimport { AutomationCapabilities } from './capabilities';\n\n// TODO(wittjosiah): Factor out.\nconst DEFAULT_AI_SERVICE_URL = 'http://localhost:8788';\n\nexport default (context: PluginsContext) => {\n const client = context.requestCapability(ClientCapabilities.Client);\n const endpoint = client.config.values.runtime?.services?.ai?.server ?? DEFAULT_AI_SERVICE_URL;\n const aiClient = new AIServiceClientImpl({ endpoint });\n return contributes(AutomationCapabilities.AiClient, aiClient);\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;AAIA,SAASA,mBAAwC;AACjD,SAASC,2BAA2B;AACpC,SAASC,0BAA0B;AAKnC,IAAMC,yBAAyB;AAE/B,IAAA,oBAAe,CAACC,YAAAA;AACd,QAAMC,SAASD,QAAQE,kBAAkBC,mBAAmBC,MAAM;AAClE,QAAMC,WAAWJ,OAAOK,OAAOC,OAAOC,SAASC,UAAUC,IAAIC,UAAUZ;AACvE,QAAMa,WAAW,IAAIC,oBAAoB;IAAER;EAAS,CAAA;AACpD,SAAOS,YAAYC,uBAAuBC,UAAUJ,QAAAA;AACtD;",
|
|
6
|
-
"names": ["contributes", "AIServiceClientImpl", "ClientCapabilities", "DEFAULT_AI_SERVICE_URL", "context", "client", "requestCapability", "ClientCapabilities", "Client", "endpoint", "config", "values", "runtime", "services", "ai", "server", "aiClient", "AIServiceClientImpl", "contributes", "AutomationCapabilities", "AiClient"]
|
|
7
|
-
}
|