@dxos/plugin-assistant 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (611) hide show
  1. package/PLUGIN.mdl +3 -28
  2. package/dist/lib/AssistantPlugin.mjs +2 -0
  3. package/dist/lib/AssistantPlugin.node.mjs +55 -0
  4. package/dist/lib/AssistantPlugin.node.mjs.map +1 -0
  5. package/dist/lib/AssistantPlugin.workerd.mjs +43 -0
  6. package/dist/lib/AssistantPlugin.workerd.mjs.map +1 -0
  7. package/dist/lib/capabilities.mjs +24 -0
  8. package/dist/lib/capabilities.mjs.map +1 -0
  9. package/dist/lib/chunk-AgentArticle.mjs +52 -0
  10. package/dist/lib/chunk-AgentArticle.mjs.map +1 -0
  11. package/dist/lib/chunk-AgentProperties.mjs +35 -0
  12. package/dist/lib/chunk-AgentProperties.mjs.map +1 -0
  13. package/dist/lib/chunk-AssistantPlugin.mjs +88 -0
  14. package/dist/lib/chunk-AssistantPlugin.mjs.map +1 -0
  15. package/dist/lib/chunk-AssistantSettings.mjs +285 -0
  16. package/dist/lib/chunk-AssistantSettings.mjs.map +1 -0
  17. package/dist/lib/chunk-ChatArticle.mjs +121 -0
  18. package/dist/lib/chunk-ChatArticle.mjs.map +1 -0
  19. package/dist/lib/chunk-ChatCompanion.mjs +116 -0
  20. package/dist/lib/chunk-ChatCompanion.mjs.map +1 -0
  21. package/dist/lib/chunk-ChatDialog.mjs +73 -0
  22. package/dist/lib/chunk-ChatDialog.mjs.map +1 -0
  23. package/dist/lib/chunk-IntegrationPrompt.mjs +73 -0
  24. package/dist/lib/chunk-IntegrationPrompt.mjs.map +1 -0
  25. package/dist/lib/chunk-SpaceHomePrompt.mjs +104 -0
  26. package/dist/lib/chunk-SpaceHomePrompt.mjs.map +1 -0
  27. package/dist/lib/chunk-SpaceHomeSuggestions.mjs +60 -0
  28. package/dist/lib/chunk-SpaceHomeSuggestions.mjs.map +1 -0
  29. package/dist/lib/chunk-TracePanel.mjs +127 -0
  30. package/dist/lib/chunk-TracePanel.mjs.map +1 -0
  31. package/dist/lib/chunk-TracePanel2.mjs +7 -0
  32. package/dist/lib/chunk-TracePanel2.mjs.map +1 -0
  33. package/dist/lib/chunk-TriggerStatus.mjs +72 -0
  34. package/dist/lib/chunk-TriggerStatus.mjs.map +1 -0
  35. package/dist/lib/chunk-agent-hydrator.mjs +22 -0
  36. package/dist/lib/chunk-agent-hydrator.mjs.map +1 -0
  37. package/dist/lib/chunk-agent-service.mjs +21 -0
  38. package/dist/lib/chunk-agent-service.mjs.map +1 -0
  39. package/dist/lib/{neutral/ai-context-LIKJYMIN.mjs → chunk-ai-context.mjs} +8 -12
  40. package/dist/lib/chunk-ai-context.mjs.map +1 -0
  41. package/dist/lib/chunk-ai-service.mjs +27 -0
  42. package/dist/lib/chunk-ai-service.mjs.map +1 -0
  43. package/dist/lib/chunk-app-graph-builder.mjs +179 -0
  44. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
  45. package/dist/lib/chunk-automation-templates.mjs +99 -0
  46. package/dist/lib/chunk-automation-templates.mjs.map +1 -0
  47. package/dist/lib/chunk-companion-chat-provisioner.mjs +123 -0
  48. package/dist/lib/chunk-companion-chat-provisioner.mjs.map +1 -0
  49. package/dist/lib/chunk-connector.mjs +60 -0
  50. package/dist/lib/chunk-connector.mjs.map +1 -0
  51. package/dist/lib/chunk-constants.mjs +9 -0
  52. package/dist/lib/chunk-constants.mjs.map +1 -0
  53. package/dist/lib/chunk-context.mjs +7 -0
  54. package/dist/lib/chunk-context.mjs.map +1 -0
  55. package/dist/lib/chunk-create-chat.mjs +53 -0
  56. package/dist/lib/chunk-create-chat.mjs.map +1 -0
  57. package/dist/lib/chunk-create-object.mjs +70 -0
  58. package/dist/lib/chunk-create-object.mjs.map +1 -0
  59. package/dist/lib/chunk-edge-model-resolver.mjs +64 -0
  60. package/dist/lib/chunk-edge-model-resolver.mjs.map +1 -0
  61. package/dist/lib/chunk-ensure-companion-chat.mjs +49 -0
  62. package/dist/lib/chunk-ensure-companion-chat.mjs.map +1 -0
  63. package/dist/lib/chunk-extensions.mjs +78 -0
  64. package/dist/lib/chunk-extensions.mjs.map +1 -0
  65. package/dist/lib/chunk-fork-chat.mjs +83 -0
  66. package/dist/lib/chunk-fork-chat.mjs.map +1 -0
  67. package/dist/lib/chunk-generate-home-suggestions.mjs +71 -0
  68. package/dist/lib/chunk-generate-home-suggestions.mjs.map +1 -0
  69. package/dist/lib/chunk-local-model-resolver.mjs +25 -0
  70. package/dist/lib/chunk-local-model-resolver.mjs.map +1 -0
  71. package/dist/lib/chunk-markdown-extension.mjs +27 -0
  72. package/dist/lib/chunk-markdown-extension.mjs.map +1 -0
  73. package/dist/lib/{neutral/chunk-L7AR4VTA.mjs → chunk-meta.mjs} +20 -25
  74. package/dist/lib/chunk-meta.mjs.map +1 -0
  75. package/dist/lib/chunk-operation-handler.mjs +13 -0
  76. package/dist/lib/chunk-operation-handler.mjs.map +1 -0
  77. package/dist/lib/chunk-paths.mjs +8 -0
  78. package/dist/lib/chunk-paths.mjs.map +1 -0
  79. package/dist/lib/chunk-processor.mjs +432 -0
  80. package/dist/lib/chunk-processor.mjs.map +1 -0
  81. package/dist/lib/chunk-react-surface.mjs +177 -0
  82. package/dist/lib/chunk-react-surface.mjs.map +1 -0
  83. package/dist/lib/chunk-run-prompt-in-new-chat.mjs +96 -0
  84. package/dist/lib/chunk-run-prompt-in-new-chat.mjs.map +1 -0
  85. package/dist/lib/chunk-set-current-chat.mjs +43 -0
  86. package/dist/lib/chunk-set-current-chat.mjs.map +1 -0
  87. package/dist/lib/chunk-settings.mjs +23 -0
  88. package/dist/lib/chunk-settings.mjs.map +1 -0
  89. package/dist/lib/chunk-skill-definition.mjs +42 -0
  90. package/dist/lib/chunk-skill-definition.mjs.map +1 -0
  91. package/dist/lib/chunk-skills.mjs +19 -0
  92. package/dist/lib/chunk-skills.mjs.map +1 -0
  93. package/dist/lib/chunk-state.mjs +32 -0
  94. package/dist/lib/chunk-state.mjs.map +1 -0
  95. package/dist/lib/chunk-toggle-trace-panel-debug.mjs +18 -0
  96. package/dist/lib/chunk-toggle-trace-panel-debug.mjs.map +1 -0
  97. package/dist/lib/chunk-toolkit.mjs +12 -0
  98. package/dist/lib/chunk-toolkit.mjs.map +1 -0
  99. package/dist/lib/chunk-types.mjs +332 -0
  100. package/dist/lib/chunk-types.mjs.map +1 -0
  101. package/dist/lib/chunk-update-chat-name.mjs +63 -0
  102. package/dist/lib/chunk-update-chat-name.mjs.map +1 -0
  103. package/dist/lib/components.mjs +2616 -0
  104. package/dist/lib/components.mjs.map +1 -0
  105. package/dist/lib/containers.mjs +17 -0
  106. package/dist/lib/containers.mjs.map +1 -0
  107. package/dist/lib/execution-graph.mjs +961 -0
  108. package/dist/lib/execution-graph.mjs.map +1 -0
  109. package/dist/lib/extensions.mjs +2 -0
  110. package/dist/lib/hooks.mjs +674 -0
  111. package/dist/lib/hooks.mjs.map +1 -0
  112. package/dist/lib/index.mjs +5 -0
  113. package/dist/lib/meta.mjs +2 -0
  114. package/dist/lib/operations.mjs +7 -0
  115. package/dist/lib/operations.mjs.map +1 -0
  116. package/dist/lib/plugin.mjs +9 -0
  117. package/dist/lib/plugin.mjs.map +1 -0
  118. package/dist/lib/plugin.workerd.mjs +2 -0
  119. package/dist/lib/skills.mjs +2 -0
  120. package/dist/lib/testing.mjs +2 -0
  121. package/dist/lib/translations.mjs +207 -0
  122. package/dist/lib/translations.mjs.map +1 -0
  123. package/dist/lib/types.mjs +2 -0
  124. package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
  125. package/dist/types/src/AssistantPlugin.node.d.ts.map +1 -1
  126. package/dist/types/src/AssistantPlugin.workerd.d.ts.map +1 -1
  127. package/dist/types/src/capabilities/AssistantSurfaces.d.ts +22 -0
  128. package/dist/types/src/capabilities/AssistantSurfaces.d.ts.map +1 -0
  129. package/dist/types/src/capabilities/agent-hydrator.d.ts +1 -1
  130. package/dist/types/src/capabilities/agent-service.d.ts +1 -1
  131. package/dist/types/src/capabilities/agent-service.d.ts.map +1 -1
  132. package/dist/types/src/capabilities/ai-context.d.ts +1 -1
  133. package/dist/types/src/capabilities/ai-service.d.ts +1 -1
  134. package/dist/types/src/capabilities/app-graph-builder.d.ts +12 -1
  135. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  136. package/dist/types/src/capabilities/automation-templates.d.ts +1 -1
  137. package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +1 -1
  138. package/dist/types/src/capabilities/connector.d.ts +1 -1
  139. package/dist/types/src/capabilities/create-object.d.ts +1 -1
  140. package/dist/types/src/capabilities/edge-model-resolver.d.ts +1 -1
  141. package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
  142. package/dist/types/src/capabilities/index.d.ts +0 -2
  143. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  144. package/dist/types/src/capabilities/local-model-resolver.d.ts +1 -1
  145. package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
  146. package/dist/types/src/capabilities/markdown-extension.d.ts +1 -1
  147. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  148. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  149. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  150. package/dist/types/src/capabilities/settings.d.ts +1 -1
  151. package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -1
  152. package/dist/types/src/capabilities/standalone-chats-query.test.d.ts +2 -0
  153. package/dist/types/src/capabilities/standalone-chats-query.test.d.ts.map +1 -0
  154. package/dist/types/src/capabilities/state.d.ts +1 -1
  155. package/dist/types/src/capabilities/toolkit.d.ts +1 -1
  156. package/dist/types/src/components/AgentProperties/AgentProperties.d.ts +4 -1
  157. package/dist/types/src/components/AgentProperties/AgentProperties.d.ts.map +1 -1
  158. package/dist/types/src/components/AgentProperties/AgentProperties.stories.d.ts.map +1 -1
  159. package/dist/types/src/components/Chat/Chat.d.ts +21 -8
  160. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
  161. package/dist/types/src/components/Chat/{Chat.stories.d.ts → Error.stories.d.ts} +1 -1
  162. package/dist/types/src/components/Chat/Error.stories.d.ts.map +1 -0
  163. package/dist/types/src/components/Chat/context.d.ts +8 -0
  164. package/dist/types/src/components/Chat/context.d.ts.map +1 -1
  165. package/dist/types/src/components/Chat/events.d.ts +5 -0
  166. package/dist/types/src/components/Chat/events.d.ts.map +1 -1
  167. package/dist/types/src/components/Chat/thread.d.ts +42 -0
  168. package/dist/types/src/components/Chat/thread.d.ts.map +1 -0
  169. package/dist/types/src/components/Chat/thread.test.d.ts +2 -0
  170. package/dist/types/src/components/Chat/thread.test.d.ts.map +1 -0
  171. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
  172. package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -1
  173. package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +5 -3
  174. package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -1
  175. package/dist/types/src/components/ChatPrompt/index.d.ts +0 -1
  176. package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
  177. package/dist/types/src/components/ChatThread/Anchor.stories.d.ts.map +1 -1
  178. package/dist/types/src/components/ChatThread/ChatThread.d.ts +8 -3
  179. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
  180. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +30 -2
  181. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
  182. package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -1
  183. package/dist/types/src/components/ChatThread/index.d.ts +1 -0
  184. package/dist/types/src/components/ChatThread/index.d.ts.map +1 -1
  185. package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
  186. package/dist/types/src/components/ChatThread/sync/index.d.ts +3 -0
  187. package/dist/types/src/components/ChatThread/sync/index.d.ts.map +1 -0
  188. package/dist/types/src/components/ChatThread/{sync.d.ts → sync/sync.d.ts} +46 -2
  189. package/dist/types/src/components/ChatThread/sync/sync.d.ts.map +1 -0
  190. package/dist/types/src/components/ChatThread/sync/sync.test.d.ts.map +1 -0
  191. package/dist/types/src/components/ChatThread/sync/tool-widget-state.d.ts.map +1 -0
  192. package/dist/types/src/components/ChatThread/sync/tool-widget-state.test.d.ts.map +1 -0
  193. package/dist/types/src/components/ChatThread/widgets/BranchWidget.d.ts +15 -0
  194. package/dist/types/src/components/ChatThread/widgets/BranchWidget.d.ts.map +1 -0
  195. package/dist/types/src/components/ChatThread/widgets/BranchWidget.stories.d.ts +21 -0
  196. package/dist/types/src/components/ChatThread/widgets/BranchWidget.stories.d.ts.map +1 -0
  197. package/dist/types/src/components/ChatThread/widgets/BranchWidget.test.d.ts +2 -0
  198. package/dist/types/src/components/ChatThread/widgets/BranchWidget.test.d.ts.map +1 -0
  199. package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -1
  200. package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -1
  201. package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts +1 -2
  202. package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -1
  203. package/dist/types/src/components/ChatThread/widgets/defaults.d.ts +6 -0
  204. package/dist/types/src/components/ChatThread/widgets/defaults.d.ts.map +1 -1
  205. package/dist/types/src/components/ChatThread/widgets/format-time.d.ts +2 -0
  206. package/dist/types/src/components/ChatThread/widgets/format-time.d.ts.map +1 -0
  207. package/dist/types/src/components/ChatThread/widgets/index.d.ts +4 -1
  208. package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -1
  209. package/dist/types/src/components/ChatThread/widgets/is-tool-message.d.ts +3 -0
  210. package/dist/types/src/components/ChatThread/widgets/is-tool-message.d.ts.map +1 -0
  211. package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.d.ts +16 -0
  212. package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.d.ts.map +1 -0
  213. package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.stories.d.ts +210 -0
  214. package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.stories.d.ts.map +1 -0
  215. package/dist/types/src/components/ConnectorAuthMenu/index.d.ts +2 -0
  216. package/dist/types/src/components/ConnectorAuthMenu/index.d.ts.map +1 -0
  217. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +1 -1
  218. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -1
  219. package/dist/types/src/components/TaskList/TaskList.d.ts +9 -11
  220. package/dist/types/src/components/TaskList/TaskList.d.ts.map +1 -1
  221. package/dist/types/src/components/TaskList/TaskList.stories.d.ts +3 -4
  222. package/dist/types/src/components/TaskList/TaskList.stories.d.ts.map +1 -1
  223. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +1 -2
  224. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
  225. package/dist/types/src/components/ToolBlock/index.d.ts +1 -0
  226. package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -1
  227. package/dist/types/src/components/ToolBlock/is-tool-message.d.ts +3 -0
  228. package/dist/types/src/components/ToolBlock/is-tool-message.d.ts.map +1 -0
  229. package/dist/types/src/components/Toolbox/Toolbox.d.ts +1 -1
  230. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  231. package/dist/types/src/components/index.d.ts +1 -0
  232. package/dist/types/src/components/index.d.ts.map +1 -1
  233. package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts +5 -2
  234. package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -1
  235. package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -1
  236. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts +4 -1
  237. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -1
  238. package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts +4 -1
  239. package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts.map +1 -1
  240. package/dist/types/src/containers/AssistantSettings/AssistantSettings.stories.d.ts +4 -1
  241. package/dist/types/src/containers/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -1
  242. package/dist/types/src/containers/AssistantSettings/OllamaModels.d.ts +4 -6
  243. package/dist/types/src/containers/AssistantSettings/OllamaModels.d.ts.map +1 -1
  244. package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts.map +1 -1
  245. package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts +22 -1
  246. package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts.map +1 -1
  247. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -1
  248. package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts +4 -1
  249. package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -1
  250. package/dist/types/src/containers/IntegrationPrompt/IntegrationPrompt.d.ts +4 -7
  251. package/dist/types/src/containers/IntegrationPrompt/IntegrationPrompt.d.ts.map +1 -1
  252. package/dist/types/src/containers/SpaceHomePrompt/SpaceHomePrompt.d.ts +4 -9
  253. package/dist/types/src/containers/SpaceHomePrompt/SpaceHomePrompt.d.ts.map +1 -1
  254. package/dist/types/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.d.ts +5 -7
  255. package/dist/types/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.d.ts.map +1 -1
  256. package/dist/types/src/containers/TracePanel/TracePanel.d.ts +1 -1
  257. package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -1
  258. package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -1
  259. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +15 -1
  260. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -1
  261. package/dist/types/src/containers/index.d.ts +0 -1
  262. package/dist/types/src/containers/index.d.ts.map +1 -1
  263. package/dist/types/src/execution-graph/execution-graph.d.ts +12 -1
  264. package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -1
  265. package/dist/types/src/execution-graph/index.d.ts +1 -1
  266. package/dist/types/src/execution-graph/index.d.ts.map +1 -1
  267. package/dist/types/src/execution-graph/pending-block-status.d.ts.map +1 -1
  268. package/dist/types/src/execution-graph/span-tree.d.ts +17 -0
  269. package/dist/types/src/execution-graph/span-tree.d.ts.map +1 -1
  270. package/dist/types/src/feed-logger.d.ts +1 -1
  271. package/dist/types/src/feed-logger.d.ts.map +1 -1
  272. package/dist/types/src/hooks/index.d.ts +1 -1
  273. package/dist/types/src/hooks/index.d.ts.map +1 -1
  274. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
  275. package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
  276. package/dist/types/src/hooks/useContextObjects.d.ts +1 -1
  277. package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
  278. package/dist/types/src/hooks/useSelectionContext.d.ts +13 -0
  279. package/dist/types/src/hooks/useSelectionContext.d.ts.map +1 -0
  280. package/dist/types/src/hooks/useSelectionContext.test.d.ts +2 -0
  281. package/dist/types/src/hooks/useSelectionContext.test.d.ts.map +1 -0
  282. package/dist/types/src/hooks/useTraceMessages.d.ts.map +1 -1
  283. package/dist/types/src/operations/index.d.ts.map +1 -1
  284. package/dist/types/src/processor/index.d.ts +1 -0
  285. package/dist/types/src/processor/index.d.ts.map +1 -1
  286. package/dist/types/src/processor/processor.d.ts +5 -2
  287. package/dist/types/src/processor/processor.d.ts.map +1 -1
  288. package/dist/types/src/processor/prompt.d.ts +18 -0
  289. package/dist/types/src/processor/prompt.d.ts.map +1 -0
  290. package/dist/types/src/processor/prompt.test.d.ts +2 -0
  291. package/dist/types/src/processor/prompt.test.d.ts.map +1 -0
  292. package/dist/types/src/processor/streaming.node.test.d.ts +2 -0
  293. package/dist/types/src/processor/streaming.node.test.d.ts.map +1 -0
  294. package/dist/types/src/skills/assistant/skill.d.ts.map +1 -1
  295. package/dist/types/src/templates/scaffold.d.ts +1 -1
  296. package/dist/types/src/templates/scaffold.d.ts.map +1 -1
  297. package/dist/types/src/translations.d.ts.map +1 -1
  298. package/dist/types/src/types/AssistantCapabilities.d.ts +1 -1
  299. package/dist/types/src/types/AssistantCapabilities.d.ts.map +1 -1
  300. package/dist/types/src/types/AssistantOperation.d.ts +2 -13
  301. package/dist/types/src/types/AssistantOperation.d.ts.map +1 -1
  302. package/dist/types/src/types/ChatSurface.d.ts +2 -2
  303. package/dist/types/src/types/ChatSurface.d.ts.map +1 -1
  304. package/dist/types/src/types/Ollama.d.ts +1 -1
  305. package/dist/types/src/types/Ollama.d.ts.map +1 -1
  306. package/dist/types/tsconfig.tsbuildinfo +1 -1
  307. package/dx.config.ts +1 -0
  308. package/package.json +106 -105
  309. package/src/AssistantPlugin.node.ts +1 -2
  310. package/src/AssistantPlugin.test.ts +60 -62
  311. package/src/AssistantPlugin.ts +1 -10
  312. package/src/AssistantPlugin.workerd.ts +1 -2
  313. package/src/capabilities/AssistantSurfaces.tsx +86 -0
  314. package/src/capabilities/agent-service.ts +1 -1
  315. package/src/capabilities/app-graph-builder.ts +31 -17
  316. package/src/capabilities/companion-chat-provisioner.ts +12 -11
  317. package/src/capabilities/connector.ts +3 -3
  318. package/src/capabilities/edge-model-resolver.ts +5 -2
  319. package/src/capabilities/index.ts +0 -2
  320. package/src/capabilities/react-surface.ts +135 -0
  321. package/src/capabilities/skill-definition.ts +4 -0
  322. package/src/capabilities/standalone-chats-query.test.ts +51 -0
  323. package/src/capabilities/state.ts +1 -1
  324. package/src/components/AgentProperties/AgentProperties.stories.tsx +6 -7
  325. package/src/components/AgentProperties/AgentProperties.tsx +37 -30
  326. package/src/components/Chat/Chat.tsx +275 -59
  327. package/src/components/Chat/{Chat.stories.tsx → Error.stories.tsx} +1 -1
  328. package/src/components/Chat/context.ts +8 -0
  329. package/src/components/Chat/events.ts +5 -0
  330. package/src/components/Chat/thread.test.ts +127 -0
  331. package/src/components/Chat/thread.ts +87 -0
  332. package/src/components/ChatPrompt/ChatActions.tsx +8 -8
  333. package/src/components/ChatPrompt/ChatMcpErrors.tsx +2 -2
  334. package/src/components/ChatPrompt/ChatOptions.stories.tsx +2 -1
  335. package/src/components/ChatPrompt/ChatOptions.tsx +5 -5
  336. package/src/components/ChatPrompt/ChatPrompt.tsx +33 -6
  337. package/src/components/ChatPrompt/index.ts +0 -1
  338. package/src/components/ChatThread/Anchor.stories.tsx +2 -1
  339. package/src/components/ChatThread/ChatThread.stories.tsx +99 -4
  340. package/src/components/ChatThread/ChatThread.tsx +34 -6
  341. package/src/components/ChatThread/Link.tsx +1 -0
  342. package/src/components/ChatThread/index.ts +2 -0
  343. package/src/components/ChatThread/registry.tsx +28 -4
  344. package/src/components/ChatThread/sync/index.ts +6 -0
  345. package/src/components/ChatThread/{sync.test.ts → sync/sync.test.ts} +167 -7
  346. package/src/components/ChatThread/{sync.ts → sync/sync.ts} +97 -3
  347. package/src/components/ChatThread/{tool-widget-state.ts → sync/tool-widget-state.ts} +1 -3
  348. package/src/components/ChatThread/widgets/BranchWidget.stories.tsx +83 -0
  349. package/src/components/ChatThread/widgets/BranchWidget.test.ts +55 -0
  350. package/src/components/ChatThread/widgets/BranchWidget.tsx +61 -0
  351. package/src/components/ChatThread/widgets/FallbackWidget.tsx +2 -2
  352. package/src/components/ChatThread/widgets/ReasoningWidget.ts +1 -1
  353. package/src/components/ChatThread/widgets/ReferenceWidget.ts +1 -6
  354. package/src/components/ChatThread/widgets/SuggestionWidget.ts +12 -3
  355. package/src/components/ChatThread/widgets/SummaryWidget.tsx +1 -1
  356. package/src/components/ChatThread/widgets/ToolWidget.tsx +15 -9
  357. package/src/components/ChatThread/widgets/defaults.ts +7 -1
  358. package/src/components/ChatThread/widgets/format-time.ts +45 -0
  359. package/src/components/ChatThread/widgets/index.ts +4 -1
  360. package/src/components/ChatThread/widgets/is-tool-message.ts +13 -0
  361. package/src/components/ConnectorAuthMenu/ConnectorAuthMenu.stories.tsx +177 -0
  362. package/src/components/ConnectorAuthMenu/ConnectorAuthMenu.tsx +82 -0
  363. package/src/components/ConnectorAuthMenu/index.ts +5 -0
  364. package/src/components/ProcessTree/ProcessTree.stories.tsx +1 -1
  365. package/src/components/TaskList/TaskList.stories.tsx +19 -26
  366. package/src/components/TaskList/TaskList.tsx +32 -104
  367. package/src/components/ToolBlock/ToolBlock.tsx +1 -5
  368. package/src/components/ToolBlock/index.ts +1 -0
  369. package/src/components/ToolBlock/is-tool-message.ts +13 -0
  370. package/src/components/Toolbox/Toolbox.tsx +1 -1
  371. package/src/components/index.ts +1 -0
  372. package/src/containers/AgentArticle/AgentArticle.stories.tsx +18 -11
  373. package/src/containers/AgentArticle/AgentArticle.tsx +27 -151
  374. package/src/containers/AgentProperties/AgentProperties.tsx +21 -17
  375. package/src/containers/AssistantSettings/AssistantSettings.tsx +2 -0
  376. package/src/containers/AssistantSettings/OllamaModels.tsx +6 -4
  377. package/src/containers/ChatArticle/ChatArticle.stories.tsx +200 -27
  378. package/src/containers/ChatArticle/ChatArticle.tsx +25 -5
  379. package/src/containers/ChatCompanion/ChatCompanion.tsx +45 -10
  380. package/src/containers/ChatDialog/ChatDialog.tsx +4 -1
  381. package/src/containers/IntegrationPrompt/IntegrationPrompt.tsx +9 -6
  382. package/src/containers/SpaceHomePrompt/SpaceHomePrompt.tsx +2 -0
  383. package/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.tsx +40 -39
  384. package/src/containers/TracePanel/TracePanel.stories.tsx +9 -4
  385. package/src/containers/TracePanel/TracePanel.tsx +22 -6
  386. package/src/containers/TriggerStatus/TriggerStatus.tsx +9 -16
  387. package/src/containers/index.ts +0 -1
  388. package/src/execution-graph/SPEC.md +60 -2
  389. package/src/execution-graph/execution-graph.ts +15 -2
  390. package/src/execution-graph/index.ts +1 -0
  391. package/src/execution-graph/pending-block-status.ts +3 -2
  392. package/src/execution-graph/span-tree.test.ts +87 -1
  393. package/src/execution-graph/span-tree.ts +95 -0
  394. package/src/feed-logger.ts +6 -6
  395. package/src/hooks/index.ts +1 -1
  396. package/src/hooks/useChatProcessor.ts +2 -1
  397. package/src/hooks/useChatToolbarActions.ts +22 -19
  398. package/src/hooks/useContextObjects.ts +9 -3
  399. package/src/hooks/useSelectionContext.test.ts +93 -0
  400. package/src/hooks/useSelectionContext.ts +72 -0
  401. package/src/hooks/useSkillRegistry.ts +1 -1
  402. package/src/hooks/useTraceMessages.ts +5 -3
  403. package/src/operations/create-chat.ts +2 -2
  404. package/src/operations/fork-chat.ts +2 -2
  405. package/src/operations/generate-home-suggestions.test.ts +2 -2
  406. package/src/operations/index.ts +0 -1
  407. package/src/operations/prompt.node.test.ts +1 -1
  408. package/src/paths.ts +3 -3
  409. package/src/processor/index.ts +1 -0
  410. package/src/processor/processor.node.test.ts +1 -1
  411. package/src/processor/processor.ts +33 -5
  412. package/src/processor/prompt.test.ts +37 -0
  413. package/src/processor/prompt.ts +42 -0
  414. package/src/processor/streaming.node.test.ts +196 -0
  415. package/src/skills/assistant/skill.node.test.ts +2 -2
  416. package/src/skills/assistant/skill.ts +3 -5
  417. package/src/templates/routine-templates.test.ts +1 -2
  418. package/src/templates/scaffold.ts +3 -3
  419. package/src/testing/data/trace-timeline-multiple.dx.json +1 -1
  420. package/src/testing/data/trace-timeline-remote.dx.json +1 -1
  421. package/src/testing/data/trace-timeline.dx.json +1 -2
  422. package/src/testing/trace-timeline.node.test.ts +3 -3
  423. package/src/translations.ts +11 -10
  424. package/src/types/AssistantCapabilities.ts +1 -1
  425. package/src/types/AssistantOperation.ts +8 -31
  426. package/src/types/ChatSurface.ts +3 -3
  427. package/src/types/Ollama.ts +1 -1
  428. package/dist/lib/neutral/AgentArticle-GV6EEW3I.mjs +0 -161
  429. package/dist/lib/neutral/AgentArticle-GV6EEW3I.mjs.map +0 -7
  430. package/dist/lib/neutral/AgentProperties-LFTEYJ54.mjs +0 -40
  431. package/dist/lib/neutral/AgentProperties-LFTEYJ54.mjs.map +0 -7
  432. package/dist/lib/neutral/AssistantPlugin.mjs +0 -10
  433. package/dist/lib/neutral/AssistantPlugin.mjs.map +0 -7
  434. package/dist/lib/neutral/AssistantPlugin.node.mjs +0 -72
  435. package/dist/lib/neutral/AssistantPlugin.node.mjs.map +0 -7
  436. package/dist/lib/neutral/AssistantPlugin.workerd.mjs +0 -13
  437. package/dist/lib/neutral/AssistantPlugin.workerd.mjs.map +0 -7
  438. package/dist/lib/neutral/AssistantSettings-3N5M5VCN.mjs +0 -302
  439. package/dist/lib/neutral/AssistantSettings-3N5M5VCN.mjs.map +0 -7
  440. package/dist/lib/neutral/ChatArticle-OO7GGEFW.mjs +0 -8
  441. package/dist/lib/neutral/ChatArticle-OO7GGEFW.mjs.map +0 -7
  442. package/dist/lib/neutral/ChatCompanion-GIFJRY6I.mjs +0 -128
  443. package/dist/lib/neutral/ChatCompanion-GIFJRY6I.mjs.map +0 -7
  444. package/dist/lib/neutral/ChatDialog-5MXN4MXS.mjs +0 -74
  445. package/dist/lib/neutral/ChatDialog-5MXN4MXS.mjs.map +0 -7
  446. package/dist/lib/neutral/IntegrationPrompt-2HJQFYJE.mjs +0 -72
  447. package/dist/lib/neutral/IntegrationPrompt-2HJQFYJE.mjs.map +0 -7
  448. package/dist/lib/neutral/PlanArticle-VPK2IYWU.mjs +0 -34
  449. package/dist/lib/neutral/PlanArticle-VPK2IYWU.mjs.map +0 -7
  450. package/dist/lib/neutral/SpaceHomePrompt-ISAB76LD.mjs +0 -114
  451. package/dist/lib/neutral/SpaceHomePrompt-ISAB76LD.mjs.map +0 -7
  452. package/dist/lib/neutral/SpaceHomeSuggestions-IDH77QQR.mjs +0 -63
  453. package/dist/lib/neutral/SpaceHomeSuggestions-IDH77QQR.mjs.map +0 -7
  454. package/dist/lib/neutral/TracePanel-JKNWADJ4.mjs +0 -12
  455. package/dist/lib/neutral/TracePanel-JKNWADJ4.mjs.map +0 -7
  456. package/dist/lib/neutral/TriggerStatus-FURRBHYA.mjs +0 -95
  457. package/dist/lib/neutral/TriggerStatus-FURRBHYA.mjs.map +0 -7
  458. package/dist/lib/neutral/agent-hydrator-OBO3RHLO.mjs +0 -23
  459. package/dist/lib/neutral/agent-hydrator-OBO3RHLO.mjs.map +0 -7
  460. package/dist/lib/neutral/agent-service-XFJ4VQMT.mjs +0 -32
  461. package/dist/lib/neutral/agent-service-XFJ4VQMT.mjs.map +0 -7
  462. package/dist/lib/neutral/ai-context-LIKJYMIN.mjs.map +0 -7
  463. package/dist/lib/neutral/ai-service-DM6YXWUC.mjs +0 -44
  464. package/dist/lib/neutral/ai-service-DM6YXWUC.mjs.map +0 -7
  465. package/dist/lib/neutral/app-graph-builder-OPVOEQY7.mjs +0 -249
  466. package/dist/lib/neutral/app-graph-builder-OPVOEQY7.mjs.map +0 -7
  467. package/dist/lib/neutral/automation-templates-MADJLXGJ.mjs +0 -97
  468. package/dist/lib/neutral/automation-templates-MADJLXGJ.mjs.map +0 -7
  469. package/dist/lib/neutral/capabilities/index.mjs +0 -47
  470. package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
  471. package/dist/lib/neutral/chunk-5IHQ52KJ.mjs +0 -9
  472. package/dist/lib/neutral/chunk-5IHQ52KJ.mjs.map +0 -7
  473. package/dist/lib/neutral/chunk-6Q4OBGIK.mjs +0 -420
  474. package/dist/lib/neutral/chunk-6Q4OBGIK.mjs.map +0 -7
  475. package/dist/lib/neutral/chunk-BXI2R4OO.mjs +0 -410
  476. package/dist/lib/neutral/chunk-BXI2R4OO.mjs.map +0 -7
  477. package/dist/lib/neutral/chunk-CMPLPDYE.mjs +0 -30
  478. package/dist/lib/neutral/chunk-CMPLPDYE.mjs.map +0 -7
  479. package/dist/lib/neutral/chunk-GPHT3HYS.mjs +0 -8
  480. package/dist/lib/neutral/chunk-GPHT3HYS.mjs.map +0 -7
  481. package/dist/lib/neutral/chunk-HKLSFB5I.mjs +0 -90
  482. package/dist/lib/neutral/chunk-HKLSFB5I.mjs.map +0 -7
  483. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
  484. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
  485. package/dist/lib/neutral/chunk-L7AR4VTA.mjs.map +0 -7
  486. package/dist/lib/neutral/chunk-LS72HWMM.mjs +0 -42
  487. package/dist/lib/neutral/chunk-LS72HWMM.mjs.map +0 -7
  488. package/dist/lib/neutral/chunk-OZWZGIV2.mjs +0 -12
  489. package/dist/lib/neutral/chunk-OZWZGIV2.mjs.map +0 -7
  490. package/dist/lib/neutral/chunk-QOKLFHUS.mjs +0 -13
  491. package/dist/lib/neutral/chunk-QOKLFHUS.mjs.map +0 -7
  492. package/dist/lib/neutral/chunk-SCTHQVIJ.mjs +0 -155
  493. package/dist/lib/neutral/chunk-SCTHQVIJ.mjs.map +0 -7
  494. package/dist/lib/neutral/chunk-U4LTLBAX.mjs +0 -56
  495. package/dist/lib/neutral/chunk-U4LTLBAX.mjs.map +0 -7
  496. package/dist/lib/neutral/chunk-UPKFUZ6V.mjs +0 -115
  497. package/dist/lib/neutral/chunk-UPKFUZ6V.mjs.map +0 -7
  498. package/dist/lib/neutral/chunk-V2Y4XE3O.mjs +0 -12
  499. package/dist/lib/neutral/chunk-V2Y4XE3O.mjs.map +0 -7
  500. package/dist/lib/neutral/chunk-VTK5R4H3.mjs +0 -9
  501. package/dist/lib/neutral/chunk-VTK5R4H3.mjs.map +0 -7
  502. package/dist/lib/neutral/chunk-XVGEJWJX.mjs +0 -133
  503. package/dist/lib/neutral/chunk-XVGEJWJX.mjs.map +0 -7
  504. package/dist/lib/neutral/companion-chat-provisioner-IQV5VIVE.mjs +0 -126
  505. package/dist/lib/neutral/companion-chat-provisioner-IQV5VIVE.mjs.map +0 -7
  506. package/dist/lib/neutral/components/index.mjs +0 -2527
  507. package/dist/lib/neutral/components/index.mjs.map +0 -7
  508. package/dist/lib/neutral/connector-ITLLTBPZ.mjs +0 -70
  509. package/dist/lib/neutral/connector-ITLLTBPZ.mjs.map +0 -7
  510. package/dist/lib/neutral/containers/index.mjs +0 -31
  511. package/dist/lib/neutral/containers/index.mjs.map +0 -7
  512. package/dist/lib/neutral/create-chat-YGVZZYGP.mjs +0 -56
  513. package/dist/lib/neutral/create-chat-YGVZZYGP.mjs.map +0 -7
  514. package/dist/lib/neutral/create-object-5PAEJ6KM.mjs +0 -76
  515. package/dist/lib/neutral/create-object-5PAEJ6KM.mjs.map +0 -7
  516. package/dist/lib/neutral/edge-model-resolver-WDJWDZTT.mjs +0 -55
  517. package/dist/lib/neutral/edge-model-resolver-WDJWDZTT.mjs.map +0 -7
  518. package/dist/lib/neutral/ensure-companion-chat-AMOF3C66.mjs +0 -58
  519. package/dist/lib/neutral/ensure-companion-chat-AMOF3C66.mjs.map +0 -7
  520. package/dist/lib/neutral/execution-graph/index.mjs +0 -977
  521. package/dist/lib/neutral/execution-graph/index.mjs.map +0 -7
  522. package/dist/lib/neutral/extensions/index.mjs +0 -8
  523. package/dist/lib/neutral/extensions/index.mjs.map +0 -7
  524. package/dist/lib/neutral/fork-chat-RMAAYYQF.mjs +0 -92
  525. package/dist/lib/neutral/fork-chat-RMAAYYQF.mjs.map +0 -7
  526. package/dist/lib/neutral/generate-home-suggestions-6MM2XWPV.mjs +0 -93
  527. package/dist/lib/neutral/generate-home-suggestions-6MM2XWPV.mjs.map +0 -7
  528. package/dist/lib/neutral/hooks/index.mjs +0 -877
  529. package/dist/lib/neutral/hooks/index.mjs.map +0 -7
  530. package/dist/lib/neutral/index.mjs +0 -42
  531. package/dist/lib/neutral/index.mjs.map +0 -7
  532. package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs +0 -24
  533. package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs.map +0 -7
  534. package/dist/lib/neutral/markdown-extension-R4TKDTIF.mjs +0 -41
  535. package/dist/lib/neutral/markdown-extension-R4TKDTIF.mjs.map +0 -7
  536. package/dist/lib/neutral/meta.json +0 -1
  537. package/dist/lib/neutral/meta.mjs +0 -12
  538. package/dist/lib/neutral/meta.mjs.map +0 -7
  539. package/dist/lib/neutral/migrations-7DEMVBOG.mjs +0 -28
  540. package/dist/lib/neutral/migrations-7DEMVBOG.mjs.map +0 -7
  541. package/dist/lib/neutral/navigation-resolver-PYGP2DAW.mjs +0 -18
  542. package/dist/lib/neutral/navigation-resolver-PYGP2DAW.mjs.map +0 -7
  543. package/dist/lib/neutral/operation-handler-2LEN45GP.mjs +0 -8
  544. package/dist/lib/neutral/operation-handler-2LEN45GP.mjs.map +0 -7
  545. package/dist/lib/neutral/operations/index.mjs +0 -8
  546. package/dist/lib/neutral/operations/index.mjs.map +0 -7
  547. package/dist/lib/neutral/plugin.mjs +0 -16
  548. package/dist/lib/neutral/plugin.mjs.map +0 -7
  549. package/dist/lib/neutral/plugin.workerd.mjs +0 -13
  550. package/dist/lib/neutral/plugin.workerd.mjs.map +0 -7
  551. package/dist/lib/neutral/react-surface-HEJEK44F.mjs +0 -171
  552. package/dist/lib/neutral/react-surface-HEJEK44F.mjs.map +0 -7
  553. package/dist/lib/neutral/resolve-navigation-targets-PBQ3OLUE.mjs +0 -28
  554. package/dist/lib/neutral/resolve-navigation-targets-PBQ3OLUE.mjs.map +0 -7
  555. package/dist/lib/neutral/run-prompt-in-new-chat-RNUJE2FM.mjs +0 -102
  556. package/dist/lib/neutral/run-prompt-in-new-chat-RNUJE2FM.mjs.map +0 -7
  557. package/dist/lib/neutral/set-current-chat-VWBPSIMZ.mjs +0 -48
  558. package/dist/lib/neutral/set-current-chat-VWBPSIMZ.mjs.map +0 -7
  559. package/dist/lib/neutral/settings-7Q3RITIT.mjs +0 -28
  560. package/dist/lib/neutral/settings-7Q3RITIT.mjs.map +0 -7
  561. package/dist/lib/neutral/skill-definition-553MQRTR.mjs +0 -8
  562. package/dist/lib/neutral/skill-definition-553MQRTR.mjs.map +0 -7
  563. package/dist/lib/neutral/skills/index.mjs +0 -8
  564. package/dist/lib/neutral/skills/index.mjs.map +0 -7
  565. package/dist/lib/neutral/state-4LGAKSSD.mjs +0 -34
  566. package/dist/lib/neutral/state-4LGAKSSD.mjs.map +0 -7
  567. package/dist/lib/neutral/testing.mjs +0 -8
  568. package/dist/lib/neutral/testing.mjs.map +0 -7
  569. package/dist/lib/neutral/toggle-trace-panel-debug-JGTB6KVJ.mjs +0 -21
  570. package/dist/lib/neutral/toggle-trace-panel-debug-JGTB6KVJ.mjs.map +0 -7
  571. package/dist/lib/neutral/toolkit-ETWLG5NT.mjs +0 -8
  572. package/dist/lib/neutral/toolkit-ETWLG5NT.mjs.map +0 -7
  573. package/dist/lib/neutral/translations.mjs +0 -217
  574. package/dist/lib/neutral/translations.mjs.map +0 -7
  575. package/dist/lib/neutral/types/index.mjs +0 -24
  576. package/dist/lib/neutral/types/index.mjs.map +0 -7
  577. package/dist/lib/neutral/update-chat-name-IJJELRR6.mjs +0 -61
  578. package/dist/lib/neutral/update-chat-name-IJJELRR6.mjs.map +0 -7
  579. package/dist/types/src/capabilities/migrations.d.ts +0 -5
  580. package/dist/types/src/capabilities/migrations.d.ts.map +0 -1
  581. package/dist/types/src/capabilities/navigation-resolver.d.ts +0 -5
  582. package/dist/types/src/capabilities/navigation-resolver.d.ts.map +0 -1
  583. package/dist/types/src/components/Chat/Chat.stories.d.ts.map +0 -1
  584. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +0 -10
  585. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +0 -1
  586. package/dist/types/src/components/ChatThread/sync.d.ts.map +0 -1
  587. package/dist/types/src/components/ChatThread/sync.test.d.ts.map +0 -1
  588. package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +0 -1
  589. package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts.map +0 -1
  590. package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts +0 -6
  591. package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts.map +0 -1
  592. package/dist/types/src/containers/PlanArticle/index.d.ts +0 -2
  593. package/dist/types/src/containers/PlanArticle/index.d.ts.map +0 -1
  594. package/dist/types/src/hooks/useFlush.d.ts +0 -6
  595. package/dist/types/src/hooks/useFlush.d.ts.map +0 -1
  596. package/dist/types/src/operations/resolve-navigation-targets.d.ts +0 -5
  597. package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +0 -1
  598. package/src/AssistantPlugin.conversations.json +0 -1
  599. package/src/capabilities/migrations.ts +0 -28
  600. package/src/capabilities/navigation-resolver.ts +0 -20
  601. package/src/capabilities/react-surface.tsx +0 -177
  602. package/src/components/ChatPrompt/ChatStatusIndicator.tsx +0 -42
  603. package/src/components/ChatThread/DEBUG.md +0 -64
  604. package/src/containers/PlanArticle/PlanArticle.tsx +0 -37
  605. package/src/containers/PlanArticle/index.ts +0 -5
  606. package/src/hooks/useFlush.ts +0 -35
  607. package/src/operations/resolve-navigation-targets.ts +0 -44
  608. /package/dist/types/src/components/ChatThread/{sync.test.d.ts → sync/sync.test.d.ts} +0 -0
  609. /package/dist/types/src/components/ChatThread/{tool-widget-state.d.ts → sync/tool-widget-state.d.ts} +0 -0
  610. /package/dist/types/src/components/ChatThread/{tool-widget-state.test.d.ts → sync/tool-widget-state.test.d.ts} +0 -0
  611. /package/src/components/ChatThread/{tool-widget-state.test.ts → sync/tool-widget-state.test.ts} +0 -0
