@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
@@ -2,10 +2,19 @@
2
2
  // Copyright 2026 DXOS.org
3
3
  //
4
4
 
5
+ import * as Option from 'effect/Option';
6
+ import * as Schema from 'effect/Schema';
7
+
5
8
  import { AgentRequestBegin, AgentRequestEnd } from '@dxos/assistant';
6
9
  import { Trace } from '@dxos/compute';
7
10
  import { EID } from '@dxos/keys';
8
11
 
12
+ /**
13
+ * Default duration a span may sit open with no new events before it's considered abandoned
14
+ * (the runtime crashed, lost connectivity, or otherwise never wrote the closing event).
15
+ */
16
+ export const DEFAULT_SPAN_TIMEOUT_MS = 20 * 60 * 1_000;
17
+
9
18
  /**
10
19
  * Synthetic id assigned to the root span.
11
20
  * The root is a virtual container for top-level spans (those without a parent in the captured trace).
@@ -93,6 +102,20 @@ export interface BuildSpanTreeOptions {
93
102
  * and collapse them onto the root branch.
94
103
  */
95
104
  eventLimit?: number;
105
+
106
+ /**
107
+ * Duration a span may sit open with no new events before it's force-closed with a synthetic
108
+ * end event. Only takes effect when `now` is also provided. Defaults to
109
+ * `DEFAULT_SPAN_TIMEOUT_MS`.
110
+ */
111
+ spanTimeoutMs?: number;
112
+
113
+ /**
114
+ * Reference time used to detect abandoned spans. Force-closing is skipped entirely when this
115
+ * is omitted, so callers that don't pass it (tests, deterministic snapshots) keep the prior
116
+ * behavior of leaving unterminated spans open regardless of their fixture timestamps.
117
+ */
118
+ now?: number;
96
119
  }
97
120
 
