@dxos/plugin-assistant 0.12.0-next-73daef452f1464b62efdbca75fb0067c1066f264 → 0.14.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 (795) hide show
  1. package/PLUGIN.mdl +127 -11
  2. package/dist/lib/Assistant.mjs.map +1 -1
  3. package/dist/lib/AssistantCapabilities.mjs +13 -2
  4. package/dist/lib/AssistantCapabilities.mjs.map +1 -1
  5. package/dist/lib/AssistantOperation.mjs +112 -11
  6. package/dist/lib/AssistantOperation.mjs.map +1 -1
  7. package/dist/lib/AssistantOptions.mjs.map +1 -1
  8. package/dist/lib/AssistantService.mjs +2 -2
  9. package/dist/lib/AssistantService.mjs.map +1 -1
  10. package/dist/lib/AssistantSkill.mjs.map +1 -1
  11. package/dist/lib/Chat.mjs +3 -0
  12. package/dist/lib/Ollama.mjs +1 -1
  13. package/dist/lib/Ollama.mjs.map +1 -1
  14. package/dist/lib/PluginManagerSkill.mjs +95 -0
  15. package/dist/lib/PluginManagerSkill.mjs.map +1 -0
  16. package/dist/lib/Settings.mjs +14 -2
  17. package/dist/lib/Settings.mjs.map +1 -1
  18. package/dist/lib/TracePanel.mjs +87 -0
  19. package/dist/lib/TracePanel.mjs.map +1 -0
  20. package/dist/lib/TurnReviewSkill.mjs +55 -0
  21. package/dist/lib/TurnReviewSkill.mjs.map +1 -0
  22. package/dist/lib/capabilities.browser.mjs +140 -0
  23. package/dist/lib/capabilities.browser.mjs.map +1 -0
  24. package/dist/lib/capabilities.mjs +39 -10
  25. package/dist/lib/capabilities.mjs.map +1 -1
  26. package/dist/lib/capabilities.node.mjs +36 -18
  27. package/dist/lib/capabilities.node.mjs.map +1 -1
  28. package/dist/lib/capabilities.tauri.mjs +140 -0
  29. package/dist/lib/capabilities.tauri.mjs.map +1 -0
  30. package/dist/lib/capabilities.workerd.mjs +13 -16
  31. package/dist/lib/capabilities.workerd.mjs.map +1 -1
  32. package/dist/lib/chunk-AgentArticle.mjs +13 -10
  33. package/dist/lib/chunk-AgentArticle.mjs.map +1 -1
  34. package/dist/lib/chunk-AgentProperties.mjs +4 -4
  35. package/dist/lib/chunk-AgentProperties.mjs.map +1 -1
  36. package/dist/lib/chunk-AssistantSettings.mjs +53 -54
  37. package/dist/lib/chunk-AssistantSettings.mjs.map +1 -1
  38. package/dist/lib/chunk-Chat.mjs +2175 -0
  39. package/dist/lib/chunk-Chat.mjs.map +1 -0
  40. package/dist/lib/chunk-ChatArticle.mjs +54 -40
  41. package/dist/lib/chunk-ChatArticle.mjs.map +1 -1
  42. package/dist/lib/chunk-ChatCompanion.mjs +3 -3
  43. package/dist/lib/chunk-ChatCompanion.mjs.map +1 -1
  44. package/dist/lib/chunk-ChatDialog.mjs +13 -15
  45. package/dist/lib/chunk-ChatDialog.mjs.map +1 -1
  46. package/dist/lib/chunk-IntegrationPrompt.mjs +65 -20
  47. package/dist/lib/chunk-IntegrationPrompt.mjs.map +1 -1
  48. package/dist/lib/chunk-ObjectCardSurface.mjs +29 -0
  49. package/dist/lib/chunk-ObjectCardSurface.mjs.map +1 -0
  50. package/dist/lib/chunk-PLUGIN.mjs +6 -0
  51. package/dist/lib/chunk-PLUGIN.mjs.map +1 -0
  52. package/dist/lib/chunk-PluginPrompt.mjs +32 -46
  53. package/dist/lib/chunk-PluginPrompt.mjs.map +1 -1
  54. package/dist/lib/chunk-PluginUrlPrompt.mjs +100 -0
  55. package/dist/lib/chunk-PluginUrlPrompt.mjs.map +1 -0
  56. package/dist/lib/chunk-QuestionSurface.mjs +142 -0
  57. package/dist/lib/chunk-QuestionSurface.mjs.map +1 -0
  58. package/dist/lib/chunk-SpaceHomePrompt.mjs +121 -68
  59. package/dist/lib/chunk-SpaceHomePrompt.mjs.map +1 -1
  60. package/dist/lib/chunk-SpaceHomeSuggestions.mjs +12 -11
  61. package/dist/lib/chunk-SpaceHomeSuggestions.mjs.map +1 -1
  62. package/dist/lib/chunk-TracePanel.mjs +4 -234
  63. package/dist/lib/chunk-TracePanel.mjs.map +1 -1
  64. package/dist/lib/chunk-TriggerStatus.mjs +29 -26
  65. package/dist/lib/chunk-TriggerStatus.mjs.map +1 -1
  66. package/dist/lib/chunk-agent-hydrator.mjs +1 -1
  67. package/dist/lib/chunk-agent-service.mjs +11 -8
  68. package/dist/lib/chunk-agent-service.mjs.map +1 -1
  69. package/dist/lib/chunk-agents.mjs +22 -0
  70. package/dist/lib/chunk-agents.mjs.map +1 -0
  71. package/dist/lib/chunk-ai-context.mjs +1 -1
  72. package/dist/lib/chunk-ai-service.mjs +3 -3
  73. package/dist/lib/chunk-ai-service.mjs.map +1 -1
  74. package/dist/lib/chunk-analyze-turn.mjs +220 -0
  75. package/dist/lib/chunk-analyze-turn.mjs.map +1 -0
  76. package/dist/lib/chunk-answer-question.mjs +67 -0
  77. package/dist/lib/chunk-answer-question.mjs.map +1 -0
  78. package/dist/lib/chunk-app-graph-builder.mjs +30 -13
  79. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
  80. package/dist/lib/chunk-automation-templates.mjs +4 -4
  81. package/dist/lib/chunk-automation-templates.mjs.map +1 -1
  82. package/dist/lib/chunk-bind-chat-context.mjs +4 -4
  83. package/dist/lib/chunk-chat-model.mjs +1022 -0
  84. package/dist/lib/chunk-chat-model.mjs.map +1 -0
  85. package/dist/lib/chunk-companion-chat-provisioner.mjs +51 -22
  86. package/dist/lib/chunk-companion-chat-provisioner.mjs.map +1 -1
  87. package/dist/lib/chunk-connector.mjs +51 -22
  88. package/dist/lib/chunk-connector.mjs.map +1 -1
  89. package/dist/lib/chunk-constants.mjs +5 -1
  90. package/dist/lib/chunk-constants.mjs.map +1 -1
  91. package/dist/lib/chunk-context.mjs +4 -2
  92. package/dist/lib/chunk-context.mjs.map +1 -1
  93. package/dist/lib/chunk-create-chat.mjs +8 -19
  94. package/dist/lib/chunk-create-chat.mjs.map +1 -1
  95. package/dist/lib/chunk-create-object.mjs +6 -4
  96. package/dist/lib/chunk-create-object.mjs.map +1 -1
  97. package/dist/lib/chunk-default-skills.mjs +28 -0
  98. package/dist/lib/chunk-default-skills.mjs.map +1 -0
  99. package/dist/lib/chunk-edge-model-resolver.mjs +19 -9
  100. package/dist/lib/chunk-edge-model-resolver.mjs.map +1 -1
  101. package/dist/lib/chunk-ensure-companion-chat.mjs +9 -2
  102. package/dist/lib/chunk-ensure-companion-chat.mjs.map +1 -1
  103. package/dist/lib/chunk-extensions.mjs +2 -2
  104. package/dist/lib/chunk-extensions.mjs.map +1 -1
  105. package/dist/lib/chunk-fork-chat.mjs +5 -5
  106. package/dist/lib/chunk-fork-chat.mjs.map +1 -1
  107. package/dist/lib/chunk-generate-home-suggestions.mjs +34 -25
  108. package/dist/lib/chunk-generate-home-suggestions.mjs.map +1 -1
  109. package/dist/lib/chunk-local-model-resolver.mjs +2 -2
  110. package/dist/lib/chunk-local-model-resolver.mjs.map +1 -1
  111. package/dist/lib/chunk-markdown-extension.mjs +1 -1
  112. package/dist/lib/chunk-markdown-extension.mjs.map +1 -1
  113. package/dist/lib/chunk-operation-handler.mjs +17 -11
  114. package/dist/lib/chunk-operation-handler.mjs.map +1 -1
  115. package/dist/lib/chunk-paths.mjs +2 -2
  116. package/dist/lib/chunk-paths.mjs.map +1 -1
  117. package/dist/lib/chunk-presets.mjs +60 -0
  118. package/dist/lib/chunk-presets.mjs.map +1 -0
  119. package/dist/lib/chunk-question-resumer.mjs +54 -0
  120. package/dist/lib/chunk-question-resumer.mjs.map +1 -0
  121. package/dist/lib/chunk-react-surface.mjs +54 -20
  122. package/dist/lib/chunk-react-surface.mjs.map +1 -1
  123. package/dist/lib/chunk-respond-to-request.mjs +26 -0
  124. package/dist/lib/chunk-respond-to-request.mjs.map +1 -0
  125. package/dist/lib/chunk-resume-prompt.mjs +18 -0
  126. package/dist/lib/chunk-resume-prompt.mjs.map +1 -0
  127. package/dist/lib/chunk-rolldown-runtime.mjs +15 -1
  128. package/dist/lib/chunk-run-prompt-in-chat.mjs +74 -0
  129. package/dist/lib/chunk-run-prompt-in-chat.mjs.map +1 -0
  130. package/dist/lib/chunk-run-prompt-in-new-chat.mjs +8 -8
  131. package/dist/lib/chunk-run-prompt-in-new-chat.mjs.map +1 -1
  132. package/dist/lib/chunk-schema-defs.mjs +10 -5
  133. package/dist/lib/chunk-schema-defs.mjs.map +1 -1
  134. package/dist/lib/chunk-set-current-chat.mjs +1 -1
  135. package/dist/lib/chunk-set-trace-panel-debug.mjs +1 -1
  136. package/dist/lib/chunk-settings.mjs +2 -2
  137. package/dist/lib/chunk-settings.mjs.map +1 -1
  138. package/dist/lib/chunk-skill-definition.mjs +16 -6
  139. package/dist/lib/chunk-skill-definition.mjs.map +1 -1
  140. package/dist/lib/chunk-state.mjs +5 -5
  141. package/dist/lib/chunk-state.mjs.map +1 -1
  142. package/dist/lib/chunk-subject-context.mjs +1 -1
  143. package/dist/lib/chunk-toolkit.mjs +2 -2
  144. package/dist/lib/chunk-toolkit.mjs.map +1 -1
  145. package/dist/lib/chunk-turn-producers.mjs +36 -0
  146. package/dist/lib/chunk-turn-producers.mjs.map +1 -0
  147. package/dist/lib/chunk-update-chat-name.mjs +5 -5
  148. package/dist/lib/chunk-update-chat-name.mjs.map +1 -1
  149. package/dist/lib/components.mjs +65 -1810
  150. package/dist/lib/components.mjs.map +1 -1
  151. package/dist/lib/containers.mjs +5 -2
  152. package/dist/lib/containers.mjs.map +1 -1
  153. package/dist/lib/hooks.mjs +369 -147
  154. package/dist/lib/hooks.mjs.map +1 -1
  155. package/dist/lib/index.mjs +6 -3
  156. package/dist/lib/meta.mjs +1 -1
  157. package/dist/lib/meta.mjs.map +1 -1
  158. package/dist/lib/ns/Chat.mjs +21 -0
  159. package/dist/lib/ns/Chat.mjs.map +1 -0
  160. package/dist/lib/ns/Extensions.mjs +8 -0
  161. package/dist/lib/ns/Extensions.mjs.map +1 -0
  162. package/dist/lib/ns/Hooks.mjs +10 -0
  163. package/dist/lib/ns/Hooks.mjs.map +1 -0
  164. package/dist/lib/ns/TracePanel.mjs +8 -0
  165. package/dist/lib/ns/TracePanel.mjs.map +1 -0
  166. package/dist/lib/operations.mjs +6 -1
  167. package/dist/lib/operations.mjs.map +1 -1
  168. package/dist/lib/plugin.mjs +2 -2
  169. package/dist/lib/plugin.mjs.map +1 -1
  170. package/dist/lib/skills.mjs +3 -86
  171. package/dist/lib/testing.mjs +125 -0
  172. package/dist/lib/testing.mjs.map +1 -0
  173. package/dist/lib/translations.mjs +54 -25
  174. package/dist/lib/translations.mjs.map +1 -1
  175. package/dist/types/src/AssistantPlugin.workerd.test.d.ts +2 -0
  176. package/dist/types/src/AssistantPlugin.workerd.test.d.ts.map +1 -0
  177. package/dist/types/src/Chat.d.ts +23 -0
  178. package/dist/types/src/Chat.d.ts.map +1 -0
  179. package/dist/types/src/Extensions.d.ts +2 -0
  180. package/dist/types/src/Extensions.d.ts.map +1 -0
  181. package/dist/types/src/Hooks.d.ts +2 -0
  182. package/dist/types/src/Hooks.d.ts.map +1 -0
  183. package/dist/types/src/TracePanel.d.ts +3 -0
  184. package/dist/types/src/TracePanel.d.ts.map +1 -0
  185. package/dist/types/src/capabilities/AssistantSurfaces.d.ts.map +1 -1
  186. package/dist/types/src/capabilities/agent-service.d.ts +2 -1
  187. package/dist/types/src/capabilities/agent-service.d.ts.map +1 -1
  188. package/dist/types/src/capabilities/agents.d.ts +7 -0
  189. package/dist/types/src/capabilities/agents.d.ts.map +1 -0
  190. package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -1
  191. package/dist/types/src/capabilities/connector.d.ts.map +1 -1
  192. package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
  193. package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
  194. package/dist/types/src/capabilities/gen/browser.d.ts +26 -0
  195. package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -0
  196. package/dist/types/src/capabilities/gen/node.d.ts +6 -4
  197. package/dist/types/src/capabilities/gen/node.d.ts.map +1 -1
  198. package/dist/types/src/capabilities/gen/tauri.d.ts +26 -0
  199. package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -0
  200. package/dist/types/src/capabilities/gen/workerd.d.ts +5 -3
  201. package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -1
  202. package/dist/types/src/capabilities/index.d.ts +5 -3
  203. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  204. package/dist/types/src/capabilities/question-resumer.d.ts +13 -0
  205. package/dist/types/src/capabilities/question-resumer.d.ts.map +1 -0
  206. package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -1
  207. package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -1
  208. package/dist/types/src/capabilities/turn-producers.d.ts +10 -0
  209. package/dist/types/src/capabilities/turn-producers.d.ts.map +1 -0
  210. package/dist/types/src/chat-model/chat-model.d.ts +227 -0
  211. package/dist/types/src/chat-model/chat-model.d.ts.map +1 -0
  212. package/dist/types/src/chat-model/chat-model.edge.test.d.ts +2 -0
  213. package/dist/types/src/chat-model/chat-model.edge.test.d.ts.map +1 -0
  214. package/dist/types/src/chat-model/chat-model.node.test.d.ts +2 -0
  215. package/dist/types/src/chat-model/chat-model.node.test.d.ts.map +1 -0
  216. package/dist/types/src/chat-model/chat-model.scripted.node.test.d.ts +2 -0
  217. package/dist/types/src/chat-model/chat-model.scripted.node.test.d.ts.map +1 -0
  218. package/dist/types/src/chat-model/index.d.ts +6 -0
  219. package/dist/types/src/chat-model/index.d.ts.map +1 -0
  220. package/dist/types/src/chat-model/outbox.d.ts +76 -0
  221. package/dist/types/src/chat-model/outbox.d.ts.map +1 -0
  222. package/dist/types/src/chat-model/outbox.test.d.ts +2 -0
  223. package/dist/types/src/chat-model/outbox.test.d.ts.map +1 -0
  224. package/dist/types/src/chat-model/presets.d.ts +58 -0
  225. package/dist/types/src/chat-model/presets.d.ts.map +1 -0
  226. package/dist/types/src/chat-model/presets.test.d.ts +2 -0
  227. package/dist/types/src/chat-model/presets.test.d.ts.map +1 -0
  228. package/dist/types/src/{processor → chat-model}/prompt.d.ts +5 -2
  229. package/dist/types/src/chat-model/prompt.d.ts.map +1 -0
  230. package/dist/types/src/chat-model/prompt.test.d.ts.map +1 -0
  231. package/dist/types/src/chat-model/streaming.node.test.d.ts.map +1 -0
  232. package/dist/types/src/chat-model/testing/chat-model-recorder.d.ts +58 -0
  233. package/dist/types/src/chat-model/testing/chat-model-recorder.d.ts.map +1 -0
  234. package/dist/types/src/chat-model/testing/harness.d.ts +22 -0
  235. package/dist/types/src/chat-model/testing/harness.d.ts.map +1 -0
  236. package/dist/types/src/chat-model/thread.d.ts +99 -0
  237. package/dist/types/src/chat-model/thread.d.ts.map +1 -0
  238. package/dist/types/src/chat-model/thread.test.d.ts.map +1 -0
  239. package/dist/types/src/commands/index.d.ts +1 -1
  240. package/dist/types/src/commands/index.d.ts.map +1 -1
  241. package/dist/types/src/commands/task-commands.d.ts +3 -7
  242. package/dist/types/src/commands/task-commands.d.ts.map +1 -1
  243. package/dist/types/src/commands/task-commands.test.d.ts +2 -0
  244. package/dist/types/src/commands/task-commands.test.d.ts.map +1 -0
  245. package/dist/types/src/components/AgentProperties/AgentProperties.d.ts +1 -1
  246. package/dist/types/src/components/AgentProperties/AgentProperties.d.ts.map +1 -1
  247. package/dist/types/src/components/AgentProperties/index.d.ts +1 -1
  248. package/dist/types/src/components/AgentProperties/index.d.ts.map +1 -1
  249. package/dist/types/src/components/Chat/Chat.d.ts +43 -21
  250. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
  251. package/dist/types/src/components/Chat/Error.stories.d.ts.map +1 -1
  252. package/dist/types/src/components/Chat/ObjectCardWidget.d.ts +23 -0
  253. package/dist/types/src/components/Chat/ObjectCardWidget.d.ts.map +1 -0
  254. package/dist/types/src/components/Chat/SurfaceWidget.d.ts +2 -2
  255. package/dist/types/src/components/Chat/SurfaceWidget.d.ts.map +1 -1
  256. package/dist/types/src/components/Chat/Thread.stories.d.ts +6 -0
  257. package/dist/types/src/components/Chat/Thread.stories.d.ts.map +1 -1
  258. package/dist/types/src/components/Chat/context.d.ts +43 -8
  259. package/dist/types/src/components/Chat/context.d.ts.map +1 -1
  260. package/dist/types/src/components/Chat/events.d.ts +25 -0
  261. package/dist/types/src/components/Chat/events.d.ts.map +1 -1
  262. package/dist/types/src/components/Chat/index.d.ts +4 -2
  263. package/dist/types/src/components/Chat/index.d.ts.map +1 -1
  264. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +21 -9
  265. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
  266. package/dist/types/src/components/ChatPrompt/ChatActions.stories.d.ts +39 -0
  267. package/dist/types/src/components/ChatPrompt/ChatActions.stories.d.ts.map +1 -0
  268. package/dist/types/src/components/ChatPrompt/ChatActivity.d.ts +19 -0
  269. package/dist/types/src/components/ChatPrompt/ChatActivity.d.ts.map +1 -0
  270. package/dist/types/src/components/ChatPrompt/ChatActivity.stories.d.ts +46 -0
  271. package/dist/types/src/components/ChatPrompt/ChatActivity.stories.d.ts.map +1 -0
  272. package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts +5 -5
  273. package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts.map +1 -1
  274. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +6 -4
  275. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
  276. package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +5 -4
  277. package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -1
  278. package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
  279. package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +40 -10
  280. package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -1
  281. package/dist/types/src/components/ChatPrompt/ChatPrompt.stories.d.ts +61 -0
  282. package/dist/types/src/components/ChatPrompt/ChatPrompt.stories.d.ts.map +1 -0
  283. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +2 -2
  284. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
  285. package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts +33 -3
  286. package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts.map +1 -1
  287. package/dist/types/src/components/ChatPrompt/ChatStatus.stories.d.ts +31 -0
  288. package/dist/types/src/components/ChatPrompt/ChatStatus.stories.d.ts.map +1 -0
  289. package/dist/types/src/components/ChatPrompt/index.d.ts +8 -7
  290. package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
  291. package/dist/types/src/components/ChatPrompt/useChatVoiceInput.d.ts.map +1 -1
  292. package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.d.ts +7 -1
  293. package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.d.ts.map +1 -1
  294. package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.stories.d.ts +30 -0
  295. package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.stories.d.ts.map +1 -1
  296. package/dist/types/src/components/ConnectorAuthMenu/index.d.ts +1 -1
  297. package/dist/types/src/components/ConnectorAuthMenu/index.d.ts.map +1 -1
  298. package/dist/types/src/components/Toolbox/Toolbox.d.ts +5 -5
  299. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  300. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +1 -1
  301. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
  302. package/dist/types/src/components/Toolbox/index.d.ts +1 -1
  303. package/dist/types/src/components/Toolbox/index.d.ts.map +1 -1
  304. package/dist/types/src/components/index.d.ts +6 -7
  305. package/dist/types/src/components/index.d.ts.map +1 -1
  306. package/dist/types/src/constants.d.ts +4 -0
  307. package/dist/types/src/constants.d.ts.map +1 -1
  308. package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts +2 -2
  309. package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -1
  310. package/dist/types/src/containers/AgentArticle/index.d.ts +1 -1
  311. package/dist/types/src/containers/AgentArticle/index.d.ts.map +1 -1
  312. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts +2 -2
  313. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -1
  314. package/dist/types/src/containers/AgentProperties/index.d.ts +1 -1
  315. package/dist/types/src/containers/AgentProperties/index.d.ts.map +1 -1
  316. package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts +2 -2
  317. package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts.map +1 -1
  318. package/dist/types/src/containers/AssistantSettings/AssistantSettings.stories.d.ts +1 -1
  319. package/dist/types/src/containers/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -1
  320. package/dist/types/src/containers/AssistantSettings/OllamaModels.d.ts.map +1 -1
  321. package/dist/types/src/containers/AssistantSettings/index.d.ts +1 -1
  322. package/dist/types/src/containers/AssistantSettings/index.d.ts.map +1 -1
  323. package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts +6 -10
  324. package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts.map +1 -1
  325. package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts +39 -14
  326. package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts.map +1 -1
  327. package/dist/types/src/containers/ChatArticle/index.d.ts +1 -1
  328. package/dist/types/src/containers/ChatArticle/index.d.ts.map +1 -1
  329. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +7 -15
  330. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -1
  331. package/dist/types/src/containers/ChatCompanion/index.d.ts +1 -1
  332. package/dist/types/src/containers/ChatCompanion/index.d.ts.map +1 -1
  333. package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts +2 -2
  334. package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -1
  335. package/dist/types/src/containers/ChatDialog/index.d.ts +1 -1
  336. package/dist/types/src/containers/ChatDialog/index.d.ts.map +1 -1
  337. package/dist/types/src/containers/IntegrationPrompt/IntegrationPrompt.d.ts.map +1 -1
  338. package/dist/types/src/containers/IntegrationPrompt/index.d.ts +1 -1
  339. package/dist/types/src/containers/IntegrationPrompt/index.d.ts.map +1 -1
  340. package/dist/types/src/containers/ObjectCardSurface/ObjectCardSurface.d.ts +11 -0
  341. package/dist/types/src/containers/ObjectCardSurface/ObjectCardSurface.d.ts.map +1 -0
  342. package/dist/types/src/containers/ObjectCardSurface/index.d.ts +2 -0
  343. package/dist/types/src/containers/ObjectCardSurface/index.d.ts.map +1 -0
  344. package/dist/types/src/containers/PluginPrompt/PluginPrompt.d.ts.map +1 -1
  345. package/dist/types/src/containers/PluginPrompt/PluginPrompt.stories.d.ts +26 -0
  346. package/dist/types/src/containers/PluginPrompt/PluginPrompt.stories.d.ts.map +1 -0
  347. package/dist/types/src/containers/PluginPrompt/index.d.ts +1 -1
  348. package/dist/types/src/containers/PluginPrompt/index.d.ts.map +1 -1
  349. package/dist/types/src/containers/PluginUrlPrompt/PluginUrlPrompt.d.ts +12 -0
  350. package/dist/types/src/containers/PluginUrlPrompt/PluginUrlPrompt.d.ts.map +1 -0
  351. package/dist/types/src/containers/PluginUrlPrompt/index.d.ts +2 -0
  352. package/dist/types/src/containers/PluginUrlPrompt/index.d.ts.map +1 -0
  353. package/dist/types/src/containers/QuestionCard/QuestionCard.d.ts +14 -0
  354. package/dist/types/src/containers/QuestionCard/QuestionCard.d.ts.map +1 -0
  355. package/dist/types/src/containers/QuestionCard/QuestionCard.stories.d.ts +97 -0
  356. package/dist/types/src/containers/QuestionCard/QuestionCard.stories.d.ts.map +1 -0
  357. package/dist/types/src/containers/QuestionSurface/QuestionSurface.d.ts +14 -0
  358. package/dist/types/src/containers/QuestionSurface/QuestionSurface.d.ts.map +1 -0
  359. package/dist/types/src/containers/QuestionSurface/index.d.ts +2 -0
  360. package/dist/types/src/containers/QuestionSurface/index.d.ts.map +1 -0
  361. package/dist/types/src/containers/SpaceHomePrompt/SpaceHomePrompt.d.ts.map +1 -1
  362. package/dist/types/src/containers/SpaceHomePrompt/index.d.ts +1 -1
  363. package/dist/types/src/containers/SpaceHomePrompt/index.d.ts.map +1 -1
  364. package/dist/types/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.d.ts.map +1 -1
  365. package/dist/types/src/containers/SpaceHomeSuggestions/index.d.ts +1 -1
  366. package/dist/types/src/containers/SpaceHomeSuggestions/index.d.ts.map +1 -1
  367. package/dist/types/src/containers/TracePanel/TracePanel.d.ts +7 -3
  368. package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -1
  369. package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -1
  370. package/dist/types/src/containers/TracePanel/index.d.ts +2 -2
  371. package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -1
  372. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +1 -1
  373. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -1
  374. package/dist/types/src/containers/TriggerStatus/index.d.ts +1 -1
  375. package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -1
  376. package/dist/types/src/containers/index.d.ts +3 -0
  377. package/dist/types/src/containers/index.d.ts.map +1 -1
  378. package/dist/types/src/errors.d.ts +33 -0
  379. package/dist/types/src/errors.d.ts.map +1 -0
  380. package/dist/types/src/extensions/index.d.ts +1 -1
  381. package/dist/types/src/extensions/index.d.ts.map +1 -1
  382. package/dist/types/src/hooks/index.d.ts +18 -17
  383. package/dist/types/src/hooks/index.d.ts.map +1 -1
  384. package/dist/types/src/hooks/useChatKeymap.d.ts +1 -1
  385. package/dist/types/src/hooks/useChatKeymap.d.ts.map +1 -1
  386. package/dist/types/src/hooks/useChatModel.d.ts +21 -0
  387. package/dist/types/src/hooks/useChatModel.d.ts.map +1 -0
  388. package/dist/types/src/hooks/useChatToolbarActions.d.ts +14 -2
  389. package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
  390. package/dist/types/src/hooks/useDebug.d.ts +3 -3
  391. package/dist/types/src/hooks/useDebug.d.ts.map +1 -1
  392. package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -1
  393. package/dist/types/src/hooks/useHomeSuggestions.d.ts +3 -3
  394. package/dist/types/src/hooks/useHomeSuggestions.d.ts.map +1 -1
  395. package/dist/types/src/hooks/useMcpServer.d.ts +34 -0
  396. package/dist/types/src/hooks/useMcpServer.d.ts.map +1 -0
  397. package/dist/types/src/hooks/usePlatform.d.ts.map +1 -1
  398. package/dist/types/src/hooks/usePresets.d.ts +6 -4
  399. package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
  400. package/dist/types/src/hooks/usePresets.test.d.ts +2 -0
  401. package/dist/types/src/hooks/usePresets.test.d.ts.map +1 -0
  402. package/dist/types/src/hooks/useProcessEphemeralStatus.d.ts.map +1 -1
  403. package/dist/types/src/hooks/useSelectionContext.d.ts +3 -3
  404. package/dist/types/src/hooks/useSelectionContext.d.ts.map +1 -1
  405. package/dist/types/src/hooks/useSessionTimeline.d.ts +16 -0
  406. package/dist/types/src/hooks/useSessionTimeline.d.ts.map +1 -0
  407. package/dist/types/src/hooks/useSkillRegistry.d.ts +11 -5
  408. package/dist/types/src/hooks/useSkillRegistry.d.ts.map +1 -1
  409. package/dist/types/src/hooks/useSkillRegistry.test.d.ts +2 -0
  410. package/dist/types/src/hooks/useSkillRegistry.test.d.ts.map +1 -0
  411. package/dist/types/src/index.d.ts +6 -3
  412. package/dist/types/src/index.d.ts.map +1 -1
  413. package/dist/types/src/operations/analyze-turn.d.ts +5 -0
  414. package/dist/types/src/operations/analyze-turn.d.ts.map +1 -0
  415. package/dist/types/src/operations/analyze-turn.test.d.ts +2 -0
  416. package/dist/types/src/operations/analyze-turn.test.d.ts.map +1 -0
  417. package/dist/types/src/operations/answer-question.d.ts +12 -0
  418. package/dist/types/src/operations/answer-question.d.ts.map +1 -0
  419. package/dist/types/src/operations/answer-question.test.d.ts +2 -0
  420. package/dist/types/src/operations/answer-question.test.d.ts.map +1 -0
  421. package/dist/types/src/operations/create-chat.d.ts.map +1 -1
  422. package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -1
  423. package/dist/types/src/operations/errors.d.ts +63 -0
  424. package/dist/types/src/operations/errors.d.ts.map +1 -0
  425. package/dist/types/src/operations/generate-home-suggestions.d.ts.map +1 -1
  426. package/dist/types/src/operations/index.d.ts.map +1 -1
  427. package/dist/types/src/operations/respond-to-request.d.ts +5 -0
  428. package/dist/types/src/operations/respond-to-request.d.ts.map +1 -0
  429. package/dist/types/src/operations/resume-prompt.d.ts +11 -0
  430. package/dist/types/src/operations/resume-prompt.d.ts.map +1 -0
  431. package/dist/types/src/operations/run-prompt-in-chat.d.ts +5 -0
  432. package/dist/types/src/operations/run-prompt-in-chat.d.ts.map +1 -0
  433. package/dist/types/src/plugin.d.ts.map +1 -1
  434. package/dist/types/src/review/turn-review.d.ts +58 -0
  435. package/dist/types/src/review/turn-review.d.ts.map +1 -0
  436. package/dist/types/src/review/turn-review.test.d.ts +2 -0
  437. package/dist/types/src/review/turn-review.test.d.ts.map +1 -0
  438. package/dist/types/src/skills/assistant/AssistantSkill.d.ts.map +1 -1
  439. package/dist/types/src/skills/assistant/index.d.ts +1 -1
  440. package/dist/types/src/skills/assistant/index.d.ts.map +1 -1
  441. package/dist/types/src/skills/index.d.ts +3 -2
  442. package/dist/types/src/skills/index.d.ts.map +1 -1
  443. package/dist/types/src/skills/plugin-manager/PluginManagerSkill.d.ts +2 -2
  444. package/dist/types/src/skills/plugin-manager/PluginManagerSkill.d.ts.map +1 -1
  445. package/dist/types/src/skills/plugin-manager/index.d.ts +1 -1
  446. package/dist/types/src/skills/plugin-manager/index.d.ts.map +1 -1
  447. package/dist/types/src/skills/turn-review/TurnReviewSkill.d.ts +21 -0
  448. package/dist/types/src/skills/turn-review/TurnReviewSkill.d.ts.map +1 -0
  449. package/dist/types/src/skills/turn-review/index.d.ts +2 -0
  450. package/dist/types/src/skills/turn-review/index.d.ts.map +1 -0
  451. package/dist/types/src/testing/index.d.ts +4 -4
  452. package/dist/types/src/testing/index.d.ts.map +1 -1
  453. package/dist/types/src/testing/remote-snapshot.test.d.ts.map +1 -0
  454. package/dist/types/src/translations.d.ts +2 -2
  455. package/dist/types/src/translations.d.ts.map +1 -1
  456. package/dist/types/src/types/Assistant.d.ts +4 -1
  457. package/dist/types/src/types/Assistant.d.ts.map +1 -1
  458. package/dist/types/src/types/AssistantCapabilities.d.ts +48 -5
  459. package/dist/types/src/types/AssistantCapabilities.d.ts.map +1 -1
  460. package/dist/types/src/types/AssistantOperation.d.ts +47 -1
  461. package/dist/types/src/types/AssistantOperation.d.ts.map +1 -1
  462. package/dist/types/src/types/AssistantOptions.d.ts +8 -0
  463. package/dist/types/src/types/AssistantOptions.d.ts.map +1 -1
  464. package/dist/types/src/types/AssistantService.d.ts.map +1 -1
  465. package/dist/types/src/types/Ollama.d.ts +1 -1
  466. package/dist/types/src/types/Ollama.d.ts.map +1 -1
  467. package/dist/types/src/types/Settings.d.ts +3 -0
  468. package/dist/types/src/types/Settings.d.ts.map +1 -1
  469. package/dist/types/src/types/index.d.ts +10 -10
  470. package/dist/types/src/types/index.d.ts.map +1 -1
  471. package/dist/types/src/util/agent-options.d.ts +27 -0
  472. package/dist/types/src/util/agent-options.d.ts.map +1 -0
  473. package/dist/types/src/util/agent-options.test.d.ts +2 -0
  474. package/dist/types/src/util/agent-options.test.d.ts.map +1 -0
  475. package/dist/types/src/util/current-chat.d.ts +9 -0
  476. package/dist/types/src/util/current-chat.d.ts.map +1 -0
  477. package/dist/types/src/util/current-chat.test.d.ts +2 -0
  478. package/dist/types/src/util/current-chat.test.d.ts.map +1 -0
  479. package/dist/types/src/util/default-skills.d.ts +10 -0
  480. package/dist/types/src/util/default-skills.d.ts.map +1 -0
  481. package/dist/types/tsconfig.tsbuildinfo +1 -1
  482. package/package.json +151 -126
  483. package/src/AssistantPlugin.workerd.test.ts +22 -0
  484. package/src/Chat.ts +24 -0
  485. package/src/Extensions.ts +7 -0
  486. package/src/Hooks.ts +7 -0
  487. package/src/TracePanel.ts +8 -0
  488. package/src/capabilities/AssistantSurfaces.tsx +20 -12
  489. package/src/capabilities/agent-service.ts +30 -25
  490. package/src/capabilities/agents.ts +27 -0
  491. package/src/capabilities/ai-service.ts +2 -2
  492. package/src/capabilities/app-graph-builder.ts +18 -8
  493. package/src/capabilities/automation-templates.ts +1 -1
  494. package/src/capabilities/chats-section-query.test.ts +22 -2
  495. package/src/capabilities/companion-chat-provisioner.ts +55 -30
  496. package/src/capabilities/connector.ts +78 -29
  497. package/src/capabilities/create-object.ts +3 -1
  498. package/src/capabilities/edge-model-resolver.ts +27 -8
  499. package/src/capabilities/gen/browser.ts +192 -0
  500. package/src/capabilities/gen/node.ts +35 -41
  501. package/src/capabilities/gen/tauri.ts +192 -0
  502. package/src/capabilities/gen/workerd.ts +24 -38
  503. package/src/capabilities/index.ts +37 -24
  504. package/src/capabilities/local-model-resolver.ts +2 -2
  505. package/src/capabilities/markdown-extension.ts +1 -1
  506. package/src/capabilities/operation-handler.ts +16 -20
  507. package/src/capabilities/question-resumer.ts +82 -0
  508. package/src/capabilities/react-surface.ts +48 -8
  509. package/src/capabilities/schema-defs.ts +7 -2
  510. package/src/capabilities/settings.ts +2 -2
  511. package/src/capabilities/skill-definition.ts +14 -17
  512. package/src/capabilities/state.ts +5 -5
  513. package/src/capabilities/toolkit.ts +2 -2
  514. package/src/capabilities/turn-producers.ts +64 -0
  515. package/src/chat-model/chat-model.edge.test.ts +301 -0
  516. package/src/{processor/processor.node.test.ts → chat-model/chat-model.node.test.ts} +55 -9
  517. package/src/chat-model/chat-model.scripted.node.test.ts +441 -0
  518. package/src/chat-model/chat-model.ts +926 -0
  519. package/src/chat-model/index.ts +9 -0
  520. package/src/chat-model/outbox.test.ts +105 -0
  521. package/src/chat-model/outbox.ts +120 -0
  522. package/src/chat-model/presets.test.ts +53 -0
  523. package/src/chat-model/presets.ts +92 -0
  524. package/src/{processor → chat-model}/prompt.test.ts +20 -1
  525. package/src/{processor → chat-model}/prompt.ts +9 -2
  526. package/src/chat-model/streaming.node.test.ts +480 -0
  527. package/src/chat-model/testing/chat-model-recorder.ts +249 -0
  528. package/src/chat-model/testing/harness.ts +81 -0
  529. package/src/chat-model/thread.test.ts +588 -0
  530. package/src/chat-model/thread.ts +366 -0
  531. package/src/commands/index.ts +1 -1
  532. package/src/commands/task-commands.test.ts +130 -0
  533. package/src/commands/task-commands.ts +40 -33
  534. package/src/components/AgentProperties/AgentProperties.stories.tsx +2 -2
  535. package/src/components/AgentProperties/AgentProperties.tsx +19 -20
  536. package/src/components/AgentProperties/index.ts +1 -1
  537. package/src/components/Chat/Chat.tsx +503 -174
  538. package/src/components/Chat/Error.stories.tsx +10 -13
  539. package/src/components/Chat/ObjectCardWidget.tsx +69 -0
  540. package/src/components/Chat/SurfaceWidget.tsx +3 -3
  541. package/src/components/Chat/Thread.stories.tsx +69 -20
  542. package/src/components/Chat/context.ts +47 -9
  543. package/src/components/Chat/events.ts +25 -0
  544. package/src/components/Chat/index.ts +4 -2
  545. package/src/components/ChatPrompt/ChatActions.stories.tsx +145 -0
  546. package/src/components/ChatPrompt/ChatActions.tsx +99 -258
  547. package/src/components/ChatPrompt/ChatActivity.stories.tsx +195 -0
  548. package/src/components/ChatPrompt/ChatActivity.tsx +138 -0
  549. package/src/components/ChatPrompt/ChatMcpErrors.tsx +33 -21
  550. package/src/components/ChatPrompt/ChatOptions.stories.tsx +51 -10
  551. package/src/components/ChatPrompt/ChatOptions.tsx +547 -207
  552. package/src/components/ChatPrompt/ChatPresets.tsx +8 -7
  553. package/src/components/ChatPrompt/ChatPrompt.stories.tsx +252 -0
  554. package/src/components/ChatPrompt/ChatPrompt.tsx +124 -78
  555. package/src/components/ChatPrompt/ChatReferences.tsx +15 -10
  556. package/src/components/ChatPrompt/ChatStatus.stories.tsx +101 -0
  557. package/src/components/ChatPrompt/ChatStatus.tsx +91 -14
  558. package/src/components/ChatPrompt/index.ts +8 -7
  559. package/src/components/ChatPrompt/useChatVoiceInput.ts +5 -5
  560. package/src/components/ConnectorAuthMenu/ConnectorAuthMenu.stories.tsx +9 -13
  561. package/src/components/ConnectorAuthMenu/ConnectorAuthMenu.tsx +28 -16
  562. package/src/components/ConnectorAuthMenu/index.ts +1 -1
  563. package/src/components/Toolbox/Toolbox.stories.tsx +3 -3
  564. package/src/components/Toolbox/Toolbox.tsx +19 -20
  565. package/src/components/Toolbox/index.ts +1 -1
  566. package/src/components/index.ts +6 -7
  567. package/src/constants.ts +6 -0
  568. package/src/containers/AgentArticle/AgentArticle.stories.tsx +4 -4
  569. package/src/containers/AgentArticle/AgentArticle.tsx +16 -17
  570. package/src/containers/AgentArticle/index.ts +1 -1
  571. package/src/containers/AgentProperties/AgentProperties.tsx +6 -5
  572. package/src/containers/AgentProperties/index.ts +1 -1
  573. package/src/containers/AssistantSettings/AssistantSettings.stories.tsx +1 -1
  574. package/src/containers/AssistantSettings/AssistantSettings.tsx +11 -11
  575. package/src/containers/AssistantSettings/OllamaModels.stories.tsx +2 -2
  576. package/src/containers/AssistantSettings/OllamaModels.tsx +48 -59
  577. package/src/containers/AssistantSettings/index.ts +1 -1
  578. package/src/containers/ChatArticle/ChatArticle.stories.tsx +150 -46
  579. package/src/containers/ChatArticle/ChatArticle.tsx +88 -48
  580. package/src/containers/ChatArticle/index.ts +1 -1
  581. package/src/containers/ChatCompanion/ChatCompanion.tsx +8 -6
  582. package/src/containers/ChatCompanion/index.ts +1 -1
  583. package/src/containers/ChatDialog/ChatDialog.tsx +15 -14
  584. package/src/containers/ChatDialog/index.ts +1 -1
  585. package/src/containers/IntegrationPrompt/IntegrationPrompt.tsx +88 -22
  586. package/src/containers/IntegrationPrompt/index.ts +1 -1
  587. package/src/containers/ObjectCardSurface/ObjectCardSurface.tsx +38 -0
  588. package/src/containers/ObjectCardSurface/index.ts +5 -0
  589. package/src/containers/PluginPrompt/PluginPrompt.stories.tsx +101 -0
  590. package/src/containers/PluginPrompt/PluginPrompt.tsx +36 -29
  591. package/src/containers/PluginPrompt/index.ts +1 -1
  592. package/src/containers/PluginUrlPrompt/PluginUrlPrompt.tsx +112 -0
  593. package/src/containers/PluginUrlPrompt/index.ts +5 -0
  594. package/src/containers/QuestionCard/QuestionCard.stories.tsx +162 -0
  595. package/src/containers/QuestionCard/QuestionCard.tsx +98 -0
  596. package/src/containers/QuestionSurface/QuestionSurface.tsx +87 -0
  597. package/src/containers/QuestionSurface/index.ts +5 -0
  598. package/src/containers/SpaceHomePrompt/SpaceHomePrompt.tsx +117 -68
  599. package/src/containers/SpaceHomePrompt/index.ts +1 -1
  600. package/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.tsx +14 -10
  601. package/src/containers/SpaceHomeSuggestions/index.ts +1 -1
  602. package/src/containers/TracePanel/TracePanel.stories.tsx +100 -66
  603. package/src/containers/TracePanel/TracePanel.tsx +121 -230
  604. package/src/containers/TracePanel/index.ts +2 -2
  605. package/src/containers/TriggerStatus/TriggerStatus.tsx +26 -26
  606. package/src/containers/TriggerStatus/index.ts +1 -1
  607. package/src/containers/index.ts +15 -12
  608. package/src/errors.ts +8 -0
  609. package/src/extensions/index.ts +1 -1
  610. package/src/extensions/prompt-extension.ts +1 -1
  611. package/src/functions/services.test.ts +13 -17
  612. package/src/hooks/index.ts +18 -17
  613. package/src/hooks/useChatKeymap.ts +1 -1
  614. package/src/hooks/{useChatProcessor.ts → useChatModel.ts} +37 -17
  615. package/src/hooks/useChatServices.ts +3 -3
  616. package/src/hooks/useChatToolbarActions.ts +31 -12
  617. package/src/hooks/useContextBinder.ts +4 -4
  618. package/src/hooks/useContextObjects.ts +2 -2
  619. package/src/hooks/useDebug.ts +11 -7
  620. package/src/hooks/useFilteredTypes.ts +2 -5
  621. package/src/hooks/useHomeSuggestions.ts +20 -19
  622. package/src/hooks/useMcpServer.ts +172 -0
  623. package/src/hooks/usePlatform.ts +2 -2
  624. package/src/hooks/usePresets.test.tsx +52 -0
  625. package/src/hooks/usePresets.ts +64 -21
  626. package/src/hooks/useProcessEphemeralStatus.ts +8 -9
  627. package/src/hooks/useSelectionContext.test.ts +1 -1
  628. package/src/hooks/useSelectionContext.ts +6 -8
  629. package/src/hooks/useSessionTimeline.ts +60 -0
  630. package/src/hooks/useSkillRegistry.test.tsx +73 -0
  631. package/src/hooks/useSkillRegistry.ts +31 -52
  632. package/src/index.ts +6 -3
  633. package/src/meta.ts +1 -1
  634. package/src/operations/analyze-turn.test.ts +194 -0
  635. package/src/operations/analyze-turn.ts +96 -0
  636. package/src/operations/answer-question.test.ts +255 -0
  637. package/src/operations/answer-question.ts +81 -0
  638. package/src/operations/bind-chat-context.test.ts +49 -2
  639. package/src/operations/create-chat.ts +5 -30
  640. package/src/operations/ensure-companion-chat.ts +12 -2
  641. package/src/operations/errors.ts +17 -0
  642. package/src/operations/fork-chat.ts +1 -1
  643. package/src/operations/generate-home-suggestions.test.ts +51 -14
  644. package/src/operations/generate-home-suggestions.ts +64 -43
  645. package/src/operations/index.ts +16 -9
  646. package/src/operations/prompt.node.test.ts +6 -5
  647. package/src/operations/respond-to-request.ts +38 -0
  648. package/src/operations/resume-prompt.ts +19 -0
  649. package/src/operations/run-prompt-in-chat.ts +91 -0
  650. package/src/operations/run-prompt-in-new-chat.ts +3 -3
  651. package/src/operations/update-chat-name.ts +3 -3
  652. package/src/paths.ts +1 -1
  653. package/src/plugin.test.ts +20 -19
  654. package/src/plugin.ts +4 -0
  655. package/src/review/turn-review.test.ts +92 -0
  656. package/src/review/turn-review.ts +213 -0
  657. package/src/skills/assistant/AssistantSkill.ts +2 -0
  658. package/src/skills/assistant/index.ts +1 -1
  659. package/src/skills/assistant/skill.node.test.ts +3 -3
  660. package/src/skills/index.ts +3 -2
  661. package/src/skills/plugin-manager/PluginManagerSkill.ts +15 -6
  662. package/src/skills/plugin-manager/index.ts +1 -1
  663. package/src/skills/turn-review/TurnReviewSkill.ts +46 -0
  664. package/src/skills/turn-review/index.ts +5 -0
  665. package/src/templates/daily-digest.ts +1 -1
  666. package/src/templates/index.ts +2 -2
  667. package/src/templates/research-brief.ts +1 -1
  668. package/src/templates/routine-templates.test.ts +3 -3
  669. package/src/templates/scaffold.ts +2 -2
  670. package/src/testing/index.ts +6 -4
  671. package/src/{execution-graph → testing}/remote-snapshot.test.ts +2 -3
  672. package/src/testing/trace-timeline.node.test.ts +13 -15
  673. package/src/translations.ts +56 -26
  674. package/src/types/Assistant.ts +1 -1
  675. package/src/types/AssistantCapabilities.ts +46 -5
  676. package/src/types/AssistantOperation.ts +106 -1
  677. package/src/types/AssistantOptions.ts +9 -0
  678. package/src/types/AssistantService.ts +2 -2
  679. package/src/types/Ollama.ts +1 -1
  680. package/src/types/Settings.ts +22 -1
  681. package/src/types/index.ts +10 -10
  682. package/src/util/agent-options.test.ts +54 -0
  683. package/src/util/agent-options.ts +60 -0
  684. package/src/util/current-chat.test.ts +41 -0
  685. package/src/util/current-chat.ts +14 -0
  686. package/src/util/default-skills.ts +35 -0
  687. package/src/util/suggestions.test.ts +1 -1
  688. package/dist/lib/chunk-TracePanel2.mjs +0 -7
  689. package/dist/lib/chunk-TracePanel2.mjs.map +0 -1
  690. package/dist/lib/chunk-processor.mjs +0 -455
  691. package/dist/lib/chunk-processor.mjs.map +0 -1
  692. package/dist/lib/execution-graph.mjs +0 -978
  693. package/dist/lib/execution-graph.mjs.map +0 -1
  694. package/dist/lib/skills.mjs.map +0 -1
  695. package/dist/types/src/components/Chat/thread.d.ts +0 -42
  696. package/dist/types/src/components/Chat/thread.d.ts.map +0 -1
  697. package/dist/types/src/components/Chat/thread.test.d.ts.map +0 -1
  698. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +0 -17
  699. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +0 -1
  700. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +0 -8
  701. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +0 -1
  702. package/dist/types/src/components/ProcessTree/index.d.ts +0 -2
  703. package/dist/types/src/components/ProcessTree/index.d.ts.map +0 -1
  704. package/dist/types/src/containers/TracePanel/TraceToolbar.d.ts +0 -12
  705. package/dist/types/src/containers/TracePanel/TraceToolbar.d.ts.map +0 -1
  706. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +0 -19
  707. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +0 -1
  708. package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts +0 -2
  709. package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts.map +0 -1
  710. package/dist/types/src/containers/TracePanel/testing/index.d.ts +0 -3
  711. package/dist/types/src/containers/TracePanel/testing/index.d.ts.map +0 -1
  712. package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts +0 -15
  713. package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts.map +0 -1
  714. package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts +0 -12
  715. package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts.map +0 -1
  716. package/dist/types/src/containers/TracePanel/trace-filter.d.ts +0 -32
  717. package/dist/types/src/containers/TracePanel/trace-filter.d.ts.map +0 -1
  718. package/dist/types/src/containers/TracePanel/trace-filter.test.d.ts +0 -2
  719. package/dist/types/src/containers/TracePanel/trace-filter.test.d.ts.map +0 -1
  720. package/dist/types/src/execution-graph/execution-graph.d.ts +0 -139
  721. package/dist/types/src/execution-graph/execution-graph.d.ts.map +0 -1
  722. package/dist/types/src/execution-graph/execution-graph.test.d.ts +0 -2
  723. package/dist/types/src/execution-graph/execution-graph.test.d.ts.map +0 -1
  724. package/dist/types/src/execution-graph/index.d.ts +0 -4
  725. package/dist/types/src/execution-graph/index.d.ts.map +0 -1
  726. package/dist/types/src/execution-graph/pending-block-status.d.ts +0 -26
  727. package/dist/types/src/execution-graph/pending-block-status.d.ts.map +0 -1
  728. package/dist/types/src/execution-graph/pending-block-status.test.d.ts +0 -2
  729. package/dist/types/src/execution-graph/pending-block-status.test.d.ts.map +0 -1
  730. package/dist/types/src/execution-graph/remote-snapshot.test.d.ts.map +0 -1
  731. package/dist/types/src/execution-graph/span-tree.d.ts +0 -106
  732. package/dist/types/src/execution-graph/span-tree.d.ts.map +0 -1
  733. package/dist/types/src/execution-graph/span-tree.test.d.ts +0 -2
  734. package/dist/types/src/execution-graph/span-tree.test.d.ts.map +0 -1
  735. package/dist/types/src/execution-graph/sub-agent-delegation.test.d.ts +0 -2
  736. package/dist/types/src/execution-graph/sub-agent-delegation.test.d.ts.map +0 -1
  737. package/dist/types/src/execution-graph/testing/collect-trace-events.d.ts +0 -40
  738. package/dist/types/src/execution-graph/testing/collect-trace-events.d.ts.map +0 -1
  739. package/dist/types/src/execution-graph/testing/index.d.ts +0 -2
  740. package/dist/types/src/execution-graph/testing/index.d.ts.map +0 -1
  741. package/dist/types/src/hooks/useChatProcessor.d.ts +0 -18
  742. package/dist/types/src/hooks/useChatProcessor.d.ts.map +0 -1
  743. package/dist/types/src/hooks/useTraceMessages.d.ts +0 -12
  744. package/dist/types/src/hooks/useTraceMessages.d.ts.map +0 -1
  745. package/dist/types/src/processor/index.d.ts +0 -4
  746. package/dist/types/src/processor/index.d.ts.map +0 -1
  747. package/dist/types/src/processor/presets.d.ts +0 -24
  748. package/dist/types/src/processor/presets.d.ts.map +0 -1
  749. package/dist/types/src/processor/processor.d.ts +0 -144
  750. package/dist/types/src/processor/processor.d.ts.map +0 -1
  751. package/dist/types/src/processor/processor.node.test.d.ts +0 -2
  752. package/dist/types/src/processor/processor.node.test.d.ts.map +0 -1
  753. package/dist/types/src/processor/prompt.d.ts.map +0 -1
  754. package/dist/types/src/processor/prompt.test.d.ts.map +0 -1
  755. package/dist/types/src/processor/streaming.node.test.d.ts.map +0 -1
  756. package/dist/types/src/testing/test-trace.d.ts +0 -5
  757. package/dist/types/src/testing/test-trace.d.ts.map +0 -1
  758. package/dist/types/src/testing.d.ts +0 -2
  759. package/dist/types/src/testing.d.ts.map +0 -1
  760. package/src/components/Chat/thread.test.ts +0 -127
  761. package/src/components/Chat/thread.ts +0 -87
  762. package/src/components/ProcessTree/ProcessTree.stories.tsx +0 -90
  763. package/src/components/ProcessTree/ProcessTree.tsx +0 -215
  764. package/src/components/ProcessTree/index.ts +0 -5
  765. package/src/containers/TracePanel/TraceToolbar.tsx +0 -83
  766. package/src/containers/TracePanel/dxn-extractor.test.ts +0 -153
  767. package/src/containers/TracePanel/dxn-extractor.ts +0 -166
  768. package/src/containers/TracePanel/testing/index.ts +0 -6
  769. package/src/containers/TracePanel/testing/simulated-agent.ts +0 -115
  770. package/src/containers/TracePanel/testing/snapshot-playback.ts +0 -45
  771. package/src/containers/TracePanel/trace-filter.test.ts +0 -100
  772. package/src/containers/TracePanel/trace-filter.ts +0 -84
  773. package/src/execution-graph/SPEC.md +0 -749
  774. package/src/execution-graph/execution-graph.test.ts +0 -1161
  775. package/src/execution-graph/execution-graph.ts +0 -1078
  776. package/src/execution-graph/index.ts +0 -35
  777. package/src/execution-graph/pending-block-status.test.ts +0 -118
  778. package/src/execution-graph/pending-block-status.ts +0 -89
  779. package/src/execution-graph/span-tree.test.ts +0 -367
  780. package/src/execution-graph/span-tree.ts +0 -405
  781. package/src/execution-graph/sub-agent-delegation.test.ts +0 -65
  782. package/src/execution-graph/testing/collect-trace-events.ts +0 -76
  783. package/src/execution-graph/testing/index.ts +0 -5
  784. package/src/execution-graph/testing/sub-agent-delegation.json +0 -1285
  785. package/src/hooks/useTraceMessages.ts +0 -43
  786. package/src/processor/index.ts +0 -7
  787. package/src/processor/presets.ts +0 -49
  788. package/src/processor/processor.ts +0 -542
  789. package/src/processor/streaming.node.test.ts +0 -203
  790. package/src/testing/test-trace.ts +0 -22
  791. package/src/testing.ts +0 -9
  792. /package/dist/types/src/{processor → chat-model}/prompt.test.d.ts +0 -0
  793. /package/dist/types/src/{processor → chat-model}/streaming.node.test.d.ts +0 -0
  794. /package/dist/types/src/{components/Chat → chat-model}/thread.test.d.ts +0 -0
  795. /package/dist/types/src/{execution-graph → testing}/remote-snapshot.test.d.ts +0 -0
