@dxos/plugin-assistant 0.9.0 → 0.9.1-staging.ee54ba693a
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 +18 -24
- package/dist/lib/neutral/{AgentArticle-K7XM46OQ.mjs → AgentArticle-GV6EEW3I.mjs} +9 -8
- package/dist/lib/neutral/AgentArticle-GV6EEW3I.mjs.map +7 -0
- package/dist/lib/neutral/AssistantPlugin.mjs +1 -1
- package/dist/lib/neutral/AssistantPlugin.node.mjs +6 -6
- package/dist/lib/neutral/AssistantPlugin.node.mjs.map +3 -3
- package/dist/lib/neutral/AssistantPlugin.workerd.mjs +7 -34
- package/dist/lib/neutral/AssistantPlugin.workerd.mjs.map +4 -4
- package/dist/lib/neutral/AssistantSettings-3N5M5VCN.mjs +302 -0
- package/dist/lib/neutral/AssistantSettings-3N5M5VCN.mjs.map +7 -0
- package/dist/lib/neutral/{ChatArticle-VNVZCDUR.mjs → ChatArticle-OO7GGEFW.mjs} +2 -2
- package/dist/lib/neutral/{ChatCompanion-LBUHYWQG.mjs → ChatCompanion-GIFJRY6I.mjs} +28 -28
- package/dist/lib/neutral/ChatCompanion-GIFJRY6I.mjs.map +7 -0
- package/dist/lib/neutral/{ChatDialog-DCA6FLOV.mjs → ChatDialog-5MXN4MXS.mjs} +9 -8
- package/dist/lib/neutral/ChatDialog-5MXN4MXS.mjs.map +7 -0
- package/dist/lib/neutral/IntegrationPrompt-2HJQFYJE.mjs +72 -0
- package/dist/lib/neutral/IntegrationPrompt-2HJQFYJE.mjs.map +7 -0
- package/dist/lib/neutral/{PlanArticle-TS5ULWYS.mjs → PlanArticle-VPK2IYWU.mjs} +8 -2
- package/dist/lib/neutral/PlanArticle-VPK2IYWU.mjs.map +7 -0
- package/dist/lib/neutral/SpaceHomePrompt-ISAB76LD.mjs +114 -0
- package/dist/lib/neutral/SpaceHomePrompt-ISAB76LD.mjs.map +7 -0
- package/dist/lib/neutral/SpaceHomeSuggestions-IDH77QQR.mjs +63 -0
- package/dist/lib/neutral/SpaceHomeSuggestions-IDH77QQR.mjs.map +7 -0
- package/dist/lib/neutral/TracePanel-JKNWADJ4.mjs +12 -0
- package/dist/lib/neutral/TracePanel-JKNWADJ4.mjs.map +7 -0
- package/dist/lib/neutral/{TriggerStatus-X7Y5JFZJ.mjs → TriggerStatus-FURRBHYA.mjs} +9 -7
- package/dist/lib/neutral/TriggerStatus-FURRBHYA.mjs.map +7 -0
- package/dist/lib/neutral/{agent-hydrator-PJBYVMBW.mjs → agent-hydrator-OBO3RHLO.mjs} +3 -4
- package/dist/lib/neutral/agent-hydrator-OBO3RHLO.mjs.map +7 -0
- package/dist/lib/neutral/{agent-service-WCAP5MLI.mjs → agent-service-XFJ4VQMT.mjs} +6 -6
- package/dist/lib/neutral/agent-service-XFJ4VQMT.mjs.map +7 -0
- package/dist/lib/neutral/ai-context-LIKJYMIN.mjs +14 -0
- package/dist/lib/neutral/ai-context-LIKJYMIN.mjs.map +7 -0
- package/dist/lib/neutral/{ai-service-AADUIKBY.mjs → ai-service-DM6YXWUC.mjs} +9 -5
- package/dist/lib/neutral/ai-service-DM6YXWUC.mjs.map +7 -0
- package/dist/lib/neutral/{app-graph-builder-WUFHQH3Y.mjs → app-graph-builder-OPVOEQY7.mjs} +45 -28
- package/dist/lib/neutral/app-graph-builder-OPVOEQY7.mjs.map +7 -0
- package/dist/lib/neutral/automation-templates-MADJLXGJ.mjs +97 -0
- package/dist/lib/neutral/automation-templates-MADJLXGJ.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +21 -19
- package/dist/lib/neutral/capabilities/index.mjs.map +3 -3
- package/dist/lib/neutral/{chunk-KLYLW4WH.mjs → chunk-5IHQ52KJ.mjs} +1 -1
- package/dist/lib/neutral/chunk-5IHQ52KJ.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-YXRGZYYH.mjs → chunk-6Q4OBGIK.mjs} +87 -59
- package/dist/lib/neutral/chunk-6Q4OBGIK.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BXI2R4OO.mjs +410 -0
- package/dist/lib/neutral/chunk-BXI2R4OO.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-5H6UJHLF.mjs → chunk-CMPLPDYE.mjs} +12 -12
- package/dist/lib/neutral/chunk-CMPLPDYE.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GPHT3HYS.mjs +8 -0
- package/dist/lib/neutral/{chunk-SMFJD7BP.mjs.map → chunk-GPHT3HYS.mjs.map} +2 -2
- package/dist/lib/neutral/chunk-HKLSFB5I.mjs +90 -0
- package/dist/lib/neutral/chunk-HKLSFB5I.mjs.map +7 -0
- package/dist/lib/neutral/chunk-L7AR4VTA.mjs +53 -0
- package/dist/lib/neutral/chunk-L7AR4VTA.mjs.map +7 -0
- package/dist/lib/neutral/chunk-LS72HWMM.mjs +42 -0
- package/dist/lib/neutral/chunk-LS72HWMM.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-HLANPOBA.mjs → chunk-OZWZGIV2.mjs} +5 -3
- package/dist/lib/neutral/chunk-OZWZGIV2.mjs.map +7 -0
- package/dist/lib/neutral/{toolkit-GVWXPDLJ.mjs → chunk-QOKLFHUS.mjs} +3 -4
- package/dist/lib/neutral/{toolkit-GVWXPDLJ.mjs.map → chunk-QOKLFHUS.mjs.map} +1 -1
- package/dist/lib/neutral/{TracePanel-KTZJ6JNR.mjs → chunk-SCTHQVIJ.mjs} +11 -23
- package/dist/lib/neutral/chunk-SCTHQVIJ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-U4LTLBAX.mjs +56 -0
- package/dist/lib/neutral/chunk-U4LTLBAX.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-RKVVK3R3.mjs → chunk-UPKFUZ6V.mjs} +22 -17
- package/dist/lib/neutral/chunk-UPKFUZ6V.mjs.map +7 -0
- package/dist/lib/neutral/{operation-handler-SF36MOB5.mjs → chunk-V2Y4XE3O.mjs} +3 -4
- package/dist/lib/neutral/{operation-handler-SF36MOB5.mjs.map → chunk-V2Y4XE3O.mjs.map} +1 -1
- package/dist/lib/neutral/chunk-XVGEJWJX.mjs +133 -0
- package/dist/lib/neutral/chunk-XVGEJWJX.mjs.map +7 -0
- package/dist/lib/neutral/{companion-chat-provisioner-YZZ73P6E.mjs → companion-chat-provisioner-IQV5VIVE.mjs} +14 -8
- package/dist/lib/neutral/companion-chat-provisioner-IQV5VIVE.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +749 -632
- package/dist/lib/neutral/components/index.mjs.map +4 -4
- package/dist/lib/neutral/{integration-provider-RBD3AFJU.mjs → connector-ITLLTBPZ.mjs} +13 -14
- package/dist/lib/neutral/connector-ITLLTBPZ.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +15 -13
- package/dist/lib/neutral/containers/index.mjs.map +3 -3
- package/dist/lib/neutral/{create-chat-SGGQ6HVN.mjs → create-chat-YGVZZYGP.mjs} +18 -16
- package/dist/lib/neutral/create-chat-YGVZZYGP.mjs.map +7 -0
- package/dist/lib/neutral/{create-object-U2SOFZLR.mjs → create-object-5PAEJ6KM.mjs} +11 -27
- package/dist/lib/neutral/create-object-5PAEJ6KM.mjs.map +7 -0
- package/dist/lib/neutral/{edge-model-resolver-BBVOJBGJ.mjs → edge-model-resolver-WDJWDZTT.mjs} +2 -2
- package/dist/lib/neutral/execution-graph/index.mjs +336 -62
- package/dist/lib/neutral/execution-graph/index.mjs.map +4 -4
- package/dist/lib/neutral/extensions/index.mjs +8 -0
- package/dist/lib/neutral/{fork-chat-34KEF4ZJ.mjs → fork-chat-RMAAYYQF.mjs} +16 -19
- package/dist/lib/neutral/fork-chat-RMAAYYQF.mjs.map +7 -0
- package/dist/lib/neutral/generate-home-suggestions-6MM2XWPV.mjs +93 -0
- package/dist/lib/neutral/generate-home-suggestions-6MM2XWPV.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +393 -508
- package/dist/lib/neutral/hooks/index.mjs.map +4 -4
- package/dist/lib/neutral/index.mjs +14 -10
- package/dist/lib/neutral/markdown-extension-R4TKDTIF.mjs +41 -0
- package/dist/lib/neutral/markdown-extension-R4TKDTIF.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/navigation-resolver-PYGP2DAW.mjs +18 -0
- package/dist/lib/neutral/navigation-resolver-PYGP2DAW.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-2LEN45GP.mjs +8 -0
- package/dist/lib/neutral/operation-handler-2LEN45GP.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +2 -2
- package/dist/lib/neutral/plugin.workerd.mjs +13 -0
- package/dist/lib/neutral/plugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/{react-surface-XRTBW5OJ.mjs → react-surface-HEJEK44F.mjs} +42 -45
- package/dist/lib/neutral/react-surface-HEJEK44F.mjs.map +7 -0
- package/dist/lib/neutral/resolve-navigation-targets-PBQ3OLUE.mjs +28 -0
- package/dist/lib/neutral/resolve-navigation-targets-PBQ3OLUE.mjs.map +7 -0
- package/dist/lib/neutral/{run-prompt-in-new-chat-D5IIE2C7.mjs → run-prompt-in-new-chat-RNUJE2FM.mjs} +31 -31
- package/dist/lib/neutral/run-prompt-in-new-chat-RNUJE2FM.mjs.map +7 -0
- package/dist/lib/neutral/{settings-W4BLWQ53.mjs → settings-7Q3RITIT.mjs} +3 -3
- package/dist/lib/neutral/{settings-W4BLWQ53.mjs.map → settings-7Q3RITIT.mjs.map} +3 -3
- package/dist/lib/neutral/skill-definition-553MQRTR.mjs +8 -0
- package/dist/lib/neutral/skill-definition-553MQRTR.mjs.map +7 -0
- package/dist/lib/neutral/skills/index.mjs +8 -0
- package/dist/lib/neutral/skills/index.mjs.map +7 -0
- package/dist/lib/neutral/{state-H3G7QCU6.mjs → state-4LGAKSSD.mjs} +9 -3
- package/dist/lib/neutral/state-4LGAKSSD.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +1 -1
- package/dist/lib/neutral/toolkit-ETWLG5NT.mjs +8 -0
- package/dist/lib/neutral/toolkit-ETWLG5NT.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +69 -31
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +5 -1
- package/dist/lib/neutral/{update-chat-name-Y7JWIP64.mjs → update-chat-name-IJJELRR6.mjs} +3 -3
- package/dist/lib/neutral/{update-chat-name-Y7JWIP64.mjs.map → update-chat-name-IJJELRR6.mjs.map} +2 -2
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/AssistantPlugin.workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/agent-hydrator.d.ts +1 -1
- package/dist/types/src/capabilities/agent-service.d.ts +1 -2
- package/dist/types/src/capabilities/agent-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-context.d.ts +1 -2
- package/dist/types/src/capabilities/ai-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -3
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/automation-templates.d.ts +1 -2
- package/dist/types/src/capabilities/automation-templates.d.ts.map +1 -1
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +1 -1
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -1
- package/dist/types/src/capabilities/{integration-provider.d.ts → connector.d.ts} +2 -2
- package/dist/types/src/capabilities/connector.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +1 -27
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +18 -57
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown-extension.d.ts +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +1 -2
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/skill-definition.d.ts +5 -0
- package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts +1 -17
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +1 -2
- package/dist/types/src/capabilities/toolkit.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 +10 -8
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.stories.d.ts +32 -0
- package/dist/types/src/components/Chat/Chat.stories.d.ts.map +1 -0
- package/dist/types/src/components/Chat/events.d.ts +0 -4
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +2 -2
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +2 -2
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +5 -5
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/useChatVoiceInput.d.ts +9 -0
- package/dist/types/src/components/ChatPrompt/useChatVoiceInput.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +4 -4
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +2 -2
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts +2 -2
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/SurfaceWidget.d.ts +11 -0
- package/dist/types/src/components/ChatThread/widgets/SurfaceWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts +1 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +6 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +1 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -1
- package/dist/types/src/components/TaskList/TaskList.d.ts +8 -0
- package/dist/types/src/components/TaskList/TaskList.d.ts.map +1 -1
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts +5 -2
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +3 -3
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +1 -1
- package/dist/types/src/constants.d.ts.map +1 -1
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts +2 -2
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -1
- package/dist/types/src/{components → containers}/AssistantSettings/AssistantSettings.d.ts +1 -1
- package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -1
- package/dist/types/src/containers/AssistantSettings/OllamaModels.d.ts +12 -0
- package/dist/types/src/containers/AssistantSettings/OllamaModels.d.ts.map +1 -0
- package/dist/types/src/{components/TemplateEditor/TemplateEditor.stories.d.ts → containers/AssistantSettings/OllamaModels.stories.d.ts} +9 -7
- package/dist/types/src/containers/AssistantSettings/OllamaModels.stories.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/AssistantSettings/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts +3 -10
- package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +4 -11
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/containers/IntegrationPrompt/IntegrationPrompt.d.ts +13 -0
- package/dist/types/src/containers/IntegrationPrompt/IntegrationPrompt.d.ts.map +1 -0
- package/dist/types/src/containers/IntegrationPrompt/index.d.ts +2 -0
- package/dist/types/src/{components/RoutineProperties → containers/IntegrationPrompt}/index.d.ts.map +1 -1
- package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomePrompt/SpaceHomePrompt.d.ts +15 -0
- package/dist/types/src/containers/SpaceHomePrompt/SpaceHomePrompt.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomePrompt/index.d.ts +2 -0
- package/dist/types/src/containers/SpaceHomePrompt/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.d.ts +13 -0
- package/dist/types/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeSuggestions/index.d.ts +2 -0
- package/dist/types/src/containers/SpaceHomeSuggestions/index.d.ts.map +1 -0
- 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/TracePanel/testing/simulated-agent.d.ts +1 -1
- package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts.map +1 -1
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +4 -3
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts +20 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -1
- package/dist/types/src/execution-graph/index.d.ts +3 -2
- package/dist/types/src/execution-graph/index.d.ts.map +1 -1
- package/dist/types/src/execution-graph/pending-block-status.d.ts +26 -0
- package/dist/types/src/execution-graph/pending-block-status.d.ts.map +1 -0
- package/dist/types/src/execution-graph/pending-block-status.test.d.ts +2 -0
- package/dist/types/src/execution-graph/pending-block-status.test.d.ts.map +1 -0
- package/dist/types/src/execution-graph/span-tree.d.ts +13 -0
- package/dist/types/src/execution-graph/span-tree.d.ts.map +1 -1
- package/dist/types/src/extensions/index.d.ts +1 -1
- package/dist/types/src/extensions/index.d.ts.map +1 -1
- package/dist/types/src/extensions/prompt-extension.d.ts +1 -1
- package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -1
- package/dist/types/src/feed-logger.d.ts +3 -2
- package/dist/types/src/feed-logger.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +4 -2
- 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/useContextBinder.d.ts.map +1 -1
- package/dist/types/src/hooks/useHomeSuggestions.d.ts +8 -0
- package/dist/types/src/hooks/useHomeSuggestions.d.ts.map +1 -0
- package/dist/types/src/hooks/usePresets.d.ts +6 -2
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
- package/dist/types/src/hooks/useProcessEphemeralStatus.d.ts +10 -0
- package/dist/types/src/hooks/useProcessEphemeralStatus.d.ts.map +1 -0
- package/dist/types/src/hooks/useSkillRegistry.d.ts +21 -0
- package/dist/types/src/hooks/useSkillRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useTraceMessages.d.ts +12 -0
- package/dist/types/src/hooks/useTraceMessages.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +32 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-chat.d.ts.map +1 -1
- package/dist/types/src/operations/fork-chat.d.ts.map +1 -1
- package/dist/types/src/operations/generate-home-suggestions.d.ts +5 -0
- package/dist/types/src/operations/generate-home-suggestions.d.ts.map +1 -0
- package/dist/types/src/operations/generate-home-suggestions.test.d.ts +2 -0
- package/dist/types/src/operations/generate-home-suggestions.test.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/resolve-navigation-targets.d.ts +3 -15
- package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -1
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +2 -2
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -1
- package/dist/types/src/paths.d.ts +1 -1
- package/dist/types/src/paths.d.ts.map +1 -1
- package/dist/types/src/plugin.workerd.d.ts +2 -0
- package/dist/types/src/plugin.workerd.d.ts.map +1 -0
- package/dist/types/src/processor/presets.d.ts +20 -9
- package/dist/types/src/processor/presets.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +33 -209
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/skills/assistant/index.d.ts +2 -0
- package/dist/types/src/skills/assistant/index.d.ts.map +1 -0
- package/dist/types/src/skills/assistant/skill.d.ts +4 -0
- package/dist/types/src/skills/assistant/skill.d.ts.map +1 -0
- package/dist/types/src/skills/assistant/skill.node.test.d.ts +2 -0
- package/dist/types/src/skills/assistant/skill.node.test.d.ts.map +1 -0
- package/dist/types/src/skills/index.d.ts.map +1 -0
- package/dist/types/src/templates/daily-digest.d.ts +2 -2
- package/dist/types/src/templates/daily-digest.d.ts.map +1 -1
- package/dist/types/src/templates/index.d.ts +3 -3
- package/dist/types/src/templates/index.d.ts.map +1 -1
- package/dist/types/src/templates/research-brief.d.ts +2 -2
- package/dist/types/src/templates/research-brief.d.ts.map +1 -1
- package/dist/types/src/templates/routine-templates.test.d.ts +2 -0
- package/dist/types/src/templates/routine-templates.test.d.ts.map +1 -0
- package/dist/types/src/templates/scaffold.d.ts +9 -9
- package/dist/types/src/templates/scaffold.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +1 -1
- package/dist/types/src/testing/test-generator.d.ts.map +1 -1
- package/dist/types/src/testing/test-sequence.d.ts +1 -8
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/testing/test-trace.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +5 -12
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/AssistantCapabilities.d.ts +21 -0
- package/dist/types/src/types/AssistantCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/AssistantEvents.d.ts.map +1 -1
- package/dist/types/src/types/AssistantOperation.d.ts +17 -110
- package/dist/types/src/types/AssistantOperation.d.ts.map +1 -1
- package/dist/types/src/types/ChatSurface.d.ts +12 -0
- package/dist/types/src/types/ChatSurface.d.ts.map +1 -0
- package/dist/types/src/types/Ollama.d.ts +44 -0
- package/dist/types/src/types/Ollama.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +5 -4
- package/dist/types/src/types/Settings.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +4 -3
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/src/util/error-cause.d.ts +3 -0
- package/dist/types/src/util/error-cause.d.ts.map +1 -0
- package/dist/types/src/util/suggestions.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +38 -0
- package/package.json +103 -90
- package/src/AssistantPlugin.conversations.json +1 -1
- package/src/AssistantPlugin.node.ts +5 -5
- package/src/AssistantPlugin.test.ts +27 -41
- package/src/AssistantPlugin.ts +14 -12
- package/src/AssistantPlugin.workerd.ts +15 -6
- package/src/capabilities/agent-hydrator.ts +1 -2
- package/src/capabilities/agent-service.ts +7 -5
- package/src/capabilities/ai-context.ts +7 -32
- package/src/capabilities/ai-service.ts +3 -2
- package/src/capabilities/app-graph-builder.ts +43 -28
- package/src/capabilities/automation-templates.ts +3 -3
- package/src/capabilities/companion-chat-provisioner.ts +22 -6
- package/src/capabilities/{integration-provider.ts → connector.ts} +7 -12
- package/src/capabilities/create-object.ts +9 -26
- package/src/capabilities/index.ts +4 -12
- package/src/capabilities/markdown-extension.ts +7 -4
- package/src/capabilities/navigation-resolver.ts +20 -0
- package/src/capabilities/react-surface.tsx +55 -52
- package/src/capabilities/settings.ts +2 -2
- package/src/capabilities/skill-definition.ts +72 -0
- package/src/capabilities/state.ts +8 -1
- package/src/components/AgentProperties/AgentProperties.stories.tsx +1 -2
- package/src/components/AgentProperties/AgentProperties.tsx +1 -1
- package/src/components/Chat/Chat.stories.tsx +94 -0
- package/src/components/Chat/Chat.tsx +67 -16
- package/src/components/Chat/events.ts +0 -6
- package/src/components/ChatPrompt/ChatActions.tsx +185 -20
- package/src/components/ChatPrompt/ChatMcpErrors.tsx +1 -1
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +3 -3
- package/src/components/ChatPrompt/ChatOptions.tsx +43 -50
- package/src/components/ChatPrompt/ChatPrompt.tsx +31 -47
- package/src/components/ChatPrompt/ChatReferences.tsx +1 -1
- package/src/components/ChatPrompt/useChatVoiceInput.ts +103 -0
- package/src/components/ChatThread/Anchor.stories.tsx +1 -1
- package/src/components/ChatThread/ChatThread.stories.tsx +7 -16
- package/src/components/ChatThread/DEBUG.md +23 -0
- package/src/components/ChatThread/MarkdownStream.stories.tsx +3 -3
- package/src/components/ChatThread/registry.tsx +43 -17
- package/src/components/ChatThread/widgets/ReasoningWidget.stories.tsx +2 -2
- package/src/components/ChatThread/widgets/SummaryWidget.tsx +1 -1
- package/src/components/ChatThread/widgets/SurfaceWidget.tsx +41 -0
- package/src/components/ChatThread/widgets/ToolWidget.tsx +1 -1
- package/src/components/ChatThread/widgets/index.ts +1 -0
- package/src/components/ProcessTree/ProcessTree.stories.tsx +7 -0
- package/src/components/ProcessTree/ProcessTree.tsx +183 -88
- package/src/components/TaskList/TaskList.stories.tsx +24 -3
- package/src/components/TaskList/TaskList.tsx +122 -28
- package/src/components/ToolBlock/ToolBlock.tsx +1 -1
- package/src/components/Toolbox/Toolbox.tsx +11 -11
- package/src/components/index.ts +1 -6
- package/src/constants.ts +1 -1
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +12 -13
- package/src/containers/AgentArticle/AgentArticle.tsx +10 -10
- package/src/{components → containers}/AssistantSettings/AssistantSettings.stories.tsx +3 -2
- package/src/containers/AssistantSettings/AssistantSettings.tsx +90 -0
- package/src/containers/AssistantSettings/OllamaModels.stories.tsx +108 -0
- package/src/containers/AssistantSettings/OllamaModels.tsx +255 -0
- package/src/containers/ChatArticle/ChatArticle.stories.tsx +3 -3
- package/src/containers/ChatArticle/ChatArticle.tsx +25 -28
- package/src/containers/ChatCompanion/ChatCompanion.tsx +27 -27
- package/src/containers/ChatDialog/ChatDialog.tsx +10 -7
- package/src/containers/IntegrationPrompt/IntegrationPrompt.tsx +79 -0
- package/src/containers/IntegrationPrompt/index.ts +5 -0
- package/src/containers/PlanArticle/PlanArticle.tsx +5 -1
- package/src/containers/SpaceHomePrompt/SpaceHomePrompt.tsx +107 -0
- package/src/containers/SpaceHomePrompt/index.ts +5 -0
- package/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.tsx +83 -0
- package/src/containers/SpaceHomeSuggestions/index.ts +5 -0
- package/src/containers/TracePanel/TracePanel.stories.tsx +89 -47
- package/src/containers/TracePanel/TracePanel.tsx +15 -37
- package/src/containers/TracePanel/dxn-extractor.test.ts +2 -2
- package/src/containers/TriggerStatus/TriggerStatus.tsx +10 -6
- package/src/containers/index.ts +4 -3
- package/src/execution-graph/SPEC.md +1 -1
- package/src/execution-graph/execution-graph.test.ts +213 -25
- package/src/execution-graph/execution-graph.ts +337 -70
- package/src/execution-graph/index.ts +15 -5
- package/src/execution-graph/pending-block-status.test.ts +114 -0
- package/src/execution-graph/pending-block-status.ts +88 -0
- package/src/execution-graph/span-tree.test.ts +33 -1
- package/src/execution-graph/span-tree.ts +43 -2
- package/src/execution-graph/sub-agent-delegation.test.ts +34 -19
- package/src/extensions/index.ts +1 -1
- package/src/extensions/prompt-extension.ts +102 -73
- package/src/feed-logger.ts +24 -22
- package/src/functions/services.test.ts +4 -4
- package/src/hooks/index.ts +4 -2
- package/src/hooks/useChatProcessor.ts +12 -16
- package/src/hooks/useChatServices.ts +2 -2
- package/src/hooks/useChatToolbarActions.ts +5 -5
- package/src/hooks/useContextBinder.ts +2 -4
- package/src/hooks/useDebug.ts +2 -2
- package/src/hooks/useHomeSuggestions.ts +55 -0
- package/src/hooks/usePresets.ts +80 -11
- package/src/hooks/useProcessEphemeralStatus.ts +192 -0
- package/src/hooks/useReferencesProvider.ts +1 -1
- package/src/hooks/useSkillRegistry.ts +125 -0
- package/src/hooks/useTraceMessages.ts +41 -0
- package/src/index.ts +1 -1
- package/src/meta.ts +3 -31
- package/src/operations/create-chat.ts +11 -12
- package/src/operations/fork-chat.ts +15 -20
- package/src/operations/generate-home-suggestions.test.ts +103 -0
- package/src/operations/generate-home-suggestions.ts +116 -0
- package/src/operations/index.ts +1 -0
- package/src/operations/prompt.node.test.ts +14 -17
- package/src/operations/resolve-navigation-targets.ts +32 -19
- package/src/operations/run-prompt-in-new-chat.ts +34 -35
- package/src/operations/update-chat-name.ts +2 -2
- package/src/paths.ts +5 -3
- package/src/plugin.workerd.ts +5 -0
- package/src/processor/presets.ts +38 -61
- package/src/processor/processor.node.test.ts +72 -2
- package/src/processor/processor.ts +91 -21
- package/src/skills/assistant/index.ts +5 -0
- package/src/{blueprints/assistant/blueprint.node.test.ts → skills/assistant/skill.node.test.ts} +8 -8
- package/src/{blueprints/assistant/blueprint.ts → skills/assistant/skill.ts} +9 -9
- package/src/templates/daily-digest.ts +10 -12
- package/src/templates/index.ts +3 -3
- package/src/templates/research-brief.ts +15 -13
- package/src/templates/routine-templates.test.ts +55 -0
- package/src/templates/scaffold.ts +22 -57
- 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 +3430 -1093
- package/src/testing/test-generator.test.ts +26 -22
- package/src/testing/test-generator.ts +4 -8
- package/src/testing/test-trace.ts +2 -1
- package/src/testing/trace-timeline.node.test.ts +14 -14
- package/src/translations.ts +74 -31
- package/src/types/Assistant.ts +3 -1
- package/src/types/AssistantCapabilities.ts +24 -3
- package/src/types/AssistantEvents.ts +1 -1
- package/src/types/AssistantOperation.ts +22 -33
- package/src/types/ChatSurface.ts +16 -0
- package/src/types/Ollama.ts +59 -0
- package/src/types/Settings.ts +12 -10
- package/src/types/index.ts +3 -0
- package/src/types/service.ts +14 -14
- package/src/util/error-cause.ts +21 -0
- package/src/util/suggestions.ts +1 -1
- package/dist/lib/neutral/AgentArticle-K7XM46OQ.mjs.map +0 -7
- package/dist/lib/neutral/AssistantSettings-GG52BLKS.mjs +0 -40
- package/dist/lib/neutral/AssistantSettings-GG52BLKS.mjs.map +0 -7
- package/dist/lib/neutral/BlueprintArticle-ZBOZNZM7.mjs +0 -27
- package/dist/lib/neutral/BlueprintArticle-ZBOZNZM7.mjs.map +0 -7
- package/dist/lib/neutral/ChatCompanion-LBUHYWQG.mjs.map +0 -7
- package/dist/lib/neutral/ChatDialog-DCA6FLOV.mjs.map +0 -7
- package/dist/lib/neutral/PlanArticle-TS5ULWYS.mjs.map +0 -7
- package/dist/lib/neutral/RoutineArticle-5NYXHRG6.mjs +0 -119
- package/dist/lib/neutral/RoutineArticle-5NYXHRG6.mjs.map +0 -7
- package/dist/lib/neutral/RoutineList-SO5ETHNT.mjs +0 -48
- package/dist/lib/neutral/RoutineList-SO5ETHNT.mjs.map +0 -7
- package/dist/lib/neutral/RoutineProperties-FISLMW2R.mjs +0 -17
- package/dist/lib/neutral/RoutineProperties-FISLMW2R.mjs.map +0 -7
- package/dist/lib/neutral/TracePanel-KTZJ6JNR.mjs.map +0 -7
- package/dist/lib/neutral/TriggerStatus-X7Y5JFZJ.mjs.map +0 -7
- package/dist/lib/neutral/agent-hydrator-PJBYVMBW.mjs.map +0 -7
- package/dist/lib/neutral/agent-service-WCAP5MLI.mjs.map +0 -7
- package/dist/lib/neutral/ai-context-7WRHWYXY.mjs +0 -42
- package/dist/lib/neutral/ai-context-7WRHWYXY.mjs.map +0 -7
- package/dist/lib/neutral/ai-service-AADUIKBY.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-WUFHQH3Y.mjs.map +0 -7
- package/dist/lib/neutral/automation-templates-M2XQWGR6.mjs +0 -115
- package/dist/lib/neutral/automation-templates-M2XQWGR6.mjs.map +0 -7
- package/dist/lib/neutral/blueprint-definition-MH2QLYQH.mjs +0 -39
- package/dist/lib/neutral/blueprint-definition-MH2QLYQH.mjs.map +0 -7
- package/dist/lib/neutral/blueprints/index.mjs +0 -8
- package/dist/lib/neutral/chunk-5H6UJHLF.mjs.map +0 -7
- package/dist/lib/neutral/chunk-HLANPOBA.mjs.map +0 -7
- package/dist/lib/neutral/chunk-KLYLW4WH.mjs.map +0 -7
- package/dist/lib/neutral/chunk-QAZMOFPI.mjs +0 -130
- package/dist/lib/neutral/chunk-QAZMOFPI.mjs.map +0 -7
- package/dist/lib/neutral/chunk-RKVVK3R3.mjs.map +0 -7
- package/dist/lib/neutral/chunk-SMFJD7BP.mjs +0 -8
- package/dist/lib/neutral/chunk-XYHPOGTK.mjs +0 -43
- package/dist/lib/neutral/chunk-XYHPOGTK.mjs.map +0 -7
- package/dist/lib/neutral/chunk-YXRGZYYH.mjs.map +0 -7
- package/dist/lib/neutral/companion-chat-provisioner-YZZ73P6E.mjs.map +0 -7
- package/dist/lib/neutral/create-chat-SGGQ6HVN.mjs.map +0 -7
- package/dist/lib/neutral/create-object-U2SOFZLR.mjs.map +0 -7
- package/dist/lib/neutral/fork-chat-34KEF4ZJ.mjs.map +0 -7
- package/dist/lib/neutral/integration-provider-RBD3AFJU.mjs.map +0 -7
- package/dist/lib/neutral/markdown-extension-YMIFDMYF.mjs +0 -110
- package/dist/lib/neutral/markdown-extension-YMIFDMYF.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-XRTBW5OJ.mjs.map +0 -7
- package/dist/lib/neutral/resolve-navigation-targets-ZHIMMH7L.mjs +0 -22
- package/dist/lib/neutral/resolve-navigation-targets-ZHIMMH7L.mjs.map +0 -7
- package/dist/lib/neutral/run-prompt-in-new-chat-D5IIE2C7.mjs.map +0 -7
- package/dist/lib/neutral/state-H3G7QCU6.mjs.map +0 -7
- package/dist/types/src/blueprints/assistant/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/assistant/blueprint.node.test.d.ts +0 -2
- package/dist/types/src/blueprints/assistant/blueprint.node.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/assistant/index.d.ts +0 -2
- package/dist/types/src/blueprints/assistant/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -5
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/integration-provider.d.ts.map +0 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +0 -1
- package/dist/types/src/components/RoutineProperties/RoutineProperties.d.ts +0 -7
- package/dist/types/src/components/RoutineProperties/RoutineProperties.d.ts.map +0 -1
- package/dist/types/src/components/RoutineProperties/RoutineProperties.stories.d.ts +0 -15
- package/dist/types/src/components/RoutineProperties/RoutineProperties.stories.d.ts.map +0 -1
- package/dist/types/src/components/RoutineProperties/index.d.ts +0 -2
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +0 -13
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +0 -21
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +0 -16
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts +0 -12
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts +0 -3
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts +0 -8
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/index.d.ts +0 -2
- package/dist/types/src/components/TemplateEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/types.d.ts +0 -18
- package/dist/types/src/components/TemplateEditor/types.d.ts.map +0 -1
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +0 -6
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +0 -1
- package/dist/types/src/containers/BlueprintArticle/index.d.ts +0 -2
- package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +0 -1
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +0 -6
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +0 -1
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts +0 -15
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts.map +0 -1
- package/dist/types/src/containers/RoutineArticle/index.d.ts +0 -2
- package/dist/types/src/containers/RoutineArticle/index.d.ts.map +0 -1
- package/dist/types/src/containers/RoutineList/RoutineList.d.ts +0 -6
- package/dist/types/src/containers/RoutineList/RoutineList.d.ts.map +0 -1
- package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts +0 -21
- package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts.map +0 -1
- package/dist/types/src/containers/RoutineList/index.d.ts +0 -2
- package/dist/types/src/containers/RoutineList/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +0 -66
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +0 -1
- package/dist/types/src/hooks/useOnline.d.ts +0 -3
- package/dist/types/src/hooks/useOnline.d.ts.map +0 -1
- package/dist/types/src/templates/automation-templates.test.d.ts +0 -2
- package/dist/types/src/templates/automation-templates.test.d.ts.map +0 -1
- package/src/blueprints/assistant/index.ts +0 -5
- package/src/capabilities/blueprint-definition.ts +0 -65
- package/src/components/AssistantSettings/AssistantSettings.tsx +0 -43
- package/src/components/RoutineProperties/RoutineProperties.stories.tsx +0 -59
- package/src/components/RoutineProperties/RoutineProperties.tsx +0 -23
- package/src/components/RoutineProperties/index.ts +0 -5
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +0 -95
- package/src/components/TemplateEditor/TemplateEditor.tsx +0 -80
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +0 -76
- package/src/components/TemplateEditor/TemplateForm.tsx +0 -204
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +0 -274
- package/src/components/TemplateEditor/extensions/index.ts +0 -6
- package/src/components/TemplateEditor/extensions/xml-extension.ts +0 -64
- package/src/components/TemplateEditor/index.ts +0 -5
- package/src/components/TemplateEditor/types.tsx +0 -28
- package/src/containers/BlueprintArticle/BlueprintArticle.tsx +0 -29
- package/src/containers/BlueprintArticle/index.ts +0 -5
- package/src/containers/RoutineArticle/RoutineArticle.stories.tsx +0 -75
- package/src/containers/RoutineArticle/RoutineArticle.tsx +0 -109
- package/src/containers/RoutineArticle/index.ts +0 -5
- package/src/containers/RoutineList/RoutineList.stories.tsx +0 -130
- package/src/containers/RoutineList/RoutineList.tsx +0 -50
- package/src/containers/RoutineList/index.ts +0 -5
- package/src/hooks/useBlueprintRegistry.ts +0 -125
- package/src/hooks/useOnline.ts +0 -10
- package/src/templates/automation-templates.test.ts +0 -66
- package/src/testing/trace-timeline.node.conversations.json +0 -1
- /package/dist/lib/neutral/{ChatArticle-VNVZCDUR.mjs.map → ChatArticle-OO7GGEFW.mjs.map} +0 -0
- /package/dist/lib/neutral/{edge-model-resolver-BBVOJBGJ.mjs.map → edge-model-resolver-WDJWDZTT.mjs.map} +0 -0
- /package/dist/lib/neutral/{blueprints → extensions}/index.mjs.map +0 -0
- /package/dist/types/src/{components → containers}/AssistantSettings/AssistantSettings.stories.d.ts +0 -0
- /package/dist/types/src/{components → containers}/AssistantSettings/index.d.ts +0 -0
- /package/dist/types/src/{blueprints → skills}/index.d.ts +0 -0
- /package/src/{components → containers}/AssistantSettings/index.ts +0 -0
- /package/src/{blueprints → skills}/index.ts +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/extensions/prompt-extension.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { syntaxTree } from '@codemirror/language';\nimport { type Extension, Facet, type Range } from '@codemirror/state';\nimport { Decoration, type DecorationSet, EditorView, ViewPlugin, type ViewUpdate, WidgetType } from '@codemirror/view';\n\nimport { Domino } from '@dxos/ui';\n\nexport type PromptExtensionOptions = {\n /** Called when the user clicks the run button on a prompt code block. */\n onRun: (promptText: string) => void;\n};\n\ntype OnRun = (text: string) => void;\n\n// Module-level facet so the plugin singleton can read the latest handler.\nconst promptHandlerFacet = Facet.define<OnRun, OnRun | null>({\n combine: (handlers) => handlers[0] ?? null,\n});\n\n// Module-level singleton — CM6 deduplicates by reference equality, preventing duplicate buttons\n// when the extension is contributed more than once.\nconst promptPlugin = ViewPlugin.fromClass(\n class {\n decorations: DecorationSet;\n\n constructor(view: EditorView) {\n this.decorations = this.buildDecorations(view);\n }\n\n update(update: ViewUpdate) {\n if (\n update.docChanged ||\n update.viewportChanged ||\n update.selectionSet ||\n update.focusChanged ||\n update.startState.facet(promptHandlerFacet) !== update.state.facet(promptHandlerFacet)\n ) {\n this.decorations = this.buildDecorations(update.view);\n }\n }\n\n buildDecorations(view: EditorView): DecorationSet {\n const onRun = view.state.facet(promptHandlerFacet);\n if (!onRun) {\n return Decoration.none;\n }\n\n const ranges: Range<Decoration>[] = [];\n\n syntaxTree(view.state).iterate({\n enter: (node) => {\n if (node.name === 'FencedCode') {\n const info = node.node.getChild('CodeInfo');\n if (info) {\n const type = view.state.sliceDoc(info.from, info.to);\n const text = node.node.getChild('CodeText');\n if (type === 'prompt' && text) {\n const content = view.state.sliceDoc(text.from, text.to).trim();\n if (content.length > 0) {\n // Mark the header line as a positioned container for the button overlay.\n ranges.push(Decoration.line({ class: 'cm-prompt-header' }).range(node.from, node.from));\n ranges.push(\n Decoration.widget({ widget: new PromptRunWidget(content, onRun), side: -1 }).range(\n node.from,\n node.from,\n ),\n );\n }\n }\n }\n }\n },\n });\n\n // sort=true lets CM6 order by startSide (line decorations before widgets at the same position).\n return Decoration.set(ranges, true);\n }\n },\n {\n decorations: (v) => v.decorations,\n },\n);\n\n// Base theme wires up the positioned container on the header line.\nconst promptTheme = EditorView.baseTheme({\n '.cm-prompt-header': {\n position: 'relative',\n overflow: 'visible',\n },\n});\n\n/**\n * CodeMirror extension that adds a \"run\" button to ```prompt fenced code blocks.\n */\nexport const promptRunExtension = ({ onRun }: PromptExtensionOptions): Extension => [\n promptHandlerFacet.of(onRun),\n promptPlugin,\n promptTheme,\n];\n\nclass PromptRunWidget extends WidgetType {\n constructor(\n private readonly prompt: string,\n private readonly onClick: OnRun,\n ) {\n super();\n }\n\n override eq(other: this) {\n return this.prompt === other.prompt && this.onClick === other.onClick;\n }\n\n override ignoreEvent() {\n return false;\n }\n\n override toDOM() {\n return Domino.of('button')\n .classNames(\n 'dx-button h-6 w-6 min-h-0 p-1 absolute top-0 right-0 bg-green-bg hover:bg-green-surface text-green-fg',\n )\n .on('mousedown', (event) => {\n event.preventDefault();\n event.stopPropagation();\n this.onClick(this.prompt);\n })\n .append(\n Domino.of('svg', Domino.SVG)\n .classNames('w-4 h-4 cursor-pointer')\n .append(\n Domino.of('use', Domino.SVG).attributes({\n href: Domino.icon('ph--sparkle--regular'),\n }),\n ),\n ).root;\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,kBAAkB;AAC3B,SAAyBC,aAAyB;AAClD,SAASC,YAAgCC,YAAYC,YAA6BC,kBAAkB;AAEpG,SAASC,cAAc;AAUvB,IAAMC,qBAAqBN,MAAMO,OAA4B;EAC3DC,SAAS,CAACC,aAAaA,SAAS,CAAA,KAAM;AACxC,CAAA;AAIA,IAAMC,eAAeP,WAAWQ,UAC9B,MAAA;EACEC;EAEA,YAAYC,MAAkB;AAC5B,SAAKD,cAAc,KAAKE,iBAAiBD,IAAAA;EAC3C;EAEAE,OAAOA,QAAoB;AACzB,QACEA,OAAOC,cACPD,OAAOE,mBACPF,OAAOG,gBACPH,OAAOI,gBACPJ,OAAOK,WAAWC,MAAMf,kBAAAA,MAAwBS,OAAOO,MAAMD,MAAMf,kBAAAA,GACnE;AACA,WAAKM,cAAc,KAAKE,iBAAiBC,OAAOF,IAAI;IACtD;EACF;EAEAC,iBAAiBD,MAAiC;AAChD,UAAMU,QAAQV,KAAKS,MAAMD,MAAMf,kBAAAA;AAC/B,QAAI,CAACiB,OAAO;AACV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EAESC,GAAGC,OAAa;AACvB,WAAO,KAAKH,WAAWG,MAAMH,UAAU,KAAKC,YAAYE,MAAMF;EAChE;EAESG,cAAc;AACrB,WAAO;EACT;EAESC,QAAQ;AACf,WAAOvD,OAAOiD,GAAG,QAAA,EACdO,WACC,uGAAA,EAEDC,GAAG,aAAa,CAACC,UAAAA;AAChBA,YAAMC,eAAc;AACpBD,YAAME,gBAAe;AACrB,WAAKT,QAAQ,KAAKD,MAAM;IAC1B,CAAA,EACCW,OACC7D,OAAOiD,GAAG,OAAOjD,OAAO8D,GAAG,EACxBN,WAAW,wBAAA,EACXK,OACC7D,OAAOiD,GAAG,OAAOjD,OAAO8D,GAAG,EAAEC,WAAW;MACtCC,MAAMhE,OAAOiE,KAAK,sBAAA;IACpB,CAAA,CAAA,CAAA,EAEJC;EACN;AACF;",
|
|
6
|
+
"names": ["syntaxTree", "Facet", "Decoration", "EditorView", "ViewPlugin", "WidgetType", "Domino", "promptHandlerFacet", "define", "combine", "handlers", "promptPlugin", "fromClass", "decorations", "view", "buildDecorations", "update", "docChanged", "viewportChanged", "selectionSet", "focusChanged", "startState", "facet", "state", "onRun", "none", "ranges", "iterate", "enter", "node", "name", "info", "getChild", "type", "sliceDoc", "from", "to", "text", "content", "trim", "length", "push", "line", "class", "range", "widget", "PromptRunWidget", "side", "set", "v", "promptTheme", "baseTheme", "position", "overflow", "promptRunExtension", "of", "prompt", "onClick", "eq", "other", "ignoreEvent", "toDOM", "classNames", "on", "event", "preventDefault", "stopPropagation", "append", "SVG", "attributes", "href", "icon", "root"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { Plugin } from "@dxos/app-framework";
|
|
3
|
+
import { DXN } from "@dxos/keys";
|
|
4
|
+
|
|
5
|
+
// dx.config.ts
|
|
6
|
+
import { Config2 } from "@dxos/app-framework/config";
|
|
7
|
+
import { trim } from "@dxos/util";
|
|
8
|
+
var dx_config_default = Config2.make({
|
|
9
|
+
plugin: {
|
|
10
|
+
key: "org.dxos.plugin.assistant",
|
|
11
|
+
name: "Assistant",
|
|
12
|
+
author: "DXOS",
|
|
13
|
+
description: trim`
|
|
14
|
+
AssistantPlugin brings a conversational AI assistant into DXOS Composer, letting users chat naturally
|
|
15
|
+
with objects in their spaces. Every Chat is a first-class ECHO object — messages are persisted,
|
|
16
|
+
replicated across peers in real time, and can be bound to any document or collection as a companion
|
|
17
|
+
panel that appears alongside the primary view.
|
|
18
|
+
|
|
19
|
+
AI capabilities are delivered through a flexible multi-provider model layer. Users can route requests
|
|
20
|
+
to the DXOS Edge service, a locally running Ollama instance, or LM Studio, and switch providers at
|
|
21
|
+
any time in Settings. Each provider can be configured with a preferred model, and the runtime
|
|
22
|
+
automatically falls back when a provider is unavailable.
|
|
23
|
+
|
|
24
|
+
Skills give every chat a specialised identity. Built-in skills cover general assistance,
|
|
25
|
+
web browsing, database interaction, web search, Discord and Linear integration, autonomous agents,
|
|
26
|
+
planning, memory, automation, and a wizard for authoring new skills. Binding a skill
|
|
27
|
+
changes the system instructions and the tool set exposed to the model in a single step.
|
|
28
|
+
|
|
29
|
+
Tool execution runs through the DXOS compute runtime so every AI action — opening a document,
|
|
30
|
+
searching the web, querying a database — produces a structured execution trace. The optional
|
|
31
|
+
TracePanel visualises that trace as a commit graph or raw JSON, giving developers full observability
|
|
32
|
+
into what the model did and why.
|
|
33
|
+
`,
|
|
34
|
+
icon: {
|
|
35
|
+
key: "ph--sparkle--regular",
|
|
36
|
+
hue: "sky"
|
|
37
|
+
},
|
|
38
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-assistant",
|
|
39
|
+
spec: "PLUGIN.mdl"
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// src/meta.ts
|
|
44
|
+
var meta = Plugin.getMetaFromConfig(dx_config_default);
|
|
45
|
+
var ASSISTANT_DIALOG = DXN.make(`${meta.profile.key}.assistantDialog`);
|
|
46
|
+
var ASSISTANT_COMPANION_VARIANT = "assistant-chat";
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
meta,
|
|
50
|
+
ASSISTANT_DIALOG,
|
|
51
|
+
ASSISTANT_COMPANION_VARIANT
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=chunk-L7AR4VTA.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts", "../../../dx.config.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n\nexport const ASSISTANT_DIALOG = DXN.make(`${meta.profile.key}.assistantDialog`);\n\n/** Companion variant identifier for the assistant chat panel. */\nexport const ASSISTANT_COMPANION_VARIANT = 'assistant-chat';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.assistant',\n name: 'Assistant',\n author: 'DXOS',\n description: trim`\n AssistantPlugin brings a conversational AI assistant into DXOS Composer, letting users chat naturally\n with objects in their spaces. Every Chat is a first-class ECHO object — messages are persisted,\n replicated across peers in real time, and can be bound to any document or collection as a companion\n panel that appears alongside the primary view.\n\n AI capabilities are delivered through a flexible multi-provider model layer. Users can route requests\n to the DXOS Edge service, a locally running Ollama instance, or LM Studio, and switch providers at\n any time in Settings. Each provider can be configured with a preferred model, and the runtime\n automatically falls back when a provider is unavailable.\n\n Skills give every chat a specialised identity. Built-in skills cover general assistance,\n web browsing, database interaction, web search, Discord and Linear integration, autonomous agents,\n planning, memory, automation, and a wizard for authoring new skills. Binding a skill\n changes the system instructions and the tool set exposed to the model in a single step.\n\n Tool execution runs through the DXOS compute runtime so every AI action — opening a document,\n searching the web, querying a database — produces a structured execution trace. The optional\n TracePanel visualises that trace as a commit graph or raw JSON, giving developers full observability\n into what the model did and why.\n `,\n icon: { key: 'ph--sparkle--regular', hue: 'sky' },\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-assistant',\n spec: 'PLUGIN.mdl',\n },\n});\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;;;ACDpB,SAASC,eAAe;AACxB,SAASC,YAAY;AAErB,IAAA,oBAAeD,QAAQE,KAAK;EAC1BC,QAAQ;IACNC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,aAAaN;;;;;;;;;;;;;;;;;;;;;IAqBbO,MAAM;MAAEJ,KAAK;MAAwBK,KAAK;IAAM;IAChDC,QAAQ;IACRC,MAAM;EACR;AACF,CAAA;;;AD5BO,IAAMC,OAAOC,OAAOC,kBAAkBC,iBAAAA;AAEtC,IAAMC,mBAAmBC,IAAIC,KAAK,GAAGN,KAAKO,QAAQC,GAAG,kBAAkB;AAGvE,IAAMC,8BAA8B;",
|
|
6
|
+
"names": ["Plugin", "DXN", "Config2", "trim", "make", "plugin", "key", "name", "author", "description", "icon", "hue", "source", "spec", "meta", "Plugin", "getMetaFromConfig", "config", "ASSISTANT_DIALOG", "DXN", "make", "profile", "key", "ASSISTANT_COMPANION_VARIANT"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// src/capabilities/skill-definition.ts
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
4
|
+
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
5
|
+
import { AgentHandlers, AgentSkill, AgentSkillHandlers, AgentWizardHandlers, AgentWizardSkill, AlarmHandlers, AlarmSkill, AutomationSkill, BrowserSkill, ConnectorsSkill, DatabaseHandlers, DatabaseSkill, DelegationHandlers, DelegationSkill, DiscordSkill, LinearSkill, MemorySkill, PlanningHandlers, PlanningSkill, SkillManagerHandlers, SkillManagerSkill, WebSearchHandlers, WebSearchSkill, makeDelegationStrategy } from "@dxos/assistant-toolkit";
|
|
6
|
+
import { RoutineCapabilities } from "@dxos/plugin-routine";
|
|
7
|
+
import { AssistantSkill } from "#skills";
|
|
8
|
+
var skillDefinition = () => Effect.succeed([
|
|
9
|
+
Capability.contributes(AppCapabilities.SkillDefinition, AssistantSkill),
|
|
10
|
+
Capability.contributes(AppCapabilities.SkillDefinition, BrowserSkill),
|
|
11
|
+
Capability.contributes(AppCapabilities.SkillDefinition, ConnectorsSkill),
|
|
12
|
+
Capability.contributes(AppCapabilities.SkillDefinition, DatabaseSkill),
|
|
13
|
+
Capability.contributes(AppCapabilities.SkillDefinition, WebSearchSkill),
|
|
14
|
+
Capability.contributes(AppCapabilities.SkillDefinition, DiscordSkill),
|
|
15
|
+
Capability.contributes(AppCapabilities.SkillDefinition, LinearSkill),
|
|
16
|
+
Capability.contributes(AppCapabilities.SkillDefinition, AgentSkill),
|
|
17
|
+
Capability.contributes(AppCapabilities.SkillDefinition, PlanningSkill),
|
|
18
|
+
Capability.contributes(AppCapabilities.SkillDefinition, MemorySkill),
|
|
19
|
+
Capability.contributes(AppCapabilities.SkillDefinition, AutomationSkill),
|
|
20
|
+
Capability.contributes(AppCapabilities.SkillDefinition, SkillManagerSkill),
|
|
21
|
+
Capability.contributes(AppCapabilities.SkillDefinition, AgentWizardSkill),
|
|
22
|
+
Capability.contributes(AppCapabilities.SkillDefinition, DelegationSkill),
|
|
23
|
+
Capability.contributes(AppCapabilities.SkillDefinition, AlarmSkill),
|
|
24
|
+
Capability.contributes(Capabilities.OperationHandler, AgentHandlers),
|
|
25
|
+
Capability.contributes(Capabilities.OperationHandler, AgentSkillHandlers),
|
|
26
|
+
Capability.contributes(Capabilities.OperationHandler, SkillManagerHandlers),
|
|
27
|
+
Capability.contributes(Capabilities.OperationHandler, DatabaseHandlers),
|
|
28
|
+
Capability.contributes(Capabilities.OperationHandler, WebSearchHandlers),
|
|
29
|
+
Capability.contributes(Capabilities.OperationHandler, AgentWizardHandlers),
|
|
30
|
+
Capability.contributes(Capabilities.OperationHandler, DelegationHandlers),
|
|
31
|
+
Capability.contributes(Capabilities.OperationHandler, PlanningHandlers),
|
|
32
|
+
Capability.contributes(Capabilities.OperationHandler, AlarmHandlers),
|
|
33
|
+
// Run the conversational agent as a supervisor: delegate in-progress plan tasks to sub-agents
|
|
34
|
+
// and fold their results back into the conversation (consumed by the AgentService LayerSpec).
|
|
35
|
+
Capability.contributes(RoutineCapabilities.AgentDelegationStrategy, makeDelegationStrategy())
|
|
36
|
+
]);
|
|
37
|
+
var skill_definition_default = skillDefinition;
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
skill_definition_default
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=chunk-LS72HWMM.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/skill-definition.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport {\n AgentHandlers,\n AgentSkill,\n AgentSkillHandlers,\n AgentWizardHandlers,\n AgentWizardSkill,\n AlarmHandlers,\n AlarmSkill,\n AutomationSkill,\n BrowserSkill,\n ConnectorsSkill,\n DatabaseHandlers,\n DatabaseSkill,\n DelegationHandlers,\n DelegationSkill,\n DiscordSkill,\n LinearSkill,\n MemorySkill,\n PlanningHandlers,\n PlanningSkill,\n SkillManagerHandlers,\n SkillManagerSkill,\n WebSearchHandlers,\n WebSearchSkill,\n makeDelegationStrategy,\n} from '@dxos/assistant-toolkit';\nimport { RoutineCapabilities } from '@dxos/plugin-routine';\n\nimport { AssistantSkill } from '#skills';\n\nconst skillDefinition = () =>\n Effect.succeed([\n Capability.contributes(AppCapabilities.SkillDefinition, AssistantSkill),\n Capability.contributes(AppCapabilities.SkillDefinition, BrowserSkill),\n Capability.contributes(AppCapabilities.SkillDefinition, ConnectorsSkill),\n Capability.contributes(AppCapabilities.SkillDefinition, DatabaseSkill),\n Capability.contributes(AppCapabilities.SkillDefinition, WebSearchSkill),\n Capability.contributes(AppCapabilities.SkillDefinition, DiscordSkill),\n Capability.contributes(AppCapabilities.SkillDefinition, LinearSkill),\n Capability.contributes(AppCapabilities.SkillDefinition, AgentSkill),\n Capability.contributes(AppCapabilities.SkillDefinition, PlanningSkill),\n Capability.contributes(AppCapabilities.SkillDefinition, MemorySkill),\n Capability.contributes(AppCapabilities.SkillDefinition, AutomationSkill),\n Capability.contributes(AppCapabilities.SkillDefinition, SkillManagerSkill),\n Capability.contributes(AppCapabilities.SkillDefinition, AgentWizardSkill),\n Capability.contributes(AppCapabilities.SkillDefinition, DelegationSkill),\n Capability.contributes(AppCapabilities.SkillDefinition, AlarmSkill),\n\n Capability.contributes(Capabilities.OperationHandler, AgentHandlers),\n Capability.contributes(Capabilities.OperationHandler, AgentSkillHandlers),\n Capability.contributes(Capabilities.OperationHandler, SkillManagerHandlers),\n Capability.contributes(Capabilities.OperationHandler, DatabaseHandlers),\n Capability.contributes(Capabilities.OperationHandler, WebSearchHandlers),\n Capability.contributes(Capabilities.OperationHandler, AgentWizardHandlers),\n Capability.contributes(Capabilities.OperationHandler, DelegationHandlers),\n Capability.contributes(Capabilities.OperationHandler, PlanningHandlers),\n Capability.contributes(Capabilities.OperationHandler, AlarmHandlers),\n\n // Run the conversational agent as a supervisor: delegate in-progress plan tasks to sub-agents\n // and fold their results back into the conversation (consumed by the AgentService LayerSpec).\n Capability.contributes(RoutineCapabilities.AgentDelegationStrategy, makeDelegationStrategy()),\n ]);\n\nexport default skillDefinition;\n"],
|
|
5
|
+
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,uBAAuB;AAChC,SACEC,eACAC,YACAC,oB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Z,WAAW8B,YAAY/B,aAAaiC,kBAAkBT,iBAAAA;EACtDvB,WAAW8B,YAAY/B,aAAaiC,kBAAkB3B,mBAAAA;EACtDL,WAAW8B,YAAY/B,aAAaiC,kBAAkBlB,kBAAAA;EACtDd,WAAW8B,YAAY/B,aAAaiC,kBAAkBb,gBAAAA;EACtDnB,WAAW8B,YAAY/B,aAAaiC,kBAAkBzB,aAAAA;;;EAItDP,WAAW8B,YAAYJ,oBAAoBO,yBAAyBR,uBAAAA,CAAAA;CACrE;AAEH,IAAA,2BAAeG;",
|
|
6
|
+
"names": ["Effect", "Capabilities", "Capability", "AppCapabilities", "AgentHandlers", "AgentSkill", "AgentSkillHandlers", "AgentWizardHandlers", "AgentWizardSkill", "AlarmHandlers", "AlarmSkill", "AutomationSkill", "BrowserSkill", "ConnectorsSkill", "DatabaseHandlers", "DatabaseSkill", "DelegationHandlers", "DelegationSkill", "DiscordSkill", "LinearSkill", "MemorySkill", "PlanningHandlers", "PlanningSkill", "SkillManagerHandlers", "SkillManagerSkill", "WebSearchHandlers", "WebSearchSkill", "makeDelegationStrategy", "RoutineCapabilities", "AssistantSkill", "skillDefinition", "succeed", "contributes", "SkillDefinition", "OperationHandler", "AgentDelegationStrategy"]
|
|
7
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// src/paths.ts
|
|
2
|
-
import {
|
|
2
|
+
import { Paths } from "@dxos/app-toolkit";
|
|
3
3
|
import { Chat } from "@dxos/assistant-toolkit";
|
|
4
|
-
var { getSectionPath: getChatsPath, getObjectPath: getChatPath } = createTypeSectionPaths(Chat.Chat
|
|
4
|
+
var { getSectionPath: getChatsPath, getObjectPath: getChatPath } = Paths.createTypeSectionPaths(Chat.Chat, {
|
|
5
|
+
groupId: Paths.GroupSegments.ai
|
|
6
|
+
});
|
|
5
7
|
|
|
6
8
|
export {
|
|
7
9
|
getChatsPath,
|
|
8
10
|
getChatPath
|
|
9
11
|
};
|
|
10
|
-
//# sourceMappingURL=chunk-
|
|
12
|
+
//# sourceMappingURL=chunk-OZWZGIV2.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/paths.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Paths } from '@dxos/app-toolkit';\nimport { Chat } from '@dxos/assistant-toolkit';\n\nconst { getSectionPath: getChatsPath, getObjectPath: getChatPath } = Paths.createTypeSectionPaths(Chat.Chat, {\n groupId: Paths.GroupSegments.ai,\n});\n\nexport { getChatPath, getChatsPath };\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,aAAa;AACtB,SAASC,YAAY;AAErB,IAAM,EAAEC,gBAAgBC,cAAcC,eAAeC,YAAW,IAAKL,MAAMM,uBAAuBL,KAAKA,MAAM;EAC3GM,SAASP,MAAMQ,cAAcC;AAC/B,CAAA;",
|
|
6
|
+
"names": ["Paths", "Chat", "getSectionPath", "getChatsPath", "getObjectPath", "getChatPath", "createTypeSectionPaths", "groupId", "GroupSegments", "ai"]
|
|
7
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
-
|
|
3
1
|
// src/capabilities/toolkit.ts
|
|
4
2
|
import * as Effect from "effect/Effect";
|
|
5
3
|
import { Capability } from "@dxos/app-framework";
|
|
@@ -8,7 +6,8 @@ import { WebSearchToolkitOpaque } from "@dxos/assistant-toolkit";
|
|
|
8
6
|
var toolkit_default = Capability.makeModule(() => Effect.succeed([
|
|
9
7
|
Capability.contributes(AppCapabilities.Toolkit, WebSearchToolkitOpaque)
|
|
10
8
|
]));
|
|
9
|
+
|
|
11
10
|
export {
|
|
12
|
-
toolkit_default
|
|
11
|
+
toolkit_default
|
|
13
12
|
};
|
|
14
|
-
//# sourceMappingURL=
|
|
13
|
+
//# sourceMappingURL=chunk-QOKLFHUS.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/toolkit.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { WebSearchToolkitOpaque } from '@dxos/assistant-toolkit';\n\nexport default Capability.makeModule(() =>\n Effect.succeed([Capability.contributes(AppCapabilities.Toolkit, WebSearchToolkitOpaque)]),\n);\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAChC,SAASC,8BAA8B;AAEvC,IAAA,kBAAeF,WAAWG,WAAW,MAC5BC,eAAQ;EAACJ,WAAWK,YAAYJ,gBAAgBK,SAASJ,sBAAAA;CAAwB,CAAA;",
|
|
6
6
|
"names": ["Effect", "Capability", "AppCapabilities", "WebSearchToolkitOpaque", "makeModule", "succeed", "contributes", "Toolkit"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
-
|
|
3
1
|
// src/containers/TracePanel/TracePanel.tsx
|
|
4
2
|
import { Atom } from "@effect-atom/atom";
|
|
5
3
|
import { useAtomValue } from "@effect-atom/atom-react";
|
|
@@ -8,11 +6,9 @@ import * as Duration from "effect/Duration";
|
|
|
8
6
|
import { pipe } from "effect/Function";
|
|
9
7
|
import React, { useCallback, useDeferredValue, useEffect, useMemo, useState } from "react";
|
|
10
8
|
import { Capabilities } from "@dxos/app-framework";
|
|
11
|
-
import {
|
|
9
|
+
import { useAtomCapability, useCapability, useOperationInvoker } from "@dxos/app-framework/ui";
|
|
12
10
|
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
13
|
-
import { Process
|
|
14
|
-
import { Filter, Query } from "@dxos/echo";
|
|
15
|
-
import { FeedTraceSink } from "@dxos/functions-runtime";
|
|
11
|
+
import { Process } from "@dxos/compute";
|
|
16
12
|
import { EID } from "@dxos/keys";
|
|
17
13
|
import { ScrollContainer } from "@dxos/react-ui";
|
|
18
14
|
import { composable, composableProps } from "@dxos/react-ui";
|
|
@@ -22,6 +18,7 @@ import { Syntax } from "@dxos/react-ui-syntax-highlighter";
|
|
|
22
18
|
import { mx } from "@dxos/ui-theme";
|
|
23
19
|
import { ProcessTree } from "#components";
|
|
24
20
|
import { buildExecutionGraph } from "#execution-graph";
|
|
21
|
+
import { getTraceMessagesAtom, useTraceMessages } from "#hooks";
|
|
25
22
|
import { AssistantCapabilities } from "#types";
|
|
26
23
|
var TracePanel = composable(({ space, attendableId, onProcessTerminate, ...props }, forwardedRef) => {
|
|
27
24
|
const attentionAttrs = useAttentionAttributes(attendableId);
|
|
@@ -110,29 +107,21 @@ var TracePanel = composable(({ space, attendableId, onProcessTerminate, ...props
|
|
|
110
107
|
})))));
|
|
111
108
|
});
|
|
112
109
|
var atomEmpty = Atom.make(() => []);
|
|
113
|
-
var useExecutionGraph = (space, { eventLimit } = {}) => {
|
|
110
|
+
var useExecutionGraph = (space, { collapseCompletedSpans, eventLimit } = {}) => {
|
|
114
111
|
const monitor = useCapability(Capabilities.ProcessMonitor);
|
|
115
112
|
const processesAtom = monitor?.processTreeAtom ?? atomEmpty;
|
|
116
113
|
const atom = useMemo(() => getExecutionGraph(space, processesAtom, {
|
|
114
|
+
collapseCompletedSpans,
|
|
117
115
|
eventLimit
|
|
118
116
|
}), [
|
|
119
117
|
space,
|
|
120
118
|
processesAtom,
|
|
119
|
+
collapseCompletedSpans,
|
|
121
120
|
eventLimit
|
|
122
121
|
]);
|
|
123
122
|
return useAtomValue(atom);
|
|
124
123
|
};
|
|
125
|
-
var
|
|
126
|
-
// TODO(dmaretskyi): This should be possible in a single query with properly working limit(1) and feed > feed contents traversal.
|
|
127
|
-
space.db.query(feeds.length > 0 ? Query.type(Trace.Message).from(feeds[0]) : Query.select(Filter.nothing())).atom
|
|
128
|
-
)), (atom) => Atom.make((get) => get(get(atom))));
|
|
129
|
-
var useTraceMessages = (space) => {
|
|
130
|
-
const atom = useMemo(() => getTraceMessagesAtom(space), [
|
|
131
|
-
space
|
|
132
|
-
]);
|
|
133
|
-
return useAtomValue(atom);
|
|
134
|
-
};
|
|
135
|
-
var getExecutionGraph = (space, processesAtom, { eventLimit = 100 } = {}) => {
|
|
124
|
+
var getExecutionGraph = (space, processesAtom, { collapseCompletedSpans = true, eventLimit = 100 } = {}) => {
|
|
136
125
|
const traceMessages = getTraceMessagesAtom(space);
|
|
137
126
|
const activeProcesses = pipe(processesAtom, Atom.debounce(Duration.millis(500)), Atom.map((processes) => (
|
|
138
127
|
// `Data.array` does structural comparison on the array elements.
|
|
@@ -141,6 +130,7 @@ var getExecutionGraph = (space, processesAtom, { eventLimit = 100 } = {}) => {
|
|
|
141
130
|
return Atom.make((get) => buildExecutionGraph({
|
|
142
131
|
traceMessages: get(traceMessages),
|
|
143
132
|
activeProcesses: get(activeProcesses),
|
|
133
|
+
collapseCompletedSpans,
|
|
144
134
|
eventLimit
|
|
145
135
|
}));
|
|
146
136
|
};
|
|
@@ -153,15 +143,13 @@ var ProcessTreeContainer = ({ onProcessSelect, onProcessTerminate }) => {
|
|
|
153
143
|
const processesDeferred = useDeferredValue(processes);
|
|
154
144
|
return /* @__PURE__ */ React.createElement(ProcessTree, {
|
|
155
145
|
processes: processesDeferred,
|
|
146
|
+
depth: 3,
|
|
156
147
|
onProcessSelect,
|
|
157
148
|
onProcessTerminate
|
|
158
149
|
});
|
|
159
150
|
};
|
|
160
151
|
|
|
161
|
-
// src/containers/TracePanel/index.ts
|
|
162
|
-
var TracePanel_default = TracePanel;
|
|
163
152
|
export {
|
|
164
|
-
TracePanel
|
|
165
|
-
TracePanel_default as default
|
|
153
|
+
TracePanel
|
|
166
154
|
};
|
|
167
|
-
//# sourceMappingURL=
|
|
155
|
+
//# sourceMappingURL=chunk-SCTHQVIJ.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/containers/TracePanel/TracePanel.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom';\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport * as Data from 'effect/Data';\nimport * as Duration from 'effect/Duration';\nimport { pipe } from 'effect/Function';\nimport React, { useCallback, useDeferredValue, useEffect, useMemo, useState } from 'react';\n\nimport { Capabilities } from '@dxos/app-framework';\nimport { useAtomCapability, useCapability, useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { Process } from '@dxos/compute';\nimport { EID } from '@dxos/keys';\nimport { type Space } from '@dxos/react-client/echo';\nimport { ScrollContainer } from '@dxos/react-ui';\nimport { composable, composableProps } from '@dxos/react-ui';\nimport { useAttentionAttributes } from '@dxos/react-ui-attention';\nimport { type Commit, Timeline } from '@dxos/react-ui-components';\nimport { Syntax } from '@dxos/react-ui-syntax-highlighter';\nimport { mx } from '@dxos/ui-theme';\n\nimport { ProcessTree, ProcessTreeProps } from '#components';\nimport { type ExecutionGraph, buildExecutionGraph } from '#execution-graph';\nimport { getTraceMessagesAtom, useTraceMessages } from '#hooks';\nimport { AssistantCapabilities } from '#types';\n\nexport type TracePanelProps = AppSurface.SpaceArticleProps<Pick<ProcessTreeProps, 'onProcessTerminate'>>;\n\nexport const TracePanel = composable<HTMLDivElement, TracePanelProps>(\n ({ space, attendableId, onProcessTerminate, ...props }, forwardedRef) => {\n const attentionAttrs = useAttentionAttributes(attendableId);\n const { invokePromise } = useOperationInvoker();\n const settings = useAtomCapability(AssistantCapabilities.Settings);\n const tracePanelDebug = settings.tracePanelDebug ?? false;\n\n // `useDeferredValue` batches update bursts, works together with `React.memo`.\n // See the comment in `ProcessTreeContainer` for more details.\n const { branches, commits, spanTree, details } = useDeferredValue(useExecutionGraph(space));\n\n // Debug hatch (dev builds only): expose the raw trace messages (the exact `buildExecutionGraph`\n // input) so a real trace can be captured as a test fixture. While the TracePanel is mounted, run\n // `dxosDumpTrace()` in the console — it copies the serialized `Trace.Message[]` to the clipboard\n // (and logs it). Gated on `import.meta.env.DEV` so it's stripped from production builds.\n const traceMessages = useTraceMessages(space);\n useEffect(() => {\n if (!import.meta.env.DEV) {\n return;\n }\n // Attach a debug hatch to the global object (a genuine global-augmentation boundary).\n const debugGlobal = globalThis as typeof globalThis & { dxosDumpTrace?: () => string };\n debugGlobal.dxosDumpTrace = () => {\n const data = traceMessages.map((message) => ({\n meta: message.meta,\n isEphemeral: message.isEphemeral,\n events: message.events,\n }));\n const json = JSON.stringify(data, null, 2);\n // eslint-disable-next-line no-console\n console.log(json);\n void navigator.clipboard?.writeText(json);\n return `dxosDumpTrace: ${data.length} message(s) copied to clipboard`;\n };\n return () => {\n delete debugGlobal.dxosDumpTrace;\n };\n }, [traceMessages]);\n\n const [selectedCommit, setSelectedCommit] = useState<Commit | undefined>();\n const handleCommitSelect = useCallback(\n (commit: Commit | undefined) => {\n setSelectedCommit(commit);\n if (commit?.link) {\n const echoUri = EID.tryParse(commit.link);\n const spaceId = echoUri ? EID.getSpaceId(echoUri) : undefined;\n const objectId = echoUri ? EID.getEntityId(echoUri) : undefined;\n if (spaceId && objectId) {\n // TODO(dmaretskyi): Navigates, but fails to open.\n void invokePromise(LayoutOperation.Open, {\n subject: [`${spaceId}:${objectId}`],\n });\n }\n }\n },\n [invokePromise, setSelectedCommit],\n );\n\n // Select current branch.\n const [currentBranch, setCurrentBranch] = useState<string | null>(null);\n const handleProcessSelect = useCallback(\n (process: Process.Info) => {\n const branch = branches.find((branch) => branch === process.pid.toString());\n if (branch) {\n setCurrentBranch(branch);\n }\n },\n [branches],\n );\n\n return (\n <div\n {...composableProps(props, {\n ...attentionAttrs,\n classNames: mx(\n 'h-full grid divide-y divide-separator',\n !tracePanelDebug && selectedCommit\n ? 'grid-rows-[minmax(0,160px)_1fr_minmax(0,206px)]'\n : 'grid-rows-[minmax(0,160px)_1fr]',\n ),\n })}\n ref={forwardedRef}\n >\n <ProcessTreeContainer onProcessSelect={handleProcessSelect} onProcessTerminate={onProcessTerminate} />\n\n <ScrollContainer.Root pin>\n <ScrollContainer.Content thin>\n <ScrollContainer.Fade />\n <ScrollContainer.Viewport>\n {tracePanelDebug ? (\n <Syntax.Root data={spanTree}>\n <Syntax.Content>\n <Syntax.Viewport>\n <Syntax.Code className='text-xs' />\n </Syntax.Viewport>\n </Syntax.Content>\n </Syntax.Root>\n ) : (\n <Timeline\n compact\n commits={commits}\n branches={branches}\n currentBranch={currentBranch}\n onSelect={handleCommitSelect}\n />\n )}\n </ScrollContainer.Viewport>\n <ScrollContainer.ScrollDownButton />\n </ScrollContainer.Content>\n </ScrollContainer.Root>\n\n {!tracePanelDebug && selectedCommit && (\n <Syntax.Root data={details[selectedCommit.id] ?? selectedCommit}>\n <Syntax.Content>\n <Syntax.Viewport>\n <Syntax.Code className='text-xs' />\n </Syntax.Viewport>\n </Syntax.Content>\n </Syntax.Root>\n )}\n </div>\n );\n },\n);\n\n// Stable ref.\nconst atomEmpty = Atom.make(() => [] as const);\n\ntype UseExecutionGraphOptions = {\n collapseCompletedSpans?: boolean;\n eventLimit?: number;\n};\n\nconst useExecutionGraph = (\n space: Space,\n { collapseCompletedSpans, eventLimit }: UseExecutionGraphOptions = {},\n): ExecutionGraph => {\n const monitor = useCapability(Capabilities.ProcessMonitor);\n const processesAtom = monitor?.processTreeAtom ?? atomEmpty;\n\n const atom = useMemo(\n () => getExecutionGraph(space, processesAtom, { collapseCompletedSpans, eventLimit }),\n [space, processesAtom, collapseCompletedSpans, eventLimit],\n );\n\n return useAtomValue(atom);\n};\n\nconst getExecutionGraph = (\n space: Space,\n processesAtom: Atom.Atom<readonly Process.Info[]>,\n { collapseCompletedSpans = true, eventLimit = 100 }: UseExecutionGraphOptions = {},\n): Atom.Atom<ExecutionGraph> => {\n const traceMessages = getTraceMessagesAtom(space);\n\n const activeProcesses = pipe(\n processesAtom,\n Atom.debounce(Duration.millis(500)),\n Atom.map((processes) =>\n // `Data.array` does structural comparison on the array elements.\n Data.array(\n processes\n .filter((process) => process.state === Process.State.RUNNING || process.state === Process.State.HYBERNATING)\n .map(Data.struct),\n ),\n ),\n );\n\n return Atom.make((get) =>\n buildExecutionGraph({\n traceMessages: get(traceMessages),\n activeProcesses: get(activeProcesses),\n collapseCompletedSpans,\n eventLimit,\n }),\n );\n};\nTracePanel.displayName = 'TracePanel';\n\n// Isolate `ProcessTree` updates from the rest of the panel.\n// TODO(dmaretskyi): Currently not useful since `useExecutionGraph` also pulls in the updates.\nconst ProcessTreeContainer = ({\n onProcessSelect,\n onProcessTerminate,\n}: Pick<ProcessTreeProps, 'onProcessSelect' | 'onProcessTerminate'>) => {\n const monitor = useCapability(Capabilities.ProcessMonitor);\n const processes = useAtomValue(\n useMemo(() => monitor?.processTreeAtom.pipe(Atom.debounce(Duration.millis(500))) ?? atomEmpty, [monitor]),\n );\n\n // `processes` updates in bursts (about 14 updates per navigation).\n // `useDeferredValue` will debounce update propagation, returning stale value for short periods.\n // NOTE: `ProcessTree` MUST use `React.memo`, otherwise this will not work.\n const processesDeferred = useDeferredValue(processes);\n return (\n <ProcessTree\n processes={processesDeferred}\n depth={3}\n onProcessSelect={onProcessSelect}\n onProcessTerminate={onProcessTerminate}\n />\n );\n};\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,YAAY;AACrB,SAASC,oBAAoB;AAC7B,YAAYC,UAAU;AACtB,YAAYC,cAAc;AAC1B,SAASC,YAAY;AACrB,OAAOC,SAASC,aAAaC,kBAAkBC,WAAWC,SAASC,gBAAgB;AAEnF,SAASC,oBAAoB;AAC7B,SAASC,mBAAmBC,eAAeC,2BAA2B;AACtE,SAASC,uBAAuB;AAEhC,SAASC,eAAe;AACxB,SAASC,WAAW;AAEpB,SAASC,uBAAuB;AAChC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X,eAAAA;IACrBR;IACAC;EACF,CAAA,CAAA;AAEJ;AACA/E,WAAWkG,cAAc;AAIzB,IAAMpC,uBAAuB,CAAC,EAC5BC,iBACA5D,mBAAkB,MAC+C;AACjE,QAAM6E,UAAUjG,cAAcF,aAAaoG,cAAc;AACzD,QAAMQ,YAAYtH,aAChBQ,QAAQ,MAAMqG,SAASG,gBAAgB7G,KAAKJ,KAAKqH,SAAkBC,gBAAO,GAAA,CAAA,CAAA,KAAUZ,WAAW;IAACI;GAAQ,CAAA;AAM1G,QAAMmB,oBAAoB1H,iBAAiBgH,SAAAA;AAC3C,SACE,sBAAA,cAAC9F,aAAAA;IACC8F,WAAWU;IACXC,OAAO;IACPrC;IACA5D;;AAGN;",
|
|
6
|
+
"names": ["Atom", "useAtomValue", "Data", "Duration", "pipe", "React", "useCallback", "useDeferredValue", "useEffect", "useMemo", "useState", "Capabilities", "useAtomCapability", "useCapability", "useOperationInvoker", "LayoutOperation", "Process", "EID", "ScrollContainer", "composable", "composableProps", "useAttentionAttributes", "Timeline", "Syntax", "mx", "ProcessTree", "buildExecutionGraph", "getTraceMessagesAtom", "useTraceMessages", "AssistantCapabilities", "TracePanel", "space", "attendableId", "onProcessTerminate", "props", "forwardedRef", "attentionAttrs", "invokePromise", "settings", "Settings", "tracePanelDebug", "branches", "commits", "spanTree", "details", "useExecutionGraph", "traceMessages", "env", "DEV", "debugGlobal", "globalThis", "dxosDumpTrace", "data", "map", "message", "meta", "isEphemeral", "events", "json", "JSON", "stringify", "console", "log", "navigator", "clipboard", "writeText", "length", "selectedCommit", "setSelectedCommit", "handleCommitSelect", "commit", "link", "echoUri", "tryParse", "spaceId", "getSpaceId", "undefined", "objectId", "getEntityId", "Open", "subject", "currentBranch", "setCurrentBranch", "handleProcessSelect", "process", "branch", "find", "pid", "toString", "div", "classNames", "ref", "ProcessTreeContainer", "onProcessSelect", "Root", "pin", "Content", "thin", "Fade", "Viewport", "Code", "className", "compact", "onSelect", "ScrollDownButton", "id", "atomEmpty", "make", "collapseCompletedSpans", "eventLimit", "monitor", "ProcessMonitor", "processesAtom", "processTreeAtom", "atom", "getExecutionGraph", "activeProcesses", "debounce", "millis", "processes", "array", "filter", "state", "State", "RUNNING", "HYBERNATING", "struct", "get", "displayName", "processesDeferred", "depth"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
operation_handler_default
|
|
3
|
+
} from "./chunk-V2Y4XE3O.mjs";
|
|
4
|
+
import {
|
|
5
|
+
skill_definition_default
|
|
6
|
+
} from "./chunk-LS72HWMM.mjs";
|
|
7
|
+
import {
|
|
8
|
+
toolkit_default
|
|
9
|
+
} from "./chunk-QOKLFHUS.mjs";
|
|
10
|
+
|
|
11
|
+
// src/AssistantPlugin.workerd.ts
|
|
12
|
+
import { ActivationEvents, Plugin } from "@dxos/app-framework";
|
|
13
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
14
|
+
import { AiContext } from "@dxos/assistant";
|
|
15
|
+
import { Agent, Chat, McpServer, Memory, Plan } from "@dxos/assistant-toolkit";
|
|
16
|
+
import { Instructions, Skill } from "@dxos/compute";
|
|
17
|
+
import { Sequence } from "@dxos/conductor";
|
|
18
|
+
import { Feed } from "@dxos/echo";
|
|
19
|
+
import { Text } from "@dxos/schema";
|
|
20
|
+
import { HasSubject, Message } from "@dxos/types";
|
|
21
|
+
import { meta } from "#meta";
|
|
22
|
+
var AssistantPlugin = Plugin.define(meta).pipe(AppPlugin.addSkillDefinitionModule({
|
|
23
|
+
id: "skill-definition",
|
|
24
|
+
activate: skill_definition_default
|
|
25
|
+
}), AppPlugin.addOperationHandlerModule({
|
|
26
|
+
id: "operation-handler",
|
|
27
|
+
activate: operation_handler_default
|
|
28
|
+
}), Plugin.addModule({
|
|
29
|
+
id: "toolkit",
|
|
30
|
+
activatesOn: ActivationEvents.Startup,
|
|
31
|
+
activate: toolkit_default
|
|
32
|
+
}), AppPlugin.addSchemaModule({
|
|
33
|
+
schema: [
|
|
34
|
+
Chat.Chat,
|
|
35
|
+
Chat.CompanionTo,
|
|
36
|
+
Skill.Skill,
|
|
37
|
+
AiContext.Binding,
|
|
38
|
+
Feed.Feed,
|
|
39
|
+
HasSubject.HasSubject,
|
|
40
|
+
Message.Message,
|
|
41
|
+
Instructions.Instructions,
|
|
42
|
+
Agent.Agent,
|
|
43
|
+
McpServer.McpServer,
|
|
44
|
+
Plan.Plan,
|
|
45
|
+
Sequence.Sequence,
|
|
46
|
+
Memory.Memory,
|
|
47
|
+
Text.Text
|
|
48
|
+
]
|
|
49
|
+
}), Plugin.make);
|
|
50
|
+
var AssistantPlugin_workerd_default = AssistantPlugin;
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
AssistantPlugin,
|
|
54
|
+
AssistantPlugin_workerd_default
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=chunk-U4LTLBAX.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/AssistantPlugin.workerd.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { ActivationEvents, Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { AiContext } from '@dxos/assistant';\nimport { Agent, Chat, McpServer, Memory, Plan } from '@dxos/assistant-toolkit';\nimport { Instructions, Skill } from '@dxos/compute';\nimport { Sequence } from '@dxos/conductor';\nimport { Feed } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\nimport { HasSubject, Message } from '@dxos/types';\n\nimport { meta } from '#meta';\n\nimport OperationHandler from './capabilities/operation-handler';\nimport SkillDefinition from './capabilities/skill-definition';\nimport Toolkit from './capabilities/toolkit';\n\nexport const AssistantPlugin = Plugin.define(meta).pipe(\n AppPlugin.addSkillDefinitionModule({ id: 'skill-definition', activate: SkillDefinition }),\n AppPlugin.addOperationHandlerModule({ id: 'operation-handler', activate: OperationHandler }),\n Plugin.addModule({\n id: 'toolkit',\n activatesOn: ActivationEvents.Startup,\n activate: Toolkit,\n }),\n AppPlugin.addSchemaModule({\n schema: [\n Chat.Chat,\n Chat.CompanionTo,\n Skill.Skill,\n AiContext.Binding,\n Feed.Feed,\n HasSubject.HasSubject,\n Message.Message,\n Instructions.Instructions,\n Agent.Agent,\n McpServer.McpServer,\n Plan.Plan,\n Sequence.Sequence,\n Memory.Memory,\n Text.Text,\n ],\n }),\n Plugin.make,\n);\n\nexport default AssistantPlugin;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAIA,SAASA,kBAAkBC,cAAc;AACzC,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,OAAOC,MAAMC,WAAWC,QAAQC,YAAY;AACrD,SAASC,cAAcC,aAAa;AACpC,SAASC,gBAAgB;AACzB,SAASC,YAAY;AACrB,SAASC,YAAY;AACrB,SAASC,YAAYC,eAAe;AAEpC,SAASC,YAAY;AAMd,IAAMC,kBAAkBC,OAAOC,OAAOC,IAAAA,EAAMC,KACjDC,UAAUC,yBAAyB;EAAEC,IAAI;EAAoBC,UAAUC;AAAgB,CAAA,GACvFJ,UAAUK,0BAA0B;EAAEH,IAAI;EAAqBC,UAAUG;AAAiB,CAAA,GAC1FV,OAAOW,UAAU;EACfL,IAAI;EACJM,aAAaC,iBAAiBC;EAC9BP,UAAUQ;AACZ,CAAA,GACAX,UAAUY,gBAAgB;EACxBC,QAAQ;IACNC,KAAKA;IACLA,KAAKC;IACLC,MAAMA;IACNC,UAAUC;IACVC,KAAKA;IACLC,WAAWA;IACXC,QAAQA;IACRC,aAAaA;IACbC,MAAMA;IACNC,UAAUA;IACVC,KAAKA;IACLC,SAASA;IACTC,OAAOA;IACPC,KAAKA;;AAET,CAAA,GACAhC,OAAOiC,IAAI;AAGb,IAAA,kCAAelC;",
|
|
6
|
+
"names": ["ActivationEvents", "Plugin", "AppPlugin", "AiContext", "Agent", "Chat", "McpServer", "Memory", "Plan", "Instructions", "Skill", "Sequence", "Feed", "Text", "HasSubject", "Message", "meta", "AssistantPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addSkillDefinitionModule", "id", "activate", "SkillDefinition", "addOperationHandlerModule", "OperationHandler", "addModule", "activatesOn", "ActivationEvents", "Startup", "Toolkit", "addSchemaModule", "schema", "Chat", "CompanionTo", "Skill", "AiContext", "Binding", "Feed", "HasSubject", "Message", "Instructions", "Agent", "McpServer", "Plan", "Sequence", "Memory", "Text", "make"]
|
|
7
|
+
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
// src/containers/ChatArticle/ChatArticle.tsx
|
|
2
|
-
import React, { forwardRef, useEffect, useRef } from "react";
|
|
2
|
+
import React, { forwardRef, useCallback, useEffect, useRef } from "react";
|
|
3
|
+
import { Provider } from "@dxos/ai";
|
|
3
4
|
import { Capabilities } from "@dxos/app-framework";
|
|
4
|
-
import { useAtomCapability, useCapability } from "@dxos/app-framework/ui";
|
|
5
|
+
import { useAtomCapability, useCapability, useOperationInvoker } from "@dxos/app-framework/ui";
|
|
5
6
|
import { getSpace } from "@dxos/client/echo";
|
|
6
|
-
import {
|
|
7
|
+
import { ClientOperation } from "@dxos/plugin-client";
|
|
8
|
+
import { useObject, useRegistry } from "@dxos/react-client/echo";
|
|
7
9
|
import { Panel } from "@dxos/react-ui";
|
|
8
10
|
import { Chat as ChatComponent } from "#components";
|
|
9
|
-
import { useChatProcessor, useChatServices,
|
|
11
|
+
import { useChatProcessor, useChatServices, usePresets } from "#hooks";
|
|
10
12
|
import { AssistantCapabilities } from "#types";
|
|
11
13
|
var ChatArticle = /* @__PURE__ */ forwardRef(({ role, attendableId, subject: chat, companionTo, onEvent, onSubmit }, forwardedRef) => {
|
|
12
14
|
const registry = useRegistry();
|
|
@@ -17,8 +19,8 @@ var ChatArticle = /* @__PURE__ */ forwardRef(({ role, attendableId, subject: cha
|
|
|
17
19
|
const runtime = useChatServices({
|
|
18
20
|
id: space?.id
|
|
19
21
|
});
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
+
const { preset, ...chatProps } = usePresets(settings);
|
|
23
|
+
const online = preset?.provider === Provider.edge.id;
|
|
22
24
|
const processor = useChatProcessor({
|
|
23
25
|
space,
|
|
24
26
|
chat,
|
|
@@ -27,6 +29,14 @@ var ChatArticle = /* @__PURE__ */ forwardRef(({ role, attendableId, subject: cha
|
|
|
27
29
|
registry,
|
|
28
30
|
settings
|
|
29
31
|
});
|
|
32
|
+
const [chatViewType] = useObject(chat, "viewType");
|
|
33
|
+
const viewType = chatViewType ?? settings.chatView;
|
|
34
|
+
const { invokePromise } = useOperationInvoker();
|
|
35
|
+
const handleViewUsage = useCallback(() => {
|
|
36
|
+
void invokePromise(ClientOperation.OpenUsage, void 0);
|
|
37
|
+
}, [
|
|
38
|
+
invokePromise
|
|
39
|
+
]);
|
|
30
40
|
const pendingSubmitted = useRef(false);
|
|
31
41
|
useEffect(() => {
|
|
32
42
|
pendingSubmitted.current = false;
|
|
@@ -58,14 +68,11 @@ var ChatArticle = /* @__PURE__ */ forwardRef(({ role, attendableId, subject: cha
|
|
|
58
68
|
atomRegistry,
|
|
59
69
|
stateAtom
|
|
60
70
|
]);
|
|
61
|
-
const feedTarget = chat?.feed.target;
|
|
62
|
-
const view = chat?.view ?? settings.chatView;
|
|
63
71
|
if (!processor) {
|
|
64
72
|
return null;
|
|
65
73
|
}
|
|
66
74
|
return /* @__PURE__ */ React.createElement(ChatComponent.Root, {
|
|
67
75
|
chat,
|
|
68
|
-
feed: feedTarget,
|
|
69
76
|
db: space?.db,
|
|
70
77
|
processor,
|
|
71
78
|
onEvent,
|
|
@@ -73,17 +80,16 @@ var ChatArticle = /* @__PURE__ */ forwardRef(({ role, attendableId, subject: cha
|
|
|
73
80
|
}, /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
74
81
|
role,
|
|
75
82
|
ref: forwardedRef
|
|
76
|
-
}, /* @__PURE__ */ React.createElement(Panel.Toolbar, {
|
|
77
|
-
className: "bg-toolbar-surface"
|
|
78
|
-
}, /* @__PURE__ */ React.createElement(ChatComponent.Toolbar, {
|
|
83
|
+
}, /* @__PURE__ */ React.createElement(Panel.Toolbar, null, /* @__PURE__ */ React.createElement(ChatComponent.Toolbar, {
|
|
79
84
|
classNames: "dx-document",
|
|
80
85
|
attendableId,
|
|
81
86
|
companionTo
|
|
82
87
|
})), /* @__PURE__ */ React.createElement(Panel.Content, null, /* @__PURE__ */ React.createElement(ChatComponent.Content, null, /* @__PURE__ */ React.createElement("div", {
|
|
83
88
|
className: "dx-container relative"
|
|
84
89
|
}, /* @__PURE__ */ React.createElement(ChatComponent.Thread, {
|
|
85
|
-
viewType
|
|
86
|
-
|
|
90
|
+
viewType,
|
|
91
|
+
onViewUsage: handleViewUsage
|
|
92
|
+
}), viewType !== "summary" && /* @__PURE__ */ React.createElement("div", {
|
|
87
93
|
className: "absolute bottom-2 left-0 right-0"
|
|
88
94
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
89
95
|
className: "dx-document px-4"
|
|
@@ -99,12 +105,11 @@ var ChatArticle = /* @__PURE__ */ forwardRef(({ role, attendableId, subject: cha
|
|
|
99
105
|
...chatProps,
|
|
100
106
|
outline: true,
|
|
101
107
|
preset: preset?.id,
|
|
102
|
-
online
|
|
103
|
-
onOnlineChange: setOnline
|
|
108
|
+
online
|
|
104
109
|
}))))));
|
|
105
110
|
});
|
|
106
111
|
|
|
107
112
|
export {
|
|
108
113
|
ChatArticle
|
|
109
114
|
};
|
|
110
|
-
//# sourceMappingURL=chunk-
|
|
115
|
+
//# sourceMappingURL=chunk-UPKFUZ6V.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/containers/ChatArticle/ChatArticle.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { forwardRef, useCallback, useEffect, useRef } from 'react';\n\nimport { Provider } from '@dxos/ai';\nimport { Capabilities } from '@dxos/app-framework';\nimport { useAtomCapability, useCapability, useOperationInvoker } from '@dxos/app-framework/ui';\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { getSpace } from '@dxos/client/echo';\nimport { type Obj } from '@dxos/echo';\nimport { ClientOperation } from '@dxos/plugin-client';\nimport { useObject, useRegistry } from '@dxos/react-client/echo';\nimport { Panel } from '@dxos/react-ui';\n\nimport { Chat as ChatComponent, type ChatRootProps } from '#components';\nimport { useChatProcessor, useChatServices, usePresets } from '#hooks';\nimport { type Assistant, AssistantCapabilities, type ChatType } from '#types';\n\nexport type ChatArticleProps = AppSurface.ObjectSectionProps<ChatType.Chat> & {\n companionTo?: Obj.Unknown;\n} & Pick<ChatRootProps, 'onEvent' | 'onSubmit'>;\n\nexport const ChatArticle = forwardRef<HTMLDivElement, ChatArticleProps>(\n ({ role, attendableId, subject: chat, companionTo, onEvent, onSubmit }, forwardedRef) => {\n const registry = useRegistry();\n const settings = useAtomCapability(AssistantCapabilities.Settings);\n const atomRegistry = useCapability(Capabilities.AtomRegistry);\n const stateAtom = useCapability(AssistantCapabilities.State);\n // Transient (pre-submit) chats have no database; fall back to the companion's space.\n const space = getSpace(chat) ?? getSpace(companionTo);\n const runtime = useChatServices({ id: space?.id });\n\n const { preset, ...chatProps } = usePresets(settings);\n // The provider is configured in settings; the chat surfaces it as a read-only online indicator.\n const online = preset?.provider === Provider.edge.id;\n const processor = useChatProcessor({ space, chat, preset, runtime, registry, settings });\n\n // Subscribe to the view type via `useObject` so the thread re-renders when ChatOptions changes it;\n // a direct `chat.viewType` read in render does not establish a reactive dependency.\n const [chatViewType] = useObject(chat, 'viewType');\n const viewType = (chatViewType as Assistant.ChatView | undefined) ?? settings.chatView;\n\n const { invokePromise } = useOperationInvoker();\n const handleViewUsage = useCallback(() => {\n void invokePromise(ClientOperation.OpenUsage, undefined);\n }, [invokePromise]);\n\n // Reset the one-shot guard when the target conversation changes, so a pending prompt for a new\n // `attendableId` is still auto-submitted within the same mount.\n const pendingSubmitted = useRef(false);\n useEffect(() => {\n pendingSubmitted.current = false;\n }, [attendableId]);\n\n useEffect(() => {\n if (!processor || !attendableId || pendingSubmitted.current) {\n return;\n }\n\n const state = atomRegistry.get(stateAtom);\n const pendingPrompt = state.pendingPrompts[attendableId];\n if (pendingPrompt) {\n pendingSubmitted.current = true;\n atomRegistry.update(stateAtom, (current) => {\n const { [attendableId]: _, ...rest } = current.pendingPrompts;\n return { ...current, pendingPrompts: rest };\n });\n\n void processor.request({ message: pendingPrompt });\n }\n }, [processor, attendableId, atomRegistry, stateAtom]);\n\n if (!processor) {\n return null;\n }\n\n return (\n <ChatComponent.Root chat={chat} db={space?.db} processor={processor} onEvent={onEvent} onSubmit={onSubmit}>\n <Panel.Root role={role} ref={forwardedRef}>\n <Panel.Toolbar>\n <ChatComponent.Toolbar classNames='dx-document' attendableId={attendableId} companionTo={companionTo} />\n </Panel.Toolbar>\n <Panel.Content>\n <ChatComponent.Content>\n <div className='dx-container relative'>\n <ChatComponent.Thread viewType={viewType} onViewUsage={handleViewUsage} />\n {viewType !== 'summary' && (\n <div className='absolute bottom-2 left-0 right-0'>\n <div className='dx-document px-4'>\n <ChatComponent.Status classNames='px-3 rounded-sm bg-group-surface' />\n </div>\n </div>\n )}\n </div>\n <div className='dx-document px-4 pb-4'>\n <div className='flex flex-col items-center py-2 overflow-hidden'>\n <ChatComponent.TaskList classNames='max-h-[120px] border border-separator rounded-sm text-description' />\n </div>\n <ChatComponent.Prompt {...chatProps} outline preset={preset?.id} online={online} />\n </div>\n </ChatComponent.Content>\n </Panel.Content>\n </Panel.Root>\n </ChatComponent.Root>\n );\n },\n);\n"],
|
|
5
|
+
"mappings": ";AAIA,OAAOA,SAASC,YAAYC,aAAaC,WAAWC,cAAc;AAElE,SAASC,gBAAgB;AACzB,SAASC,oBAAoB;AAC7B,SAASC,mBAAmBC,eAAeC,2BAA2B;AAEtE,SAASC,gBAAgB;AAEzB,SAASC,uBAAuB;AAChC,S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["React", "forwardRef", "useCallback", "useEffect", "useRef", "Provider", "Capabilities", "useAtomCapability", "useCapability", "useOperationInvoker", "getSpace", "ClientOperation", "useObject", "useRegistry", "Panel", "Chat", "ChatComponent", "useChatProcessor", "useChatServices", "usePresets", "AssistantCapabilities", "ChatArticle", "role", "attendableId", "subject", "chat", "companionTo", "onEvent", "onSubmit", "forwardedRef", "registry", "settings", "Settings", "atomRegistry", "AtomRegistry", "stateAtom", "State", "space", "runtime", "id", "preset", "chatProps", "online", "provider", "edge", "processor", "chatViewType", "viewType", "chatView", "invokePromise", "handleViewUsage", "OpenUsage", "undefined", "pendingSubmitted", "current", "state", "get", "pendingPrompt", "pendingPrompts", "update", "_", "rest", "request", "message", "Root", "db", "ref", "Toolbar", "classNames", "Content", "div", "className", "Thread", "onViewUsage", "Status", "TaskList", "Prompt", "outline"]
|
|
7
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
-
|
|
3
1
|
// src/capabilities/operation-handler.ts
|
|
4
2
|
import * as Effect from "effect/Effect";
|
|
5
3
|
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
@@ -7,7 +5,8 @@ import { AssistantOperationHandlerSet } from "#operations";
|
|
|
7
5
|
var operation_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
8
6
|
return Capability.contributes(Capabilities.OperationHandler, AssistantOperationHandlerSet);
|
|
9
7
|
}));
|
|
8
|
+
|
|
10
9
|
export {
|
|
11
|
-
operation_handler_default
|
|
10
|
+
operation_handler_default
|
|
12
11
|
};
|
|
13
|
-
//# sourceMappingURL=
|
|
12
|
+
//# sourceMappingURL=chunk-V2Y4XE3O.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/operation-handler.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport type { OperationHandlerSet } from '@dxos/compute';\n\nimport { AssistantOperationHandlerSet } from '#operations';\n\nexport default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(\n Effect.fnUntraced(function* () {\n return Capability.contributes(Capabilities.OperationHandler, AssistantOperationHandlerSet);\n }),\n);\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AAGzC,SAASC,oCAAoC;AAE7C,IAAA,4BAAeD,WAAWE,WACjBC,kBAAW,aAAA;AAChB,SAAOH,WAAWI,YAAYL,aAAaM,kBAAkBJ,4BAAAA;AAC/D,CAAA,CAAA;",
|
|
6
6
|
"names": ["Effect", "Capabilities", "Capability", "AssistantOperationHandlerSet", "makeModule", "fnUntraced", "contributes", "OperationHandler"]
|
|
7
7
|
}
|