@dxos/plugin-assistant 0.9.1-main.c7dcc2e112 → 0.10.0
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/PLUGIN.mdl +18 -24
- package/dist/lib/neutral/{AgentArticle-2BEPWUMN.mjs → AgentArticle-GV6EEW3I.mjs} +1 -2
- package/dist/lib/neutral/AgentArticle-GV6EEW3I.mjs.map +7 -0
- package/dist/lib/neutral/AssistantPlugin.mjs +1 -1
- package/dist/lib/neutral/AssistantPlugin.node.mjs +6 -6
- package/dist/lib/neutral/AssistantPlugin.node.mjs.map +3 -3
- package/dist/lib/neutral/AssistantPlugin.workerd.mjs +7 -34
- package/dist/lib/neutral/AssistantPlugin.workerd.mjs.map +4 -4
- package/dist/lib/neutral/AssistantSettings-3N5M5VCN.mjs +302 -0
- package/dist/lib/neutral/AssistantSettings-3N5M5VCN.mjs.map +7 -0
- package/dist/lib/neutral/{ChatArticle-KT46SUFU.mjs → ChatArticle-OO7GGEFW.mjs} +2 -2
- package/dist/lib/neutral/{ChatCompanion-YHC43RYQ.mjs → ChatCompanion-GIFJRY6I.mjs} +27 -27
- package/dist/lib/neutral/ChatCompanion-GIFJRY6I.mjs.map +7 -0
- package/dist/lib/neutral/{ChatDialog-YZDZLIQA.mjs → ChatDialog-5MXN4MXS.mjs} +5 -5
- package/dist/lib/neutral/ChatDialog-5MXN4MXS.mjs.map +7 -0
- package/dist/lib/neutral/IntegrationPrompt-2HJQFYJE.mjs +72 -0
- package/dist/lib/neutral/IntegrationPrompt-2HJQFYJE.mjs.map +7 -0
- package/dist/lib/neutral/{SpaceHomePrompt-HTWQKLGI.mjs → SpaceHomePrompt-ISAB76LD.mjs} +8 -7
- package/dist/lib/neutral/SpaceHomePrompt-ISAB76LD.mjs.map +7 -0
- package/dist/lib/neutral/SpaceHomeSuggestions-IDH77QQR.mjs +63 -0
- package/dist/lib/neutral/SpaceHomeSuggestions-IDH77QQR.mjs.map +7 -0
- package/dist/lib/neutral/{TracePanel-T552TAOH.mjs → TracePanel-JKNWADJ4.mjs} +2 -2
- package/dist/lib/neutral/{TriggerStatus-RBOHHDOK.mjs → TriggerStatus-FURRBHYA.mjs} +7 -5
- package/dist/lib/neutral/TriggerStatus-FURRBHYA.mjs.map +7 -0
- package/dist/lib/neutral/{agent-hydrator-PJBYVMBW.mjs → agent-hydrator-OBO3RHLO.mjs} +3 -4
- package/dist/lib/neutral/agent-hydrator-OBO3RHLO.mjs.map +7 -0
- package/dist/lib/neutral/{agent-service-WV5CSHAG.mjs → agent-service-XFJ4VQMT.mjs} +7 -9
- package/dist/lib/neutral/agent-service-XFJ4VQMT.mjs.map +7 -0
- package/dist/lib/neutral/ai-context-LIKJYMIN.mjs +14 -0
- package/dist/lib/neutral/ai-context-LIKJYMIN.mjs.map +7 -0
- package/dist/lib/neutral/{ai-service-AADUIKBY.mjs → ai-service-DM6YXWUC.mjs} +9 -5
- package/dist/lib/neutral/ai-service-DM6YXWUC.mjs.map +7 -0
- package/dist/lib/neutral/{app-graph-builder-PTSRZXRN.mjs → app-graph-builder-OPVOEQY7.mjs} +36 -19
- package/dist/lib/neutral/app-graph-builder-OPVOEQY7.mjs.map +7 -0
- package/dist/lib/neutral/automation-templates-MADJLXGJ.mjs +97 -0
- package/dist/lib/neutral/automation-templates-MADJLXGJ.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +20 -18
- package/dist/lib/neutral/capabilities/index.mjs.map +3 -3
- package/dist/lib/neutral/{chunk-KLYLW4WH.mjs → chunk-5IHQ52KJ.mjs} +1 -1
- package/dist/lib/neutral/chunk-5IHQ52KJ.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-5KB2WRI2.mjs → chunk-6Q4OBGIK.mjs} +83 -55
- package/dist/lib/neutral/chunk-6Q4OBGIK.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-54W7N6M6.mjs → chunk-BXI2R4OO.mjs} +49 -84
- package/dist/lib/neutral/chunk-BXI2R4OO.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-5H6UJHLF.mjs → chunk-CMPLPDYE.mjs} +12 -12
- package/dist/lib/neutral/chunk-CMPLPDYE.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GPHT3HYS.mjs +8 -0
- package/dist/lib/neutral/{chunk-7FQT4XMI.mjs.map → chunk-GPHT3HYS.mjs.map} +2 -2
- package/dist/lib/neutral/{markdown-extension-IJ5RQMQ4.mjs → chunk-HKLSFB5I.mjs} +2 -38
- package/dist/lib/neutral/chunk-HKLSFB5I.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-ZNDQVYUN.mjs → chunk-L7AR4VTA.mjs} +3 -3
- package/dist/lib/neutral/{chunk-ZNDQVYUN.mjs.map → chunk-L7AR4VTA.mjs.map} +1 -1
- package/dist/lib/neutral/chunk-LS72HWMM.mjs +42 -0
- package/dist/lib/neutral/chunk-LS72HWMM.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-35EL65O4.mjs → chunk-OZWZGIV2.mjs} +4 -2
- package/dist/lib/neutral/{chunk-35EL65O4.mjs.map → chunk-OZWZGIV2.mjs.map} +3 -3
- package/dist/lib/neutral/{toolkit-GVWXPDLJ.mjs → chunk-QOKLFHUS.mjs} +3 -4
- package/dist/lib/neutral/{toolkit-GVWXPDLJ.mjs.map → chunk-QOKLFHUS.mjs.map} +1 -1
- package/dist/lib/neutral/{chunk-5LKNH7FD.mjs → chunk-SCTHQVIJ.mjs} +8 -5
- package/dist/lib/neutral/{chunk-5LKNH7FD.mjs.map → chunk-SCTHQVIJ.mjs.map} +3 -3
- package/dist/lib/neutral/chunk-U4LTLBAX.mjs +56 -0
- package/dist/lib/neutral/chunk-U4LTLBAX.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-H77JTXAN.mjs → chunk-UPKFUZ6V.mjs} +7 -10
- package/dist/lib/neutral/chunk-UPKFUZ6V.mjs.map +7 -0
- package/dist/lib/neutral/{operation-handler-SF36MOB5.mjs → chunk-V2Y4XE3O.mjs} +3 -4
- package/dist/lib/neutral/{operation-handler-SF36MOB5.mjs.map → chunk-V2Y4XE3O.mjs.map} +1 -1
- package/dist/lib/neutral/chunk-VTK5R4H3.mjs +9 -0
- package/dist/lib/neutral/chunk-VTK5R4H3.mjs.map +7 -0
- package/dist/lib/neutral/chunk-XVGEJWJX.mjs +133 -0
- package/dist/lib/neutral/chunk-XVGEJWJX.mjs.map +7 -0
- package/dist/lib/neutral/{companion-chat-provisioner-YZZ73P6E.mjs → companion-chat-provisioner-IQV5VIVE.mjs} +14 -8
- package/dist/lib/neutral/companion-chat-provisioner-IQV5VIVE.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +509 -579
- package/dist/lib/neutral/components/index.mjs.map +4 -4
- package/dist/lib/neutral/{integration-provider-RBD3AFJU.mjs → connector-ITLLTBPZ.mjs} +13 -14
- package/dist/lib/neutral/connector-ITLLTBPZ.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +12 -14
- package/dist/lib/neutral/containers/index.mjs.map +3 -3
- package/dist/lib/neutral/{create-chat-Z3FNA6OJ.mjs → create-chat-YGVZZYGP.mjs} +18 -16
- package/dist/lib/neutral/create-chat-YGVZZYGP.mjs.map +7 -0
- package/dist/lib/neutral/{create-object-BJUDDKQQ.mjs → create-object-5PAEJ6KM.mjs} +11 -27
- package/dist/lib/neutral/create-object-5PAEJ6KM.mjs.map +7 -0
- package/dist/lib/neutral/{edge-model-resolver-BBVOJBGJ.mjs → edge-model-resolver-WDJWDZTT.mjs} +2 -2
- package/dist/lib/neutral/execution-graph/index.mjs +182 -64
- package/dist/lib/neutral/execution-graph/index.mjs.map +3 -3
- package/dist/lib/neutral/extensions/index.mjs +8 -0
- package/dist/lib/neutral/{fork-chat-UYXYT6BT.mjs → fork-chat-RMAAYYQF.mjs} +15 -18
- package/dist/lib/neutral/fork-chat-RMAAYYQF.mjs.map +7 -0
- package/dist/lib/neutral/generate-home-suggestions-6MM2XWPV.mjs +93 -0
- package/dist/lib/neutral/generate-home-suggestions-6MM2XWPV.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +195 -105
- package/dist/lib/neutral/hooks/index.mjs.map +4 -4
- package/dist/lib/neutral/index.mjs +14 -10
- package/dist/lib/neutral/markdown-extension-R4TKDTIF.mjs +41 -0
- package/dist/lib/neutral/markdown-extension-R4TKDTIF.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/navigation-resolver-PYGP2DAW.mjs +18 -0
- package/dist/lib/neutral/navigation-resolver-PYGP2DAW.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-2LEN45GP.mjs +8 -0
- package/dist/lib/neutral/operation-handler-2LEN45GP.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +2 -2
- package/dist/lib/neutral/plugin.workerd.mjs +13 -0
- package/dist/lib/neutral/plugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/{react-surface-ES7UHZ65.mjs → react-surface-HEJEK44F.mjs} +20 -35
- package/dist/lib/neutral/react-surface-HEJEK44F.mjs.map +7 -0
- package/dist/lib/neutral/resolve-navigation-targets-PBQ3OLUE.mjs +28 -0
- package/dist/lib/neutral/resolve-navigation-targets-PBQ3OLUE.mjs.map +7 -0
- package/dist/lib/neutral/{run-prompt-in-new-chat-NIAGCKQV.mjs → run-prompt-in-new-chat-RNUJE2FM.mjs} +28 -31
- package/dist/lib/neutral/run-prompt-in-new-chat-RNUJE2FM.mjs.map +7 -0
- package/dist/lib/neutral/skill-definition-553MQRTR.mjs +8 -0
- package/dist/lib/neutral/skill-definition-553MQRTR.mjs.map +7 -0
- package/dist/lib/neutral/skills/index.mjs +8 -0
- package/dist/lib/neutral/skills/index.mjs.map +7 -0
- package/dist/lib/neutral/{state-XO2UYSSG.mjs → state-4LGAKSSD.mjs} +8 -2
- package/dist/lib/neutral/{state-XO2UYSSG.mjs.map → state-4LGAKSSD.mjs.map} +3 -3
- package/dist/lib/neutral/testing.mjs +1 -1
- package/dist/lib/neutral/toolkit-ETWLG5NT.mjs +8 -0
- package/dist/lib/neutral/toolkit-ETWLG5NT.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +64 -33
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +5 -1
- package/dist/lib/neutral/{update-chat-name-Y7JWIP64.mjs → update-chat-name-IJJELRR6.mjs} +3 -3
- package/dist/lib/neutral/{update-chat-name-Y7JWIP64.mjs.map → update-chat-name-IJJELRR6.mjs.map} +2 -2
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/AssistantPlugin.workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/agent-hydrator.d.ts +1 -1
- package/dist/types/src/capabilities/agent-service.d.ts +1 -2
- package/dist/types/src/capabilities/agent-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-context.d.ts +1 -2
- package/dist/types/src/capabilities/ai-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -3
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/automation-templates.d.ts +1 -2
- package/dist/types/src/capabilities/automation-templates.d.ts.map +1 -1
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +1 -1
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -1
- package/dist/types/src/capabilities/{integration-provider.d.ts → connector.d.ts} +2 -2
- package/dist/types/src/capabilities/connector.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +1 -27
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +3 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown-extension.d.ts +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +1 -2
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/skill-definition.d.ts +5 -0
- package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts +1 -17
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +1 -2
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
- package/dist/types/src/components/AgentProperties/AgentProperties.stories.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +4 -5
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +0 -4
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +2 -2
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +2 -2
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +5 -5
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/useChatVoiceInput.d.ts +9 -0
- package/dist/types/src/components/ChatPrompt/useChatVoiceInput.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +4 -4
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +2 -2
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts +2 -2
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/SurfaceWidget.d.ts +11 -0
- package/dist/types/src/components/ChatThread/widgets/SurfaceWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts +1 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -1
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts +2 -2
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +3 -3
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +1 -1
- package/dist/types/src/constants.d.ts.map +1 -1
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts +2 -2
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -1
- package/dist/types/src/{components → containers}/AssistantSettings/AssistantSettings.d.ts +1 -1
- package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -1
- package/dist/types/src/containers/AssistantSettings/OllamaModels.d.ts +12 -0
- package/dist/types/src/containers/AssistantSettings/OllamaModels.d.ts.map +1 -0
- package/dist/types/src/{components/TemplateEditor/TemplateEditor.stories.d.ts → containers/AssistantSettings/OllamaModels.stories.d.ts} +9 -7
- package/dist/types/src/containers/AssistantSettings/OllamaModels.stories.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/AssistantSettings/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts +2 -9
- package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +3 -10
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/containers/IntegrationPrompt/IntegrationPrompt.d.ts +13 -0
- package/dist/types/src/containers/IntegrationPrompt/IntegrationPrompt.d.ts.map +1 -0
- package/dist/types/src/containers/IntegrationPrompt/index.d.ts +2 -0
- package/dist/types/src/{components/RoutineProperties → containers/IntegrationPrompt}/index.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomePrompt/SpaceHomePrompt.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.d.ts +1 -1
- package/dist/types/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts +1 -1
- package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts.map +1 -1
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +2 -3
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts +2 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -1
- package/dist/types/src/execution-graph/index.d.ts +3 -3
- package/dist/types/src/execution-graph/index.d.ts.map +1 -1
- package/dist/types/src/execution-graph/span-tree.d.ts +13 -0
- package/dist/types/src/execution-graph/span-tree.d.ts.map +1 -1
- package/dist/types/src/extensions/index.d.ts +1 -1
- package/dist/types/src/extensions/index.d.ts.map +1 -1
- package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -2
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- package/dist/types/src/hooks/useHomeSuggestions.d.ts +8 -0
- package/dist/types/src/hooks/useHomeSuggestions.d.ts.map +1 -0
- package/dist/types/src/hooks/usePresets.d.ts +6 -2
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
- package/dist/types/src/hooks/useSkillRegistry.d.ts +21 -0
- package/dist/types/src/hooks/useSkillRegistry.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +4 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-chat.d.ts.map +1 -1
- package/dist/types/src/operations/fork-chat.d.ts.map +1 -1
- package/dist/types/src/operations/generate-home-suggestions.d.ts +5 -0
- package/dist/types/src/operations/generate-home-suggestions.d.ts.map +1 -0
- package/dist/types/src/operations/generate-home-suggestions.test.d.ts +2 -0
- package/dist/types/src/operations/generate-home-suggestions.test.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/resolve-navigation-targets.d.ts +3 -15
- package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -1
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +2 -2
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -1
- package/dist/types/src/paths.d.ts +1 -1
- package/dist/types/src/paths.d.ts.map +1 -1
- package/dist/types/src/plugin.workerd.d.ts +2 -0
- package/dist/types/src/plugin.workerd.d.ts.map +1 -0
- package/dist/types/src/processor/presets.d.ts +20 -9
- package/dist/types/src/processor/presets.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +10 -209
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/skills/assistant/index.d.ts +2 -0
- package/dist/types/src/skills/assistant/index.d.ts.map +1 -0
- package/dist/types/src/skills/assistant/skill.d.ts +4 -0
- package/dist/types/src/skills/assistant/skill.d.ts.map +1 -0
- package/dist/types/src/skills/assistant/skill.node.test.d.ts +2 -0
- package/dist/types/src/skills/assistant/skill.node.test.d.ts.map +1 -0
- package/dist/types/src/skills/index.d.ts.map +1 -0
- package/dist/types/src/templates/daily-digest.d.ts +2 -2
- package/dist/types/src/templates/daily-digest.d.ts.map +1 -1
- package/dist/types/src/templates/index.d.ts +3 -3
- package/dist/types/src/templates/index.d.ts.map +1 -1
- package/dist/types/src/templates/research-brief.d.ts +2 -2
- package/dist/types/src/templates/research-brief.d.ts.map +1 -1
- package/dist/types/src/templates/routine-templates.test.d.ts +2 -0
- package/dist/types/src/templates/routine-templates.test.d.ts.map +1 -0
- package/dist/types/src/templates/scaffold.d.ts +9 -9
- package/dist/types/src/templates/scaffold.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-sequence.d.ts +1 -8
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/testing/test-trace.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +5 -12
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/AssistantCapabilities.d.ts +21 -0
- package/dist/types/src/types/AssistantCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/AssistantOperation.d.ts +17 -110
- package/dist/types/src/types/AssistantOperation.d.ts.map +1 -1
- package/dist/types/src/types/ChatSurface.d.ts +12 -0
- package/dist/types/src/types/ChatSurface.d.ts.map +1 -0
- package/dist/types/src/types/Ollama.d.ts +44 -0
- package/dist/types/src/types/Ollama.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +5 -4
- package/dist/types/src/types/Settings.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +4 -3
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/src/util/suggestions.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +2 -2
- package/package.json +102 -90
- package/src/AssistantPlugin.conversations.json +1 -1
- package/src/AssistantPlugin.node.ts +5 -5
- package/src/AssistantPlugin.test.ts +26 -40
- package/src/AssistantPlugin.ts +12 -10
- package/src/AssistantPlugin.workerd.ts +15 -6
- package/src/capabilities/agent-hydrator.ts +1 -2
- package/src/capabilities/agent-service.ts +5 -7
- package/src/capabilities/ai-context.ts +7 -32
- package/src/capabilities/ai-service.ts +3 -2
- package/src/capabilities/app-graph-builder.ts +38 -18
- package/src/capabilities/automation-templates.ts +3 -3
- package/src/capabilities/companion-chat-provisioner.ts +22 -6
- package/src/capabilities/{integration-provider.ts → connector.ts} +7 -12
- package/src/capabilities/create-object.ts +9 -26
- package/src/capabilities/index.ts +3 -5
- package/src/capabilities/markdown-extension.ts +2 -3
- package/src/capabilities/navigation-resolver.ts +20 -0
- package/src/capabilities/react-surface.tsx +21 -33
- package/src/capabilities/skill-definition.ts +72 -0
- package/src/capabilities/state.ts +7 -0
- package/src/components/AgentProperties/AgentProperties.stories.tsx +1 -2
- package/src/components/Chat/Chat.tsx +28 -10
- package/src/components/Chat/events.ts +0 -6
- package/src/components/ChatPrompt/ChatActions.tsx +181 -18
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +3 -3
- package/src/components/ChatPrompt/ChatOptions.tsx +17 -21
- package/src/components/ChatPrompt/ChatPrompt.tsx +30 -46
- package/src/components/ChatPrompt/useChatVoiceInput.ts +103 -0
- package/src/components/ChatThread/ChatThread.stories.tsx +7 -16
- package/src/components/ChatThread/MarkdownStream.stories.tsx +3 -3
- package/src/components/ChatThread/registry.tsx +43 -17
- package/src/components/ChatThread/widgets/ReasoningWidget.stories.tsx +2 -2
- package/src/components/ChatThread/widgets/SurfaceWidget.tsx +41 -0
- package/src/components/ChatThread/widgets/index.ts +1 -0
- package/src/components/ProcessTree/ProcessTree.tsx +2 -10
- package/src/components/TaskList/TaskList.stories.tsx +2 -2
- package/src/components/TaskList/TaskList.tsx +2 -2
- package/src/components/Toolbox/Toolbox.tsx +11 -11
- package/src/components/index.ts +0 -6
- package/src/constants.ts +1 -1
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +8 -9
- package/src/containers/AgentArticle/AgentArticle.tsx +1 -1
- package/src/{components → containers}/AssistantSettings/AssistantSettings.stories.tsx +3 -2
- package/src/containers/AssistantSettings/AssistantSettings.tsx +90 -0
- package/src/containers/AssistantSettings/OllamaModels.stories.tsx +108 -0
- package/src/containers/AssistantSettings/OllamaModels.tsx +255 -0
- package/src/containers/ChatArticle/ChatArticle.stories.tsx +3 -3
- package/src/containers/ChatArticle/ChatArticle.tsx +8 -19
- package/src/containers/ChatCompanion/ChatCompanion.tsx +26 -26
- package/src/containers/ChatDialog/ChatDialog.tsx +5 -4
- package/src/containers/IntegrationPrompt/IntegrationPrompt.tsx +79 -0
- package/src/containers/IntegrationPrompt/index.ts +5 -0
- package/src/containers/SpaceHomePrompt/SpaceHomePrompt.tsx +8 -6
- package/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.tsx +46 -32
- package/src/containers/TracePanel/TracePanel.stories.tsx +89 -47
- package/src/containers/TracePanel/TracePanel.tsx +13 -8
- package/src/containers/TracePanel/dxn-extractor.test.ts +2 -2
- package/src/containers/TriggerStatus/TriggerStatus.tsx +8 -4
- package/src/containers/index.ts +2 -3
- package/src/execution-graph/SPEC.md +1 -1
- package/src/execution-graph/execution-graph.test.ts +213 -25
- package/src/execution-graph/execution-graph.ts +209 -72
- package/src/execution-graph/index.ts +8 -8
- package/src/execution-graph/span-tree.test.ts +33 -1
- package/src/execution-graph/span-tree.ts +43 -2
- package/src/execution-graph/sub-agent-delegation.test.ts +19 -19
- package/src/extensions/index.ts +1 -1
- package/src/extensions/prompt-extension.ts +1 -1
- package/src/feed-logger.ts +4 -4
- package/src/functions/services.test.ts +4 -4
- package/src/hooks/index.ts +2 -2
- package/src/hooks/useChatProcessor.ts +12 -16
- package/src/hooks/useContextBinder.ts +2 -4
- package/src/hooks/useDebug.ts +2 -2
- package/src/hooks/useHomeSuggestions.ts +55 -0
- package/src/hooks/usePresets.ts +80 -11
- package/src/hooks/useProcessEphemeralStatus.ts +1 -1
- package/src/hooks/useReferencesProvider.ts +1 -1
- package/src/hooks/useSkillRegistry.ts +125 -0
- package/src/index.ts +1 -1
- package/src/operations/create-chat.ts +11 -12
- package/src/operations/fork-chat.ts +14 -19
- package/src/operations/generate-home-suggestions.test.ts +103 -0
- package/src/operations/generate-home-suggestions.ts +116 -0
- package/src/operations/index.ts +1 -0
- package/src/operations/prompt.node.test.ts +14 -17
- package/src/operations/resolve-navigation-targets.ts +32 -19
- package/src/operations/run-prompt-in-new-chat.ts +30 -33
- package/src/operations/update-chat-name.ts +2 -2
- package/src/paths.ts +4 -2
- package/src/plugin.workerd.ts +5 -0
- package/src/processor/presets.ts +38 -61
- package/src/processor/processor.node.test.ts +1 -1
- package/src/processor/processor.ts +34 -20
- package/src/skills/assistant/index.ts +5 -0
- package/src/{blueprints/assistant/blueprint.node.test.ts → skills/assistant/skill.node.test.ts} +8 -8
- package/src/{blueprints/assistant/blueprint.ts → skills/assistant/skill.ts} +9 -9
- package/src/templates/daily-digest.ts +10 -12
- package/src/templates/index.ts +3 -3
- package/src/templates/research-brief.ts +15 -13
- package/src/templates/routine-templates.test.ts +55 -0
- package/src/templates/scaffold.ts +22 -57
- package/src/testing/data/trace-timeline-multiple.dx.json +1 -1
- package/src/testing/data/trace-timeline-remote.dx.json +1 -1
- package/src/testing/data/trace-timeline.dx.json +3430 -1092
- package/src/testing/test-generator.test.ts +26 -22
- package/src/testing/test-generator.ts +4 -8
- package/src/testing/test-trace.ts +2 -1
- package/src/testing/trace-timeline.node.test.ts +14 -14
- package/src/translations.ts +68 -33
- package/src/types/Assistant.ts +3 -1
- package/src/types/AssistantCapabilities.ts +21 -0
- package/src/types/AssistantOperation.ts +21 -32
- package/src/types/ChatSurface.ts +16 -0
- package/src/types/Ollama.ts +59 -0
- package/src/types/Settings.ts +12 -10
- package/src/types/index.ts +3 -0
- package/src/types/service.ts +14 -14
- package/src/util/suggestions.ts +1 -1
- package/dist/lib/neutral/AgentArticle-2BEPWUMN.mjs.map +0 -7
- package/dist/lib/neutral/AssistantSettings-7ALY4BMS.mjs +0 -40
- package/dist/lib/neutral/AssistantSettings-7ALY4BMS.mjs.map +0 -7
- package/dist/lib/neutral/BlueprintArticle-ZBOZNZM7.mjs +0 -27
- package/dist/lib/neutral/BlueprintArticle-ZBOZNZM7.mjs.map +0 -7
- package/dist/lib/neutral/ChatCompanion-YHC43RYQ.mjs.map +0 -7
- package/dist/lib/neutral/ChatDialog-YZDZLIQA.mjs.map +0 -7
- package/dist/lib/neutral/RoutineArticle-FK5BXQN5.mjs +0 -119
- package/dist/lib/neutral/RoutineArticle-FK5BXQN5.mjs.map +0 -7
- package/dist/lib/neutral/RoutineList-SO5ETHNT.mjs +0 -48
- package/dist/lib/neutral/RoutineList-SO5ETHNT.mjs.map +0 -7
- package/dist/lib/neutral/RoutineProperties-FISLMW2R.mjs +0 -17
- package/dist/lib/neutral/RoutineProperties-FISLMW2R.mjs.map +0 -7
- package/dist/lib/neutral/SpaceHomePrompt-HTWQKLGI.mjs.map +0 -7
- package/dist/lib/neutral/SpaceHomeSuggestions-6G4E7GNJ.mjs +0 -50
- package/dist/lib/neutral/SpaceHomeSuggestions-6G4E7GNJ.mjs.map +0 -7
- package/dist/lib/neutral/TriggerStatus-RBOHHDOK.mjs.map +0 -7
- package/dist/lib/neutral/agent-hydrator-PJBYVMBW.mjs.map +0 -7
- package/dist/lib/neutral/agent-service-WV5CSHAG.mjs.map +0 -7
- package/dist/lib/neutral/ai-context-7WRHWYXY.mjs +0 -42
- package/dist/lib/neutral/ai-context-7WRHWYXY.mjs.map +0 -7
- package/dist/lib/neutral/ai-service-AADUIKBY.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-PTSRZXRN.mjs.map +0 -7
- package/dist/lib/neutral/automation-templates-M2XQWGR6.mjs +0 -115
- package/dist/lib/neutral/automation-templates-M2XQWGR6.mjs.map +0 -7
- package/dist/lib/neutral/blueprint-definition-2XPYI35X.mjs +0 -40
- package/dist/lib/neutral/blueprint-definition-2XPYI35X.mjs.map +0 -7
- package/dist/lib/neutral/blueprints/index.mjs +0 -8
- package/dist/lib/neutral/chunk-54W7N6M6.mjs.map +0 -7
- package/dist/lib/neutral/chunk-5H6UJHLF.mjs.map +0 -7
- package/dist/lib/neutral/chunk-5KB2WRI2.mjs.map +0 -7
- package/dist/lib/neutral/chunk-7FQT4XMI.mjs +0 -8
- package/dist/lib/neutral/chunk-H77JTXAN.mjs.map +0 -7
- package/dist/lib/neutral/chunk-IQZJ5TTM.mjs +0 -130
- package/dist/lib/neutral/chunk-IQZJ5TTM.mjs.map +0 -7
- package/dist/lib/neutral/chunk-KLYLW4WH.mjs.map +0 -7
- package/dist/lib/neutral/companion-chat-provisioner-YZZ73P6E.mjs.map +0 -7
- package/dist/lib/neutral/create-chat-Z3FNA6OJ.mjs.map +0 -7
- package/dist/lib/neutral/create-object-BJUDDKQQ.mjs.map +0 -7
- package/dist/lib/neutral/fork-chat-UYXYT6BT.mjs.map +0 -7
- package/dist/lib/neutral/integration-provider-RBD3AFJU.mjs.map +0 -7
- package/dist/lib/neutral/markdown-extension-IJ5RQMQ4.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-ES7UHZ65.mjs.map +0 -7
- package/dist/lib/neutral/resolve-navigation-targets-ZHIMMH7L.mjs +0 -22
- package/dist/lib/neutral/resolve-navigation-targets-ZHIMMH7L.mjs.map +0 -7
- package/dist/lib/neutral/run-prompt-in-new-chat-NIAGCKQV.mjs.map +0 -7
- package/dist/types/src/blueprints/assistant/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/assistant/blueprint.node.test.d.ts +0 -2
- package/dist/types/src/blueprints/assistant/blueprint.node.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/assistant/index.d.ts +0 -2
- package/dist/types/src/blueprints/assistant/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -5
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/integration-provider.d.ts.map +0 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +0 -1
- package/dist/types/src/components/RoutineProperties/RoutineProperties.d.ts +0 -7
- package/dist/types/src/components/RoutineProperties/RoutineProperties.d.ts.map +0 -1
- package/dist/types/src/components/RoutineProperties/RoutineProperties.stories.d.ts +0 -15
- package/dist/types/src/components/RoutineProperties/RoutineProperties.stories.d.ts.map +0 -1
- package/dist/types/src/components/RoutineProperties/index.d.ts +0 -2
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +0 -13
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +0 -21
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +0 -16
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts +0 -12
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts +0 -3
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts +0 -8
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/index.d.ts +0 -2
- package/dist/types/src/components/TemplateEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/types.d.ts +0 -18
- package/dist/types/src/components/TemplateEditor/types.d.ts.map +0 -1
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +0 -6
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +0 -1
- package/dist/types/src/containers/BlueprintArticle/index.d.ts +0 -2
- package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +0 -1
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +0 -6
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +0 -1
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts +0 -15
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts.map +0 -1
- package/dist/types/src/containers/RoutineArticle/index.d.ts +0 -2
- package/dist/types/src/containers/RoutineArticle/index.d.ts.map +0 -1
- package/dist/types/src/containers/RoutineList/RoutineList.d.ts +0 -6
- package/dist/types/src/containers/RoutineList/RoutineList.d.ts.map +0 -1
- package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts +0 -21
- package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts.map +0 -1
- package/dist/types/src/containers/RoutineList/index.d.ts +0 -2
- package/dist/types/src/containers/RoutineList/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +0 -66
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +0 -1
- package/dist/types/src/hooks/useOnline.d.ts +0 -3
- package/dist/types/src/hooks/useOnline.d.ts.map +0 -1
- package/dist/types/src/templates/automation-templates.test.d.ts +0 -2
- package/dist/types/src/templates/automation-templates.test.d.ts.map +0 -1
- package/src/blueprints/assistant/index.ts +0 -5
- package/src/capabilities/blueprint-definition.ts +0 -67
- package/src/components/AssistantSettings/AssistantSettings.tsx +0 -43
- package/src/components/RoutineProperties/RoutineProperties.stories.tsx +0 -59
- package/src/components/RoutineProperties/RoutineProperties.tsx +0 -23
- package/src/components/RoutineProperties/index.ts +0 -5
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +0 -95
- package/src/components/TemplateEditor/TemplateEditor.tsx +0 -80
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +0 -76
- package/src/components/TemplateEditor/TemplateForm.tsx +0 -204
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +0 -274
- package/src/components/TemplateEditor/extensions/index.ts +0 -6
- package/src/components/TemplateEditor/extensions/xml-extension.ts +0 -64
- package/src/components/TemplateEditor/index.ts +0 -5
- package/src/components/TemplateEditor/types.tsx +0 -28
- package/src/containers/BlueprintArticle/BlueprintArticle.tsx +0 -29
- package/src/containers/BlueprintArticle/index.ts +0 -5
- package/src/containers/RoutineArticle/RoutineArticle.stories.tsx +0 -75
- package/src/containers/RoutineArticle/RoutineArticle.tsx +0 -109
- package/src/containers/RoutineArticle/index.ts +0 -5
- package/src/containers/RoutineList/RoutineList.stories.tsx +0 -130
- package/src/containers/RoutineList/RoutineList.tsx +0 -50
- package/src/containers/RoutineList/index.ts +0 -5
- package/src/hooks/useBlueprintRegistry.ts +0 -125
- package/src/hooks/useOnline.ts +0 -10
- package/src/templates/automation-templates.test.ts +0 -66
- /package/dist/lib/neutral/{ChatArticle-KT46SUFU.mjs.map → ChatArticle-OO7GGEFW.mjs.map} +0 -0
- /package/dist/lib/neutral/{TracePanel-T552TAOH.mjs.map → TracePanel-JKNWADJ4.mjs.map} +0 -0
- /package/dist/lib/neutral/{edge-model-resolver-BBVOJBGJ.mjs.map → edge-model-resolver-WDJWDZTT.mjs.map} +0 -0
- /package/dist/lib/neutral/{blueprints → extensions}/index.mjs.map +0 -0
- /package/dist/types/src/{components → containers}/AssistantSettings/AssistantSettings.stories.d.ts +0 -0
- /package/dist/types/src/{components → containers}/AssistantSettings/index.d.ts +0 -0
- /package/dist/types/src/{blueprints → skills}/index.d.ts +0 -0
- /package/src/{components → containers}/AssistantSettings/index.ts +0 -0
- /package/src/{blueprints → skills}/index.ts +0 -0
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
// TODO(burdon): Factor out (shared with backend). core/chain (@dxos/chain).
|
|
6
|
-
// TODO(burdon): Agent/plan-and-execute (with tools). Create design doc/ontology of sequence/agent.
|
|
7
|
-
|
|
8
|
-
export type Step = {
|
|
9
|
-
id: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type Variable = {
|
|
13
|
-
name: string;
|
|
14
|
-
type: 'value' | 'function' | 'query' | 'retriever' | 'pass-through';
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export type Prompt = Step & {
|
|
18
|
-
title?: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
template: string;
|
|
21
|
-
variables: Variable[];
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type Sequence = Step & {
|
|
25
|
-
runnable: Step[];
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export type Chain = {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
8
|
-
import { type Blueprint } from '@dxos/compute';
|
|
9
|
-
import { Panel, Toolbar } from '@dxos/react-ui';
|
|
10
|
-
import { useAttention } from '@dxos/react-ui-attention';
|
|
11
|
-
|
|
12
|
-
import { TemplateEditor } from '#components';
|
|
13
|
-
|
|
14
|
-
export type BlueprintArticleProps = AppSurface.ObjectArticleProps<Blueprint.Blueprint>;
|
|
15
|
-
|
|
16
|
-
export const BlueprintArticle = ({ role, attendableId, subject }: BlueprintArticleProps) => {
|
|
17
|
-
const { hasAttention } = useAttention(attendableId);
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<Panel.Root role={role} classNames='dx-document'>
|
|
21
|
-
<Panel.Toolbar asChild>
|
|
22
|
-
<Toolbar.Root disabled={!hasAttention} />
|
|
23
|
-
</Panel.Toolbar>
|
|
24
|
-
<Panel.Content asChild>
|
|
25
|
-
<TemplateEditor id={subject.id} source={subject.instructions.source} />
|
|
26
|
-
</Panel.Content>
|
|
27
|
-
</Panel.Root>
|
|
28
|
-
);
|
|
29
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2026 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
-
import * as Effect from 'effect/Effect';
|
|
7
|
-
import React from 'react';
|
|
8
|
-
|
|
9
|
-
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
-
import { Routine } from '@dxos/compute';
|
|
11
|
-
import { Filter } from '@dxos/echo';
|
|
12
|
-
import { AutomationPlugin } from '@dxos/plugin-automation/testing';
|
|
13
|
-
import { ClientPlugin } from '@dxos/plugin-client/testing';
|
|
14
|
-
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
15
|
-
import { corePlugins } from '@dxos/plugin-testing';
|
|
16
|
-
import { useQuery, useSpaces } from '@dxos/react-client/echo';
|
|
17
|
-
import { Loading, withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
18
|
-
|
|
19
|
-
import { translations } from '#translations';
|
|
20
|
-
|
|
21
|
-
import { AssistantPlugin } from '../../AssistantPlugin';
|
|
22
|
-
import { RoutineArticle } from './RoutineArticle';
|
|
23
|
-
|
|
24
|
-
const DefaultStory = () => {
|
|
25
|
-
const [space] = useSpaces();
|
|
26
|
-
const [routine] = useQuery(space?.db, Filter.type(Routine.Routine));
|
|
27
|
-
if (!routine) {
|
|
28
|
-
return <Loading />;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return <RoutineArticle role='article' subject={routine} attendableId='story' />;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const meta = {
|
|
35
|
-
title: 'plugins/plugin-assistant/containers/RoutineArticle',
|
|
36
|
-
render: DefaultStory,
|
|
37
|
-
decorators: [
|
|
38
|
-
withTheme(),
|
|
39
|
-
withLayout({ layout: 'column' }),
|
|
40
|
-
withPluginManager({
|
|
41
|
-
plugins: [
|
|
42
|
-
...corePlugins(),
|
|
43
|
-
ClientPlugin({
|
|
44
|
-
types: [Routine.Routine],
|
|
45
|
-
onClientInitialized: ({ client }) =>
|
|
46
|
-
Effect.gen(function* () {
|
|
47
|
-
yield* initializeIdentity(client);
|
|
48
|
-
const [space] = client.spaces.get();
|
|
49
|
-
yield* Effect.promise(() => space.waitUntilReady());
|
|
50
|
-
|
|
51
|
-
space.db.add(
|
|
52
|
-
Routine.make({
|
|
53
|
-
name: 'Summarize',
|
|
54
|
-
description: 'Summarize the selected object.',
|
|
55
|
-
instructions: 'Create a new markdown document that is a summary of the selected object.',
|
|
56
|
-
}),
|
|
57
|
-
);
|
|
58
|
-
}),
|
|
59
|
-
}),
|
|
60
|
-
AutomationPlugin(),
|
|
61
|
-
AssistantPlugin(),
|
|
62
|
-
],
|
|
63
|
-
}),
|
|
64
|
-
],
|
|
65
|
-
parameters: {
|
|
66
|
-
layout: 'fullscreen',
|
|
67
|
-
translations,
|
|
68
|
-
},
|
|
69
|
-
} satisfies Meta<typeof DefaultStory>;
|
|
70
|
-
|
|
71
|
-
export default meta;
|
|
72
|
-
|
|
73
|
-
type Story = StoryObj<typeof meta>;
|
|
74
|
-
|
|
75
|
-
export const Default: Story = {};
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
import { useSpaceCallback } from '@dxos/app-framework/ui';
|
|
8
|
-
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
9
|
-
import { AgentPrompt } from '@dxos/assistant-toolkit';
|
|
10
|
-
import { Operation, type Routine } from '@dxos/compute';
|
|
11
|
-
import { Database, Feed, Obj } from '@dxos/echo';
|
|
12
|
-
import { invariant } from '@dxos/invariant';
|
|
13
|
-
import { Panel, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
14
|
-
import { useAttention } from '@dxos/react-ui-attention';
|
|
15
|
-
import { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
16
|
-
|
|
17
|
-
import { TemplateEditor } from '#components';
|
|
18
|
-
import { meta } from '#meta';
|
|
19
|
-
|
|
20
|
-
export type RoutineArticleProps = AppSurface.ObjectArticleProps<Routine.Routine>;
|
|
21
|
-
|
|
22
|
-
type RunState =
|
|
23
|
-
| { status: 'idle' }
|
|
24
|
-
| { status: 'running' }
|
|
25
|
-
| { status: 'success'; result: unknown }
|
|
26
|
-
| { status: 'error'; error: Error };
|
|
27
|
-
|
|
28
|
-
// TODO(burdon): Trigger editor.
|
|
29
|
-
export const RoutineArticle = ({ role, attendableId, subject }: RoutineArticleProps) => {
|
|
30
|
-
const { t } = useTranslation(meta.profile.key);
|
|
31
|
-
const { hasAttention } = useAttention(attendableId);
|
|
32
|
-
const invoke = usePromptHandler(subject);
|
|
33
|
-
const [state, setState] = useState<RunState>({ status: 'idle' });
|
|
34
|
-
const mountedRef = useRef(true);
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
return () => {
|
|
37
|
-
mountedRef.current = false;
|
|
38
|
-
};
|
|
39
|
-
}, []);
|
|
40
|
-
|
|
41
|
-
const handleRun = useCallback(async () => {
|
|
42
|
-
setState({ status: 'running' });
|
|
43
|
-
try {
|
|
44
|
-
const result = await invoke();
|
|
45
|
-
if (mountedRef.current) {
|
|
46
|
-
setState({ status: 'success', result });
|
|
47
|
-
}
|
|
48
|
-
} catch (err) {
|
|
49
|
-
if (mountedRef.current) {
|
|
50
|
-
setState({ status: 'error', error: err instanceof Error ? err : new Error(String(err)) });
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}, [invoke]);
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
<Panel.Root role={role} className='dx-document'>
|
|
57
|
-
<Panel.Toolbar asChild>
|
|
58
|
-
<Toolbar.Root disabled={!hasAttention || state.status === 'running'}>
|
|
59
|
-
<Toolbar.IconButton
|
|
60
|
-
iconOnly
|
|
61
|
-
icon={state.status === 'running' ? 'ph--spinner-gap--regular' : 'ph--play--regular'}
|
|
62
|
-
label={t('run-prompt.label')}
|
|
63
|
-
onClick={handleRun}
|
|
64
|
-
/>
|
|
65
|
-
</Toolbar.Root>
|
|
66
|
-
</Panel.Toolbar>
|
|
67
|
-
<Panel.Content classNames='flex flex-col gap-2'>
|
|
68
|
-
<TemplateEditor id={subject.id} source={subject.instructions} />
|
|
69
|
-
<RoutineResult state={state} />
|
|
70
|
-
</Panel.Content>
|
|
71
|
-
</Panel.Root>
|
|
72
|
-
);
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const RoutineResult = ({ state }: { state: RunState }) => {
|
|
76
|
-
const { t } = useTranslation(meta.profile.key);
|
|
77
|
-
switch (state.status) {
|
|
78
|
-
case 'idle':
|
|
79
|
-
return null;
|
|
80
|
-
case 'running':
|
|
81
|
-
return <div className='p-2 text-sm text-subdued'>{t('routine-running.label')}</div>;
|
|
82
|
-
case 'error':
|
|
83
|
-
return <div className='p-2 text-sm text-error'>{state.error.message}</div>;
|
|
84
|
-
case 'success':
|
|
85
|
-
return <JsonHighlighter classNames='p-2! text-sm' data={state.result} />;
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
const usePromptHandler = (routine: Routine.Routine) => {
|
|
90
|
-
const db = Obj.getDatabase(routine);
|
|
91
|
-
const data = useMemo<Operation.Definition.Input<typeof AgentPrompt> | undefined>(() => {
|
|
92
|
-
if (db && routine) {
|
|
93
|
-
return {
|
|
94
|
-
prompt: db.makeRef(Obj.getURI(routine)),
|
|
95
|
-
input: {},
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}, [routine, db]);
|
|
99
|
-
|
|
100
|
-
return useSpaceCallback(
|
|
101
|
-
db?.spaceId,
|
|
102
|
-
[Database.Service, Feed.FeedService] as const,
|
|
103
|
-
() => {
|
|
104
|
-
invariant(data);
|
|
105
|
-
return Operation.invoke(AgentPrompt, data);
|
|
106
|
-
},
|
|
107
|
-
[data],
|
|
108
|
-
);
|
|
109
|
-
};
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2026 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
-
import * as Effect from 'effect/Effect';
|
|
7
|
-
import React from 'react';
|
|
8
|
-
|
|
9
|
-
import { SERVICES_CONFIG } from '@dxos/ai/testing';
|
|
10
|
-
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
11
|
-
import { Routine } from '@dxos/compute';
|
|
12
|
-
import { Filter } from '@dxos/echo';
|
|
13
|
-
import { AutomationPlugin } from '@dxos/plugin-automation/testing';
|
|
14
|
-
import { ClientPlugin } from '@dxos/plugin-client/testing';
|
|
15
|
-
import { Markdown } from '@dxos/plugin-markdown';
|
|
16
|
-
import { corePlugins } from '@dxos/plugin-testing';
|
|
17
|
-
import { Config } from '@dxos/react-client';
|
|
18
|
-
import { useQuery, useSpaces } from '@dxos/react-client/echo';
|
|
19
|
-
import { Panel } from '@dxos/react-ui';
|
|
20
|
-
import { Loading, withLayout } from '@dxos/react-ui/testing';
|
|
21
|
-
import { Organization } from '@dxos/types';
|
|
22
|
-
|
|
23
|
-
import { translations } from '#translations';
|
|
24
|
-
|
|
25
|
-
import { AssistantPlugin } from '../../AssistantPlugin';
|
|
26
|
-
import { TracePanel } from '../TracePanel';
|
|
27
|
-
import { RoutineList } from './RoutineList';
|
|
28
|
-
|
|
29
|
-
// TODO(burdon): Factor out (see assistant-stories)
|
|
30
|
-
export const config = {
|
|
31
|
-
remote: new Config({
|
|
32
|
-
runtime: {
|
|
33
|
-
services: SERVICES_CONFIG.REMOTE,
|
|
34
|
-
},
|
|
35
|
-
}),
|
|
36
|
-
persistent: new Config({
|
|
37
|
-
runtime: {
|
|
38
|
-
client: {
|
|
39
|
-
storage: {
|
|
40
|
-
persistent: true,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
services: SERVICES_CONFIG.REMOTE,
|
|
44
|
-
},
|
|
45
|
-
}),
|
|
46
|
-
local: new Config({
|
|
47
|
-
runtime: {
|
|
48
|
-
services: SERVICES_CONFIG.LOCAL,
|
|
49
|
-
},
|
|
50
|
-
}),
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const DefaultStory = () => {
|
|
54
|
-
const spaces = useSpaces();
|
|
55
|
-
const space = spaces[spaces.length - 1];
|
|
56
|
-
const [subject] = useQuery(space?.db, Filter.type(Organization.Organization));
|
|
57
|
-
if (!subject) {
|
|
58
|
-
return <Loading data={{ space: !!space, subject: !!subject }} />;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<Panel.Root>
|
|
63
|
-
<Panel.Toolbar className='flex p-1 items-center'>
|
|
64
|
-
<RoutineList subject={subject} role='toolbar-input' attendableId='story' />
|
|
65
|
-
</Panel.Toolbar>
|
|
66
|
-
<Panel.Content>
|
|
67
|
-
<TracePanel role='article' space={space} attendableId={space.id} />
|
|
68
|
-
</Panel.Content>
|
|
69
|
-
</Panel.Root>
|
|
70
|
-
);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const meta = {
|
|
74
|
-
title: 'plugins/plugin-assistant/containers/RoutineList',
|
|
75
|
-
render: DefaultStory,
|
|
76
|
-
decorators: [
|
|
77
|
-
withLayout({ layout: 'column' }),
|
|
78
|
-
withPluginManager({
|
|
79
|
-
plugins: [
|
|
80
|
-
...corePlugins(),
|
|
81
|
-
ClientPlugin({
|
|
82
|
-
types: [Routine.Routine, Organization.Organization, Markdown.Document],
|
|
83
|
-
config: config.remote,
|
|
84
|
-
onClientInitialized: ({ client }) =>
|
|
85
|
-
Effect.gen(function* () {
|
|
86
|
-
yield* Effect.promise(() => client.halo.createIdentity());
|
|
87
|
-
const space = yield* Effect.promise(() => client.spaces.create());
|
|
88
|
-
yield* Effect.promise(() => space.waitUntilReady());
|
|
89
|
-
space.db.add(
|
|
90
|
-
Organization.make({
|
|
91
|
-
name: 'DXOS',
|
|
92
|
-
}),
|
|
93
|
-
);
|
|
94
|
-
space.db.add(
|
|
95
|
-
Routine.make({
|
|
96
|
-
name: 'Summarize',
|
|
97
|
-
instructions: 'Create a new markdown document that is a summary of the selected object.',
|
|
98
|
-
}),
|
|
99
|
-
);
|
|
100
|
-
space.db.add(
|
|
101
|
-
Routine.make({
|
|
102
|
-
name: 'Analyze',
|
|
103
|
-
instructions: 'Analyze the selected content.',
|
|
104
|
-
}),
|
|
105
|
-
);
|
|
106
|
-
space.db.add(
|
|
107
|
-
Routine.make({
|
|
108
|
-
name: 'Translate',
|
|
109
|
-
instructions: 'Translate the selected content to Spanish.',
|
|
110
|
-
}),
|
|
111
|
-
);
|
|
112
|
-
}),
|
|
113
|
-
}),
|
|
114
|
-
|
|
115
|
-
AssistantPlugin(),
|
|
116
|
-
AutomationPlugin(),
|
|
117
|
-
],
|
|
118
|
-
}),
|
|
119
|
-
],
|
|
120
|
-
parameters: {
|
|
121
|
-
layout: 'centered',
|
|
122
|
-
translations,
|
|
123
|
-
},
|
|
124
|
-
} satisfies Meta<typeof DefaultStory>;
|
|
125
|
-
|
|
126
|
-
export default meta;
|
|
127
|
-
|
|
128
|
-
type Story = StoryObj<typeof meta>;
|
|
129
|
-
|
|
130
|
-
export const Default: Story = {};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
8
|
-
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
9
|
-
import { DatabaseBlueprint, WebSearchBlueprint } from '@dxos/assistant-toolkit';
|
|
10
|
-
import { Routine } from '@dxos/compute';
|
|
11
|
-
import { Filter, Obj, Ref } from '@dxos/echo';
|
|
12
|
-
import { MarkdownBlueprint } from '@dxos/plugin-markdown';
|
|
13
|
-
import { useQuery } from '@dxos/react-client/echo';
|
|
14
|
-
import { IconButton } from '@dxos/react-ui';
|
|
15
|
-
|
|
16
|
-
import { AssistantOperation } from '#types';
|
|
17
|
-
|
|
18
|
-
export type RoutineListProps = AppSurface.ObjectSectionProps<Obj.Unknown>;
|
|
19
|
-
|
|
20
|
-
export const RoutineList = ({ subject }: RoutineListProps) => {
|
|
21
|
-
const { invokePromise } = useOperationInvoker();
|
|
22
|
-
const db = Obj.getDatabase(subject);
|
|
23
|
-
const prompts = useQuery(db, Filter.type(Routine.Routine));
|
|
24
|
-
if (!db) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<div className='flex gap-2'>
|
|
30
|
-
{prompts.map((prompt, i) => (
|
|
31
|
-
<div key={i}>
|
|
32
|
-
<IconButton
|
|
33
|
-
icon='ph--magic-wand--regular'
|
|
34
|
-
label={Obj.getLabel(prompt) ?? Obj.getURI(prompt)}
|
|
35
|
-
onClick={() => {
|
|
36
|
-
void invokePromise(AssistantOperation.RunPromptInNewChat, {
|
|
37
|
-
db,
|
|
38
|
-
prompt: Ref.make(prompt),
|
|
39
|
-
objects: [subject],
|
|
40
|
-
// TODO(burdon): Concifgure from Prompt object.
|
|
41
|
-
blueprints: [DatabaseBlueprint.key, WebSearchBlueprint.key, MarkdownBlueprint.key],
|
|
42
|
-
background: true,
|
|
43
|
-
});
|
|
44
|
-
}}
|
|
45
|
-
/>
|
|
46
|
-
</div>
|
|
47
|
-
))}
|
|
48
|
-
</div>
|
|
49
|
-
);
|
|
50
|
-
};
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
import { type AiContext } from '@dxos/assistant';
|
|
8
|
-
import { Blueprint } from '@dxos/compute';
|
|
9
|
-
import { type Database, Filter, Obj, Ref, type Registry } from '@dxos/echo';
|
|
10
|
-
import { useQuery } from '@dxos/react-client/echo';
|
|
11
|
-
import { distinctBy } from '@dxos/util';
|
|
12
|
-
|
|
13
|
-
export const useBlueprints = ({ registry, db }: { registry?: Registry.Registry; db?: Database.Database }) => {
|
|
14
|
-
const [registryBlueprints, setRegistryBlueprints] = useState<Blueprint.Blueprint[]>(
|
|
15
|
-
() => registry?.query(Filter.type(Blueprint.Blueprint)).runSync() ?? [],
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
if (!registry) {
|
|
20
|
-
setRegistryBlueprints([]);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
setRegistryBlueprints(registry.query(Filter.type(Blueprint.Blueprint)).runSync());
|
|
24
|
-
return registry.changed.on(() => {
|
|
25
|
-
setRegistryBlueprints(registry.query(Filter.type(Blueprint.Blueprint)).runSync());
|
|
26
|
-
});
|
|
27
|
-
}, [registry]);
|
|
28
|
-
|
|
29
|
-
const spaceBlueprints = useQuery(db, Filter.type(Blueprint.Blueprint));
|
|
30
|
-
return useMemo(() => {
|
|
31
|
-
const blueprints = distinctBy([...registryBlueprints, ...spaceBlueprints], (b) => Obj.getMeta(b).key);
|
|
32
|
-
blueprints.sort(({ name: a }, { name: b }) => a.localeCompare(b));
|
|
33
|
-
return blueprints;
|
|
34
|
-
}, [registryBlueprints, spaceBlueprints]);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Create reactive map of active blueprints (by key).
|
|
39
|
-
*/
|
|
40
|
-
export const useActiveBlueprints = ({ context }: { context?: AiContext.Binder }) => {
|
|
41
|
-
const [active, setActive] = useState<Map<string, Blueprint.Blueprint>>(new Map());
|
|
42
|
-
|
|
43
|
-
useEffect(() => {
|
|
44
|
-
if (!context) {
|
|
45
|
-
setActive(new Map());
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const updateActive = () => {
|
|
50
|
-
const blueprints = context.getBlueprints();
|
|
51
|
-
setActive(
|
|
52
|
-
new Map(
|
|
53
|
-
blueprints
|
|
54
|
-
.map((blueprint) => [Obj.getMeta(blueprint).key, blueprint] as const)
|
|
55
|
-
.filter((entry): entry is readonly [string, Blueprint.Blueprint] => entry[0] !== undefined),
|
|
56
|
-
),
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
// Set initial value.
|
|
61
|
-
updateActive();
|
|
62
|
-
|
|
63
|
-
// Subscribe to changes.
|
|
64
|
-
return context.subscribeBlueprints(updateActive);
|
|
65
|
-
}, [context]);
|
|
66
|
-
|
|
67
|
-
return active;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
// TODO(burdon): Move logic into binder.
|
|
71
|
-
export const useBlueprintHandlers = ({
|
|
72
|
-
db,
|
|
73
|
-
context,
|
|
74
|
-
registry,
|
|
75
|
-
}: {
|
|
76
|
-
db: Database.Database;
|
|
77
|
-
context?: AiContext.Binder;
|
|
78
|
-
registry?: Registry.Registry;
|
|
79
|
-
}) => {
|
|
80
|
-
const onUpdateBlueprint = useCallback(
|
|
81
|
-
async (key: string, checked: boolean) => {
|
|
82
|
-
if (!context) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (checked) {
|
|
87
|
-
// Check if the blueprint is in the registry — if so, bind via its key URI directly
|
|
88
|
-
// (no DB clone needed). Fall back to an existing DB copy for user-forked blueprints.
|
|
89
|
-
const registryBlueprint = registry
|
|
90
|
-
?.query(Filter.type(Blueprint.Blueprint))
|
|
91
|
-
.runSync()
|
|
92
|
-
.find((b) => Obj.getMeta(b).key === key);
|
|
93
|
-
|
|
94
|
-
if (registryBlueprint) {
|
|
95
|
-
await context.bind({ blueprints: [Ref.fromURI(Blueprint.registryURI(key))] });
|
|
96
|
-
} else {
|
|
97
|
-
// User-forked blueprint (in DB but not in registry): bind via DB ref.
|
|
98
|
-
const objects = await db.query(Filter.type(Blueprint.Blueprint)).run();
|
|
99
|
-
const storedBlueprint = objects.find((blueprint) => Obj.getMeta(blueprint).key === key);
|
|
100
|
-
if (storedBlueprint) {
|
|
101
|
-
await context.bind({ blueprints: [Ref.make(storedBlueprint)] });
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
} else {
|
|
105
|
-
// Unbind: try registry ref first, then DB ref.
|
|
106
|
-
const registryBlueprint = registry
|
|
107
|
-
?.query(Filter.type(Blueprint.Blueprint))
|
|
108
|
-
.runSync()
|
|
109
|
-
.find((b) => Obj.getMeta(b).key === key);
|
|
110
|
-
if (registryBlueprint) {
|
|
111
|
-
await context.unbind({ blueprints: [Ref.fromURI(Blueprint.registryURI(key))] });
|
|
112
|
-
} else {
|
|
113
|
-
const objects = await db.query(Filter.type(Blueprint.Blueprint)).run();
|
|
114
|
-
const storedBlueprint = objects.find((blueprint) => Obj.getMeta(blueprint).key === key);
|
|
115
|
-
if (storedBlueprint) {
|
|
116
|
-
await context.unbind({ blueprints: [Ref.make(storedBlueprint)] });
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
[db, context, registry],
|
|
122
|
-
);
|
|
123
|
-
|
|
124
|
-
return { onUpdateBlueprint };
|
|
125
|
-
};
|
package/src/hooks/useOnline.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Dispatch, type SetStateAction, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
export const useOnline = (): [boolean, Dispatch<SetStateAction<boolean>>] => {
|
|
8
|
-
const [online, setOnline] = useState(true);
|
|
9
|
-
return [online, setOnline];
|
|
10
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2026 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
import * as Layer from 'effect/Layer';
|
|
7
|
-
import { describe, test } from 'vitest';
|
|
8
|
-
|
|
9
|
-
import { Operation, Routine, Trace, Trigger } from '@dxos/compute';
|
|
10
|
-
import { Database, Filter, Obj, Query } from '@dxos/echo';
|
|
11
|
-
import { TestDatabaseLayer } from '@dxos/echo-client/testing';
|
|
12
|
-
import { EffectEx } from '@dxos/effect';
|
|
13
|
-
import { Automation } from '@dxos/plugin-automation';
|
|
14
|
-
|
|
15
|
-
import { dailyDigest } from './daily-digest';
|
|
16
|
-
import { researchBrief } from './research-brief';
|
|
17
|
-
|
|
18
|
-
const dbLayer = TestDatabaseLayer({
|
|
19
|
-
types: [Automation.Automation, Routine.Routine, Trigger.Trigger, Operation.PersistentOperation],
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const TestLayer = Layer.mergeAll(dbLayer, Trace.writerLayerNoop);
|
|
23
|
-
|
|
24
|
-
const templates = [
|
|
25
|
-
{ template: researchBrief, blueprintCount: 4 },
|
|
26
|
-
{ template: dailyDigest, blueprintCount: 3 },
|
|
27
|
-
];
|
|
28
|
-
|
|
29
|
-
describe('scheduled automation templates', () => {
|
|
30
|
-
test('apply globally (no subject required)', ({ expect }) => {
|
|
31
|
-
// Like Blank, these are offered in the global create dialog — no `appliesTo` gate.
|
|
32
|
-
expect(researchBrief.appliesTo).toBeUndefined();
|
|
33
|
-
expect(dailyDigest.appliesTo).toBeUndefined();
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
for (const { template, blueprintCount } of templates) {
|
|
37
|
-
test(`${template.label} scaffolds a Routine, a disabled timer Trigger, and an Automation`, async ({ expect }) => {
|
|
38
|
-
await Effect.gen(function* () {
|
|
39
|
-
const automation = yield* template.scaffold({});
|
|
40
|
-
yield* Database.add(automation);
|
|
41
|
-
yield* Database.flush();
|
|
42
|
-
|
|
43
|
-
expect(automation.triggers).toHaveLength(1);
|
|
44
|
-
expect(automation.runnable).toBeDefined();
|
|
45
|
-
|
|
46
|
-
const routines = yield* Database.query(Filter.type(Routine.Routine)).run;
|
|
47
|
-
expect(routines).toHaveLength(1);
|
|
48
|
-
expect(routines[0]?.blueprints).toHaveLength(blueprintCount);
|
|
49
|
-
|
|
50
|
-
const triggers = yield* Database.query(Query.select(Filter.type(Trigger.Trigger))).run;
|
|
51
|
-
expect(triggers).toHaveLength(1);
|
|
52
|
-
const trigger = triggers[0];
|
|
53
|
-
expect(trigger?.enabled).toBe(false);
|
|
54
|
-
expect(trigger?.spec?.kind).toBe('timer');
|
|
55
|
-
expect(trigger?.input?.prompt).toBeDefined();
|
|
56
|
-
// The trigger is owned by the automation (cascade-deletes with it); the routine stays independent.
|
|
57
|
-
expect(trigger && Obj.getParent(trigger)?.id).toBe(automation.id);
|
|
58
|
-
expect(routines[0] && Obj.getParent(routines[0])).toBeUndefined();
|
|
59
|
-
|
|
60
|
-
const operations = yield* Database.query(Filter.type(Operation.PersistentOperation)).run;
|
|
61
|
-
expect(operations).toHaveLength(1);
|
|
62
|
-
expect(automation.runnable?.uri).toBe(trigger?.function?.uri);
|
|
63
|
-
}).pipe(Effect.provide(TestLayer), EffectEx.runAndForwardErrors);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/src/{components → containers}/AssistantSettings/AssistantSettings.stories.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|