package/PLUGIN.mdl CHANGED
@@ -16,9 +16,10 @@ Each extension is defined in the Appendix or resolved via its URI.
16
16
  |-------------|-------------------------------|
17
17
  | `type` | `org.dxos.mdl.type@1.0` |
18
18
  | `feat` | `org.dxos.mdl.feat@1.0` |
19
- | `test` | `org.dxos.mdl.test@1.0` |
19
+ | `scenario` | `org.dxos.mdl.scenario@1.0` |
20
20
  | `component` | `org.dxos.mdl.component@1.0` |
21
- | `op` | `org.dxos.mdl.op@1.0` |
21
+ | `op` | `org.dxos.mdl.op@1.1` |
22
+ | `test` | `org.dxos.mdl.test@1.0` |
22
23
 
23
24
  ## Types
24
25
 
@@ -47,6 +48,8 @@ type Settings
47
48
  chatView?: ChatView
48
49
  modelProvider?: ModelProvider
49
50
  modelDefaults?: ModelDefaults
51
+ codeMode?: boolean
52
+ reportStruggles?: boolean
50
53
  tracePanelDebug?: boolean
51
54
  ```
52
55
 
@@ -137,6 +140,7 @@ component AssistantSettings
137
140
 
138
141
  ```mdl
139
142
  op CreateChat