98
121
  /**
@@ -133,6 +156,12 @@ export const buildSpanTree = (messages: readonly Trace.Message[], options: Build
133
156
  // a sibling's released lane instead of forking off its parent.
134
157
  const lastSpanByPid = new Map<string, MutableSpan>();
135
158
 
159
+ // Every span ever opened, including ones later superseded by a same-pid begin event before
160
+ // getting an end event (§15 "interleaved same-pid begin/end pairs"). `openSpans` only tracks
161
+ // the *current* span per pid, so a superseded span — which will never receive an end event —
162
+ // would otherwise be unreachable by the timeout sweep below.
163
+ const allSpans: MutableSpan[] = [];
164
+
136
165
  let spanCounter = 0;
137
166
  const allocSpanId = (pid: string): string => {
138
167
  const id = `${pid}#${spanCounter}`;
@@ -165,6 +194,7 @@ export const buildSpanTree = (messages: readonly Trace.Message[], options: Build
165
194
  span.events.push(event);
166
195
  noteTimestamp(span, event.timestamp);
167
196
  parent.children.push(span);
197
+ allSpans.push(span);
168
198
  // The new span supersedes any previously-open span for this pid.
169
199
  openSpans.set(pid, span);
170
200
  lastSpanByPid.set(pid, span);
@@ -196,6 +226,29 @@ export const buildSpanTree = (messages: readonly Trace.Message[], options: Build
196
226
  }
197
227
  }
198
228
 
229
+ // Force-close spans the runtime never reported the end of (crash, dropped connection, etc.) —
230
+ // otherwise they stay open forever and the UI renders them as stuck mid-flight. Walks every
231
+ // span ever opened (not just `openSpans`) so a span superseded by a later same-pid begin event
232
+ // — which never receives its own end event — is force-closed too. Skipped when `now` isn't
233
+ // supplied so callers that don't care about wall-clock staleness are unaffected.
234
+ if (options.now !== undefined) {
235
+ const now = options.now;
236
+ const spanTimeoutMs = options.spanTimeoutMs ?? DEFAULT_SPAN_TIMEOUT_MS;
237
+ for (const span of allSpans) {
238
+ const lastEvent = span.events[span.events.length - 1]!;
239
+ if (isSpanEndEvent(lastEvent)) {
240
+ continue;
241
+ }
242
+ const timeoutAt = lastEvent.timestamp + spanTimeoutMs;
243
+ if (now < timeoutAt) {
244
+ continue;
245
+ }
246
+ const endEvent = makeTimeoutEndEvent(span, timeoutAt);
247
+ span.events.push(endEvent);
248
+ noteTimestamp(span, endEvent.timestamp);
249
+ }
250
+ }
251
+
199
252
  // Sort children chronologically for deterministic output.
200
253
  const sortChildren = (span: MutableSpan): void => {
201
254
  span.children.sort((a, b) => a.firstTimestamp - b.firstTimestamp);
@@ -208,6 +261,48 @@ export const buildSpanTree = (messages: readonly Trace.Message[], options: Build
208
261
  return freezeSpan(root);
209
262
  };
210
263
 
264
+ /**
265
+ * Message stamped on synthetic end events produced when a span times out.
266
+ */
267
+ const SPAN_TIMEOUT_MESSAGE = 'No end event was recorded for this span; it was closed after a timeout.';
268
+
269
+ /**
270
+ * Synthesizes the end event that closes an abandoned span, matching the event type its begin
271
+ * event opened it with (`OperationStart` → `OperationEnd`, `AgentRequestBegin` → `AgentRequestEnd`).
272
+ */
273
+ const makeTimeoutEndEvent = (span: MutableSpan, timestamp: number): Trace.FlatEvent => {
274
+ const beginEvent = span.events[0]!;
275
+ if (beginEvent.type === AgentRequestBegin.key) {
276
+ return {
277
+ type: AgentRequestEnd.key,
278
+ timestamp,
279
+ meta: beginEvent.meta,
280
+ isEphemeral: false,
281
+ data: { status: 'interrupted', error: SPAN_TIMEOUT_MESSAGE },
282
+ };
283
+ }
284
+
285
+ // `beginEvent.data` is unvalidated wire data; decode defensively rather than trusting its shape.
286
+ const fallback: Schema.Schema.Type<typeof Trace.OperationStart.schema> = { key: 'unknown' };
287
+ const beginData = Option.getOrElse(
288
+ Schema.decodeUnknownOption(Trace.OperationStart.schema)(beginEvent.data),
289
+ () => fallback,
290
+ );
291
+ return {
292
+ type: Trace.OperationEnd.key,
293
+ timestamp,
294
+ meta: beginEvent.meta,
295
+ isEphemeral: false,
296
+ data: {
297
+ key: beginData.key,
298
+ name: beginData.name,
299
+ icon: beginData.icon,
300
+ outcome: 'failure',
301
+ error: SPAN_TIMEOUT_MESSAGE,
302
+ },
303
+ };
304
+ };
305
+
211
306
  /**
212
307
  * Caps the number of non-boundary events while retaining every span boundary event.
213
308
  *
@@ -6,16 +6,16 @@ import * as Effect from 'effect/Effect';
6
6
  import * as Layer from 'effect/Layer';
7
7
 
8
8
  import { type Space, getSpace } from '@dxos/client/echo';
9
+ import { InvocationTraceEndEvent, InvocationTraceEventType, InvocationTraceStartEvent } from '@dxos/compute-runtime';
10
+ import { TraceEvent } from '@dxos/compute-runtime';
11
+ import { InvocationOutcome } from '@dxos/compute-runtime';
9
12
  import { Sequence, type SequenceEvent, type SequenceLogger } from '@dxos/conductor';
10
13
  import { Database, Feed, Obj, Ref } from '@dxos/echo';
11
14
  import { EffectEx } from '@dxos/effect';
12
- import { InvocationTraceEndEvent, InvocationTraceEventType, InvocationTraceStartEvent } from '@dxos/functions-runtime';
13
- import { TraceEvent } from '@dxos/functions-runtime';
14
- import { InvocationOutcome } from '@dxos/functions-runtime';
15
15
  import { invariant } from '@dxos/invariant';
16
16
  import { type EntityId } from '@dxos/keys';
17
17
 
18
- export class QueueLogger implements SequenceLogger {
18
+ export class FeedLogger implements SequenceLogger {
19
19
  private _space: Space;
20
20
  private _invocationTraceFeed: Feed.Feed;
21
21
  private _feedServiceLayer: Layer.Layer<Database.Service>;
@@ -34,11 +34,11 @@ export class QueueLogger implements SequenceLogger {
34
34
  // A feed reference exists; ensure its target is loaded. If not, fail loudly
35
35
  // rather than silently creating a new feed and orphaning existing traces.
36
36
  invariant(existingFeedRef.target, 'invocationTraceFeed reference is not yet loaded');
37
- invariant(Feed.getQueueUri(existingFeedRef.target), 'invocationTraceFeed has no queue DXN');
37
+ invariant(Feed.getFeedUri(existingFeedRef.target), 'invocationTraceFeed has no feed URI');
38
38
  this._invocationTraceFeed = existingFeedRef.target;
39
39
  } else {
40
40
  const feed = space.db.add(Feed.make({ namespace: 'trace' }));
41
- invariant(Feed.getQueueUri(feed), 'New invocationTraceFeed has no queue DXN');
41
+ invariant(Feed.getFeedUri(feed), 'New invocationTraceFeed has no feed URI');
42
42
  Obj.update(this._space.properties, (obj) => {
43
43
  obj.invocationTraceFeed = Ref.make(feed);
44
44
  });
@@ -12,9 +12,9 @@ export * from './useContextBinder';
12
12
  export * from './useContextObjects';
13
13
  export { useDebug } from './useDebug';
14
14
  export * from './useFilteredTypes';
15
- export * from './useFlush';
16
15
  export * from './usePresets';
17
16
  export * from './useReferencesProvider';
17
+ export * from './useSelectionContext';
18
18
  export * from './useTraceMessages';
19
19
  export * from './useHomeSuggestions';
20
20
  export * from './useProcessEphemeralStatus';
@@ -14,9 +14,10 @@ import { AiSession } from '@dxos/assistant';
14
14
  import { type Chat } from '@dxos/assistant-toolkit';
15
15
  import { AgentService, Credential, ServiceResolver } from '@dxos/compute';
16
16
  import { Database, Obj, Ref, Registry } from '@dxos/echo';
17
+ import { useObject } from '@dxos/echo-react';
17
18
  import { EffectEx } from '@dxos/effect';
18
19
  import { log } from '@dxos/log';
19
- import { type Space, useObject } from '@dxos/react-client/echo';
20
+ import { type Space } from '@dxos/react-client/echo';
20
21
  import { useAsyncEffect } from '@dxos/react-ui';
21
22
 
22
23
  import { type Assistant } from '#types';
@@ -33,17 +33,17 @@ export const useChatToolbarActions = ({ chat, companionTo }: ChatToolbarActionsP
33
33
  ? get(db.query(Query.select(Filter.id(companionTo.id)).targetOf(Chat.CompanionTo).source()).atom)
34
34
  : [];
35
35
 
36
- const builder = MenuBuilder.make()
37
- .root({
38
- label: ['chat-toolbar.title', { ns: meta.profile.key }],
39
- })
40
- .action(
36
+ const builder = MenuBuilder.make().root({
37
+ label: ['chat-toolbar.title', { ns: meta.profile.key }],
38
+ });
39
+
40
+ if (companionTo) {
41
+ builder.action(
41
42
  'new',
42
43
  {
43
44
  label: ['new-thread.button', { ns: meta.profile.key }],
44
45
  icon: 'ph--plus--regular',
45
46
  type: 'new',
46
- disabled: !companionTo,
47
47
  },
48
48
  () => {
49
49
  invariant(companionTo);
@@ -52,33 +52,36 @@ export const useChatToolbarActions = ({ chat, companionTo }: ChatToolbarActionsP
52
52
  chat: undefined,
53
53
  }).pipe(EffectEx.runAndForwardErrors);
54
54
  },
55
- )
55
+ );
56
+ }
57
+
58
+ builder
56
59
  .action(
57
- 'rename',
60
+ 'branch',
58
61
  {
59
- label: ['rename-thread.button', { ns: meta.profile.key }],
60
- icon: 'ph--magic-wand--regular',
61
- type: 'rename',
62
- disabled: !chat,
62
+ label: ['branch-thread.menu', { ns: meta.profile.key }],
63
+ icon: 'ph--git-branch--regular',
64
+ type: 'branch',
65
+ disabled: !chat || !db,
63
66
  },
64
67
  () =>
65
68
  Effect.gen(function* () {
66
69
  invariant(chat);
67
- yield* invoke(AssistantOperation.UpdateChatName, { chat }, { spaceId: db?.spaceId });
70
+ yield* invoke(AssistantOperation.ForkChat, { chat, companionTo }, { spaceId: db?.spaceId });
68
71
  }).pipe(EffectEx.runAndForwardErrors),
69
72
  )
70
73
  .action(
71
- 'branch',
74
+ 'rename',
72
75
  {
73
- label: ['branch-thread.menu', { ns: meta.profile.key }],
74
- icon: 'ph--git-branch--regular',
75
- type: 'branch',
76
- disabled: !chat || !db,
76
+ label: ['rename-thread.button', { ns: meta.profile.key }],
77
+ icon: 'ph--magic-wand--regular',
78
+ type: 'rename',
79
+ disabled: !chat,
77
80
  },
78
81
  () =>
79
82
  Effect.gen(function* () {
80
83
  invariant(chat);
81
- yield* invoke(AssistantOperation.ForkChat, { chat, companionTo }, { spaceId: db?.spaceId });
84
+ yield* invoke(AssistantOperation.UpdateChatName, { chat }, { spaceId: db?.spaceId });
82
85
  }).pipe(EffectEx.runAndForwardErrors),
83
86
  );
84
87
 
@@ -3,10 +3,11 @@
3
3
  //
4
4
 
5
5
  import { Atom, useAtomValue } from '@effect-atom/atom-react';
6
- import { useCallback } from 'react';
6
+ import { useCallback, useMemo } from 'react';
7
7
 
8
8
  import { type AiContext } from '@dxos/assistant';
9
- import { type Database, type Obj } from '@dxos/echo';
9
+ import { Chat } from '@dxos/assistant-toolkit';
10
+ import { type Database, Obj } from '@dxos/echo';
10
11
  import { type URI } from '@dxos/keys';
11
12
 
12
13
  export type UseContextObjectsProps = {
@@ -25,7 +26,12 @@ const emptyObjectsAtom = Atom.make<Obj.Unknown[]>([]);
25
26
  * Create reactive map of active object references (by DXN string).
26
27
  */
