@dxos/plugin-assistant 0.8.4-main.dedc0f3 → 0.8.4-main.ead640a
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-BFNN6K46.mjs → BlueprintContainer-FOZTO447.mjs} +6 -7
- package/dist/lib/browser/{BlueprintContainer-BFNN6K46.mjs.map → BlueprintContainer-FOZTO447.mjs.map} +3 -3
- package/dist/lib/browser/{ChatCompanion-YYYCHZYV.mjs → ChatCompanion-EC6LBEWF.mjs} +38 -14
- package/dist/lib/browser/ChatCompanion-EC6LBEWF.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-G6YHR6GJ.mjs → ChatContainer-A2SL6WO5.mjs} +7 -9
- package/dist/lib/browser/{ChatContainer-G6YHR6GJ.mjs.map → ChatContainer-A2SL6WO5.mjs.map} +3 -3
- package/dist/lib/browser/{ChatDialog-HJ7VDRQO.mjs → ChatDialog-XMOUFX2P.mjs} +3 -5
- package/dist/lib/browser/{ChatDialog-HJ7VDRQO.mjs.map → ChatDialog-XMOUFX2P.mjs.map} +1 -1
- package/dist/lib/browser/{SequenceContainer-TF5QNXYM.mjs → SequenceContainer-2FEWMQGW.mjs} +4 -4
- 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-3C43MLCD.mjs → app-graph-builder-7AE4R5KJ.mjs} +41 -11
- package/dist/lib/browser/app-graph-builder-7AE4R5KJ.mjs.map +7 -0
- package/dist/lib/browser/{blueprint-definition-VHFSRTEJ.mjs → blueprint-definition-NSJARW5U.mjs} +2 -2
- package/dist/lib/browser/{chunk-GLWD66TA.mjs → chunk-2CE2KPKZ.mjs} +28 -14
- package/dist/lib/browser/chunk-2CE2KPKZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SMIVXXAI.mjs → chunk-37VMDB4P.mjs} +32 -14
- package/dist/lib/browser/chunk-37VMDB4P.mjs.map +7 -0
- package/dist/lib/browser/{chunk-R6LRGW3I.mjs → chunk-3EWE2UQD.mjs} +11 -7
- package/dist/lib/browser/chunk-3EWE2UQD.mjs.map +7 -0
- package/dist/lib/browser/{chunk-EZUSNS2J.mjs → chunk-5EGXHCAZ.mjs} +2 -5
- package/dist/lib/browser/chunk-5EGXHCAZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-O4LUJEDV.mjs → chunk-5RICKAMN.mjs} +5 -7
- package/dist/lib/browser/chunk-5RICKAMN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PL4O4ZJU.mjs → chunk-7THOIN6F.mjs} +309 -481
- package/dist/lib/browser/chunk-7THOIN6F.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PQI3MGDN.mjs → chunk-HYYWP3KP.mjs} +6 -5
- package/dist/lib/browser/chunk-HYYWP3KP.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PPJAIE2T.mjs → chunk-Z7DQT64Z.mjs} +39 -37
- package/dist/lib/browser/chunk-Z7DQT64Z.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 +72 -48
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-I6M3ZDAS.mjs → intent-resolver-BZUU4UNA.mjs} +29 -11
- package/dist/lib/browser/intent-resolver-BZUU4UNA.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-WNLA2636.mjs → react-surface-KRRUOMYY.mjs} +13 -15
- package/dist/lib/browser/react-surface-KRRUOMYY.mjs.map +7 -0
- package/dist/lib/browser/{settings-36V3VUMW.mjs → settings-PSR3WF3X.mjs} +5 -5
- package/dist/lib/browser/{settings-36V3VUMW.mjs.map → settings-PSR3WF3X.mjs.map} +1 -1
- package/dist/lib/browser/{state-AINRYS5W.mjs → state-LXTS54DI.mjs} +5 -5
- package/dist/lib/browser/{state-AINRYS5W.mjs.map → state-LXTS54DI.mjs.map} +1 -1
- package/dist/lib/browser/{toolkit-Y5OYX5PO.mjs → toolkit-NQ2GXCF5.mjs} +29 -21
- package/dist/lib/browser/toolkit-NQ2GXCF5.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/{BlueprintContainer-X4MRBKDR.mjs → BlueprintContainer-6HSEVQ7U.mjs} +6 -7
- package/dist/lib/node-esm/{BlueprintContainer-X4MRBKDR.mjs.map → BlueprintContainer-6HSEVQ7U.mjs.map} +3 -3
- package/dist/lib/node-esm/{ChatCompanion-PUAFRIEC.mjs → ChatCompanion-NDYEAUQN.mjs} +38 -14
- package/dist/lib/node-esm/ChatCompanion-NDYEAUQN.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-EZZF7RSQ.mjs → ChatContainer-NMDQM5HG.mjs} +7 -9
- package/dist/lib/node-esm/{ChatContainer-EZZF7RSQ.mjs.map → ChatContainer-NMDQM5HG.mjs.map} +3 -3
- package/dist/lib/node-esm/{ChatDialog-PTQLZNJU.mjs → ChatDialog-QPRWMRU4.mjs} +3 -5
- package/dist/lib/node-esm/{ChatDialog-PTQLZNJU.mjs.map → ChatDialog-QPRWMRU4.mjs.map} +1 -1
- package/dist/lib/node-esm/{SequenceContainer-UXOVZPZO.mjs → SequenceContainer-PGGJUQ46.mjs} +4 -4
- 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-NM3JDLQ2.mjs → app-graph-builder-SJCOS64C.mjs} +41 -11
- package/dist/lib/node-esm/app-graph-builder-SJCOS64C.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-4E6XTLVN.mjs → blueprint-definition-WD2IVMAI.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-VFY2JG62.mjs → chunk-73ABYRYX.mjs} +5 -7
- package/dist/lib/node-esm/chunk-73ABYRYX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-LVTG5JTW.mjs → chunk-HDZX6TSZ.mjs} +11 -7
- package/dist/lib/node-esm/chunk-HDZX6TSZ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-4WLFSXZG.mjs → chunk-TMCGJPAN.mjs} +6 -5
- package/dist/lib/node-esm/chunk-TMCGJPAN.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-VH3LTD76.mjs → chunk-TW2WKKSR.mjs} +39 -37
- package/dist/lib/node-esm/chunk-TW2WKKSR.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-QG2KT3AT.mjs → chunk-U2NYUS2N.mjs} +28 -14
- package/dist/lib/node-esm/chunk-U2NYUS2N.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-XD4CDA4R.mjs → chunk-XQGWSZ4T.mjs} +2 -5
- package/dist/lib/node-esm/chunk-XQGWSZ4T.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ZIDP7HBI.mjs → chunk-YZYGXFVG.mjs} +309 -481
- package/dist/lib/node-esm/chunk-YZYGXFVG.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7YOGZI66.mjs → chunk-ZQ3THJ2W.mjs} +32 -14
- package/dist/lib/node-esm/chunk-ZQ3THJ2W.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 +72 -48
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-VIINHFMT.mjs → intent-resolver-B7YAS3NT.mjs} +29 -11
- package/dist/lib/node-esm/intent-resolver-B7YAS3NT.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-GP3LU6DX.mjs → react-surface-VRDDARFF.mjs} +13 -15
- package/dist/lib/node-esm/react-surface-VRDDARFF.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-7ZCZ6AS5.mjs → settings-4EBIOJVK.mjs} +5 -5
- package/dist/lib/node-esm/{settings-7ZCZ6AS5.mjs.map → settings-4EBIOJVK.mjs.map} +1 -1
- package/dist/lib/node-esm/{state-EQS5KP6M.mjs → state-BO6GUFLB.mjs} +5 -5
- package/dist/lib/node-esm/{state-EQS5KP6M.mjs.map → state-BO6GUFLB.mjs.map} +1 -1
- package/dist/lib/node-esm/{toolkit-2F2OL6WB.mjs → toolkit-V57PRJNG.mjs} +29 -21
- package/dist/lib/node-esm/toolkit-V57PRJNG.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -2
- 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 +2 -3
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -21
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +0 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
- package/dist/types/src/components/BlueprintSettings.d.ts +6 -0
- package/dist/types/src/components/BlueprintSettings.d.ts.map +1 -0
- package/dist/types/src/components/Chat/Chat.d.ts +2 -1
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +4 -2
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +7 -3
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/registry.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 +8 -3
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +4 -1
- 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 +4 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts +1 -3
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +4 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/functions/analysis.d.ts.map +1 -1
- package/dist/types/src/functions/list.d.ts.map +1 -1
- package/dist/types/src/functions/load.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +0 -2
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +2 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/dist/types/src/index.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 +1 -0
- package/dist/types/src/processor/index.d.ts.map +1 -1
- package/dist/types/src/processor/presets.d.ts +1 -1
- package/dist/types/src/processor/presets.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +4 -3
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/processor/update-name.d.ts +10 -0
- package/dist/types/src/processor/update-name.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +0 -2
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +1 -1
- package/dist/types/src/testing/test-generator.d.ts.map +1 -1
- package/dist/types/src/testing/test-services.d.ts +2 -2
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +16 -7
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/AssistantAction.d.ts +19 -4
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +12 -12
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +91 -112
- package/src/AssistantPlugin.tsx +139 -137
- package/src/capabilities/ai-service.ts +6 -7
- package/src/capabilities/app-graph-builder.ts +36 -4
- package/src/capabilities/blueprint-definition.ts +7 -1
- package/src/capabilities/capabilities.ts +0 -53
- package/src/capabilities/edge-model-resolver.ts +5 -7
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/intent-resolver.ts +26 -3
- package/src/capabilities/local-model-resolver.ts +6 -8
- package/src/capabilities/react-surface.tsx +3 -3
- package/src/capabilities/toolkit.ts +18 -13
- package/src/components/BlueprintContainer.tsx +2 -2
- package/src/components/BlueprintSettings.tsx +15 -0
- package/src/components/Chat/Chat.tsx +41 -34
- package/src/components/ChatCompanion.tsx +33 -8
- package/src/components/ChatContainer.tsx +2 -2
- package/src/components/ChatProgress/ChatProgress.tsx +1 -2
- package/src/components/ChatPrompt/ChatOptions.tsx +17 -25
- package/src/components/ChatThread/ChatThread.stories.tsx +10 -11
- package/src/components/ChatThread/ChatThread.tsx +7 -3
- package/src/components/ChatThread/registry.tsx +6 -11
- package/src/components/ChatThread/sync.test.ts +1 -1
- package/src/components/ChatThread/sync.ts +1 -1
- package/src/components/SequenceContainer.tsx +2 -2
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +5 -4
- package/src/components/SequenceEditor/SequenceEditor.tsx +2 -2
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +5 -5
- package/src/components/TemplateEditor/TemplateEditor.tsx +8 -4
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +3 -5
- package/src/components/TemplateEditor/TemplateForm.tsx +1 -1
- package/src/components/ToolBlock/ToolBlock.tsx +6 -6
- package/src/components/Toolbar/Toolbar.tsx +1 -1
- package/src/components/Toolbar/useChatToolbarActions.ts +1 -1
- package/src/components/Toolbox/Toolbox.stories.tsx +3 -6
- package/src/components/index.ts +1 -1
- package/src/functions/analysis.ts +4 -2
- package/src/functions/list.ts +4 -2
- package/src/functions/load.ts +7 -3
- package/src/hooks/index.ts +0 -2
- package/src/hooks/useBlueprintRegistry.ts +17 -3
- package/src/hooks/useChatProcessor.ts +12 -4
- package/src/hooks/useChatServices.ts +5 -4
- package/src/hooks/useContextBinder.ts +17 -5
- package/src/hooks/useItemTypes.ts +1 -1
- package/src/index.ts +2 -0
- package/src/meta.ts +3 -5
- package/src/processor/index.ts +1 -0
- package/src/processor/presets.ts +1 -1
- package/src/processor/processor.test.ts +17 -13
- package/src/processor/processor.ts +14 -39
- package/src/processor/update-name.ts +57 -0
- package/src/testing/index.ts +0 -2
- package/src/testing/test-generator.ts +5 -1
- package/src/testing/test-services.ts +2 -8
- package/src/translations.ts +1 -0
- package/src/types/Assistant.ts +7 -4
- package/src/types/AssistantAction.ts +10 -2
- package/src/types/service.ts +15 -7
- package/dist/lib/browser/ChatCompanion-YYYCHZYV.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-TF5QNXYM.mjs.map +0 -7
- package/dist/lib/browser/ai-service-YC2EQPHA.mjs +0 -22
- package/dist/lib/browser/ai-service-YC2EQPHA.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-3C43MLCD.mjs.map +0 -7
- package/dist/lib/browser/chunk-EZUSNS2J.mjs.map +0 -7
- package/dist/lib/browser/chunk-GLWD66TA.mjs.map +0 -7
- package/dist/lib/browser/chunk-O4LUJEDV.mjs.map +0 -7
- package/dist/lib/browser/chunk-PL4O4ZJU.mjs.map +0 -7
- package/dist/lib/browser/chunk-PPJAIE2T.mjs.map +0 -7
- package/dist/lib/browser/chunk-PQI3MGDN.mjs.map +0 -7
- package/dist/lib/browser/chunk-R6LRGW3I.mjs.map +0 -7
- package/dist/lib/browser/chunk-SMIVXXAI.mjs.map +0 -7
- package/dist/lib/browser/compute-runtime-X6IREJN3.mjs +0 -155
- package/dist/lib/browser/compute-runtime-X6IREJN3.mjs.map +0 -7
- package/dist/lib/browser/edge-model-resolver-JNEB355N.mjs +0 -22
- package/dist/lib/browser/edge-model-resolver-JNEB355N.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-I6M3ZDAS.mjs.map +0 -7
- package/dist/lib/browser/local-model-resolver-EUXSRZ7X.mjs +0 -21
- package/dist/lib/browser/local-model-resolver-EUXSRZ7X.mjs.map +0 -7
- package/dist/lib/browser/react-surface-WNLA2636.mjs.map +0 -7
- package/dist/lib/browser/toolkit-Y5OYX5PO.mjs.map +0 -7
- package/dist/lib/node-esm/ChatCompanion-PUAFRIEC.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-UXOVZPZO.mjs.map +0 -7
- package/dist/lib/node-esm/ai-service-XUMZVFCK.mjs +0 -23
- package/dist/lib/node-esm/ai-service-XUMZVFCK.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-NM3JDLQ2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4WLFSXZG.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-LVTG5JTW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QG2KT3AT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VFY2JG62.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VH3LTD76.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XD4CDA4R.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZIDP7HBI.mjs.map +0 -7
- package/dist/lib/node-esm/compute-runtime-NRHLLTSC.mjs +0 -156
- package/dist/lib/node-esm/compute-runtime-NRHLLTSC.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-UE5TLLJZ.mjs +0 -23
- package/dist/lib/node-esm/edge-model-resolver-UE5TLLJZ.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-VIINHFMT.mjs.map +0 -7
- package/dist/lib/node-esm/local-model-resolver-JBEFVVZA.mjs +0 -22
- package/dist/lib/node-esm/local-model-resolver-JBEFVVZA.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-GP3LU6DX.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-2F2OL6WB.mjs.map +0 -7
- package/dist/types/src/capabilities/compute-runtime.d.ts +0 -5
- package/dist/types/src/capabilities/compute-runtime.d.ts.map +0 -1
- package/dist/types/src/components/PromptSettings.d.ts +0 -6
- package/dist/types/src/components/PromptSettings.d.ts.map +0 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts +0 -21
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +0 -1
- package/dist/types/src/execution-graph/index.d.ts +0 -2
- package/dist/types/src/execution-graph/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +0 -8
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +0 -1
- package/dist/types/src/hooks/useExecutionGraph.d.ts +0 -6
- package/dist/types/src/hooks/useExecutionGraph.d.ts.map +0 -1
- package/dist/types/src/stories/Chat.stories.d.ts +0 -30
- package/dist/types/src/stories/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +0 -4
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/ChatContainer.d.ts +0 -4
- package/dist/types/src/stories/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/ChessContainer.d.ts +0 -4
- package/dist/types/src/stories/components/ChessContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/CommentsContainer.d.ts +0 -4
- package/dist/types/src/stories/components/CommentsContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/DebugCard.d.ts +0 -8
- package/dist/types/src/stories/components/DebugCard.d.ts.map +0 -1
- package/dist/types/src/stories/components/GraphContainer.d.ts +0 -6
- package/dist/types/src/stories/components/GraphContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/InvocationsContainer.d.ts +0 -4
- package/dist/types/src/stories/components/InvocationsContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/LoggingContainer.d.ts +0 -7
- package/dist/types/src/stories/components/LoggingContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/MessageContainer.d.ts +0 -4
- package/dist/types/src/stories/components/MessageContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/PromptContainer.d.ts +0 -6
- package/dist/types/src/stories/components/PromptContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/ResearchInputStack.d.ts +0 -4
- package/dist/types/src/stories/components/ResearchInputStack.d.ts.map +0 -1
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts +0 -4
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts.map +0 -1
- package/dist/types/src/stories/components/TasksContainer.d.ts +0 -4
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts +0 -3
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/TriggersContainer.d.ts +0 -14
- package/dist/types/src/stories/components/TriggersContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/index.d.ts +0 -16
- package/dist/types/src/stories/components/index.d.ts.map +0 -1
- package/dist/types/src/stories/components/types.d.ts +0 -7
- package/dist/types/src/stories/components/types.d.ts.map +0 -1
- package/dist/types/src/stories/testing/data.d.ts +0 -9
- package/dist/types/src/stories/testing/data.d.ts.map +0 -1
- package/dist/types/src/stories/testing/index.d.ts +0 -3
- package/dist/types/src/stories/testing/index.d.ts.map +0 -1
- package/dist/types/src/stories/testing/schema.d.ts +0 -7
- package/dist/types/src/stories/testing/schema.d.ts.map +0 -1
- package/dist/types/src/stories/testing/testing.d.ts +0 -48
- package/dist/types/src/stories/testing/testing.d.ts.map +0 -1
- package/dist/types/src/testing/test-data.d.ts +0 -14
- package/dist/types/src/testing/test-data.d.ts.map +0 -1
- package/dist/types/src/testing/test-functions.d.ts +0 -6
- package/dist/types/src/testing/test-functions.d.ts.map +0 -1
- package/src/capabilities/compute-runtime.ts +0 -124
- package/src/components/PromptSettings.tsx +0 -90
- package/src/execution-graph/execution-graph.ts +0 -211
- package/src/execution-graph/index.ts +0 -5
- package/src/hooks/useComputeRuntimeCallback.ts +0 -25
- package/src/hooks/useExecutionGraph.ts +0 -20
- package/src/stories/Chat.stories.tsx +0 -657
- package/src/stories/components/BlueprintContainer.tsx +0 -34
- package/src/stories/components/ChatContainer.tsx +0 -74
- package/src/stories/components/ChessContainer.tsx +0 -17
- package/src/stories/components/CommentsContainer.tsx +0 -25
- package/src/stories/components/DebugCard.tsx +0 -61
- package/src/stories/components/GraphContainer.tsx +0 -119
- package/src/stories/components/InvocationsContainer.tsx +0 -17
- package/src/stories/components/LoggingContainer.tsx +0 -33
- package/src/stories/components/MessageContainer.tsx +0 -22
- package/src/stories/components/PromptContainer.tsx +0 -52
- package/src/stories/components/ResearchInputStack.tsx +0 -30
- package/src/stories/components/ResearchOutputStack.tsx +0 -29
- package/src/stories/components/TasksContainer.tsx +0 -49
- package/src/stories/components/TokenManagerContainer.tsx +0 -14
- package/src/stories/components/TriggersContainer.tsx +0 -75
- package/src/stories/components/index.ts +0 -20
- package/src/stories/components/types.ts +0 -11
- package/src/stories/testing/data.ts +0 -142
- package/src/stories/testing/index.ts +0 -6
- package/src/stories/testing/schema.ts +0 -17
- package/src/stories/testing/testing.tsx +0 -279
- package/src/testing/test-data.ts +0 -245
- package/src/testing/test-functions.ts +0 -16
- /package/dist/lib/browser/{blueprint-definition-VHFSRTEJ.mjs.map → blueprint-definition-NSJARW5U.mjs.map} +0 -0
- /package/dist/lib/node-esm/{blueprint-definition-4E6XTLVN.mjs.map → blueprint-definition-WD2IVMAI.mjs.map} +0 -0
|
@@ -8,6 +8,10 @@ import {
|
|
|
8
8
|
DISCORD_BLUEPRINT,
|
|
9
9
|
LINEAR_BLUEPRINT,
|
|
10
10
|
RESEARCH_BLUEPRINT,
|
|
11
|
+
WEB_SEARCH_BLUEPRINT,
|
|
12
|
+
agent,
|
|
13
|
+
createResearchNote,
|
|
14
|
+
entityExtraction,
|
|
11
15
|
fetchDiscordMessages,
|
|
12
16
|
research,
|
|
13
17
|
syncLinearIssues,
|
|
@@ -47,7 +51,8 @@ const blueprint = createBlueprint();
|
|
|
47
51
|
// TODO(dmaretskyi): Consider splitting into multiple modules.
|
|
48
52
|
export default (): Capability<any>[] => [
|
|
49
53
|
contributes(Capabilities.Functions, functions),
|
|
50
|
-
contributes(Capabilities.Functions, [
|
|
54
|
+
contributes(Capabilities.Functions, [agent]),
|
|
55
|
+
contributes(Capabilities.Functions, [research, createResearchNote, entityExtraction]),
|
|
51
56
|
contributes(Capabilities.BlueprintDefinition, blueprint),
|
|
52
57
|
contributes(Capabilities.BlueprintDefinition, RESEARCH_BLUEPRINT),
|
|
53
58
|
// TODO(burdon): Move out of assistant.
|
|
@@ -55,4 +60,5 @@ export default (): Capability<any>[] => [
|
|
|
55
60
|
contributes(Capabilities.Functions, [fetchDiscordMessages]),
|
|
56
61
|
contributes(Capabilities.BlueprintDefinition, LINEAR_BLUEPRINT),
|
|
57
62
|
contributes(Capabilities.BlueprintDefinition, DISCORD_BLUEPRINT),
|
|
63
|
+
contributes(Capabilities.BlueprintDefinition, WEB_SEARCH_BLUEPRINT),
|
|
58
64
|
];
|
|
@@ -2,22 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type Layer, type ManagedRuntime } from 'effect';
|
|
6
|
-
|
|
7
|
-
import { type AiService, type AiServiceRouter, type ToolExecutionService, type ToolResolverService } from '@dxos/ai';
|
|
8
5
|
import { defineCapability } from '@dxos/app-framework';
|
|
9
|
-
import type {
|
|
10
|
-
CredentialsService,
|
|
11
|
-
DatabaseService,
|
|
12
|
-
FunctionImplementationResolver,
|
|
13
|
-
InvocationTracer,
|
|
14
|
-
LocalFunctionExecutionService,
|
|
15
|
-
QueueService,
|
|
16
|
-
RemoteFunctionExecutionService,
|
|
17
|
-
TriggerDispatcher,
|
|
18
|
-
TriggerStateStore,
|
|
19
|
-
} from '@dxos/functions';
|
|
20
|
-
import type { SpaceId } from '@dxos/keys';
|
|
21
6
|
import { type DeepReadonly } from '@dxos/util';
|
|
22
7
|
|
|
23
8
|
import { meta } from '../meta';
|
|
@@ -30,42 +15,4 @@ export namespace AssistantCapabilities {
|
|
|
30
15
|
};
|
|
31
16
|
export const State = defineCapability<DeepReadonly<AssistantState>>(`${meta.id}/capability/state`);
|
|
32
17
|
export const MutableState = defineCapability<AssistantState>(`${meta.id}/capability/state`);
|
|
33
|
-
|
|
34
|
-
export type AiServiceLayer = Layer.Layer<AiService.AiService>;
|
|
35
|
-
export const AiServiceLayer = defineCapability<AiServiceLayer>(`${meta.id}/capability/ai-service-factory`);
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Plugins can contribute them to provide model resolvers.
|
|
39
|
-
*/
|
|
40
|
-
export const AiModelResolver = defineCapability<Layer.Layer<AiServiceRouter.AiModelResolver>>(
|
|
41
|
-
`${meta.id}/capability/ai-model-resolver`,
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Service stack for executing agents, functions, and triggers.
|
|
46
|
-
*/
|
|
47
|
-
export type ComputeServices =
|
|
48
|
-
| TriggerDispatcher
|
|
49
|
-
| AiService.AiService
|
|
50
|
-
| DatabaseService
|
|
51
|
-
| QueueService
|
|
52
|
-
| CredentialsService
|
|
53
|
-
| LocalFunctionExecutionService
|
|
54
|
-
| RemoteFunctionExecutionService
|
|
55
|
-
// TODO(dmaretskyi): This service is private and shouldn't be exposed as a part of public API.
|
|
56
|
-
| FunctionImplementationResolver
|
|
57
|
-
| InvocationTracer
|
|
58
|
-
| TriggerStateStore
|
|
59
|
-
// TODO(dmaretskyi): Those should be provided at AI-chat call site.
|
|
60
|
-
| ToolResolverService
|
|
61
|
-
| ToolExecutionService;
|
|
62
|
-
|
|
63
|
-
export interface ComputeRuntimeProvider {
|
|
64
|
-
getRuntime(spaceId: SpaceId): ManagedRuntime.ManagedRuntime<ComputeServices, never>;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Runtime for executing agents, functions, and triggers.
|
|
69
|
-
*/
|
|
70
|
-
export const ComputeRuntime = defineCapability<ComputeRuntimeProvider>(`${meta.id}/capability/compute-runtime`);
|
|
71
18
|
}
|
|
@@ -3,17 +3,15 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as AnthropicClient from '@effect/ai-anthropic/AnthropicClient';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import * as FetchHttpClient from '@effect/platform/FetchHttpClient';
|
|
7
|
+
import * as Layer from 'effect/Layer';
|
|
8
8
|
|
|
9
|
-
import
|
|
10
|
-
import { type Capability, contributes } from '@dxos/app-framework';
|
|
11
|
-
|
|
12
|
-
import { AssistantCapabilities } from './capabilities';
|
|
9
|
+
import * as AiServiceRouter from '@dxos/ai/AiServiceRouter';
|
|
10
|
+
import { Capabilities, type Capability, contributes } from '@dxos/app-framework';
|
|
13
11
|
|
|
14
12
|
export default (): Capability<any>[] => [
|
|
15
13
|
contributes(
|
|
16
|
-
|
|
14
|
+
Capabilities.AiModelResolver,
|
|
17
15
|
AiServiceRouter.AnthropicResolver.pipe(
|
|
18
16
|
Layer.provide(
|
|
19
17
|
AnthropicClient.layer({
|
|
@@ -14,7 +14,6 @@ export const LocalModelResolver = lazy(() => import('./local-model-resolver'));
|
|
|
14
14
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
15
15
|
export const Settings = lazy(() => import('./settings'));
|
|
16
16
|
export const Toolkit = lazy(() => import('./toolkit'));
|
|
17
|
-
export const ComputeRuntime = lazy(() => import('./compute-runtime'));
|
|
18
17
|
|
|
19
18
|
export * from './blueprint-definition';
|
|
20
19
|
export * from './capabilities';
|
|
@@ -2,15 +2,18 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, type PluginContext, contributes, createIntent, createResolver } from '@dxos/app-framework';
|
|
8
8
|
import { AiContextBinder } from '@dxos/assistant';
|
|
9
|
+
import { AiConversation } from '@dxos/assistant';
|
|
9
10
|
import { Blueprint, Template } from '@dxos/blueprints';
|
|
10
11
|
import { fullyQualifiedId } from '@dxos/client/echo';
|
|
11
12
|
import { Sequence } from '@dxos/conductor';
|
|
12
13
|
import { Filter, Key, Obj, Ref } from '@dxos/echo';
|
|
13
14
|
import { CollectionAction } from '@dxos/plugin-space/types';
|
|
15
|
+
import { getSpace } from '@dxos/react-client/echo';
|
|
16
|
+
import { type DataType } from '@dxos/schema';
|
|
14
17
|
|
|
15
18
|
import { Assistant, AssistantAction } from '../types';
|
|
16
19
|
|
|
@@ -20,7 +23,7 @@ import { AssistantCapabilities } from './capabilities';
|
|
|
20
23
|
export default (context: PluginContext) => [
|
|
21
24
|
contributes(Capabilities.IntentResolver, [
|
|
22
25
|
createResolver({
|
|
23
|
-
intent: AssistantAction.
|
|
26
|
+
intent: AssistantAction.onCreateSpace,
|
|
24
27
|
resolve: ({ space, rootCollection }) =>
|
|
25
28
|
Effect.gen(function* () {
|
|
26
29
|
const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
@@ -41,7 +44,7 @@ export default (context: PluginContext) => [
|
|
|
41
44
|
intent: AssistantAction.CreateChat,
|
|
42
45
|
resolve: async ({ space, name }) => {
|
|
43
46
|
const queue = space.queues.create();
|
|
44
|
-
const chat =
|
|
47
|
+
const chat = Assistant.makeChat({ name, queue });
|
|
45
48
|
const { objects: blueprints } = await space.db.query(Filter.type(Blueprint.Blueprint)).run();
|
|
46
49
|
// TODO(wittjosiah): This should be a space-level setting.
|
|
47
50
|
// TODO(burdon): Clone when activated. Copy-on-write for template.
|
|
@@ -51,13 +54,33 @@ export default (context: PluginContext) => [
|
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
const binder = new AiContextBinder(queue);
|
|
57
|
+
await binder.open();
|
|
54
58
|
await binder.bind({ blueprints: [Ref.make(defaultBlueprint)] });
|
|
59
|
+
await binder.close();
|
|
55
60
|
|
|
56
61
|
return {
|
|
57
62
|
data: { object: chat },
|
|
58
63
|
};
|
|
59
64
|
},
|
|
60
65
|
}),
|
|
66
|
+
createResolver({
|
|
67
|
+
intent: AssistantAction.UpdateChatName,
|
|
68
|
+
resolve: async ({ chat }) => {
|
|
69
|
+
// TODO(burdon): Reuse system conversation/queue.
|
|
70
|
+
const space = getSpace(chat);
|
|
71
|
+
const queue = space?.queues.create<DataType.Message>();
|
|
72
|
+
if (!queue) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const conversation = new AiConversation(queue);
|
|
77
|
+
await conversation.open();
|
|
78
|
+
// TODO(burdon): How to get runtime?
|
|
79
|
+
// await updateName(runtime, conversation, chat);
|
|
80
|
+
await conversation.close();
|
|
81
|
+
console.log(chat);
|
|
82
|
+
},
|
|
83
|
+
}),
|
|
61
84
|
createResolver({
|
|
62
85
|
intent: AssistantAction.CreateBlueprint,
|
|
63
86
|
resolve: ({ key, name, description }) => ({
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
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
8
|
|
|
9
|
-
import
|
|
10
|
-
import { type Capability, contributes } from '@dxos/app-framework';
|
|
11
|
-
|
|
12
|
-
import { AssistantCapabilities } from './capabilities';
|
|
9
|
+
import * as AiServiceRouter from '@dxos/ai/AiServiceRouter';
|
|
10
|
+
import { Capabilities, type Capability, contributes } from '@dxos/app-framework';
|
|
13
11
|
|
|
14
12
|
/**
|
|
15
13
|
* To start LM Studio server:
|
|
@@ -19,7 +17,7 @@ import { AssistantCapabilities } from './capabilities';
|
|
|
19
17
|
*/
|
|
20
18
|
export default (): Capability<any>[] => [
|
|
21
19
|
contributes(
|
|
22
|
-
|
|
20
|
+
Capabilities.AiModelResolver,
|
|
23
21
|
AiServiceRouter.LMStudioResolver.pipe(
|
|
24
22
|
Layer.provide(
|
|
25
23
|
OpenAiClient.layer({
|
|
@@ -16,10 +16,10 @@ import { StackItem } from '@dxos/react-ui-stack';
|
|
|
16
16
|
import {
|
|
17
17
|
AssistantSettings,
|
|
18
18
|
BlueprintContainer,
|
|
19
|
+
BlueprintSettings,
|
|
19
20
|
ChatCompanion,
|
|
20
21
|
ChatContainer,
|
|
21
22
|
ChatDialog,
|
|
22
|
-
PromptSettings,
|
|
23
23
|
SequenceContainer,
|
|
24
24
|
} from '../components';
|
|
25
25
|
import { ASSISTANT_DIALOG, meta } from '../meta';
|
|
@@ -77,10 +77,10 @@ export default () =>
|
|
|
77
77
|
component: ({ data }) => <BlueprintContainer blueprint={data.subject} />,
|
|
78
78
|
}),
|
|
79
79
|
createSurface({
|
|
80
|
-
id: `${meta.id}/
|
|
80
|
+
id: `${meta.id}/blueprint-settings`,
|
|
81
81
|
role: 'object-settings',
|
|
82
82
|
filter: (data): data is { subject: Blueprint.Blueprint } => Obj.instanceOf(Blueprint.Blueprint, data.subject),
|
|
83
|
-
component: ({ data }) => <
|
|
83
|
+
component: ({ data }) => <BlueprintSettings blueprint={data.subject} />,
|
|
84
84
|
}),
|
|
85
85
|
createSurface({
|
|
86
86
|
id: ASSISTANT_DIALOG,
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import * as Tool from '@effect/ai/Tool';
|
|
6
|
+
import * as Toolkit from '@effect/ai/Toolkit';
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
import * as Schema from 'effect/Schema';
|
|
7
9
|
|
|
8
10
|
import { Capabilities, type Capability, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
9
11
|
import { AiContextService, ArtifactId } from '@dxos/assistant';
|
|
10
|
-
import {
|
|
12
|
+
import { WebSearchToolkit } from '@dxos/assistant-testing';
|
|
13
|
+
import { Filter, Obj, Ref, SchemaNotFoundError, Type } from '@dxos/echo';
|
|
11
14
|
import { DatabaseService } from '@dxos/functions';
|
|
12
15
|
import { invariant } from '@dxos/invariant';
|
|
13
16
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
@@ -17,8 +20,8 @@ import { DataType } from '@dxos/schema';
|
|
|
17
20
|
import { trim } from '@dxos/util';
|
|
18
21
|
|
|
19
22
|
// TODO(burdon): Reconcile with functions (currently reuses plugin framework intents).
|
|
20
|
-
class
|
|
21
|
-
|
|
23
|
+
class AssistantToolkit extends Toolkit.make(
|
|
24
|
+
Tool.make('add-to-context', {
|
|
22
25
|
description: trim`
|
|
23
26
|
Adds the object to the chat context.
|
|
24
27
|
`,
|
|
@@ -29,9 +32,10 @@ class Toolkit extends AiToolkit.make(
|
|
|
29
32
|
},
|
|
30
33
|
success: Schema.Void,
|
|
31
34
|
failure: Schema.Never,
|
|
32
|
-
|
|
35
|
+
dependencies: [AiContextService, DatabaseService],
|
|
36
|
+
}),
|
|
33
37
|
|
|
34
|
-
|
|
38
|
+
Tool.make('get-schemas', {
|
|
35
39
|
description: trim`
|
|
36
40
|
Retrieves schemas definitions.
|
|
37
41
|
`,
|
|
@@ -44,7 +48,7 @@ class Toolkit extends AiToolkit.make(
|
|
|
44
48
|
failure: Schema.Never,
|
|
45
49
|
}),
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
Tool.make('add-schema', {
|
|
48
52
|
description: trim`
|
|
49
53
|
Adds a schema to the space.
|
|
50
54
|
The name will be used when displayed to the user.
|
|
@@ -59,7 +63,7 @@ class Toolkit extends AiToolkit.make(
|
|
|
59
63
|
failure: Schema.Never,
|
|
60
64
|
}),
|
|
61
65
|
|
|
62
|
-
|
|
66
|
+
Tool.make('create-record', {
|
|
63
67
|
description: trim`
|
|
64
68
|
Creates a new record and adds it to the current space.
|
|
65
69
|
Get the schema from the get-schemas tool and ensure that the data matches the corresponding schema.
|
|
@@ -74,7 +78,7 @@ class Toolkit extends AiToolkit.make(
|
|
|
74
78
|
}),
|
|
75
79
|
) {
|
|
76
80
|
static layer = (context: PluginContext) =>
|
|
77
|
-
|
|
81
|
+
AssistantToolkit.toLayer({
|
|
78
82
|
'add-to-context': Effect.fnUntraced(function* ({ id }) {
|
|
79
83
|
const { binder } = yield* AiContextService;
|
|
80
84
|
const { db } = yield* DatabaseService;
|
|
@@ -146,7 +150,7 @@ class Toolkit extends AiToolkit.make(
|
|
|
146
150
|
schemas.push(...objects.map((object) => Type.toEffectSchema(object.jsonSchema)));
|
|
147
151
|
const schema = schemas.find((schema) => Type.getTypename(schema) === typename);
|
|
148
152
|
if (!schema) {
|
|
149
|
-
throw new
|
|
153
|
+
throw new SchemaNotFoundError(typename);
|
|
150
154
|
}
|
|
151
155
|
|
|
152
156
|
const object = Obj.make(schema, data);
|
|
@@ -158,6 +162,7 @@ class Toolkit extends AiToolkit.make(
|
|
|
158
162
|
}
|
|
159
163
|
|
|
160
164
|
export default (context: PluginContext): Capability<any>[] => [
|
|
161
|
-
contributes(Capabilities.Toolkit,
|
|
162
|
-
contributes(Capabilities.ToolkitHandler,
|
|
165
|
+
contributes(Capabilities.Toolkit, AssistantToolkit),
|
|
166
|
+
contributes(Capabilities.ToolkitHandler, AssistantToolkit.layer(context)),
|
|
167
|
+
contributes(Capabilities.Toolkit, WebSearchToolkit),
|
|
163
168
|
];
|
|
@@ -15,8 +15,8 @@ export type BlueprintContainerProps = {
|
|
|
15
15
|
|
|
16
16
|
export const BlueprintContainer = ({ blueprint }: BlueprintContainerProps) => {
|
|
17
17
|
return (
|
|
18
|
-
<StackItem.Content
|
|
19
|
-
<TemplateEditor id={blueprint.id} template={blueprint.instructions} />
|
|
18
|
+
<StackItem.Content>
|
|
19
|
+
<TemplateEditor id={blueprint.id} template={blueprint.instructions} classNames='container-max-width' />
|
|
20
20
|
</StackItem.Content>
|
|
21
21
|
);
|
|
22
22
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
9
|
+
import { Form } from '@dxos/react-ui-form';
|
|
10
|
+
|
|
11
|
+
const FormSchema = Blueprint.Blueprint.pipe(Schema.pick('tools'));
|
|
12
|
+
|
|
13
|
+
export const BlueprintSettings = ({ blueprint }: { blueprint: Blueprint.Blueprint }) => {
|
|
14
|
+
return <Form outerSpacing={false} readonly='disabled-input' values={blueprint} schema={FormSchema} />;
|
|
15
|
+
};
|
|
@@ -6,7 +6,8 @@ import { type Extension, Prec } from '@codemirror/state';
|
|
|
6
6
|
import { keymap } from '@codemirror/view';
|
|
7
7
|
import { useRxValue } from '@effect-rx/rx-react';
|
|
8
8
|
import { createContext } from '@radix-ui/react-context';
|
|
9
|
-
import
|
|
9
|
+
import * as Array from 'effect/Array';
|
|
10
|
+
import * as Option from 'effect/Option';
|
|
10
11
|
import React, { type PropsWithChildren, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
11
12
|
|
|
12
13
|
import { Event } from '@dxos/async';
|
|
@@ -18,7 +19,7 @@ import { Input, type ThemedClassName, useDynamicRef, useTranslation } from '@dxo
|
|
|
18
19
|
import { ChatEditor, type ChatEditorController, type ChatEditorProps, references } from '@dxos/react-ui-chat';
|
|
19
20
|
import { mx } from '@dxos/react-ui-theme';
|
|
20
21
|
import { DataType } from '@dxos/schema';
|
|
21
|
-
import {
|
|
22
|
+
import { isTruthy } from '@dxos/util';
|
|
22
23
|
|
|
23
24
|
import { useReferencesProvider } from '../../hooks';
|
|
24
25
|
import { meta } from '../../meta';
|
|
@@ -141,7 +142,7 @@ const ChatRoot = ({ classNames, children, chat, processor, onEvent, ...props }:
|
|
|
141
142
|
processor={processor}
|
|
142
143
|
{...props}
|
|
143
144
|
>
|
|
144
|
-
<div role='none' className={mx('flex flex-col
|
|
145
|
+
<div role='none' className={mx('flex flex-col bs-full is-full', classNames)}>
|
|
145
146
|
{children}
|
|
146
147
|
</div>
|
|
147
148
|
</ChatContextProvider>
|
|
@@ -157,6 +158,7 @@ ChatRoot.displayName = 'Chat.Root';
|
|
|
157
158
|
type ChatPromptProps = ThemedClassName<
|
|
158
159
|
{
|
|
159
160
|
outline?: boolean;
|
|
161
|
+
settings?: boolean;
|
|
160
162
|
} & Pick<ChatEditorProps, 'placeholder'> &
|
|
161
163
|
Omit<ChatPresetsProps, 'onChange'> & {
|
|
162
164
|
expandable?: boolean;
|
|
@@ -169,6 +171,7 @@ type ChatPromptProps = ThemedClassName<
|
|
|
169
171
|
const ChatPrompt = ({
|
|
170
172
|
classNames,
|
|
171
173
|
outline,
|
|
174
|
+
settings = true,
|
|
172
175
|
placeholder,
|
|
173
176
|
expandable,
|
|
174
177
|
online,
|
|
@@ -247,10 +250,10 @@ const ChatPrompt = ({
|
|
|
247
250
|
return true;
|
|
248
251
|
},
|
|
249
252
|
},
|
|
250
|
-
].filter(
|
|
253
|
+
].filter(isTruthy),
|
|
251
254
|
),
|
|
252
255
|
),
|
|
253
|
-
].filter(
|
|
256
|
+
].filter(isTruthy);
|
|
254
257
|
}, [event, expandable, referencesProvider]);
|
|
255
258
|
|
|
256
259
|
const handleSubmit = useCallback<NonNullable<ChatEditorProps['onSubmit']>>(
|
|
@@ -272,15 +275,16 @@ const ChatPrompt = ({
|
|
|
272
275
|
|
|
273
276
|
return (
|
|
274
277
|
<div
|
|
278
|
+
role='group'
|
|
275
279
|
className={mx(
|
|
276
|
-
'
|
|
280
|
+
'flex flex-col is-full density-fine',
|
|
277
281
|
outline && [
|
|
278
282
|
'p-2 bg-groupSurface border border-subduedSeparator transition transition-border [&:has(.cm-content:focus)]:border-separator rounded',
|
|
279
283
|
],
|
|
280
284
|
classNames,
|
|
281
285
|
)}
|
|
282
286
|
>
|
|
283
|
-
<div className='flex gap-2'>
|
|
287
|
+
<div role='none' className='flex gap-2'>
|
|
284
288
|
<ChatStatusIndicator classNames='p-1' preset={preset} error={error} processing={streaming} />
|
|
285
289
|
|
|
286
290
|
<ChatEditor
|
|
@@ -294,34 +298,37 @@ const ChatPrompt = ({
|
|
|
294
298
|
/>
|
|
295
299
|
</div>
|
|
296
300
|
|
|
297
|
-
|
|
298
|
-
<
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
<
|
|
301
|
+
{settings && (
|
|
302
|
+
<div role='none' className='flex pbs-2 items-center'>
|
|
303
|
+
<ChatOptions
|
|
304
|
+
space={space}
|
|
305
|
+
blueprintRegistry={processor.blueprintRegistry}
|
|
306
|
+
context={processor.context}
|
|
307
|
+
preset={preset}
|
|
308
|
+
presets={presets}
|
|
309
|
+
onPresetChange={onPresetChange}
|
|
310
|
+
/>
|
|
311
|
+
|
|
312
|
+
<div role='none' className='pli-cardSpacingChrome grow'>
|
|
313
|
+
<ChatReferences space={space} context={processor.context} />
|
|
314
|
+
</div>
|
|
315
|
+
|
|
316
|
+
<ChatActions
|
|
317
|
+
classNames='col-span-2'
|
|
318
|
+
microphone={true}
|
|
319
|
+
recording={recording}
|
|
320
|
+
processing={streaming}
|
|
321
|
+
onEvent={handleEvent}
|
|
322
|
+
>
|
|
323
|
+
{online !== undefined && (
|
|
324
|
+
<Input.Root>
|
|
325
|
+
<Input.Label srOnly>{t('online switch label')}</Input.Label>
|
|
326
|
+
<Input.Switch classNames='mis-2 mie-2' checked={online} onCheckedChange={onOnlineChange} />
|
|
327
|
+
</Input.Root>
|
|
328
|
+
)}
|
|
329
|
+
</ChatActions>
|
|
309
330
|
</div>
|
|
310
|
-
|
|
311
|
-
<ChatActions
|
|
312
|
-
classNames='col-span-2'
|
|
313
|
-
microphone={true}
|
|
314
|
-
recording={recording}
|
|
315
|
-
processing={streaming}
|
|
316
|
-
onEvent={handleEvent}
|
|
317
|
-
>
|
|
318
|
-
{online !== undefined && (
|
|
319
|
-
<Input.Root>
|
|
320
|
-
<Input.Switch classNames='mis-2 mie-2' checked={online} onCheckedChange={onOnlineChange} />
|
|
321
|
-
</Input.Root>
|
|
322
|
-
)}
|
|
323
|
-
</ChatActions>
|
|
324
|
-
</div>
|
|
331
|
+
)}
|
|
325
332
|
</div>
|
|
326
333
|
);
|
|
327
334
|
};
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Array from 'effect/Array';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Function from 'effect/Function';
|
|
8
|
+
import * as Option from 'effect/Option';
|
|
6
9
|
import React, { useMemo } from 'react';
|
|
7
10
|
|
|
8
11
|
import { Capabilities, createIntent, useCapabilities, useIntentDispatcher } from '@dxos/app-framework';
|
|
@@ -15,7 +18,7 @@ import { useQuery } from '@dxos/react-client/echo';
|
|
|
15
18
|
import { useAsyncEffect } from '@dxos/react-ui';
|
|
16
19
|
|
|
17
20
|
import { ChatContainer } from '../components';
|
|
18
|
-
import { useContextBinder } from '../hooks';
|
|
21
|
+
import { useBlueprintRegistry, useContextBinder } from '../hooks';
|
|
19
22
|
import { Assistant, AssistantAction } from '../types';
|
|
20
23
|
|
|
21
24
|
export type ChatCompanionProps = {
|
|
@@ -27,6 +30,7 @@ export const ChatCompanion = ({ role, data }: ChatCompanionProps) => {
|
|
|
27
30
|
const companionTo = data.companionTo;
|
|
28
31
|
const space = getSpace(companionTo);
|
|
29
32
|
const chat = data.subject === 'assistant-chat' ? undefined : data.subject;
|
|
33
|
+
const blueprintRegistry = useBlueprintRegistry();
|
|
30
34
|
const binder = useContextBinder(chat);
|
|
31
35
|
const { dispatch } = useIntentDispatcher();
|
|
32
36
|
|
|
@@ -66,7 +70,7 @@ export const ChatCompanion = ({ role, data }: ChatCompanionProps) => {
|
|
|
66
70
|
const metadata = useCapabilities(Capabilities.Metadata);
|
|
67
71
|
const blueprintKeys = useMemo(
|
|
68
72
|
() =>
|
|
69
|
-
pipe(
|
|
73
|
+
Function.pipe(
|
|
70
74
|
metadata,
|
|
71
75
|
Array.findFirst(
|
|
72
76
|
(capability): capability is { id: string; metadata: { blueprints?: string[] } } =>
|
|
@@ -77,14 +81,35 @@ export const ChatCompanion = ({ role, data }: ChatCompanionProps) => {
|
|
|
77
81
|
),
|
|
78
82
|
[metadata, companionTo],
|
|
79
83
|
);
|
|
80
|
-
const
|
|
84
|
+
const existingBlueprints = useQuery(space, Filter.type(Blueprint.Blueprint));
|
|
81
85
|
const pluginBlueprints = useMemo(
|
|
82
|
-
() =>
|
|
83
|
-
[
|
|
86
|
+
() => existingBlueprints.filter((blueprint) => blueprintKeys.includes(blueprint.key)),
|
|
87
|
+
[existingBlueprints, blueprintKeys],
|
|
84
88
|
);
|
|
85
89
|
|
|
86
|
-
//
|
|
87
|
-
|
|
90
|
+
// Initialize related blueprints that are not already in the space.
|
|
91
|
+
useAsyncEffect(async () => {
|
|
92
|
+
if (!space) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// NOTE: This must be run instead of using the useQuery result to avoid duplicates.
|
|
97
|
+
const { objects: existingBlueprints } = await space.db.query(Filter.type(Blueprint.Blueprint)).run();
|
|
98
|
+
for (const key of blueprintKeys) {
|
|
99
|
+
const existingBlueprint = existingBlueprints.find((blueprint) => blueprint.key === key);
|
|
100
|
+
if (existingBlueprint) {
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const blueprint = blueprintRegistry.getByKey(key);
|
|
105
|
+
if (!blueprint) {
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
space.db.add(Obj.clone(blueprint));
|
|
110
|
+
}
|
|
111
|
+
}, [space, blueprintRegistry, blueprintKeys]);
|
|
112
|
+
|
|
88
113
|
useAsyncEffect(async () => {
|
|
89
114
|
if (!binder) {
|
|
90
115
|
return;
|
|
@@ -36,9 +36,9 @@ export const ChatContainer = ({ chat, companionTo }: ChatContainerProps) => {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
return (
|
|
39
|
-
<StackItem.Content toolbar={!!companionTo}
|
|
39
|
+
<StackItem.Content toolbar={!!companionTo}>
|
|
40
40
|
{!!companionTo && <Toolbar chat={chat} companionTo={companionTo} />}
|
|
41
|
-
<Chat.Root chat={chat} processor={processor}>
|
|
41
|
+
<Chat.Root classNames='container-max-width' chat={chat} processor={processor}>
|
|
42
42
|
<Chat.Thread />
|
|
43
43
|
<div className='p-2'>
|
|
44
44
|
<Chat.Prompt {...chatProps} outline preset={preset?.id} online={online} onOnlineChange={setOnline} />
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { addEventListener } from '@dxos/async';
|
|
8
|
-
import { Flex, ProgressBar, type ProgressBarProps, TextCrawl } from '@dxos/react-ui-components';
|
|
8
|
+
import { Flex, ProgressBar, type ProgressBarProps, TextCrawl, useExecutionGraph } from '@dxos/react-ui-components';
|
|
9
9
|
|
|
10
|
-
import { useExecutionGraph } from '../../hooks';
|
|
11
10
|
import { type Assistant } from '../../types';
|
|
12
11
|
|
|
13
12
|
// TODO(burdon): Reset after each session.
|