@dxos/plugin-assistant 0.8.4-main.fd6878d → 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/neutral/blueprints/index.mjs +8 -0
- package/dist/lib/neutral/capabilities/index.mjs +45 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-5H6UJHLF.mjs +30 -0
- 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/neutral/ensure-companion-chat-AMOF3C66.mjs +58 -0
- 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/index.mjs.map +7 -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/meta.mjs.map +7 -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/neutral/resolve-navigation-targets-ZHIMMH7L.mjs +22 -0
- package/dist/lib/neutral/resolve-navigation-targets-ZHIMMH7L.mjs.map +7 -0
- package/dist/lib/neutral/run-prompt-in-new-chat-D5IIE2C7.mjs +102 -0
- package/dist/lib/neutral/run-prompt-in-new-chat-D5IIE2C7.mjs.map +7 -0
- package/dist/lib/neutral/set-current-chat-VWBPSIMZ.mjs +48 -0
- 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/neutral/update-chat-name-Y7JWIP64.mjs +61 -0
- package/dist/lib/neutral/update-chat-name-Y7JWIP64.mjs.map +7 -0
- package/dist/types/src/AssistantPlugin.d.ts +4 -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 +4 -0
- package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -0
- 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/blueprints/assistant/index.d.ts +2 -0
- package/dist/types/src/blueprints/assistant/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/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 +4 -3
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +5 -2
- 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 +4 -2
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +9 -0
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -0
- package/dist/types/src/capabilities/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 +6 -4
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +62 -9
- 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 +16 -0
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/markdown-extension.d.ts +5 -0
- package/dist/types/src/capabilities/markdown-extension.d.ts.map +1 -0
- package/dist/types/src/capabilities/migrations.d.ts +6 -0
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +4 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +21 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit.d.ts +4 -3
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
- package/dist/types/src/components/AgentProperties/AgentProperties.d.ts +7 -0
- package/dist/types/src/components/AgentProperties/AgentProperties.d.ts.map +1 -0
- package/dist/types/src/components/AgentProperties/AgentProperties.stories.d.ts +15 -0
- 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 +4 -4
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts +15 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/index.d.ts +1 -1
- package/dist/types/src/components/AssistantSettings/index.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +52 -31
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/context.d.ts +29 -0
- package/dist/types/src/components/Chat/context.d.ts.map +1 -0
- package/dist/types/src/components/Chat/events.d.ts +13 -1
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +3 -2
- 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 +13 -8
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +19 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts +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 +5 -6
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts +20 -0
- package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +6 -4
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +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 +16 -11
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +24 -215
- 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 +42 -0
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/registry.d.ts +29 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.d.ts +69 -0
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts +2 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/tool-widget-state.d.ts +18 -0
- package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts +2 -0
- package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts +8 -0
- package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts +25 -0
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts +18 -0
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts +9 -0
- package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts +14 -0
- package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts +12 -0
- package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts +12 -0
- package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts +11 -0
- package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts +5 -0
- package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts +9 -0
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts +15 -0
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/defaults.d.ts +5 -0
- package/dist/types/src/components/ChatThread/widgets/defaults.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts +10 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +11 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +7 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/index.d.ts +2 -0
- package/dist/types/src/components/ProcessTree/index.d.ts.map +1 -0
- package/dist/types/src/components/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 +10 -11
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +13 -7
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +13 -4
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +10 -2
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts +12 -0
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts +3 -0
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts +8 -0
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +12 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts +2 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/index.d.ts +3 -0
- package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +15 -16
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +15 -5
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +7 -9
- 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 +6 -0
- package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -0
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts +19 -0
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/AgentArticle/index.d.ts +2 -0
- package/dist/types/src/containers/AgentArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts +6 -0
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -0
- package/dist/types/src/containers/AgentProperties/index.d.ts +2 -0
- package/dist/types/src/containers/AgentProperties/index.d.ts.map +1 -0
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +6 -0
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -0
- package/dist/types/src/containers/BlueprintArticle/index.d.ts +2 -0
- package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/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 +26 -0
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/ChatCompanion/index.d.ts +2 -0
- package/dist/types/src/containers/ChatCompanion/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ChatDialog}/ChatDialog.d.ts +2 -3
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -0
- package/dist/types/src/containers/ChatDialog/index.d.ts +2 -0
- package/dist/types/src/containers/ChatDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/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/RoutineList/RoutineList.stories.d.ts +21 -0
- package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineList/index.d.ts +2 -0
- package/dist/types/src/containers/RoutineList/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts +8 -0
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts +16 -0
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +19 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts +2 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/index.d.ts +4 -0
- package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/testing/index.d.ts +3 -0
- package/dist/types/src/containers/TracePanel/testing/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts +14 -0
- package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts +12 -0
- package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +5 -0
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerStatus/index.d.ts +2 -0
- package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +13 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- 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/index.d.ts +2 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -0
- package/dist/types/src/extensions/prompt-extension.d.ts +10 -0
- package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -0
- package/dist/types/src/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 +8 -4
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +59 -14
- 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 +9 -12
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +9 -8
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts +8 -0
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextBinder.d.ts +5 -0
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextObjects.d.ts +16 -0
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -0
- package/dist/types/src/hooks/useDebug.d.ts +10 -0
- package/dist/types/src/hooks/useDebug.d.ts.map +1 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts +3 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -0
- package/dist/types/src/{stories/hooks → hooks}/useFlush.d.ts +1 -1
- package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
- package/dist/types/src/hooks/usePresets.d.ts +3 -3
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +6 -4
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-chat.d.ts +5 -0
- package/dist/types/src/operations/create-chat.d.ts.map +1 -0
- package/dist/types/src/operations/ensure-companion-chat.d.ts +5 -0
- package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -0
- package/dist/types/src/operations/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 +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- 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 +17 -0
- package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -0
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +5 -0
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -0
- package/dist/types/src/operations/set-current-chat.d.ts +5 -0
- package/dist/types/src/operations/set-current-chat.d.ts.map +1 -0
- package/dist/types/src/operations/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 +5 -0
- package/dist/types/src/operations/update-chat-name.d.ts.map +1 -0
- 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/index.d.ts +3 -0
- package/dist/types/src/processor/index.d.ts.map +1 -0
- package/dist/types/src/{hooks → processor}/presets.d.ts +2 -2
- package/dist/types/src/processor/presets.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +317 -0
- package/dist/types/src/processor/processor.d.ts.map +1 -0
- 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 +3 -1
- 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 +7 -0
- package/dist/types/src/testing/test-generator.d.ts.map +1 -0
- package/dist/types/src/testing/test-generator.test.d.ts +2 -0
- package/dist/types/src/testing/test-generator.test.d.ts.map +1 -0
- package/dist/types/src/testing/test-sequence.d.ts +10 -7
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/testing/test-services.d.ts +2 -2
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/testing/test-trace.d.ts +5 -0
- package/dist/types/src/testing/test-trace.d.ts.map +1 -0
- package/dist/types/src/testing/trace-timeline.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 +2 -76
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +34 -37
- 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 +27 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +9 -2
- 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 +13 -213
- 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 +198 -119
- 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.node.test.ts +46 -0
- package/src/blueprints/assistant/blueprint.ts +31 -0
- package/src/blueprints/assistant/index.ts +5 -0
- package/src/{components/Timeline → blueprints}/index.ts +1 -1
- package/src/capabilities/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 +46 -24
- package/src/capabilities/app-graph-builder.ts +222 -154
- package/src/capabilities/automation-templates.ts +16 -0
- package/src/capabilities/blueprint-definition.ts +58 -25
- package/src/capabilities/companion-chat-provisioner.ts +164 -0
- package/src/capabilities/create-object.ts +100 -0
- package/src/capabilities/edge-model-resolver.ts +66 -25
- package/src/capabilities/index.ts +40 -10
- package/src/capabilities/integration-provider.ts +86 -0
- package/src/capabilities/local-model-resolver.ts +48 -0
- package/src/capabilities/markdown-extension.ts +40 -0
- package/src/capabilities/migrations.ts +28 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +158 -129
- package/src/capabilities/settings.ts +24 -12
- package/src/capabilities/state.ts +35 -0
- package/src/capabilities/toolkit.ts +7 -100
- 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 +35 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +29 -91
- package/src/components/AssistantSettings/index.ts +2 -2
- package/src/components/Chat/Chat.tsx +238 -297
- package/src/components/Chat/context.ts +39 -0
- package/src/components/Chat/events.ts +21 -1
- package/src/components/ChatPrompt/ChatActions.tsx +36 -32
- package/src/components/ChatPrompt/ChatMcpErrors.tsx +50 -0
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +136 -0
- package/src/components/ChatPrompt/ChatOptions.tsx +405 -42
- package/src/components/ChatPrompt/ChatPresets.tsx +4 -7
- package/src/components/ChatPrompt/ChatPrompt.tsx +180 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +38 -40
- package/src/components/ChatPrompt/ChatStatus.tsx +123 -0
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +25 -22
- package/src/components/ChatPrompt/index.ts +3 -0
- package/src/components/ChatThread/Anchor.stories.tsx +95 -0
- package/src/components/ChatThread/ChatThread.stories.tsx +98 -219
- package/src/components/ChatThread/ChatThread.tsx +101 -36
- package/src/components/ChatThread/DEBUG.md +41 -0
- package/src/components/ChatThread/Link.tsx +10 -23
- package/src/components/ChatThread/MarkdownStream.stories.tsx +281 -0
- package/src/components/ChatThread/registry.tsx +290 -0
- package/src/components/ChatThread/sync.test.ts +257 -0
- package/src/components/ChatThread/sync.ts +150 -0
- package/src/components/ChatThread/testing/reasoning.md +25 -0
- package/src/components/ChatThread/testing/thinking.md +21 -0
- package/src/components/ChatThread/testing/thread-1.md +30 -0
- package/src/components/ChatThread/testing/thread-2.md +56 -0
- package/src/components/ChatThread/testing/thread-widgets.md +79 -0
- package/src/components/ChatThread/tool-widget-state.test.ts +34 -0
- package/src/components/ChatThread/tool-widget-state.ts +48 -0
- package/src/components/ChatThread/widgets/FallbackWidget.tsx +28 -0
- package/src/components/ChatThread/widgets/ReasoningWidget.stories.tsx +68 -0
- package/src/components/ChatThread/widgets/ReasoningWidget.ts +139 -0
- package/src/components/ChatThread/widgets/ReferenceWidget.ts +33 -0
- package/src/components/ChatThread/widgets/SelectWidget.ts +39 -0
- package/src/components/ChatThread/widgets/StatsWidget.ts +31 -0
- package/src/components/ChatThread/widgets/StatusWidget.ts +53 -0
- package/src/components/ChatThread/widgets/SuggestionWidget.ts +41 -0
- package/src/components/ChatThread/widgets/SummaryWidget.tsx +29 -0
- package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +55 -0
- package/src/components/ChatThread/widgets/ToolWidget.tsx +173 -0
- package/src/components/ChatThread/widgets/defaults.ts +8 -0
- package/src/components/ChatThread/widgets/index.ts +13 -0
- package/src/components/ProcessTree/ProcessTree.stories.tsx +83 -0
- package/src/components/ProcessTree/ProcessTree.tsx +120 -0
- package/src/components/ProcessTree/index.ts +5 -0
- 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 +30 -20
- package/src/components/TemplateEditor/TemplateEditor.tsx +60 -72
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +25 -21
- package/src/components/TemplateEditor/TemplateForm.tsx +113 -87
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +274 -0
- package/src/components/TemplateEditor/extensions/index.ts +6 -0
- package/src/components/TemplateEditor/extensions/xml-extension.ts +64 -0
- package/src/components/ToolBlock/ToolBlock.tsx +152 -0
- package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
- package/src/components/ToolBlock/index.ts +6 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +22 -27
- package/src/components/Toolbox/Toolbox.tsx +82 -82
- package/src/components/index.ts +9 -8
- package/src/constants.ts +9 -0
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +124 -0
- package/src/containers/AgentArticle/AgentArticle.tsx +192 -0
- package/src/containers/AgentArticle/index.ts +5 -0
- package/src/containers/AgentProperties/AgentProperties.tsx +43 -0
- package/src/containers/AgentProperties/index.ts +5 -0
- package/src/containers/BlueprintArticle/BlueprintArticle.tsx +29 -0
- package/src/containers/BlueprintArticle/index.ts +5 -0
- package/src/containers/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 +127 -0
- package/src/containers/ChatCompanion/index.ts +5 -0
- package/src/containers/ChatDialog/ChatDialog.tsx +67 -0
- package/src/containers/ChatDialog/index.ts +5 -0
- 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/RoutineList/RoutineList.stories.tsx +130 -0
- package/src/containers/RoutineList/RoutineList.tsx +50 -0
- package/src/containers/RoutineList/index.ts +5 -0
- package/src/containers/TracePanel/TracePanel.stories.tsx +347 -0
- package/src/containers/TracePanel/TracePanel.tsx +257 -0
- package/src/containers/TracePanel/dxn-extractor.test.ts +153 -0
- package/src/containers/TracePanel/dxn-extractor.ts +166 -0
- package/src/containers/TracePanel/index.ts +9 -0
- package/src/containers/TracePanel/testing/index.ts +6 -0
- package/src/containers/TracePanel/testing/simulated-agent.ts +114 -0
- package/src/containers/TracePanel/testing/snapshot-playback.ts +45 -0
- package/src/containers/TriggerStatus/TriggerStatus.tsx +130 -0
- package/src/containers/TriggerStatus/index.ts +5 -0
- package/src/containers/index.ts +17 -0
- 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/extensions/index.ts +5 -0
- package/src/extensions/prompt-extension.ts +111 -0
- package/src/feed-logger.ts +149 -0
- package/src/functions/services.test.ts +53 -0
- package/src/hooks/index.ts +10 -5
- package/src/hooks/useBlueprintRegistry.ts +90 -44
- package/src/hooks/useChatKeymap.ts +52 -0
- package/src/hooks/useChatProcessor.ts +65 -40
- package/src/hooks/useChatServices.ts +16 -60
- package/src/hooks/useChatToolbarActions.ts +124 -0
- package/src/hooks/useContextBinder.ts +43 -0
- package/src/hooks/useContextObjects.ts +51 -0
- package/src/hooks/useDebug.ts +38 -0
- package/src/hooks/useFilteredTypes.ts +39 -0
- package/src/hooks/usePresets.ts +7 -5
- package/src/hooks/useReferencesProvider.ts +11 -22
- package/src/index.ts +2 -5
- package/src/meta.ts +35 -10
- package/src/operations/create-chat.ts +57 -0
- package/src/operations/ensure-companion-chat.ts +63 -0
- package/src/operations/fork-chat.ts +112 -0
- package/src/operations/index.ts +16 -0
- package/src/operations/prompt.node.test.ts +82 -0
- package/src/operations/resolve-navigation-targets.ts +31 -0
- package/src/operations/run-prompt-in-new-chat.ts +113 -0
- package/src/operations/set-current-chat.ts +49 -0
- package/src/operations/toggle-trace-panel-debug.ts +27 -0
- package/src/operations/update-chat-name.ts +65 -0
- package/src/paths.ts +10 -0
- package/src/plugin.ts +11 -0
- package/src/processor/index.ts +6 -0
- package/src/processor/presets.ts +72 -0
- package/src/processor/processor.node.test.ts +40 -0
- package/src/processor/processor.ts +423 -0
- 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 +3 -1
- package/src/testing/snapshot.ts +35 -0
- package/src/testing/test-generator.test.ts +71 -0
- package/src/testing/test-generator.ts +284 -0
- package/src/testing/test-sequence.ts +7 -32
- package/src/testing/test-services.ts +10 -14
- package/src/testing/test-trace.ts +20 -0
- package/src/testing/trace-timeline.node.conversations.json +1 -0
- package/src/testing/trace-timeline.node.test.ts +241 -0
- package/src/testing.ts +9 -0
- package/src/translations.ts +167 -70
- package/src/types/Assistant.ts +17 -50
- package/src/types/AssistantCapabilities.ts +35 -0
- package/src/types/AssistantEvents.ts +11 -0
- package/src/types/AssistantOperation.ts +164 -0
- package/src/types/Settings.ts +82 -0
- package/src/types/index.ts +15 -2
- package/src/types/preset.ts +16 -0
- package/src/types/service.ts +22 -16
- package/src/util/suggestions.test.ts +52 -0
- package/src/util/suggestions.ts +42 -0
- package/src/vite-env.d.ts +35 -0
- package/dist/lib/browser/BlueprintContainer-H7H4BQ2C.mjs +0 -29
- package/dist/lib/browser/BlueprintContainer-H7H4BQ2C.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-OUVSX5V5.mjs +0 -76
- package/dist/lib/browser/ChatContainer-OUVSX5V5.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-P4FLEOHG.mjs +0 -86
- package/dist/lib/browser/ChatDialog-P4FLEOHG.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-627OQ557.mjs +0 -163
- package/dist/lib/browser/SequenceContainer-627OQ557.mjs.map +0 -7
- package/dist/lib/browser/ai-service-7KJ5LXBT.mjs +0 -22
- package/dist/lib/browser/ai-service-7KJ5LXBT.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-AVHHQ3KV.mjs +0 -166
- package/dist/lib/browser/app-graph-builder-AVHHQ3KV.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-CMGIZAOW.mjs +0 -146
- package/dist/lib/browser/blueprint-definition-CMGIZAOW.mjs.map +0 -7
- package/dist/lib/browser/chunk-BRLHDHOF.mjs +0 -244
- package/dist/lib/browser/chunk-BRLHDHOF.mjs.map +0 -7
- package/dist/lib/browser/chunk-HRLMD35M.mjs +0 -191
- package/dist/lib/browser/chunk-HRLMD35M.mjs.map +0 -7
- package/dist/lib/browser/chunk-LKP65RPA.mjs +0 -20
- package/dist/lib/browser/chunk-LKP65RPA.mjs.map +0 -7
- package/dist/lib/browser/chunk-NZDCKQ6W.mjs +0 -89
- package/dist/lib/browser/chunk-NZDCKQ6W.mjs.map +0 -7
- package/dist/lib/browser/chunk-QB7OVS6Z.mjs +0 -16
- package/dist/lib/browser/chunk-QB7OVS6Z.mjs.map +0 -7
- package/dist/lib/browser/chunk-VEBVAHNM.mjs +0 -2231
- package/dist/lib/browser/chunk-VEBVAHNM.mjs.map +0 -7
- package/dist/lib/browser/edge-model-resolver-2HB4PCWH.mjs +0 -24
- package/dist/lib/browser/edge-model-resolver-2HB4PCWH.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -293
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-MVOIEJXZ.mjs +0 -81
- package/dist/lib/browser/intent-resolver-MVOIEJXZ.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-4HXS3YLT.mjs +0 -163
- package/dist/lib/browser/react-surface-4HXS3YLT.mjs.map +0 -7
- package/dist/lib/browser/settings-G2EZXMWT.mjs +0 -23
- package/dist/lib/browser/settings-G2EZXMWT.mjs.map +0 -7
- package/dist/lib/browser/toolkit-IW4FBLLB.mjs +0 -105
- package/dist/lib/browser/toolkit-IW4FBLLB.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -19
- package/dist/lib/node-esm/BlueprintContainer-VH4EE4CM.mjs +0 -30
- package/dist/lib/node-esm/BlueprintContainer-VH4EE4CM.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-D5FABDNE.mjs +0 -77
- package/dist/lib/node-esm/ChatContainer-D5FABDNE.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-NKWVXHJP.mjs +0 -87
- package/dist/lib/node-esm/ChatDialog-NKWVXHJP.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-EQ5NP2PG.mjs +0 -164
- package/dist/lib/node-esm/SequenceContainer-EQ5NP2PG.mjs.map +0 -7
- package/dist/lib/node-esm/ai-service-LDD32477.mjs +0 -23
- package/dist/lib/node-esm/ai-service-LDD32477.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-RMOUJMMG.mjs +0 -167
- package/dist/lib/node-esm/app-graph-builder-RMOUJMMG.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-AEWYMW6I.mjs +0 -147
- package/dist/lib/node-esm/blueprint-definition-AEWYMW6I.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3SOC5GOP.mjs +0 -2232
- package/dist/lib/node-esm/chunk-3SOC5GOP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-F7RXCX5Y.mjs +0 -192
- package/dist/lib/node-esm/chunk-F7RXCX5Y.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GAWXJ7K5.mjs +0 -90
- package/dist/lib/node-esm/chunk-GAWXJ7K5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-KOC6ESG7.mjs +0 -22
- package/dist/lib/node-esm/chunk-KOC6ESG7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RD755HN3.mjs +0 -245
- package/dist/lib/node-esm/chunk-RD755HN3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-X6AANUHZ.mjs +0 -17
- package/dist/lib/node-esm/chunk-X6AANUHZ.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-UDDR2IA6.mjs +0 -25
- package/dist/lib/node-esm/edge-model-resolver-UDDR2IA6.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -294
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-DTDNCX3C.mjs +0 -82
- package/dist/lib/node-esm/intent-resolver-DTDNCX3C.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-V6JNEZVO.mjs +0 -164
- package/dist/lib/node-esm/react-surface-V6JNEZVO.mjs.map +0 -7
- package/dist/lib/node-esm/settings-AIP5FOJG.mjs +0 -24
- package/dist/lib/node-esm/settings-AIP5FOJG.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-2VNUL77B.mjs +0 -106
- package/dist/lib/node-esm/toolkit-2VNUL77B.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -20
- package/dist/types/src/capabilities/capabilities.d.ts +0 -11
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintContainer.d.ts +0 -8
- package/dist/types/src/components/BlueprintContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer.d.ts +0 -12
- package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChatDialog.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -18
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts +0 -19
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/reducer.d.ts +0 -12
- package/dist/types/src/components/ChatThread/reducer.d.ts.map +0 -1
- package/dist/types/src/components/PromptSettings.d.ts +0 -6
- package/dist/types/src/components/PromptSettings.d.ts.map +0 -1
- package/dist/types/src/components/SequenceContainer.d.ts +0 -8
- package/dist/types/src/components/SequenceContainer.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +0 -13
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +0 -8
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/index.d.ts +0 -2
- package/dist/types/src/components/SequenceEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/Timeline/Timeline.d.ts +0 -24
- package/dist/types/src/components/Timeline/Timeline.d.ts.map +0 -1
- package/dist/types/src/components/Timeline/Timeline.stories.d.ts +0 -9
- package/dist/types/src/components/Timeline/Timeline.stories.d.ts.map +0 -1
- package/dist/types/src/components/Timeline/index.d.ts +0 -2
- package/dist/types/src/components/Timeline/index.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/functions/analysis.d.ts +0 -5
- package/dist/types/src/functions/analysis.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -4
- package/dist/types/src/functions/index.d.ts.map +0 -1
- package/dist/types/src/functions/list.d.ts +0 -10
- package/dist/types/src/functions/list.d.ts.map +0 -1
- package/dist/types/src/functions/load.d.ts +0 -8
- package/dist/types/src/functions/load.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.d.ts +0 -72
- package/dist/types/src/hooks/chat-processor.d.ts.map +0 -1
- package/dist/types/src/hooks/errors.d.ts +0 -4
- package/dist/types/src/hooks/errors.d.ts.map +0 -1
- package/dist/types/src/hooks/presets.d.ts.map +0 -1
- package/dist/types/src/hooks/useResolveRef.d.ts +0 -4
- package/dist/types/src/hooks/useResolveRef.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.d.ts +0 -4
- package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
- package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
- package/dist/types/src/parser/index.d.ts +0 -4
- package/dist/types/src/parser/index.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.d.ts +0 -15
- package/dist/types/src/parser/query-parser.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.test.d.ts +0 -2
- package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
- package/dist/types/src/parser/types.d.ts +0 -24
- package/dist/types/src/parser/types.d.ts.map +0 -1
- package/dist/types/src/queue-logger.d.ts +0 -11
- package/dist/types/src/queue-logger.d.ts.map +0 -1
- package/dist/types/src/stories/Chat.stories.d.ts +0 -268
- package/dist/types/src/stories/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +0 -5
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/ChatContainer.d.ts +0 -5
- package/dist/types/src/stories/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/GraphContainer.d.ts +0 -6
- package/dist/types/src/stories/components/GraphContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/LoggingContainer.d.ts +0 -5
- package/dist/types/src/stories/components/LoggingContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/SurfaceContainer.d.ts +0 -8
- package/dist/types/src/stories/components/SurfaceContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/TasksContainer.d.ts +0 -5
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/index.d.ts +0 -8
- package/dist/types/src/stories/components/index.d.ts.map +0 -1
- package/dist/types/src/stories/components/types.d.ts +0 -7
- package/dist/types/src/stories/components/types.d.ts.map +0 -1
- package/dist/types/src/stories/hooks/index.d.ts +0 -3
- package/dist/types/src/stories/hooks/index.d.ts.map +0 -1
- package/dist/types/src/stories/hooks/useFlush.d.ts.map +0 -1
- package/dist/types/src/stories/hooks/useMatcherExtension.d.ts +0 -3
- package/dist/types/src/stories/hooks/useMatcherExtension.d.ts.map +0 -1
- package/dist/types/src/stories/testing/data.d.ts +0 -142
- package/dist/types/src/stories/testing/data.d.ts.map +0 -1
- package/dist/types/src/stories/testing/index.d.ts +0 -3
- package/dist/types/src/stories/testing/index.d.ts.map +0 -1
- package/dist/types/src/stories/testing/testing.d.ts +0 -26
- package/dist/types/src/stories/testing/testing.d.ts.map +0 -1
- package/dist/types/src/testing/test-functions.d.ts +0 -6
- package/dist/types/src/testing/test-functions.d.ts.map +0 -1
- package/dist/types/src/tools/function.d.ts +0 -5
- package/dist/types/src/tools/function.d.ts.map +0 -1
- package/dist/types/src/tools/index.d.ts +0 -3
- package/dist/types/src/tools/index.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.d.ts +0 -10
- package/dist/types/src/tools/openapi.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.test.d.ts +0 -2
- package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
- package/dist/types/src/types/AssistantAction.d.ts +0 -90
- package/dist/types/src/types/AssistantAction.d.ts.map +0 -1
- package/dist/types/src/types/defs.d.ts +0 -2
- package/dist/types/src/types/defs.d.ts.map +0 -1
- package/src/AssistantPlugin.tsx +0 -145
- package/src/capabilities/capabilities.ts +0 -22
- package/src/capabilities/intent-resolver.ts +0 -73
- package/src/components/BlueprintContainer.tsx +0 -24
- package/src/components/ChatContainer.tsx +0 -69
- package/src/components/ChatDialog.tsx +0 -68
- package/src/components/ChatThread/ChatMessage.tsx +0 -282
- package/src/components/ChatThread/ToolBlock.tsx +0 -125
- package/src/components/ChatThread/reducer.ts +0 -52
- package/src/components/PromptSettings.tsx +0 -89
- package/src/components/SequenceContainer.tsx +0 -133
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +0 -33
- package/src/components/SequenceEditor/SequenceEditor.tsx +0 -50
- package/src/components/SequenceEditor/index.ts +0 -5
- package/src/components/Timeline/Timeline.stories.tsx +0 -53
- package/src/components/Timeline/Timeline.tsx +0 -159
- package/src/events.ts +0 -11
- package/src/functions/analysis.ts +0 -20
- package/src/functions/index.ts +0 -7
- package/src/functions/list.ts +0 -42
- package/src/functions/load.ts +0 -43
- package/src/hooks/chat-processor.ts +0 -260
- package/src/hooks/errors.ts +0 -8
- package/src/hooks/presets.ts +0 -53
- package/src/hooks/useResolveRef.ts +0 -33
- package/src/parser/filter-generator.test.ts +0 -32
- package/src/parser/filter-generator.ts +0 -74
- package/src/parser/index.ts +0 -7
- package/src/parser/query-parser.test.ts +0 -139
- package/src/parser/query-parser.ts +0 -199
- package/src/parser/types.ts +0 -34
- package/src/queue-logger.ts +0 -125
- package/src/shims.d.ts +0 -8
- package/src/stories/Chat.stories.tsx +0 -317
- package/src/stories/components/BlueprintContainer.tsx +0 -34
- package/src/stories/components/ChatContainer.tsx +0 -80
- package/src/stories/components/GraphContainer.tsx +0 -118
- package/src/stories/components/LoggingContainer.tsx +0 -22
- package/src/stories/components/SurfaceContainer.tsx +0 -62
- package/src/stories/components/TasksContainer.tsx +0 -51
- package/src/stories/components/index.ts +0 -12
- package/src/stories/components/types.ts +0 -11
- package/src/stories/hooks/index.ts +0 -6
- package/src/stories/hooks/useMatcherExtension.ts +0 -45
- package/src/stories/testing/data.ts +0 -130
- package/src/stories/testing/index.ts +0 -6
- package/src/stories/testing/testing.tsx +0 -162
- package/src/testing/test-functions.ts +0 -16
- package/src/tools/function.ts +0 -49
- package/src/tools/index.ts +0 -6
- package/src/tools/openapi.test.ts +0 -219
- package/src/tools/openapi.ts +0 -341
- package/src/types/AssistantAction.ts +0 -54
- package/src/types/defs.ts +0 -5
- package/src/typings.d.ts +0 -9
- /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/AssistantPlugin.mjs.map} +0 -0
- /package/dist/lib/{browser/types/index.mjs.map → neutral/ChatArticle-VNVZCDUR.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/blueprints}/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/src/{stories/hooks → hooks}/useFlush.ts +0 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Registry } from '@effect-atom/atom-react';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Option from 'effect/Option';
|
|
8
|
+
|
|
9
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
10
|
+
import { Graph, type Node } from '@dxos/app-graph';
|
|
11
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
12
|
+
import { Chat } from '@dxos/assistant-toolkit';
|
|
13
|
+
import { Obj } from '@dxos/echo';
|
|
14
|
+
import { log } from '@dxos/log';
|
|
15
|
+
import { DeckCapabilities, PLANK_COMPANION_TYPE, type StoredDeckState } from '@dxos/plugin-deck';
|
|
16
|
+
import { getLinkedVariant } from '@dxos/react-ui-attention';
|
|
17
|
+
import { byPosition } from '@dxos/util';
|
|
18
|
+
|
|
19
|
+
import { ASSISTANT_COMPANION_VARIANT } from '#meta';
|
|
20
|
+
import { AssistantCapabilities, AssistantOperation } from '#types';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Non-React capability that watches deck companion state and provisions transient chats
|
|
24
|
+
* for active planks when the assistant companion is selected.
|
|
25
|
+
*/
|
|
26
|
+
export default Capability.makeModule(
|
|
27
|
+
Effect.fnUntraced(function* () {
|
|
28
|
+
const operationInvoker = yield* Capability.get(Capabilities.OperationInvoker);
|
|
29
|
+
const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
|
|
30
|
+
const registry: Registry.Registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
31
|
+
const deckStateAtom = yield* Capability.get(DeckCapabilities.State);
|
|
32
|
+
const cacheAtom = yield* Capability.get(AssistantCapabilities.CompanionChatCache);
|
|
33
|
+
const stateAtom = yield* Capability.get(AssistantCapabilities.State);
|
|
34
|
+
|
|
35
|
+
const plankSubs = new Map<string, () => void>();
|
|
36
|
+
|
|
37
|
+
/** Unsubscribe a single plank and remove it from the map. */
|
|
38
|
+
const unsubPlank = (plankId: string) => {
|
|
39
|
+
plankSubs.get(plankId)?.();
|
|
40
|
+
plankSubs.delete(plankId);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** Unsubscribe all per-plank subscriptions. */
|
|
44
|
+
const unsubAllPlanks = () => {
|
|
45
|
+
for (const unsub of plankSubs.values()) {
|
|
46
|
+
unsub();
|
|
47
|
+
}
|
|
48
|
+
plankSubs.clear();
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Attempt to provision for a single plank.
|
|
53
|
+
* Returns true when the plank is resolved (provisioned or already cached)
|
|
54
|
+
* so the caller can tear down the connection subscription.
|
|
55
|
+
*/
|
|
56
|
+
const provisionForPlank = (plankId: string, companionVariant: string | undefined): boolean => {
|
|
57
|
+
const node: Node.Node | null = Graph.getNode(graph, plankId).pipe(Option.getOrNull);
|
|
58
|
+
if (!node || !Obj.isObject(node.data) || Obj.instanceOf(Chat.Chat, node.data)) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (resolveEffectiveVariant(graph, plankId, companionVariant) !== ASSISTANT_COMPANION_VARIANT) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const object = node.data;
|
|
67
|
+
const companionUri = Obj.getURI(object);
|
|
68
|
+
const cache = registry.get(cacheAtom);
|
|
69
|
+
if (cache[companionUri]) {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const db = Obj.getDatabase(object);
|
|
74
|
+
if (!db) {
|
|
75
|
+
log.warn('No db for object', { plankId, companionUri });
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
void operationInvoker
|
|
80
|
+
.invokePromise(AssistantOperation.EnsureCompanionChat, { db, companionTo: object })
|
|
81
|
+
.catch((error) => log.warn('Failed to provision companion chat', { plankId, error }));
|
|
82
|
+
|
|
83
|
+
return false;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const provision = () => {
|
|
87
|
+
const deckState: StoredDeckState = registry.get(deckStateAtom);
|
|
88
|
+
const deck = deckState.decks[deckState.activeDeck];
|
|
89
|
+
if (!deck?.companionOpen) {
|
|
90
|
+
unsubAllPlanks();
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const plankIds = new Set(deck.solo ? [deck.solo] : deck.active);
|
|
95
|
+
|
|
96
|
+
// Remove subscriptions for planks that are no longer active.
|
|
97
|
+
for (const trackedId of plankSubs.keys()) {
|
|
98
|
+
if (!plankIds.has(trackedId)) {
|
|
99
|
+
unsubPlank(trackedId);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
for (const plankId of plankIds) {
|
|
104
|
+
const resolved = provisionForPlank(plankId, deck.companionVariant);
|
|
105
|
+
|
|
106
|
+
if (resolved) {
|
|
107
|
+
// Already provisioned — no need to watch connections.
|
|
108
|
+
unsubPlank(plankId);
|
|
109
|
+
} else if (!plankSubs.has(plankId)) {
|
|
110
|
+
// Not yet resolved — subscribe to child connections so we re-try
|
|
111
|
+
// when graph builder extensions add companion nodes (after expand).
|
|
112
|
+
plankSubs.set(
|
|
113
|
+
plankId,
|
|
114
|
+
registry.subscribe(graph.connections(plankId, 'child'), () => {
|
|
115
|
+
if (provisionForPlank(plankId, deck.companionVariant)) {
|
|
116
|
+
unsubPlank(plankId);
|
|
117
|
+
}
|
|
118
|
+
}),
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
provision();
|
|
125
|
+
|
|
126
|
+
const unsub1 = registry.subscribe(deckStateAtom, provision);
|
|
127
|
+
const unsub2 = registry.subscribe(stateAtom, provision);
|
|
128
|
+
|
|
129
|
+
return Capability.contributes(Capabilities.Null, null, () =>
|
|
130
|
+
Effect.sync(() => {
|
|
131
|
+
unsub1();
|
|
132
|
+
unsub2();
|
|
133
|
+
unsubAllPlanks();
|
|
134
|
+
}),
|
|
135
|
+
);
|
|
136
|
+
}),
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Mirrors useSelectedCompanion fallback logic outside of React.
|
|
141
|
+
* Returns the variant that would actually be rendered for a given plank.
|
|
142
|
+
*/
|
|
143
|
+
const resolveEffectiveVariant = (
|
|
144
|
+
graph: Graph.BaseGraph,
|
|
145
|
+
plankId: string,
|
|
146
|
+
preferredVariant: string | undefined,
|
|
147
|
+
): string | undefined => {
|
|
148
|
+
const companions = Graph.getConnections(graph, plankId, 'child')
|
|
149
|
+
.filter((node) => node.type === PLANK_COMPANION_TYPE)
|
|
150
|
+
.toSorted((a, b) => byPosition(a.properties, b.properties));
|
|
151
|
+
|
|
152
|
+
if (companions.length === 0) {
|
|
153
|
+
return undefined;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (preferredVariant) {
|
|
157
|
+
const preferred = companions.find((companion) => getLinkedVariant(companion.id) === preferredVariant);
|
|
158
|
+
if (preferred) {
|
|
159
|
+
return getLinkedVariant(preferred.id);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return getLinkedVariant(companions[0].id);
|
|
164
|
+
};
|
|
@@ -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
|
+
);
|
|
@@ -2,28 +2,69 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
5
|
+
import * as AnthropicClient from '@effect/ai-anthropic/AnthropicClient';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Layer from 'effect/Layer';
|
|
8
|
+
|
|
9
|
+
import { AnthropicResolver } from '@dxos/ai/resolvers';
|
|
10
|
+
import { Capability } from '@dxos/app-framework';
|
|
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';
|
|
17
|
+
|
|
18
|
+
import { ANTHROPIC_SOURCE } from '../constants';
|
|
19
|
+
|
|
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(
|
|
61
|
+
AppCapabilities.AiModelResolver,
|
|
62
|
+
anthropicResolverLayer,
|
|
63
|
+
() => Effect.sync(() => identitySubscription?.unsubscribe()),
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
return [contribution];
|
|
67
|
+
}),
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
export default edgeModelResolver;
|
|
@@ -2,15 +2,45 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
7
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
import type { AssistantPluginOptions } from '#types';
|
|
8
10
|
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export const
|
|
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
|
+
);
|
|
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'));
|
|
29
|
+
export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
|
|
30
|
+
export const CompanionChatProvisioner = Capability.lazy(
|
|
31
|
+
'CompanionChatProvisioner',
|
|
32
|
+
() => import('./companion-chat-provisioner'),
|
|
33
|
+
);
|
|
34
|
+
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
35
|
+
export const EdgeModelResolver = Capability.lazy('EdgeModelResolver', () => import('./edge-model-resolver'));
|
|
36
|
+
export const LocalModelResolver = Capability.lazy('LocalModelResolver', () => import('./local-model-resolver'));
|
|
37
|
+
export const MarkdownExtension = Capability.lazy('MarkdownExtension', () => import('./markdown-extension'));
|
|
38
|
+
export const Migrations = Capability.lazy('AssistantMigrations', () => import('./migrations'));
|
|
39
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
40
|
+
'OperationHandler',
|
|
41
|
+
() => import('./operation-handler'),
|
|
42
|
+
);
|
|
43
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
44
|
+
export const Settings = Capability.lazy('Settings', () => import('./settings'));
|
|
45
|
+
export const AssistantState = Capability.lazy('AssistantState', () => import('./state'));
|
|
46
|
+
export const Toolkit = Capability.lazy('Toolkit', () => import('./toolkit'));
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Schema from 'effect/Schema';
|
|
7
|
+
|
|
8
|
+
import { Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Obj, Ref } from '@dxos/echo';
|
|
10
|
+
import {
|
|
11
|
+
type CredentialForm,
|
|
12
|
+
Integration,
|
|
13
|
+
IntegrationProvider as IntegrationProviderCapability,
|
|
14
|
+
} from '@dxos/plugin-integration';
|
|
15
|
+
import { AccessToken } from '@dxos/types';
|
|
16
|
+
|
|
17
|
+
import { ANTHROPIC_PROVIDER_ID, ANTHROPIC_SOURCE } from '../constants';
|
|
18
|
+
|
|
19
|
+
/** API-key form for the Anthropic BYOK provider; key is best-effort validated against `/v1/models`. */
|
|
20
|
+
const AnthropicTokenForm = Schema.Struct({
|
|
21
|
+
token: Schema.String.annotations({
|
|
22
|
+
title: 'API key',
|
|
23
|
+
description: 'Your Anthropic API key — find it at https://console.anthropic.com/settings/keys.',
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Best-effort validation: 401/403 from Anthropic blocks the save; CORS/network failures
|
|
29
|
+
* are tolerated so the form still works in environments where the direct browser call is blocked.
|
|
30
|
+
*/
|
|
31
|
+
const validateAnthropicKey = (apiKey: string): Effect.Effect<void, Error> =>
|
|
32
|
+
Effect.tryPromise({
|
|
33
|
+
try: () =>
|
|
34
|
+
fetch('https://api.anthropic.com/v1/models', {
|
|
35
|
+
headers: {
|
|
36
|
+
'x-api-key': apiKey,
|
|
37
|
+
'anthropic-version': '2023-06-01',
|
|
38
|
+
'anthropic-dangerous-direct-browser-access': 'true',
|
|
39
|
+
},
|
|
40
|
+
}),
|
|
41
|
+
catch: (cause) => cause,
|
|
42
|
+
}).pipe(
|
|
43
|
+
Effect.matchEffect({
|
|
44
|
+
onSuccess: (response) =>
|
|
45
|
+
response.status === 401 || response.status === 403
|
|
46
|
+
? Effect.fail(
|
|
47
|
+
new Error('Invalid Anthropic API key. Check it at https://console.anthropic.com/settings/keys.'),
|
|
48
|
+
)
|
|
49
|
+
: Effect.void,
|
|
50
|
+
onFailure: () => Effect.void,
|
|
51
|
+
}),
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const credentialForm: CredentialForm<Schema.Schema.Type<typeof AnthropicTokenForm>> = {
|
|
55
|
+
schema: AnthropicTokenForm,
|
|
56
|
+
defaultValues: { token: '' },
|
|
57
|
+
// Validates before the dialog closes so 401/403 errors are shown inline.
|
|
58
|
+
onValidate: ({ values }) => validateAnthropicKey(values.token.trim()),
|
|
59
|
+
onSubmit: ({ values, provider }) =>
|
|
60
|
+
Effect.sync(() => {
|
|
61
|
+
const accessToken = Obj.make(AccessToken.AccessToken, {
|
|
62
|
+
source: ANTHROPIC_SOURCE,
|
|
63
|
+
token: values.token.trim(),
|
|
64
|
+
});
|
|
65
|
+
const integration = Obj.make(Integration.Integration, {
|
|
66
|
+
name: provider.label ?? 'Anthropic',
|
|
67
|
+
providerId: provider.id,
|
|
68
|
+
accessToken: Ref.make(accessToken),
|
|
69
|
+
targets: [],
|
|
70
|
+
});
|
|
71
|
+
return { kind: 'complete' as const, accessToken, integration };
|
|
72
|
+
}),
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export default Capability.makeModule(
|
|
76
|
+
Effect.fnUntraced(function* () {
|
|
77
|
+
return Capability.contributes(IntegrationProviderCapability, [
|
|
78
|
+
{
|
|
79
|
+
id: ANTHROPIC_PROVIDER_ID,
|
|
80
|
+
source: ANTHROPIC_SOURCE,
|
|
81
|
+
label: 'Anthropic',
|
|
82
|
+
credentialForm,
|
|
83
|
+
},
|
|
84
|
+
]);
|
|
85
|
+
}),
|
|
86
|
+
);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as OpenAiClient from '@effect/ai-openai/OpenAiClient';
|
|
6
|
+
import * as FetchHttpClient from '@effect/platform/FetchHttpClient';
|
|
7
|
+
import * as HttpClient from '@effect/platform/HttpClient';
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
import * as Layer from 'effect/Layer';
|
|
10
|
+
|
|
11
|
+
import { LMStudioResolver, OllamaResolver } from '@dxos/ai/resolvers';
|
|
12
|
+
import { Capability } from '@dxos/app-framework';
|
|
13
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* To start LM Studio server:
|
|
17
|
+
* ```bash
|
|
18
|
+
* ~/.lmstudio/bin/lms server start --cors
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* To start Ollama server:
|
|
22
|
+
* ```bash
|
|
23
|
+
* OLLAMA_ORIGINS="*" ollama serve
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
const localModelResolver = Capability.makeModule<[]>(() =>
|
|
27
|
+
Effect.succeed([
|
|
28
|
+
Capability.contributes(
|
|
29
|
+
AppCapabilities.AiModelResolver,
|
|
30
|
+
LMStudioResolver.make().pipe(
|
|
31
|
+
Layer.provide(
|
|
32
|
+
OpenAiClient.layer({
|
|
33
|
+
apiUrl: LMStudioResolver.DEFAULT_LMSTUDIO_ENDPOINT,
|
|
34
|
+
}),
|
|
35
|
+
),
|
|
36
|
+
Layer.provide(FetchHttpClient.layer),
|
|
37
|
+
),
|
|
38
|
+
),
|
|
39
|
+
Capability.contributes(
|
|
40
|
+
AppCapabilities.AiModelResolver,
|
|
41
|
+
OllamaResolver.make({
|
|
42
|
+
transformClient: HttpClient.withTracerPropagation(false),
|
|
43
|
+
}).pipe(Layer.provide(FetchHttpClient.layer)),
|
|
44
|
+
),
|
|
45
|
+
]),
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
export default localModelResolver;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Obj } from '@dxos/echo';
|
|
9
|
+
import { MarkdownCapabilities } from '@dxos/plugin-markdown/types';
|
|
10
|
+
|
|
11
|
+
import { AssistantOperation } from '#types';
|
|
12
|
+
|
|
13
|
+
import { promptRunExtension } from '../extensions';
|
|
14
|
+
|
|
15
|
+
export default Capability.makeModule(
|
|
16
|
+
Effect.fnUntraced(function* () {
|
|
17
|
+
const capabilities = yield* Capability.Service;
|
|
18
|
+
|
|
19
|
+
return Capability.contributes(MarkdownCapabilities.ExtensionProvider, [
|
|
20
|
+
({ document: doc }) => {
|
|
21
|
+
if (!doc) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const db = Obj.getDatabase(doc);
|
|
26
|
+
if (!db) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const { invokePromise } = capabilities.get(Capabilities.OperationInvoker);
|
|
31
|
+
|
|
32
|
+
return promptRunExtension({
|
|
33
|
+
onRun: (promptText) => {
|
|
34
|
+
void invokePromise(AssistantOperation.RunPromptInNewChat, { db, prompt: promptText });
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
]);
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Chat } from '@dxos/assistant-toolkit';
|
|
9
|
+
import { Migration } from '@dxos/echo';
|
|
10
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
11
|
+
|
|
12
|
+
const identityTransform = async (from: any) => ({ ...from });
|
|
13
|
+
const noopCallback = async () => {};
|
|
14
|
+
|
|
15
|
+
const migrations = [
|
|
16
|
+
Migration.define({
|
|
17
|
+
from: Chat.LegacyCompanionTo,
|
|
18
|
+
to: Chat.CompanionTo,
|
|
19
|
+
transform: identityTransform,
|
|
20
|
+
onMigration: noopCallback,
|
|
21
|
+
}),
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
export default Capability.makeModule(
|
|
25
|
+
Effect.fnUntraced(function* () {
|
|
26
|
+
return Capability.contributes(ClientCapabilities.Migration, migrations);
|
|
27
|
+
}),
|
|
28
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
9
|
+
|
|
10
|
+
import { AssistantOperationHandlerSet } from '#operations';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
Effect.fnUntraced(function* () {
|
|
14
|
+
return Capability.contributes(Capabilities.OperationHandler, AssistantOperationHandlerSet);
|
|
15
|
+
}),
|
|
16
|
+
);
|