@dxos/plugin-assistant 0.8.4-main.67995b8 → 0.8.4-main.c4373fc
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/{BlueprintContainer-IZ4AK5EO.mjs → BlueprintContainer-TO35YXHT.mjs} +4 -3
- package/dist/lib/browser/ChatCompanion-ZIKNUUSU.mjs +127 -0
- package/dist/lib/browser/ChatCompanion-ZIKNUUSU.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-RP3QEXYX.mjs → ChatContainer-MA5BVDGH.mjs} +33 -14
- package/dist/lib/browser/ChatContainer-MA5BVDGH.mjs.map +7 -0
- package/dist/lib/browser/{ChatDialog-ZVLXFHEY.mjs → ChatDialog-7OXLIWZI.mjs} +26 -12
- package/dist/lib/browser/ChatDialog-7OXLIWZI.mjs.map +7 -0
- package/dist/lib/browser/{SequenceContainer-3UDVKWPA.mjs → SequenceContainer-2FEWMQGW.mjs} +7 -19
- package/dist/lib/browser/SequenceContainer-2FEWMQGW.mjs.map +7 -0
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs +19 -0
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-XSEOKJLG.mjs → app-graph-builder-VKFRYY2N.mjs} +31 -41
- package/dist/lib/browser/app-graph-builder-VKFRYY2N.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-NSJARW5U.mjs +12 -0
- package/dist/lib/browser/blueprint-definition-NSJARW5U.mjs.map +7 -0
- package/dist/lib/browser/chunk-2CE2KPKZ.mjs +175 -0
- package/dist/lib/browser/chunk-2CE2KPKZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-43I2LR6O.mjs +216 -0
- package/dist/lib/browser/chunk-43I2LR6O.mjs.map +7 -0
- package/dist/lib/browser/chunk-5EGXHCAZ.mjs +16 -0
- package/dist/lib/browser/chunk-5EGXHCAZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-5RICKAMN.mjs +18 -0
- package/dist/lib/browser/chunk-5RICKAMN.mjs.map +7 -0
- package/dist/lib/browser/chunk-B2RCJXEO.mjs +202 -0
- package/dist/lib/browser/chunk-B2RCJXEO.mjs.map +7 -0
- package/dist/lib/browser/chunk-BRJMNZOS.mjs +169 -0
- package/dist/lib/browser/chunk-BRJMNZOS.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-P5P7QXBS.mjs +296 -0
- package/dist/lib/browser/chunk-P5P7QXBS.mjs.map +7 -0
- package/dist/lib/browser/chunk-UDH4MR7H.mjs +1744 -0
- package/dist/lib/browser/chunk-UDH4MR7H.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs +18 -0
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +144 -63
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/intent-resolver-5LB25ZRN.mjs +112 -0
- package/dist/lib/browser/intent-resolver-5LB25ZRN.mjs.map +7 -0
- package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs +17 -0
- package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-WQZXU624.mjs +107 -0
- package/dist/lib/browser/react-surface-WQZXU624.mjs.map +7 -0
- package/dist/lib/browser/{settings-5GTTCVGD.mjs → settings-4B2NA4CE.mjs} +8 -7
- package/dist/lib/{node-esm/settings-J2EXEM5H.mjs.map → browser/settings-4B2NA4CE.mjs.map} +1 -1
- package/dist/lib/browser/state-LXTS54DI.mjs +21 -0
- package/dist/lib/browser/state-LXTS54DI.mjs.map +7 -0
- package/dist/lib/browser/toolkit-NQ2GXCF5.mjs +199 -0
- package/dist/lib/browser/toolkit-NQ2GXCF5.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -4
- package/dist/lib/node-esm/{BlueprintContainer-RGTMNLNX.mjs → BlueprintContainer-J664LTU3.mjs} +4 -3
- package/dist/lib/{browser/BlueprintContainer-IZ4AK5EO.mjs.map → node-esm/BlueprintContainer-J664LTU3.mjs.map} +1 -1
- package/dist/lib/node-esm/ChatCompanion-YDXJIVCF.mjs +128 -0
- package/dist/lib/node-esm/ChatCompanion-YDXJIVCF.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-W3W6FWV3.mjs → ChatContainer-WLTOQLHH.mjs} +33 -14
- package/dist/lib/node-esm/ChatContainer-WLTOQLHH.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatDialog-QW4JRKVO.mjs → ChatDialog-ADKF62SY.mjs} +26 -12
- package/dist/lib/node-esm/ChatDialog-ADKF62SY.mjs.map +7 -0
- package/dist/lib/node-esm/{SequenceContainer-RQQH5XOC.mjs → SequenceContainer-PGGJUQ46.mjs} +7 -19
- package/dist/lib/node-esm/SequenceContainer-PGGJUQ46.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs +20 -0
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-PANCJUHV.mjs → app-graph-builder-K6AYO4YM.mjs} +31 -41
- package/dist/lib/node-esm/app-graph-builder-K6AYO4YM.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-WD2IVMAI.mjs +13 -0
- package/dist/lib/node-esm/blueprint-definition-WD2IVMAI.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-73ABYRYX.mjs +20 -0
- package/dist/lib/node-esm/chunk-73ABYRYX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DBDKOC3I.mjs +203 -0
- package/dist/lib/node-esm/chunk-DBDKOC3I.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DSE2IILK.mjs +217 -0
- package/dist/lib/node-esm/chunk-DSE2IILK.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-I7BZMIAG.mjs +170 -0
- package/dist/lib/node-esm/chunk-I7BZMIAG.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-TBQOICXZ.mjs +297 -0
- package/dist/lib/node-esm/chunk-TBQOICXZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-U2NYUS2N.mjs +177 -0
- package/dist/lib/node-esm/chunk-U2NYUS2N.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-UPPSDTOJ.mjs +1745 -0
- package/dist/lib/node-esm/chunk-UPPSDTOJ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XQGWSZ4T.mjs +17 -0
- package/dist/lib/node-esm/chunk-XQGWSZ4T.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs +19 -0
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +144 -63
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/intent-resolver-I64MNI4C.mjs +113 -0
- package/dist/lib/node-esm/intent-resolver-I64MNI4C.mjs.map +7 -0
- package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs +18 -0
- package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-QDQWJ7FZ.mjs → react-surface-TVVVRIR3.mjs} +25 -68
- package/dist/lib/node-esm/react-surface-TVVVRIR3.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-J2EXEM5H.mjs → settings-7Y3CRASE.mjs} +8 -7
- package/dist/lib/{browser/settings-5GTTCVGD.mjs.map → node-esm/settings-7Y3CRASE.mjs.map} +1 -1
- package/dist/lib/node-esm/state-BO6GUFLB.mjs +22 -0
- package/dist/lib/node-esm/state-BO6GUFLB.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-V57PRJNG.mjs +200 -0
- package/dist/lib/node-esm/toolkit-V57PRJNG.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -4
- package/dist/types/src/AssistantPlugin.d.ts +1 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +4 -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 +11 -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/Chat/Chat.d.ts +20 -17
- 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/ChatThread.d.ts +10 -7
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +115 -33
- 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/reducers.d.ts +40 -0
- package/dist/types/src/components/ChatThread/reducers.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/registry.d.ts +11 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.d.ts +36 -0
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts +2 -0
- package/dist/types/src/components/ChatThread/sync.test.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 +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +264 -3
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +0 -5
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +262 -7
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +259 -2
- 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/ToolBlock/ToolBlock.d.ts +19 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts +2 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/index.d.ts +3 -0
- package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +5 -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 +262 -5
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -1
- 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/index.d.ts +7 -3
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +25 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +8 -21
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +5 -6
- 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/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/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/meta.d.ts +1 -2
- package/dist/types/src/meta.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 +3 -3
- package/dist/types/src/processor/presets.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +74 -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 +28 -203
- package/dist/types/src/stories/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/stories/QueryEditor.stories.d.ts +7 -0
- package/dist/types/src/stories/QueryEditor.stories.d.ts.map +1 -0
- 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/ChessContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ChessContainer.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/DebugCard.d.ts +8 -0
- package/dist/types/src/stories/components/DebugCard.d.ts.map +1 -0
- package/dist/types/src/stories/components/ExecutionGraphContainer.d.ts +7 -0
- package/dist/types/src/stories/components/ExecutionGraphContainer.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/InvocationsContainer.d.ts +4 -0
- package/dist/types/src/stories/components/InvocationsContainer.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/ProjectContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ProjectContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/PromptContainer.d.ts +6 -0
- package/dist/types/src/stories/components/PromptContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ResearchInputStack.d.ts +4 -0
- package/dist/types/src/stories/components/ResearchInputStack.d.ts.map +1 -0
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts +4 -0
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts.map +1 -0
- package/dist/types/src/stories/components/ScriptContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ScriptContainer.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/TriggersContainer.d.ts +3 -0
- package/dist/types/src/stories/components/TriggersContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/index.d.ts +18 -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 +9 -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/schema.d.ts +7 -0
- package/dist/types/src/stories/testing/schema.d.ts.map +1 -0
- package/dist/types/src/stories/testing/testing.d.ts +51 -0
- package/dist/types/src/stories/testing/testing.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-data.d.ts +14 -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-generator.d.ts +7 -0
- package/dist/types/src/testing/test-generator.d.ts.map +1 -0
- 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 +28 -12
- 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 +15 -12
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +115 -96
- package/src/AssistantPlugin.tsx +150 -107
- package/src/capabilities/ai-service.ts +27 -0
- package/src/capabilities/app-graph-builder.ts +45 -51
- package/src/capabilities/blueprint-definition.ts +64 -0
- package/src/capabilities/capabilities.ts +18 -0
- package/src/capabilities/edge-model-resolver.ts +25 -0
- package/src/capabilities/index.ts +9 -0
- package/src/capabilities/intent-resolver.ts +46 -24
- package/src/capabilities/local-model-resolver.ts +30 -0
- package/src/capabilities/react-surface.tsx +10 -57
- package/src/capabilities/state.ts +20 -0
- package/src/capabilities/toolkit.ts +168 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +83 -76
- package/src/components/Chat/Chat.tsx +180 -176
- package/src/components/Chat/events.ts +7 -0
- package/src/components/ChatCompanion.tsx +114 -0
- package/src/components/ChatContainer.tsx +19 -13
- package/src/components/ChatDialog.tsx +18 -14
- package/src/components/ChatProgress/ChatProgress.tsx +67 -0
- package/src/components/ChatProgress/index.ts +5 -0
- package/src/components/ChatPrompt/ChatActions.tsx +10 -24
- package/src/components/ChatPrompt/ChatOptions.tsx +225 -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/ChatThread.stories.tsx +98 -112
- package/src/components/ChatThread/ChatThread.tsx +65 -29
- package/src/components/ChatThread/Link.tsx +26 -0
- package/src/components/ChatThread/reducers.ts +151 -0
- package/src/components/ChatThread/registry.tsx +184 -0
- package/src/components/ChatThread/sync.test.ts +81 -0
- package/src/components/ChatThread/sync.ts +113 -0
- package/src/components/PromptSettings.tsx +1 -0
- package/src/components/SequenceContainer.tsx +29 -30
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +11 -8
- package/src/components/SequenceEditor/SequenceEditor.tsx +3 -3
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +26 -15
- package/src/components/TemplateEditor/TemplateEditor.tsx +17 -50
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +15 -10
- package/src/components/TemplateEditor/TemplateForm.tsx +4 -2
- package/src/components/TemplateEditor/handlebars-extension.ts +165 -0
- package/src/components/ToolBlock/ToolBlock.tsx +152 -0
- package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
- package/src/components/ToolBlock/index.ts +6 -0
- package/src/components/Toolbar/Toolbar.tsx +21 -0
- package/src/components/Toolbar/index.ts +5 -0
- package/src/components/Toolbar/useChatToolbarActions.ts +126 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +13 -22
- package/src/components/Toolbox/Toolbox.tsx +21 -51
- package/src/components/index.ts +3 -4
- package/src/events.ts +2 -2
- package/src/functions/analysis.ts +22 -0
- package/src/functions/index.ts +7 -0
- package/src/functions/list.ts +48 -0
- package/src/functions/load.ts +46 -0
- package/src/hooks/index.ts +7 -4
- package/src/hooks/useBlueprintRegistry.ts +94 -0
- package/src/hooks/useChatProcessor.ts +21 -98
- package/src/hooks/useChatServices.ts +30 -48
- package/src/hooks/useContextBinder.ts +18 -0
- package/src/hooks/useContextObjects.ts +58 -0
- package/src/hooks/useFlush.ts +35 -0
- package/src/hooks/useItemTypes.ts +37 -0
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +44 -0
- package/src/hooks/useReferencesProvider.ts +11 -9
- package/src/meta.ts +4 -6
- package/src/processor/index.ts +6 -0
- package/src/{hooks → processor}/presets.ts +15 -7
- package/src/processor/processor.test.ts +81 -0
- package/src/processor/processor.ts +303 -0
- package/src/queue-logger.ts +10 -10
- package/src/stories/Chat.stories.tsx +816 -305
- package/src/stories/QueryEditor.stories.tsx +114 -0
- package/src/stories/components/BlueprintContainer.tsx +34 -0
- package/src/stories/components/ChatContainer.tsx +74 -0
- package/src/stories/components/ChessContainer.tsx +17 -0
- package/src/stories/components/CommentsContainer.tsx +25 -0
- package/src/stories/components/DebugCard.tsx +61 -0
- package/src/stories/components/ExecutionGraphContainer.tsx +30 -0
- package/src/stories/components/GraphContainer.tsx +106 -0
- package/src/stories/components/InvocationsContainer.tsx +17 -0
- package/src/stories/components/MessageContainer.tsx +22 -0
- package/src/stories/components/ProjectContainer.tsx +17 -0
- package/src/stories/components/PromptContainer.tsx +52 -0
- package/src/stories/components/ResearchInputStack.tsx +30 -0
- package/src/stories/components/ResearchOutputStack.tsx +29 -0
- package/src/stories/components/ScriptContainer.tsx +28 -0
- package/src/stories/components/TasksContainer.tsx +47 -0
- package/src/stories/components/TokenManagerContainer.tsx +14 -0
- package/src/stories/components/TriggersContainer.tsx +12 -0
- package/src/stories/components/index.ts +22 -0
- package/src/stories/components/types.ts +11 -0
- package/src/stories/testing/data.ts +135 -0
- package/src/stories/testing/index.ts +6 -0
- package/src/stories/testing/schema.ts +17 -0
- package/src/stories/testing/testing.tsx +291 -0
- package/src/testing/index.ts +3 -1
- package/src/testing/test-data.ts +248 -0
- package/src/testing/test-functions.ts +8 -3
- package/src/testing/test-generator.ts +261 -0
- package/src/testing/test-sequence.ts +2 -27
- package/src/translations.ts +31 -12
- 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/types/service.ts +2 -2
- package/src/vite-env.d.ts +30 -0
- package/dist/lib/browser/ChatContainer-RP3QEXYX.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-ZVLXFHEY.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-XSEOKJLG.mjs.map +0 -7
- package/dist/lib/browser/chunk-63GG6U6D.mjs +0 -2226
- package/dist/lib/browser/chunk-63GG6U6D.mjs.map +0 -7
- package/dist/lib/browser/chunk-7W7LHTRH.mjs +0 -171
- package/dist/lib/browser/chunk-7W7LHTRH.mjs.map +0 -7
- package/dist/lib/browser/chunk-FDCJSQYF.mjs +0 -40
- package/dist/lib/browser/chunk-FDCJSQYF.mjs.map +0 -7
- package/dist/lib/browser/chunk-KFXSBNZR.mjs +0 -89
- package/dist/lib/browser/chunk-KFXSBNZR.mjs.map +0 -7
- package/dist/lib/browser/chunk-LERGF5YG.mjs +0 -108
- package/dist/lib/browser/chunk-LERGF5YG.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-MV3VSZLS.mjs +0 -75
- package/dist/lib/browser/intent-resolver-MV3VSZLS.mjs.map +0 -7
- package/dist/lib/browser/react-surface-3GYEHQRP.mjs +0 -150
- package/dist/lib/browser/react-surface-3GYEHQRP.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-W3W6FWV3.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-QW4JRKVO.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-PANCJUHV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BFO3KHYL.mjs +0 -2227
- package/dist/lib/node-esm/chunk-BFO3KHYL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MS3PJARN.mjs +0 -109
- package/dist/lib/node-esm/chunk-MS3PJARN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QN2H2EHV.mjs +0 -41
- package/dist/lib/node-esm/chunk-QN2H2EHV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VIIMA3XQ.mjs +0 -90
- package/dist/lib/node-esm/chunk-VIIMA3XQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Z7PUODRT.mjs +0 -172
- package/dist/lib/node-esm/chunk-Z7PUODRT.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-3FMC3GHC.mjs +0 -76
- package/dist/lib/node-esm/intent-resolver-3FMC3GHC.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-QDQWJ7FZ.mjs.map +0 -7
- package/dist/types/src/capability-definitions.d.ts +0 -7
- package/dist/types/src/capability-definitions.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/ChatThread/ChatMessage.d.ts +0 -17
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts +0 -19
- package/dist/types/src/components/ChatThread/ToolBlock.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/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/parser/filter-generator.d.ts +0 -4
- package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
- package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
- package/dist/types/src/parser/index.d.ts +0 -4
- package/dist/types/src/parser/index.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.d.ts +0 -15
- package/dist/types/src/parser/query-parser.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.test.d.ts +0 -2
- package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
- package/dist/types/src/parser/types.d.ts +0 -24
- package/dist/types/src/parser/types.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 -120
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capability-definitions.ts +0 -15
- package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
- package/src/components/ChatThread/ChatMessage.tsx +0 -268
- package/src/components/ChatThread/ToolBlock.tsx +0 -121
- package/src/components/ChatThread/reducer.ts +0 -52
- 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/parser/filter-generator.test.ts +0 -32
- package/src/parser/filter-generator.ts +0 -81
- package/src/parser/index.ts +0 -7
- package/src/parser/query-parser.test.ts +0 -139
- package/src/parser/query-parser.ts +0 -199
- package/src/parser/types.ts +0 -34
- 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 -108
- package/src/typings.d.ts +0 -9
- /package/dist/lib/{node-esm/BlueprintContainer-RGTMNLNX.mjs.map → browser/BlueprintContainer-TO35YXHT.mjs.map} +0 -0
|
@@ -3,28 +3,31 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Rx } from '@effect-rx/rx-react';
|
|
6
|
-
import
|
|
6
|
+
import * as Function from 'effect/Function';
|
|
7
|
+
import * as Option from 'effect/Option';
|
|
7
8
|
|
|
8
9
|
import {
|
|
9
10
|
Capabilities,
|
|
10
|
-
contributes,
|
|
11
|
-
createIntent,
|
|
12
11
|
LayoutAction,
|
|
13
|
-
type PromiseIntentDispatcher,
|
|
14
12
|
type PluginContext,
|
|
13
|
+
type PromiseIntentDispatcher,
|
|
14
|
+
contributes,
|
|
15
|
+
createIntent,
|
|
15
16
|
} from '@dxos/app-framework';
|
|
16
17
|
import { Sequence } from '@dxos/conductor';
|
|
17
18
|
import { Obj } from '@dxos/echo';
|
|
18
19
|
import { invariant } from '@dxos/invariant';
|
|
19
20
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
20
|
-
import {
|
|
21
|
-
import { createExtension,
|
|
22
|
-
import { getActiveSpace
|
|
21
|
+
import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
22
|
+
import { ROOT_ID, createExtension, rxFromSignal } from '@dxos/plugin-graph';
|
|
23
|
+
import { getActiveSpace } from '@dxos/plugin-space';
|
|
23
24
|
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
24
|
-
import {
|
|
25
|
+
import { Query, type Space, fullyQualifiedId } from '@dxos/react-client/echo';
|
|
25
26
|
|
|
26
27
|
import { ASSISTANT_DIALOG, meta } from '../meta';
|
|
27
|
-
import { Assistant } from '../types';
|
|
28
|
+
import { Assistant, AssistantAction } from '../types';
|
|
29
|
+
|
|
30
|
+
import { AssistantCapabilities } from './capabilities';
|
|
28
31
|
|
|
29
32
|
export default (context: PluginContext) =>
|
|
30
33
|
contributes(Capabilities.AppGraphBuilder, [
|
|
@@ -32,7 +35,7 @@ export default (context: PluginContext) =>
|
|
|
32
35
|
id: `${meta.id}/assistant`,
|
|
33
36
|
actions: (node) =>
|
|
34
37
|
Rx.make((get) =>
|
|
35
|
-
pipe(
|
|
38
|
+
Function.pipe(
|
|
36
39
|
get(node),
|
|
37
40
|
Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
|
|
38
41
|
Option.map(() => [
|
|
@@ -79,44 +82,36 @@ export default (context: PluginContext) =>
|
|
|
79
82
|
}),
|
|
80
83
|
|
|
81
84
|
createExtension({
|
|
82
|
-
id: `${meta.id}/
|
|
85
|
+
id: `${meta.id}/companion-chat`,
|
|
83
86
|
connector: (node) => {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const space = getSpace(object);
|
|
97
|
-
if (!space) {
|
|
98
|
-
return [];
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
if (!query) {
|
|
102
|
-
query = space.db.query(Query.select(Filter.ids(object.id)).targetOf(Assistant.CompanionTo).source());
|
|
103
|
-
}
|
|
87
|
+
return Rx.make((get) =>
|
|
88
|
+
Function.pipe(
|
|
89
|
+
get(node),
|
|
90
|
+
Option.flatMap((node) => (Obj.isObject(node.data) ? Option.some(node.data) : Option.none())),
|
|
91
|
+
Option.map((object) => {
|
|
92
|
+
const currentChat = get(
|
|
93
|
+
rxFromSignal(
|
|
94
|
+
() => context.getCapability(AssistantCapabilities.State).currentChat[fullyQualifiedId(object)],
|
|
95
|
+
),
|
|
96
|
+
);
|
|
104
97
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
98
|
+
return [
|
|
99
|
+
{
|
|
100
|
+
id: [fullyQualifiedId(object), 'assistant-chat'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
101
|
+
type: PLANK_COMPANION_TYPE,
|
|
102
|
+
data: currentChat ?? 'assistant-chat',
|
|
103
|
+
properties: {
|
|
104
|
+
label: ['assistant chat label', { ns: meta.id }],
|
|
105
|
+
icon: 'ph--sparkle--regular',
|
|
106
|
+
position: 'hoist',
|
|
107
|
+
disposition: 'hidden',
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
];
|
|
111
|
+
}),
|
|
112
|
+
Option.getOrElse(() => []),
|
|
113
|
+
),
|
|
114
|
+
);
|
|
120
115
|
},
|
|
121
116
|
}),
|
|
122
117
|
|
|
@@ -124,7 +119,7 @@ export default (context: PluginContext) =>
|
|
|
124
119
|
id: `${meta.id}/sequence-logs`,
|
|
125
120
|
connector: (node) =>
|
|
126
121
|
Rx.make((get) =>
|
|
127
|
-
pipe(
|
|
122
|
+
Function.pipe(
|
|
128
123
|
get(node),
|
|
129
124
|
Option.flatMap((node) => (Obj.instanceOf(Sequence, node.data) ? Option.some(node) : Option.none())),
|
|
130
125
|
Option.map((node) => [
|
|
@@ -155,14 +150,13 @@ const getOrCreateChat = async (
|
|
|
155
150
|
const { objects: relatedChats } = await space.db
|
|
156
151
|
.query(Query.type(Assistant.Chat).sourceOf(Assistant.CompanionTo).source())
|
|
157
152
|
.run();
|
|
153
|
+
|
|
158
154
|
const chats = allChats.filter((chat) => !relatedChats.includes(chat));
|
|
159
|
-
// console.log('objects', JSON.stringify(objects, null, 2));
|
|
160
155
|
if (chats.length > 0) {
|
|
161
|
-
|
|
162
|
-
return chats[chats.length - 1];
|
|
156
|
+
return chats.at(-1);
|
|
163
157
|
}
|
|
164
158
|
|
|
165
|
-
const { data } = await dispatch(createIntent(
|
|
159
|
+
const { data } = await dispatch(createIntent(AssistantAction.CreateChat, { space }));
|
|
166
160
|
invariant(Obj.instanceOf(Assistant.Chat, data?.object));
|
|
167
161
|
await dispatch(createIntent(SpaceAction.AddObject, { target: space, object: data.object }));
|
|
168
162
|
return data.object;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Capabilities, type Capability, contributes } from '@dxos/app-framework';
|
|
6
|
+
import { templates } from '@dxos/assistant';
|
|
7
|
+
import {
|
|
8
|
+
DISCORD_BLUEPRINT,
|
|
9
|
+
LINEAR_BLUEPRINT,
|
|
10
|
+
RESEARCH_BLUEPRINT,
|
|
11
|
+
WEB_SEARCH_BLUEPRINT,
|
|
12
|
+
agent,
|
|
13
|
+
createResearchNote,
|
|
14
|
+
entityExtraction,
|
|
15
|
+
fetchDiscordMessages,
|
|
16
|
+
research,
|
|
17
|
+
syncLinearIssues,
|
|
18
|
+
} from '@dxos/assistant-testing';
|
|
19
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
20
|
+
import { type FunctionDefinition } from '@dxos/functions';
|
|
21
|
+
|
|
22
|
+
import { analysis, list, load } from '../functions';
|
|
23
|
+
|
|
24
|
+
const functions: FunctionDefinition[] = [analysis, list, load];
|
|
25
|
+
const tools = [
|
|
26
|
+
'add-to-context',
|
|
27
|
+
// TODO(wittjosiah): Factor out to an ECHO blueprint.
|
|
28
|
+
'get-schemas',
|
|
29
|
+
'add-schema',
|
|
30
|
+
'create-record',
|
|
31
|
+
// TODO(wittjosiah): Factor out to a generic app-framework blueprint.
|
|
32
|
+
'open-item',
|
|
33
|
+
// TODO(burdon): Anthropic only.
|
|
34
|
+
// https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/text-editor-tool#example-str-replace-command
|
|
35
|
+
// AI_TOOL_NOT_FOUND: str_replace_based_edit_tool
|
|
36
|
+
// 'str_replace_based_edit_tool',
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
export const BLUEPRINT_KEY = 'dxos.org/blueprint/assistant';
|
|
40
|
+
|
|
41
|
+
export const createBlueprint = (): Blueprint.Blueprint =>
|
|
42
|
+
Blueprint.make({
|
|
43
|
+
key: BLUEPRINT_KEY,
|
|
44
|
+
name: 'Assistant',
|
|
45
|
+
tools: Blueprint.toolDefinitions({ functions, tools }),
|
|
46
|
+
instructions: templates.system,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const blueprint = createBlueprint();
|
|
50
|
+
|
|
51
|
+
// TODO(dmaretskyi): Consider splitting into multiple modules.
|
|
52
|
+
export default (): Capability<any>[] => [
|
|
53
|
+
contributes(Capabilities.Functions, functions),
|
|
54
|
+
contributes(Capabilities.Functions, [agent]),
|
|
55
|
+
contributes(Capabilities.Functions, [research, createResearchNote, entityExtraction]),
|
|
56
|
+
contributes(Capabilities.BlueprintDefinition, blueprint),
|
|
57
|
+
contributes(Capabilities.BlueprintDefinition, RESEARCH_BLUEPRINT),
|
|
58
|
+
// TODO(burdon): Move out of assistant.
|
|
59
|
+
contributes(Capabilities.Functions, [syncLinearIssues]),
|
|
60
|
+
contributes(Capabilities.Functions, [fetchDiscordMessages]),
|
|
61
|
+
contributes(Capabilities.BlueprintDefinition, LINEAR_BLUEPRINT),
|
|
62
|
+
contributes(Capabilities.BlueprintDefinition, DISCORD_BLUEPRINT),
|
|
63
|
+
contributes(Capabilities.BlueprintDefinition, WEB_SEARCH_BLUEPRINT),
|
|
64
|
+
];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { defineCapability } from '@dxos/app-framework';
|
|
6
|
+
import { type DeepReadonly } from '@dxos/util';
|
|
7
|
+
|
|
8
|
+
import { meta } from '../meta';
|
|
9
|
+
import { type Assistant } from '../types';
|
|
10
|
+
|
|
11
|
+
export namespace AssistantCapabilities {
|
|
12
|
+
export type AssistantState = {
|
|
13
|
+
/** Map of primary object fq id to current chat. */
|
|
14
|
+
currentChat: Record<string, Assistant.Chat>;
|
|
15
|
+
};
|
|
16
|
+
export const State = defineCapability<DeepReadonly<AssistantState>>(`${meta.id}/capability/state`);
|
|
17
|
+
export const MutableState = defineCapability<AssistantState>(`${meta.id}/capability/state`);
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as AnthropicClient from '@effect/ai-anthropic/AnthropicClient';
|
|
6
|
+
import * as FetchHttpClient from '@effect/platform/FetchHttpClient';
|
|
7
|
+
import * as Layer from 'effect/Layer';
|
|
8
|
+
|
|
9
|
+
import * as AiServiceRouter from '@dxos/ai/AiServiceRouter';
|
|
10
|
+
import { Capabilities, type Capability, contributes } from '@dxos/app-framework';
|
|
11
|
+
|
|
12
|
+
export default (): Capability<any>[] => [
|
|
13
|
+
contributes(
|
|
14
|
+
Capabilities.AiModelResolver,
|
|
15
|
+
AiServiceRouter.AnthropicResolver.pipe(
|
|
16
|
+
Layer.provide(
|
|
17
|
+
AnthropicClient.layer({
|
|
18
|
+
// TODO(dmaretskyi): Read endpoint from config/settings.
|
|
19
|
+
apiUrl: 'https://ai-service.dxos.workers.dev/provider/anthropic',
|
|
20
|
+
}),
|
|
21
|
+
),
|
|
22
|
+
Layer.provide(FetchHttpClient.layer),
|
|
23
|
+
),
|
|
24
|
+
),
|
|
25
|
+
];
|
|
@@ -4,7 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
import { lazy } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
+
export const AiService = lazy(() => import('./ai-service'));
|
|
7
8
|
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
9
|
+
export const AssistantState = lazy(() => import('./state'));
|
|
10
|
+
export const BlueprintDefinition = lazy(() => import('./blueprint-definition'));
|
|
11
|
+
export const EdgeModelResolver = lazy(() => import('./edge-model-resolver'));
|
|
8
12
|
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
13
|
+
export const LocalModelResolver = lazy(() => import('./local-model-resolver'));
|
|
9
14
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
10
15
|
export const Settings = lazy(() => import('./settings'));
|
|
16
|
+
export const Toolkit = lazy(() => import('./toolkit'));
|
|
17
|
+
|
|
18
|
+
export * from './blueprint-definition';
|
|
19
|
+
export * from './capabilities';
|
|
@@ -2,20 +2,25 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { Capabilities, contributes, createIntent, createResolver
|
|
8
|
-
import {
|
|
7
|
+
import { Capabilities, type PluginContext, contributes, createIntent, createResolver } from '@dxos/app-framework';
|
|
8
|
+
import { AiContextBinder } from '@dxos/assistant';
|
|
9
|
+
import { Blueprint, Template } from '@dxos/blueprints';
|
|
10
|
+
import { fullyQualifiedId } from '@dxos/client/echo';
|
|
9
11
|
import { Sequence } from '@dxos/conductor';
|
|
10
|
-
import { Key, Obj, Ref } from '@dxos/echo';
|
|
12
|
+
import { Filter, Key, Obj, Ref } from '@dxos/echo';
|
|
11
13
|
import { CollectionAction } from '@dxos/plugin-space/types';
|
|
12
14
|
|
|
13
|
-
import { Assistant } from '../types';
|
|
15
|
+
import { Assistant, AssistantAction } from '../types';
|
|
16
|
+
|
|
17
|
+
import { BLUEPRINT_KEY, createBlueprint } from './blueprint-definition';
|
|
18
|
+
import { AssistantCapabilities } from './capabilities';
|
|
14
19
|
|
|
15
20
|
export default (context: PluginContext) => [
|
|
16
21
|
contributes(Capabilities.IntentResolver, [
|
|
17
22
|
createResolver({
|
|
18
|
-
intent:
|
|
23
|
+
intent: AssistantAction.onCreateSpace,
|
|
19
24
|
resolve: ({ space, rootCollection }) =>
|
|
20
25
|
Effect.gen(function* () {
|
|
21
26
|
const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
@@ -27,33 +32,42 @@ export default (context: PluginContext) => [
|
|
|
27
32
|
);
|
|
28
33
|
rootCollection.objects.push(Ref.make(chatCollection), Ref.make(blueprintCollection));
|
|
29
34
|
|
|
30
|
-
|
|
35
|
+
// Create default chat.
|
|
36
|
+
const { object: chat } = yield* dispatch(createIntent(AssistantAction.CreateChat, { space }));
|
|
31
37
|
space.db.add(chat);
|
|
32
|
-
|
|
33
|
-
// TODO(wittjosiah): Create default blueprint.
|
|
34
|
-
// const { object: blueprint } = yield* dispatch(createIntent(Assistant.CreateBlueprint, { ... }));
|
|
35
|
-
// space.db.add(blueprint);
|
|
36
38
|
}),
|
|
37
39
|
}),
|
|
38
40
|
createResolver({
|
|
39
|
-
intent:
|
|
40
|
-
resolve: ({ space, name }) =>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
intent: AssistantAction.CreateChat,
|
|
42
|
+
resolve: async ({ space, name }) => {
|
|
43
|
+
const queue = space.queues.create();
|
|
44
|
+
const chat = Obj.make(Assistant.Chat, { name, queue: Ref.fromDXN(queue.dxn) });
|
|
45
|
+
const { objects: blueprints } = await space.db.query(Filter.type(Blueprint.Blueprint)).run();
|
|
46
|
+
// TODO(wittjosiah): This should be a space-level setting.
|
|
47
|
+
// TODO(burdon): Clone when activated. Copy-on-write for template.
|
|
48
|
+
let defaultBlueprint = blueprints.find((blueprint) => blueprint.key === BLUEPRINT_KEY);
|
|
49
|
+
if (!defaultBlueprint) {
|
|
50
|
+
defaultBlueprint = space.db.add(createBlueprint());
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const binder = new AiContextBinder(queue);
|
|
54
|
+
await binder.bind({ blueprints: [Ref.make(defaultBlueprint)] });
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
data: { object: chat },
|
|
58
|
+
};
|
|
59
|
+
},
|
|
48
60
|
}),
|
|
49
61
|
createResolver({
|
|
50
|
-
intent:
|
|
51
|
-
resolve: ({ name, description }) => ({
|
|
52
|
-
data: {
|
|
62
|
+
intent: AssistantAction.CreateBlueprint,
|
|
63
|
+
resolve: ({ key, name, description }) => ({
|
|
64
|
+
data: {
|
|
65
|
+
object: Blueprint.make({ key, name, description, instructions: Template.make({ source: '' }) }),
|
|
66
|
+
},
|
|
53
67
|
}),
|
|
54
68
|
}),
|
|
55
69
|
createResolver({
|
|
56
|
-
intent:
|
|
70
|
+
intent: AssistantAction.CreateSequence,
|
|
57
71
|
resolve: ({ name }) => ({
|
|
58
72
|
data: {
|
|
59
73
|
object: Obj.make(Sequence, {
|
|
@@ -68,5 +82,13 @@ export default (context: PluginContext) => [
|
|
|
68
82
|
},
|
|
69
83
|
}),
|
|
70
84
|
}),
|
|
85
|
+
createResolver({
|
|
86
|
+
intent: AssistantAction.SetCurrentChat,
|
|
87
|
+
resolve: ({ companionTo, chat }) =>
|
|
88
|
+
Effect.gen(function* () {
|
|
89
|
+
const state = context.getCapability(AssistantCapabilities.MutableState);
|
|
90
|
+
state.currentChat[fullyQualifiedId(companionTo)] = chat;
|
|
91
|
+
}),
|
|
92
|
+
}),
|
|
71
93
|
]),
|
|
72
94
|
];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as OpenAiClient from '@effect/ai-openai/OpenAiClient';
|
|
6
|
+
import * as FetchHttpClient from '@effect/platform/FetchHttpClient';
|
|
7
|
+
import * as Layer from 'effect/Layer';
|
|
8
|
+
|
|
9
|
+
import * as AiServiceRouter from '@dxos/ai/AiServiceRouter';
|
|
10
|
+
import { Capabilities, type Capability, contributes } from '@dxos/app-framework';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* To start LM Studio server:
|
|
14
|
+
* ```bash
|
|
15
|
+
* ~/.lmstudio/bin/lms server start --cors
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export default (): Capability<any>[] => [
|
|
19
|
+
contributes(
|
|
20
|
+
Capabilities.AiModelResolver,
|
|
21
|
+
AiServiceRouter.LMStudioResolver.pipe(
|
|
22
|
+
Layer.provide(
|
|
23
|
+
OpenAiClient.layer({
|
|
24
|
+
apiUrl: AiServiceRouter.LMSTUDIO_ENDPOINT,
|
|
25
|
+
}),
|
|
26
|
+
),
|
|
27
|
+
Layer.provide(FetchHttpClient.layer),
|
|
28
|
+
),
|
|
29
|
+
),
|
|
30
|
+
];
|
|
@@ -2,28 +2,27 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import React, { useEffect, useMemo } from 'react';
|
|
5
|
+
import React from 'react';
|
|
7
6
|
|
|
8
|
-
import { Capabilities, contributes,
|
|
7
|
+
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
9
8
|
import { Blueprint } from '@dxos/blueprints';
|
|
10
|
-
import {
|
|
9
|
+
import { getSpace } from '@dxos/client/echo';
|
|
11
10
|
import { Sequence } from '@dxos/conductor';
|
|
12
11
|
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
13
|
-
import {
|
|
12
|
+
import { Obj } from '@dxos/echo';
|
|
14
13
|
import { SettingsStore } from '@dxos/local-storage';
|
|
15
|
-
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
16
14
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
17
15
|
|
|
18
16
|
import {
|
|
19
17
|
AssistantSettings,
|
|
20
18
|
BlueprintContainer,
|
|
19
|
+
ChatCompanion,
|
|
21
20
|
ChatContainer,
|
|
22
21
|
ChatDialog,
|
|
23
22
|
PromptSettings,
|
|
24
23
|
SequenceContainer,
|
|
25
24
|
} from '../components';
|
|
26
|
-
import {
|
|
25
|
+
import { ASSISTANT_DIALOG, meta } from '../meta';
|
|
27
26
|
import { Assistant } from '../types';
|
|
28
27
|
|
|
29
28
|
export default () =>
|
|
@@ -43,59 +42,12 @@ export default () =>
|
|
|
43
42
|
component: ({ data, role }) => <ChatContainer role={role} chat={data.subject} />,
|
|
44
43
|
}),
|
|
45
44
|
createSurface({
|
|
46
|
-
id: `${meta.id}/
|
|
45
|
+
id: `${meta.id}/companion-chat`,
|
|
47
46
|
role: 'article',
|
|
48
47
|
filter: (data): data is { companionTo: Obj.Any; subject: Assistant.Chat | 'assistant-chat' } =>
|
|
49
48
|
Obj.isObject(data.companionTo) &&
|
|
50
49
|
(Obj.instanceOf(Assistant.Chat, data.subject) || data.subject === 'assistant-chat'),
|
|
51
|
-
component: ({ data, role }) => {
|
|
52
|
-
const { dispatch } = useIntentDispatcher();
|
|
53
|
-
const associatedArtifact = useMemo(
|
|
54
|
-
() => ({
|
|
55
|
-
id: fullyQualifiedId(data.companionTo),
|
|
56
|
-
typename: getTypename(data.companionTo) ?? 'unknown',
|
|
57
|
-
spaceId: (getSpace(data.companionTo)?.id ?? 'unknown') as Key.SpaceId,
|
|
58
|
-
}),
|
|
59
|
-
[data.companionTo],
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
// TODO(wittjosiah): Factor out to container.
|
|
63
|
-
useEffect(() => {
|
|
64
|
-
const timeout = setTimeout(async () => {
|
|
65
|
-
const space = getSpace(data.companionTo);
|
|
66
|
-
if (space && data.subject === 'assistant-chat') {
|
|
67
|
-
const result = await space.db
|
|
68
|
-
.query(Query.select(Filter.ids(data.companionTo.id)).targetOf(Assistant.CompanionTo).source())
|
|
69
|
-
.run();
|
|
70
|
-
if (result.objects.length > 0) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const program = Effect.gen(function* () {
|
|
75
|
-
const { object } = yield* dispatch(createIntent(Assistant.CreateChat, { space }));
|
|
76
|
-
yield* dispatch(createIntent(SpaceAction.AddObject, { object, target: space, hidden: true }));
|
|
77
|
-
yield* dispatch(
|
|
78
|
-
createIntent(SpaceAction.AddRelation, {
|
|
79
|
-
space,
|
|
80
|
-
schema: Assistant.CompanionTo,
|
|
81
|
-
source: object,
|
|
82
|
-
target: data.companionTo,
|
|
83
|
-
}),
|
|
84
|
-
);
|
|
85
|
-
});
|
|
86
|
-
void Effect.runPromise(program);
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
return () => clearTimeout(timeout);
|
|
91
|
-
}, [data.subject]);
|
|
92
|
-
|
|
93
|
-
if (data.subject === 'assistant-chat') {
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return <ChatContainer role={role} chat={data.subject} artifact={associatedArtifact} />;
|
|
98
|
-
},
|
|
50
|
+
component: ({ data, role }) => <ChatCompanion role={role} data={data} />,
|
|
99
51
|
}),
|
|
100
52
|
createSurface({
|
|
101
53
|
id: `${meta.id}/sequence`,
|
|
@@ -104,10 +56,11 @@ export default () =>
|
|
|
104
56
|
component: ({ data }) => <SequenceContainer sequence={data.subject} />,
|
|
105
57
|
}),
|
|
106
58
|
createSurface({
|
|
107
|
-
id: `${meta.id}/companion
|
|
59
|
+
id: `${meta.id}/companion-logs`,
|
|
108
60
|
role: 'article',
|
|
109
61
|
filter: (data): data is { companionTo: Sequence } =>
|
|
110
62
|
Obj.instanceOf(Sequence, data.companionTo) && data.subject === 'logs',
|
|
63
|
+
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
111
64
|
component: ({ data, role }) => {
|
|
112
65
|
const space = getSpace(data.companionTo);
|
|
113
66
|
return (
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { contributes } from '@dxos/app-framework';
|
|
6
|
+
import { LocalStorageStore } from '@dxos/local-storage';
|
|
7
|
+
|
|
8
|
+
import { meta } from '../meta';
|
|
9
|
+
|
|
10
|
+
import { AssistantCapabilities } from './capabilities';
|
|
11
|
+
|
|
12
|
+
export default () => {
|
|
13
|
+
// NOTE: This needs to be a chat object rather than a string id to avoid a query race.
|
|
14
|
+
// TODO(wittjosiah): Handle serialization and hydration for this so it can be cached.
|
|
15
|
+
const state = new LocalStorageStore<AssistantCapabilities.AssistantState>(meta.id, {
|
|
16
|
+
currentChat: {},
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
return contributes(AssistantCapabilities.State, state.values, () => state.close());
|
|
20
|
+
};
|