@dxos/plugin-assistant 0.8.4-main.f9ba587 → 0.8.4-main.fcfe5033a5
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-7QMO3LGF.mjs +97 -0
- package/dist/lib/browser/AssistantSettings-7QMO3LGF.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +8 -0
- package/dist/lib/browser/blueprints/index.mjs.map +7 -0
- package/dist/lib/browser/chunk-ATHYBVGN.mjs +176 -0
- package/dist/lib/browser/chunk-ATHYBVGN.mjs.map +7 -0
- package/dist/lib/browser/chunk-EZRS3J25.mjs +30 -0
- package/dist/lib/browser/chunk-EZRS3J25.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-LMVTXH54.mjs +154 -0
- package/dist/lib/browser/chunk-LMVTXH54.mjs.map +7 -0
- package/dist/lib/browser/create-chat-LBZHGVSN.mjs +82 -0
- package/dist/lib/browser/create-chat-LBZHGVSN.mjs.map +7 -0
- package/dist/lib/browser/ensure-companion-chat-ZEZA34MZ.mjs +65 -0
- package/dist/lib/browser/ensure-companion-chat-ZEZA34MZ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +3410 -223
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/on-create-space-54RNX5JI.mjs +22 -0
- package/dist/lib/browser/on-create-space-54RNX5JI.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-NZOD66NY.mjs +22 -0
- package/dist/lib/browser/resolve-navigation-targets-NZOD66NY.mjs.map +7 -0
- package/dist/lib/browser/run-prompt-in-new-chat-THLK5YQC.mjs +136 -0
- package/dist/lib/browser/run-prompt-in-new-chat-THLK5YQC.mjs.map +7 -0
- package/dist/lib/browser/set-current-chat-LRS3VFSH.mjs +54 -0
- package/dist/lib/browser/set-current-chat-LRS3VFSH.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +8 -14
- package/dist/lib/browser/update-chat-name-3Y36KFAS.mjs +71 -0
- package/dist/lib/browser/update-chat-name-3Y36KFAS.mjs.map +7 -0
- package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs +98 -0
- package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +9 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NZIKC7AN.mjs +32 -0
- package/dist/lib/node-esm/chunk-NZIKC7AN.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs +177 -0
- package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-W3JZ2F4T.mjs +155 -0
- package/dist/lib/node-esm/chunk-W3JZ2F4T.mjs.map +7 -0
- package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs +83 -0
- package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs.map +7 -0
- package/dist/lib/node-esm/ensure-companion-chat-6K2WEWFP.mjs +66 -0
- package/dist/lib/node-esm/ensure-companion-chat-6K2WEWFP.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +3410 -223
- 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-YRPZ6HZY.mjs +23 -0
- package/dist/lib/node-esm/on-create-space-YRPZ6HZY.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-3PPK7XLH.mjs +23 -0
- package/dist/lib/node-esm/resolve-navigation-targets-3PPK7XLH.mjs.map +7 -0
- package/dist/lib/node-esm/run-prompt-in-new-chat-OUYKCMQ7.mjs +137 -0
- package/dist/lib/node-esm/run-prompt-in-new-chat-OUYKCMQ7.mjs.map +7 -0
- package/dist/lib/node-esm/set-current-chat-SMXZJD3F.mjs +55 -0
- package/dist/lib/node-esm/set-current-chat-SMXZJD3F.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +8 -14
- package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs +72 -0
- package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs.map +7 -0
- package/dist/types/src/AssistantPlugin.d.ts +2 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/assistant/blueprint.d.ts +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 +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- 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 +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- 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 -6
- 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 +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 +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/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 +41 -19
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +39 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -0
- package/dist/types/src/components/Chat/index.d.ts +1 -0
- package/dist/types/src/components/Chat/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +10 -0
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -0
- package/dist/types/src/components/ChatProgress/index.d.ts +2 -0
- package/dist/types/src/components/ChatProgress/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +7 -5
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +22 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
- 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 +11 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +5 -6
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +7 -4
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +2 -2
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +13 -17
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +24 -221
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +35 -0
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/registry.d.ts +11 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.d.ts +43 -0
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts +2 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts.map +1 -0
- 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/PromptWidget.d.ts +14 -0
- package/dist/types/src/components/ChatThread/widgets/PromptWidget.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/index.d.ts +11 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +10 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +8 -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 +9 -11
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +13 -7
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +16 -5
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +10 -2
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts +12 -0
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts +3 -0
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts +8 -0
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +12 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts +2 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/index.d.ts +3 -0
- package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +17 -21
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +14 -5
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -8
- 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/PromptArticle/PromptArticle.d.ts +6 -0
- package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PromptArticle/index.d.ts +2 -0
- package/dist/types/src/containers/PromptArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/PromptList/PromptList.d.ts +6 -0
- package/dist/types/src/containers/PromptList/PromptList.d.ts.map +1 -0
- package/dist/types/src/containers/PromptList/PromptList.stories.d.ts +21 -0
- package/dist/types/src/containers/PromptList/PromptList.stories.d.ts.map +1 -0
- package/dist/types/src/containers/PromptList/index.d.ts +2 -0
- package/dist/types/src/containers/PromptList/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts +9 -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/execution-graph.d.ts +17 -0
- package/dist/types/src/containers/TracePanel/execution-graph.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/TriggerStatus/TriggerStatus.d.ts +4 -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 +10 -5
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +25 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +12 -24
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +10 -0
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatToolbarActions.d.ts +8 -0
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextBinder.d.ts +5 -0
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextObjects.d.ts +15 -0
- package/dist/types/src/hooks/useContextObjects.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 +6 -0
- package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
- package/dist/types/src/hooks/useOnline.d.ts +3 -0
- package/dist/types/src/hooks/useOnline.d.ts.map +1 -0
- package/dist/types/src/hooks/usePresets.d.ts +7 -0
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts +7 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +5 -4
- 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 +135 -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/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 +3 -0
- package/dist/types/src/processor/index.d.ts.map +1 -0
- package/dist/types/src/processor/presets.d.ts +13 -0
- package/dist/types/src/processor/presets.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +80 -0
- package/dist/types/src/processor/processor.d.ts.map +1 -0
- package/dist/types/src/processor/processor.test.d.ts +2 -0
- package/dist/types/src/processor/processor.test.d.ts.map +1 -0
- package/dist/types/src/queue-logger.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +8 -0
- package/dist/types/src/testing/test-generator.d.ts.map +1 -0
- package/dist/types/src/testing/test-sequence.d.ts +0 -4
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/testing/test-services.d.ts +2 -2
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/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 -64
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +20 -0
- package/dist/types/src/types/Assistant.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +11 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +32 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/defs.d.ts +2 -0
- package/dist/types/src/types/defs.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +5 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +14 -213
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +151 -93
- package/src/AssistantPlugin.tsx +222 -114
- 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/{components/SequenceEditor → blueprints}/index.ts +1 -1
- package/src/capabilities/ai-service.ts +30 -0
- package/src/capabilities/app-graph-builder.ts +192 -227
- package/src/capabilities/blueprint-definition.ts +58 -0
- package/src/capabilities/companion-chat-provisioner.ts +164 -0
- package/src/capabilities/edge-model-resolver.ts +33 -0
- package/src/capabilities/index.ts +21 -8
- package/src/capabilities/local-model-resolver.ts +48 -0
- package/src/capabilities/markdown.ts +40 -0
- package/src/capabilities/migrations.ts +35 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +140 -123
- package/src/capabilities/settings.ts +24 -12
- package/src/capabilities/state.ts +35 -0
- package/src/capabilities/toolkit.ts +13 -0
- package/src/components/AssistantSettings/AssistantSettings.stories.tsx +34 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +102 -75
- package/src/components/AssistantSettings/index.ts +2 -2
- package/src/components/Chat/Chat.tsx +310 -184
- package/src/components/Chat/events.ts +63 -0
- package/src/components/Chat/index.ts +2 -0
- package/src/components/ChatProgress/ChatProgress.tsx +56 -0
- package/src/components/ChatProgress/index.ts +5 -0
- package/src/components/ChatPrompt/ChatActions.tsx +46 -47
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +122 -0
- package/src/components/ChatPrompt/ChatOptions.tsx +404 -0
- package/src/components/ChatPrompt/ChatPresets.tsx +29 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +42 -37
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +33 -17
- package/src/components/ChatPrompt/index.ts +2 -3
- package/src/components/ChatThread/ChatThread.stories.tsx +120 -125
- package/src/components/ChatThread/ChatThread.tsx +80 -50
- package/src/components/ChatThread/Link.tsx +26 -0
- package/src/components/ChatThread/MarkdownStream.stories.tsx +243 -0
- package/src/components/ChatThread/registry.tsx +238 -0
- package/src/components/ChatThread/sync.test.ts +99 -0
- package/src/components/ChatThread/sync.ts +165 -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-2.md +56 -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/PromptWidget.ts +28 -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 +31 -0
- package/src/components/ChatThread/widgets/SelectWidget.ts +37 -0
- package/src/components/ChatThread/widgets/StatsWidget.ts +29 -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 +28 -0
- package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +54 -0
- package/src/components/ChatThread/widgets/ToolWidget.tsx +156 -0
- package/src/components/ChatThread/widgets/index.ts +14 -0
- package/src/components/ProcessTree/ProcessTree.stories.tsx +109 -0
- package/src/components/ProcessTree/ProcessTree.tsx +86 -0
- package/src/components/ProcessTree/index.ts +5 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +54 -43
- package/src/components/TemplateEditor/TemplateEditor.tsx +62 -60
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +39 -25
- package/src/components/TemplateEditor/TemplateForm.tsx +123 -81
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +274 -0
- package/src/components/TemplateEditor/extensions/index.ts +6 -0
- package/src/components/TemplateEditor/extensions/xml-extension.ts +64 -0
- package/src/components/ToolBlock/ToolBlock.tsx +144 -0
- package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
- package/src/components/ToolBlock/index.ts +6 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +17 -29
- package/src/components/Toolbox/Toolbox.tsx +88 -110
- package/src/components/index.ts +3 -11
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +120 -0
- package/src/containers/AgentArticle/AgentArticle.tsx +198 -0
- package/src/containers/AgentArticle/index.ts +5 -0
- package/src/containers/AgentProperties/AgentProperties.stories.tsx +100 -0
- package/src/containers/AgentProperties/AgentProperties.tsx +158 -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/ChatCompanion/ChatCompanion.tsx +142 -0
- package/src/containers/ChatCompanion/index.ts +5 -0
- package/src/containers/ChatContainer/ChatContainer.tsx +95 -0
- package/src/containers/ChatContainer/index.ts +5 -0
- package/src/containers/ChatDialog/ChatDialog.tsx +72 -0
- package/src/containers/ChatDialog/index.ts +5 -0
- package/src/containers/PromptArticle/PromptArticle.tsx +59 -0
- package/src/containers/PromptArticle/index.ts +5 -0
- package/src/containers/PromptList/PromptList.stories.tsx +129 -0
- package/src/containers/PromptList/PromptList.tsx +49 -0
- package/src/containers/PromptList/index.ts +5 -0
- package/src/containers/TracePanel/TracePanel.stories.tsx +230 -0
- package/src/containers/TracePanel/TracePanel.tsx +114 -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.ts +425 -0
- package/src/containers/TracePanel/index.ts +9 -0
- package/src/containers/TriggerStatus/TriggerStatus.tsx +144 -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 +10 -6
- package/src/hooks/useBlueprintRegistry.ts +109 -0
- package/src/hooks/useChatProcessor.ts +90 -0
- package/src/hooks/useChatServices.ts +26 -0
- package/src/hooks/useChatToolbarActions.ts +122 -0
- package/src/hooks/useContextBinder.ts +43 -0
- package/src/hooks/useContextObjects.ts +50 -0
- package/src/hooks/useFilteredTypes.ts +37 -0
- package/src/hooks/useFlush.ts +35 -0
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +45 -0
- package/src/hooks/useReferencesProvider.ts +54 -0
- package/src/index.ts +3 -2
- package/src/meta.ts +15 -9
- package/src/operations/create-chat.ts +80 -0
- package/src/operations/definitions.ts +127 -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/resolve-navigation-targets.ts +26 -0
- package/src/operations/run-prompt-in-new-chat.ts +113 -0
- package/src/operations/set-current-chat.ts +50 -0
- package/src/operations/update-chat-name.ts +61 -0
- package/src/processor/index.ts +6 -0
- package/src/processor/presets.ts +68 -0
- package/src/processor/processor.test.ts +40 -0
- package/src/processor/processor.ts +321 -0
- package/src/queue-logger.ts +33 -23
- package/src/testing/index.ts +1 -1
- package/src/testing/test-generator.ts +293 -0
- package/src/testing/test-sequence.ts +5 -32
- package/src/testing/test-services.ts +10 -14
- package/src/testing/trace-timeline.conversations.json +1 -0
- package/src/testing/trace-timeline.test.ts +246 -0
- package/src/translations.ts +166 -55
- package/src/types/Assistant.ts +14 -0
- package/src/types/Settings.ts +21 -0
- package/src/types/capabilities.ts +35 -0
- package/src/types/defs.ts +5 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +8 -2
- package/src/types/service.ts +27 -16
- package/src/vite-env.d.ts +30 -0
- package/dist/lib/browser/ChatContainer-6XNB5NEI.mjs +0 -57
- package/dist/lib/browser/ChatContainer-6XNB5NEI.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-IMWPRXTO.mjs +0 -74
- package/dist/lib/browser/ChatDialog-IMWPRXTO.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-6XOYB2RN.mjs +0 -322
- package/dist/lib/browser/SequenceContainer-6XOYB2RN.mjs.map +0 -7
- package/dist/lib/browser/TemplateContainer-6ZGGH5T4.mjs +0 -28
- package/dist/lib/browser/TemplateContainer-6ZGGH5T4.mjs.map +0 -7
- package/dist/lib/browser/ai-client-ML7OQWAO.mjs +0 -39
- package/dist/lib/browser/ai-client-ML7OQWAO.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-UJ5NHRGK.mjs +0 -223
- package/dist/lib/browser/app-graph-builder-UJ5NHRGK.mjs.map +0 -7
- package/dist/lib/browser/chunk-44HZKIAW.mjs +0 -87
- package/dist/lib/browser/chunk-44HZKIAW.mjs.map +0 -7
- package/dist/lib/browser/chunk-LKP65RPA.mjs +0 -20
- package/dist/lib/browser/chunk-LKP65RPA.mjs.map +0 -7
- package/dist/lib/browser/chunk-NTBGTFTV.mjs +0 -15
- package/dist/lib/browser/chunk-NTBGTFTV.mjs.map +0 -7
- package/dist/lib/browser/chunk-OZL4OHTU.mjs +0 -157
- package/dist/lib/browser/chunk-OZL4OHTU.mjs.map +0 -7
- package/dist/lib/browser/chunk-TQ3QW3HJ.mjs +0 -2072
- package/dist/lib/browser/chunk-TQ3QW3HJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-TU7UUGWQ.mjs +0 -203
- package/dist/lib/browser/chunk-TU7UUGWQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-WPZ4UANI.mjs +0 -16
- package/dist/lib/browser/chunk-WPZ4UANI.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-LEAPB55Q.mjs +0 -42
- package/dist/lib/browser/intent-resolver-LEAPB55Q.mjs.map +0 -7
- package/dist/lib/browser/react-surface-TMF7JJA4.mjs +0 -156
- package/dist/lib/browser/react-surface-TMF7JJA4.mjs.map +0 -7
- package/dist/lib/browser/settings-N4HEXADL.mjs +0 -22
- package/dist/lib/browser/settings-N4HEXADL.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-VOLG7J6N.mjs +0 -58
- package/dist/lib/node-esm/ChatContainer-VOLG7J6N.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-B2XNUNRM.mjs +0 -75
- package/dist/lib/node-esm/ChatDialog-B2XNUNRM.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-WWG6IMN3.mjs +0 -323
- package/dist/lib/node-esm/SequenceContainer-WWG6IMN3.mjs.map +0 -7
- package/dist/lib/node-esm/TemplateContainer-6KRNEMVE.mjs +0 -29
- package/dist/lib/node-esm/TemplateContainer-6KRNEMVE.mjs.map +0 -7
- package/dist/lib/node-esm/ai-client-2FQ434CT.mjs +0 -40
- package/dist/lib/node-esm/ai-client-2FQ434CT.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-MEQ5CYNI.mjs +0 -224
- package/dist/lib/node-esm/app-graph-builder-MEQ5CYNI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-D3HTVK5D.mjs +0 -2073
- package/dist/lib/node-esm/chunk-D3HTVK5D.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E6V2RUQ2.mjs +0 -16
- package/dist/lib/node-esm/chunk-E6V2RUQ2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HVMVHP4R.mjs +0 -158
- package/dist/lib/node-esm/chunk-HVMVHP4R.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HXKRKIN2.mjs +0 -18
- package/dist/lib/node-esm/chunk-HXKRKIN2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KOC6ESG7.mjs +0 -22
- package/dist/lib/node-esm/chunk-KOC6ESG7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VESVUAOS.mjs +0 -88
- package/dist/lib/node-esm/chunk-VESVUAOS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YYUVTTVK.mjs +0 -204
- package/dist/lib/node-esm/chunk-YYUVTTVK.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-4ULF3F7U.mjs +0 -43
- package/dist/lib/node-esm/intent-resolver-4ULF3F7U.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-6XL6SWL2.mjs +0 -157
- package/dist/lib/node-esm/react-surface-6XL6SWL2.mjs.map +0 -7
- package/dist/lib/node-esm/settings-WQ76EG6O.mjs +0 -23
- package/dist/lib/node-esm/settings-WQ76EG6O.mjs.map +0 -7
- package/dist/types/src/capabilities/ai-client.d.ts +0 -5
- package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -6
- 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/ChatContainer.d.ts +0 -11
- 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/ChatPrompt/ChatOptionsMenu.d.ts +0 -9
- package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts.map +0 -1
- package/dist/types/src/components/ChatPrompt/events.d.ts +0 -17
- package/dist/types/src/components/ChatPrompt/events.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -18
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts +0 -18
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/reducer.d.ts +0 -12
- package/dist/types/src/components/ChatThread/reducer.d.ts.map +0 -1
- package/dist/types/src/components/PromptSettings.d.ts +0 -6
- package/dist/types/src/components/PromptSettings.d.ts.map +0 -1
- package/dist/types/src/components/SequenceContainer.d.ts +0 -9
- package/dist/types/src/components/SequenceContainer.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +0 -13
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +0 -8
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/index.d.ts +0 -2
- package/dist/types/src/components/SequenceEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/TemplateContainer.d.ts +0 -9
- package/dist/types/src/components/TemplateContainer.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/hooks/chat-processor.d.ts +0 -82
- package/dist/types/src/hooks/chat-processor.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.test.d.ts +0 -2
- package/dist/types/src/hooks/chat-processor.test.d.ts.map +0 -1
- package/dist/types/src/hooks/useBlueprints.d.ts +0 -4
- package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
- package/dist/types/src/hooks/useContextProvider.d.ts +0 -23
- package/dist/types/src/hooks/useContextProvider.d.ts.map +0 -1
- package/dist/types/src/hooks/useServiceContainer.d.ts +0 -8
- package/dist/types/src/hooks/useServiceContainer.d.ts.map +0 -1
- package/dist/types/src/hooks/useTextInputEvents.d.ts +0 -13
- package/dist/types/src/hooks/useTextInputEvents.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.d.ts +0 -4
- package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
- package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
- package/dist/types/src/parser/index.d.ts +0 -4
- package/dist/types/src/parser/index.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.d.ts +0 -15
- package/dist/types/src/parser/query-parser.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.test.d.ts +0 -2
- package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
- package/dist/types/src/parser/types.d.ts +0 -24
- package/dist/types/src/parser/types.d.ts.map +0 -1
- package/dist/types/src/stories/Chat.stories.d.ts +0 -199
- package/dist/types/src/stories/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/testing/test-functions.d.ts +0 -3
- package/dist/types/src/testing/test-functions.d.ts.map +0 -1
- package/dist/types/src/tools/function.d.ts +0 -5
- package/dist/types/src/tools/function.d.ts.map +0 -1
- package/dist/types/src/tools/index.d.ts +0 -3
- package/dist/types/src/tools/index.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.d.ts +0 -10
- package/dist/types/src/tools/openapi.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.test.d.ts +0 -2
- package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -71
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/dist/types/src/types/template.d.ts +0 -56
- package/dist/types/src/types/template.d.ts.map +0 -1
- package/src/capabilities/ai-client.ts +0 -39
- package/src/capabilities/capabilities.ts +0 -14
- package/src/capabilities/intent-resolver.ts +0 -45
- package/src/components/ChatContainer.tsx +0 -45
- package/src/components/ChatDialog.tsx +0 -65
- package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
- package/src/components/ChatPrompt/events.ts +0 -12
- package/src/components/ChatThread/ChatMessage.tsx +0 -238
- package/src/components/ChatThread/ToolBlock.tsx +0 -111
- package/src/components/ChatThread/reducer.ts +0 -52
- package/src/components/PromptSettings.tsx +0 -91
- package/src/components/SequenceContainer.tsx +0 -139
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +0 -32
- package/src/components/SequenceEditor/SequenceEditor.tsx +0 -50
- package/src/components/TemplateContainer.tsx +0 -25
- package/src/events.ts +0 -11
- package/src/hooks/chat-processor.test.ts +0 -15
- package/src/hooks/chat-processor.ts +0 -281
- package/src/hooks/useBlueprints.ts +0 -31
- package/src/hooks/useChatProcessor.tsx +0 -142
- package/src/hooks/useContextProvider.ts +0 -61
- package/src/hooks/useServiceContainer.ts +0 -42
- package/src/hooks/useTextInputEvents.ts +0 -49
- package/src/parser/filter-generator.test.ts +0 -32
- package/src/parser/filter-generator.ts +0 -81
- package/src/parser/index.ts +0 -7
- package/src/parser/query-parser.test.ts +0 -139
- package/src/parser/query-parser.ts +0 -199
- package/src/parser/types.ts +0 -34
- package/src/shims.d.ts +0 -8
- package/src/stories/Chat.stories.tsx +0 -269
- package/src/testing/test-functions.ts +0 -11
- package/src/tools/function.ts +0 -46
- package/src/tools/index.ts +0 -6
- package/src/tools/openapi.test.ts +0 -217
- package/src/tools/openapi.ts +0 -338
- package/src/types/schema.ts +0 -86
- package/src/types/template.ts +0 -66
- package/src/typings.d.ts +0 -9
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, it } from '@effect/vitest';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
|
|
8
|
+
import { AgentService } from '@dxos/assistant';
|
|
9
|
+
import { DatabaseBlueprint, DatabaseHandlers } from '@dxos/assistant-toolkit';
|
|
10
|
+
import { AssistantTestLayer } from '@dxos/assistant/testing';
|
|
11
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
12
|
+
import { Feed } from '@dxos/echo';
|
|
13
|
+
import { TestHelpers } from '@dxos/effect/testing';
|
|
14
|
+
import { ObjectId } from '@dxos/keys';
|
|
15
|
+
import { Organization } from '@dxos/types';
|
|
16
|
+
|
|
17
|
+
import AssistantBlueprint from './blueprint';
|
|
18
|
+
|
|
19
|
+
ObjectId.dangerouslyDisableRandomness();
|
|
20
|
+
|
|
21
|
+
const TestLayer = AssistantTestLayer({
|
|
22
|
+
aiServicePreset: 'edge-remote',
|
|
23
|
+
operationHandlers: DatabaseHandlers,
|
|
24
|
+
types: [Organization.Organization, Blueprint.Blueprint, Feed.Feed],
|
|
25
|
+
blueprints: [AssistantBlueprint.make(), DatabaseBlueprint.make()],
|
|
26
|
+
tracing: 'pretty',
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
describe('Assistant Blueprint', () => {
|
|
30
|
+
// TODO(dmaretskyi): Regenerate memoized conversation with ALLOW_LLM_GENERATION=1.
|
|
31
|
+
it.effect.skip(
|
|
32
|
+
'works with Database blueprint to create objects',
|
|
33
|
+
Effect.fnUntraced(
|
|
34
|
+
function* (_) {
|
|
35
|
+
const agent = yield* AgentService.createSession({
|
|
36
|
+
blueprints: [AssistantBlueprint.make(), DatabaseBlueprint.make()],
|
|
37
|
+
});
|
|
38
|
+
yield* agent.submitPrompt('Create a new organization called "Test Corp".');
|
|
39
|
+
yield* agent.waitForCompletion();
|
|
40
|
+
},
|
|
41
|
+
Effect.provide(TestLayer),
|
|
42
|
+
TestHelpers.provideTestContext,
|
|
43
|
+
),
|
|
44
|
+
{ timeout: 60_000 },
|
|
45
|
+
);
|
|
46
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { LayoutOperation, type AppCapabilities } from '@dxos/app-toolkit';
|
|
6
|
+
import { templates } from '@dxos/assistant';
|
|
7
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
8
|
+
|
|
9
|
+
import { AssistantOperation } from '#operations';
|
|
10
|
+
|
|
11
|
+
const BLUEPRINT_KEY = 'org.dxos.blueprint.assistant';
|
|
12
|
+
|
|
13
|
+
const make = () =>
|
|
14
|
+
Blueprint.make({
|
|
15
|
+
key: BLUEPRINT_KEY,
|
|
16
|
+
name: 'Assistant',
|
|
17
|
+
tools: Blueprint.toolDefinitions({
|
|
18
|
+
// TODO(wittjosiah): LayoutOperation.Open requires Capability.Service which is only available
|
|
19
|
+
// via the compute-runtime layer (plugin-automation). Once Capability.Service is propagated
|
|
20
|
+
// through LocalFunctionExecutionService, this will work without the compute-runtime dependency.
|
|
21
|
+
operations: [LayoutOperation.Open, AssistantOperation.ResolveNavigationTargets],
|
|
22
|
+
}),
|
|
23
|
+
instructions: templates.system,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const blueprint: AppCapabilities.BlueprintDefinition = {
|
|
27
|
+
key: BLUEPRINT_KEY,
|
|
28
|
+
make,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default blueprint;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Layer from 'effect/Layer';
|
|
7
|
+
|
|
8
|
+
import { AiModelResolver } from '@dxos/ai';
|
|
9
|
+
import { Capability } from '@dxos/app-framework';
|
|
10
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule(
|
|
13
|
+
Effect.fnUntraced(function* () {
|
|
14
|
+
const resolvers = yield* Capability.getAll(AppCapabilities.AiModelResolver);
|
|
15
|
+
|
|
16
|
+
// TODO(dmaretskyi): Extract function to reduce them.
|
|
17
|
+
const combinedLayer = resolvers.reduce(
|
|
18
|
+
(acc, resolver) => resolver.pipe(Layer.provide(acc)),
|
|
19
|
+
AiModelResolver.AiModelResolver.fromModelMap({ name: 'Fallback' }, Effect.succeed({})), // Empty resolver as fallback.
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
return [
|
|
23
|
+
// TODO(dmaretskyi): Read config from settings.
|
|
24
|
+
Capability.contributes(
|
|
25
|
+
AppCapabilities.AiServiceLayer,
|
|
26
|
+
AiModelResolver.AiModelResolver.buildAiService.pipe(Layer.provide(combinedLayer)),
|
|
27
|
+
),
|
|
28
|
+
];
|
|
29
|
+
}),
|
|
30
|
+
);
|
|
@@ -2,251 +2,216 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type PromiseIntentDispatcher,
|
|
14
|
-
type PluginContext,
|
|
15
|
-
} from '@dxos/app-framework';
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import { pipe } from 'effect/Function';
|
|
7
|
+
import * as Option from 'effect/Option';
|
|
8
|
+
|
|
9
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
10
|
+
import { AppCapabilities, AppNode, getActiveSpace, getPersonalSpace, LayoutOperation } from '@dxos/app-toolkit';
|
|
11
|
+
import { Chat } from '@dxos/assistant-toolkit';
|
|
12
|
+
import { Blueprint, Prompt } from '@dxos/blueprints';
|
|
16
13
|
import { Sequence } from '@dxos/conductor';
|
|
17
|
-
import { Obj } from '@dxos/echo';
|
|
14
|
+
import { DXN, Database, Filter, Obj, type Ref } from '@dxos/echo';
|
|
15
|
+
import { AtomObj } from '@dxos/echo-atom';
|
|
18
16
|
import { invariant } from '@dxos/invariant';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export default (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
options: {
|
|
63
|
-
state: true,
|
|
64
|
-
blockAlign: 'end',
|
|
65
|
-
props: {
|
|
66
|
-
chat,
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
}),
|
|
70
|
-
);
|
|
71
|
-
},
|
|
72
|
-
properties: {
|
|
73
|
-
label: ['open assistant label', { ns: meta.id }],
|
|
74
|
-
icon: 'ph--sparkle--regular',
|
|
75
|
-
disposition: 'pin-end',
|
|
76
|
-
position: 'hoist',
|
|
77
|
-
keyBinding: {
|
|
78
|
-
macos: 'shift+meta+k',
|
|
79
|
-
windows: 'shift+ctrl+k',
|
|
80
|
-
},
|
|
81
|
-
},
|
|
17
|
+
import { Operation, type OperationInvoker } from '@dxos/operation';
|
|
18
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation/types';
|
|
19
|
+
import { ClientCapabilities } from '@dxos/plugin-client/types';
|
|
20
|
+
import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
21
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
22
|
+
import { Query } from '@dxos/react-client/echo';
|
|
23
|
+
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
24
|
+
|
|
25
|
+
import { ASSISTANT_COMPANION_VARIANT, ASSISTANT_DIALOG, meta } from '#meta';
|
|
26
|
+
import { AssistantOperation } from '#operations';
|
|
27
|
+
import { AssistantCapabilities } from '#types';
|
|
28
|
+
|
|
29
|
+
/** Match ECHO objects that are NOT chats. */
|
|
30
|
+
const whenNonChatObject = NodeMatcher.whenAll(
|
|
31
|
+
NodeMatcher.whenEchoObject,
|
|
32
|
+
NodeMatcher.whenNot(NodeMatcher.whenEchoTypeMatches(Chat.Chat)),
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
export default Capability.makeModule(
|
|
36
|
+
Effect.fnUntraced(function* () {
|
|
37
|
+
const capabilities = yield* Capability.Service;
|
|
38
|
+
|
|
39
|
+
const extensions = yield* Effect.all([
|
|
40
|
+
GraphBuilder.createTypeExtension({
|
|
41
|
+
id: 'root',
|
|
42
|
+
type: Chat.Chat,
|
|
43
|
+
actions: (chat) => {
|
|
44
|
+
return Effect.succeed([
|
|
45
|
+
Node.makeAction({
|
|
46
|
+
id: AssistantOperation.UpdateChatName.meta.key,
|
|
47
|
+
data: () =>
|
|
48
|
+
Effect.gen(function* () {
|
|
49
|
+
// TODO(dmaretskyi): This goes away when composer will have unified operation invocations.
|
|
50
|
+
const computeRuntime = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
|
|
51
|
+
const db = Obj.getDatabase(chat);
|
|
52
|
+
invariant(db);
|
|
53
|
+
const runtime = yield* computeRuntime.getRuntime(db.spaceId).runtimeEffect;
|
|
54
|
+
yield* Operation.invoke(AssistantOperation.UpdateChatName, { chat }).pipe(Effect.provide(runtime));
|
|
55
|
+
}),
|
|
56
|
+
properties: {
|
|
57
|
+
label: ['chat-update-name.label', { ns: meta.id }],
|
|
58
|
+
icon: 'ph--magic-wand--regular',
|
|
59
|
+
disposition: 'list-item',
|
|
82
60
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
{
|
|
116
|
-
id: [fullyQualifiedId(object), 'assistant-chat'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
117
|
-
type: PLANK_COMPANION_TYPE,
|
|
118
|
-
data: chat ?? 'assistant-chat',
|
|
61
|
+
}),
|
|
62
|
+
]);
|
|
63
|
+
},
|
|
64
|
+
}),
|
|
65
|
+
|
|
66
|
+
GraphBuilder.createExtension({
|
|
67
|
+
id: 'assistant',
|
|
68
|
+
match: NodeMatcher.whenRoot,
|
|
69
|
+
actions: () =>
|
|
70
|
+
Effect.succeed([
|
|
71
|
+
Node.makeAction({
|
|
72
|
+
id: `${LayoutOperation.UpdateDialog.meta.key}.assistant.open`,
|
|
73
|
+
data: Effect.fnUntraced(function* () {
|
|
74
|
+
const capabilities = yield* Capability.Service;
|
|
75
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
76
|
+
const operationInvoker = yield* Capability.get(Capabilities.OperationInvoker);
|
|
77
|
+
const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
|
|
78
|
+
if (!space) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const chat = yield* Effect.tryPromise(() => getOrCreateChat(operationInvoker.invokePromise, space.db));
|
|
82
|
+
if (!chat) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
87
|
+
subject: ASSISTANT_DIALOG,
|
|
88
|
+
state: true,
|
|
89
|
+
blockAlign: 'end',
|
|
90
|
+
props: { chat },
|
|
91
|
+
});
|
|
92
|
+
}),
|
|
119
93
|
properties: {
|
|
120
|
-
label: ['assistant
|
|
94
|
+
label: ['open-assistant.label', { ns: meta.id }],
|
|
121
95
|
icon: 'ph--sparkle--regular',
|
|
96
|
+
disposition: 'pin-end',
|
|
122
97
|
position: 'hoist',
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
];
|
|
127
|
-
});
|
|
128
|
-
},
|
|
129
|
-
}),
|
|
130
|
-
|
|
131
|
-
createExtension({
|
|
132
|
-
id: `${meta.id}/sequence-logs`,
|
|
133
|
-
connector: (node) =>
|
|
134
|
-
Rx.make((get) =>
|
|
135
|
-
pipe(
|
|
136
|
-
get(node),
|
|
137
|
-
Option.flatMap((node) => (Obj.instanceOf(Sequence, node.data) ? Option.some(node) : Option.none())),
|
|
138
|
-
Option.map((node) => [
|
|
139
|
-
{
|
|
140
|
-
id: [node.id, 'logs'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
141
|
-
type: PLANK_COMPANION_TYPE,
|
|
142
|
-
data: 'logs',
|
|
143
|
-
properties: {
|
|
144
|
-
label: ['sequence logs label', { ns: meta.id }],
|
|
145
|
-
icon: 'ph--clock-countdown--regular',
|
|
146
|
-
disposition: 'hidden',
|
|
98
|
+
keyBinding: {
|
|
99
|
+
macos: 'shift+meta+k',
|
|
100
|
+
windows: 'shift+ctrl+k',
|
|
147
101
|
},
|
|
148
102
|
},
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
103
|
+
}),
|
|
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',
|
|
124
|
+
},
|
|
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 objectDxn = Obj.getDXN(object).toString();
|
|
138
|
+
|
|
139
|
+
// Resolve chat from persisted state or transient cache.
|
|
140
|
+
const chat = pipe(
|
|
141
|
+
Option.fromNullable(state.currentChat[objectDxn]),
|
|
142
|
+
Option.flatMap((dxnStr) => Option.fromNullable(DXN.tryParse(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[objectDxn]), Option.filter(Obj.isObject))),
|
|
147
|
+
Option.getOrNull,
|
|
148
|
+
);
|
|
149
|
+
|
|
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: 'hoist',
|
|
157
|
+
}),
|
|
158
|
+
];
|
|
159
|
+
}),
|
|
160
|
+
}),
|
|
161
|
+
|
|
162
|
+
GraphBuilder.createExtension({
|
|
163
|
+
id: 'invocations',
|
|
164
|
+
match: NodeMatcher.whenAny(
|
|
165
|
+
NodeMatcher.whenEchoTypeMatches(Sequence),
|
|
166
|
+
NodeMatcher.whenEchoTypeMatches(Prompt.Prompt),
|
|
152
167
|
),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
pipe(
|
|
161
|
-
get(node),
|
|
162
|
-
Option.flatMap((node) =>
|
|
163
|
-
node.type === SPACE_TYPE && isSpace(node.data) ? Option.some(node.data) : Option.none(),
|
|
164
|
-
),
|
|
165
|
-
Option.map((space) => {
|
|
166
|
-
if (!query) {
|
|
167
|
-
query = space.db.query(Query.type(TemplateType));
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
const templates = get(rxFromQuery(query));
|
|
171
|
-
return templates.length > 0
|
|
172
|
-
? [
|
|
173
|
-
{
|
|
174
|
-
id: `${meta.id}/templates`,
|
|
175
|
-
type: `${meta.id}/templates`,
|
|
176
|
-
data: null,
|
|
177
|
-
properties: {
|
|
178
|
-
label: ['templates label', { ns: meta.id }],
|
|
179
|
-
icon: 'ph--file-code--regular',
|
|
180
|
-
space,
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
]
|
|
184
|
-
: [];
|
|
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',
|
|
185
175
|
}),
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
node.id === `${meta.id}/templates` && isSpace(node.properties.space)
|
|
201
|
-
? Option.some(node.properties.space)
|
|
202
|
-
: Option.none(),
|
|
203
|
-
),
|
|
204
|
-
Option.map((space) => {
|
|
205
|
-
if (!query) {
|
|
206
|
-
query = space.db.query(Query.type(TemplateType));
|
|
207
|
-
}
|
|
208
|
-
return get(rxFromQuery(query))
|
|
209
|
-
.toSorted((a, b) => {
|
|
210
|
-
const nameA = a.name ?? '';
|
|
211
|
-
const nameB = b.name ?? '';
|
|
212
|
-
return nameA.localeCompare(nameB);
|
|
213
|
-
})
|
|
214
|
-
.map((template) => ({
|
|
215
|
-
id: fullyQualifiedId(template),
|
|
216
|
-
type: `${meta.id}/template`,
|
|
217
|
-
data: template,
|
|
218
|
-
properties: {
|
|
219
|
-
label: template.name ?? ['object placeholder', { ns: meta.id }],
|
|
220
|
-
icon: 'ph--file-code--regular',
|
|
221
|
-
},
|
|
222
|
-
}));
|
|
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: 'fallback',
|
|
223
190
|
}),
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
191
|
+
]),
|
|
192
|
+
}),
|
|
193
|
+
]);
|
|
194
|
+
|
|
195
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
196
|
+
}),
|
|
197
|
+
);
|
|
230
198
|
|
|
231
199
|
// TODO(burdon): Factor out.
|
|
232
200
|
const getOrCreateChat = async (
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
): Promise<
|
|
201
|
+
invokePromise: OperationInvoker.OperationInvoker['invokePromise'],
|
|
202
|
+
db: Database.Database,
|
|
203
|
+
): Promise<Chat.Chat | undefined> => {
|
|
236
204
|
// TODO(wittjosiah): This should be possible with a single query.
|
|
237
|
-
const
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
.run();
|
|
205
|
+
const allChats = await db.query(Query.type(Chat.Chat)).run();
|
|
206
|
+
const relatedChats = await db.query(Query.type(Chat.Chat).sourceOf(Chat.CompanionTo).source()).run();
|
|
207
|
+
|
|
241
208
|
const chats = allChats.filter((chat) => !relatedChats.includes(chat));
|
|
242
|
-
// console.log('objects', JSON.stringify(objects, null, 2));
|
|
243
209
|
if (chats.length > 0) {
|
|
244
|
-
|
|
245
|
-
return chats[chats.length - 1];
|
|
210
|
+
return chats.at(-1);
|
|
246
211
|
}
|
|
247
212
|
|
|
248
|
-
const { data } = await
|
|
249
|
-
invariant(Obj.instanceOf(
|
|
250
|
-
await
|
|
213
|
+
const { data } = await invokePromise(AssistantOperation.CreateChat, { db });
|
|
214
|
+
invariant(Obj.instanceOf(Chat.Chat, data?.object));
|
|
215
|
+
await invokePromise(SpaceOperation.AddObject, { target: db, object: data.object });
|
|
251
216
|
return data.object;
|
|
252
217
|
};
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
import {
|
|
10
|
+
AgentBlueprint,
|
|
11
|
+
AgentBlueprintHandlers,
|
|
12
|
+
AgentHandlers,
|
|
13
|
+
AgentWizardBlueprint,
|
|
14
|
+
AgentWizardHandlers,
|
|
15
|
+
BlueprintManagerBlueprint,
|
|
16
|
+
BlueprintManagerHandlers,
|
|
17
|
+
BrowserBlueprint,
|
|
18
|
+
DatabaseBlueprint,
|
|
19
|
+
DatabaseHandlers,
|
|
20
|
+
DiscordBlueprint,
|
|
21
|
+
EntityExtractionHandlers,
|
|
22
|
+
LinearBlueprint,
|
|
23
|
+
PlanningBlueprint,
|
|
24
|
+
ResearchBlueprint,
|
|
25
|
+
WebSearchBlueprint,
|
|
26
|
+
MemoryBlueprint,
|
|
27
|
+
AutomationBlueprint,
|
|
28
|
+
} from '@dxos/assistant-toolkit';
|
|
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, ResearchBlueprint),
|
|
39
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, WebSearchBlueprint),
|
|
40
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, DiscordBlueprint),
|
|
41
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, LinearBlueprint),
|
|
42
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, AgentBlueprint),
|
|
43
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, PlanningBlueprint),
|
|
44
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, MemoryBlueprint),
|
|
45
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, AutomationBlueprint),
|
|
46
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, BlueprintManagerBlueprint),
|
|
47
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, AgentWizardBlueprint),
|
|
48
|
+
|
|
49
|
+
Capability.contributes(Capabilities.OperationHandler, AgentHandlers),
|
|
50
|
+
Capability.contributes(Capabilities.OperationHandler, AgentBlueprintHandlers),
|
|
51
|
+
Capability.contributes(Capabilities.OperationHandler, BlueprintManagerHandlers),
|
|
52
|
+
Capability.contributes(Capabilities.OperationHandler, DatabaseHandlers),
|
|
53
|
+
Capability.contributes(Capabilities.OperationHandler, EntityExtractionHandlers),
|
|
54
|
+
Capability.contributes(Capabilities.OperationHandler, AgentWizardHandlers),
|
|
55
|
+
]),
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
export default blueprintDefinition;
|