@@ -0,0 +1,86 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ // Surface components that cannot be expressed as a `props` mapper, because they call hooks or compose.
6
+
7
+ import React, { useEffect } from 'react';
8
+
9
+ import { useSettingsState } from '@dxos/app-framework/ui';
10
+ import { type AppCapabilities } from '@dxos/app-toolkit';
11
+ import { useActiveSpace, useHomeVisibility } from '@dxos/app-toolkit/ui';
12
+ import { getSpace } from '@dxos/client/echo';
13
+ import { Instructions } from '@dxos/compute';
14
+ import { InvocationTraceContainer } from '@dxos/devtools';
15
+ import { Feed, Obj } from '@dxos/echo';
16
+ import { log } from '@dxos/log';
17
+ import { type Space } from '@dxos/react-client/echo';
18
+ import { Panel } from '@dxos/react-ui';
19
+
20
+ import { AssistantSettings, SpaceHomeSuggestions, TracePanel, TriggerStatus } from '#containers';
21
+ import { type Assistant } from '#types';
22
+
23
+ export type AssistantSettingsSurfaceProps = {
24
+ subject: AppCapabilities.Settings;
25
+ };
26
+
27
+ export const AssistantSettingsSurface = ({ subject }: AssistantSettingsSurfaceProps) => {
28
+ const { settings, updateSettings } = useSettingsState<Assistant.Settings>(subject.atom);
29
+
30
+ return <AssistantSettings settings={settings} onSettingsChange={updateSettings} />;
31
+ };
32
+
33
+ export type SpaceHomeSuggestionsSurfaceProps = {
34
+ space: Space;
35
+ };
36
+
37
+ /** Suggestions are dismissible per space, so visibility is durable UI state rather than surface data. */
38
+ export const SpaceHomeSuggestionsSurface = ({ space }: SpaceHomeSuggestionsSurfaceProps) => {
39
+ const { visible, hide } = useHomeVisibility(space, 'spaceHomeSuggestions');
40
+
41
+ return visible ? <SpaceHomeSuggestions space={space} onClose={hide} /> : null;
42
+ };
43
+
44
+ export type InvocationsSurfaceProps = {
45
+ role: string;
46
+ companionTo: Obj.Unknown;
47
+ };
48
+
49
+ /** Resolves the space's invocation-trace feed for the companion's subject. */
50
+ export const InvocationsSurface = ({ role, companionTo }: InvocationsSurfaceProps) => {
51
+ const space = getSpace(companionTo);
52
+ const feed = space?.properties.invocationTraceFeed?.target;
53
+ const feedDXN = feed ? Feed.getFeedUri(feed) : undefined;
54
+ // TODO(wittjosiah): Support invocation filtering for prompts.
55
+ const target = Obj.instanceOf(Instructions.Instructions, companionTo) ? undefined : companionTo;
56
+
57
+ return (
58
+ <Panel.Root role={role} classNames='dx-document'>
59
+ <Panel.Content asChild>
60
+ <InvocationTraceContainer db={space?.db} feedDXN={feedDXN} target={target} detailAxis='block' />
61
+ </Panel.Content>
62
+ </Panel.Root>
63
+ );
64
+ };
65
+
66
+ export const TracePanelSurface = () => {
67
+ const space = useActiveSpace();
68
+ useEffect(() => {
69
+ log('trace panel surface', { hasSpace: Boolean(space), spaceId: space?.id });
70
+ }, [space?.id]);
71
+
72
+ if (!space) {
73
+ return null;
74
+ }
75
+
76
+ return <TracePanel space={space} />;
77
+ };
78
+
79
+ export const TriggerStatusSurface = () => {
80
+ const space = useActiveSpace();
81
+ if (!space) {
82
+ return null;
83
+ }
84
+
85
+ return <TriggerStatus role='status-indicator' space={space} />;
86
+ };
@@ -5,10 +5,10 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
  import * as Layer from 'effect/Layer';
