@dxos/plugin-assistant 0.8.4-main.72ec0f3 → 0.8.4-main.937b3ca
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/BlueprintArticle-WP3G5GLG.mjs +31 -0
- package/dist/lib/browser/BlueprintArticle-WP3G5GLG.mjs.map +7 -0
- package/dist/lib/browser/ChatCompanion-GFSJZTOT.mjs +153 -0
- package/dist/lib/browser/ChatCompanion-GFSJZTOT.mjs.map +7 -0
- package/dist/lib/browser/ChatContainer-IHAPBIZE.mjs +72 -0
- package/dist/lib/browser/ChatContainer-IHAPBIZE.mjs.map +7 -0
- package/dist/lib/browser/ChatDialog-EGRMPCTL.mjs +85 -0
- package/dist/lib/browser/ChatDialog-EGRMPCTL.mjs.map +7 -0
- package/dist/lib/browser/PromptArticle-K362ZPAE.mjs +53 -0
- package/dist/lib/browser/PromptArticle-K362ZPAE.mjs.map +7 -0
- package/dist/lib/browser/ai-service-5GUDOEWF.mjs +21 -0
- package/dist/lib/browser/ai-service-5GUDOEWF.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-DSNH2OMY.mjs +212 -0
- package/dist/lib/browser/app-graph-builder-DSNH2OMY.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-DGHH7MUU.mjs +14 -0
- package/dist/lib/browser/blueprints/index.mjs +12 -0
- package/dist/lib/browser/chunk-A75V4MOQ.mjs +1832 -0
- package/dist/lib/browser/chunk-A75V4MOQ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FJQ4ZRYJ.mjs → chunk-DKQMSMBN.mjs} +55 -64
- package/dist/lib/browser/chunk-DKQMSMBN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-WBG5PTSX.mjs → chunk-EXVT7D4B.mjs} +1 -1
- package/dist/lib/browser/chunk-EXVT7D4B.mjs.map +7 -0
- package/dist/lib/browser/{chunk-2BOE3OTW.mjs → chunk-ML3QCFKA.mjs} +23 -20
- package/dist/lib/browser/chunk-ML3QCFKA.mjs.map +7 -0
- package/dist/lib/browser/chunk-MRJVYGLU.mjs +208 -0
- package/dist/lib/browser/chunk-MRJVYGLU.mjs.map +7 -0
- package/dist/lib/browser/chunk-V772AMZM.mjs +250 -0
- package/dist/lib/browser/chunk-V772AMZM.mjs.map +7 -0
- package/dist/lib/browser/chunk-WGQTU6UJ.mjs +41 -0
- package/dist/lib/browser/chunk-WGQTU6UJ.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-26BOY6HY.mjs +20 -0
- package/dist/lib/browser/edge-model-resolver-26BOY6HY.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +167 -193
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/local-model-resolver-ZFIM6GGV.mjs +19 -0
- package/dist/lib/browser/local-model-resolver-ZFIM6GGV.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-7XJLBRQY.mjs +132 -0
- package/dist/lib/browser/operation-resolver-7XJLBRQY.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-YCSR2MSR.mjs → react-surface-S7SBFOSW.mjs} +41 -30
- package/dist/lib/browser/react-surface-S7SBFOSW.mjs.map +7 -0
- package/dist/lib/browser/repair-6QGAKOVM.mjs +54 -0
- package/dist/lib/browser/repair-6QGAKOVM.mjs.map +7 -0
- package/dist/lib/browser/settings-4ZDLUMYE.mjs +32 -0
- package/dist/lib/browser/settings-4ZDLUMYE.mjs.map +7 -0
- package/dist/lib/browser/state-AN6336ZX.mjs +26 -0
- package/dist/lib/browser/state-AN6336ZX.mjs.map +7 -0
- package/dist/lib/browser/toolkit-7AVTEPMA.mjs +18 -0
- package/dist/lib/browser/toolkit-7AVTEPMA.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +8 -4
- package/dist/lib/node-esm/BlueprintArticle-WZ76E2C4.mjs +32 -0
- package/dist/lib/node-esm/BlueprintArticle-WZ76E2C4.mjs.map +7 -0
- package/dist/lib/node-esm/ChatCompanion-UR7DXZ54.mjs +154 -0
- package/dist/lib/node-esm/ChatCompanion-UR7DXZ54.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-YMLLGOZK.mjs +73 -0
- package/dist/lib/node-esm/ChatContainer-YMLLGOZK.mjs.map +7 -0
- package/dist/lib/node-esm/ChatDialog-D24WJPK4.mjs +86 -0
- package/dist/lib/node-esm/ChatDialog-D24WJPK4.mjs.map +7 -0
- package/dist/lib/node-esm/PromptArticle-D4HAIIC6.mjs +54 -0
- package/dist/lib/node-esm/PromptArticle-D4HAIIC6.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-PXKKCFIF.mjs +22 -0
- package/dist/lib/node-esm/ai-service-PXKKCFIF.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-TJCUEXW5.mjs +213 -0
- package/dist/lib/node-esm/app-graph-builder-TJCUEXW5.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-XW6QQVLV.mjs → blueprint-definition-SEMDEIYG.mjs} +6 -4
- package/dist/lib/node-esm/blueprint-definition-SEMDEIYG.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +13 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-355W5B27.mjs +251 -0
- package/dist/lib/node-esm/chunk-355W5B27.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4BERCIES.mjs +1833 -0
- package/dist/lib/node-esm/chunk-4BERCIES.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-KJGD4EBJ.mjs → chunk-75PHXBN3.mjs} +55 -64
- package/dist/lib/node-esm/chunk-75PHXBN3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DCA5QWQT.mjs +209 -0
- package/dist/lib/node-esm/chunk-DCA5QWQT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MSBPC4RJ.mjs +42 -0
- package/dist/lib/node-esm/chunk-MSBPC4RJ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-WE6KTH72.mjs → chunk-POWB2BPC.mjs} +1 -1
- package/dist/lib/node-esm/chunk-POWB2BPC.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-3Q22TTXW.mjs → chunk-ZRIPP7YF.mjs} +23 -20
- package/dist/lib/node-esm/chunk-ZRIPP7YF.mjs.map +7 -0
- package/dist/lib/node-esm/{edge-model-resolver-2ARXDOYS.mjs → edge-model-resolver-G5KMODPO.mjs} +9 -7
- package/dist/lib/node-esm/edge-model-resolver-G5KMODPO.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +167 -193
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/local-model-resolver-KDZLYI7Y.mjs +20 -0
- package/dist/lib/node-esm/local-model-resolver-KDZLYI7Y.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-SX4WMNA7.mjs +133 -0
- package/dist/lib/node-esm/operation-resolver-SX4WMNA7.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-CTW44GEM.mjs → react-surface-ZR6FXGLF.mjs} +41 -30
- package/dist/lib/node-esm/react-surface-ZR6FXGLF.mjs.map +7 -0
- package/dist/lib/node-esm/repair-QJ7CQDKU.mjs +55 -0
- package/dist/lib/node-esm/repair-QJ7CQDKU.mjs.map +7 -0
- package/dist/lib/node-esm/settings-CQEOHR3R.mjs +33 -0
- package/dist/lib/node-esm/settings-CQEOHR3R.mjs.map +7 -0
- package/dist/lib/node-esm/state-HDON4REW.mjs +27 -0
- package/dist/lib/node-esm/state-HDON4REW.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-OWGCEKOO.mjs +19 -0
- package/dist/lib/node-esm/toolkit-OWGCEKOO.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +8 -4
- package/dist/types/src/AssistantPlugin.d.ts +2 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/assistant-blueprint.d.ts +209 -0
- package/dist/types/src/blueprints/assistant-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +7 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-service/ai-service.d.ts +5 -0
- package/dist/types/src/capabilities/ai-service/ai-service.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-service/index.d.ts +3 -0
- package/dist/types/src/capabilities/ai-service/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +21 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +4 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts +6 -0
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/edge-model-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -11
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/local-model-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts +12 -0
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/index.d.ts +3 -0
- package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
- package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +15 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +17 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +11 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +13 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit/index.d.ts +3 -0
- package/dist/types/src/capabilities/toolkit/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts +5 -0
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +4 -2
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/BlueprintArticle.d.ts +1 -1
- package/dist/types/src/components/BlueprintArticle.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +9 -10
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +1 -1
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatCompanion.d.ts +2 -2
- package/dist/types/src/components/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +10 -5
- 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.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +3 -3
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +3 -3
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +9 -3
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/sync.d.ts +1 -1
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
- package/dist/types/src/components/PromptArticle.d.ts +1 -1
- package/dist/types/src/components/PromptArticle.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 +5 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +11 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +6 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -1
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +3 -3
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +4 -5
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +5 -0
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts +12 -0
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/Typewriter.d.ts +11 -0
- package/dist/types/src/components/Typewriter/Typewriter.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts +7 -0
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/assistant-extension.d.ts +5 -0
- package/dist/types/src/components/Typewriter/assistant-extension.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/index.d.ts +2 -0
- package/dist/types/src/components/Typewriter/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +10 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +1 -1
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/functions/object-list.d.ts +1 -1
- package/dist/types/src/functions/object-list.d.ts.map +1 -1
- package/dist/types/src/functions/object-load.d.ts.map +1 -1
- package/dist/types/src/functions/object-search.d.ts +10 -0
- package/dist/types/src/functions/object-search.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +1 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +5 -5
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +3 -3
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextObjects.d.ts +7 -7
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
- package/dist/types/src/hooks/useFilteredTypes.d.ts +3 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +10 -9
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/processor/update-name.d.ts.map +1 -1
- package/dist/types/src/queue-logger.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +3 -2
- package/dist/types/src/testing/test-generator.d.ts.map +1 -1
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +5 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +16 -22
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/AssistantAction.d.ts +88 -125
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +33 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.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 +10 -218
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +113 -92
- package/src/AssistantPlugin.tsx +64 -113
- package/src/blueprints/assistant-blueprint.ts +62 -0
- package/src/blueprints/index.ts +12 -0
- package/src/capabilities/ai-service/ai-service.ts +29 -0
- package/src/capabilities/ai-service/index.ts +7 -0
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +180 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +60 -0
- package/src/capabilities/blueprint-definition/index.ts +8 -0
- package/src/capabilities/edge-model-resolver/edge-model-resolver.ts +32 -0
- package/src/capabilities/edge-model-resolver/index.ts +7 -0
- package/src/capabilities/index.ts +10 -14
- package/src/capabilities/local-model-resolver/index.ts +7 -0
- package/src/capabilities/local-model-resolver/local-model-resolver.ts +37 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +110 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +95 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/repair/repair.ts +63 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +30 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +27 -0
- package/src/capabilities/toolkit/index.ts +7 -0
- package/src/capabilities/toolkit/toolkit.ts +26 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +13 -5
- package/src/components/BlueprintArticle.tsx +4 -4
- package/src/components/Chat/Chat.tsx +68 -68
- package/src/components/Chat/events.ts +1 -1
- package/src/components/ChatCompanion.tsx +125 -117
- package/src/components/ChatContainer.tsx +19 -19
- package/src/components/ChatDialog.tsx +6 -7
- package/src/components/ChatProgress/ChatProgress.tsx +3 -16
- package/src/components/ChatPrompt/ChatActions.tsx +1 -1
- package/src/components/ChatPrompt/ChatOptions.tsx +69 -59
- package/src/components/ChatPrompt/ChatReferences.tsx +5 -6
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +1 -1
- package/src/components/ChatThread/ChatThread.stories.tsx +10 -8
- package/src/components/ChatThread/ChatThread.tsx +1 -1
- package/src/components/ChatThread/Link.tsx +3 -3
- package/src/components/ChatThread/registry.tsx +2 -2
- package/src/components/ChatThread/sync.test.ts +12 -5
- package/src/components/ChatThread/sync.ts +8 -2
- package/src/components/PromptArticle.tsx +8 -9
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +2 -2
- package/src/components/TemplateEditor/TemplateEditor.tsx +8 -5
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +14 -6
- package/src/components/TemplateEditor/TemplateForm.tsx +75 -28
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +10 -5
- package/src/components/ToolBlock/ToolBlock.tsx +7 -7
- package/src/components/Toolbox/Toolbox.stories.tsx +8 -9
- package/src/components/Toolbox/Toolbox.tsx +14 -15
- package/src/components/Typewriter/AssistantToolbar.tsx +161 -0
- package/src/components/Typewriter/Typewriter.stories.tsx +83 -0
- package/src/components/Typewriter/Typewriter.tsx +54 -0
- package/src/components/Typewriter/assistant-extension.tsx +144 -0
- package/src/components/Typewriter/index.ts +5 -0
- package/src/functions/index.ts +1 -1
- package/src/functions/object-list.ts +4 -3
- package/src/functions/object-load.ts +7 -5
- package/src/functions/object-search.ts +46 -0
- package/src/hooks/index.ts +1 -1
- package/src/hooks/useBlueprintRegistry.ts +30 -20
- package/src/hooks/useChatProcessor.ts +5 -2
- package/src/hooks/useChatServices.ts +11 -15
- package/src/hooks/useChatToolbarActions.ts +24 -25
- package/src/hooks/useContextBinder.ts +4 -2
- package/src/hooks/useContextObjects.ts +13 -25
- package/src/hooks/useFilteredTypes.ts +37 -0
- package/src/hooks/useReferencesProvider.ts +6 -6
- package/src/index.ts +0 -1
- package/src/meta.ts +2 -2
- package/src/processor/processor.test.ts +3 -2
- package/src/processor/processor.ts +23 -25
- package/src/processor/update-name.ts +4 -1
- package/src/queue-logger.ts +4 -1
- package/src/testing/test-generator.ts +4 -3
- package/src/testing/test-services.ts +8 -6
- package/src/translations.ts +4 -0
- package/src/types/Assistant.ts +9 -10
- package/src/types/AssistantAction.ts +58 -62
- package/src/types/capabilities.ts +27 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +3 -1
- package/src/types/service.ts +10 -7
- package/dist/lib/browser/BlueprintArticle-IMCR3642.mjs +0 -36
- package/dist/lib/browser/BlueprintArticle-IMCR3642.mjs.map +0 -7
- package/dist/lib/browser/ChatCompanion-JYD2RIBJ.mjs +0 -158
- package/dist/lib/browser/ChatCompanion-JYD2RIBJ.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-XCPBWYIR.mjs +0 -77
- package/dist/lib/browser/ChatContainer-XCPBWYIR.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-DT7KFCRL.mjs +0 -90
- package/dist/lib/browser/ChatDialog-DT7KFCRL.mjs.map +0 -7
- package/dist/lib/browser/PromptArticle-45QX25Y5.mjs +0 -59
- package/dist/lib/browser/PromptArticle-45QX25Y5.mjs.map +0 -7
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs +0 -19
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-VZEXMDTY.mjs +0 -199
- package/dist/lib/browser/app-graph-builder-VZEXMDTY.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-5FT5JGPY.mjs +0 -12
- package/dist/lib/browser/chunk-2BOE3OTW.mjs.map +0 -7
- package/dist/lib/browser/chunk-BNTPFZ7O.mjs +0 -229
- package/dist/lib/browser/chunk-BNTPFZ7O.mjs.map +0 -7
- package/dist/lib/browser/chunk-FJQ4ZRYJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-IXIIS4QA.mjs +0 -176
- package/dist/lib/browser/chunk-IXIIS4QA.mjs.map +0 -7
- package/dist/lib/browser/chunk-LRE4VEZV.mjs +0 -16
- package/dist/lib/browser/chunk-LRE4VEZV.mjs.map +0 -7
- package/dist/lib/browser/chunk-U62BTGDF.mjs +0 -1929
- package/dist/lib/browser/chunk-U62BTGDF.mjs.map +0 -7
- package/dist/lib/browser/chunk-WBG5PTSX.mjs.map +0 -7
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs +0 -18
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-AK5O4GUW.mjs +0 -143
- package/dist/lib/browser/intent-resolver-AK5O4GUW.mjs.map +0 -7
- package/dist/lib/browser/local-model-resolver-34MVHRKD.mjs +0 -17
- package/dist/lib/browser/local-model-resolver-34MVHRKD.mjs.map +0 -7
- package/dist/lib/browser/react-surface-YCSR2MSR.mjs.map +0 -7
- package/dist/lib/browser/settings-NYJGNQ5I.mjs +0 -23
- package/dist/lib/browser/settings-NYJGNQ5I.mjs.map +0 -7
- package/dist/lib/browser/state-GG7Z3NB7.mjs +0 -25
- package/dist/lib/browser/state-GG7Z3NB7.mjs.map +0 -7
- package/dist/lib/browser/toolkit-VYDAWNE4.mjs +0 -17
- package/dist/lib/browser/toolkit-VYDAWNE4.mjs.map +0 -7
- package/dist/lib/node-esm/BlueprintArticle-OL2HUY6Q.mjs +0 -37
- package/dist/lib/node-esm/BlueprintArticle-OL2HUY6Q.mjs.map +0 -7
- package/dist/lib/node-esm/ChatCompanion-AHKJS25S.mjs +0 -159
- package/dist/lib/node-esm/ChatCompanion-AHKJS25S.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-K7OGPE3G.mjs +0 -78
- package/dist/lib/node-esm/ChatContainer-K7OGPE3G.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-QT6ZBX45.mjs +0 -91
- package/dist/lib/node-esm/ChatDialog-QT6ZBX45.mjs.map +0 -7
- package/dist/lib/node-esm/PromptArticle-OUKFSJQV.mjs +0 -60
- package/dist/lib/node-esm/PromptArticle-OUKFSJQV.mjs.map +0 -7
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs +0 -20
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-VRN6ESRR.mjs +0 -200
- package/dist/lib/node-esm/app-graph-builder-VRN6ESRR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3Q22TTXW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AB74FOA2.mjs +0 -230
- package/dist/lib/node-esm/chunk-AB74FOA2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BHS747K7.mjs +0 -1930
- package/dist/lib/node-esm/chunk-BHS747K7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KJGD4EBJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UXTUHH24.mjs +0 -178
- package/dist/lib/node-esm/chunk-UXTUHH24.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WE6KTH72.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YWFWT57N.mjs +0 -17
- package/dist/lib/node-esm/chunk-YWFWT57N.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-L2F3N45L.mjs +0 -144
- package/dist/lib/node-esm/intent-resolver-L2F3N45L.mjs.map +0 -7
- package/dist/lib/node-esm/local-model-resolver-TP2NTSAX.mjs +0 -18
- package/dist/lib/node-esm/local-model-resolver-TP2NTSAX.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-CTW44GEM.mjs.map +0 -7
- package/dist/lib/node-esm/settings-RRHYI5KO.mjs +0 -24
- package/dist/lib/node-esm/settings-RRHYI5KO.mjs.map +0 -7
- package/dist/lib/node-esm/state-FSUHFMDM.mjs +0 -26
- package/dist/lib/node-esm/state-FSUHFMDM.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-HFJZLVIR.mjs +0 -18
- package/dist/lib/node-esm/toolkit-HFJZLVIR.mjs.map +0 -7
- package/dist/types/src/capabilities/ai-service.d.ts +0 -4
- package/dist/types/src/capabilities/ai-service.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -7
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -10
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +0 -10
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -4
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/capabilities/toolkit.d.ts +0 -4
- package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/functions/analysis.d.ts +0 -5
- package/dist/types/src/functions/analysis.d.ts.map +0 -1
- package/dist/types/src/hooks/useItemTypes.d.ts +0 -4
- package/dist/types/src/hooks/useItemTypes.d.ts.map +0 -1
- package/src/capabilities/ai-service.ts +0 -27
- package/src/capabilities/app-graph-builder.ts +0 -210
- package/src/capabilities/blueprint-definition.ts +0 -66
- package/src/capabilities/capabilities.ts +0 -17
- package/src/capabilities/edge-model-resolver.ts +0 -25
- package/src/capabilities/intent-resolver.ts +0 -147
- package/src/capabilities/local-model-resolver.ts +0 -30
- package/src/capabilities/react-surface.tsx +0 -87
- package/src/capabilities/settings.ts +0 -19
- package/src/capabilities/state.ts +0 -22
- package/src/capabilities/toolkit.ts +0 -17
- package/src/events.ts +0 -11
- package/src/functions/analysis.ts +0 -22
- package/src/hooks/useItemTypes.ts +0 -37
- /package/dist/lib/browser/{blueprint-definition-5FT5JGPY.mjs.map → blueprint-definition-DGHH7MUU.mjs.map} +0 -0
- /package/dist/lib/{node-esm/blueprint-definition-XW6QQVLV.mjs.map → browser/blueprints/index.mjs.map} +0 -0
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Atom } from '@effect-atom/atom-react';
|
|
6
|
-
import * as Function from 'effect/Function';
|
|
7
|
-
import * as Option from 'effect/Option';
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
Capabilities,
|
|
11
|
-
LayoutAction,
|
|
12
|
-
type PluginContext,
|
|
13
|
-
type PromiseIntentDispatcher,
|
|
14
|
-
contributes,
|
|
15
|
-
createIntent,
|
|
16
|
-
} from '@dxos/app-framework';
|
|
17
|
-
import { Prompt } from '@dxos/blueprints';
|
|
18
|
-
import { Sequence } from '@dxos/conductor';
|
|
19
|
-
import { DXN, Obj } from '@dxos/echo';
|
|
20
|
-
import { invariant } from '@dxos/invariant';
|
|
21
|
-
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
22
|
-
import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
23
|
-
import { ROOT_ID, atomFromSignal, createExtension } from '@dxos/plugin-graph';
|
|
24
|
-
import { getActiveSpace } from '@dxos/plugin-space';
|
|
25
|
-
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
26
|
-
import { Query, type Space, getSpace } from '@dxos/react-client/echo';
|
|
27
|
-
|
|
28
|
-
import { ASSISTANT_DIALOG, meta } from '../meta';
|
|
29
|
-
import { Assistant, AssistantAction } from '../types';
|
|
30
|
-
|
|
31
|
-
import { AssistantCapabilities } from './capabilities';
|
|
32
|
-
|
|
33
|
-
export default (context: PluginContext) =>
|
|
34
|
-
contributes(Capabilities.AppGraphBuilder, [
|
|
35
|
-
createExtension({
|
|
36
|
-
id: `${meta.id}/root`,
|
|
37
|
-
actions: (node) =>
|
|
38
|
-
Atom.make((get) =>
|
|
39
|
-
Function.pipe(
|
|
40
|
-
get(node),
|
|
41
|
-
Option.flatMap((node) => {
|
|
42
|
-
return Obj.instanceOf(Assistant.Chat, node.data) ? Option.some(node.data) : Option.none();
|
|
43
|
-
}),
|
|
44
|
-
Option.map((object) => {
|
|
45
|
-
const id = Obj.getDXN(object).toString();
|
|
46
|
-
return [
|
|
47
|
-
{
|
|
48
|
-
id: `${AssistantAction.UpdateChatName._tag}/${id}`,
|
|
49
|
-
data: async () => {
|
|
50
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
51
|
-
await dispatch(createIntent(AssistantAction.UpdateChatName, { chat: object }));
|
|
52
|
-
},
|
|
53
|
-
properties: {
|
|
54
|
-
label: ['chat update name label', { ns: meta.id }],
|
|
55
|
-
icon: 'ph--magic-wand--regular',
|
|
56
|
-
disposition: 'list-item',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
];
|
|
60
|
-
}),
|
|
61
|
-
Option.getOrElse(() => []),
|
|
62
|
-
),
|
|
63
|
-
),
|
|
64
|
-
}),
|
|
65
|
-
|
|
66
|
-
createExtension({
|
|
67
|
-
id: `${meta.id}/assistant`,
|
|
68
|
-
actions: (node) =>
|
|
69
|
-
Atom.make((get) =>
|
|
70
|
-
Function.pipe(
|
|
71
|
-
get(node),
|
|
72
|
-
Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
|
|
73
|
-
Option.map(() => [
|
|
74
|
-
{
|
|
75
|
-
id: `${LayoutAction.UpdateDialog._tag}/assistant/open`,
|
|
76
|
-
data: async () => {
|
|
77
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
78
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
79
|
-
const space = getActiveSpace(context) ?? client.spaces.default;
|
|
80
|
-
const chat = await getOrCreateChat(dispatch, space);
|
|
81
|
-
if (!chat) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
await dispatch(
|
|
86
|
-
createIntent(LayoutAction.UpdateDialog, {
|
|
87
|
-
part: 'dialog',
|
|
88
|
-
subject: ASSISTANT_DIALOG,
|
|
89
|
-
options: {
|
|
90
|
-
state: true,
|
|
91
|
-
blockAlign: 'end',
|
|
92
|
-
props: {
|
|
93
|
-
chat,
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
}),
|
|
97
|
-
);
|
|
98
|
-
},
|
|
99
|
-
properties: {
|
|
100
|
-
label: ['open assistant label', { ns: meta.id }],
|
|
101
|
-
icon: 'ph--sparkle--regular',
|
|
102
|
-
disposition: 'pin-end',
|
|
103
|
-
position: 'hoist',
|
|
104
|
-
keyBinding: {
|
|
105
|
-
macos: 'shift+meta+k',
|
|
106
|
-
windows: 'shift+ctrl+k',
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
]),
|
|
111
|
-
Option.getOrElse(() => []),
|
|
112
|
-
),
|
|
113
|
-
),
|
|
114
|
-
}),
|
|
115
|
-
|
|
116
|
-
createExtension({
|
|
117
|
-
id: `${meta.id}/companion-chat`,
|
|
118
|
-
connector: (node) => {
|
|
119
|
-
return Atom.make((get) =>
|
|
120
|
-
Function.pipe(
|
|
121
|
-
get(node),
|
|
122
|
-
Option.flatMap((node) => (Obj.isObject(node.data) ? Option.some(node.data) : Option.none())),
|
|
123
|
-
Option.flatMap((object) => {
|
|
124
|
-
const currentChatState = get(
|
|
125
|
-
atomFromSignal(
|
|
126
|
-
() => context.getCapability(AssistantCapabilities.State).currentChat[Obj.getDXN(object).toString()],
|
|
127
|
-
),
|
|
128
|
-
);
|
|
129
|
-
// If no state, continue to allow chat initialization.
|
|
130
|
-
if (!currentChatState) {
|
|
131
|
-
return Option.some({ object, currentChat: undefined });
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const space = getSpace(object);
|
|
135
|
-
const currentChatDxn = DXN.tryParse(currentChatState);
|
|
136
|
-
const currentChatRef = currentChatDxn ? space?.db.ref(currentChatDxn) : undefined;
|
|
137
|
-
const currentChat = get(atomFromSignal(() => currentChatRef?.target));
|
|
138
|
-
return currentChat ? Option.some({ object, currentChat }) : Option.none();
|
|
139
|
-
}),
|
|
140
|
-
Option.map(({ object, currentChat }) => {
|
|
141
|
-
return [
|
|
142
|
-
{
|
|
143
|
-
id: [Obj.getDXN(object).toString(), 'assistant-chat'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
144
|
-
type: PLANK_COMPANION_TYPE,
|
|
145
|
-
data: currentChat ?? 'assistant-chat',
|
|
146
|
-
properties: {
|
|
147
|
-
label: ['assistant chat label', { ns: meta.id }],
|
|
148
|
-
icon: 'ph--sparkle--regular',
|
|
149
|
-
position: 'hoist',
|
|
150
|
-
disposition: 'hidden',
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
];
|
|
154
|
-
}),
|
|
155
|
-
Option.getOrElse(() => []),
|
|
156
|
-
),
|
|
157
|
-
);
|
|
158
|
-
},
|
|
159
|
-
}),
|
|
160
|
-
|
|
161
|
-
createExtension({
|
|
162
|
-
id: `${meta.id}/invocations`,
|
|
163
|
-
connector: (node) =>
|
|
164
|
-
Atom.make((get) =>
|
|
165
|
-
Function.pipe(
|
|
166
|
-
get(node),
|
|
167
|
-
Option.flatMap((node) =>
|
|
168
|
-
Obj.instanceOf(Sequence, node.data) || Obj.instanceOf(Prompt.Prompt, node.data)
|
|
169
|
-
? Option.some(node)
|
|
170
|
-
: Option.none(),
|
|
171
|
-
),
|
|
172
|
-
Option.map((node) => [
|
|
173
|
-
{
|
|
174
|
-
id: [node.id, 'invocations'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
175
|
-
type: PLANK_COMPANION_TYPE,
|
|
176
|
-
data: 'invocations',
|
|
177
|
-
properties: {
|
|
178
|
-
label: ['invocations label', { ns: meta.id }],
|
|
179
|
-
icon: 'ph--clock-countdown--regular',
|
|
180
|
-
disposition: 'hidden',
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
]),
|
|
184
|
-
Option.getOrElse(() => []),
|
|
185
|
-
),
|
|
186
|
-
),
|
|
187
|
-
}),
|
|
188
|
-
]);
|
|
189
|
-
|
|
190
|
-
// TODO(burdon): Factor out.
|
|
191
|
-
const getOrCreateChat = async (
|
|
192
|
-
dispatch: PromiseIntentDispatcher,
|
|
193
|
-
space: Space,
|
|
194
|
-
): Promise<Assistant.Chat | undefined> => {
|
|
195
|
-
// TODO(wittjosiah): This should be possible with a single query.
|
|
196
|
-
const { objects: allChats } = await space.db.query(Query.type(Assistant.Chat)).run();
|
|
197
|
-
const { objects: relatedChats } = await space.db
|
|
198
|
-
.query(Query.type(Assistant.Chat).sourceOf(Assistant.CompanionTo).source())
|
|
199
|
-
.run();
|
|
200
|
-
|
|
201
|
-
const chats = allChats.filter((chat) => !relatedChats.includes(chat));
|
|
202
|
-
if (chats.length > 0) {
|
|
203
|
-
return chats.at(-1);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
const { data } = await dispatch(createIntent(AssistantAction.CreateChat, { space }));
|
|
207
|
-
invariant(Obj.instanceOf(Assistant.Chat, data?.object));
|
|
208
|
-
await dispatch(createIntent(SpaceAction.AddObject, { target: space, object: data.object }));
|
|
209
|
-
return data.object;
|
|
210
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
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
|
-
Agent,
|
|
9
|
-
AssistantToolkit,
|
|
10
|
-
Discord,
|
|
11
|
-
DiscordBlueprint,
|
|
12
|
-
EntityExtraction,
|
|
13
|
-
Linear,
|
|
14
|
-
LinearBlueprint,
|
|
15
|
-
Research,
|
|
16
|
-
ResearchBlueprint,
|
|
17
|
-
SystemToolkit,
|
|
18
|
-
WebSearchBlueprint,
|
|
19
|
-
} from '@dxos/assistant-toolkit';
|
|
20
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
21
|
-
import { type FunctionDefinition } from '@dxos/functions';
|
|
22
|
-
|
|
23
|
-
import { analysis, list, load } from '../functions';
|
|
24
|
-
|
|
25
|
-
// TODO(burdon): Document plugin structure (blueprint, functions, toolkit.)
|
|
26
|
-
// TODO(burdon): Test framework for developing functions. Error handling.
|
|
27
|
-
// TODO(burdon): Function naming pattern (noun-verb); fully-qualified?
|
|
28
|
-
|
|
29
|
-
// TODO(wittjosiah): Factor out to a generic app-framework blueprint.
|
|
30
|
-
const deckTools = ['open-item'];
|
|
31
|
-
|
|
32
|
-
const functions: FunctionDefinition[] = [analysis, list, load];
|
|
33
|
-
const tools = [...AssistantToolkit.tools, ...SystemToolkit.tools, ...deckTools];
|
|
34
|
-
|
|
35
|
-
export const ASSISTANT_BLUEPRINT_KEY = 'dxos.org/blueprint/assistant';
|
|
36
|
-
|
|
37
|
-
export const createBlueprint = (): Blueprint.Blueprint =>
|
|
38
|
-
Blueprint.make({
|
|
39
|
-
key: ASSISTANT_BLUEPRINT_KEY,
|
|
40
|
-
name: 'Assistant',
|
|
41
|
-
tools: Blueprint.toolDefinitions({ functions, tools }),
|
|
42
|
-
instructions: templates.system,
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
const blueprint = createBlueprint();
|
|
46
|
-
|
|
47
|
-
export default (): Capability<any>[] => [
|
|
48
|
-
contributes(Capabilities.Functions, functions),
|
|
49
|
-
contributes(Capabilities.BlueprintDefinition, blueprint),
|
|
50
|
-
|
|
51
|
-
// TODO(burdon): Factor out.
|
|
52
|
-
contributes(Capabilities.Functions, [Research.create, Research.research]),
|
|
53
|
-
contributes(Capabilities.BlueprintDefinition, ResearchBlueprint),
|
|
54
|
-
|
|
55
|
-
// TODO(burdon): Factor out.
|
|
56
|
-
contributes(Capabilities.Functions, [Agent.prompt, EntityExtraction.extract]),
|
|
57
|
-
contributes(Capabilities.BlueprintDefinition, WebSearchBlueprint),
|
|
58
|
-
|
|
59
|
-
// TODO(burdon): Factor out.
|
|
60
|
-
contributes(Capabilities.Functions, [Discord.fetch]),
|
|
61
|
-
contributes(Capabilities.BlueprintDefinition, DiscordBlueprint),
|
|
62
|
-
|
|
63
|
-
// TODO(burdon): Factor out.
|
|
64
|
-
contributes(Capabilities.Functions, [Linear.sync]),
|
|
65
|
-
contributes(Capabilities.BlueprintDefinition, LinearBlueprint),
|
|
66
|
-
];
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
|
|
10
|
-
export namespace AssistantCapabilities {
|
|
11
|
-
export type AssistantState = {
|
|
12
|
-
/** Map of primary object dxn to current chat dxn. */
|
|
13
|
-
currentChat: Record<string, string | undefined>;
|
|
14
|
-
};
|
|
15
|
-
export const State = defineCapability<DeepReadonly<AssistantState>>(`${meta.id}/capability/state`);
|
|
16
|
-
export const MutableState = defineCapability<AssistantState>(`${meta.id}/capability/state`);
|
|
17
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
];
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, type PluginContext, contributes, createIntent, createResolver } from '@dxos/app-framework';
|
|
8
|
-
import { AiContextBinder, AiConversation } from '@dxos/assistant';
|
|
9
|
-
import { Agent } from '@dxos/assistant-toolkit';
|
|
10
|
-
import { Blueprint, Prompt, Template } from '@dxos/blueprints';
|
|
11
|
-
import { type Queue } from '@dxos/client/echo';
|
|
12
|
-
import { Sequence } from '@dxos/conductor';
|
|
13
|
-
import { Filter, Key, Obj, Ref, Type } from '@dxos/echo';
|
|
14
|
-
import { TracingService, serializeFunction } from '@dxos/functions';
|
|
15
|
-
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
16
|
-
import { CollectionAction } from '@dxos/plugin-space/types';
|
|
17
|
-
import { getSpace } from '@dxos/react-client/echo';
|
|
18
|
-
import { type Message } from '@dxos/types';
|
|
19
|
-
|
|
20
|
-
import { type AiChatServices, updateName } from '../processor';
|
|
21
|
-
import { Assistant, AssistantAction } from '../types';
|
|
22
|
-
|
|
23
|
-
import { ASSISTANT_BLUEPRINT_KEY, createBlueprint } from './blueprint-definition';
|
|
24
|
-
import { AssistantCapabilities } from './capabilities';
|
|
25
|
-
|
|
26
|
-
export default (context: PluginContext) => [
|
|
27
|
-
contributes(Capabilities.IntentResolver, [
|
|
28
|
-
createResolver({
|
|
29
|
-
intent: AssistantAction.onCreateSpace,
|
|
30
|
-
resolve: ({ space, rootCollection }) =>
|
|
31
|
-
Effect.gen(function* () {
|
|
32
|
-
const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
33
|
-
const { object: chatCollection } = yield* dispatch(
|
|
34
|
-
createIntent(CollectionAction.CreateQueryCollection, {
|
|
35
|
-
typename: Assistant.Chat.typename,
|
|
36
|
-
}),
|
|
37
|
-
);
|
|
38
|
-
const { object: blueprintCollection } = yield* dispatch(
|
|
39
|
-
createIntent(CollectionAction.CreateQueryCollection, {
|
|
40
|
-
typename: Blueprint.Blueprint.typename,
|
|
41
|
-
}),
|
|
42
|
-
);
|
|
43
|
-
const { object: promptCollection } = yield* dispatch(
|
|
44
|
-
createIntent(CollectionAction.CreateQueryCollection, {
|
|
45
|
-
typename: Type.getTypename(Prompt.Prompt),
|
|
46
|
-
}),
|
|
47
|
-
);
|
|
48
|
-
rootCollection.objects.push(
|
|
49
|
-
Ref.make(chatCollection),
|
|
50
|
-
Ref.make(blueprintCollection),
|
|
51
|
-
Ref.make(promptCollection),
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
// TODO(wittjosiah): Remove once function registry is avaiable.
|
|
55
|
-
space.db.add(serializeFunction(Agent.prompt));
|
|
56
|
-
|
|
57
|
-
// Create default chat.
|
|
58
|
-
const { object: chat } = yield* dispatch(createIntent(AssistantAction.CreateChat, { space }));
|
|
59
|
-
space.db.add(chat);
|
|
60
|
-
}),
|
|
61
|
-
}),
|
|
62
|
-
createResolver({
|
|
63
|
-
intent: AssistantAction.CreateChat,
|
|
64
|
-
resolve: async ({ space, name }) => {
|
|
65
|
-
const queue = space.queues.create();
|
|
66
|
-
const chat = Assistant.makeChat({ name, queue });
|
|
67
|
-
|
|
68
|
-
// TODO(wittjosiah): This should be a space-level setting.
|
|
69
|
-
// TODO(burdon): Clone when activated. Copy-on-write for template.
|
|
70
|
-
const { objects: blueprints } = await space.db.query(Filter.type(Blueprint.Blueprint)).run();
|
|
71
|
-
let defaultBlueprint = blueprints.find((blueprint) => blueprint.key === ASSISTANT_BLUEPRINT_KEY);
|
|
72
|
-
if (!defaultBlueprint) {
|
|
73
|
-
defaultBlueprint = space.db.add(createBlueprint());
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const binder = new AiContextBinder(queue);
|
|
77
|
-
await binder.use((binder) => binder.bind({ blueprints: [Ref.make(defaultBlueprint)] }));
|
|
78
|
-
|
|
79
|
-
return {
|
|
80
|
-
data: { object: chat },
|
|
81
|
-
};
|
|
82
|
-
},
|
|
83
|
-
}),
|
|
84
|
-
createResolver({
|
|
85
|
-
intent: AssistantAction.UpdateChatName,
|
|
86
|
-
resolve: async ({ chat }) => {
|
|
87
|
-
const space = getSpace(chat);
|
|
88
|
-
const queue = chat.queue.target as Queue<Message.Message>;
|
|
89
|
-
if (!space || !queue) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const runtimeResolver = context.getCapability(AutomationCapabilities.ComputeRuntime);
|
|
94
|
-
const runtime = await runtimeResolver
|
|
95
|
-
.getRuntime(space.id)
|
|
96
|
-
.runPromise(Effect.runtime<AiChatServices>().pipe(Effect.provide(TracingService.layerNoop)));
|
|
97
|
-
|
|
98
|
-
await new AiConversation(queue).use(async (conversation) => updateName(runtime, conversation, chat));
|
|
99
|
-
},
|
|
100
|
-
}),
|
|
101
|
-
createResolver({
|
|
102
|
-
intent: AssistantAction.CreateBlueprint,
|
|
103
|
-
resolve: ({ key, name, description }) => ({
|
|
104
|
-
data: {
|
|
105
|
-
object: Blueprint.make({
|
|
106
|
-
key,
|
|
107
|
-
name,
|
|
108
|
-
description,
|
|
109
|
-
instructions: Template.make(),
|
|
110
|
-
}),
|
|
111
|
-
},
|
|
112
|
-
}),
|
|
113
|
-
}),
|
|
114
|
-
createResolver({
|
|
115
|
-
intent: AssistantAction.CreatePrompt,
|
|
116
|
-
resolve: ({ name }) => ({
|
|
117
|
-
data: {
|
|
118
|
-
object: Prompt.make({ name }),
|
|
119
|
-
},
|
|
120
|
-
}),
|
|
121
|
-
}),
|
|
122
|
-
createResolver({
|
|
123
|
-
intent: AssistantAction.CreateSequence,
|
|
124
|
-
resolve: ({ name }) => ({
|
|
125
|
-
data: {
|
|
126
|
-
object: Obj.make(Sequence, {
|
|
127
|
-
name,
|
|
128
|
-
steps: [
|
|
129
|
-
{
|
|
130
|
-
id: Key.ObjectId.random(),
|
|
131
|
-
instructions: 'You are a helpful assistant.',
|
|
132
|
-
},
|
|
133
|
-
],
|
|
134
|
-
}),
|
|
135
|
-
},
|
|
136
|
-
}),
|
|
137
|
-
}),
|
|
138
|
-
createResolver({
|
|
139
|
-
intent: AssistantAction.SetCurrentChat,
|
|
140
|
-
resolve: ({ companionTo, chat }) =>
|
|
141
|
-
Effect.gen(function* () {
|
|
142
|
-
const state = context.getCapability(AssistantCapabilities.MutableState);
|
|
143
|
-
state.currentChat[Obj.getDXN(companionTo).toString()] = chat && Obj.getDXN(chat).toString();
|
|
144
|
-
}),
|
|
145
|
-
}),
|
|
146
|
-
]),
|
|
147
|
-
];
|
|
@@ -1,30 +0,0 @@
|
|
|
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.DEFAULT_LMSTUDIO_ENDPOINT,
|
|
25
|
-
}),
|
|
26
|
-
),
|
|
27
|
-
Layer.provide(FetchHttpClient.layer),
|
|
28
|
-
),
|
|
29
|
-
),
|
|
30
|
-
];
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
|
-
import { Blueprint, Prompt } from '@dxos/blueprints';
|
|
9
|
-
import { getSpace } from '@dxos/client/echo';
|
|
10
|
-
import { Sequence } from '@dxos/conductor';
|
|
11
|
-
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
12
|
-
import { Obj } from '@dxos/echo';
|
|
13
|
-
import { SettingsStore } from '@dxos/local-storage';
|
|
14
|
-
import { StackItem } from '@dxos/react-ui-stack';
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
AssistantSettings,
|
|
18
|
-
BlueprintArticle,
|
|
19
|
-
ChatCompanion,
|
|
20
|
-
ChatContainer,
|
|
21
|
-
ChatDialog,
|
|
22
|
-
PromptArticle,
|
|
23
|
-
} from '../components';
|
|
24
|
-
import { ASSISTANT_DIALOG, meta } from '../meta';
|
|
25
|
-
import { Assistant } from '../types';
|
|
26
|
-
|
|
27
|
-
export default () =>
|
|
28
|
-
contributes(Capabilities.ReactSurface, [
|
|
29
|
-
createSurface({
|
|
30
|
-
id: `${meta.id}/plugin-settings`,
|
|
31
|
-
role: 'article',
|
|
32
|
-
filter: (data): data is { subject: SettingsStore<Assistant.Settings> } =>
|
|
33
|
-
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
34
|
-
component: ({ data: { subject } }) => <AssistantSettings settings={subject.value} />,
|
|
35
|
-
}),
|
|
36
|
-
createSurface({
|
|
37
|
-
id: `${meta.id}/chat`,
|
|
38
|
-
role: 'article',
|
|
39
|
-
filter: (data): data is { subject: Assistant.Chat; variant: undefined } =>
|
|
40
|
-
Obj.instanceOf(Assistant.Chat, data.subject) && data.variant !== 'assistant-chat',
|
|
41
|
-
component: ({ data, role }) => <ChatContainer role={role} chat={data.subject} />,
|
|
42
|
-
}),
|
|
43
|
-
// TODO(wittjosiah): This is flashing when chat changes.
|
|
44
|
-
createSurface({
|
|
45
|
-
id: `${meta.id}/companion-chat`,
|
|
46
|
-
role: 'article',
|
|
47
|
-
filter: (data): data is { companionTo: Obj.Any; subject: Assistant.Chat | 'assistant-chat' } =>
|
|
48
|
-
Obj.isObject(data.companionTo) &&
|
|
49
|
-
(Obj.instanceOf(Assistant.Chat, data.subject) || data.subject === 'assistant-chat'),
|
|
50
|
-
component: ({ data, role }) => <ChatCompanion role={role} data={data} />,
|
|
51
|
-
}),
|
|
52
|
-
createSurface({
|
|
53
|
-
id: `${meta.id}/companion-invocations`,
|
|
54
|
-
role: 'article',
|
|
55
|
-
filter: (data): data is { companionTo: Sequence } =>
|
|
56
|
-
(Obj.instanceOf(Sequence, data.companionTo) || Obj.instanceOf(Prompt.Prompt, data.companionTo)) &&
|
|
57
|
-
data.subject === 'invocations',
|
|
58
|
-
component: ({ data }) => {
|
|
59
|
-
const space = getSpace(data.companionTo);
|
|
60
|
-
// TODO(wittjosiah): Support invocation filtering for prompts.
|
|
61
|
-
const target = Obj.instanceOf(Prompt.Prompt, data.companionTo) ? undefined : data.companionTo;
|
|
62
|
-
return (
|
|
63
|
-
<StackItem.Content>
|
|
64
|
-
<InvocationTraceContainer space={space} target={target} detailAxis='block' />
|
|
65
|
-
</StackItem.Content>
|
|
66
|
-
);
|
|
67
|
-
},
|
|
68
|
-
}),
|
|
69
|
-
createSurface({
|
|
70
|
-
id: `${meta.id}/blueprint`,
|
|
71
|
-
role: 'article',
|
|
72
|
-
filter: (data): data is { subject: Blueprint.Blueprint } => Obj.instanceOf(Blueprint.Blueprint, data.subject),
|
|
73
|
-
component: ({ data }) => <BlueprintArticle subject={data.subject} />,
|
|
74
|
-
}),
|
|
75
|
-
createSurface({
|
|
76
|
-
id: `${meta.id}/prompt`,
|
|
77
|
-
role: 'article',
|
|
78
|
-
filter: (data): data is { subject: Prompt.Prompt } => Obj.instanceOf(Prompt.Prompt, data.subject),
|
|
79
|
-
component: ({ data }) => <PromptArticle subject={data.subject} />,
|
|
80
|
-
}),
|
|
81
|
-
createSurface({
|
|
82
|
-
id: ASSISTANT_DIALOG,
|
|
83
|
-
role: 'dialog',
|
|
84
|
-
filter: (data): data is { props: { chat: Assistant.Chat } } => data.component === ASSISTANT_DIALOG,
|
|
85
|
-
component: ({ data }) => <ChatDialog {...data.props} />,
|
|
86
|
-
}),
|
|
87
|
-
]);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
-
import { live } from '@dxos/live-object';
|
|
7
|
-
|
|
8
|
-
import { meta } from '../meta';
|
|
9
|
-
import { Assistant } from '../types';
|
|
10
|
-
|
|
11
|
-
export default () => {
|
|
12
|
-
const settings = live<Assistant.Settings>({});
|
|
13
|
-
|
|
14
|
-
return contributes(Capabilities.Settings, {
|
|
15
|
-
prefix: meta.id,
|
|
16
|
-
schema: Assistant.Settings,
|
|
17
|
-
value: settings,
|
|
18
|
-
});
|
|
19
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
state.prop({ key: 'currentChat', type: LocalStorageStore.json<Record<string, string | undefined>>() });
|
|
20
|
-
|
|
21
|
-
return contributes(AssistantCapabilities.State, state.values, () => state.close());
|
|
22
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Layer from 'effect/Layer';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, type Capability, type PluginContext, contributes } from '@dxos/app-framework';
|
|
8
|
-
import { GenericToolkit } from '@dxos/assistant';
|
|
9
|
-
import { AssistantToolkit, SystemToolkit, WebSearchToolkit } from '@dxos/assistant-toolkit';
|
|
10
|
-
|
|
11
|
-
export default (_context: PluginContext): Capability<any>[] => [
|
|
12
|
-
contributes(Capabilities.Toolkit, GenericToolkit.make(AssistantToolkit.AssistantToolkit, AssistantToolkit.layer())),
|
|
13
|
-
|
|
14
|
-
// TODO(burdon): How to manage dependencies across blueprints.
|
|
15
|
-
contributes(Capabilities.Toolkit, GenericToolkit.make(SystemToolkit.SystemToolkit, SystemToolkit.layer())),
|
|
16
|
-
contributes(Capabilities.Toolkit, GenericToolkit.make(WebSearchToolkit, Layer.empty)),
|
|
17
|
-
];
|
package/src/events.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { defineEvent } from '@dxos/app-framework';
|
|
6
|
-
|
|
7
|
-
import { meta } from './meta';
|
|
8
|
-
|
|
9
|
-
export namespace AssistantEvents {
|
|
10
|
-
export const SetupAiServiceProviders = defineEvent(`${meta.id}/event/setup-ai-service-providers`);
|
|
11
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
import * as Schema from 'effect/Schema';
|
|
7
|
-
|
|
8
|
-
import { defineFunction } from '@dxos/functions';
|
|
9
|
-
import { log } from '@dxos/log';
|
|
10
|
-
|
|
11
|
-
export default defineFunction({
|
|
12
|
-
key: 'dxos.org/function/assistant-analysis',
|
|
13
|
-
name: 'Assistant analysis',
|
|
14
|
-
description: 'Enter analysis analysis mode.',
|
|
15
|
-
inputSchema: Schema.Struct({
|
|
16
|
-
enable: Schema.Boolean.annotations({ description: 'Enable or disable analysis mode.' }),
|
|
17
|
-
}),
|
|
18
|
-
outputSchema: Schema.Void,
|
|
19
|
-
handler: Effect.fn(function* ({ context, data: { enable } }) {
|
|
20
|
-
log.info('analysis mode', { enable });
|
|
21
|
-
}),
|
|
22
|
-
});
|