@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
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
// src/capabilities/blueprint-definition.ts
|
|
2
2
|
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
3
3
|
import { templates } from "@dxos/assistant";
|
|
4
|
-
import { DISCORD_BLUEPRINT, LINEAR_BLUEPRINT, RESEARCH_BLUEPRINT, fetchDiscordMessages, research, syncLinearIssues } from "@dxos/assistant-testing";
|
|
4
|
+
import { DISCORD_BLUEPRINT, LINEAR_BLUEPRINT, RESEARCH_BLUEPRINT, WEB_SEARCH_BLUEPRINT, agent, createResearchNote, entityExtraction, fetchDiscordMessages, research, syncLinearIssues } from "@dxos/assistant-testing";
|
|
5
5
|
import { Blueprint } from "@dxos/blueprints";
|
|
6
6
|
|
|
7
7
|
// src/functions/analysis.ts
|
|
8
|
-
import
|
|
8
|
+
import * as Effect from "effect/Effect";
|
|
9
|
+
import * as Schema from "effect/Schema";
|
|
9
10
|
import { defineFunction } from "@dxos/functions";
|
|
10
11
|
import { log } from "@dxos/log";
|
|
11
12
|
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-assistant/src/functions/analysis.ts";
|
|
12
13
|
var analysis_default = defineFunction({
|
|
13
|
-
|
|
14
|
+
key: "dxos.org/function/assistant-analysis",
|
|
15
|
+
name: "Assistant analysis",
|
|
14
16
|
description: "Enter analysis analysis mode.",
|
|
15
17
|
inputSchema: Schema.Struct({
|
|
16
18
|
enable: Schema.Boolean.annotations({
|
|
@@ -24,7 +26,7 @@ var analysis_default = defineFunction({
|
|
|
24
26
|
enable
|
|
25
27
|
}, {
|
|
26
28
|
F: __dxlog_file,
|
|
27
|
-
L:
|
|
29
|
+
L: 20,
|
|
28
30
|
S: this,
|
|
29
31
|
C: (f, a) => f(...a)
|
|
30
32
|
});
|
|
@@ -32,12 +34,14 @@ var analysis_default = defineFunction({
|
|
|
32
34
|
});
|
|
33
35
|
|
|
34
36
|
// src/functions/list.ts
|
|
35
|
-
import
|
|
37
|
+
import * as Effect2 from "effect/Effect";
|
|
38
|
+
import * as Schema2 from "effect/Schema";
|
|
36
39
|
import { Filter, Obj, Query } from "@dxos/echo";
|
|
37
40
|
import { DatabaseService, defineFunction as defineFunction2 } from "@dxos/functions";
|
|
38
41
|
import { trim } from "@dxos/util";
|
|
39
42
|
var list_default = defineFunction2({
|
|
40
|
-
|
|
43
|
+
key: "dxos.org/function/assistant/list",
|
|
44
|
+
name: "Assistant list",
|
|
41
45
|
description: (
|
|
42
46
|
// TODO(wittjosiah): Find a better way to prompt for looking up typenames before querying with them.
|
|
43
47
|
trim`
|
|
@@ -77,12 +81,16 @@ var list_default = defineFunction2({
|
|
|
77
81
|
});
|
|
78
82
|
|
|
79
83
|
// src/functions/load.ts
|
|
80
|
-
import
|
|
84
|
+
import * as Effect3 from "effect/Effect";
|
|
85
|
+
import * as Function from "effect/Function";
|
|
86
|
+
import * as Option from "effect/Option";
|
|
87
|
+
import * as Schema3 from "effect/Schema";
|
|
81
88
|
import { ArtifactId } from "@dxos/assistant";
|
|
82
89
|
import { Obj as Obj2 } from "@dxos/echo";
|
|
83
90
|
import { DatabaseService as DatabaseService2, defineFunction as defineFunction3 } from "@dxos/functions";
|
|
84
91
|
var load_default = defineFunction3({
|
|
85
|
-
|
|
92
|
+
key: "dxos.org/function/assistant/load",
|
|
93
|
+
name: "Assistant load",
|
|
86
94
|
description: "Loads the object.",
|
|
87
95
|
inputSchema: Schema3.Struct({
|
|
88
96
|
id: ArtifactId.annotations({
|
|
@@ -98,7 +106,7 @@ var load_default = defineFunction3({
|
|
|
98
106
|
}),
|
|
99
107
|
handler: Effect3.fn(function* ({ data: { id, typename } }) {
|
|
100
108
|
const object = yield* DatabaseService2.resolve(ArtifactId.toDXN(id));
|
|
101
|
-
return yield* pipe(Option.fromNullable(object), Option.flatMap((object2) => Obj2.getTypename(object2) === typename ? Option.some(object2) : Option.none()), Option.match({
|
|
109
|
+
return yield* Function.pipe(Option.fromNullable(object), Option.flatMap((object2) => Obj2.getTypename(object2) === typename ? Option.some(object2) : Option.none()), Option.match({
|
|
102
110
|
onNone: () => Effect3.fail("Object not found."),
|
|
103
111
|
onSome: (object2) => {
|
|
104
112
|
return Effect3.succeed({
|
|
@@ -135,10 +143,15 @@ var createBlueprint = () => Blueprint.make({
|
|
|
135
143
|
instructions: templates.system
|
|
136
144
|
});
|
|
137
145
|
var blueprint = createBlueprint();
|
|
138
|
-
var blueprint_definition_default = () => [
|
|
146
|
+
var blueprint_definition_default = (() => [
|
|
139
147
|
contributes(Capabilities.Functions, functions),
|
|
140
148
|
contributes(Capabilities.Functions, [
|
|
141
|
-
|
|
149
|
+
agent
|
|
150
|
+
]),
|
|
151
|
+
contributes(Capabilities.Functions, [
|
|
152
|
+
research,
|
|
153
|
+
createResearchNote,
|
|
154
|
+
entityExtraction
|
|
142
155
|
]),
|
|
143
156
|
contributes(Capabilities.BlueprintDefinition, blueprint),
|
|
144
157
|
contributes(Capabilities.BlueprintDefinition, RESEARCH_BLUEPRINT),
|
|
@@ -150,12 +163,13 @@ var blueprint_definition_default = () => [
|
|
|
150
163
|
fetchDiscordMessages
|
|
151
164
|
]),
|
|
152
165
|
contributes(Capabilities.BlueprintDefinition, LINEAR_BLUEPRINT),
|
|
153
|
-
contributes(Capabilities.BlueprintDefinition, DISCORD_BLUEPRINT)
|
|
154
|
-
|
|
166
|
+
contributes(Capabilities.BlueprintDefinition, DISCORD_BLUEPRINT),
|
|
167
|
+
contributes(Capabilities.BlueprintDefinition, WEB_SEARCH_BLUEPRINT)
|
|
168
|
+
]);
|
|
155
169
|
|
|
156
170
|
export {
|
|
157
171
|
BLUEPRINT_KEY,
|
|
158
172
|
createBlueprint,
|
|
159
173
|
blueprint_definition_default
|
|
160
174
|
};
|
|
161
|
-
//# sourceMappingURL=chunk-
|
|
175
|
+
//# sourceMappingURL=chunk-2CE2KPKZ.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/blueprint-definition.ts", "../../../src/functions/analysis.ts", "../../../src/functions/list.ts", "../../../src/functions/load.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, type Capability, contributes } from '@dxos/app-framework';\nimport { templates } from '@dxos/assistant';\nimport {\n DISCORD_BLUEPRINT,\n LINEAR_BLUEPRINT,\n RESEARCH_BLUEPRINT,\n WEB_SEARCH_BLUEPRINT,\n agent,\n createResearchNote,\n entityExtraction,\n fetchDiscordMessages,\n research,\n syncLinearIssues,\n} from '@dxos/assistant-testing';\nimport { Blueprint } from '@dxos/blueprints';\nimport { type FunctionDefinition } from '@dxos/functions';\n\nimport { analysis, list, load } from '../functions';\n\nconst functions: FunctionDefinition[] = [analysis, list, load];\nconst tools = [\n 'add-to-context',\n // TODO(wittjosiah): Factor out to an ECHO blueprint.\n 'get-schemas',\n 'add-schema',\n 'create-record',\n // TODO(wittjosiah): Factor out to a generic app-framework blueprint.\n 'open-item',\n // TODO(burdon): Anthropic only.\n // https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/text-editor-tool#example-str-replace-command\n // AI_TOOL_NOT_FOUND: str_replace_based_edit_tool\n // 'str_replace_based_edit_tool',\n];\n\nexport const BLUEPRINT_KEY = 'dxos.org/blueprint/assistant';\n\nexport const createBlueprint = (): Blueprint.Blueprint =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Assistant',\n tools: Blueprint.toolDefinitions({ functions, tools }),\n instructions: templates.system,\n });\n\nconst blueprint = createBlueprint();\n\n// TODO(dmaretskyi): Consider splitting into multiple modules.\nexport default (): Capability<any>[] => [\n contributes(Capabilities.Functions, functions),\n contributes(Capabilities.Functions, [agent]),\n contributes(Capabilities.Functions, [research, createResearchNote, entityExtraction]),\n contributes(Capabilities.BlueprintDefinition, blueprint),\n contributes(Capabilities.BlueprintDefinition, RESEARCH_BLUEPRINT),\n // TODO(burdon): Move out of assistant.\n contributes(Capabilities.Functions, [syncLinearIssues]),\n contributes(Capabilities.Functions, [fetchDiscordMessages]),\n contributes(Capabilities.BlueprintDefinition, LINEAR_BLUEPRINT),\n contributes(Capabilities.BlueprintDefinition, DISCORD_BLUEPRINT),\n contributes(Capabilities.BlueprintDefinition, WEB_SEARCH_BLUEPRINT),\n];\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { defineFunction } from '@dxos/functions';\nimport { log } from '@dxos/log';\n\nexport default defineFunction({\n key: 'dxos.org/function/assistant-analysis',\n name: 'Assistant analysis',\n description: 'Enter analysis analysis mode.',\n inputSchema: Schema.Struct({\n enable: Schema.Boolean.annotations({ description: 'Enable or disable analysis mode.' }),\n }),\n outputSchema: Schema.Void,\n handler: Effect.fn(function* ({ context, data: { enable } }) {\n log.info('analysis mode', { space: context.space?.id, enable });\n }),\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { Filter, Obj, Query } from '@dxos/echo';\nimport { DatabaseService, defineFunction } from '@dxos/functions';\nimport { trim } from '@dxos/util';\n\n// TODO(burdon): Factor out to space plugin.\nexport default defineFunction({\n key: 'dxos.org/function/assistant/list',\n name: 'Assistant list',\n description:\n // TODO(wittjosiah): Find a better way to prompt for looking up typenames before querying with them.\n trim`\n Lists the objects of the given type.\n Check the list-schemas tool for available types before calling this function.\n `,\n inputSchema: Schema.Struct({\n typename: Schema.String.annotations({\n description: 'The typename of the objects to list.',\n }),\n }),\n outputSchema: Schema.Struct({\n results: Schema.Array(\n Schema.Struct({\n dxn: Schema.String.annotations({ description: 'The DXN of the object.' }),\n label: Schema.optional(Schema.String.annotations({ description: 'The label of the object.' })),\n }),\n ),\n }),\n handler: Effect.fn(function* ({ data: { typename } }) {\n // TODO(wittjosiah): Typename query is not working for dynamic schemas.\n const [schema] = yield* DatabaseService.runSchemaQuery({ typename });\n const filter = schema ? Filter.type(schema) : Filter.typename(typename);\n\n const { objects } = yield* DatabaseService.runQuery(Query.select(filter));\n const results = objects.map((object) => ({\n dxn: Obj.getDXN(object).toString(),\n label: Obj.getLabel(object),\n }));\n\n return { results };\n }),\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\nimport * as Schema from 'effect/Schema';\n\nimport { ArtifactId } from '@dxos/assistant';\nimport { Obj } from '@dxos/echo';\nimport { DatabaseService, defineFunction } from '@dxos/functions';\n\n// TODO(burdon): Common error handling.\n// TODO(burdon): Factor out to space plugin.\nexport default defineFunction({\n key: 'dxos.org/function/assistant/load',\n name: 'Assistant load',\n description: 'Loads the object.',\n inputSchema: Schema.Struct({\n id: ArtifactId.annotations({\n description: 'The ID of the object.',\n }),\n typename: Schema.String.annotations({\n description: 'The typename of the object.',\n }),\n }),\n outputSchema: Schema.Struct({\n // TODO(wittjosiah): Type.Obj.Any | Type.Relation.Any\n object: Schema.Any,\n }),\n handler: Effect.fn(function* ({ data: { id, typename } }) {\n const object = yield* DatabaseService.resolve(ArtifactId.toDXN(id));\n return yield* Function.pipe(\n Option.fromNullable(object),\n Option.flatMap((object) => (Obj.getTypename(object) === typename ? Option.some(object) : Option.none())),\n Option.match({\n onNone: () => Effect.fail('Object not found.'),\n onSome: (object) => {\n // log.info('object', { object });\n return Effect.succeed({ object });\n },\n }),\n );\n }),\n});\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,cAA+BC,mBAAmB;AAC3D,SAASC,iBAAiB;AAC1B,SACEC,mBACAC,kBACAC,oBACAC,sBACAC,OACAC,oBACAC,kBACAC,sBACAC,UACAC,wBACK;AACP,SAASC,iBAAiB;;;ACd1B,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,sBAAsB;AAC/B,SAASC,WAAW;;AAEpB,IAAA,mBAAeD,eAAe;EAC5BE,KAAK;EACLC,MAAM;EACNC,aAAa;EACbC,aAAoBC,cAAO;IACzBC,QAAeC,eAAQC,YAAY;MAAEL,aAAa;IAAmC,CAAA;EACvF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;EACpCgB,YAAYC,aAAaC,WAAW;IAACC;GAAM;EAC3CH,YAAYC,aAAaC,WAAW;IAACE;IAAUC;IAAoBC;GAAiB;EACpFN,YAAYC,aAAaM,qBAAqBR,SAAAA;EAC9CC,YAAYC,aAAaM,qBAAqBC,kBAAAA;;EAE9CR,YAAYC,aAAaC,WAAW;IAACO;GAAiB;EACtDT,YAAYC,aAAaC,WAAW;IAACQ;GAAqB;EAC1DV,YAAYC,aAAaM,qBAAqBI,gBAAAA;EAC9CX,YAAYC,aAAaM,qBAAqBK,iBAAAA;EAC9CZ,YAAYC,aAAaM,qBAAqBM,oBAAAA;;",
|
|
6
|
+
"names": ["Capabilities", "contributes", "templates", "DISCORD_BLUEPRINT", "LINEAR_BLUEPRINT", "RESEARCH_BLUEPRINT", "WEB_SEARCH_BLUEPRINT", "agent", "createResearchNote", "entityExtraction", "fetchDiscordMessages", "research", "syncLinearIssues", "Blueprint", "Effect", "Schema", "defineFunction", "log", "key", "name", "description", "inputSchema", "Struct", "enable", "Boolean", "annotations", "outputSchema", "Void", "handler", "fn", "context", "data", "info", "space", "id", "Effect", "Schema", "Filter", "Obj", "Query", "DatabaseService", "defineFunction", "trim", "defineFunction", "key", "name", "description", "trim", "inputSchema", "Struct", "typename", "String", "annotations", "outputSchema", "results", "Array", "dxn", "label", "optional", "handler", "fn", "data", "schema", "DatabaseService", "runSchemaQuery", "filter", "Filter", "type", "objects", "runQuery", "Query", "select", "map", "object", "Obj", "getDXN", "toString", "getLabel", "Effect", "Function", "Option", "Schema", "ArtifactId", "Obj", "DatabaseService", "defineFunction", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "id", "ArtifactId", "annotations", "typename", "String", "outputSchema", "object", "Any", "handler", "fn", "data", "DatabaseService", "resolve", "toDXN", "pipe", "fromNullable", "flatMap", "Obj", "getTypename", "some", "none", "match", "onNone", "fail", "onSome", "succeed", "functions", "analysis", "list", "load", "tools", "BLUEPRINT_KEY", "createBlueprint", "Blueprint", "make", "key", "name", "toolDefinitions", "instructions", "templates", "system", "blueprint", "contributes", "Capabilities", "Functions", "agent", "research", "createResearchNote", "entityExtraction", "BlueprintDefinition", "RESEARCH_BLUEPRINT", "syncLinearIssues", "fetchDiscordMessages", "LINEAR_BLUEPRINT", "DISCORD_BLUEPRINT", "WEB_SEARCH_BLUEPRINT"]
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
meta
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5RICKAMN.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
6
|
} from "./chunk-J5LGTIGS.mjs";
|
|
@@ -10,12 +10,13 @@ var Assistant_exports = {};
|
|
|
10
10
|
__export(Assistant_exports, {
|
|
11
11
|
Chat: () => Chat,
|
|
12
12
|
CompanionTo: () => CompanionTo,
|
|
13
|
-
Settings: () => Settings
|
|
13
|
+
Settings: () => Settings,
|
|
14
|
+
makeChat: () => makeChat
|
|
14
15
|
});
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
16
|
+
import * as Schema from "effect/Schema";
|
|
17
|
+
import { Obj, Ref, Type } from "@dxos/echo";
|
|
18
|
+
import { LabelAnnotation } from "@dxos/echo/internal";
|
|
19
|
+
import { Queue } from "@dxos/echo-db";
|
|
19
20
|
|
|
20
21
|
// src/types/defs.ts
|
|
21
22
|
var LLM_PROVIDERS = [
|
|
@@ -37,6 +38,10 @@ var Chat = Schema.Struct({
|
|
|
37
38
|
}), LabelAnnotation.set([
|
|
38
39
|
"name"
|
|
39
40
|
]));
|
|
41
|
+
var makeChat = ({ name, queue }) => Obj.make(Chat, {
|
|
42
|
+
name,
|
|
43
|
+
queue: Ref.fromDXN(queue.dxn)
|
|
44
|
+
});
|
|
40
45
|
var CompanionTo = Schema.Struct({
|
|
41
46
|
id: Type.ObjectId
|
|
42
47
|
}).pipe(Type.Relation({
|
|
@@ -60,15 +65,16 @@ __export(AssistantAction_exports, {
|
|
|
60
65
|
CreateBlueprint: () => CreateBlueprint,
|
|
61
66
|
CreateChat: () => CreateChat,
|
|
62
67
|
CreateSequence: () => CreateSequence,
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
SetCurrentChat: () => SetCurrentChat,
|
|
69
|
+
UpdateChatName: () => UpdateChatName,
|
|
70
|
+
onCreateSpace: () => onCreateSpace
|
|
65
71
|
});
|
|
66
|
-
import
|
|
72
|
+
import * as Schema2 from "effect/Schema";
|
|
67
73
|
import { Blueprint } from "@dxos/blueprints";
|
|
68
74
|
import { EchoObjectSchema, SpaceSchema } from "@dxos/client/echo";
|
|
69
75
|
import { Sequence } from "@dxos/conductor";
|
|
70
76
|
import { DataType } from "@dxos/schema";
|
|
71
|
-
var
|
|
77
|
+
var onCreateSpace = class extends Schema2.TaggedClass()(`${meta.id}/on-space-created`, {
|
|
72
78
|
input: Schema2.Struct({
|
|
73
79
|
space: SpaceSchema,
|
|
74
80
|
rootCollection: DataType.Collection
|
|
@@ -86,6 +92,13 @@ var CreateChat = class extends Schema2.TaggedClass()(`${meta.id}/action/create-c
|
|
|
86
92
|
})
|
|
87
93
|
}) {
|
|
88
94
|
};
|
|
95
|
+
var UpdateChatName = class extends Schema2.TaggedClass()(`${meta.id}/action/update-name`, {
|
|
96
|
+
input: Schema2.Struct({
|
|
97
|
+
chat: Chat
|
|
98
|
+
}),
|
|
99
|
+
output: Schema2.Void
|
|
100
|
+
}) {
|
|
101
|
+
};
|
|
89
102
|
var BlueprintForm = Schema2.Struct({
|
|
90
103
|
key: Schema2.String,
|
|
91
104
|
name: Schema2.String,
|
|
@@ -117,10 +130,10 @@ var SetCurrentChat = class extends Schema2.TaggedClass()(`${meta.id}/action/set-
|
|
|
117
130
|
};
|
|
118
131
|
|
|
119
132
|
// src/types/service.ts
|
|
120
|
-
import
|
|
133
|
+
import * as Schema3 from "effect/Schema";
|
|
121
134
|
import { ComputeGraph } from "@dxos/conductor";
|
|
122
135
|
import { Type as Type2 } from "@dxos/echo";
|
|
123
|
-
import { TypedObject } from "@dxos/echo
|
|
136
|
+
import { TypedObject } from "@dxos/echo/internal";
|
|
124
137
|
import { FunctionType } from "@dxos/functions";
|
|
125
138
|
var ApiAuthorizationKey = Schema3.Struct({
|
|
126
139
|
type: Schema3.Literal("api-key"),
|
|
@@ -163,7 +176,12 @@ var ServiceInterfaceApi = Schema3.Struct({
|
|
|
163
176
|
*/
|
|
164
177
|
authorization: Schema3.optional(ApiAuthorization)
|
|
165
178
|
});
|
|
166
|
-
var ServiceInterface = Schema3.Union(
|
|
179
|
+
var ServiceInterface = Schema3.Union(
|
|
180
|
+
// Service types.
|
|
181
|
+
ServiceInterfaceFunction,
|
|
182
|
+
ServiceInterfaceWorkflow,
|
|
183
|
+
ServiceInterfaceApi
|
|
184
|
+
);
|
|
167
185
|
var ServiceType = class extends TypedObject({
|
|
168
186
|
typename: "dxos.org/type/ServiceType",
|
|
169
187
|
version: "0.1.0"
|
|
@@ -199,4 +217,4 @@ export {
|
|
|
199
217
|
ServiceType,
|
|
200
218
|
categoryIcons
|
|
201
219
|
};
|
|
202
|
-
//# sourceMappingURL=chunk-
|
|
220
|
+
//# sourceMappingURL=chunk-37VMDB4P.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/Assistant.ts", "../../../src/types/defs.ts", "../../../src/types/AssistantAction.ts", "../../../src/types/service.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Obj, Ref, Type } from '@dxos/echo';\nimport { LabelAnnotation } from '@dxos/echo/internal';\nimport { Queue } from '@dxos/echo-db';\n\nimport { LLM_PROVIDERS } from './defs';\n\n/**\n * AI chat.\n */\nexport const Chat = Schema.Struct({\n id: Type.ObjectId,\n name: Schema.optional(Schema.String),\n queue: Type.Ref(Queue),\n // TODO(dmaretskyi): Eventually this and the message queue will be the same.\n traceQueue: Schema.optional(Type.Ref(Queue)),\n}).pipe(\n Type.Obj({\n typename: 'dxos.org/type/assistant/Chat',\n version: '0.2.0',\n }),\n LabelAnnotation.set(['name']),\n);\n\nexport interface Chat extends Schema.Schema.Type<typeof Chat> {}\n\nexport const makeChat = ({ name, queue }: { name?: string; queue: Queue }) =>\n Obj.make(Chat, { name, queue: Ref.fromDXN(queue.dxn) });\n\n/**\n * Relation between a Chat and companion objects (e.g., artifacts).\n */\nexport const CompanionTo = Schema.Struct({\n id: Type.ObjectId,\n}).pipe(\n Type.Relation({\n typename: 'dxos.org/relation/assistant/CompanionTo',\n version: '0.1.0',\n source: Chat,\n target: Type.Expando,\n }),\n);\n\nexport interface CompanionTo extends Schema.Schema.Type<typeof CompanionTo> {}\n\n/**\n * Plugin settings.\n */\nexport const Settings = Schema.mutable(\n Schema.Struct({\n llmProvider: Schema.optional(Schema.Literal(...LLM_PROVIDERS)),\n edgeModel: Schema.optional(Schema.String),\n ollamaModel: Schema.optional(Schema.String),\n lmstudioModel: Schema.optional(Schema.String),\n customPrompts: Schema.optional(Schema.Boolean),\n }),\n);\n\nexport type Settings = Schema.Schema.Type<typeof Settings>;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nexport const LLM_PROVIDERS = ['edge', 'ollama', 'lmstudio'] as const;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Blueprint } from '@dxos/blueprints';\nimport { EchoObjectSchema, SpaceSchema } from '@dxos/client/echo';\nimport { Sequence } from '@dxos/conductor';\nimport { DataType } from '@dxos/schema';\n\nimport { meta } from '../meta';\n\nimport { Chat } from './Assistant';\n\n// TODO(burdon): Name?\nexport class onCreateSpace extends Schema.TaggedClass<onCreateSpace>()(`${meta.id}/on-space-created`, {\n input: Schema.Struct({\n space: SpaceSchema,\n rootCollection: DataType.Collection,\n }),\n output: Schema.Void,\n}) {}\n\nexport class CreateChat extends Schema.TaggedClass<CreateChat>()(`${meta.id}/action/create-chat`, {\n input: Schema.Struct({\n space: SpaceSchema,\n name: Schema.optional(Schema.String),\n }),\n output: Schema.Struct({\n object: Chat,\n }),\n}) {}\n\nexport class UpdateChatName extends Schema.TaggedClass<UpdateChatName>()(`${meta.id}/action/update-name`, {\n input: Schema.Struct({\n chat: Chat,\n }),\n output: Schema.Void,\n}) {}\n\nexport const BlueprintForm = Schema.Struct({\n key: Schema.String,\n name: Schema.String,\n description: Schema.optional(Schema.String),\n});\n\nexport class CreateBlueprint extends Schema.TaggedClass<CreateBlueprint>()(`${meta.id}/action/create-blueprint`, {\n input: BlueprintForm,\n output: Schema.Struct({\n object: Blueprint.Blueprint,\n }),\n}) {}\n\nexport class CreateSequence extends Schema.TaggedClass<CreateSequence>()(`${meta.id}/action/create-sequence`, {\n input: Schema.Struct({\n name: Schema.optional(Schema.String),\n }),\n output: Schema.Struct({\n object: Sequence,\n }),\n}) {}\n\nexport class SetCurrentChat extends Schema.TaggedClass<SetCurrentChat>()(`${meta.id}/action/set-current-chat`, {\n input: Schema.Struct({\n companionTo: EchoObjectSchema,\n chat: Chat,\n }),\n output: Schema.Void,\n}) {}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { ComputeGraph } from '@dxos/conductor';\nimport { Type } from '@dxos/echo';\nimport { TypedObject } from '@dxos/echo/internal';\nimport { FunctionType } from '@dxos/functions';\n\n// TODO(burdon): Factor out and reconcile with https://github.com/dxos/dxos/blob/main/packages/plugins/plugin-token-manager/src/defs/presets.ts#L7\n\nconst ApiAuthorizationKey = Schema.Struct({\n type: Schema.Literal('api-key'),\n key: Schema.String,\n placement: Schema.Union(\n Schema.Struct({\n type: Schema.Literal('authorization-header'),\n }),\n Schema.Struct({\n type: Schema.Literal('query'),\n name: Schema.String,\n }),\n ),\n});\n\nconst ApiAuthorizationOauth = Schema.Struct({\n type: Schema.Literal('oauth'),\n clientId: Schema.String,\n clientSecret: Schema.String,\n tokenUrl: Schema.String,\n grantType: Schema.String,\n});\n\nexport const ApiAuthorization = Schema.Union(ApiAuthorizationKey, ApiAuthorizationOauth);\nexport type ApiAuthorization = Schema.Schema.Type<typeof ApiAuthorization>;\n\nconst ServiceInterfaceFunction = Schema.Struct({\n kind: Schema.Literal('function'),\n fn: Type.Ref(FunctionType),\n});\n\nconst ServiceInterfaceWorkflow = Schema.Struct({\n kind: Schema.Literal('workflow'),\n workflow: Type.Ref(ComputeGraph),\n});\n\nconst ServiceInterfaceApi = Schema.Struct({\n kind: Schema.Literal('api'),\n\n /**\n * URL to fetch the openapi schema.\n */\n schemaUrl: Schema.optional(Schema.String),\n\n /**\n * Inlined openapi schema.\n */\n schema: Schema.optional(Schema.Any),\n\n /**\n * Authorization configuration if required.\n */\n authorization: Schema.optional(ApiAuthorization),\n});\n\nconst ServiceInterface = Schema.Union(\n // Service types.\n ServiceInterfaceFunction,\n ServiceInterfaceWorkflow,\n ServiceInterfaceApi,\n);\n\nexport type ServiceInterface = Schema.Schema.Type<typeof ServiceInterface>;\n\nexport class ServiceType extends TypedObject({\n typename: 'dxos.org/type/ServiceType',\n version: '0.1.0',\n})({\n serviceId: Schema.String,\n name: Schema.optional(Schema.String),\n description: Schema.optional(Schema.String),\n category: Schema.optional(Schema.String),\n enabled: Schema.optional(Schema.Boolean),\n\n /**\n * Entries exposed: functions, workflows, and APIs.\n */\n interfaces: Schema.optional(Schema.Array(ServiceInterface)),\n}) {}\n\n//\n// Service Registry\n//\n\nexport interface BaseServiceRegistry {\n queryServices(query?: ServiceQuery): Promise<ServiceType[]>;\n}\n\nexport type ServiceQuery = {\n name?: string;\n category?: string;\n};\n\nexport const categoryIcons: Record<string, string> = {\n finance: 'ph--bank--regular',\n health: 'ph--heart--regular',\n geolocation: 'ph--globe-simple--regular',\n education: 'ph--books--regular',\n entertainment: 'ph--music-notes--regular',\n shopping: 'ph--shopping-cart--regular',\n travel: 'ph--airplane-takeoff--regular',\n utilities: 'ph--lightning--regular',\n weather: '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ACTC,QAAQ;EACRC,aAAa;EACbC,WAAW;EACXC,eAAe;EACfC,UAAU;EACVC,QAAQ;EACRC,WAAW;EACXC,SAAS;AACX;",
|
|
6
|
+
"names": ["Schema", "Obj", "Ref", "Type", "LabelAnnotation", "Queue", "LLM_PROVIDERS", "Chat", "Struct", "id", "Type", "ObjectId", "name", "optional", "String", "queue", "Ref", "Queue", "traceQueue", "pipe", "Obj", "typename", "version", "LabelAnnotation", "set", "makeChat", "make", "fromDXN", "dxn", "CompanionTo", "Relation", "source", "target", "Expando", "Settings", "mutable", "llmProvider", "Literal", "LLM_PROVIDERS", "edgeModel", "ollamaModel", "lmstudioModel", "customPrompts", "Boolean", "Schema", "Blueprint", "EchoObjectSchema", "SpaceSchema", "Sequence", "DataType", "onCreateSpace", "TaggedClass", "meta", "id", "input", "Struct", "space", "SpaceSchema", "rootCollection", "DataType", "Collection", "output", "Void", "CreateChat", "name", "optional", "String", "object", "Chat", "UpdateChatName", "chat", "BlueprintForm", "key", "description", "CreateBlueprint", "Blueprint", "CreateSequence", "Sequence", "SetCurrentChat", "companionTo", "EchoObjectSchema", "Schema", "ComputeGraph", "Type", "TypedObject", "FunctionType", "ApiAuthorizationKey", "Struct", "type", "Literal", "key", "String", "placement", "Union", "name", "ApiAuthorizationOauth", "clientId", "clientSecret", "tokenUrl", "grantType", "ApiAuthorization", "ServiceInterfaceFunction", "kind", "fn", "Type", "Ref", "FunctionType", "ServiceInterfaceWorkflow", "workflow", "ComputeGraph", "ServiceInterfaceApi", "schemaUrl", "optional", "schema", "Any", "authorization", "ServiceInterface", "ServiceType", "TypedObject", "typename", "version", "serviceId", "description", "category", "enabled", "Boolean", "interfaces", "Array", "categoryIcons", "finance", "health", "geolocation", "education", "entertainment", "shopping", "travel", "utilities", "weather"]
|
|
7
|
+
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
meta
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5RICKAMN.mjs";
|
|
4
4
|
|
|
5
5
|
// src/components/TemplateEditor/TemplateEditor.tsx
|
|
6
6
|
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
7
|
+
import { xml } from "@codemirror/lang-xml";
|
|
8
|
+
import { defaultHighlightStyle, syntaxHighlighting } from "@codemirror/language";
|
|
7
9
|
import React from "react";
|
|
8
10
|
import { createDocAccessor } from "@dxos/react-client/echo";
|
|
9
11
|
import { useThemeContext, useTranslation } from "@dxos/react-ui";
|
|
10
|
-
import { createBasicExtensions, createDataExtensions, createMarkdownExtensions, createThemeExtensions, useTextEditor } from "@dxos/react-ui-editor";
|
|
12
|
+
import { createBasicExtensions, createDataExtensions, createMarkdownExtensions, createThemeExtensions, decorateMarkdown, useTextEditor } from "@dxos/react-ui-editor";
|
|
11
13
|
import { mx } from "@dxos/react-ui-theme";
|
|
12
|
-
import {
|
|
14
|
+
import { isNonNullable } from "@dxos/util";
|
|
13
15
|
|
|
14
16
|
// src/components/TemplateEditor/handlebars-extension.ts
|
|
15
17
|
import { autocompletion, completionKeymap } from "@codemirror/autocomplete";
|
|
@@ -192,10 +194,12 @@ var TemplateEditor = ({ id, classNames, template }) => {
|
|
|
192
194
|
createThemeExtensions({
|
|
193
195
|
themeMode
|
|
194
196
|
}),
|
|
195
|
-
// Extend markdown with handlebars support.
|
|
196
197
|
createMarkdownExtensions(),
|
|
197
|
-
|
|
198
|
-
|
|
198
|
+
decorateMarkdown(),
|
|
199
|
+
xml(),
|
|
200
|
+
handlebars(),
|
|
201
|
+
syntaxHighlighting(defaultHighlightStyle)
|
|
202
|
+
].filter(isNonNullable)
|
|
199
203
|
};
|
|
200
204
|
}, [
|
|
201
205
|
themeMode,
|
|
@@ -213,4 +217,4 @@ var TemplateEditor = ({ id, classNames, template }) => {
|
|
|
213
217
|
export {
|
|
214
218
|
TemplateEditor
|
|
215
219
|
};
|
|
216
|
-
//# sourceMappingURL=chunk-
|
|
220
|
+
//# sourceMappingURL=chunk-3EWE2UQD.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/TemplateEditor/TemplateEditor.tsx", "../../../src/components/TemplateEditor/handlebars-extension.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { xml } from '@codemirror/lang-xml';\nimport { defaultHighlightStyle, syntaxHighlighting } from '@codemirror/language';\nimport React from 'react';\n\nimport { type Template } from '@dxos/blueprints';\nimport { createDocAccessor } from '@dxos/react-client/echo';\nimport { type ThemedClassName, useThemeContext, useTranslation } from '@dxos/react-ui';\nimport {\n createBasicExtensions,\n createDataExtensions,\n createMarkdownExtensions,\n createThemeExtensions,\n decorateMarkdown,\n useTextEditor,\n} from '@dxos/react-ui-editor';\nimport { mx } from '@dxos/react-ui-theme';\nimport { isNonNullable } from '@dxos/util';\n\nimport { meta } from '../../meta';\n\nimport { handlebars } from './handlebars-extension';\n\nexport type TemplateEditorProps = ThemedClassName<{\n id: string;\n template: Template.Template;\n}>;\n\nexport const TemplateEditor = ({ id, classNames, template }: TemplateEditorProps) => {\n const { t } = useTranslation(meta.id);\n const { themeMode } = useThemeContext();\n const { parentRef } = useTextEditor(() => {\n const text = template.source?.target;\n if (!text) {\n return {};\n }\n\n return {\n initialValue: text.content ?? '',\n extensions: [\n createDataExtensions({ id, text: createDocAccessor(text, ['content']) }),\n createBasicExtensions({\n bracketMatching: false,\n lineNumbers: true,\n lineWrapping: true,\n placeholder: t('template placeholder'),\n }),\n createThemeExtensions({ themeMode }),\n createMarkdownExtensions(),\n decorateMarkdown(), // TODO(burdon): Move into bundle.\n xml(),\n handlebars(),\n syntaxHighlighting(defaultHighlightStyle),\n ].filter(isNonNullable),\n };\n }, [themeMode, template.source?.target]);\n\n return <div ref={parentRef} className={mx('bs-full overflow-hidden', classNames)} />;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n type CompletionContext,\n type CompletionResult,\n autocompletion,\n completionKeymap,\n} from '@codemirror/autocomplete';\nimport { type Extension } from '@codemirror/state';\nimport { Decoration, type DecorationSet, type EditorView, ViewPlugin, type ViewUpdate, keymap } from '@codemirror/view';\n\nexport type HandlebarsOptions = {};\n\n/**\n * Simple Handlebars plugin for CodeMirror.\n * Supports:\n * - Comments: {{! comment }}\n * - Commands: {{#command}} {{/command}}\n * - Variables: {{var}}\n * - Commands with variables: {{#each items}} {{/each}}\n */\nexport const handlebars = (_: HandlebarsOptions = {}): Extension => {\n return [\n handlebarsHighlightPlugin,\n autocompletion({\n activateOnTyping: true,\n aboveCursor: true,\n closeOnBlur: true,\n override: [handlebarsCompletions],\n }),\n keymap.of(completionKeymap),\n ];\n};\n\nconst regex = {\n comment: /\\{\\{!\\s*[^}]*\\}\\}/g,\n brackets: /\\{\\{[^}]*\\}\\}/g,\n command: /\\{\\{[#/]([^}]+)\\}\\}/g,\n var: /\\{\\{(?!\\s*!)(\\w[^}]*)\\}\\}/g,\n};\n\n/**\n * ViewPlugin that decorates Handlebars syntax.\n */\nconst handlebarsHighlightPlugin = ViewPlugin.fromClass(\n class {\n decorations: DecorationSet;\n\n constructor(view: EditorView) {\n this.decorations = this.buildDecorations(view);\n }\n\n buildDecorations(view: EditorView) {\n const widgets: any[] = [];\n\n for (const { from, to } of view.visibleRanges) {\n const text = view.state.doc.sliceString(from, to);\n\n // Match comments: {{! comment }}\n {\n let match;\n while ((match = regex.comment.exec(text)) !== null) {\n const start = from + match.index;\n const end = start + match[0].length;\n widgets.push(Decoration.mark({ class: 'text-subdued' }).range(start, end));\n }\n }\n\n // Match brackets: {{ and }}\n {\n let match;\n while ((match = regex.brackets.exec(text)) !== null) {\n const start = from + match.index;\n const end = start + match[0].length;\n widgets.push(Decoration.mark({ class: 'text-subdued' }).range(start, end));\n }\n }\n\n // Match commands: {{#command}} and {{/command}}\n {\n let match;\n while ((match = regex.command.exec(text)) !== null) {\n const start = from + match.index + 2;\n let end = start + match[0].length - 4;\n const text = view.state.doc.sliceString(start, end);\n const parts = text.split(/\\s+/);\n if (parts.length > 1) {\n const idx = start + parts[0].length;\n widgets.push(Decoration.mark({ class: 'text-greenText' }).range(idx, end));\n end = idx;\n }\n widgets.push(Decoration.mark({ class: 'text-blueText' }).range(start, end));\n }\n }\n\n // Match variables: {{var}}\n {\n let match;\n while ((match = regex.var.exec(text)) !== null) {\n const start = from + match.index + 2;\n const end = start + match[0].length - 4;\n widgets.push(Decoration.mark({ class: 'text-greenText' }).range(start, end));\n }\n }\n }\n\n // Sort decorations by position to avoid \"Ranges must be added sorted\" error.\n widgets.sort((a, b) => a.from - b.from || a.startSide - b.startSide);\n return Decoration.set(widgets);\n }\n\n update(update: ViewUpdate) {\n if (update.docChanged || update.viewportChanged) {\n this.decorations = this.buildDecorations(update.view);\n }\n }\n },\n {\n decorations: (v) => v.decorations,\n },\n);\n\n// TODO(burdon): Pass in variables.\nconst variables = ['this'];\nconst commands = ['this', 'each', 'if', 'unless', 'with'];\n\n/**\n * Provides completions for Handlebars variables.\n */\nfunction handlebarsCompletions(context: CompletionContext): CompletionResult | null {\n const match = context.matchBefore(/\\{\\{[^}]*/);\n if (!match || match.from === match.to) {\n return null;\n }\n\n let type = 'variable';\n let text = match.text.slice(2);\n let from = match.from + 2;\n let matches = [];\n if (text.startsWith('#') || text.startsWith('/')) {\n const idx = text.lastIndexOf(' ');\n if (idx !== -1) {\n type = 'variable';\n matches = variables;\n text = text.slice(idx + 1);\n from += idx + 1;\n } else {\n type = 'command';\n text = text.slice(1);\n matches = commands;\n from += 1;\n }\n } else {\n type = 'variable';\n matches = variables;\n }\n\n const options = matches.filter((name) => name.startsWith(text)).map((name) => ({ type, label: name }));\n return {\n from,\n options,\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,SAASA,WAAW;AACpB,SAASC,uBAAuBC,0BAA0B;AAC1D,OAAOC,WAAW;AAGlB,SAASC,yBAAyB;AAClC,SAA+BC,iBAAiBC,sBAAsB;AACtE,SACEC,uBACAC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AO,CAAC;MACV;AAEA,aAAO;QACLG,cAAcH,KAAKI,WAAW;QAC9BC,YAAY;UACVC,qBAAqB;YAAEhB;YAAIU,MAAMO,kBAAkBP,MAAM;cAAC;aAAU;UAAE,CAAA;UACtEQ,sBAAsB;YACpBC,iBAAiB;YACjBC,aAAa;YACbC,cAAc;YACdC,aAAanB,EAAE,sBAAA;UACjB,CAAA;UACAoB,sBAAsB;YAAEjB;UAAU,CAAA;UAClCkB,yBAAAA;UACAC,iBAAAA;UACAC,IAAAA;UACAC,WAAAA;UACAC,mBAAmBC,qBAAAA;UACnBC,OAAOC,aAAAA;MACX;IACF,GAAG;MAACzB;MAAWJ,SAASS,QAAQC;KAAO;AAEvC,WAAO,sBAAA,cAACoB,OAAAA;MAAIC,KAAKzB;MAAW0B,WAAWC,GAAG,2BAA2BlC,UAAAA;;;;;AACvE;",
|
|
6
|
+
"names": ["xml", "defaultHighlightStyle", "syntaxHighlighting", "React", "createDocAccessor", "useThemeContext", "useTranslation", "createBasicExtensions", "createDataExtensions", "createMarkdownExtensions", "createThemeExtensions", "decorateMarkdown", "useTextEditor", "mx", "isNonNullable", "autocompletion", "completionKeymap", "Decoration", "ViewPlugin", "keymap", "handlebars", "_", "handlebarsHighlightPlugin", "autocompletion", "activateOnTyping", "aboveCursor", "closeOnBlur", "override", "handlebarsCompletions", "keymap", "of", "completionKeymap", "regex", "comment", "brackets", "command", "var", "ViewPlugin", "fromClass", "buildDecorations", "view", "widgets", "from", "to", "visibleRanges", "text", "state", "doc", "sliceString", "match", "exec", "start", "index", "end", "length", "push", "Decoration", "mark", "class", "range", "parts", "split", "idx", "sort", "a", "b", "startSide", "set", "update", "docChanged", "viewportChanged", "decorations", "v", "variables", "commands", "context", "matchBefore", "type", "slice", "matches", "startsWith", "lastIndexOf", "options", "filter", "name", "map", "label", "TemplateEditor", "id", "classNames", "template", "t", "useTranslation", "meta", "themeMode", "useThemeContext", "parentRef", "useTextEditor", "text", "source", "target", "initialValue", "content", "extensions", "createDataExtensions", "createDocAccessor", "createBasicExtensions", "bracketMatching", "lineNumbers", "lineWrapping", "placeholder", "createThemeExtensions", "createMarkdownExtensions", "decorateMarkdown", "xml", "handlebars", "syntaxHighlighting", "defaultHighlightStyle", "filter", "isNonNullable", "div", "ref", "className", "mx"]
|
|
7
|
+
}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
meta
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5RICKAMN.mjs";
|
|
4
4
|
|
|
5
5
|
// src/capabilities/capabilities.ts
|
|
6
6
|
import { defineCapability } from "@dxos/app-framework";
|
|
7
7
|
(function(AssistantCapabilities2) {
|
|
8
8
|
AssistantCapabilities2.State = defineCapability(`${meta.id}/capability/state`);
|
|
9
9
|
AssistantCapabilities2.MutableState = defineCapability(`${meta.id}/capability/state`);
|
|
10
|
-
AssistantCapabilities2.AiServiceLayer = defineCapability(`${meta.id}/capability/ai-service-factory`);
|
|
11
|
-
AssistantCapabilities2.AiModelResolver = defineCapability(`${meta.id}/capability/ai-model-resolver`);
|
|
12
|
-
AssistantCapabilities2.ComputeRuntime = defineCapability(`${meta.id}/capability/compute-runtime`);
|
|
13
10
|
})(AssistantCapabilities || (AssistantCapabilities = {}));
|
|
14
11
|
var AssistantCapabilities;
|
|
15
12
|
|
|
16
13
|
export {
|
|
17
14
|
AssistantCapabilities
|
|
18
15
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-5EGXHCAZ.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/capabilities.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type DeepReadonly } from '@dxos/util';\n\nimport { meta } from '../meta';\nimport { type Assistant } from '../types';\n\nexport namespace AssistantCapabilities {\n export type AssistantState = {\n /** Map of primary object fq id to current chat. */\n currentChat: Record<string, Assistant.Chat>;\n };\n export const State = defineCapability<DeepReadonly<AssistantState>>(`${meta.id}/capability/state`);\n export const MutableState = defineCapability<AssistantState>(`${meta.id}/capability/state`);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SAASA,wBAAwB;UAMhBC,wBAAAA;yBAKFC,QAAQC,iBAA+C,GAAGC,KAAKC,EAAE,mBAAmB;yBACpFC,eAAeH,iBAAiC,GAAGC,KAAKC,EAAE,mBAAmB;AAC5F,GAPiBJ,0BAAAA,wBAAAA,CAAAA,EAAAA;;",
|
|
6
|
+
"names": ["defineCapability", "AssistantCapabilities", "State", "defineCapability", "meta", "id", "MutableState"]
|
|
7
|
+
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// src/meta.ts
|
|
2
|
-
var ASSISTANT_PLUGIN = "dxos.org/plugin/assistant";
|
|
3
|
-
var ASSISTANT_DIALOG = `${ASSISTANT_PLUGIN}/assistant/dialog`;
|
|
4
2
|
var meta = {
|
|
5
|
-
id:
|
|
3
|
+
id: "dxos.org/plugin/assistant",
|
|
6
4
|
name: "Assistant",
|
|
7
5
|
description: "The Assistant plugin allows you to chat with your spaces inside of Composer.",
|
|
8
6
|
icon: "ph--atom--regular",
|
|
@@ -11,10 +9,10 @@ var meta = {
|
|
|
11
9
|
"labs"
|
|
12
10
|
]
|
|
13
11
|
};
|
|
12
|
+
var ASSISTANT_DIALOG = `${meta.id}/assistant/dialog`;
|
|
14
13
|
|
|
15
14
|
export {
|
|
16
|
-
|
|
17
|
-
ASSISTANT_DIALOG
|
|
18
|
-
meta
|
|
15
|
+
meta,
|
|
16
|
+
ASSISTANT_DIALOG
|
|
19
17
|
};
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-5RICKAMN.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const meta: PluginMeta = {\n id: 'dxos.org/plugin/assistant',\n name: 'Assistant',\n description: 'The Assistant plugin allows you to chat with your spaces inside of Composer.',\n icon: 'ph--atom--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-assistant',\n tags: ['labs'],\n};\n\nexport const ASSISTANT_DIALOG = `${meta.id}/assistant/dialog`;\n"],
|
|
5
|
+
"mappings": ";AAMO,IAAMA,OAAmB;EAC9BC,IAAI;EACJC,MAAM;EACNC,aAAa;EACbC,MAAM;EACNC,QAAQ;EACRC,MAAM;IAAC;;AACT;AAEO,IAAMC,mBAAmB,GAAGP,KAAKC,EAAE;",
|
|
6
|
+
"names": ["meta", "id", "name", "description", "icon", "source", "tags", "ASSISTANT_DIALOG"]
|
|
7
|
+
}
|