7
7
 
8
+ import { AgentService as AgentServiceRuntime } from '@dxos/agent-runtime';
8
9
  import { Capabilities, Capability } from '@dxos/app-framework';
9
10
  import { AgentService, LayerSpec } from '@dxos/compute';
10
11
  import { ProcessManager } from '@dxos/compute-runtime';
11
- import { AgentService as AgentServiceRuntime } from '@dxos/functions-runtime';
12
12
  import { RoutineCapabilities } from '@dxos/plugin-routine';
13
13
 
14
14
  //
@@ -12,20 +12,20 @@ import {
12
12
  AppNode,
13
13
  AppNodeMatcher,
14
14
  AppSpace,
15
+ GraphPath,
15
16
  LayoutOperation,
16
- Paths,
17
17
  TypeSection,
18
18
  } from '@dxos/app-toolkit';
19
19
  import { Chat, RunInstructions } from '@dxos/assistant-toolkit';
20
20
  import { isSpace } from '@dxos/client/echo';
21
- import { Instructions, Operation } from '@dxos/compute';
21
+ import { Instructions, Operation, Project } from '@dxos/compute';
22
22
  import { Sequence } from '@dxos/conductor';
23
23
  import { Database, DXN, Filter, Obj, Query, type Ref, Type } from '@dxos/echo';
