@dxos/plugin-assistant 0.8.4-main.2e9d522 → 0.8.4-main.5ea62a8
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-OWUSKPRK.mjs} +11 -9
- package/dist/lib/browser/BlueprintContainer-OWUSKPRK.mjs.map +7 -0
- package/dist/lib/browser/ChatCompanion-FRCVSLPP.mjs +126 -0
- package/dist/lib/browser/ChatCompanion-FRCVSLPP.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-M3IHQLRS.mjs → ChatContainer-YBJBIVUZ.mjs} +34 -13
- package/dist/lib/browser/ChatContainer-YBJBIVUZ.mjs.map +7 -0
- package/dist/lib/browser/{ChatDialog-X6VN6QZI.mjs → ChatDialog-MTPJLEHM.mjs} +26 -9
- package/dist/lib/browser/ChatDialog-MTPJLEHM.mjs.map +7 -0
- package/dist/lib/browser/{SequenceContainer-3UDVKWPA.mjs → SequenceContainer-TF5QNXYM.mjs} +5 -17
- package/dist/lib/browser/SequenceContainer-TF5QNXYM.mjs.map +7 -0
- package/dist/lib/browser/ai-service-NRZPTUHO.mjs +22 -0
- package/dist/lib/browser/ai-service-NRZPTUHO.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-JTXBKE7O.mjs → app-graph-builder-7AAWTWGA.mjs} +26 -96
- package/dist/lib/browser/app-graph-builder-7AAWTWGA.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-CRZPIA5A.mjs +12 -0
- package/dist/lib/browser/blueprint-definition-CRZPIA5A.mjs.map +7 -0
- package/dist/lib/browser/chunk-6QMISAU6.mjs +167 -0
- package/dist/lib/browser/chunk-6QMISAU6.mjs.map +7 -0
- package/dist/lib/browser/chunk-CFXXQM25.mjs +182 -0
- package/dist/lib/browser/chunk-CFXXQM25.mjs.map +7 -0
- package/dist/lib/browser/chunk-IJAJRAR7.mjs +18 -0
- package/dist/lib/browser/chunk-IJAJRAR7.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-O4LUJEDV.mjs +20 -0
- package/dist/lib/browser/{chunk-FDCJSQYF.mjs.map → chunk-O4LUJEDV.mjs.map} +2 -2
- package/dist/lib/browser/chunk-OYFQS7JM.mjs +157 -0
- package/dist/lib/browser/chunk-OYFQS7JM.mjs.map +7 -0
- package/dist/lib/browser/chunk-SMIVXXAI.mjs +202 -0
- package/dist/lib/browser/chunk-SMIVXXAI.mjs.map +7 -0
- package/dist/lib/browser/chunk-V5H5CCZA.mjs +218 -0
- package/dist/lib/browser/chunk-V5H5CCZA.mjs.map +7 -0
- package/dist/lib/browser/chunk-XL557TXF.mjs +2332 -0
- package/dist/lib/browser/chunk-XL557TXF.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-E5M3CC46.mjs +22 -0
- package/dist/lib/browser/edge-model-resolver-E5M3CC46.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +154 -67
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-resolver-BQO5SVGI.mjs +112 -0
- package/dist/lib/browser/intent-resolver-BQO5SVGI.mjs.map +7 -0
- package/dist/lib/browser/local-model-resolver-VZ5WZQIC.mjs +21 -0
- package/dist/lib/browser/local-model-resolver-VZ5WZQIC.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-VNCD2H7C.mjs +109 -0
- package/dist/lib/browser/react-surface-VNCD2H7C.mjs.map +7 -0
- package/dist/lib/browser/{settings-2DGP3UTS.mjs → settings-36V3VUMW.mjs} +6 -5
- package/dist/lib/{node-esm/settings-47RYZOU4.mjs.map → browser/settings-36V3VUMW.mjs.map} +1 -1
- package/dist/lib/browser/state-D5IVKNYG.mjs +21 -0
- package/dist/lib/browser/state-D5IVKNYG.mjs.map +7 -0
- package/dist/lib/browser/toolkit-Y5OYX5PO.mjs +191 -0
- package/dist/lib/browser/toolkit-Y5OYX5PO.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -4
- package/dist/lib/node-esm/{TemplateContainer-A3NAQCZE.mjs → BlueprintContainer-UFVWCRN6.mjs} +11 -9
- package/dist/lib/node-esm/BlueprintContainer-UFVWCRN6.mjs.map +7 -0
- package/dist/lib/node-esm/ChatCompanion-ZNRZEKH5.mjs +127 -0
- package/dist/lib/node-esm/ChatCompanion-ZNRZEKH5.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-VZT74PO2.mjs → ChatContainer-TUCITJJW.mjs} +34 -13
- package/dist/lib/node-esm/ChatContainer-TUCITJJW.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatDialog-RJ6FDX4Q.mjs → ChatDialog-JLM7RDZQ.mjs} +26 -9
- package/dist/lib/node-esm/ChatDialog-JLM7RDZQ.mjs.map +7 -0
- package/dist/lib/node-esm/{SequenceContainer-RQQH5XOC.mjs → SequenceContainer-UXOVZPZO.mjs} +5 -17
- package/dist/lib/node-esm/SequenceContainer-UXOVZPZO.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-UDEPIPTO.mjs +23 -0
- package/dist/lib/node-esm/ai-service-UDEPIPTO.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-OWSOXFTD.mjs → app-graph-builder-PNAFQUYT.mjs} +26 -96
- package/dist/lib/node-esm/app-graph-builder-PNAFQUYT.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-275J3XL2.mjs +13 -0
- package/dist/lib/node-esm/blueprint-definition-275J3XL2.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2X6VEO32.mjs +2333 -0
- package/dist/lib/node-esm/chunk-2X6VEO32.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs +203 -0
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CAQKGW3B.mjs +159 -0
- package/dist/lib/node-esm/chunk-CAQKGW3B.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-FNZJJL7G.mjs +183 -0
- package/dist/lib/node-esm/chunk-FNZJJL7G.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-RLBN4RNR.mjs +168 -0
- package/dist/lib/node-esm/chunk-RLBN4RNR.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-UWUUZQWJ.mjs +219 -0
- package/dist/lib/node-esm/chunk-UWUUZQWJ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-VFY2JG62.mjs +22 -0
- package/dist/lib/node-esm/{chunk-QN2H2EHV.mjs.map → chunk-VFY2JG62.mjs.map} +2 -2
- package/dist/lib/node-esm/chunk-YPXEA46Q.mjs +19 -0
- package/dist/lib/node-esm/chunk-YPXEA46Q.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-SZHDLXCT.mjs +23 -0
- package/dist/lib/node-esm/edge-model-resolver-SZHDLXCT.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +154 -67
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/intent-resolver-FIS3T5KP.mjs +113 -0
- package/dist/lib/node-esm/intent-resolver-FIS3T5KP.mjs.map +7 -0
- package/dist/lib/node-esm/local-model-resolver-2KCBKMYA.mjs +22 -0
- package/dist/lib/node-esm/local-model-resolver-2KCBKMYA.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-4NLRKNBU.mjs +110 -0
- package/dist/lib/node-esm/react-surface-4NLRKNBU.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-47RYZOU4.mjs → settings-7ZCZ6AS5.mjs} +6 -5
- package/dist/lib/{browser/settings-2DGP3UTS.mjs.map → node-esm/settings-7ZCZ6AS5.mjs.map} +1 -1
- package/dist/lib/node-esm/state-4VLKPLW3.mjs +22 -0
- package/dist/lib/node-esm/state-4VLKPLW3.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-2F2OL6WB.mjs +192 -0
- package/dist/lib/node-esm/toolkit-2F2OL6WB.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 +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +7 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +19 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +4 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +11 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +10 -0
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +4 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit.d.ts +4 -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 +19 -16
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +5 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatCompanion.d.ts +13 -0
- package/dist/types/src/components/ChatCompanion.d.ts.map +1 -0
- package/dist/types/src/components/ChatContainer.d.ts +4 -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/ChatProgress/ChatProgress.d.ts +7 -0
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -0
- package/dist/types/src/components/ChatProgress/index.d.ts +2 -0
- package/dist/types/src/components/ChatProgress/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +20 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +4 -5
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +6 -4
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.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 +21 -5
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +4 -4
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +108 -72
- 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 +12 -12
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/reducers.d.ts +40 -0
- package/dist/types/src/components/ChatThread/reducers.d.ts.map +1 -0
- package/dist/types/src/components/PromptSettings.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 +257 -2
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +2 -6
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +257 -6
- 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 +254 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts +12 -0
- package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +4 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/index.d.ts +2 -0
- package/dist/types/src/components/Toolbar/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts +11 -0
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +4 -9
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +258 -4
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +5 -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/execution-graph/execution-graph.d.ts +21 -0
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -0
- package/dist/types/src/execution-graph/index.d.ts +2 -0
- package/dist/types/src/execution-graph/index.d.ts.map +1 -0
- 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/index.d.ts +10 -3
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +24 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +7 -20
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +4 -5
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextBinder.d.ts +4 -0
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextObjects.d.ts +15 -0
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -0
- package/dist/types/src/hooks/useExecutionGraph.d.ts +7 -0
- package/dist/types/src/hooks/useExecutionGraph.d.ts.map +1 -0
- package/dist/types/src/hooks/useFlush.d.ts +6 -0
- package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
- package/dist/types/src/hooks/useItemTypes.d.ts +4 -0
- package/dist/types/src/hooks/useItemTypes.d.ts.map +1 -0
- package/dist/types/src/hooks/useMatcherExtension.d.ts +3 -0
- package/dist/types/src/hooks/useMatcherExtension.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.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/parser/types.d.ts.map +1 -1
- package/dist/types/src/processor/index.d.ts +3 -0
- package/dist/types/src/processor/index.d.ts.map +1 -0
- package/dist/types/src/{hooks → processor}/presets.d.ts +2 -2
- package/dist/types/src/processor/presets.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +80 -0
- package/dist/types/src/processor/processor.d.ts.map +1 -0
- package/dist/types/src/processor/processor.test.d.ts +2 -0
- package/dist/types/src/processor/processor.test.d.ts.map +1 -0
- package/dist/types/src/stories/Chat.stories.d.ts +23 -246
- package/dist/types/src/stories/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +4 -0
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ChatContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/CommentsContainer.d.ts +4 -0
- package/dist/types/src/stories/components/CommentsContainer.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 +4 -0
- package/dist/types/src/stories/components/LoggingContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/MessageContainer.d.ts +4 -0
- package/dist/types/src/stories/components/MessageContainer.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 +4 -0
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts +3 -0
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/index.d.ts +11 -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/testing/data.d.ts +5 -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 +44 -0
- package/dist/types/src/stories/testing/testing.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-data.d.ts +4 -0
- package/dist/types/src/testing/test-data.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 +0 -4
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +27 -21
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +42 -0
- package/dist/types/src/types/Assistant.d.ts.map +1 -0
- package/dist/types/src/types/AssistantAction.d.ts +107 -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 +9 -6
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +97 -77
- package/src/AssistantPlugin.tsx +74 -12
- package/src/capabilities/ai-service.ts +28 -0
- package/src/capabilities/app-graph-builder.ts +43 -134
- package/src/capabilities/blueprint-definition.ts +42 -0
- package/src/capabilities/capabilities.ts +31 -0
- package/src/capabilities/edge-model-resolver.ts +27 -0
- package/src/capabilities/index.ts +9 -0
- package/src/capabilities/intent-resolver.ts +50 -14
- package/src/capabilities/local-model-resolver.ts +32 -0
- package/src/capabilities/react-surface.tsx +17 -64
- package/src/capabilities/state.ts +20 -0
- package/src/capabilities/toolkit.ts +163 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +83 -76
- package/src/components/BlueprintContainer.tsx +24 -0
- package/src/components/Chat/Chat.tsx +171 -165
- package/src/components/Chat/events.ts +7 -0
- package/src/components/ChatCompanion.tsx +111 -0
- package/src/components/ChatContainer.tsx +19 -13
- package/src/components/ChatDialog.tsx +11 -7
- package/src/components/ChatProgress/ChatProgress.tsx +68 -0
- package/src/components/ChatProgress/index.ts +5 -0
- package/src/components/ChatPrompt/ChatActions.tsx +10 -24
- package/src/components/ChatPrompt/ChatOptions.tsx +233 -0
- package/src/components/ChatPrompt/ChatPresets.tsx +1 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +31 -36
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +25 -22
- package/src/components/ChatPrompt/index.ts +1 -1
- package/src/components/ChatThread/ChatMessage.tsx +214 -148
- package/src/components/ChatThread/ChatThread.stories.tsx +244 -104
- package/src/components/ChatThread/ChatThread.tsx +44 -22
- package/src/components/ChatThread/Link.tsx +23 -0
- package/src/components/ChatThread/ToolBlock.tsx +103 -77
- package/src/components/ChatThread/reducers.ts +151 -0
- package/src/components/PromptSettings.tsx +1 -0
- package/src/components/SequenceContainer.tsx +27 -28
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +5 -4
- package/src/components/SequenceEditor/SequenceEditor.tsx +1 -1
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +27 -14
- package/src/components/TemplateEditor/TemplateEditor.tsx +20 -51
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +15 -8
- package/src/components/TemplateEditor/TemplateForm.tsx +6 -3
- package/src/components/TemplateEditor/handlebars-extension.ts +165 -0
- package/src/components/Toolbar/Toolbar.tsx +20 -0
- package/src/components/Toolbar/index.ts +5 -0
- package/src/components/Toolbar/useChatToolbarActions.ts +125 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +10 -16
- package/src/components/Toolbox/Toolbox.tsx +21 -51
- package/src/components/index.ts +4 -5
- package/src/events.ts +2 -2
- package/src/execution-graph/execution-graph.ts +211 -0
- package/src/execution-graph/index.ts +5 -0
- package/src/functions/analysis.ts +20 -0
- package/src/functions/index.ts +7 -0
- package/src/functions/list.ts +46 -0
- package/src/functions/load.ts +43 -0
- package/src/hooks/index.ts +10 -4
- package/src/hooks/useBlueprintRegistry.ts +80 -0
- package/src/hooks/useChatProcessor.ts +20 -97
- package/src/hooks/useChatServices.ts +34 -61
- package/src/hooks/useContextBinder.ts +18 -0
- package/src/hooks/useContextObjects.ts +58 -0
- package/src/hooks/useExecutionGraph.ts +20 -0
- package/src/hooks/useFlush.ts +35 -0
- package/src/hooks/useItemTypes.ts +37 -0
- package/src/hooks/useMatcherExtension.ts +45 -0
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +44 -0
- package/src/hooks/useReferencesProvider.ts +11 -9
- package/src/hooks/useResolveRef.ts +33 -0
- package/src/meta.ts +1 -1
- package/src/parser/filter-generator.ts +8 -13
- package/src/parser/query-parser.ts +1 -1
- package/src/parser/types.ts +2 -0
- package/src/processor/index.ts +6 -0
- package/src/{hooks → processor}/presets.ts +14 -6
- package/src/processor/processor.test.ts +77 -0
- package/src/processor/processor.ts +304 -0
- package/src/queue-logger.ts +5 -5
- package/src/stories/Chat.stories.tsx +389 -298
- package/src/stories/components/BlueprintContainer.tsx +32 -0
- package/src/stories/components/ChatContainer.tsx +57 -0
- package/src/stories/components/CommentsContainer.tsx +25 -0
- package/src/stories/components/GraphContainer.tsx +118 -0
- package/src/stories/components/LoggingContainer.tsx +21 -0
- package/src/stories/components/MessageContainer.tsx +27 -0
- package/src/stories/components/SurfaceContainer.tsx +52 -0
- package/src/stories/components/TasksContainer.tsx +49 -0
- package/src/stories/components/TokenManagerContainer.tsx +14 -0
- package/src/stories/components/index.ts +15 -0
- package/src/stories/components/types.ts +11 -0
- package/src/stories/testing/data.ts +142 -0
- package/src/stories/testing/index.ts +6 -0
- package/src/stories/testing/testing.tsx +254 -0
- package/src/testing/index.ts +2 -1
- package/src/testing/test-data.ts +109 -0
- package/src/testing/test-functions.ts +8 -3
- package/src/testing/test-sequence.ts +2 -27
- package/src/translations.ts +31 -21
- package/src/types/Assistant.ts +61 -0
- package/src/types/AssistantAction.ts +62 -0
- package/src/types/defs.ts +5 -0
- package/src/types/index.ts +4 -1
- package/src/vite-env.d.ts +30 -0
- 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 +0 -98
- 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 +0 -2245
- package/dist/lib/browser/chunk-OWY4CUQY.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-5RMMCMXG.mjs +0 -60
- package/dist/lib/browser/intent-resolver-5RMMCMXG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-66VY37YQ.mjs +0 -150
- 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 +0 -99
- 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 +0 -2246
- package/dist/lib/node-esm/chunk-SENTQAEO.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-YPPYELY3.mjs +0 -61
- package/dist/lib/node-esm/intent-resolver-YPPYELY3.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-RJMRBR2M.mjs +0 -151
- 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/ChatThread/reducer.d.ts +0 -12
- package/dist/types/src/components/ChatThread/reducer.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.d.ts +0 -86
- package/dist/types/src/hooks/chat-processor.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/presets.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/tools/function.d.ts +0 -5
- package/dist/types/src/tools/function.d.ts.map +0 -1
- package/dist/types/src/tools/index.d.ts +0 -3
- package/dist/types/src/tools/index.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.d.ts +0 -10
- package/dist/types/src/tools/openapi.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.test.d.ts +0 -2
- package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
- package/dist/types/src/types/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/ChatThread/reducer.ts +0 -52
- package/src/components/TemplateContainer.tsx +0 -24
- package/src/hooks/chat-processor.test.ts +0 -16
- package/src/hooks/chat-processor.ts +0 -314
- package/src/hooks/useBlueprints.ts +0 -57
- package/src/shims.d.ts +0 -8
- package/src/tools/function.ts +0 -46
- package/src/tools/index.ts +0 -6
- package/src/tools/openapi.test.ts +0 -217
- package/src/tools/openapi.ts +0 -338
- package/src/types/schema.ts +0 -95
- package/src/typings.d.ts +0 -9
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { AiTool, AiToolkit } from '@effect/ai';
|
|
6
|
+
import { Console, Schema } from 'effect';
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
Capabilities,
|
|
10
|
+
Events,
|
|
11
|
+
IntentPlugin,
|
|
12
|
+
LayoutAction,
|
|
13
|
+
type Plugin,
|
|
14
|
+
type PluginContext,
|
|
15
|
+
SettingsPlugin,
|
|
16
|
+
allOf,
|
|
17
|
+
contributes,
|
|
18
|
+
createIntent,
|
|
19
|
+
createResolver,
|
|
20
|
+
defineModule,
|
|
21
|
+
definePlugin,
|
|
22
|
+
} from '@dxos/app-framework';
|
|
23
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
24
|
+
import { AiContextBinder, ArtifactId } from '@dxos/assistant';
|
|
25
|
+
import {
|
|
26
|
+
DESIGN_BLUEPRINT,
|
|
27
|
+
LINEAR_BLUEPRINT,
|
|
28
|
+
PLANNING_BLUEPRINT,
|
|
29
|
+
RESEARCH_BLUEPRINT,
|
|
30
|
+
readDocument,
|
|
31
|
+
readTasks,
|
|
32
|
+
remoteServiceEndpoints,
|
|
33
|
+
research,
|
|
34
|
+
syncLinearIssues,
|
|
35
|
+
updateDocument,
|
|
36
|
+
updateTasks,
|
|
37
|
+
} from '@dxos/assistant-testing';
|
|
38
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
39
|
+
import { type Space } from '@dxos/client/echo';
|
|
40
|
+
import { Obj, Ref } from '@dxos/echo';
|
|
41
|
+
import { log } from '@dxos/log';
|
|
42
|
+
import { AttentionPlugin } from '@dxos/plugin-attention';
|
|
43
|
+
import { ClientCapabilities, ClientEvents, ClientPlugin } from '@dxos/plugin-client';
|
|
44
|
+
import { type ClientPluginOptions } from '@dxos/plugin-client/types';
|
|
45
|
+
import { DeckAction } from '@dxos/plugin-deck/types';
|
|
46
|
+
import { GraphPlugin } from '@dxos/plugin-graph';
|
|
47
|
+
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
48
|
+
import { PreviewPlugin } from '@dxos/plugin-preview';
|
|
49
|
+
import { SpacePlugin } from '@dxos/plugin-space';
|
|
50
|
+
import { StorybookLayoutPlugin } from '@dxos/plugin-storybook-layout';
|
|
51
|
+
import { ThemePlugin } from '@dxos/plugin-theme';
|
|
52
|
+
import { Config } from '@dxos/react-client';
|
|
53
|
+
import { defaultTx } from '@dxos/react-ui-theme';
|
|
54
|
+
import { DataType } from '@dxos/schema';
|
|
55
|
+
import { withLayout } from '@dxos/storybook-utils';
|
|
56
|
+
import { trim } from '@dxos/util';
|
|
57
|
+
|
|
58
|
+
import { AssistantPlugin } from '../../AssistantPlugin';
|
|
59
|
+
import { Assistant } from '../../types';
|
|
60
|
+
|
|
61
|
+
// TODO(burdon): Factor out.
|
|
62
|
+
export const config = {
|
|
63
|
+
remote: new Config({
|
|
64
|
+
runtime: {
|
|
65
|
+
services: {
|
|
66
|
+
ai: {
|
|
67
|
+
// TODO(burdon): Normalize props ('url'?)
|
|
68
|
+
server: remoteServiceEndpoints.ai,
|
|
69
|
+
},
|
|
70
|
+
edge: {
|
|
71
|
+
url: remoteServiceEndpoints.edge,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
}),
|
|
76
|
+
persistent: new Config({
|
|
77
|
+
runtime: {
|
|
78
|
+
client: {
|
|
79
|
+
storage: {
|
|
80
|
+
persistent: true,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
services: {
|
|
84
|
+
ai: {
|
|
85
|
+
server: remoteServiceEndpoints.ai,
|
|
86
|
+
},
|
|
87
|
+
edge: {
|
|
88
|
+
url: remoteServiceEndpoints.edge,
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
}),
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
class TestingToolkit extends AiToolkit.make(
|
|
96
|
+
AiTool.make('open-item', {
|
|
97
|
+
description: trim`
|
|
98
|
+
Opens an item in the application.
|
|
99
|
+
`,
|
|
100
|
+
parameters: {
|
|
101
|
+
id: ArtifactId,
|
|
102
|
+
},
|
|
103
|
+
success: Schema.Any,
|
|
104
|
+
failure: Schema.Never,
|
|
105
|
+
}),
|
|
106
|
+
) {
|
|
107
|
+
static layer = (_context: PluginContext) =>
|
|
108
|
+
TestingToolkit.toLayer({
|
|
109
|
+
'open-item': ({ id }) => Console.log('Called open-item', { id }),
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
type DecoratorsProps = Omit<ClientPluginOptions, 'onClientInitialized' | 'onSpacesReady'> & {
|
|
114
|
+
plugins?: Plugin[];
|
|
115
|
+
accessTokens?: DataType.AccessToken[];
|
|
116
|
+
onInit?: (props: { space: Space; chat: Assistant.Chat; binder: AiContextBinder }) => Promise<void>;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Create storybook decorators.
|
|
121
|
+
*/
|
|
122
|
+
export const getDecorators = ({ types = [], plugins = [], accessTokens = [], onInit, ...props }: DecoratorsProps) => [
|
|
123
|
+
withPluginManager({
|
|
124
|
+
plugins: [
|
|
125
|
+
// System plugins.
|
|
126
|
+
AttentionPlugin(),
|
|
127
|
+
GraphPlugin(),
|
|
128
|
+
IntentPlugin(),
|
|
129
|
+
SettingsPlugin(),
|
|
130
|
+
SpacePlugin(),
|
|
131
|
+
ClientPlugin({
|
|
132
|
+
types: [Markdown.Document, Assistant.Chat, Blueprint.Blueprint, DataType.AccessToken, ...types],
|
|
133
|
+
onClientInitialized: async ({ client }) => {
|
|
134
|
+
log('onClientInitialized', { identity: client.halo.identity.get()?.did });
|
|
135
|
+
// Abort if already initialized.
|
|
136
|
+
if (client.halo.identity.get()) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
await client.halo.createIdentity();
|
|
141
|
+
await client.spaces.waitUntilReady();
|
|
142
|
+
|
|
143
|
+
const space = client.spaces.default;
|
|
144
|
+
// TODO(burdon): Should not require this.
|
|
145
|
+
// ERROR: invariant violation: Database was not initialized with root object.
|
|
146
|
+
// TODO(burdon): onSpacesReady is never called.
|
|
147
|
+
await space.waitUntilReady();
|
|
148
|
+
|
|
149
|
+
// Add tokens.
|
|
150
|
+
for (const accessToken of accessTokens) {
|
|
151
|
+
space.db.add(Obj.clone(accessToken));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Create chat and queue.
|
|
155
|
+
const chat = space.db.add(
|
|
156
|
+
Obj.make(Assistant.Chat, {
|
|
157
|
+
queue: Ref.fromDXN(space.queues.create().dxn),
|
|
158
|
+
traceQueue: Ref.fromDXN(space.queues.create().dxn),
|
|
159
|
+
}),
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
await space.db.flush({ indexes: true });
|
|
163
|
+
await onInit?.({ space, chat, binder: new AiContextBinder(await chat.queue.load()) });
|
|
164
|
+
await space.db.flush({ indexes: true });
|
|
165
|
+
},
|
|
166
|
+
...props,
|
|
167
|
+
}),
|
|
168
|
+
|
|
169
|
+
// Cards
|
|
170
|
+
ThemePlugin({ tx: defaultTx }),
|
|
171
|
+
StorybookLayoutPlugin(),
|
|
172
|
+
PreviewPlugin(),
|
|
173
|
+
|
|
174
|
+
// User plugins.
|
|
175
|
+
AssistantPlugin(),
|
|
176
|
+
|
|
177
|
+
// Custom.
|
|
178
|
+
definePlugin({ id: 'example.com/plugin/testing', name: 'Testing' }, [
|
|
179
|
+
defineModule({
|
|
180
|
+
id: 'example.com/plugin/testing/module/testing',
|
|
181
|
+
activatesOn: Events.SetupArtifactDefinition,
|
|
182
|
+
activate: () => [
|
|
183
|
+
contributes(Capabilities.BlueprintDefinition, DESIGN_BLUEPRINT),
|
|
184
|
+
contributes(Capabilities.BlueprintDefinition, PLANNING_BLUEPRINT),
|
|
185
|
+
contributes(Capabilities.BlueprintDefinition, RESEARCH_BLUEPRINT),
|
|
186
|
+
contributes(Capabilities.BlueprintDefinition, LINEAR_BLUEPRINT),
|
|
187
|
+
contributes(Capabilities.Functions, [readDocument, updateDocument]),
|
|
188
|
+
contributes(Capabilities.Functions, [readTasks, updateTasks]),
|
|
189
|
+
contributes(Capabilities.Functions, [research]),
|
|
190
|
+
contributes(Capabilities.Functions, [syncLinearIssues]),
|
|
191
|
+
],
|
|
192
|
+
}),
|
|
193
|
+
defineModule({
|
|
194
|
+
id: 'example.com/plugin/testing/module/toolkit',
|
|
195
|
+
activatesOn: Events.Startup,
|
|
196
|
+
activate: (context) => [
|
|
197
|
+
contributes(Capabilities.Toolkit, TestingToolkit),
|
|
198
|
+
contributes(Capabilities.ToolkitHandler, TestingToolkit.layer(context)),
|
|
199
|
+
],
|
|
200
|
+
}),
|
|
201
|
+
defineModule({
|
|
202
|
+
id: 'example.com/plugin/testing/module/set-workspace',
|
|
203
|
+
activatesOn: allOf(Events.DispatcherReady, ClientEvents.SpacesReady),
|
|
204
|
+
activate: async (context) => {
|
|
205
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
206
|
+
const space = client.spaces.default;
|
|
207
|
+
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
208
|
+
await dispatch(createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: space.id }));
|
|
209
|
+
return [];
|
|
210
|
+
},
|
|
211
|
+
}),
|
|
212
|
+
defineModule({
|
|
213
|
+
id: 'example.com/plugin/testing/module/intent-resolver',
|
|
214
|
+
activatesOn: Events.SetupIntentResolver,
|
|
215
|
+
activate: () => [
|
|
216
|
+
contributes(Capabilities.IntentResolver, [
|
|
217
|
+
createResolver({
|
|
218
|
+
intent: DeckAction.ChangeCompanion,
|
|
219
|
+
resolve: () => ({}),
|
|
220
|
+
}),
|
|
221
|
+
]),
|
|
222
|
+
],
|
|
223
|
+
}),
|
|
224
|
+
]),
|
|
225
|
+
|
|
226
|
+
// Test-specific.
|
|
227
|
+
...plugins,
|
|
228
|
+
],
|
|
229
|
+
}),
|
|
230
|
+
withLayout({
|
|
231
|
+
fullscreen: true,
|
|
232
|
+
classNames: 'justify-center bg-deckSurface',
|
|
233
|
+
}),
|
|
234
|
+
];
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Creates access tokens from environment variables.
|
|
238
|
+
* @param tokens - Record of token sources mapped to their VITE_ prefixed environment variable values
|
|
239
|
+
* @returns Array of AccessToken objects for non-empty token values
|
|
240
|
+
* @example
|
|
241
|
+
* ```tsx
|
|
242
|
+
* const tokens = accessTokensFromEnv({
|
|
243
|
+
* 'exa.ai': process.env.VITE_EXA_API_KEY,
|
|
244
|
+
* 'linear.app': process.env.VITE_LINEAR_API_KEY
|
|
245
|
+
* });
|
|
246
|
+
* ```
|
|
247
|
+
* @note All environment variables should use the VITE_ prefix for proper Vite bundling
|
|
248
|
+
*/
|
|
249
|
+
|
|
250
|
+
export const accessTokensFromEnv = (tokens: Record<string, string | undefined>) => {
|
|
251
|
+
return Object.entries(tokens)
|
|
252
|
+
.filter(([, token]) => !!token)
|
|
253
|
+
.map(([source, token]) => Obj.make(DataType.AccessToken, { source, token: token! }));
|
|
254
|
+
};
|
package/src/testing/index.ts
CHANGED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Obj } from '@dxos/echo';
|
|
6
|
+
import { DataType } from '@dxos/schema';
|
|
7
|
+
|
|
8
|
+
export const createTestTranscription = (): DataType.Message[] => {
|
|
9
|
+
const timeInterval = 1000;
|
|
10
|
+
const transcription: DataType.Message[] = [
|
|
11
|
+
{
|
|
12
|
+
text: 'Hey everyone, glad we could all connect today. I was thinking we could discuss where AI might be heading in the next decade.',
|
|
13
|
+
sender: 'Mykola',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
text: 'Yeah, that sounds great. Personally, I think AI will get deeply integrated into daily life—like assistants that don’t just answer questions but anticipate our needs.',
|
|
17
|
+
sender: 'Rich',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
text: 'That’s true, but there are risks too. If AI predicts too much, we might lose the sense of making decisions ourselves.',
|
|
21
|
+
sender: 'Dima',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
text: 'Good point. I think the balance will come from better human-AI collaboration rather than pure automation.',
|
|
25
|
+
sender: 'Dima',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
text: 'Right, like AI as a co-pilot instead of a replacement. I see that happening a lot in creative fields already.',
|
|
29
|
+
sender: 'Mykola',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
text: 'Exactly. And in science, too—AI models can suggest hypotheses humans wouldn’t think of, speeding up discoveries.',
|
|
33
|
+
sender: 'Rich',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
text: 'So it looks like the future is less about AI replacing us, and more about AI amplifying what humans can do.',
|
|
37
|
+
sender: 'Dima',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
text: 'I think we should research alignment of AI with human values.',
|
|
41
|
+
sender: 'Mykola',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
text: 'I agree. We should also research the risks of AI generating content and polluting knowledge bases.',
|
|
45
|
+
sender: 'Rich',
|
|
46
|
+
},
|
|
47
|
+
].map((message, index, array) => {
|
|
48
|
+
const created = new Date(Date.now() - (array.length - index) * timeInterval);
|
|
49
|
+
return Obj.make(DataType.Message, {
|
|
50
|
+
created: created.toISOString(),
|
|
51
|
+
blocks: [{ _tag: 'transcript', started: created.toISOString(), text: message.text }],
|
|
52
|
+
sender: { identityDid: message.sender },
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
return transcription;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// TODO(wittjosiah): Find way to use data generator to generate substantive messages that could be summarized.
|
|
60
|
+
export const createTestMailbox = (): DataType.Message[] => {
|
|
61
|
+
const timeInterval = 1000;
|
|
62
|
+
const messages: DataType.Message[] = [
|
|
63
|
+
{
|
|
64
|
+
text: 'Subject: Project Kickoff\n\nHi team,\n\nWe are excited to announce the kickoff of the Apollo project. Please review the attached roadmap and be prepared for our first meeting on Monday.\n\nBest,\nAlice',
|
|
65
|
+
sender: 'alice.johnson@acme-corp.com',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
text: 'Subject: Sales Update\n\nDear all,\n\nQ2 sales numbers have exceeded expectations. Congratulations to everyone for their hard work!\n\nRegards,\nBob',
|
|
69
|
+
sender: 'bob.smith@salesforce.biz',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
text: 'Subject: Invoice Reminder\n\nHello,\n\nThis is a friendly reminder that invoice #12345 is due next week. Please let us know if you have any questions.\n\nThank you,\nCarol',
|
|
73
|
+
sender: 'carol.finance@invoicesolutions.com',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
text: 'Subject: Meeting Rescheduled\n\nHi team,\n\nTomorrow’s product design meeting has been moved to Friday at 2pm. Please update your calendars.\n\nThanks,\nDavid',
|
|
77
|
+
sender: 'david.lee@productdesign.io',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
text: 'Subject: Welcome Aboard!\n\nWelcome to the company, Emily! We are thrilled to have you join the marketing department.\n\nBest,\nFiona',
|
|
81
|
+
sender: 'fiona.hr@enterpriseco.com',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
text: 'Subject: IT Maintenance\n\nDear colleagues,\n\nScheduled IT maintenance will occur this Saturday from 1am to 5am. Please save your work accordingly.\n\nSincerely,\nGreg',
|
|
85
|
+
sender: 'greg.it@supporthub.net',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
text: 'Subject: Lunch & Learn\n\nJoin us for a Lunch & Learn session on cloud security this Thursday in the main conference room.\n\nSee you there,\nHelen',
|
|
89
|
+
sender: 'helen.training@acme-corp.com',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
text: 'Subject: Client Feedback\n\nHi,\n\nOur client, InnovateX, sent positive feedback on the recent deployment. Great job, everyone!\n\nCheers,\nIvan',
|
|
93
|
+
sender: 'ivan.account@consultingpartners.org',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
text: 'Subject: Policy Update\n\nPlease review the updated remote work policy attached to this email. Let us know if you have any questions.\n\nBest regards,\nJulia',
|
|
97
|
+
sender: 'julia.admin@acme-corp.com',
|
|
98
|
+
},
|
|
99
|
+
].map((message, index, array) => {
|
|
100
|
+
const created = new Date(Date.now() - (array.length - index) * timeInterval);
|
|
101
|
+
return Obj.make(DataType.Message, {
|
|
102
|
+
created: created.toISOString(),
|
|
103
|
+
blocks: [{ _tag: 'text', text: message.text }],
|
|
104
|
+
sender: { email: message.sender },
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
return messages;
|
|
109
|
+
};
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { DEFAULT_EDGE_MODEL
|
|
5
|
+
import { DEFAULT_EDGE_MODEL } from '@dxos/ai';
|
|
6
6
|
import { createSystemPrompt } from '@dxos/assistant';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import { type AiChatProcessorOptions } from '../processor';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated
|
|
12
|
+
*/
|
|
13
|
+
export const createProcessorOptions = (): Pick<AiChatProcessorOptions, 'model' | 'system'> => ({
|
|
9
14
|
model: DEFAULT_EDGE_MODEL,
|
|
10
|
-
|
|
15
|
+
system: createSystemPrompt({}),
|
|
11
16
|
});
|
|
@@ -2,33 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { ToolId
|
|
6
|
-
|
|
7
|
-
import { type Space } from '@dxos/client/echo';
|
|
8
|
-
import { SequenceParser, type SequenceDefinition } from '@dxos/conductor';
|
|
9
|
-
import { type DXN } from '@dxos/keys';
|
|
10
|
-
import { isNonNullable } from '@dxos/util';
|
|
11
|
-
|
|
12
|
-
// TODO(dmaretskyi): make db available through services (same as function executor).
|
|
13
|
-
// TODO(burdon): Can tools implement "aspects" so that variants can be used rather than an explicit reference?
|
|
14
|
-
export const createToolRegistry = (space: Space, queueDxn?: DXN): ToolRegistry => {
|
|
15
|
-
return new ToolRegistry(
|
|
16
|
-
[
|
|
17
|
-
// createExaTool({ apiKey: EXA_API_KEY }),
|
|
18
|
-
// createLocalSearchTool(space.db, queueDxn && space.queues.get(queueDxn)),
|
|
19
|
-
// queueDxn &&
|
|
20
|
-
// createGraphWriterTool({
|
|
21
|
-
// db: space.db,
|
|
22
|
-
// queue: space.queues.get(queueDxn),
|
|
23
|
-
// schema: DataTypes,
|
|
24
|
-
// onDone: async (objects) => {
|
|
25
|
-
// const queue = space.queues.get(queueDxn);
|
|
26
|
-
// await queue.append(objects);
|
|
27
|
-
// },
|
|
28
|
-
// }),
|
|
29
|
-
].filter(isNonNullable),
|
|
30
|
-
);
|
|
31
|
-
};
|
|
5
|
+
import { ToolId } from '@dxos/ai';
|
|
6
|
+
import { type SequenceDefinition, SequenceParser } from '@dxos/conductor';
|
|
32
7
|
|
|
33
8
|
export const RESEARCH_SEQUENCE_DEFINITION: SequenceDefinition = {
|
|
34
9
|
steps: [
|
package/src/translations.ts
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Blueprint
|
|
5
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
6
6
|
import { Sequence } from '@dxos/conductor';
|
|
7
7
|
import { type Resource } from '@dxos/react-ui';
|
|
8
8
|
|
|
9
9
|
import { meta } from './meta';
|
|
10
10
|
import { Assistant } from './types';
|
|
11
11
|
|
|
12
|
+
// TODO(burdon): Standardize translation names.
|
|
12
13
|
export const translations = [
|
|
13
14
|
{
|
|
14
15
|
'en-US': {
|
|
@@ -22,15 +23,6 @@ export const translations = [
|
|
|
22
23
|
'rename object label': 'Rename blueprint',
|
|
23
24
|
'delete object label': 'Delete blueprint',
|
|
24
25
|
},
|
|
25
|
-
[Template.Template.typename]: {
|
|
26
|
-
'typename label': 'Template',
|
|
27
|
-
'typename label_zero': 'Templates',
|
|
28
|
-
'typename label_one': 'Template',
|
|
29
|
-
'typename label_other': 'Templates',
|
|
30
|
-
'object name placeholder': 'New template',
|
|
31
|
-
'rename object label': 'Rename template',
|
|
32
|
-
'delete object label': 'Delete template',
|
|
33
|
-
},
|
|
34
26
|
// TODO(burdon): From conductor.
|
|
35
27
|
[Sequence.typename]: {
|
|
36
28
|
'typename label': 'Sequence',
|
|
@@ -42,19 +34,18 @@ export const translations = [
|
|
|
42
34
|
'delete object label': 'Delete sequence',
|
|
43
35
|
},
|
|
44
36
|
[Assistant.Chat.typename]: {
|
|
45
|
-
'typename label': '
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'object name placeholder': 'New assistant',
|
|
50
|
-
'rename object label': 'Rename assistant',
|
|
51
|
-
'delete object label': 'Delete assistant',
|
|
37
|
+
'typename label': 'AI Chat',
|
|
38
|
+
'object name placeholder': 'New AI Chat',
|
|
39
|
+
'rename object label': 'Rename AI Chat',
|
|
40
|
+
'delete object label': 'Delete AI Chat',
|
|
52
41
|
},
|
|
42
|
+
// TODO(burdon): Reconcile with react-ui-chat.
|
|
53
43
|
[meta.id]: {
|
|
54
44
|
'templates label': 'Templates',
|
|
55
45
|
'open ambient chat label': 'Open Assistant',
|
|
56
46
|
'assistant chat label': 'Assistant',
|
|
57
47
|
'plugin name': 'Assistant',
|
|
48
|
+
'settings title': 'Assistant settings',
|
|
58
49
|
'object placeholder': 'New prompt',
|
|
59
50
|
'create object label': 'Create prompt',
|
|
60
51
|
'create trigger label': 'Create trigger',
|
|
@@ -67,24 +58,43 @@ export const translations = [
|
|
|
67
58
|
'description placeholder': 'Enter description of when this template should be used',
|
|
68
59
|
'select preset template placeholder': 'Select preset',
|
|
69
60
|
'service registry label': 'Service Registry',
|
|
61
|
+
'type filter placeholder': 'Type',
|
|
62
|
+
'any type filter label': 'Any',
|
|
70
63
|
|
|
71
64
|
'sequence logs label': 'Logs',
|
|
72
65
|
|
|
73
66
|
'assistant dialog title': 'Assistant',
|
|
74
67
|
'open assistant label': 'Open assistant',
|
|
75
68
|
|
|
76
|
-
'no tools': 'No tools are configured
|
|
69
|
+
'no tools': 'No tools are configured',
|
|
70
|
+
'no results': 'No results',
|
|
77
71
|
|
|
72
|
+
'button retry': 'Retry',
|
|
73
|
+
'button suggestion': 'Assistant suggestion',
|
|
74
|
+
'button select option': 'Select option',
|
|
75
|
+
'button cancel': 'Cancel',
|
|
78
76
|
'button save': 'Save',
|
|
79
77
|
'button run': 'Run',
|
|
78
|
+
'button new thread': 'New Chat',
|
|
79
|
+
'chat history label': 'Chat History',
|
|
80
|
+
|
|
81
|
+
'toolkit label': 'Toolkit',
|
|
82
|
+
'summary label': 'Summary',
|
|
83
|
+
|
|
84
|
+
'calling tool label': 'Calling tool...',
|
|
85
|
+
'calling label': 'Calling',
|
|
86
|
+
'error label': 'Error',
|
|
80
87
|
|
|
81
88
|
'search placeholder': 'Search...',
|
|
82
89
|
'prompt placeholder': 'Ask or search for anything...',
|
|
83
|
-
'context objects
|
|
84
|
-
'button
|
|
90
|
+
'button context objects': 'Add to context',
|
|
91
|
+
'button context settings': 'Chat settings',
|
|
85
92
|
'button microphone': 'Click to speak',
|
|
86
93
|
'button cancel processing': 'Stop processing',
|
|
87
|
-
'
|
|
94
|
+
'blueprints in context title': 'Blueprints',
|
|
95
|
+
'objects in context title': 'Content',
|
|
96
|
+
'remove object in context label': 'Remove document',
|
|
97
|
+
'chat model title': 'Model',
|
|
88
98
|
|
|
89
99
|
'settings default label': 'Default',
|
|
90
100
|
'settings custom prompts label': 'Use custom prompts',
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Schema } from 'effect';
|
|
6
|
+
|
|
7
|
+
import { Queue } from '@dxos/client/echo';
|
|
8
|
+
import { Type } from '@dxos/echo';
|
|
9
|
+
import { LabelAnnotation } from '@dxos/echo-schema';
|
|
10
|
+
|
|
11
|
+
import { LLM_PROVIDERS } from './defs';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* AI chat.
|
|
15
|
+
*/
|
|
16
|
+
export const Chat = Schema.Struct({
|
|
17
|
+
id: Type.ObjectId,
|
|
18
|
+
name: Schema.optional(Schema.String),
|
|
19
|
+
queue: Type.Ref(Queue),
|
|
20
|
+
// TODO(dmaretskyi): Eventually this and the message queue will be the same.
|
|
21
|
+
traceQueue: Schema.optional(Type.Ref(Queue)),
|
|
22
|
+
}).pipe(
|
|
23
|
+
Type.Obj({
|
|
24
|
+
typename: 'dxos.org/type/assistant/Chat',
|
|
25
|
+
version: '0.2.0',
|
|
26
|
+
}),
|
|
27
|
+
LabelAnnotation.set(['name']),
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
export interface Chat extends Schema.Schema.Type<typeof Chat> {}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Relation between a Chat and companion objects (e.g., artifacts).
|
|
34
|
+
*/
|
|
35
|
+
export const CompanionTo = Schema.Struct({
|
|
36
|
+
id: Type.ObjectId,
|
|
37
|
+
}).pipe(
|
|
38
|
+
Type.Relation({
|
|
39
|
+
typename: 'dxos.org/relation/assistant/CompanionTo',
|
|
40
|
+
version: '0.1.0',
|
|
41
|
+
source: Chat,
|
|
42
|
+
target: Type.Expando,
|
|
43
|
+
}),
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
export interface CompanionTo extends Schema.Schema.Type<typeof CompanionTo> {}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Plugin settings.
|
|
50
|
+
*/
|
|
51
|
+
export const Settings = Schema.mutable(
|
|
52
|
+
Schema.Struct({
|
|
53
|
+
llmProvider: Schema.optional(Schema.Literal(...LLM_PROVIDERS)),
|
|
54
|
+
edgeModel: Schema.optional(Schema.String),
|
|
55
|
+
ollamaModel: Schema.optional(Schema.String),
|
|
56
|
+
lmstudioModel: Schema.optional(Schema.String),
|
|
57
|
+
customPrompts: Schema.optional(Schema.Boolean),
|
|
58
|
+
}),
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
export type Settings = Schema.Schema.Type<typeof Settings>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Schema } from 'effect';
|
|
6
|
+
|
|
7
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
8
|
+
import { EchoObjectSchema, SpaceSchema } from '@dxos/client/echo';
|
|
9
|
+
import { Sequence } from '@dxos/conductor';
|
|
10
|
+
import { DataType } from '@dxos/schema';
|
|
11
|
+
|
|
12
|
+
import { meta } from '../meta';
|
|
13
|
+
|
|
14
|
+
import { Chat } from './Assistant';
|
|
15
|
+
|
|
16
|
+
export class OnSpaceCreated extends Schema.TaggedClass<OnSpaceCreated>()(`${meta.id}/on-space-created`, {
|
|
17
|
+
input: Schema.Struct({
|
|
18
|
+
space: SpaceSchema,
|
|
19
|
+
rootCollection: DataType.Collection,
|
|
20
|
+
}),
|
|
21
|
+
output: Schema.Void,
|
|
22
|
+
}) {}
|
|
23
|
+
|
|
24
|
+
export class CreateChat extends Schema.TaggedClass<CreateChat>()(`${meta.id}/action/create-chat`, {
|
|
25
|
+
input: Schema.Struct({
|
|
26
|
+
space: SpaceSchema,
|
|
27
|
+
name: Schema.optional(Schema.String),
|
|
28
|
+
}),
|
|
29
|
+
output: Schema.Struct({
|
|
30
|
+
object: Chat,
|
|
31
|
+
}),
|
|
32
|
+
}) {}
|
|
33
|
+
|
|
34
|
+
export const BlueprintForm = Schema.Struct({
|
|
35
|
+
key: Schema.String,
|
|
36
|
+
name: Schema.String,
|
|
37
|
+
description: Schema.optional(Schema.String),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export class CreateBlueprint extends Schema.TaggedClass<CreateBlueprint>()(`${meta.id}/action/create-blueprint`, {
|
|
41
|
+
input: BlueprintForm,
|
|
42
|
+
output: Schema.Struct({
|
|
43
|
+
object: Blueprint.Blueprint,
|
|
44
|
+
}),
|
|
45
|
+
}) {}
|
|
46
|
+
|
|
47
|
+
export class CreateSequence extends Schema.TaggedClass<CreateSequence>()(`${meta.id}/action/create-sequence`, {
|
|
48
|
+
input: Schema.Struct({
|
|
49
|
+
name: Schema.optional(Schema.String),
|
|
50
|
+
}),
|
|
51
|
+
output: Schema.Struct({
|
|
52
|
+
object: Sequence,
|
|
53
|
+
}),
|
|
54
|
+
}) {}
|
|
55
|
+
|
|
56
|
+
export class SetCurrentChat extends Schema.TaggedClass<SetCurrentChat>()(`${meta.id}/action/set-current-chat`, {
|
|
57
|
+
input: Schema.Struct({
|
|
58
|
+
companionTo: EchoObjectSchema,
|
|
59
|
+
chat: Chat,
|
|
60
|
+
}),
|
|
61
|
+
output: Schema.Void,
|
|
62
|
+
}) {}
|