27
28
  export const useContextObjects = ({ db, context }: UseContextObjectsProps): UseContextObjects => {
28
- const objects = useAtomValue(context?.objects ?? emptyObjectsAtom);
29
+ const boundObjects = useAtomValue(context?.objects ?? emptyObjectsAtom);
30
+ // The session's own chat is bound into its context so the agent harness can resolve it
31
+ // (`get-context` requires a bound chat to read the plan when no agent is present); it is not a
32
+ // user-added reference, so exclude it from the UI. Mirrors the `!Obj.instanceOf(Chat.Chat, …)`
33
+ // filter applied when copying context objects in `assistant-toolkit` `Agent`.
34
+ const objects = useMemo(() => boundObjects.filter((object) => !Obj.instanceOf(Chat.Chat, object)), [boundObjects]);
29
35
 
30
36
  const handleUpdateObject = useCallback<UseContextObjects['onUpdateObject']>(
31
37
  async (dxn: URI.URI, checked: boolean) => {
@@ -0,0 +1,93 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { describe, test } from 'vitest';
6
+
7
+ import { Obj } from '@dxos/echo';
8
+ import { Expando } from '@dxos/schema';
9
+
10
+ import { getSelectionContext } from './useSelectionContext';
11
+
12
+ describe('getSelectionContext', () => {
13
+ const object = Obj.make(Expando.Expando, { content: 'hello brave world' });
14
+ const typename = Obj.getTypename(object);
15
+ const resolver = {
16
+ key: typename ?? '',
17
+ getText: (_obj: unknown, anchor: string) => (anchor === 'a:b' ? 'brave' : undefined),
18
+ };
19
+
20
+ test('resolves selection ranges to text via the typename resolver', ({ expect }) => {
21
+ const context = getSelectionContext({
22
+ object,
23
+ selection: { mode: 'multi-range', ranges: [{ from: 'a', to: 'b' }] },
24
+ resolvers: [resolver],
25
+ });
26
+ expect(context?.selection?.text).toBe('brave');
27
+ expect(context?.selection?.anchors).toEqual(['a:b']);
28
+ });
29
+
30
+ test('returns undefined without a matching resolver', ({ expect }) => {
31
+ const context = getSelectionContext({
32
+ object,
33
+ selection: { mode: 'multi-range', ranges: [{ from: 'a', to: 'b' }] },
34
+ resolvers: [],
35
+ });
36
+ expect(context).toBeUndefined();
37
+ });
38
+
39
+ test('returns undefined when nothing resolves', ({ expect }) => {
40
+ const context = getSelectionContext({
41
+ object,
42
+ selection: { mode: 'multi-range', ranges: [{ from: 'x', to: 'y' }] },
43
+ resolvers: [resolver],
44
+ });
45
+ expect(context).toBeUndefined();
46
+ });
47
+
48
+ test('returns undefined for an empty selection', ({ expect }) => {
49
+ expect(getSelectionContext({ object, selection: undefined, resolvers: [resolver] })).toBeUndefined();
50
+ });
51
+
52
+ test('skips a range whose cursor throws and keeps the ranges that resolve', ({ expect }) => {
53
+ const throwingResolver = {
54
+ key: typename ?? '',
55
+ getText: (_obj: unknown, anchor: string) => {
56
+ if (anchor === 'stale:cursor') {
57
+ throw new Error('unparseable cursor');
58
+ }
59
+ return anchor === 'a:b' ? 'brave' : undefined;
60
+ },
61
+ };
62
+
63
+ const context = getSelectionContext({
64
+ object,
65
+ selection: {
66
+ mode: 'multi-range',
67
+ ranges: [
68
+ { from: 'stale', to: 'cursor' },
69
+ { from: 'a', to: 'b' },
70
+ ],
71
+ },
72
+ resolvers: [throwingResolver],
73
+ });
74
+ expect(context?.selection?.text).toBe('brave');
75
+ expect(context?.selection?.anchors).toEqual(['a:b']);
76
+ });
77
+
78
+ test('drops an unresolvable range from anchors so anchors stay aligned with text', ({ expect }) => {
79
+ const context = getSelectionContext({
80
+ object,
81
+ selection: {
82
+ mode: 'multi-range',
83
+ ranges: [
84
+ { from: 'x', to: 'y' },
85
+ { from: 'a', to: 'b' },
86
+ ],
87
+ },
88
+ resolvers: [resolver],
89
+ });
90
+ expect(context?.selection?.text).toBe('brave');
91
+ expect(context?.selection?.anchors).toEqual(['a:b']);
92
+ });
93
+ });
@@ -0,0 +1,72 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { useCallback } from 'react';
6
+
7
+ import { useCapabilities } from '@dxos/app-framework/ui';
8
+ import { AppCapabilities } from '@dxos/app-toolkit';
9
+ import { Obj } from '@dxos/echo';
10
+ import { AttentionCapabilities } from '@dxos/plugin-attention';
11
+ import { Selection } from '@dxos/react-ui-attention';
12
+
13
+ import { type ProcessorRequestContext } from '../processor';
14
+
15
+ /** Resolve `object`'s selection to text via the AnchorResolver contributed for its typename. */
16
+ export const getSelectionContext = ({
17
+ object,
18
+ selection,
19
+ resolvers,
20
+ }: {
21
+ object: Obj.Unknown;
22
+ selection: Selection.Selection | undefined;
23
+ resolvers: readonly AppCapabilities.AnchorResolver[];
24
+ }): ProcessorRequestContext | undefined => {
25
+ const typename = Obj.getTypename(object);
26
+ const resolver = typename ? resolvers.find((candidate) => candidate.key === typename) : undefined;
27
+ if (!resolver) {
28
+ return undefined;
29
+ }
30
+
31
+ // A stale cursor throws in Automerge; a bad range must not abort the submit.
32
+ const resolveAnchorText = (anchor: string): string | undefined => {
33
+ try {
34
+ return resolver.getText(object, anchor);
35
+ } catch {
36
+ return undefined;
37
+ }
38
+ };
39
+
40
+ // Anchors and text stay pairwise-aligned: a range that fails to resolve is dropped from both.
41
+ const resolved = Selection.toAnchors(selection).flatMap((anchor) => {
42
+ const text = resolveAnchorText(anchor);
43
+ return text != null && text.length > 0 ? [{ anchor, text }] : [];
44
+ });
45
+ if (resolved.length === 0) {
46
+ return undefined;
47
+ }
48
+
49
+ return {
50
+ selection: {
51
+ anchors: resolved.map(({ anchor }) => anchor),
52
+ text: resolved.map(({ text }) => text).join('\n…\n'),
53
+ },
54
+ };
55
+ };
56
+
57
+ /** Submit-time provider of the companion object's current selection as request context. */
58
+ export const useSelectionContext = (
59
+ companionTo: Obj.Unknown | undefined,
60
+ ): (() => ProcessorRequestContext | undefined) => {
61
+ // getAll-style lookup: absent capabilities yield empty arrays so non-companion chats stay inert.
62
+ const [viewState] = useCapabilities(AttentionCapabilities.ViewState);
63
+ const resolvers = useCapabilities(AppCapabilities.AnchorResolver);
64
+
65
+ return useCallback(() => {
66
+ if (!companionTo || !viewState) {
67
+ return undefined;
68
+ }
69
+ const selection = viewState.get(Selection.aspect, Obj.getURI(companionTo));
70
+ return getSelectionContext({ object: companionTo, selection, resolvers });
71
+ }, [companionTo, viewState, resolvers]);
72
+ };
@@ -7,7 +7,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
7
7
  import { type AiContext } from '@dxos/assistant';
8
8
  import { Skill } from '@dxos/compute';
9
9
  import { type Database, Filter, Obj, Ref, type Registry } from '@dxos/echo';
10
- import { useQuery } from '@dxos/react-client/echo';
10
+ import { useQuery } from '@dxos/echo-react';
11
11
  import { distinctBy } from '@dxos/util';
12
12
 
13
13
  export const useSkills = ({ registry, db }: { registry?: Registry.Registry; db?: Database.Database }) => {
@@ -8,8 +8,8 @@ import { pipe } from 'effect/Function';
8
8
  import { useMemo } from 'react';
9
9
 
10
10
  import { Trace } from '@dxos/compute';
11
+ import { FeedTraceSink } from '@dxos/compute-runtime';
11
12
  import { Filter, Query } from '@dxos/echo';
12
- import { FeedTraceSink } from '@dxos/functions-runtime';
13
13
  import { type Space } from '@dxos/react-client/echo';
14
14
 
15
15
  const atomEmpty = Atom.make(() => [] as const);
@@ -22,10 +22,12 @@ export const getTraceMessagesAtom = (space: Space): Atom.Atom<readonly Trace.Mes
22
22
  space.db.query(FeedTraceSink.query).atom,
23
23
  Atom.map(
24
24
  (feeds) =>
25
- // TODO(dmaretskyi): Single query with limit(1) and feed traversal when query supports it.
25
+ // Query across ALL trace feeds: writers race on feed creation (the edge's indexer-backed
26
+ // lookup can miss a not-yet-indexed feed and create a duplicate), so a space may hold
27
+ // several trace feeds — reading only one would silently drop the others' events.
26
28
  space.db.query(
27
29
  feeds.length > 0
28
- ? Query.type(Trace.Message).from(feeds[0])
30
+ ? Query.type(Trace.Message).from([...feeds])
29
31
  : (Query.select(Filter.nothing()) as Query.Query<never>),
30
32
  ).atom,
31
33
  ),
@@ -17,13 +17,13 @@ import { AssistantOperation } from '#types';
17
17
 
18
18
  const handler: Operation.WithHandler<typeof AssistantOperation.CreateChat> = AssistantOperation.CreateChat.pipe(
19
19
  Operation.withHandler(
20
- Effect.fnUntraced(function* ({ db, name, addToSpace = true }) {
20
+ Effect.fnUntraced(function* ({ db, name, instructions, addToSpace = true }) {
21
21
  const registry = yield* Capability.get(Capabilities.AtomRegistry);
22
22
  const client = yield* Capability.get(ClientCapabilities.Client);
23
23
  const space = client.spaces.get(db.spaceId);
24
24
  invariant(space, 'Space not found');
25
25
  const feed = space.db.add(Feed.make());
26
- const chat = Chat.make({ name, feed: Ref.make(feed) });
26
+ const chat = Chat.make({ name, feed: Ref.make(feed), instructions });
27
27
  Obj.setParent(feed, chat);
28
28
  if (addToSpace) {
29
29
  space.db.add(chat);
@@ -5,7 +5,7 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities, Capability } from '@dxos/app-framework';
8
- import { LayoutOperation, Paths } from '@dxos/app-toolkit';
8
+ import { GraphPath, LayoutOperation } from '@dxos/app-toolkit';
9
9
  import { AiContext, SessionLink } from '@dxos/assistant';
10
10
  import { Chat } from '@dxos/assistant-toolkit';
11
11
  import { Operation } from '@dxos/compute';
@@ -95,7 +95,7 @@ const handler: Operation.WithHandler<typeof AssistantOperation.ForkChat> = Assis
95
95
  );
96
96
  } else {
97
97
  // Navigate to the forked chat as a standalone plank.
98
- const chatPath = Paths.getObjectPathFromObject(newChat);
98
+ const chatPath = GraphPath.getObjectPathFromObject(newChat);
99
99
  yield* Operation.invoke(LayoutOperation.Open, { subject: [chatPath] });
100
100
  }
101
101
 
@@ -2,16 +2,16 @@
2
2
  // Copyright 2026 DXOS.org
3
3
  //
4
4
 
5
- import { Atom, Registry } from '@effect-atom/atom-react';
5
+ import { Atom, Registry } from '@effect-atom/atom';
6
6
  import { describe, expect, it } from '@effect/vitest';
7
7
  import * as Effect from 'effect/Effect';
8
8
  import * as Layer from 'effect/Layer';
9
9
 
10
+ import { AssistantTestLayer } from '@dxos/agent-runtime/testing';
10
11
  import { Capabilities, Capability, CapabilityManager } from '@dxos/app-framework';
11
12
  import { Operation } from '@dxos/compute';
12
13
  import { Database } from '@dxos/echo';
13
14
  import { TestHelpers } from '@dxos/effect/testing';
14
- import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
15
15
  import { EntityId } from '@dxos/keys';
16
16
 
17
17
  import { AssistantCapabilities, AssistantOperation } from '#types';
@@ -9,7 +9,6 @@ export const AssistantOperationHandlerSet = OperationHandlerSet.lazy(
9
9
  () => import('./ensure-companion-chat'),
10
10
  () => import('./fork-chat'),
11
11
  () => import('./generate-home-suggestions'),
12
- () => import('./resolve-navigation-targets'),
13
12
  () => import('./run-prompt-in-new-chat'),
14
13
  () => import('./set-current-chat'),
15
14
  () => import('./toggle-trace-panel-debug'),
@@ -27,7 +27,7 @@ describe('Agent prompt (composer plugin harness)', () => {
27
27
  // Requires reachable edge AI (see repo DX_EDGE_AI_SERVICE_URL); not memoized like AssistantTestLayer tests.
28
28
  test(
29
29
  'chat mode appends assistant messages to the chat queue',
30
- { tags: ['llm'], timeout: 60_000 },
30
+ { tags: ['manual'], timeout: 60_000 },
31
31
  async ({ expect }) => {
32
32
  await using harness = await createComposerTestApp({
33
33
  plugins: [ClientPlugin({}), AssistantPlugin(), RoutinePlugin()],
package/src/paths.ts CHANGED
@@ -2,11 +2,11 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Paths } from '@dxos/app-toolkit';
5
+ import { GraphPath } from '@dxos/app-toolkit';
6
6
  import { Chat } from '@dxos/assistant-toolkit';
7
7
 
8
- const { getSectionPath: getChatsPath, getObjectPath: getChatPath } = Paths.createTypeSectionPaths(Chat.Chat, {
9
- groupId: Paths.GroupSegments.ai,
8
+ const { getSectionPath: getChatsPath, getObjectPath: getChatPath } = GraphPath.createTypeSectionPaths(Chat.Chat, {
9
+ groupId: GraphPath.GroupSegments.ai,
10
10
  });
11
11
 
12
12
  export { getChatPath, getChatsPath };
@@ -4,3 +4,4 @@
4
4
 
5
5
  export * from './presets';
6
6
  export * from './processor';
7
+ export * from './prompt';
@@ -10,6 +10,7 @@ import * as ManagedRuntime from 'effect/ManagedRuntime';
10
10
  import * as Option from 'effect/Option';
11
11
  import { test } from 'vitest';
12
12
 
13
+ import { AssistantTestLayer } from '@dxos/agent-runtime/testing';
13
14
  import { Capabilities } from '@dxos/app-framework';
14
15
  import { AiSession } from '@dxos/assistant';
15
16
  import { Chat } from '@dxos/assistant-toolkit';
@@ -17,7 +18,6 @@ import { Database, Feed } from '@dxos/echo';
17
18
  import { UsageQuotaExceededError } from '@dxos/edge-client';
18
19
  import { EffectEx } from '@dxos/effect';
19
20
  import { TestHelpers } from '@dxos/effect/testing';
20
- import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
21
21
 
22
22
  import { AiChatProcessor, AiUsageQuotaError, parseError } from './processor';
23
23