24
24
  import { invariant } from '@dxos/invariant';
25
25
  import { ClientCapabilities } from '@dxos/plugin-client';
26
26
  import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
27
27
  import { SpaceOperation } from '@dxos/plugin-space';
28
- import { linkedSegment } from '@dxos/react-ui-attention';
28
+ import { Attention } from '@dxos/react-ui-attention';
29
29
  import { Position } from '@dxos/util';
30
30
 
31
31
  import { ASSISTANT_COMPANION_VARIANT, meta } from '#meta';
@@ -36,6 +36,23 @@ import { getChatsPath } from '../paths';
36
36
  /** Operation definitions to seed as `PersistentOperation` records for automation / triggers. */
37
37
  const computeOperationsToImport = [RunInstructions] as const;
38
38
 
39
+ /**
40
+ * Chats belonging to the top-level Chats section: every chat minus the two kinds that already appear
41
+ * elsewhere in the tree. A chat sourcing a `CompanionTo` relation belongs to its primary object's
42
+ * companion panel; a chat parented to a `Project` is that project's navtree child (plugin-projects
43
+ * `projectChats`). Without the second exclusion a project chat appears twice.
44
+ *
45
+ * The project exclusion subtracts every project child rather than just chats — `children()` takes no
46
+ * type filter, and subtracting a non-chat from a chat-typed source is a no-op.
47
+ */
48
+ export const standaloneChatsQuery = Query.without(
49
+ Query.without(
50
+ Query.select(Filter.type(Chat.Chat)),
51
+ Query.select(Filter.type(Chat.Chat)).sourceOf(Chat.CompanionTo).source(),
52
+ ),
53
+ Query.select(Filter.type(Project.Project)).children(),
54
+ );
55
+
39
56
  /** Match ECHO objects that are NOT chats. */
