@dxos/plugin-assistant 0.8.4-main.9735255 → 0.8.4-main.abd8ff62ef
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/AssistantSettings-GG52BLKS.mjs +40 -0
- package/dist/lib/browser/AssistantSettings-GG52BLKS.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +27 -8
- package/dist/lib/browser/blueprints/index.mjs.map +4 -4
- package/dist/lib/browser/chunk-DVOOFAWU.mjs +175 -0
- package/dist/lib/browser/chunk-DVOOFAWU.mjs.map +7 -0
- package/dist/lib/browser/chunk-M55MBYG7.mjs +932 -0
- package/dist/lib/browser/chunk-M55MBYG7.mjs.map +7 -0
- package/dist/lib/browser/chunk-SEMCG4ZK.mjs +195 -0
- package/dist/lib/browser/chunk-SEMCG4ZK.mjs.map +7 -0
- package/dist/lib/browser/chunk-VK53MITK.mjs +2300 -0
- package/dist/lib/browser/chunk-VK53MITK.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +73 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/components/index.mjs +20 -0
- package/dist/lib/browser/create-chat-E2ZLVTLP.mjs +73 -0
- package/dist/lib/browser/create-chat-E2ZLVTLP.mjs.map +7 -0
- package/dist/lib/browser/ensure-companion-chat-7GDMXSQW.mjs +65 -0
- package/dist/lib/browser/ensure-companion-chat-7GDMXSQW.mjs.map +7 -0
- package/dist/lib/browser/hooks/index.mjs +39 -0
- package/dist/lib/browser/index.mjs +37 -309
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/on-create-space-4J3KTNAJ.mjs +22 -0
- package/dist/lib/browser/on-create-space-4J3KTNAJ.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +13 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/resolve-navigation-targets-3ZPQE6SZ.mjs +22 -0
- package/dist/lib/browser/resolve-navigation-targets-3ZPQE6SZ.mjs.map +7 -0
- package/dist/lib/browser/run-prompt-in-new-chat-AA3KPBDN.mjs +106 -0
- package/dist/lib/browser/run-prompt-in-new-chat-AA3KPBDN.mjs.map +7 -0
- package/dist/lib/browser/set-current-chat-P4VHI3YF.mjs +54 -0
- package/dist/lib/browser/set-current-chat-P4VHI3YF.mjs.map +7 -0
- package/dist/lib/browser/translations.mjs +172 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -6
- package/dist/lib/browser/update-chat-name-VWKNUON7.mjs +56 -0
- package/dist/lib/browser/update-chat-name-VWKNUON7.mjs.map +7 -0
- package/dist/lib/node-esm/AssistantSettings-23A5IMHS.mjs +41 -0
- package/dist/lib/node-esm/AssistantSettings-23A5IMHS.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +27 -8
- package/dist/lib/node-esm/blueprints/index.mjs.map +4 -4
- package/dist/lib/node-esm/chunk-FWC3ZGPH.mjs +933 -0
- package/dist/lib/node-esm/chunk-FWC3ZGPH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-JKEB3NFZ.mjs +2302 -0
- package/dist/lib/node-esm/chunk-JKEB3NFZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MBDVPB4V.mjs +176 -0
- package/dist/lib/node-esm/chunk-MBDVPB4V.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XAFVSEUJ.mjs +196 -0
- package/dist/lib/node-esm/chunk-XAFVSEUJ.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +74 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/components/index.mjs +21 -0
- package/dist/lib/node-esm/components/index.mjs.map +7 -0
- package/dist/lib/node-esm/create-chat-UQQ3542N.mjs +74 -0
- package/dist/lib/node-esm/create-chat-UQQ3542N.mjs.map +7 -0
- package/dist/lib/node-esm/ensure-companion-chat-LVCPD4DJ.mjs +66 -0
- package/dist/lib/node-esm/ensure-companion-chat-LVCPD4DJ.mjs.map +7 -0
- package/dist/lib/node-esm/hooks/index.mjs +40 -0
- package/dist/lib/node-esm/hooks/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +37 -309
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/on-create-space-M63UBTTT.mjs +23 -0
- package/dist/lib/node-esm/on-create-space-M63UBTTT.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +14 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/resolve-navigation-targets-HO77CAFT.mjs +23 -0
- package/dist/lib/node-esm/resolve-navigation-targets-HO77CAFT.mjs.map +7 -0
- package/dist/lib/node-esm/run-prompt-in-new-chat-RIRYYYPK.mjs +107 -0
- package/dist/lib/node-esm/run-prompt-in-new-chat-RIRYYYPK.mjs.map +7 -0
- package/dist/lib/node-esm/set-current-chat-Z7GJ52VX.mjs +55 -0
- package/dist/lib/node-esm/set-current-chat-Z7GJ52VX.mjs.map +7 -0
- package/dist/lib/node-esm/translations.mjs +173 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -6
- package/dist/lib/node-esm/update-chat-name-GV4HX32Z.mjs +57 -0
- package/dist/lib/node-esm/update-chat-name-GV4HX32Z.mjs.map +7 -0
- package/dist/types/src/AssistantPlugin.d.ts +1 -0
- 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/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.test.d.ts +2 -0
- package/dist/types/src/blueprints/assistant/blueprint.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 +1 -6
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +6 -0
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- 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/edge-model-resolver.d.ts +7 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +29 -11
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +16 -0
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
- 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 +5 -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 +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +6 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts +21 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit.d.ts +6 -0
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +10 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +4 -6
- 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 +36 -42
- 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/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 +6 -2
- 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.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 +7 -4
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +8 -313
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- 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 +18 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/sync.d.ts +44 -17
- 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 +25 -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/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 -305
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +3 -3
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +1 -305
- 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 +4 -13
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +11 -9
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +1 -305
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -12
- 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/AgentProperties.stories.d.ts +16 -0
- package/dist/types/src/containers/AgentProperties/AgentProperties.stories.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/ChatCompanion/ChatCompanion.d.ts +18 -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/containers/ChatContainer/ChatContainer.d.ts +12 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts +2 -0
- package/dist/types/src/containers/ChatContainer/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/RoutineArticle/RoutineArticle.d.ts +6 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.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 +13 -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/execution-graph.d.ts +97 -0
- package/dist/types/src/containers/TracePanel/execution-graph.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts +2 -0
- package/dist/types/src/containers/TracePanel/execution-graph.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 +12 -0
- package/dist/types/src/containers/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/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +1 -1
- 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 +3 -6
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts +2 -2
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextBinder.d.ts +3 -2
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- 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 +1 -1
- package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -1
- 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 +3 -5
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -0
- 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/definitions.d.ts +140 -0
- package/dist/types/src/operations/definitions.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 +4 -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.test.d.ts +2 -0
- package/dist/types/src/operations/prompt.test.d.ts.map +1 -0
- package/dist/types/src/operations/resolve-navigation-targets.d.ts +15 -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/update-chat-name.d.ts +5 -0
- package/dist/types/src/operations/update-chat-name.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 +53 -30
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/queue-logger.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- 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-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.test.d.ts +2 -0
- package/dist/types/src/testing/trace-timeline.test.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -305
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +33 -39
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +26 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +12 -13
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +1 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +1 -1
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +144 -102
- package/src/AssistantPlugin.node.ts +125 -0
- package/src/AssistantPlugin.test.ts +35 -0
- package/src/AssistantPlugin.tsx +161 -59
- package/src/blueprints/assistant/blueprint.test.ts +46 -0
- package/src/blueprints/assistant/blueprint.ts +31 -0
- package/src/blueprints/assistant/index.ts +5 -0
- package/src/blueprints/index.ts +1 -8
- package/src/capabilities/{ai-service/ai-service.ts → ai-service.ts} +4 -3
- package/src/capabilities/app-graph-builder.ts +161 -0
- package/src/capabilities/blueprint-definition.ts +56 -0
- package/src/capabilities/companion-chat-provisioner.ts +164 -0
- package/src/capabilities/{edge-model-resolver/edge-model-resolver.ts → edge-model-resolver.ts} +4 -3
- package/src/capabilities/index.ts +23 -11
- package/src/capabilities/{local-model-resolver/local-model-resolver.ts → local-model-resolver.ts} +17 -6
- 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 +167 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +5 -4
- package/src/capabilities/{state/state.ts → state.ts} +11 -3
- package/src/capabilities/toolkit.ts +13 -0
- package/src/{components/Typewriter → cli}/index.ts +1 -1
- package/src/cli/plugin.ts +83 -0
- package/src/components/AssistantSettings/AssistantSettings.stories.tsx +35 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +30 -107
- package/src/components/AssistantSettings/index.ts +2 -2
- package/src/components/Chat/Chat.tsx +103 -264
- package/src/components/Chat/context.ts +39 -0
- package/src/components/ChatPrompt/ChatActions.tsx +33 -13
- package/src/components/ChatPrompt/ChatMcpErrors.tsx +50 -0
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +136 -0
- package/src/components/ChatPrompt/ChatOptions.tsx +248 -42
- package/src/components/ChatPrompt/ChatPrompt.tsx +182 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +18 -8
- package/src/components/ChatPrompt/ChatStatus.tsx +123 -0
- package/src/components/ChatPrompt/index.ts +3 -0
- package/src/components/ChatThread/Anchor.stories.tsx +95 -0
- package/src/components/ChatThread/ChatThread.stories.tsx +64 -71
- package/src/components/ChatThread/ChatThread.tsx +50 -24
- package/src/components/ChatThread/DEBUG.md +41 -0
- package/src/components/ChatThread/Link.tsx +1 -1
- package/src/components/ChatThread/MarkdownStream.stories.tsx +281 -0
- package/src/components/ChatThread/registry.tsx +167 -55
- package/src/components/ChatThread/sync.test.ts +182 -20
- package/src/components/ChatThread/sync.ts +93 -97
- 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 +133 -0
- package/src/components/ChatThread/widgets/SuggestionWidget.ts +41 -0
- package/src/components/ChatThread/widgets/SummaryWidget.tsx +29 -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 +118 -0
- package/src/components/ProcessTree/index.ts +5 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +6 -10
- package/src/components/TemplateEditor/TemplateEditor.tsx +51 -43
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +9 -7
- package/src/components/TemplateEditor/TemplateForm.tsx +12 -13
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +5 -5
- package/src/components/ToolBlock/ToolBlock.tsx +22 -21
- package/src/components/Toolbox/Toolbox.stories.tsx +5 -6
- package/src/components/Toolbox/Toolbox.tsx +67 -61
- package/src/components/index.ts +3 -7
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +120 -0
- package/src/containers/AgentArticle/AgentArticle.tsx +200 -0
- package/src/containers/AgentArticle/index.ts +5 -0
- package/src/containers/AgentProperties/AgentProperties.stories.tsx +101 -0
- package/src/containers/AgentProperties/AgentProperties.tsx +127 -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/{components → containers/ChatCompanion}/ChatCompanion.tsx +24 -45
- package/src/containers/ChatCompanion/index.ts +5 -0
- package/src/containers/ChatContainer/ChatContainer.tsx +105 -0
- package/src/containers/ChatContainer/index.ts +5 -0
- package/src/{components → containers/ChatDialog}/ChatDialog.tsx +11 -19
- package/src/containers/ChatDialog/index.ts +5 -0
- package/src/containers/RoutineArticle/RoutineArticle.tsx +59 -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 +278 -0
- package/src/containers/TracePanel/TracePanel.tsx +138 -0
- package/src/containers/TracePanel/dxn-extractor.test.ts +153 -0
- package/src/containers/TracePanel/dxn-extractor.ts +178 -0
- package/src/containers/TracePanel/execution-graph.test.ts +382 -0
- package/src/containers/TracePanel/execution-graph.ts +579 -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 +16 -0
- package/src/extensions/index.ts +5 -0
- package/src/extensions/prompt-extension.ts +111 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useBlueprintRegistry.ts +9 -5
- package/src/hooks/useChatKeymap.ts +52 -0
- package/src/hooks/useChatProcessor.ts +38 -25
- package/src/hooks/useChatServices.ts +7 -28
- package/src/hooks/useChatToolbarActions.ts +13 -12
- package/src/hooks/useContextBinder.ts +17 -6
- package/src/hooks/useContextObjects.ts +8 -4
- package/src/hooks/useDebug.ts +38 -0
- package/src/hooks/useFilteredTypes.ts +3 -3
- package/src/hooks/usePresets.ts +2 -1
- package/src/hooks/useReferencesProvider.ts +1 -5
- package/src/index.ts +8 -6
- package/src/meta.ts +6 -3
- package/src/operations/create-chat.ts +79 -0
- package/src/operations/definitions.ts +126 -0
- package/src/operations/ensure-companion-chat.ts +61 -0
- package/src/operations/index.ts +17 -0
- package/src/operations/on-create-space.ts +24 -0
- package/src/operations/prompt.test.ts +77 -0
- package/src/operations/resolve-navigation-targets.ts +26 -0
- package/src/operations/run-prompt-in-new-chat.ts +112 -0
- package/src/operations/set-current-chat.ts +50 -0
- package/src/operations/update-chat-name.ts +61 -0
- package/src/processor/index.ts +0 -1
- package/src/processor/presets.ts +11 -3
- package/src/processor/processor.test.ts +18 -50
- package/src/processor/processor.ts +226 -149
- package/src/queue-logger.ts +19 -8
- package/src/testing/data/trace-timeline.dx.json +4657 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/test-generator.test.ts +81 -0
- package/src/testing/test-generator.ts +79 -42
- package/src/testing/test-sequence.ts +3 -3
- package/src/testing/test-services.ts +2 -2
- package/src/testing/test-trace.ts +20 -0
- package/src/testing/trace-timeline.conversations.json +1 -0
- package/src/testing/trace-timeline.test.ts +249 -0
- package/src/translations.ts +155 -89
- package/src/types/Assistant.ts +16 -53
- package/src/types/Settings.ts +76 -0
- package/src/types/capabilities.ts +11 -3
- package/src/types/events.ts +2 -2
- package/src/types/index.ts +3 -2
- package/src/types/service.ts +5 -5
- package/dist/lib/browser/BlueprintArticle-WP3G5GLG.mjs +0 -31
- package/dist/lib/browser/BlueprintArticle-WP3G5GLG.mjs.map +0 -7
- package/dist/lib/browser/ChatCompanion-ECQYUQ2B.mjs +0 -153
- package/dist/lib/browser/ChatCompanion-ECQYUQ2B.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-QCCOFBUX.mjs +0 -73
- package/dist/lib/browser/ChatContainer-QCCOFBUX.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-SMK4RSZU.mjs +0 -85
- package/dist/lib/browser/ChatDialog-SMK4RSZU.mjs.map +0 -7
- package/dist/lib/browser/PromptArticle-K362ZPAE.mjs +0 -53
- package/dist/lib/browser/PromptArticle-K362ZPAE.mjs.map +0 -7
- package/dist/lib/browser/ai-service-5GUDOEWF.mjs +0 -21
- package/dist/lib/browser/ai-service-5GUDOEWF.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-DSNH2OMY.mjs +0 -212
- package/dist/lib/browser/app-graph-builder-DSNH2OMY.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-DGHH7MUU.mjs +0 -14
- package/dist/lib/browser/chunk-3JYPE2MM.mjs +0 -1832
- package/dist/lib/browser/chunk-3JYPE2MM.mjs.map +0 -7
- package/dist/lib/browser/chunk-DKQMSMBN.mjs +0 -326
- package/dist/lib/browser/chunk-DKQMSMBN.mjs.map +0 -7
- package/dist/lib/browser/chunk-EXVT7D4B.mjs +0 -23
- package/dist/lib/browser/chunk-EXVT7D4B.mjs.map +0 -7
- package/dist/lib/browser/chunk-ML3QCFKA.mjs +0 -265
- package/dist/lib/browser/chunk-ML3QCFKA.mjs.map +0 -7
- package/dist/lib/browser/chunk-MRJVYGLU.mjs +0 -208
- package/dist/lib/browser/chunk-MRJVYGLU.mjs.map +0 -7
- package/dist/lib/browser/chunk-V772AMZM.mjs +0 -250
- package/dist/lib/browser/chunk-V772AMZM.mjs.map +0 -7
- package/dist/lib/browser/chunk-WGQTU6UJ.mjs +0 -41
- package/dist/lib/browser/chunk-WGQTU6UJ.mjs.map +0 -7
- package/dist/lib/browser/edge-model-resolver-26BOY6HY.mjs +0 -20
- package/dist/lib/browser/edge-model-resolver-26BOY6HY.mjs.map +0 -7
- package/dist/lib/browser/local-model-resolver-ZFIM6GGV.mjs +0 -19
- package/dist/lib/browser/local-model-resolver-ZFIM6GGV.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-7XJLBRQY.mjs +0 -132
- package/dist/lib/browser/operation-resolver-7XJLBRQY.mjs.map +0 -7
- package/dist/lib/browser/react-surface-NCITRSJJ.mjs +0 -109
- package/dist/lib/browser/react-surface-NCITRSJJ.mjs.map +0 -7
- package/dist/lib/browser/repair-6QGAKOVM.mjs +0 -54
- package/dist/lib/browser/repair-6QGAKOVM.mjs.map +0 -7
- package/dist/lib/browser/settings-4ZDLUMYE.mjs +0 -32
- package/dist/lib/browser/settings-4ZDLUMYE.mjs.map +0 -7
- package/dist/lib/browser/state-AN6336ZX.mjs +0 -26
- package/dist/lib/browser/state-AN6336ZX.mjs.map +0 -7
- package/dist/lib/browser/toolkit-7AVTEPMA.mjs +0 -18
- package/dist/lib/browser/toolkit-7AVTEPMA.mjs.map +0 -7
- package/dist/lib/node-esm/BlueprintArticle-WZ76E2C4.mjs +0 -32
- package/dist/lib/node-esm/BlueprintArticle-WZ76E2C4.mjs.map +0 -7
- package/dist/lib/node-esm/ChatCompanion-Q4FUZ2MW.mjs +0 -154
- package/dist/lib/node-esm/ChatCompanion-Q4FUZ2MW.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-AKI33HIB.mjs +0 -74
- package/dist/lib/node-esm/ChatContainer-AKI33HIB.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-AP45PVZR.mjs +0 -86
- package/dist/lib/node-esm/ChatDialog-AP45PVZR.mjs.map +0 -7
- package/dist/lib/node-esm/PromptArticle-D4HAIIC6.mjs +0 -54
- package/dist/lib/node-esm/PromptArticle-D4HAIIC6.mjs.map +0 -7
- package/dist/lib/node-esm/ai-service-PXKKCFIF.mjs +0 -22
- package/dist/lib/node-esm/ai-service-PXKKCFIF.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-TJCUEXW5.mjs +0 -213
- package/dist/lib/node-esm/app-graph-builder-TJCUEXW5.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-SEMDEIYG.mjs +0 -15
- package/dist/lib/node-esm/chunk-355W5B27.mjs +0 -251
- package/dist/lib/node-esm/chunk-355W5B27.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-75PHXBN3.mjs +0 -327
- package/dist/lib/node-esm/chunk-75PHXBN3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DCA5QWQT.mjs +0 -209
- package/dist/lib/node-esm/chunk-DCA5QWQT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MSBPC4RJ.mjs +0 -42
- package/dist/lib/node-esm/chunk-MSBPC4RJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-POWB2BPC.mjs +0 -25
- package/dist/lib/node-esm/chunk-POWB2BPC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XI5T3MJC.mjs +0 -1833
- package/dist/lib/node-esm/chunk-XI5T3MJC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZRIPP7YF.mjs +0 -267
- package/dist/lib/node-esm/chunk-ZRIPP7YF.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-G5KMODPO.mjs +0 -21
- package/dist/lib/node-esm/edge-model-resolver-G5KMODPO.mjs.map +0 -7
- package/dist/lib/node-esm/local-model-resolver-KDZLYI7Y.mjs +0 -20
- package/dist/lib/node-esm/local-model-resolver-KDZLYI7Y.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-SX4WMNA7.mjs +0 -133
- package/dist/lib/node-esm/operation-resolver-SX4WMNA7.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-ST6V7LPE.mjs +0 -110
- package/dist/lib/node-esm/react-surface-ST6V7LPE.mjs.map +0 -7
- package/dist/lib/node-esm/repair-QJ7CQDKU.mjs +0 -55
- package/dist/lib/node-esm/repair-QJ7CQDKU.mjs.map +0 -7
- package/dist/lib/node-esm/settings-CQEOHR3R.mjs +0 -33
- package/dist/lib/node-esm/settings-CQEOHR3R.mjs.map +0 -7
- package/dist/lib/node-esm/state-HDON4REW.mjs +0 -27
- package/dist/lib/node-esm/state-HDON4REW.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-OWGCEKOO.mjs +0 -19
- package/dist/lib/node-esm/toolkit-OWGCEKOO.mjs.map +0 -7
- package/dist/types/src/blueprints/assistant-blueprint.d.ts +0 -209
- package/dist/types/src/blueprints/assistant-blueprint.d.ts.map +0 -1
- package/dist/types/src/capabilities/ai-service/ai-service.d.ts +0 -5
- package/dist/types/src/capabilities/ai-service/ai-service.d.ts.map +0 -1
- package/dist/types/src/capabilities/ai-service/index.d.ts +0 -3
- package/dist/types/src/capabilities/ai-service/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -21
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -4
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts +0 -6
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/edge-model-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/edge-model-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/local-model-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/local-model-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts +0 -12
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair/index.d.ts +0 -3
- package/dist/types/src/capabilities/repair/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair/repair.d.ts +0 -6
- package/dist/types/src/capabilities/repair/repair.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -15
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts +0 -17
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -11
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts +0 -13
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/capabilities/toolkit/index.d.ts +0 -3
- package/dist/types/src/capabilities/toolkit/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts +0 -5
- package/dist/types/src/capabilities/toolkit/toolkit.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 -19
- 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/PromptArticle.d.ts +0 -7
- package/dist/types/src/components/PromptArticle.d.ts.map +0 -1
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts +0 -12
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts.map +0 -1
- package/dist/types/src/components/Typewriter/Typewriter.d.ts +0 -11
- package/dist/types/src/components/Typewriter/Typewriter.d.ts.map +0 -1
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts +0 -7
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts.map +0 -1
- package/dist/types/src/components/Typewriter/assistant-extension.d.ts +0 -5
- package/dist/types/src/components/Typewriter/assistant-extension.d.ts.map +0 -1
- package/dist/types/src/components/Typewriter/index.d.ts +0 -2
- package/dist/types/src/components/Typewriter/index.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/functions/object-search.d.ts +0 -10
- package/dist/types/src/functions/object-search.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/types/AssistantAction.d.ts +0 -95
- 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/blueprints/assistant-blueprint.ts +0 -62
- package/src/capabilities/ai-service/index.ts +0 -7
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -180
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +0 -60
- package/src/capabilities/blueprint-definition/index.ts +0 -8
- package/src/capabilities/edge-model-resolver/index.ts +0 -7
- package/src/capabilities/local-model-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -110
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -95
- package/src/capabilities/repair/index.ts +0 -7
- package/src/capabilities/repair/repair.ts +0 -63
- package/src/capabilities/settings/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/capabilities/toolkit/index.ts +0 -7
- package/src/capabilities/toolkit/toolkit.ts +0 -26
- package/src/components/BlueprintArticle.tsx +0 -29
- package/src/components/ChatContainer.tsx +0 -61
- package/src/components/ChatProgress/ChatProgress.tsx +0 -54
- package/src/components/ChatProgress/index.ts +0 -5
- package/src/components/PromptArticle.tsx +0 -50
- package/src/components/Typewriter/AssistantToolbar.tsx +0 -161
- package/src/components/Typewriter/Typewriter.stories.tsx +0 -83
- package/src/components/Typewriter/Typewriter.tsx +0 -54
- package/src/components/Typewriter/assistant-extension.tsx +0 -144
- package/src/functions/index.ts +0 -7
- package/src/functions/object-list.ts +0 -49
- package/src/functions/object-load.ts +0 -47
- package/src/functions/object-search.ts +0 -46
- package/src/processor/update-name.ts +0 -59
- package/src/types/AssistantAction.ts +0 -75
- package/src/types/defs.ts +0 -5
- /package/dist/lib/browser/{blueprint-definition-DGHH7MUU.mjs.map → components/index.mjs.map} +0 -0
- /package/dist/lib/{node-esm/blueprint-definition-SEMDEIYG.mjs.map → browser/hooks/index.mjs.map} +0 -0
|
@@ -0,0 +1,164 @@
|
|
|
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/types';
|
|
16
|
+
import { getLinkedVariant } from '@dxos/react-ui-attention';
|
|
17
|
+
import { byPosition } from '@dxos/util';
|
|
18
|
+
|
|
19
|
+
import { ASSISTANT_COMPANION_VARIANT } from '#meta';
|
|
20
|
+
import { AssistantOperation } from '#operations';
|
|
21
|
+
import { AssistantCapabilities } from '#types';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Non-React capability that watches deck companion state and provisions transient chats
|
|
25
|
+
* for active planks when the assistant companion is selected.
|
|
26
|
+
*/
|
|
27
|
+
export default Capability.makeModule(
|
|
28
|
+
Effect.fnUntraced(function* () {
|
|
29
|
+
const operationInvoker = yield* Capability.get(Capabilities.OperationInvoker);
|
|
30
|
+
const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
|
|
31
|
+
const registry: Registry.Registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
32
|
+
const deckStateAtom = yield* Capability.get(DeckCapabilities.State);
|
|
33
|
+
const cacheAtom = yield* Capability.get(AssistantCapabilities.CompanionChatCache);
|
|
34
|
+
const stateAtom = yield* Capability.get(AssistantCapabilities.State);
|
|
35
|
+
|
|
36
|
+
const plankSubs = new Map<string, () => void>();
|
|
37
|
+
|
|
38
|
+
/** Unsubscribe a single plank and remove it from the map. */
|
|
39
|
+
const unsubPlank = (plankId: string) => {
|
|
40
|
+
plankSubs.get(plankId)?.();
|
|
41
|
+
plankSubs.delete(plankId);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** Unsubscribe all per-plank subscriptions. */
|
|
45
|
+
const unsubAllPlanks = () => {
|
|
46
|
+
for (const unsub of plankSubs.values()) {
|
|
47
|
+
unsub();
|
|
48
|
+
}
|
|
49
|
+
plankSubs.clear();
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Attempt to provision for a single plank.
|
|
54
|
+
* Returns true when the plank is resolved (provisioned or already cached)
|
|
55
|
+
* so the caller can tear down the connection subscription.
|
|
56
|
+
*/
|
|
57
|
+
const provisionForPlank = (plankId: string, companionVariant: string | undefined): boolean => {
|
|
58
|
+
const node: Node.Node | null = Graph.getNode(graph, plankId).pipe(Option.getOrNull);
|
|
59
|
+
if (!node || !Obj.isObject(node.data) || Obj.instanceOf(Chat.Chat, node.data)) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (resolveEffectiveVariant(graph, plankId, companionVariant) !== ASSISTANT_COMPANION_VARIANT) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const object = node.data;
|
|
68
|
+
const companionDxn = Obj.getDXN(object).toString();
|
|
69
|
+
const cache = registry.get(cacheAtom);
|
|
70
|
+
if (cache[companionDxn]) {
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const db = Obj.getDatabase(object);
|
|
75
|
+
if (!db) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
void operationInvoker
|
|
80
|
+
.invokePromise(AssistantOperation.EnsureCompanionChat, { db, companionTo: object })
|
|
81
|
+
.catch((error) => log.warn('Failed to provision companion chat', { plankId, error }));
|
|
82
|
+
|
|
83
|
+
return false;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const provision = () => {
|
|
87
|
+
const deckState: StoredDeckState = registry.get(deckStateAtom);
|
|
88
|
+
const deck = deckState.decks[deckState.activeDeck];
|
|
89
|
+
if (!deck?.companionOpen) {
|
|
90
|
+
unsubAllPlanks();
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const plankIds = new Set(deck.solo ? [deck.solo] : deck.active);
|
|
95
|
+
|
|
96
|
+
// Remove subscriptions for planks that are no longer active.
|
|
97
|
+
for (const trackedId of plankSubs.keys()) {
|
|
98
|
+
if (!plankIds.has(trackedId)) {
|
|
99
|
+
unsubPlank(trackedId);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
for (const plankId of plankIds) {
|
|
104
|
+
const resolved = provisionForPlank(plankId, deck.companionVariant);
|
|
105
|
+
|
|
106
|
+
if (resolved) {
|
|
107
|
+
// Already provisioned — no need to watch connections.
|
|
108
|
+
unsubPlank(plankId);
|
|
109
|
+
} else if (!plankSubs.has(plankId)) {
|
|
110
|
+
// Not yet resolved — subscribe to child connections so we re-try
|
|
111
|
+
// when graph builder extensions add companion nodes (after expand).
|
|
112
|
+
plankSubs.set(
|
|
113
|
+
plankId,
|
|
114
|
+
registry.subscribe(graph.connections(plankId, 'child'), () => {
|
|
115
|
+
if (provisionForPlank(plankId, deck.companionVariant)) {
|
|
116
|
+
unsubPlank(plankId);
|
|
117
|
+
}
|
|
118
|
+
}),
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
provision();
|
|
125
|
+
|
|
126
|
+
const unsub1 = registry.subscribe(deckStateAtom, provision);
|
|
127
|
+
const unsub2 = registry.subscribe(stateAtom, provision);
|
|
128
|
+
|
|
129
|
+
return Capability.contributes(Capabilities.Null, null, () =>
|
|
130
|
+
Effect.sync(() => {
|
|
131
|
+
unsub1();
|
|
132
|
+
unsub2();
|
|
133
|
+
unsubAllPlanks();
|
|
134
|
+
}),
|
|
135
|
+
);
|
|
136
|
+
}),
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Mirrors useSelectedCompanion fallback logic outside of React.
|
|
141
|
+
* Returns the variant that would actually be rendered for a given plank.
|
|
142
|
+
*/
|
|
143
|
+
const resolveEffectiveVariant = (
|
|
144
|
+
graph: Graph.BaseGraph,
|
|
145
|
+
plankId: string,
|
|
146
|
+
preferredVariant: string | undefined,
|
|
147
|
+
): string | undefined => {
|
|
148
|
+
const companions = Graph.getConnections(graph, plankId, 'child')
|
|
149
|
+
.filter((node) => node.type === PLANK_COMPANION_TYPE)
|
|
150
|
+
.toSorted((a, b) => byPosition(a.properties, b.properties));
|
|
151
|
+
|
|
152
|
+
if (companions.length === 0) {
|
|
153
|
+
return undefined;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (preferredVariant) {
|
|
157
|
+
const preferred = companions.find((companion) => getLinkedVariant(companion.id) === preferredVariant);
|
|
158
|
+
if (preferred) {
|
|
159
|
+
return getLinkedVariant(preferred.id);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return getLinkedVariant(companions[0].id);
|
|
164
|
+
};
|
package/src/capabilities/{edge-model-resolver/edge-model-resolver.ts → edge-model-resolver.ts}
RENAMED
|
@@ -8,14 +8,15 @@ import * as Effect from 'effect/Effect';
|
|
|
8
8
|
import * as Layer from 'effect/Layer';
|
|
9
9
|
|
|
10
10
|
import { AnthropicResolver } from '@dxos/ai/resolvers';
|
|
11
|
-
import { Capability
|
|
11
|
+
import { Capability } from '@dxos/app-framework';
|
|
12
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
12
13
|
|
|
13
|
-
export type EdgeModelResolverCapabilities = [Capability.Capability<typeof
|
|
14
|
+
export type EdgeModelResolverCapabilities = [Capability.Capability<typeof AppCapabilities.AiModelResolver>];
|
|
14
15
|
|
|
15
16
|
const edgeModelResolver = Capability.makeModule<[], EdgeModelResolverCapabilities>(() =>
|
|
16
17
|
Effect.succeed([
|
|
17
18
|
Capability.contributes(
|
|
18
|
-
|
|
19
|
+
AppCapabilities.AiModelResolver,
|
|
19
20
|
AnthropicResolver.make().pipe(
|
|
20
21
|
Layer.provide(
|
|
21
22
|
AnthropicClient.layer({
|
|
@@ -2,14 +2,26 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
7
|
+
import type { Blueprint, OperationHandlerSet } from '@dxos/compute';
|
|
8
|
+
|
|
9
|
+
export const AiService = Capability.lazy('AiService', () => import('./ai-service'));
|
|
10
|
+
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
11
|
+
export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
|
|
12
|
+
export const CompanionChatProvisioner = Capability.lazy(
|
|
13
|
+
'CompanionChatProvisioner',
|
|
14
|
+
() => import('./companion-chat-provisioner'),
|
|
15
|
+
);
|
|
16
|
+
export const EdgeModelResolver = Capability.lazy('EdgeModelResolver', () => import('./edge-model-resolver'));
|
|
17
|
+
export const LocalModelResolver = Capability.lazy('LocalModelResolver', () => import('./local-model-resolver'));
|
|
18
|
+
export const MarkdownExtension = Capability.lazy('MarkdownExtension', () => import('./markdown'));
|
|
19
|
+
export const Migrations = Capability.lazy('AssistantMigrations', () => import('./migrations'));
|
|
20
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
21
|
+
'OperationHandler',
|
|
22
|
+
() => import('./operation-handler'),
|
|
23
|
+
);
|
|
24
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
25
|
+
export const Settings = Capability.lazy('Settings', () => import('./settings'));
|
|
26
|
+
export const AssistantState = Capability.lazy('AssistantState', () => import('./state'));
|
|
27
|
+
export const Toolkit = Capability.lazy('Toolkit', () => import('./toolkit'));
|
package/src/capabilities/{local-model-resolver/local-model-resolver.ts → local-model-resolver.ts}
RENAMED
|
@@ -4,24 +4,29 @@
|
|
|
4
4
|
|
|
5
5
|
import * as OpenAiClient from '@effect/ai-openai/OpenAiClient';
|
|
6
6
|
import * as FetchHttpClient from '@effect/platform/FetchHttpClient';
|
|
7
|
+
import * as HttpClient from '@effect/platform/HttpClient';
|
|
7
8
|
import * as Effect from 'effect/Effect';
|
|
8
9
|
import * as Layer from 'effect/Layer';
|
|
9
10
|
|
|
10
|
-
import { LMStudioResolver } from '@dxos/ai/resolvers';
|
|
11
|
-
import { Capability
|
|
12
|
-
|
|
13
|
-
export type LocalModelResolverCapabilities = [Capability.Capability<typeof Common.Capability.AiModelResolver>];
|
|
11
|
+
import { LMStudioResolver, OllamaResolver } from '@dxos/ai/resolvers';
|
|
12
|
+
import { Capability } from '@dxos/app-framework';
|
|
13
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* To start LM Studio server:
|
|
17
17
|
* ```bash
|
|
18
18
|
* ~/.lmstudio/bin/lms server start --cors
|
|
19
19
|
* ```
|
|
20
|
+
*
|
|
21
|
+
* To start Ollama server:
|
|
22
|
+
* ```bash
|
|
23
|
+
* OLLAMA_ORIGINS="*" ollama serve
|
|
24
|
+
* ```
|
|
20
25
|
*/
|
|
21
|
-
const localModelResolver = Capability.makeModule<[]
|
|
26
|
+
const localModelResolver = Capability.makeModule<[]>(() =>
|
|
22
27
|
Effect.succeed([
|
|
23
28
|
Capability.contributes(
|
|
24
|
-
|
|
29
|
+
AppCapabilities.AiModelResolver,
|
|
25
30
|
LMStudioResolver.make().pipe(
|
|
26
31
|
Layer.provide(
|
|
27
32
|
OpenAiClient.layer({
|
|
@@ -31,6 +36,12 @@ const localModelResolver = Capability.makeModule<[], LocalModelResolverCapabilit
|
|
|
31
36
|
Layer.provide(FetchHttpClient.layer),
|
|
32
37
|
),
|
|
33
38
|
),
|
|
39
|
+
Capability.contributes(
|
|
40
|
+
AppCapabilities.AiModelResolver,
|
|
41
|
+
OllamaResolver.make({
|
|
42
|
+
transformClient: HttpClient.withTracerPropagation(false),
|
|
43
|
+
}).pipe(Layer.provide(FetchHttpClient.layer)),
|
|
44
|
+
),
|
|
34
45
|
]),
|
|
35
46
|
);
|
|
36
47
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Obj } from '@dxos/echo';
|
|
9
|
+
import { MarkdownCapabilities } from '@dxos/plugin-markdown/types';
|
|
10
|
+
|
|
11
|
+
import { AssistantOperation } from '#operations';
|
|
12
|
+
|
|
13
|
+
import { promptRunExtension } from '../extensions';
|
|
14
|
+
|
|
15
|
+
export default Capability.makeModule(
|
|
16
|
+
Effect.fnUntraced(function* () {
|
|
17
|
+
const capabilities = yield* Capability.Service;
|
|
18
|
+
|
|
19
|
+
return Capability.contributes(MarkdownCapabilities.Extensions, [
|
|
20
|
+
({ document: doc }) => {
|
|
21
|
+
if (!doc) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const db = Obj.getDatabase(doc);
|
|
26
|
+
if (!db) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const { invokePromise } = capabilities.get(Capabilities.OperationInvoker);
|
|
31
|
+
|
|
32
|
+
return promptRunExtension({
|
|
33
|
+
onRun: (promptText) => {
|
|
34
|
+
void invokePromise(AssistantOperation.RunPromptInNewChat, { db, prompt: promptText });
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
]);
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Chat } from '@dxos/assistant-toolkit';
|
|
9
|
+
import { defineObjectMigration } from '@dxos/client/echo';
|
|
10
|
+
import { ClientCapabilities } from '@dxos/plugin-client/types';
|
|
11
|
+
|
|
12
|
+
const identityTransform = async (from: any) => ({ ...from });
|
|
13
|
+
const noopCallback = async () => {};
|
|
14
|
+
|
|
15
|
+
const migrations = [
|
|
16
|
+
defineObjectMigration({
|
|
17
|
+
from: Chat.LegacyCompanionTo,
|
|
18
|
+
to: Chat.CompanionTo,
|
|
19
|
+
transform: identityTransform,
|
|
20
|
+
onMigration: noopCallback,
|
|
21
|
+
}),
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
export default Capability.makeModule(
|
|
25
|
+
Effect.fnUntraced(function* () {
|
|
26
|
+
return Capability.contributes(ClientCapabilities.Migration, migrations);
|
|
27
|
+
}),
|
|
28
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
9
|
+
|
|
10
|
+
import { AssistantOperationHandlerSet } from '#operations';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
Effect.fnUntraced(function* () {
|
|
14
|
+
return Capability.contributes(Capabilities.OperationHandler, AssistantOperationHandlerSet);
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React, { type ComponentProps, useEffect } from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface, useSettingsState } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface, useActiveSpace } from '@dxos/app-toolkit/ui';
|
|
11
|
+
import { Chat, Agent } from '@dxos/assistant-toolkit';
|
|
12
|
+
import { getSpace } from '@dxos/client/echo';
|
|
13
|
+
import { Blueprint, Routine } from '@dxos/compute';
|
|
14
|
+
import { Sequence } from '@dxos/conductor';
|
|
15
|
+
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
16
|
+
import { Feed, Obj } from '@dxos/echo';
|
|
17
|
+
import { log } from '@dxos/log';
|
|
18
|
+
import { Panel } from '@dxos/react-ui';
|
|
19
|
+
|
|
20
|
+
import { AssistantSettings } from '#components';
|
|
21
|
+
import {
|
|
22
|
+
BlueprintArticle,
|
|
23
|
+
ChatCompanion,
|
|
24
|
+
ChatContainer,
|
|
25
|
+
ChatDialog,
|
|
26
|
+
AgentArticle,
|
|
27
|
+
AgentProperties,
|
|
28
|
+
RoutineArticle,
|
|
29
|
+
RoutineList,
|
|
30
|
+
TracePanel,
|
|
31
|
+
TriggerStatus,
|
|
32
|
+
} from '#containers';
|
|
33
|
+
import { ASSISTANT_COMPANION_VARIANT, ASSISTANT_DIALOG, meta } from '#meta';
|
|
34
|
+
import { type Assistant } from '#types';
|
|
35
|
+
|
|
36
|
+
export default Capability.makeModule(() =>
|
|
37
|
+
Effect.succeed(
|
|
38
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
39
|
+
Surface.create({
|
|
40
|
+
id: 'plugin-settings',
|
|
41
|
+
filter: AppSurface.settings(AppSurface.Article, meta.id),
|
|
42
|
+
component: ({ data: { subject } }) => {
|
|
43
|
+
const { settings, updateSettings } = useSettingsState<Assistant.Settings>(subject.atom);
|
|
44
|
+
return <AssistantSettings settings={settings} onSettingsChange={updateSettings} />;
|
|
45
|
+
},
|
|
46
|
+
}),
|
|
47
|
+
Surface.create({
|
|
48
|
+
id: 'chat',
|
|
49
|
+
role: 'article',
|
|
50
|
+
filter: (data): data is { attendableId: string; subject: Chat.Chat; variant: undefined } =>
|
|
51
|
+
typeof data.attendableId === 'string' &&
|
|
52
|
+
Obj.instanceOf(Chat.Chat, data.subject) &&
|
|
53
|
+
data.variant !== ASSISTANT_COMPANION_VARIANT,
|
|
54
|
+
component: ({ data, role, ref }) => {
|
|
55
|
+
return <ChatContainer role={role} subject={data.subject} attendableId={data.attendableId} ref={ref} />;
|
|
56
|
+
},
|
|
57
|
+
}),
|
|
58
|
+
Surface.create({
|
|
59
|
+
id: 'agent',
|
|
60
|
+
filter: AppSurface.object(AppSurface.Article, Agent.Agent),
|
|
61
|
+
component: ({ data, role }) => (
|
|
62
|
+
<AgentArticle role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
63
|
+
),
|
|
64
|
+
}),
|
|
65
|
+
Surface.create({
|
|
66
|
+
id: 'agent-properties',
|
|
67
|
+
filter: AppSurface.object(AppSurface.ObjectProperties, Agent.Agent),
|
|
68
|
+
component: ({ data }) => <AgentProperties subject={data.subject} />,
|
|
69
|
+
}),
|
|
70
|
+
Surface.create({
|
|
71
|
+
id: 'companion-chat',
|
|
72
|
+
role: 'article',
|
|
73
|
+
filter: (data): data is { subject: Chat.Chat | null; attendableId: string; companionTo: Obj.Unknown } =>
|
|
74
|
+
typeof data.attendableId === 'string' &&
|
|
75
|
+
Obj.isObject(data.companionTo) &&
|
|
76
|
+
(Obj.instanceOf(Chat.Chat, data.subject) || data.subject === null),
|
|
77
|
+
component: ({ data: { subject, attendableId, companionTo }, role, ref }) => (
|
|
78
|
+
<ChatCompanion
|
|
79
|
+
role={role}
|
|
80
|
+
subject={subject}
|
|
81
|
+
attendableId={attendableId}
|
|
82
|
+
companionTo={companionTo}
|
|
83
|
+
ref={ref}
|
|
84
|
+
/>
|
|
85
|
+
),
|
|
86
|
+
}),
|
|
87
|
+
Surface.create({
|
|
88
|
+
id: 'companion-invocations',
|
|
89
|
+
role: 'article',
|
|
90
|
+
filter: (data): data is { companionTo: Sequence } =>
|
|
91
|
+
(Obj.instanceOf(Sequence, data.companionTo) || Obj.instanceOf(Routine.Routine, data.companionTo)) &&
|
|
92
|
+
data.subject === 'invocations',
|
|
93
|
+
component: ({ data, role }) => {
|
|
94
|
+
const space = getSpace(data.companionTo);
|
|
95
|
+
const feed = space?.properties.invocationTraceFeed?.target;
|
|
96
|
+
const queueDxn = feed ? Feed.getQueueDxn(feed) : undefined;
|
|
97
|
+
// TODO(wittjosiah): Support invocation filtering for prompts.
|
|
98
|
+
const target = Obj.instanceOf(Routine.Routine, data.companionTo) ? undefined : data.companionTo;
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<Panel.Root role={role} className='dx-document'>
|
|
102
|
+
<Panel.Content asChild>
|
|
103
|
+
<InvocationTraceContainer db={space?.db} queueDxn={queueDxn} target={target} detailAxis='block' />
|
|
104
|
+
</Panel.Content>
|
|
105
|
+
</Panel.Root>
|
|
106
|
+
);
|
|
107
|
+
},
|
|
108
|
+
}),
|
|
109
|
+
Surface.create({
|
|
110
|
+
id: 'blueprint',
|
|
111
|
+
filter: AppSurface.object(AppSurface.Article, Blueprint.Blueprint),
|
|
112
|
+
component: ({ data, role }) => (
|
|
113
|
+
<BlueprintArticle role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
114
|
+
),
|
|
115
|
+
}),
|
|
116
|
+
Surface.create({
|
|
117
|
+
id: 'prompt',
|
|
118
|
+
filter: AppSurface.object(AppSurface.Article, Routine.Routine),
|
|
119
|
+
component: ({ data, role }) => (
|
|
120
|
+
<RoutineArticle role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
121
|
+
),
|
|
122
|
+
}),
|
|
123
|
+
Surface.create({
|
|
124
|
+
id: ASSISTANT_DIALOG,
|
|
125
|
+
filter: AppSurface.component<ComponentProps<typeof ChatDialog>>(AppSurface.Dialog, ASSISTANT_DIALOG),
|
|
126
|
+
component: ({ data }) => <ChatDialog {...data.props} />,
|
|
127
|
+
}),
|
|
128
|
+
Surface.create({
|
|
129
|
+
id: 'trace',
|
|
130
|
+
filter: AppSurface.literal(Surface.makeType<{ subject: string }>('deck-companion--trace'), 'trace'),
|
|
131
|
+
component: () => {
|
|
132
|
+
const space = useActiveSpace();
|
|
133
|
+
useEffect(() => {
|
|
134
|
+
log('trace panel surface', { hasSpace: Boolean(space), spaceId: space?.id });
|
|
135
|
+
}, [space?.id]);
|
|
136
|
+
|
|
137
|
+
if (!space) {
|
|
138
|
+
// TODO(dmaretskyi): Not really part of UX, but so we know what the error is.
|
|
139
|
+
return <span>No active space</span>;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return <TracePanel space={space} />;
|
|
143
|
+
},
|
|
144
|
+
}),
|
|
145
|
+
Surface.create({
|
|
146
|
+
id: 'status',
|
|
147
|
+
role: 'status-indicator',
|
|
148
|
+
component: () => {
|
|
149
|
+
const space = useActiveSpace();
|
|
150
|
+
if (!space) {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return <TriggerStatus role='status-indicator' space={space} />;
|
|
155
|
+
},
|
|
156
|
+
}),
|
|
157
|
+
Surface.create({
|
|
158
|
+
id: 'prompts',
|
|
159
|
+
filter: AppSurface.subject(
|
|
160
|
+
Surface.makeType<{ subject: Obj.Any; attendableId: string }>('prompts'),
|
|
161
|
+
Obj.isObject,
|
|
162
|
+
),
|
|
163
|
+
component: ({ data }) => <RoutineList subject={data.subject} />,
|
|
164
|
+
}),
|
|
165
|
+
]),
|
|
166
|
+
),
|
|
167
|
+
);
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { Capability
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
8
9
|
import { createKvsStore } from '@dxos/effect';
|
|
9
10
|
|
|
10
|
-
import { meta } from '
|
|
11
|
-
import { Assistant, AssistantCapabilities } from '
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { Assistant, AssistantCapabilities } from '#types';
|
|
12
13
|
|
|
13
14
|
export default Capability.makeModule(() =>
|
|
14
15
|
Effect.sync(() => {
|
|
@@ -20,7 +21,7 @@ export default Capability.makeModule(() =>
|
|
|
20
21
|
|
|
21
22
|
return [
|
|
22
23
|
Capability.contributes(AssistantCapabilities.Settings, settingsAtom),
|
|
23
|
-
Capability.contributes(
|
|
24
|
+
Capability.contributes(AppCapabilities.Settings, {
|
|
24
25
|
prefix: meta.id,
|
|
25
26
|
schema: Assistant.Settings,
|
|
26
27
|
atom: settingsAtom,
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Atom } from '@effect-atom/atom-react';
|
|
5
6
|
import * as Effect from 'effect/Effect';
|
|
6
7
|
|
|
7
8
|
import { Capability } from '@dxos/app-framework';
|
|
9
|
+
import { type Obj } from '@dxos/echo';
|
|
8
10
|
import { createKvsStore } from '@dxos/effect';
|
|
9
11
|
|
|
10
|
-
import { meta } from '
|
|
11
|
-
import { AssistantCapabilities } from '
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
import { AssistantCapabilities } from '#types';
|
|
12
14
|
|
|
13
15
|
export default Capability.makeModule(() =>
|
|
14
16
|
Effect.sync(() => {
|
|
@@ -19,9 +21,15 @@ export default Capability.makeModule(() =>
|
|
|
19
21
|
schema: AssistantCapabilities.StateSchema,
|
|
20
22
|
defaultValue: () => ({
|
|
21
23
|
currentChat: {},
|
|
24
|
+
pendingPrompts: {},
|
|
22
25
|
}),
|
|
23
26
|
});
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
const companionChatCacheAtom = Atom.make<Record<string, Obj.Unknown | undefined>>({}).pipe(Atom.keepAlive);
|
|
29
|
+
|
|
30
|
+
return [
|
|
31
|
+
Capability.contributes(AssistantCapabilities.State, stateAtom),
|
|
32
|
+
Capability.contributes(AssistantCapabilities.CompanionChatCache, companionChatCacheAtom),
|
|
33
|
+
];
|
|
26
34
|
}),
|
|
27
35
|
);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
import { WebSearchToolkitOpaque } from '@dxos/assistant-toolkit';
|
|
10
|
+
|
|
11
|
+
export default Capability.makeModule(() =>
|
|
12
|
+
Effect.succeed([Capability.contributes(AppCapabilities.Toolkit, WebSearchToolkitOpaque)]),
|
|
13
|
+
);
|