@dxos/assistant-toolkit 0.8.4-main.c85a9c8dae → 0.8.4-main.d05539e30a

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 (509) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/add-artifact-4IVGW6CI.mjs +30 -0
  3. package/dist/lib/neutral/add-artifact-4IVGW6CI.mjs.map +7 -0
  4. package/dist/lib/neutral/agent-F4L7UXME.mjs +65 -0
  5. package/dist/lib/neutral/agent-F4L7UXME.mjs.map +7 -0
  6. package/dist/lib/neutral/chunk-5GPL2WXU.mjs +292 -0
  7. package/dist/lib/neutral/chunk-5GPL2WXU.mjs.map +7 -0
  8. package/dist/lib/neutral/chunk-7UCYAP3T.mjs +332 -0
  9. package/dist/lib/neutral/chunk-7UCYAP3T.mjs.map +7 -0
  10. package/dist/lib/neutral/chunk-ANSF2BHN.mjs +67 -0
  11. package/dist/lib/neutral/chunk-ANSF2BHN.mjs.map +7 -0
  12. package/dist/lib/neutral/chunk-BCT55UTL.mjs +75 -0
  13. package/dist/lib/neutral/chunk-BCT55UTL.mjs.map +7 -0
  14. package/dist/lib/neutral/chunk-COL54UJ3.mjs +60 -0
  15. package/dist/lib/neutral/chunk-COL54UJ3.mjs.map +7 -0
  16. package/dist/lib/neutral/chunk-EJAQUAKM.mjs +73 -0
  17. package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-KGU725LW.mjs +29 -0
  19. package/dist/lib/neutral/chunk-KGU725LW.mjs.map +7 -0
  20. package/dist/lib/neutral/chunk-KS3IA6FQ.mjs +101 -0
  21. package/dist/lib/neutral/chunk-KS3IA6FQ.mjs.map +7 -0
  22. package/dist/lib/neutral/chunk-MMQ7HFL4.mjs +107 -0
  23. package/dist/lib/neutral/chunk-MMQ7HFL4.mjs.map +7 -0
  24. package/dist/lib/neutral/chunk-NR3GTWRC.mjs +53 -0
  25. package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +7 -0
  26. package/dist/lib/neutral/chunk-PLGEBNTO.mjs +65 -0
  27. package/dist/lib/neutral/chunk-PLGEBNTO.mjs.map +7 -0
  28. package/dist/lib/neutral/chunk-W2722TC5.mjs +70 -0
  29. package/dist/lib/neutral/chunk-W2722TC5.mjs.map +7 -0
  30. package/dist/lib/neutral/chunk-WLR3BGO4.mjs +25 -0
  31. package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +7 -0
  32. package/dist/lib/neutral/chunk-ZFXLTBZG.mjs +73 -0
  33. package/dist/lib/neutral/chunk-ZFXLTBZG.mjs.map +7 -0
  34. package/dist/lib/neutral/context-add-S5MBW2NA.mjs +22 -0
  35. package/dist/lib/neutral/context-add-S5MBW2NA.mjs.map +7 -0
  36. package/dist/lib/neutral/context-remove-35O5T5N5.mjs +22 -0
  37. package/dist/lib/neutral/context-remove-35O5T5N5.mjs.map +7 -0
  38. package/dist/lib/neutral/create-project-3AGXJ4TD.mjs +35 -0
  39. package/dist/lib/neutral/create-project-3AGXJ4TD.mjs.map +7 -0
  40. package/dist/lib/neutral/delete-J3PMWP7Z.mjs +19 -0
  41. package/dist/lib/neutral/delete-J3PMWP7Z.mjs.map +7 -0
  42. package/dist/lib/neutral/enable-blueprints-IVKST3WH.mjs +47 -0
  43. package/dist/lib/neutral/enable-blueprints-IVKST3WH.mjs.map +7 -0
  44. package/dist/lib/neutral/fetch-KHMHV7JR.mjs +16 -0
  45. package/dist/lib/neutral/fetch-KHMHV7JR.mjs.map +7 -0
  46. package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs +139 -0
  47. package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs.map +7 -0
  48. package/dist/lib/neutral/get-context-FBYWIP72.mjs +35 -0
  49. package/dist/lib/neutral/get-context-FBYWIP72.mjs.map +7 -0
  50. package/dist/lib/neutral/index.mjs +598 -3312
  51. package/dist/lib/neutral/index.mjs.map +4 -4
  52. package/dist/lib/neutral/load-GAT3T2AD.mjs +17 -0
  53. package/dist/lib/neutral/load-GAT3T2AD.mjs.map +7 -0
  54. package/dist/lib/neutral/meta.json +1 -1
  55. package/dist/lib/neutral/object-create-PL3WRP74.mjs +35 -0
  56. package/dist/lib/neutral/object-create-PL3WRP74.mjs.map +7 -0
  57. package/dist/lib/neutral/object-delete-PZJQN5KW.mjs +18 -0
  58. package/dist/lib/neutral/object-delete-PZJQN5KW.mjs.map +7 -0
  59. package/dist/lib/neutral/object-update-R43N3VJX.mjs +28 -0
  60. package/dist/lib/neutral/object-update-R43N3VJX.mjs.map +7 -0
  61. package/dist/lib/neutral/project-VVXXUMAI.mjs +23 -0
  62. package/dist/lib/neutral/project-VVXXUMAI.mjs.map +7 -0
  63. package/dist/lib/neutral/project-rules-KSVSOZJV.mjs +78 -0
  64. package/dist/lib/neutral/project-rules-KSVSOZJV.mjs.map +7 -0
  65. package/dist/lib/neutral/prompt-INL55Q2B.mjs +170 -0
  66. package/dist/lib/neutral/prompt-INL55Q2B.mjs.map +7 -0
  67. package/dist/lib/neutral/qualifier-DAF4H7V3.mjs +88 -0
  68. package/dist/lib/neutral/qualifier-DAF4H7V3.mjs.map +7 -0
  69. package/dist/lib/neutral/query-MP5NSQKO.mjs +69 -0
  70. package/dist/lib/neutral/query-MP5NSQKO.mjs.map +7 -0
  71. package/dist/lib/neutral/query-U56GNEV6.mjs +32 -0
  72. package/dist/lib/neutral/query-U56GNEV6.mjs.map +7 -0
  73. package/dist/lib/neutral/query-blueprints-PLWYVOI3.mjs +16 -0
  74. package/dist/lib/neutral/query-blueprints-PLWYVOI3.mjs.map +7 -0
  75. package/dist/lib/neutral/relation-create-YAAAFTR2.mjs +34 -0
  76. package/dist/lib/neutral/relation-create-YAAAFTR2.mjs.map +7 -0
  77. package/dist/lib/neutral/relation-delete-IEPKERFR.mjs +18 -0
  78. package/dist/lib/neutral/relation-delete-IEPKERFR.mjs.map +7 -0
  79. package/dist/lib/neutral/save-GWAPLT3Z.mjs +23 -0
  80. package/dist/lib/neutral/save-GWAPLT3Z.mjs.map +7 -0
  81. package/dist/lib/neutral/schema-add-5BNIINRS.mjs +24 -0
  82. package/dist/lib/neutral/schema-add-5BNIINRS.mjs.map +7 -0
  83. package/dist/lib/neutral/schema-list-54UK7S4R.mjs +38 -0
  84. package/dist/lib/neutral/schema-list-54UK7S4R.mjs.map +7 -0
  85. package/dist/lib/neutral/sync-issues-DWY76B3M.mjs +166 -0
  86. package/dist/lib/neutral/sync-issues-DWY76B3M.mjs.map +7 -0
  87. package/dist/lib/neutral/sync-triggers-NOIQLELD.mjs +135 -0
  88. package/dist/lib/neutral/sync-triggers-NOIQLELD.mjs.map +7 -0
  89. package/dist/lib/neutral/tag-add-NLVRGTC6.mjs +19 -0
  90. package/dist/lib/neutral/tag-add-NLVRGTC6.mjs.map +7 -0
  91. package/dist/lib/neutral/tag-remove-N4HFBIA2.mjs +19 -0
  92. package/dist/lib/neutral/tag-remove-N4HFBIA2.mjs.map +7 -0
  93. package/dist/lib/neutral/testing/index.mjs +12 -17
  94. package/dist/lib/neutral/testing/index.mjs.map +3 -3
  95. package/dist/lib/neutral/update-blueprints-2SNK6HLG.mjs +16 -0
  96. package/dist/lib/neutral/update-blueprints-2SNK6HLG.mjs.map +7 -0
  97. package/dist/lib/neutral/update-tasks-QQUR53RN.mjs +13 -0
  98. package/dist/lib/neutral/update-tasks-QQUR53RN.mjs.map +7 -0
  99. package/dist/types/src/blueprints/automation/blueprint.d.ts +4 -0
  100. package/dist/types/src/blueprints/automation/blueprint.d.ts.map +1 -0
  101. package/dist/types/src/blueprints/automation/index.d.ts +2 -0
  102. package/dist/types/src/blueprints/automation/index.d.ts.map +1 -0
  103. package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts +4 -0
  104. package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts.map +1 -0
  105. package/dist/types/src/blueprints/blueprint-manager/blueprint.test.d.ts.map +1 -0
  106. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +61 -0
  107. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -0
  108. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +36 -0
  109. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -0
  110. package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts +4 -0
  111. package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts.map +1 -0
  112. package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +27 -0
  113. package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -0
  114. package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +4 -0
  115. package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts.map +1 -0
  116. package/dist/types/src/blueprints/blueprint-manager/index.d.ts +3 -0
  117. package/dist/types/src/blueprints/blueprint-manager/index.d.ts.map +1 -0
  118. package/dist/types/src/blueprints/browser/blueprint.d.ts +2 -2
  119. package/dist/types/src/blueprints/browser/blueprint.d.ts.map +1 -1
  120. package/dist/types/src/blueprints/database/blueprint.d.ts +2 -2
  121. package/dist/types/src/blueprints/database/blueprint.d.ts.map +1 -1
  122. package/dist/types/src/blueprints/database/functions/context-add.d.ts +5 -4
  123. package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -1
  124. package/dist/types/src/blueprints/database/functions/context-remove.d.ts +5 -4
  125. package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -1
  126. package/dist/types/src/blueprints/database/functions/definitions.d.ts +59 -0
  127. package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -0
  128. package/dist/types/src/blueprints/database/functions/index.d.ts +3 -56
  129. package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -1
  130. package/dist/types/src/blueprints/database/functions/load.d.ts +5 -4
  131. package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -1
  132. package/dist/types/src/blueprints/database/functions/object-create.d.ts +5 -3
  133. package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +1 -1
  134. package/dist/types/src/blueprints/database/functions/object-delete.d.ts +5 -4
  135. package/dist/types/src/blueprints/database/functions/object-delete.d.ts.map +1 -1
  136. package/dist/types/src/blueprints/database/functions/object-update.d.ts +5 -4
  137. package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -1
  138. package/dist/types/src/blueprints/database/functions/query.d.ts +6 -3
  139. package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -1
  140. package/dist/types/src/blueprints/database/functions/relation-create.d.ts +6 -5
  141. package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +1 -1
  142. package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +5 -4
  143. package/dist/types/src/blueprints/database/functions/relation-delete.d.ts.map +1 -1
  144. package/dist/types/src/blueprints/database/functions/schema-add.d.ts +4 -2
  145. package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +1 -1
  146. package/dist/types/src/blueprints/database/functions/schema-list.d.ts +4 -2
  147. package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +1 -1
  148. package/dist/types/src/blueprints/database/functions/tag-add.d.ts +4 -3
  149. package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +1 -1
  150. package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +4 -3
  151. package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -1
  152. package/dist/types/src/blueprints/database/index.d.ts +1 -1
  153. package/dist/types/src/blueprints/database/index.d.ts.map +1 -1
  154. package/dist/types/src/blueprints/discord/blueprint.d.ts +2 -2
  155. package/dist/types/src/blueprints/discord/blueprint.d.ts.map +1 -1
  156. package/dist/types/src/blueprints/discord/functions/definitions.d.ts +15 -0
  157. package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -0
  158. package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts +3 -2
  159. package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -1
  160. package/dist/types/src/blueprints/discord/functions/index.d.ts +3 -11
  161. package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -1
  162. package/dist/types/src/blueprints/discord/index.d.ts +1 -0
  163. package/dist/types/src/blueprints/discord/index.d.ts.map +1 -1
  164. package/dist/types/src/blueprints/github/functions/definitions.d.ts +7 -0
  165. package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -0
  166. package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts +4 -2
  167. package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -1
  168. package/dist/types/src/blueprints/github/functions/index.d.ts +3 -6
  169. package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -1
  170. package/dist/types/src/blueprints/github/index.d.ts +1 -0
  171. package/dist/types/src/blueprints/github/index.d.ts.map +1 -1
  172. package/dist/types/src/blueprints/index.d.ts +4 -3
  173. package/dist/types/src/blueprints/index.d.ts.map +1 -1
  174. package/dist/types/src/blueprints/linear/blueprint.d.ts +2 -2
  175. package/dist/types/src/blueprints/linear/blueprint.d.ts.map +1 -1
  176. package/dist/types/src/blueprints/linear/functions/definitions.d.ts +6 -0
  177. package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -0
  178. package/dist/types/src/blueprints/linear/functions/index.d.ts +3 -8
  179. package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -1
  180. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts +4 -6
  181. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -1
  182. package/dist/types/src/blueprints/linear/index.d.ts +1 -0
  183. package/dist/types/src/blueprints/linear/index.d.ts.map +1 -1
  184. package/dist/types/src/blueprints/memory/blueprint.d.ts +4 -0
  185. package/dist/types/src/blueprints/memory/blueprint.d.ts.map +1 -0
  186. package/dist/types/src/blueprints/memory/blueprint.test.d.ts.map +1 -0
  187. package/dist/types/src/blueprints/memory/functions/definitions.d.ts +17 -0
  188. package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +1 -0
  189. package/dist/types/src/blueprints/memory/functions/delete.d.ts +10 -0
  190. package/dist/types/src/blueprints/memory/functions/delete.d.ts.map +1 -0
  191. package/dist/types/src/blueprints/memory/functions/index.d.ts +4 -0
  192. package/dist/types/src/blueprints/memory/functions/index.d.ts.map +1 -0
  193. package/dist/types/src/blueprints/memory/functions/query.d.ts +8 -0
  194. package/dist/types/src/blueprints/memory/functions/query.d.ts.map +1 -0
  195. package/dist/types/src/blueprints/memory/functions/save.d.ts +8 -0
  196. package/dist/types/src/blueprints/memory/functions/save.d.ts.map +1 -0
  197. package/dist/types/src/blueprints/memory/index.d.ts +3 -0
  198. package/dist/types/src/blueprints/memory/index.d.ts.map +1 -0
  199. package/dist/types/src/blueprints/planning/blueprint.d.ts +2 -2
  200. package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -1
  201. package/dist/types/src/blueprints/planning/functions/index.d.ts +3 -9
  202. package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -1
  203. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +18 -3
  204. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -1
  205. package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts +2 -0
  206. package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts.map +1 -0
  207. package/dist/types/src/blueprints/planning/index.d.ts +1 -0
  208. package/dist/types/src/blueprints/planning/index.d.ts.map +1 -1
  209. package/dist/types/src/blueprints/project/blueprint.d.ts +2 -2
  210. package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -1
  211. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +2 -5
  212. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -1
  213. package/dist/types/src/blueprints/project/functions/agent.d.ts +2 -60
  214. package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -1
  215. package/dist/types/src/blueprints/project/functions/definitions.d.ts +166 -0
  216. package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -0
  217. package/dist/types/src/blueprints/project/functions/get-context.d.ts +2 -11
  218. package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -1
  219. package/dist/types/src/blueprints/project/functions/index.d.ts +3 -132
  220. package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -1
  221. package/dist/types/src/blueprints/project/functions/qualifier.d.ts +34 -17
  222. package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -1
  223. package/dist/types/src/blueprints/project/index.d.ts +2 -2
  224. package/dist/types/src/blueprints/project/index.d.ts.map +1 -1
  225. package/dist/types/src/blueprints/project-wizard/blueprint.d.ts +4 -0
  226. package/dist/types/src/blueprints/project-wizard/blueprint.d.ts.map +1 -0
  227. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +55 -0
  228. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +1 -0
  229. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +104 -0
  230. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -0
  231. package/dist/types/src/blueprints/project-wizard/functions/index.d.ts +4 -0
  232. package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +1 -0
  233. package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts +4 -0
  234. package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +1 -0
  235. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +52 -0
  236. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -0
  237. package/dist/types/src/blueprints/project-wizard/index.d.ts +3 -0
  238. package/dist/types/src/blueprints/project-wizard/index.d.ts.map +1 -0
  239. package/dist/types/src/blueprints/testing.d.ts +5 -15
  240. package/dist/types/src/blueprints/testing.d.ts.map +1 -1
  241. package/dist/types/src/blueprints/websearch/blueprint.d.ts +2 -2
  242. package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -1
  243. package/dist/types/src/blueprints/websearch/blueprint.test.d.ts.map +1 -0
  244. package/dist/types/src/blueprints/websearch/functions/definitions.d.ts +5 -0
  245. package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -0
  246. package/dist/types/src/blueprints/websearch/functions/fetch.d.ts +6 -0
  247. package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +1 -0
  248. package/dist/types/src/blueprints/websearch/functions/index.d.ts +4 -0
  249. package/dist/types/src/blueprints/websearch/functions/index.d.ts.map +1 -0
  250. package/dist/types/src/blueprints/websearch/index.d.ts +2 -1
  251. package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
  252. package/dist/types/src/blueprints/websearch/toolkit.d.ts +2 -0
  253. package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -1
  254. package/dist/types/src/crud/graph.d.ts +5 -7
  255. package/dist/types/src/crud/graph.d.ts.map +1 -1
  256. package/dist/types/src/errors.d.ts +41 -0
  257. package/dist/types/src/errors.d.ts.map +1 -0
  258. package/dist/types/src/functions/agent/definitions.d.ts +61 -0
  259. package/dist/types/src/functions/agent/definitions.d.ts.map +1 -0
  260. package/dist/types/src/functions/agent/index.d.ts +3 -84
  261. package/dist/types/src/functions/agent/index.d.ts.map +1 -1
  262. package/dist/types/src/functions/agent/prompt.d.ts +2 -82
  263. package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
  264. package/dist/types/src/functions/agent/prompt.test.d.ts +2 -0
  265. package/dist/types/src/functions/agent/prompt.test.d.ts.map +1 -0
  266. package/dist/types/src/functions/index.d.ts +0 -2
  267. package/dist/types/src/functions/index.d.ts.map +1 -1
  268. package/dist/types/src/sync/sync.d.ts +1 -2
  269. package/dist/types/src/sync/sync.d.ts.map +1 -1
  270. package/dist/types/src/testing/plugins.d.ts.map +1 -1
  271. package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -1
  272. package/dist/types/src/types/Agent.d.ts +79 -0
  273. package/dist/types/src/types/Agent.d.ts.map +1 -0
  274. package/dist/types/src/types/Chat.d.ts +32 -7
  275. package/dist/types/src/types/Chat.d.ts.map +1 -1
  276. package/dist/types/src/types/McpServer.d.ts +21 -0
  277. package/dist/types/src/types/McpServer.d.ts.map +1 -0
  278. package/dist/types/src/types/Memory.d.ts +12 -0
  279. package/dist/types/src/types/Memory.d.ts.map +1 -0
  280. package/dist/types/src/types/Plan.d.ts +23 -11
  281. package/dist/types/src/types/Plan.d.ts.map +1 -1
  282. package/dist/types/src/types/index.d.ts +3 -1
  283. package/dist/types/src/types/index.d.ts.map +1 -1
  284. package/dist/types/src/util/graphql.d.ts.map +1 -1
  285. package/dist/types/tsconfig.tsbuildinfo +1 -1
  286. package/package.json +28 -32
  287. package/src/blueprints/automation/blueprint.ts +105 -0
  288. package/src/blueprints/automation/index.ts +5 -0
  289. package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -0
  290. package/src/blueprints/blueprint-manager/blueprint.test.ts +202 -0
  291. package/src/blueprints/blueprint-manager/blueprint.ts +49 -0
  292. package/src/blueprints/blueprint-manager/functions/definitions.ts +57 -0
  293. package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +43 -0
  294. package/src/blueprints/blueprint-manager/functions/index.ts +13 -0
  295. package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +18 -0
  296. package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +18 -0
  297. package/src/blueprints/blueprint-manager/index.ts +6 -0
  298. package/src/blueprints/browser/blueprint.test.ts +23 -32
  299. package/src/blueprints/browser/blueprint.ts +5 -6
  300. package/src/blueprints/database/blueprint.conversations.json +1 -1
  301. package/src/blueprints/database/blueprint.test.ts +312 -102
  302. package/src/blueprints/database/blueprint.ts +37 -10
  303. package/src/blueprints/database/functions/context-add.ts +16 -27
  304. package/src/blueprints/database/functions/context-remove.ts +17 -28
  305. package/src/blueprints/database/functions/definitions.ts +318 -0
  306. package/src/blueprints/database/functions/index.ts +18 -28
  307. package/src/blueprints/database/functions/load.ts +11 -23
  308. package/src/blueprints/database/functions/object-create.ts +28 -25
  309. package/src/blueprints/database/functions/object-delete.ts +13 -20
  310. package/src/blueprints/database/functions/object-update.ts +23 -25
  311. package/src/blueprints/database/functions/query.ts +48 -111
  312. package/src/blueprints/database/functions/relation-create.ts +25 -38
  313. package/src/blueprints/database/functions/relation-delete.ts +14 -21
  314. package/src/blueprints/database/functions/schema-add.ts +19 -31
  315. package/src/blueprints/database/functions/schema-list.ts +26 -27
  316. package/src/blueprints/database/functions/tag-add.ts +14 -24
  317. package/src/blueprints/database/functions/tag-remove.ts +14 -23
  318. package/src/blueprints/database/index.ts +16 -1
  319. package/src/blueprints/discord/blueprint.ts +6 -11
  320. package/src/blueprints/discord/functions/definitions.ts +70 -0
  321. package/src/blueprints/discord/functions/fetch-messages.test.ts +21 -26
  322. package/src/blueprints/discord/functions/fetch-messages.ts +98 -152
  323. package/src/blueprints/discord/functions/index.ts +4 -4
  324. package/src/blueprints/discord/index.ts +1 -0
  325. package/src/blueprints/github/functions/definitions.ts +26 -0
  326. package/src/blueprints/github/functions/fetch-prs.ts +15 -22
  327. package/src/blueprints/github/functions/index.ts +4 -4
  328. package/src/blueprints/github/index.ts +2 -0
  329. package/src/blueprints/index.ts +4 -3
  330. package/src/blueprints/linear/blueprint.ts +6 -11
  331. package/src/blueprints/linear/functions/definitions.ts +23 -0
  332. package/src/blueprints/linear/functions/index.ts +4 -4
  333. package/src/blueprints/linear/functions/linear.test.ts +8 -9
  334. package/src/blueprints/linear/functions/sync-issues.ts +32 -41
  335. package/src/blueprints/linear/index.ts +1 -0
  336. package/src/blueprints/memory/blueprint.conversations.json +1 -0
  337. package/src/blueprints/memory/blueprint.test.ts +139 -0
  338. package/src/blueprints/memory/blueprint.ts +41 -0
  339. package/src/blueprints/memory/functions/definitions.ts +68 -0
  340. package/src/blueprints/memory/functions/delete.ts +20 -0
  341. package/src/blueprints/memory/functions/index.ts +13 -0
  342. package/src/blueprints/memory/functions/query.ts +32 -0
  343. package/src/blueprints/memory/functions/save.ts +20 -0
  344. package/src/blueprints/memory/index.ts +6 -0
  345. package/src/blueprints/planning/blueprint.ts +6 -10
  346. package/src/blueprints/planning/functions/index.ts +4 -4
  347. package/src/blueprints/planning/functions/update-tasks.md +116 -0
  348. package/src/blueprints/planning/functions/update-tasks.test.ts +55 -0
  349. package/src/blueprints/planning/functions/update-tasks.ts +52 -153
  350. package/src/blueprints/planning/index.ts +1 -0
  351. package/src/blueprints/project/blueprint.conversations.json +1 -0
  352. package/src/blueprints/project/blueprint.test.ts +248 -115
  353. package/src/blueprints/project/blueprint.ts +21 -25
  354. package/src/blueprints/project/functions/add-artifact.ts +20 -30
  355. package/src/blueprints/project/functions/agent.ts +43 -46
  356. package/src/blueprints/project/functions/definitions.ts +92 -0
  357. package/src/blueprints/project/functions/get-context.ts +37 -53
  358. package/src/blueprints/project/functions/index.ts +9 -10
  359. package/src/blueprints/project/functions/qualifier.ts +67 -73
  360. package/src/blueprints/project/index.ts +2 -2
  361. package/src/blueprints/project-wizard/blueprint.ts +52 -0
  362. package/src/blueprints/project-wizard/functions/create-project.ts +32 -0
  363. package/src/blueprints/project-wizard/functions/definitions.ts +63 -0
  364. package/src/blueprints/project-wizard/functions/index.ts +13 -0
  365. package/src/blueprints/project-wizard/functions/project-rules.ts +77 -0
  366. package/src/blueprints/project-wizard/functions/sync-triggers.ts +153 -0
  367. package/src/blueprints/project-wizard/index.ts +6 -0
  368. package/src/blueprints/testing.ts +14 -24
  369. package/src/blueprints/websearch/blueprint.conversations.json +1 -0
  370. package/src/blueprints/websearch/blueprint.test.ts +39 -0
  371. package/src/blueprints/websearch/blueprint.ts +6 -8
  372. package/src/blueprints/websearch/functions/definitions.ts +25 -0
  373. package/src/blueprints/websearch/functions/fetch.ts +18 -0
  374. package/src/blueprints/websearch/functions/index.ts +9 -0
  375. package/src/blueprints/websearch/index.ts +2 -1
  376. package/src/blueprints/websearch/toolkit.ts +6 -1
  377. package/src/crud/graph.test.ts +10 -12
  378. package/src/crud/graph.ts +126 -128
  379. package/src/errors.ts +25 -0
  380. package/src/functions/agent/definitions.ts +56 -0
  381. package/src/functions/agent/index.ts +4 -4
  382. package/src/functions/agent/prompt.conversations.json +1 -0
  383. package/src/functions/agent/prompt.test.ts +78 -0
  384. package/src/functions/agent/prompt.ts +212 -96
  385. package/src/functions/index.ts +0 -2
  386. package/src/sync/sync.ts +24 -14
  387. package/src/testing/plugins.tsx +11 -4
  388. package/src/toolkits/WebToolkit.ts +1 -1
  389. package/src/types/Agent.ts +238 -0
  390. package/src/types/Chat.ts +24 -10
  391. package/src/types/McpServer.ts +37 -0
  392. package/src/types/Memory.ts +24 -0
  393. package/src/types/Plan.ts +8 -4
  394. package/src/types/index.ts +3 -1
  395. package/dist/types/src/blueprints/design/blueprint.d.ts +0 -4
  396. package/dist/types/src/blueprints/design/blueprint.d.ts.map +0 -1
  397. package/dist/types/src/blueprints/design/blueprint.test.d.ts.map +0 -1
  398. package/dist/types/src/blueprints/design/index.d.ts +0 -2
  399. package/dist/types/src/blueprints/design/index.d.ts.map +0 -1
  400. package/dist/types/src/blueprints/markdown/blueprint.d.ts +0 -4
  401. package/dist/types/src/blueprints/markdown/blueprint.d.ts.map +0 -1
  402. package/dist/types/src/blueprints/markdown/functions/create.d.ts +0 -6
  403. package/dist/types/src/blueprints/markdown/functions/create.d.ts.map +0 -1
  404. package/dist/types/src/blueprints/markdown/functions/index.d.ts +0 -30
  405. package/dist/types/src/blueprints/markdown/functions/index.d.ts.map +0 -1
  406. package/dist/types/src/blueprints/markdown/functions/read.d.ts +0 -14
  407. package/dist/types/src/blueprints/markdown/functions/read.d.ts.map +0 -1
  408. package/dist/types/src/blueprints/markdown/functions/update.d.ts +0 -13
  409. package/dist/types/src/blueprints/markdown/functions/update.d.ts.map +0 -1
  410. package/dist/types/src/blueprints/markdown/index.d.ts +0 -3
  411. package/dist/types/src/blueprints/markdown/index.d.ts.map +0 -1
  412. package/dist/types/src/blueprints/planning-old/blueprint.d.ts +0 -4
  413. package/dist/types/src/blueprints/planning-old/blueprint.d.ts.map +0 -1
  414. package/dist/types/src/blueprints/planning-old/blueprint.test.d.ts.map +0 -1
  415. package/dist/types/src/blueprints/planning-old/functions/index.d.ts +0 -29
  416. package/dist/types/src/blueprints/planning-old/functions/index.d.ts.map +0 -1
  417. package/dist/types/src/blueprints/planning-old/functions/read.d.ts +0 -14
  418. package/dist/types/src/blueprints/planning-old/functions/read.d.ts.map +0 -1
  419. package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts +0 -74
  420. package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts.map +0 -1
  421. package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts +0 -2
  422. package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts.map +0 -1
  423. package/dist/types/src/blueprints/planning-old/functions/update.d.ts +0 -16
  424. package/dist/types/src/blueprints/planning-old/functions/update.d.ts.map +0 -1
  425. package/dist/types/src/blueprints/planning-old/index.d.ts +0 -2
  426. package/dist/types/src/blueprints/planning-old/index.d.ts.map +0 -1
  427. package/dist/types/src/blueprints/research/blueprint.d.ts +0 -4
  428. package/dist/types/src/blueprints/research/blueprint.d.ts.map +0 -1
  429. package/dist/types/src/blueprints/research/blueprint.test.d.ts.map +0 -1
  430. package/dist/types/src/blueprints/research/functions/document-create.d.ts +0 -10
  431. package/dist/types/src/blueprints/research/functions/document-create.d.ts.map +0 -1
  432. package/dist/types/src/blueprints/research/functions/index.d.ts +0 -19
  433. package/dist/types/src/blueprints/research/functions/index.d.ts.map +0 -1
  434. package/dist/types/src/blueprints/research/functions/research.d.ts +0 -14
  435. package/dist/types/src/blueprints/research/functions/research.d.ts.map +0 -1
  436. package/dist/types/src/blueprints/research/functions/research.test.d.ts +0 -2
  437. package/dist/types/src/blueprints/research/functions/research.test.d.ts.map +0 -1
  438. package/dist/types/src/blueprints/research/index.d.ts +0 -3
  439. package/dist/types/src/blueprints/research/index.d.ts.map +0 -1
  440. package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts +0 -18
  441. package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts.map +0 -1
  442. package/dist/types/src/blueprints/research/types/index.d.ts +0 -7
  443. package/dist/types/src/blueprints/research/types/index.d.ts.map +0 -1
  444. package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +0 -179
  445. package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +0 -1
  446. package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts +0 -2
  447. package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts.map +0 -1
  448. package/dist/types/src/functions/entity-extraction/index.d.ts +0 -179
  449. package/dist/types/src/functions/entity-extraction/index.d.ts.map +0 -1
  450. package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts +0 -38
  451. package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts.map +0 -1
  452. package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts +0 -37
  453. package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts.map +0 -1
  454. package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts +0 -58
  455. package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts.map +0 -1
  456. package/dist/types/src/functions/exa/data/index.d.ts +0 -3
  457. package/dist/types/src/functions/exa/data/index.d.ts.map +0 -1
  458. package/dist/types/src/functions/exa/exa.d.ts +0 -5
  459. package/dist/types/src/functions/exa/exa.d.ts.map +0 -1
  460. package/dist/types/src/functions/exa/index.d.ts +0 -9
  461. package/dist/types/src/functions/exa/index.d.ts.map +0 -1
  462. package/dist/types/src/functions/exa/mock.d.ts +0 -5
  463. package/dist/types/src/functions/exa/mock.d.ts.map +0 -1
  464. package/dist/types/src/types/Project.d.ts +0 -67
  465. package/dist/types/src/types/Project.d.ts.map +0 -1
  466. package/src/blueprints/browser/blueprint.conversations.json +0 -1
  467. package/src/blueprints/design/blueprint.test.ts +0 -96
  468. package/src/blueprints/design/blueprint.ts +0 -46
  469. package/src/blueprints/design/index.ts +0 -5
  470. package/src/blueprints/markdown/blueprint.ts +0 -38
  471. package/src/blueprints/markdown/functions/create.ts +0 -29
  472. package/src/blueprints/markdown/functions/index.ts +0 -13
  473. package/src/blueprints/markdown/functions/read.ts +0 -32
  474. package/src/blueprints/markdown/functions/update.ts +0 -32
  475. package/src/blueprints/markdown/index.ts +0 -6
  476. package/src/blueprints/planning-old/blueprint.test.ts +0 -122
  477. package/src/blueprints/planning-old/blueprint.ts +0 -110
  478. package/src/blueprints/planning-old/functions/index.ts +0 -11
  479. package/src/blueprints/planning-old/functions/read.ts +0 -34
  480. package/src/blueprints/planning-old/functions/task-list.test.ts +0 -99
  481. package/src/blueprints/planning-old/functions/task-list.ts +0 -165
  482. package/src/blueprints/planning-old/functions/update.ts +0 -52
  483. package/src/blueprints/planning-old/index.ts +0 -5
  484. package/src/blueprints/research/blueprint.test.ts +0 -7
  485. package/src/blueprints/research/blueprint.ts +0 -65
  486. package/src/blueprints/research/functions/document-create.ts +0 -73
  487. package/src/blueprints/research/functions/index.ts +0 -11
  488. package/src/blueprints/research/functions/research-instructions.tpl +0 -106
  489. package/src/blueprints/research/functions/research.conversations.json +0 -1
  490. package/src/blueprints/research/functions/research.test.ts +0 -149
  491. package/src/blueprints/research/functions/research.ts +0 -175
  492. package/src/blueprints/research/index.ts +0 -6
  493. package/src/blueprints/research/types/ResearchGraph.ts +0 -49
  494. package/src/blueprints/research/types/index.ts +0 -32
  495. package/src/functions/entity-extraction/entity-extraction.conversations.json +0 -1
  496. package/src/functions/entity-extraction/entity-extraction.test.ts +0 -74
  497. package/src/functions/entity-extraction/entity-extraction.ts +0 -181
  498. package/src/functions/entity-extraction/index.ts +0 -9
  499. package/src/functions/exa/data/exa-search-1748337321991.ts +0 -131
  500. package/src/functions/exa/data/exa-search-1748337331526.ts +0 -144
  501. package/src/functions/exa/data/exa-search-1748337344119.ts +0 -133
  502. package/src/functions/exa/data/index.ts +0 -11
  503. package/src/functions/exa/exa.ts +0 -37
  504. package/src/functions/exa/index.ts +0 -11
  505. package/src/functions/exa/mock.ts +0 -71
  506. package/src/types/Project.ts +0 -196
  507. /package/dist/types/src/blueprints/{design → blueprint-manager}/blueprint.test.d.ts +0 -0
  508. /package/dist/types/src/blueprints/{planning-old → memory}/blueprint.test.d.ts +0 -0
  509. /package/dist/types/src/blueprints/{research → websearch}/blueprint.test.d.ts +0 -0
