@dxos/plugin-assistant 0.10.0 → 0.11.0
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/PLUGIN.mdl +3 -28
- package/dist/lib/AssistantPlugin.mjs +2 -0
- package/dist/lib/AssistantPlugin.node.mjs +55 -0
- package/dist/lib/AssistantPlugin.node.mjs.map +1 -0
- package/dist/lib/AssistantPlugin.workerd.mjs +43 -0
- package/dist/lib/AssistantPlugin.workerd.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +24 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/chunk-AgentArticle.mjs +52 -0
- package/dist/lib/chunk-AgentArticle.mjs.map +1 -0
- package/dist/lib/chunk-AgentProperties.mjs +35 -0
- package/dist/lib/chunk-AgentProperties.mjs.map +1 -0
- package/dist/lib/chunk-AssistantPlugin.mjs +88 -0
- package/dist/lib/chunk-AssistantPlugin.mjs.map +1 -0
- package/dist/lib/chunk-AssistantSettings.mjs +285 -0
- package/dist/lib/chunk-AssistantSettings.mjs.map +1 -0
- package/dist/lib/chunk-ChatArticle.mjs +121 -0
- package/dist/lib/chunk-ChatArticle.mjs.map +1 -0
- package/dist/lib/chunk-ChatCompanion.mjs +116 -0
- package/dist/lib/chunk-ChatCompanion.mjs.map +1 -0
- package/dist/lib/chunk-ChatDialog.mjs +73 -0
- package/dist/lib/chunk-ChatDialog.mjs.map +1 -0
- package/dist/lib/chunk-IntegrationPrompt.mjs +73 -0
- package/dist/lib/chunk-IntegrationPrompt.mjs.map +1 -0
- package/dist/lib/chunk-SpaceHomePrompt.mjs +104 -0
- package/dist/lib/chunk-SpaceHomePrompt.mjs.map +1 -0
- package/dist/lib/chunk-SpaceHomeSuggestions.mjs +60 -0
- package/dist/lib/chunk-SpaceHomeSuggestions.mjs.map +1 -0
- package/dist/lib/chunk-TracePanel.mjs +127 -0
- package/dist/lib/chunk-TracePanel.mjs.map +1 -0
- package/dist/lib/chunk-TracePanel2.mjs +7 -0
- package/dist/lib/chunk-TracePanel2.mjs.map +1 -0
- package/dist/lib/chunk-TriggerStatus.mjs +72 -0
- package/dist/lib/chunk-TriggerStatus.mjs.map +1 -0
- package/dist/lib/chunk-agent-hydrator.mjs +22 -0
- package/dist/lib/chunk-agent-hydrator.mjs.map +1 -0
- package/dist/lib/chunk-agent-service.mjs +21 -0
- package/dist/lib/chunk-agent-service.mjs.map +1 -0
- package/dist/lib/{neutral/ai-context-LIKJYMIN.mjs → chunk-ai-context.mjs} +8 -12
- package/dist/lib/chunk-ai-context.mjs.map +1 -0
- package/dist/lib/chunk-ai-service.mjs +27 -0
- package/dist/lib/chunk-ai-service.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +179 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
- package/dist/lib/chunk-automation-templates.mjs +99 -0
- package/dist/lib/chunk-automation-templates.mjs.map +1 -0
- package/dist/lib/chunk-companion-chat-provisioner.mjs +123 -0
- package/dist/lib/chunk-companion-chat-provisioner.mjs.map +1 -0
- package/dist/lib/chunk-connector.mjs +60 -0
- package/dist/lib/chunk-connector.mjs.map +1 -0
- package/dist/lib/chunk-constants.mjs +9 -0
- package/dist/lib/chunk-constants.mjs.map +1 -0
- package/dist/lib/chunk-context.mjs +7 -0
- package/dist/lib/chunk-context.mjs.map +1 -0
- package/dist/lib/chunk-create-chat.mjs +53 -0
- package/dist/lib/chunk-create-chat.mjs.map +1 -0
- package/dist/lib/chunk-create-object.mjs +70 -0
- package/dist/lib/chunk-create-object.mjs.map +1 -0
- package/dist/lib/chunk-edge-model-resolver.mjs +64 -0
- package/dist/lib/chunk-edge-model-resolver.mjs.map +1 -0
- package/dist/lib/chunk-ensure-companion-chat.mjs +49 -0
- package/dist/lib/chunk-ensure-companion-chat.mjs.map +1 -0
- package/dist/lib/chunk-extensions.mjs +78 -0
- package/dist/lib/chunk-extensions.mjs.map +1 -0
- package/dist/lib/chunk-fork-chat.mjs +83 -0
- package/dist/lib/chunk-fork-chat.mjs.map +1 -0
- package/dist/lib/chunk-generate-home-suggestions.mjs +71 -0
- package/dist/lib/chunk-generate-home-suggestions.mjs.map +1 -0
- package/dist/lib/chunk-local-model-resolver.mjs +25 -0
- package/dist/lib/chunk-local-model-resolver.mjs.map +1 -0
- package/dist/lib/chunk-markdown-extension.mjs +27 -0
- package/dist/lib/chunk-markdown-extension.mjs.map +1 -0
- package/dist/lib/{neutral/chunk-L7AR4VTA.mjs → chunk-meta.mjs} +20 -25
- package/dist/lib/chunk-meta.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +13 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -0
- package/dist/lib/chunk-paths.mjs +8 -0
- package/dist/lib/chunk-paths.mjs.map +1 -0
- package/dist/lib/chunk-processor.mjs +432 -0
- package/dist/lib/chunk-processor.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +177 -0
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/chunk-run-prompt-in-new-chat.mjs +96 -0
- package/dist/lib/chunk-run-prompt-in-new-chat.mjs.map +1 -0
- package/dist/lib/chunk-set-current-chat.mjs +43 -0
- package/dist/lib/chunk-set-current-chat.mjs.map +1 -0
- package/dist/lib/chunk-settings.mjs +23 -0
- package/dist/lib/chunk-settings.mjs.map +1 -0
- package/dist/lib/chunk-skill-definition.mjs +42 -0
- package/dist/lib/chunk-skill-definition.mjs.map +1 -0
- package/dist/lib/chunk-skills.mjs +19 -0
- package/dist/lib/chunk-skills.mjs.map +1 -0
- package/dist/lib/chunk-state.mjs +32 -0
- package/dist/lib/chunk-state.mjs.map +1 -0
- package/dist/lib/chunk-toggle-trace-panel-debug.mjs +18 -0
- package/dist/lib/chunk-toggle-trace-panel-debug.mjs.map +1 -0
- package/dist/lib/chunk-toolkit.mjs +12 -0
- package/dist/lib/chunk-toolkit.mjs.map +1 -0
- package/dist/lib/chunk-types.mjs +332 -0
- package/dist/lib/chunk-types.mjs.map +1 -0
- package/dist/lib/chunk-update-chat-name.mjs +63 -0
- package/dist/lib/chunk-update-chat-name.mjs.map +1 -0
- package/dist/lib/components.mjs +2616 -0
- package/dist/lib/components.mjs.map +1 -0
- package/dist/lib/containers.mjs +17 -0
- package/dist/lib/containers.mjs.map +1 -0
- package/dist/lib/execution-graph.mjs +961 -0
- package/dist/lib/execution-graph.mjs.map +1 -0
- package/dist/lib/extensions.mjs +2 -0
- package/dist/lib/hooks.mjs +674 -0
- package/dist/lib/hooks.mjs.map +1 -0
- package/dist/lib/index.mjs +5 -0
- package/dist/lib/meta.mjs +2 -0
- package/dist/lib/operations.mjs +7 -0
- package/dist/lib/operations.mjs.map +1 -0
- package/dist/lib/plugin.mjs +9 -0
- package/dist/lib/plugin.mjs.map +1 -0
- package/dist/lib/plugin.workerd.mjs +2 -0
- package/dist/lib/skills.mjs +2 -0
- package/dist/lib/testing.mjs +2 -0
- package/dist/lib/translations.mjs +207 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +2 -0
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/AssistantPlugin.node.d.ts.map +1 -1
- package/dist/types/src/AssistantPlugin.workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/AssistantSurfaces.d.ts +22 -0
- package/dist/types/src/capabilities/AssistantSurfaces.d.ts.map +1 -0
- package/dist/types/src/capabilities/agent-hydrator.d.ts +1 -1
- package/dist/types/src/capabilities/agent-service.d.ts +1 -1
- package/dist/types/src/capabilities/agent-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-context.d.ts +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +12 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/automation-templates.d.ts +1 -1
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +1 -1
- package/dist/types/src/capabilities/connector.d.ts +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +1 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +0 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown-extension.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/standalone-chats-query.test.d.ts +2 -0
- package/dist/types/src/capabilities/standalone-chats-query.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +1 -1
- package/dist/types/src/components/AgentProperties/AgentProperties.d.ts +4 -1
- package/dist/types/src/components/AgentProperties/AgentProperties.d.ts.map +1 -1
- package/dist/types/src/components/AgentProperties/AgentProperties.stories.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +21 -8
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/{Chat.stories.d.ts → Error.stories.d.ts} +1 -1
- package/dist/types/src/components/Chat/Error.stories.d.ts.map +1 -0
- package/dist/types/src/components/Chat/context.d.ts +8 -0
- package/dist/types/src/components/Chat/context.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +5 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/Chat/thread.d.ts +42 -0
- package/dist/types/src/components/Chat/thread.d.ts.map +1 -0
- package/dist/types/src/components/Chat/thread.test.d.ts +2 -0
- package/dist/types/src/components/Chat/thread.test.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +5 -3
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +0 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Anchor.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +8 -3
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +30 -2
- 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/index.d.ts +1 -0
- package/dist/types/src/components/ChatThread/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/sync/index.d.ts +3 -0
- package/dist/types/src/components/ChatThread/sync/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/{sync.d.ts → sync/sync.d.ts} +46 -2
- package/dist/types/src/components/ChatThread/sync/sync.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync/sync.test.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync/tool-widget-state.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync/tool-widget-state.test.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/BranchWidget.d.ts +15 -0
- package/dist/types/src/components/ChatThread/widgets/BranchWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/BranchWidget.stories.d.ts +21 -0
- package/dist/types/src/components/ChatThread/widgets/BranchWidget.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/BranchWidget.test.d.ts +2 -0
- package/dist/types/src/components/ChatThread/widgets/BranchWidget.test.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts +1 -2
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/defaults.d.ts +6 -0
- package/dist/types/src/components/ChatThread/widgets/defaults.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/format-time.d.ts +2 -0
- package/dist/types/src/components/ChatThread/widgets/format-time.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts +4 -1
- package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/is-tool-message.d.ts +3 -0
- package/dist/types/src/components/ChatThread/widgets/is-tool-message.d.ts.map +1 -0
- package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.d.ts +16 -0
- package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.d.ts.map +1 -0
- package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.stories.d.ts +210 -0
- package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.stories.d.ts.map +1 -0
- package/dist/types/src/components/ConnectorAuthMenu/index.d.ts +2 -0
- package/dist/types/src/components/ConnectorAuthMenu/index.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +1 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -1
- package/dist/types/src/components/TaskList/TaskList.d.ts +9 -11
- package/dist/types/src/components/TaskList/TaskList.d.ts.map +1 -1
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts +3 -4
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts.map +1 -1
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +1 -2
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/ToolBlock/index.d.ts +1 -0
- package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -1
- package/dist/types/src/components/ToolBlock/is-tool-message.d.ts +3 -0
- package/dist/types/src/components/ToolBlock/is-tool-message.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts +5 -2
- package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -1
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts +4 -1
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -1
- package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts +4 -1
- package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/containers/AssistantSettings/AssistantSettings.stories.d.ts +4 -1
- package/dist/types/src/containers/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -1
- package/dist/types/src/containers/AssistantSettings/OllamaModels.d.ts +4 -6
- package/dist/types/src/containers/AssistantSettings/OllamaModels.d.ts.map +1 -1
- package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts +22 -1
- package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts +4 -1
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/containers/IntegrationPrompt/IntegrationPrompt.d.ts +4 -7
- package/dist/types/src/containers/IntegrationPrompt/IntegrationPrompt.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomePrompt/SpaceHomePrompt.d.ts +4 -9
- package/dist/types/src/containers/SpaceHomePrompt/SpaceHomePrompt.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.d.ts +5 -7
- package/dist/types/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts +1 -1
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -1
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +15 -1
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +0 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts +12 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -1
- package/dist/types/src/execution-graph/index.d.ts +1 -1
- package/dist/types/src/execution-graph/index.d.ts.map +1 -1
- package/dist/types/src/execution-graph/pending-block-status.d.ts.map +1 -1
- package/dist/types/src/execution-graph/span-tree.d.ts +17 -0
- package/dist/types/src/execution-graph/span-tree.d.ts.map +1 -1
- package/dist/types/src/feed-logger.d.ts +1 -1
- package/dist/types/src/feed-logger.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextObjects.d.ts +1 -1
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
- package/dist/types/src/hooks/useSelectionContext.d.ts +13 -0
- package/dist/types/src/hooks/useSelectionContext.d.ts.map +1 -0
- package/dist/types/src/hooks/useSelectionContext.test.d.ts +2 -0
- package/dist/types/src/hooks/useSelectionContext.test.d.ts.map +1 -0
- package/dist/types/src/hooks/useTraceMessages.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/processor/index.d.ts +1 -0
- package/dist/types/src/processor/index.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +5 -2
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/processor/prompt.d.ts +18 -0
- package/dist/types/src/processor/prompt.d.ts.map +1 -0
- package/dist/types/src/processor/prompt.test.d.ts +2 -0
- package/dist/types/src/processor/prompt.test.d.ts.map +1 -0
- package/dist/types/src/processor/streaming.node.test.d.ts +2 -0
- package/dist/types/src/processor/streaming.node.test.d.ts.map +1 -0
- package/dist/types/src/skills/assistant/skill.d.ts.map +1 -1
- package/dist/types/src/templates/scaffold.d.ts +1 -1
- package/dist/types/src/templates/scaffold.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/AssistantCapabilities.d.ts +1 -1
- package/dist/types/src/types/AssistantCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/AssistantOperation.d.ts +2 -13
- package/dist/types/src/types/AssistantOperation.d.ts.map +1 -1
- package/dist/types/src/types/ChatSurface.d.ts +2 -2
- package/dist/types/src/types/ChatSurface.d.ts.map +1 -1
- package/dist/types/src/types/Ollama.d.ts +1 -1
- package/dist/types/src/types/Ollama.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +1 -0
- package/package.json +106 -105
- package/src/AssistantPlugin.node.ts +1 -2
- package/src/AssistantPlugin.test.ts +60 -62
- package/src/AssistantPlugin.ts +1 -10
- package/src/AssistantPlugin.workerd.ts +1 -2
- package/src/capabilities/AssistantSurfaces.tsx +86 -0
- package/src/capabilities/agent-service.ts +1 -1
- package/src/capabilities/app-graph-builder.ts +31 -17
- package/src/capabilities/companion-chat-provisioner.ts +12 -11
- package/src/capabilities/connector.ts +3 -3
- package/src/capabilities/edge-model-resolver.ts +5 -2
- package/src/capabilities/index.ts +0 -2
- package/src/capabilities/react-surface.ts +135 -0
- package/src/capabilities/skill-definition.ts +4 -0
- package/src/capabilities/standalone-chats-query.test.ts +51 -0
- package/src/capabilities/state.ts +1 -1
- package/src/components/AgentProperties/AgentProperties.stories.tsx +6 -7
- package/src/components/AgentProperties/AgentProperties.tsx +37 -30
- package/src/components/Chat/Chat.tsx +275 -59
- package/src/components/Chat/{Chat.stories.tsx → Error.stories.tsx} +1 -1
- package/src/components/Chat/context.ts +8 -0
- package/src/components/Chat/events.ts +5 -0
- package/src/components/Chat/thread.test.ts +127 -0
- package/src/components/Chat/thread.ts +87 -0
- package/src/components/ChatPrompt/ChatActions.tsx +8 -8
- package/src/components/ChatPrompt/ChatMcpErrors.tsx +2 -2
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +2 -1
- package/src/components/ChatPrompt/ChatOptions.tsx +5 -5
- package/src/components/ChatPrompt/ChatPrompt.tsx +33 -6
- package/src/components/ChatPrompt/index.ts +0 -1
- package/src/components/ChatThread/Anchor.stories.tsx +2 -1
- package/src/components/ChatThread/ChatThread.stories.tsx +99 -4
- package/src/components/ChatThread/ChatThread.tsx +34 -6
- package/src/components/ChatThread/Link.tsx +1 -0
- package/src/components/ChatThread/index.ts +2 -0
- package/src/components/ChatThread/registry.tsx +28 -4
- package/src/components/ChatThread/sync/index.ts +6 -0
- package/src/components/ChatThread/{sync.test.ts → sync/sync.test.ts} +167 -7
- package/src/components/ChatThread/{sync.ts → sync/sync.ts} +97 -3
- package/src/components/ChatThread/{tool-widget-state.ts → sync/tool-widget-state.ts} +1 -3
- package/src/components/ChatThread/widgets/BranchWidget.stories.tsx +83 -0
- package/src/components/ChatThread/widgets/BranchWidget.test.ts +55 -0
- package/src/components/ChatThread/widgets/BranchWidget.tsx +61 -0
- package/src/components/ChatThread/widgets/FallbackWidget.tsx +2 -2
- package/src/components/ChatThread/widgets/ReasoningWidget.ts +1 -1
- package/src/components/ChatThread/widgets/ReferenceWidget.ts +1 -6
- package/src/components/ChatThread/widgets/SuggestionWidget.ts +12 -3
- package/src/components/ChatThread/widgets/SummaryWidget.tsx +1 -1
- package/src/components/ChatThread/widgets/ToolWidget.tsx +15 -9
- package/src/components/ChatThread/widgets/defaults.ts +7 -1
- package/src/components/ChatThread/widgets/format-time.ts +45 -0
- package/src/components/ChatThread/widgets/index.ts +4 -1
- package/src/components/ChatThread/widgets/is-tool-message.ts +13 -0
- package/src/components/ConnectorAuthMenu/ConnectorAuthMenu.stories.tsx +177 -0
- package/src/components/ConnectorAuthMenu/ConnectorAuthMenu.tsx +82 -0
- package/src/components/ConnectorAuthMenu/index.ts +5 -0
- package/src/components/ProcessTree/ProcessTree.stories.tsx +1 -1
- package/src/components/TaskList/TaskList.stories.tsx +19 -26
- package/src/components/TaskList/TaskList.tsx +32 -104
- package/src/components/ToolBlock/ToolBlock.tsx +1 -5
- package/src/components/ToolBlock/index.ts +1 -0
- package/src/components/ToolBlock/is-tool-message.ts +13 -0
- package/src/components/Toolbox/Toolbox.tsx +1 -1
- package/src/components/index.ts +1 -0
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +18 -11
- package/src/containers/AgentArticle/AgentArticle.tsx +27 -151
- package/src/containers/AgentProperties/AgentProperties.tsx +21 -17
- package/src/containers/AssistantSettings/AssistantSettings.tsx +2 -0
- package/src/containers/AssistantSettings/OllamaModels.tsx +6 -4
- package/src/containers/ChatArticle/ChatArticle.stories.tsx +200 -27
- package/src/containers/ChatArticle/ChatArticle.tsx +25 -5
- package/src/containers/ChatCompanion/ChatCompanion.tsx +45 -10
- package/src/containers/ChatDialog/ChatDialog.tsx +4 -1
- package/src/containers/IntegrationPrompt/IntegrationPrompt.tsx +9 -6
- package/src/containers/SpaceHomePrompt/SpaceHomePrompt.tsx +2 -0
- package/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.tsx +40 -39
- package/src/containers/TracePanel/TracePanel.stories.tsx +9 -4
- package/src/containers/TracePanel/TracePanel.tsx +22 -6
- package/src/containers/TriggerStatus/TriggerStatus.tsx +9 -16
- package/src/containers/index.ts +0 -1
- package/src/execution-graph/SPEC.md +60 -2
- package/src/execution-graph/execution-graph.ts +15 -2
- package/src/execution-graph/index.ts +1 -0
- package/src/execution-graph/pending-block-status.ts +3 -2
- package/src/execution-graph/span-tree.test.ts +87 -1
- package/src/execution-graph/span-tree.ts +95 -0
- package/src/feed-logger.ts +6 -6
- package/src/hooks/index.ts +1 -1
- package/src/hooks/useChatProcessor.ts +2 -1
- package/src/hooks/useChatToolbarActions.ts +22 -19
- package/src/hooks/useContextObjects.ts +9 -3
- package/src/hooks/useSelectionContext.test.ts +93 -0
- package/src/hooks/useSelectionContext.ts +72 -0
- package/src/hooks/useSkillRegistry.ts +1 -1
- package/src/hooks/useTraceMessages.ts +5 -3
- package/src/operations/create-chat.ts +2 -2
- package/src/operations/fork-chat.ts +2 -2
- package/src/operations/generate-home-suggestions.test.ts +2 -2
- package/src/operations/index.ts +0 -1
- package/src/operations/prompt.node.test.ts +1 -1
- package/src/paths.ts +3 -3
- package/src/processor/index.ts +1 -0
- package/src/processor/processor.node.test.ts +1 -1
- package/src/processor/processor.ts +33 -5
- package/src/processor/prompt.test.ts +37 -0
- package/src/processor/prompt.ts +42 -0
- package/src/processor/streaming.node.test.ts +196 -0
- package/src/skills/assistant/skill.node.test.ts +2 -2
- package/src/skills/assistant/skill.ts +3 -5
- package/src/templates/routine-templates.test.ts +1 -2
- package/src/templates/scaffold.ts +3 -3
- package/src/testing/data/trace-timeline-multiple.dx.json +1 -1
- package/src/testing/data/trace-timeline-remote.dx.json +1 -1
- package/src/testing/data/trace-timeline.dx.json +1 -2
- package/src/testing/trace-timeline.node.test.ts +3 -3
- package/src/translations.ts +11 -10
- package/src/types/AssistantCapabilities.ts +1 -1
- package/src/types/AssistantOperation.ts +8 -31
- package/src/types/ChatSurface.ts +3 -3
- package/src/types/Ollama.ts +1 -1
- package/dist/lib/neutral/AgentArticle-GV6EEW3I.mjs +0 -161
- package/dist/lib/neutral/AgentArticle-GV6EEW3I.mjs.map +0 -7
- package/dist/lib/neutral/AgentProperties-LFTEYJ54.mjs +0 -40
- package/dist/lib/neutral/AgentProperties-LFTEYJ54.mjs.map +0 -7
- package/dist/lib/neutral/AssistantPlugin.mjs +0 -10
- package/dist/lib/neutral/AssistantPlugin.mjs.map +0 -7
- package/dist/lib/neutral/AssistantPlugin.node.mjs +0 -72
- package/dist/lib/neutral/AssistantPlugin.node.mjs.map +0 -7
- package/dist/lib/neutral/AssistantPlugin.workerd.mjs +0 -13
- package/dist/lib/neutral/AssistantPlugin.workerd.mjs.map +0 -7
- package/dist/lib/neutral/AssistantSettings-3N5M5VCN.mjs +0 -302
- package/dist/lib/neutral/AssistantSettings-3N5M5VCN.mjs.map +0 -7
- package/dist/lib/neutral/ChatArticle-OO7GGEFW.mjs +0 -8
- package/dist/lib/neutral/ChatArticle-OO7GGEFW.mjs.map +0 -7
- package/dist/lib/neutral/ChatCompanion-GIFJRY6I.mjs +0 -128
- package/dist/lib/neutral/ChatCompanion-GIFJRY6I.mjs.map +0 -7
- package/dist/lib/neutral/ChatDialog-5MXN4MXS.mjs +0 -74
- package/dist/lib/neutral/ChatDialog-5MXN4MXS.mjs.map +0 -7
- package/dist/lib/neutral/IntegrationPrompt-2HJQFYJE.mjs +0 -72
- package/dist/lib/neutral/IntegrationPrompt-2HJQFYJE.mjs.map +0 -7
- package/dist/lib/neutral/PlanArticle-VPK2IYWU.mjs +0 -34
- package/dist/lib/neutral/PlanArticle-VPK2IYWU.mjs.map +0 -7
- package/dist/lib/neutral/SpaceHomePrompt-ISAB76LD.mjs +0 -114
- package/dist/lib/neutral/SpaceHomePrompt-ISAB76LD.mjs.map +0 -7
- package/dist/lib/neutral/SpaceHomeSuggestions-IDH77QQR.mjs +0 -63
- package/dist/lib/neutral/SpaceHomeSuggestions-IDH77QQR.mjs.map +0 -7
- package/dist/lib/neutral/TracePanel-JKNWADJ4.mjs +0 -12
- package/dist/lib/neutral/TracePanel-JKNWADJ4.mjs.map +0 -7
- package/dist/lib/neutral/TriggerStatus-FURRBHYA.mjs +0 -95
- package/dist/lib/neutral/TriggerStatus-FURRBHYA.mjs.map +0 -7
- package/dist/lib/neutral/agent-hydrator-OBO3RHLO.mjs +0 -23
- package/dist/lib/neutral/agent-hydrator-OBO3RHLO.mjs.map +0 -7
- package/dist/lib/neutral/agent-service-XFJ4VQMT.mjs +0 -32
- package/dist/lib/neutral/agent-service-XFJ4VQMT.mjs.map +0 -7
- package/dist/lib/neutral/ai-context-LIKJYMIN.mjs.map +0 -7
- package/dist/lib/neutral/ai-service-DM6YXWUC.mjs +0 -44
- package/dist/lib/neutral/ai-service-DM6YXWUC.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-OPVOEQY7.mjs +0 -249
- package/dist/lib/neutral/app-graph-builder-OPVOEQY7.mjs.map +0 -7
- package/dist/lib/neutral/automation-templates-MADJLXGJ.mjs +0 -97
- package/dist/lib/neutral/automation-templates-MADJLXGJ.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/index.mjs +0 -47
- package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
- package/dist/lib/neutral/chunk-5IHQ52KJ.mjs +0 -9
- package/dist/lib/neutral/chunk-5IHQ52KJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-6Q4OBGIK.mjs +0 -420
- package/dist/lib/neutral/chunk-6Q4OBGIK.mjs.map +0 -7
- package/dist/lib/neutral/chunk-BXI2R4OO.mjs +0 -410
- package/dist/lib/neutral/chunk-BXI2R4OO.mjs.map +0 -7
- package/dist/lib/neutral/chunk-CMPLPDYE.mjs +0 -30
- package/dist/lib/neutral/chunk-CMPLPDYE.mjs.map +0 -7
- package/dist/lib/neutral/chunk-GPHT3HYS.mjs +0 -8
- package/dist/lib/neutral/chunk-GPHT3HYS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-HKLSFB5I.mjs +0 -90
- package/dist/lib/neutral/chunk-HKLSFB5I.mjs.map +0 -7
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-L7AR4VTA.mjs.map +0 -7
- package/dist/lib/neutral/chunk-LS72HWMM.mjs +0 -42
- package/dist/lib/neutral/chunk-LS72HWMM.mjs.map +0 -7
- package/dist/lib/neutral/chunk-OZWZGIV2.mjs +0 -12
- package/dist/lib/neutral/chunk-OZWZGIV2.mjs.map +0 -7
- package/dist/lib/neutral/chunk-QOKLFHUS.mjs +0 -13
- package/dist/lib/neutral/chunk-QOKLFHUS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-SCTHQVIJ.mjs +0 -155
- package/dist/lib/neutral/chunk-SCTHQVIJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-U4LTLBAX.mjs +0 -56
- package/dist/lib/neutral/chunk-U4LTLBAX.mjs.map +0 -7
- package/dist/lib/neutral/chunk-UPKFUZ6V.mjs +0 -115
- package/dist/lib/neutral/chunk-UPKFUZ6V.mjs.map +0 -7
- package/dist/lib/neutral/chunk-V2Y4XE3O.mjs +0 -12
- package/dist/lib/neutral/chunk-V2Y4XE3O.mjs.map +0 -7
- package/dist/lib/neutral/chunk-VTK5R4H3.mjs +0 -9
- package/dist/lib/neutral/chunk-VTK5R4H3.mjs.map +0 -7
- package/dist/lib/neutral/chunk-XVGEJWJX.mjs +0 -133
- package/dist/lib/neutral/chunk-XVGEJWJX.mjs.map +0 -7
- package/dist/lib/neutral/companion-chat-provisioner-IQV5VIVE.mjs +0 -126
- package/dist/lib/neutral/companion-chat-provisioner-IQV5VIVE.mjs.map +0 -7
- package/dist/lib/neutral/components/index.mjs +0 -2527
- package/dist/lib/neutral/components/index.mjs.map +0 -7
- package/dist/lib/neutral/connector-ITLLTBPZ.mjs +0 -70
- package/dist/lib/neutral/connector-ITLLTBPZ.mjs.map +0 -7
- package/dist/lib/neutral/containers/index.mjs +0 -31
- package/dist/lib/neutral/containers/index.mjs.map +0 -7
- package/dist/lib/neutral/create-chat-YGVZZYGP.mjs +0 -56
- package/dist/lib/neutral/create-chat-YGVZZYGP.mjs.map +0 -7
- package/dist/lib/neutral/create-object-5PAEJ6KM.mjs +0 -76
- package/dist/lib/neutral/create-object-5PAEJ6KM.mjs.map +0 -7
- package/dist/lib/neutral/edge-model-resolver-WDJWDZTT.mjs +0 -55
- package/dist/lib/neutral/edge-model-resolver-WDJWDZTT.mjs.map +0 -7
- package/dist/lib/neutral/ensure-companion-chat-AMOF3C66.mjs +0 -58
- package/dist/lib/neutral/ensure-companion-chat-AMOF3C66.mjs.map +0 -7
- package/dist/lib/neutral/execution-graph/index.mjs +0 -977
- package/dist/lib/neutral/execution-graph/index.mjs.map +0 -7
- package/dist/lib/neutral/extensions/index.mjs +0 -8
- package/dist/lib/neutral/extensions/index.mjs.map +0 -7
- package/dist/lib/neutral/fork-chat-RMAAYYQF.mjs +0 -92
- package/dist/lib/neutral/fork-chat-RMAAYYQF.mjs.map +0 -7
- package/dist/lib/neutral/generate-home-suggestions-6MM2XWPV.mjs +0 -93
- package/dist/lib/neutral/generate-home-suggestions-6MM2XWPV.mjs.map +0 -7
- package/dist/lib/neutral/hooks/index.mjs +0 -877
- package/dist/lib/neutral/hooks/index.mjs.map +0 -7
- package/dist/lib/neutral/index.mjs +0 -42
- package/dist/lib/neutral/index.mjs.map +0 -7
- package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs +0 -24
- package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs.map +0 -7
- package/dist/lib/neutral/markdown-extension-R4TKDTIF.mjs +0 -41
- package/dist/lib/neutral/markdown-extension-R4TKDTIF.mjs.map +0 -7
- package/dist/lib/neutral/meta.json +0 -1
- package/dist/lib/neutral/meta.mjs +0 -12
- package/dist/lib/neutral/meta.mjs.map +0 -7
- package/dist/lib/neutral/migrations-7DEMVBOG.mjs +0 -28
- package/dist/lib/neutral/migrations-7DEMVBOG.mjs.map +0 -7
- package/dist/lib/neutral/navigation-resolver-PYGP2DAW.mjs +0 -18
- package/dist/lib/neutral/navigation-resolver-PYGP2DAW.mjs.map +0 -7
- package/dist/lib/neutral/operation-handler-2LEN45GP.mjs +0 -8
- package/dist/lib/neutral/operation-handler-2LEN45GP.mjs.map +0 -7
- package/dist/lib/neutral/operations/index.mjs +0 -8
- package/dist/lib/neutral/operations/index.mjs.map +0 -7
- package/dist/lib/neutral/plugin.mjs +0 -16
- package/dist/lib/neutral/plugin.mjs.map +0 -7
- package/dist/lib/neutral/plugin.workerd.mjs +0 -13
- package/dist/lib/neutral/plugin.workerd.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-HEJEK44F.mjs +0 -171
- package/dist/lib/neutral/react-surface-HEJEK44F.mjs.map +0 -7
- package/dist/lib/neutral/resolve-navigation-targets-PBQ3OLUE.mjs +0 -28
- package/dist/lib/neutral/resolve-navigation-targets-PBQ3OLUE.mjs.map +0 -7
- package/dist/lib/neutral/run-prompt-in-new-chat-RNUJE2FM.mjs +0 -102
- package/dist/lib/neutral/run-prompt-in-new-chat-RNUJE2FM.mjs.map +0 -7
- package/dist/lib/neutral/set-current-chat-VWBPSIMZ.mjs +0 -48
- package/dist/lib/neutral/set-current-chat-VWBPSIMZ.mjs.map +0 -7
- package/dist/lib/neutral/settings-7Q3RITIT.mjs +0 -28
- package/dist/lib/neutral/settings-7Q3RITIT.mjs.map +0 -7
- package/dist/lib/neutral/skill-definition-553MQRTR.mjs +0 -8
- package/dist/lib/neutral/skill-definition-553MQRTR.mjs.map +0 -7
- package/dist/lib/neutral/skills/index.mjs +0 -8
- package/dist/lib/neutral/skills/index.mjs.map +0 -7
- package/dist/lib/neutral/state-4LGAKSSD.mjs +0 -34
- package/dist/lib/neutral/state-4LGAKSSD.mjs.map +0 -7
- package/dist/lib/neutral/testing.mjs +0 -8
- package/dist/lib/neutral/testing.mjs.map +0 -7
- package/dist/lib/neutral/toggle-trace-panel-debug-JGTB6KVJ.mjs +0 -21
- package/dist/lib/neutral/toggle-trace-panel-debug-JGTB6KVJ.mjs.map +0 -7
- package/dist/lib/neutral/toolkit-ETWLG5NT.mjs +0 -8
- package/dist/lib/neutral/toolkit-ETWLG5NT.mjs.map +0 -7
- package/dist/lib/neutral/translations.mjs +0 -217
- package/dist/lib/neutral/translations.mjs.map +0 -7
- package/dist/lib/neutral/types/index.mjs +0 -24
- package/dist/lib/neutral/types/index.mjs.map +0 -7
- package/dist/lib/neutral/update-chat-name-IJJELRR6.mjs +0 -61
- package/dist/lib/neutral/update-chat-name-IJJELRR6.mjs.map +0 -7
- package/dist/types/src/capabilities/migrations.d.ts +0 -5
- package/dist/types/src/capabilities/migrations.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +0 -1
- package/dist/types/src/components/Chat/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +0 -10
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/sync.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/sync.test.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts.map +0 -1
- package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts +0 -6
- package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts.map +0 -1
- package/dist/types/src/containers/PlanArticle/index.d.ts +0 -2
- package/dist/types/src/containers/PlanArticle/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useFlush.d.ts +0 -6
- package/dist/types/src/hooks/useFlush.d.ts.map +0 -1
- package/dist/types/src/operations/resolve-navigation-targets.d.ts +0 -5
- package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +0 -1
- package/src/AssistantPlugin.conversations.json +0 -1
- package/src/capabilities/migrations.ts +0 -28
- package/src/capabilities/navigation-resolver.ts +0 -20
- package/src/capabilities/react-surface.tsx +0 -177
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +0 -42
- package/src/components/ChatThread/DEBUG.md +0 -64
- package/src/containers/PlanArticle/PlanArticle.tsx +0 -37
- package/src/containers/PlanArticle/index.ts +0 -5
- package/src/hooks/useFlush.ts +0 -35
- package/src/operations/resolve-navigation-targets.ts +0 -44
- /package/dist/types/src/components/ChatThread/{sync.test.d.ts → sync/sync.test.d.ts} +0 -0
- /package/dist/types/src/components/ChatThread/{tool-widget-state.d.ts → sync/tool-widget-state.d.ts} +0 -0
- /package/dist/types/src/components/ChatThread/{tool-widget-state.test.d.ts → sync/tool-widget-state.test.d.ts} +0 -0
- /package/src/components/ChatThread/{tool-widget-state.test.ts → sync/tool-widget-state.test.ts} +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// Surface components that cannot be expressed as a `props` mapper, because they call hooks or compose.
|
|
6
|
+
|
|
7
|
+
import React, { useEffect } from 'react';
|
|
8
|
+
|
|
9
|
+
import { useSettingsState } from '@dxos/app-framework/ui';
|
|
10
|
+
import { type AppCapabilities } from '@dxos/app-toolkit';
|
|
11
|
+
import { useActiveSpace, useHomeVisibility } from '@dxos/app-toolkit/ui';
|
|
12
|
+
import { getSpace } from '@dxos/client/echo';
|
|
13
|
+
import { Instructions } from '@dxos/compute';
|
|
14
|
+
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
15
|
+
import { Feed, Obj } from '@dxos/echo';
|
|
16
|
+
import { log } from '@dxos/log';
|
|
17
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
18
|
+
import { Panel } from '@dxos/react-ui';
|
|
19
|
+
|
|
20
|
+
import { AssistantSettings, SpaceHomeSuggestions, TracePanel, TriggerStatus } from '#containers';
|
|
21
|
+
import { type Assistant } from '#types';
|
|
22
|
+
|
|
23
|
+
export type AssistantSettingsSurfaceProps = {
|
|
24
|
+
subject: AppCapabilities.Settings;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const AssistantSettingsSurface = ({ subject }: AssistantSettingsSurfaceProps) => {
|
|
28
|
+
const { settings, updateSettings } = useSettingsState<Assistant.Settings>(subject.atom);
|
|
29
|
+
|
|
30
|
+
return <AssistantSettings settings={settings} onSettingsChange={updateSettings} />;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type SpaceHomeSuggestionsSurfaceProps = {
|
|
34
|
+
space: Space;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** Suggestions are dismissible per space, so visibility is durable UI state rather than surface data. */
|
|
38
|
+
export const SpaceHomeSuggestionsSurface = ({ space }: SpaceHomeSuggestionsSurfaceProps) => {
|
|
39
|
+
const { visible, hide } = useHomeVisibility(space, 'spaceHomeSuggestions');
|
|
40
|
+
|
|
41
|
+
return visible ? <SpaceHomeSuggestions space={space} onClose={hide} /> : null;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type InvocationsSurfaceProps = {
|
|
45
|
+
role: string;
|
|
46
|
+
companionTo: Obj.Unknown;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** Resolves the space's invocation-trace feed for the companion's subject. */
|
|
50
|
+
export const InvocationsSurface = ({ role, companionTo }: InvocationsSurfaceProps) => {
|
|
51
|
+
const space = getSpace(companionTo);
|
|
52
|
+
const feed = space?.properties.invocationTraceFeed?.target;
|
|
53
|
+
const feedDXN = feed ? Feed.getFeedUri(feed) : undefined;
|
|
54
|
+
// TODO(wittjosiah): Support invocation filtering for prompts.
|
|
55
|
+
const target = Obj.instanceOf(Instructions.Instructions, companionTo) ? undefined : companionTo;
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<Panel.Root role={role} classNames='dx-document'>
|
|
59
|
+
<Panel.Content asChild>
|
|
60
|
+
<InvocationTraceContainer db={space?.db} feedDXN={feedDXN} target={target} detailAxis='block' />
|
|
61
|
+
</Panel.Content>
|
|
62
|
+
</Panel.Root>
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const TracePanelSurface = () => {
|
|
67
|
+
const space = useActiveSpace();
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
log('trace panel surface', { hasSpace: Boolean(space), spaceId: space?.id });
|
|
70
|
+
}, [space?.id]);
|
|
71
|
+
|
|
72
|
+
if (!space) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return <TracePanel space={space} />;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const TriggerStatusSurface = () => {
|
|
80
|
+
const space = useActiveSpace();
|
|
81
|
+
if (!space) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return <TriggerStatus role='status-indicator' space={space} />;
|
|
86
|
+
};
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
import * as Layer from 'effect/Layer';
|
|
7
7
|
|
|
8
|
+
import { AgentService as AgentServiceRuntime } from '@dxos/agent-runtime';
|
|
8
9
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
10
|
import { AgentService, LayerSpec } from '@dxos/compute';
|
|
10
11
|
import { ProcessManager } from '@dxos/compute-runtime';
|
|
11
|
-
import { AgentService as AgentServiceRuntime } from '@dxos/functions-runtime';
|
|
12
12
|
import { RoutineCapabilities } from '@dxos/plugin-routine';
|
|
13
13
|
|
|
14
14
|
//
|
|
@@ -12,20 +12,20 @@ import {
|
|
|
12
12
|
AppNode,
|
|
13
13
|
AppNodeMatcher,
|
|
14
14
|
AppSpace,
|
|
15
|
+
GraphPath,
|
|
15
16
|
LayoutOperation,
|
|
16
|
-
Paths,
|
|
17
17
|
TypeSection,
|
|
18
18
|
} from '@dxos/app-toolkit';
|
|
19
19
|
import { Chat, RunInstructions } from '@dxos/assistant-toolkit';
|
|
20
20
|
import { isSpace } from '@dxos/client/echo';
|
|
21
|
-
import { Instructions, Operation } from '@dxos/compute';
|
|
21
|
+
import { Instructions, Operation, Project } from '@dxos/compute';
|
|
22
22
|
import { Sequence } from '@dxos/conductor';
|
|
23
23
|
import { Database, DXN, Filter, Obj, Query, type Ref, Type } from '@dxos/echo';
|
|
24
24
|
import { invariant } from '@dxos/invariant';
|
|
25
25
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
26
26
|
import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
27
27
|
import { SpaceOperation } from '@dxos/plugin-space';
|
|
28
|
-
import {
|
|
28
|
+
import { Attention } from '@dxos/react-ui-attention';
|
|
29
29
|
import { Position } from '@dxos/util';
|
|
30
30
|
|
|
31
31
|
import { ASSISTANT_COMPANION_VARIANT, meta } from '#meta';
|
|
@@ -36,6 +36,23 @@ import { getChatsPath } from '../paths';
|
|
|
36
36
|
/** Operation definitions to seed as `PersistentOperation` records for automation / triggers. */
|
|
37
37
|
const computeOperationsToImport = [RunInstructions] as const;
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Chats belonging to the top-level Chats section: every chat minus the two kinds that already appear
|
|
41
|
+
* elsewhere in the tree. A chat sourcing a `CompanionTo` relation belongs to its primary object's
|
|
42
|
+
* companion panel; a chat parented to a `Project` is that project's navtree child (plugin-projects
|
|
43
|
+
* `projectChats`). Without the second exclusion a project chat appears twice.
|
|
44
|
+
*
|
|
45
|
+
* The project exclusion subtracts every project child rather than just chats — `children()` takes no
|
|
46
|
+
* type filter, and subtracting a non-chat from a chat-typed source is a no-op.
|
|
47
|
+
*/
|
|
48
|
+
export const standaloneChatsQuery = Query.without(
|
|
49
|
+
Query.without(
|
|
50
|
+
Query.select(Filter.type(Chat.Chat)),
|
|
51
|
+
Query.select(Filter.type(Chat.Chat)).sourceOf(Chat.CompanionTo).source(),
|
|
52
|
+
),
|
|
53
|
+
Query.select(Filter.type(Project.Project)).children(),
|
|
54
|
+
);
|
|
55
|
+
|
|
39
56
|
/** Match ECHO objects that are NOT chats. */
|
|
40
57
|
const whenNonChatObject = NodeMatcher.whenAll(
|
|
41
58
|
NodeMatcher.whenEchoObject,
|
|
@@ -49,13 +66,13 @@ export default Capability.makeModule(
|
|
|
49
66
|
const extensions = yield* Effect.all([
|
|
50
67
|
// AI section group — created here so it shows only when the assistant plugin is active.
|
|
51
68
|
GraphBuilder.createExtension({
|
|
52
|
-
id:
|
|
69
|
+
id: GraphPath.GroupSegments.ai,
|
|
53
70
|
match: AppNodeMatcher.whenSpace,
|
|
54
71
|
connector: (space) =>
|
|
55
72
|
Effect.succeed([
|
|
56
73
|
AppNode.makeGroup({
|
|
57
|
-
id:
|
|
58
|
-
type:
|
|
74
|
+
id: GraphPath.GroupSegments.ai,
|
|
75
|
+
type: GraphPath.GroupTypes.ai,
|
|
59
76
|
label: ['nav-tree-group-ai.label', { ns: meta.profile.key }],
|
|
60
77
|
space,
|
|
61
78
|
position: 300,
|
|
@@ -155,7 +172,7 @@ export default Capability.makeModule(
|
|
|
155
172
|
|
|
156
173
|
return [
|
|
157
174
|
AppNode.makeCompanion({
|
|
158
|
-
|
|
175
|
+
variant: ASSISTANT_COMPANION_VARIANT,
|
|
159
176
|
label: ['assistant-chat.label', { ns: meta.profile.key }],
|
|
160
177
|
icon: 'ph--sparkle--regular',
|
|
161
178
|
data: chat,
|
|
@@ -174,7 +191,7 @@ export default Capability.makeModule(
|
|
|
174
191
|
connector: () =>
|
|
175
192
|
Effect.succeed([
|
|
176
193
|
AppNode.makeCompanion({
|
|
177
|
-
|
|
194
|
+
variant: 'invocations',
|
|
178
195
|
label: ['invocations.label', { ns: meta.profile.key }],
|
|
179
196
|
icon: 'ph--clock-countdown--regular',
|
|
180
197
|
data: 'invocations',
|
|
@@ -188,7 +205,7 @@ export default Capability.makeModule(
|
|
|
188
205
|
connector: () =>
|
|
189
206
|
Effect.succeed([
|
|
190
207
|
AppNode.makeDeckCompanion({
|
|
191
|
-
id: linkedSegment('trace'),
|
|
208
|
+
id: Attention.linkedSegment('trace'),
|
|
192
209
|
label: ['trace.label', { ns: meta.profile.key }],
|
|
193
210
|
icon: 'ph--line-segments--regular',
|
|
194
211
|
data: 'trace',
|
|
@@ -197,15 +214,12 @@ export default Capability.makeModule(
|
|
|
197
214
|
]),
|
|
198
215
|
}),
|
|
199
216
|
|
|
200
|
-
// Section node: standalone Chat.Chat objects per AI group (companions
|
|
217
|
+
// Section node: standalone Chat.Chat objects per AI group (companions and project chats excluded).
|
|
201
218
|
TypeSection.createTypeSectionExtension(Chat.Chat, {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
Query.select(Filter.type(Chat.Chat)).sourceOf(Chat.CompanionTo).source(),
|
|
207
|
-
),
|
|
208
|
-
match: AppNodeMatcher.whenNavTreeGroup(Paths.GroupTypes.ai),
|
|
219
|
+
query: standaloneChatsQuery,
|
|
220
|
+
match: AppNodeMatcher.whenNavTreeGroup(GraphPath.GroupTypes.ai),
|
|
221
|
+
groupSegment: GraphPath.GroupSegments.ai,
|
|
222
|
+
urlKey: 'chat',
|
|
209
223
|
}),
|
|
210
224
|
|
|
211
225
|
// Create-chat action on the Chats section header.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type Registry } from '@effect-atom/atom
|
|
5
|
+
import { Atom, type Registry } from '@effect-atom/atom';
|
|
6
6
|
import * as Effect from 'effect/Effect';
|
|
7
7
|
import * as Option from 'effect/Option';
|
|
8
8
|
|
|
@@ -18,9 +18,9 @@ import {
|
|
|
18
18
|
DeckCapabilities,
|
|
19
19
|
PLANK_COMPANION_TYPE,
|
|
20
20
|
type StoredDeckState,
|
|
21
|
-
|
|
21
|
+
companionAspect,
|
|
22
22
|
} from '@dxos/plugin-deck';
|
|
23
|
-
import {
|
|
23
|
+
import { Attention } from '@dxos/react-ui-attention';
|
|
24
24
|
import { Position } from '@dxos/util';
|
|
25
25
|
|
|
26
26
|
import { ASSISTANT_COMPANION_VARIANT } from '#meta';
|
|
@@ -40,8 +40,9 @@ export default Capability.makeModule(
|
|
|
40
40
|
const stateAtom = yield* Capability.get(AssistantCapabilities.State);
|
|
41
41
|
// The selected companion variant moved off deck state into a global view-state aspect; read and
|
|
42
42
|
// observe it directly so a tab switch (which no longer touches deck state) still re-provisions.
|
|
43
|
+
// Project just the variant so a companion resize (same aspect) does not re-fire provisioning.
|
|
43
44
|
const viewState = yield* Capability.get(AttentionCapabilities.ViewState);
|
|
44
|
-
const variantAtom = viewState.atom(
|
|
45
|
+
const variantAtom = Atom.make((get) => get(viewState.atom(companionAspect, COMPANION_VIEW_STATE_CONTEXT)).variant);
|
|
45
46
|
|
|
46
47
|
const plankSubs = new Map<string, () => void>();
|
|
47
48
|
|
|
@@ -97,13 +98,13 @@ export default Capability.makeModule(
|
|
|
97
98
|
const provision = () => {
|
|
98
99
|
const deckState: StoredDeckState = registry.get(deckStateAtom);
|
|
99
100
|
const deck = deckState.decks[deckState.activeDeck];
|
|
100
|
-
if (!deck?.
|
|
101
|
+
if (!deck?.companionPlanks.length) {
|
|
101
102
|
unsubAllPlanks();
|
|
102
103
|
return;
|
|
103
104
|
}
|
|
104
105
|
|
|
105
|
-
const companionVariant = registry.get(variantAtom)
|
|
106
|
-
const plankIds = new Set(deck.
|
|
106
|
+
const companionVariant = registry.get(variantAtom);
|
|
107
|
+
const plankIds = new Set(deck.active);
|
|
107
108
|
|
|
108
109
|
// Remove subscriptions for planks that are no longer active.
|
|
109
110
|
for (const trackedId of plankSubs.keys()) {
|
|
@@ -126,7 +127,7 @@ export default Capability.makeModule(
|
|
|
126
127
|
plankSubs.set(
|
|
127
128
|
plankId,
|
|
128
129
|
registry.subscribe(graph.connections(plankId, 'child'), () => {
|
|
129
|
-
if (provisionForPlank(plankId, registry.get(variantAtom)
|
|
130
|
+
if (provisionForPlank(plankId, registry.get(variantAtom))) {
|
|
130
131
|
unsubPlank(plankId);
|
|
131
132
|
}
|
|
132
133
|
}),
|
|
@@ -170,11 +171,11 @@ const resolveEffectiveVariant = (
|
|
|
170
171
|
}
|
|
171
172
|
|
|
172
173
|
if (preferredVariant) {
|
|
173
|
-
const preferred = companions.find((companion) => getLinkedVariant(companion.id) === preferredVariant);
|
|
174
|
+
const preferred = companions.find((companion) => Attention.getLinkedVariant(companion.id) === preferredVariant);
|
|
174
175
|
if (preferred) {
|
|
175
|
-
return getLinkedVariant(preferred.id);
|
|
176
|
+
return Attention.getLinkedVariant(preferred.id);
|
|
176
177
|
}
|
|
177
178
|
}
|
|
178
179
|
|
|
179
|
-
return getLinkedVariant(companions[0].id);
|
|
180
|
+
return Attention.getLinkedVariant(companions[0].id);
|
|
180
181
|
};
|
|
@@ -6,15 +6,15 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
import * as Schema from 'effect/Schema';
|
|
7
7
|
|
|
8
8
|
import { Capability } from '@dxos/app-framework';
|
|
9
|
-
import { Obj, Ref } from '@dxos/echo';
|
|
9
|
+
import { Format, Obj, Ref } from '@dxos/echo';
|
|
10
|
+
import { AccessToken } from '@dxos/link';
|
|
10
11
|
import { Connection, Connector, type CredentialForm } from '@dxos/plugin-connector';
|
|
11
|
-
import { AccessToken } from '@dxos/types';
|
|
12
12
|
|
|
13
13
|
import { ANTHROPIC_PROVIDER_ID, ANTHROPIC_SOURCE } from '../constants';
|
|
14
14
|
|
|
15
15
|
/** API-key form for the Anthropic BYOK provider; key is best-effort validated against `/v1/models`. */
|
|
16
16
|
const AnthropicTokenForm = Schema.Struct({
|
|
17
|
-
token: Schema.String.annotations({
|
|
17
|
+
token: Schema.String.pipe(Format.FormatAnnotation.set(Format.TypeFormat.Password)).annotations({
|
|
18
18
|
title: 'API key',
|
|
19
19
|
description: 'Your Anthropic API key — find it at https://console.anthropic.com/settings/keys.',
|
|
20
20
|
}),
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as AnthropicClient from '@effect/ai-anthropic/AnthropicClient';
|
|
6
6
|
import * as Effect from 'effect/Effect';
|
|
7
7
|
import * as Layer from 'effect/Layer';
|
|
8
|
+
import * as Option from 'effect/Option';
|
|
8
9
|
|
|
9
10
|
import { AnthropicResolver } from '@dxos/ai/resolvers';
|
|
10
11
|
import { Capability } from '@dxos/app-framework';
|
|
@@ -36,16 +37,18 @@ const edgeModelResolver = Capability.makeModule<[], EdgeModelResolverCapabilitie
|
|
|
36
37
|
if (!edgeClient) {
|
|
37
38
|
const [client] = manager.getAll(ClientCapabilities.Client);
|
|
38
39
|
invariant(client, 'Client capability is required for edge AI requests.');
|
|
40
|
+
const [haloIdentity] = manager.getAll(ClientCapabilities.IdentityService);
|
|
41
|
+
invariant(haloIdentity, 'HALO identity capability is required for edge AI requests.');
|
|
39
42
|
const edgeUrl = client.config.values.runtime?.services?.edge?.url;
|
|
40
43
|
invariant(edgeUrl, 'EDGE services are not configured.');
|
|
41
44
|
const created = new EdgeHttpClient(edgeUrl);
|
|
42
45
|
const updateIdentity = () => {
|
|
43
|
-
if (
|
|
46
|
+
if (Option.isSome(haloIdentity.getSnapshot())) {
|
|
44
47
|
created.setIdentity(createEdgeIdentity(client));
|
|
45
48
|
}
|
|
46
49
|
};
|
|
47
50
|
updateIdentity();
|
|
48
|
-
identitySubscription =
|
|
51
|
+
identitySubscription = { unsubscribe: haloIdentity.subscribe(updateIdentity) };
|
|
49
52
|
edgeClient = created;
|
|
50
53
|
}
|
|
51
54
|
return edgeClient;
|
|
@@ -16,7 +16,6 @@ export const AiService = Capability.lazy<AssistantPluginOptions | void, Capabili
|
|
|
16
16
|
);
|
|
17
17
|
export const Connector = Capability.lazy('AnthropicConnector', () => import('./connector'));
|
|
18
18
|
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
19
|
-
export const NavigationResolver = Capability.lazy('NavigationResolver', () => import('./navigation-resolver'));
|
|
20
19
|
export const AutomationTemplates = Capability.lazy('AutomationTemplates', () => import('./automation-templates'));
|
|
21
20
|
export const SkillDefinition = Capability.lazy('SkillDefinition', () => import('./skill-definition'));
|
|
22
21
|
export const CompanionChatProvisioner = Capability.lazy(
|
|
@@ -27,7 +26,6 @@ export const CreateObject = Capability.lazy('CreateObject', () => import('./crea
|
|
|
27
26
|
export const EdgeModelResolver = Capability.lazy('EdgeModelResolver', () => import('./edge-model-resolver'));
|
|
28
27
|
export const LocalModelResolver = Capability.lazy('LocalModelResolver', () => import('./local-model-resolver'));
|
|
29
28
|
export const MarkdownExtension = Capability.lazy('MarkdownExtension', () => import('./markdown-extension'));
|
|
30
|
-
export const Migrations = Capability.lazy('AssistantMigrations', () => import('./migrations'));
|
|
31
29
|
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
32
30
|
'OperationHandler',
|
|
33
31
|
() => import('./operation-handler'),
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import { type ComponentProps } from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
11
|
+
import { Agent, Chat } from '@dxos/assistant-toolkit';
|
|
12
|
+
import { Instructions } from '@dxos/compute';
|
|
13
|
+
import { Sequence } from '@dxos/conductor';
|
|
14
|
+
import { Obj } from '@dxos/echo';
|
|
15
|
+
import { SpaceHomeContent, SpaceHomePinBottom } from '@dxos/plugin-space';
|
|
16
|
+
import { Position } from '@dxos/util';
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
AgentArticle,
|
|
20
|
+
AgentProperties,
|
|
21
|
+
ChatArticle,
|
|
22
|
+
ChatCompanion,
|
|
23
|
+
ChatDialog,
|
|
24
|
+
IntegrationPrompt,
|
|
25
|
+
SpaceHomePrompt,
|
|
26
|
+
} from '#containers';
|
|
27
|
+
import { ASSISTANT_COMPANION_VARIANT, ASSISTANT_DIALOG, meta } from '#meta';
|
|
28
|
+
import { ChatSurface } from '#types';
|
|
29
|
+
|
|
30
|
+
import {
|
|
31
|
+
AssistantSettingsSurface,
|
|
32
|
+
InvocationsSurface,
|
|
33
|
+
SpaceHomeSuggestionsSurface,
|
|
34
|
+
TracePanelSurface,
|
|
35
|
+
TriggerStatusSurface,
|
|
36
|
+
} from './AssistantSurfaces';
|
|
37
|
+
|
|
38
|
+
export default Capability.makeModule(() =>
|
|
39
|
+
Effect.succeed(
|
|
40
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
41
|
+
Surface.create({
|
|
42
|
+
id: 'pluginSettings',
|
|
43
|
+
filter: AppSurface.settings(AppSurface.Article, meta.profile.key),
|
|
44
|
+
component: AssistantSettingsSurface,
|
|
45
|
+
props: ({ data: { subject } }) => ({ subject }),
|
|
46
|
+
}),
|
|
47
|
+
Surface.create({
|
|
48
|
+
id: 'spaceHomePrompt',
|
|
49
|
+
filter: Surface.makeFilter(SpaceHomePinBottom),
|
|
50
|
+
component: SpaceHomePrompt,
|
|
51
|
+
props: ({ data: { space } }) => ({ space }),
|
|
52
|
+
}),
|
|
53
|
+
Surface.create({
|
|
54
|
+
id: 'spaceHomeSuggestions',
|
|
55
|
+
filter: Surface.makeFilter(SpaceHomeContent),
|
|
56
|
+
position: Position.last,
|
|
57
|
+
component: SpaceHomeSuggestionsSurface,
|
|
58
|
+
props: ({ data: { space } }) => ({ space }),
|
|
59
|
+
}),
|
|
60
|
+
Surface.create({
|
|
61
|
+
id: 'chat',
|
|
62
|
+
filter: AppSurface.object(
|
|
63
|
+
AppSurface.Article,
|
|
64
|
+
Chat.Chat,
|
|
65
|
+
(data) => data.variant !== ASSISTANT_COMPANION_VARIANT,
|
|
66
|
+
),
|
|
67
|
+
component: ChatArticle,
|
|
68
|
+
props: ({ role, ref, data: { subject, attendableId } }) => ({ role, subject, attendableId, ref }),
|
|
69
|
+
}),
|
|
70
|
+
Surface.create({
|
|
71
|
+
id: 'agent',
|
|
72
|
+
filter: AppSurface.object(AppSurface.Article, Agent.Agent),
|
|
73
|
+
component: AgentArticle,
|
|
74
|
+
props: ({ role, data: { subject, attendableId } }) => ({ role, subject, attendableId }),
|
|
75
|
+
}),
|
|
76
|
+
Surface.create({
|
|
77
|
+
id: 'objectProperties',
|
|
78
|
+
filter: AppSurface.object(AppSurface.ObjectProperties, Agent.Agent),
|
|
79
|
+
component: AgentProperties,
|
|
80
|
+
props: ({ data: { subject } }) => ({ subject }),
|
|
81
|
+
}),
|
|
82
|
+
Surface.create({
|
|
83
|
+
id: 'companionChat',
|
|
84
|
+
filter: Surface.makeFilter(
|
|
85
|
+
AppSurface.Article,
|
|
86
|
+
(data) =>
|
|
87
|
+
Obj.isObject(data.companionTo) && (Obj.instanceOf(Chat.Chat, data.subject) || data.subject === null),
|
|
88
|
+
),
|
|
89
|
+
component: ChatCompanion,
|
|
90
|
+
props: ({ role, ref, data: { subject, attendableId, companionTo } }) => ({
|
|
91
|
+
role,
|
|
92
|
+
subject,
|
|
93
|
+
attendableId,
|
|
94
|
+
companionTo,
|
|
95
|
+
ref,
|
|
96
|
+
}),
|
|
97
|
+
}),
|
|
98
|
+
Surface.create({
|
|
99
|
+
id: 'companionInvocations',
|
|
100
|
+
filter: AppSurface.allOf(
|
|
101
|
+
AppSurface.literal(AppSurface.Article, 'invocations'),
|
|
102
|
+
AppSurface.oneOf(
|
|
103
|
+
AppSurface.companion(AppSurface.Article, Sequence.Sequence),
|
|
104
|
+
AppSurface.companion(AppSurface.Article, Instructions.Instructions),
|
|
105
|
+
),
|
|
106
|
+
),
|
|
107
|
+
component: InvocationsSurface,
|
|
108
|
+
props: ({ role, data: { companionTo } }) => ({ role, companionTo }),
|
|
109
|
+
}),
|
|
110
|
+
Surface.create({
|
|
111
|
+
id: ASSISTANT_DIALOG,
|
|
112
|
+
filter: AppSurface.component<ComponentProps<typeof ChatDialog>>(AppSurface.Dialog, ASSISTANT_DIALOG),
|
|
113
|
+
component: ChatDialog,
|
|
114
|
+
props: ({ data: { props } }) => ({ ...props }),
|
|
115
|
+
}),
|
|
116
|
+
Surface.create({
|
|
117
|
+
id: 'trace',
|
|
118
|
+
filter: Surface.makeFilter(AppSurface.deckCompanion('trace')),
|
|
119
|
+
component: TracePanelSurface,
|
|
120
|
+
}),
|
|
121
|
+
Surface.create({
|
|
122
|
+
id: 'integrationPrompt',
|
|
123
|
+
filter: Surface.makeFilter(ChatSurface, (data) => data.role === 'integration-prompt'),
|
|
124
|
+
component: IntegrationPrompt,
|
|
125
|
+
// `data.data` is model-supplied JSON (untyped); narrow `service` before use.
|
|
126
|
+
props: ({ data }) => ({ service: typeof data.data?.service === 'string' ? data.data.service : undefined }),
|
|
127
|
+
}),
|
|
128
|
+
Surface.create({
|
|
129
|
+
id: 'triggerStatus',
|
|
130
|
+
filter: Surface.makeFilter(AppSurface.StatusIndicator),
|
|
131
|
+
component: TriggerStatusSurface,
|
|
132
|
+
}),
|
|
133
|
+
]),
|
|
134
|
+
),
|
|
135
|
+
);
|
|
@@ -26,6 +26,8 @@ import {
|
|
|
26
26
|
MemorySkill,
|
|
27
27
|
PlanningHandlers,
|
|
28
28
|
PlanningSkill,
|
|
29
|
+
ProjectHandlers,
|
|
30
|
+
ProjectSkill,
|
|
29
31
|
SkillManagerHandlers,
|
|
30
32
|
SkillManagerSkill,
|
|
31
33
|
WebSearchHandlers,
|
|
@@ -53,6 +55,7 @@ const skillDefinition = () =>
|
|
|
53
55
|
Capability.contributes(AppCapabilities.SkillDefinition, AgentWizardSkill),
|
|
54
56
|
Capability.contributes(AppCapabilities.SkillDefinition, DelegationSkill),
|
|
55
57
|
Capability.contributes(AppCapabilities.SkillDefinition, AlarmSkill),
|
|
58
|
+
Capability.contributes(AppCapabilities.SkillDefinition, ProjectSkill),
|
|
56
59
|
|
|
57
60
|
Capability.contributes(Capabilities.OperationHandler, AgentHandlers),
|
|
58
61
|
Capability.contributes(Capabilities.OperationHandler, AgentSkillHandlers),
|
|
@@ -63,6 +66,7 @@ const skillDefinition = () =>
|
|
|
63
66
|
Capability.contributes(Capabilities.OperationHandler, DelegationHandlers),
|
|
64
67
|
Capability.contributes(Capabilities.OperationHandler, PlanningHandlers),
|
|
65
68
|
Capability.contributes(Capabilities.OperationHandler, AlarmHandlers),
|
|
69
|
+
Capability.contributes(Capabilities.OperationHandler, ProjectHandlers),
|
|
66
70
|
|
|
67
71
|
// Run the conversational agent as a supervisor: delegate in-progress plan tasks to sub-agents
|
|
68
72
|
// and fold their results back into the conversation (consumed by the AgentService LayerSpec).
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { afterEach, beforeEach, describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { Chat } from '@dxos/assistant-toolkit';
|
|
8
|
+
import { Project } from '@dxos/compute';
|
|
9
|
+
import { Feed, Obj, Ref, Relation } from '@dxos/echo';
|
|
10
|
+
import { EchoTestBuilder } from '@dxos/echo-client/testing';
|
|
11
|
+
|
|
12
|
+
import { standaloneChatsQuery } from './app-graph-builder';
|
|
13
|
+
|
|
14
|
+
describe('standalone chats query', () => {
|
|
15
|
+
let builder: EchoTestBuilder;
|
|
16
|
+
|
|
17
|
+
beforeEach(async () => {
|
|
18
|
+
builder = await new EchoTestBuilder().open();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
afterEach(async () => {
|
|
22
|
+
await builder.close();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test('excludes companion chats and project chats, keeping standalone ones', async ({ expect }) => {
|
|
26
|
+
const { db } = await builder.createDatabase({
|
|
27
|
+
types: [Chat.Chat, Chat.CompanionTo, Project.Project, Feed.Feed],
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const makeChat = (name: string) => db.add(Chat.make({ name, feed: Ref.make(db.add(Feed.make())) }));
|
|
31
|
+
|
|
32
|
+
const standalone = makeChat('Standalone');
|
|
33
|
+
|
|
34
|
+
// Companion: sources a CompanionTo relation, so it belongs to its primary object's panel.
|
|
35
|
+
const companionSubject = db.add(Project.make({ name: 'Subject' }));
|
|
36
|
+
const companion = makeChat('Companion');
|
|
37
|
+
db.add(Relation.make(Chat.CompanionTo, { [Relation.Source]: companion, [Relation.Target]: companionSubject }));
|
|
38
|
+
|
|
39
|
+
// Project chat: parented to a project, so it is that project's navtree child.
|
|
40
|
+
const project = db.add(Project.make({ name: 'Project' }));
|
|
41
|
+
const projectChat = makeChat('Project chat');
|
|
42
|
+
Obj.setParent(projectChat, project);
|
|
43
|
+
|
|
44
|
+
await db.flush({ indexes: true });
|
|
45
|
+
|
|
46
|
+
const results = await db.query(standaloneChatsQuery).run();
|
|
47
|
+
expect(results.map((chat) => chat.id)).toEqual([standalone.id]);
|
|
48
|
+
expect(results.map((chat) => chat.id)).not.toContain(companion.id);
|
|
49
|
+
expect(results.map((chat) => chat.id)).not.toContain(projectChat.id);
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import { Agent
|
|
8
|
+
import { Agent } from '@dxos/assistant-toolkit';
|
|
9
|
+
import { Instructions } from '@dxos/compute';
|
|
9
10
|
import { Filter, Obj, Ref } from '@dxos/echo';
|
|
10
|
-
import { useQuery } from '@dxos/react
|
|
11
|
+
import { useQuery } from '@dxos/echo-react';
|
|
11
12
|
import { useClientStory, withClientProvider } from '@dxos/react-client/testing';
|
|
12
13
|
import { ObjectProperties } from '@dxos/react-ui-form';
|
|
13
14
|
import { Loading, withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
14
15
|
import { Text } from '@dxos/schema';
|
|
15
|
-
import { Organization } from '@dxos/types';
|
|
16
|
+
import { Organization, Outline } from '@dxos/types';
|
|
16
17
|
|
|
17
18
|
import { translations } from '#translations';
|
|
18
19
|
|
|
@@ -41,7 +42,7 @@ const meta = {
|
|
|
41
42
|
withClientProvider({
|
|
42
43
|
createIdentity: true,
|
|
43
44
|
createSpace: true,
|
|
44
|
-
types: [Agent.Agent,
|
|
45
|
+
types: [Agent.Agent, Outline.Outline, Text.Text, Instructions.Instructions, Organization.Organization],
|
|
45
46
|
onCreateSpace: async ({ space }) => {
|
|
46
47
|
const organization = space.db.add(
|
|
47
48
|
Obj.make(Organization.Organization, {
|
|
@@ -52,9 +53,7 @@ const meta = {
|
|
|
52
53
|
|
|
53
54
|
space.db.add(
|
|
54
55
|
Obj.make(Agent.Agent, {
|
|
55
|
-
instructions: Ref.make(
|
|
56
|
-
artifacts: [{ name: 'Organization', data: Ref.make(organization) }],
|
|
57
|
-
subscriptions: [],
|
|
56
|
+
instructions: Ref.make(Instructions.make({ text: '' })),
|
|
58
57
|
}),
|
|
59
58
|
);
|
|
60
59
|
},
|