@dxos/plugin-assistant 0.8.4-main.e8ec1fe → 0.8.4-main.effb148878
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/AgentArticle-UPXYXYFJ.mjs +166 -0
- package/dist/lib/neutral/AgentArticle-UPXYXYFJ.mjs.map +7 -0
- package/dist/lib/neutral/AgentProperties-W6LD56IB.mjs +40 -0
- package/dist/lib/neutral/AgentProperties-W6LD56IB.mjs.map +7 -0
- package/dist/lib/neutral/AssistantPlugin.mjs +10 -0
- package/dist/lib/neutral/AssistantPlugin.node.mjs +62 -0
- package/dist/lib/neutral/AssistantPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/AssistantPlugin.workerd.mjs +40 -0
- package/dist/lib/neutral/AssistantPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/AssistantSettings-GG52BLKS.mjs +40 -0
- package/dist/lib/neutral/AssistantSettings-GG52BLKS.mjs.map +7 -0
- package/dist/lib/neutral/BlueprintArticle-U7LUBFOS.mjs +27 -0
- package/dist/lib/neutral/BlueprintArticle-U7LUBFOS.mjs.map +7 -0
- package/dist/lib/neutral/ChatArticle-WVAFZPVI.mjs +8 -0
- package/dist/lib/neutral/ChatCompanion-PA5WC4ND.mjs +133 -0
- package/dist/lib/neutral/ChatCompanion-PA5WC4ND.mjs.map +7 -0
- package/dist/lib/neutral/ChatDialog-QKZLG7SQ.mjs +72 -0
- package/dist/lib/neutral/ChatDialog-QKZLG7SQ.mjs.map +7 -0
- package/dist/lib/neutral/PlanArticle-TS5ULWYS.mjs +28 -0
- package/dist/lib/neutral/PlanArticle-TS5ULWYS.mjs.map +7 -0
- package/dist/lib/neutral/RoutineArticle-HWB5ZQ6O.mjs +119 -0
- package/dist/lib/neutral/RoutineArticle-HWB5ZQ6O.mjs.map +7 -0
- package/dist/lib/neutral/RoutineList-SO5ETHNT.mjs +48 -0
- package/dist/lib/neutral/RoutineList-SO5ETHNT.mjs.map +7 -0
- package/dist/lib/neutral/RoutineProperties-FISLMW2R.mjs +17 -0
- package/dist/lib/neutral/RoutineProperties-FISLMW2R.mjs.map +7 -0
- package/dist/lib/neutral/TracePanel-75DMDJEB.mjs +136 -0
- package/dist/lib/neutral/TracePanel-75DMDJEB.mjs.map +7 -0
- package/dist/lib/neutral/TriggerStatus-WTFYUIG5.mjs +92 -0
- package/dist/lib/neutral/TriggerStatus-WTFYUIG5.mjs.map +7 -0
- package/dist/lib/neutral/ai-context-ERNAJDGG.mjs +42 -0
- package/dist/lib/neutral/ai-context-ERNAJDGG.mjs.map +7 -0
- package/dist/lib/neutral/ai-service-7SQH5S4F.mjs +34 -0
- package/dist/lib/neutral/ai-service-7SQH5S4F.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-VBWAKZE5.mjs +199 -0
- package/dist/lib/neutral/app-graph-builder-VBWAKZE5.mjs.map +7 -0
- package/dist/lib/neutral/blueprint-definition-VXJYQ5AE.mjs +32 -0
- package/dist/lib/neutral/blueprint-definition-VXJYQ5AE.mjs.map +7 -0
- package/dist/lib/neutral/blueprints/index.mjs +8 -0
- package/dist/lib/neutral/capabilities/index.mjs +37 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-5H6UJHLF.mjs +30 -0
- package/dist/lib/neutral/chunk-5H6UJHLF.mjs.map +7 -0
- package/dist/lib/neutral/chunk-6UMJI6ON.mjs +110 -0
- package/dist/lib/neutral/chunk-6UMJI6ON.mjs.map +7 -0
- package/dist/lib/neutral/chunk-CJXRQ2YX.mjs +386 -0
- package/dist/lib/neutral/chunk-CJXRQ2YX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-JUCBGMF3.mjs +8 -0
- package/dist/lib/neutral/chunk-JUCBGMF3.mjs.map +7 -0
- package/dist/lib/neutral/chunk-SLIPV6NN.mjs +106 -0
- package/dist/lib/neutral/chunk-SLIPV6NN.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ZWY6Y5IW.mjs +41 -0
- package/dist/lib/neutral/chunk-ZWY6Y5IW.mjs.map +7 -0
- package/dist/lib/neutral/companion-chat-provisioner-7RTSXL6M.mjs +116 -0
- package/dist/lib/neutral/companion-chat-provisioner-7RTSXL6M.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +2373 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +29 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-chat-QQZURUBW.mjs +71 -0
- package/dist/lib/neutral/create-chat-QQZURUBW.mjs.map +7 -0
- package/dist/lib/neutral/create-object-XPVVVEKF.mjs +89 -0
- package/dist/lib/neutral/create-object-XPVVVEKF.mjs.map +7 -0
- package/dist/lib/neutral/edge-model-resolver-XDNBZ3US.mjs +21 -0
- package/dist/lib/neutral/edge-model-resolver-XDNBZ3US.mjs.map +7 -0
- package/dist/lib/neutral/ensure-companion-chat-AMOF3C66.mjs +58 -0
- package/dist/lib/neutral/ensure-companion-chat-AMOF3C66.mjs.map +7 -0
- package/dist/lib/neutral/execution-graph/index.mjs +658 -0
- package/dist/lib/neutral/execution-graph/index.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +952 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +32 -0
- package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs +24 -0
- package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs.map +7 -0
- package/dist/lib/neutral/markdown-KTBFOMFM.mjs +110 -0
- package/dist/lib/neutral/markdown-KTBFOMFM.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +12 -0
- package/dist/lib/neutral/migrations-7DEMVBOG.mjs +28 -0
- package/dist/lib/neutral/migrations-7DEMVBOG.mjs.map +7 -0
- package/dist/lib/neutral/on-create-space-Q2R7OSP6.mjs +19 -0
- package/dist/lib/neutral/on-create-space-Q2R7OSP6.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-SF36MOB5.mjs +13 -0
- package/dist/lib/neutral/operation-handler-SF36MOB5.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-CC6J7D4K.mjs +174 -0
- package/dist/lib/neutral/react-surface-CC6J7D4K.mjs.map +7 -0
- package/dist/lib/neutral/resolve-navigation-targets-ZHIMMH7L.mjs +22 -0
- package/dist/lib/neutral/resolve-navigation-targets-ZHIMMH7L.mjs.map +7 -0
- package/dist/lib/neutral/run-prompt-in-new-chat-KPXN5YJ2.mjs +102 -0
- package/dist/lib/neutral/run-prompt-in-new-chat-KPXN5YJ2.mjs.map +7 -0
- package/dist/lib/neutral/set-current-chat-VWBPSIMZ.mjs +48 -0
- package/dist/lib/neutral/set-current-chat-VWBPSIMZ.mjs.map +7 -0
- package/dist/lib/neutral/settings-W4BLWQ53.mjs +28 -0
- package/dist/lib/neutral/settings-W4BLWQ53.mjs.map +7 -0
- package/dist/lib/neutral/state-H3G7QCU6.mjs +28 -0
- package/dist/lib/neutral/state-H3G7QCU6.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +8 -0
- package/dist/lib/neutral/testing.mjs.map +7 -0
- package/dist/lib/neutral/toggle-trace-panel-debug-JGTB6KVJ.mjs +21 -0
- package/dist/lib/neutral/toggle-trace-panel-debug-JGTB6KVJ.mjs.map +7 -0
- package/dist/lib/neutral/toolkit-GVWXPDLJ.mjs +14 -0
- package/dist/lib/neutral/toolkit-GVWXPDLJ.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +175 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +20 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/neutral/update-chat-name-ENXRUMDJ.mjs +54 -0
- package/dist/lib/neutral/update-chat-name-ENXRUMDJ.mjs.map +7 -0
- package/dist/types/src/AssistantPlugin.d.ts +3 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/AssistantPlugin.node.d.ts +4 -0
- package/dist/types/src/AssistantPlugin.node.d.ts.map +1 -0
- package/dist/types/src/AssistantPlugin.test.d.ts +2 -0
- package/dist/types/src/AssistantPlugin.test.d.ts.map +1 -0
- package/dist/types/src/AssistantPlugin.workerd.d.ts +4 -0
- package/dist/types/src/AssistantPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/blueprints/assistant/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/assistant/blueprint.node.test.d.ts +2 -0
- package/dist/types/src/blueprints/assistant/blueprint.node.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/assistant/index.d.ts +2 -0
- package/dist/types/src/blueprints/assistant/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-context.d.ts +6 -0
- package/dist/types/src/capabilities/ai-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-service.d.ts +5 -2
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +4 -6
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +9 -0
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +31 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +6 -3
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +56 -12
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +9 -3
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts +5 -0
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/migrations.d.ts +6 -0
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +4 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +19 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +4 -2
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
- package/dist/types/src/components/AgentProperties/AgentProperties.d.ts +7 -0
- package/dist/types/src/components/AgentProperties/AgentProperties.d.ts.map +1 -0
- package/dist/types/src/components/AgentProperties/AgentProperties.stories.d.ts +15 -0
- package/dist/types/src/components/AgentProperties/AgentProperties.stories.d.ts.map +1 -0
- package/dist/types/src/components/AgentProperties/index.d.ts +2 -0
- package/dist/types/src/components/AgentProperties/index.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +4 -4
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts +15 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/index.d.ts +1 -1
- package/dist/types/src/components/AssistantSettings/index.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +42 -43
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/context.d.ts +29 -0
- package/dist/types/src/components/Chat/context.d.ts.map +1 -0
- package/dist/types/src/components/Chat/events.d.ts +1 -1
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +2 -1
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts +12 -0
- package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +10 -6
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +19 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +28 -0
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +5 -5
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts +20 -0
- package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +3 -0
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Anchor.stories.d.ts +14 -0
- package/dist/types/src/components/ChatThread/Anchor.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +8 -5
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +11 -311
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts +2 -2
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +42 -0
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/registry.d.ts +19 -1
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/sync.d.ts +47 -20
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/tool-widget-state.d.ts +18 -0
- package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts +2 -0
- package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts +8 -0
- package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts +25 -0
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts +18 -0
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts +9 -0
- package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts +14 -0
- package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts +12 -0
- package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts +12 -0
- package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts +11 -0
- package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts +5 -0
- package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts +9 -0
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts +15 -0
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/defaults.d.ts +5 -0
- package/dist/types/src/components/ChatThread/widgets/defaults.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts +10 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +11 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +7 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/index.d.ts +2 -0
- package/dist/types/src/components/ProcessTree/index.d.ts.map +1 -0
- package/dist/types/src/components/RoutineProperties/RoutineProperties.d.ts +7 -0
- package/dist/types/src/components/RoutineProperties/RoutineProperties.d.ts.map +1 -0
- package/dist/types/src/components/RoutineProperties/RoutineProperties.stories.d.ts +15 -0
- package/dist/types/src/components/RoutineProperties/RoutineProperties.stories.d.ts.map +1 -0
- package/dist/types/src/components/RoutineProperties/index.d.ts +2 -0
- package/dist/types/src/components/RoutineProperties/index.d.ts.map +1 -0
- package/dist/types/src/components/TaskList/TaskList.d.ts +10 -0
- package/dist/types/src/components/TaskList/TaskList.d.ts.map +1 -0
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts +16 -0
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts.map +1 -0
- package/dist/types/src/components/TaskList/index.d.ts +2 -0
- package/dist/types/src/components/TaskList/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +6 -5
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +1 -300
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +12 -3
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +2 -301
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -1
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +5 -14
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +14 -13
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +1 -300
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +6 -6
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts +6 -0
- package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -0
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts +21 -0
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/AgentArticle/index.d.ts +2 -0
- package/dist/types/src/containers/AgentArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts +6 -0
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -0
- package/dist/types/src/containers/AgentProperties/index.d.ts +2 -0
- package/dist/types/src/containers/AgentProperties/index.d.ts.map +1 -0
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +6 -0
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -0
- package/dist/types/src/containers/BlueprintArticle/index.d.ts +2 -0
- package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts +12 -0
- package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts.map +1 -0
- package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts +15 -0
- package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChatArticle/index.d.ts +2 -0
- package/dist/types/src/containers/ChatArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +26 -0
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/ChatCompanion/index.d.ts +2 -0
- package/dist/types/src/containers/ChatCompanion/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ChatDialog}/ChatDialog.d.ts +2 -3
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -0
- package/dist/types/src/containers/ChatDialog/index.d.ts +2 -0
- package/dist/types/src/containers/ChatDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts +6 -0
- package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PlanArticle/index.d.ts +2 -0
- package/dist/types/src/containers/PlanArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +6 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts +15 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/index.d.ts +2 -0
- package/dist/types/src/containers/RoutineArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineList/RoutineList.d.ts +6 -0
- package/dist/types/src/containers/RoutineList/RoutineList.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts +21 -0
- package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineList/index.d.ts +2 -0
- package/dist/types/src/containers/RoutineList/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts +8 -0
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts +15 -0
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +19 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts +2 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/index.d.ts +4 -0
- package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/testing/index.d.ts +3 -0
- package/dist/types/src/containers/TracePanel/testing/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts +14 -0
- package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts +12 -0
- package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +5 -0
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerStatus/index.d.ts +2 -0
- package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +13 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/execution-graph/execution-graph.d.ts +108 -0
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -0
- package/dist/types/src/execution-graph/execution-graph.test.d.ts +2 -0
- package/dist/types/src/execution-graph/execution-graph.test.d.ts.map +1 -0
- package/dist/types/src/execution-graph/index.d.ts +3 -0
- package/dist/types/src/execution-graph/index.d.ts.map +1 -0
- package/dist/types/src/execution-graph/remote-snapshot.test.d.ts +2 -0
- package/dist/types/src/execution-graph/remote-snapshot.test.d.ts.map +1 -0
- package/dist/types/src/execution-graph/span-tree.d.ts +76 -0
- package/dist/types/src/execution-graph/span-tree.d.ts.map +1 -0
- package/dist/types/src/execution-graph/span-tree.test.d.ts +2 -0
- package/dist/types/src/execution-graph/span-tree.test.d.ts.map +1 -0
- package/dist/types/src/execution-graph/testing/collect-trace-events.d.ts +40 -0
- package/dist/types/src/execution-graph/testing/collect-trace-events.d.ts.map +1 -0
- package/dist/types/src/execution-graph/testing/index.d.ts +2 -0
- package/dist/types/src/execution-graph/testing/index.d.ts.map +1 -0
- package/dist/types/src/extensions/index.d.ts +2 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -0
- package/dist/types/src/extensions/prompt-extension.d.ts +10 -0
- package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -0
- package/dist/types/src/feed-logger.d.ts +13 -0
- package/dist/types/src/feed-logger.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +3 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +57 -11
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatKeymap.d.ts +12 -0
- package/dist/types/src/hooks/useChatKeymap.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +8 -7
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +9 -8
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts +3 -3
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextBinder.d.ts +4 -3
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextObjects.d.ts +10 -9
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
- package/dist/types/src/hooks/useDebug.d.ts +10 -0
- package/dist/types/src/hooks/useDebug.d.ts.map +1 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts +3 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -0
- package/dist/types/src/hooks/useFlush.d.ts +1 -1
- package/dist/types/src/hooks/useFlush.d.ts.map +1 -1
- package/dist/types/src/hooks/usePresets.d.ts +1 -1
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -6
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +4 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-chat.d.ts +5 -0
- package/dist/types/src/operations/create-chat.d.ts.map +1 -0
- package/dist/types/src/operations/ensure-companion-chat.d.ts +5 -0
- package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/on-create-space.d.ts +5 -0
- package/dist/types/src/operations/on-create-space.d.ts.map +1 -0
- package/dist/types/src/operations/prompt.node.test.d.ts +2 -0
- package/dist/types/src/operations/prompt.node.test.d.ts.map +1 -0
- package/dist/types/src/operations/resolve-navigation-targets.d.ts +17 -0
- package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -0
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +5 -0
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -0
- package/dist/types/src/operations/set-current-chat.d.ts +5 -0
- package/dist/types/src/operations/set-current-chat.d.ts.map +1 -0
- package/dist/types/src/operations/toggle-trace-panel-debug.d.ts +5 -0
- package/dist/types/src/operations/toggle-trace-panel-debug.d.ts.map +1 -0
- package/dist/types/src/operations/update-chat-name.d.ts +5 -0
- package/dist/types/src/operations/update-chat-name.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/processor/index.d.ts +0 -1
- 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 +257 -36
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/processor/processor.node.test.d.ts +2 -0
- package/dist/types/src/processor/processor.node.test.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/snapshot.d.ts +21 -0
- package/dist/types/src/testing/snapshot.d.ts.map +1 -0
- package/dist/types/src/testing/test-generator.d.ts +2 -2
- package/dist/types/src/testing/test-generator.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.test.d.ts +2 -0
- package/dist/types/src/testing/test-generator.test.d.ts.map +1 -0
- package/dist/types/src/testing/test-sequence.d.ts +10 -3
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/testing/test-services.d.ts +1 -1
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/testing/test-trace.d.ts +5 -0
- package/dist/types/src/testing/test-trace.d.ts.map +1 -0
- package/dist/types/src/testing/trace-timeline.node.test.d.ts +2 -0
- package/dist/types/src/testing/trace-timeline.node.test.d.ts.map +1 -0
- package/dist/types/src/testing.d.ts +2 -0
- package/dist/types/src/testing.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -300
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +34 -45
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/AssistantCapabilities.d.ts +30 -0
- package/dist/types/src/types/AssistantCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/AssistantEvents.d.ts +3 -0
- package/dist/types/src/types/AssistantEvents.d.ts.map +1 -0
- package/dist/types/src/types/AssistantOperation.d.ts +145 -0
- package/dist/types/src/types/AssistantOperation.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +27 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +10 -219
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/src/util/suggestions.d.ts +9 -0
- package/dist/types/src/util/suggestions.d.ts.map +1 -0
- package/dist/types/src/util/suggestions.test.d.ts +2 -0
- package/dist/types/src/util/suggestions.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +206 -112
- package/src/AssistantPlugin.node.ts +71 -0
- package/src/AssistantPlugin.test.ts +49 -0
- package/src/AssistantPlugin.ts +140 -0
- package/src/AssistantPlugin.workerd.ts +41 -0
- package/src/blueprints/assistant/blueprint.node.test.ts +46 -0
- package/src/blueprints/assistant/blueprint.ts +31 -0
- package/src/blueprints/assistant/index.ts +5 -0
- package/src/{components/ChatProgress → blueprints}/index.ts +1 -1
- package/src/capabilities/ai-context.ts +85 -0
- package/src/capabilities/ai-service.ts +34 -17
- package/src/capabilities/app-graph-builder.ts +174 -187
- package/src/capabilities/blueprint-definition.ts +47 -57
- package/src/capabilities/companion-chat-provisioner.ts +163 -0
- package/src/capabilities/create-object.ts +98 -0
- package/src/capabilities/edge-model-resolver.ts +22 -14
- package/src/capabilities/index.ts +24 -14
- package/src/capabilities/local-model-resolver.ts +31 -13
- package/src/capabilities/markdown.ts +40 -0
- package/src/capabilities/migrations.ts +28 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +160 -73
- package/src/capabilities/settings.ts +24 -12
- package/src/capabilities/state.ts +26 -13
- package/src/capabilities/toolkit.ts +7 -11
- package/src/components/AgentProperties/AgentProperties.stories.tsx +74 -0
- package/src/components/AgentProperties/AgentProperties.tsx +102 -0
- package/src/components/AgentProperties/index.ts +5 -0
- package/src/components/AssistantSettings/AssistantSettings.stories.tsx +35 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +30 -99
- package/src/components/AssistantSettings/index.ts +2 -2
- package/src/components/Chat/Chat.tsx +128 -259
- package/src/components/Chat/context.ts +39 -0
- package/src/components/Chat/events.ts +1 -1
- package/src/components/ChatPrompt/ChatActions.tsx +34 -14
- package/src/components/ChatPrompt/ChatMcpErrors.tsx +50 -0
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +136 -0
- package/src/components/ChatPrompt/ChatOptions.tsx +299 -81
- package/src/components/ChatPrompt/ChatPrompt.tsx +182 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +26 -16
- package/src/components/ChatPrompt/ChatStatus.tsx +123 -0
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +2 -2
- package/src/components/ChatPrompt/index.ts +3 -0
- package/src/components/ChatThread/Anchor.stories.tsx +95 -0
- package/src/components/ChatThread/ChatThread.stories.tsx +71 -80
- package/src/components/ChatThread/ChatThread.tsx +50 -24
- package/src/components/ChatThread/DEBUG.md +41 -0
- package/src/components/ChatThread/Link.tsx +6 -6
- package/src/components/ChatThread/MarkdownStream.stories.tsx +281 -0
- package/src/components/ChatThread/registry.tsx +172 -56
- package/src/components/ChatThread/sync.test.ts +193 -25
- package/src/components/ChatThread/sync.ts +96 -94
- package/src/components/ChatThread/testing/reasoning.md +25 -0
- package/src/components/ChatThread/testing/thinking.md +21 -0
- package/src/components/ChatThread/testing/thread-1.md +30 -0
- package/src/components/ChatThread/testing/{thread.md → thread-2.md} +19 -0
- package/src/components/ChatThread/testing/thread-widgets.md +79 -0
- package/src/components/ChatThread/tool-widget-state.test.ts +34 -0
- package/src/components/ChatThread/tool-widget-state.ts +48 -0
- package/src/components/ChatThread/widgets/FallbackWidget.tsx +26 -0
- package/src/components/ChatThread/widgets/ReasoningWidget.stories.tsx +68 -0
- package/src/components/ChatThread/widgets/ReasoningWidget.ts +133 -0
- package/src/components/ChatThread/widgets/ReferenceWidget.ts +33 -0
- package/src/components/ChatThread/widgets/SelectWidget.ts +39 -0
- package/src/components/ChatThread/widgets/StatsWidget.ts +31 -0
- package/src/components/ChatThread/widgets/StatusWidget.ts +53 -0
- package/src/components/ChatThread/widgets/SuggestionWidget.ts +41 -0
- package/src/components/ChatThread/widgets/SummaryWidget.tsx +27 -0
- package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +55 -0
- package/src/components/ChatThread/widgets/ToolWidget.tsx +156 -0
- package/src/components/ChatThread/widgets/defaults.ts +8 -0
- package/src/components/ChatThread/widgets/index.ts +13 -0
- package/src/components/ProcessTree/ProcessTree.stories.tsx +83 -0
- package/src/components/ProcessTree/ProcessTree.tsx +122 -0
- package/src/components/ProcessTree/index.ts +5 -0
- package/src/components/RoutineProperties/RoutineProperties.stories.tsx +59 -0
- package/src/components/RoutineProperties/RoutineProperties.tsx +23 -0
- package/src/components/RoutineProperties/index.ts +5 -0
- package/src/components/TaskList/TaskList.stories.tsx +44 -0
- package/src/components/TaskList/TaskList.tsx +45 -0
- package/src/components/TaskList/index.ts +5 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +8 -12
- package/src/components/TemplateEditor/TemplateEditor.tsx +54 -43
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +21 -15
- package/src/components/TemplateEditor/TemplateForm.tsx +111 -86
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +15 -10
- package/src/components/ToolBlock/ToolBlock.tsx +26 -25
- package/src/components/Toolbox/Toolbox.stories.tsx +16 -18
- package/src/components/Toolbox/Toolbox.tsx +74 -68
- package/src/components/index.ts +6 -7
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +120 -0
- package/src/containers/AgentArticle/AgentArticle.tsx +197 -0
- package/src/containers/AgentArticle/index.ts +5 -0
- package/src/containers/AgentProperties/AgentProperties.tsx +43 -0
- package/src/containers/AgentProperties/index.ts +5 -0
- package/src/containers/BlueprintArticle/BlueprintArticle.tsx +29 -0
- package/src/containers/BlueprintArticle/index.ts +5 -0
- package/src/containers/ChatArticle/ChatArticle.stories.tsx +76 -0
- package/src/containers/ChatArticle/ChatArticle.tsx +107 -0
- package/src/containers/ChatArticle/index.ts +5 -0
- package/src/containers/ChatCompanion/ChatCompanion.tsx +133 -0
- package/src/containers/ChatCompanion/index.ts +5 -0
- package/src/{components → containers/ChatDialog}/ChatDialog.tsx +14 -23
- package/src/containers/ChatDialog/index.ts +5 -0
- package/src/containers/PlanArticle/PlanArticle.tsx +33 -0
- package/src/containers/PlanArticle/index.ts +5 -0
- package/src/containers/RoutineArticle/RoutineArticle.stories.tsx +75 -0
- package/src/containers/RoutineArticle/RoutineArticle.tsx +109 -0
- package/src/containers/RoutineArticle/index.ts +5 -0
- package/src/containers/RoutineList/RoutineList.stories.tsx +130 -0
- package/src/containers/RoutineList/RoutineList.tsx +50 -0
- package/src/containers/RoutineList/index.ts +5 -0
- package/src/containers/TracePanel/TracePanel.stories.tsx +319 -0
- package/src/containers/TracePanel/TracePanel.tsx +213 -0
- package/src/containers/TracePanel/dxn-extractor.test.ts +153 -0
- package/src/containers/TracePanel/dxn-extractor.ts +168 -0
- package/src/containers/TracePanel/index.ts +9 -0
- package/src/containers/TracePanel/testing/index.ts +6 -0
- package/src/containers/TracePanel/testing/simulated-agent.ts +114 -0
- package/src/containers/TracePanel/testing/snapshot-playback.ts +45 -0
- package/src/containers/TriggerStatus/TriggerStatus.tsx +129 -0
- package/src/containers/TriggerStatus/index.ts +5 -0
- package/src/containers/index.ts +17 -0
- package/src/execution-graph/SPEC.md +678 -0
- package/src/execution-graph/execution-graph.test.ts +799 -0
- package/src/execution-graph/execution-graph.ts +714 -0
- package/src/execution-graph/index.ts +24 -0
- package/src/execution-graph/remote-snapshot.test.ts +116 -0
- package/src/execution-graph/span-tree.test.ts +249 -0
- package/src/execution-graph/span-tree.ts +259 -0
- package/src/execution-graph/testing/collect-trace-events.ts +74 -0
- package/src/execution-graph/testing/index.ts +5 -0
- package/src/extensions/index.ts +5 -0
- package/src/extensions/prompt-extension.ts +111 -0
- package/src/{queue-logger.ts → feed-logger.ts} +48 -20
- package/src/hooks/index.ts +3 -1
- package/src/hooks/useBlueprintRegistry.ts +48 -28
- package/src/hooks/useChatKeymap.ts +52 -0
- package/src/hooks/useChatProcessor.ts +57 -25
- package/src/hooks/useChatServices.ts +14 -37
- package/src/hooks/useChatToolbarActions.ts +98 -100
- package/src/hooks/useContextBinder.ts +22 -9
- package/src/hooks/useContextObjects.ts +20 -27
- package/src/hooks/useDebug.ts +38 -0
- package/src/hooks/useFilteredTypes.ts +37 -0
- package/src/hooks/usePresets.ts +2 -1
- package/src/hooks/useReferencesProvider.ts +11 -23
- package/src/index.ts +1 -7
- package/src/meta.ts +29 -8
- package/src/operations/create-chat.ts +84 -0
- package/src/operations/ensure-companion-chat.ts +63 -0
- package/src/operations/index.ts +16 -0
- package/src/operations/on-create-space.ts +24 -0
- package/src/operations/prompt.node.test.ts +80 -0
- package/src/operations/resolve-navigation-targets.ts +31 -0
- package/src/operations/run-prompt-in-new-chat.ts +113 -0
- package/src/operations/set-current-chat.ts +49 -0
- package/src/operations/toggle-trace-panel-debug.ts +27 -0
- package/src/operations/update-chat-name.ts +61 -0
- package/src/plugin.ts +11 -0
- package/src/processor/index.ts +0 -1
- package/src/processor/presets.ts +11 -3
- package/src/processor/processor.node.test.ts +41 -0
- package/src/processor/processor.ts +284 -160
- package/src/testing/data/trace-timeline-multiple.dx.json +1 -0
- package/src/testing/data/trace-timeline-remote.dx.json +1 -0
- package/src/testing/data/trace-timeline.dx.json +4657 -0
- package/src/testing/index.ts +2 -0
- package/src/testing/snapshot.ts +35 -0
- package/src/testing/test-generator.test.ts +71 -0
- package/src/testing/test-generator.ts +214 -191
- package/src/testing/test-sequence.ts +6 -6
- package/src/testing/test-services.ts +9 -7
- package/src/testing/test-trace.ts +20 -0
- package/src/testing/trace-timeline.node.conversations.json +1 -0
- package/src/testing/trace-timeline.node.test.ts +250 -0
- package/src/testing.ts +9 -0
- package/src/translations.ts +160 -87
- package/src/types/Assistant.ts +17 -54
- package/src/types/AssistantCapabilities.ts +35 -0
- package/src/types/AssistantEvents.ts +11 -0
- package/src/types/AssistantOperation.ts +152 -0
- package/src/types/Settings.ts +82 -0
- package/src/types/index.ts +8 -2
- package/src/types/service.ts +9 -11
- package/src/util/suggestions.test.ts +52 -0
- package/src/util/suggestions.ts +42 -0
- package/dist/lib/browser/BlueprintArticle-IMCR3642.mjs +0 -36
- package/dist/lib/browser/BlueprintArticle-IMCR3642.mjs.map +0 -7
- package/dist/lib/browser/ChatCompanion-JYD2RIBJ.mjs +0 -158
- package/dist/lib/browser/ChatCompanion-JYD2RIBJ.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-XCPBWYIR.mjs +0 -77
- package/dist/lib/browser/ChatContainer-XCPBWYIR.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-DT7KFCRL.mjs +0 -90
- package/dist/lib/browser/ChatDialog-DT7KFCRL.mjs.map +0 -7
- package/dist/lib/browser/PromptArticle-45QX25Y5.mjs +0 -59
- package/dist/lib/browser/PromptArticle-45QX25Y5.mjs.map +0 -7
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs +0 -19
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-VZEXMDTY.mjs +0 -199
- package/dist/lib/browser/app-graph-builder-VZEXMDTY.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-5FT5JGPY.mjs +0 -12
- package/dist/lib/browser/chunk-2BOE3OTW.mjs +0 -262
- package/dist/lib/browser/chunk-2BOE3OTW.mjs.map +0 -7
- package/dist/lib/browser/chunk-BNTPFZ7O.mjs +0 -229
- package/dist/lib/browser/chunk-BNTPFZ7O.mjs.map +0 -7
- package/dist/lib/browser/chunk-FJQ4ZRYJ.mjs +0 -335
- package/dist/lib/browser/chunk-FJQ4ZRYJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-IXIIS4QA.mjs +0 -176
- package/dist/lib/browser/chunk-IXIIS4QA.mjs.map +0 -7
- package/dist/lib/browser/chunk-LRE4VEZV.mjs +0 -16
- package/dist/lib/browser/chunk-LRE4VEZV.mjs.map +0 -7
- package/dist/lib/browser/chunk-U62BTGDF.mjs +0 -1929
- package/dist/lib/browser/chunk-U62BTGDF.mjs.map +0 -7
- package/dist/lib/browser/chunk-WBG5PTSX.mjs +0 -23
- package/dist/lib/browser/chunk-WBG5PTSX.mjs.map +0 -7
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs +0 -18
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -382
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-AK5O4GUW.mjs +0 -143
- package/dist/lib/browser/intent-resolver-AK5O4GUW.mjs.map +0 -7
- package/dist/lib/browser/local-model-resolver-34MVHRKD.mjs +0 -17
- package/dist/lib/browser/local-model-resolver-34MVHRKD.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-YCSR2MSR.mjs +0 -98
- package/dist/lib/browser/react-surface-YCSR2MSR.mjs.map +0 -7
- package/dist/lib/browser/settings-NYJGNQ5I.mjs +0 -23
- package/dist/lib/browser/settings-NYJGNQ5I.mjs.map +0 -7
- package/dist/lib/browser/state-GG7Z3NB7.mjs +0 -25
- package/dist/lib/browser/state-GG7Z3NB7.mjs.map +0 -7
- package/dist/lib/browser/toolkit-VYDAWNE4.mjs +0 -17
- package/dist/lib/browser/toolkit-VYDAWNE4.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -19
- package/dist/lib/node-esm/BlueprintArticle-OL2HUY6Q.mjs +0 -37
- package/dist/lib/node-esm/BlueprintArticle-OL2HUY6Q.mjs.map +0 -7
- package/dist/lib/node-esm/ChatCompanion-AHKJS25S.mjs +0 -159
- package/dist/lib/node-esm/ChatCompanion-AHKJS25S.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-K7OGPE3G.mjs +0 -78
- package/dist/lib/node-esm/ChatContainer-K7OGPE3G.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-QT6ZBX45.mjs +0 -91
- package/dist/lib/node-esm/ChatDialog-QT6ZBX45.mjs.map +0 -7
- package/dist/lib/node-esm/PromptArticle-OUKFSJQV.mjs +0 -60
- package/dist/lib/node-esm/PromptArticle-OUKFSJQV.mjs.map +0 -7
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs +0 -20
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-VRN6ESRR.mjs +0 -200
- package/dist/lib/node-esm/app-graph-builder-VRN6ESRR.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-XW6QQVLV.mjs +0 -13
- package/dist/lib/node-esm/chunk-3Q22TTXW.mjs +0 -264
- package/dist/lib/node-esm/chunk-3Q22TTXW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AB74FOA2.mjs +0 -230
- package/dist/lib/node-esm/chunk-AB74FOA2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BHS747K7.mjs +0 -1930
- package/dist/lib/node-esm/chunk-BHS747K7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-KJGD4EBJ.mjs +0 -336
- package/dist/lib/node-esm/chunk-KJGD4EBJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UXTUHH24.mjs +0 -178
- package/dist/lib/node-esm/chunk-UXTUHH24.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WE6KTH72.mjs +0 -25
- package/dist/lib/node-esm/chunk-WE6KTH72.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YWFWT57N.mjs +0 -17
- package/dist/lib/node-esm/chunk-YWFWT57N.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs +0 -19
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -383
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-L2F3N45L.mjs +0 -144
- package/dist/lib/node-esm/intent-resolver-L2F3N45L.mjs.map +0 -7
- package/dist/lib/node-esm/local-model-resolver-TP2NTSAX.mjs +0 -18
- package/dist/lib/node-esm/local-model-resolver-TP2NTSAX.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-CTW44GEM.mjs +0 -99
- package/dist/lib/node-esm/react-surface-CTW44GEM.mjs.map +0 -7
- package/dist/lib/node-esm/settings-RRHYI5KO.mjs +0 -24
- package/dist/lib/node-esm/settings-RRHYI5KO.mjs.map +0 -7
- package/dist/lib/node-esm/state-FSUHFMDM.mjs +0 -26
- package/dist/lib/node-esm/state-FSUHFMDM.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-HFJZLVIR.mjs +0 -18
- package/dist/lib/node-esm/toolkit-HFJZLVIR.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -20
- package/dist/types/src/capabilities/capabilities.d.ts +0 -10
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintArticle.d.ts +0 -7
- package/dist/types/src/components/BlueprintArticle.d.ts.map +0 -1
- package/dist/types/src/components/ChatCompanion.d.ts +0 -13
- package/dist/types/src/components/ChatCompanion.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer.d.ts +0 -14
- package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChatDialog.d.ts.map +0 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +0 -7
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +0 -1
- package/dist/types/src/components/ChatProgress/index.d.ts +0 -2
- package/dist/types/src/components/ChatProgress/index.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/reducers.d.ts +0 -40
- package/dist/types/src/components/ChatThread/reducers.d.ts.map +0 -1
- package/dist/types/src/components/PromptArticle.d.ts +0 -7
- package/dist/types/src/components/PromptArticle.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/functions/analysis.d.ts +0 -5
- package/dist/types/src/functions/analysis.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -4
- package/dist/types/src/functions/index.d.ts.map +0 -1
- package/dist/types/src/functions/object-list.d.ts +0 -10
- package/dist/types/src/functions/object-list.d.ts.map +0 -1
- package/dist/types/src/functions/object-load.d.ts +0 -8
- package/dist/types/src/functions/object-load.d.ts.map +0 -1
- package/dist/types/src/hooks/useItemTypes.d.ts +0 -4
- package/dist/types/src/hooks/useItemTypes.d.ts.map +0 -1
- package/dist/types/src/processor/processor.test.d.ts +0 -2
- package/dist/types/src/processor/processor.test.d.ts.map +0 -1
- package/dist/types/src/processor/update-name.d.ts +0 -10
- package/dist/types/src/processor/update-name.d.ts.map +0 -1
- package/dist/types/src/queue-logger.d.ts +0 -11
- package/dist/types/src/queue-logger.d.ts.map +0 -1
- package/dist/types/src/types/AssistantAction.d.ts +0 -132
- package/dist/types/src/types/AssistantAction.d.ts.map +0 -1
- package/dist/types/src/types/defs.d.ts +0 -2
- package/dist/types/src/types/defs.d.ts.map +0 -1
- package/src/AssistantPlugin.tsx +0 -185
- package/src/capabilities/capabilities.ts +0 -17
- package/src/capabilities/intent-resolver.ts +0 -147
- package/src/components/BlueprintArticle.tsx +0 -29
- package/src/components/ChatCompanion.tsx +0 -155
- package/src/components/ChatContainer.tsx +0 -61
- package/src/components/ChatProgress/ChatProgress.tsx +0 -67
- package/src/components/ChatThread/reducers.ts +0 -151
- package/src/components/PromptArticle.tsx +0 -51
- package/src/events.ts +0 -11
- package/src/functions/analysis.ts +0 -22
- package/src/functions/index.ts +0 -7
- package/src/functions/object-list.ts +0 -48
- package/src/functions/object-load.ts +0 -45
- package/src/hooks/useItemTypes.ts +0 -37
- package/src/processor/processor.test.ts +0 -71
- package/src/processor/update-name.ts +0 -56
- package/src/types/AssistantAction.ts +0 -79
- package/src/types/defs.ts +0 -5
- /package/dist/lib/{browser/blueprint-definition-5FT5JGPY.mjs.map → neutral/AssistantPlugin.mjs.map} +0 -0
- /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ChatArticle-WVAFZPVI.mjs.map} +0 -0
- /package/dist/lib/{browser/types → neutral/blueprints}/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{node-esm/blueprint-definition-XW6QQVLV.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
|
@@ -2,209 +2,196 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import { pipe } from 'effect/Function';
|
|
7
7
|
import * as Option from 'effect/Option';
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type PromiseIntentDispatcher,
|
|
14
|
-
contributes,
|
|
15
|
-
createIntent,
|
|
16
|
-
} from '@dxos/app-framework';
|
|
17
|
-
import { Prompt } from '@dxos/blueprints';
|
|
9
|
+
import { Capability } from '@dxos/app-framework';
|
|
10
|
+
import { AppCapabilities, AppNode, getActiveSpace, getPersonalSpace } from '@dxos/app-toolkit';
|
|
11
|
+
import { AgentPrompt, Chat } from '@dxos/assistant-toolkit';
|
|
12
|
+
import { Blueprint, Operation, Routine } from '@dxos/compute';
|
|
18
13
|
import { Sequence } from '@dxos/conductor';
|
|
19
|
-
import { DXN, Obj } from '@dxos/echo';
|
|
14
|
+
import { DXN, Database, Filter, Obj, type Ref } from '@dxos/echo';
|
|
15
|
+
import { AtomObj } from '@dxos/echo-atom';
|
|
20
16
|
import { invariant } from '@dxos/invariant';
|
|
21
17
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { getActiveSpace } from '@dxos/plugin-space';
|
|
25
|
-
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
26
|
-
import { Query, type Space, getSpace } from '@dxos/react-client/echo';
|
|
18
|
+
import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
19
|
+
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
27
20
|
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
21
|
+
import { ASSISTANT_COMPANION_VARIANT, meta } from '#meta';
|
|
22
|
+
import { AssistantCapabilities, AssistantOperation } from '#types';
|
|
30
23
|
|
|
31
|
-
|
|
24
|
+
/** Operation definitions to seed as `PersistentOperation` records for automation / triggers. */
|
|
25
|
+
const computeOperationsToImport = [AgentPrompt] as const;
|
|
32
26
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
27
|
+
/** Match ECHO objects that are NOT chats. */
|
|
28
|
+
const whenNonChatObject = NodeMatcher.whenAll(
|
|
29
|
+
NodeMatcher.whenEchoObject,
|
|
30
|
+
NodeMatcher.whenNot(NodeMatcher.whenEchoTypeMatches(Chat.Chat)),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export default Capability.makeModule(
|
|
34
|
+
Effect.fnUntraced(function* () {
|
|
35
|
+
const capabilities = yield* Capability.Service;
|
|
36
|
+
|
|
37
|
+
const extensions = yield* Effect.all([
|
|
38
|
+
GraphBuilder.createTypeExtension({
|
|
39
|
+
id: 'root',
|
|
40
|
+
type: Chat.Chat,
|
|
41
|
+
actions: (chat) => {
|
|
42
|
+
return Effect.succeed([
|
|
43
|
+
Node.makeAction({
|
|
44
|
+
id: AssistantOperation.UpdateChatName.meta.key,
|
|
45
|
+
data: () =>
|
|
46
|
+
Effect.gen(function* () {
|
|
47
|
+
// TODO(dmaretskyi): This goes away when composer will have unified operation invocations.
|
|
48
|
+
const db = Obj.getDatabase(chat);
|
|
49
|
+
invariant(db);
|
|
50
|
+
yield* Operation.invoke(AssistantOperation.UpdateChatName, { chat }, { spaceId: db.spaceId });
|
|
51
|
+
}),
|
|
52
|
+
properties: {
|
|
53
|
+
label: ['chat-update-name.label', { ns: meta.id }],
|
|
54
|
+
icon: 'ph--magic-wand--regular',
|
|
55
|
+
disposition: 'list-item',
|
|
56
|
+
},
|
|
60
57
|
}),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}),
|
|
58
|
+
]);
|
|
59
|
+
},
|
|
60
|
+
}),
|
|
65
61
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
62
|
+
GraphBuilder.createExtension({
|
|
63
|
+
id: 'assistant',
|
|
64
|
+
match: NodeMatcher.whenRoot,
|
|
65
|
+
actions: () =>
|
|
66
|
+
Effect.succeed([
|
|
67
|
+
Node.makeAction({
|
|
68
|
+
id: 'import-compute-operations',
|
|
69
|
+
data: Effect.fnUntraced(function* () {
|
|
70
|
+
const capabilities = yield* Capability.Service;
|
|
71
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
72
|
+
const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
|
|
73
|
+
if (!space) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
for (const definition of computeOperationsToImport) {
|
|
77
|
+
const key = definition.meta.key;
|
|
78
|
+
if (!key) {
|
|
79
|
+
continue;
|
|
83
80
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
part: 'dialog',
|
|
88
|
-
subject: ASSISTANT_DIALOG,
|
|
89
|
-
options: {
|
|
90
|
-
state: true,
|
|
91
|
-
blockAlign: 'end',
|
|
92
|
-
props: {
|
|
93
|
-
chat,
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
}),
|
|
81
|
+
const existing = yield* Effect.promise(
|
|
82
|
+
(): Promise<Operation.PersistentOperation[]> =>
|
|
83
|
+
space.db.query(Filter.and(Filter.type(Operation.PersistentOperation), Filter.key(key))).run(),
|
|
97
84
|
);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
},
|
|
85
|
+
if (existing.length === 0) {
|
|
86
|
+
space.db.add(Operation.serialize(definition));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
yield* Database.flush();
|
|
90
|
+
}),
|
|
91
|
+
properties: {
|
|
92
|
+
label: ['import-compute-operations.label', { ns: meta.id }],
|
|
93
|
+
icon: 'ph--download-simple--regular',
|
|
109
94
|
},
|
|
110
|
-
]),
|
|
111
|
-
Option.getOrElse(() => []),
|
|
112
|
-
),
|
|
113
|
-
),
|
|
114
|
-
}),
|
|
115
|
-
|
|
116
|
-
createExtension({
|
|
117
|
-
id: `${meta.id}/companion-chat`,
|
|
118
|
-
connector: (node) => {
|
|
119
|
-
return Atom.make((get) =>
|
|
120
|
-
Function.pipe(
|
|
121
|
-
get(node),
|
|
122
|
-
Option.flatMap((node) => (Obj.isObject(node.data) ? Option.some(node.data) : Option.none())),
|
|
123
|
-
Option.flatMap((object) => {
|
|
124
|
-
const currentChatState = get(
|
|
125
|
-
atomFromSignal(
|
|
126
|
-
() => context.getCapability(AssistantCapabilities.State).currentChat[Obj.getDXN(object).toString()],
|
|
127
|
-
),
|
|
128
|
-
);
|
|
129
|
-
// If no state, continue to allow chat initialization.
|
|
130
|
-
if (!currentChatState) {
|
|
131
|
-
return Option.some({ object, currentChat: undefined });
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const space = getSpace(object);
|
|
135
|
-
const currentChatDxn = DXN.tryParse(currentChatState);
|
|
136
|
-
const currentChatRef = currentChatDxn ? space?.db.ref(currentChatDxn) : undefined;
|
|
137
|
-
const currentChat = get(atomFromSignal(() => currentChatRef?.target));
|
|
138
|
-
return currentChat ? Option.some({ object, currentChat }) : Option.none();
|
|
139
95
|
}),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
label: ['assistant chat label', { ns: meta.id }],
|
|
148
|
-
icon: 'ph--sparkle--regular',
|
|
149
|
-
position: 'hoist',
|
|
150
|
-
disposition: 'hidden',
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
];
|
|
96
|
+
Node.makeAction({
|
|
97
|
+
id: AssistantOperation.ToggleTracePanelDebug.meta.key,
|
|
98
|
+
data: () => Operation.invoke(AssistantOperation.ToggleTracePanelDebug, {}),
|
|
99
|
+
properties: {
|
|
100
|
+
label: ['toggle-trace-panel-debug.label', { ns: meta.id }],
|
|
101
|
+
icon: 'ph--brackets-curly--regular',
|
|
102
|
+
},
|
|
154
103
|
}),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
type: PLANK_COMPANION_TYPE,
|
|
176
|
-
data: 'invocations',
|
|
177
|
-
properties: {
|
|
178
|
-
label: ['invocations label', { ns: meta.id }],
|
|
179
|
-
icon: 'ph--clock-countdown--regular',
|
|
180
|
-
disposition: 'hidden',
|
|
181
|
-
},
|
|
104
|
+
Node.makeAction({
|
|
105
|
+
id: 'reset-blueprints',
|
|
106
|
+
data: Effect.fnUntraced(function* () {
|
|
107
|
+
const capabilities = yield* Capability.Service;
|
|
108
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
109
|
+
const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
|
|
110
|
+
if (!space) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const blueprints = yield* Effect.promise(
|
|
114
|
+
(): Promise<Blueprint.Blueprint[]> => space.db.query(Filter.type(Blueprint.Blueprint)).run(),
|
|
115
|
+
);
|
|
116
|
+
for (const blueprint of blueprints) {
|
|
117
|
+
space.db.remove(blueprint);
|
|
118
|
+
}
|
|
119
|
+
yield* Database.flush();
|
|
120
|
+
}),
|
|
121
|
+
properties: {
|
|
122
|
+
label: ['reset-blueprints.label', { ns: meta.id }],
|
|
123
|
+
icon: 'ph--arrow-clockwise--regular',
|
|
182
124
|
},
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
125
|
+
}),
|
|
126
|
+
]),
|
|
127
|
+
}),
|
|
128
|
+
|
|
129
|
+
// Don't show assistant companion when a chat is already the primary object.
|
|
130
|
+
GraphBuilder.createExtension({
|
|
131
|
+
id: 'companion-chat',
|
|
132
|
+
match: whenNonChatObject,
|
|
133
|
+
connector: (object, get) =>
|
|
134
|
+
Effect.gen(function* () {
|
|
135
|
+
const state = get(yield* Capability.get(AssistantCapabilities.State));
|
|
136
|
+
const cache = get(yield* Capability.get(AssistantCapabilities.CompanionChatCache));
|
|
137
|
+
const objectUri = Obj.getURI(object);
|
|
189
138
|
|
|
190
|
-
//
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
)
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
139
|
+
// Resolve chat from persisted state or transient cache.
|
|
140
|
+
const chat = pipe(
|
|
141
|
+
Option.fromNullable(state.currentChat[objectUri]),
|
|
142
|
+
Option.flatMap((dxnStr) => Option.fromNullable(DXN.tryMake(dxnStr))),
|
|
143
|
+
Option.flatMap((dxn) => Option.fromNullable(Obj.getDatabase(object)?.makeRef(dxn))),
|
|
144
|
+
Option.map((ref) => get(AtomObj.make(ref as Ref.Ref<Obj.Unknown>))),
|
|
145
|
+
Option.filter(Obj.isObject),
|
|
146
|
+
Option.orElse(() => pipe(Option.fromNullable(cache[objectUri]), Option.filter(Obj.isObject))),
|
|
147
|
+
Option.getOrNull,
|
|
148
|
+
);
|
|
200
149
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
150
|
+
return [
|
|
151
|
+
AppNode.makeCompanion({
|
|
152
|
+
id: linkedSegment(ASSISTANT_COMPANION_VARIANT),
|
|
153
|
+
label: ['assistant-chat.label', { ns: meta.id }],
|
|
154
|
+
icon: 'ph--sparkle--regular',
|
|
155
|
+
data: chat,
|
|
156
|
+
position: 'first',
|
|
157
|
+
}),
|
|
158
|
+
];
|
|
159
|
+
}),
|
|
160
|
+
}),
|
|
161
|
+
|
|
162
|
+
GraphBuilder.createExtension({
|
|
163
|
+
id: 'invocations',
|
|
164
|
+
match: NodeMatcher.whenAny(
|
|
165
|
+
NodeMatcher.whenEchoTypeMatches(Sequence.Sequence),
|
|
166
|
+
NodeMatcher.whenEchoTypeMatches(Routine.Routine),
|
|
167
|
+
),
|
|
168
|
+
connector: () =>
|
|
169
|
+
Effect.succeed([
|
|
170
|
+
AppNode.makeCompanion({
|
|
171
|
+
id: 'invocations',
|
|
172
|
+
label: ['invocations.label', { ns: meta.id }],
|
|
173
|
+
icon: 'ph--clock-countdown--regular',
|
|
174
|
+
data: 'invocations',
|
|
175
|
+
}),
|
|
176
|
+
]),
|
|
177
|
+
}),
|
|
178
|
+
|
|
179
|
+
GraphBuilder.createExtension({
|
|
180
|
+
id: 'trace',
|
|
181
|
+
match: NodeMatcher.whenRoot,
|
|
182
|
+
connector: () =>
|
|
183
|
+
Effect.succeed([
|
|
184
|
+
AppNode.makeDeckCompanion({
|
|
185
|
+
id: linkedSegment('trace'),
|
|
186
|
+
label: ['trace.label', { ns: meta.id }],
|
|
187
|
+
icon: 'ph--line-segments--regular',
|
|
188
|
+
data: 'trace' as const,
|
|
189
|
+
position: 'last',
|
|
190
|
+
}),
|
|
191
|
+
]),
|
|
192
|
+
}),
|
|
193
|
+
]);
|
|
205
194
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
return data.object;
|
|
210
|
-
};
|
|
195
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
196
|
+
}),
|
|
197
|
+
);
|
|
@@ -2,65 +2,55 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
7
9
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
AgentBlueprint,
|
|
11
|
+
AgentBlueprintHandlers,
|
|
12
|
+
AgentHandlers,
|
|
13
|
+
AgentWizardBlueprint,
|
|
14
|
+
AgentWizardHandlers,
|
|
15
|
+
BlueprintManagerBlueprint,
|
|
16
|
+
BlueprintManagerHandlers,
|
|
17
|
+
BrowserBlueprint,
|
|
18
|
+
DatabaseBlueprint,
|
|
19
|
+
DatabaseHandlers,
|
|
11
20
|
DiscordBlueprint,
|
|
12
|
-
EntityExtraction,
|
|
13
|
-
Linear,
|
|
14
21
|
LinearBlueprint,
|
|
15
|
-
|
|
16
|
-
ResearchBlueprint,
|
|
17
|
-
SystemToolkit,
|
|
22
|
+
PlanningBlueprint,
|
|
18
23
|
WebSearchBlueprint,
|
|
24
|
+
MemoryBlueprint,
|
|
25
|
+
AutomationBlueprint,
|
|
19
26
|
} from '@dxos/assistant-toolkit';
|
|
20
|
-
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
// TODO(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
// TODO(burdon): Factor out.
|
|
52
|
-
contributes(Capabilities.Functions, [Research.create, Research.research]),
|
|
53
|
-
contributes(Capabilities.BlueprintDefinition, ResearchBlueprint),
|
|
54
|
-
|
|
55
|
-
// TODO(burdon): Factor out.
|
|
56
|
-
contributes(Capabilities.Functions, [Agent.prompt, EntityExtraction.extract]),
|
|
57
|
-
contributes(Capabilities.BlueprintDefinition, WebSearchBlueprint),
|
|
58
|
-
|
|
59
|
-
// TODO(burdon): Factor out.
|
|
60
|
-
contributes(Capabilities.Functions, [Discord.fetch]),
|
|
61
|
-
contributes(Capabilities.BlueprintDefinition, DiscordBlueprint),
|
|
62
|
-
|
|
63
|
-
// TODO(burdon): Factor out.
|
|
64
|
-
contributes(Capabilities.Functions, [Linear.sync]),
|
|
65
|
-
contributes(Capabilities.BlueprintDefinition, LinearBlueprint),
|
|
66
|
-
];
|
|
27
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
28
|
+
import type { Blueprint } from '@dxos/compute';
|
|
29
|
+
|
|
30
|
+
import { AssistantBlueprint } from '#blueprints';
|
|
31
|
+
|
|
32
|
+
// TODO(dmaretskyi): Force this type for all Capability.makeModule calls.
|
|
33
|
+
const blueprintDefinition: () => Effect.Effect<Capability.Capability<unknown>[]> = Capability.makeModule(() =>
|
|
34
|
+
Effect.succeed([
|
|
35
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, AssistantBlueprint),
|
|
36
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, BrowserBlueprint),
|
|
37
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, DatabaseBlueprint),
|
|
38
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, WebSearchBlueprint),
|
|
39
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, DiscordBlueprint),
|
|
40
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, LinearBlueprint),
|
|
41
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, AgentBlueprint),
|
|
42
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, PlanningBlueprint),
|
|
43
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, MemoryBlueprint),
|
|
44
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, AutomationBlueprint),
|
|
45
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, BlueprintManagerBlueprint),
|
|
46
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, AgentWizardBlueprint),
|
|
47
|
+
|
|
48
|
+
Capability.contributes(Capabilities.OperationHandler, AgentHandlers),
|
|
49
|
+
Capability.contributes(Capabilities.OperationHandler, AgentBlueprintHandlers),
|
|
50
|
+
Capability.contributes(Capabilities.OperationHandler, BlueprintManagerHandlers),
|
|
51
|
+
Capability.contributes(Capabilities.OperationHandler, DatabaseHandlers),
|
|
52
|
+
Capability.contributes(Capabilities.OperationHandler, AgentWizardHandlers),
|
|
53
|
+
]),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
export default blueprintDefinition;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Registry } from '@effect-atom/atom-react';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Option from 'effect/Option';
|
|
8
|
+
|
|
9
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
10
|
+
import { Graph, type Node } from '@dxos/app-graph';
|
|
11
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
12
|
+
import { Chat } from '@dxos/assistant-toolkit';
|
|
13
|
+
import { Obj } from '@dxos/echo';
|
|
14
|
+
import { log } from '@dxos/log';
|
|
15
|
+
import { DeckCapabilities, PLANK_COMPANION_TYPE, type StoredDeckState } from '@dxos/plugin-deck';
|
|
16
|
+
import { getLinkedVariant } from '@dxos/react-ui-attention';
|
|
17
|
+
import { byPosition } from '@dxos/util';
|
|
18
|
+
|
|
19
|
+
import { ASSISTANT_COMPANION_VARIANT } from '#meta';
|
|
20
|
+
import { AssistantCapabilities, AssistantOperation } from '#types';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Non-React capability that watches deck companion state and provisions transient chats
|
|
24
|
+
* for active planks when the assistant companion is selected.
|
|
25
|
+
*/
|
|
26
|
+
export default Capability.makeModule(
|
|
27
|
+
Effect.fnUntraced(function* () {
|
|
28
|
+
const operationInvoker = yield* Capability.get(Capabilities.OperationInvoker);
|
|
29
|
+
const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
|
|
30
|
+
const registry: Registry.Registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
31
|
+
const deckStateAtom = yield* Capability.get(DeckCapabilities.State);
|
|
32
|
+
const cacheAtom = yield* Capability.get(AssistantCapabilities.CompanionChatCache);
|
|
33
|
+
const stateAtom = yield* Capability.get(AssistantCapabilities.State);
|
|
34
|
+
|
|
35
|
+
const plankSubs = new Map<string, () => void>();
|
|
36
|
+
|
|
37
|
+
/** Unsubscribe a single plank and remove it from the map. */
|
|
38
|
+
const unsubPlank = (plankId: string) => {
|
|
39
|
+
plankSubs.get(plankId)?.();
|
|
40
|
+
plankSubs.delete(plankId);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** Unsubscribe all per-plank subscriptions. */
|
|
44
|
+
const unsubAllPlanks = () => {
|
|
45
|
+
for (const unsub of plankSubs.values()) {
|
|
46
|
+
unsub();
|
|
47
|
+
}
|
|
48
|
+
plankSubs.clear();
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Attempt to provision for a single plank.
|
|
53
|
+
* Returns true when the plank is resolved (provisioned or already cached)
|
|
54
|
+
* so the caller can tear down the connection subscription.
|
|
55
|
+
*/
|
|
56
|
+
const provisionForPlank = (plankId: string, companionVariant: string | undefined): boolean => {
|
|
57
|
+
const node: Node.Node | null = Graph.getNode(graph, plankId).pipe(Option.getOrNull);
|
|
58
|
+
if (!node || !Obj.isObject(node.data) || Obj.instanceOf(Chat.Chat, node.data)) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (resolveEffectiveVariant(graph, plankId, companionVariant) !== ASSISTANT_COMPANION_VARIANT) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const object = node.data;
|
|
67
|
+
const companionUri = Obj.getURI(object);
|
|
68
|
+
const cache = registry.get(cacheAtom);
|
|
69
|
+
if (cache[companionUri]) {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const db = Obj.getDatabase(object);
|
|
74
|
+
if (!db) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
void operationInvoker
|
|
79
|
+
.invokePromise(AssistantOperation.EnsureCompanionChat, { db, companionTo: object })
|
|
80
|
+
.catch((error) => log.warn('Failed to provision companion chat', { plankId, error }));
|
|
81
|
+
|
|
82
|
+
return false;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const provision = () => {
|
|
86
|
+
const deckState: StoredDeckState = registry.get(deckStateAtom);
|
|
87
|
+
const deck = deckState.decks[deckState.activeDeck];
|
|
88
|
+
if (!deck?.companionOpen) {
|
|
89
|
+
unsubAllPlanks();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const plankIds = new Set(deck.solo ? [deck.solo] : deck.active);
|
|
94
|
+
|
|
95
|
+
// Remove subscriptions for planks that are no longer active.
|
|
96
|
+
for (const trackedId of plankSubs.keys()) {
|
|
97
|
+
if (!plankIds.has(trackedId)) {
|
|
98
|
+
unsubPlank(trackedId);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
for (const plankId of plankIds) {
|
|
103
|
+
const resolved = provisionForPlank(plankId, deck.companionVariant);
|
|
104
|
+
|
|
105
|
+
if (resolved) {
|
|
106
|
+
// Already provisioned — no need to watch connections.
|
|
107
|
+
unsubPlank(plankId);
|
|
108
|
+
} else if (!plankSubs.has(plankId)) {
|
|
109
|
+
// Not yet resolved — subscribe to child connections so we re-try
|
|
110
|
+
// when graph builder extensions add companion nodes (after expand).
|
|
111
|
+
plankSubs.set(
|
|
112
|
+
plankId,
|
|
113
|
+
registry.subscribe(graph.connections(plankId, 'child'), () => {
|
|
114
|
+
if (provisionForPlank(plankId, deck.companionVariant)) {
|
|
115
|
+
unsubPlank(plankId);
|
|
116
|
+
}
|
|
117
|
+
}),
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
provision();
|
|
124
|
+
|
|
125
|
+
const unsub1 = registry.subscribe(deckStateAtom, provision);
|
|
126
|
+
const unsub2 = registry.subscribe(stateAtom, provision);
|
|
127
|
+
|
|
128
|
+
return Capability.contributes(Capabilities.Null, null, () =>
|
|
129
|
+
Effect.sync(() => {
|
|
130
|
+
unsub1();
|
|
131
|
+
unsub2();
|
|
132
|
+
unsubAllPlanks();
|
|
133
|
+
}),
|
|
134
|
+
);
|
|
135
|
+
}),
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Mirrors useSelectedCompanion fallback logic outside of React.
|
|
140
|
+
* Returns the variant that would actually be rendered for a given plank.
|
|
141
|
+
*/
|
|
142
|
+
const resolveEffectiveVariant = (
|
|
143
|
+
graph: Graph.BaseGraph,
|
|
144
|
+
plankId: string,
|
|
145
|
+
preferredVariant: string | undefined,
|
|
146
|
+
): string | undefined => {
|
|
147
|
+
const companions = Graph.getConnections(graph, plankId, 'child')
|
|
148
|
+
.filter((node) => node.type === PLANK_COMPANION_TYPE)
|
|
149
|
+
.toSorted((a, b) => byPosition(a.properties, b.properties));
|
|
150
|
+
|
|
151
|
+
if (companions.length === 0) {
|
|
152
|
+
return undefined;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (preferredVariant) {
|
|
156
|
+
const preferred = companions.find((companion) => getLinkedVariant(companion.id) === preferredVariant);
|
|
157
|
+
if (preferred) {
|
|
158
|
+
return getLinkedVariant(preferred.id);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return getLinkedVariant(companions[0].id);
|
|
163
|
+
};
|