@dxos/plugin-assistant 0.8.4-main.c85a9c8dae → 0.8.4-main.dfabb4ec29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/neutral/AgentArticle-LDV6UTSH.mjs +168 -0
- package/dist/lib/neutral/AgentArticle-LDV6UTSH.mjs.map +7 -0
- package/dist/lib/neutral/AgentProperties-H535EM5S.mjs +100 -0
- package/dist/lib/neutral/AgentProperties-H535EM5S.mjs.map +7 -0
- package/dist/lib/neutral/AssistantPlugin.mjs +99 -0
- package/dist/lib/neutral/AssistantPlugin.mjs.map +7 -0
- package/dist/lib/neutral/AssistantPlugin.node.mjs +46 -0
- package/dist/lib/neutral/AssistantPlugin.node.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/{browser/BlueprintArticle-CCS25MNW.mjs → neutral/BlueprintArticle-U7LUBFOS.mjs} +6 -15
- package/dist/lib/neutral/BlueprintArticle-U7LUBFOS.mjs.map +7 -0
- package/dist/lib/neutral/ChatCompanion-6LC7YCV6.mjs +130 -0
- package/dist/lib/neutral/ChatCompanion-6LC7YCV6.mjs.map +7 -0
- package/dist/lib/neutral/ChatContainer-X3R4ALHT.mjs +8 -0
- package/dist/lib/{browser/ChatDialog-AET7GVIB.mjs → neutral/ChatDialog-QKZLG7SQ.mjs} +13 -26
- package/dist/lib/neutral/ChatDialog-QKZLG7SQ.mjs.map +7 -0
- package/dist/lib/{browser/PromptArticle-USQO4WX6.mjs → neutral/RoutineArticle-6LC3P7OB.mjs} +15 -31
- package/dist/lib/neutral/RoutineArticle-6LC3P7OB.mjs.map +7 -0
- package/dist/lib/neutral/RoutineList-CLDXGQUD.mjs +48 -0
- package/dist/lib/neutral/RoutineList-CLDXGQUD.mjs.map +7 -0
- package/dist/lib/neutral/TracePanel-HYVPDIAA.mjs +565 -0
- package/dist/lib/neutral/TracePanel-HYVPDIAA.mjs.map +7 -0
- package/dist/lib/neutral/TriggerStatus-WTFYUIG5.mjs +92 -0
- package/dist/lib/neutral/TriggerStatus-WTFYUIG5.mjs.map +7 -0
- package/dist/lib/{browser/ai-service-CY2BYPH6.mjs → neutral/ai-service-GJXMI5OI.mjs} +2 -2
- package/dist/lib/{browser/ai-service-CY2BYPH6.mjs.map → neutral/ai-service-GJXMI5OI.mjs.map} +3 -3
- package/dist/lib/neutral/app-graph-builder-XZJDJ3LJ.mjs +189 -0
- package/dist/lib/neutral/app-graph-builder-XZJDJ3LJ.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 +35 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/{browser/chunk-EXVT7D4B.mjs → neutral/chunk-4CQZCMRP.mjs} +7 -5
- package/dist/lib/neutral/chunk-4CQZCMRP.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-CM3XQU2M.mjs +8 -0
- package/dist/lib/neutral/chunk-CM3XQU2M.mjs.map +7 -0
- package/dist/lib/neutral/chunk-F7VUML5H.mjs +104 -0
- package/dist/lib/neutral/chunk-F7VUML5H.mjs.map +7 -0
- package/dist/lib/neutral/chunk-VHPTYKYD.mjs +361 -0
- package/dist/lib/neutral/chunk-VHPTYKYD.mjs.map +7 -0
- package/dist/lib/neutral/companion-chat-provisioner-5N4HWNVJ.mjs +116 -0
- package/dist/lib/neutral/companion-chat-provisioner-5N4HWNVJ.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +2240 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +27 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-chat-AEFFQYHT.mjs +71 -0
- package/dist/lib/neutral/create-chat-AEFFQYHT.mjs.map +7 -0
- package/dist/lib/neutral/create-object-VV5AO6D2.mjs +93 -0
- package/dist/lib/neutral/create-object-VV5AO6D2.mjs.map +7 -0
- package/dist/lib/{browser/edge-model-resolver-YTMFQEN5.mjs → neutral/edge-model-resolver-XDNBZ3US.mjs} +2 -2
- package/dist/lib/{browser/edge-model-resolver-YTMFQEN5.mjs.map → neutral/edge-model-resolver-XDNBZ3US.mjs.map} +3 -3
- package/dist/lib/neutral/ensure-companion-chat-EWF5GEZI.mjs +58 -0
- package/dist/lib/neutral/ensure-companion-chat-EWF5GEZI.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +930 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +32 -0
- package/dist/lib/{browser/local-model-resolver-CGRQH37T.mjs → neutral/local-model-resolver-I2BENFFS.mjs} +8 -4
- 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-LOYUJDNX.mjs +28 -0
- package/dist/lib/neutral/migrations-LOYUJDNX.mjs.map +7 -0
- package/dist/lib/neutral/on-create-space-Q2R7OSP6.mjs +19 -0
- 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/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-JWFECJJ5.mjs +165 -0
- package/dist/lib/neutral/react-surface-JWFECJJ5.mjs.map +7 -0
- package/dist/lib/neutral/resolve-navigation-targets-VXBSWV5L.mjs +20 -0
- package/dist/lib/neutral/resolve-navigation-targets-VXBSWV5L.mjs.map +7 -0
- package/dist/lib/neutral/run-prompt-in-new-chat-ZMWSWGXL.mjs +100 -0
- package/dist/lib/neutral/run-prompt-in-new-chat-ZMWSWGXL.mjs.map +7 -0
- package/dist/lib/neutral/set-current-chat-ZFDCYK5I.mjs +48 -0
- package/dist/lib/neutral/set-current-chat-ZFDCYK5I.mjs.map +7 -0
- package/dist/lib/{browser/settings-YREVQAZ5.mjs → neutral/settings-W4BLWQ53.mjs} +6 -11
- 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/toolkit-GVWXPDLJ.mjs +14 -0
- package/dist/lib/neutral/toolkit-GVWXPDLJ.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +173 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +20 -0
- package/dist/lib/neutral/update-chat-name-ENXRUMDJ.mjs +54 -0
- package/dist/lib/neutral/update-chat-name-ENXRUMDJ.mjs.map +7 -0
- package/dist/types/src/AssistantPlugin.d.ts +1 -0
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/AssistantPlugin.node.d.ts +4 -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/blueprints/assistant/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +9 -0
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -0
- package/dist/types/src/capabilities/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.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +55 -11
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +16 -0
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/{repair/repair.d.ts → markdown.d.ts} +2 -3
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/migrations.d.ts +5 -0
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +6 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- 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.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +6 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -0
- 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 +2 -0
- package/dist/types/src/components/AssistantSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/Chat/Chat.d.ts +37 -47
- 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 +2 -1
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts +12 -0
- package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +6 -2
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +19 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +28 -0
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.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 +14 -0
- package/dist/types/src/components/ChatThread/Anchor.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +6 -3
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +8 -427
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +42 -0
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/registry.d.ts +18 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/sync.d.ts +44 -17
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
- 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/TemplateEditor/TemplateEditor.d.ts +6 -5
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +1 -419
- 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 +2 -420
- 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 -13
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +11 -9
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +1 -419
- 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 +6 -0
- package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -0
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts +21 -0
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/AgentArticle/index.d.ts +2 -0
- package/dist/types/src/containers/AgentArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts +6 -0
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -0
- package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts +16 -0
- package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts.map +1 -0
- package/dist/types/src/containers/AgentProperties/index.d.ts +2 -0
- package/dist/types/src/containers/AgentProperties/index.d.ts.map +1 -0
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +4 -4
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -1
- package/dist/types/src/containers/BlueprintArticle/index.d.ts +1 -2
- package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +14 -8
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/containers/ChatCompanion/index.d.ts +1 -2
- package/dist/types/src/containers/ChatCompanion/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +6 -12
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/containers/ChatContainer/index.d.ts +1 -2
- package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/containers/ChatDialog/index.d.ts +1 -2
- package/dist/types/src/containers/ChatDialog/index.d.ts.map +1 -1
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +6 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/index.d.ts +2 -0
- package/dist/types/src/containers/RoutineArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineList/RoutineList.d.ts +6 -0
- package/dist/types/src/containers/RoutineList/RoutineList.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts +21 -0
- package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineList/index.d.ts +2 -0
- package/dist/types/src/containers/RoutineList/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts +8 -0
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts +13 -0
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +19 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts +2 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/execution-graph.d.ts +97 -0
- package/dist/types/src/containers/TracePanel/execution-graph.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts +2 -0
- package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/index.d.ts +4 -0
- package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/testing/index.d.ts +3 -0
- package/dist/types/src/containers/TracePanel/testing/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts +14 -0
- package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts +12 -0
- package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +3 -2
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -1
- package/dist/types/src/containers/TriggerStatus/index.d.ts +1 -2
- package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +5 -3
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/extensions/index.d.ts +2 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -0
- package/dist/types/src/extensions/prompt-extension.d.ts +10 -0
- package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +1 -1
- 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 +6 -6
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +3 -6
- 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 +3 -2
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- 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.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 +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 -5
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -0
- 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/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/on-create-space.d.ts +5 -0
- package/dist/types/src/operations/on-create-space.d.ts.map +1 -0
- package/dist/types/src/operations/prompt.test.d.ts +2 -0
- package/dist/types/src/operations/prompt.test.d.ts.map +1 -0
- package/dist/types/src/operations/resolve-navigation-targets.d.ts +15 -0
- package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -0
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +5 -0
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -0
- package/dist/types/src/operations/set-current-chat.d.ts +5 -0
- package/dist/types/src/operations/set-current-chat.d.ts.map +1 -0
- package/dist/types/src/operations/update-chat-name.d.ts +5 -0
- package/dist/types/src/operations/update-chat-name.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/processor/index.d.ts +0 -1
- package/dist/types/src/processor/index.d.ts.map +1 -1
- package/dist/types/src/processor/presets.d.ts +1 -1
- package/dist/types/src/processor/presets.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +49 -30
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/queue-logger.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.test.d.ts +2 -0
- package/dist/types/src/testing/test-generator.test.d.ts.map +1 -0
- package/dist/types/src/testing/test-services.d.ts +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.test.d.ts +2 -0
- package/dist/types/src/testing/trace-timeline.test.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -419
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +30 -14
- 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 +142 -0
- package/dist/types/src/types/AssistantOperation.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +26 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -4
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +1 -1
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +165 -109
- package/src/AssistantPlugin.node.ts +44 -0
- package/src/AssistantPlugin.test.ts +35 -0
- package/src/AssistantPlugin.ts +126 -0
- package/src/blueprints/assistant/blueprint.test.ts +15 -17
- package/src/blueprints/assistant/blueprint.ts +11 -7
- package/src/capabilities/app-graph-builder.ts +192 -0
- package/src/capabilities/blueprint-definition.ts +56 -0
- package/src/capabilities/companion-chat-provisioner.ts +163 -0
- package/src/capabilities/create-object.ts +107 -0
- package/src/capabilities/index.ts +24 -11
- package/src/capabilities/{local-model-resolver/local-model-resolver.ts → local-model-resolver.ts} +14 -4
- package/src/capabilities/markdown.ts +40 -0
- package/src/capabilities/migrations.ts +28 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +167 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +2 -2
- package/src/capabilities/{state/state.ts → state.ts} +11 -3
- package/src/capabilities/{toolkit/toolkit.ts → toolkit.ts} +2 -4
- package/src/components/AssistantSettings/AssistantSettings.stories.tsx +35 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +43 -0
- package/src/components/AssistantSettings/index.ts +5 -0
- package/src/components/Chat/Chat.tsx +96 -294
- package/src/components/Chat/context.ts +39 -0
- package/src/components/ChatPrompt/ChatActions.tsx +28 -16
- package/src/components/ChatPrompt/ChatMcpErrors.tsx +50 -0
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +136 -0
- package/src/components/ChatPrompt/ChatOptions.tsx +239 -53
- package/src/components/ChatPrompt/ChatPrompt.tsx +182 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +4 -4
- 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 +95 -0
- package/src/components/ChatThread/ChatThread.stories.tsx +60 -67
- package/src/components/ChatThread/ChatThread.tsx +46 -29
- package/src/components/ChatThread/DEBUG.md +41 -0
- package/src/components/ChatThread/MarkdownStream.stories.tsx +281 -0
- package/src/components/ChatThread/registry.tsx +148 -65
- package/src/components/ChatThread/sync.test.ts +186 -28
- package/src/components/ChatThread/sync.ts +93 -103
- 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.md → thread-2.md} +19 -0
- package/src/components/ChatThread/testing/thread-widgets.md +79 -0
- package/src/components/ChatThread/tool-widget-state.test.ts +34 -0
- package/src/components/ChatThread/tool-widget-state.ts +48 -0
- package/src/components/ChatThread/widgets/FallbackWidget.tsx +26 -0
- package/src/components/ChatThread/widgets/ReasoningWidget.stories.tsx +68 -0
- package/src/components/ChatThread/widgets/ReasoningWidget.ts +133 -0
- package/src/components/ChatThread/widgets/ReferenceWidget.ts +33 -0
- package/src/components/ChatThread/widgets/SelectWidget.ts +39 -0
- package/src/components/ChatThread/widgets/StatsWidget.ts +31 -0
- package/src/components/ChatThread/widgets/StatusWidget.ts +53 -0
- package/src/components/ChatThread/widgets/SuggestionWidget.ts +41 -0
- package/src/components/ChatThread/widgets/SummaryWidget.tsx +27 -0
- package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +55 -0
- package/src/components/ChatThread/widgets/ToolWidget.tsx +156 -0
- package/src/components/ChatThread/widgets/defaults.ts +8 -0
- package/src/components/ChatThread/widgets/index.ts +13 -0
- package/src/components/ProcessTree/ProcessTree.stories.tsx +83 -0
- package/src/components/ProcessTree/ProcessTree.tsx +119 -0
- package/src/components/ProcessTree/index.ts +5 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +5 -9
- package/src/components/TemplateEditor/TemplateEditor.tsx +51 -43
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +8 -10
- package/src/components/TemplateEditor/TemplateForm.tsx +52 -73
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +1 -1
- package/src/components/ToolBlock/ToolBlock.tsx +20 -19
- package/src/components/Toolbox/Toolbox.stories.tsx +7 -8
- package/src/components/Toolbox/Toolbox.tsx +64 -57
- package/src/components/index.ts +5 -0
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +120 -0
- package/src/containers/AgentArticle/AgentArticle.tsx +200 -0
- package/src/containers/AgentArticle/index.ts +5 -0
- package/src/containers/AgentProperties/AgentProperties.stories.tsx +101 -0
- package/src/containers/AgentProperties/AgentProperties.tsx +127 -0
- package/src/containers/AgentProperties/index.ts +5 -0
- package/src/containers/BlueprintArticle/BlueprintArticle.tsx +7 -8
- package/src/containers/BlueprintArticle/index.ts +1 -3
- package/src/containers/ChatCompanion/ChatCompanion.tsx +26 -122
- package/src/containers/ChatCompanion/index.ts +1 -3
- package/src/containers/ChatContainer/ChatContainer.tsx +61 -25
- package/src/containers/ChatContainer/index.ts +1 -3
- package/src/containers/ChatDialog/ChatDialog.tsx +8 -14
- package/src/containers/ChatDialog/index.ts +1 -3
- package/src/containers/{PromptArticle/PromptArticle.tsx → RoutineArticle/RoutineArticle.tsx} +14 -14
- 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 +285 -0
- package/src/containers/TracePanel/TracePanel.tsx +167 -0
- package/src/containers/TracePanel/dxn-extractor.test.ts +153 -0
- package/src/containers/TracePanel/dxn-extractor.ts +178 -0
- package/src/containers/TracePanel/execution-graph.test.ts +382 -0
- package/src/containers/TracePanel/execution-graph.ts +621 -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 +41 -62
- package/src/containers/TriggerStatus/index.ts +1 -3
- package/src/containers/index.ts +5 -4
- package/src/extensions/index.ts +5 -0
- package/src/extensions/prompt-extension.ts +111 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useBlueprintRegistry.ts +2 -1
- package/src/hooks/useChatKeymap.ts +52 -0
- package/src/hooks/useChatProcessor.ts +36 -24
- package/src/hooks/useChatServices.ts +5 -26
- package/src/hooks/useChatToolbarActions.ts +9 -9
- package/src/hooks/useContextBinder.ts +17 -6
- package/src/hooks/useContextObjects.ts +8 -4
- package/src/hooks/useDebug.ts +38 -0
- package/src/hooks/useFilteredTypes.ts +1 -1
- package/src/hooks/usePresets.ts +2 -1
- package/src/index.ts +0 -6
- package/src/meta.ts +6 -3
- package/src/operations/create-chat.ts +78 -0
- package/src/operations/ensure-companion-chat.ts +63 -0
- package/src/operations/index.ts +15 -0
- package/src/operations/on-create-space.ts +24 -0
- package/src/operations/prompt.test.ts +77 -0
- package/src/operations/resolve-navigation-targets.ts +26 -0
- package/src/operations/run-prompt-in-new-chat.ts +112 -0
- package/src/operations/set-current-chat.ts +49 -0
- package/src/operations/update-chat-name.ts +61 -0
- package/src/plugin.ts +11 -0
- package/src/processor/index.ts +0 -1
- package/src/processor/presets.ts +11 -3
- package/src/processor/processor.test.ts +18 -51
- package/src/processor/processor.ts +214 -158
- package/src/queue-logger.ts +19 -8
- package/src/testing/data/trace-timeline.dx.json +4657 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/test-generator.test.ts +81 -0
- package/src/testing/test-generator.ts +79 -42
- package/src/testing/test-services.ts +1 -1
- package/src/testing/test-trace.ts +20 -0
- package/src/testing/trace-timeline.conversations.json +1 -0
- package/src/testing/trace-timeline.test.ts +250 -0
- package/src/translations.ts +152 -106
- package/src/types/Assistant.ts +16 -18
- package/src/types/AssistantCapabilities.ts +35 -0
- package/src/types/AssistantEvents.ts +11 -0
- package/src/types/AssistantOperation.ts +128 -0
- package/src/types/Settings.ts +76 -0
- package/src/types/index.ts +5 -4
- package/src/types/service.ts +3 -3
- package/dist/lib/browser/AssistantSettings-2LFAG5OQ.mjs +0 -93
- package/dist/lib/browser/AssistantSettings-2LFAG5OQ.mjs.map +0 -7
- package/dist/lib/browser/BlueprintArticle-CCS25MNW.mjs.map +0 -7
- package/dist/lib/browser/ChatCompanion-UGD4V34A.mjs +0 -202
- package/dist/lib/browser/ChatCompanion-UGD4V34A.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-ZGRSZ5EU.mjs +0 -12
- package/dist/lib/browser/ChatDialog-AET7GVIB.mjs.map +0 -7
- package/dist/lib/browser/ProjectArticle-QDBTIFNE.mjs +0 -91
- package/dist/lib/browser/ProjectArticle-QDBTIFNE.mjs.map +0 -7
- package/dist/lib/browser/ProjectSettings-R6RRARLO.mjs +0 -194
- package/dist/lib/browser/ProjectSettings-R6RRARLO.mjs.map +0 -7
- package/dist/lib/browser/PromptArticle-USQO4WX6.mjs.map +0 -7
- package/dist/lib/browser/TriggerStatus-65X3EUSN.mjs +0 -122
- package/dist/lib/browser/TriggerStatus-65X3EUSN.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-SFYYUKTT.mjs +0 -234
- package/dist/lib/browser/app-graph-builder-SFYYUKTT.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-RB5RHZZM.mjs +0 -34
- package/dist/lib/browser/blueprint-definition-RB5RHZZM.mjs.map +0 -7
- package/dist/lib/browser/chunk-7DXYAXLZ.mjs +0 -230
- package/dist/lib/browser/chunk-7DXYAXLZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-EXVT7D4B.mjs.map +0 -7
- package/dist/lib/browser/chunk-JYY5AD65.mjs +0 -286
- package/dist/lib/browser/chunk-JYY5AD65.mjs.map +0 -7
- package/dist/lib/browser/chunk-LEXIQDXZ.mjs +0 -26
- package/dist/lib/browser/chunk-LEXIQDXZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-RU4G5NY4.mjs +0 -69
- package/dist/lib/browser/chunk-RU4G5NY4.mjs.map +0 -7
- package/dist/lib/browser/chunk-UUA6GNGG.mjs +0 -2125
- package/dist/lib/browser/chunk-UUA6GNGG.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -386
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/local-model-resolver-CGRQH37T.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operation-resolver-ELXDQZEG.mjs +0 -136
- package/dist/lib/browser/operation-resolver-ELXDQZEG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-KYQSZO2I.mjs +0 -144
- package/dist/lib/browser/react-surface-KYQSZO2I.mjs.map +0 -7
- package/dist/lib/browser/repair-ZFZWZALX.mjs +0 -52
- package/dist/lib/browser/repair-ZFZWZALX.mjs.map +0 -7
- package/dist/lib/browser/settings-YREVQAZ5.mjs.map +0 -7
- package/dist/lib/browser/state-MPG42ZO4.mjs +0 -26
- package/dist/lib/browser/state-MPG42ZO4.mjs.map +0 -7
- package/dist/lib/browser/toolkit-XRSBBB3L.mjs +0 -16
- package/dist/lib/browser/toolkit-XRSBBB3L.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -23
- package/dist/lib/node-esm/AssistantSettings-QWFEMJG7.mjs +0 -94
- package/dist/lib/node-esm/AssistantSettings-QWFEMJG7.mjs.map +0 -7
- package/dist/lib/node-esm/BlueprintArticle-SNEN6LOY.mjs +0 -37
- package/dist/lib/node-esm/BlueprintArticle-SNEN6LOY.mjs.map +0 -7
- package/dist/lib/node-esm/ChatCompanion-NP4R5BFE.mjs +0 -203
- package/dist/lib/node-esm/ChatCompanion-NP4R5BFE.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-IFHDIFJH.mjs +0 -13
- package/dist/lib/node-esm/ChatDialog-UZNQBTKZ.mjs +0 -86
- package/dist/lib/node-esm/ChatDialog-UZNQBTKZ.mjs.map +0 -7
- package/dist/lib/node-esm/ProjectArticle-BCIBESJN.mjs +0 -92
- package/dist/lib/node-esm/ProjectArticle-BCIBESJN.mjs.map +0 -7
- package/dist/lib/node-esm/ProjectSettings-Q5QY6BYS.mjs +0 -195
- package/dist/lib/node-esm/ProjectSettings-Q5QY6BYS.mjs.map +0 -7
- package/dist/lib/node-esm/PromptArticle-PGMJMQK7.mjs +0 -72
- package/dist/lib/node-esm/PromptArticle-PGMJMQK7.mjs.map +0 -7
- package/dist/lib/node-esm/TriggerStatus-UR5S7PXJ.mjs +0 -123
- package/dist/lib/node-esm/TriggerStatus-UR5S7PXJ.mjs.map +0 -7
- package/dist/lib/node-esm/ai-service-ZI3A6RVG.mjs +0 -23
- package/dist/lib/node-esm/ai-service-ZI3A6RVG.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-E25JXI34.mjs +0 -235
- package/dist/lib/node-esm/app-graph-builder-E25JXI34.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-L7XKRYIW.mjs +0 -35
- package/dist/lib/node-esm/blueprint-definition-L7XKRYIW.mjs.map +0 -7
- package/dist/lib/node-esm/blueprints/index.mjs +0 -9
- package/dist/lib/node-esm/chunk-3QBVFAYO.mjs +0 -28
- package/dist/lib/node-esm/chunk-3QBVFAYO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6NCLKQCL.mjs +0 -70
- package/dist/lib/node-esm/chunk-6NCLKQCL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GZ4ERNT2.mjs +0 -2126
- package/dist/lib/node-esm/chunk-GZ4ERNT2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JMBYVUD6.mjs +0 -288
- package/dist/lib/node-esm/chunk-JMBYVUD6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MWYYLALM.mjs +0 -231
- package/dist/lib/node-esm/chunk-MWYYLALM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-POWB2BPC.mjs +0 -25
- package/dist/lib/node-esm/chunk-POWB2BPC.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-CMJ3KNLQ.mjs +0 -22
- package/dist/lib/node-esm/edge-model-resolver-CMJ3KNLQ.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -387
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/local-model-resolver-FFDAKOXN.mjs +0 -21
- package/dist/lib/node-esm/local-model-resolver-FFDAKOXN.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/operation-resolver-Q5GNP2GH.mjs +0 -137
- package/dist/lib/node-esm/operation-resolver-Q5GNP2GH.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-JJRGVGKD.mjs +0 -145
- package/dist/lib/node-esm/react-surface-JJRGVGKD.mjs.map +0 -7
- package/dist/lib/node-esm/repair-LXFVOK4B.mjs +0 -53
- package/dist/lib/node-esm/repair-LXFVOK4B.mjs.map +0 -7
- package/dist/lib/node-esm/settings-N452OW6Y.mjs +0 -34
- package/dist/lib/node-esm/settings-N452OW6Y.mjs.map +0 -7
- package/dist/lib/node-esm/state-WHZFKIEL.mjs +0 -27
- package/dist/lib/node-esm/state-WHZFKIEL.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-5IWGLUF4.mjs +0 -17
- package/dist/lib/node-esm/toolkit-5IWGLUF4.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -24
- package/dist/types/src/capabilities/ai-service/ai-service.d.ts.map +0 -1
- package/dist/types/src/capabilities/ai-service/index.d.ts +0 -3
- package/dist/types/src/capabilities/ai-service/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -6
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/edge-model-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/edge-model-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/local-model-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/local-model-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts +0 -13
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair/index.d.ts +0 -3
- package/dist/types/src/capabilities/repair/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair/repair.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -15
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts +0 -18
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -11
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts +0 -13
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/capabilities/toolkit/index.d.ts +0 -3
- package/dist/types/src/capabilities/toolkit/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +0 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +0 -7
- 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/Typewriter/AssistantToolbar.d.ts +0 -12
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts.map +0 -1
- package/dist/types/src/components/Typewriter/Typewriter.d.ts +0 -11
- package/dist/types/src/components/Typewriter/Typewriter.d.ts.map +0 -1
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts +0 -7
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts.map +0 -1
- package/dist/types/src/components/Typewriter/assistant-extension.d.ts +0 -5
- package/dist/types/src/components/Typewriter/assistant-extension.d.ts.map +0 -1
- package/dist/types/src/components/Typewriter/index.d.ts +0 -2
- package/dist/types/src/components/Typewriter/index.d.ts.map +0 -1
- package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts +0 -8
- package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts.map +0 -1
- package/dist/types/src/containers/AssistantSettings/index.d.ts +0 -3
- package/dist/types/src/containers/AssistantSettings/index.d.ts.map +0 -1
- package/dist/types/src/containers/Project/ProjectArticle.d.ts +0 -7
- package/dist/types/src/containers/Project/ProjectArticle.d.ts.map +0 -1
- package/dist/types/src/containers/Project/ProjectSettings.d.ts +0 -6
- package/dist/types/src/containers/Project/ProjectSettings.d.ts.map +0 -1
- package/dist/types/src/containers/Project/index.d.ts +0 -7
- package/dist/types/src/containers/Project/index.d.ts.map +0 -1
- package/dist/types/src/containers/Project/triggers.d.ts +0 -6
- package/dist/types/src/containers/Project/triggers.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 -3
- package/dist/types/src/containers/PromptArticle/index.d.ts.map +0 -1
- package/dist/types/src/processor/update-name.d.ts +0 -10
- package/dist/types/src/processor/update-name.d.ts.map +0 -1
- package/dist/types/src/types/AssistantAction.d.ts +0 -93
- package/dist/types/src/types/AssistantAction.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -33
- 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 -172
- package/src/blueprints/assistant/blueprint.conversations.json +0 -1
- package/src/capabilities/ai-service/index.ts +0 -7
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -198
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +0 -48
- package/src/capabilities/blueprint-definition/index.ts +0 -7
- package/src/capabilities/edge-model-resolver/index.ts +0 -7
- package/src/capabilities/local-model-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -121
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -121
- package/src/capabilities/repair/index.ts +0 -7
- package/src/capabilities/repair/repair.ts +0 -69
- package/src/capabilities/settings/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/capabilities/toolkit/index.ts +0 -7
- package/src/components/ChatProgress/ChatProgress.tsx +0 -53
- package/src/components/ChatProgress/index.ts +0 -5
- package/src/components/Typewriter/AssistantToolbar.tsx +0 -161
- package/src/components/Typewriter/Typewriter.stories.tsx +0 -86
- package/src/components/Typewriter/Typewriter.tsx +0 -54
- package/src/components/Typewriter/assistant-extension.tsx +0 -142
- package/src/components/Typewriter/index.ts +0 -5
- package/src/containers/AssistantSettings/AssistantSettings.tsx +0 -120
- package/src/containers/AssistantSettings/index.ts +0 -7
- package/src/containers/Project/ProjectArticle.tsx +0 -117
- package/src/containers/Project/ProjectSettings.tsx +0 -118
- package/src/containers/Project/index.ts +0 -16
- package/src/containers/Project/triggers.ts +0 -131
- package/src/containers/PromptArticle/index.ts +0 -7
- package/src/processor/update-name.ts +0 -58
- package/src/types/AssistantAction.ts +0 -76
- package/src/types/capabilities.ts +0 -27
- package/src/types/defs.ts +0 -5
- package/src/types/events.ts +0 -11
- /package/dist/lib/{browser/ChatContainer-ZGRSZ5EU.mjs.map → neutral/ChatContainer-X3R4ALHT.mjs.map} +0 -0
- /package/dist/lib/{browser → neutral}/blueprints/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/ChatContainer-IFHDIFJH.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/blueprints → neutral/operations}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm → neutral}/types/index.mjs.map +0 -0
- /package/dist/types/src/capabilities/{ai-service/ai-service.d.ts → ai-service.d.ts} +0 -0
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{edge-model-resolver/edge-model-resolver.d.ts → edge-model-resolver.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
- /package/dist/types/src/capabilities/{toolkit/toolkit.d.ts → toolkit.d.ts} +0 -0
- /package/src/capabilities/{ai-service/ai-service.ts → ai-service.ts} +0 -0
- /package/src/capabilities/{edge-model-resolver/edge-model-resolver.ts → edge-model-resolver.ts} +0 -0
|
@@ -3,15 +3,31 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { type DXN } from '@dxos/echo';
|
|
6
|
-
import {
|
|
7
|
-
import { type MarkdownStreamController } from '@dxos/react-ui-components';
|
|
6
|
+
import { type MarkdownStreamController } from '@dxos/react-ui-markdown';
|
|
8
7
|
import { type ContentBlock, type Message } from '@dxos/types';
|
|
9
8
|
import { type StateDispatch, type XmlWidgetStateManager } from '@dxos/ui-editor';
|
|
10
9
|
|
|
10
|
+
import { rehydrateToolWidgetsFromMessages } from './tool-widget-state';
|
|
11
|
+
|
|
11
12
|
/**
|
|
12
13
|
* Update document.
|
|
13
14
|
*/
|
|
14
|
-
export type TextModel = Pick<MarkdownStreamController, '
|
|
15
|
+
export type TextModel = Pick<MarkdownStreamController, 'length' | 'setContent' | 'append' | 'updateWidget'>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Renders a block to markdown.
|
|
19
|
+
*
|
|
20
|
+
* Contract: for any block whose lifetime spans multiple invocations (i.e. a streaming block
|
|
21
|
+
* with `pending: true` whose content grows over time, transitioning to `pending: false`), the
|
|
22
|
+
* sequence of returned strings must be monotonically extending — each subsequent value must be
|
|
23
|
+
* a string-extension of the previous. The {@link MessageSyncer} relies on this invariant to
|
|
24
|
+
* compute appendable deltas without diffing.
|
|
25
|
+
*/
|
|
26
|
+
export type BlockRenderer = (
|
|
27
|
+
context: MessageThreadContext,
|
|
28
|
+
message: Message.Message,
|
|
29
|
+
block: ContentBlock.Any,
|
|
30
|
+
) => string | undefined;
|
|
15
31
|
|
|
16
32
|
/**
|
|
17
33
|
* Thread context passed to renderer.
|
|
@@ -23,138 +39,112 @@ export class MessageThreadContext implements Pick<MarkdownStreamController, 'upd
|
|
|
23
39
|
this._widgetState?.updateWidget(id, value);
|
|
24
40
|
}
|
|
25
41
|
|
|
26
|
-
// TODO(burdon): Resolve from hypergraph.
|
|
42
|
+
// TODO(burdon): Resolve name from hypergraph.
|
|
27
43
|
getObjectLabel(_id: DXN) {
|
|
28
44
|
return 'Object';
|
|
29
45
|
}
|
|
30
46
|
}
|
|
31
47
|
|
|
32
|
-
/**
|
|
33
|
-
* Renders a block to markdown.
|
|
34
|
-
*/
|
|
35
|
-
export type BlockRenderer = (
|
|
36
|
-
context: MessageThreadContext,
|
|
37
|
-
message: Message.Message,
|
|
38
|
-
block: ContentBlock.Any,
|
|
39
|
-
) => string | undefined;
|
|
40
|
-
|
|
41
48
|
/**
|
|
42
49
|
* Syncs messages with the editor.
|
|
50
|
+
*
|
|
51
|
+
* Reflects the AI streaming contract:
|
|
52
|
+
* - Messages and their blocks are appended in order.
|
|
53
|
+
* - Only the last block in `messages` may be `pending`; all earlier blocks are finalized.
|
|
54
|
+
* - The renderer's output for a streaming block grows monotonically (see {@link BlockRenderer}).
|
|
55
|
+
* - The document is read-only outside this syncer.
|
|
56
|
+
*
|
|
57
|
+
* Under those rules the syncer needs only:
|
|
58
|
+
* - `_completed`: the flat-block index past which everything has been fully appended.
|
|
59
|
+
* - `_trailing`: chars of the in-flight block (at index `_completed`) already appended.
|
|
60
|
+
* - `_threadId`: identity sentinel; if `messages[0]?.id` changes, the document is replaced.
|
|
43
61
|
*/
|
|
44
62
|
export class MessageSyncer {
|
|
45
|
-
private
|
|
46
|
-
private
|
|
47
|
-
private
|
|
48
|
-
private _currentBlockContent?: string;
|
|
63
|
+
private _threadId?: string;
|
|
64
|
+
private _completed = 0;
|
|
65
|
+
private _trailing = 0;
|
|
49
66
|
|
|
50
67
|
private readonly _context: MessageThreadContext;
|
|
51
68
|
|
|
52
69
|
constructor(
|
|
53
|
-
private readonly
|
|
54
|
-
private readonly
|
|
70
|
+
private readonly _document: TextModel,
|
|
71
|
+
private readonly _renderer: BlockRenderer,
|
|
55
72
|
) {
|
|
56
|
-
this._context = new MessageThreadContext(this.
|
|
73
|
+
this._context = new MessageThreadContext(this._document);
|
|
57
74
|
}
|
|
58
75
|
|
|
59
76
|
get context() {
|
|
60
77
|
return this._context;
|
|
61
78
|
}
|
|
62
79
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
this.
|
|
69
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Replace the document with the rendering of `messages`. Use on mount, on thread switch,
|
|
82
|
+
* and from {@link update} when it detects an identity change in `messages[0]`.
|
|
83
|
+
*/
|
|
84
|
+
reset(messages: Message.Message[] = []): void {
|
|
85
|
+
this._threadId = messages[0]?.id;
|
|
86
|
+
this._completed = 0;
|
|
87
|
+
this._trailing = 0;
|
|
88
|
+
const buffer = this._walk(messages);
|
|
89
|
+
// Match the pre-rewrite behaviour: rendering from a steady state (initial mount with
|
|
90
|
+
// non-empty messages, or thread switch) lands the entire content via `setContent` — which
|
|
91
|
+
// uses `wireBypass`, so the editor jumps straight to the final text and `update()` returns
|
|
92
|
+
// `true` so the caller can scroll to the bottom. Live streaming partials that arrive
|
|
93
|
+
// *after* this initial render flow through `update()`'s incremental path → `_document.append`
|
|
94
|
+
// → wire's drip filter, preserving the char-by-char typewriter for incoming text.
|
|
95
|
+
void this._document.setContent(buffer).then(() => {
|
|
96
|
+
rehydrateToolWidgetsFromMessages(this._context, messages);
|
|
97
|
+
});
|
|
70
98
|
}
|
|
71
99
|
|
|
72
100
|
/**
|
|
73
|
-
*
|
|
101
|
+
* Stream the suffix of the rendered messages into the document.
|
|
102
|
+
* Returns `true` if the document was replaced (initial mount or thread switch), `false`
|
|
103
|
+
* if the call was a streaming append (or a no-op).
|
|
74
104
|
*/
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
...message,
|
|
79
|
-
blocks: message.blocks.filter((block) => !block.pending || block._tag === 'text'),
|
|
80
|
-
}));
|
|
81
|
-
|
|
82
|
-
// Check if new set of messages.
|
|
83
|
-
if (this._initialMessageId !== messages[0]?.id) {
|
|
84
|
-
this.reset();
|
|
85
|
-
this._initialMessageId = messages[0]?.id;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (flush && this._model.view?.state.doc.length === 0) {
|
|
89
|
-
const buffer: string[] = [];
|
|
90
|
-
this.process(messages, (content) => {
|
|
91
|
-
buffer.push(content);
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
const content = buffer.join('');
|
|
95
|
-
this._model.view?.dispatch({
|
|
96
|
-
changes: [
|
|
97
|
-
{
|
|
98
|
-
from: 0,
|
|
99
|
-
to: this._model.view?.state.doc.length ?? 0,
|
|
100
|
-
insert: content,
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
|
-
selection: { anchor: content.length },
|
|
104
|
-
});
|
|
105
|
-
|
|
105
|
+
update(messages: Message.Message[]): boolean {
|
|
106
|
+
if (messages[0]?.id !== this._threadId) {
|
|
107
|
+
this.reset(messages);
|
|
106
108
|
return true;
|
|
107
|
-
} else {
|
|
108
|
-
this.process(messages, (content) => {
|
|
109
|
-
void this._model.append(content);
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
return false;
|
|
113
109
|
}
|
|
110
|
+
const buffer = this._walk(messages);
|
|
111
|
+
if (buffer.length > 0) {
|
|
112
|
+
void this._document.append(buffer);
|
|
113
|
+
}
|
|
114
|
+
return false;
|
|
114
115
|
}
|
|
115
116
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
for (const block of message.blocks.slice(this._currentBlockIndex)) {
|
|
134
|
-
this._currentBlockIndex = j;
|
|
135
|
-
const currentBlockContent = this._blockRenderer(this._context, message, block);
|
|
136
|
-
if (currentBlockContent) {
|
|
137
|
-
let content: string = '';
|
|
138
|
-
if (this._currentBlockContent && currentBlockContent.startsWith(this._currentBlockContent)) {
|
|
139
|
-
content = currentBlockContent.slice(this._currentBlockContent.length);
|
|
140
|
-
} else {
|
|
141
|
-
content = currentBlockContent;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// console.log('append', { message: i, block: j, content });
|
|
145
|
-
this._currentBlockContent = currentBlockContent;
|
|
146
|
-
append(content);
|
|
117
|
+
/**
|
|
118
|
+
* Walk flat blocks starting at `_completed`, advancing the cursors and returning the chars
|
|
119
|
+
* to append. Blocks before `_completed` are skipped — their renderer is never re-invoked,
|
|
120
|
+
* which preserves single-shot side effects (e.g. tool widget state mutation).
|
|
121
|
+
*/
|
|
122
|
+
_walk(messages: Message.Message[]): string {
|
|
123
|
+
let buffer = '';
|
|
124
|
+
let index = 0;
|
|
125
|
+
outer: for (const message of messages) {
|
|
126
|
+
for (const block of message.blocks) {
|
|
127
|
+
if (index < this._completed) {
|
|
128
|
+
index++;
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
const rendered = this._renderer(this._context, message, block) ?? '';
|
|
132
|
+
if (rendered.length > this._trailing) {
|
|
133
|
+
buffer += rendered.slice(this._trailing);
|
|
147
134
|
}
|
|
148
|
-
|
|
149
135
|
if (block.pending) {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
this.
|
|
153
|
-
|
|
136
|
+
// Stay on this block; record how far we've appended so the next call can resume.
|
|
137
|
+
// `Math.max`-style guard against a non-monotonic renderer output without shrinking the doc.
|
|
138
|
+
if (rendered.length > this._trailing) {
|
|
139
|
+
this._trailing = rendered.length;
|
|
140
|
+
}
|
|
141
|
+
break outer;
|
|
154
142
|
}
|
|
155
|
-
|
|
143
|
+
this._completed = index + 1;
|
|
144
|
+
this._trailing = 0;
|
|
145
|
+
index++;
|
|
156
146
|
}
|
|
157
|
-
i++;
|
|
158
147
|
}
|
|
148
|
+
return buffer;
|
|
159
149
|
}
|
|
160
150
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<prompt>How should I structure a CLI tool with subcommands?</prompt>
|
|
2
|
+
|
|
3
|
+
<reasoning>
|
|
4
|
+
The user is asking about CLI subcommand structure. Let me think through what they likely care about:
|
|
5
|
+
|
|
6
|
+
1. Discoverability — every subcommand needs help text and a flat top-level listing.
|
|
7
|
+
2. Composability — subcommands should be invokable individually for scripting.
|
|
8
|
+
3. Shared concerns — auth, config, logging should not be duplicated per command.
|
|
9
|
+
|
|
10
|
+
A few patterns worth considering:
|
|
11
|
+
|
|
12
|
+
- A single binary that dispatches to subcommand handlers (like `git`, `kubectl`).
|
|
13
|
+
- A plugin model where subcommands live in separate binaries on the PATH (like `git-foo`).
|
|
14
|
+
- A library that each subcommand wraps as a thin executable.
|
|
15
|
+
|
|
16
|
+
The plugin model wins for very large surfaces but adds packaging cost. For a tool with under ~30 subcommands the dispatcher pattern stays clearer.
|
|
17
|
+
</reasoning>
|
|
18
|
+
|
|
19
|
+
For a CLI with a moderate set of subcommands, the dispatcher pattern is usually the right default:
|
|
20
|
+
|
|
21
|
+
1. One binary, one entry point.
|
|
22
|
+
2. Subcommands registered as handlers off a shared root.
|
|
23
|
+
3. Cross-cutting concerns (auth, config, logging) wired in at the root and inherited.
|
|
24
|
+
|
|
25
|
+
If you grow past ~30 subcommands or want third-party extensions, switch to a plugin model where binaries named `<tool>-<subcommand>` are discovered on the `PATH`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<prompt>create a project to track what I order online based on my emails, dont asak me questions</prompt>
|
|
2
|
+
<reasoning>The user wants me to create a project that tracks their online orders based on emails. They don't want me to ask questions - just go ahead and create it. Let me first get the project rules and query for available mailboxes/inboxes.</reasoning>
|
|
3
|
+
<status>Getting the project rules and finding your mailboxes to set this up...</status>
|
|
4
|
+
<toolCall id="toolu_01QJcUw8RZDyemLdvMe8nSGZ" />
|
|
5
|
+
<toolCall id="toolu_01JJZrCc17JqV5r36aR9wcaj" />
|
|
6
|
+
<toolCall id="toolu_012r3VQFxvWZ9UmKxMNiJP48" />
|
|
7
|
+
<reasoning>The mailbox query failed. Let me try a different approach to find mailboxes. Let me also enable the inbox blueprint to find mailboxes, and create the Order schema first. Let me first search for mailboxes with a different query approach.</reasoning>
|
|
8
|
+
<status>Looking for your mailboxes...</status>
|
|
9
|
+
<toolCall id="toolu_01P4ekwYwYJfxUnGFPHNhcCu" />
|
|
10
|
+
<toolCall id="toolu_017NHbtinMDcjmwqN6vLaNQp" />
|
|
11
|
+
<reasoning>I found the mailbox with DXN `dxn:echo:B6ON2Y6HN4KLJWZD75VUUDCUQ552ERQSG:01KNHKXSWWCBZX6TCPMF1M0PDE`. Now I need to: 1. Create an Order schema for tracking online orders 2. Create the project with the right blueprints and subscriptions Let me first create the Order schema, then create the project.</reasoning>
|
|
12
|
+
<status>Found your mailbox. Now creating an Order schema and setting up the project...</status>
|
|
13
|
+
<toolCall id="toolu_01Gk4RcfdB4ttzsVN9mnatWn" />
|
|
14
|
+
<status>Order schema created. Now creating the project...</status>
|
|
15
|
+
<toolCall id="toolu_01QmJcua6jmRx15wnxo5bkNQ" />
|
|
16
|
+
<reasoning>The service isn't available. Let me try again.</reasoning>
|
|
17
|
+
<status>Encountered a temporary service issue. Retrying...</status>
|
|
18
|
+
<toolCall id="toolu_01X4CVxXuBjgW2JESGUEsm6f" />
|
|
19
|
+
<reasoning>The service seems to be temporarily unavailable. Let me try once more.</reasoning>
|
|
20
|
+
<toolCall id="toolu_01S9vi1pMnwqUuxNpe5FU731" />
|
|
21
|
+
Got the project created. Let me know if you need anything else.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<prompt>What is markdown?</prompt>
|
|
2
|
+
|
|
3
|
+
<reasoning>
|
|
4
|
+
The user is asking me to think deeply about what markdown is.
|
|
5
|
+
|
|
6
|
+
But given the context of our conversation - we've been trying to scrape slab data from a website - I think they might be hinting at something specific.
|
|
7
|
+
</reasoning>
|
|
8
|
+
|
|
9
|
+
### Markdown
|
|
10
|
+
|
|
11
|
+
Markdown is a lightweight markup language used to format plain text in a simple and readable way.
|
|
12
|
+
|
|
13
|
+
It allows you to create structured documents using conventions for headings, lists, emphasis (bold/italic), links, images, code, blockquotes, tables, and horizontal rules.
|
|
14
|
+
|
|
15
|
+
Markdown documents look like this
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
# Markdown
|
|
19
|
+
|
|
20
|
+
This is a plain text.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Composer supports extended components via XML tags.
|
|
24
|
+
|
|
25
|
+
<summary>
|
|
26
|
+
The user asked about Markdown.
|
|
27
|
+
|
|
28
|
+
We responded with a summary.
|
|
29
|
+
|
|
30
|
+
</summary>
|
|
@@ -35,3 +35,22 @@ What kind of information are you looking to organize? This will help me suggest
|
|
|
35
35
|
|
|
36
36
|
<summary>OK (1 tool uses · 4.28k tokens · 11.1s)</summary>
|
|
37
37
|
<summary>OK (4.30k tokens · 1.6s)</summary>
|
|
38
|
+
|
|
39
|
+
<reasoning>Based on the rules, this is similar to the "Parcel tracking" example. I should: 1. First create an Order schema 2. Query for mailboxes to subscribe to 3. Query for available blueprints 4. Create the project Let me first ask a couple of qualifying questions, then proceed. Actually, the example is pretty clear - let me set things up. But first let me check for mailboxes and blueprints. Let me query for mailboxes and blueprints in parallel.</reasoning>
|
|
40
|
+
|
|
41
|
+
<reasoning>I found a mailbox at `dxn:echo:B6ON2Y6HN4KLJWZD75VUUDCUQ552ERQSG:01KNHKXSWWCBZX6TCPMF1M0PDE`. Now I have everything I need to create the CRM project. The project should:
|
|
42
|
+
|
|
43
|
+
1. Subscribe to the mailbox
|
|
44
|
+
2. Use database, web-search, and browser blueprints
|
|
45
|
+
3. Extract People and Organizations from emails
|
|
46
|
+
4. Research contacts on the web
|
|
47
|
+
5. Save to database avoiding duplicates
|
|
48
|
+
6. Now I'm building the project structure to tie all these components together.</reasoning>
|
|
49
|
+
|
|
50
|
+
<reasoning>I found the mailbox. Now I have all the information I need to create the CRM project. Let me create it with the appropriate blueprints and subscription to the mailbox. The project should:
|
|
51
|
+
|
|
52
|
+
- Subscribe to the mailbox
|
|
53
|
+
- On every email, extract People and Organizations
|
|
54
|
+
- Save them to the database (checking for duplicates first)
|
|
55
|
+
- Run web searches to enrich contact/org data
|
|
56
|
+
- Blueprints needed: database, web-search, browser</reasoning>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<prompt>Analyze this codebase and suggest improvements.</prompt>
|
|
2
|
+
|
|
3
|
+
<reasoning>
|
|
4
|
+
The user wants a comprehensive analysis of their codebase. I should examine the project structure, identify key patterns, and look for areas that could be improved. Let me start by reviewing the main source files and dependencies.
|
|
5
|
+
</reasoning>
|
|
6
|
+
|
|
7
|
+
I'll start by examining the project structure and key files.
|
|
8
|
+
|
|
9
|
+
<toolCall id="toolu_01ABC123analyze" />
|
|
10
|
+
|
|
11
|
+
<summary>Analyzed 42 files across 8 packages. Found 3 areas for improvement.</summary>
|
|
12
|
+
|
|
13
|
+
Here's what I found after reviewing the codebase:
|
|
14
|
+
|
|
15
|
+
## Architecture
|
|
16
|
+
|
|
17
|
+
The project follows a modular plugin architecture with clear separation of concerns. Each plugin manages its own state and communicates through a shared event bus.
|
|
18
|
+
|
|
19
|
+
## Suggested Improvements
|
|
20
|
+
|
|
21
|
+
1. **Type Safety** — Several utility functions use `any` types that could be narrowed. This would catch bugs at compile time rather than runtime.
|
|
22
|
+
|
|
23
|
+
2. **Error Handling** — The API layer could benefit from structured error types using discriminated unions instead of thrown exceptions.
|
|
24
|
+
|
|
25
|
+
3. **Performance** — The subscription handlers in the data layer create new closures on every update. Memoizing these would reduce GC pressure.
|
|
26
|
+
|
|
27
|
+
<reference ref="dxn:echo:@:123e4567-e89b-12d3-a456-426614174000">ProjectConfig</reference>
|
|
28
|
+
|
|
29
|
+
Would you like me to dive deeper into any of these areas?
|
|
30
|
+
|
|
31
|
+
<select>
|
|
32
|
+
<option>Improve type safety</option>
|
|
33
|
+
<option>Refactor error handling</option>
|
|
34
|
+
<option>Optimize performance</option>
|
|
35
|
+
</select>
|
|
36
|
+
|
|
37
|
+
<suggestion>Show me the specific files that need type improvements</suggestion>
|
|
38
|
+
|
|
39
|
+
<suggestion>Generate a refactoring plan as a document</suggestion>
|
|
40
|
+
|
|
41
|
+
<stats>3 tool uses · 12.4k tokens · 18.2s</stats>
|
|
42
|
+
|
|
43
|
+
<prompt>Improve type safety</prompt>
|
|
44
|
+
|
|
45
|
+
<reasoning>
|
|
46
|
+
The user chose to focus on type safety improvements. I should identify the specific files and patterns where `any` types are used unnecessarily and propose concrete fixes with before/after examples.
|
|
47
|
+
</reasoning>
|
|
48
|
+
|
|
49
|
+
Let me find all the locations where type safety can be improved.
|
|
50
|
+
|
|
51
|
+
<toolCall id="toolu_01DEF456typescan" />
|
|
52
|
+
|
|
53
|
+
<summary>Scanned 42 files. Found 17 instances of unnecessary `any` usage across 6 modules.</summary>
|
|
54
|
+
|
|
55
|
+
Here are the key changes I recommend:
|
|
56
|
+
|
|
57
|
+
### `src/utils/transform.ts`
|
|
58
|
+
|
|
59
|
+
The `transform` function currently accepts `any` for its input parameter. We can use a generic constraint instead:
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
// Before
|
|
63
|
+
const transform = (input: any) => { ... }
|
|
64
|
+
|
|
65
|
+
// After
|
|
66
|
+
const transform = <T extends Record<string, unknown>>(input: T) => { ... }
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### `src/handlers/events.ts`
|
|
70
|
+
|
|
71
|
+
The event handler map uses `any` for callback types. A mapped type would preserve type information:
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
type EventHandlers = {
|
|
75
|
+
[K in keyof EventMap]: (event: EventMap[K]) => void;
|
|
76
|
+
};
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
<stats>1 tool use · 8.7k tokens · 12.1s</stats>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, expect, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { createMessage } from '#testing';
|
|
8
|
+
|
|
9
|
+
import { rehydrateToolWidgetsFromMessages } from './tool-widget-state';
|
|
10
|
+
|
|
11
|
+
describe('rehydrateToolWidgetsFromMessages', () => {
|
|
12
|
+
test('replays toolCall then toolResult in order', () => {
|
|
13
|
+
const calls: Array<{ id: string; kind: 'object' | 'function' }> = [];
|
|
14
|
+
const sink = {
|
|
15
|
+
updateWidget: (id: string, value: unknown) => {
|
|
16
|
+
calls.push({ id, kind: typeof value === 'function' ? 'function' : 'object' });
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const messages = [
|
|
21
|
+
createMessage('assistant', [
|
|
22
|
+
{ _tag: 'toolCall', toolCallId: 't1', name: 'foo', input: '{}', providerExecuted: false },
|
|
23
|
+
{ _tag: 'toolResult', toolCallId: 't1', name: 'foo', result: '{}', providerExecuted: false },
|
|
24
|
+
]),
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
rehydrateToolWidgetsFromMessages(sink, messages);
|
|
28
|
+
|
|
29
|
+
expect(calls).toEqual([
|
|
30
|
+
{ id: 't1', kind: 'object' },
|
|
31
|
+
{ id: 't1', kind: 'function' },
|
|
32
|
+
]);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type ContentBlock, type Message } from '@dxos/types';
|
|
6
|
+
import { type StateDispatch } from '@dxos/ui-editor';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Minimal surface used to push tool call / result blocks into {@link MarkdownStreamController} widget state.
|
|
10
|
+
*/
|
|
11
|
+
export type ToolWidgetStateSink = {
|
|
12
|
+
updateWidget<T>(id: string, value: StateDispatch<T>): void;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Mirrors tool-related branches of {@link blockToMarkdown} so widget props stay in sync with message blocks.
|
|
17
|
+
*/
|
|
18
|
+
export const applyToolBlockToWidgetState = (context: ToolWidgetStateSink, block: ContentBlock.Any): void => {
|
|
19
|
+
switch (block._tag) {
|
|
20
|
+
case 'toolCall': {
|
|
21
|
+
context.updateWidget<{ blocks: ContentBlock.Any[] }>(block.toolCallId, {
|
|
22
|
+
blocks: [block],
|
|
23
|
+
});
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
case 'toolResult': {
|
|
27
|
+
context.updateWidget<{ blocks: ContentBlock.Any[] }>(block.toolCallId, ({ blocks = [] } = { blocks: [] }) => ({
|
|
28
|
+
blocks: [...blocks, block],
|
|
29
|
+
}));
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
default: {
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Re-applies tool widget state after a full document replace (e.g. {@link MarkdownStreamController.setContent}),
|
|
40
|
+
* which clears accumulated widget props via `xmlTagResetEffect`.
|
|
41
|
+
*/
|
|
42
|
+
export const rehydrateToolWidgetsFromMessages = (context: ToolWidgetStateSink, messages: Message.Message[]): void => {
|
|
43
|
+
for (const message of messages) {
|
|
44
|
+
for (const block of message.blocks) {
|
|
45
|
+
applyToolBlockToWidgetState(context, block);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { TogglePanel } from '@dxos/react-ui-components';
|
|
8
|
+
import { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
9
|
+
import { type XmlWidgetProps } from '@dxos/ui-editor';
|
|
10
|
+
|
|
11
|
+
import { type MessageThreadContext } from '../sync';
|
|
12
|
+
|
|
13
|
+
export const FallbackWidget = ({ _tag, ...props }: XmlWidgetProps<MessageThreadContext>) => {
|
|
14
|
+
return (
|
|
15
|
+
<TogglePanel.Root>
|
|
16
|
+
<TogglePanel.Header classNames='bg-group-surface'>{_tag}</TogglePanel.Header>
|
|
17
|
+
<TogglePanel.Content classNames='bg-modal-surface'>
|
|
18
|
+
<TogglePanel.Viewport>
|
|
19
|
+
<JsonHighlighter classNames='p-2! text-sm' data={props} />
|
|
20
|
+
</TogglePanel.Viewport>
|
|
21
|
+
</TogglePanel.Content>
|
|
22
|
+
</TogglePanel.Root>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
FallbackWidget.displayName = 'Fallback';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React, { useEffect, useRef } from 'react';
|
|
7
|
+
|
|
8
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
9
|
+
|
|
10
|
+
import { ReasoningWidget } from './ReasoningWidget';
|
|
11
|
+
|
|
12
|
+
export type DefaultStoryProps = {
|
|
13
|
+
text: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
// TODO(burdon): Generalize factory for DOM widgets.
|
|
17
|
+
const DefaultStory = ({ text }: DefaultStoryProps) => {
|
|
18
|
+
const hostRef = useRef<HTMLDivElement>(null);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
const host = hostRef.current;
|
|
21
|
+
if (!host) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
host.replaceChildren();
|
|
26
|
+
const widget = new ReasoningWidget(text, 0);
|
|
27
|
+
const dom = widget.toDOM();
|
|
28
|
+
host.appendChild(dom);
|
|
29
|
+
widget.updateDOM(dom);
|
|
30
|
+
return () => {
|
|
31
|
+
widget.destroy(dom);
|
|
32
|
+
host.replaceChildren();
|
|
33
|
+
};
|
|
34
|
+
}, [text]);
|
|
35
|
+
|
|
36
|
+
return <div ref={hostRef} />;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const meta = {
|
|
40
|
+
title: 'plugins/plugin-assistant/components/ChatWidgets/ReasoningWidget',
|
|
41
|
+
component: DefaultStory,
|
|
42
|
+
decorators: [withTheme(), withLayout({ layout: 'column' })],
|
|
43
|
+
parameters: {
|
|
44
|
+
layout: 'fullscreen',
|
|
45
|
+
},
|
|
46
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
47
|
+
|
|
48
|
+
export default meta;
|
|
49
|
+
|
|
50
|
+
type Story = StoryObj<typeof meta>;
|
|
51
|
+
|
|
52
|
+
export const Default: Story = {
|
|
53
|
+
args: {
|
|
54
|
+
text: 'The user is asking about nested flex layouts and overflow. I should mention min-height 0 and grid track sizing.',
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const LongText: Story = {
|
|
59
|
+
args: {
|
|
60
|
+
text: [
|
|
61
|
+
'Step 1: Identify the scroll container and ensure it participates in a definite height chain.',
|
|
62
|
+
'Step 2: Apply min-h-0 to flex children that should shrink and scroll.',
|
|
63
|
+
'Step 3: Prefer overflow-y-auto on the leaf viewport, not on every ancestor.',
|
|
64
|
+
'Step 4: Use min-h-0 on the scroll container to ensure it participates in a definite height chain.',
|
|
65
|
+
'Step 5: Use min-w-0 on the scroll container to ensure it participates in a definite width chain.',
|
|
66
|
+
].join('\n\n'),
|
|
67
|
+
},
|
|
68
|
+
};
|