@@ -0,0 +1,238 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ // @import-as-namespace
6
+
7
+ import * as Effect from 'effect/Effect';
8
+ import * as Function from 'effect/Function';
9
+ import * as Schema from 'effect/Schema';
10
+
11
+ import { AiContext } from '@dxos/assistant';
12
+ import { type Blueprint } from '@dxos/compute';
13
+ import { Annotation, Database, Feed, Format, Obj, Ref, Relation, Type } from '@dxos/echo';
14
+ import { type ObjectNotFoundError } from '@dxos/echo/Err';
15
+ import { FormInputAnnotation } from '@dxos/echo/internal';
16
+ import { acquireReleaseResource } from '@dxos/effect';
17
+ import { invariant } from '@dxos/invariant';
18
+ import { Text } from '@dxos/schema';
19
+
20
+ import * as Chat from './Chat';
21
+ import * as Plan from './Plan';
22
+
23
+ /**
24
+ * Agent schema definition.
25
+ */
26
+ export const Agent = Schema.Struct({
27
+ name: Schema.optional(Schema.String),
28
+
29
+ /**
30
+ * When false, agent triggers are disabled after sync-triggers runs.
31
+ */
32
+ enabled: Schema.optional(Schema.Boolean).annotations({
33
+ title: 'Enabled',
34
+ description: 'Master switch for agent automation; propagated to all triggers on sync.',
35
+ }),
36
+
37
+ /**
38
+ * Instructions for the agent.
39
+ */
40
+ instructions: Ref.Ref(Text.Text).pipe(
41
+ Format.FormatAnnotation.set(Format.TypeFormat.Markdown),
42
+ Schema.annotations({ title: 'Instructions' }),
43
+ ),
44
+
45
+ /**
46
+ * Primary chat for the agent.
47
+ */
48
+ // TODO(dmaretskyi): Multiple chats; RB: branching hierarchy.
49
+ chat: Schema.optional(Ref.Ref(Chat.Chat).pipe(FormInputAnnotation.set(false))),
50
+
51
+ // TODO(burdon): Is this used? Should it be an artifact?
52
+ // Format.FormatAnnotation.set(Format.TypeFormat.Markdown)
53
+ plan: Ref.Ref(Plan.Plan).pipe(FormInputAnnotation.set(false)),
54
+
55
+ // TODO(burdon): Currently Memory.Memory objects are global to the space; make them artifacts?
56
+ artifacts: Schema.Array(
57
+ Schema.Struct({
58
+ // TODO(dmaretskyi): Consider gettings names from the artifact itself using Obj.getLabel.
59
+ name: Schema.String,
60
+ // TODO(burdon): Rename object.
61
+ data: Ref.Ref(Obj.Unknown),
62
+ }),
63
+ ).pipe(FormInputAnnotation.set(false)),
64
+
65
+ /**
66
+ * References to objects with a canonical queue property.
67
+ * Schema must have the QueueAnnotation.
68
+ */
69
+ // Change to trigger.
70
+ // TODO(dmaretskyi): Turn into an array of objects when form-data
71
+ subscriptions: Schema.Array(Ref.Ref(Obj.Unknown)).pipe(FormInputAnnotation.set(false)),
72
+
73
+ /**
74
+ * Cron expression for a timer trigger that invokes the agent worker on a schedule.
75
+ * The timer trigger bypasses the qualifier and goes straight to the agent worker.
76
+ */
77
+ // Change to trigger.
78
+ cron: Schema.optional(Schema.String).annotations({
79
+ title: 'Cron',
80
+ description: 'Cron expression for a timer trigger that invokes the agent on a schedule.',
81
+ }),
82
+
83
+ /**
84
+ * Allow the agent to filter events.
85
+ * Related events will be added to the input queue of the agent.
86
+ * It is recommended to enable this.
87
+ * @deprecated
88
+ */
89
+ filterEvents: Schema.optional(Schema.Boolean).annotations({
90
+ title: 'Filter events',
91
+ description: 'Allow the agent to filter events.',
92
+ }),
93
+
94
+ /**
95
+ * Input feed for subscriptions.
96
+ * @deprecated Subscriptions will write directly to the agent.
97
+ */
98
+ feed: Schema.optional(Ref.Ref(Feed.Feed).pipe(FormInputAnnotation.set(false))),
99
+ }).pipe(
100
+ Type.object({
101
+ typename: 'org.dxos.type.agent',
102
+ version: '0.1.0',
103
+ }),
104
+ Annotation.LabelAnnotation.set(['name']),
105
+ Annotation.IconAnnotation.set({
106
+ icon: 'ph--drone--regular',
107
+ hue: 'sky',
108
+ }),
109
+ );
110
+
111
+ export interface Agent extends Schema.Schema.Type<typeof Agent> {}
112
+
113
+ /**
114
+ * Creates a fully initialized Agent with chat, queue, and context bindings.
115
+ *
116
+ * @param props - Agent properties including spec, plan, blueprints, and context objects.
117
+ * @param blueprint - The blueprint to use for the agent context.
118
+ * @returns An Effect that yields the initialized Agent.
119
+ */
120
+ export const makeInitialized = (
121
+ props: Omit<Obj.MakeProps<typeof Agent>, 'instructions' | 'plan' | 'artifacts' | 'subscriptions' | 'chat'> &
122
+ Partial<Pick<Obj.MakeProps<typeof Agent>, 'artifacts' | 'subscriptions'>> & {
123
+ instructions: string;
124
+ blueprints?: Ref.Ref<Blueprint.Blueprint>[];
125
+ contextObjects?: Ref.Ref<Obj.Any>[];
126
+ },
127
+ blueprint: Blueprint.Blueprint,
128
+ ): Effect.Effect<Agent, never, Feed.FeedService | Database.Service> =>
129
+ Effect.gen(function* () {
130
+ const agent = Obj.make(Agent, {
131
+ ...props,
132
+ instructions: Ref.make(Text.make({ content: props.instructions })),
133
+ plan: Ref.make(Plan.makePlan({ tasks: [] })),
134
+ artifacts: props.artifacts ?? [],
135
+ subscriptions: props.subscriptions ?? [],
136
+ filterEvents: props.filterEvents ?? true,
137
+ enabled: props.enabled ?? true,
138
+ });
139
+ yield* Database.add(agent);
140
+ const feed = yield* Database.add(Feed.make());
141
+ const runtime = yield* Effect.runtime<Feed.FeedService>();
142
+ const contextBinder = new AiContext.Binder({ feed, runtime });
143
+ // TODO(dmaretskyi): Blueprint registry.
144
+ const agentBlueprint = yield* Database.add(Obj.clone(blueprint, { deep: true }));
145
+ yield* Effect.promise(() =>
146
+ contextBinder.bind({
147
+ blueprints: [Ref.make(agentBlueprint), ...(props.blueprints ?? [])],
148
+ objects: [Ref.make(agent), ...(props.contextObjects ?? [])],
149
+ }),
150
+ );
151
+ const chat = yield* Database.add(
152
+ Chat.make({
153
+ [Obj.Parent]: agent,
154
+ feed: Ref.make(feed),
155
+ }),
156
+ );
157
+ Obj.setParent(feed, chat);
158
+ yield* Database.add(
159
+ Relation.make(Chat.CompanionTo, {
160
+ [Relation.Source]: chat,
161
+ [Relation.Target]: agent,
162
+ }),
163
+ );
164
+
165
+ const inputFeed = yield* Database.add(Feed.make());
166
+
167
+ Obj.update(agent, (agent) => {
168
+ agent.chat = Ref.make(chat);
169
+ agent.feed = Ref.make(inputFeed);
170
+ });
171
+
172
+ return agent;
173
+ });
174
+
175
+ /**
176
+ * Resets the agent chat history by rebuilding the chat context.
177
+ * Preserves the existing blueprints and objects from the current chat context.
178
+ *
179
+ * @param agent - The agent whose chat history should be reset. Must have an existing chat.
180
+ * @returns An Effect that resets the chat history.
181
+ */
182
+ export const resetChatHistory = (
183
+ agent: Agent,
184
+ ): Effect.Effect<void, ObjectNotFoundError, Feed.FeedService | Database.Service> =>
185
+ Effect.gen(function* () {
186
+ invariant(agent.chat, 'Agent must have an existing chat to reset.');
187
+
188
+ const existingFeed = yield* agent.chat.pipe(Database.load).pipe(
189
+ Effect.map((_) => _.feed),
190
+ Effect.flatMap(Database.load),
191
+ );
192
+ const runtime = yield* Effect.runtime<Feed.FeedService>();
193
+ const existingContextBinder = yield* acquireReleaseResource(
194
+ () =>
195
+ new AiContext.Binder({
196
+ feed: existingFeed,
197
+ runtime,
198
+ }),
199
+ );
200
+ const blueprints = existingContextBinder.getBlueprints().map((blueprint) => Ref.make(blueprint));
201
+ const objects = existingContextBinder.getObjects().map((object) => Ref.make(object));
202
+
203
+ const feed = yield* Database.add(Feed.make());
204
+ const contextBinder = new AiContext.Binder({ feed, runtime });
205
+ yield* Effect.promise(() =>
206
+ contextBinder.bind({
207
+ blueprints,
208
+ objects,
209
+ }),
210
+ );
211
+
212
+ const chat = yield* Database.add(
213
+ Chat.make({
214
+ feed: Ref.make(feed),
215
+ }),
216
+ );
217
+ Obj.setParent(feed, chat);
218
+ Obj.update(agent, (agent) => {
219
+ agent.chat = Ref.make(chat);
220
+ });
221
+
222
+ yield* Database.add(
223
+ Relation.make(Chat.CompanionTo, {
224
+ [Relation.Source]: chat,
225
+ [Relation.Target]: agent,
226
+ }),
227
+ );
228
+ }).pipe(Effect.scoped);
229
+
230
+ export const getFromChatContext: Effect.Effect<Agent, Error, AiContext.Service> = Effect.gen(function* () {
231
+ const agents = yield* Function.pipe(AiContext.Service.findObjects(Agent));
232
+ if (agents.length !== 1) {
233
+ return yield* Effect.fail(new Error(`There should be exactly one agent in context. Got: ${agents.length}`));
234
+ }
235
+
236
+ const agent = agents[0];
237
+ return agent;
238
+ });
package/src/types/Chat.ts CHANGED
@@ -2,29 +2,29 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ // @import-as-namespace
6
+
5
7
  import * as Schema from 'effect/Schema';
