@dxos/plugin-assistant 0.8.4-main.c1de068 → 0.8.4-main.fd6878d
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/{TemplateContainer-RPJ2LBOB.mjs → BlueprintContainer-H7H4BQ2C.mjs} +11 -9
- package/dist/lib/browser/BlueprintContainer-H7H4BQ2C.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-M3IHQLRS.mjs → ChatContainer-OUVSX5V5.mjs} +35 -13
- package/dist/lib/browser/ChatContainer-OUVSX5V5.mjs.map +7 -0
- package/dist/lib/browser/{ChatDialog-X6VN6QZI.mjs → ChatDialog-P4FLEOHG.mjs} +21 -7
- package/dist/lib/browser/ChatDialog-P4FLEOHG.mjs.map +7 -0
- package/dist/lib/browser/{SequenceContainer-3UDVKWPA.mjs → SequenceContainer-627OQ557.mjs} +3 -2
- package/dist/lib/browser/SequenceContainer-627OQ557.mjs.map +7 -0
- package/dist/lib/browser/ai-service-7KJ5LXBT.mjs +22 -0
- package/dist/lib/browser/ai-service-7KJ5LXBT.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-JTXBKE7O.mjs → app-graph-builder-AVHHQ3KV.mjs} +17 -74
- package/dist/lib/browser/app-graph-builder-AVHHQ3KV.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-CMGIZAOW.mjs +146 -0
- package/dist/lib/browser/blueprint-definition-CMGIZAOW.mjs.map +7 -0
- package/dist/lib/browser/chunk-BRLHDHOF.mjs +244 -0
- package/dist/lib/browser/chunk-BRLHDHOF.mjs.map +7 -0
- package/dist/lib/browser/chunk-HRLMD35M.mjs +191 -0
- package/dist/lib/browser/chunk-HRLMD35M.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-LKP65RPA.mjs +20 -0
- package/dist/lib/browser/{chunk-FDCJSQYF.mjs.map → chunk-LKP65RPA.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-AEAEKWOC.mjs → chunk-NZDCKQ6W.mjs} +12 -21
- package/dist/lib/browser/chunk-NZDCKQ6W.mjs.map +7 -0
- package/dist/lib/browser/chunk-QB7OVS6Z.mjs +16 -0
- package/dist/lib/browser/chunk-QB7OVS6Z.mjs.map +7 -0
- package/dist/lib/browser/{chunk-OWY4CUQY.mjs → chunk-VEBVAHNM.mjs} +799 -813
- package/dist/lib/browser/chunk-VEBVAHNM.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-2HB4PCWH.mjs +24 -0
- package/dist/lib/browser/edge-model-resolver-2HB4PCWH.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +96 -51
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-5RMMCMXG.mjs → intent-resolver-MVOIEJXZ.mjs} +33 -12
- package/dist/lib/browser/intent-resolver-MVOIEJXZ.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-66VY37YQ.mjs → react-surface-4HXS3YLT.mjs} +45 -32
- package/dist/lib/browser/react-surface-4HXS3YLT.mjs.map +7 -0
- package/dist/lib/browser/{settings-2DGP3UTS.mjs → settings-G2EZXMWT.mjs} +6 -5
- package/dist/lib/{node-esm/settings-47RYZOU4.mjs.map → browser/settings-G2EZXMWT.mjs.map} +1 -1
- package/dist/lib/browser/toolkit-IW4FBLLB.mjs +105 -0
- package/dist/lib/browser/toolkit-IW4FBLLB.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -4
- package/dist/lib/node-esm/{TemplateContainer-A3NAQCZE.mjs → BlueprintContainer-VH4EE4CM.mjs} +11 -9
- package/dist/lib/node-esm/BlueprintContainer-VH4EE4CM.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-VZT74PO2.mjs → ChatContainer-D5FABDNE.mjs} +35 -13
- package/dist/lib/node-esm/ChatContainer-D5FABDNE.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatDialog-RJ6FDX4Q.mjs → ChatDialog-NKWVXHJP.mjs} +21 -7
- package/dist/lib/node-esm/ChatDialog-NKWVXHJP.mjs.map +7 -0
- package/dist/lib/node-esm/{SequenceContainer-RQQH5XOC.mjs → SequenceContainer-EQ5NP2PG.mjs} +3 -2
- package/dist/lib/node-esm/SequenceContainer-EQ5NP2PG.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-LDD32477.mjs +23 -0
- package/dist/lib/node-esm/ai-service-LDD32477.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-OWSOXFTD.mjs → app-graph-builder-RMOUJMMG.mjs} +17 -74
- package/dist/lib/node-esm/app-graph-builder-RMOUJMMG.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-AEWYMW6I.mjs +147 -0
- package/dist/lib/node-esm/blueprint-definition-AEWYMW6I.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-SENTQAEO.mjs → chunk-3SOC5GOP.mjs} +799 -813
- package/dist/lib/node-esm/chunk-3SOC5GOP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-F7RXCX5Y.mjs +192 -0
- package/dist/lib/node-esm/chunk-F7RXCX5Y.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-2XL6MNPE.mjs → chunk-GAWXJ7K5.mjs} +12 -21
- package/dist/lib/node-esm/chunk-GAWXJ7K5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-KOC6ESG7.mjs +22 -0
- package/dist/lib/node-esm/{chunk-QN2H2EHV.mjs.map → chunk-KOC6ESG7.mjs.map} +1 -1
- package/dist/lib/node-esm/chunk-RD755HN3.mjs +245 -0
- package/dist/lib/node-esm/chunk-RD755HN3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-X6AANUHZ.mjs +17 -0
- package/dist/lib/node-esm/chunk-X6AANUHZ.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-UDDR2IA6.mjs +25 -0
- package/dist/lib/node-esm/edge-model-resolver-UDDR2IA6.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +96 -51
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-YPPYELY3.mjs → intent-resolver-DTDNCX3C.mjs} +33 -12
- package/dist/lib/node-esm/intent-resolver-DTDNCX3C.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-RJMRBR2M.mjs → react-surface-V6JNEZVO.mjs} +45 -32
- package/dist/lib/node-esm/react-surface-V6JNEZVO.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-47RYZOU4.mjs → settings-AIP5FOJG.mjs} +6 -5
- package/dist/lib/{browser/settings-2DGP3UTS.mjs.map → node-esm/settings-AIP5FOJG.mjs.map} +1 -1
- package/dist/lib/node-esm/toolkit-2VNUL77B.mjs +106 -0
- package/dist/lib/node-esm/toolkit-2VNUL77B.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -4
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +5 -0
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +3 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +11 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +5 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +5 -0
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/BlueprintContainer.d.ts +8 -0
- package/dist/types/src/components/BlueprintContainer.d.ts.map +1 -0
- package/dist/types/src/components/Chat/Chat.d.ts +6 -8
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +5 -4
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +13 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +3 -3
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts +4 -3
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +2 -2
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +33 -48
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/SequenceContainer.d.ts.map +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +2 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +2 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/Timeline/Timeline.d.ts +24 -0
- package/dist/types/src/components/Timeline/Timeline.d.ts.map +1 -0
- package/dist/types/src/components/Timeline/Timeline.stories.d.ts +9 -0
- package/dist/types/src/components/Timeline/Timeline.stories.d.ts.map +1 -0
- package/dist/types/src/components/Timeline/index.d.ts +2 -0
- package/dist/types/src/components/Timeline/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +4 -7
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +1 -2
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/functions/analysis.d.ts +5 -0
- package/dist/types/src/functions/analysis.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +4 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/list.d.ts +10 -0
- package/dist/types/src/functions/list.d.ts.map +1 -0
- package/dist/types/src/functions/load.d.ts +8 -0
- package/dist/types/src/functions/load.d.ts.map +1 -0
- package/dist/types/src/hooks/chat-processor.d.ts +28 -42
- package/dist/types/src/hooks/chat-processor.d.ts.map +1 -1
- package/dist/types/src/hooks/errors.d.ts +4 -0
- package/dist/types/src/hooks/errors.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +5 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/presets.d.ts +2 -2
- package/dist/types/src/hooks/presets.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +21 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +7 -14
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +3 -4
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useOnline.d.ts +3 -0
- package/dist/types/src/hooks/useOnline.d.ts.map +1 -0
- package/dist/types/src/hooks/usePresets.d.ts +7 -0
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/hooks/useResolveRef.d.ts +4 -0
- package/dist/types/src/hooks/useResolveRef.d.ts.map +1 -0
- package/dist/types/src/parser/filter-generator.d.ts.map +1 -1
- package/dist/types/src/parser/query-parser.d.ts.map +1 -1
- package/dist/types/src/stories/Chat.stories.d.ts +68 -49
- package/dist/types/src/stories/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +5 -0
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ChatContainer.d.ts +5 -0
- package/dist/types/src/stories/components/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/GraphContainer.d.ts +6 -0
- package/dist/types/src/stories/components/GraphContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/LoggingContainer.d.ts +5 -0
- package/dist/types/src/stories/components/LoggingContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/SurfaceContainer.d.ts +8 -0
- package/dist/types/src/stories/components/SurfaceContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/TasksContainer.d.ts +5 -0
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/index.d.ts +8 -0
- package/dist/types/src/stories/components/index.d.ts.map +1 -0
- package/dist/types/src/stories/components/types.d.ts +7 -0
- package/dist/types/src/stories/components/types.d.ts.map +1 -0
- package/dist/types/src/stories/hooks/index.d.ts +3 -0
- package/dist/types/src/stories/hooks/index.d.ts.map +1 -0
- package/dist/types/src/stories/hooks/useFlush.d.ts +6 -0
- package/dist/types/src/stories/hooks/useFlush.d.ts.map +1 -0
- package/dist/types/src/stories/hooks/useMatcherExtension.d.ts +3 -0
- package/dist/types/src/stories/hooks/useMatcherExtension.d.ts.map +1 -0
- package/dist/types/src/stories/testing/data.d.ts +142 -0
- package/dist/types/src/stories/testing/data.d.ts.map +1 -0
- package/dist/types/src/stories/testing/index.d.ts +3 -0
- package/dist/types/src/stories/testing/index.d.ts.map +1 -0
- package/dist/types/src/stories/testing/testing.d.ts +26 -0
- package/dist/types/src/stories/testing/testing.d.ts.map +1 -0
- package/dist/types/src/testing/test-functions.d.ts +5 -2
- package/dist/types/src/testing/test-functions.d.ts.map +1 -1
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/tools/function.d.ts.map +1 -1
- package/dist/types/src/tools/openapi.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +6 -10
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +40 -0
- package/dist/types/src/types/Assistant.d.ts.map +1 -0
- package/dist/types/src/types/AssistantAction.d.ts +90 -0
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -0
- package/dist/types/src/types/defs.d.ts +2 -0
- package/dist/types/src/types/defs.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +6 -6
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +81 -75
- package/src/AssistantPlugin.tsx +59 -12
- package/src/capabilities/ai-service.ts +28 -0
- package/src/capabilities/app-graph-builder.ts +9 -93
- package/src/capabilities/blueprint-definition.ts +32 -0
- package/src/capabilities/capabilities.ts +22 -0
- package/src/capabilities/edge-model-resolver.ts +29 -0
- package/src/capabilities/index.ts +6 -0
- package/src/capabilities/intent-resolver.ts +24 -9
- package/src/capabilities/react-surface.tsx +29 -22
- package/src/capabilities/toolkit.ts +106 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +1 -1
- package/src/components/BlueprintContainer.tsx +24 -0
- package/src/components/Chat/Chat.tsx +77 -64
- package/src/components/ChatContainer.tsx +37 -13
- package/src/components/ChatDialog.tsx +9 -5
- package/src/components/ChatPrompt/ChatOptions.tsx +59 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +11 -9
- package/src/components/ChatPrompt/index.ts +1 -1
- package/src/components/ChatThread/ChatMessage.tsx +132 -118
- package/src/components/ChatThread/ChatThread.stories.tsx +220 -103
- package/src/components/ChatThread/ChatThread.tsx +2 -2
- package/src/components/ChatThread/Link.tsx +39 -0
- package/src/components/ChatThread/ToolBlock.tsx +20 -16
- package/src/components/SequenceContainer.tsx +2 -1
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +3 -2
- package/src/components/SequenceEditor/SequenceEditor.tsx +1 -1
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +12 -5
- package/src/components/TemplateEditor/TemplateEditor.tsx +15 -12
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +12 -5
- package/src/components/TemplateEditor/TemplateForm.tsx +5 -3
- package/src/components/Timeline/Timeline.stories.tsx +53 -0
- package/src/components/Timeline/Timeline.tsx +159 -0
- package/src/components/Timeline/index.ts +5 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +6 -12
- package/src/components/Toolbox/Toolbox.tsx +16 -40
- package/src/components/index.ts +2 -5
- package/src/events.ts +2 -2
- package/src/functions/analysis.ts +20 -0
- package/src/functions/index.ts +7 -0
- package/src/functions/list.ts +42 -0
- package/src/functions/load.ts +43 -0
- package/src/hooks/chat-processor.ts +123 -177
- package/src/hooks/errors.ts +8 -0
- package/src/hooks/index.ts +5 -1
- package/src/hooks/presets.ts +6 -5
- package/src/hooks/useBlueprintRegistry.ts +79 -0
- package/src/hooks/useChatProcessor.ts +21 -83
- package/src/hooks/useChatServices.ts +35 -54
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +45 -0
- package/src/hooks/useReferencesProvider.ts +11 -9
- package/src/hooks/useResolveRef.ts +33 -0
- package/src/parser/filter-generator.ts +6 -13
- package/src/parser/query-parser.ts +1 -1
- package/src/queue-logger.ts +5 -5
- package/src/stories/Chat.stories.tsx +238 -299
- package/src/stories/components/BlueprintContainer.tsx +34 -0
- package/src/stories/components/ChatContainer.tsx +80 -0
- package/src/stories/components/GraphContainer.tsx +118 -0
- package/src/stories/components/LoggingContainer.tsx +22 -0
- package/src/stories/components/SurfaceContainer.tsx +62 -0
- package/src/stories/components/TasksContainer.tsx +51 -0
- package/src/stories/components/index.ts +12 -0
- package/src/stories/components/types.ts +11 -0
- package/src/stories/hooks/index.ts +6 -0
- package/src/stories/hooks/useFlush.ts +35 -0
- package/src/stories/hooks/useMatcherExtension.ts +45 -0
- package/src/stories/testing/data.ts +130 -0
- package/src/stories/testing/index.ts +6 -0
- package/src/stories/testing/testing.tsx +162 -0
- package/src/testing/test-functions.ts +8 -3
- package/src/testing/test-sequence.ts +1 -1
- package/src/tools/function.ts +4 -1
- package/src/tools/openapi.test.ts +7 -5
- package/src/tools/openapi.ts +4 -1
- package/src/translations.ts +8 -10
- package/src/types/Assistant.ts +59 -0
- package/src/types/AssistantAction.ts +54 -0
- package/src/types/defs.ts +5 -0
- package/src/types/index.ts +4 -1
- package/dist/lib/browser/ChatContainer-M3IHQLRS.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-X6VN6QZI.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs.map +0 -7
- package/dist/lib/browser/TemplateContainer-RPJ2LBOB.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-JTXBKE7O.mjs.map +0 -7
- package/dist/lib/browser/chunk-AEAEKWOC.mjs.map +0 -7
- package/dist/lib/browser/chunk-EQDW6BYQ.mjs +0 -108
- package/dist/lib/browser/chunk-EQDW6BYQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-FDCJSQYF.mjs +0 -40
- package/dist/lib/browser/chunk-JQBVLTM5.mjs +0 -158
- package/dist/lib/browser/chunk-JQBVLTM5.mjs.map +0 -7
- package/dist/lib/browser/chunk-OWY4CUQY.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-5RMMCMXG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-66VY37YQ.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-VZT74PO2.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-RJ6FDX4Q.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs.map +0 -7
- package/dist/lib/node-esm/TemplateContainer-A3NAQCZE.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-OWSOXFTD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2XL6MNPE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BISJDTBK.mjs +0 -159
- package/dist/lib/node-esm/chunk-BISJDTBK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E33DNNDW.mjs +0 -109
- package/dist/lib/node-esm/chunk-E33DNNDW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QN2H2EHV.mjs +0 -41
- package/dist/lib/node-esm/chunk-SENTQAEO.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-YPPYELY3.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-RJMRBR2M.mjs.map +0 -7
- package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts +0 -9
- package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts.map +0 -1
- package/dist/types/src/components/TemplateContainer.d.ts +0 -8
- package/dist/types/src/components/TemplateContainer.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.test.d.ts +0 -2
- package/dist/types/src/hooks/chat-processor.test.d.ts.map +0 -1
- package/dist/types/src/hooks/useBlueprints.d.ts +0 -9
- package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -88
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
- package/src/components/TemplateContainer.tsx +0 -24
- package/src/hooks/chat-processor.test.ts +0 -16
- package/src/hooks/useBlueprints.ts +0 -57
- package/src/types/schema.ts +0 -95
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-assistant",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.fd6878d",
|
|
4
4
|
"description": "Assistant plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -10,11 +10,13 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"source": "./src/index.ts",
|
|
13
14
|
"types": "./dist/types/src/index.d.ts",
|
|
14
15
|
"browser": "./dist/lib/browser/index.mjs",
|
|
15
16
|
"node": "./dist/lib/node-esm/index.mjs"
|
|
16
17
|
},
|
|
17
18
|
"./types": {
|
|
19
|
+
"source": "./src/types/index.ts",
|
|
18
20
|
"types": "./dist/types/src/types/index.d.ts",
|
|
19
21
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
20
22
|
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
@@ -39,100 +41,104 @@
|
|
|
39
41
|
"@codemirror/search": "^6.5.6",
|
|
40
42
|
"@codemirror/state": "^6.4.1",
|
|
41
43
|
"@codemirror/view": "^6.34.1",
|
|
42
|
-
"@effect/ai": "0.
|
|
44
|
+
"@effect/ai": "0.25.2",
|
|
45
|
+
"@effect/ai-anthropic": "^0.15.1",
|
|
43
46
|
"@lezer/highlight": "^1.2.1",
|
|
44
47
|
"@preact-signals/safe-react": "^0.9.0",
|
|
45
48
|
"@preact/signals-core": "^1.9.0",
|
|
46
49
|
"@preact/signals-react": "^3.2.0",
|
|
47
50
|
"@radix-ui/react-context": "1.1.1",
|
|
48
51
|
"@xiechao/codemirror-lang-handlebars": "1.0.4",
|
|
49
|
-
"effect": "3.17.
|
|
52
|
+
"effect": "3.17.7",
|
|
50
53
|
"exa-js": "^1.5.12",
|
|
51
54
|
"json5": "^2.2.3",
|
|
52
55
|
"jsonpointer": "^5.0.1",
|
|
53
56
|
"lodash.defaultsdeep": "^4.6.1",
|
|
54
57
|
"unified": "^11.0.0",
|
|
55
58
|
"use-deep-compare-effect": "^1.8.1",
|
|
56
|
-
"@dxos/ai": "0.8.4-main.
|
|
57
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/blueprints": "0.8.4-main.
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/conductor": "0.8.4-main.
|
|
63
|
-
"@dxos/config": "0.8.4-main.
|
|
64
|
-
"@dxos/context": "0.8.4-main.
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/echo
|
|
69
|
-
"@dxos/echo-
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/local-storage": "0.8.4-main.
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/log": "0.8.4-main.
|
|
81
|
-
"@dxos/plugin-
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/plugin-
|
|
84
|
-
"@dxos/plugin-explorer": "0.8.4-main.
|
|
85
|
-
"@dxos/plugin-
|
|
86
|
-
"@dxos/plugin-inbox": "0.8.4-main.
|
|
87
|
-
"@dxos/plugin-
|
|
88
|
-
"@dxos/plugin-
|
|
89
|
-
"@dxos/plugin-
|
|
90
|
-
"@dxos/plugin-
|
|
91
|
-
"@dxos/plugin-
|
|
92
|
-
"@dxos/plugin-
|
|
93
|
-
"@dxos/plugin-
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/react-
|
|
99
|
-
"@dxos/react-ui-
|
|
100
|
-
"@dxos/react-ui-canvas-
|
|
101
|
-
"@dxos/react-ui-
|
|
102
|
-
"@dxos/react-ui-
|
|
103
|
-
"@dxos/react-
|
|
104
|
-
"@dxos/react-ui-
|
|
105
|
-
"@dxos/react-ui-
|
|
106
|
-
"@dxos/react-ui-
|
|
107
|
-
"@dxos/react-ui-sfx": "0.8.4-main.
|
|
108
|
-
"@dxos/react-ui-
|
|
109
|
-
"@dxos/react-ui-
|
|
110
|
-
"@dxos/
|
|
111
|
-
"@dxos/
|
|
59
|
+
"@dxos/ai": "0.8.4-main.fd6878d",
|
|
60
|
+
"@dxos/app-framework": "0.8.4-main.fd6878d",
|
|
61
|
+
"@dxos/async": "0.8.4-main.fd6878d",
|
|
62
|
+
"@dxos/blueprints": "0.8.4-main.fd6878d",
|
|
63
|
+
"@dxos/assistant": "0.8.4-main.fd6878d",
|
|
64
|
+
"@dxos/client": "0.8.4-main.fd6878d",
|
|
65
|
+
"@dxos/conductor": "0.8.4-main.fd6878d",
|
|
66
|
+
"@dxos/config": "0.8.4-main.fd6878d",
|
|
67
|
+
"@dxos/context": "0.8.4-main.fd6878d",
|
|
68
|
+
"@dxos/compute": "0.8.4-main.fd6878d",
|
|
69
|
+
"@dxos/devtools": "0.8.4-main.fd6878d",
|
|
70
|
+
"@dxos/debug": "0.8.4-main.fd6878d",
|
|
71
|
+
"@dxos/echo": "0.8.4-main.fd6878d",
|
|
72
|
+
"@dxos/echo-db": "0.8.4-main.fd6878d",
|
|
73
|
+
"@dxos/edge-client": "0.8.4-main.fd6878d",
|
|
74
|
+
"@dxos/effect": "0.8.4-main.fd6878d",
|
|
75
|
+
"@dxos/functions": "0.8.4-main.fd6878d",
|
|
76
|
+
"@dxos/graph": "0.8.4-main.fd6878d",
|
|
77
|
+
"@dxos/invariant": "0.8.4-main.fd6878d",
|
|
78
|
+
"@dxos/keys": "0.8.4-main.fd6878d",
|
|
79
|
+
"@dxos/echo-schema": "0.8.4-main.fd6878d",
|
|
80
|
+
"@dxos/live-object": "0.8.4-main.fd6878d",
|
|
81
|
+
"@dxos/local-storage": "0.8.4-main.fd6878d",
|
|
82
|
+
"@dxos/plugin-attention": "0.8.4-main.fd6878d",
|
|
83
|
+
"@dxos/log": "0.8.4-main.fd6878d",
|
|
84
|
+
"@dxos/plugin-board": "0.8.4-main.fd6878d",
|
|
85
|
+
"@dxos/echo-protocol": "0.8.4-main.fd6878d",
|
|
86
|
+
"@dxos/plugin-deck": "0.8.4-main.fd6878d",
|
|
87
|
+
"@dxos/plugin-explorer": "0.8.4-main.fd6878d",
|
|
88
|
+
"@dxos/plugin-client": "0.8.4-main.fd6878d",
|
|
89
|
+
"@dxos/plugin-inbox": "0.8.4-main.fd6878d",
|
|
90
|
+
"@dxos/plugin-graph": "0.8.4-main.fd6878d",
|
|
91
|
+
"@dxos/plugin-markdown": "0.8.4-main.fd6878d",
|
|
92
|
+
"@dxos/plugin-map": "0.8.4-main.fd6878d",
|
|
93
|
+
"@dxos/plugin-preview": "0.8.4-main.fd6878d",
|
|
94
|
+
"@dxos/plugin-script": "0.8.4-main.fd6878d",
|
|
95
|
+
"@dxos/plugin-space": "0.8.4-main.fd6878d",
|
|
96
|
+
"@dxos/plugin-sketch": "0.8.4-main.fd6878d",
|
|
97
|
+
"@dxos/plugin-stack": "0.8.4-main.fd6878d",
|
|
98
|
+
"@dxos/plugin-transcription": "0.8.4-main.fd6878d",
|
|
99
|
+
"@dxos/plugin-wnfs": "0.8.4-main.fd6878d",
|
|
100
|
+
"@dxos/protocols": "0.8.4-main.fd6878d",
|
|
101
|
+
"@dxos/react-client": "0.8.4-main.fd6878d",
|
|
102
|
+
"@dxos/react-ui-attention": "0.8.4-main.fd6878d",
|
|
103
|
+
"@dxos/react-ui-canvas-editor": "0.8.4-main.fd6878d",
|
|
104
|
+
"@dxos/react-ui-canvas-compute": "0.8.4-main.fd6878d",
|
|
105
|
+
"@dxos/react-ui-chat": "0.8.4-main.fd6878d",
|
|
106
|
+
"@dxos/react-edge-client": "0.8.4-main.fd6878d",
|
|
107
|
+
"@dxos/react-ui-components": "0.8.4-main.fd6878d",
|
|
108
|
+
"@dxos/react-ui-form": "0.8.4-main.fd6878d",
|
|
109
|
+
"@dxos/react-ui-graph": "0.8.4-main.fd6878d",
|
|
110
|
+
"@dxos/react-ui-sfx": "0.8.4-main.fd6878d",
|
|
111
|
+
"@dxos/react-ui-editor": "0.8.4-main.fd6878d",
|
|
112
|
+
"@dxos/react-ui-list": "0.8.4-main.fd6878d",
|
|
113
|
+
"@dxos/react-ui-stack": "0.8.4-main.fd6878d",
|
|
114
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.fd6878d",
|
|
115
|
+
"@dxos/schema": "0.8.4-main.fd6878d",
|
|
116
|
+
"@dxos/util": "0.8.4-main.fd6878d",
|
|
117
|
+
"@dxos/react-ui-tag-picker": "0.8.4-main.fd6878d"
|
|
112
118
|
},
|
|
113
119
|
"devDependencies": {
|
|
114
120
|
"@effect-rx/rx-react": "^0.38.0",
|
|
115
|
-
"@effect/platform": "0.
|
|
121
|
+
"@effect/platform": "0.90.2",
|
|
116
122
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
117
123
|
"@types/react": "~18.2.0",
|
|
118
124
|
"@types/react-dom": "~18.2.0",
|
|
119
|
-
"effect": "3.17.
|
|
125
|
+
"effect": "3.17.7",
|
|
120
126
|
"openapi-types": "^12.1.3",
|
|
121
127
|
"react": "~18.2.0",
|
|
122
128
|
"react-dom": "~18.2.0",
|
|
123
129
|
"vite": "5.4.7",
|
|
124
|
-
"@dxos/assistant-testing": "0.8.4-main.
|
|
125
|
-
"@dxos/
|
|
126
|
-
"@dxos/
|
|
127
|
-
"@dxos/plugin-
|
|
128
|
-
"@dxos/plugin-
|
|
129
|
-
"@dxos/plugin-
|
|
130
|
-
"@dxos/
|
|
131
|
-
"@dxos/
|
|
132
|
-
"@dxos/
|
|
133
|
-
"@dxos/react-ui-menu": "0.8.4-main.
|
|
134
|
-
"@dxos/
|
|
135
|
-
"@dxos/
|
|
130
|
+
"@dxos/assistant-testing": "0.8.4-main.fd6878d",
|
|
131
|
+
"@dxos/echo-db": "0.8.4-main.fd6878d",
|
|
132
|
+
"@dxos/plugin-chess": "0.8.4-main.fd6878d",
|
|
133
|
+
"@dxos/plugin-map": "0.8.4-main.fd6878d",
|
|
134
|
+
"@dxos/plugin-markdown": "0.8.4-main.fd6878d",
|
|
135
|
+
"@dxos/plugin-inbox": "0.8.4-main.fd6878d",
|
|
136
|
+
"@dxos/plugin-table": "0.8.4-main.fd6878d",
|
|
137
|
+
"@dxos/random": "0.8.4-main.fd6878d",
|
|
138
|
+
"@dxos/react-ui": "0.8.4-main.fd6878d",
|
|
139
|
+
"@dxos/react-ui-menu": "0.8.4-main.fd6878d",
|
|
140
|
+
"@dxos/react-ui-theme": "0.8.4-main.fd6878d",
|
|
141
|
+
"@dxos/storybook-utils": "0.8.4-main.fd6878d"
|
|
136
142
|
},
|
|
137
143
|
"peerDependencies": {
|
|
138
144
|
"@effect-rx/rx-react": "^0.34.1",
|
|
@@ -140,8 +146,8 @@
|
|
|
140
146
|
"effect": "^3.13.3",
|
|
141
147
|
"react": "~18.2.0",
|
|
142
148
|
"react-dom": "~18.2.0",
|
|
143
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
144
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
149
|
+
"@dxos/react-ui": "0.8.4-main.fd6878d",
|
|
150
|
+
"@dxos/react-ui-theme": "0.8.4-main.fd6878d"
|
|
145
151
|
},
|
|
146
152
|
"publishConfig": {
|
|
147
153
|
"access": "public"
|
package/src/AssistantPlugin.tsx
CHANGED
|
@@ -3,17 +3,27 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capabilities, Events, contributes, createIntent, defineModule, definePlugin } from '@dxos/app-framework';
|
|
6
|
-
import {
|
|
6
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
7
7
|
import { Sequence } from '@dxos/conductor';
|
|
8
8
|
import { Type } from '@dxos/echo';
|
|
9
9
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
10
10
|
import { SpaceCapabilities, SpaceEvents } from '@dxos/plugin-space';
|
|
11
11
|
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
AiService,
|
|
15
|
+
AppGraphBuilder,
|
|
16
|
+
BlueprintDefinition,
|
|
17
|
+
EdgeModelResolver,
|
|
18
|
+
IntentResolver,
|
|
19
|
+
ReactSurface,
|
|
20
|
+
Settings,
|
|
21
|
+
Toolkit,
|
|
22
|
+
} from './capabilities';
|
|
23
|
+
import { AssistantEvents } from './events';
|
|
14
24
|
import { meta } from './meta';
|
|
15
25
|
import { translations } from './translations';
|
|
16
|
-
import { Assistant, ServiceType } from './types';
|
|
26
|
+
import { Assistant, AssistantAction, ServiceType } from './types';
|
|
17
27
|
|
|
18
28
|
export const AssistantPlugin = () =>
|
|
19
29
|
definePlugin(meta, [
|
|
@@ -32,15 +42,21 @@ export const AssistantPlugin = () =>
|
|
|
32
42
|
activatesOn: Events.SetupMetadata,
|
|
33
43
|
activate: () => [
|
|
34
44
|
contributes(Capabilities.Metadata, {
|
|
35
|
-
id: Type.getTypename(
|
|
45
|
+
id: Type.getTypename(Assistant.Chat),
|
|
36
46
|
metadata: {
|
|
37
|
-
icon: 'ph--
|
|
47
|
+
icon: 'ph--atom--regular',
|
|
38
48
|
},
|
|
39
49
|
}),
|
|
40
50
|
contributes(Capabilities.Metadata, {
|
|
41
|
-
id: Type.getTypename(
|
|
51
|
+
id: Type.getTypename(Blueprint.Blueprint),
|
|
42
52
|
metadata: {
|
|
43
|
-
icon: 'ph--
|
|
53
|
+
icon: 'ph--blueprint--regular',
|
|
54
|
+
},
|
|
55
|
+
}),
|
|
56
|
+
contributes(Capabilities.Metadata, {
|
|
57
|
+
id: Type.getTypename(Sequence),
|
|
58
|
+
metadata: {
|
|
59
|
+
icon: 'ph--circuitry--regular',
|
|
44
60
|
},
|
|
45
61
|
}),
|
|
46
62
|
],
|
|
@@ -53,14 +69,22 @@ export const AssistantPlugin = () =>
|
|
|
53
69
|
SpaceCapabilities.ObjectForm,
|
|
54
70
|
defineObjectForm({
|
|
55
71
|
objectSchema: Assistant.Chat,
|
|
56
|
-
getIntent: (_, options) => createIntent(
|
|
72
|
+
getIntent: (_, options) => createIntent(AssistantAction.CreateChat, { space: options.space }),
|
|
73
|
+
}),
|
|
74
|
+
),
|
|
75
|
+
contributes(
|
|
76
|
+
SpaceCapabilities.ObjectForm,
|
|
77
|
+
defineObjectForm({
|
|
78
|
+
objectSchema: Blueprint.Blueprint,
|
|
79
|
+
formSchema: AssistantAction.BlueprintForm,
|
|
80
|
+
getIntent: (props) => createIntent(AssistantAction.CreateBlueprint, props),
|
|
57
81
|
}),
|
|
58
82
|
),
|
|
59
83
|
contributes(
|
|
60
84
|
SpaceCapabilities.ObjectForm,
|
|
61
85
|
defineObjectForm({
|
|
62
86
|
objectSchema: Sequence,
|
|
63
|
-
getIntent: () => createIntent(
|
|
87
|
+
getIntent: () => createIntent(AssistantAction.CreateSequence),
|
|
64
88
|
}),
|
|
65
89
|
),
|
|
66
90
|
],
|
|
@@ -68,14 +92,14 @@ export const AssistantPlugin = () =>
|
|
|
68
92
|
defineModule({
|
|
69
93
|
id: `${meta.id}/module/schema`,
|
|
70
94
|
activatesOn: ClientEvents.SetupSchema,
|
|
71
|
-
activate: () => contributes(ClientCapabilities.Schema, [ServiceType,
|
|
95
|
+
activate: () => contributes(ClientCapabilities.Schema, [ServiceType, Assistant.CompanionTo]),
|
|
72
96
|
}),
|
|
73
97
|
defineModule({
|
|
74
98
|
id: `${meta.id}/module/on-space-created`,
|
|
75
99
|
activatesOn: SpaceEvents.SpaceCreated,
|
|
76
100
|
activate: () =>
|
|
77
|
-
contributes(SpaceCapabilities.OnSpaceCreated, ({
|
|
78
|
-
createIntent(
|
|
101
|
+
contributes(SpaceCapabilities.OnSpaceCreated, ({ rootCollection, space }) =>
|
|
102
|
+
createIntent(AssistantAction.OnSpaceCreated, { rootCollection, space }),
|
|
79
103
|
),
|
|
80
104
|
}),
|
|
81
105
|
defineModule({
|
|
@@ -95,4 +119,27 @@ export const AssistantPlugin = () =>
|
|
|
95
119
|
activatesBefore: [Events.SetupArtifactDefinition],
|
|
96
120
|
activate: ReactSurface,
|
|
97
121
|
}),
|
|
122
|
+
defineModule({
|
|
123
|
+
id: `${meta.id}/module/ai-model-resolver`,
|
|
124
|
+
activatesOn: AssistantEvents.SetupAiServiceProviders,
|
|
125
|
+
activate: EdgeModelResolver,
|
|
126
|
+
}),
|
|
127
|
+
defineModule({
|
|
128
|
+
id: `${meta.id}/module/ai-service`,
|
|
129
|
+
activatesBefore: [AssistantEvents.SetupAiServiceProviders],
|
|
130
|
+
// TODO(dmaretskyi): This should activate lazily when the AI chat is used.
|
|
131
|
+
activatesOn: Events.Startup,
|
|
132
|
+
activate: AiService,
|
|
133
|
+
}),
|
|
134
|
+
defineModule({
|
|
135
|
+
id: `${meta.id}/module/blueprint`,
|
|
136
|
+
activatesOn: Events.SetupArtifactDefinition,
|
|
137
|
+
activate: BlueprintDefinition,
|
|
138
|
+
}),
|
|
139
|
+
defineModule({
|
|
140
|
+
id: `${meta.id}/module/toolkit`,
|
|
141
|
+
// TODO(wittjosiah): Use a different event.
|
|
142
|
+
activatesOn: Events.Startup,
|
|
143
|
+
activate: Toolkit,
|
|
144
|
+
}),
|
|
98
145
|
]);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Effect, Layer } from 'effect';
|
|
6
|
+
|
|
7
|
+
import { AiServiceRouter } from '@dxos/ai';
|
|
8
|
+
import { type PluginContext, contributes } from '@dxos/app-framework';
|
|
9
|
+
|
|
10
|
+
import { AssistantCapabilities } from './capabilities';
|
|
11
|
+
|
|
12
|
+
export default (context: PluginContext) => {
|
|
13
|
+
const resolvers = context.getCapabilities(AssistantCapabilities.AiModelResolver);
|
|
14
|
+
|
|
15
|
+
// TODO(dmaretskyi): Extract function to reduce them.
|
|
16
|
+
const combinedLayer = resolvers.reduce(
|
|
17
|
+
(acc, resolver) => resolver.pipe(Layer.provide(acc)),
|
|
18
|
+
AiServiceRouter.AiModelResolver.fromModelMap(Effect.succeed({})), // Empty resolver as fallback.
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
return [
|
|
22
|
+
// TODO(dmaretskyi): Read config from settings.
|
|
23
|
+
contributes(
|
|
24
|
+
AssistantCapabilities.AiServiceLayer,
|
|
25
|
+
AiServiceRouter.AiModelResolver.buildAiService.pipe(Layer.provide(combinedLayer)),
|
|
26
|
+
),
|
|
27
|
+
];
|
|
28
|
+
};
|
|
@@ -7,33 +7,24 @@ import { Option, pipe } from 'effect';
|
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
Capabilities,
|
|
10
|
-
contributes,
|
|
11
|
-
createIntent,
|
|
12
10
|
LayoutAction,
|
|
13
|
-
type PromiseIntentDispatcher,
|
|
14
11
|
type PluginContext,
|
|
12
|
+
type PromiseIntentDispatcher,
|
|
13
|
+
contributes,
|
|
14
|
+
createIntent,
|
|
15
15
|
} from '@dxos/app-framework';
|
|
16
|
-
import { Template } from '@dxos/blueprints';
|
|
17
16
|
import { Sequence } from '@dxos/conductor';
|
|
18
17
|
import { Obj } from '@dxos/echo';
|
|
19
18
|
import { invariant } from '@dxos/invariant';
|
|
20
19
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
20
|
+
import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
21
|
+
import { ROOT_ID, createExtension } from '@dxos/plugin-graph';
|
|
23
22
|
import { getActiveSpace, rxFromQuery } from '@dxos/plugin-space';
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
type Space,
|
|
27
|
-
Filter,
|
|
28
|
-
Query,
|
|
29
|
-
type QueryResult,
|
|
30
|
-
fullyQualifiedId,
|
|
31
|
-
getSpace,
|
|
32
|
-
isSpace,
|
|
33
|
-
} from '@dxos/react-client/echo';
|
|
23
|
+
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
24
|
+
import { Filter, Query, type QueryResult, type Space, fullyQualifiedId, getSpace } from '@dxos/react-client/echo';
|
|
34
25
|
|
|
35
26
|
import { ASSISTANT_DIALOG, meta } from '../meta';
|
|
36
|
-
import { Assistant } from '../types';
|
|
27
|
+
import { Assistant, AssistantAction } from '../types';
|
|
37
28
|
|
|
38
29
|
export default (context: PluginContext) =>
|
|
39
30
|
contributes(Capabilities.AppGraphBuilder, [
|
|
@@ -152,81 +143,6 @@ export default (context: PluginContext) =>
|
|
|
152
143
|
),
|
|
153
144
|
),
|
|
154
145
|
}),
|
|
155
|
-
|
|
156
|
-
createExtension({
|
|
157
|
-
id: `${meta.id}/root`,
|
|
158
|
-
connector: (node) => {
|
|
159
|
-
let query: QueryResult<Template.Template> | undefined;
|
|
160
|
-
return Rx.make((get) =>
|
|
161
|
-
pipe(
|
|
162
|
-
get(node),
|
|
163
|
-
Option.flatMap((node) =>
|
|
164
|
-
node.type === SPACE_TYPE && isSpace(node.data) ? Option.some(node.data) : Option.none(),
|
|
165
|
-
),
|
|
166
|
-
Option.map((space) => {
|
|
167
|
-
if (!query) {
|
|
168
|
-
query = space.db.query(Query.type(Template.Template));
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
const templates = get(rxFromQuery(query));
|
|
172
|
-
return templates.length > 0
|
|
173
|
-
? [
|
|
174
|
-
{
|
|
175
|
-
id: `${meta.id}/templates`,
|
|
176
|
-
type: `${meta.id}/templates`,
|
|
177
|
-
data: null,
|
|
178
|
-
properties: {
|
|
179
|
-
label: ['templates label', { ns: meta.id }],
|
|
180
|
-
icon: 'ph--file-code--regular',
|
|
181
|
-
space,
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
]
|
|
185
|
-
: [];
|
|
186
|
-
}),
|
|
187
|
-
Option.getOrElse(() => []),
|
|
188
|
-
),
|
|
189
|
-
);
|
|
190
|
-
},
|
|
191
|
-
}),
|
|
192
|
-
|
|
193
|
-
createExtension({
|
|
194
|
-
id: `${meta.id}/templates`,
|
|
195
|
-
connector: (node) => {
|
|
196
|
-
let query: QueryResult<Template.Template> | undefined;
|
|
197
|
-
return Rx.make((get) =>
|
|
198
|
-
pipe(
|
|
199
|
-
get(node),
|
|
200
|
-
Option.flatMap((node) =>
|
|
201
|
-
node.id === `${meta.id}/templates` && isSpace(node.properties.space)
|
|
202
|
-
? Option.some(node.properties.space)
|
|
203
|
-
: Option.none(),
|
|
204
|
-
),
|
|
205
|
-
Option.map((space) => {
|
|
206
|
-
if (!query) {
|
|
207
|
-
query = space.db.query(Query.type(Template.Template));
|
|
208
|
-
}
|
|
209
|
-
return get(rxFromQuery(query))
|
|
210
|
-
.toSorted((a, b) => {
|
|
211
|
-
const nameA = a.name ?? '';
|
|
212
|
-
const nameB = b.name ?? '';
|
|
213
|
-
return nameA.localeCompare(nameB);
|
|
214
|
-
})
|
|
215
|
-
.map((template) => ({
|
|
216
|
-
id: fullyQualifiedId(template),
|
|
217
|
-
type: `${meta.id}/template`,
|
|
218
|
-
data: template,
|
|
219
|
-
properties: {
|
|
220
|
-
label: template.name ?? ['object placeholder', { ns: meta.id }],
|
|
221
|
-
icon: 'ph--file-code--regular',
|
|
222
|
-
},
|
|
223
|
-
}));
|
|
224
|
-
}),
|
|
225
|
-
Option.getOrElse(() => []),
|
|
226
|
-
),
|
|
227
|
-
);
|
|
228
|
-
},
|
|
229
|
-
}),
|
|
230
146
|
]);
|
|
231
147
|
|
|
232
148
|
// TODO(burdon): Factor out.
|
|
@@ -246,7 +162,7 @@ const getOrCreateChat = async (
|
|
|
246
162
|
return chats[chats.length - 1];
|
|
247
163
|
}
|
|
248
164
|
|
|
249
|
-
const { data } = await dispatch(createIntent(
|
|
165
|
+
const { data } = await dispatch(createIntent(AssistantAction.CreateChat, { space }));
|
|
250
166
|
invariant(Obj.instanceOf(Assistant.Chat, data?.object));
|
|
251
167
|
await dispatch(createIntent(SpaceAction.AddObject, { target: space, object: data.object }));
|
|
252
168
|
return data.object;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { ToolId } from '@dxos/ai';
|
|
6
|
+
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
7
|
+
import { templates } from '@dxos/assistant';
|
|
8
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
9
|
+
|
|
10
|
+
import { analysis, list, load } from '../functions';
|
|
11
|
+
|
|
12
|
+
const functions = [analysis, list, load];
|
|
13
|
+
const tools: string[] = [
|
|
14
|
+
'get-schemas',
|
|
15
|
+
'create-record',
|
|
16
|
+
// 'open-item'
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
export default () => {
|
|
20
|
+
return [
|
|
21
|
+
contributes(
|
|
22
|
+
Capabilities.BlueprintDefinition,
|
|
23
|
+
Blueprint.make({
|
|
24
|
+
key: 'dxos.org/blueprint/assistant',
|
|
25
|
+
name: 'Assistant',
|
|
26
|
+
instructions: templates.system,
|
|
27
|
+
tools: [...functions.map((tool) => ToolId.make(tool.name)), ...tools.map((tool) => ToolId.make(tool))],
|
|
28
|
+
}),
|
|
29
|
+
),
|
|
30
|
+
contributes(Capabilities.Functions, functions),
|
|
31
|
+
];
|
|
32
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Layer } from 'effect';
|
|
6
|
+
|
|
7
|
+
import { type AiService, type AiServiceRouter } from '@dxos/ai';
|
|
8
|
+
import { defineCapability } from '@dxos/app-framework';
|
|
9
|
+
|
|
10
|
+
import { meta } from '../meta';
|
|
11
|
+
|
|
12
|
+
export namespace AssistantCapabilities {
|
|
13
|
+
export type AiServiceLayer = Layer.Layer<AiService.AiService>;
|
|
14
|
+
export const AiServiceLayer = defineCapability<AiServiceLayer>(`${meta.id}/capability/ai-service-factory`);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Plugins can contribute them to provide model resolvers.
|
|
18
|
+
*/
|
|
19
|
+
export const AiModelResolver = defineCapability<Layer.Layer<AiServiceRouter.AiModelResolver>>(
|
|
20
|
+
`${meta.id}/capability/ai-model-resolver`,
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { AnthropicClient } from '@effect/ai-anthropic';
|
|
6
|
+
import { FetchHttpClient } from '@effect/platform';
|
|
7
|
+
import { Layer } from 'effect';
|
|
8
|
+
|
|
9
|
+
import { AiServiceRouter } from '@dxos/ai';
|
|
10
|
+
import { contributes } from '@dxos/app-framework';
|
|
11
|
+
|
|
12
|
+
import { AssistantCapabilities } from './capabilities';
|
|
13
|
+
|
|
14
|
+
export default () => {
|
|
15
|
+
return [
|
|
16
|
+
contributes(
|
|
17
|
+
AssistantCapabilities.AiModelResolver,
|
|
18
|
+
AiServiceRouter.AnthropicResolver.pipe(
|
|
19
|
+
Layer.provide(
|
|
20
|
+
AnthropicClient.layer({
|
|
21
|
+
// TODO(dmaretskyi): Read endpoint from config/settings.
|
|
22
|
+
apiUrl: 'https://ai-service.dxos.workers.dev/provider/anthropic',
|
|
23
|
+
}),
|
|
24
|
+
),
|
|
25
|
+
Layer.provide(FetchHttpClient.layer),
|
|
26
|
+
),
|
|
27
|
+
),
|
|
28
|
+
];
|
|
29
|
+
};
|
|
@@ -4,7 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
import { lazy } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
+
export * from './capabilities';
|
|
8
|
+
|
|
9
|
+
export const AiService = lazy(() => import('./ai-service'));
|
|
7
10
|
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
11
|
+
export const BlueprintDefinition = lazy(() => import('./blueprint-definition'));
|
|
12
|
+
export const EdgeModelResolver = lazy(() => import('./edge-model-resolver'));
|
|
8
13
|
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
9
14
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
10
15
|
export const Settings = lazy(() => import('./settings'));
|
|
16
|
+
export const Toolkit = lazy(() => import('./toolkit'));
|