143
+ key: org.dxos.operation.assistant.createChat
140
144
  desc: Creates a new Chat object and optionally adds it to the active space.
141
145
  input:
142
146
  db: Database
@@ -148,6 +152,7 @@ op CreateChat
148
152
 
149
153
  ```mdl
150
154
  op UpdateChatName
155
+ key: org.dxos.operation.assistant.updateChatName
151
156
  desc: Automatically derives and updates the name of a chat using the AI service.
152
157
  input:
153
158
  chat: Chat
@@ -155,6 +160,15 @@ op UpdateChatName
155
160
  effects: [echo:write, ai:infer]
156
161
  ```
157
162
 
163
+ ```mdl
164
+ op AnalyzeTurn
165
+ key: org.dxos.operation.assistant.analyzeTurn
166
+ desc: TurnReviewSkill's background end-request hook. Judges the turn that just ended with a small model and reports it when the agent struggled because of its prompting or tooling.
167
+ input: {}
168
+ output: void
169
+ effects: [echo:read, ai:infer, http:post]
170
+ ```
171
+
158
172
  ```mdl
159
173
  op SetCurrentChat
160
174
  desc: Associates a primary object with a specific companion chat in session state.
@@ -176,6 +190,7 @@ op RunPromptInNewChat
176
190
 
177
191
  ```mdl
