@dxos/plugin-assistant 0.7.5-labs.a8b535d
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/LICENSE +8 -0
- package/README.md +15 -0
- package/dist/lib/browser/AssistantDialog-TX6YYBUG.mjs +116 -0
- package/dist/lib/browser/AssistantDialog-TX6YYBUG.mjs.map +7 -0
- package/dist/lib/browser/ChatContainer-AT3OAUT3.mjs +33 -0
- package/dist/lib/browser/ChatContainer-AT3OAUT3.mjs.map +7 -0
- package/dist/lib/browser/TemplateContainer-B7MQNUPY.mjs +23 -0
- package/dist/lib/browser/TemplateContainer-B7MQNUPY.mjs.map +7 -0
- package/dist/lib/browser/ai-client-RTCGRKZE.mjs +22 -0
- package/dist/lib/browser/ai-client-RTCGRKZE.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-AXAIFOGV.mjs +110 -0
- package/dist/lib/browser/app-graph-builder-AXAIFOGV.mjs.map +7 -0
- package/dist/lib/browser/chunk-EUMPBC4T.mjs +81 -0
- package/dist/lib/browser/chunk-EUMPBC4T.mjs.map +7 -0
- package/dist/lib/browser/chunk-FRIKXDDQ.mjs +162 -0
- package/dist/lib/browser/chunk-FRIKXDDQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-G7B54APW.mjs +106 -0
- package/dist/lib/browser/chunk-G7B54APW.mjs.map +7 -0
- package/dist/lib/browser/chunk-NFVIZS3B.mjs +1804 -0
- package/dist/lib/browser/chunk-NFVIZS3B.mjs.map +7 -0
- package/dist/lib/browser/chunk-NV7SVHMV.mjs +20 -0
- package/dist/lib/browser/chunk-NV7SVHMV.mjs.map +7 -0
- package/dist/lib/browser/chunk-VZ4W6SHE.mjs +15 -0
- package/dist/lib/browser/chunk-VZ4W6SHE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +218 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/intent-resolver-QRVRZL6K.mjs +44 -0
- package/dist/lib/browser/intent-resolver-QRVRZL6K.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/browser/react-surface-JLXNWOI6.mjs +69 -0
- package/dist/lib/browser/react-surface-JLXNWOI6.mjs.map +7 -0
- package/dist/lib/browser/settings-JTT62IHD.mjs +22 -0
- package/dist/lib/browser/settings-JTT62IHD.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +24 -0
- package/dist/lib/browser/types/index.mjs.map +7 -0
- package/dist/lib/node/AssistantDialog-U4GBPZD6.cjs +140 -0
- package/dist/lib/node/AssistantDialog-U4GBPZD6.cjs.map +7 -0
- package/dist/lib/node/ChatContainer-CVHXNHGA.cjs +61 -0
- package/dist/lib/node/ChatContainer-CVHXNHGA.cjs.map +7 -0
- package/dist/lib/node/TemplateContainer-R4BZZP3E.cjs +53 -0
- package/dist/lib/node/TemplateContainer-R4BZZP3E.cjs.map +7 -0
- package/dist/lib/node/ai-client-YANJEPO3.cjs +38 -0
- package/dist/lib/node/ai-client-YANJEPO3.cjs.map +7 -0
- package/dist/lib/node/app-graph-builder-D7SHQTZS.cjs +122 -0
- package/dist/lib/node/app-graph-builder-D7SHQTZS.cjs.map +7 -0
- package/dist/lib/node/chunk-37GI4NYH.cjs +183 -0
- package/dist/lib/node/chunk-37GI4NYH.cjs.map +7 -0
- package/dist/lib/node/chunk-GNPXCHFT.cjs +44 -0
- package/dist/lib/node/chunk-GNPXCHFT.cjs.map +7 -0
- package/dist/lib/node/chunk-IXJCGW7U.cjs +130 -0
- package/dist/lib/node/chunk-IXJCGW7U.cjs.map +7 -0
- package/dist/lib/node/chunk-NV4TQQSU.cjs +111 -0
- package/dist/lib/node/chunk-NV4TQQSU.cjs.map +7 -0
- package/dist/lib/node/chunk-XUTDR7HI.cjs +1781 -0
- package/dist/lib/node/chunk-XUTDR7HI.cjs.map +7 -0
- package/dist/lib/node/chunk-ZGH6F5YA.cjs +34 -0
- package/dist/lib/node/chunk-ZGH6F5YA.cjs.map +7 -0
- package/dist/lib/node/index.cjs +226 -0
- package/dist/lib/node/index.cjs.map +7 -0
- package/dist/lib/node/intent-resolver-YMMAFVOB.cjs +58 -0
- package/dist/lib/node/intent-resolver-YMMAFVOB.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -0
- package/dist/lib/node/react-surface-BSUZQ3HZ.cjs +85 -0
- package/dist/lib/node/react-surface-BSUZQ3HZ.cjs.map +7 -0
- package/dist/lib/node/settings-4YEO7KXF.cjs +36 -0
- package/dist/lib/node/settings-4YEO7KXF.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +46 -0
- package/dist/lib/node/types/index.cjs.map +7 -0
- package/dist/lib/node-esm/AssistantDialog-5AT5JAZL.mjs +117 -0
- package/dist/lib/node-esm/AssistantDialog-5AT5JAZL.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-VR766C4M.mjs +34 -0
- package/dist/lib/node-esm/ChatContainer-VR766C4M.mjs.map +7 -0
- package/dist/lib/node-esm/TemplateContainer-WSHTZBB5.mjs +24 -0
- package/dist/lib/node-esm/TemplateContainer-WSHTZBB5.mjs.map +7 -0
- package/dist/lib/node-esm/ai-client-66IBZVCX.mjs +23 -0
- package/dist/lib/node-esm/ai-client-66IBZVCX.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-H2GC2AZA.mjs +111 -0
- package/dist/lib/node-esm/app-graph-builder-H2GC2AZA.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-77ARTFBA.mjs +16 -0
- package/dist/lib/node-esm/chunk-77ARTFBA.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7JENJTLB.mjs +1805 -0
- package/dist/lib/node-esm/chunk-7JENJTLB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7SV6X6XU.mjs +22 -0
- package/dist/lib/node-esm/chunk-7SV6X6XU.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-AMQMVQJO.mjs +107 -0
- package/dist/lib/node-esm/chunk-AMQMVQJO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CJ4Y3QW5.mjs +163 -0
- package/dist/lib/node-esm/chunk-CJ4Y3QW5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-LBQGJE5T.mjs +82 -0
- package/dist/lib/node-esm/chunk-LBQGJE5T.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +219 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/intent-resolver-MR7BOKEW.mjs +45 -0
- package/dist/lib/node-esm/intent-resolver-MR7BOKEW.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/react-surface-IGVYAOGL.mjs +70 -0
- package/dist/lib/node-esm/react-surface-IGVYAOGL.mjs.map +7 -0
- package/dist/lib/node-esm/settings-S7P5RWQI.mjs +23 -0
- package/dist/lib/node-esm/settings-S7P5RWQI.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +25 -0
- package/dist/lib/node-esm/types/index.mjs.map +7 -0
- package/dist/types/src/AssistantPlugin.d.ts +2 -0
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-client.d.ts +5 -0
- package/dist/types/src/capabilities/ai-client.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +181 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +5 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +183 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +4 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +4 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts +7 -0
- package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts.map +1 -0
- package/dist/types/src/components/AmbientDialog/AmbientDialog.stories.d.ts +8 -0
- package/dist/types/src/components/AmbientDialog/AmbientDialog.stories.d.ts.map +1 -0
- package/dist/types/src/components/AmbientDialog/index.d.ts +2 -0
- package/dist/types/src/components/AmbientDialog/index.d.ts.map +1 -0
- package/dist/types/src/components/AssistantDialog.d.ts +7 -0
- package/dist/types/src/components/AssistantDialog.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +5 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/index.d.ts +2 -0
- package/dist/types/src/components/AssistantSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatContainer.d.ts +7 -0
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/components/Prompt/Prompt.d.ts +17 -0
- package/dist/types/src/components/Prompt/Prompt.d.ts.map +1 -0
- package/dist/types/src/components/Prompt/Prompt.stories.d.ts +9 -0
- package/dist/types/src/components/Prompt/Prompt.stories.d.ts.map +1 -0
- package/dist/types/src/components/Prompt/PromptBar.d.ts +10 -0
- package/dist/types/src/components/Prompt/PromptBar.d.ts.map +1 -0
- package/dist/types/src/components/Prompt/autocomplete.d.ts +21 -0
- package/dist/types/src/components/Prompt/autocomplete.d.ts.map +1 -0
- package/dist/types/src/components/Prompt/index.d.ts +3 -0
- package/dist/types/src/components/Prompt/index.d.ts.map +1 -0
- package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts +5 -0
- package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts.map +1 -0
- package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts +8 -0
- package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts.map +1 -0
- package/dist/types/src/components/ServiceRegistry/index.d.ts +2 -0
- package/dist/types/src/components/ServiceRegistry/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateContainer.d.ts +7 -0
- package/dist/types/src/components/TemplateContainer.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +12 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +12 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +10 -0
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +8 -0
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/index.d.ts +2 -0
- package/dist/types/src/components/TemplateEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/types.d.ts +18 -0
- package/dist/types/src/components/TemplateEditor/types.d.ts.map +1 -0
- package/dist/types/src/components/Thread/Thread.d.ts +17 -0
- package/dist/types/src/components/Thread/Thread.d.ts.map +1 -0
- package/dist/types/src/components/Thread/Thread.stories.d.ts +11 -0
- package/dist/types/src/components/Thread/Thread.stories.d.ts.map +1 -0
- package/dist/types/src/components/Thread/ThreadContainer.d.ts +10 -0
- package/dist/types/src/components/Thread/ThreadContainer.d.ts.map +1 -0
- package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts +15 -0
- package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/Thread/ThreadMessage.d.ts +14 -0
- package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +1 -0
- package/dist/types/src/components/Thread/ToolInvocations.d.ts +13 -0
- package/dist/types/src/components/Thread/ToolInvocations.d.ts.map +1 -0
- package/dist/types/src/components/Thread/index.d.ts +3 -0
- package/dist/types/src/components/Thread/index.d.ts.map +1 -0
- package/dist/types/src/components/Thread/reducer.d.ts +12 -0
- package/dist/types/src/components/Thread/reducer.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +19 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +8 -0
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/index.d.ts +2 -0
- package/dist/types/src/components/Toolbox/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +17 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/types/src/hooks/email.d.ts +4 -0
- package/dist/types/src/hooks/email.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +7 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/invocation-handler.d.ts +5 -0
- package/dist/types/src/hooks/invocation-handler.d.ts.map +1 -0
- package/dist/types/src/hooks/processor.d.ts +76 -0
- package/dist/types/src/hooks/processor.d.ts.map +1 -0
- package/dist/types/src/hooks/processor.test.d.ts +2 -0
- package/dist/types/src/hooks/processor.test.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +8 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -0
- package/dist/types/src/hooks/useLocalTriggerManager.d.ts +3 -0
- package/dist/types/src/hooks/useLocalTriggerManager.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/hooks/useTextInputEvents.d.ts +13 -0
- package/dist/types/src/hooks/useTextInputEvents.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +5 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +11 -0
- package/dist/types/src/meta.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/test-functions.d.ts +3 -0
- 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/tools/function.d.ts +5 -0
- package/dist/types/src/tools/function.d.ts.map +1 -0
- package/dist/types/src/tools/index.d.ts +3 -0
- package/dist/types/src/tools/index.d.ts.map +1 -0
- package/dist/types/src/tools/openapi.d.ts +10 -0
- package/dist/types/src/tools/openapi.d.ts.map +1 -0
- package/dist/types/src/tools/openapi.test.d.ts +2 -0
- package/dist/types/src/tools/openapi.test.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +82 -0
- package/dist/types/src/translations.d.ts.map +1 -0
- package/dist/types/src/types/chat.d.ts +12 -0
- package/dist/types/src/types/chat.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +5 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/types/service.d.ts +160 -0
- package/dist/types/src/types/service.d.ts.map +1 -0
- package/dist/types/src/types/template.d.ts +40 -0
- package/dist/types/src/types/template.d.ts.map +1 -0
- package/dist/types/src/types/types.d.ts +37 -0
- package/dist/types/src/types/types.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +120 -0
- package/src/AssistantPlugin.tsx +105 -0
- package/src/capabilities/ai-client.ts +19 -0
- package/src/capabilities/app-graph-builder.ts +100 -0
- package/src/capabilities/capabilities.ts +12 -0
- package/src/capabilities/index.ts +13 -0
- package/src/capabilities/intent-resolver.ts +38 -0
- package/src/capabilities/react-surface.tsx +49 -0
- package/src/capabilities/settings.ts +19 -0
- package/src/components/AmbientDialog/AmbientDialog.stories.tsx +81 -0
- package/src/components/AmbientDialog/AmbientDialog.tsx +103 -0
- package/src/components/AmbientDialog/index.ts +5 -0
- package/src/components/AssistantDialog.tsx +31 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +49 -0
- package/src/components/AssistantSettings/index.ts +5 -0
- package/src/components/ChatContainer.tsx +27 -0
- package/src/components/Prompt/Prompt.stories.tsx +79 -0
- package/src/components/Prompt/Prompt.tsx +100 -0
- package/src/components/Prompt/PromptBar.tsx +100 -0
- package/src/components/Prompt/autocomplete.ts +212 -0
- package/src/components/Prompt/index.ts +6 -0
- package/src/components/ServiceRegistry/ServiceRegistry.stories.tsx +49 -0
- package/src/components/ServiceRegistry/ServiceRegistry.tsx +76 -0
- package/src/components/ServiceRegistry/index.ts +5 -0
- package/src/components/TemplateContainer.tsx +21 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +83 -0
- package/src/components/TemplateEditor/TemplateEditor.tsx +76 -0
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +65 -0
- package/src/components/TemplateEditor/TemplateForm.tsx +184 -0
- package/src/components/TemplateEditor/index.ts +5 -0
- package/src/components/TemplateEditor/types.tsx +28 -0
- package/src/components/Thread/Thread.stories.tsx +212 -0
- package/src/components/Thread/Thread.tsx +97 -0
- package/src/components/Thread/ThreadContainer.stories.tsx +268 -0
- package/src/components/Thread/ThreadContainer.tsx +79 -0
- package/src/components/Thread/ThreadMessage.tsx +188 -0
- package/src/components/Thread/ToolInvocations.tsx +104 -0
- package/src/components/Thread/index.ts +6 -0
- package/src/components/Thread/reducer.ts +52 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +69 -0
- package/src/components/Toolbox/Toolbox.tsx +115 -0
- package/src/components/Toolbox/index.ts +5 -0
- package/src/components/index.ts +15 -0
- package/src/hooks/email.ts +49 -0
- package/src/hooks/index.ts +11 -0
- package/src/hooks/invocation-handler.ts +109 -0
- package/src/hooks/processor.test.ts +15 -0
- package/src/hooks/processor.ts +228 -0
- package/src/hooks/useChatProcessor.tsx +80 -0
- package/src/hooks/useLocalTriggerManager.ts +82 -0
- package/src/hooks/useMessageQueue.ts +23 -0
- package/src/hooks/useServices.ts +28 -0
- package/src/hooks/useTextInputEvents.ts +49 -0
- package/src/index.ts +9 -0
- package/src/meta.ts +18 -0
- package/src/testing/index.ts +6 -0
- package/src/testing/test-functions.ts +11 -0
- package/src/testing/test-services.ts +131 -0
- package/src/tools/function.ts +47 -0
- package/src/tools/index.ts +6 -0
- package/src/tools/openapi.test.ts +224 -0
- package/src/tools/openapi.ts +331 -0
- package/src/translations.ts +49 -0
- package/src/types/chat.ts +11 -0
- package/src/types/index.ts +8 -0
- package/src/types/service.ts +102 -0
- package/src/types/template.ts +34 -0
- package/src/types/types.ts +41 -0
- package/src/typings.d.ts +9 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { ComputeGraph } from '@dxos/conductor';
|
|
2
|
+
import { S, type Ref$ } from '@dxos/echo-schema';
|
|
3
|
+
import { FunctionType } from '@dxos/functions';
|
|
4
|
+
export declare const ApiAuthorization: S.Union<[S.Struct<{
|
|
5
|
+
type: S.Literal<["api-key"]>;
|
|
6
|
+
key: typeof S.String;
|
|
7
|
+
placement: S.Union<[S.Struct<{
|
|
8
|
+
type: S.Literal<["authorization-header"]>;
|
|
9
|
+
}>, S.Struct<{
|
|
10
|
+
type: S.Literal<["query"]>;
|
|
11
|
+
name: typeof S.String;
|
|
12
|
+
}>]>;
|
|
13
|
+
}>, S.Struct<{
|
|
14
|
+
type: S.Literal<["oauth"]>;
|
|
15
|
+
clientId: typeof S.String;
|
|
16
|
+
clientSecret: typeof S.String;
|
|
17
|
+
tokenUrl: typeof S.String;
|
|
18
|
+
grantType: typeof S.String;
|
|
19
|
+
}>]>;
|
|
20
|
+
export type ApiAuthorization = S.Schema.Type<typeof ApiAuthorization>;
|
|
21
|
+
declare const ServiceInterface: S.Union<[S.Struct<{
|
|
22
|
+
kind: S.Literal<["function"]>;
|
|
23
|
+
fn: Ref$<FunctionType>;
|
|
24
|
+
}>, S.Struct<{
|
|
25
|
+
kind: S.Literal<["workflow"]>;
|
|
26
|
+
workflow: Ref$<ComputeGraph>;
|
|
27
|
+
}>, S.Struct<{
|
|
28
|
+
kind: S.Literal<["api"]>;
|
|
29
|
+
/**
|
|
30
|
+
* URL to fetch the openapi schema.
|
|
31
|
+
*/
|
|
32
|
+
schemaUrl: S.optional<typeof S.String>;
|
|
33
|
+
/**
|
|
34
|
+
* Inlined openapi schema.
|
|
35
|
+
*/
|
|
36
|
+
schema: S.optional<typeof S.Any>;
|
|
37
|
+
/**
|
|
38
|
+
* Authorization configuration if required.
|
|
39
|
+
*/
|
|
40
|
+
authorization: S.optional<S.Union<[S.Struct<{
|
|
41
|
+
type: S.Literal<["api-key"]>;
|
|
42
|
+
key: typeof S.String;
|
|
43
|
+
placement: S.Union<[S.Struct<{
|
|
44
|
+
type: S.Literal<["authorization-header"]>;
|
|
45
|
+
}>, S.Struct<{
|
|
46
|
+
type: S.Literal<["query"]>;
|
|
47
|
+
name: typeof S.String;
|
|
48
|
+
}>]>;
|
|
49
|
+
}>, S.Struct<{
|
|
50
|
+
type: S.Literal<["oauth"]>;
|
|
51
|
+
clientId: typeof S.String;
|
|
52
|
+
clientSecret: typeof S.String;
|
|
53
|
+
tokenUrl: typeof S.String;
|
|
54
|
+
grantType: typeof S.String;
|
|
55
|
+
}>]>>;
|
|
56
|
+
}>]>;
|
|
57
|
+
export type ServiceInterface = S.Schema.Type<typeof ServiceInterface>;
|
|
58
|
+
declare const ServiceType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
59
|
+
serviceId: typeof S.String;
|
|
60
|
+
name: S.optional<typeof S.String>;
|
|
61
|
+
description: S.optional<typeof S.String>;
|
|
62
|
+
category: S.optional<typeof S.String>;
|
|
63
|
+
enabled: S.optional<typeof S.Boolean>;
|
|
64
|
+
/**
|
|
65
|
+
* Entries exposed: functions, workflows, and APIs.
|
|
66
|
+
*/
|
|
67
|
+
interfaces: S.optional<S.Array$<S.Union<[S.Struct<{
|
|
68
|
+
kind: S.Literal<["function"]>;
|
|
69
|
+
fn: Ref$<FunctionType>;
|
|
70
|
+
}>, S.Struct<{
|
|
71
|
+
kind: S.Literal<["workflow"]>;
|
|
72
|
+
workflow: Ref$<ComputeGraph>;
|
|
73
|
+
}>, S.Struct<{
|
|
74
|
+
kind: S.Literal<["api"]>;
|
|
75
|
+
/**
|
|
76
|
+
* URL to fetch the openapi schema.
|
|
77
|
+
*/
|
|
78
|
+
schemaUrl: S.optional<typeof S.String>;
|
|
79
|
+
/**
|
|
80
|
+
* Inlined openapi schema.
|
|
81
|
+
*/
|
|
82
|
+
schema: S.optional<typeof S.Any>;
|
|
83
|
+
/**
|
|
84
|
+
* Authorization configuration if required.
|
|
85
|
+
*/
|
|
86
|
+
authorization: S.optional<S.Union<[S.Struct<{
|
|
87
|
+
type: S.Literal<["api-key"]>;
|
|
88
|
+
key: typeof S.String;
|
|
89
|
+
placement: S.Union<[S.Struct<{
|
|
90
|
+
type: S.Literal<["authorization-header"]>;
|
|
91
|
+
}>, S.Struct<{
|
|
92
|
+
type: S.Literal<["query"]>;
|
|
93
|
+
name: typeof S.String;
|
|
94
|
+
}>]>;
|
|
95
|
+
}>, S.Struct<{
|
|
96
|
+
type: S.Literal<["oauth"]>;
|
|
97
|
+
clientId: typeof S.String;
|
|
98
|
+
clientSecret: typeof S.String;
|
|
99
|
+
tokenUrl: typeof S.String;
|
|
100
|
+
grantType: typeof S.String;
|
|
101
|
+
}>]>>;
|
|
102
|
+
}>]>>>;
|
|
103
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
|
|
104
|
+
serviceId: typeof S.String;
|
|
105
|
+
name: S.optional<typeof S.String>;
|
|
106
|
+
description: S.optional<typeof S.String>;
|
|
107
|
+
category: S.optional<typeof S.String>;
|
|
108
|
+
enabled: S.optional<typeof S.Boolean>;
|
|
109
|
+
/**
|
|
110
|
+
* Entries exposed: functions, workflows, and APIs.
|
|
111
|
+
*/
|
|
112
|
+
interfaces: S.optional<S.Array$<S.Union<[S.Struct<{
|
|
113
|
+
kind: S.Literal<["function"]>;
|
|
114
|
+
fn: Ref$<FunctionType>;
|
|
115
|
+
}>, S.Struct<{
|
|
116
|
+
kind: S.Literal<["workflow"]>;
|
|
117
|
+
workflow: Ref$<ComputeGraph>;
|
|
118
|
+
}>, S.Struct<{
|
|
119
|
+
kind: S.Literal<["api"]>;
|
|
120
|
+
/**
|
|
121
|
+
* URL to fetch the openapi schema.
|
|
122
|
+
*/
|
|
123
|
+
schemaUrl: S.optional<typeof S.String>;
|
|
124
|
+
/**
|
|
125
|
+
* Inlined openapi schema.
|
|
126
|
+
*/
|
|
127
|
+
schema: S.optional<typeof S.Any>;
|
|
128
|
+
/**
|
|
129
|
+
* Authorization configuration if required.
|
|
130
|
+
*/
|
|
131
|
+
authorization: S.optional<S.Union<[S.Struct<{
|
|
132
|
+
type: S.Literal<["api-key"]>;
|
|
133
|
+
key: typeof S.String;
|
|
134
|
+
placement: S.Union<[S.Struct<{
|
|
135
|
+
type: S.Literal<["authorization-header"]>;
|
|
136
|
+
}>, S.Struct<{
|
|
137
|
+
type: S.Literal<["query"]>;
|
|
138
|
+
name: typeof S.String;
|
|
139
|
+
}>]>;
|
|
140
|
+
}>, S.Struct<{
|
|
141
|
+
type: S.Literal<["oauth"]>;
|
|
142
|
+
clientId: typeof S.String;
|
|
143
|
+
clientSecret: typeof S.String;
|
|
144
|
+
tokenUrl: typeof S.String;
|
|
145
|
+
grantType: typeof S.String;
|
|
146
|
+
}>]>>;
|
|
147
|
+
}>]>>>;
|
|
148
|
+
}>>;
|
|
149
|
+
export declare class ServiceType extends ServiceType_base {
|
|
150
|
+
}
|
|
151
|
+
export type ServiceQuery = {
|
|
152
|
+
name?: string;
|
|
153
|
+
category?: string;
|
|
154
|
+
};
|
|
155
|
+
export interface BaseServiceRegistry {
|
|
156
|
+
queryServices(query?: ServiceQuery): Promise<ServiceType[]>;
|
|
157
|
+
}
|
|
158
|
+
export declare const categoryIcons: Record<string, string>;
|
|
159
|
+
export {};
|
|
160
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/types/service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAO,CAAC,EAAe,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAwB/C,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;;;;;;;IASpE;;OAEG;;;YAvCsB,IAAI,CAAC,YAAY,CAAC;;;kBAKZ,IAAI,CAAC,YAAY,CAAC;;;QAMjD;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;IAcH;;OAEG;;;YAvCsB,IAAI,CAAC,YAAY,CAAC;;;kBAKZ,IAAI,CAAC,YAAY,CAAC;;;QAMjD;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;;;;;;;AAOL,qBAAa,WAAY,SAAQ,gBAW/B;CAAG;AAML,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"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { S } from '@dxos/echo-schema';
|
|
2
|
+
export declare enum TemplateInputType {
|
|
3
|
+
VALUE = 0,
|
|
4
|
+
PASS_THROUGH = 1,
|
|
5
|
+
RETRIEVER = 2,
|
|
6
|
+
FUNCTION = 3,
|
|
7
|
+
QUERY = 4,
|
|
8
|
+
RESOLVER = 5,
|
|
9
|
+
CONTEXT = 6,
|
|
10
|
+
SCHEMA = 7
|
|
11
|
+
}
|
|
12
|
+
export declare const TemplateInputSchema: S.mutable<S.Struct<{
|
|
13
|
+
name: typeof S.String;
|
|
14
|
+
type: S.optional<S.Enums<typeof TemplateInputType>>;
|
|
15
|
+
value: S.optional<typeof S.String>;
|
|
16
|
+
}>>;
|
|
17
|
+
export type TemplateInput = S.Schema.Type<typeof TemplateInputSchema>;
|
|
18
|
+
declare const TemplateType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
19
|
+
name: S.optional<typeof S.String>;
|
|
20
|
+
source: typeof S.String;
|
|
21
|
+
inputs: S.optional<S.mutable<S.Array$<S.mutable<S.Struct<{
|
|
22
|
+
name: typeof S.String;
|
|
23
|
+
type: S.optional<S.Enums<typeof TemplateInputType>>;
|
|
24
|
+
value: S.optional<typeof S.String>;
|
|
25
|
+
}>>>>>;
|
|
26
|
+
command: S.optional<typeof S.String>;
|
|
27
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
|
|
28
|
+
name: S.optional<typeof S.String>;
|
|
29
|
+
source: typeof S.String;
|
|
30
|
+
inputs: S.optional<S.mutable<S.Array$<S.mutable<S.Struct<{
|
|
31
|
+
name: typeof S.String;
|
|
32
|
+
type: S.optional<S.Enums<typeof TemplateInputType>>;
|
|
33
|
+
value: S.optional<typeof S.String>;
|
|
34
|
+
}>>>>>;
|
|
35
|
+
command: S.optional<typeof S.String>;
|
|
36
|
+
}>>;
|
|
37
|
+
export declare class TemplateType extends TemplateType_base {
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../../src/types/template.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAGnD,oBAAY,iBAAiB;IAC3B,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,mBAAmB;;;;GAM/B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,mBAAmB,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;AAEtE,qBAAa,YAAa,SAAQ,iBAKhC;CAAG"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { S } from '@dxos/echo-schema';
|
|
2
|
+
import { AIChatType } from './chat';
|
|
3
|
+
import { TemplateType } from './template';
|
|
4
|
+
export declare namespace AssistantAction {
|
|
5
|
+
const CreateChat_base: S.TaggedClass<CreateChat, "dxos.org/plugin/assistant/action/create-chat", {
|
|
6
|
+
readonly _tag: S.tag<"dxos.org/plugin/assistant/action/create-chat">;
|
|
7
|
+
} & {
|
|
8
|
+
input: S.Struct<{
|
|
9
|
+
spaceId: S.optional<typeof S.String>;
|
|
10
|
+
name: S.optional<typeof S.String>;
|
|
11
|
+
}>;
|
|
12
|
+
output: S.Struct<{
|
|
13
|
+
object: typeof AIChatType;
|
|
14
|
+
}>;
|
|
15
|
+
}>;
|
|
16
|
+
export class CreateChat extends CreateChat_base {
|
|
17
|
+
}
|
|
18
|
+
const CreateTemplate_base: S.TaggedClass<CreateTemplate, "dxos.org/plugin/assistant/action/create-template", {
|
|
19
|
+
readonly _tag: S.tag<"dxos.org/plugin/assistant/action/create-template">;
|
|
20
|
+
} & {
|
|
21
|
+
input: S.Struct<{
|
|
22
|
+
name: S.optional<typeof S.String>;
|
|
23
|
+
}>;
|
|
24
|
+
output: S.Struct<{
|
|
25
|
+
object: typeof TemplateType;
|
|
26
|
+
}>;
|
|
27
|
+
}>;
|
|
28
|
+
export class CreateTemplate extends CreateTemplate_base {
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
31
|
+
}
|
|
32
|
+
export declare const AssistantSettingsSchema: S.mutable<S.Struct<{
|
|
33
|
+
llmModel: S.optional<typeof S.String>;
|
|
34
|
+
customPrompts: S.optional<typeof S.Boolean>;
|
|
35
|
+
}>>;
|
|
36
|
+
export type AssistantSettingsProps = S.Schema.Type<typeof AssistantSettingsSchema>;
|
|
37
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG1C,yBAAiB,eAAe,CAAC;;;;;;;;;;;;IAG/B,MAAM,OAAO,UAAW,SAAQ,eAQ9B;KAAG;;;;;;;;;;;IAEL,MAAM,OAAO,cAAe,SAAQ,mBAOlC;KAAG;;CACN;AAED,eAAO,MAAM,uBAAuB;;;GAKnC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"5.7.3"}
|
package/package.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dxos/plugin-assistant",
|
|
3
|
+
"version": "0.7.5-labs.a8b535d",
|
|
4
|
+
"description": "Assistant plugin",
|
|
5
|
+
"homepage": "https://dxos.org",
|
|
6
|
+
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"author": "DXOS.org",
|
|
9
|
+
"sideEffects": true,
|
|
10
|
+
"type": "module",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/types/src/index.d.ts",
|
|
14
|
+
"browser": "./dist/lib/browser/index.mjs",
|
|
15
|
+
"node": "./dist/lib/node-esm/index.mjs"
|
|
16
|
+
},
|
|
17
|
+
"./types": {
|
|
18
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
19
|
+
"browser": "./dist/lib/browser/types/index.mjs",
|
|
20
|
+
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"types": "dist/types/src/index.d.ts",
|
|
24
|
+
"typesVersions": {
|
|
25
|
+
"*": {
|
|
26
|
+
"types": [
|
|
27
|
+
"dist/types/src/types/index.d.ts"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"assets",
|
|
33
|
+
"dist",
|
|
34
|
+
"src"
|
|
35
|
+
],
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@codemirror/autocomplete": "^6.18.1",
|
|
38
|
+
"@codemirror/language": "^6.10.3",
|
|
39
|
+
"@codemirror/search": "^6.5.6",
|
|
40
|
+
"@codemirror/state": "^6.4.1",
|
|
41
|
+
"@codemirror/view": "^6.34.1",
|
|
42
|
+
"@effect/schema": "^0.75.5",
|
|
43
|
+
"@lezer/highlight": "^1.2.1",
|
|
44
|
+
"@preact/signals-core": "^1.6.0",
|
|
45
|
+
"@xiechao/codemirror-lang-handlebars": "1.0.4",
|
|
46
|
+
"jsonpointer": "^5.0.1",
|
|
47
|
+
"lodash.get": "^4.4.2",
|
|
48
|
+
"unified": "^11.0.0",
|
|
49
|
+
"@dxos/app-framework": "0.7.5-labs.a8b535d",
|
|
50
|
+
"@dxos/artifact": "0.7.5-labs.a8b535d",
|
|
51
|
+
"@dxos/assistant": "0.7.5-labs.a8b535d",
|
|
52
|
+
"@dxos/async": "0.7.5-labs.a8b535d",
|
|
53
|
+
"@dxos/client": "0.7.5-labs.a8b535d",
|
|
54
|
+
"@dxos/compute": "0.7.5-labs.a8b535d",
|
|
55
|
+
"@dxos/context": "0.7.5-labs.a8b535d",
|
|
56
|
+
"@dxos/conductor": "0.7.5-labs.a8b535d",
|
|
57
|
+
"@dxos/echo-schema": "0.7.5-labs.a8b535d",
|
|
58
|
+
"@dxos/echo-db": "0.7.5-labs.a8b535d",
|
|
59
|
+
"@dxos/edge-client": "0.7.5-labs.a8b535d",
|
|
60
|
+
"@dxos/functions": "0.7.5-labs.a8b535d",
|
|
61
|
+
"@dxos/keys": "0.7.5-labs.a8b535d",
|
|
62
|
+
"@dxos/invariant": "0.7.5-labs.a8b535d",
|
|
63
|
+
"@dxos/local-storage": "0.7.5-labs.a8b535d",
|
|
64
|
+
"@dxos/live-object": "0.7.5-labs.a8b535d",
|
|
65
|
+
"@dxos/plugin-client": "0.7.5-labs.a8b535d",
|
|
66
|
+
"@dxos/log": "0.7.5-labs.a8b535d",
|
|
67
|
+
"@dxos/plugin-deck": "0.7.5-labs.a8b535d",
|
|
68
|
+
"@dxos/plugin-graph": "0.7.5-labs.a8b535d",
|
|
69
|
+
"@dxos/plugin-inbox": "0.7.5-labs.a8b535d",
|
|
70
|
+
"@dxos/plugin-markdown": "0.7.5-labs.a8b535d",
|
|
71
|
+
"@dxos/plugin-script": "0.7.5-labs.a8b535d",
|
|
72
|
+
"@dxos/plugin-sketch": "0.7.5-labs.a8b535d",
|
|
73
|
+
"@dxos/plugin-stack": "0.7.5-labs.a8b535d",
|
|
74
|
+
"@dxos/plugin-space": "0.7.5-labs.a8b535d",
|
|
75
|
+
"@dxos/plugin-wnfs": "0.7.5-labs.a8b535d",
|
|
76
|
+
"@dxos/plugin-transcription": "0.7.5-labs.a8b535d",
|
|
77
|
+
"@dxos/react-client": "0.7.5-labs.a8b535d",
|
|
78
|
+
"@dxos/react-edge-client": "0.7.5-labs.a8b535d",
|
|
79
|
+
"@dxos/react-ui-canvas-compute": "0.7.5-labs.a8b535d",
|
|
80
|
+
"@dxos/react-ui-components": "0.7.5-labs.a8b535d",
|
|
81
|
+
"@dxos/react-ui-dnd": "0.7.5-labs.a8b535d",
|
|
82
|
+
"@dxos/react-ui-canvas-editor": "0.7.5-labs.a8b535d",
|
|
83
|
+
"@dxos/react-ui-editor": "0.7.5-labs.a8b535d",
|
|
84
|
+
"@dxos/react-ui-form": "0.7.5-labs.a8b535d",
|
|
85
|
+
"@dxos/react-ui-list": "0.7.5-labs.a8b535d",
|
|
86
|
+
"@dxos/react-ui-sfx": "0.7.5-labs.a8b535d",
|
|
87
|
+
"@dxos/react-ui-stack": "0.7.5-labs.a8b535d",
|
|
88
|
+
"@dxos/react-ui-syntax-highlighter": "0.7.5-labs.a8b535d",
|
|
89
|
+
"@dxos/schema": "0.7.5-labs.a8b535d",
|
|
90
|
+
"@dxos/util": "0.7.5-labs.a8b535d"
|
|
91
|
+
},
|
|
92
|
+
"devDependencies": {
|
|
93
|
+
"@types/lodash.get": "^4.4.7",
|
|
94
|
+
"@types/react": "~18.2.0",
|
|
95
|
+
"@types/react-dom": "~18.2.0",
|
|
96
|
+
"openapi-types": "^12.1.3",
|
|
97
|
+
"react": "~18.2.0",
|
|
98
|
+
"react-dom": "~18.2.0",
|
|
99
|
+
"vite": "5.4.7",
|
|
100
|
+
"@dxos/echo-db": "0.7.5-labs.a8b535d",
|
|
101
|
+
"@dxos/artifact-testing": "0.7.5-labs.a8b535d",
|
|
102
|
+
"@dxos/plugin-chess": "0.7.5-labs.a8b535d",
|
|
103
|
+
"@dxos/plugin-inbox": "0.7.5-labs.a8b535d",
|
|
104
|
+
"@dxos/plugin-map": "0.7.5-labs.a8b535d",
|
|
105
|
+
"@dxos/plugin-table": "0.7.5-labs.a8b535d",
|
|
106
|
+
"@dxos/random": "0.7.5-labs.a8b535d",
|
|
107
|
+
"@dxos/react-ui-theme": "0.7.5-labs.a8b535d",
|
|
108
|
+
"@dxos/react-ui": "0.7.5-labs.a8b535d",
|
|
109
|
+
"@dxos/storybook-utils": "0.7.5-labs.a8b535d"
|
|
110
|
+
},
|
|
111
|
+
"peerDependencies": {
|
|
112
|
+
"react": "~18.2.0",
|
|
113
|
+
"react-dom": "~18.2.0",
|
|
114
|
+
"@dxos/react-ui": "0.7.5-labs.a8b535d",
|
|
115
|
+
"@dxos/react-ui-theme": "0.7.5-labs.a8b535d"
|
|
116
|
+
},
|
|
117
|
+
"publishConfig": {
|
|
118
|
+
"access": "public"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';
|
|
6
|
+
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
7
|
+
import { DeckCapabilities, DeckEvents } from '@dxos/plugin-deck';
|
|
8
|
+
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
9
|
+
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
10
|
+
|
|
11
|
+
import { AiClient, AppGraphBuilder, IntentResolver, ReactSurface, AssistantSettings } from './capabilities';
|
|
12
|
+
import { ASSISTANT_PLUGIN, meta } from './meta';
|
|
13
|
+
import translations from './translations';
|
|
14
|
+
import { AssistantAction, AIChatType, ServiceType, TemplateType } from './types';
|
|
15
|
+
|
|
16
|
+
export const AssistantPlugin = () =>
|
|
17
|
+
definePlugin(meta, [
|
|
18
|
+
defineModule({
|
|
19
|
+
id: `${meta.id}/module/translations`,
|
|
20
|
+
activatesOn: Events.SetupTranslations,
|
|
21
|
+
activate: () => contributes(Capabilities.Translations, translations),
|
|
22
|
+
}),
|
|
23
|
+
defineModule({
|
|
24
|
+
id: `${meta.id}/module/settings`,
|
|
25
|
+
activatesOn: Events.SetupSettings,
|
|
26
|
+
activate: AssistantSettings,
|
|
27
|
+
}),
|
|
28
|
+
defineModule({
|
|
29
|
+
id: `${meta.id}/module/metadata`,
|
|
30
|
+
activatesOn: Events.SetupMetadata,
|
|
31
|
+
activate: () => [
|
|
32
|
+
contributes(Capabilities.Metadata, {
|
|
33
|
+
id: TemplateType.typename,
|
|
34
|
+
metadata: {
|
|
35
|
+
placeholder: ['template title placeholder', { ns: ASSISTANT_PLUGIN }],
|
|
36
|
+
icon: 'ph--code-block--regular',
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
contributes(Capabilities.Metadata, {
|
|
40
|
+
id: AIChatType.typename,
|
|
41
|
+
metadata: {
|
|
42
|
+
placeholder: ['chat title placeholder', { ns: ASSISTANT_PLUGIN }],
|
|
43
|
+
icon: 'ph--atom--regular',
|
|
44
|
+
},
|
|
45
|
+
}),
|
|
46
|
+
],
|
|
47
|
+
}),
|
|
48
|
+
defineModule({
|
|
49
|
+
id: `${meta.id}/module/object-form`,
|
|
50
|
+
activatesOn: ClientEvents.SetupSchema,
|
|
51
|
+
activate: () => [
|
|
52
|
+
contributes(
|
|
53
|
+
SpaceCapabilities.ObjectForm,
|
|
54
|
+
defineObjectForm({
|
|
55
|
+
objectSchema: AIChatType,
|
|
56
|
+
getIntent: (_, options) => createIntent(AssistantAction.CreateChat, { spaceId: options.space.id }),
|
|
57
|
+
}),
|
|
58
|
+
),
|
|
59
|
+
contributes(
|
|
60
|
+
SpaceCapabilities.ObjectForm,
|
|
61
|
+
defineObjectForm({
|
|
62
|
+
objectSchema: TemplateType,
|
|
63
|
+
getIntent: () => createIntent(AssistantAction.CreateTemplate),
|
|
64
|
+
}),
|
|
65
|
+
),
|
|
66
|
+
],
|
|
67
|
+
}),
|
|
68
|
+
defineModule({
|
|
69
|
+
id: `${meta.id}/module/schema`,
|
|
70
|
+
activatesOn: ClientEvents.SetupSchema,
|
|
71
|
+
activate: () => contributes(ClientCapabilities.Schema, [ServiceType, TemplateType]),
|
|
72
|
+
}),
|
|
73
|
+
defineModule({
|
|
74
|
+
id: `${meta.id}/module/complementary-panels`,
|
|
75
|
+
activatesOn: DeckEvents.SetupComplementaryPanels,
|
|
76
|
+
activate: () =>
|
|
77
|
+
contributes(DeckCapabilities.ComplementaryPanel, {
|
|
78
|
+
id: 'service-registry',
|
|
79
|
+
label: ['service registry label', { ns: ASSISTANT_PLUGIN }],
|
|
80
|
+
icon: 'ph--plugs--regular',
|
|
81
|
+
}),
|
|
82
|
+
}),
|
|
83
|
+
defineModule({
|
|
84
|
+
id: `${meta.id}/module/react-surface`,
|
|
85
|
+
activatesOn: Events.SetupReactSurface,
|
|
86
|
+
// TODO(wittjosiah): Should occur before the chat is loaded when surfaces activation is more granular.
|
|
87
|
+
activatesBefore: [Events.SetupArtifactDefinition],
|
|
88
|
+
activate: ReactSurface,
|
|
89
|
+
}),
|
|
90
|
+
defineModule({
|
|
91
|
+
id: `${meta.id}/module/app-graph-builder`,
|
|
92
|
+
activatesOn: Events.SetupAppGraph,
|
|
93
|
+
activate: AppGraphBuilder,
|
|
94
|
+
}),
|
|
95
|
+
defineModule({
|
|
96
|
+
id: `${meta.id}/module/intent-resolver`,
|
|
97
|
+
activatesOn: Events.SetupIntentResolver,
|
|
98
|
+
activate: IntentResolver,
|
|
99
|
+
}),
|
|
100
|
+
defineModule({
|
|
101
|
+
id: `${meta.id}/module/ai-client`,
|
|
102
|
+
activatesOn: ClientEvents.ClientReady,
|
|
103
|
+
activate: AiClient,
|
|
104
|
+
}),
|
|
105
|
+
]);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { contributes, type PluginsContext } from '@dxos/app-framework';
|
|
6
|
+
import { AIServiceClientImpl } from '@dxos/assistant';
|
|
7
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
8
|
+
|
|
9
|
+
import { AssistantCapabilities } from './capabilities';
|
|
10
|
+
|
|
11
|
+
// TODO(wittjosiah): Factor out.
|
|
12
|
+
const DEFAULT_AI_SERVICE_URL = 'http://localhost:8788';
|
|
13
|
+
|
|
14
|
+
export default (context: PluginsContext) => {
|
|
15
|
+
const client = context.requestCapability(ClientCapabilities.Client);
|
|
16
|
+
const endpoint = client.config.values.runtime?.services?.ai?.server ?? DEFAULT_AI_SERVICE_URL;
|
|
17
|
+
const aiClient = new AIServiceClientImpl({ endpoint });
|
|
18
|
+
return contributes(AssistantCapabilities.AiClient, aiClient);
|
|
19
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Capabilities,
|
|
7
|
+
contributes,
|
|
8
|
+
createIntent,
|
|
9
|
+
LayoutAction,
|
|
10
|
+
type PromiseIntentDispatcher,
|
|
11
|
+
type PluginsContext,
|
|
12
|
+
} from '@dxos/app-framework';
|
|
13
|
+
import { invariant } from '@dxos/invariant';
|
|
14
|
+
import { log } from '@dxos/log';
|
|
15
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
16
|
+
import { createExtension, type Node, ROOT_ID } from '@dxos/plugin-graph';
|
|
17
|
+
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
18
|
+
import { type Space, Filter, getSpace } from '@dxos/react-client/echo';
|
|
19
|
+
|
|
20
|
+
import { ASSISTANT_DIALOG, ASSISTANT_PLUGIN } from '../meta';
|
|
21
|
+
import { AIChatType, AssistantAction } from '../types';
|
|
22
|
+
|
|
23
|
+
export default (context: PluginsContext) =>
|
|
24
|
+
contributes(Capabilities.AppGraphBuilder, [
|
|
25
|
+
createExtension({
|
|
26
|
+
id: `${ASSISTANT_PLUGIN}/assistant`,
|
|
27
|
+
filter: (node): node is Node<null> => node.id === ROOT_ID,
|
|
28
|
+
actions: () => [
|
|
29
|
+
{
|
|
30
|
+
id: `${LayoutAction.UpdateDialog._tag}/assistant/open`,
|
|
31
|
+
data: async () => {
|
|
32
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
33
|
+
const client = context.requestCapability(ClientCapabilities.Client);
|
|
34
|
+
const layout = context.requestCapability(Capabilities.Layout);
|
|
35
|
+
const { graph } = context.requestCapability(Capabilities.AppGraph);
|
|
36
|
+
|
|
37
|
+
// TODO(burdon): Get space from workspace.
|
|
38
|
+
// TODO(burdon): If need to create chat, then add to dispatch stack below.
|
|
39
|
+
let chat: AIChatType | undefined;
|
|
40
|
+
if (layout.active.length > 0) {
|
|
41
|
+
const node = graph.findNode(layout.active[0]);
|
|
42
|
+
if (node) {
|
|
43
|
+
const space = getSpace(node.data);
|
|
44
|
+
if (space) {
|
|
45
|
+
chat = await getOrCreateChat(dispatch, space);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
} else {
|
|
49
|
+
const space = client.spaces.default;
|
|
50
|
+
chat = await getOrCreateChat(dispatch, space);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!chat) {
|
|
54
|
+
log.warn('no chat found');
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
await dispatch(
|
|
59
|
+
createIntent(LayoutAction.UpdateDialog, {
|
|
60
|
+
part: 'dialog',
|
|
61
|
+
subject: ASSISTANT_DIALOG,
|
|
62
|
+
options: {
|
|
63
|
+
state: true,
|
|
64
|
+
blockAlign: 'end',
|
|
65
|
+
props: {
|
|
66
|
+
chat,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
}),
|
|
70
|
+
);
|
|
71
|
+
},
|
|
72
|
+
properties: {
|
|
73
|
+
label: ['open assistant label', { ns: ASSISTANT_PLUGIN }],
|
|
74
|
+
icon: 'ph--chat-centered-text--regular',
|
|
75
|
+
disposition: 'pin-end',
|
|
76
|
+
position: 'hoist',
|
|
77
|
+
keyBinding: {
|
|
78
|
+
macos: 'shift+meta+k',
|
|
79
|
+
windows: 'shift+ctrl+k',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
}),
|
|
85
|
+
]);
|
|
86
|
+
|
|
87
|
+
// TODO(burdon): Factor out.
|
|
88
|
+
const getOrCreateChat = async (dispatch: PromiseIntentDispatcher, space: Space): Promise<AIChatType | undefined> => {
|
|
89
|
+
const { objects } = await space.db.query(Filter.schema(AIChatType)).run();
|
|
90
|
+
// console.log('objects', JSON.stringify(objects, null, 2));
|
|
91
|
+
if (objects.length > 0) {
|
|
92
|
+
// TODO(burdon): Is this the most recent?
|
|
93
|
+
return objects[objects.length - 1];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const { data } = await dispatch(createIntent(AssistantAction.CreateChat, { spaceId: space.id }));
|
|
97
|
+
invariant(data?.object instanceof AIChatType);
|
|
98
|
+
await dispatch(createIntent(SpaceAction.AddObject, { target: space, object: data.object }));
|
|
99
|
+
return data.object;
|
|
100
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { defineCapability } from '@dxos/app-framework';
|
|
6
|
+
import { type AIServiceClientImpl } from '@dxos/assistant';
|
|
7
|
+
|
|
8
|
+
import { ASSISTANT_PLUGIN } from '../meta';
|
|
9
|
+
|
|
10
|
+
export namespace AssistantCapabilities {
|
|
11
|
+
export const AiClient = defineCapability<AIServiceClientImpl>(`${ASSISTANT_PLUGIN}/capability/ai-client`);
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { lazy } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
export const AiClient = lazy(() => import('./ai-client'));
|
|
8
|
+
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
9
|
+
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
10
|
+
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
11
|
+
export const AssistantSettings = lazy(() => import('./settings'));
|
|
12
|
+
|
|
13
|
+
export * from './capabilities';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Capabilities, contributes, createResolver } from '@dxos/app-framework';
|
|
6
|
+
import { ObjectId } from '@dxos/echo-schema';
|
|
7
|
+
import { DXN, QueueSubspaceTags } from '@dxos/keys';
|
|
8
|
+
import { create, refFromDXN } from '@dxos/live-object';
|
|
9
|
+
|
|
10
|
+
import { AssistantAction, AIChatType, TemplateType } from '../types';
|
|
11
|
+
|
|
12
|
+
export default () => [
|
|
13
|
+
contributes(
|
|
14
|
+
Capabilities.IntentResolver,
|
|
15
|
+
createResolver({
|
|
16
|
+
intent: AssistantAction.CreateChat,
|
|
17
|
+
resolve: ({ spaceId, name }) => ({
|
|
18
|
+
data: {
|
|
19
|
+
object: create(AIChatType, {
|
|
20
|
+
name,
|
|
21
|
+
queue: refFromDXN(new DXN(DXN.kind.QUEUE, [QueueSubspaceTags.DATA, spaceId, ObjectId.random()])),
|
|
22
|
+
}),
|
|
23
|
+
},
|
|
24
|
+
}),
|
|
25
|
+
}),
|
|
26
|
+
),
|
|
27
|
+
contributes(
|
|
28
|
+
Capabilities.IntentResolver,
|
|
29
|
+
createResolver({
|
|
30
|
+
intent: AssistantAction.CreateTemplate,
|
|
31
|
+
resolve: ({ name }) => ({
|
|
32
|
+
data: {
|
|
33
|
+
object: create(TemplateType, { name, source: '{{! Template }}' }),
|
|
34
|
+
},
|
|
35
|
+
}),
|
|
36
|
+
}),
|
|
37
|
+
),
|
|
38
|
+
];
|