@dxos/plugin-assistant 0.8.4-main.f5c0578 → 0.8.4-main.fcc0d83b33
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 +31 -0
- package/dist/lib/browser/blueprints/index.mjs.map +7 -0
- package/dist/lib/browser/chunk-RIJNPAYC.mjs +176 -0
- package/dist/lib/browser/chunk-RIJNPAYC.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/cli/index.mjs +73 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/create-chat-FZJASOQS.mjs +74 -0
- package/dist/lib/browser/create-chat-FZJASOQS.mjs.map +7 -0
- package/dist/lib/browser/ensure-companion-chat-PHUWWFVY.mjs +65 -0
- package/dist/lib/browser/ensure-companion-chat-PHUWWFVY.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +3347 -272
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/on-create-space-OQNCM7NC.mjs +22 -0
- package/dist/lib/browser/on-create-space-OQNCM7NC.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-PMNR7D3P.mjs +22 -0
- package/dist/lib/browser/resolve-navigation-targets-PMNR7D3P.mjs.map +7 -0
- package/dist/lib/browser/run-prompt-in-new-chat-4XDYFKCV.mjs +107 -0
- package/dist/lib/browser/run-prompt-in-new-chat-4XDYFKCV.mjs.map +7 -0
- package/dist/lib/browser/set-current-chat-7V4DA66I.mjs +54 -0
- package/dist/lib/browser/set-current-chat-7V4DA66I.mjs.map +7 -0
- package/dist/lib/browser/translations.mjs +171 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +5 -6
- package/dist/lib/browser/update-chat-name-ZGMU2UGN.mjs +56 -0
- package/dist/lib/browser/update-chat-name-ZGMU2UGN.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 +32 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NCIZY5ZV.mjs +177 -0
- package/dist/lib/node-esm/chunk-NCIZY5ZV.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/create-chat-RY6A4WUV.mjs +75 -0
- package/dist/lib/node-esm/create-chat-RY6A4WUV.mjs.map +7 -0
- package/dist/lib/node-esm/ensure-companion-chat-BTDU5TS2.mjs +66 -0
- package/dist/lib/node-esm/ensure-companion-chat-BTDU5TS2.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +3347 -272
- 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-4LWCYT3H.mjs +23 -0
- package/dist/lib/node-esm/on-create-space-4LWCYT3H.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-GHS3XPVP.mjs +23 -0
- package/dist/lib/node-esm/resolve-navigation-targets-GHS3XPVP.mjs.map +7 -0
- package/dist/lib/node-esm/run-prompt-in-new-chat-UF54E34O.mjs +108 -0
- package/dist/lib/node-esm/run-prompt-in-new-chat-UF54E34O.mjs.map +7 -0
- package/dist/lib/node-esm/set-current-chat-SWPAOLZL.mjs +55 -0
- package/dist/lib/node-esm/set-current-chat-SWPAOLZL.mjs.map +7 -0
- package/dist/lib/node-esm/translations.mjs +172 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +5 -6
- package/dist/lib/node-esm/update-chat-name-CW6K5M37.mjs +57 -0
- package/dist/lib/node-esm/update-chat-name-CW6K5M37.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 +4 -3
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +4 -2
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +9 -0
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +6 -4
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +29 -9
- 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 +4 -3
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
- 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 -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 +40 -31
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/context.d.ts +29 -0
- package/dist/types/src/components/Chat/context.d.ts.map +1 -0
- package/dist/types/src/components/Chat/events.d.ts +10 -1
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +2 -1
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +16 -5
- 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 +3 -4
- 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 +6 -4
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +2 -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 +16 -11
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +25 -215
- 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 +29 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.d.ts +69 -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/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 +7 -10
- 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 +13 -3
- 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 +15 -16
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +15 -5
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -9
- 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 +7 -5
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +9 -5
- 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 -11
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +5 -10
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- 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/useDebug.d.ts +10 -0
- package/dist/types/src/hooks/useDebug.d.ts.map +1 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts +3 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -0
- package/dist/types/src/{stories/hooks → hooks}/useFlush.d.ts +1 -1
- package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
- package/dist/types/src/hooks/usePresets.d.ts +3 -3
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -3
- 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 +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 +3 -0
- package/dist/types/src/processor/index.d.ts.map +1 -0
- package/dist/types/src/{hooks → processor}/presets.d.ts +2 -2
- 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 +2 -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-generator.test.d.ts +2 -0
- package/dist/types/src/testing/test-generator.test.d.ts.map +1 -0
- package/dist/types/src/testing/test-sequence.d.ts +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/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 -76
- 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 +32 -0
- package/dist/types/src/types/capabilities.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 +3 -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 -109
- package/src/AssistantPlugin.tsx +220 -129
- 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/Timeline → blueprints}/index.ts +1 -1
- package/src/capabilities/ai-service.ts +22 -20
- package/src/capabilities/app-graph-builder.ts +141 -148
- package/src/capabilities/blueprint-definition.ts +47 -25
- package/src/capabilities/companion-chat-provisioner.ts +164 -0
- package/src/capabilities/edge-model-resolver.ts +17 -13
- package/src/capabilities/index.ts +21 -11
- package/src/capabilities/local-model-resolver.ts +48 -0
- 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 +150 -128
- package/src/capabilities/settings.ts +24 -12
- package/src/capabilities/state.ts +35 -0
- package/src/capabilities/toolkit.ts +7 -100
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +83 -0
- package/src/components/AssistantSettings/AssistantSettings.stories.tsx +35 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +29 -91
- package/src/components/AssistantSettings/index.ts +2 -2
- package/src/components/Chat/Chat.tsx +169 -300
- package/src/components/Chat/context.ts +39 -0
- package/src/components/Chat/events.ts +14 -1
- package/src/components/ChatPrompt/ChatActions.tsx +35 -31
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +136 -0
- package/src/components/ChatPrompt/ChatOptions.tsx +410 -36
- package/src/components/ChatPrompt/ChatPresets.tsx +1 -0
- package/src/components/ChatPrompt/ChatPrompt.tsx +179 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +40 -38
- package/src/components/ChatPrompt/ChatStatus.tsx +123 -0
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +25 -22
- package/src/components/ChatPrompt/index.ts +2 -0
- package/src/components/ChatThread/Anchor.stories.tsx +95 -0
- package/src/components/ChatThread/ChatThread.stories.tsx +88 -220
- package/src/components/ChatThread/ChatThread.tsx +92 -36
- package/src/components/ChatThread/DEBUG.md +41 -0
- package/src/components/ChatThread/Link.tsx +11 -8
- package/src/components/ChatThread/MarkdownStream.stories.tsx +281 -0
- package/src/components/ChatThread/registry.tsx +286 -0
- package/src/components/ChatThread/sync.test.ts +259 -0
- package/src/components/ChatThread/sync.ts +150 -0
- 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-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/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 +29 -19
- package/src/components/TemplateEditor/TemplateEditor.tsx +57 -71
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +25 -17
- package/src/components/TemplateEditor/TemplateForm.tsx +86 -39
- 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 +18 -23
- package/src/components/Toolbox/Toolbox.tsx +81 -82
- package/src/components/index.ts +3 -8
- 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/containers/ChatCompanion/ChatCompanion.tsx +142 -0
- 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/containers/ChatDialog/ChatDialog.tsx +66 -0
- 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 +7 -6
- package/src/hooks/useBlueprintRegistry.ts +53 -23
- package/src/hooks/useChatKeymap.ts +52 -0
- package/src/hooks/useChatProcessor.ts +48 -39
- package/src/hooks/useChatServices.ts +12 -60
- package/src/hooks/useChatToolbarActions.ts +122 -0
- package/src/hooks/useContextBinder.ts +43 -0
- package/src/hooks/useContextObjects.ts +50 -0
- package/src/hooks/useDebug.ts +38 -0
- package/src/hooks/useFilteredTypes.ts +37 -0
- package/src/hooks/usePresets.ts +5 -5
- package/src/hooks/useReferencesProvider.ts +5 -8
- package/src/index.ts +1 -3
- 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/prompt.test.ts +78 -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/{hooks → processor}/presets.ts +21 -6
- package/src/processor/processor.test.ts +40 -0
- package/src/processor/processor.ts +321 -0
- package/src/queue-logger.ts +29 -19
- package/src/testing/data/trace-timeline.dx.json +4657 -0
- package/src/testing/index.ts +2 -1
- package/src/testing/test-generator.test.ts +81 -0
- package/src/testing/test-generator.ts +299 -0
- package/src/testing/test-sequence.ts +4 -29
- package/src/testing/test-services.ts +10 -14
- package/src/testing/test-trace.ts +20 -0
- package/src/testing/trace-timeline.conversations.json +1 -0
- package/src/testing/trace-timeline.test.ts +250 -0
- package/src/translations.ts +157 -68
- package/src/types/Assistant.ts +16 -53
- package/src/types/Settings.ts +76 -0
- package/src/types/capabilities.ts +35 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +5 -2
- package/src/types/service.ts +27 -16
- package/src/vite-env.d.ts +30 -0
- package/dist/lib/browser/BlueprintContainer-H7H4BQ2C.mjs +0 -29
- package/dist/lib/browser/BlueprintContainer-H7H4BQ2C.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-SB7YC2XP.mjs +0 -77
- package/dist/lib/browser/ChatContainer-SB7YC2XP.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-X6PFOQSQ.mjs +0 -87
- package/dist/lib/browser/ChatDialog-X6PFOQSQ.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-627OQ557.mjs +0 -163
- package/dist/lib/browser/SequenceContainer-627OQ557.mjs.map +0 -7
- package/dist/lib/browser/ai-service-7KJ5LXBT.mjs +0 -22
- package/dist/lib/browser/ai-service-7KJ5LXBT.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-ERU5XY2S.mjs +0 -166
- package/dist/lib/browser/app-graph-builder-ERU5XY2S.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-CMGIZAOW.mjs +0 -146
- package/dist/lib/browser/blueprint-definition-CMGIZAOW.mjs.map +0 -7
- package/dist/lib/browser/chunk-BVH6VK6Q.mjs +0 -2254
- package/dist/lib/browser/chunk-BVH6VK6Q.mjs.map +0 -7
- package/dist/lib/browser/chunk-JBFDQMUJ.mjs +0 -193
- package/dist/lib/browser/chunk-JBFDQMUJ.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-NZDCKQ6W.mjs +0 -89
- package/dist/lib/browser/chunk-NZDCKQ6W.mjs.map +0 -7
- package/dist/lib/browser/chunk-QB7OVS6Z.mjs +0 -16
- package/dist/lib/browser/chunk-QB7OVS6Z.mjs.map +0 -7
- package/dist/lib/browser/chunk-Y66UJUHV.mjs +0 -280
- package/dist/lib/browser/chunk-Y66UJUHV.mjs.map +0 -7
- package/dist/lib/browser/edge-model-resolver-2HB4PCWH.mjs +0 -24
- package/dist/lib/browser/edge-model-resolver-2HB4PCWH.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-DGRO2XSG.mjs +0 -81
- package/dist/lib/browser/intent-resolver-DGRO2XSG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-LPSIBHEJ.mjs +0 -163
- package/dist/lib/browser/react-surface-LPSIBHEJ.mjs.map +0 -7
- package/dist/lib/browser/settings-ZFNQYSYP.mjs +0 -23
- package/dist/lib/browser/settings-ZFNQYSYP.mjs.map +0 -7
- package/dist/lib/browser/toolkit-IW4FBLLB.mjs +0 -105
- package/dist/lib/browser/toolkit-IW4FBLLB.mjs.map +0 -7
- package/dist/lib/node-esm/BlueprintContainer-VH4EE4CM.mjs +0 -30
- package/dist/lib/node-esm/BlueprintContainer-VH4EE4CM.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-7JLMWHMX.mjs +0 -78
- package/dist/lib/node-esm/ChatContainer-7JLMWHMX.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-QDD722F2.mjs +0 -88
- package/dist/lib/node-esm/ChatDialog-QDD722F2.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-EQ5NP2PG.mjs +0 -164
- package/dist/lib/node-esm/SequenceContainer-EQ5NP2PG.mjs.map +0 -7
- package/dist/lib/node-esm/ai-service-LDD32477.mjs +0 -23
- package/dist/lib/node-esm/ai-service-LDD32477.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-RCT4ANP2.mjs +0 -167
- package/dist/lib/node-esm/app-graph-builder-RCT4ANP2.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-AEWYMW6I.mjs +0 -147
- package/dist/lib/node-esm/blueprint-definition-AEWYMW6I.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ETS2CIDF.mjs +0 -2255
- package/dist/lib/node-esm/chunk-ETS2CIDF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GAWXJ7K5.mjs +0 -90
- package/dist/lib/node-esm/chunk-GAWXJ7K5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GENVBE3B.mjs +0 -194
- package/dist/lib/node-esm/chunk-GENVBE3B.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-QS6GWTVA.mjs +0 -281
- package/dist/lib/node-esm/chunk-QS6GWTVA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-X6AANUHZ.mjs +0 -17
- package/dist/lib/node-esm/chunk-X6AANUHZ.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-UDDR2IA6.mjs +0 -25
- package/dist/lib/node-esm/edge-model-resolver-UDDR2IA6.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-7CKWG7TZ.mjs +0 -82
- package/dist/lib/node-esm/intent-resolver-7CKWG7TZ.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-3EPAE4I4.mjs +0 -164
- package/dist/lib/node-esm/react-surface-3EPAE4I4.mjs.map +0 -7
- package/dist/lib/node-esm/settings-UI4VQCWW.mjs +0 -24
- package/dist/lib/node-esm/settings-UI4VQCWW.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-2VNUL77B.mjs +0 -106
- package/dist/lib/node-esm/toolkit-2VNUL77B.mjs.map +0 -7
- package/dist/types/src/capabilities/capabilities.d.ts +0 -11
- 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/BlueprintContainer.d.ts +0 -8
- package/dist/types/src/components/BlueprintContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer.d.ts +0 -12
- 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/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 -19
- 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 -8
- 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/Timeline/Timeline.d.ts +0 -42
- package/dist/types/src/components/Timeline/Timeline.d.ts.map +0 -1
- package/dist/types/src/components/Timeline/Timeline.stories.d.ts +0 -11
- package/dist/types/src/components/Timeline/Timeline.stories.d.ts.map +0 -1
- package/dist/types/src/components/Timeline/index.d.ts +0 -2
- package/dist/types/src/components/Timeline/index.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/execution-graph/execution-graph.d.ts +0 -21
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +0 -1
- package/dist/types/src/execution-graph/index.d.ts +0 -2
- package/dist/types/src/execution-graph/index.d.ts.map +0 -1
- package/dist/types/src/functions/analysis.d.ts +0 -5
- package/dist/types/src/functions/analysis.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -4
- package/dist/types/src/functions/index.d.ts.map +0 -1
- package/dist/types/src/functions/list.d.ts +0 -10
- package/dist/types/src/functions/list.d.ts.map +0 -1
- package/dist/types/src/functions/load.d.ts +0 -8
- package/dist/types/src/functions/load.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.d.ts +0 -72
- package/dist/types/src/hooks/chat-processor.d.ts.map +0 -1
- package/dist/types/src/hooks/errors.d.ts +0 -4
- package/dist/types/src/hooks/errors.d.ts.map +0 -1
- package/dist/types/src/hooks/presets.d.ts.map +0 -1
- package/dist/types/src/hooks/useExecutionGraph.d.ts +0 -7
- package/dist/types/src/hooks/useExecutionGraph.d.ts.map +0 -1
- package/dist/types/src/hooks/useResolveRef.d.ts +0 -4
- package/dist/types/src/hooks/useResolveRef.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 -268
- package/dist/types/src/stories/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +0 -5
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/ChatContainer.d.ts +0 -5
- package/dist/types/src/stories/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/GraphContainer.d.ts +0 -6
- package/dist/types/src/stories/components/GraphContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/LoggingContainer.d.ts +0 -5
- package/dist/types/src/stories/components/LoggingContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/SurfaceContainer.d.ts +0 -8
- package/dist/types/src/stories/components/SurfaceContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/TasksContainer.d.ts +0 -5
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/index.d.ts +0 -8
- package/dist/types/src/stories/components/index.d.ts.map +0 -1
- package/dist/types/src/stories/components/types.d.ts +0 -7
- package/dist/types/src/stories/components/types.d.ts.map +0 -1
- package/dist/types/src/stories/hooks/index.d.ts +0 -3
- package/dist/types/src/stories/hooks/index.d.ts.map +0 -1
- package/dist/types/src/stories/hooks/useFlush.d.ts.map +0 -1
- package/dist/types/src/stories/hooks/useMatcherExtension.d.ts +0 -3
- package/dist/types/src/stories/hooks/useMatcherExtension.d.ts.map +0 -1
- package/dist/types/src/stories/testing/data.d.ts +0 -142
- package/dist/types/src/stories/testing/data.d.ts.map +0 -1
- package/dist/types/src/stories/testing/index.d.ts +0 -3
- package/dist/types/src/stories/testing/index.d.ts.map +0 -1
- package/dist/types/src/stories/testing/testing.d.ts +0 -26
- package/dist/types/src/stories/testing/testing.d.ts.map +0 -1
- package/dist/types/src/testing/test-functions.d.ts +0 -6
- package/dist/types/src/testing/test-functions.d.ts.map +0 -1
- package/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/AssistantAction.d.ts +0 -91
- 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/capabilities/capabilities.ts +0 -22
- package/src/capabilities/intent-resolver.ts +0 -73
- package/src/components/BlueprintContainer.tsx +0 -24
- package/src/components/ChatContainer.tsx +0 -69
- package/src/components/ChatDialog.tsx +0 -68
- package/src/components/ChatThread/ChatMessage.tsx +0 -291
- package/src/components/ChatThread/ToolBlock.tsx +0 -125
- package/src/components/ChatThread/reducer.ts +0 -52
- package/src/components/PromptSettings.tsx +0 -89
- package/src/components/SequenceContainer.tsx +0 -133
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +0 -33
- package/src/components/SequenceEditor/SequenceEditor.tsx +0 -50
- package/src/components/SequenceEditor/index.ts +0 -5
- package/src/components/Timeline/Timeline.stories.tsx +0 -144
- package/src/components/Timeline/Timeline.tsx +0 -202
- package/src/events.ts +0 -11
- package/src/execution-graph/execution-graph.ts +0 -184
- package/src/execution-graph/index.ts +0 -5
- package/src/functions/analysis.ts +0 -20
- package/src/functions/index.ts +0 -7
- package/src/functions/list.ts +0 -42
- package/src/functions/load.ts +0 -43
- package/src/hooks/chat-processor.ts +0 -260
- package/src/hooks/errors.ts +0 -8
- package/src/hooks/useExecutionGraph.ts +0 -16
- package/src/hooks/useResolveRef.ts +0 -33
- package/src/parser/filter-generator.test.ts +0 -32
- package/src/parser/filter-generator.ts +0 -74
- 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 -317
- package/src/stories/components/BlueprintContainer.tsx +0 -34
- package/src/stories/components/ChatContainer.tsx +0 -80
- package/src/stories/components/GraphContainer.tsx +0 -118
- package/src/stories/components/LoggingContainer.tsx +0 -29
- package/src/stories/components/SurfaceContainer.tsx +0 -62
- package/src/stories/components/TasksContainer.tsx +0 -51
- package/src/stories/components/index.ts +0 -12
- package/src/stories/components/types.ts +0 -11
- package/src/stories/hooks/index.ts +0 -6
- package/src/stories/hooks/useMatcherExtension.ts +0 -45
- package/src/stories/testing/data.ts +0 -130
- package/src/stories/testing/index.ts +0 -6
- package/src/stories/testing/testing.tsx +0 -163
- package/src/testing/test-functions.ts +0 -16
- package/src/tools/function.ts +0 -49
- package/src/tools/index.ts +0 -6
- package/src/tools/openapi.test.ts +0 -219
- package/src/tools/openapi.ts +0 -341
- package/src/types/AssistantAction.ts +0 -54
- package/src/types/defs.ts +0 -5
- package/src/typings.d.ts +0 -9
- /package/src/{stories/hooks → hooks}/useFlush.ts +0 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
|
|
7
|
+
import { AiService } from '@dxos/ai';
|
|
8
|
+
import { Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Chat } from '@dxos/assistant-toolkit';
|
|
10
|
+
import { SpaceSchema } from '@dxos/client/echo';
|
|
11
|
+
import { Routine } from '@dxos/compute';
|
|
12
|
+
import { Operation } from '@dxos/compute';
|
|
13
|
+
import { Collection, Database, DXN, Feed, Obj, Ref } from '@dxos/echo';
|
|
14
|
+
|
|
15
|
+
import { meta } from '#meta';
|
|
16
|
+
|
|
17
|
+
const ASSISTANT_OPERATION = `${meta.id}.operation`;
|
|
18
|
+
|
|
19
|
+
export const OnCreateSpace = Operation.make({
|
|
20
|
+
meta: { key: `${ASSISTANT_OPERATION}.on-create-space`, name: 'On Create Space' },
|
|
21
|
+
services: [Capability.Service],
|
|
22
|
+
input: Schema.Struct({
|
|
23
|
+
space: SpaceSchema,
|
|
24
|
+
rootCollection: Collection.Collection,
|
|
25
|
+
}),
|
|
26
|
+
output: Schema.Void,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export const CreateChat = Operation.make({
|
|
30
|
+
meta: { key: `${ASSISTANT_OPERATION}.create-chat`, name: 'Create Chat' },
|
|
31
|
+
services: [Capability.Service],
|
|
32
|
+
input: Schema.Struct({
|
|
33
|
+
db: Database.Database,
|
|
34
|
+
name: Schema.optional(Schema.String),
|
|
35
|
+
/** If false, chat is created in-memory only and not added to space. Defaults to true. */
|
|
36
|
+
addToSpace: Schema.optional(Schema.Boolean),
|
|
37
|
+
}),
|
|
38
|
+
output: Schema.Struct({
|
|
39
|
+
object: Chat.Chat,
|
|
40
|
+
}),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export const UpdateChatName = Operation.make({
|
|
44
|
+
meta: { key: `${ASSISTANT_OPERATION}.update-chat-name`, name: 'Update Chat Name' },
|
|
45
|
+
services: [Database.Service, Feed.FeedService, AiService.AiService],
|
|
46
|
+
input: Schema.Struct({
|
|
47
|
+
chat: Chat.Chat,
|
|
48
|
+
}),
|
|
49
|
+
output: Schema.Void,
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export const SetCurrentChat = Operation.make({
|
|
53
|
+
meta: { key: `${ASSISTANT_OPERATION}.set-current-chat`, name: 'Set Current Chat' },
|
|
54
|
+
services: [Capability.Service],
|
|
55
|
+
input: Schema.Struct({
|
|
56
|
+
companionTo: Obj.Unknown,
|
|
57
|
+
chat: Chat.Chat.pipe(Schema.optional),
|
|
58
|
+
}),
|
|
59
|
+
output: Schema.Void,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export const RunPromptInNewChat = Operation.make({
|
|
63
|
+
meta: { key: `${ASSISTANT_OPERATION}.run-prompt-in-new-chat`, name: 'Run Prompt In New Chat' },
|
|
64
|
+
services: [Capability.Service],
|
|
65
|
+
input: Schema.Struct({
|
|
66
|
+
db: Database.Database,
|
|
67
|
+
/** Context objects to bind to the new chat. */
|
|
68
|
+
objects: Schema.optional(Schema.Array(Obj.Unknown)),
|
|
69
|
+
/** Blueprint keys to look up and bind to the new chat. */
|
|
70
|
+
blueprints: Schema.optional(Schema.Array(Schema.String)),
|
|
71
|
+
/** Raw instructions or an existing Routine object reference. */
|
|
72
|
+
prompt: Schema.Union(Schema.String, Ref.Ref(Routine.Routine)),
|
|
73
|
+
/**
|
|
74
|
+
* When true, skips opening the chat: runs the Agent prompt operation against the new chat via the compute runtime (traced).
|
|
75
|
+
*/
|
|
76
|
+
background: Schema.optional(Schema.Boolean),
|
|
77
|
+
}),
|
|
78
|
+
output: Schema.Struct({
|
|
79
|
+
object: Chat.Chat,
|
|
80
|
+
}),
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const NavigationTargetSchema = Schema.Struct({
|
|
84
|
+
path: Schema.String.annotations({ description: 'Navigation path to use with the Open operation.' }),
|
|
85
|
+
label: Schema.String.annotations({ description: 'Human-readable label.' }),
|
|
86
|
+
type: Schema.String.annotations({ description: 'Object type.' }),
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
export const ResolveNavigationTargets = Operation.make({
|
|
90
|
+
meta: {
|
|
91
|
+
key: `${ASSISTANT_OPERATION}.resolve-navigation-targets`,
|
|
92
|
+
name: 'Resolve navigation targets',
|
|
93
|
+
description:
|
|
94
|
+
'Resolve navigation targets within the application. The returned paths can be used with the Open operation. Without a query, returns pages that can be navigated to.',
|
|
95
|
+
},
|
|
96
|
+
input: Schema.Struct({
|
|
97
|
+
query: Schema.optional(
|
|
98
|
+
Schema.Struct({
|
|
99
|
+
dxn: DXN.Schema.pipe(Schema.optional),
|
|
100
|
+
}),
|
|
101
|
+
),
|
|
102
|
+
}),
|
|
103
|
+
output: Schema.Struct({
|
|
104
|
+
targets: Schema.Array(NavigationTargetSchema),
|
|
105
|
+
}),
|
|
106
|
+
services: [Capability.Service],
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
export const EnsureCompanionChat = Operation.make({
|
|
110
|
+
meta: { key: `${ASSISTANT_OPERATION}.ensure-companion-chat`, name: 'Ensure Companion Chat' },
|
|
111
|
+
services: [Capability.Service],
|
|
112
|
+
input: Schema.Struct({
|
|
113
|
+
db: Database.Database,
|
|
114
|
+
companionTo: Obj.Unknown,
|
|
115
|
+
}),
|
|
116
|
+
output: Schema.Struct({
|
|
117
|
+
chat: Chat.Chat,
|
|
118
|
+
/** Whether the returned chat was already persisted in the space. */
|
|
119
|
+
persisted: Schema.Boolean,
|
|
120
|
+
}),
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
export const BlueprintForm = Schema.Struct({
|
|
124
|
+
key: Schema.String,
|
|
125
|
+
name: Schema.String,
|
|
126
|
+
description: Schema.optional(Schema.String),
|
|
127
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
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 { Chat } from '@dxos/assistant-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
|
+
import { Filter, Obj, Query } from '@dxos/echo';
|
|
11
|
+
|
|
12
|
+
import { AssistantCapabilities } from '../types';
|
|
13
|
+
import { CreateChat, EnsureCompanionChat, SetCurrentChat } from './definitions';
|
|
14
|
+
|
|
15
|
+
const handler: Operation.WithHandler<typeof EnsureCompanionChat> = EnsureCompanionChat.pipe(
|
|
16
|
+
Operation.withHandler(
|
|
17
|
+
Effect.fnUntraced(function* ({ db, companionTo }) {
|
|
18
|
+
const operationInvoker = yield* Capability.get(Capabilities.OperationInvoker);
|
|
19
|
+
const companionDxn = Obj.getDXN(companionTo).toString();
|
|
20
|
+
|
|
21
|
+
// 1. Look for an existing persisted companion chat in the space.
|
|
22
|
+
const existingChats = yield* Effect.promise(() =>
|
|
23
|
+
db.query(Query.select(Filter.id(companionTo.id)).targetOf(Chat.CompanionTo).source()).run(),
|
|
24
|
+
);
|
|
25
|
+
if (existingChats.length > 0) {
|
|
26
|
+
const chat = existingChats.at(-1) as Chat.Chat;
|
|
27
|
+
// Cache the persisted chat so the graph connector can resolve it immediately
|
|
28
|
+
// via the cache fallback, without waiting for AtomObj.make(ref) to hydrate.
|
|
29
|
+
yield* Capabilities.updateAtomValue(AssistantCapabilities.CompanionChatCache, (current) => ({
|
|
30
|
+
...current,
|
|
31
|
+
[companionDxn]: chat,
|
|
32
|
+
}));
|
|
33
|
+
yield* Effect.promise(() => operationInvoker.invokePromise(SetCurrentChat, { companionTo, chat }));
|
|
34
|
+
return { chat, persisted: true };
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// 2. Return cached transient chat for this companion if present.
|
|
38
|
+
const cache = yield* Capabilities.getAtomValue(AssistantCapabilities.CompanionChatCache);
|
|
39
|
+
const cached = cache[companionDxn] as Chat.Chat | undefined;
|
|
40
|
+
if (cached) {
|
|
41
|
+
return { chat: cached, persisted: false };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// 3. Create a new transient chat, cache it, and return it without persisting.
|
|
45
|
+
const { data } = yield* Effect.promise(() =>
|
|
46
|
+
operationInvoker.invokePromise(CreateChat, { db, addToSpace: false }),
|
|
47
|
+
);
|
|
48
|
+
if (!data?.object) {
|
|
49
|
+
return yield* Effect.fail(new Error('CreateChat did not return a chat object'));
|
|
50
|
+
}
|
|
51
|
+
const chat = data.object;
|
|
52
|
+
yield* Capabilities.updateAtomValue(AssistantCapabilities.CompanionChatCache, (current) => ({
|
|
53
|
+
...current,
|
|
54
|
+
[companionDxn]: chat,
|
|
55
|
+
}));
|
|
56
|
+
return { chat, persisted: false };
|
|
57
|
+
}),
|
|
58
|
+
),
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
export default handler;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
6
|
+
|
|
7
|
+
export * as AssistantOperation from './definitions';
|
|
8
|
+
|
|
9
|
+
export const AssistantOperationHandlerSet = OperationHandlerSet.lazy(
|
|
10
|
+
() => import('./create-chat'),
|
|
11
|
+
() => import('./ensure-companion-chat'),
|
|
12
|
+
() => import('./on-create-space'),
|
|
13
|
+
() => import('./resolve-navigation-targets'),
|
|
14
|
+
() => import('./run-prompt-in-new-chat'),
|
|
15
|
+
() => import('./set-current-chat'),
|
|
16
|
+
() => import('./update-chat-name'),
|
|
17
|
+
);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { AgentPrompt } from '@dxos/assistant-toolkit';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
|
|
10
|
+
import { CreateChat, OnCreateSpace } from './definitions';
|
|
11
|
+
|
|
12
|
+
const handler: Operation.WithHandler<typeof OnCreateSpace> = OnCreateSpace.pipe(
|
|
13
|
+
Operation.withHandler(
|
|
14
|
+
Effect.fnUntraced(function* ({ space }) {
|
|
15
|
+
// TODO(wittjosiah): Remove once function registry is avaiable.
|
|
16
|
+
space.db.add(Operation.serialize(AgentPrompt));
|
|
17
|
+
|
|
18
|
+
const { object: chat } = yield* Operation.invoke(CreateChat, { db: space.db });
|
|
19
|
+
space.db.add(chat);
|
|
20
|
+
}),
|
|
21
|
+
),
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export default handler;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Array from 'effect/Array';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import { describe, test } from 'vitest';
|
|
8
|
+
|
|
9
|
+
import { AgentPrompt, Chat } from '@dxos/assistant-toolkit';
|
|
10
|
+
import { Routine } from '@dxos/compute';
|
|
11
|
+
import { Operation } from '@dxos/compute';
|
|
12
|
+
import { Database, Feed, Filter, Ref } from '@dxos/echo';
|
|
13
|
+
import { runAndForwardErrors } from '@dxos/effect';
|
|
14
|
+
import { ObjectId } from '@dxos/keys';
|
|
15
|
+
import { AutomationPlugin } from '@dxos/plugin-automation/cli';
|
|
16
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation/types';
|
|
17
|
+
import { ClientPlugin } from '@dxos/plugin-client/cli';
|
|
18
|
+
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
19
|
+
import { ClientCapabilities } from '@dxos/plugin-client/types';
|
|
20
|
+
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
21
|
+
import { Message } from '@dxos/types';
|
|
22
|
+
|
|
23
|
+
import { AssistantPlugin } from '../cli';
|
|
24
|
+
|
|
25
|
+
ObjectId.dangerouslyDisableRandomness();
|
|
26
|
+
|
|
27
|
+
describe('Agent prompt (composer plugin harness)', () => {
|
|
28
|
+
// Hits AutomationPlugin compute runtime (plugin handlers, AiServiceLayer, blueprints).
|
|
29
|
+
// Requires reachable edge AI (see repo DX_EDGE_AI_SERVICE_URL); not memoized like AssistantTestLayer tests.
|
|
30
|
+
test(
|
|
31
|
+
'chat mode appends assistant messages to the chat queue',
|
|
32
|
+
{ tags: ['llm'], timeout: 60_000 },
|
|
33
|
+
async ({ expect }) => {
|
|
34
|
+
await using harness = await createComposerTestApp({
|
|
35
|
+
plugins: [ClientPlugin({}), AssistantPlugin(), AutomationPlugin()],
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const { personalSpace } = await runAndForwardErrors(initializeIdentity(harness.get(ClientCapabilities.Client)));
|
|
39
|
+
const computeProvider = await harness.waitForCapability(AutomationCapabilities.ComputeRuntime, {
|
|
40
|
+
timeout: 30_000,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
await computeProvider.getRuntime(personalSpace.id).runPromise(
|
|
44
|
+
Effect.gen(function* () {
|
|
45
|
+
const feed = yield* Database.add(Feed.make());
|
|
46
|
+
|
|
47
|
+
const messageCountBefore = yield* Feed.runQuery(feed, Filter.type(Message.Message)).pipe(
|
|
48
|
+
Effect.map(Array.length),
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const chat = yield* Database.add(Chat.make({ feed: Ref.make(feed) }));
|
|
52
|
+
const prompt = yield* Database.add(
|
|
53
|
+
Routine.make({
|
|
54
|
+
name: 'chat-mode-test',
|
|
55
|
+
instructions: 'Reply with a single word: ack.',
|
|
56
|
+
blueprints: [],
|
|
57
|
+
context: [],
|
|
58
|
+
}),
|
|
59
|
+
);
|
|
60
|
+
yield* Database.flush();
|
|
61
|
+
|
|
62
|
+
const result = yield* Operation.invoke(AgentPrompt, {
|
|
63
|
+
prompt: Ref.make(prompt),
|
|
64
|
+
input: {},
|
|
65
|
+
chat: Ref.make(chat),
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const messageCountAfter = yield* Feed.runQuery(feed, Filter.type(Message.Message)).pipe(
|
|
69
|
+
Effect.map(Array.length),
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
expect(messageCountAfter).toBeGreaterThan(messageCountBefore);
|
|
73
|
+
expect(result).toBe('ack');
|
|
74
|
+
}),
|
|
75
|
+
);
|
|
76
|
+
},
|
|
77
|
+
);
|
|
78
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { Operation } from '@dxos/compute';
|
|
10
|
+
|
|
11
|
+
import { ResolveNavigationTargets } from './definitions';
|
|
12
|
+
|
|
13
|
+
export default ResolveNavigationTargets.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fn(function* ({ query }) {
|
|
16
|
+
const capabilities = yield* Capability.Service;
|
|
17
|
+
|
|
18
|
+
// Delegate to contributed resolvers.
|
|
19
|
+
const resolvers = capabilities.getAll(AppCapabilities.NavigationTargetResolver);
|
|
20
|
+
const results = yield* Effect.forEach(resolvers, (resolver) =>
|
|
21
|
+
resolver(query as AppCapabilities.NavigationQuery).pipe(Effect.catchAll(() => Effect.succeed([]))),
|
|
22
|
+
);
|
|
23
|
+
return { targets: results.flat() };
|
|
24
|
+
}),
|
|
25
|
+
),
|
|
26
|
+
);
|
|
@@ -0,0 +1,113 @@
|
|
|
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 { getObjectPathFromObject, LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { AiContextBinder } from '@dxos/assistant';
|
|
10
|
+
import { AgentPrompt } from '@dxos/assistant-toolkit';
|
|
11
|
+
import { Blueprint, Routine, Template } from '@dxos/compute';
|
|
12
|
+
import { Operation } from '@dxos/compute';
|
|
13
|
+
import { Database, Feed, Filter, Obj, Ref } from '@dxos/echo';
|
|
14
|
+
import { createFeedServiceLayer } from '@dxos/echo-db';
|
|
15
|
+
import { invariant } from '@dxos/invariant';
|
|
16
|
+
import { log } from '@dxos/log';
|
|
17
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation/types';
|
|
18
|
+
import { ClientCapabilities } from '@dxos/plugin-client/types';
|
|
19
|
+
import { Text } from '@dxos/schema';
|
|
20
|
+
|
|
21
|
+
import { AssistantCapabilities } from '../types';
|
|
22
|
+
import { CreateChat, RunPromptInNewChat } from './definitions';
|
|
23
|
+
|
|
24
|
+
const handler: Operation.WithHandler<typeof RunPromptInNewChat> = RunPromptInNewChat.pipe(
|
|
25
|
+
Operation.withHandler(
|
|
26
|
+
Effect.fnUntraced(
|
|
27
|
+
function* ({ db, prompt, objects, blueprints, background }) {
|
|
28
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
29
|
+
const { object: chat } = yield* Operation.invoke(CreateChat, { db });
|
|
30
|
+
|
|
31
|
+
if ((objects && objects.length > 0) || (blueprints && blueprints.length > 0)) {
|
|
32
|
+
const feedTarget = chat.feed.target;
|
|
33
|
+
invariant(feedTarget, 'Chat feed not found.');
|
|
34
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
35
|
+
const space = client.spaces.get(db.spaceId);
|
|
36
|
+
invariant(space, 'Space not found.');
|
|
37
|
+
const feedServiceLayer = createFeedServiceLayer(space.queues);
|
|
38
|
+
const runtime = yield* Effect.runtime<Feed.FeedService>().pipe(Effect.provide(feedServiceLayer));
|
|
39
|
+
const binder = new AiContextBinder({ feed: feedTarget, runtime, registry });
|
|
40
|
+
yield* Effect.promise(() =>
|
|
41
|
+
binder.use(async (b: AiContextBinder) => {
|
|
42
|
+
const bindingProps: Parameters<AiContextBinder['bind']>[0] = {};
|
|
43
|
+
|
|
44
|
+
if (objects && objects.length > 0) {
|
|
45
|
+
bindingProps.objects = objects.map((obj) => Ref.make(obj));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (blueprints && blueprints.length > 0) {
|
|
49
|
+
const allBlueprints = await db.query(Filter.type(Blueprint.Blueprint)).run();
|
|
50
|
+
const matchedBlueprints = allBlueprints.filter(
|
|
51
|
+
(blueprint) => blueprint.key && blueprints.includes(blueprint.key),
|
|
52
|
+
);
|
|
53
|
+
if (matchedBlueprints.length > 0) {
|
|
54
|
+
bindingProps.blueprints = matchedBlueprints.map((blueprint) => Ref.make(blueprint));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
await b.bind(bindingProps);
|
|
59
|
+
}),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (background) {
|
|
64
|
+
const promptRef =
|
|
65
|
+
typeof prompt === 'string'
|
|
66
|
+
? Ref.make(
|
|
67
|
+
Routine.make({
|
|
68
|
+
instructions: prompt,
|
|
69
|
+
blueprints: [],
|
|
70
|
+
context: [],
|
|
71
|
+
}),
|
|
72
|
+
)
|
|
73
|
+
: prompt;
|
|
74
|
+
yield* Database.flush();
|
|
75
|
+
const computeRuntime = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
|
|
76
|
+
const runtime = yield* computeRuntime.getRuntime(db.spaceId).runtimeEffect;
|
|
77
|
+
yield* Operation.invoke(AgentPrompt, {
|
|
78
|
+
prompt: promptRef,
|
|
79
|
+
input: {},
|
|
80
|
+
chat: Ref.make(chat),
|
|
81
|
+
}).pipe(
|
|
82
|
+
Effect.provide(runtime),
|
|
83
|
+
Effect.catchAll((error) => {
|
|
84
|
+
log.catch(error);
|
|
85
|
+
return Effect.void;
|
|
86
|
+
}),
|
|
87
|
+
);
|
|
88
|
+
return { object: chat };
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const chatPath = getObjectPathFromObject(chat);
|
|
92
|
+
const pendingPromptText =
|
|
93
|
+
typeof prompt === 'string'
|
|
94
|
+
? prompt
|
|
95
|
+
: yield* Effect.gen(function* () {
|
|
96
|
+
const promptObj = yield* Effect.promise(() => prompt.load());
|
|
97
|
+
const source = yield* Effect.promise(() => promptObj.instructions.source.load());
|
|
98
|
+
invariant(Obj.instanceOf(Text.Text, source), 'Prompt template source must be Text.');
|
|
99
|
+
return Template.process(source.content ?? '');
|
|
100
|
+
});
|
|
101
|
+
yield* Capabilities.updateAtomValue(AssistantCapabilities.State, (current) => ({
|
|
102
|
+
...current,
|
|
103
|
+
pendingPrompts: { ...current.pendingPrompts, [chatPath]: pendingPromptText },
|
|
104
|
+
}));
|
|
105
|
+
yield* Operation.invoke(LayoutOperation.Open, { subject: [chatPath] });
|
|
106
|
+
return { object: chat };
|
|
107
|
+
},
|
|
108
|
+
(effect, { db }) => effect.pipe(Effect.provide(Database.layer(db))),
|
|
109
|
+
),
|
|
110
|
+
),
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
export default handler;
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { Operation } from '@dxos/compute';
|
|
9
|
+
import { Obj } from '@dxos/echo';
|
|
10
|
+
|
|
11
|
+
import { AssistantCapabilities } from '../types';
|
|
12
|
+
import { CreateChat, SetCurrentChat } from './definitions';
|
|
13
|
+
|
|
14
|
+
const handler: Operation.WithHandler<typeof SetCurrentChat> = SetCurrentChat.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fnUntraced(function* ({ companionTo, chat }) {
|
|
17
|
+
const companionToId = Obj.getDXN(companionTo).toString();
|
|
18
|
+
|
|
19
|
+
if (chat) {
|
|
20
|
+
const chatId = Obj.getDXN(chat).toString();
|
|
21
|
+
yield* Capabilities.updateAtomValue(AssistantCapabilities.State, (current) => ({
|
|
22
|
+
...current,
|
|
23
|
+
currentChat: { ...current.currentChat, [companionToId]: chatId },
|
|
24
|
+
}));
|
|
25
|
+
} else {
|
|
26
|
+
// New thread: create a transient chat and cache it so the graph connector
|
|
27
|
+
// can resolve it immediately via the cache fallback tier.
|
|
28
|
+
const operationInvoker = yield* Capability.get(Capabilities.OperationInvoker);
|
|
29
|
+
const db = Obj.getDatabase(companionTo);
|
|
30
|
+
if (db) {
|
|
31
|
+
const { data } = yield* Effect.promise(() =>
|
|
32
|
+
operationInvoker.invokePromise(CreateChat, { db, addToSpace: false }),
|
|
33
|
+
);
|
|
34
|
+
if (data?.object) {
|
|
35
|
+
yield* Capabilities.updateAtomValue(AssistantCapabilities.CompanionChatCache, (current) => ({
|
|
36
|
+
...current,
|
|
37
|
+
[companionToId]: data.object,
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
yield* Capabilities.updateAtomValue(AssistantCapabilities.State, (current) => ({
|
|
42
|
+
...current,
|
|
43
|
+
currentChat: { ...current.currentChat, [companionToId]: undefined },
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
}),
|
|
47
|
+
),
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
export default handler;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as LanguageModel from '@effect/ai/LanguageModel';
|
|
6
|
+
import * as Prompt from '@effect/ai/Prompt';
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
|
|
9
|
+
import { AiPreprocessor, AiService } from '@dxos/ai';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
11
|
+
import { Database, Feed, Filter, Obj } from '@dxos/echo';
|
|
12
|
+
import { log } from '@dxos/log';
|
|
13
|
+
import { Message } from '@dxos/types';
|
|
14
|
+
import { trim } from '@dxos/util';
|
|
15
|
+
|
|
16
|
+
import { UpdateChatName } from './definitions';
|
|
17
|
+
|
|
18
|
+
const handler: Operation.WithHandler<typeof UpdateChatName> = UpdateChatName.pipe(
|
|
19
|
+
Operation.withHandler(
|
|
20
|
+
Effect.fnUntraced(
|
|
21
|
+
function* ({ chat }) {
|
|
22
|
+
log.info('updating chat name', { chat });
|
|
23
|
+
|
|
24
|
+
const feed = yield* Database.load(chat.feed);
|
|
25
|
+
const history = yield* Feed.runQuery(feed, Filter.type(Message.Message));
|
|
26
|
+
|
|
27
|
+
log.info('history', { history: history.length });
|
|
28
|
+
|
|
29
|
+
const system = trim`
|
|
30
|
+
It is extremely important that you respond only with the title and nothing else.
|
|
31
|
+
Do not use markdown or other formatting.
|
|
32
|
+
If you cannot do this effectively respond with "New Chat".
|
|
33
|
+
|
|
34
|
+
<example_reply>
|
|
35
|
+
Fishing Trip
|
|
36
|
+
</example_reply>
|
|
37
|
+
`;
|
|
38
|
+
const prompt = 'Suggest a name for this chat';
|
|
39
|
+
|
|
40
|
+
const historyPrompt = yield* AiPreprocessor.preprocessPrompt(history, {
|
|
41
|
+
system,
|
|
42
|
+
cacheControl: 'ephemeral',
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const response = yield* LanguageModel.generateText({
|
|
46
|
+
prompt: Prompt.merge(historyPrompt, prompt),
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const newName = response.text.replaceAll(/[^a-zA-Z0-9\s]/g, '').trim();
|
|
50
|
+
|
|
51
|
+
Obj.update(chat, (chat) => {
|
|
52
|
+
chat.name = newName;
|
|
53
|
+
});
|
|
54
|
+
log.info('chat name updated', { chat, newName: chat.name });
|
|
55
|
+
},
|
|
56
|
+
Effect.provide(AiService.model('@anthropic/claude-haiku-4-5')),
|
|
57
|
+
),
|
|
58
|
+
),
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
export default handler;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
7
|
import { type ModelName } from '@dxos/ai';
|
|
8
8
|
|
|
9
|
-
const ModelProviders = ['dxos-local', 'dxos-remote', 'lm-studio'] as const;
|
|
9
|
+
const ModelProviders = ['dxos-local', 'dxos-remote', 'lm-studio', 'ollama'] as const;
|
|
10
10
|
|
|
11
11
|
const ModelProvider = Schema.Literal(...ModelProviders);
|
|
12
12
|
type ModelProvider = Schema.Schema.Type<typeof ModelProvider>;
|
|
@@ -27,21 +27,36 @@ const createModelLabel = (model: ModelName) => {
|
|
|
27
27
|
export const AiServicePresets: AiServicePreset[] = [
|
|
28
28
|
{
|
|
29
29
|
provider: 'dxos-remote' as const,
|
|
30
|
-
model: '@anthropic/claude-opus-4-
|
|
30
|
+
model: '@anthropic/claude-opus-4-6' as const,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
provider: 'dxos-remote' as const,
|
|
34
|
+
model: '@anthropic/claude-sonnet-4-5' as const,
|
|
31
35
|
},
|
|
32
36
|
{
|
|
33
37
|
provider: 'dxos-remote' as const,
|
|
34
38
|
model: '@anthropic/claude-3-5-haiku-20241022' as const,
|
|
35
39
|
},
|
|
40
|
+
{
|
|
41
|
+
provider: 'ollama' as const,
|
|
42
|
+
model: 'gpt-oss:20b' as const,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
provider: 'ollama' as const,
|
|
46
|
+
model: 'gemma4:latest' as const,
|
|
47
|
+
},
|
|
36
48
|
{
|
|
37
49
|
provider: 'lm-studio' as const,
|
|
38
|
-
model: '@google/gemma-3-
|
|
50
|
+
model: '@google/gemma-3-27b' as const,
|
|
39
51
|
},
|
|
40
52
|
{
|
|
41
53
|
provider: 'lm-studio' as const,
|
|
42
|
-
model: '@
|
|
54
|
+
model: '@meta/llama-3.2-3b-instruct' as const,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
model: 'deepseek-r1:latest' as const,
|
|
58
|
+
provider: 'dxos-local' as const,
|
|
43
59
|
},
|
|
44
|
-
{ model: 'deepseek-r1:latest' as const, provider: 'dxos-local' as const },
|
|
45
60
|
].map(
|
|
46
61
|
({ model, provider }, i) =>
|
|
47
62
|
({
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, it } from '@effect/vitest';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as ManagedRuntime from 'effect/ManagedRuntime';
|
|
8
|
+
|
|
9
|
+
import { AiSession } from '@dxos/assistant';
|
|
10
|
+
import { Chat } from '@dxos/assistant-toolkit';
|
|
11
|
+
import { Database, Feed } from '@dxos/echo';
|
|
12
|
+
import { acquireReleaseResource } from '@dxos/effect';
|
|
13
|
+
import { TestHelpers } from '@dxos/effect/testing';
|
|
14
|
+
import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
|
|
15
|
+
|
|
16
|
+
import { AiChatProcessor } from './processor';
|
|
17
|
+
|
|
18
|
+
const TestLayer = AssistantTestLayer({ tracing: 'noop', types: [Chat.Chat, Feed.Feed] });
|
|
19
|
+
|
|
20
|
+
describe('Chat processor', () => {
|
|
21
|
+
it.scoped(
|
|
22
|
+
'basic',
|
|
23
|
+
Effect.fn(
|
|
24
|
+
function* ({ expect }) {
|
|
25
|
+
const feed = Feed.make();
|
|
26
|
+
yield* Database.add(feed);
|
|
27
|
+
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
28
|
+
const session = yield* acquireReleaseResource(() => new AiSession({ feed, runtime }));
|
|
29
|
+
const managedRuntime = ManagedRuntime.make(
|
|
30
|
+
Effect.runSync(Effect.map(Effect.context<never>(), () => undefined as any)) as any,
|
|
31
|
+
);
|
|
32
|
+
const processor = new AiChatProcessor(session, managedRuntime as any, feed);
|
|
33
|
+
expect(processor).toBeDefined();
|
|
34
|
+
expect(processor.active).toBeDefined();
|
|
35
|
+
},
|
|
36
|
+
Effect.provide(TestLayer),
|
|
37
|
+
TestHelpers.provideTestContext,
|
|
38
|
+
),
|
|
39
|
+
);
|
|
40
|
+
});
|