178
192
  op EnsureCompanionChat
193
+ key: org.dxos.operation.assistant.ensureCompanionChat
179
194
  desc: Returns the companion chat for an object, creating one if none exists.
180
195
  input:
181
196
  db: Database
@@ -198,6 +213,7 @@ op OnCreateSpace
198
213
 
199
214
  ```mdl
200
215
  op ToggleTracePanelDebug
216
+ key: org.dxos.operation.assistant.setTracePanelDebug
201
217
  desc: Toggles the trace panel between commit-graph and raw JSON debug view.
202
218
  input:
203
219
  state?: boolean
@@ -237,7 +253,7 @@ feat F-2: Companion Chat
237
253
  feat F-3: Skill System
238
254
 
239
255
  req F-3.1: Skills define named AI configurations (instructions, tools, model).
240
- req F-3.2: Built-in skills include: Assistant, Browser, Database, WebSearch, Discord, Linear, Agent, Planning, Memory, Automation, SkillManager, AgentWizard.
256
+ req F-3.2: Built-in skills include: Assistant, Browser, Database, WebSearch, Discord, Linear, Agent, Planning, Memory, Automation, SkillManager.
241
257
  req F-3.3:
242
258
  when: user selects a skill for a chat
243
259
  then: chat uses that skill's instructions and tool set
@@ -264,6 +280,12 @@ feat F-5: Tool Execution
264
280
  req F-5.3:
265
281
  when: AI invokes a tool during a conversation
266
282
  then: operation is dispatched via the compute runtime and result returned to the model
283
+ req F-5.4: Code mode is opt-in via `Settings.codeMode`, off by default; the host supplies the engine
284
+ through the `codeModeTurnProducer` plugin option, and without it the setting has no effect.
285
+ req F-5.5:
286
+ when: Settings.codeMode is enabled, the host supplied a code-mode producer, and no AgentTurnProducer is contributed
287
+ then: agent processes spawned afterwards run turns through the code-mode producer (one `eval` tool)
288
+ instead of AiSession
267
289
  ```
268
290
 
269
291
  ```mdl
@@ -283,10 +305,25 @@ feat F-7: Execution Trace
283
305
  req F-7.2: User can toggle between commit-graph and raw JSON views via op:ToggleTracePanelDebug.
284
306
  ```
285
307
 
308
+ ```mdl
309
+ feat F-8: Agent Struggle Reports
310
+
311
+ req F-8.1: Reporting is opt-in via `Settings.reportStruggles`, off by default, and also requires telemetry to be enabled.
312
+ req F-8.2:
313
+ when: the chat processor issues a request with reporting enabled
314
+ then: TurnReviewSkill is bound to the chat; its end-request hook (op:AnalyzeTurn) runs in the background, so
315
+ the request settles without waiting for the review and the agent process awaits it before finishing
316
+ req F-8.3:
317
+ when: the reviewer judges the agent struggled from missing/wrong instructions or a missing/faulty tool
318
+ then: the trajectory is uploaded to the feedback-logs bucket under `trajectories/` and an `agent_struggle` event is captured
319
+ carrying the cause, model DXN, code mode, and enabled skills
320
+ req F-8.4: A review that fails is logged and dropped; it never surfaces to the user.
321
+ ```
322
+
286
323
  ## Acceptance
287
324
 
288
325
  ```mdl
289
- test T-1: Create chat and send message
326
+ scenario T-1: Create chat and send message
290
327
  given: a space is open and the assistant plugin is active
291
328
  when: user creates a new Chat and sends "Hello"
292
329
  then:
@@ -296,7 +333,7 @@ test T-1: Create chat and send message
296
333
  ```
297
334
 
298
335
  ```mdl
299
- test T-2: Companion chat provisioning
336
+ scenario T-2: Companion chat provisioning
300
337
  given: user opens a document with no companion chat
301
338
  when: companion panel initializes
302
339
  then:
@@ -305,7 +342,7 @@ test T-2: Companion chat provisioning
305
342
  ```
306
343
 
307
344
  ```mdl
308
- test T-3: Skill binding
345
+ scenario T-3: Skill binding
309
346
  given: a chat exists
310
347
  when: user binds the "WebSearch" skill key
311
348
  then:
@@ -314,7 +351,7 @@ test T-3: Skill binding
314
351
  ```
315
352
 
316
353
  ```mdl
317
- test T-4: Model provider switch
354
+ scenario T-4: Model provider switch
318
355
  given: assistant settings are open
319
356
  when: user switches provider from edge to ollama
320
357
  then:
@@ -323,7 +360,7 @@ test T-4: Model provider switch
323
360
  ```
324
361
 
325
362
  ```mdl
326
- test T-5: Run prompt in background
363
+ scenario T-5: Run prompt in background
327
364
  given: a database and a prompt string are available
328
365
  when: op:RunPromptInNewChat is called with background: true
329
366
  then:
@@ -332,7 +369,7 @@ test T-5: Run prompt in background
332
369
  ```
333
370
 
334
371
  ```mdl
335
- test T-7: Trace panel debug toggle
372
+ scenario T-7: Trace panel debug toggle
336
373
  given: trace panel is showing commit-graph view
337
374
  when: op:ToggleTracePanelDebug is invoked with no argument
338
375
  then:
@@ -340,6 +377,85 @@ test T-7: Trace panel debug toggle
340
377
  - trace panel switches to raw JSON view
341
378
  ```
342
379
 