40
57
  const whenNonChatObject = NodeMatcher.whenAll(
41
58
  NodeMatcher.whenEchoObject,
@@ -49,13 +66,13 @@ export default Capability.makeModule(
49
66
  const extensions = yield* Effect.all([
50
67
  // AI section group — created here so it shows only when the assistant plugin is active.
51
68
  GraphBuilder.createExtension({
52
- id: Paths.GroupSegments.ai,
69
+ id: GraphPath.GroupSegments.ai,
53
70
  match: AppNodeMatcher.whenSpace,
54
71
  connector: (space) =>
55
72
  Effect.succeed([
56
73
  AppNode.makeGroup({
57
- id: Paths.GroupSegments.ai,
58
- type: Paths.GroupTypes.ai,
74
+ id: GraphPath.GroupSegments.ai,
75
+ type: GraphPath.GroupTypes.ai,
59
76
  label: ['nav-tree-group-ai.label', { ns: meta.profile.key }],
60
77
  space,
61
78
  position: 300,
@@ -155,7 +172,7 @@ export default Capability.makeModule(
155
172
 
156
173
  return [
157
174
  AppNode.makeCompanion({
158
- id: linkedSegment(ASSISTANT_COMPANION_VARIANT),
175
+ variant: ASSISTANT_COMPANION_VARIANT,
159
176
  label: ['assistant-chat.label', { ns: meta.profile.key }],
160
177
  icon: 'ph--sparkle--regular',
161
178
  data: chat,
@@ -174,7 +191,7 @@ export default Capability.makeModule(
174
191
  connector: () =>
175
192
  Effect.succeed([
176
193
  AppNode.makeCompanion({
177
- id: 'invocations',
194
+ variant: 'invocations',
178
195
  label: ['invocations.label', { ns: meta.profile.key }],
179
196
  icon: 'ph--clock-countdown--regular',
180
197
  data: 'invocations',
@@ -188,7 +205,7 @@ export default Capability.makeModule(
188
205
  connector: () =>
189
206
  Effect.succeed([
190
207
  AppNode.makeDeckCompanion({
191
- id: linkedSegment('trace'),
208
+ id: Attention.linkedSegment('trace'),
192
209
  label: ['trace.label', { ns: meta.profile.key }],
193
210
  icon: 'ph--line-segments--regular',
194
211
  data: 'trace',
@@ -197,15 +214,12 @@ export default Capability.makeModule(
197
214
  ]),
198
215
  }),
199
216
 
200
- // Section node: standalone Chat.Chat objects per AI group (companions are excluded).
217
+ // Section node: standalone Chat.Chat objects per AI group (companions and project chats excluded).
201
218
  TypeSection.createTypeSectionExtension(Chat.Chat, {
202
- // Exclude chats that are the source of a CompanionTo relation; those belong to
203
- // their primary object's companion panel and should not appear in the top-level list.
204
- query: Query.without(
205
- Query.select(Filter.type(Chat.Chat)),
206
- Query.select(Filter.type(Chat.Chat)).sourceOf(Chat.CompanionTo).source(),
207
- ),
208
- match: AppNodeMatcher.whenNavTreeGroup(Paths.GroupTypes.ai),
219
+ query: standaloneChatsQuery,
220
+ match: AppNodeMatcher.whenNavTreeGroup(GraphPath.GroupTypes.ai),
221
+ groupSegment: GraphPath.GroupSegments.ai,
222
+ urlKey: 'chat',
209
223
  }),
210
224
 
211
225
  // Create-chat action on the Chats section header.
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type Registry } from '@effect-atom/atom-react';
5
+ import { Atom, type Registry } from '@effect-atom/atom';
6
6
  import * as Effect from 'effect/Effect';
7
7
  import * as Option from 'effect/Option';
8
8
 
@@ -18,9 +18,9 @@ import {
18
18
  DeckCapabilities,
19
19
  PLANK_COMPANION_TYPE,
20
20
  type StoredDeckState,
21
- companionVariantAspect,
21
+ companionAspect,
22
22
  } from '@dxos/plugin-deck';
23
- import { getLinkedVariant } from '@dxos/react-ui-attention';
23
+ import { Attention } from '@dxos/react-ui-attention';
24
24
  import { Position } from '@dxos/util';
25
25
 
26
26
  import { ASSISTANT_COMPANION_VARIANT } from '#meta';
@@ -40,8 +40,9 @@ export default Capability.makeModule(
40
40
  const stateAtom = yield* Capability.get(AssistantCapabilities.State);
41
41
  // The selected companion variant moved off deck state into a global view-state aspect; read and
42
42
  // observe it directly so a tab switch (which no longer touches deck state) still re-provisions.
43
+ // Project just the variant so a companion resize (same aspect) does not re-fire provisioning.
43
44
  const viewState = yield* Capability.get(AttentionCapabilities.ViewState);
44
- const variantAtom = viewState.atom(companionVariantAspect, COMPANION_VIEW_STATE_CONTEXT);
45
+ const variantAtom = Atom.make((get) => get(viewState.atom(companionAspect, COMPANION_VIEW_STATE_CONTEXT)).variant);
45
46
 
46
47
  const plankSubs = new Map<string, () => void>();
47
48
 
@@ -97,13 +98,13 @@ export default Capability.makeModule(
97
98
  const provision = () => {
98
99
  const deckState: StoredDeckState = registry.get(deckStateAtom);
99
100
  const deck = deckState.decks[deckState.activeDeck];
100
- if (!deck?.companionOpen) {
101
+ if (!deck?.companionPlanks.length) {
101
102
  unsubAllPlanks();
102
103
  return;
103
104
  }
104
105
 
105
- const companionVariant = registry.get(variantAtom).variant;
106
- const plankIds = new Set(deck.solo ? [deck.solo] : deck.active);
106
+ const companionVariant = registry.get(variantAtom);
107
+ const plankIds = new Set(deck.active);
107
108
 
108
109
  // Remove subscriptions for planks that are no longer active.
109
110
  for (const trackedId of plankSubs.keys()) {
@@ -126,7 +127,7 @@ export default Capability.makeModule(
126
127
  plankSubs.set(
127
128
  plankId,
128
129
  registry.subscribe(graph.connections(plankId, 'child'), () => {
129
- if (provisionForPlank(plankId, registry.get(variantAtom).variant)) {
130
+ if (provisionForPlank(plankId, registry.get(variantAtom))) {
130
131
  unsubPlank(plankId);
131
132
  }
132
133
  }),
@@ -170,11 +171,11 @@ const resolveEffectiveVariant = (
170
171
  }
171
172
 
172
173
  if (preferredVariant) {
173
- const preferred = companions.find((companion) => getLinkedVariant(companion.id) === preferredVariant);
174
+ const preferred = companions.find((companion) => Attention.getLinkedVariant(companion.id) === preferredVariant);
174
175
  if (preferred) {
175
- return getLinkedVariant(preferred.id);
176
+ return Attention.getLinkedVariant(preferred.id);
176
177
  }
177
178
  }
178
179
 
179
- return getLinkedVariant(companions[0].id);
180
+ return Attention.getLinkedVariant(companions[0].id);
180
181
  };
@@ -6,15 +6,15 @@ import * as Effect from 'effect/Effect';
6
6
  import * as Schema from 'effect/Schema';
7
7
 
8
8
  import { Capability } from '@dxos/app-framework';
9
- import { Obj, Ref } from '@dxos/echo';
9
+ import { Format, Obj, Ref } from '@dxos/echo';
10
+ import { AccessToken } from '@dxos/link';
10
11
  import { Connection, Connector, type CredentialForm } from '@dxos/plugin-connector';
11
- import { AccessToken } from '@dxos/types';
12
12
 
13
13
  import { ANTHROPIC_PROVIDER_ID, ANTHROPIC_SOURCE } from '../constants';
14
14
 
15
15
  /** API-key form for the Anthropic BYOK provider; key is best-effort validated against `/v1/models`. */
16
16
  const AnthropicTokenForm = Schema.Struct({
17
- token: Schema.String.annotations({
17
+ token: Schema.String.pipe(Format.FormatAnnotation.set(Format.TypeFormat.Password)).annotations({
18
18
  title: 'API key',
19
19
  description: 'Your Anthropic API key — find it at https://console.anthropic.com/settings/keys.',
20
20
  }),
@@ -5,6 +5,7 @@
5
5
  import * as AnthropicClient from '@effect/ai-anthropic/AnthropicClient';
6
6
  import * as Effect from 'effect/Effect';
7
7
  import * as Layer from 'effect/Layer';
8
+ import * as Option from 'effect/Option';
8
9
 
9
10
  import { AnthropicResolver } from '@dxos/ai/resolvers';
10
11
  import { Capability } from '@dxos/app-framework';
@@ -36,16 +37,18 @@ const edgeModelResolver = Capability.makeModule<[], EdgeModelResolverCapabilitie
36
37
  if (!edgeClient) {
37
38
  const [client] = manager.getAll(ClientCapabilities.Client);
38
39
  invariant(client, 'Client capability is required for edge AI requests.');
40
+ const [haloIdentity] = manager.getAll(ClientCapabilities.IdentityService);
41
+ invariant(haloIdentity, 'HALO identity capability is required for edge AI requests.');
39
42
  const edgeUrl = client.config.values.runtime?.services?.edge?.url;
40
43
  invariant(edgeUrl, 'EDGE services are not configured.');
41
44
  const created = new EdgeHttpClient(edgeUrl);
42
45
  const updateIdentity = () => {
43
- if (client.halo.identity.get()) {
46
+ if (Option.isSome(haloIdentity.getSnapshot())) {
44
47
  created.setIdentity(createEdgeIdentity(client));
45
48
  }
46
49
  };
47
50
  updateIdentity();
48
- identitySubscription = client.halo.identity.subscribe(updateIdentity);
51
+ identitySubscription = { unsubscribe: haloIdentity.subscribe(updateIdentity) };
49
52
  edgeClient = created;
50
53
  }
51
54
  return edgeClient;
@@ -16,7 +16,6 @@ export const AiService = Capability.lazy<AssistantPluginOptions | void, Capabili
16
16
  );
17
17
  export const Connector = Capability.lazy('AnthropicConnector', () => import('./connector'));
18
18
  export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
19
- export const NavigationResolver = Capability.lazy('NavigationResolver', () => import('./navigation-resolver'));
20
19
  export const AutomationTemplates = Capability.lazy('AutomationTemplates', () => import('./automation-templates'));
21
20
  export const SkillDefinition = Capability.lazy('SkillDefinition', () => import('./skill-definition'));
22
21
  export const CompanionChatProvisioner = Capability.lazy(
@@ -27,7 +26,6 @@ export const CreateObject = Capability.lazy('CreateObject', () => import('./crea
27
26
  export const EdgeModelResolver = Capability.lazy('EdgeModelResolver', () => import('./edge-model-resolver'));
28
27
  export const LocalModelResolver = Capability.lazy('LocalModelResolver', () => import('./local-model-resolver'));
29
28
  export const MarkdownExtension = Capability.lazy('MarkdownExtension', () => import('./markdown-extension'));
30
- export const Migrations = Capability.lazy('AssistantMigrations', () => import('./migrations'));
31
29
  export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
32
30
  'OperationHandler',
33
31
  () => import('./operation-handler'),
@@ -0,0 +1,135 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import { type ComponentProps } from 'react';
7
+
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { Surface } from '@dxos/app-framework/ui';
10
+ import { AppSurface } from '@dxos/app-toolkit/ui';
11
+ import { Agent, Chat } from '@dxos/assistant-toolkit';
12
+ import { Instructions } from '@dxos/compute';
13
+ import { Sequence } from '@dxos/conductor';
14
+ import { Obj } from '@dxos/echo';
15
+ import { SpaceHomeContent, SpaceHomePinBottom } from '@dxos/plugin-space';
16
+ import { Position } from '@dxos/util';
17
+
18
+ import {
19
+ AgentArticle,
20
+ AgentProperties,
21
+ ChatArticle,
22
+ ChatCompanion,
23
+ ChatDialog,
24
+ IntegrationPrompt,
25
+ SpaceHomePrompt,
26
+ } from '#containers';
27
+ import { ASSISTANT_COMPANION_VARIANT, ASSISTANT_DIALOG, meta } from '#meta';
28
+ import { ChatSurface } from '#types';
29
+
30
+ import {
31
+ AssistantSettingsSurface,
32
+ InvocationsSurface,
33
+ SpaceHomeSuggestionsSurface,
34
+ TracePanelSurface,
35
+ TriggerStatusSurface,
36
+ } from './AssistantSurfaces';
37
+
38
+ export default Capability.makeModule(() =>
39
+ Effect.succeed(
40
+ Capability.contributes(Capabilities.ReactSurface, [
41
+ Surface.create({
42
+ id: 'pluginSettings',
43
+ filter: AppSurface.settings(AppSurface.Article, meta.profile.key),
44
+ component: AssistantSettingsSurface,
45
+ props: ({ data: { subject } }) => ({ subject }),
46
+ }),
47
+ Surface.create({
48
+ id: 'spaceHomePrompt',
49
+ filter: Surface.makeFilter(SpaceHomePinBottom),
50
+ component: SpaceHomePrompt,
51
+ props: ({ data: { space } }) => ({ space }),
52
+ }),
53
+ Surface.create({
54
+ id: 'spaceHomeSuggestions',
55
+ filter: Surface.makeFilter(SpaceHomeContent),
56
+ position: Position.last,
57
+ component: SpaceHomeSuggestionsSurface,
58
+ props: ({ data: { space } }) => ({ space }),
59
+ }),
60
+ Surface.create({
61
+ id: 'chat',
62
+ filter: AppSurface.object(
63
+ AppSurface.Article,
64
+ Chat.Chat,
65
+ (data) => data.variant !== ASSISTANT_COMPANION_VARIANT,
66
+ ),
67
+ component: ChatArticle,
68
+ props: ({ role, ref, data: { subject, attendableId } }) => ({ role, subject, attendableId, ref }),
69
+ }),
70
+ Surface.create({
71
+ id: 'agent',
72
+ filter: AppSurface.object(AppSurface.Article, Agent.Agent),
73
+ component: AgentArticle,
74
+ props: ({ role, data: { subject, attendableId } }) => ({ role, subject, attendableId }),
75
+ }),
76
+ Surface.create({
77
+ id: 'objectProperties',
78
+ filter: AppSurface.object(AppSurface.ObjectProperties, Agent.Agent),
79
+ component: AgentProperties,
80
+ props: ({ data: { subject } }) => ({ subject }),
81
+ }),
82
+ Surface.create({
83
+ id: 'companionChat',
84
+ filter: Surface.makeFilter(
85
+ AppSurface.Article,
86
+ (data) =>
87
+ Obj.isObject(data.companionTo) && (Obj.instanceOf(Chat.Chat, data.subject) || data.subject === null),
88
+ ),
89
+ component: ChatCompanion,
90
+ props: ({ role, ref, data: { subject, attendableId, companionTo } }) => ({
91
+ role,
92
+ subject,
93
+ attendableId,
94
+ companionTo,
95
+ ref,
96
+ }),
97
+ }),
98
+ Surface.create({
99
+ id: 'companionInvocations',
100
+ filter: AppSurface.allOf(
101
+ AppSurface.literal(AppSurface.Article, 'invocations'),
102
+ AppSurface.oneOf(
103
+ AppSurface.companion(AppSurface.Article, Sequence.Sequence),
104
+ AppSurface.companion(AppSurface.Article, Instructions.Instructions),
105
+ ),
106
+ ),
107
+ component: InvocationsSurface,
108
+ props: ({ role, data: { companionTo } }) => ({ role, companionTo }),
109
+ }),
110
+ Surface.create({
111
+ id: ASSISTANT_DIALOG,
112
+ filter: AppSurface.component<ComponentProps<typeof ChatDialog>>(AppSurface.Dialog, ASSISTANT_DIALOG),
113
+ component: ChatDialog,
114
+ props: ({ data: { props } }) => ({ ...props }),
115
+ }),
116
+ Surface.create({
117
+ id: 'trace',
118
+ filter: Surface.makeFilter(AppSurface.deckCompanion('trace')),
119
+ component: TracePanelSurface,
120
+ }),
121
+ Surface.create({
122
+ id: 'integrationPrompt',
123
+ filter: Surface.makeFilter(ChatSurface, (data) => data.role === 'integration-prompt'),
124
+ component: IntegrationPrompt,
125
+ // `data.data` is model-supplied JSON (untyped); narrow `service` before use.
126
+ props: ({ data }) => ({ service: typeof data.data?.service === 'string' ? data.data.service : undefined }),
127
+ }),
128
+ Surface.create({
129
+ id: 'triggerStatus',
130
+ filter: Surface.makeFilter(AppSurface.StatusIndicator),
131
+ component: TriggerStatusSurface,
132
+ }),
133
+ ]),
134
+ ),
135
+ );
@@ -26,6 +26,8 @@ import {
26
26
  MemorySkill,
27
27
  PlanningHandlers,
28
28
  PlanningSkill,
29
+ ProjectHandlers,
30
+ ProjectSkill,
29
31
  SkillManagerHandlers,
30
32
  SkillManagerSkill,
31
33
  WebSearchHandlers,
@@ -53,6 +55,7 @@ const skillDefinition = () =>
53
55
  Capability.contributes(AppCapabilities.SkillDefinition, AgentWizardSkill),
54
56
  Capability.contributes(AppCapabilities.SkillDefinition, DelegationSkill),
55
57
  Capability.contributes(AppCapabilities.SkillDefinition, AlarmSkill),
58
+ Capability.contributes(AppCapabilities.SkillDefinition, ProjectSkill),
56
59
 
57
60
  Capability.contributes(Capabilities.OperationHandler, AgentHandlers),
58
61
  Capability.contributes(Capabilities.OperationHandler, AgentSkillHandlers),
@@ -63,6 +66,7 @@ const skillDefinition = () =>
63
66
  Capability.contributes(Capabilities.OperationHandler, DelegationHandlers),
64
67
  Capability.contributes(Capabilities.OperationHandler, PlanningHandlers),
65
68
  Capability.contributes(Capabilities.OperationHandler, AlarmHandlers),
69
+ Capability.contributes(Capabilities.OperationHandler, ProjectHandlers),
66
70
 
67
71
  // Run the conversational agent as a supervisor: delegate in-progress plan tasks to sub-agents
68
72
  // and fold their results back into the conversation (consumed by the AgentService LayerSpec).
@@ -0,0 +1,51 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { afterEach, beforeEach, describe, test } from 'vitest';
6
+
7
+ import { Chat } from '@dxos/assistant-toolkit';
8
+ import { Project } from '@dxos/compute';
9
+ import { Feed, Obj, Ref, Relation } from '@dxos/echo';
10
+ import { EchoTestBuilder } from '@dxos/echo-client/testing';
11
+
12
+ import { standaloneChatsQuery } from './app-graph-builder';
13
+
14
+ describe('standalone chats query', () => {
15
+ let builder: EchoTestBuilder;
16
+
17
+ beforeEach(async () => {
18
+ builder = await new EchoTestBuilder().open();
19
+ });
20
+
21
+ afterEach(async () => {
22
+ await builder.close();
23
+ });
24
+
25
+ test('excludes companion chats and project chats, keeping standalone ones', async ({ expect }) => {
26
+ const { db } = await builder.createDatabase({
27
+ types: [Chat.Chat, Chat.CompanionTo, Project.Project, Feed.Feed],
28
+ });
29
+
30
+ const makeChat = (name: string) => db.add(Chat.make({ name, feed: Ref.make(db.add(Feed.make())) }));
31
+
32
+ const standalone = makeChat('Standalone');
33
+
34
+ // Companion: sources a CompanionTo relation, so it belongs to its primary object's panel.
35
+ const companionSubject = db.add(Project.make({ name: 'Subject' }));
36
+ const companion = makeChat('Companion');
37
+ db.add(Relation.make(Chat.CompanionTo, { [Relation.Source]: companion, [Relation.Target]: companionSubject }));
38
+
39
+ // Project chat: parented to a project, so it is that project's navtree child.
40
+ const project = db.add(Project.make({ name: 'Project' }));
41
+ const projectChat = makeChat('Project chat');
42
+ Obj.setParent(projectChat, project);
43
+
44
+ await db.flush({ indexes: true });
45
+
46
+ const results = await db.query(standaloneChatsQuery).run();
47
+ expect(results.map((chat) => chat.id)).toEqual([standalone.id]);
48
+ expect(results.map((chat) => chat.id)).not.toContain(companion.id);
49
+ expect(results.map((chat) => chat.id)).not.toContain(projectChat.id);
50
+ });
51
+ });
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Atom } from '@effect-atom/atom-react';
5
+ import { Atom } from '@effect-atom/atom';
6
6
  import * as Effect from 'effect/Effect';
7
7
 
8
8
  import { Capability } from '@dxos/app-framework';
@@ -5,14 +5,15 @@
5
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React from 'react';
7
7
 
8
- import { Agent, Plan } from '@dxos/assistant-toolkit';
8
+ import { Agent } from '@dxos/assistant-toolkit';
9
+ import { Instructions } from '@dxos/compute';
9
10
  import { Filter, Obj, Ref } from '@dxos/echo';
10
- import { useQuery } from '@dxos/react-client/echo';
11
+ import { useQuery } from '@dxos/echo-react';
11
12
  import { useClientStory, withClientProvider } from '@dxos/react-client/testing';
12
13
  import { ObjectProperties } from '@dxos/react-ui-form';
13
14
  import { Loading, withLayout, withTheme } from '@dxos/react-ui/testing';
14
15
  import { Text } from '@dxos/schema';
15
- import { Organization } from '@dxos/types';
16
+ import { Organization, Outline } from '@dxos/types';
16
17
 
17
18
  import { translations } from '#translations';
18
19
 
@@ -41,7 +42,7 @@ const meta = {
41
42
  withClientProvider({
42
43
  createIdentity: true,
43
44
  createSpace: true,
44
- types: [Agent.Agent, Plan.Plan, Text.Text, Organization.Organization],
45
+ types: [Agent.Agent, Outline.Outline, Text.Text, Instructions.Instructions, Organization.Organization],
45
46
  onCreateSpace: async ({ space }) => {
46
47
  const organization = space.db.add(
47
48
  Obj.make(Organization.Organization, {
@@ -52,9 +53,7 @@ const meta = {
52
53
 
53
54
  space.db.add(
54
55
  Obj.make(Agent.Agent, {
55
- instructions: Ref.make(Text.make()),
56
- artifacts: [{ name: 'Organization', data: Ref.make(organization) }],
57
- subscriptions: [],
56
+ instructions: Ref.make(Instructions.make({ text: '' })),
58
57
  }),
59
58
  );
60
59
  },