@dxos/plugin-automation 0.7.5-labs.e27f9b9 → 0.7.5-labs.ea4b4c2
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-VW2XIUPU.mjs +8 -0
- package/dist/lib/browser/ChatContainer-5TAVTN3T.mjs +12 -0
- package/dist/lib/browser/{ai-client-AARXEMMJ.mjs → ai-client-5CNY6JBF.mjs} +3 -3
- package/dist/lib/browser/{app-graph-builder-B4U34VSR.mjs → app-graph-builder-FZGK55G7.mjs} +39 -4
- package/dist/lib/browser/app-graph-builder-FZGK55G7.mjs.map +7 -0
- package/dist/lib/browser/{chunk-HZ4TA7HY.mjs → chunk-2H2EUYXL.mjs} +2 -2
- package/dist/lib/browser/{chunk-5SLV6AUA.mjs → chunk-DVE33EZL.mjs} +525 -290
- package/dist/lib/browser/chunk-DVE33EZL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-IYSMXX6Q.mjs → chunk-MJK7GL5P.mjs} +68 -44
- package/dist/lib/browser/chunk-MJK7GL5P.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RAVNWHNE.mjs → chunk-NQFZ6XRX.mjs} +6 -5
- package/dist/lib/browser/chunk-NQFZ6XRX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-7XADMUOW.mjs → chunk-Q4IMHYGH.mjs} +21 -76
- package/dist/lib/browser/chunk-Q4IMHYGH.mjs.map +7 -0
- package/dist/lib/browser/{chunk-HKX3D3ZP.mjs → chunk-R4JH4TLE.mjs} +4 -2
- package/dist/lib/browser/chunk-R4JH4TLE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +21 -15
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-754MPV7H.mjs → intent-resolver-BWAXKT27.mjs} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-4QZ6AKBF.mjs → react-surface-ILBDBZCN.mjs} +17 -9
- package/dist/lib/browser/react-surface-ILBDBZCN.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +6 -6
- package/dist/lib/node/{AutomationPanel-LRDEDGXI.cjs → AutomationPanel-G6EDDYWW.cjs} +7 -7
- package/dist/lib/node/{AutomationPanel-LRDEDGXI.cjs.map → AutomationPanel-G6EDDYWW.cjs.map} +2 -2
- package/dist/lib/node/{ChatContainer-6LZX4K2Z.cjs → ChatContainer-EN24W3K4.cjs} +10 -10
- package/dist/lib/node/ChatContainer-EN24W3K4.cjs.map +7 -0
- package/dist/lib/node/{ai-client-SA35GN5Q.cjs → ai-client-FKLPDELV.cjs} +7 -7
- package/dist/lib/node/{app-graph-builder-ENVDOPS4.cjs → app-graph-builder-T76NYV42.cjs} +48 -14
- package/dist/lib/node/app-graph-builder-T76NYV42.cjs.map +7 -0
- package/dist/lib/node/{chunk-6VMSH4P6.cjs → chunk-CJGJXNY3.cjs} +549 -327
- package/dist/lib/node/chunk-CJGJXNY3.cjs.map +7 -0
- package/dist/lib/node/{chunk-5VF5JKUN.cjs → chunk-EQYHOTGG.cjs} +8 -5
- package/dist/lib/node/chunk-EQYHOTGG.cjs.map +7 -0
- package/dist/lib/node/chunk-GB7245FH.cjs +173 -0
- package/dist/lib/node/chunk-GB7245FH.cjs.map +7 -0
- package/dist/lib/node/{chunk-HEYQONXC.cjs → chunk-HMBKP6VG.cjs} +82 -60
- package/dist/lib/node/chunk-HMBKP6VG.cjs.map +7 -0
- package/dist/lib/node/{chunk-WWU5FVAO.cjs → chunk-QXIHYOMF.cjs} +10 -9
- package/dist/lib/node/chunk-QXIHYOMF.cjs.map +7 -0
- package/dist/lib/node/{chunk-ZS5RZ7RM.cjs → chunk-U5Z7LFWB.cjs} +6 -6
- package/dist/lib/node/index.cjs +81 -75
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-CNVBSG4E.cjs → intent-resolver-C6OKFVEW.cjs} +8 -8
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-5HYLBDC3.cjs → react-surface-LWDY7SQG.cjs} +24 -18
- package/dist/lib/node/react-surface-LWDY7SQG.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +13 -13
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{AutomationPanel-ZV7VEEPP.mjs → AutomationPanel-V3IWQAMO.mjs} +3 -3
- package/dist/lib/node-esm/{ChatContainer-PPVMC2FC.mjs → ChatContainer-CNTY3C2D.mjs} +5 -5
- package/dist/lib/node-esm/{ai-client-2ZA4TYFZ.mjs → ai-client-XGNA6SJ5.mjs} +3 -3
- package/dist/lib/node-esm/{app-graph-builder-IYOUCQZT.mjs → app-graph-builder-IJQEN7WT.mjs} +39 -4
- package/dist/lib/node-esm/app-graph-builder-IJQEN7WT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-MS7OIGVR.mjs → chunk-6HLBYDUI.mjs} +6 -5
- package/dist/lib/node-esm/chunk-6HLBYDUI.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-EVTLHDM2.mjs → chunk-DNCXRGAF.mjs} +21 -76
- package/dist/lib/node-esm/chunk-DNCXRGAF.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-X3LPRWIL.mjs → chunk-EMVA6QUT.mjs} +4 -2
- package/dist/lib/node-esm/chunk-EMVA6QUT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ISYLEDVU.mjs → chunk-IJRTDSKN.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-WISKXX7U.mjs → chunk-QP47VJT6.mjs} +525 -290
- package/dist/lib/node-esm/chunk-QP47VJT6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-3KB5HRXA.mjs → chunk-ZLIAMW45.mjs} +68 -44
- package/dist/lib/node-esm/chunk-ZLIAMW45.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +21 -15
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-RQBXW442.mjs → intent-resolver-DCP4ZDBA.mjs} +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-SS5WCRJ2.mjs → react-surface-SBDXFVIN.mjs} +17 -9
- package/dist/lib/node-esm/react-surface-SBDXFVIN.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +6 -6
- package/dist/types/src/capabilities/app-graph-builder.d.ts +23 -22
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/AmbientChatDialog/AmbientChatDialog.d.ts +3 -0
- package/dist/types/src/components/AmbientChatDialog/AmbientChatDialog.d.ts.map +1 -0
- package/dist/types/src/components/AmbientChatDialog/index.d.ts +2 -0
- package/dist/types/src/components/AmbientChatDialog/index.d.ts.map +1 -0
- package/dist/types/src/components/Box/StatusLine.d.ts.map +1 -0
- package/dist/types/src/components/Box/StatusLine.stories.d.ts.map +1 -0
- package/dist/types/src/components/Box/Tabbed.d.ts +15 -0
- package/dist/types/src/components/Box/Tabbed.d.ts.map +1 -0
- package/dist/types/src/components/Box/Tabbed.stories.d.ts.map +1 -0
- package/dist/types/src/components/{Thread → Box}/ToggleContainer.d.ts +3 -3
- package/dist/types/src/components/Box/ToggleContainer.d.ts.map +1 -0
- package/dist/types/src/components/Box/ToggleContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/Box/index.d.ts +4 -0
- package/dist/types/src/components/Box/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatContainer/ChatContainer.d.ts +0 -1
- package/dist/types/src/components/ChatContainer/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/Prompt/Prompt.d.ts +7 -0
- package/dist/types/src/components/Prompt/Prompt.d.ts.map +1 -0
- package/dist/types/src/components/Prompt/Prompt.stories.d.ts +8 -0
- package/dist/types/src/components/Prompt/Prompt.stories.d.ts.map +1 -0
- package/dist/types/src/components/Prompt/index.d.ts +2 -0
- package/dist/types/src/components/Prompt/index.d.ts.map +1 -0
- package/dist/types/src/components/Prompt/prompt-autocomplete.d.ts +20 -0
- package/dist/types/src/components/Prompt/prompt-autocomplete.d.ts.map +1 -0
- package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts.map +1 -1
- package/dist/types/src/components/Thread/Thread.stories.d.ts +1 -0
- package/dist/types/src/components/Thread/Thread.stories.d.ts.map +1 -1
- package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +3 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/processor.d.ts +7 -2
- package/dist/types/src/hooks/processor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts +7 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -0
- package/dist/types/src/hooks/useMessageQueue.d.ts +41 -0
- package/dist/types/src/hooks/useMessageQueue.d.ts.map +1 -0
- package/dist/types/src/hooks/useServices.d.ts +7 -0
- package/dist/types/src/hooks/useServices.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +1 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +2 -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 -1
- package/dist/types/src/testing/test-functions.d.ts.map +1 -0
- package/dist/types/src/testing/test-services.d.ts +5 -0
- package/dist/types/src/testing/test-services.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +3 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/registry.d.ts +7 -6
- package/dist/types/src/types/registry.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +94 -69
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/package.json +52 -50
- package/src/AutomationPlugin.tsx +7 -7
- package/src/capabilities/app-graph-builder.ts +34 -3
- package/src/capabilities/react-surface.tsx +12 -4
- package/src/components/AmbientChatDialog/AmbientChatDialog.tsx +26 -0
- package/src/components/AmbientChatDialog/index.ts +5 -0
- package/src/components/{Thread → Box}/StatusLine.tsx +1 -1
- package/src/components/{Thread → Box}/Tabbed.stories.tsx +2 -3
- package/src/components/Box/Tabbed.tsx +89 -0
- package/src/components/{Thread → Box}/ToggleContainer.stories.tsx +1 -2
- package/src/components/{Thread → Box}/ToggleContainer.tsx +28 -23
- package/src/components/Box/index.ts +7 -0
- package/src/components/ChatContainer/ChatContainer.tsx +15 -80
- package/src/components/Prompt/Prompt.stories.tsx +50 -0
- package/src/components/Prompt/Prompt.tsx +36 -0
- package/src/components/Prompt/index.ts +5 -0
- package/src/components/Prompt/prompt-autocomplete.ts +200 -0
- package/src/components/PromptEditor/PromptEditor.stories.tsx +3 -3
- package/src/components/ServiceRegistry/ServiceRegistry.stories.tsx +2 -1
- package/src/components/ServiceRegistry/ServiceRegistry.tsx +7 -7
- package/src/components/Thread/Thread.stories.tsx +8 -1
- package/src/components/Thread/Thread.tsx +2 -2
- package/src/components/Thread/ThreadMessage.tsx +58 -28
- package/src/components/TriggerEditor/TriggerEditor.tsx +8 -5
- package/src/components/index.ts +1 -0
- package/src/hooks/index.ts +3 -1
- package/src/hooks/processor.ts +16 -7
- package/src/hooks/useChatProcessor.tsx +86 -0
- package/src/hooks/useMessageQueue.ts +23 -0
- package/src/hooks/{useServiceRegistry.ts → useServices.ts} +8 -2
- package/src/meta.ts +4 -1
- package/src/testing/index.ts +2 -1
- package/src/testing/test-services.ts +131 -0
- package/src/translations.ts +1 -0
- package/src/types/registry.ts +17 -80
- package/src/types/schema.ts +20 -8
- package/dist/lib/browser/AutomationPanel-WFJZAW4F.mjs +0 -8
- package/dist/lib/browser/ChatContainer-OFCOZ5T2.mjs +0 -12
- package/dist/lib/browser/app-graph-builder-B4U34VSR.mjs.map +0 -7
- package/dist/lib/browser/chunk-5SLV6AUA.mjs.map +0 -7
- package/dist/lib/browser/chunk-7XADMUOW.mjs.map +0 -7
- package/dist/lib/browser/chunk-HKX3D3ZP.mjs.map +0 -7
- package/dist/lib/browser/chunk-IYSMXX6Q.mjs.map +0 -7
- package/dist/lib/browser/chunk-RAVNWHNE.mjs.map +0 -7
- package/dist/lib/browser/react-surface-4QZ6AKBF.mjs.map +0 -7
- package/dist/lib/node/ChatContainer-6LZX4K2Z.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-ENVDOPS4.cjs.map +0 -7
- package/dist/lib/node/chunk-5VF5JKUN.cjs.map +0 -7
- package/dist/lib/node/chunk-6VMSH4P6.cjs.map +0 -7
- 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/react-surface-5HYLBDC3.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-IYOUCQZT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3KB5HRXA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-EVTLHDM2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MS7OIGVR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WISKXX7U.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-X3LPRWIL.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-SS5WCRJ2.mjs.map +0 -7
- 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.map +0 -1
- 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.map +0 -1
- package/dist/types/src/components/Thread/ToggleContainer.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ToggleContainer.stories.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/testing/testing.d.ts.map +0 -1
- package/src/components/Thread/ScrollContainer.tsx +0 -92
- package/src/components/Thread/Tabbed.tsx +0 -72
- /package/dist/lib/browser/{AutomationPanel-WFJZAW4F.mjs.map → AutomationPanel-VW2XIUPU.mjs.map} +0 -0
- /package/dist/lib/browser/{ChatContainer-OFCOZ5T2.mjs.map → ChatContainer-5TAVTN3T.mjs.map} +0 -0
- /package/dist/lib/browser/{ai-client-AARXEMMJ.mjs.map → ai-client-5CNY6JBF.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-HZ4TA7HY.mjs.map → chunk-2H2EUYXL.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-754MPV7H.mjs.map → intent-resolver-BWAXKT27.mjs.map} +0 -0
- /package/dist/lib/node/{ai-client-SA35GN5Q.cjs.map → ai-client-FKLPDELV.cjs.map} +0 -0
- /package/dist/lib/node/{chunk-ZS5RZ7RM.cjs.map → chunk-U5Z7LFWB.cjs.map} +0 -0
- /package/dist/lib/node/{intent-resolver-CNVBSG4E.cjs.map → intent-resolver-C6OKFVEW.cjs.map} +0 -0
- /package/dist/lib/node-esm/{AutomationPanel-ZV7VEEPP.mjs.map → AutomationPanel-V3IWQAMO.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChatContainer-PPVMC2FC.mjs.map → ChatContainer-CNTY3C2D.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ai-client-2ZA4TYFZ.mjs.map → ai-client-XGNA6SJ5.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-ISYLEDVU.mjs.map → chunk-IJRTDSKN.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-RQBXW442.mjs.map → intent-resolver-DCP4ZDBA.mjs.map} +0 -0
- /package/dist/types/src/components/{Thread → Box}/StatusLine.d.ts +0 -0
- /package/dist/types/src/components/{Thread → Box}/StatusLine.stories.d.ts +0 -0
- /package/dist/types/src/components/{Thread → Box}/Tabbed.stories.d.ts +0 -0
- /package/dist/types/src/components/{Thread → Box}/ToggleContainer.stories.d.ts +0 -0
- /package/src/components/{Thread → Box}/StatusLine.stories.tsx +0 -0
- /package/src/testing/{testing.ts → test-functions.ts} +0 -0
|
@@ -26,6 +26,7 @@ declare const _default: {
|
|
|
26
26
|
'trigger type websocket'?: undefined;
|
|
27
27
|
'trigger type subscription'?: undefined;
|
|
28
28
|
'trigger type email'?: undefined;
|
|
29
|
+
'trigger type queue'?: undefined;
|
|
29
30
|
'trigger filter'?: undefined;
|
|
30
31
|
'trigger cron'?: undefined;
|
|
31
32
|
'trigger method'?: undefined;
|
|
@@ -60,6 +61,7 @@ declare const _default: {
|
|
|
60
61
|
'trigger type websocket': string;
|
|
61
62
|
'trigger type subscription': string;
|
|
62
63
|
'trigger type email': string;
|
|
64
|
+
'trigger type queue': string;
|
|
63
65
|
'trigger filter': string;
|
|
64
66
|
'trigger cron': string;
|
|
65
67
|
'trigger method': string;
|
|
@@ -96,6 +98,7 @@ declare const _default: {
|
|
|
96
98
|
'trigger type websocket': string;
|
|
97
99
|
'trigger type subscription': string;
|
|
98
100
|
'trigger type email': string;
|
|
101
|
+
'trigger type queue': string;
|
|
99
102
|
'trigger filter': string;
|
|
100
103
|
'trigger cron': string;
|
|
101
104
|
'trigger method': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,wBAmDE"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ServiceType } from './schema';
|
|
2
|
-
export type ServiceQuery = {
|
|
1
|
+
import { type ServiceType } from './schema';
|
|
2
|
+
export type ServiceQuery = {
|
|
3
|
+
name?: string;
|
|
4
|
+
category?: string;
|
|
5
|
+
};
|
|
3
6
|
export interface BaseServiceRegistry {
|
|
4
|
-
queryServices(query
|
|
5
|
-
}
|
|
6
|
-
export declare class MockServiceRegistry implements BaseServiceRegistry {
|
|
7
|
-
queryServices(query: ServiceQuery): Promise<ServiceType[]>;
|
|
7
|
+
queryServices(query?: ServiceQuery): Promise<ServiceType[]>;
|
|
8
8
|
}
|
|
9
|
+
export declare const categoryIcons: Record<string, string>;
|
|
9
10
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/types/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/types/registry.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,aAAa,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;CAC7D;AAED,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAUvC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComputeGraph } from '@dxos/conductor';
|
|
2
|
-
import { Expando,
|
|
2
|
+
import { Expando, S, type Ref$ } from '@dxos/echo-schema';
|
|
3
3
|
import { FunctionType } from '@dxos/functions';
|
|
4
4
|
export declare enum ChainInputType {
|
|
5
5
|
VALUE = 0,
|
|
@@ -124,73 +124,98 @@ declare const ServiceInterface: S.Union<[S.Struct<{
|
|
|
124
124
|
}>]>>;
|
|
125
125
|
}>]>;
|
|
126
126
|
export type ServiceInterface = S.Schema.Type<typeof ServiceInterface>;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
name
|
|
130
|
-
description
|
|
131
|
-
|
|
132
|
-
enabled
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
127
|
+
declare const ServiceType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
128
|
+
serviceId: typeof S.String;
|
|
129
|
+
name: S.optional<typeof S.String>;
|
|
130
|
+
description: S.optional<typeof S.String>;
|
|
131
|
+
category: S.optional<typeof S.String>;
|
|
132
|
+
enabled: S.optional<typeof S.Boolean>;
|
|
133
|
+
/**
|
|
134
|
+
* Entries exposed: functions, workflows, and APIs.
|
|
135
|
+
*/
|
|
136
|
+
interfaces: S.optional<S.Array$<S.Union<[S.Struct<{
|
|
137
|
+
kind: S.Literal<["function"]>;
|
|
138
|
+
fn: Ref$<FunctionType>;
|
|
139
|
+
}>, S.Struct<{
|
|
140
|
+
kind: S.Literal<["workflow"]>;
|
|
141
|
+
workflow: Ref$<ComputeGraph>;
|
|
142
|
+
}>, S.Struct<{
|
|
143
|
+
kind: S.Literal<["api"]>;
|
|
144
|
+
/**
|
|
145
|
+
* URL to fetch the openapi schema.
|
|
146
|
+
*/
|
|
147
|
+
schemaUrl: S.optional<typeof S.String>;
|
|
148
|
+
/**
|
|
149
|
+
* Inlined openapi schema.
|
|
150
|
+
*/
|
|
151
|
+
schema: S.optional<typeof S.Any>;
|
|
152
|
+
/**
|
|
153
|
+
* Authorization configuration if required.
|
|
154
|
+
*/
|
|
155
|
+
authorization: S.optional<S.Union<[S.Struct<{
|
|
156
|
+
type: S.Literal<["api-key"]>;
|
|
157
|
+
key: typeof S.String;
|
|
158
|
+
placement: S.Union<[S.Struct<{
|
|
159
|
+
type: S.Literal<["authorization-header"]>;
|
|
160
|
+
}>, S.Struct<{
|
|
161
|
+
type: S.Literal<["query"]>;
|
|
162
|
+
name: typeof S.String;
|
|
163
|
+
}>]>;
|
|
164
|
+
}>, S.Struct<{
|
|
165
|
+
type: S.Literal<["oauth"]>;
|
|
166
|
+
clientId: typeof S.String;
|
|
167
|
+
clientSecret: typeof S.String;
|
|
168
|
+
tokenUrl: typeof S.String;
|
|
169
|
+
grantType: typeof S.String;
|
|
170
|
+
}>]>>;
|
|
171
|
+
}>]>>>;
|
|
172
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>, S.Struct.Encoded<{
|
|
173
|
+
serviceId: typeof S.String;
|
|
174
|
+
name: S.optional<typeof S.String>;
|
|
175
|
+
description: S.optional<typeof S.String>;
|
|
176
|
+
category: S.optional<typeof S.String>;
|
|
177
|
+
enabled: S.optional<typeof S.Boolean>;
|
|
178
|
+
/**
|
|
179
|
+
* Entries exposed: functions, workflows, and APIs.
|
|
180
|
+
*/
|
|
181
|
+
interfaces: S.optional<S.Array$<S.Union<[S.Struct<{
|
|
182
|
+
kind: S.Literal<["function"]>;
|
|
183
|
+
fn: Ref$<FunctionType>;
|
|
184
|
+
}>, S.Struct<{
|
|
185
|
+
kind: S.Literal<["workflow"]>;
|
|
186
|
+
workflow: Ref$<ComputeGraph>;
|
|
187
|
+
}>, S.Struct<{
|
|
188
|
+
kind: S.Literal<["api"]>;
|
|
189
|
+
/**
|
|
190
|
+
* URL to fetch the openapi schema.
|
|
191
|
+
*/
|
|
192
|
+
schemaUrl: S.optional<typeof S.String>;
|
|
193
|
+
/**
|
|
194
|
+
* Inlined openapi schema.
|
|
195
|
+
*/
|
|
196
|
+
schema: S.optional<typeof S.Any>;
|
|
197
|
+
/**
|
|
198
|
+
* Authorization configuration if required.
|
|
199
|
+
*/
|
|
200
|
+
authorization: S.optional<S.Union<[S.Struct<{
|
|
201
|
+
type: S.Literal<["api-key"]>;
|
|
202
|
+
key: typeof S.String;
|
|
203
|
+
placement: S.Union<[S.Struct<{
|
|
204
|
+
type: S.Literal<["authorization-header"]>;
|
|
205
|
+
}>, S.Struct<{
|
|
206
|
+
type: S.Literal<["query"]>;
|
|
207
|
+
name: typeof S.String;
|
|
208
|
+
}>]>;
|
|
209
|
+
}>, S.Struct<{
|
|
210
|
+
type: S.Literal<["oauth"]>;
|
|
211
|
+
clientId: typeof S.String;
|
|
212
|
+
clientSecret: typeof S.String;
|
|
213
|
+
tokenUrl: typeof S.String;
|
|
214
|
+
grantType: typeof S.String;
|
|
215
|
+
}>]>>;
|
|
216
|
+
}>]>>>;
|
|
217
|
+
}>>;
|
|
218
|
+
export declare class ServiceType extends ServiceType_base {
|
|
219
|
+
}
|
|
195
220
|
export {};
|
|
196
221
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAO,CAAC,EAAe,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,oBAAY,cAAc;IACxB,KAAK,IAAI;IACT,YAAY,IAAI;IAChB,SAAS,IAAI;IACb,QAAQ,IAAI;IACZ,KAAK,IAAI;IACT,QAAQ,IAAI;IACZ,OAAO,IAAI;IACX,MAAM,IAAI;CACX;AAED,eAAO,MAAM,gBAAgB;;;;GAM5B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;;;;;;;;;;;;;;;;;;AAEhE,qBAAa,eAAgB,SAAQ,oBAInC;CAAG;;;;;;;;;;;;;;;;;;;;;;;;AAEL,qBAAa,SAAU,SAAQ,cAG7B;CAAG;;;;;;;;AAEL,qBAAa,UAAW,SAAQ,eAI9B;CAAG;AAwBL,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;IAAsD,CAAC;AACpF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;AA+BtE,QAAA,MAAM,gBAAgB;;QA3BK,IAAI,CAAC,YAAY,CAAC;;;cAKZ,IAAI,CAAC,YAAY,CAAC;;;IAMjD;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;IAIoG,CAAC;AAC1G,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;;;;;;;IAyBpE;;OAEG;;;YAvDsB,IAAI,CAAC,YAAY,CAAC;;;kBAKZ,IAAI,CAAC,YAAY,CAAC;;;QAMjD;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;IA8BH;;OAEG;;;YAvDsB,IAAI,CAAC,YAAY,CAAC;;;kBAKZ,IAAI,CAAC,YAAY,CAAC;;;QAMjD;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;;;;;;;AAuBL,qBAAa,WAAY,SAAQ,gBAW/B;CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-automation",
|
|
3
|
-
"version": "0.7.5-labs.
|
|
3
|
+
"version": "0.7.5-labs.ea4b4c2",
|
|
4
4
|
"description": "Prompt chain plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"src"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
+
"@codemirror/autocomplete": "^6.18.1",
|
|
35
36
|
"@codemirror/language": "^6.10.3",
|
|
36
37
|
"@codemirror/search": "^6.5.6",
|
|
37
38
|
"@codemirror/state": "^6.4.1",
|
|
@@ -42,44 +43,45 @@
|
|
|
42
43
|
"lodash.get": "^4.4.2",
|
|
43
44
|
"react-markdown": "^8.0.5",
|
|
44
45
|
"unified": "^11.0.0",
|
|
45
|
-
"@dxos/app-framework": "0.7.5-labs.
|
|
46
|
-
"@dxos/artifact": "0.7.5-labs.
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/client": "0.7.5-labs.
|
|
50
|
-
"@dxos/compute": "0.7.5-labs.
|
|
51
|
-
"@dxos/conductor": "0.7.5-labs.
|
|
52
|
-
"@dxos/context": "0.7.5-labs.
|
|
53
|
-
"@dxos/echo-db": "0.7.5-labs.
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/log": "0.7.5-labs.
|
|
60
|
-
"@dxos/plugin-client": "0.7.5-labs.
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/plugin-
|
|
63
|
-
"@dxos/plugin-
|
|
64
|
-
"@dxos/plugin-
|
|
65
|
-
"@dxos/plugin-
|
|
66
|
-
"@dxos/plugin-sketch": "0.7.5-labs.
|
|
67
|
-
"@dxos/plugin-
|
|
68
|
-
"@dxos/plugin-
|
|
69
|
-
"@dxos/plugin-
|
|
70
|
-
"@dxos/react-client": "0.7.5-labs.
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/react-ui-canvas-compute": "0.7.5-labs.
|
|
74
|
-
"@dxos/react-ui-canvas-editor": "0.7.5-labs.
|
|
75
|
-
"@dxos/react-ui-
|
|
76
|
-
"@dxos/react-ui-form": "0.7.5-labs.
|
|
77
|
-
"@dxos/react-ui-
|
|
78
|
-
"@dxos/react-ui-
|
|
79
|
-
"@dxos/react-ui-
|
|
80
|
-
"@dxos/react-ui-
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/schema": "0.7.5-labs.
|
|
46
|
+
"@dxos/app-framework": "0.7.5-labs.ea4b4c2",
|
|
47
|
+
"@dxos/artifact": "0.7.5-labs.ea4b4c2",
|
|
48
|
+
"@dxos/assistant": "0.7.5-labs.ea4b4c2",
|
|
49
|
+
"@dxos/async": "0.7.5-labs.ea4b4c2",
|
|
50
|
+
"@dxos/client": "0.7.5-labs.ea4b4c2",
|
|
51
|
+
"@dxos/compute": "0.7.5-labs.ea4b4c2",
|
|
52
|
+
"@dxos/conductor": "0.7.5-labs.ea4b4c2",
|
|
53
|
+
"@dxos/context": "0.7.5-labs.ea4b4c2",
|
|
54
|
+
"@dxos/echo-db": "0.7.5-labs.ea4b4c2",
|
|
55
|
+
"@dxos/edge-client": "0.7.5-labs.ea4b4c2",
|
|
56
|
+
"@dxos/functions": "0.7.5-labs.ea4b4c2",
|
|
57
|
+
"@dxos/invariant": "0.7.5-labs.ea4b4c2",
|
|
58
|
+
"@dxos/keys": "0.7.5-labs.ea4b4c2",
|
|
59
|
+
"@dxos/echo-schema": "0.7.5-labs.ea4b4c2",
|
|
60
|
+
"@dxos/log": "0.7.5-labs.ea4b4c2",
|
|
61
|
+
"@dxos/plugin-client": "0.7.5-labs.ea4b4c2",
|
|
62
|
+
"@dxos/live-object": "0.7.5-labs.ea4b4c2",
|
|
63
|
+
"@dxos/plugin-inbox": "0.7.5-labs.ea4b4c2",
|
|
64
|
+
"@dxos/plugin-deck": "0.7.5-labs.ea4b4c2",
|
|
65
|
+
"@dxos/plugin-graph": "0.7.5-labs.ea4b4c2",
|
|
66
|
+
"@dxos/plugin-script": "0.7.5-labs.ea4b4c2",
|
|
67
|
+
"@dxos/plugin-sketch": "0.7.5-labs.ea4b4c2",
|
|
68
|
+
"@dxos/plugin-markdown": "0.7.5-labs.ea4b4c2",
|
|
69
|
+
"@dxos/plugin-space": "0.7.5-labs.ea4b4c2",
|
|
70
|
+
"@dxos/plugin-stack": "0.7.5-labs.ea4b4c2",
|
|
71
|
+
"@dxos/react-client": "0.7.5-labs.ea4b4c2",
|
|
72
|
+
"@dxos/plugin-wnfs": "0.7.5-labs.ea4b4c2",
|
|
73
|
+
"@dxos/react-edge-client": "0.7.5-labs.ea4b4c2",
|
|
74
|
+
"@dxos/react-ui-canvas-compute": "0.7.5-labs.ea4b4c2",
|
|
75
|
+
"@dxos/react-ui-canvas-editor": "0.7.5-labs.ea4b4c2",
|
|
76
|
+
"@dxos/react-ui-components": "0.7.5-labs.ea4b4c2",
|
|
77
|
+
"@dxos/react-ui-form": "0.7.5-labs.ea4b4c2",
|
|
78
|
+
"@dxos/react-ui-editor": "0.7.5-labs.ea4b4c2",
|
|
79
|
+
"@dxos/react-ui-list": "0.7.5-labs.ea4b4c2",
|
|
80
|
+
"@dxos/react-ui-sfx": "0.7.5-labs.ea4b4c2",
|
|
81
|
+
"@dxos/react-ui-stack": "0.7.5-labs.ea4b4c2",
|
|
82
|
+
"@dxos/react-ui-syntax-highlighter": "0.7.5-labs.ea4b4c2",
|
|
83
|
+
"@dxos/schema": "0.7.5-labs.ea4b4c2",
|
|
84
|
+
"@dxos/util": "0.7.5-labs.ea4b4c2"
|
|
83
85
|
},
|
|
84
86
|
"devDependencies": {
|
|
85
87
|
"@types/lodash.get": "^4.4.7",
|
|
@@ -89,21 +91,21 @@
|
|
|
89
91
|
"react": "~18.2.0",
|
|
90
92
|
"react-dom": "~18.2.0",
|
|
91
93
|
"vite": "5.4.7",
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/plugin-chess": "0.7.5-labs.
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/plugin-map": "0.7.5-labs.
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/react-ui
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/
|
|
94
|
+
"@dxos/echo-db": "0.7.5-labs.ea4b4c2",
|
|
95
|
+
"@dxos/plugin-chess": "0.7.5-labs.ea4b4c2",
|
|
96
|
+
"@dxos/artifact-testing": "0.7.5-labs.ea4b4c2",
|
|
97
|
+
"@dxos/plugin-map": "0.7.5-labs.ea4b4c2",
|
|
98
|
+
"@dxos/random": "0.7.5-labs.ea4b4c2",
|
|
99
|
+
"@dxos/plugin-table": "0.7.5-labs.ea4b4c2",
|
|
100
|
+
"@dxos/react-ui": "0.7.5-labs.ea4b4c2",
|
|
101
|
+
"@dxos/react-ui-theme": "0.7.5-labs.ea4b4c2",
|
|
102
|
+
"@dxos/storybook-utils": "0.7.5-labs.ea4b4c2"
|
|
101
103
|
},
|
|
102
104
|
"peerDependencies": {
|
|
103
105
|
"react": "~18.2.0",
|
|
104
106
|
"react-dom": "~18.2.0",
|
|
105
|
-
"@dxos/react-ui": "0.7.5-labs.
|
|
106
|
-
"@dxos/react-ui-theme": "0.7.5-labs.
|
|
107
|
+
"@dxos/react-ui": "0.7.5-labs.ea4b4c2",
|
|
108
|
+
"@dxos/react-ui-theme": "0.7.5-labs.ea4b4c2"
|
|
107
109
|
},
|
|
108
110
|
"publishConfig": {
|
|
109
111
|
"access": "public"
|
package/src/AutomationPlugin.tsx
CHANGED
|
@@ -11,16 +11,11 @@ import { RefArray } from '@dxos/react-client/echo';
|
|
|
11
11
|
import { AiClient, AppGraphBuilder, IntentResolver, ReactSurface } from './capabilities';
|
|
12
12
|
import { AUTOMATION_PLUGIN, meta } from './meta';
|
|
13
13
|
import translations from './translations';
|
|
14
|
-
import { AutomationAction, ChainPromptType, ChainType, AIChatType } from './types';
|
|
14
|
+
import { AutomationAction, ChainPromptType, ChainType, AIChatType, ServiceType } from './types';
|
|
15
15
|
|
|
16
16
|
// TODO(wittjosiah): Rename to AssistantPlugin?
|
|
17
17
|
export const AutomationPlugin = () =>
|
|
18
18
|
definePlugin(meta, [
|
|
19
|
-
defineModule({
|
|
20
|
-
id: `${meta.id}/module/ai-client`,
|
|
21
|
-
activatesOn: ClientEvents.ClientReady,
|
|
22
|
-
activate: AiClient,
|
|
23
|
-
}),
|
|
24
19
|
defineModule({
|
|
25
20
|
id: `${meta.id}/module/translations`,
|
|
26
21
|
activatesOn: Events.SetupTranslations,
|
|
@@ -53,7 +48,7 @@ export const AutomationPlugin = () =>
|
|
|
53
48
|
id: `${meta.id}/module/schema`,
|
|
54
49
|
activatesOn: ClientEvents.SetupSchema,
|
|
55
50
|
activate: () => [
|
|
56
|
-
contributes(ClientCapabilities.SystemSchema, [ChainType, ChainPromptType, FunctionTrigger]),
|
|
51
|
+
contributes(ClientCapabilities.SystemSchema, [ChainType, ChainPromptType, FunctionTrigger, ServiceType]),
|
|
57
52
|
contributes(ClientCapabilities.Schema, [AIChatType]),
|
|
58
53
|
],
|
|
59
54
|
}),
|
|
@@ -88,4 +83,9 @@ export const AutomationPlugin = () =>
|
|
|
88
83
|
activatesOn: Events.SetupIntents,
|
|
89
84
|
activate: IntentResolver,
|
|
90
85
|
}),
|
|
86
|
+
defineModule({
|
|
87
|
+
id: `${meta.id}/module/ai-client`,
|
|
88
|
+
activatesOn: ClientEvents.ClientReady,
|
|
89
|
+
activate: AiClient,
|
|
90
|
+
}),
|
|
91
91
|
]);
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';
|
|
5
|
+
import { Capabilities, contributes, createIntent, LayoutAction, type PluginsContext } from '@dxos/app-framework';
|
|
6
6
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
7
|
-
import { createExtension, toSignal } from '@dxos/plugin-graph';
|
|
7
|
+
import { createExtension, type Node, ROOT_ID, toSignal } from '@dxos/plugin-graph';
|
|
8
8
|
import { memoizeQuery } from '@dxos/plugin-space';
|
|
9
9
|
import { getTypename, parseId, SpaceState } from '@dxos/react-client/echo';
|
|
10
10
|
|
|
11
|
-
import { AUTOMATION_PLUGIN } from '../meta';
|
|
11
|
+
import { AMBIENT_CHAT_DIALOG, AUTOMATION_PLUGIN } from '../meta';
|
|
12
12
|
|
|
13
13
|
export default (context: PluginsContext) => {
|
|
14
14
|
const resolve = (typename: string) =>
|
|
@@ -46,6 +46,37 @@ export default (context: PluginsContext) => {
|
|
|
46
46
|
};
|
|
47
47
|
},
|
|
48
48
|
}),
|
|
49
|
+
createExtension({
|
|
50
|
+
id: `${AUTOMATION_PLUGIN}/ambient-chat`,
|
|
51
|
+
filter: (node): node is Node<null> => node.id === ROOT_ID,
|
|
52
|
+
actions: () => [
|
|
53
|
+
{
|
|
54
|
+
id: `${LayoutAction.UpdateDialog._tag}/ambient-chat/open`,
|
|
55
|
+
data: async () => {
|
|
56
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
57
|
+
await dispatch(
|
|
58
|
+
createIntent(LayoutAction.UpdateDialog, {
|
|
59
|
+
part: 'dialog',
|
|
60
|
+
subject: AMBIENT_CHAT_DIALOG,
|
|
61
|
+
options: {
|
|
62
|
+
state: true,
|
|
63
|
+
blockAlign: 'end',
|
|
64
|
+
},
|
|
65
|
+
}),
|
|
66
|
+
);
|
|
67
|
+
},
|
|
68
|
+
properties: {
|
|
69
|
+
label: ['open ambient chat label', { ns: AUTOMATION_PLUGIN }],
|
|
70
|
+
icon: 'ph--chat-centered-text--regular',
|
|
71
|
+
disposition: 'pin-end',
|
|
72
|
+
keyBinding: {
|
|
73
|
+
macos: 'shift+meta+k',
|
|
74
|
+
windows: 'shift+ctrl+k',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
}),
|
|
49
80
|
createExtension({
|
|
50
81
|
id: `${AUTOMATION_PLUGIN}/automation-for-subject`,
|
|
51
82
|
resolver: ({ id }) => {
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
|
-
import { getSpace, isEchoObject, type ReactiveEchoObject } from '@dxos/react-client/echo';
|
|
8
|
+
import { getSpace, isEchoObject, isSpace, type ReactiveEchoObject } from '@dxos/react-client/echo';
|
|
9
9
|
|
|
10
|
-
import { AutomationPanel, ChatContainer, ServiceRegistry } from '../components';
|
|
11
|
-
import { AUTOMATION_PLUGIN } from '../meta';
|
|
10
|
+
import { AmbientChatDialog, AutomationPanel, ChatContainer, ServiceRegistry } from '../components';
|
|
11
|
+
import { AUTOMATION_PLUGIN, AMBIENT_CHAT_DIALOG } from '../meta';
|
|
12
12
|
import { AIChatType } from '../types';
|
|
13
13
|
|
|
14
14
|
export default () =>
|
|
@@ -22,7 +22,15 @@ export default () =>
|
|
|
22
22
|
createSurface({
|
|
23
23
|
id: `${AUTOMATION_PLUGIN}/service-registry`,
|
|
24
24
|
role: 'complementary--service-registry',
|
|
25
|
-
component: ({ data }) =>
|
|
25
|
+
component: ({ data }) => (
|
|
26
|
+
<ServiceRegistry space={isSpace(data.subject) ? data.subject : getSpace(data.subject)!} />
|
|
27
|
+
),
|
|
28
|
+
}),
|
|
29
|
+
createSurface({
|
|
30
|
+
id: AMBIENT_CHAT_DIALOG,
|
|
31
|
+
role: 'dialog',
|
|
32
|
+
filter: (data): data is any => data.component === AMBIENT_CHAT_DIALOG,
|
|
33
|
+
component: () => <AmbientChatDialog />,
|
|
26
34
|
}),
|
|
27
35
|
createSurface({
|
|
28
36
|
id: `${AUTOMATION_PLUGIN}/automation`,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Dialog, Icon, useTranslation } from '@dxos/react-ui';
|
|
8
|
+
|
|
9
|
+
import { AUTOMATION_PLUGIN } from '../../meta';
|
|
10
|
+
|
|
11
|
+
const preventDefault = (event: Event) => event.preventDefault();
|
|
12
|
+
|
|
13
|
+
export const AmbientChatDialog = () => {
|
|
14
|
+
const { t } = useTranslation(AUTOMATION_PLUGIN);
|
|
15
|
+
return (
|
|
16
|
+
<div role='none' className='dx-dialog__overlay bg-transparent pointer-events-none' data-block-align='end'>
|
|
17
|
+
<Dialog.Content onInteractOutside={preventDefault} classNames='pointer-events-auto' inOverlayLayout>
|
|
18
|
+
<Dialog.Title classNames='sr-only'>{t('ambient chat dialog title')}</Dialog.Title>
|
|
19
|
+
<Dialog.Close>
|
|
20
|
+
<Icon icon='ph--x--regular' size={4} />
|
|
21
|
+
</Dialog.Close>
|
|
22
|
+
<h1>Hello</h1>
|
|
23
|
+
</Dialog.Content>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
@@ -34,10 +34,9 @@ export const Default: Story = {
|
|
|
34
34
|
return (
|
|
35
35
|
<div className='flex flex-col w-[500px] p-4 bg-attention'>
|
|
36
36
|
<ToggleContainer
|
|
37
|
+
open
|
|
37
38
|
title={content[selected].title}
|
|
38
|
-
classNames='p-1 rounded-lg bg-
|
|
39
|
-
toggle
|
|
40
|
-
defaultOpen
|
|
39
|
+
classNames='p-1 rounded-lg bg-baseSurface border border-neutral-500'
|
|
41
40
|
>
|
|
42
41
|
<div className='flex w-full overflow-hidden'>
|
|
43
42
|
<Tabs length={content.length} selected={selected} onSelect={setSelected} />
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { forwardRef } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Icon, type ThemedClassName } from '@dxos/react-ui';
|
|
8
|
+
import { mx } from '@dxos/react-ui-theme';
|
|
9
|
+
|
|
10
|
+
const numbers = [
|
|
11
|
+
{ regular: 'ph--number-circle-zero--thin', active: 'ph--number-circle-zero--duotone' },
|
|
12
|
+
{ regular: 'ph--number-circle-one--thin', active: 'ph--number-circle-one--duotone' },
|
|
13
|
+
{ regular: 'ph--number-circle-two--thin', active: 'ph--number-circle-two--duotone' },
|
|
14
|
+
{ regular: 'ph--number-circle-three--thin', active: 'ph--number-circle-three--duotone' },
|
|
15
|
+
{ regular: 'ph--number-circle-four--thin', active: 'ph--number-circle-four--duotone' },
|
|
16
|
+
{ regular: 'ph--number-circle-five--thin', active: 'ph--number-circle-five--duotone' },
|
|
17
|
+
{ regular: 'ph--number-circle-six--thin', active: 'ph--number-circle-six--duotone' },
|
|
18
|
+
{ regular: 'ph--number-circle-seven--thin', active: 'ph--number-circle-seven--duotone' },
|
|
19
|
+
{ regular: 'ph--number-circle-eight--thin', active: 'ph--number-circle-eight--duotone' },
|
|
20
|
+
{ regular: 'ph--number-circle-nine--thin', active: 'ph--number-circle-nine--duotone' },
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
export type TabsProps = ThemedClassName<{
|
|
24
|
+
length: number;
|
|
25
|
+
selected?: number;
|
|
26
|
+
onSelect?: (index: number) => void;
|
|
27
|
+
}>;
|
|
28
|
+
|
|
29
|
+
export const Tabs = forwardRef<HTMLDivElement, TabsProps>(
|
|
30
|
+
({ classNames, length, selected = 0, onSelect }, forwardedRef) => {
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
ref={forwardedRef}
|
|
34
|
+
className={mx('flex flex-col overflow-hidden outline-none', classNames)}
|
|
35
|
+
tabIndex={-1}
|
|
36
|
+
onKeyDown={(ev) => {
|
|
37
|
+
// TODO(burdon): Focus when open Toggle.
|
|
38
|
+
switch (ev.key) {
|
|
39
|
+
case 'ArrowDown':
|
|
40
|
+
case 'ArrowRight': {
|
|
41
|
+
ev.preventDefault();
|
|
42
|
+
ev.stopPropagation();
|
|
43
|
+
if (selected < length - 1) {
|
|
44
|
+
onSelect?.(selected + 1);
|
|
45
|
+
}
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case 'ArrowUp':
|
|
49
|
+
case 'ArrowLeft': {
|
|
50
|
+
ev.preventDefault();
|
|
51
|
+
ev.stopPropagation();
|
|
52
|
+
if (selected > 0) {
|
|
53
|
+
onSelect?.(selected - 1);
|
|
54
|
+
}
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
case 'Enter': {
|
|
59
|
+
ev.preventDefault();
|
|
60
|
+
ev.stopPropagation();
|
|
61
|
+
onSelect?.(selected);
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}}
|
|
66
|
+
>
|
|
67
|
+
{Array.from({ length }).map((_, i) => {
|
|
68
|
+
const icon = numbers[i + 1];
|
|
69
|
+
return (
|
|
70
|
+
<div
|
|
71
|
+
key={i}
|
|
72
|
+
className={mx(
|
|
73
|
+
'relative flex w-[24px] h-[28px] justify-center cursor-pointer text-subdued',
|
|
74
|
+
selected === i && '!text-cyan-550 !dark:text-cyan-300',
|
|
75
|
+
)}
|
|
76
|
+
>
|
|
77
|
+
{i < length - 1 && <div className='absolute left-[11.5px] top-[21px] w-[1px] h-[10px] bg-neutral-400' />}
|
|
78
|
+
<Icon
|
|
79
|
+
icon={selected === i ? icon.regular : icon.regular}
|
|
80
|
+
classNames='z-10 !p-0 !w-[24px] !h-[24px] outline-none'
|
|
81
|
+
onClick={() => onSelect?.(i)}
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
})}
|
|
86
|
+
</div>
|
|
87
|
+
);
|
|
88
|
+
},
|
|
89
|
+
);
|