380
+ ## QA
381
+
382
+ Executable tests. Each step carries a human instruction (`do`) and, where the step maps to an
383
+ invocable operation, an agent binding (`invoke`). Report failures by test and step number.
384
+
385
+ ```mdl
386
+ test QA-1: Create a chat and send a message
387
+ desc: The core assistant round-trip — create a Chat, send a prompt, get a streamed AI response.
388
+ actors: both
389
+ covers: [F-1.1, F-1.2, F-1.3, F-1.4, T-1]
390
+ status: unverified
391
+ given:
392
+ - an identity exists
393
+ - space: a space is open
394
+ - no Chat named "QA Chat" exists — ABORT rather than deleting one this test did not create
395
+ steps:
396
+ - name: Create the chat
397
+ do: Open the assistant panel and click "New chat".
398
+ invoke: [op:CreateChat] { name: "QA Chat" }
399
+ capture: created
400
+ expect: a new Chat named "QA Chat" opens, empty
401
+ assert: return !!$created.object
402
+ note: |
403
+ CreateChat returns the chat UNFILED — the handler adds its feed regardless, but persisting
404
+ it in the space is a separate step (see plugin-space's addObject), which the UI's "New
405
+ chat" gesture does implicitly.
406
+ - name: Send a message
407
+ do: Type "Hello" into the chat input and press Enter.
408
+ expect: "Hello" appears as a user message, followed by a streamed assistant response, and
409
+ the chat is persisted to ECHO and replicated to peers
410
+ note: |
411
+ NO `invoke` — sending a prompt runs through the AI streaming path (`AiSession`), not
412
+ through the operation invoker; there is no `SendMessage` operation to call directly.
413
+ - name: Chat is auto-named
414
+ do: (no gesture — happens automatically once the chat has enough messages)
415
+ invoke: [op:UpdateChatName] { chat: $created.object }
416
+ expect: the chat's name changes from "QA Chat" to something derived from the conversation
417
+ assert: return typeof $result === 'undefined' || true;
418
+ note: |
419
+ `UpdateChatName` returns void — verify the effect on `chat.name`, not the return value
420
+ (Execution Rule 3). Included here for completeness; a fast QA pass may treat this as
421
+ `given` already established rather than re-triggering it.
422
+ after:
423
+ - name: Delete the chat
424
+ do: Right-click "QA Chat" in the navtree and choose Delete.
425
+ invoke: org.dxos.operation.space.removeObjects { objects: [$created.object], target: $given.space.db }
426
+ expect: the row leaves the navtree and its plank closes if it was open
427
+ ```
428
+
429
+ ```mdl
430
+ test QA-2: Companion chat is provisioned and bound
431
+ desc: op:EnsureCompanionChat + op:BindChatContext — the chat a companioned object gets automatically.
432
+ actors: both
433
+ covers: [F-2.1, F-2.2, F-2.3, T-2]
434
+ status: unverified
435
+ given:
436
+ - an identity exists
437
+ - space: a space is open
438
+ - subject: a Document in the space that has no companion chat yet
439
+ steps:
440
+ - name: Ensure the companion chat
441
+ do: Open the document; the companion chat panel initializes automatically.
442
+ invoke: [op:EnsureCompanionChat] { companionTo: $given.subject }
443
+ capture: ensured
444
+ expect: a new Chat is returned and NOT yet persisted (`persisted === false`)
445
+ assert: return $result.persisted === false && !!$result.chat;
446
+ - name: Bind chat context
447
+ do: (no separate gesture — panel initialization runs this immediately after ensuring the chat)
448
+ invoke: org.dxos.operation.assistant.bindChatContext { chat: $ensured.chat, subject: $given.subject }
449
+ note: No `op BindChatContext` block is declared above — referenced by its full runtime key.
450
+ expect: the companion chat's context now includes the document (and any skills its type
451
+ declares via Skill.SkillsAnnotation)
452
+ after:
453
+ - name: (nothing to undo)
454
+ do: The companion chat is never persisted unless a message is sent, so nothing was written
455
+ to the space.
456
+ expect: the document still has no persisted companion chat
457
+ ```
458
+
343
459
  ---
344
460
 
345
461
  ## Appendix: Extension Definitions
@@ -369,8 +485,8 @@ ext feat
369
485
  ```
370
486
 
371
487
  ```mdl
372
- ext test
373
- uri: org.dxos.mdl.test@1.0
488
+ ext scenario
489
+ uri: org.dxos.mdl.scenario@1.0
374
490
  desc: An acceptance scenario expressed as given / when / then steps.
375
491
  fields:
376
492
  given?: Step | Step[]
