@dxos/plugin-assistant 0.8.4-main.f9ba587 → 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-6ZGGH5T4.mjs → BlueprintContainer-H7H4BQ2C.mjs} +10 -9
- package/dist/lib/browser/BlueprintContainer-H7H4BQ2C.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-6XNB5NEI.mjs → ChatContainer-OUVSX5V5.mjs} +36 -17
- package/dist/lib/browser/ChatContainer-OUVSX5V5.mjs.map +7 -0
- package/dist/lib/browser/{ChatDialog-IMWPRXTO.mjs → ChatDialog-P4FLEOHG.mjs} +22 -10
- package/dist/lib/browser/ChatDialog-P4FLEOHG.mjs.map +7 -0
- package/dist/lib/browser/SequenceContainer-627OQ557.mjs +163 -0
- 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-UJ5NHRGK.mjs → app-graph-builder-AVHHQ3KV.mjs} +16 -73
- 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-44HZKIAW.mjs → chunk-NZDCKQ6W.mjs} +32 -30
- package/dist/lib/browser/chunk-NZDCKQ6W.mjs.map +7 -0
- package/dist/lib/browser/{chunk-NTBGTFTV.mjs → chunk-QB7OVS6Z.mjs} +3 -2
- package/dist/lib/browser/chunk-QB7OVS6Z.mjs.map +7 -0
- package/dist/lib/browser/{chunk-TQ3QW3HJ.mjs → chunk-VEBVAHNM.mjs} +1041 -882
- 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 +116 -88
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/intent-resolver-MVOIEJXZ.mjs +81 -0
- 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-TMF7JJA4.mjs → react-surface-4HXS3YLT.mjs} +52 -45
- package/dist/lib/browser/react-surface-4HXS3YLT.mjs.map +7 -0
- package/dist/lib/browser/{settings-N4HEXADL.mjs → settings-G2EZXMWT.mjs} +5 -4
- package/dist/lib/{node-esm/settings-WQ76EG6O.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 +6 -13
- package/dist/lib/node-esm/{TemplateContainer-6KRNEMVE.mjs → BlueprintContainer-VH4EE4CM.mjs} +10 -9
- package/dist/lib/node-esm/BlueprintContainer-VH4EE4CM.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-VOLG7J6N.mjs → ChatContainer-D5FABDNE.mjs} +36 -17
- package/dist/lib/node-esm/ChatContainer-D5FABDNE.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatDialog-B2XNUNRM.mjs → ChatDialog-NKWVXHJP.mjs} +22 -10
- package/dist/lib/node-esm/ChatDialog-NKWVXHJP.mjs.map +7 -0
- package/dist/lib/node-esm/SequenceContainer-EQ5NP2PG.mjs +164 -0
- 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-MEQ5CYNI.mjs → app-graph-builder-RMOUJMMG.mjs} +16 -73
- 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-D3HTVK5D.mjs → chunk-3SOC5GOP.mjs} +1041 -882
- 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-VESVUAOS.mjs → chunk-GAWXJ7K5.mjs} +32 -30
- 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-RD755HN3.mjs +245 -0
- package/dist/lib/node-esm/chunk-RD755HN3.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-E6V2RUQ2.mjs → chunk-X6AANUHZ.mjs} +3 -2
- 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 +116 -88
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/intent-resolver-DTDNCX3C.mjs +82 -0
- 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-6XL6SWL2.mjs → react-surface-V6JNEZVO.mjs} +52 -45
- package/dist/lib/node-esm/react-surface-V6JNEZVO.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-WQ76EG6O.mjs → settings-AIP5FOJG.mjs} +5 -4
- package/dist/lib/{browser/settings-N4HEXADL.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 +6 -13
- 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 +8 -3
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- 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 +6 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- 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 +16 -13
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +30 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -0
- package/dist/types/src/components/Chat/index.d.ts +1 -0
- package/dist/types/src/components/Chat/index.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/ChatActions.d.ts +6 -5
- package/dist/types/src/components/ChatPrompt/ChatActions.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/ChatPresets.d.ts +11 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.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/ChatStatusIndicator.d.ts +2 -1
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +2 -2
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts +10 -10
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +6 -12
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +54 -60
- 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 +4 -3
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/reducer.d.ts +4 -4
- package/dist/types/src/components/ChatThread/reducer.d.ts.map +1 -1
- package/dist/types/src/components/PromptSettings.d.ts +2 -2
- package/dist/types/src/components/PromptSettings.d.ts.map +1 -1
- package/dist/types/src/components/SequenceContainer.d.ts +1 -2
- 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 +4 -3
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +2 -2
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +5 -4
- 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 +6 -9
- 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 +4 -3
- 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 +34 -44
- 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 +8 -4
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/presets.d.ts +13 -0
- package/dist/types/src/hooks/presets.d.ts.map +1 -0
- 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 +9 -18
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +13 -0
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -0
- 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 +7 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -0
- 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/index.d.ts +1 -1
- package/dist/types/src/parser/index.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 +87 -18
- 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 +25 -13
- 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 -2
- 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 +83 -73
- package/src/AssistantPlugin.tsx +61 -41
- package/src/capabilities/ai-service.ts +28 -0
- package/src/capabilities/app-graph-builder.ts +9 -92
- package/src/capabilities/blueprint-definition.ts +32 -0
- package/src/capabilities/capabilities.ts +11 -3
- package/src/capabilities/edge-model-resolver.ts +29 -0
- package/src/capabilities/index.ts +6 -3
- package/src/capabilities/intent-resolver.ts +39 -11
- package/src/capabilities/react-surface.tsx +35 -27
- 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 +148 -95
- package/src/components/Chat/events.ts +50 -0
- package/src/components/Chat/index.ts +2 -0
- package/src/components/ChatContainer.tsx +39 -15
- package/src/components/ChatDialog.tsx +10 -7
- package/src/components/ChatPrompt/ChatActions.tsx +15 -20
- package/src/components/ChatPrompt/ChatOptions.tsx +59 -0
- package/src/components/ChatPrompt/ChatPresets.tsx +28 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +11 -8
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +17 -4
- package/src/components/ChatPrompt/index.ts +2 -3
- package/src/components/ChatThread/ChatMessage.tsx +192 -148
- package/src/components/ChatThread/ChatThread.stories.tsx +221 -109
- package/src/components/ChatThread/ChatThread.tsx +12 -23
- package/src/components/ChatThread/Link.tsx +39 -0
- package/src/components/ChatThread/ToolBlock.tsx +41 -27
- package/src/components/ChatThread/reducer.ts +14 -14
- package/src/components/PromptSettings.tsx +41 -43
- package/src/components/SequenceContainer.tsx +32 -38
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +3 -2
- package/src/components/SequenceEditor/SequenceEditor.tsx +1 -1
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +37 -35
- package/src/components/TemplateEditor/TemplateEditor.tsx +39 -23
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +23 -16
- package/src/components/TemplateEditor/TemplateForm.tsx +50 -55
- 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 +7 -13
- package/src/components/Toolbox/Toolbox.tsx +21 -42
- 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 +167 -188
- package/src/hooks/errors.ts +8 -0
- package/src/hooks/index.ts +8 -4
- package/src/hooks/presets.ts +53 -0
- package/src/hooks/useBlueprintRegistry.ts +79 -0
- package/src/hooks/useChatProcessor.ts +81 -0
- package/src/hooks/useChatServices.ts +72 -0
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +45 -0
- package/src/hooks/{useContextProvider.ts → useReferencesProvider.ts} +18 -22
- package/src/hooks/useResolveRef.ts +33 -0
- package/src/parser/filter-generator.ts +6 -13
- package/src/parser/index.ts +1 -1
- package/src/parser/query-parser.ts +1 -1
- package/src/queue-logger.ts +5 -5
- package/src/stories/Chat.stories.tsx +246 -198
- 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 +9 -4
- package/src/testing/test-sequence.ts +18 -20
- package/src/tools/function.ts +4 -1
- package/src/tools/openapi.test.ts +10 -8
- package/src/tools/openapi.ts +4 -1
- package/src/translations.ts +29 -13
- 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 -2
- package/dist/lib/browser/ChatContainer-6XNB5NEI.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-IMWPRXTO.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-6XOYB2RN.mjs +0 -322
- package/dist/lib/browser/SequenceContainer-6XOYB2RN.mjs.map +0 -7
- package/dist/lib/browser/TemplateContainer-6ZGGH5T4.mjs.map +0 -7
- package/dist/lib/browser/ai-client-ML7OQWAO.mjs +0 -39
- package/dist/lib/browser/ai-client-ML7OQWAO.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-UJ5NHRGK.mjs.map +0 -7
- package/dist/lib/browser/chunk-44HZKIAW.mjs.map +0 -7
- package/dist/lib/browser/chunk-NTBGTFTV.mjs.map +0 -7
- package/dist/lib/browser/chunk-OZL4OHTU.mjs +0 -157
- package/dist/lib/browser/chunk-OZL4OHTU.mjs.map +0 -7
- package/dist/lib/browser/chunk-TQ3QW3HJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-TU7UUGWQ.mjs +0 -203
- package/dist/lib/browser/chunk-TU7UUGWQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-WPZ4UANI.mjs +0 -16
- package/dist/lib/browser/chunk-WPZ4UANI.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-LEAPB55Q.mjs +0 -42
- package/dist/lib/browser/intent-resolver-LEAPB55Q.mjs.map +0 -7
- package/dist/lib/browser/react-surface-TMF7JJA4.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-VOLG7J6N.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-B2XNUNRM.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-WWG6IMN3.mjs +0 -323
- package/dist/lib/node-esm/SequenceContainer-WWG6IMN3.mjs.map +0 -7
- package/dist/lib/node-esm/TemplateContainer-6KRNEMVE.mjs.map +0 -7
- package/dist/lib/node-esm/ai-client-2FQ434CT.mjs +0 -40
- package/dist/lib/node-esm/ai-client-2FQ434CT.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-MEQ5CYNI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-D3HTVK5D.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E6V2RUQ2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HVMVHP4R.mjs +0 -158
- package/dist/lib/node-esm/chunk-HVMVHP4R.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HXKRKIN2.mjs +0 -18
- package/dist/lib/node-esm/chunk-HXKRKIN2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VESVUAOS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YYUVTTVK.mjs +0 -204
- package/dist/lib/node-esm/chunk-YYUVTTVK.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-4ULF3F7U.mjs +0 -43
- package/dist/lib/node-esm/intent-resolver-4ULF3F7U.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-6XL6SWL2.mjs.map +0 -7
- package/dist/types/src/capabilities/ai-client.d.ts +0 -5
- package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
- 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/ChatPrompt/events.d.ts +0 -17
- package/dist/types/src/components/ChatPrompt/events.d.ts.map +0 -1
- package/dist/types/src/components/TemplateContainer.d.ts +0 -9
- 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 -4
- package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
- package/dist/types/src/hooks/useContextProvider.d.ts +0 -23
- package/dist/types/src/hooks/useContextProvider.d.ts.map +0 -1
- package/dist/types/src/hooks/useServiceContainer.d.ts +0 -8
- package/dist/types/src/hooks/useServiceContainer.d.ts.map +0 -1
- package/dist/types/src/hooks/useTextInputEvents.d.ts +0 -13
- package/dist/types/src/hooks/useTextInputEvents.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -71
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/dist/types/src/types/template.d.ts +0 -56
- package/dist/types/src/types/template.d.ts.map +0 -1
- package/src/capabilities/ai-client.ts +0 -39
- package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
- package/src/components/ChatPrompt/events.ts +0 -12
- package/src/components/TemplateContainer.tsx +0 -25
- package/src/hooks/chat-processor.test.ts +0 -15
- package/src/hooks/useBlueprints.ts +0 -31
- package/src/hooks/useChatProcessor.tsx +0 -142
- package/src/hooks/useServiceContainer.ts +0 -42
- package/src/hooks/useTextInputEvents.ts +0 -49
- package/src/types/schema.ts +0 -86
- package/src/types/template.ts +0 -66
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,96 +41,104 @@
|
|
|
39
41
|
"@codemirror/search": "^6.5.6",
|
|
40
42
|
"@codemirror/state": "^6.4.1",
|
|
41
43
|
"@codemirror/view": "^6.34.1",
|
|
44
|
+
"@effect/ai": "0.25.2",
|
|
45
|
+
"@effect/ai-anthropic": "^0.15.1",
|
|
42
46
|
"@lezer/highlight": "^1.2.1",
|
|
43
47
|
"@preact-signals/safe-react": "^0.9.0",
|
|
44
48
|
"@preact/signals-core": "^1.9.0",
|
|
49
|
+
"@preact/signals-react": "^3.2.0",
|
|
45
50
|
"@radix-ui/react-context": "1.1.1",
|
|
46
51
|
"@xiechao/codemirror-lang-handlebars": "1.0.4",
|
|
52
|
+
"effect": "3.17.7",
|
|
47
53
|
"exa-js": "^1.5.12",
|
|
48
54
|
"json5": "^2.2.3",
|
|
49
55
|
"jsonpointer": "^5.0.1",
|
|
50
56
|
"lodash.defaultsdeep": "^4.6.1",
|
|
51
57
|
"unified": "^11.0.0",
|
|
52
|
-
"
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/conductor": "0.8.4-main.
|
|
60
|
-
"@dxos/config": "0.8.4-main.
|
|
61
|
-
"@dxos/context": "0.8.4-main.
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/devtools": "0.8.4-main.
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/echo
|
|
66
|
-
"@dxos/echo-
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/graph": "0.8.4-main.
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/live-object": "0.8.4-main.
|
|
75
|
-
"@dxos/local-storage": "0.8.4-main.
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/plugin-
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/plugin-
|
|
81
|
-
"@dxos/plugin-
|
|
82
|
-
"@dxos/plugin-
|
|
83
|
-
"@dxos/plugin-
|
|
84
|
-
"@dxos/plugin-
|
|
85
|
-
"@dxos/plugin-
|
|
86
|
-
"@dxos/plugin-
|
|
87
|
-
"@dxos/plugin-
|
|
88
|
-
"@dxos/plugin-
|
|
89
|
-
"@dxos/plugin-
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/react-
|
|
96
|
-
"@dxos/react-ui-
|
|
97
|
-
"@dxos/react-ui-editor": "0.8.4-main.
|
|
98
|
-
"@dxos/react-ui-
|
|
99
|
-
"@dxos/react-ui-
|
|
100
|
-
"@dxos/react-
|
|
101
|
-
"@dxos/react-ui-
|
|
102
|
-
"@dxos/react-ui-
|
|
103
|
-
"@dxos/react-ui-
|
|
104
|
-
"@dxos/react-ui-
|
|
105
|
-
"@dxos/react-ui-
|
|
106
|
-
"@dxos/
|
|
107
|
-
"@dxos/
|
|
58
|
+
"use-deep-compare-effect": "^1.8.1",
|
|
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"
|
|
108
118
|
},
|
|
109
119
|
"devDependencies": {
|
|
110
120
|
"@effect-rx/rx-react": "^0.38.0",
|
|
111
|
-
"@effect/platform": "0.
|
|
121
|
+
"@effect/platform": "0.90.2",
|
|
112
122
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
113
123
|
"@types/react": "~18.2.0",
|
|
114
124
|
"@types/react-dom": "~18.2.0",
|
|
115
|
-
"effect": "3.
|
|
125
|
+
"effect": "3.17.7",
|
|
116
126
|
"openapi-types": "^12.1.3",
|
|
117
127
|
"react": "~18.2.0",
|
|
118
128
|
"react-dom": "~18.2.0",
|
|
119
129
|
"vite": "5.4.7",
|
|
120
|
-
"@dxos/
|
|
121
|
-
"@dxos/echo-db": "0.8.4-main.
|
|
122
|
-
"@dxos/plugin-chess": "0.8.4-main.
|
|
123
|
-
"@dxos/plugin-
|
|
124
|
-
"@dxos/plugin-
|
|
125
|
-
"@dxos/plugin-
|
|
126
|
-
"@dxos/plugin-table": "0.8.4-main.
|
|
127
|
-
"@dxos/random": "0.8.4-main.
|
|
128
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
129
|
-
"@dxos/react-ui-menu": "0.8.4-main.
|
|
130
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
131
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
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"
|
|
132
142
|
},
|
|
133
143
|
"peerDependencies": {
|
|
134
144
|
"@effect-rx/rx-react": "^0.34.1",
|
|
@@ -136,8 +146,8 @@
|
|
|
136
146
|
"effect": "^3.13.3",
|
|
137
147
|
"react": "~18.2.0",
|
|
138
148
|
"react-dom": "~18.2.0",
|
|
139
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
140
|
-
"@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"
|
|
141
151
|
},
|
|
142
152
|
"publishConfig": {
|
|
143
153
|
"access": "public"
|
package/src/AssistantPlugin.tsx
CHANGED
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
Capabilities,
|
|
9
|
-
Events,
|
|
10
|
-
allOf,
|
|
11
|
-
contributes,
|
|
12
|
-
createIntent,
|
|
13
|
-
defineModule,
|
|
14
|
-
definePlugin,
|
|
15
|
-
} from '@dxos/app-framework';
|
|
5
|
+
import { Capabilities, Events, contributes, createIntent, defineModule, definePlugin } from '@dxos/app-framework';
|
|
6
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
16
7
|
import { Sequence } from '@dxos/conductor';
|
|
17
|
-
import {
|
|
8
|
+
import { Type } from '@dxos/echo';
|
|
18
9
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
19
10
|
import { SpaceCapabilities, SpaceEvents } from '@dxos/plugin-space';
|
|
20
|
-
import {
|
|
11
|
+
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
21
12
|
|
|
22
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
AiService,
|
|
15
|
+
AppGraphBuilder,
|
|
16
|
+
BlueprintDefinition,
|
|
17
|
+
EdgeModelResolver,
|
|
18
|
+
IntentResolver,
|
|
19
|
+
ReactSurface,
|
|
20
|
+
Settings,
|
|
21
|
+
Toolkit,
|
|
22
|
+
} from './capabilities';
|
|
23
23
|
import { AssistantEvents } from './events';
|
|
24
24
|
import { meta } from './meta';
|
|
25
25
|
import { translations } from './translations';
|
|
26
|
-
import { Assistant,
|
|
26
|
+
import { Assistant, AssistantAction, ServiceType } from './types';
|
|
27
27
|
|
|
28
28
|
export const AssistantPlugin = () =>
|
|
29
29
|
definePlugin(meta, [
|
|
@@ -42,15 +42,21 @@ export const AssistantPlugin = () =>
|
|
|
42
42
|
activatesOn: Events.SetupMetadata,
|
|
43
43
|
activate: () => [
|
|
44
44
|
contributes(Capabilities.Metadata, {
|
|
45
|
-
id: Type.getTypename(
|
|
45
|
+
id: Type.getTypename(Assistant.Chat),
|
|
46
46
|
metadata: {
|
|
47
|
-
icon: 'ph--
|
|
47
|
+
icon: 'ph--atom--regular',
|
|
48
48
|
},
|
|
49
49
|
}),
|
|
50
50
|
contributes(Capabilities.Metadata, {
|
|
51
|
-
id: Type.getTypename(
|
|
51
|
+
id: Type.getTypename(Blueprint.Blueprint),
|
|
52
52
|
metadata: {
|
|
53
|
-
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',
|
|
54
60
|
},
|
|
55
61
|
}),
|
|
56
62
|
],
|
|
@@ -63,14 +69,22 @@ export const AssistantPlugin = () =>
|
|
|
63
69
|
SpaceCapabilities.ObjectForm,
|
|
64
70
|
defineObjectForm({
|
|
65
71
|
objectSchema: Assistant.Chat,
|
|
66
|
-
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),
|
|
67
81
|
}),
|
|
68
82
|
),
|
|
69
83
|
contributes(
|
|
70
84
|
SpaceCapabilities.ObjectForm,
|
|
71
85
|
defineObjectForm({
|
|
72
86
|
objectSchema: Sequence,
|
|
73
|
-
getIntent: () => createIntent(
|
|
87
|
+
getIntent: () => createIntent(AssistantAction.CreateSequence),
|
|
74
88
|
}),
|
|
75
89
|
),
|
|
76
90
|
],
|
|
@@ -78,26 +92,15 @@ export const AssistantPlugin = () =>
|
|
|
78
92
|
defineModule({
|
|
79
93
|
id: `${meta.id}/module/schema`,
|
|
80
94
|
activatesOn: ClientEvents.SetupSchema,
|
|
81
|
-
activate: () => contributes(ClientCapabilities.Schema, [ServiceType,
|
|
95
|
+
activate: () => contributes(ClientCapabilities.Schema, [ServiceType, Assistant.CompanionTo]),
|
|
82
96
|
}),
|
|
83
97
|
defineModule({
|
|
84
98
|
id: `${meta.id}/module/on-space-created`,
|
|
85
99
|
activatesOn: SpaceEvents.SpaceCreated,
|
|
86
|
-
activate: (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const { object: collection } = yield* dispatch(
|
|
91
|
-
createIntent(CollectionAction.CreateQueryCollection, { typename: Type.getTypename(Assistant.Chat) }),
|
|
92
|
-
);
|
|
93
|
-
rootCollection.objects.push(Ref.make(collection));
|
|
94
|
-
|
|
95
|
-
const { object: chat } = yield* dispatch(createIntent(Assistant.CreateChat, { space }));
|
|
96
|
-
space.db.add(chat);
|
|
97
|
-
});
|
|
98
|
-
await Effect.runPromise(program);
|
|
99
|
-
});
|
|
100
|
-
},
|
|
100
|
+
activate: () =>
|
|
101
|
+
contributes(SpaceCapabilities.OnSpaceCreated, ({ rootCollection, space }) =>
|
|
102
|
+
createIntent(AssistantAction.OnSpaceCreated, { rootCollection, space }),
|
|
103
|
+
),
|
|
101
104
|
}),
|
|
102
105
|
defineModule({
|
|
103
106
|
id: `${meta.id}/module/app-graph-builder`,
|
|
@@ -117,9 +120,26 @@ export const AssistantPlugin = () =>
|
|
|
117
120
|
activate: ReactSurface,
|
|
118
121
|
}),
|
|
119
122
|
defineModule({
|
|
120
|
-
id: `${meta.id}/module/ai-
|
|
121
|
-
activatesOn:
|
|
122
|
-
|
|
123
|
-
|
|
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,
|
|
124
144
|
}),
|
|
125
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,32 +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
16
|
import { Sequence } from '@dxos/conductor';
|
|
17
17
|
import { Obj } from '@dxos/echo';
|
|
18
18
|
import { invariant } from '@dxos/invariant';
|
|
19
19
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
20
|
+
import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
21
|
+
import { ROOT_ID, createExtension } from '@dxos/plugin-graph';
|
|
22
22
|
import { getActiveSpace, rxFromQuery } from '@dxos/plugin-space';
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
type Space,
|
|
26
|
-
Filter,
|
|
27
|
-
Query,
|
|
28
|
-
type QueryResult,
|
|
29
|
-
fullyQualifiedId,
|
|
30
|
-
getSpace,
|
|
31
|
-
isSpace,
|
|
32
|
-
} 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';
|
|
33
25
|
|
|
34
26
|
import { ASSISTANT_DIALOG, meta } from '../meta';
|
|
35
|
-
import { Assistant,
|
|
27
|
+
import { Assistant, AssistantAction } from '../types';
|
|
36
28
|
|
|
37
29
|
export default (context: PluginContext) =>
|
|
38
30
|
contributes(Capabilities.AppGraphBuilder, [
|
|
@@ -151,81 +143,6 @@ export default (context: PluginContext) =>
|
|
|
151
143
|
),
|
|
152
144
|
),
|
|
153
145
|
}),
|
|
154
|
-
|
|
155
|
-
createExtension({
|
|
156
|
-
id: `${meta.id}/root`,
|
|
157
|
-
connector: (node) => {
|
|
158
|
-
let query: QueryResult<TemplateType> | undefined;
|
|
159
|
-
return Rx.make((get) =>
|
|
160
|
-
pipe(
|
|
161
|
-
get(node),
|
|
162
|
-
Option.flatMap((node) =>
|
|
163
|
-
node.type === SPACE_TYPE && isSpace(node.data) ? Option.some(node.data) : Option.none(),
|
|
164
|
-
),
|
|
165
|
-
Option.map((space) => {
|
|
166
|
-
if (!query) {
|
|
167
|
-
query = space.db.query(Query.type(TemplateType));
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
const templates = get(rxFromQuery(query));
|
|
171
|
-
return templates.length > 0
|
|
172
|
-
? [
|
|
173
|
-
{
|
|
174
|
-
id: `${meta.id}/templates`,
|
|
175
|
-
type: `${meta.id}/templates`,
|
|
176
|
-
data: null,
|
|
177
|
-
properties: {
|
|
178
|
-
label: ['templates label', { ns: meta.id }],
|
|
179
|
-
icon: 'ph--file-code--regular',
|
|
180
|
-
space,
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
]
|
|
184
|
-
: [];
|
|
185
|
-
}),
|
|
186
|
-
Option.getOrElse(() => []),
|
|
187
|
-
),
|
|
188
|
-
);
|
|
189
|
-
},
|
|
190
|
-
}),
|
|
191
|
-
|
|
192
|
-
createExtension({
|
|
193
|
-
id: `${meta.id}/templates`,
|
|
194
|
-
connector: (node) => {
|
|
195
|
-
let query: QueryResult<TemplateType> | undefined;
|
|
196
|
-
return Rx.make((get) =>
|
|
197
|
-
pipe(
|
|
198
|
-
get(node),
|
|
199
|
-
Option.flatMap((node) =>
|
|
200
|
-
node.id === `${meta.id}/templates` && isSpace(node.properties.space)
|
|
201
|
-
? Option.some(node.properties.space)
|
|
202
|
-
: Option.none(),
|
|
203
|
-
),
|
|
204
|
-
Option.map((space) => {
|
|
205
|
-
if (!query) {
|
|
206
|
-
query = space.db.query(Query.type(TemplateType));
|
|
207
|
-
}
|
|
208
|
-
return get(rxFromQuery(query))
|
|
209
|
-
.toSorted((a, b) => {
|
|
210
|
-
const nameA = a.name ?? '';
|
|
211
|
-
const nameB = b.name ?? '';
|
|
212
|
-
return nameA.localeCompare(nameB);
|
|
213
|
-
})
|
|
214
|
-
.map((template) => ({
|
|
215
|
-
id: fullyQualifiedId(template),
|
|
216
|
-
type: `${meta.id}/template`,
|
|
217
|
-
data: template,
|
|
218
|
-
properties: {
|
|
219
|
-
label: template.name ?? ['object placeholder', { ns: meta.id }],
|
|
220
|
-
icon: 'ph--file-code--regular',
|
|
221
|
-
},
|
|
222
|
-
}));
|
|
223
|
-
}),
|
|
224
|
-
Option.getOrElse(() => []),
|
|
225
|
-
),
|
|
226
|
-
);
|
|
227
|
-
},
|
|
228
|
-
}),
|
|
229
146
|
]);
|
|
230
147
|
|
|
231
148
|
// TODO(burdon): Factor out.
|
|
@@ -245,7 +162,7 @@ const getOrCreateChat = async (
|
|
|
245
162
|
return chats[chats.length - 1];
|
|
246
163
|
}
|
|
247
164
|
|
|
248
|
-
const { data } = await dispatch(createIntent(
|
|
165
|
+
const { data } = await dispatch(createIntent(AssistantAction.CreateChat, { space }));
|
|
249
166
|
invariant(Obj.instanceOf(Assistant.Chat, data?.object));
|
|
250
167
|
await dispatch(createIntent(SpaceAction.AddObject, { target: space, object: data.object }));
|
|
251
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
|
+
};
|
|
@@ -2,13 +2,21 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type
|
|
5
|
+
import { type Layer } from 'effect';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type AiService, type AiServiceRouter } from '@dxos/ai';
|
|
8
8
|
import { defineCapability } from '@dxos/app-framework';
|
|
9
9
|
|
|
10
10
|
import { meta } from '../meta';
|
|
11
11
|
|
|
12
12
|
export namespace AssistantCapabilities {
|
|
13
|
-
export
|
|
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
|
+
);
|
|
14
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,10 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
import { lazy } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export * from './capabilities';
|
|
8
|
+
|
|
9
|
+
export const AiService = lazy(() => import('./ai-service'));
|
|
8
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'));
|
|
9
13
|
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
10
14
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
11
15
|
export const Settings = lazy(() => import('./settings'));
|
|
12
|
-
|
|
13
|
-
export * from './capabilities';
|
|
16
|
+
export const Toolkit = lazy(() => import('./toolkit'));
|