6
8
 
7
- import { Annotation, Obj, Ref, Type } from '@dxos/echo';
9
+ import { Annotation, Feed, Obj, Ref, Type } from '@dxos/echo';
8
10
  import { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';
9
- import { Queue } from '@dxos/echo-db';
10
11
 
11
12
  /**
12
13
  * AI chat.
13
14
  */
14
15
  export const Chat = Schema.Struct({
15
16
  name: Schema.String.pipe(Schema.optional),
16
- queue: Ref.Ref(Queue).pipe(FormInputAnnotation.set(false)),
17
- // TODO(dmaretskyi): Eventually this and the message queue will be the same.
18
- traceQueue: Ref.Ref(Queue).pipe(FormInputAnnotation.set(false), Schema.optional),
17
+ feed: Ref.Ref(Feed.Feed).pipe(FormInputAnnotation.set(false)),
18
+ view: Schema.String.pipe(Schema.optional),
19
19
  }).pipe(
20
20
  Type.object({
21
- typename: 'dxos.org/type/assistant/Chat',
22
- version: '0.2.0',
21
+ typename: 'org.dxos.type.assistant.chat',
22
+ version: '0.1.0',
23
23
  }),
24
24
  LabelAnnotation.set(['name']),
25
25
  Annotation.IconAnnotation.set({
26
- icon: 'ph--atom--regular',
27
- hue: 'blue',
26
+ icon: 'ph--sparkle--regular',
27
+ hue: 'sky',
28
28
  }),
29
29
  );
30
30
 
@@ -32,6 +32,20 @@ export interface Chat extends Schema.Schema.Type<typeof Chat> {}
32
32
 
33
33
  export const make = (props: Obj.MakeProps<typeof Chat>) => Obj.make(Chat, props);
34
34
 
35
+ /** @deprecated Use CompanionTo instead. */
36
+ export const LegacyCompanionTo = Schema.Struct({
37
+ id: Obj.ID,
38
+ }).pipe(
39
+ Type.relation({
40
+ typename: 'org.dxos.relation.assistant.companion-to',
41
+ version: '0.1.0',
42
+ source: Chat,
43
+ target: Obj.Unknown,
44
+ }),
45
+ );
46
+
47
+ export interface LegacyCompanionTo extends Schema.Schema.Type<typeof LegacyCompanionTo> {}
48
+
35
49
  /**
36
50
  * Relation between a Chat and companion objects (e.g., artifacts).
37
51
  */
@@ -39,7 +53,7 @@ export const CompanionTo = Schema.Struct({
39
53
  id: Obj.ID,
40
54
  }).pipe(
41
55
  Type.relation({
42
- typename: 'dxos.org/relation/assistant/CompanionTo',
56
+ typename: 'org.dxos.relation.assistant.companionTo',
43
57
  version: '0.1.0',
44
58
  source: Chat,
45
59
  target: Obj.Unknown,
@@ -0,0 +1,37 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ // @import-as-namespace
6
+
7
+ import * as Schema from 'effect/Schema';
8
+
9
+ import { McpServer as McpServerSpec } from '@dxos/compute';
10
+ import { Annotation, Type } from '@dxos/echo';
11
+ import { LabelAnnotation } from '@dxos/echo/internal';
12
+
13
+ /**
14
+ * MCP server configuration stored as a space-level ECHO object.
15
+ *
16
+ * Composes the canonical connection spec from `@dxos/compute` (`url`, `protocol`, `apiKey`)
17
+ * and adds instance-level fields (`name`, `enabled`) plus ECHO annotations.
18
+ *
19
+ * NOTE: `apiKey` is stored in plaintext and replicated to all peers with access to the space.
20
+ * A future iteration should move secrets to per-device credential storage or use envelope encryption.
21
+ */
22
+ export const McpServer = Schema.Struct({
23
+ ...McpServerSpec.McpServer.fields,
24
+ enabled: Schema.optional(Schema.Boolean),
25
+ }).pipe(
26
+ Type.object({
27
+ typename: 'org.dxos.type.assistant.mcpServer',
28
+ version: '0.1.0',
29
+ }),
30
+ LabelAnnotation.set(['name']),
31
+ Annotation.IconAnnotation.set({
32
+ icon: 'ph--plugs-connected--regular',
33
+ hue: 'sky',
34
+ }),
35
+ );
36
+
37
+ export interface McpServer extends Schema.Schema.Type<typeof McpServer> {}
@@ -0,0 +1,24 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Schema from 'effect/Schema';
6
+
7
+ import { Annotation, Type } from '@dxos/echo';
8
+
9
+ /**
10
+ * Unit of knowledge generated by an agent.
11
+ */
12
+ export const Memory = Schema.Struct({
13
+ title: Schema.String,
14
+ content: Schema.String,
15
+ }).pipe(
16
+ Type.object({ typename: 'org.dxos.type.memory', version: '0.1.0' }),
17
+ Annotation.LabelAnnotation.set(['title']),
18
+ Annotation.IconAnnotation.set({
19
+ icon: 'ph--brain--regular',
20
+ hue: 'pink',
21
+ }),
22
+ );
23
+
24
+ export interface Memory extends Schema.Schema.Type<typeof Memory> {}
package/src/types/Plan.ts CHANGED
@@ -2,9 +2,11 @@
2
2
  // Copyright 2026 DXOS.org
3
3
  //
4
4
 
5
+ // @import-as-namespace
6
+
5
7
  import * as Schema from 'effect/Schema';
6
8
 
7
- import { Obj, Ref, Type } from '@dxos/echo';
9
+ import { Annotation, Obj, Ref, Type } from '@dxos/echo';
8
10
 
9
11
  import * as Chat from './Chat';
10
12
 
@@ -35,6 +37,7 @@ export const Task = Schema.Struct({
35
37
  */
36
38
  chat: Schema.optional(Ref.Ref(Chat.Chat)),
37
39
  });
40
+
38
41
  export interface Task extends Schema.Schema.Type<typeof Task> {}
39
42
 
40
43
  /**
@@ -44,9 +47,10 @@ export const Plan = Schema.Struct({
44
47
  tasks: Schema.Array(Task),
45
48
  }).pipe(
46
49
  Type.object({
47
- typename: 'dxos.org/type/Plan',
50
+ typename: 'org.dxos.type.plan',
48
51
  version: '0.1.0',
49
52
  }),
53
+ Annotation.SystemTypeAnnotation.set(true),
50
54
  );
51
55
  export interface Plan extends Schema.Schema.Type<typeof Plan> {}
52
56
 
@@ -69,7 +73,7 @@ export const generateTaskId = (plan: Plan): TaskId => {
69
73
 
70
74
  /**
71
75
  * Add new tasks to a plan, generating IDs for new tasks.
72
- * Use inside an `Obj.change` callback.
76
+ * Use inside an `Obj.update` callback.
73
77
  */
74
78
  export const addTasks = (
75
79
  plan: Obj.Mutable<Plan>,
@@ -91,7 +95,7 @@ interface MakePlanProps {
91
95
 
92
96
  export const makePlan = (props: MakePlanProps): Plan => {
93
97
  const plan = Obj.make(Plan, { tasks: [] });
94
- Obj.change(plan, (plan) => {
98
+ Obj.update(plan, (plan) => {
95
99
  addTasks(plan, props.tasks);
96
100
  });
97
101
  return plan;
@@ -3,5 +3,7 @@
3
3
  //
4
4
 
5
5
  export * as Chat from './Chat';
6
- export * as Project from './Project';
6
+ export * as Agent from './Agent';
7
+ export * as McpServer from './McpServer';
7
8
  export * as Plan from './Plan';
9
+ export * as Memory from './Memory';
@@ -1,4 +0,0 @@
1
- import { type AppCapabilities } from '@dxos/app-toolkit';
2
- declare const blueprint: AppCapabilities.BlueprintDefinition;
3
- export default blueprint;
4
- //# sourceMappingURL=blueprint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../../../../../src/blueprints/design/blueprint.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAkCzD,QAAA,MAAM,SAAS,EAAE,eAAe,CAAC,mBAIhC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"blueprint.test.d.ts","sourceRoot":"","sources":["../../../../../src/blueprints/design/blueprint.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export { default as DesignBlueprint } from './blueprint';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/blueprints/design/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,aAAa,CAAC"}
@@ -1,4 +0,0 @@
1
- import { type AppCapabilities } from '@dxos/app-toolkit';
2
- declare const blueprint: AppCapabilities.BlueprintDefinition;
3
- export default blueprint;
4
- //# sourceMappingURL=blueprint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../../../../../src/blueprints/markdown/blueprint.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA2BzD,QAAA,MAAM,SAAS,EAAE,eAAe,CAAC,mBAIhC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,6 +0,0 @@
1
- declare const _default: import("@dxos/functions").FunctionDefinition<{
2
- readonly name: string;
3
- readonly content: string;
4
- }, void, import("@dxos/functions").FunctionServices>;
5
- export default _default;
6
- //# sourceMappingURL=create.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../../../src/blueprints/markdown/functions/create.ts"],"names":[],"mappings":";;;;AAWA,wBAiBG"}
@@ -1,30 +0,0 @@
1
- export declare const MarkdownFunctions: {
2
- Create: import("@dxos/functions").FunctionDefinition<{
3
- readonly name: string;
4
- readonly content: string;
5
- }, void, import("@dxos/functions").FunctionServices>;
6
- Read: import("@dxos/functions").FunctionDefinition<{
7
- readonly document: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
8
- readonly name?: string | undefined;
9
- readonly description?: string | undefined;
10
- readonly fallbackName?: string | undefined;
11
- readonly content: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
12
- readonly content: string;
13
- }>;
14
- }>;
15
- }, {
16
- readonly content: string;
17
- }, import("@dxos/functions").FunctionServices>;
18
- Update: import("@dxos/functions").FunctionDefinition<{
19
- readonly content: string;
20
- readonly doc: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
21
- readonly name?: string | undefined;
22
- readonly description?: string | undefined;
23
- readonly fallbackName?: string | undefined;
24
- readonly content: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
25
- readonly content: string;
26
- }>;
27
- }>;
28
- }, void, import("@dxos/functions").FunctionServices>;
29
- };
30
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/blueprints/markdown/functions/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI7B,CAAC"}
@@ -1,14 +0,0 @@
1
- declare const _default: import("@dxos/functions").FunctionDefinition<{
2
- readonly document: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
3
- readonly name?: string | undefined;
4
- readonly description?: string | undefined;
5
- readonly fallbackName?: string | undefined;
6
- readonly content: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
7
- readonly content: string;
8
- }>;
9
- }>;
10
- }, {
11
- readonly content: string;
12
- }, import("@dxos/functions").FunctionServices>;
13
- export default _default;
14
- //# sourceMappingURL=read.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../../../../src/blueprints/markdown/functions/read.ts"],"names":[],"mappings":";;;;;;;;;;;;AAWA,wBAoBG"}
@@ -1,13 +0,0 @@
1
- declare const _default: import("@dxos/functions").FunctionDefinition<{
2
- readonly content: string;
3
- readonly doc: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
4
- readonly name?: string | undefined;
5
- readonly description?: string | undefined;
6
- readonly fallbackName?: string | undefined;
7
- readonly content: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
8
- readonly content: string;
9
- }>;
10
- }>;
11
- }, void, import("@dxos/functions").FunctionServices>;
12
- export default _default;
13
- //# sourceMappingURL=update.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../../../src/blueprints/markdown/functions/update.ts"],"names":[],"mappings":";;;;;;;;;;;AAWA,wBAoBG"}
@@ -1,3 +0,0 @@
1
- export { default as MarkdownBlueprint } from './blueprint';
2
- export { MarkdownFunctions } from './functions';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/blueprints/markdown/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
@@ -1,4 +0,0 @@
1
- import { type AppCapabilities } from '@dxos/app-toolkit';
2
- declare const blueprint: AppCapabilities.BlueprintDefinition;
3
- export default blueprint;
4
- //# sourceMappingURL=blueprint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../../../../../src/blueprints/planning-old/blueprint.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAkGzD,QAAA,MAAM,SAAS,EAAE,eAAe,CAAC,mBAIhC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"blueprint.test.d.ts","sourceRoot":"","sources":["../../../../../src/blueprints/planning-old/blueprint.test.ts"],"names":[],"mappings":""}
@@ -1,29 +0,0 @@
1
- export declare const TaskFunctions: {
2
- Read: import("@dxos/functions").FunctionDefinition<{
3
- readonly doc: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
4
- readonly name?: string | undefined;
5
- readonly description?: string | undefined;
6
- readonly fallbackName?: string | undefined;
7
- readonly content: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
8
- readonly content: string;
9
- }>;
10
- }>;
11
- }, {
12
- readonly content: string;
13
- }, import("@dxos/functions").FunctionServices>;
14
- Update: import("@dxos/functions").FunctionDefinition<{
15
- readonly doc: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
16
- readonly name?: string | undefined;
17
- readonly description?: string | undefined;
18
- readonly fallbackName?: string | undefined;
19
- readonly content: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
20
- readonly content: string;
21
- }>;
22
- }>;
23
- readonly operations?: readonly any[] | undefined;
24
- }, {
25
- readonly content: string;
26
- readonly numberedContent: string;
27
- }, import("@dxos/functions").FunctionServices>;
28
- };
29
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/blueprints/planning-old/functions/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGzB,CAAC"}
@@ -1,14 +0,0 @@
1
- declare const _default: import("@dxos/functions").FunctionDefinition<{
2
- readonly doc: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
3
- readonly name?: string | undefined;
4
- readonly description?: string | undefined;
5
- readonly fallbackName?: string | undefined;
6
- readonly content: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
7
- readonly content: string;
8
- }>;
9
- }>;
10
- }, {
11
- readonly content: string;
12
- }, import("@dxos/functions").FunctionServices>;
13
- export default _default;
14
- //# sourceMappingURL=read.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../../../../src/blueprints/planning-old/functions/read.ts"],"names":[],"mappings":";;;;;;;;;;;;AAWA,wBAsBG"}