@dxos/plugin-assistant 0.8.4-main.fcfe5033a5 → 0.8.4-staging.60fe92afc8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/PLUGIN.mdl +439 -0
- package/README.md +1 -1
- package/dist/lib/neutral/AgentArticle-K7XM46OQ.mjs +160 -0
- package/dist/lib/neutral/AgentArticle-K7XM46OQ.mjs.map +7 -0
- package/dist/lib/neutral/AgentProperties-LFTEYJ54.mjs +40 -0
- package/dist/lib/neutral/AgentProperties-LFTEYJ54.mjs.map +7 -0
- package/dist/lib/neutral/AssistantPlugin.mjs +10 -0
- package/dist/lib/neutral/AssistantPlugin.node.mjs +72 -0
- package/dist/lib/neutral/AssistantPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/AssistantPlugin.workerd.mjs +40 -0
- package/dist/lib/neutral/AssistantPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/AssistantSettings-GG52BLKS.mjs +40 -0
- package/dist/lib/neutral/AssistantSettings-GG52BLKS.mjs.map +7 -0
- package/dist/lib/neutral/BlueprintArticle-ZBOZNZM7.mjs +27 -0
- package/dist/lib/neutral/BlueprintArticle-ZBOZNZM7.mjs.map +7 -0
- package/dist/lib/neutral/ChatArticle-VNVZCDUR.mjs +8 -0
- package/dist/lib/neutral/ChatCompanion-LBUHYWQG.mjs +128 -0
- package/dist/lib/neutral/ChatCompanion-LBUHYWQG.mjs.map +7 -0
- package/dist/lib/neutral/ChatDialog-DCA6FLOV.mjs +73 -0
- package/dist/lib/neutral/ChatDialog-DCA6FLOV.mjs.map +7 -0
- package/dist/lib/neutral/PlanArticle-TS5ULWYS.mjs +28 -0
- package/dist/lib/neutral/PlanArticle-TS5ULWYS.mjs.map +7 -0
- package/dist/lib/neutral/RoutineArticle-5NYXHRG6.mjs +119 -0
- package/dist/lib/neutral/RoutineArticle-5NYXHRG6.mjs.map +7 -0
- package/dist/lib/neutral/RoutineList-SO5ETHNT.mjs +48 -0
- package/dist/lib/neutral/RoutineList-SO5ETHNT.mjs.map +7 -0
- package/dist/lib/neutral/RoutineProperties-FISLMW2R.mjs +17 -0
- package/dist/lib/neutral/RoutineProperties-FISLMW2R.mjs.map +7 -0
- package/dist/lib/neutral/TracePanel-KTZJ6JNR.mjs +167 -0
- package/dist/lib/neutral/TracePanel-KTZJ6JNR.mjs.map +7 -0
- package/dist/lib/neutral/TriggerStatus-X7Y5JFZJ.mjs +93 -0
- package/dist/lib/neutral/TriggerStatus-X7Y5JFZJ.mjs.map +7 -0
- package/dist/lib/neutral/agent-hydrator-PJBYVMBW.mjs +24 -0
- package/dist/lib/neutral/agent-hydrator-PJBYVMBW.mjs.map +7 -0
- package/dist/lib/neutral/agent-service-WCAP5MLI.mjs +32 -0
- package/dist/lib/neutral/agent-service-WCAP5MLI.mjs.map +7 -0
- package/dist/lib/neutral/ai-context-7WRHWYXY.mjs +42 -0
- package/dist/lib/neutral/ai-context-7WRHWYXY.mjs.map +7 -0
- package/dist/lib/neutral/ai-service-AADUIKBY.mjs +40 -0
- package/dist/lib/neutral/ai-service-AADUIKBY.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-WUFHQH3Y.mjs +232 -0
- package/dist/lib/neutral/app-graph-builder-WUFHQH3Y.mjs.map +7 -0
- package/dist/lib/neutral/automation-templates-M2XQWGR6.mjs +115 -0
- package/dist/lib/neutral/automation-templates-M2XQWGR6.mjs.map +7 -0
- package/dist/lib/neutral/blueprint-definition-MH2QLYQH.mjs +39 -0
- package/dist/lib/neutral/blueprint-definition-MH2QLYQH.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/blueprints/index.mjs +1 -1
- package/dist/lib/neutral/capabilities/index.mjs +45 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/{browser/chunk-EZRS3J25.mjs → neutral/chunk-5H6UJHLF.mjs} +3 -3
- package/dist/lib/neutral/chunk-5H6UJHLF.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HLANPOBA.mjs +10 -0
- package/dist/lib/neutral/chunk-HLANPOBA.mjs.map +7 -0
- package/dist/lib/neutral/chunk-KLYLW4WH.mjs +9 -0
- package/dist/lib/neutral/chunk-KLYLW4WH.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QAZMOFPI.mjs +130 -0
- package/dist/lib/neutral/chunk-QAZMOFPI.mjs.map +7 -0
- package/dist/lib/neutral/chunk-RKVVK3R3.mjs +110 -0
- package/dist/lib/neutral/chunk-RKVVK3R3.mjs.map +7 -0
- package/dist/lib/neutral/chunk-SMFJD7BP.mjs +8 -0
- package/dist/lib/neutral/chunk-SMFJD7BP.mjs.map +7 -0
- package/dist/lib/neutral/chunk-VTK5R4H3.mjs +9 -0
- package/dist/lib/neutral/chunk-VTK5R4H3.mjs.map +7 -0
- package/dist/lib/neutral/chunk-XYHPOGTK.mjs +43 -0
- package/dist/lib/neutral/chunk-XYHPOGTK.mjs.map +7 -0
- package/dist/lib/neutral/chunk-YXRGZYYH.mjs +392 -0
- package/dist/lib/neutral/chunk-YXRGZYYH.mjs.map +7 -0
- package/dist/lib/neutral/companion-chat-provisioner-YZZ73P6E.mjs +120 -0
- package/dist/lib/neutral/companion-chat-provisioner-YZZ73P6E.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +2410 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +29 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-chat-SGGQ6HVN.mjs +54 -0
- package/dist/lib/neutral/create-chat-SGGQ6HVN.mjs.map +7 -0
- package/dist/lib/neutral/create-object-U2SOFZLR.mjs +92 -0
- package/dist/lib/neutral/create-object-U2SOFZLR.mjs.map +7 -0
- package/dist/lib/neutral/edge-model-resolver-BBVOJBGJ.mjs +55 -0
- package/dist/lib/neutral/edge-model-resolver-BBVOJBGJ.mjs.map +7 -0
- package/dist/lib/{browser/ensure-companion-chat-ZEZA34MZ.mjs → neutral/ensure-companion-chat-AMOF3C66.mjs} +14 -21
- package/dist/lib/neutral/ensure-companion-chat-AMOF3C66.mjs.map +7 -0
- package/dist/lib/neutral/execution-graph/index.mjs +703 -0
- package/dist/lib/neutral/execution-graph/index.mjs.map +7 -0
- package/dist/lib/neutral/fork-chat-34KEF4ZJ.mjs +95 -0
- package/dist/lib/neutral/fork-chat-34KEF4ZJ.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +992 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +38 -0
- package/dist/lib/neutral/integration-provider-RBD3AFJU.mjs +71 -0
- package/dist/lib/neutral/integration-provider-RBD3AFJU.mjs.map +7 -0
- package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs +24 -0
- package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs.map +7 -0
- package/dist/lib/neutral/markdown-extension-YMIFDMYF.mjs +110 -0
- package/dist/lib/neutral/markdown-extension-YMIFDMYF.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +12 -0
- package/dist/lib/neutral/migrations-7DEMVBOG.mjs +28 -0
- package/dist/lib/neutral/migrations-7DEMVBOG.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-SF36MOB5.mjs +13 -0
- package/dist/lib/neutral/operation-handler-SF36MOB5.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-XRTBW5OJ.mjs +174 -0
- package/dist/lib/neutral/react-surface-XRTBW5OJ.mjs.map +7 -0
- package/dist/lib/{browser/resolve-navigation-targets-NZOD66NY.mjs → neutral/resolve-navigation-targets-ZHIMMH7L.mjs} +6 -6
- package/dist/lib/neutral/resolve-navigation-targets-ZHIMMH7L.mjs.map +7 -0
- package/dist/lib/{browser/run-prompt-in-new-chat-THLK5YQC.mjs → neutral/run-prompt-in-new-chat-D5IIE2C7.mjs} +22 -56
- package/dist/lib/neutral/run-prompt-in-new-chat-D5IIE2C7.mjs.map +7 -0
- package/dist/lib/{browser/set-current-chat-LRS3VFSH.mjs → neutral/set-current-chat-VWBPSIMZ.mjs} +7 -13
- package/dist/lib/neutral/set-current-chat-VWBPSIMZ.mjs.map +7 -0
- package/dist/lib/neutral/settings-W4BLWQ53.mjs +28 -0
- package/dist/lib/neutral/settings-W4BLWQ53.mjs.map +7 -0
- package/dist/lib/neutral/state-H3G7QCU6.mjs +28 -0
- package/dist/lib/neutral/state-H3G7QCU6.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +8 -0
- package/dist/lib/neutral/testing.mjs.map +7 -0
- package/dist/lib/neutral/toggle-trace-panel-debug-JGTB6KVJ.mjs +21 -0
- package/dist/lib/neutral/toggle-trace-panel-debug-JGTB6KVJ.mjs.map +7 -0
- package/dist/lib/neutral/toolkit-GVWXPDLJ.mjs +14 -0
- package/dist/lib/neutral/toolkit-GVWXPDLJ.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +179 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +20 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/{browser/update-chat-name-3Y36KFAS.mjs → neutral/update-chat-name-Y7JWIP64.mjs} +26 -36
- package/dist/lib/neutral/update-chat-name-Y7JWIP64.mjs.map +7 -0
- package/dist/types/src/AssistantPlugin.d.ts +3 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/AssistantPlugin.node.d.ts +5 -0
- package/dist/types/src/AssistantPlugin.node.d.ts.map +1 -0
- package/dist/types/src/AssistantPlugin.test.d.ts +2 -0
- package/dist/types/src/AssistantPlugin.test.d.ts.map +1 -0
- package/dist/types/src/AssistantPlugin.workerd.d.ts +4 -0
- package/dist/types/src/AssistantPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/blueprints/assistant/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/assistant/blueprint.node.test.d.ts +2 -0
- package/dist/types/src/blueprints/assistant/blueprint.node.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/agent-hydrator.d.ts +5 -0
- package/dist/types/src/capabilities/agent-hydrator.d.ts.map +1 -0
- package/dist/types/src/capabilities/agent-service.d.ts +6 -0
- package/dist/types/src/capabilities/agent-service.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-context.d.ts +6 -0
- package/dist/types/src/capabilities/ai-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-service.d.ts +2 -2
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/automation-templates.d.ts +6 -0
- package/dist/types/src/capabilities/automation-templates.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +31 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +36 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/integration-provider.d.ts +5 -0
- package/dist/types/src/capabilities/integration-provider.d.ts.map +1 -0
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/{markdown.d.ts → markdown-extension.d.ts} +1 -1
- package/dist/types/src/capabilities/markdown-extension.d.ts.map +1 -0
- package/dist/types/src/capabilities/migrations.d.ts +2 -1
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
- package/dist/types/src/components/AgentProperties/AgentProperties.d.ts +7 -0
- package/dist/types/src/components/AgentProperties/AgentProperties.d.ts.map +1 -0
- package/dist/types/src/{containers → components}/AgentProperties/AgentProperties.stories.d.ts +1 -2
- package/dist/types/src/components/AgentProperties/AgentProperties.stories.d.ts.map +1 -0
- package/dist/types/src/components/AgentProperties/index.d.ts +2 -0
- package/dist/types/src/components/AgentProperties/index.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +1 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +44 -42
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/context.d.ts +29 -0
- package/dist/types/src/components/Chat/context.d.ts.map +1 -0
- package/dist/types/src/components/Chat/events.d.ts +3 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +1 -1
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts +12 -0
- package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +10 -14
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts +2 -9
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +27 -0
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +2 -2
- 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 +1 -1
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +3 -0
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Anchor.stories.d.ts +14 -0
- package/dist/types/src/components/ChatThread/Anchor.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +6 -3
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +5 -5
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts +2 -2
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +8 -1
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts +18 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/sync.d.ts +42 -16
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts +4 -4
- package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts +2 -15
- package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts.map +1 -1
- 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 +1 -2
- package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +4 -3
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +0 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -1
- package/dist/types/src/components/RoutineProperties/RoutineProperties.d.ts +7 -0
- package/dist/types/src/components/RoutineProperties/RoutineProperties.d.ts.map +1 -0
- package/dist/types/src/components/RoutineProperties/RoutineProperties.stories.d.ts +15 -0
- package/dist/types/src/components/RoutineProperties/RoutineProperties.stories.d.ts.map +1 -0
- package/dist/types/src/components/RoutineProperties/index.d.ts +2 -0
- package/dist/types/src/components/RoutineProperties/index.d.ts.map +1 -0
- package/dist/types/src/components/TaskList/TaskList.d.ts +10 -0
- package/dist/types/src/components/TaskList/TaskList.d.ts.map +1 -0
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts +16 -0
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts.map +1 -0
- package/dist/types/src/components/TaskList/index.d.ts +2 -0
- package/dist/types/src/components/TaskList/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +5 -3
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +4 -5
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -1
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +4 -4
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +3 -3
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +5 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -1
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts +0 -2
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -1
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +1 -1
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts +25 -0
- package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts.map +1 -0
- package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts +15 -0
- package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChatArticle/index.d.ts +2 -0
- package/dist/types/src/containers/ChatArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +11 -3
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts +6 -0
- package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PlanArticle/index.d.ts +2 -0
- package/dist/types/src/containers/PlanArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +6 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts +15 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/index.d.ts +2 -0
- package/dist/types/src/containers/RoutineArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineList/RoutineList.d.ts +6 -0
- package/dist/types/src/containers/RoutineList/RoutineList.d.ts.map +1 -0
- package/dist/types/src/containers/{PromptList/PromptList.stories.d.ts → RoutineList/RoutineList.stories.d.ts} +1 -1
- 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 +4 -5
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts +4 -3
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +6 -6
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -1
- 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 +3 -2
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -1
- package/dist/types/src/containers/TriggerStatus/index.d.ts +1 -1
- package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +6 -5
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts +108 -0
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -0
- package/dist/types/src/execution-graph/execution-graph.test.d.ts +2 -0
- package/dist/types/src/execution-graph/execution-graph.test.d.ts.map +1 -0
- package/dist/types/src/execution-graph/index.d.ts +3 -0
- package/dist/types/src/execution-graph/index.d.ts.map +1 -0
- package/dist/types/src/execution-graph/remote-snapshot.test.d.ts +2 -0
- package/dist/types/src/execution-graph/remote-snapshot.test.d.ts.map +1 -0
- package/dist/types/src/execution-graph/span-tree.d.ts +76 -0
- package/dist/types/src/execution-graph/span-tree.d.ts.map +1 -0
- package/dist/types/src/execution-graph/span-tree.test.d.ts +2 -0
- package/dist/types/src/execution-graph/span-tree.test.d.ts.map +1 -0
- package/dist/types/src/execution-graph/sub-agent-delegation.test.d.ts +2 -0
- package/dist/types/src/execution-graph/sub-agent-delegation.test.d.ts.map +1 -0
- package/dist/types/src/execution-graph/testing/collect-trace-events.d.ts +40 -0
- package/dist/types/src/execution-graph/testing/collect-trace-events.d.ts.map +1 -0
- package/dist/types/src/execution-graph/testing/index.d.ts +2 -0
- package/dist/types/src/execution-graph/testing/index.d.ts.map +1 -0
- package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -1
- package/dist/types/src/feed-logger.d.ts +13 -0
- package/dist/types/src/feed-logger.d.ts.map +1 -0
- package/dist/types/src/functions/services.test.d.ts +2 -0
- package/dist/types/src/functions/services.test.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +3 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +56 -15
- 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 +5 -5
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +7 -3
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextBinder.d.ts +2 -2
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextObjects.d.ts +5 -4
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
- package/dist/types/src/hooks/useDebug.d.ts +10 -0
- package/dist/types/src/hooks/useDebug.d.ts.map +1 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts +1 -1
- package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -1
- package/dist/types/src/hooks/useFlush.d.ts +1 -1
- package/dist/types/src/hooks/useFlush.d.ts.map +1 -1
- package/dist/types/src/hooks/usePresets.d.ts +2 -2
- 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 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +3 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-chat.d.ts +3 -3
- package/dist/types/src/operations/create-chat.d.ts.map +1 -1
- package/dist/types/src/operations/ensure-companion-chat.d.ts +3 -3
- package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -1
- package/dist/types/src/operations/fork-chat.d.ts +5 -0
- package/dist/types/src/operations/fork-chat.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +1 -2
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/prompt.node.test.d.ts +2 -0
- package/dist/types/src/operations/prompt.node.test.d.ts.map +1 -0
- package/dist/types/src/operations/resolve-navigation-targets.d.ts +4 -2
- package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -1
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +3 -3
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -1
- package/dist/types/src/operations/set-current-chat.d.ts +3 -3
- package/dist/types/src/operations/set-current-chat.d.ts.map +1 -1
- package/dist/types/src/operations/toggle-trace-panel-debug.d.ts +5 -0
- package/dist/types/src/operations/toggle-trace-panel-debug.d.ts.map +1 -0
- package/dist/types/src/operations/update-chat-name.d.ts +3 -3
- package/dist/types/src/operations/update-chat-name.d.ts.map +1 -1
- package/dist/types/src/paths.d.ts +3 -0
- package/dist/types/src/paths.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/processor/presets.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +263 -26
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/processor/processor.node.test.d.ts +2 -0
- package/dist/types/src/processor/processor.node.test.d.ts.map +1 -0
- package/dist/types/src/templates/automation-templates.test.d.ts +2 -0
- package/dist/types/src/templates/automation-templates.test.d.ts.map +1 -0
- package/dist/types/src/templates/daily-digest.d.ts +3 -0
- package/dist/types/src/templates/daily-digest.d.ts.map +1 -0
- package/dist/types/src/templates/index.d.ts +4 -0
- package/dist/types/src/templates/index.d.ts.map +1 -0
- package/dist/types/src/templates/research-brief.d.ts +3 -0
- package/dist/types/src/templates/research-brief.d.ts.map +1 -0
- package/dist/types/src/templates/scaffold.d.ts +17 -0
- package/dist/types/src/templates/scaffold.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/snapshot.d.ts +21 -0
- package/dist/types/src/testing/snapshot.d.ts.map +1 -0
- package/dist/types/src/testing/test-generator.d.ts +2 -3
- package/dist/types/src/testing/test-generator.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.test.d.ts +2 -0
- package/dist/types/src/testing/test-generator.test.d.ts.map +1 -0
- package/dist/types/src/testing/test-sequence.d.ts +10 -3
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/testing/test-trace.d.ts +5 -0
- package/dist/types/src/testing/test-trace.d.ts.map +1 -0
- package/dist/types/src/testing/trace-timeline.node.test.d.ts +2 -0
- package/dist/types/src/testing/trace-timeline.node.test.d.ts.map +1 -0
- package/dist/types/src/testing.d.ts +2 -0
- package/dist/types/src/testing.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +25 -8
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/AssistantCapabilities.d.ts +30 -0
- package/dist/types/src/types/AssistantCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/AssistantEvents.d.ts +3 -0
- package/dist/types/src/types/AssistantEvents.d.ts.map +1 -0
- package/dist/types/src/types/AssistantOperation.d.ts +153 -0
- package/dist/types/src/types/AssistantOperation.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +21 -5
- package/dist/types/src/types/Settings.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +8 -3
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/preset.d.ts +12 -0
- package/dist/types/src/types/preset.d.ts.map +1 -0
- package/dist/types/src/types/service.d.ts +2 -3
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/src/util/suggestions.d.ts +9 -0
- package/dist/types/src/util/suggestions.d.ts.map +1 -0
- package/dist/types/src/util/suggestions.test.d.ts +2 -0
- package/dist/types/src/util/suggestions.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +177 -146
- package/src/AssistantPlugin.conversations.json +1 -0
- package/src/AssistantPlugin.node.ts +90 -0
- package/src/AssistantPlugin.test.ts +213 -0
- package/src/AssistantPlugin.ts +158 -0
- package/src/AssistantPlugin.workerd.ts +41 -0
- package/src/blueprints/assistant/{blueprint.test.ts → blueprint.node.test.ts} +5 -5
- package/src/blueprints/assistant/blueprint.ts +4 -4
- package/src/capabilities/agent-hydrator.ts +37 -0
- package/src/capabilities/agent-service.ts +38 -0
- package/src/capabilities/ai-context.ts +48 -0
- package/src/capabilities/ai-service.ts +31 -11
- package/src/capabilities/app-graph-builder.ts +106 -86
- package/src/capabilities/automation-templates.ts +16 -0
- package/src/capabilities/blueprint-definition.ts +15 -8
- package/src/capabilities/companion-chat-provisioner.ts +5 -5
- package/src/capabilities/create-object.ts +100 -0
- package/src/capabilities/edge-model-resolver.ts +53 -16
- package/src/capabilities/index.ts +23 -3
- package/src/capabilities/integration-provider.ts +86 -0
- package/src/capabilities/{markdown.ts → markdown-extension.ts} +3 -3
- package/src/capabilities/migrations.ts +4 -11
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.tsx +41 -21
- package/src/components/AgentProperties/AgentProperties.stories.tsx +74 -0
- package/src/components/AgentProperties/AgentProperties.tsx +103 -0
- package/src/components/AgentProperties/index.ts +5 -0
- package/src/components/AssistantSettings/AssistantSettings.stories.tsx +3 -2
- package/src/components/AssistantSettings/AssistantSettings.tsx +22 -111
- package/src/components/Chat/Chat.tsx +145 -277
- package/src/components/Chat/context.ts +39 -0
- package/src/components/Chat/events.ts +7 -0
- package/src/components/ChatPrompt/ChatActions.tsx +11 -11
- package/src/components/ChatPrompt/ChatMcpErrors.tsx +50 -0
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +32 -18
- package/src/components/ChatPrompt/ChatOptions.tsx +121 -103
- package/src/components/ChatPrompt/ChatPresets.tsx +3 -7
- package/src/components/ChatPrompt/ChatPrompt.tsx +180 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +9 -13
- package/src/components/ChatPrompt/ChatStatus.tsx +123 -0
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +2 -2
- package/src/components/ChatPrompt/index.ts +3 -0
- package/src/components/ChatThread/Anchor.stories.tsx +95 -0
- package/src/components/ChatThread/ChatThread.stories.tsx +33 -37
- package/src/components/ChatThread/ChatThread.tsx +47 -23
- package/src/components/ChatThread/DEBUG.md +41 -0
- package/src/components/ChatThread/Link.tsx +5 -5
- package/src/components/ChatThread/MarkdownStream.stories.tsx +43 -5
- package/src/components/ChatThread/registry.tsx +80 -28
- package/src/components/ChatThread/sync.test.ts +180 -22
- package/src/components/ChatThread/sync.ts +89 -104
- package/src/components/ChatThread/testing/reasoning.md +25 -0
- package/src/components/ChatThread/widgets/FallbackWidget.tsx +8 -6
- package/src/components/ChatThread/widgets/ReasoningWidget.ts +13 -7
- package/src/components/ChatThread/widgets/ReferenceWidget.ts +3 -1
- package/src/components/ChatThread/widgets/SelectWidget.ts +4 -2
- package/src/components/ChatThread/widgets/StatsWidget.ts +3 -1
- package/src/components/ChatThread/widgets/StatusWidget.ts +6 -86
- package/src/components/ChatThread/widgets/SuggestionWidget.ts +2 -2
- package/src/components/ChatThread/widgets/SummaryWidget.tsx +7 -6
- package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +2 -1
- package/src/components/ChatThread/widgets/ToolWidget.tsx +42 -25
- package/src/components/ChatThread/widgets/defaults.ts +8 -0
- package/src/components/ChatThread/widgets/index.ts +1 -2
- package/src/components/ProcessTree/ProcessTree.stories.tsx +13 -39
- package/src/components/ProcessTree/ProcessTree.tsx +101 -67
- package/src/components/RoutineProperties/RoutineProperties.stories.tsx +59 -0
- package/src/components/RoutineProperties/RoutineProperties.tsx +23 -0
- package/src/components/RoutineProperties/index.ts +5 -0
- package/src/components/TaskList/TaskList.stories.tsx +44 -0
- package/src/components/TaskList/TaskList.tsx +45 -0
- package/src/components/TaskList/index.ts +5 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +6 -5
- package/src/components/TemplateEditor/TemplateEditor.tsx +12 -10
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +6 -9
- package/src/components/TemplateEditor/TemplateForm.tsx +52 -73
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +2 -2
- package/src/components/ToolBlock/ToolBlock.tsx +25 -17
- package/src/components/Toolbox/Toolbox.stories.tsx +6 -5
- package/src/components/Toolbox/Toolbox.tsx +6 -5
- package/src/components/index.ts +6 -0
- package/src/constants.ts +9 -0
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +19 -15
- package/src/containers/AgentArticle/AgentArticle.tsx +47 -53
- package/src/containers/AgentProperties/AgentProperties.tsx +20 -135
- package/src/containers/BlueprintArticle/BlueprintArticle.tsx +2 -2
- package/src/containers/ChatArticle/ChatArticle.stories.tsx +78 -0
- package/src/containers/ChatArticle/ChatArticle.tsx +112 -0
- package/src/containers/ChatArticle/index.ts +5 -0
- package/src/containers/ChatCompanion/ChatCompanion.tsx +94 -109
- package/src/containers/ChatDialog/ChatDialog.tsx +6 -11
- package/src/containers/PlanArticle/PlanArticle.tsx +33 -0
- package/src/containers/PlanArticle/index.ts +5 -0
- package/src/containers/RoutineArticle/RoutineArticle.stories.tsx +75 -0
- package/src/containers/RoutineArticle/RoutineArticle.tsx +109 -0
- package/src/containers/RoutineArticle/index.ts +5 -0
- package/src/containers/{PromptList/PromptList.stories.tsx → RoutineList/RoutineList.stories.tsx} +14 -13
- package/src/containers/{PromptList/PromptList.tsx → RoutineList/RoutineList.tsx} +9 -8
- package/src/containers/RoutineList/index.ts +5 -0
- package/src/containers/TracePanel/TracePanel.stories.tsx +285 -168
- package/src/containers/TracePanel/TracePanel.tsx +220 -77
- package/src/containers/TracePanel/dxn-extractor.test.ts +32 -32
- package/src/containers/TracePanel/dxn-extractor.ts +52 -64
- 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 +20 -34
- package/src/containers/TriggerStatus/index.ts +1 -1
- package/src/containers/index.ts +6 -5
- package/src/execution-graph/SPEC.md +690 -0
- package/src/execution-graph/execution-graph.test.ts +891 -0
- package/src/execution-graph/execution-graph.ts +777 -0
- package/src/execution-graph/index.ts +24 -0
- package/src/execution-graph/remote-snapshot.test.ts +116 -0
- package/src/execution-graph/span-tree.test.ts +249 -0
- package/src/execution-graph/span-tree.ts +269 -0
- package/src/execution-graph/sub-agent-delegation.test.ts +50 -0
- package/src/execution-graph/testing/collect-trace-events.ts +74 -0
- package/src/execution-graph/testing/index.ts +5 -0
- package/src/execution-graph/testing/sub-agent-delegation.json +1285 -0
- package/src/{queue-logger.ts → feed-logger.ts} +39 -25
- package/src/functions/services.test.ts +53 -0
- package/src/hooks/index.ts +5 -0
- package/src/hooks/useBlueprintRegistry.ts +62 -46
- package/src/hooks/useChatKeymap.ts +52 -0
- package/src/hooks/useChatProcessor.ts +33 -17
- package/src/hooks/useChatServices.ts +8 -6
- package/src/hooks/useChatToolbarActions.ts +98 -96
- package/src/hooks/useContextBinder.ts +7 -7
- package/src/hooks/useContextObjects.ts +6 -5
- package/src/hooks/useDebug.ts +38 -0
- package/src/hooks/useFilteredTypes.ts +18 -16
- package/src/hooks/usePresets.ts +5 -3
- package/src/hooks/useReferencesProvider.ts +7 -15
- package/src/index.ts +1 -5
- package/src/meta.ts +27 -8
- package/src/operations/create-chat.ts +15 -38
- package/src/operations/ensure-companion-chat.ts +49 -47
- package/src/operations/fork-chat.ts +112 -0
- package/src/operations/index.ts +3 -4
- package/src/operations/prompt.node.test.ts +82 -0
- package/src/operations/resolve-navigation-targets.ts +8 -3
- package/src/operations/run-prompt-in-new-chat.ts +87 -87
- package/src/operations/set-current-chat.ts +6 -7
- package/src/operations/toggle-trace-panel-debug.ts +27 -0
- package/src/operations/update-chat-name.ts +24 -20
- package/src/paths.ts +10 -0
- package/src/plugin.ts +11 -0
- package/src/processor/presets.ts +15 -11
- package/src/processor/{processor.test.ts → processor.node.test.ts} +7 -7
- package/src/processor/processor.ts +160 -58
- package/src/templates/automation-templates.test.ts +66 -0
- package/src/templates/daily-digest.ts +37 -0
- package/src/templates/index.ts +11 -0
- package/src/templates/research-brief.ts +40 -0
- package/src/templates/scaffold.ts +74 -0
- package/src/testing/data/trace-timeline-multiple.dx.json +1 -0
- package/src/testing/data/trace-timeline-remote.dx.json +1 -0
- package/src/testing/data/trace-timeline.dx.json +4657 -0
- package/src/testing/index.ts +2 -0
- package/src/testing/snapshot.ts +35 -0
- package/src/testing/test-generator.test.ts +71 -0
- package/src/testing/test-generator.ts +196 -205
- package/src/testing/test-sequence.ts +3 -3
- package/src/testing/test-services.ts +1 -1
- package/src/testing/test-trace.ts +20 -0
- package/src/testing/trace-timeline.node.conversations.json +1 -0
- package/src/testing/{trace-timeline.test.ts → trace-timeline.node.test.ts} +45 -50
- package/src/testing.ts +9 -0
- package/src/translations.ts +40 -38
- package/src/types/Assistant.ts +13 -1
- package/src/types/AssistantCapabilities.ts +35 -0
- package/src/types/AssistantEvents.ts +11 -0
- package/src/{operations/definitions.ts → types/AssistantOperation.ts} +66 -29
- package/src/types/Settings.ts +68 -7
- package/src/types/index.ts +12 -3
- package/src/types/preset.ts +16 -0
- package/src/types/service.ts +5 -10
- package/src/util/suggestions.test.ts +52 -0
- package/src/util/suggestions.ts +42 -0
- package/src/vite-env.d.ts +5 -0
- package/dist/lib/browser/AssistantSettings-7QMO3LGF.mjs +0 -97
- package/dist/lib/browser/AssistantSettings-7QMO3LGF.mjs.map +0 -7
- package/dist/lib/browser/chunk-ATHYBVGN.mjs +0 -176
- package/dist/lib/browser/chunk-ATHYBVGN.mjs.map +0 -7
- package/dist/lib/browser/chunk-EZRS3J25.mjs.map +0 -7
- package/dist/lib/browser/chunk-LMVTXH54.mjs +0 -154
- package/dist/lib/browser/chunk-LMVTXH54.mjs.map +0 -7
- package/dist/lib/browser/create-chat-LBZHGVSN.mjs +0 -82
- package/dist/lib/browser/create-chat-LBZHGVSN.mjs.map +0 -7
- package/dist/lib/browser/ensure-companion-chat-ZEZA34MZ.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -3452
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/on-create-space-54RNX5JI.mjs +0 -22
- package/dist/lib/browser/on-create-space-54RNX5JI.mjs.map +0 -7
- package/dist/lib/browser/operations/index.mjs +0 -13
- package/dist/lib/browser/operations/index.mjs.map +0 -7
- package/dist/lib/browser/resolve-navigation-targets-NZOD66NY.mjs.map +0 -7
- package/dist/lib/browser/run-prompt-in-new-chat-THLK5YQC.mjs.map +0 -7
- package/dist/lib/browser/set-current-chat-LRS3VFSH.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -20
- package/dist/lib/browser/update-chat-name-3Y36KFAS.mjs.map +0 -7
- package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs +0 -98
- package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs.map +0 -7
- package/dist/lib/node-esm/blueprints/index.mjs +0 -9
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-NZIKC7AN.mjs +0 -32
- package/dist/lib/node-esm/chunk-NZIKC7AN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs +0 -177
- package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-W3JZ2F4T.mjs +0 -155
- package/dist/lib/node-esm/chunk-W3JZ2F4T.mjs.map +0 -7
- package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs +0 -83
- package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs.map +0 -7
- package/dist/lib/node-esm/ensure-companion-chat-6K2WEWFP.mjs +0 -66
- package/dist/lib/node-esm/ensure-companion-chat-6K2WEWFP.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -3453
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/on-create-space-YRPZ6HZY.mjs +0 -23
- package/dist/lib/node-esm/on-create-space-YRPZ6HZY.mjs.map +0 -7
- package/dist/lib/node-esm/operations/index.mjs +0 -14
- package/dist/lib/node-esm/operations/index.mjs.map +0 -7
- package/dist/lib/node-esm/resolve-navigation-targets-3PPK7XLH.mjs +0 -23
- package/dist/lib/node-esm/resolve-navigation-targets-3PPK7XLH.mjs.map +0 -7
- package/dist/lib/node-esm/run-prompt-in-new-chat-OUYKCMQ7.mjs +0 -137
- package/dist/lib/node-esm/run-prompt-in-new-chat-OUYKCMQ7.mjs.map +0 -7
- package/dist/lib/node-esm/set-current-chat-SMXZJD3F.mjs +0 -55
- package/dist/lib/node-esm/set-current-chat-SMXZJD3F.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -21
- package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs +0 -72
- package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs.map +0 -7
- package/dist/types/src/blueprints/assistant/blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/assistant/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +0 -10
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +0 -1
- package/dist/types/src/components/ChatProgress/index.d.ts +0 -2
- package/dist/types/src/components/ChatProgress/index.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/widgets/PromptWidget.d.ts +0 -14
- package/dist/types/src/components/ChatThread/widgets/PromptWidget.d.ts.map +0 -1
- package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts.map +0 -1
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +0 -12
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/containers/ChatContainer/index.d.ts +0 -2
- package/dist/types/src/containers/ChatContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts +0 -6
- package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts.map +0 -1
- package/dist/types/src/containers/PromptArticle/index.d.ts +0 -2
- package/dist/types/src/containers/PromptArticle/index.d.ts.map +0 -1
- package/dist/types/src/containers/PromptList/PromptList.d.ts +0 -6
- package/dist/types/src/containers/PromptList/PromptList.d.ts.map +0 -1
- package/dist/types/src/containers/PromptList/PromptList.stories.d.ts.map +0 -1
- package/dist/types/src/containers/PromptList/index.d.ts +0 -2
- package/dist/types/src/containers/PromptList/index.d.ts.map +0 -1
- package/dist/types/src/containers/TracePanel/execution-graph.d.ts +0 -17
- package/dist/types/src/containers/TracePanel/execution-graph.d.ts.map +0 -1
- package/dist/types/src/operations/definitions.d.ts +0 -135
- package/dist/types/src/operations/definitions.d.ts.map +0 -1
- package/dist/types/src/operations/on-create-space.d.ts +0 -5
- package/dist/types/src/operations/on-create-space.d.ts.map +0 -1
- package/dist/types/src/processor/processor.test.d.ts +0 -2
- package/dist/types/src/processor/processor.test.d.ts.map +0 -1
- package/dist/types/src/queue-logger.d.ts +0 -11
- package/dist/types/src/queue-logger.d.ts.map +0 -1
- package/dist/types/src/testing/trace-timeline.test.d.ts +0 -2
- package/dist/types/src/testing/trace-timeline.test.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -32
- package/dist/types/src/types/capabilities.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/dist/types/src/types/events.d.ts +0 -5
- package/dist/types/src/types/events.d.ts.map +0 -1
- package/src/AssistantPlugin.tsx +0 -233
- package/src/components/ChatProgress/ChatProgress.tsx +0 -56
- package/src/components/ChatProgress/index.ts +0 -5
- package/src/components/ChatThread/widgets/PromptWidget.ts +0 -28
- package/src/containers/AgentProperties/AgentProperties.stories.tsx +0 -100
- package/src/containers/ChatContainer/ChatContainer.tsx +0 -95
- package/src/containers/ChatContainer/index.ts +0 -5
- package/src/containers/PromptArticle/PromptArticle.tsx +0 -59
- package/src/containers/PromptArticle/index.ts +0 -5
- package/src/containers/PromptList/index.ts +0 -5
- package/src/containers/TracePanel/execution-graph.ts +0 -425
- package/src/operations/on-create-space.ts +0 -24
- package/src/testing/trace-timeline.conversations.json +0 -1
- package/src/types/capabilities.ts +0 -35
- package/src/types/defs.ts +0 -5
- package/src/types/events.ts +0 -11
- /package/dist/lib/{browser/blueprints/index.mjs.map → neutral/AssistantPlugin.mjs.map} +0 -0
- /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ChatArticle-VNVZCDUR.mjs.map} +0 -0
- /package/dist/lib/{browser/types → neutral/blueprints}/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{node-esm/blueprints/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
|
@@ -6,25 +6,34 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
import { pipe } from 'effect/Function';
|
|
7
7
|
import * as Option from 'effect/Option';
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
import { Capability } from '@dxos/app-framework';
|
|
10
|
+
import {
|
|
11
|
+
AppCapabilities,
|
|
12
|
+
AppNode,
|
|
13
|
+
LayoutOperation,
|
|
14
|
+
createTypeSectionExtension,
|
|
15
|
+
createTypeSectionPathResolver,
|
|
16
|
+
getActiveSpace,
|
|
17
|
+
getPersonalSpace,
|
|
18
|
+
} from '@dxos/app-toolkit';
|
|
19
|
+
import { AgentPrompt, Chat } from '@dxos/assistant-toolkit';
|
|
20
|
+
import { isSpace } from '@dxos/client/echo';
|
|
21
|
+
import { Operation, Routine } from '@dxos/compute';
|
|
13
22
|
import { Sequence } from '@dxos/conductor';
|
|
14
|
-
import { DXN, Database, Filter, Obj, type Ref } from '@dxos/echo';
|
|
15
|
-
import { AtomObj } from '@dxos/echo-atom';
|
|
23
|
+
import { DXN, Database, Filter, Obj, Query, Type, type Ref } from '@dxos/echo';
|
|
16
24
|
import { invariant } from '@dxos/invariant';
|
|
17
|
-
import {
|
|
18
|
-
import { AutomationCapabilities } from '@dxos/plugin-automation/types';
|
|
19
|
-
import { ClientCapabilities } from '@dxos/plugin-client/types';
|
|
25
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
20
26
|
import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
21
|
-
import { SpaceOperation } from '@dxos/plugin-space
|
|
22
|
-
import { Query } from '@dxos/react-client/echo';
|
|
27
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
23
28
|
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
24
29
|
|
|
25
|
-
import { ASSISTANT_COMPANION_VARIANT,
|
|
26
|
-
import { AssistantOperation } from '#
|
|
27
|
-
|
|
30
|
+
import { ASSISTANT_COMPANION_VARIANT, meta } from '#meta';
|
|
31
|
+
import { AssistantCapabilities, AssistantOperation } from '#types';
|
|
32
|
+
|
|
33
|
+
import { getChatsPath } from '../paths';
|
|
34
|
+
|
|
35
|
+
/** Operation definitions to seed as `PersistentOperation` records for automation / triggers. */
|
|
36
|
+
const computeOperationsToImport = [AgentPrompt] as const;
|
|
28
37
|
|
|
29
38
|
/** Match ECHO objects that are NOT chats. */
|
|
30
39
|
const whenNonChatObject = NodeMatcher.whenAll(
|
|
@@ -47,11 +56,9 @@ export default Capability.makeModule(
|
|
|
47
56
|
data: () =>
|
|
48
57
|
Effect.gen(function* () {
|
|
49
58
|
// TODO(dmaretskyi): This goes away when composer will have unified operation invocations.
|
|
50
|
-
const computeRuntime = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
|
|
51
59
|
const db = Obj.getDatabase(chat);
|
|
52
60
|
invariant(db);
|
|
53
|
-
|
|
54
|
-
yield* Operation.invoke(AssistantOperation.UpdateChatName, { chat }).pipe(Effect.provide(runtime));
|
|
61
|
+
yield* Operation.invoke(AssistantOperation.UpdateChatName, { chat }, { spaceId: db.spaceId });
|
|
55
62
|
}),
|
|
56
63
|
properties: {
|
|
57
64
|
label: ['chat-update-name.label', { ns: meta.id }],
|
|
@@ -69,58 +76,40 @@ export default Capability.makeModule(
|
|
|
69
76
|
actions: () =>
|
|
70
77
|
Effect.succeed([
|
|
71
78
|
Node.makeAction({
|
|
72
|
-
id:
|
|
79
|
+
id: 'importComputeOperations',
|
|
73
80
|
data: Effect.fnUntraced(function* () {
|
|
74
81
|
const capabilities = yield* Capability.Service;
|
|
75
82
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
76
|
-
const operationInvoker = yield* Capability.get(Capabilities.OperationInvoker);
|
|
77
83
|
const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
|
|
78
84
|
if (!space) {
|
|
79
85
|
return;
|
|
80
86
|
}
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
87
|
+
for (const definition of computeOperationsToImport) {
|
|
88
|
+
const key = definition.meta.key;
|
|
89
|
+
if (!key) {
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
const existing = yield* Effect.promise(
|
|
93
|
+
(): Promise<Operation.PersistentOperation[]> =>
|
|
94
|
+
space.db.query(Filter.and(Filter.type(Operation.PersistentOperation), Filter.key(key))).run(),
|
|
95
|
+
);
|
|
96
|
+
if (existing.length === 0) {
|
|
97
|
+
space.db.add(Operation.serialize(definition));
|
|
98
|
+
}
|
|
84
99
|
}
|
|
85
|
-
|
|
86
|
-
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
87
|
-
subject: ASSISTANT_DIALOG,
|
|
88
|
-
state: true,
|
|
89
|
-
blockAlign: 'end',
|
|
90
|
-
props: { chat },
|
|
91
|
-
});
|
|
100
|
+
yield* Database.flush();
|
|
92
101
|
}),
|
|
93
102
|
properties: {
|
|
94
|
-
label: ['
|
|
95
|
-
icon: 'ph--
|
|
96
|
-
disposition: 'pin-end',
|
|
97
|
-
position: 'hoist',
|
|
98
|
-
keyBinding: {
|
|
99
|
-
macos: 'shift+meta+k',
|
|
100
|
-
windows: 'shift+ctrl+k',
|
|
101
|
-
},
|
|
103
|
+
label: ['import-compute-operations.label', { ns: meta.id }],
|
|
104
|
+
icon: 'ph--download-simple--regular',
|
|
102
105
|
},
|
|
103
106
|
}),
|
|
104
107
|
Node.makeAction({
|
|
105
|
-
id:
|
|
106
|
-
data:
|
|
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
|
-
}),
|
|
108
|
+
id: AssistantOperation.ToggleTracePanelDebug.meta.key,
|
|
109
|
+
data: () => Operation.invoke(AssistantOperation.ToggleTracePanelDebug, {}),
|
|
121
110
|
properties: {
|
|
122
|
-
label: ['
|
|
123
|
-
icon: 'ph--
|
|
111
|
+
label: ['toggle-trace-panel-debug.label', { ns: meta.id }],
|
|
112
|
+
icon: 'ph--brackets-curly--regular',
|
|
124
113
|
},
|
|
125
114
|
}),
|
|
126
115
|
]),
|
|
@@ -128,22 +117,22 @@ export default Capability.makeModule(
|
|
|
128
117
|
|
|
129
118
|
// Don't show assistant companion when a chat is already the primary object.
|
|
130
119
|
GraphBuilder.createExtension({
|
|
131
|
-
id: '
|
|
120
|
+
id: 'companionChat',
|
|
132
121
|
match: whenNonChatObject,
|
|
133
122
|
connector: (object, get) =>
|
|
134
123
|
Effect.gen(function* () {
|
|
135
124
|
const state = get(yield* Capability.get(AssistantCapabilities.State));
|
|
136
125
|
const cache = get(yield* Capability.get(AssistantCapabilities.CompanionChatCache));
|
|
137
|
-
const
|
|
126
|
+
const objectUri = Obj.getURI(object);
|
|
138
127
|
|
|
139
128
|
// Resolve chat from persisted state or transient cache.
|
|
140
129
|
const chat = pipe(
|
|
141
|
-
Option.fromNullable(state.currentChat[
|
|
142
|
-
Option.flatMap((dxnStr) => Option.fromNullable(DXN.
|
|
130
|
+
Option.fromNullable(state.currentChat[objectUri]),
|
|
131
|
+
Option.flatMap((dxnStr) => Option.fromNullable(DXN.tryMake(dxnStr))),
|
|
143
132
|
Option.flatMap((dxn) => Option.fromNullable(Obj.getDatabase(object)?.makeRef(dxn))),
|
|
144
|
-
Option.map((ref) => get(
|
|
133
|
+
Option.map((ref) => get(Obj.atom(ref as Ref.Ref<Obj.Unknown>))),
|
|
145
134
|
Option.filter(Obj.isObject),
|
|
146
|
-
Option.orElse(() => pipe(Option.fromNullable(cache[
|
|
135
|
+
Option.orElse(() => pipe(Option.fromNullable(cache[objectUri]), Option.filter(Obj.isObject))),
|
|
147
136
|
Option.getOrNull,
|
|
148
137
|
);
|
|
149
138
|
|
|
@@ -153,7 +142,7 @@ export default Capability.makeModule(
|
|
|
153
142
|
label: ['assistant-chat.label', { ns: meta.id }],
|
|
154
143
|
icon: 'ph--sparkle--regular',
|
|
155
144
|
data: chat,
|
|
156
|
-
position: '
|
|
145
|
+
position: 'first',
|
|
157
146
|
}),
|
|
158
147
|
];
|
|
159
148
|
}),
|
|
@@ -162,8 +151,8 @@ export default Capability.makeModule(
|
|
|
162
151
|
GraphBuilder.createExtension({
|
|
163
152
|
id: 'invocations',
|
|
164
153
|
match: NodeMatcher.whenAny(
|
|
165
|
-
NodeMatcher.whenEchoTypeMatches(Sequence),
|
|
166
|
-
NodeMatcher.whenEchoTypeMatches(
|
|
154
|
+
NodeMatcher.whenEchoTypeMatches(Sequence.Sequence),
|
|
155
|
+
NodeMatcher.whenEchoTypeMatches(Routine.Routine),
|
|
167
156
|
),
|
|
168
157
|
connector: () =>
|
|
169
158
|
Effect.succeed([
|
|
@@ -186,32 +175,63 @@ export default Capability.makeModule(
|
|
|
186
175
|
label: ['trace.label', { ns: meta.id }],
|
|
187
176
|
icon: 'ph--line-segments--regular',
|
|
188
177
|
data: 'trace' as const,
|
|
189
|
-
position: '
|
|
178
|
+
position: 'last',
|
|
179
|
+
}),
|
|
180
|
+
]),
|
|
181
|
+
}),
|
|
182
|
+
|
|
183
|
+
// Section node: standalone Chat.Chat objects per space (companions are excluded).
|
|
184
|
+
createTypeSectionExtension(Chat.Chat, {
|
|
185
|
+
// Exclude chats that are the source of a CompanionTo relation; those belong to
|
|
186
|
+
// their primary object's companion panel and should not appear in the top-level list.
|
|
187
|
+
query: Query.without(
|
|
188
|
+
Query.select(Filter.type(Chat.Chat)),
|
|
189
|
+
Query.select(Filter.type(Chat.Chat)).sourceOf(Chat.CompanionTo).source(),
|
|
190
|
+
),
|
|
191
|
+
}),
|
|
192
|
+
|
|
193
|
+
// Create-chat action on the Chats section header.
|
|
194
|
+
GraphBuilder.createExtension({
|
|
195
|
+
id: 'chatsSectionActions',
|
|
196
|
+
match: (node) => {
|
|
197
|
+
const space = isSpace(node.properties.space) ? node.properties.space : undefined;
|
|
198
|
+
return node.type === Type.getTypename(Chat.Chat) && space ? Option.some(space) : Option.none();
|
|
199
|
+
},
|
|
200
|
+
actions: (space) =>
|
|
201
|
+
Effect.succeed([
|
|
202
|
+
Node.makeAction({
|
|
203
|
+
id: 'create-chat',
|
|
204
|
+
data: () =>
|
|
205
|
+
Effect.gen(function* () {
|
|
206
|
+
const { object: chat } = yield* Operation.invoke(
|
|
207
|
+
AssistantOperation.CreateChat,
|
|
208
|
+
{ db: space.db },
|
|
209
|
+
{ spaceId: space.db.spaceId },
|
|
210
|
+
);
|
|
211
|
+
const { subject } = yield* Operation.invoke(
|
|
212
|
+
SpaceOperation.AddObject,
|
|
213
|
+
{ object: chat, target: space.db, hidden: true, targetNodeId: getChatsPath(space.db.spaceId) },
|
|
214
|
+
{ spaceId: space.db.spaceId },
|
|
215
|
+
);
|
|
216
|
+
yield* Operation.invoke(
|
|
217
|
+
LayoutOperation.Open,
|
|
218
|
+
{ subject: [...subject] },
|
|
219
|
+
{ spaceId: space.db.spaceId },
|
|
220
|
+
);
|
|
221
|
+
}),
|
|
222
|
+
properties: {
|
|
223
|
+
label: ['create-chat.label', { ns: meta.id }],
|
|
224
|
+
icon: 'ph--plus--regular',
|
|
225
|
+
disposition: 'list-item-primary',
|
|
226
|
+
},
|
|
190
227
|
}),
|
|
191
228
|
]),
|
|
192
229
|
}),
|
|
193
230
|
]);
|
|
194
231
|
|
|
195
|
-
return
|
|
232
|
+
return [
|
|
233
|
+
Capability.contributes(AppCapabilities.AppGraphBuilder, extensions),
|
|
234
|
+
Capability.contributes(AppCapabilities.NavigationPathResolver, createTypeSectionPathResolver(Chat.Chat)),
|
|
235
|
+
];
|
|
196
236
|
}),
|
|
197
237
|
);
|
|
198
|
-
|
|
199
|
-
// TODO(burdon): Factor out.
|
|
200
|
-
const getOrCreateChat = async (
|
|
201
|
-
invokePromise: OperationInvoker.OperationInvoker['invokePromise'],
|
|
202
|
-
db: Database.Database,
|
|
203
|
-
): Promise<Chat.Chat | undefined> => {
|
|
204
|
-
// TODO(wittjosiah): This should be possible with a single query.
|
|
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
|
-
|
|
208
|
-
const chats = allChats.filter((chat) => !relatedChats.includes(chat));
|
|
209
|
-
if (chats.length > 0) {
|
|
210
|
-
return chats.at(-1);
|
|
211
|
-
}
|
|
212
|
-
|
|
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 });
|
|
216
|
-
return data.object;
|
|
217
|
-
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
9
|
+
|
|
10
|
+
import { automationTemplates } from '../templates';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule(
|
|
13
|
+
Effect.fnUntraced(function* () {
|
|
14
|
+
return automationTemplates.map((template) => Capability.contributes(AutomationCapabilities.Template, template));
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
@@ -18,24 +18,26 @@ import {
|
|
|
18
18
|
DatabaseBlueprint,
|
|
19
19
|
DatabaseHandlers,
|
|
20
20
|
DiscordBlueprint,
|
|
21
|
-
EntityExtractionHandlers,
|
|
22
21
|
LinearBlueprint,
|
|
23
22
|
PlanningBlueprint,
|
|
24
|
-
ResearchBlueprint,
|
|
25
23
|
WebSearchBlueprint,
|
|
24
|
+
WebSearchHandlers,
|
|
26
25
|
MemoryBlueprint,
|
|
27
26
|
AutomationBlueprint,
|
|
27
|
+
DelegationBlueprint,
|
|
28
|
+
DelegationHandlers,
|
|
29
|
+
makeDelegationStrategy,
|
|
28
30
|
} from '@dxos/assistant-toolkit';
|
|
31
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
29
32
|
|
|
30
33
|
import { AssistantBlueprint } from '#blueprints';
|
|
31
34
|
|
|
32
|
-
//
|
|
33
|
-
const blueprintDefinition: () => Effect.Effect<Capability.Capability<unknown>[]> =
|
|
35
|
+
// NOTE: Explicit annotation required: d.ts emit cannot portably name the inferred @dxos/compute types (TS2883).
|
|
36
|
+
const blueprintDefinition: () => Effect.Effect<Capability.Capability<unknown>[]> = () =>
|
|
34
37
|
Effect.succeed([
|
|
35
38
|
Capability.contributes(AppCapabilities.BlueprintDefinition, AssistantBlueprint),
|
|
36
39
|
Capability.contributes(AppCapabilities.BlueprintDefinition, BrowserBlueprint),
|
|
37
40
|
Capability.contributes(AppCapabilities.BlueprintDefinition, DatabaseBlueprint),
|
|
38
|
-
Capability.contributes(AppCapabilities.BlueprintDefinition, ResearchBlueprint),
|
|
39
41
|
Capability.contributes(AppCapabilities.BlueprintDefinition, WebSearchBlueprint),
|
|
40
42
|
Capability.contributes(AppCapabilities.BlueprintDefinition, DiscordBlueprint),
|
|
41
43
|
Capability.contributes(AppCapabilities.BlueprintDefinition, LinearBlueprint),
|
|
@@ -45,14 +47,19 @@ const blueprintDefinition: () => Effect.Effect<Capability.Capability<unknown>[]>
|
|
|
45
47
|
Capability.contributes(AppCapabilities.BlueprintDefinition, AutomationBlueprint),
|
|
46
48
|
Capability.contributes(AppCapabilities.BlueprintDefinition, BlueprintManagerBlueprint),
|
|
47
49
|
Capability.contributes(AppCapabilities.BlueprintDefinition, AgentWizardBlueprint),
|
|
50
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, DelegationBlueprint),
|
|
48
51
|
|
|
49
52
|
Capability.contributes(Capabilities.OperationHandler, AgentHandlers),
|
|
50
53
|
Capability.contributes(Capabilities.OperationHandler, AgentBlueprintHandlers),
|
|
51
54
|
Capability.contributes(Capabilities.OperationHandler, BlueprintManagerHandlers),
|
|
52
55
|
Capability.contributes(Capabilities.OperationHandler, DatabaseHandlers),
|
|
53
|
-
Capability.contributes(Capabilities.OperationHandler,
|
|
56
|
+
Capability.contributes(Capabilities.OperationHandler, WebSearchHandlers),
|
|
54
57
|
Capability.contributes(Capabilities.OperationHandler, AgentWizardHandlers),
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
Capability.contributes(Capabilities.OperationHandler, DelegationHandlers),
|
|
59
|
+
|
|
60
|
+
// Run the conversational agent as a supervisor: delegate in-progress plan tasks to sub-agents
|
|
61
|
+
// and fold their results back into the conversation (consumed by the AgentService LayerSpec).
|
|
62
|
+
Capability.contributes(AutomationCapabilities.AgentDelegationStrategy, makeDelegationStrategy()),
|
|
63
|
+
]);
|
|
57
64
|
|
|
58
65
|
export default blueprintDefinition;
|
|
@@ -12,13 +12,12 @@ import { AppCapabilities } from '@dxos/app-toolkit';
|
|
|
12
12
|
import { Chat } from '@dxos/assistant-toolkit';
|
|
13
13
|
import { Obj } from '@dxos/echo';
|
|
14
14
|
import { log } from '@dxos/log';
|
|
15
|
-
import { DeckCapabilities, PLANK_COMPANION_TYPE, type StoredDeckState } from '@dxos/plugin-deck
|
|
15
|
+
import { DeckCapabilities, PLANK_COMPANION_TYPE, type StoredDeckState } from '@dxos/plugin-deck';
|
|
16
16
|
import { getLinkedVariant } from '@dxos/react-ui-attention';
|
|
17
17
|
import { byPosition } from '@dxos/util';
|
|
18
18
|
|
|
19
19
|
import { ASSISTANT_COMPANION_VARIANT } from '#meta';
|
|
20
|
-
import { AssistantOperation } from '#
|
|
21
|
-
import { AssistantCapabilities } from '#types';
|
|
20
|
+
import { AssistantCapabilities, AssistantOperation } from '#types';
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* Non-React capability that watches deck companion state and provisions transient chats
|
|
@@ -65,14 +64,15 @@ export default Capability.makeModule(
|
|
|
65
64
|
}
|
|
66
65
|
|
|
67
66
|
const object = node.data;
|
|
68
|
-
const
|
|
67
|
+
const companionUri = Obj.getURI(object);
|
|
69
68
|
const cache = registry.get(cacheAtom);
|
|
70
|
-
if (cache[
|
|
69
|
+
if (cache[companionUri]) {
|
|
71
70
|
return true;
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
const db = Obj.getDatabase(object);
|
|
75
74
|
if (!db) {
|
|
75
|
+
log.warn('No db for object', { plankId, companionUri });
|
|
76
76
|
return false;
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Layer from 'effect/Layer';
|
|
7
|
+
|
|
8
|
+
import { Capability, Capabilities } from '@dxos/app-framework';
|
|
9
|
+
import { Agent, AgentBlueprint, Chat } from '@dxos/assistant-toolkit';
|
|
10
|
+
import { Blueprint, Operation, Routine, ServiceResolver } from '@dxos/compute';
|
|
11
|
+
import { Sequence } from '@dxos/conductor';
|
|
12
|
+
import { Database, Feed, Obj, Type } from '@dxos/echo';
|
|
13
|
+
import { SpaceCapabilities, SpaceOperation } from '@dxos/plugin-space';
|
|
14
|
+
|
|
15
|
+
import { AssistantOperation } from '#types';
|
|
16
|
+
|
|
17
|
+
import { getChatsPath } from '../paths';
|
|
18
|
+
|
|
19
|
+
export default Capability.makeModule(
|
|
20
|
+
Effect.fnUntraced(function* () {
|
|
21
|
+
return [
|
|
22
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
23
|
+
id: Type.getTypename(Chat.Chat),
|
|
24
|
+
createObject: (props, options) =>
|
|
25
|
+
Effect.gen(function* () {
|
|
26
|
+
const { object } = yield* Operation.invoke(AssistantOperation.CreateChat, {
|
|
27
|
+
db: options.db,
|
|
28
|
+
name: props?.name,
|
|
29
|
+
});
|
|
30
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
31
|
+
object,
|
|
32
|
+
target: options.target,
|
|
33
|
+
hidden: true,
|
|
34
|
+
targetNodeId: options.targetNodeId ?? getChatsPath(options.db.spaceId),
|
|
35
|
+
});
|
|
36
|
+
}),
|
|
37
|
+
}),
|
|
38
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
39
|
+
id: Type.getTypename(Blueprint.Blueprint),
|
|
40
|
+
inputSchema: AssistantOperation.BlueprintForm,
|
|
41
|
+
createObject: (props, options) =>
|
|
42
|
+
Effect.gen(function* () {
|
|
43
|
+
const object = Blueprint.make(props);
|
|
44
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
45
|
+
object,
|
|
46
|
+
target: options.target,
|
|
47
|
+
hidden: true,
|
|
48
|
+
targetNodeId: options.targetNodeId,
|
|
49
|
+
});
|
|
50
|
+
}),
|
|
51
|
+
}),
|
|
52
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
53
|
+
id: Type.getTypename(Routine.Routine),
|
|
54
|
+
createObject: (props, options) =>
|
|
55
|
+
Effect.gen(function* () {
|
|
56
|
+
const object = Routine.make(props);
|
|
57
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
58
|
+
object,
|
|
59
|
+
target: options.target,
|
|
60
|
+
hidden: true,
|
|
61
|
+
targetNodeId: options.targetNodeId,
|
|
62
|
+
});
|
|
63
|
+
}),
|
|
64
|
+
}),
|
|
65
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
66
|
+
id: Type.getTypename(Sequence.Sequence),
|
|
67
|
+
createObject: (props, options) =>
|
|
68
|
+
Effect.gen(function* () {
|
|
69
|
+
const object = Obj.make(Sequence.Sequence, props);
|
|
70
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
71
|
+
object,
|
|
72
|
+
target: options.target,
|
|
73
|
+
hidden: true,
|
|
74
|
+
targetNodeId: options.targetNodeId,
|
|
75
|
+
});
|
|
76
|
+
}),
|
|
77
|
+
}),
|
|
78
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
79
|
+
id: Type.getTypename(Agent.Agent),
|
|
80
|
+
createObject: (props, options) =>
|
|
81
|
+
Effect.gen(function* () {
|
|
82
|
+
const object = yield* Agent.makeInitialized({ name: '', instructions: '' }, AgentBlueprint.make());
|
|
83
|
+
|
|
84
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
85
|
+
object,
|
|
86
|
+
target: options.target,
|
|
87
|
+
hidden: true,
|
|
88
|
+
targetNodeId: options.targetNodeId,
|
|
89
|
+
});
|
|
90
|
+
}).pipe(
|
|
91
|
+
Effect.provide(
|
|
92
|
+
ServiceResolver.provide({ space: options.db.spaceId }, Database.Service, Feed.FeedService).pipe(
|
|
93
|
+
Layer.provide(Capability.asLayer(Capabilities.ServiceResolver, ServiceResolver.ServiceResolver)),
|
|
94
|
+
),
|
|
95
|
+
),
|
|
96
|
+
),
|
|
97
|
+
}),
|
|
98
|
+
];
|
|
99
|
+
}),
|
|
100
|
+
);
|
|
@@ -3,31 +3,68 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as AnthropicClient from '@effect/ai-anthropic/AnthropicClient';
|
|
6
|
-
import * as FetchHttpClient from '@effect/platform/FetchHttpClient';
|
|
7
6
|
import * as Effect from 'effect/Effect';
|
|
8
7
|
import * as Layer from 'effect/Layer';
|
|
9
8
|
|
|
10
9
|
import { AnthropicResolver } from '@dxos/ai/resolvers';
|
|
11
10
|
import { Capability } from '@dxos/app-framework';
|
|
12
11
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
12
|
+
import { createEdgeIdentity } from '@dxos/client/edge';
|
|
13
|
+
import { Header } from '@dxos/compute';
|
|
14
|
+
import { EdgeAiHttpClient, EdgeHttpClient } from '@dxos/edge-client';
|
|
15
|
+
import { invariant } from '@dxos/invariant';
|
|
16
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
import { ANTHROPIC_SOURCE } from '../constants';
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
// Named alias so the module's inferred type stays portable (avoids TS2883 leaking the internal
|
|
21
|
+
// `@dxos/ai/AiModelResolver` Layer type into the emitted declarations).
|
|
22
|
+
export type EdgeModelResolverCapabilities = Capability.Capability<typeof AppCapabilities.AiModelResolver>[];
|
|
23
|
+
|
|
24
|
+
const edgeModelResolver = Capability.makeModule<[], EdgeModelResolverCapabilities>(
|
|
25
|
+
Effect.fnUntraced(function* () {
|
|
26
|
+
const manager = yield* Capability.Service;
|
|
27
|
+
|
|
28
|
+
// The authenticated EDGE client is resolved lazily on the first AI request. AI providers are
|
|
29
|
+
// set up before the Client capability and user identity exist (the startup cascade activates
|
|
30
|
+
// this module before `ClientReady`), so requiring the Client here would throw — or deadlock
|
|
31
|
+
// if we blocked on it. `EdgeAiHttpClient` invokes this thunk per request, by which point the
|
|
32
|
+
// Client is available.
|
|
33
|
+
let edgeClient: EdgeHttpClient | undefined;
|
|
34
|
+
let identitySubscription: { unsubscribe: () => void } | undefined;
|
|
35
|
+
const getEdgeClient = (): EdgeHttpClient => {
|
|
36
|
+
if (!edgeClient) {
|
|
37
|
+
const [client] = manager.getAll(ClientCapabilities.Client);
|
|
38
|
+
invariant(client, 'Client capability is required for edge AI requests.');
|
|
39
|
+
const edgeUrl = client.config.values.runtime?.services?.edge?.url;
|
|
40
|
+
invariant(edgeUrl, 'EDGE services are not configured.');
|
|
41
|
+
const created = new EdgeHttpClient(edgeUrl);
|
|
42
|
+
const updateIdentity = () => {
|
|
43
|
+
if (client.halo.identity.get()) {
|
|
44
|
+
created.setIdentity(createEdgeIdentity(client));
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
updateIdentity();
|
|
48
|
+
identitySubscription = client.halo.identity.subscribe(updateIdentity);
|
|
49
|
+
edgeClient = created;
|
|
50
|
+
}
|
|
51
|
+
return edgeClient;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// `apiUrl` is a sentinel; `EdgeAiHttpClient` rewrites the request onto the EDGE
|
|
55
|
+
// `/ai/generate/anthropic` route. `Header.byokLayer` wraps that client to inject `X-BYOK`.
|
|
56
|
+
const httpClient = Header.byokLayer(ANTHROPIC_SOURCE).pipe(Layer.provide(EdgeAiHttpClient.layer(getEdgeClient)));
|
|
57
|
+
const anthropicClient = AnthropicClient.layer({ apiUrl: 'http://edge.internal' }).pipe(Layer.provide(httpClient));
|
|
58
|
+
const anthropicResolverLayer = AnthropicResolver.make().pipe(Layer.provide(anthropicClient));
|
|
59
|
+
|
|
60
|
+
const contribution: Capability.Capability<typeof AppCapabilities.AiModelResolver> = Capability.contributes(
|
|
19
61
|
AppCapabilities.AiModelResolver,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
),
|
|
27
|
-
Layer.provide(FetchHttpClient.layer),
|
|
28
|
-
),
|
|
29
|
-
),
|
|
30
|
-
]),
|
|
62
|
+
anthropicResolverLayer,
|
|
63
|
+
() => Effect.sync(() => identitySubscription?.unsubscribe()),
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
return [contribution];
|
|
67
|
+
}),
|
|
31
68
|
);
|
|
32
69
|
|
|
33
70
|
export default edgeModelResolver;
|
|
@@ -3,18 +3,38 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capability } from '@dxos/app-framework';
|
|
6
|
-
import { OperationHandlerSet } from '@dxos/
|
|
6
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
7
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
import type { AssistantPluginOptions } from '#types';
|
|
10
|
+
|
|
11
|
+
export const AgentHydrator = Capability.lazy('AgentHydrator', () => import('./agent-hydrator'));
|
|
12
|
+
export const AgentRuntime = Capability.lazy<void, Capability.Any[]>('AgentRuntime', () => import('./agent-service'));
|
|
13
|
+
export const AiContext = Capability.lazy<void, Capability.Any[]>('AiContext', () => import('./ai-context'));
|
|
14
|
+
export const AiService = Capability.lazy<AssistantPluginOptions | void, Capability.Any[]>(
|
|
15
|
+
'AiService',
|
|
16
|
+
() => import('./ai-service'),
|
|
17
|
+
);
|
|
18
|
+
export const IntegrationProvider = Capability.lazy(
|
|
19
|
+
'AnthropicIntegrationProvider',
|
|
20
|
+
() => import('./integration-provider'),
|
|
21
|
+
);
|
|
9
22
|
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
23
|
+
// Explicit annotation: the contributed capability type references `Template` from @dxos/plugin-automation,
|
|
24
|
+
// so the inferred lazy type needs annotating to stay portable (TS2883).
|
|
25
|
+
export const AutomationTemplates: Capability.LazyCapability<
|
|
26
|
+
void,
|
|
27
|
+
Capability.Capability<typeof AutomationCapabilities.Template>[]
|
|
28
|
+
> = Capability.lazy('AutomationTemplates', () => import('./automation-templates'));
|
|
10
29
|
export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
|
|
11
30
|
export const CompanionChatProvisioner = Capability.lazy(
|
|
12
31
|
'CompanionChatProvisioner',
|
|
13
32
|
() => import('./companion-chat-provisioner'),
|
|
14
33
|
);
|
|
34
|
+
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
15
35
|
export const EdgeModelResolver = Capability.lazy('EdgeModelResolver', () => import('./edge-model-resolver'));
|
|
16
36
|
export const LocalModelResolver = Capability.lazy('LocalModelResolver', () => import('./local-model-resolver'));
|
|
17
|
-
export const MarkdownExtension = Capability.lazy('MarkdownExtension', () => import('./markdown'));
|
|
37
|
+
export const MarkdownExtension = Capability.lazy('MarkdownExtension', () => import('./markdown-extension'));
|
|
18
38
|
export const Migrations = Capability.lazy('AssistantMigrations', () => import('./migrations'));
|
|
19
39
|
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
20
40
|
'OperationHandler',
|