@@ -1 +1 @@
1
- {"version":3,"file":"Assistant.mjs","names":[],"sources":["../../src/types/Assistant.ts"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type DXN } from '@dxos/keys';\n\n// Re-export Settings as merged const/type (not as namespace).\nimport * as SettingsModule from './Settings';\nexport const Settings = SettingsModule.Settings;\nexport type Settings = SettingsModule.Settings;\n\nexport const ChatViews = SettingsModule.ChatViews;\n\nexport const ModelProviders: readonly DXN.DXN[] = SettingsModule.ModelProviders;\nexport const ModelProvider = SettingsModule.ModelProvider;\nexport type ModelProvider = SettingsModule.ModelProvider;\n\nexport const ModelDefaults = SettingsModule.ModelDefaults;\nexport type ModelDefaults = SettingsModule.ModelDefaults;\n"],"mappings":";;;;;;;;;;AAUA,IAAa,WAAW;AAGxB,IAAa,YAAY;AAEzB,IAAa,iBAAqC;AAClD,IAAa,gBAAgB;AAG7B,IAAa,gBAAgB"}
1
+ {"version":3,"file":"Assistant.mjs","names":[],"sources":["../../src/types/Assistant.ts"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type DXN } from '@dxos/keys';\n\n// Re-export Settings as merged const/type (not as namespace).\nimport * as SettingsModule from './Settings.ts';\nexport const Settings = SettingsModule.Settings;\nexport type Settings = SettingsModule.Settings;\n\nexport const ChatViews = SettingsModule.ChatViews;\n\nexport const ModelProviders: readonly DXN.DXN[] = SettingsModule.ModelProviders;\nexport const ModelProvider = SettingsModule.ModelProvider;\nexport type ModelProvider = SettingsModule.ModelProvider;\n\nexport const ModelDefaults = SettingsModule.ModelDefaults;\nexport type ModelDefaults = SettingsModule.ModelDefaults;\n"],"mappings":";;;;;;;;;;AAUA,IAAa,WAAW;AAGxB,IAAa,YAAY;AAEzB,IAAa,iBAAqC;AAClD,IAAa,gBAAgB;AAG7B,IAAa,gBAAgB"}
@@ -5,6 +5,8 @@ import * as Schema from "effect/Schema";
5
5
  import * as Struct from "effect/Struct";
6
6
  //#region src/types/AssistantCapabilities.ts
7
7
  var AssistantCapabilities_exports = /* @__PURE__ */ __exportAll({
8
+ Agent: () => Agent,
9
+ AgentProcess: () => AgentProcess,
8
10
  AgentTurnProducer: () => AgentTurnProducer,
9
11
  CompanionChatCache: () => CompanionChatCache,
10
12
  HomeSuggestionsCache: () => HomeSuggestionsCache,
@@ -30,7 +32,9 @@ var HomeSuggestionsCacheSchema = Schema.Record(Schema.String, Schema.mutableKey(
30
32
  /** Epoch ms timestamp of the successful generation that produced these prompts. */
31
33
  generatedAt: Schema.Number,
32
34
  /** Non-empty, trimmed prompts from a successful generation. */
33
- prompts: Schema.Array(Schema.String)
35
+ prompts: Schema.Array(Schema.String),
36
+ /** The recent objects the prompts were generated from; an unchanged set reuses them. */
37
+ fingerprint: Schema.optional(Schema.String)
34
38
  })));
35
39
  /** Per-space cache of LLM-generated home starter prompts, persisted across page reloads. */
36
40
  var HomeSuggestionsCache = Capability.makeSingleton()(`${meta.profile.key}.capability.homeSuggestionsCache`);
@@ -43,8 +47,15 @@ var HomeSuggestionsCache = Capability.makeSingleton()(`${meta.profile.key}.capab
43
47
  * has to be able to contribute one before the app's own module activates without colliding.
44
48
  */
45
49
  var AgentTurnProducer = Capability.make()("org.dxos.plugin.assistant.capability.agentTurnProducer");
50
+ var Agent = Capability.make()(`${meta.profile.key}.capability.agent`);
51
+ /**
52
+ * A durable process a chat can run on in place of the assistant's own agent process, named by its
53
+ * key in `chat.session.process`. The agent service spawns it for such a chat; a chat that names
54
+ * none runs on the assistant's.
55
+ */
56
+ var AgentProcess = Capability.make()(`${meta.profile.key}.capability.agentProcess`);
46
57
  var SubjectContext = Capability.make()(`${meta.profile.key}.capability.subjectContext`);
47
58
  //#endregion
48
- export { AgentTurnProducer, CompanionChatCache, HomeSuggestionsCache, HomeSuggestionsCacheSchema, OllamaManager, Settings, State, StateSchema, SubjectContext, AssistantCapabilities_exports as t };
59
+ export { Agent, AgentProcess, AgentTurnProducer, CompanionChatCache, HomeSuggestionsCache, HomeSuggestionsCacheSchema, OllamaManager, Settings, State, StateSchema, SubjectContext, AssistantCapabilities_exports as t };
49
60
 
50
61
  //# sourceMappingURL=AssistantCapabilities.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantCapabilities.mjs","names":[],"sources":["../../src/types/AssistantCapabilities.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport type * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\nimport * as Struct from 'effect/Struct';\nimport type * as Atom from 'effect/unstable/reactivity/Atom';\n\nimport type { MakeTurnProducer } from '@dxos/agent-runtime';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport type { AiContext } from '@dxos/assistant';\nimport type { Chat } from '@dxos/assistant-toolkit';\nimport type * as Instructions from '@dxos/compute/Instructions';\nimport { type Database, type Obj, type Ref, type Registry } from '@dxos/echo';\n\nimport { meta } from '#meta';\n\nimport * as Assistant from './Assistant';\nimport * as Ollama from './Ollama';\n\nexport const Settings = Capability.makeSingleton<Atom.Writable<Assistant.Settings>>()(\n `${meta.profile.key}.capability.settings`,\n);\n\nexport const OllamaManager = Capability.makeSingleton<Ollama.Manager>()(`${meta.profile.key}.capability.ollamaManager`);\n\nexport const StateSchema = Schema.Struct({\n /** Map of primary object dxn to current chat dxn. */\n currentChat: Schema.Record(Schema.String, Schema.UndefinedOr(Schema.String)),\n /** Map of chat object path to prompt text to auto-submit when the chat opens. */\n pendingPrompts: Schema.Record(Schema.String, Schema.UndefinedOr(Schema.String)),\n}).mapFields(Struct.map(Schema.mutableKey));\n\nexport type AssistantState = Schema.Schema.Type<typeof StateSchema>;\n\nexport const State = Capability.makeSingleton<Atom.Writable<AssistantState>>()(`${meta.profile.key}.capability.state`);\n\n/** Session-scoped cache of transient (not yet persisted) companion chats keyed by companion DXN string. */\nexport const CompanionChatCache = Capability.makeSingleton<Atom.Writable<Record<string, Obj.Unknown | undefined>>>()(\n `${meta.profile.key}.capability.companionChatCache`,\n);\n\nexport const HomeSuggestionsCacheSchema = Schema.Record(\n Schema.String,\n Schema.mutableKey(\n Schema.Struct({\n /** Epoch ms timestamp of the successful generation that produced these prompts. */\n generatedAt: Schema.Number,\n /** Non-empty, trimmed prompts from a successful generation. */\n prompts: Schema.Array(Schema.String),\n }),\n ),\n);\nexport type HomeSuggestionsCache = Schema.Schema.Type<typeof HomeSuggestionsCacheSchema>;\n\n/** Per-space cache of LLM-generated home starter prompts, persisted across page reloads. */\nexport const HomeSuggestionsCache = Capability.makeSingleton<Atom.Writable<HomeSuggestionsCache>>()(\n `${meta.profile.key}.capability.homeSuggestionsCache`,\n);\n\n/**\n * Optional engine for producing a conversation turn. When contributed, the agent process runs turns\n * through it instead of DXOS's own `AiSession` — e.g. a Claude Agent SDK host — while keeping its\n * queue, alarms, redelivery, delegation and hydration.\n *\n * A registry rather than a singleton, for the same reason as `AgentDelegationStrategy`: a harness\n * has to be able to contribute one before the app's own module activates without colliding.\n */\nexport const AgentTurnProducer = Capability.make<MakeTurnProducer>()(\n 'org.dxos.plugin.assistant.capability.agentTurnProducer',\n);\n\n/** Context a chat receives when it runs against a subject object. */\nexport type SubjectBindings = AiContext.BindingProps & {\n /** Applied to `chat.instructions` only when the chat has none; reaches the model via the system prompt. */\n instructions?: Ref.Ref<Instructions.Instructions>;\n};\n\n/**\n * Bindings contributed for a chat opened against a subject object — the object a companion chat is\n * attached to, or the object a chat was created for.\n *\n * Every contribution whose `appliesTo` accepts the subject runs and the results are merged, so a\n * type-specific provider adds to the default rather than replacing it. Invoked by\n * `AssistantOperation.BindChatContext`, which provides `Database.Service` for the subject's space and\n * declares `Registry.Service` for skills resolved out of the hypergraph registry.\n */\nexport type SubjectContext = {\n /** Whether this provider applies to the subject. Absent ⇒ applies to every subject. */\n appliesTo?: (subject: Obj.Unknown) => boolean;\n getBindings: (params: {\n subject: Obj.Unknown;\n chat: Chat.Chat;\n }) => Effect.Effect<SubjectBindings, Error, Database.Service | Registry.Service>;\n};\n\nexport const SubjectContext = Capability.make<SubjectContext>()(`${meta.profile.key}.capability.subjectContext`);\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,IAAa,WAAW,WAAW,cAAiD,CAAC,CACnF,GAAG,KAAK,QAAQ,IAAI,qBACtB;AAEA,IAAa,gBAAgB,WAAW,cAA8B,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,0BAA0B;AAEtH,IAAa,cAAc,OAAO,OAAO;;CAEvC,aAAa,OAAO,OAAO,OAAO,QAAQ,OAAO,YAAY,OAAO,MAAM,CAAC;;CAE3E,gBAAgB,OAAO,OAAO,OAAO,QAAQ,OAAO,YAAY,OAAO,MAAM,CAAC;AAChF,CAAC,CAAC,CAAC,UAAU,OAAO,IAAI,OAAO,UAAU,CAAC;AAI1C,IAAa,QAAQ,WAAW,cAA6C,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,kBAAkB;;AAGrH,IAAa,qBAAqB,WAAW,cAAsE,CAAC,CAClH,GAAG,KAAK,QAAQ,IAAI,+BACtB;AAEA,IAAa,6BAA6B,OAAO,OAC/C,OAAO,QACP,OAAO,WACL,OAAO,OAAO;;CAEZ,aAAa,OAAO;;CAEpB,SAAS,OAAO,MAAM,OAAO,MAAM;AACrC,CAAC,CACH,CACF;;AAIA,IAAa,uBAAuB,WAAW,cAAmD,CAAC,CACjG,GAAG,KAAK,QAAQ,IAAI,iCACtB;;;;;;;;;AAUA,IAAa,oBAAoB,WAAW,KAAuB,CAAC,CAClE,wDACF;AA0BA,IAAa,iBAAiB,WAAW,KAAqB,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,2BAA2B"}
1
+ {"version":3,"file":"AssistantCapabilities.mjs","names":[],"sources":["../../src/types/AssistantCapabilities.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport type * as Effect from 'effect/Effect';\nimport type * as Atom from 'effect/reactivity/Atom';\nimport * as Schema from 'effect/Schema';\nimport * as Struct from 'effect/Struct';\n\nimport type { AgentProcessDefinition, MakeTurnProducer } from '@dxos/agent-runtime';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport type { AiContext } from '@dxos/assistant';\nimport type * as Chat from '@dxos/assistant/Chat';\nimport type * as Instructions from '@dxos/compute/Instructions';\nimport { type Database, type Obj, type Ref, type Registry } from '@dxos/echo';\nimport { type Message } from '@dxos/types';\n\nimport { meta } from '#meta';\n\nimport * as Assistant from './Assistant.ts';\nimport * as Ollama from './Ollama.ts';\n\nexport const Settings = Capability.makeSingleton<Atom.Writable<Assistant.Settings>>()(\n `${meta.profile.key}.capability.settings`,\n);\n\nexport const OllamaManager = Capability.makeSingleton<Ollama.Manager>()(`${meta.profile.key}.capability.ollamaManager`);\n\nexport const StateSchema = Schema.Struct({\n /** Map of primary object dxn to current chat dxn. */\n currentChat: Schema.Record(Schema.String, Schema.UndefinedOr(Schema.String)),\n /** Map of chat object path to prompt text to auto-submit when the chat opens. */\n pendingPrompts: Schema.Record(Schema.String, Schema.UndefinedOr(Schema.String)),\n}).mapFields(Struct.map(Schema.mutableKey));\n\nexport type AssistantState = Schema.Schema.Type<typeof StateSchema>;\n\nexport const State = Capability.makeSingleton<Atom.Writable<AssistantState>>()(`${meta.profile.key}.capability.state`);\n\n/** Session-scoped cache of transient (not yet persisted) companion chats keyed by companion DXN string. */\nexport const CompanionChatCache = Capability.makeSingleton<Atom.Writable<Record<string, Obj.Unknown | undefined>>>()(\n `${meta.profile.key}.capability.companionChatCache`,\n);\n\nexport const HomeSuggestionsCacheSchema = Schema.Record(\n Schema.String,\n Schema.mutableKey(\n Schema.Struct({\n /** Epoch ms timestamp of the successful generation that produced these prompts. */\n generatedAt: Schema.Number,\n /** Non-empty, trimmed prompts from a successful generation. */\n prompts: Schema.Array(Schema.String),\n /** The recent objects the prompts were generated from; an unchanged set reuses them. */\n fingerprint: Schema.optional(Schema.String),\n }),\n ),\n);\nexport type HomeSuggestionsCache = Schema.Schema.Type<typeof HomeSuggestionsCacheSchema>;\n\n/** Per-space cache of LLM-generated home starter prompts, persisted across page reloads. */\nexport const HomeSuggestionsCache = Capability.makeSingleton<Atom.Writable<HomeSuggestionsCache>>()(\n `${meta.profile.key}.capability.homeSuggestionsCache`,\n);\n\n/**\n * Optional engine for producing a conversation turn. When contributed, the agent process runs turns\n * through it instead of DXOS's own `AiSession` — e.g. a Claude Agent SDK host — while keeping its\n * queue, alarms, redelivery, delegation and hydration.\n *\n * A registry rather than a singleton, for the same reason as `AgentDelegationStrategy`: a harness\n * has to be able to contribute one before the app's own module activates without colliding.\n */\nexport const AgentTurnProducer = Capability.make<MakeTurnProducer>()(\n 'org.dxos.plugin.assistant.capability.agentTurnProducer',\n);\n\n/**\n * Whether an agent can run on this device; one that cannot is still listed, with the reason as a\n * short lowercase phrase shown after its name.\n */\nexport type AgentAvailability = { readonly available: true } | { readonly available: false; readonly reason: string };\n\n/** A person's answer to a request block an agent added to a chat. */\nexport type AgentResponse = {\n chat: Chat.Chat;\n /** The message holding the request block. */\n message: Message.Message;\n requestId: string;\n optionId: string;\n};\n\n/**\n * An agent a chat can run on, keyed by `chat.session.harness`. Each plugin registers the agents it\n * provides; this plugin registers Composer's own loop as `composer`.\n */\nexport type Agent = {\n readonly id: string;\n readonly label: string;\n readonly icon: string;\n readonly availability: Atom.Atom<AgentAvailability>;\n readonly makeTurnProducer: MakeTurnProducer;\n /** Hands a person's answer to the agent; false when nothing is waiting on that request. */\n readonly respond?: (response: AgentResponse) => Effect.Effect<boolean, never, Database.Service>;\n};\n\nexport const Agent = Capability.make<Agent>()(`${meta.profile.key}.capability.agent`);\n\n/**\n * A durable process a chat can run on in place of the assistant's own agent process, named by its\n * key in `chat.session.process`. The agent service spawns it for such a chat; a chat that names\n * none runs on the assistant's.\n */\nexport const AgentProcess = Capability.make<AgentProcessDefinition>()(`${meta.profile.key}.capability.agentProcess`);\n\n/** Context a chat receives when it runs against a subject object. */\nexport type SubjectBindings = AiContext.BindingProps & {\n /** Applied to `chat.instructions` only when the chat has none; reaches the model via the system prompt. */\n instructions?: Ref.Ref<Instructions.Instructions>;\n};\n\n/**\n * Bindings contributed for a chat opened against a subject object — the object a companion chat is\n * attached to, or the object a chat was created for.\n *\n * Every contribution whose `appliesTo` accepts the subject runs and the results are merged, so a\n * type-specific provider adds to the default rather than replacing it. Invoked by\n * `AssistantOperation.BindChatContext`, which provides `Database.Service` for the subject's space and\n * declares `Registry.Service` for skills resolved out of the hypergraph registry.\n */\nexport type SubjectContext = {\n /** Whether this provider applies to the subject. Absent ⇒ applies to every subject. */\n appliesTo?: (subject: Obj.Unknown) => boolean;\n getBindings: (params: {\n subject: Obj.Unknown;\n chat: Chat.Chat;\n }) => Effect.Effect<SubjectBindings, Error, Database.Service | Registry.Service>;\n};\n\nexport const SubjectContext = Capability.make<SubjectContext>()(`${meta.profile.key}.capability.subjectContext`);\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAwBA,IAAa,WAAW,WAAW,cAAiD,CAAC,CACnF,GAAG,KAAK,QAAQ,IAAI,qBACtB;AAEA,IAAa,gBAAgB,WAAW,cAA8B,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,0BAA0B;AAEtH,IAAa,cAAc,OAAO,OAAO;;CAEvC,aAAa,OAAO,OAAO,OAAO,QAAQ,OAAO,YAAY,OAAO,MAAM,CAAC;;CAE3E,gBAAgB,OAAO,OAAO,OAAO,QAAQ,OAAO,YAAY,OAAO,MAAM,CAAC;AAChF,CAAC,CAAC,CAAC,UAAU,OAAO,IAAI,OAAO,UAAU,CAAC;AAI1C,IAAa,QAAQ,WAAW,cAA6C,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,kBAAkB;;AAGrH,IAAa,qBAAqB,WAAW,cAAsE,CAAC,CAClH,GAAG,KAAK,QAAQ,IAAI,+BACtB;AAEA,IAAa,6BAA6B,OAAO,OAC/C,OAAO,QACP,OAAO,WACL,OAAO,OAAO;;CAEZ,aAAa,OAAO;;CAEpB,SAAS,OAAO,MAAM,OAAO,MAAM;;CAEnC,aAAa,OAAO,SAAS,OAAO,MAAM;AAC5C,CAAC,CACH,CACF;;AAIA,IAAa,uBAAuB,WAAW,cAAmD,CAAC,CACjG,GAAG,KAAK,QAAQ,IAAI,iCACtB;;;;;;;;;AAUA,IAAa,oBAAoB,WAAW,KAAuB,CAAC,CAClE,wDACF;AA+BA,IAAa,QAAQ,WAAW,KAAY,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,kBAAkB;;;;;;AAOpF,IAAa,eAAe,WAAW,KAA6B,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,yBAAyB;AA0BnH,IAAa,iBAAiB,WAAW,KAAqB,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,2BAA2B"}
@@ -1,19 +1,25 @@
1
1
  import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
2
  import * as Capability from "@dxos/app-framework/Capability";
3
- import { Chat } from "@dxos/assistant-toolkit";
4
- import { DXN } from "@dxos/keys";
3
+ import * as Chat from "@dxos/assistant/Chat";
5
4
  import { Database, Obj, Ref, Registry, Type } from "@dxos/echo";
5
+ import { DXN as DXN$1 } from "@dxos/keys";
6
6
  import { AiService } from "@dxos/ai";
7
+ import { ContentBlock, Task } from "@dxos/types";
8
+ import * as AgentService from "@dxos/compute/AgentService";
7
9
  import * as Operation from "@dxos/compute/Operation";
10
+ import * as Trace from "@dxos/compute/Trace";
8
11
  import * as Schema from "effect/Schema";
9
12
  import * as Instructions from "@dxos/compute/Instructions";
10
13
  //#region src/types/AssistantOperation.ts
11
14
  var AssistantOperation_exports = /* @__PURE__ */ __exportAll({
15
+ AnswerQuestion: () => AnswerQuestion,
12
16
  BindChatContext: () => BindChatContext,
13
17
  CreateChat: () => CreateChat,
14
18
  EnsureCompanionChat: () => EnsureCompanionChat,
15
19
  ForkChat: () => ForkChat,
16
20
  GenerateHomeSuggestions: () => GenerateHomeSuggestions,
21
+ RespondToRequest: () => RespondToRequest,
22
+ RunPromptInChat: () => RunPromptInChat,
17
23
  SetCurrentChat: () => SetCurrentChat,
18
24
  SetTracePanelDebug: () => SetTracePanelDebug,
19
25
  SkillForm: () => SkillForm,
@@ -21,7 +27,7 @@ var AssistantOperation_exports = /* @__PURE__ */ __exportAll({
21
27
  });
22
28
  var CreateChat = Operation.make({
23
29
  meta: {
24
- key: DXN.make("org.dxos.operation.assistant.createChat"),
30
+ key: DXN$1.make("org.dxos.operation.assistant.createChat"),
25
31
  name: "Create Chat",
26
32
  icon: "ph--chat-text--regular"
27
33
  },
@@ -38,7 +44,7 @@ var CreateChat = Operation.make({
38
44
  });
39
45
  var UpdateChatName = Operation.make({
40
46
  meta: {
41
- key: DXN.make("org.dxos.operation.assistant.updateChatName"),
47
+ key: DXN$1.make("org.dxos.operation.assistant.updateChatName"),
42
48
  name: "Update Chat Name",
43
49
  icon: "ph--pencil--regular"
44
50
  },
@@ -52,7 +58,7 @@ var UpdateChatName = Operation.make({
52
58
  });
53
59
  var SetCurrentChat = Operation.make({
54
60
  meta: {
55
- key: DXN.make("org.dxos.operation.assistant.setCurrentChat"),
61
+ key: DXN$1.make("org.dxos.operation.assistant.setCurrentChat"),
56
62
  name: "Set Current Chat",
57
63
  icon: "ph--chat-text--regular"
58
64
  },
@@ -65,7 +71,7 @@ var SetCurrentChat = Operation.make({
65
71
  });
66
72
  var ForkChat = Operation.make({
67
73
  meta: {
68
- key: DXN.make("org.dxos.operation.assistant.forkChat"),
74
+ key: DXN$1.make("org.dxos.operation.assistant.forkChat"),
69
75
  name: "Fork Chat",
70
76
  icon: "ph--git-branch--regular",
71
77
  skipRegistry: true
@@ -86,7 +92,7 @@ var ForkChat = Operation.make({
86
92
  */
87
93
  var BindChatContext = Operation.make({
88
94
  meta: {
89
- key: DXN.make("org.dxos.operation.assistant.bindChatContext"),
95
+ key: DXN$1.make("org.dxos.operation.assistant.bindChatContext"),
90
96
  name: "Bind Chat Context",
91
97
  icon: "ph--link--regular"
92
98
  },
@@ -100,7 +106,7 @@ var BindChatContext = Operation.make({
100
106
  });
101
107
  var EnsureCompanionChat = Operation.make({
102
108
  meta: {
103
- key: DXN.make("org.dxos.operation.assistant.ensureCompanionChat"),
109
+ key: DXN$1.make("org.dxos.operation.assistant.ensureCompanionChat"),
104
110
  name: "Ensure Companion Chat",
105
111
  icon: "ph--chat-text--regular"
106
112
  },
@@ -112,6 +118,101 @@ var EnsureCompanionChat = Operation.make({
112
118
  persisted: Schema.Boolean
113
119
  })
114
120
  });
121
+ /**
122
+ * Runs `prompt` as a turn on an existing chat, for a caller starting one on the chat's behalf
123
+ * (delegation, a routine) rather than a reader typing it.
124
+ *
125
+ * The session is created with the model the chat's own UI would use — resolved from the assistant
126
+ * settings — because `AgentService` binds the model to the agent process at spawn and tears that
127
+ * process down when a later caller asks for a different one. A turn started on any other model
128
+ * therefore interrupts itself the moment the reader opens the chat.
129
+ */
130
+ var RunPromptInChat = Operation.make({
131
+ meta: {
132
+ key: DXN$1.make("org.dxos.operation.assistant.runPromptInChat"),
133
+ name: "Run Prompt in Chat",
134
+ icon: "ph--chat-text--regular",
135
+ skipRegistry: true
136
+ },
137
+ services: [
138
+ Capability.Service,
139
+ Database.Service,
140
+ AgentService.AgentService
141
+ ],
142
+ input: Schema.Struct({
143
+ chat: Schema.optional(Type.getSchema(Chat.Chat)),
144
+ companionTo: Schema.optional(Obj.Unknown),
145
+ prompt: Schema.String,
146
+ /**
147
+ * How the turn is attributed. `synthetic` marks a prompt the system raised on the reader's
148
+ * behalf — a resumed agent must be able to tell one from something a person typed, since only
149
+ * the latter is an instruction it owes an answer to.
150
+ *
151
+ * @default 'user'
152
+ */
153
+ disposition: Schema.optional(ContentBlock.Disposition)
154
+ }),
155
+ output: Schema.Void
156
+ });
157
+ /**
158
+ * Answers a request an agent raised in a chat (allow or refuse a tool call) and hands the choice to the
159
+ * agent waiting on it.
160
+ */
161
+ var RespondToRequest = Operation.make({
162
+ meta: {
163
+ key: DXN$1.make("org.dxos.operation.assistant.respondToRequest"),
164
+ name: "Respond to Request",
165
+ icon: "ph--check-circle--regular",
166
+ skipRegistry: true
167
+ },
168
+ services: [Capability.Service, Database.Service],
169
+ input: Schema.Struct({
170
+ chat: Type.getSchema(Chat.Chat),
171
+ /** The message holding the request block. */
172
+ messageId: Schema.String,
173
+ requestId: Schema.String,
174
+ optionId: Schema.String
175
+ }),
176
+ output: Schema.Struct({
177
+ /** False when nothing was waiting on the request any more (its turn ended, or it was answered). */
178
+ answered: Schema.Boolean })
179
+ });
180
+ /**
181
+ * Records a reader's answer to a question in a task's history and resumes the conversation that
182
+ * asked it.
183
+ *
184
+ * The resume is a synthetic prompt naming the question rather than the answer itself: the answer is
185
+ * already durable in the task's history, and an agent that reads it back there sees the record
186
+ * itself rather than a copy frozen into a message.
187
+ */
188
+ var AnswerQuestion = Operation.make({
189
+ meta: {
190
+ key: DXN$1.make("org.dxos.operation.assistant.answerQuestion"),
191
+ name: "Answer Question",
192
+ description: "Answer a question an agent asked, and resume the conversation that asked it.",
193
+ icon: "ph--question--regular",
194
+ skipRegistry: true
195
+ },
196
+ services: [Database.Service, Trace.TraceService],
197
+ input: Schema.Struct({
198
+ task: Type.getSchema(Task.Task),
199
+ /** Id of the question's entry in the task's history. */
200
+ question: Schema.String,
201
+ answer: Schema.String.annotate({ description: "The chosen option's title, or free-form text." })
202
+ }),
203
+ output: Schema.Struct({
204
+ /**
205
+ * False when the answer was blank, the question is not in the task's history, or it was already
206
+ * answered — nothing was written.
207
+ */
208
+ accepted: Schema.Boolean,
209
+ /**
210
+ * Whether the asking conversation was woken. Separate from `accepted` because the answer is
211
+ * durable either way, and conflating them would show a resumed agent that is still blocked.
212
+ */
213
+ resumed: Schema.Boolean
214
+ })
215
+ }).pipe(Operation.mutation("write"));
115
216
  var SkillForm = Schema.Struct({
116
217
  key: Schema.String,
117
218
  name: Schema.String,
@@ -119,7 +220,7 @@ var SkillForm = Schema.Struct({
119
220
  });
120
221
  var GenerateHomeSuggestions = Operation.make({
121
222
  meta: {
122
- key: DXN.make("org.dxos.operation.assistant.generateHomeSuggestions"),
223
+ key: DXN$1.make("org.dxos.operation.assistant.generateHomeSuggestions"),
123
224
  name: "Generate Home Suggestions",
124
225
  icon: "ph--sparkle--regular",
125
226
  skipRegistry: true
@@ -134,7 +235,7 @@ var GenerateHomeSuggestions = Operation.make({
134
235
  });
135
236
  var SetTracePanelDebug = Operation.make({
136
237
  meta: {
137
- key: DXN.make("org.dxos.operation.assistant.setTracePanelDebug"),
238
+ key: DXN$1.make("org.dxos.operation.assistant.setTracePanelDebug"),
138
239
  name: "Set trace panel debug",
139
240
  description: "Show the trace panel as a raw span tree JSON rather than a commit graph.",
140
241
  icon: "ph--bug--regular"
@@ -144,6 +245,6 @@ var SetTracePanelDebug = Operation.make({
144
245
  output: Schema.Boolean
145
246
  });
146
247
  //#endregion
147
- export { BindChatContext, CreateChat, EnsureCompanionChat, ForkChat, GenerateHomeSuggestions, SetCurrentChat, SetTracePanelDebug, SkillForm, UpdateChatName, AssistantOperation_exports as t };
248
+ export { AnswerQuestion, BindChatContext, CreateChat, EnsureCompanionChat, ForkChat, GenerateHomeSuggestions, RespondToRequest, RunPromptInChat, SetCurrentChat, SetTracePanelDebug, SkillForm, UpdateChatName, AssistantOperation_exports as t };
148
249
 
149
250
  //# sourceMappingURL=AssistantOperation.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantOperation.mjs","names":[],"sources":["../../src/types/AssistantOperation.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { AiService } from '@dxos/ai';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport { Chat } from '@dxos/assistant-toolkit';\nimport * as Instructions from '@dxos/compute/Instructions';\nimport * as Operation from '@dxos/compute/Operation';\nimport { Database, Obj, Ref, Registry, Type } from '@dxos/echo';\nimport { DXN } from '@dxos/keys';\n\nexport const CreateChat = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.createChat'),\n name: 'Create Chat',\n icon: 'ph--chat-text--regular',\n },\n // The chat is returned unfiled, for the caller to add with `SpaceOperation.AddObject` when it wants\n // a durable one. Its feed is added regardless — see the handler.\n services: [Capability.Service, Database.Service],\n input: Schema.Struct({\n name: Schema.optional(Schema.String),\n /**\n * Instructions steering the conversation, rendered into the system prompt at request time.\n * Held by reference so the chat follows later edits to them.\n */\n instructions: Schema.optional(Ref.Ref(Instructions.Instructions)),\n }),\n output: Schema.Struct({\n object: Type.getSchema(Chat.Chat),\n }),\n});\n\nexport const UpdateChatName = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.updateChatName'),\n name: 'Update Chat Name',\n icon: 'ph--pencil--regular',\n },\n services: [Database.Service, AiService.AiService],\n input: Schema.Struct({\n chat: Type.getSchema(Chat.Chat),\n /** Initial user message text; used when the feed has no history yet (e.g. auto-rename on first send). */\n prompt: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n});\n\nexport const SetCurrentChat = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.setCurrentChat'),\n name: 'Set Current Chat',\n icon: 'ph--chat-text--regular',\n },\n services: [Capability.Service],\n input: Schema.Struct({\n companionTo: Obj.Unknown,\n chat: Type.getSchema(Chat.Chat).pipe(Schema.optional),\n }),\n output: Schema.Void,\n});\n\nexport const ForkChat = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.forkChat'),\n name: 'Fork Chat',\n icon: 'ph--git-branch--regular',\n skipRegistry: true,\n },\n services: [Capability.Service, Database.Service],\n input: Schema.Struct({\n chat: Type.getSchema(Chat.Chat),\n /** When provided, the forked chat is set as the companion for this object rather than opened standalone. */\n companionTo: Schema.optional(Obj.Unknown),\n }),\n output: Schema.Struct({\n object: Type.getSchema(Chat.Chat),\n }),\n});\n\n/**\n * Applies every applicable `AssistantCapabilities.SubjectContext` contribution to a chat, binding the\n * subject and whatever else its providers derive from it (annotated skills, a project's instruction\n * objects, ...). Idempotent: `AiContext.Binder.bind` drops refs already in the conversation, so\n * re-running on an existing chat backfills bindings added since it was created.\n */\nexport const BindChatContext = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.bindChatContext'),\n name: 'Bind Chat Context',\n icon: 'ph--link--regular',\n },\n services: [Capability.Service, Registry.Service],\n input: Schema.Struct({\n chat: Type.getSchema(Chat.Chat),\n /** The object the chat runs against — a companion's primary object, or a chat's originating object. */\n subject: Obj.Unknown,\n }),\n output: Schema.Void,\n});\n\nexport const EnsureCompanionChat = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.ensureCompanionChat'),\n name: 'Ensure Companion Chat',\n icon: 'ph--chat-text--regular',\n },\n services: [Capability.Service, Database.Service],\n input: Schema.Struct({\n companionTo: Obj.Unknown,\n }),\n output: Schema.Struct({\n chat: Type.getSchema(Chat.Chat),\n /** Whether the returned chat was already persisted in the space. */\n persisted: Schema.Boolean,\n }),\n});\n\nexport const SkillForm = Schema.Struct({\n key: Schema.String,\n name: Schema.String,\n description: Schema.optional(Schema.String),\n});\n\nexport const GenerateHomeSuggestions = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.generateHomeSuggestions'),\n name: 'Generate Home Suggestions',\n icon: 'ph--sparkle--regular',\n // Internal UI operation — not exposed as an agent tool.\n skipRegistry: true,\n },\n services: [Capability.Service, AiService.AiService, Database.Service],\n input: Schema.Struct({}),\n output: Schema.Struct({ prompts: Schema.Array(Schema.String) }),\n});\n\nexport const SetTracePanelDebug = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.setTracePanelDebug'),\n name: 'Set trace panel debug',\n description: 'Show the trace panel as a raw span tree JSON rather than a commit graph.',\n icon: 'ph--bug--regular',\n },\n services: [Capability.Service],\n // Required: a caller that omitted it used to get a flip, which made the result depend on state the\n // caller had not read — two calls racing would land wherever the interleaving left them.\n input: Schema.Struct({\n state: Schema.Boolean,\n }),\n output: Schema.Boolean,\n});\n"],"mappings":"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"}
1
+ {"version":3,"file":"AssistantOperation.mjs","names":[],"sources":["../../src/types/AssistantOperation.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { AiService } from '@dxos/ai';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as Chat from '@dxos/assistant/Chat';\nimport * as AgentService from '@dxos/compute/AgentService';\nimport * as Instructions from '@dxos/compute/Instructions';\nimport * as Operation from '@dxos/compute/Operation';\nimport * as Trace from '@dxos/compute/Trace';\nimport { Database, Obj, Ref, Registry, Type } from '@dxos/echo';\nimport { DXN } from '@dxos/keys';\nimport { ContentBlock, Task } from '@dxos/types';\n\nexport const CreateChat = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.createChat'),\n name: 'Create Chat',\n icon: 'ph--chat-text--regular',\n },\n // The chat is returned unfiled, for the caller to add with `SpaceOperation.AddObject` when it wants\n // a durable one. Its feed is added regardless — see the handler.\n services: [Capability.Service, Database.Service],\n input: Schema.Struct({\n name: Schema.optional(Schema.String),\n /**\n * Instructions steering the conversation, rendered into the system prompt at request time.\n * Held by reference so the chat follows later edits to them.\n */\n instructions: Schema.optional(Ref.Ref(Instructions.Instructions)),\n }),\n output: Schema.Struct({\n object: Type.getSchema(Chat.Chat),\n }),\n});\n\nexport const UpdateChatName = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.updateChatName'),\n name: 'Update Chat Name',\n icon: 'ph--pencil--regular',\n },\n services: [Database.Service, AiService.AiService],\n input: Schema.Struct({\n chat: Type.getSchema(Chat.Chat),\n /** Initial user message text; used when the feed has no history yet (e.g. auto-rename on first send). */\n prompt: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n});\n\nexport const SetCurrentChat = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.setCurrentChat'),\n name: 'Set Current Chat',\n icon: 'ph--chat-text--regular',\n },\n services: [Capability.Service],\n input: Schema.Struct({\n companionTo: Obj.Unknown,\n chat: Type.getSchema(Chat.Chat).pipe(Schema.optional),\n }),\n output: Schema.Void,\n});\n\nexport const ForkChat = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.forkChat'),\n name: 'Fork Chat',\n icon: 'ph--git-branch--regular',\n skipRegistry: true,\n },\n services: [Capability.Service, Database.Service],\n input: Schema.Struct({\n chat: Type.getSchema(Chat.Chat),\n /** When provided, the forked chat is set as the companion for this object rather than opened standalone. */\n companionTo: Schema.optional(Obj.Unknown),\n }),\n output: Schema.Struct({\n object: Type.getSchema(Chat.Chat),\n }),\n});\n\n/**\n * Applies every applicable `AssistantCapabilities.SubjectContext` contribution to a chat, binding the\n * subject and whatever else its providers derive from it (annotated skills, a project's instruction\n * objects, ...). Idempotent: `AiContext.Binder.bind` drops refs already in the conversation, so\n * re-running on an existing chat backfills bindings added since it was created.\n */\nexport const BindChatContext = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.bindChatContext'),\n name: 'Bind Chat Context',\n icon: 'ph--link--regular',\n },\n services: [Capability.Service, Registry.Service],\n input: Schema.Struct({\n chat: Type.getSchema(Chat.Chat),\n /** The object the chat runs against — a companion's primary object, or a chat's originating object. */\n subject: Obj.Unknown,\n }),\n output: Schema.Void,\n});\n\nexport const EnsureCompanionChat = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.ensureCompanionChat'),\n name: 'Ensure Companion Chat',\n icon: 'ph--chat-text--regular',\n },\n services: [Capability.Service, Database.Service],\n input: Schema.Struct({\n companionTo: Obj.Unknown,\n }),\n output: Schema.Struct({\n chat: Type.getSchema(Chat.Chat),\n /** Whether the returned chat was already persisted in the space. */\n persisted: Schema.Boolean,\n }),\n});\n\n/**\n * Runs `prompt` as a turn on an existing chat, for a caller starting one on the chat's behalf\n * (delegation, a routine) rather than a reader typing it.\n *\n * The session is created with the model the chat's own UI would use — resolved from the assistant\n * settings — because `AgentService` binds the model to the agent process at spawn and tears that\n * process down when a later caller asks for a different one. A turn started on any other model\n * therefore interrupts itself the moment the reader opens the chat.\n */\nexport const RunPromptInChat = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.runPromptInChat'),\n name: 'Run Prompt in Chat',\n icon: 'ph--chat-text--regular',\n // An agent already runs inside a session; handing it one that starts another is a footgun.\n skipRegistry: true,\n },\n services: [Capability.Service, Database.Service, AgentService.AgentService],\n input: Schema.Struct({\n chat: Schema.optional(Type.getSchema(Chat.Chat)),\n // The object whose companion chat should run the prompt — the way to name a companion chat that\n // has not been persisted yet, which a caller outside the page (an agent) cannot hold.\n companionTo: Schema.optional(Obj.Unknown),\n prompt: Schema.String,\n /**\n * How the turn is attributed. `synthetic` marks a prompt the system raised on the reader's\n * behalf — a resumed agent must be able to tell one from something a person typed, since only\n * the latter is an instruction it owes an answer to.\n *\n * @default 'user'\n */\n disposition: Schema.optional(ContentBlock.Disposition),\n }),\n output: Schema.Void,\n});\n\n/**\n * Answers a request an agent raised in a chat (allow or refuse a tool call) and hands the choice to the\n * agent waiting on it.\n */\nexport const RespondToRequest = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.respondToRequest'),\n name: 'Respond to Request',\n icon: 'ph--check-circle--regular',\n // Kept off every agent's tool surface: an agent must never be able to answer its own request.\n skipRegistry: true,\n },\n services: [Capability.Service, Database.Service],\n input: Schema.Struct({\n chat: Type.getSchema(Chat.Chat),\n /** The message holding the request block. */\n messageId: Schema.String,\n requestId: Schema.String,\n optionId: Schema.String,\n }),\n output: Schema.Struct({\n /** False when nothing was waiting on the request any more (its turn ended, or it was answered). */\n answered: Schema.Boolean,\n }),\n});\n\n/**\n * Records a reader's answer to a question in a task's history and resumes the conversation that\n * asked it.\n *\n * The resume is a synthetic prompt naming the question rather than the answer itself: the answer is\n * already durable in the task's history, and an agent that reads it back there sees the record\n * itself rather than a copy frozen into a message.\n */\nexport const AnswerQuestion = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.answerQuestion'),\n name: 'Answer Question',\n description: 'Answer a question an agent asked, and resume the conversation that asked it.',\n icon: 'ph--question--regular',\n // The asker is the agent; handing it the tool to answer itself is a footgun.\n skipRegistry: true,\n },\n // Not `Capability.Service`: the resume goes through `RunPromptInChat`, which declares the\n // services it needs itself, so requiring them here too would fail a caller that only records.\n services: [Database.Service, Trace.TraceService],\n input: Schema.Struct({\n task: Type.getSchema(Task.Task),\n /** Id of the question's entry in the task's history. */\n question: Schema.String,\n answer: Schema.String.annotate({ description: \"The chosen option's title, or free-form text.\" }),\n }),\n output: Schema.Struct({\n /**\n * False when the answer was blank, the question is not in the task's history, or it was already\n * answered — nothing was written.\n */\n accepted: Schema.Boolean,\n /**\n * Whether the asking conversation was woken. Separate from `accepted` because the answer is\n * durable either way, and conflating them would show a resumed agent that is still blocked.\n */\n resumed: Schema.Boolean,\n }),\n}).pipe(Operation.mutation('write'));\n\nexport const SkillForm = Schema.Struct({\n key: Schema.String,\n name: Schema.String,\n description: Schema.optional(Schema.String),\n});\n\nexport const GenerateHomeSuggestions = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.generateHomeSuggestions'),\n name: 'Generate Home Suggestions',\n icon: 'ph--sparkle--regular',\n // Internal UI operation — not exposed as an agent tool.\n skipRegistry: true,\n },\n services: [Capability.Service, AiService.AiService, Database.Service],\n input: Schema.Struct({}),\n output: Schema.Struct({ prompts: Schema.Array(Schema.String) }),\n});\n\nexport const SetTracePanelDebug = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.assistant.setTracePanelDebug'),\n name: 'Set trace panel debug',\n description: 'Show the trace panel as a raw span tree JSON rather than a commit graph.',\n icon: 'ph--bug--regular',\n },\n services: [Capability.Service],\n // Required: a caller that omitted it used to get a flip, which made the result depend on state the\n // caller had not read — two calls racing would land wherever the interleaving left them.\n input: Schema.Struct({\n state: Schema.Boolean,\n }),\n output: Schema.Boolean,\n});\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantOptions.mjs","names":[],"sources":["../../src/types/AssistantOptions.ts"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport type { AiService } from '@dxos/ai';\n\nexport interface AssistantPluginOptions {\n aiServiceMiddleware?: (aiService: AiService.Service) => AiService.Service;\n\n /**\n * Whether creation is offered for the unfinished types (`Agent`, `Sequence`) — default true, off in\n * the curated set, which must not advertise a type it cannot yet do anything useful with.\n */\n experimentalTypes?: boolean;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"AssistantOptions.mjs","names":[],"sources":["../../src/types/AssistantOptions.ts"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport type { MakeTurnProducer } from '@dxos/agent-runtime';\nimport type { AiService } from '@dxos/ai';\nimport type * as CapabilityManager from '@dxos/app-framework/CapabilityManager';\n\nexport interface AssistantPluginOptions {\n aiServiceMiddleware?: (aiService: AiService.Service) => AiService.Service;\n\n /**\n * Whether creation is offered for the unfinished types (`Agent`, `Sequence`) — default true, off in\n * the curated set, which must not advertise a type it cannot yet do anything useful with.\n */\n experimentalTypes?: boolean;\n\n /**\n * Builds the turn engine used when the user enables `Settings.codeMode`; injected by the host\n * because the code-mode package is not published. Handed the app's capabilities so the host can\n * reach what its sandbox needs (e.g. the client's services). Without it the setting has no effect.\n */\n codeModeTurnProducer?: (capabilities: CapabilityManager.CapabilityManager) => MakeTurnProducer;\n}\n"],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
- import { DXN, Ref, Type } from "@dxos/echo";
2
+ import { Annotation, DXN, Ref, Type } from "@dxos/echo";
3
3
  import * as Operation from "@dxos/compute/Operation";
4
4
  import * as Schema from "effect/Schema";
5
5
  import { ComputeGraph } from "@dxos/conductor";
@@ -63,7 +63,7 @@ var ServiceType = class extends Type.makeObject(DXN.make("org.dxos.type.service"
63
63
  * Entries exposed: functions, workflows, and APIs.
64
64
  */
65
65
  interfaces: Schema.optional(Schema.Array(ServiceInterface))
66
- })) {};
66
+ }).pipe(Annotation.UserType.set())) {};
67
67
  var categoryIcons = {
68
68
  finance: "ph--bank--regular",
69
69
  health: "ph--heart--regular",
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantService.mjs","names":[],"sources":["../../src/types/AssistantService.ts"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport * as Operation from '@dxos/compute/Operation';\nimport { ComputeGraph } from '@dxos/conductor';\nimport { DXN, Ref, Type } from '@dxos/echo';\n\n// TODO(burdon): Factor out and reconcile with https://github.com/dxos/dxos/blob/main/packages/plugins/plugin-token-manager/src/defs/presets.ts#L7\n\nconst ApiAuthorizationKey = Schema.Struct({\n type: Schema.Literal('api-key'),\n key: Schema.String,\n placement: Schema.Union([\n Schema.Struct({\n type: Schema.Literal('authorization-header'),\n }),\n Schema.Struct({\n type: Schema.Literal('query'),\n name: Schema.String,\n }),\n ]),\n});\n\nconst ApiAuthorizationOauth = Schema.Struct({\n type: Schema.Literal('oauth'),\n clientId: Schema.String,\n clientSecret: Schema.String,\n tokenUrl: Schema.String,\n grantType: Schema.String,\n});\n\nexport const ApiAuthorization = Schema.Union([ApiAuthorizationKey, ApiAuthorizationOauth]);\nexport type ApiAuthorization = Schema.Schema.Type<typeof ApiAuthorization>;\n\nconst ServiceInterfaceFunction = Schema.Struct({\n kind: Schema.Literal('function'),\n fn: Ref.Ref(Operation.PersistentOperation),\n});\n\nconst ServiceInterfaceWorkflow = Schema.Struct({\n kind: Schema.Literal('workflow'),\n workflow: Ref.Ref(ComputeGraph),\n});\n\nconst ServiceInterfaceApi = Schema.Struct({\n kind: Schema.Literal('api'),\n\n /**\n * URL to fetch the openapi schema.\n */\n schemaUrl: Schema.optional(Schema.String),\n\n /**\n * Inlined openapi schema.\n */\n schema: Schema.optional(Schema.Any),\n\n /**\n * Authorization configuration if required.\n */\n authorization: Schema.optional(ApiAuthorization),\n});\n\nconst ServiceInterface = Schema.Union([\n // Service types.\n ServiceInterfaceFunction,\n ServiceInterfaceWorkflow,\n ServiceInterfaceApi,\n]);\n\nexport type ServiceInterface = Schema.Schema.Type<typeof ServiceInterface>;\n\nexport class ServiceType extends Type.makeObject<ServiceType>(DXN.make('org.dxos.type.service', '0.1.0'))(\n Schema.Struct({\n serviceId: Schema.String,\n name: Schema.optional(Schema.String),\n description: Schema.optional(Schema.String),\n category: Schema.optional(Schema.String),\n enabled: Schema.optional(Schema.Boolean),\n\n /**\n * Entries exposed: functions, workflows, and APIs.\n */\n interfaces: Schema.optional(Schema.Array(ServiceInterface)),\n }),\n) {}\n\n//\n// Service Registry\n//\n\nexport interface BaseServiceRegistry {\n queryServices(query?: ServiceQuery): Promise<ServiceType[]>;\n}\n\nexport type ServiceQuery = {\n name?: string;\n category?: string;\n};\n\nexport const categoryIcons: Record<string, string> = {\n finance: 'ph--bank--regular',\n health: 'ph--heart--regular',\n geolocation: 'ph--globe-simple--regular',\n education: 'ph--books--regular',\n entertainment: 'ph--music-notes--regular',\n shopping: 'ph--shopping-cart--regular',\n travel: 'ph--airplane-takeoff--regular',\n utilities: 'ph--lightning--regular',\n weather: 'ph--cloud-rain--regular',\n} as const;\n"],"mappings":";;;;;;;;;;;AAYA,IAAM,sBAAsB,OAAO,OAAO;CACxC,MAAM,OAAO,QAAQ,SAAS;CAC9B,KAAK,OAAO;CACZ,WAAW,OAAO,MAAM,CACtB,OAAO,OAAO,EACZ,MAAM,OAAO,QAAQ,sBAAsB,EAC7C,CAAC,GACD,OAAO,OAAO;EACZ,MAAM,OAAO,QAAQ,OAAO;EAC5B,MAAM,OAAO;CACf,CAAC,CACH,CAAC;AACH,CAAC;AAED,IAAM,wBAAwB,OAAO,OAAO;CAC1C,MAAM,OAAO,QAAQ,OAAO;CAC5B,UAAU,OAAO;CACjB,cAAc,OAAO;CACrB,UAAU,OAAO;CACjB,WAAW,OAAO;AACpB,CAAC;AAED,IAAa,mBAAmB,OAAO,MAAM,CAAC,qBAAqB,qBAAqB,CAAC;AAGzF,IAAM,2BAA2B,OAAO,OAAO;CAC7C,MAAM,OAAO,QAAQ,UAAU;CAC/B,IAAI,IAAI,IAAI,UAAU,mBAAmB;AAC3C,CAAC;AAED,IAAM,2BAA2B,OAAO,OAAO;CAC7C,MAAM,OAAO,QAAQ,UAAU;CAC/B,UAAU,IAAI,IAAI,YAAY;AAChC,CAAC;AAED,IAAM,sBAAsB,OAAO,OAAO;CACxC,MAAM,OAAO,QAAQ,KAAK;;;;CAK1B,WAAW,OAAO,SAAS,OAAO,MAAM;;;;CAKxC,QAAQ,OAAO,SAAS,OAAO,GAAG;;;;CAKlC,eAAe,OAAO,SAAS,gBAAgB;AACjD,CAAC;AAED,IAAM,mBAAmB,OAAO,MAAM;CAEpC;CACA;CACA;AACF,CAAC;AAID,IAAa,cAAb,cAAiC,KAAK,WAAwB,IAAI,KAAK,yBAAyB,OAAO,CAAC,CAAC,CACvG,OAAO,OAAO;CACZ,WAAW,OAAO;CAClB,MAAM,OAAO,SAAS,OAAO,MAAM;CACnC,aAAa,OAAO,SAAS,OAAO,MAAM;CAC1C,UAAU,OAAO,SAAS,OAAO,MAAM;CACvC,SAAS,OAAO,SAAS,OAAO,OAAO;;;;CAKvC,YAAY,OAAO,SAAS,OAAO,MAAM,gBAAgB,CAAC;AAC5D,CAAC,CACH,CAAC,CAAC,CAAC;AAeH,IAAa,gBAAwC;CACnD,SAAS;CACT,QAAQ;CACR,aAAa;CACb,WAAW;CACX,eAAe;CACf,UAAU;CACV,QAAQ;CACR,WAAW;CACX,SAAS;AACX"}
1
+ {"version":3,"file":"AssistantService.mjs","names":[],"sources":["../../src/types/AssistantService.ts"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport * as Operation from '@dxos/compute/Operation';\nimport { ComputeGraph } from '@dxos/conductor';\nimport { Annotation, DXN, Ref, Type } from '@dxos/echo';\n\n// TODO(burdon): Factor out and reconcile with https://github.com/dxos/dxos/blob/main/packages/plugins/plugin-token-manager/src/defs/presets.ts#L7\n\nconst ApiAuthorizationKey = Schema.Struct({\n type: Schema.Literal('api-key'),\n key: Schema.String,\n placement: Schema.Union([\n Schema.Struct({\n type: Schema.Literal('authorization-header'),\n }),\n Schema.Struct({\n type: Schema.Literal('query'),\n name: Schema.String,\n }),\n ]),\n});\n\nconst ApiAuthorizationOauth = Schema.Struct({\n type: Schema.Literal('oauth'),\n clientId: Schema.String,\n clientSecret: Schema.String,\n tokenUrl: Schema.String,\n grantType: Schema.String,\n});\n\nexport const ApiAuthorization = Schema.Union([ApiAuthorizationKey, ApiAuthorizationOauth]);\nexport type ApiAuthorization = Schema.Schema.Type<typeof ApiAuthorization>;\n\nconst ServiceInterfaceFunction = Schema.Struct({\n kind: Schema.Literal('function'),\n fn: Ref.Ref(Operation.PersistentOperation),\n});\n\nconst ServiceInterfaceWorkflow = Schema.Struct({\n kind: Schema.Literal('workflow'),\n workflow: Ref.Ref(ComputeGraph),\n});\n\nconst ServiceInterfaceApi = Schema.Struct({\n kind: Schema.Literal('api'),\n\n /**\n * URL to fetch the openapi schema.\n */\n schemaUrl: Schema.optional(Schema.String),\n\n /**\n * Inlined openapi schema.\n */\n schema: Schema.optional(Schema.Any),\n\n /**\n * Authorization configuration if required.\n */\n authorization: Schema.optional(ApiAuthorization),\n});\n\nconst ServiceInterface = Schema.Union([\n // Service types.\n ServiceInterfaceFunction,\n ServiceInterfaceWorkflow,\n ServiceInterfaceApi,\n]);\n\nexport type ServiceInterface = Schema.Schema.Type<typeof ServiceInterface>;\n\nexport class ServiceType extends Type.makeObject<ServiceType>(DXN.make('org.dxos.type.service', '0.1.0'))(\n Schema.Struct({\n serviceId: Schema.String,\n name: Schema.optional(Schema.String),\n description: Schema.optional(Schema.String),\n category: Schema.optional(Schema.String),\n enabled: Schema.optional(Schema.Boolean),\n\n /**\n * Entries exposed: functions, workflows, and APIs.\n */\n interfaces: Schema.optional(Schema.Array(ServiceInterface)),\n }).pipe(Annotation.UserType.set()),\n) {}\n\n//\n// Service Registry\n//\n\nexport interface BaseServiceRegistry {\n queryServices(query?: ServiceQuery): Promise<ServiceType[]>;\n}\n\nexport type ServiceQuery = {\n name?: string;\n category?: string;\n};\n\nexport const categoryIcons: Record<string, string> = {\n finance: 'ph--bank--regular',\n health: 'ph--heart--regular',\n geolocation: 'ph--globe-simple--regular',\n education: 'ph--books--regular',\n entertainment: 'ph--music-notes--regular',\n shopping: 'ph--shopping-cart--regular',\n travel: 'ph--airplane-takeoff--regular',\n utilities: 'ph--lightning--regular',\n weather: 'ph--cloud-rain--regular',\n} as const;\n"],"mappings":";;;;;;;;;;;AAYA,IAAM,sBAAsB,OAAO,OAAO;CACxC,MAAM,OAAO,QAAQ,SAAS;CAC9B,KAAK,OAAO;CACZ,WAAW,OAAO,MAAM,CACtB,OAAO,OAAO,EACZ,MAAM,OAAO,QAAQ,sBAAsB,EAC7C,CAAC,GACD,OAAO,OAAO;EACZ,MAAM,OAAO,QAAQ,OAAO;EAC5B,MAAM,OAAO;CACf,CAAC,CACH,CAAC;AACH,CAAC;AAED,IAAM,wBAAwB,OAAO,OAAO;CAC1C,MAAM,OAAO,QAAQ,OAAO;CAC5B,UAAU,OAAO;CACjB,cAAc,OAAO;CACrB,UAAU,OAAO;CACjB,WAAW,OAAO;AACpB,CAAC;AAED,IAAa,mBAAmB,OAAO,MAAM,CAAC,qBAAqB,qBAAqB,CAAC;AAGzF,IAAM,2BAA2B,OAAO,OAAO;CAC7C,MAAM,OAAO,QAAQ,UAAU;CAC/B,IAAI,IAAI,IAAI,UAAU,mBAAmB;AAC3C,CAAC;AAED,IAAM,2BAA2B,OAAO,OAAO;CAC7C,MAAM,OAAO,QAAQ,UAAU;CAC/B,UAAU,IAAI,IAAI,YAAY;AAChC,CAAC;AAED,IAAM,sBAAsB,OAAO,OAAO;CACxC,MAAM,OAAO,QAAQ,KAAK;;;;CAK1B,WAAW,OAAO,SAAS,OAAO,MAAM;;;;CAKxC,QAAQ,OAAO,SAAS,OAAO,GAAG;;;;CAKlC,eAAe,OAAO,SAAS,gBAAgB;AACjD,CAAC;AAED,IAAM,mBAAmB,OAAO,MAAM;CAEpC;CACA;CACA;AACF,CAAC;AAID,IAAa,cAAb,cAAiC,KAAK,WAAwB,IAAI,KAAK,yBAAyB,OAAO,CAAC,CAAC,CACvG,OAAO,OAAO;CACZ,WAAW,OAAO;CAClB,MAAM,OAAO,SAAS,OAAO,MAAM;CACnC,aAAa,OAAO,SAAS,OAAO,MAAM;CAC1C,UAAU,OAAO,SAAS,OAAO,MAAM;CACvC,SAAS,OAAO,SAAS,OAAO,OAAO;;;;CAKvC,YAAY,OAAO,SAAS,OAAO,MAAM,gBAAgB,CAAC;AAC5D,CAAC,CAAC,CAAC,KAAK,WAAW,SAAS,IAAI,CAAC,CACnC,CAAC,CAAC,CAAC;AAeH,IAAa,gBAAwC;CACnD,SAAS;CACT,QAAQ;CACR,aAAa;CACb,WAAW;CACX,eAAe;CACf,UAAU;CACV,QAAQ;CACR,WAAW;CACX,SAAS;AACX"}
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantSkill.mjs","names":[],"sources":["../../src/skills/assistant/AssistantSkill.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as LayoutOperation from '@dxos/app-toolkit/LayoutOperation';\nimport * as NavigationOperation from '@dxos/app-toolkit/NavigationOperation';\nimport { templates } from '@dxos/assistant';\nimport * as Skill from '@dxos/compute/Skill';\n\nexport const key = 'org.dxos.skill.assistant';\n\nexport const make = (): Skill.Skill =>\n Skill.make({\n key,\n name: 'Assistant',\n tools: Skill.toolDefinitions({\n // TODO(wittjosiah): LayoutOperation.Open requires Capability.Service which is only available\n // via the compute-runtime layer (plugin-routine). Once Capability.Service is propagated\n // through the process operation runtime, this will work without the compute-runtime dependency.\n operations: [LayoutOperation.Open, NavigationOperation.ResolveNavigationTargets],\n }),\n instructions: templates.system,\n });\n"],"mappings":";;;;;;;;;;AASA,IAAa,MAAM;AAEnB,IAAa,aACX,MAAM,KAAK;CACT;CACA,MAAM;CACN,OAAO,MAAM,gBAAgB,EAI3B,YAAY,CAAC,gBAAgB,MAAM,oBAAoB,wBAAwB,EACjF,CAAC;CACD,cAAc,UAAU;AAC1B,CAAC"}
1
+ {"version":3,"file":"AssistantSkill.mjs","names":[],"sources":["../../src/skills/assistant/AssistantSkill.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as LayoutOperation from '@dxos/app-toolkit/LayoutOperation';\nimport * as NavigationOperation from '@dxos/app-toolkit/NavigationOperation';\nimport { templates } from '@dxos/assistant';\nimport * as Skill from '@dxos/compute/Skill';\n\nexport const key = 'org.dxos.skill.assistant';\n\nexport const make = (): Skill.Skill =>\n Skill.make({\n key,\n name: 'Assistant',\n tools: Skill.toolDefinitions({\n // TODO(wittjosiah): LayoutOperation.Open requires Capability.Service which is only available\n // via the compute-runtime layer (plugin-routine). Once Capability.Service is propagated\n // through the process operation runtime, this will work without the compute-runtime dependency.\n operations: [LayoutOperation.Open, NavigationOperation.ResolveNavigationTargets],\n }),\n instructions: templates.system,\n });\n"],"mappings":";;;;;;;;;;AAWA,IAAa,MAAM;AAEnB,IAAa,aACX,MAAM,KAAK;CACT;CACA,MAAM;CACN,OAAO,MAAM,gBAAgB,EAI3B,YAAY,CAAC,gBAAgB,MAAM,oBAAoB,wBAAwB,EACjF,CAAC;CACD,cAAc,UAAU;AAC1B,CAAC"}