@dxos/plugin-assistant 0.8.4-main.422d1c7879 → 0.8.4-main.43cb759274
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-OYQPCK3Q.mjs +161 -0
- package/dist/lib/neutral/AgentArticle-OYQPCK3Q.mjs.map +7 -0
- package/dist/lib/neutral/AgentProperties-W6LD56IB.mjs +40 -0
- package/dist/lib/neutral/AgentProperties-W6LD56IB.mjs.map +7 -0
- package/dist/lib/neutral/AssistantPlugin.mjs +10 -0
- package/dist/lib/neutral/AssistantPlugin.node.mjs +66 -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-PWD4OEFZ.mjs +8 -0
- package/dist/lib/neutral/ChatCompanion-TPY7HF3C.mjs +122 -0
- package/dist/lib/neutral/ChatCompanion-TPY7HF3C.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-CHJHFTTQ.mjs +136 -0
- package/dist/lib/neutral/TracePanel-CHJHFTTQ.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/ai-context-IABBIEHG.mjs +42 -0
- package/dist/lib/neutral/ai-context-IABBIEHG.mjs.map +7 -0
- package/dist/lib/neutral/ai-service-3SH2UQIR.mjs +42 -0
- package/dist/lib/neutral/ai-service-3SH2UQIR.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-RJW5O57E.mjs +199 -0
- package/dist/lib/neutral/app-graph-builder-RJW5O57E.mjs.map +7 -0
- package/dist/lib/neutral/blueprint-definition-VXJYQ5AE.mjs +32 -0
- package/dist/lib/neutral/blueprint-definition-VXJYQ5AE.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/blueprints/index.mjs +1 -1
- package/dist/lib/neutral/capabilities/index.mjs +37 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-47OH7ZF6.mjs +8 -0
- package/dist/lib/neutral/chunk-47OH7ZF6.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-6BUTAYVO.mjs +123 -0
- package/dist/lib/neutral/chunk-6BUTAYVO.mjs.map +7 -0
- package/dist/lib/neutral/chunk-A2XIILMZ.mjs +107 -0
- package/dist/lib/neutral/chunk-A2XIILMZ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-UWI53RCD.mjs +386 -0
- package/dist/lib/neutral/chunk-UWI53RCD.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/companion-chat-provisioner-7RTSXL6M.mjs +116 -0
- package/dist/lib/neutral/companion-chat-provisioner-7RTSXL6M.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +2384 -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-67GZNG3T.mjs +54 -0
- package/dist/lib/neutral/create-chat-67GZNG3T.mjs.map +7 -0
- package/dist/lib/neutral/create-object-XPVVVEKF.mjs +89 -0
- package/dist/lib/neutral/create-object-XPVVVEKF.mjs.map +7 -0
- package/dist/lib/neutral/edge-model-resolver-7SMCGDRL.mjs +50 -0
- package/dist/lib/neutral/edge-model-resolver-7SMCGDRL.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 +658 -0
- package/dist/lib/neutral/execution-graph/index.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +965 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +32 -0
- package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs +24 -0
- package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs.map +7 -0
- package/dist/lib/neutral/markdown-KTBFOMFM.mjs +110 -0
- package/dist/lib/neutral/markdown-KTBFOMFM.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +12 -0
- package/dist/lib/neutral/migrations-7DEMVBOG.mjs +28 -0
- package/dist/lib/neutral/migrations-7DEMVBOG.mjs.map +7 -0
- package/dist/lib/{browser/on-create-space-54RNX5JI.mjs → neutral/on-create-space-Q2R7OSP6.mjs} +5 -8
- package/dist/lib/neutral/on-create-space-Q2R7OSP6.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-SF36MOB5.mjs +13 -0
- package/dist/lib/neutral/operation-handler-SF36MOB5.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-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-NRDYPCJK.mjs} +21 -55
- package/dist/lib/neutral/run-prompt-in-new-chat-NRDYPCJK.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 +175 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +20 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/{browser/update-chat-name-3Y36KFAS.mjs → neutral/update-chat-name-ENXRUMDJ.mjs} +8 -25
- package/dist/lib/neutral/update-chat-name-ENXRUMDJ.mjs.map +7 -0
- package/dist/types/src/AssistantPlugin.d.ts +3 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/AssistantPlugin.node.d.ts +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/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.map +1 -1
- 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 +30 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
- 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 +36 -40
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/context.d.ts +29 -0
- package/dist/types/src/components/Chat/context.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.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 +8 -7
- 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.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 +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.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.map +1 -1
- 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 +1 -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 +3 -3
- 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 +3 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- 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 +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/{ChatContainer/ChatContainer.d.ts → ChatArticle/ChatArticle.d.ts} +3 -3
- 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 +3 -2
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts +3 -4
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +5 -5
- 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.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/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/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +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.map +1 -1
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -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/index.d.ts +1 -2
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/on-create-space.d.ts +3 -3
- package/dist/types/src/operations/on-create-space.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/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +263 -20
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/processor/processor.node.test.d.ts +2 -0
- package/dist/types/src/processor/processor.node.test.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/snapshot.d.ts +21 -0
- package/dist/types/src/testing/snapshot.d.ts.map +1 -0
- package/dist/types/src/testing/test-generator.d.ts +2 -3
- package/dist/types/src/testing/test-generator.d.ts.map +1 -1
- 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/{operations/definitions.d.ts → types/AssistantOperation.d.ts} +61 -59
- 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 +7 -3
- package/dist/types/src/types/index.d.ts.map +1 -1
- 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 +178 -138
- package/src/AssistantPlugin.conversations.json +1 -0
- package/src/AssistantPlugin.node.ts +77 -0
- package/src/AssistantPlugin.test.ts +152 -0
- package/src/AssistantPlugin.ts +147 -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/ai-context.ts +85 -0
- package/src/capabilities/ai-service.ts +36 -9
- package/src/capabilities/app-graph-builder.ts +55 -20
- package/src/capabilities/blueprint-definition.ts +2 -4
- package/src/capabilities/companion-chat-provisioner.ts +4 -5
- package/src/capabilities/create-object.ts +98 -0
- package/src/capabilities/edge-model-resolver.ts +47 -11
- package/src/capabilities/index.ts +10 -2
- package/src/capabilities/markdown.ts +1 -1
- package/src/capabilities/migrations.ts +4 -11
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.tsx +33 -20
- package/src/components/AgentProperties/AgentProperties.stories.tsx +74 -0
- package/src/components/AgentProperties/AgentProperties.tsx +104 -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 +85 -259
- package/src/components/Chat/context.ts +39 -0
- package/src/components/ChatPrompt/ChatActions.tsx +10 -10
- package/src/components/ChatPrompt/ChatMcpErrors.tsx +50 -0
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +32 -18
- package/src/components/ChatPrompt/ChatOptions.tsx +103 -82
- package/src/components/ChatPrompt/ChatPrompt.tsx +182 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +9 -13
- package/src/components/ChatPrompt/ChatStatus.tsx +123 -0
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +1 -1
- package/src/components/ChatPrompt/index.ts +3 -0
- package/src/components/ChatThread/Anchor.stories.tsx +7 -7
- package/src/components/ChatThread/ChatThread.stories.tsx +27 -31
- package/src/components/ChatThread/ChatThread.tsx +43 -21
- package/src/components/ChatThread/DEBUG.md +41 -0
- package/src/components/ChatThread/Link.tsx +5 -5
- package/src/components/ChatThread/MarkdownStream.stories.tsx +5 -4
- package/src/components/ChatThread/registry.tsx +62 -19
- package/src/components/ChatThread/sync.test.ts +84 -18
- package/src/components/ChatThread/sync.ts +3 -3
- 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 -84
- package/src/components/ChatThread/widgets/SuggestionWidget.ts +2 -2
- package/src/components/ChatThread/widgets/SummaryWidget.tsx +3 -4
- package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +2 -1
- package/src/components/ChatThread/widgets/ToolWidget.tsx +19 -4
- 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/{cli → components/TaskList}/index.ts +1 -1
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +5 -4
- package/src/components/TemplateEditor/TemplateEditor.tsx +11 -9
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +6 -9
- package/src/components/TemplateEditor/TemplateForm.tsx +52 -73
- package/src/components/ToolBlock/ToolBlock.tsx +1 -1
- package/src/components/Toolbox/Toolbox.stories.tsx +6 -5
- package/src/components/Toolbox/Toolbox.tsx +6 -5
- package/src/components/index.ts +3 -0
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +19 -15
- package/src/containers/AgentArticle/AgentArticle.tsx +37 -48
- package/src/containers/AgentProperties/AgentProperties.tsx +19 -103
- package/src/containers/BlueprintArticle/BlueprintArticle.tsx +2 -2
- package/src/containers/ChatArticle/ChatArticle.stories.tsx +76 -0
- package/src/containers/{ChatContainer/ChatContainer.tsx → ChatArticle/ChatArticle.tsx} +30 -17
- package/src/containers/ChatArticle/index.ts +5 -0
- package/src/containers/ChatCompanion/ChatCompanion.tsx +39 -60
- 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} +13 -12
- 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 +251 -204
- package/src/containers/TracePanel/TracePanel.tsx +172 -72
- package/src/containers/TracePanel/dxn-extractor.test.ts +7 -7
- package/src/containers/TracePanel/dxn-extractor.ts +25 -35
- 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 +2 -1
- package/src/containers/index.ts +6 -5
- package/src/execution-graph/SPEC.md +678 -0
- package/src/execution-graph/execution-graph.test.ts +799 -0
- package/src/execution-graph/execution-graph.ts +714 -0
- package/src/execution-graph/index.ts +24 -0
- package/src/execution-graph/remote-snapshot.test.ts +116 -0
- package/src/execution-graph/span-tree.test.ts +249 -0
- package/src/execution-graph/span-tree.ts +259 -0
- package/src/execution-graph/testing/collect-trace-events.ts +74 -0
- package/src/execution-graph/testing/index.ts +5 -0
- package/src/{queue-logger.ts → feed-logger.ts} +39 -25
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useBlueprintRegistry.ts +62 -46
- package/src/hooks/useChatKeymap.ts +52 -0
- package/src/hooks/useChatProcessor.ts +30 -14
- package/src/hooks/useChatServices.ts +8 -6
- package/src/hooks/useChatToolbarActions.ts +87 -89
- package/src/hooks/useContextBinder.ts +4 -4
- package/src/hooks/useContextObjects.ts +6 -5
- package/src/hooks/useDebug.ts +38 -0
- package/src/hooks/useFilteredTypes.ts +17 -16
- package/src/hooks/useReferencesProvider.ts +7 -15
- package/src/index.ts +0 -5
- package/src/meta.ts +27 -8
- package/src/operations/create-chat.ts +14 -37
- package/src/operations/ensure-companion-chat.ts +49 -47
- package/src/operations/index.ts +2 -3
- package/src/operations/on-create-space.ts +4 -4
- package/src/operations/{prompt.test.ts → prompt.node.test.ts} +24 -23
- package/src/operations/resolve-navigation-targets.ts +8 -3
- package/src/operations/run-prompt-in-new-chat.ts +86 -86
- 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 +4 -4
- package/src/plugin.ts +11 -0
- package/src/processor/{processor.test.ts → processor.node.test.ts} +6 -6
- package/src/processor/processor.ts +112 -33
- 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 +3737 -1200
- package/src/testing/index.ts +2 -0
- package/src/testing/snapshot.ts +35 -0
- package/src/testing/test-generator.test.ts +42 -52
- package/src/testing/test-generator.ts +177 -192
- 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} +44 -49
- package/src/testing.ts +9 -0
- package/src/translations.ts +34 -37
- 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} +57 -20
- package/src/types/Settings.ts +68 -7
- package/src/types/index.ts +11 -3
- 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/cli/index.mjs +0 -74
- package/dist/lib/browser/cli/index.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 -3446
- 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.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/cli/index.mjs +0 -75
- package/dist/lib/node-esm/cli/index.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 -3447
- 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/cli/index.d.ts +0 -2
- package/dist/types/src/cli/index.d.ts.map +0 -1
- package/dist/types/src/cli/plugin.d.ts +0 -10
- package/dist/types/src/cli/plugin.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 -15
- 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.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.map +0 -1
- package/dist/types/src/operations/prompt.test.d.ts +0 -2
- package/dist/types/src/operations/prompt.test.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 -238
- package/src/cli/plugin.ts +0 -84
- package/src/components/ChatProgress/ChatProgress.tsx +0 -56
- package/src/components/ChatProgress/index.ts +0 -5
- package/src/components/ChatThread/widgets/PromptWidget.ts +0 -30
- package/src/containers/AgentProperties/AgentProperties.stories.tsx +0 -100
- 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 -452
- 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-PWD4OEFZ.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
|
@@ -8,21 +8,21 @@ import * as Option from 'effect/Option';
|
|
|
8
8
|
|
|
9
9
|
import { Capability } from '@dxos/app-framework';
|
|
10
10
|
import { AppCapabilities, AppNode, getActiveSpace, getPersonalSpace } from '@dxos/app-toolkit';
|
|
11
|
-
import { Chat } from '@dxos/assistant-toolkit';
|
|
12
|
-
import { Blueprint,
|
|
11
|
+
import { AgentPrompt, Chat } from '@dxos/assistant-toolkit';
|
|
12
|
+
import { Blueprint, Operation, Routine } from '@dxos/compute';
|
|
13
13
|
import { Sequence } from '@dxos/conductor';
|
|
14
14
|
import { DXN, Database, Filter, Obj, type Ref } from '@dxos/echo';
|
|
15
15
|
import { AtomObj } from '@dxos/echo-atom';
|
|
16
16
|
import { invariant } from '@dxos/invariant';
|
|
17
|
-
import {
|
|
18
|
-
import { AutomationCapabilities } from '@dxos/plugin-automation/types';
|
|
19
|
-
import { ClientCapabilities } from '@dxos/plugin-client/types';
|
|
17
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
20
18
|
import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
21
19
|
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
22
20
|
|
|
23
21
|
import { ASSISTANT_COMPANION_VARIANT, meta } from '#meta';
|
|
24
|
-
import { AssistantOperation } from '#
|
|
25
|
-
|
|
22
|
+
import { AssistantCapabilities, AssistantOperation } from '#types';
|
|
23
|
+
|
|
24
|
+
/** Operation definitions to seed as `PersistentOperation` records for automation / triggers. */
|
|
25
|
+
const computeOperationsToImport = [AgentPrompt] as const;
|
|
26
26
|
|
|
27
27
|
/** Match ECHO objects that are NOT chats. */
|
|
28
28
|
const whenNonChatObject = NodeMatcher.whenAll(
|
|
@@ -45,11 +45,9 @@ export default Capability.makeModule(
|
|
|
45
45
|
data: () =>
|
|
46
46
|
Effect.gen(function* () {
|
|
47
47
|
// TODO(dmaretskyi): This goes away when composer will have unified operation invocations.
|
|
48
|
-
const computeRuntime = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
|
|
49
48
|
const db = Obj.getDatabase(chat);
|
|
50
49
|
invariant(db);
|
|
51
|
-
|
|
52
|
-
yield* Operation.invoke(AssistantOperation.UpdateChatName, { chat }).pipe(Effect.provide(runtime));
|
|
50
|
+
yield* Operation.invoke(AssistantOperation.UpdateChatName, { chat }, { spaceId: db.spaceId });
|
|
53
51
|
}),
|
|
54
52
|
properties: {
|
|
55
53
|
label: ['chat-update-name.label', { ns: meta.id }],
|
|
@@ -67,7 +65,44 @@ export default Capability.makeModule(
|
|
|
67
65
|
actions: () =>
|
|
68
66
|
Effect.succeed([
|
|
69
67
|
Node.makeAction({
|
|
70
|
-
id: '
|
|
68
|
+
id: 'importComputeOperations',
|
|
69
|
+
data: Effect.fnUntraced(function* () {
|
|
70
|
+
const capabilities = yield* Capability.Service;
|
|
71
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
72
|
+
const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
|
|
73
|
+
if (!space) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
for (const definition of computeOperationsToImport) {
|
|
77
|
+
const key = definition.meta.key;
|
|
78
|
+
if (!key) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
const existing = yield* Effect.promise(
|
|
82
|
+
(): Promise<Operation.PersistentOperation[]> =>
|
|
83
|
+
space.db.query(Filter.and(Filter.type(Operation.PersistentOperation), Filter.key(key))).run(),
|
|
84
|
+
);
|
|
85
|
+
if (existing.length === 0) {
|
|
86
|
+
space.db.add(Operation.serialize(definition));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
yield* Database.flush();
|
|
90
|
+
}),
|
|
91
|
+
properties: {
|
|
92
|
+
label: ['import-compute-operations.label', { ns: meta.id }],
|
|
93
|
+
icon: 'ph--download-simple--regular',
|
|
94
|
+
},
|
|
95
|
+
}),
|
|
96
|
+
Node.makeAction({
|
|
97
|
+
id: AssistantOperation.ToggleTracePanelDebug.meta.key,
|
|
98
|
+
data: () => Operation.invoke(AssistantOperation.ToggleTracePanelDebug, {}),
|
|
99
|
+
properties: {
|
|
100
|
+
label: ['toggle-trace-panel-debug.label', { ns: meta.id }],
|
|
101
|
+
icon: 'ph--brackets-curly--regular',
|
|
102
|
+
},
|
|
103
|
+
}),
|
|
104
|
+
Node.makeAction({
|
|
105
|
+
id: 'resetBlueprints',
|
|
71
106
|
data: Effect.fnUntraced(function* () {
|
|
72
107
|
const capabilities = yield* Capability.Service;
|
|
73
108
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
@@ -93,22 +128,22 @@ export default Capability.makeModule(
|
|
|
93
128
|
|
|
94
129
|
// Don't show assistant companion when a chat is already the primary object.
|
|
95
130
|
GraphBuilder.createExtension({
|
|
96
|
-
id: '
|
|
131
|
+
id: 'companionChat',
|
|
97
132
|
match: whenNonChatObject,
|
|
98
133
|
connector: (object, get) =>
|
|
99
134
|
Effect.gen(function* () {
|
|
100
135
|
const state = get(yield* Capability.get(AssistantCapabilities.State));
|
|
101
136
|
const cache = get(yield* Capability.get(AssistantCapabilities.CompanionChatCache));
|
|
102
|
-
const
|
|
137
|
+
const objectUri = Obj.getURI(object);
|
|
103
138
|
|
|
104
139
|
// Resolve chat from persisted state or transient cache.
|
|
105
140
|
const chat = pipe(
|
|
106
|
-
Option.fromNullable(state.currentChat[
|
|
107
|
-
Option.flatMap((dxnStr) => Option.fromNullable(DXN.
|
|
141
|
+
Option.fromNullable(state.currentChat[objectUri]),
|
|
142
|
+
Option.flatMap((dxnStr) => Option.fromNullable(DXN.tryMake(dxnStr))),
|
|
108
143
|
Option.flatMap((dxn) => Option.fromNullable(Obj.getDatabase(object)?.makeRef(dxn))),
|
|
109
144
|
Option.map((ref) => get(AtomObj.make(ref as Ref.Ref<Obj.Unknown>))),
|
|
110
145
|
Option.filter(Obj.isObject),
|
|
111
|
-
Option.orElse(() => pipe(Option.fromNullable(cache[
|
|
146
|
+
Option.orElse(() => pipe(Option.fromNullable(cache[objectUri]), Option.filter(Obj.isObject))),
|
|
112
147
|
Option.getOrNull,
|
|
113
148
|
);
|
|
114
149
|
|
|
@@ -118,7 +153,7 @@ export default Capability.makeModule(
|
|
|
118
153
|
label: ['assistant-chat.label', { ns: meta.id }],
|
|
119
154
|
icon: 'ph--sparkle--regular',
|
|
120
155
|
data: chat,
|
|
121
|
-
position: '
|
|
156
|
+
position: 'first',
|
|
122
157
|
}),
|
|
123
158
|
];
|
|
124
159
|
}),
|
|
@@ -127,8 +162,8 @@ export default Capability.makeModule(
|
|
|
127
162
|
GraphBuilder.createExtension({
|
|
128
163
|
id: 'invocations',
|
|
129
164
|
match: NodeMatcher.whenAny(
|
|
130
|
-
NodeMatcher.whenEchoTypeMatches(Sequence),
|
|
131
|
-
NodeMatcher.whenEchoTypeMatches(
|
|
165
|
+
NodeMatcher.whenEchoTypeMatches(Sequence.Sequence),
|
|
166
|
+
NodeMatcher.whenEchoTypeMatches(Routine.Routine),
|
|
132
167
|
),
|
|
133
168
|
connector: () =>
|
|
134
169
|
Effect.succeed([
|
|
@@ -151,7 +186,7 @@ export default Capability.makeModule(
|
|
|
151
186
|
label: ['trace.label', { ns: meta.id }],
|
|
152
187
|
icon: 'ph--line-segments--regular',
|
|
153
188
|
data: 'trace' as const,
|
|
154
|
-
position: '
|
|
189
|
+
position: 'last',
|
|
155
190
|
}),
|
|
156
191
|
]),
|
|
157
192
|
}),
|
|
@@ -18,14 +18,14 @@ import {
|
|
|
18
18
|
DatabaseBlueprint,
|
|
19
19
|
DatabaseHandlers,
|
|
20
20
|
DiscordBlueprint,
|
|
21
|
-
EntityExtractionHandlers,
|
|
22
21
|
LinearBlueprint,
|
|
23
22
|
PlanningBlueprint,
|
|
24
|
-
ResearchBlueprint,
|
|
25
23
|
WebSearchBlueprint,
|
|
26
24
|
MemoryBlueprint,
|
|
27
25
|
AutomationBlueprint,
|
|
28
26
|
} from '@dxos/assistant-toolkit';
|
|
27
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
28
|
+
import type { Blueprint } from '@dxos/compute';
|
|
29
29
|
|
|
30
30
|
import { AssistantBlueprint } from '#blueprints';
|
|
31
31
|
|
|
@@ -35,7 +35,6 @@ const blueprintDefinition: () => Effect.Effect<Capability.Capability<unknown>[]>
|
|
|
35
35
|
Capability.contributes(AppCapabilities.BlueprintDefinition, AssistantBlueprint),
|
|
36
36
|
Capability.contributes(AppCapabilities.BlueprintDefinition, BrowserBlueprint),
|
|
37
37
|
Capability.contributes(AppCapabilities.BlueprintDefinition, DatabaseBlueprint),
|
|
38
|
-
Capability.contributes(AppCapabilities.BlueprintDefinition, ResearchBlueprint),
|
|
39
38
|
Capability.contributes(AppCapabilities.BlueprintDefinition, WebSearchBlueprint),
|
|
40
39
|
Capability.contributes(AppCapabilities.BlueprintDefinition, DiscordBlueprint),
|
|
41
40
|
Capability.contributes(AppCapabilities.BlueprintDefinition, LinearBlueprint),
|
|
@@ -50,7 +49,6 @@ const blueprintDefinition: () => Effect.Effect<Capability.Capability<unknown>[]>
|
|
|
50
49
|
Capability.contributes(Capabilities.OperationHandler, AgentBlueprintHandlers),
|
|
51
50
|
Capability.contributes(Capabilities.OperationHandler, BlueprintManagerHandlers),
|
|
52
51
|
Capability.contributes(Capabilities.OperationHandler, DatabaseHandlers),
|
|
53
|
-
Capability.contributes(Capabilities.OperationHandler, EntityExtractionHandlers),
|
|
54
52
|
Capability.contributes(Capabilities.OperationHandler, AgentWizardHandlers),
|
|
55
53
|
]),
|
|
56
54
|
);
|
|
@@ -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,9 +64,9 @@ 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
|
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
export default Capability.makeModule(
|
|
18
|
+
Effect.fnUntraced(function* () {
|
|
19
|
+
return [
|
|
20
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
21
|
+
id: Type.getTypename(Chat.Chat),
|
|
22
|
+
createObject: (props, options) =>
|
|
23
|
+
Effect.gen(function* () {
|
|
24
|
+
const { object } = yield* Operation.invoke(AssistantOperation.CreateChat, {
|
|
25
|
+
db: options.db,
|
|
26
|
+
name: props?.name,
|
|
27
|
+
});
|
|
28
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
29
|
+
object,
|
|
30
|
+
target: options.target,
|
|
31
|
+
hidden: true,
|
|
32
|
+
targetNodeId: options.targetNodeId,
|
|
33
|
+
});
|
|
34
|
+
}),
|
|
35
|
+
}),
|
|
36
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
37
|
+
id: Type.getTypename(Blueprint.Blueprint),
|
|
38
|
+
inputSchema: AssistantOperation.BlueprintForm,
|
|
39
|
+
createObject: (props, options) =>
|
|
40
|
+
Effect.gen(function* () {
|
|
41
|
+
const object = Blueprint.make(props);
|
|
42
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
43
|
+
object,
|
|
44
|
+
target: options.target,
|
|
45
|
+
hidden: true,
|
|
46
|
+
targetNodeId: options.targetNodeId,
|
|
47
|
+
});
|
|
48
|
+
}),
|
|
49
|
+
}),
|
|
50
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
51
|
+
id: Type.getTypename(Routine.Routine),
|
|
52
|
+
createObject: (props, options) =>
|
|
53
|
+
Effect.gen(function* () {
|
|
54
|
+
const object = Routine.make(props);
|
|
55
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
56
|
+
object,
|
|
57
|
+
target: options.target,
|
|
58
|
+
hidden: true,
|
|
59
|
+
targetNodeId: options.targetNodeId,
|
|
60
|
+
});
|
|
61
|
+
}),
|
|
62
|
+
}),
|
|
63
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
64
|
+
id: Type.getTypename(Sequence.Sequence),
|
|
65
|
+
createObject: (props, options) =>
|
|
66
|
+
Effect.gen(function* () {
|
|
67
|
+
const object = Obj.make(Sequence.Sequence, props);
|
|
68
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
69
|
+
object,
|
|
70
|
+
target: options.target,
|
|
71
|
+
hidden: true,
|
|
72
|
+
targetNodeId: options.targetNodeId,
|
|
73
|
+
});
|
|
74
|
+
}),
|
|
75
|
+
}),
|
|
76
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
77
|
+
id: Type.getTypename(Agent.Agent),
|
|
78
|
+
createObject: (props, options) =>
|
|
79
|
+
Effect.gen(function* () {
|
|
80
|
+
const object = yield* Agent.makeInitialized({ name: '', instructions: '' }, AgentBlueprint.make());
|
|
81
|
+
|
|
82
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
83
|
+
object,
|
|
84
|
+
target: options.target,
|
|
85
|
+
hidden: true,
|
|
86
|
+
targetNodeId: options.targetNodeId,
|
|
87
|
+
});
|
|
88
|
+
}).pipe(
|
|
89
|
+
Effect.provide(
|
|
90
|
+
ServiceResolver.provide({ space: options.db.spaceId }, Database.Service, Feed.FeedService).pipe(
|
|
91
|
+
Layer.provide(Capability.asLayer(Capabilities.ServiceResolver, ServiceResolver.ServiceResolver)),
|
|
92
|
+
),
|
|
93
|
+
),
|
|
94
|
+
),
|
|
95
|
+
}),
|
|
96
|
+
];
|
|
97
|
+
}),
|
|
98
|
+
);
|
|
@@ -3,31 +3,67 @@
|
|
|
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 { EdgeAiHttpClient, EdgeHttpClient } from '@dxos/edge-client';
|
|
14
|
+
import { invariant } from '@dxos/invariant';
|
|
15
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
// Named alias so the module's inferred type stays portable (avoids TS2883 leaking the internal
|
|
18
|
+
// `@dxos/ai/AiModelResolver` Layer type into the emitted declarations).
|
|
19
|
+
export type EdgeModelResolverCapabilities = Capability.Capability<typeof AppCapabilities.AiModelResolver>[];
|
|
15
20
|
|
|
16
|
-
const edgeModelResolver = Capability.makeModule<[], EdgeModelResolverCapabilities>(
|
|
17
|
-
Effect.
|
|
18
|
-
Capability.
|
|
21
|
+
const edgeModelResolver = Capability.makeModule<[], EdgeModelResolverCapabilities>(
|
|
22
|
+
Effect.fnUntraced(function* () {
|
|
23
|
+
const manager = yield* Capability.Service;
|
|
24
|
+
|
|
25
|
+
// The authenticated EDGE client is resolved lazily on the first AI request. AI providers are
|
|
26
|
+
// set up before the Client capability and user identity exist (the startup cascade activates
|
|
27
|
+
// this module before `ClientReady`), so requiring the Client here would throw — or deadlock
|
|
28
|
+
// if we blocked on it. `EdgeAiHttpClient` invokes this thunk per request, by which point the
|
|
29
|
+
// Client is available.
|
|
30
|
+
let edgeClient: EdgeHttpClient | undefined;
|
|
31
|
+
let identitySubscription: { unsubscribe: () => void } | undefined;
|
|
32
|
+
const getEdgeClient = (): EdgeHttpClient => {
|
|
33
|
+
if (!edgeClient) {
|
|
34
|
+
const [client] = manager.getAll(ClientCapabilities.Client);
|
|
35
|
+
invariant(client, 'Client capability is required for edge AI requests.');
|
|
36
|
+
const edgeUrl = client.config.values.runtime?.services?.edge?.url;
|
|
37
|
+
invariant(edgeUrl, 'EDGE services are not configured.');
|
|
38
|
+
const created = new EdgeHttpClient(edgeUrl);
|
|
39
|
+
const updateIdentity = () => {
|
|
40
|
+
if (client.halo.identity.get()) {
|
|
41
|
+
created.setIdentity(createEdgeIdentity(client));
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
updateIdentity();
|
|
45
|
+
identitySubscription = client.halo.identity.subscribe(updateIdentity);
|
|
46
|
+
edgeClient = created;
|
|
47
|
+
}
|
|
48
|
+
return edgeClient;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const contribution: Capability.Capability<typeof AppCapabilities.AiModelResolver> = Capability.contributes(
|
|
19
52
|
AppCapabilities.AiModelResolver,
|
|
20
53
|
AnthropicResolver.make().pipe(
|
|
21
54
|
Layer.provide(
|
|
22
55
|
AnthropicClient.layer({
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
|
|
56
|
+
// Host-only sentinel; `EdgeAiHttpClient` re-bases the request onto the EDGE
|
|
57
|
+
// `/ai/generate/anthropic` route and signs it with the verifiable presentation.
|
|
58
|
+
apiUrl: 'http://edge.internal',
|
|
59
|
+
}).pipe(Layer.provide(EdgeAiHttpClient.layer(getEdgeClient))),
|
|
26
60
|
),
|
|
27
|
-
Layer.provide(FetchHttpClient.layer),
|
|
28
61
|
),
|
|
29
|
-
|
|
30
|
-
|
|
62
|
+
() => Effect.sync(() => identitySubscription?.unsubscribe()),
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
return [contribution];
|
|
66
|
+
}),
|
|
31
67
|
);
|
|
32
68
|
|
|
33
69
|
export default edgeModelResolver;
|
|
@@ -3,15 +3,23 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capability } from '@dxos/app-framework';
|
|
6
|
-
|
|
6
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
7
|
+
import type { Blueprint, OperationHandlerSet } from '@dxos/compute';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
import type { AssistantPluginOptions } from '#types';
|
|
10
|
+
|
|
11
|
+
export const AiContext = Capability.lazy<void, Capability.Any[]>('AiContext', () => import('./ai-context'));
|
|
12
|
+
export const AiService = Capability.lazy<AssistantPluginOptions | void, Capability.Any[]>(
|
|
13
|
+
'AiService',
|
|
14
|
+
() => import('./ai-service'),
|
|
15
|
+
);
|
|
9
16
|
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
10
17
|
export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
|
|
11
18
|
export const CompanionChatProvisioner = Capability.lazy(
|
|
12
19
|
'CompanionChatProvisioner',
|
|
13
20
|
() => import('./companion-chat-provisioner'),
|
|
14
21
|
);
|
|
22
|
+
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
15
23
|
export const EdgeModelResolver = Capability.lazy('EdgeModelResolver', () => import('./edge-model-resolver'));
|
|
16
24
|
export const LocalModelResolver = Capability.lazy('LocalModelResolver', () => import('./local-model-resolver'));
|
|
17
25
|
export const MarkdownExtension = Capability.lazy('MarkdownExtension', () => import('./markdown'));
|
|
@@ -8,7 +8,7 @@ import { Capabilities, Capability } from '@dxos/app-framework';
|
|
|
8
8
|
import { Obj } from '@dxos/echo';
|
|
9
9
|
import { MarkdownCapabilities } from '@dxos/plugin-markdown';
|
|
10
10
|
|
|
11
|
-
import { AssistantOperation } from '#
|
|
11
|
+
import { AssistantOperation } from '#types';
|
|
12
12
|
|
|
13
13
|
import { promptRunExtension } from '../extensions';
|
|
14
14
|
|
|
@@ -5,27 +5,20 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import { Chat
|
|
9
|
-
import {
|
|
10
|
-
import { ClientCapabilities } from '@dxos/plugin-client
|
|
8
|
+
import { Chat } from '@dxos/assistant-toolkit';
|
|
9
|
+
import { Migration } from '@dxos/echo';
|
|
10
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
11
11
|
|
|
12
12
|
const identityTransform = async (from: any) => ({ ...from });
|
|
13
13
|
const noopCallback = async () => {};
|
|
14
14
|
|
|
15
15
|
const migrations = [
|
|
16
|
-
|
|
16
|
+
Migration.define({
|
|
17
17
|
from: Chat.LegacyCompanionTo,
|
|
18
18
|
to: Chat.CompanionTo,
|
|
19
19
|
transform: identityTransform,
|
|
20
20
|
onMigration: noopCallback,
|
|
21
21
|
}),
|
|
22
|
-
defineObjectMigration({
|
|
23
|
-
from: ResearchGraph.LegacyResearchGraph,
|
|
24
|
-
to: ResearchGraph.ResearchGraphV1,
|
|
25
|
-
transform: identityTransform,
|
|
26
|
-
onMigration: noopCallback,
|
|
27
|
-
}),
|
|
28
|
-
...ResearchGraph.migrations,
|
|
29
22
|
];
|
|
30
23
|
|
|
31
24
|
export default Capability.makeModule(
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
-
import type { OperationHandlerSet } from '@dxos/
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
9
9
|
|
|
10
10
|
import { AssistantOperationHandlerSet } from '#operations';
|
|
11
11
|
|
|
@@ -3,29 +3,31 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
-
import React, { type ComponentProps } from 'react';
|
|
6
|
+
import React, { type ComponentProps, useEffect } from 'react';
|
|
7
7
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { Surface, useSettingsState } from '@dxos/app-framework/ui';
|
|
10
10
|
import { AppSurface, useActiveSpace } from '@dxos/app-toolkit/ui';
|
|
11
|
-
import { Chat, Agent } from '@dxos/assistant-toolkit';
|
|
12
|
-
import { Blueprint, Prompt } from '@dxos/blueprints';
|
|
11
|
+
import { Chat, Agent, Plan } from '@dxos/assistant-toolkit';
|
|
13
12
|
import { getSpace } from '@dxos/client/echo';
|
|
13
|
+
import { Blueprint, Routine } from '@dxos/compute';
|
|
14
14
|
import { Sequence } from '@dxos/conductor';
|
|
15
15
|
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
16
16
|
import { Feed, Obj } from '@dxos/echo';
|
|
17
|
+
import { log } from '@dxos/log';
|
|
17
18
|
import { Panel } from '@dxos/react-ui';
|
|
18
19
|
|
|
19
20
|
import { AssistantSettings } from '#components';
|
|
20
21
|
import {
|
|
21
22
|
BlueprintArticle,
|
|
22
23
|
ChatCompanion,
|
|
23
|
-
|
|
24
|
+
ChatArticle,
|
|
24
25
|
ChatDialog,
|
|
25
26
|
AgentArticle,
|
|
26
27
|
AgentProperties,
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
PlanArticle,
|
|
29
|
+
RoutineArticle,
|
|
30
|
+
RoutineList,
|
|
29
31
|
TracePanel,
|
|
30
32
|
TriggerStatus,
|
|
31
33
|
} from '#containers';
|
|
@@ -36,7 +38,7 @@ export default Capability.makeModule(() =>
|
|
|
36
38
|
Effect.succeed(
|
|
37
39
|
Capability.contributes(Capabilities.ReactSurface, [
|
|
38
40
|
Surface.create({
|
|
39
|
-
id: '
|
|
41
|
+
id: 'pluginSettings',
|
|
40
42
|
filter: AppSurface.settings(AppSurface.Article, meta.id),
|
|
41
43
|
component: ({ data: { subject } }) => {
|
|
42
44
|
const { settings, updateSettings } = useSettingsState<Assistant.Settings>(subject.atom);
|
|
@@ -51,7 +53,7 @@ export default Capability.makeModule(() =>
|
|
|
51
53
|
Obj.instanceOf(Chat.Chat, data.subject) &&
|
|
52
54
|
data.variant !== ASSISTANT_COMPANION_VARIANT,
|
|
53
55
|
component: ({ data, role, ref }) => {
|
|
54
|
-
return <
|
|
56
|
+
return <ChatArticle role={role} subject={data.subject} attendableId={data.attendableId} ref={ref} />;
|
|
55
57
|
},
|
|
56
58
|
}),
|
|
57
59
|
Surface.create({
|
|
@@ -62,12 +64,12 @@ export default Capability.makeModule(() =>
|
|
|
62
64
|
),
|
|
63
65
|
}),
|
|
64
66
|
Surface.create({
|
|
65
|
-
id: '
|
|
67
|
+
id: 'agentProperties',
|
|
66
68
|
filter: AppSurface.object(AppSurface.ObjectProperties, Agent.Agent),
|
|
67
69
|
component: ({ data }) => <AgentProperties subject={data.subject} />,
|
|
68
70
|
}),
|
|
69
71
|
Surface.create({
|
|
70
|
-
id: '
|
|
72
|
+
id: 'companionChat',
|
|
71
73
|
role: 'article',
|
|
72
74
|
filter: (data): data is { subject: Chat.Chat | null; attendableId: string; companionTo: Obj.Unknown } =>
|
|
73
75
|
typeof data.attendableId === 'string' &&
|
|
@@ -84,22 +86,22 @@ export default Capability.makeModule(() =>
|
|
|
84
86
|
),
|
|
85
87
|
}),
|
|
86
88
|
Surface.create({
|
|
87
|
-
id: '
|
|
89
|
+
id: 'companionInvocations',
|
|
88
90
|
role: 'article',
|
|
89
|
-
filter: (data): data is { companionTo: Sequence } =>
|
|
90
|
-
(Obj.instanceOf(Sequence, data.companionTo) || Obj.instanceOf(
|
|
91
|
+
filter: (data): data is { companionTo: Sequence.Sequence } =>
|
|
92
|
+
(Obj.instanceOf(Sequence.Sequence, data.companionTo) || Obj.instanceOf(Routine.Routine, data.companionTo)) &&
|
|
91
93
|
data.subject === 'invocations',
|
|
92
94
|
component: ({ data, role }) => {
|
|
93
95
|
const space = getSpace(data.companionTo);
|
|
94
96
|
const feed = space?.properties.invocationTraceFeed?.target;
|
|
95
|
-
const
|
|
97
|
+
const feedDXN = feed ? Feed.getQueueUri(feed) : undefined;
|
|
96
98
|
// TODO(wittjosiah): Support invocation filtering for prompts.
|
|
97
|
-
const target = Obj.instanceOf(
|
|
99
|
+
const target = Obj.instanceOf(Routine.Routine, data.companionTo) ? undefined : data.companionTo;
|
|
98
100
|
|
|
99
101
|
return (
|
|
100
102
|
<Panel.Root role={role} className='dx-document'>
|
|
101
103
|
<Panel.Content asChild>
|
|
102
|
-
<InvocationTraceContainer db={space?.db}
|
|
104
|
+
<InvocationTraceContainer db={space?.db} feedDXN={feedDXN} target={target} detailAxis='block' />
|
|
103
105
|
</Panel.Content>
|
|
104
106
|
</Panel.Root>
|
|
105
107
|
);
|
|
@@ -114,9 +116,16 @@ export default Capability.makeModule(() =>
|
|
|
114
116
|
}),
|
|
115
117
|
Surface.create({
|
|
116
118
|
id: 'prompt',
|
|
117
|
-
filter: AppSurface.object(AppSurface.Article,
|
|
119
|
+
filter: AppSurface.object(AppSurface.Article, Routine.Routine),
|
|
118
120
|
component: ({ data, role }) => (
|
|
119
|
-
<
|
|
121
|
+
<RoutineArticle role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
122
|
+
),
|
|
123
|
+
}),
|
|
124
|
+
Surface.create({
|
|
125
|
+
id: 'plan',
|
|
126
|
+
filter: AppSurface.object(AppSurface.Article, Plan.Plan),
|
|
127
|
+
component: ({ data, role }) => (
|
|
128
|
+
<PlanArticle role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
120
129
|
),
|
|
121
130
|
}),
|
|
122
131
|
Surface.create({
|
|
@@ -129,6 +138,10 @@ export default Capability.makeModule(() =>
|
|
|
129
138
|
filter: AppSurface.literal(Surface.makeType<{ subject: string }>('deck-companion--trace'), 'trace'),
|
|
130
139
|
component: () => {
|
|
131
140
|
const space = useActiveSpace();
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
log('trace panel surface', { hasSpace: Boolean(space), spaceId: space?.id });
|
|
143
|
+
}, [space?.id]);
|
|
144
|
+
|
|
132
145
|
if (!space) {
|
|
133
146
|
return null;
|
|
134
147
|
}
|
|
@@ -137,7 +150,7 @@ export default Capability.makeModule(() =>
|
|
|
137
150
|
},
|
|
138
151
|
}),
|
|
139
152
|
Surface.create({
|
|
140
|
-
id: '
|
|
153
|
+
id: 'triggerStatus',
|
|
141
154
|
role: 'status-indicator',
|
|
142
155
|
component: () => {
|
|
143
156
|
const space = useActiveSpace();
|
|
@@ -154,7 +167,7 @@ export default Capability.makeModule(() =>
|
|
|
154
167
|
Surface.makeType<{ subject: Obj.Any; attendableId: string }>('prompts'),
|
|
155
168
|
Obj.isObject,
|
|
156
169
|
),
|
|
157
|
-
component: ({ data }) => <
|
|
170
|
+
component: ({ data }) => <RoutineList subject={data.subject} />,
|
|
158
171
|
}),
|
|
159
172
|
]),
|
|
160
173
|
),
|