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

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 (506) hide show
  1. package/dist/lib/neutral/add-artifact-ZUJ5DMSY.mjs +30 -0
  2. package/dist/lib/neutral/add-artifact-ZUJ5DMSY.mjs.map +7 -0
  3. package/dist/lib/neutral/agent-5NIKAYUK.mjs +65 -0
  4. package/dist/lib/neutral/agent-5NIKAYUK.mjs.map +7 -0
  5. package/dist/lib/neutral/chunk-246ACKSH.mjs +100 -0
  6. package/dist/lib/neutral/chunk-246ACKSH.mjs.map +7 -0
  7. package/dist/lib/neutral/chunk-EJAQUAKM.mjs +73 -0
  8. package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +7 -0
  9. package/dist/lib/neutral/chunk-FIGO6CA6.mjs +140 -0
  10. package/dist/lib/neutral/chunk-FIGO6CA6.mjs.map +7 -0
  11. package/dist/lib/neutral/chunk-GV66MKAQ.mjs +60 -0
  12. package/dist/lib/neutral/chunk-GV66MKAQ.mjs.map +7 -0
  13. package/dist/lib/neutral/chunk-IKBIORQX.mjs +332 -0
  14. package/dist/lib/neutral/chunk-IKBIORQX.mjs.map +7 -0
  15. package/dist/lib/neutral/chunk-KGU725LW.mjs +29 -0
  16. package/dist/lib/neutral/chunk-KGU725LW.mjs.map +7 -0
  17. package/dist/lib/neutral/chunk-NR3GTWRC.mjs +53 -0
  18. package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +7 -0
  19. package/dist/lib/neutral/chunk-P4ZMYO4K.mjs +294 -0
  20. package/dist/lib/neutral/chunk-P4ZMYO4K.mjs.map +7 -0
  21. package/dist/lib/neutral/chunk-QO5SU37C.mjs +70 -0
  22. package/dist/lib/neutral/chunk-QO5SU37C.mjs.map +7 -0
  23. package/dist/lib/neutral/chunk-ROMZO4CB.mjs +108 -0
  24. package/dist/lib/neutral/chunk-ROMZO4CB.mjs.map +7 -0
  25. package/dist/lib/neutral/chunk-TO5IX24K.mjs +67 -0
  26. package/dist/lib/neutral/chunk-TO5IX24K.mjs.map +7 -0
  27. package/dist/lib/neutral/chunk-WLR3BGO4.mjs +25 -0
  28. package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +7 -0
  29. package/dist/lib/neutral/chunk-XUF53B6B.mjs +75 -0
  30. package/dist/lib/neutral/chunk-XUF53B6B.mjs.map +7 -0
  31. package/dist/lib/neutral/chunk-ZFXLTBZG.mjs +73 -0
  32. package/dist/lib/neutral/chunk-ZFXLTBZG.mjs.map +7 -0
  33. package/dist/lib/neutral/context-add-VB7AOY3G.mjs +22 -0
  34. package/dist/lib/neutral/context-add-VB7AOY3G.mjs.map +7 -0
  35. package/dist/lib/neutral/context-remove-VCM3VPSO.mjs +22 -0
  36. package/dist/lib/neutral/context-remove-VCM3VPSO.mjs.map +7 -0
  37. package/dist/lib/neutral/create-project-EIF4OJMY.mjs +35 -0
  38. package/dist/lib/neutral/create-project-EIF4OJMY.mjs.map +7 -0
  39. package/dist/lib/neutral/delete-J3PMWP7Z.mjs +19 -0
  40. package/dist/lib/neutral/delete-J3PMWP7Z.mjs.map +7 -0
  41. package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs +47 -0
  42. package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs.map +7 -0
  43. package/dist/lib/neutral/fetch-KHMHV7JR.mjs +16 -0
  44. package/dist/lib/neutral/fetch-KHMHV7JR.mjs.map +7 -0
  45. package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs +139 -0
  46. package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs.map +7 -0
  47. package/dist/lib/neutral/get-context-TN7X7U2H.mjs +35 -0
  48. package/dist/lib/neutral/get-context-TN7X7U2H.mjs.map +7 -0
  49. package/dist/lib/neutral/index.mjs +581 -3293
  50. package/dist/lib/neutral/index.mjs.map +4 -4
  51. package/dist/lib/neutral/load-ALP3TK2E.mjs +17 -0
  52. package/dist/lib/neutral/load-ALP3TK2E.mjs.map +7 -0
  53. package/dist/lib/neutral/meta.json +1 -1
  54. package/dist/lib/neutral/object-create-Z57Y3X6Y.mjs +35 -0
  55. package/dist/lib/neutral/object-create-Z57Y3X6Y.mjs.map +7 -0
  56. package/dist/lib/neutral/object-delete-X53LS37B.mjs +18 -0
  57. package/dist/lib/neutral/object-delete-X53LS37B.mjs.map +7 -0
  58. package/dist/lib/neutral/object-update-GVKSBR7T.mjs +28 -0
  59. package/dist/lib/neutral/object-update-GVKSBR7T.mjs.map +7 -0
  60. package/dist/lib/neutral/project-HPHTZ2CI.mjs +23 -0
  61. package/dist/lib/neutral/project-HPHTZ2CI.mjs.map +7 -0
  62. package/dist/lib/neutral/project-rules-IVDHKSKI.mjs +78 -0
  63. package/dist/lib/neutral/project-rules-IVDHKSKI.mjs.map +7 -0
  64. package/dist/lib/neutral/prompt-Y7NN7M5D.mjs +170 -0
  65. package/dist/lib/neutral/prompt-Y7NN7M5D.mjs.map +7 -0
  66. package/dist/lib/neutral/qualifier-VDOY5CWU.mjs +88 -0
  67. package/dist/lib/neutral/qualifier-VDOY5CWU.mjs.map +7 -0
  68. package/dist/lib/neutral/query-PPJU5622.mjs +70 -0
  69. package/dist/lib/neutral/query-PPJU5622.mjs.map +7 -0
  70. package/dist/lib/neutral/query-U56GNEV6.mjs +32 -0
  71. package/dist/lib/neutral/query-U56GNEV6.mjs.map +7 -0
  72. package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs +16 -0
  73. package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs.map +7 -0
  74. package/dist/lib/neutral/relation-create-XJ2IX6X3.mjs +34 -0
  75. package/dist/lib/neutral/relation-create-XJ2IX6X3.mjs.map +7 -0
  76. package/dist/lib/neutral/relation-delete-EP4KXAFL.mjs +18 -0
  77. package/dist/lib/neutral/relation-delete-EP4KXAFL.mjs.map +7 -0
  78. package/dist/lib/neutral/save-GWAPLT3Z.mjs +23 -0
  79. package/dist/lib/neutral/save-GWAPLT3Z.mjs.map +7 -0
  80. package/dist/lib/neutral/schema-add-Z5CY6P24.mjs +24 -0
  81. package/dist/lib/neutral/schema-add-Z5CY6P24.mjs.map +7 -0
  82. package/dist/lib/neutral/schema-list-W326VPVX.mjs +38 -0
  83. package/dist/lib/neutral/schema-list-W326VPVX.mjs.map +7 -0
  84. package/dist/lib/neutral/sync-issues-4YE5XAK5.mjs +167 -0
  85. package/dist/lib/neutral/sync-issues-4YE5XAK5.mjs.map +7 -0
  86. package/dist/lib/neutral/sync-triggers-CDMJVW6E.mjs +136 -0
  87. package/dist/lib/neutral/sync-triggers-CDMJVW6E.mjs.map +7 -0
  88. package/dist/lib/neutral/tag-add-VNIIOVJA.mjs +19 -0
  89. package/dist/lib/neutral/tag-add-VNIIOVJA.mjs.map +7 -0
  90. package/dist/lib/neutral/tag-remove-6R2R27W3.mjs +19 -0
  91. package/dist/lib/neutral/tag-remove-6R2R27W3.mjs.map +7 -0
  92. package/dist/lib/neutral/testing/index.mjs +9 -14
  93. package/dist/lib/neutral/testing/index.mjs.map +3 -3
  94. package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs +16 -0
  95. package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs.map +7 -0
  96. package/dist/lib/neutral/update-tasks-H7SWIFQL.mjs +46 -0
  97. package/dist/lib/neutral/update-tasks-H7SWIFQL.mjs.map +7 -0
  98. package/dist/types/src/blueprints/automation/blueprint.d.ts +4 -0
  99. package/dist/types/src/blueprints/automation/blueprint.d.ts.map +1 -0
  100. package/dist/types/src/blueprints/automation/index.d.ts +2 -0
  101. package/dist/types/src/blueprints/automation/index.d.ts.map +1 -0
  102. package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts +4 -0
  103. package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts.map +1 -0
  104. package/dist/types/src/blueprints/blueprint-manager/blueprint.test.d.ts.map +1 -0
  105. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +63 -0
  106. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -0
  107. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +37 -0
  108. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -0
  109. package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts +4 -0
  110. package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts.map +1 -0
  111. package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +28 -0
  112. package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -0
  113. package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +4 -0
  114. package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts.map +1 -0
  115. package/dist/types/src/blueprints/blueprint-manager/index.d.ts +3 -0
  116. package/dist/types/src/blueprints/blueprint-manager/index.d.ts.map +1 -0
  117. package/dist/types/src/blueprints/browser/blueprint.d.ts +2 -2
  118. package/dist/types/src/blueprints/browser/blueprint.d.ts.map +1 -1
  119. package/dist/types/src/blueprints/database/blueprint.d.ts +2 -2
  120. package/dist/types/src/blueprints/database/blueprint.d.ts.map +1 -1
  121. package/dist/types/src/blueprints/database/functions/context-add.d.ts +5 -4
  122. package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -1
  123. package/dist/types/src/blueprints/database/functions/context-remove.d.ts +5 -4
  124. package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -1
  125. package/dist/types/src/blueprints/database/functions/definitions.d.ts +59 -0
  126. package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -0
  127. package/dist/types/src/blueprints/database/functions/index.d.ts +3 -56
  128. package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -1
  129. package/dist/types/src/blueprints/database/functions/load.d.ts +5 -4
  130. package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -1
  131. package/dist/types/src/blueprints/database/functions/object-create.d.ts +5 -3
  132. package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +1 -1
  133. package/dist/types/src/blueprints/database/functions/object-delete.d.ts +5 -4
  134. package/dist/types/src/blueprints/database/functions/object-delete.d.ts.map +1 -1
  135. package/dist/types/src/blueprints/database/functions/object-update.d.ts +5 -4
  136. package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -1
  137. package/dist/types/src/blueprints/database/functions/query.d.ts +7 -3
  138. package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -1
  139. package/dist/types/src/blueprints/database/functions/relation-create.d.ts +6 -5
  140. package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +1 -1
  141. package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +5 -4
  142. package/dist/types/src/blueprints/database/functions/relation-delete.d.ts.map +1 -1
  143. package/dist/types/src/blueprints/database/functions/schema-add.d.ts +4 -2
  144. package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +1 -1
  145. package/dist/types/src/blueprints/database/functions/schema-list.d.ts +4 -2
  146. package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +1 -1
  147. package/dist/types/src/blueprints/database/functions/tag-add.d.ts +4 -3
  148. package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +1 -1
  149. package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +4 -3
  150. package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -1
  151. package/dist/types/src/blueprints/database/index.d.ts +1 -1
  152. package/dist/types/src/blueprints/database/index.d.ts.map +1 -1
  153. package/dist/types/src/blueprints/discord/blueprint.d.ts +2 -2
  154. package/dist/types/src/blueprints/discord/blueprint.d.ts.map +1 -1
  155. package/dist/types/src/blueprints/discord/functions/definitions.d.ts +15 -0
  156. package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -0
  157. package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts +3 -2
  158. package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -1
  159. package/dist/types/src/blueprints/discord/functions/index.d.ts +3 -11
  160. package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -1
  161. package/dist/types/src/blueprints/discord/index.d.ts +1 -0
  162. package/dist/types/src/blueprints/discord/index.d.ts.map +1 -1
  163. package/dist/types/src/blueprints/github/functions/definitions.d.ts +7 -0
  164. package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -0
  165. package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts +4 -2
  166. package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -1
  167. package/dist/types/src/blueprints/github/functions/index.d.ts +3 -6
  168. package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -1
  169. package/dist/types/src/blueprints/github/index.d.ts +1 -0
  170. package/dist/types/src/blueprints/github/index.d.ts.map +1 -1
  171. package/dist/types/src/blueprints/index.d.ts +4 -3
  172. package/dist/types/src/blueprints/index.d.ts.map +1 -1
  173. package/dist/types/src/blueprints/linear/blueprint.d.ts +2 -2
  174. package/dist/types/src/blueprints/linear/blueprint.d.ts.map +1 -1
  175. package/dist/types/src/blueprints/linear/functions/definitions.d.ts +6 -0
  176. package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -0
  177. package/dist/types/src/blueprints/linear/functions/index.d.ts +3 -8
  178. package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -1
  179. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts +4 -6
  180. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -1
  181. package/dist/types/src/blueprints/linear/index.d.ts +1 -0
  182. package/dist/types/src/blueprints/linear/index.d.ts.map +1 -1
  183. package/dist/types/src/blueprints/memory/blueprint.d.ts +4 -0
  184. package/dist/types/src/blueprints/memory/blueprint.d.ts.map +1 -0
  185. package/dist/types/src/blueprints/memory/blueprint.test.d.ts.map +1 -0
  186. package/dist/types/src/blueprints/memory/functions/definitions.d.ts +17 -0
  187. package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +1 -0
  188. package/dist/types/src/blueprints/memory/functions/delete.d.ts +10 -0
  189. package/dist/types/src/blueprints/memory/functions/delete.d.ts.map +1 -0
  190. package/dist/types/src/blueprints/memory/functions/index.d.ts +4 -0
  191. package/dist/types/src/blueprints/memory/functions/index.d.ts.map +1 -0
  192. package/dist/types/src/blueprints/memory/functions/query.d.ts +8 -0
  193. package/dist/types/src/blueprints/memory/functions/query.d.ts.map +1 -0
  194. package/dist/types/src/blueprints/memory/functions/save.d.ts +8 -0
  195. package/dist/types/src/blueprints/memory/functions/save.d.ts.map +1 -0
  196. package/dist/types/src/blueprints/memory/index.d.ts +3 -0
  197. package/dist/types/src/blueprints/memory/index.d.ts.map +1 -0
  198. package/dist/types/src/blueprints/planning/blueprint.d.ts +2 -2
  199. package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -1
  200. package/dist/types/src/blueprints/planning/functions/definitions.d.ts +11 -0
  201. package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +1 -0
  202. package/dist/types/src/blueprints/planning/functions/index.d.ts +3 -9
  203. package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -1
  204. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +5 -3
  205. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -1
  206. package/dist/types/src/blueprints/planning/index.d.ts +1 -0
  207. package/dist/types/src/blueprints/planning/index.d.ts.map +1 -1
  208. package/dist/types/src/blueprints/project/blueprint.d.ts +2 -2
  209. package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -1
  210. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +4 -3
  211. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -1
  212. package/dist/types/src/blueprints/project/functions/agent.d.ts +2 -60
  213. package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -1
  214. package/dist/types/src/blueprints/project/functions/definitions.d.ts +158 -0
  215. package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -0
  216. package/dist/types/src/blueprints/project/functions/get-context.d.ts +6 -4
  217. package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -1
  218. package/dist/types/src/blueprints/project/functions/index.d.ts +3 -132
  219. package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -1
  220. package/dist/types/src/blueprints/project/functions/qualifier.d.ts +30 -17
  221. package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -1
  222. package/dist/types/src/blueprints/project/index.d.ts +2 -2
  223. package/dist/types/src/blueprints/project/index.d.ts.map +1 -1
  224. package/dist/types/src/blueprints/project-wizard/blueprint.d.ts +4 -0
  225. package/dist/types/src/blueprints/project-wizard/blueprint.d.ts.map +1 -0
  226. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +51 -0
  227. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +1 -0
  228. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +96 -0
  229. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -0
  230. package/dist/types/src/blueprints/project-wizard/functions/index.d.ts +4 -0
  231. package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +1 -0
  232. package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts +4 -0
  233. package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +1 -0
  234. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +48 -0
  235. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -0
  236. package/dist/types/src/blueprints/project-wizard/index.d.ts +3 -0
  237. package/dist/types/src/blueprints/project-wizard/index.d.ts.map +1 -0
  238. package/dist/types/src/blueprints/testing.d.ts +5 -15
  239. package/dist/types/src/blueprints/testing.d.ts.map +1 -1
  240. package/dist/types/src/blueprints/websearch/blueprint.d.ts +2 -2
  241. package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -1
  242. package/dist/types/src/blueprints/websearch/blueprint.test.d.ts.map +1 -0
  243. package/dist/types/src/blueprints/websearch/functions/definitions.d.ts +5 -0
  244. package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -0
  245. package/dist/types/src/blueprints/websearch/functions/fetch.d.ts +6 -0
  246. package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +1 -0
  247. package/dist/types/src/blueprints/websearch/functions/index.d.ts +4 -0
  248. package/dist/types/src/blueprints/websearch/functions/index.d.ts.map +1 -0
  249. package/dist/types/src/blueprints/websearch/index.d.ts +2 -1
  250. package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
  251. package/dist/types/src/blueprints/websearch/toolkit.d.ts +2 -0
  252. package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -1
  253. package/dist/types/src/crud/graph.d.ts +1 -1
  254. package/dist/types/src/crud/graph.d.ts.map +1 -1
  255. package/dist/types/src/errors.d.ts +41 -0
  256. package/dist/types/src/errors.d.ts.map +1 -0
  257. package/dist/types/src/functions/agent/definitions.d.ts +62 -0
  258. package/dist/types/src/functions/agent/definitions.d.ts.map +1 -0
  259. package/dist/types/src/functions/agent/index.d.ts +3 -84
  260. package/dist/types/src/functions/agent/index.d.ts.map +1 -1
  261. package/dist/types/src/functions/agent/prompt.d.ts +2 -82
  262. package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
  263. package/dist/types/src/functions/agent/prompt.test.d.ts +2 -0
  264. package/dist/types/src/functions/agent/prompt.test.d.ts.map +1 -0
  265. package/dist/types/src/functions/index.d.ts +0 -2
  266. package/dist/types/src/functions/index.d.ts.map +1 -1
  267. package/dist/types/src/sync/sync.d.ts.map +1 -1
  268. package/dist/types/src/testing/plugins.d.ts.map +1 -1
  269. package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -1
  270. package/dist/types/src/types/Agent.d.ts +77 -0
  271. package/dist/types/src/types/Agent.d.ts.map +1 -0
  272. package/dist/types/src/types/Chat.d.ts +32 -7
  273. package/dist/types/src/types/Chat.d.ts.map +1 -1
  274. package/dist/types/src/types/McpServer.d.ts +21 -0
  275. package/dist/types/src/types/McpServer.d.ts.map +1 -0
  276. package/dist/types/src/types/Memory.d.ts +12 -0
  277. package/dist/types/src/types/Memory.d.ts.map +1 -0
  278. package/dist/types/src/types/Plan.d.ts +23 -11
  279. package/dist/types/src/types/Plan.d.ts.map +1 -1
  280. package/dist/types/src/types/index.d.ts +3 -1
  281. package/dist/types/src/types/index.d.ts.map +1 -1
  282. package/dist/types/src/util/graphql.d.ts.map +1 -1
  283. package/dist/types/tsconfig.tsbuildinfo +1 -1
  284. package/package.json +27 -31
  285. package/src/blueprints/automation/blueprint.ts +105 -0
  286. package/src/blueprints/automation/index.ts +5 -0
  287. package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -0
  288. package/src/blueprints/blueprint-manager/blueprint.test.ts +198 -0
  289. package/src/blueprints/blueprint-manager/blueprint.ts +49 -0
  290. package/src/blueprints/blueprint-manager/functions/definitions.ts +57 -0
  291. package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +43 -0
  292. package/src/blueprints/blueprint-manager/functions/index.ts +13 -0
  293. package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +18 -0
  294. package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +18 -0
  295. package/src/blueprints/blueprint-manager/index.ts +6 -0
  296. package/src/blueprints/browser/blueprint.test.ts +23 -32
  297. package/src/blueprints/browser/blueprint.ts +5 -6
  298. package/src/blueprints/database/blueprint.conversations.json +1 -1
  299. package/src/blueprints/database/blueprint.test.ts +308 -98
  300. package/src/blueprints/database/blueprint.ts +37 -10
  301. package/src/blueprints/database/functions/context-add.ts +15 -26
  302. package/src/blueprints/database/functions/context-remove.ts +16 -27
  303. package/src/blueprints/database/functions/definitions.ts +318 -0
  304. package/src/blueprints/database/functions/index.ts +18 -28
  305. package/src/blueprints/database/functions/load.ts +11 -23
  306. package/src/blueprints/database/functions/object-create.ts +28 -25
  307. package/src/blueprints/database/functions/object-delete.ts +13 -20
  308. package/src/blueprints/database/functions/object-update.ts +23 -25
  309. package/src/blueprints/database/functions/query.ts +48 -110
  310. package/src/blueprints/database/functions/relation-create.ts +25 -38
  311. package/src/blueprints/database/functions/relation-delete.ts +14 -21
  312. package/src/blueprints/database/functions/schema-add.ts +19 -31
  313. package/src/blueprints/database/functions/schema-list.ts +26 -27
  314. package/src/blueprints/database/functions/tag-add.ts +14 -24
  315. package/src/blueprints/database/functions/tag-remove.ts +14 -23
  316. package/src/blueprints/database/index.ts +16 -1
  317. package/src/blueprints/discord/blueprint.ts +6 -11
  318. package/src/blueprints/discord/functions/definitions.ts +70 -0
  319. package/src/blueprints/discord/functions/fetch-messages.test.ts +15 -25
  320. package/src/blueprints/discord/functions/fetch-messages.ts +98 -152
  321. package/src/blueprints/discord/functions/index.ts +4 -4
  322. package/src/blueprints/discord/index.ts +1 -0
  323. package/src/blueprints/github/functions/definitions.ts +26 -0
  324. package/src/blueprints/github/functions/fetch-prs.ts +15 -22
  325. package/src/blueprints/github/functions/index.ts +4 -4
  326. package/src/blueprints/github/index.ts +2 -0
  327. package/src/blueprints/index.ts +4 -3
  328. package/src/blueprints/linear/blueprint.ts +6 -11
  329. package/src/blueprints/linear/functions/definitions.ts +23 -0
  330. package/src/blueprints/linear/functions/index.ts +4 -4
  331. package/src/blueprints/linear/functions/linear.test.ts +7 -7
  332. package/src/blueprints/linear/functions/sync-issues.ts +31 -39
  333. package/src/blueprints/linear/index.ts +1 -0
  334. package/src/blueprints/memory/blueprint.conversations.json +1 -0
  335. package/src/blueprints/memory/blueprint.test.ts +139 -0
  336. package/src/blueprints/memory/blueprint.ts +41 -0
  337. package/src/blueprints/memory/functions/definitions.ts +68 -0
  338. package/src/blueprints/memory/functions/delete.ts +20 -0
  339. package/src/blueprints/memory/functions/index.ts +13 -0
  340. package/src/blueprints/memory/functions/query.ts +32 -0
  341. package/src/blueprints/memory/functions/save.ts +20 -0
  342. package/src/blueprints/memory/index.ts +6 -0
  343. package/src/blueprints/planning/blueprint.ts +5 -9
  344. package/src/blueprints/planning/functions/definitions.ts +137 -0
  345. package/src/blueprints/planning/functions/index.ts +4 -4
  346. package/src/blueprints/planning/functions/update-tasks.ts +35 -158
  347. package/src/blueprints/planning/index.ts +1 -0
  348. package/src/blueprints/project/blueprint.conversations.json +1 -0
  349. package/src/blueprints/project/blueprint.test.ts +246 -111
  350. package/src/blueprints/project/blueprint.ts +21 -25
  351. package/src/blueprints/project/functions/add-artifact.ts +19 -30
  352. package/src/blueprints/project/functions/agent.ts +43 -46
  353. package/src/blueprints/project/functions/definitions.ts +92 -0
  354. package/src/blueprints/project/functions/get-context.ts +36 -53
  355. package/src/blueprints/project/functions/index.ts +9 -10
  356. package/src/blueprints/project/functions/qualifier.ts +66 -72
  357. package/src/blueprints/project/index.ts +2 -2
  358. package/src/blueprints/project-wizard/blueprint.ts +52 -0
  359. package/src/blueprints/project-wizard/functions/create-project.ts +32 -0
  360. package/src/blueprints/project-wizard/functions/definitions.ts +63 -0
  361. package/src/blueprints/project-wizard/functions/index.ts +13 -0
  362. package/src/blueprints/project-wizard/functions/project-rules.ts +77 -0
  363. package/src/blueprints/project-wizard/functions/sync-triggers.ts +158 -0
  364. package/src/blueprints/project-wizard/index.ts +6 -0
  365. package/src/blueprints/testing.ts +7 -23
  366. package/src/blueprints/websearch/blueprint.conversations.json +1 -0
  367. package/src/blueprints/websearch/blueprint.test.ts +39 -0
  368. package/src/blueprints/websearch/blueprint.ts +6 -8
  369. package/src/blueprints/websearch/functions/definitions.ts +25 -0
  370. package/src/blueprints/websearch/functions/fetch.ts +18 -0
  371. package/src/blueprints/websearch/functions/index.ts +9 -0
  372. package/src/blueprints/websearch/index.ts +2 -1
  373. package/src/blueprints/websearch/toolkit.ts +6 -1
  374. package/src/crud/graph.test.ts +10 -12
  375. package/src/crud/graph.ts +2 -2
  376. package/src/errors.ts +25 -0
  377. package/src/functions/agent/definitions.ts +56 -0
  378. package/src/functions/agent/index.ts +4 -4
  379. package/src/functions/agent/prompt.conversations.json +1 -0
  380. package/src/functions/agent/prompt.test.ts +81 -0
  381. package/src/functions/agent/prompt.ts +212 -96
  382. package/src/functions/index.ts +0 -2
  383. package/src/sync/sync.ts +23 -12
  384. package/src/testing/plugins.tsx +10 -3
  385. package/src/toolkits/WebToolkit.ts +1 -1
  386. package/src/types/Agent.ts +240 -0
  387. package/src/types/Chat.ts +24 -10
  388. package/src/types/McpServer.ts +37 -0
  389. package/src/types/Memory.ts +24 -0
  390. package/src/types/Plan.ts +7 -4
  391. package/src/types/index.ts +3 -1
  392. package/dist/types/src/blueprints/design/blueprint.d.ts +0 -4
  393. package/dist/types/src/blueprints/design/blueprint.d.ts.map +0 -1
  394. package/dist/types/src/blueprints/design/blueprint.test.d.ts.map +0 -1
  395. package/dist/types/src/blueprints/design/index.d.ts +0 -2
  396. package/dist/types/src/blueprints/design/index.d.ts.map +0 -1
  397. package/dist/types/src/blueprints/markdown/blueprint.d.ts +0 -4
  398. package/dist/types/src/blueprints/markdown/blueprint.d.ts.map +0 -1
  399. package/dist/types/src/blueprints/markdown/functions/create.d.ts +0 -6
  400. package/dist/types/src/blueprints/markdown/functions/create.d.ts.map +0 -1
  401. package/dist/types/src/blueprints/markdown/functions/index.d.ts +0 -30
  402. package/dist/types/src/blueprints/markdown/functions/index.d.ts.map +0 -1
  403. package/dist/types/src/blueprints/markdown/functions/read.d.ts +0 -14
  404. package/dist/types/src/blueprints/markdown/functions/read.d.ts.map +0 -1
  405. package/dist/types/src/blueprints/markdown/functions/update.d.ts +0 -13
  406. package/dist/types/src/blueprints/markdown/functions/update.d.ts.map +0 -1
  407. package/dist/types/src/blueprints/markdown/index.d.ts +0 -3
  408. package/dist/types/src/blueprints/markdown/index.d.ts.map +0 -1
  409. package/dist/types/src/blueprints/planning-old/blueprint.d.ts +0 -4
  410. package/dist/types/src/blueprints/planning-old/blueprint.d.ts.map +0 -1
  411. package/dist/types/src/blueprints/planning-old/blueprint.test.d.ts.map +0 -1
  412. package/dist/types/src/blueprints/planning-old/functions/index.d.ts +0 -29
  413. package/dist/types/src/blueprints/planning-old/functions/index.d.ts.map +0 -1
  414. package/dist/types/src/blueprints/planning-old/functions/read.d.ts +0 -14
  415. package/dist/types/src/blueprints/planning-old/functions/read.d.ts.map +0 -1
  416. package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts +0 -74
  417. package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts.map +0 -1
  418. package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts +0 -2
  419. package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts.map +0 -1
  420. package/dist/types/src/blueprints/planning-old/functions/update.d.ts +0 -16
  421. package/dist/types/src/blueprints/planning-old/functions/update.d.ts.map +0 -1
  422. package/dist/types/src/blueprints/planning-old/index.d.ts +0 -2
  423. package/dist/types/src/blueprints/planning-old/index.d.ts.map +0 -1
  424. package/dist/types/src/blueprints/research/blueprint.d.ts +0 -4
  425. package/dist/types/src/blueprints/research/blueprint.d.ts.map +0 -1
  426. package/dist/types/src/blueprints/research/blueprint.test.d.ts.map +0 -1
  427. package/dist/types/src/blueprints/research/functions/document-create.d.ts +0 -10
  428. package/dist/types/src/blueprints/research/functions/document-create.d.ts.map +0 -1
  429. package/dist/types/src/blueprints/research/functions/index.d.ts +0 -19
  430. package/dist/types/src/blueprints/research/functions/index.d.ts.map +0 -1
  431. package/dist/types/src/blueprints/research/functions/research.d.ts +0 -14
  432. package/dist/types/src/blueprints/research/functions/research.d.ts.map +0 -1
  433. package/dist/types/src/blueprints/research/functions/research.test.d.ts +0 -2
  434. package/dist/types/src/blueprints/research/functions/research.test.d.ts.map +0 -1
  435. package/dist/types/src/blueprints/research/index.d.ts +0 -3
  436. package/dist/types/src/blueprints/research/index.d.ts.map +0 -1
  437. package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts +0 -18
  438. package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts.map +0 -1
  439. package/dist/types/src/blueprints/research/types/index.d.ts +0 -7
  440. package/dist/types/src/blueprints/research/types/index.d.ts.map +0 -1
  441. package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +0 -179
  442. package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +0 -1
  443. package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts +0 -2
  444. package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts.map +0 -1
  445. package/dist/types/src/functions/entity-extraction/index.d.ts +0 -179
  446. package/dist/types/src/functions/entity-extraction/index.d.ts.map +0 -1
  447. package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts +0 -38
  448. package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts.map +0 -1
  449. package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts +0 -37
  450. package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts.map +0 -1
  451. package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts +0 -58
  452. package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts.map +0 -1
  453. package/dist/types/src/functions/exa/data/index.d.ts +0 -3
  454. package/dist/types/src/functions/exa/data/index.d.ts.map +0 -1
  455. package/dist/types/src/functions/exa/exa.d.ts +0 -5
  456. package/dist/types/src/functions/exa/exa.d.ts.map +0 -1
  457. package/dist/types/src/functions/exa/index.d.ts +0 -9
  458. package/dist/types/src/functions/exa/index.d.ts.map +0 -1
  459. package/dist/types/src/functions/exa/mock.d.ts +0 -5
  460. package/dist/types/src/functions/exa/mock.d.ts.map +0 -1
  461. package/dist/types/src/types/Project.d.ts +0 -67
  462. package/dist/types/src/types/Project.d.ts.map +0 -1
  463. package/src/blueprints/browser/blueprint.conversations.json +0 -1
  464. package/src/blueprints/design/blueprint.test.ts +0 -96
  465. package/src/blueprints/design/blueprint.ts +0 -46
  466. package/src/blueprints/design/index.ts +0 -5
  467. package/src/blueprints/markdown/blueprint.ts +0 -38
  468. package/src/blueprints/markdown/functions/create.ts +0 -29
  469. package/src/blueprints/markdown/functions/index.ts +0 -13
  470. package/src/blueprints/markdown/functions/read.ts +0 -32
  471. package/src/blueprints/markdown/functions/update.ts +0 -32
  472. package/src/blueprints/markdown/index.ts +0 -6
  473. package/src/blueprints/planning-old/blueprint.test.ts +0 -122
  474. package/src/blueprints/planning-old/blueprint.ts +0 -110
  475. package/src/blueprints/planning-old/functions/index.ts +0 -11
  476. package/src/blueprints/planning-old/functions/read.ts +0 -34
  477. package/src/blueprints/planning-old/functions/task-list.test.ts +0 -99
  478. package/src/blueprints/planning-old/functions/task-list.ts +0 -165
  479. package/src/blueprints/planning-old/functions/update.ts +0 -52
  480. package/src/blueprints/planning-old/index.ts +0 -5
  481. package/src/blueprints/research/blueprint.test.ts +0 -7
  482. package/src/blueprints/research/blueprint.ts +0 -65
  483. package/src/blueprints/research/functions/document-create.ts +0 -73
  484. package/src/blueprints/research/functions/index.ts +0 -11
  485. package/src/blueprints/research/functions/research-instructions.tpl +0 -106
  486. package/src/blueprints/research/functions/research.conversations.json +0 -1
  487. package/src/blueprints/research/functions/research.test.ts +0 -149
  488. package/src/blueprints/research/functions/research.ts +0 -175
  489. package/src/blueprints/research/index.ts +0 -6
  490. package/src/blueprints/research/types/ResearchGraph.ts +0 -49
  491. package/src/blueprints/research/types/index.ts +0 -32
  492. package/src/functions/entity-extraction/entity-extraction.conversations.json +0 -1
  493. package/src/functions/entity-extraction/entity-extraction.test.ts +0 -74
  494. package/src/functions/entity-extraction/entity-extraction.ts +0 -181
  495. package/src/functions/entity-extraction/index.ts +0 -9
  496. package/src/functions/exa/data/exa-search-1748337321991.ts +0 -131
  497. package/src/functions/exa/data/exa-search-1748337331526.ts +0 -144
  498. package/src/functions/exa/data/exa-search-1748337344119.ts +0 -133
  499. package/src/functions/exa/data/index.ts +0 -11
  500. package/src/functions/exa/exa.ts +0 -37
  501. package/src/functions/exa/index.ts +0 -11
  502. package/src/functions/exa/mock.ts +0 -71
  503. package/src/types/Project.ts +0 -196
  504. /package/dist/types/src/blueprints/{design → blueprint-manager}/blueprint.test.d.ts +0 -0
  505. /package/dist/types/src/blueprints/{planning-old → memory}/blueprint.test.d.ts +0 -0
  506. /package/dist/types/src/blueprints/{research → websearch}/blueprint.test.d.ts +0 -0
@@ -4,33 +4,28 @@
4
4
 
5
5
  import { describe, expect, it } from '@effect/vitest';
6
6
  import * as Effect from 'effect/Effect';
7
- import * as Layer from 'effect/Layer';
8
7
 
9
- import { AiContextService, AiConversationService } from '@dxos/assistant';
10
- import { AssistantTestLayer } from '@dxos/assistant/testing';
11
- import { Blueprint } from '@dxos/blueprints';
12
- import { Database, Entity, Obj, Query, Ref, Relation, Tag } from '@dxos/echo';
8
+ import { Blueprint, Operation } from '@dxos/compute';
9
+ import { Database, Entity, Feed, Filter, Obj, Query, Ref, Relation, Tag } from '@dxos/echo';
13
10
  import { TestHelpers } from '@dxos/effect/testing';
11
+ import { AgentService } from '@dxos/functions-runtime';
12
+ import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
14
13
  import { ObjectId } from '@dxos/keys';
15
14
  import { Employer, Organization, Person } from '@dxos/types';
15
+ import { trim } from '@dxos/util';
16
16
 
17
17
  import DatabaseBlueprint from './blueprint';
18
- import { DatabaseFunctions } from './functions';
18
+ import { DatabaseHandlers } from './functions';
19
+ import { Query as DatabaseQueryOperation } from './functions/definitions';
19
20
 
20
21
  ObjectId.dangerouslyDisableRandomness();
21
22
 
22
23
  const TestLayer = AssistantTestLayer({
23
- functions: [...Object.values(DatabaseFunctions)],
24
- types: [Organization.Organization, Person.Person, Employer.Employer, Tag.Tag, Blueprint.Blueprint],
24
+ operationHandlers: DatabaseHandlers,
25
+ types: [Organization.Organization, Person.Person, Employer.Employer, Tag.Tag, Blueprint.Blueprint, Feed.Feed],
26
+ blueprints: [DatabaseBlueprint.make()],
25
27
  tracing: 'pretty',
26
- });
27
-
28
- const provideTestLayers = Effect.provide(AiConversationService.layerNewQueue().pipe(Layer.provideMerge(TestLayer)));
29
-
30
- const addDatabaseBlueprint = Effect.fnUntraced(function* () {
31
- yield* AiContextService.bindContext({
32
- blueprints: [Ref.make(yield* Database.add(Obj.clone(DatabaseBlueprint.make(), { deep: true })))],
33
- });
28
+ aiServicePreset: 'edge-remote',
34
29
  });
35
30
 
36
31
  describe('Database Blueprint', () => {
@@ -42,14 +37,13 @@ describe('Database Blueprint', () => {
42
37
  'schema-list: list available schemas',
43
38
  Effect.fnUntraced(
44
39
  function* (_) {
45
- yield* addDatabaseBlueprint();
46
- const messages = yield* AiConversationService.run({
47
- prompt: 'List all available schemas. Tell me what typenames are available.',
40
+ const agent = yield* AgentService.createSession({
41
+ blueprints: [DatabaseBlueprint.make()],
48
42
  });
49
- const lastMessage = messages.at(-1);
50
- expect(lastMessage).toBeDefined();
43
+ yield* agent.submitPrompt('List all available schemas. Tell me what typenames are available.');
44
+ yield* agent.waitForCompletion();
51
45
  },
52
- provideTestLayers,
46
+ Effect.provide(TestLayer),
53
47
  TestHelpers.provideTestContext,
54
48
  ),
55
49
  { timeout: 60_000 },
@@ -59,18 +53,20 @@ describe('Database Blueprint', () => {
59
53
  'schema-add: add a new schema',
60
54
  Effect.fnUntraced(
61
55
  function* (_) {
62
- yield* addDatabaseBlueprint();
63
- yield* AiConversationService.run({
64
- prompt:
65
- 'Add a new schema called "Project" with typename "example.com/type/Project" and fields: name (string), description (string), and status (string).',
56
+ const agent = yield* AgentService.createSession({
57
+ blueprints: [DatabaseBlueprint.make()],
66
58
  });
67
- const { db } = yield* Database.Service;
68
- const schemas = yield* Effect.promise(() =>
69
- db.schemaRegistry.query({ typename: 'example.com/type/Project', location: ['database', 'runtime'] }).run(),
59
+ yield* agent.submitPrompt(
60
+ 'Add a new schema called "Project" with typename "com.example.type.project" and fields: name (string), description (string), and status (string).',
70
61
  );
62
+ yield* agent.waitForCompletion();
63
+ const schemas = yield* Database.runSchemaQuery({
64
+ typename: 'com.example.type.project',
65
+ location: ['database', 'runtime'],
66
+ });
71
67
  expect(schemas.length).toBeGreaterThanOrEqual(1);
72
68
  },
73
- provideTestLayers,
69
+ Effect.provide(TestLayer),
74
70
  TestHelpers.provideTestContext,
75
71
  ),
76
72
  { timeout: 60_000 },
@@ -84,14 +80,38 @@ describe('Database Blueprint', () => {
84
80
  'object-create: create an object',
85
81
  Effect.fnUntraced(
86
82
  function* (_) {
87
- yield* addDatabaseBlueprint();
88
- yield* AiConversationService.run({
89
- prompt: 'Create a new organization called "Cyberdyne Systems".',
83
+ const agent = yield* AgentService.createSession({
84
+ blueprints: [DatabaseBlueprint.make()],
90
85
  });
86
+ yield* agent.submitPrompt('Create a new organization called "Cyberdyne Systems".');
87
+ yield* agent.waitForCompletion();
91
88
  const orgs = yield* Database.runQuery(Query.type(Organization.Organization, { name: 'Cyberdyne Systems' }));
92
89
  expect(orgs).toHaveLength(1);
93
90
  },
94
- provideTestLayers,
91
+ Effect.provide(TestLayer),
92
+ TestHelpers.provideTestContext,
93
+ ),
94
+ { timeout: 60_000 },
95
+ );
96
+
97
+ it.effect(
98
+ 'object-create: create an object with a reference',
99
+ Effect.fnUntraced(
100
+ function* (_) {
101
+ const agent = yield* AgentService.createSession({
102
+ blueprints: [DatabaseBlueprint.make()],
103
+ });
104
+ yield* agent.submitPrompt(
105
+ 'Create a preson fullName="John Doe" with a reference to the organization "Cyberdyne Systems".',
106
+ );
107
+ yield* agent.waitForCompletion();
108
+ const orgs = yield* Database.runQuery(Query.type(Organization.Organization, { name: 'Cyberdyne Systems' }));
109
+ const persons = yield* Database.runQuery(Query.type(Person.Person, { fullName: 'John Doe' }));
110
+ expect(orgs).toHaveLength(1);
111
+ expect(persons).toHaveLength(1);
112
+ expect(persons[0].organization?.target).toBe(orgs[0]);
113
+ },
114
+ Effect.provide(TestLayer),
95
115
  TestHelpers.provideTestContext,
96
116
  ),
97
117
  { timeout: 60_000 },
@@ -101,14 +121,15 @@ describe('Database Blueprint', () => {
101
121
  'object-delete: delete an object',
102
122
  Effect.fnUntraced(
103
123
  function* (_) {
104
- yield* addDatabaseBlueprint();
105
- const org = yield* Database.add(Obj.make(Organization.Organization, { name: 'Obsolete Corp' }));
106
- yield* AiConversationService.run({
107
- prompt: `Delete the organization "Obsolete Corp".`,
124
+ const agent = yield* AgentService.createSession({
125
+ blueprints: [DatabaseBlueprint.make()],
108
126
  });
127
+ const org = yield* Database.add(Obj.make(Organization.Organization, { name: 'Obsolete Corp' }));
128
+ yield* agent.submitPrompt(`Delete the organization "Obsolete Corp".`);
129
+ yield* agent.waitForCompletion();
109
130
  expect(Obj.isDeleted(org)).toBe(true);
110
131
  },
111
- provideTestLayers,
132
+ Effect.provide(TestLayer),
112
133
  TestHelpers.provideTestContext,
113
134
  ),
114
135
  { timeout: 60_000 },
@@ -118,14 +139,15 @@ describe('Database Blueprint', () => {
118
139
  'object-update: update an object',
119
140
  Effect.fnUntraced(
120
141
  function* (_) {
121
- yield* addDatabaseBlueprint();
122
- const org = yield* Database.add(Obj.make(Organization.Organization, { name: 'Old Name Inc' }));
123
- yield* AiConversationService.run({
124
- prompt: `Update the organization "Old Name Inc" and change its name to "New Name Corp".`,
142
+ const agent = yield* AgentService.createSession({
143
+ blueprints: [DatabaseBlueprint.make()],
125
144
  });
145
+ const org = yield* Database.add(Obj.make(Organization.Organization, { name: 'Old Name Inc' }));
146
+ yield* agent.submitPrompt(`Update the organization "Old Name Inc" and change its name to "New Name Corp".`);
147
+ yield* agent.waitForCompletion();
126
148
  expect(org.name).toBe('New Name Corp');
127
149
  },
128
- provideTestLayers,
150
+ Effect.provide(TestLayer),
129
151
  TestHelpers.provideTestContext,
130
152
  ),
131
153
  { timeout: 60_000 },
@@ -139,16 +161,15 @@ describe('Database Blueprint', () => {
139
161
  'query: search for objects',
140
162
  Effect.fnUntraced(
141
163
  function* (_) {
142
- yield* addDatabaseBlueprint();
164
+ const agent = yield* AgentService.createSession({
165
+ blueprints: [DatabaseBlueprint.make()],
166
+ });
143
167
  yield* Database.add(Obj.make(Organization.Organization, { name: 'Acme Corp' }));
144
168
  yield* Database.add(Obj.make(Organization.Organization, { name: 'Globex Industries' }));
145
- const messages = yield* AiConversationService.run({
146
- prompt: 'Search for all organizations. How many are there?',
147
- });
148
- const lastMessage = messages.at(-1);
149
- expect(lastMessage).toBeDefined();
169
+ yield* agent.submitPrompt('Search for all organizations. How many are there?');
170
+ yield* agent.waitForCompletion();
150
171
  },
151
- provideTestLayers,
172
+ Effect.provide(TestLayer),
152
173
  TestHelpers.provideTestContext,
153
174
  ),
154
175
  { timeout: 60_000 },
@@ -158,18 +179,17 @@ describe('Database Blueprint', () => {
158
179
  'load: load object details',
159
180
  Effect.fnUntraced(
160
181
  function* (_) {
161
- yield* addDatabaseBlueprint();
182
+ const agent = yield* AgentService.createSession({
183
+ blueprints: [DatabaseBlueprint.make()],
184
+ });
162
185
  const org = yield* Database.add(
163
186
  Obj.make(Organization.Organization, { name: 'Detail Corp', description: 'A detailed organization.' }),
164
187
  );
165
188
  const dxn = Obj.getDXN(org).toString();
166
- const messages = yield* AiConversationService.run({
167
- prompt: `Load the full details of object ${dxn}. What is its description?`,
168
- });
169
- const lastMessage = messages.at(-1);
170
- expect(lastMessage).toBeDefined();
189
+ yield* agent.submitPrompt(`Load the full details of object ${dxn}. What is its description?`);
190
+ yield* agent.waitForCompletion();
171
191
  },
172
- provideTestLayers,
192
+ Effect.provide(TestLayer),
173
193
  TestHelpers.provideTestContext,
174
194
  ),
175
195
  { timeout: 60_000 },
@@ -183,16 +203,19 @@ describe('Database Blueprint', () => {
183
203
  'relation-create: create a relation between objects',
184
204
  Effect.fnUntraced(
185
205
  function* (_) {
186
- yield* addDatabaseBlueprint();
187
- const person = yield* Database.add(Obj.make(Person.Person, { fullName: 'John Connor' }));
188
- const org = yield* Database.add(Obj.make(Organization.Organization, { name: 'Cyberdyne Systems' }));
189
- yield* AiConversationService.run({
190
- prompt: `Create an Employer relation from person "John Connor" to organization "Cyberdyne Systems" with role "Engineer". List schemas first to find the relation typename.`,
206
+ const agent = yield* AgentService.createSession({
207
+ blueprints: [DatabaseBlueprint.make()],
191
208
  });
209
+ yield* Database.add(Obj.make(Person.Person, { fullName: 'John Connor' }));
210
+ yield* Database.add(Obj.make(Organization.Organization, { name: 'Cyberdyne Systems' }));
211
+ yield* agent.submitPrompt(
212
+ `Create an Employer relation from person "John Connor" to organization "Cyberdyne Systems" with role "Engineer". List schemas first to find the relation typename.`,
213
+ );
214
+ yield* agent.waitForCompletion();
192
215
  const relations = yield* Database.runQuery(Query.type(Employer.Employer));
193
216
  expect(relations.length).toBeGreaterThanOrEqual(1);
194
217
  },
195
- provideTestLayers,
218
+ Effect.provide(TestLayer),
196
219
  TestHelpers.provideTestContext,
197
220
  ),
198
221
  { timeout: 60_000 },
@@ -202,7 +225,9 @@ describe('Database Blueprint', () => {
202
225
  'relation-delete: delete a relation',
203
226
  Effect.fnUntraced(
204
227
  function* (_) {
205
- yield* addDatabaseBlueprint();
228
+ const agent = yield* AgentService.createSession({
229
+ blueprints: [DatabaseBlueprint.make()],
230
+ });
206
231
  const person = yield* Database.add(Obj.make(Person.Person, { fullName: 'Sarah Connor' }));
207
232
  const org = yield* Database.add(Obj.make(Organization.Organization, { name: 'Cyberdyne Systems' }));
208
233
  const relation = yield* Database.add(
@@ -213,12 +238,11 @@ describe('Database Blueprint', () => {
213
238
  }),
214
239
  );
215
240
  const relationDxn = Relation.getDXN(relation).toString();
216
- yield* AiConversationService.run({
217
- prompt: `Delete the relation ${relationDxn}.`,
218
- });
241
+ yield* agent.submitPrompt(`Delete the relation ${relationDxn}.`);
242
+ yield* agent.waitForCompletion();
219
243
  expect(Relation.isDeleted(relation)).toBe(true);
220
244
  },
221
- provideTestLayers,
245
+ Effect.provide(TestLayer),
222
246
  TestHelpers.provideTestContext,
223
247
  ),
224
248
  { timeout: 60_000 },
@@ -232,17 +256,18 @@ describe('Database Blueprint', () => {
232
256
  'tag-add: add a tag to an object',
233
257
  Effect.fnUntraced(
234
258
  function* (_) {
235
- yield* addDatabaseBlueprint();
259
+ const agent = yield* AgentService.createSession({
260
+ blueprints: [DatabaseBlueprint.make()],
261
+ });
236
262
  const org = yield* Database.add(Obj.make(Organization.Organization, { name: 'Tagged Corp' }));
237
263
  const tag = yield* Database.add(Tag.make({ label: 'important' }));
238
- yield* AiConversationService.run({
239
- prompt: `Add tag "important" to the organization "Tagged Corp".`,
240
- });
264
+ yield* agent.submitPrompt(`Add tag "important" to the organization "Tagged Corp".`);
265
+ yield* agent.waitForCompletion();
241
266
  const tags = Obj.getMeta(org).tags ?? [];
242
267
  // TODO(dmaretskyi): matcher doesnt work with echo proxies.
243
268
  expect([...tags]).toContain(Obj.getDXN(tag).toString());
244
269
  },
245
- provideTestLayers,
270
+ Effect.provide(TestLayer),
246
271
  TestHelpers.provideTestContext,
247
272
  ),
248
273
  { timeout: 60_000 },
@@ -252,20 +277,21 @@ describe('Database Blueprint', () => {
252
277
  'tag-remove: remove a tag from an object',
253
278
  Effect.fnUntraced(
254
279
  function* (_) {
255
- yield* addDatabaseBlueprint();
280
+ const agent = yield* AgentService.createSession({
281
+ blueprints: [DatabaseBlueprint.make()],
282
+ });
256
283
  const org = yield* Database.add(Obj.make(Organization.Organization, { name: 'Untagged Corp' }));
257
284
  const tag = yield* Database.add(Tag.make({ label: 'obsolete' }));
258
285
  const tagDxn = Obj.getDXN(tag).toString();
259
- Entity.change(org, (obj) => Entity.addTag(obj, tagDxn));
286
+ Entity.update(org, (org) => Entity.addTag(org, tagDxn));
260
287
  expect(Obj.getMeta(org).tags ?? []).toContain(tagDxn);
261
- yield* AiConversationService.run({
262
- prompt: `Remove tag "obsolete" from the organization "Untagged Corp".`,
263
- });
288
+ yield* agent.submitPrompt(`Remove tag "obsolete" from the organization "Untagged Corp".`);
289
+ yield* agent.waitForCompletion();
264
290
  const tags = Obj.getMeta(org).tags ?? [];
265
291
  // TODO(dmaretskyi): matcher doesnt work with echo proxies.
266
292
  expect([...tags]).not.toContain(tagDxn);
267
293
  },
268
- provideTestLayers,
294
+ Effect.provide(TestLayer),
269
295
  TestHelpers.provideTestContext,
270
296
  ),
271
297
  { timeout: 60_000 },
@@ -279,16 +305,16 @@ describe('Database Blueprint', () => {
279
305
  'context-add: add object to chat context',
280
306
  Effect.fnUntraced(
281
307
  function* (_) {
282
- yield* addDatabaseBlueprint();
283
- const org = yield* Database.add(Obj.make(Organization.Organization, { name: 'Context Corp' }));
284
- yield* AiConversationService.run({
285
- prompt: `Add the organization "Context Corp" to the chat context.`,
308
+ const agent = yield* AgentService.createSession({
309
+ blueprints: [DatabaseBlueprint.make()],
286
310
  });
287
- const conversation = yield* AiConversationService;
288
- const objects = conversation.context.getObjects();
289
- expect(objects.length).toBeGreaterThanOrEqual(1);
311
+ yield* Database.add(Obj.make(Organization.Organization, { name: 'Context Corp' }));
312
+ yield* agent.submitPrompt(`Add the organization "Context Corp" to the chat context.`);
313
+ yield* agent.waitForCompletion();
314
+ const contextRefs = yield* agent.getContext();
315
+ expect(contextRefs.length).toBeGreaterThanOrEqual(1);
290
316
  },
291
- provideTestLayers,
317
+ Effect.provide(TestLayer),
292
318
  TestHelpers.provideTestContext,
293
319
  ),
294
320
  { timeout: 60_000 },
@@ -298,22 +324,206 @@ describe('Database Blueprint', () => {
298
324
  'context-remove: remove object from chat context',
299
325
  Effect.fnUntraced(
300
326
  function* (_) {
301
- yield* addDatabaseBlueprint();
327
+ const agent = yield* AgentService.createSession({
328
+ blueprints: [DatabaseBlueprint.make()],
329
+ });
302
330
  const org = yield* Database.add(Obj.make(Organization.Organization, { name: 'Remove Context Corp' }));
303
331
  const { db } = yield* Database.Service;
304
332
  const ref = db.makeRef(Obj.getDXN(org)) as Ref.Ref<any>;
305
- const { binder } = yield* AiContextService;
306
- yield* Effect.promise(() => binder.bind({ blueprints: [], objects: [ref] }));
333
+ yield* agent.addContext([ref]);
307
334
  const dxn = Obj.getDXN(org).toString();
308
- yield* AiConversationService.run({
309
- prompt: `Remove the organization "Remove Context Corp" from the chat context.`,
310
- });
311
- const conversation = yield* AiConversationService;
312
- const objects = conversation.context.getObjects();
313
- const found = objects.find((obj) => Obj.getDXN(obj).toString() === dxn);
335
+ yield* agent.submitPrompt(`Remove the organization "Remove Context Corp" from the chat context.`);
336
+ yield* agent.waitForCompletion();
337
+ const contextRefs = yield* agent.getContext();
338
+ const found = contextRefs.find((contextRef) => contextRef.dxn.toString() === dxn);
314
339
  expect(found).toBeUndefined();
315
340
  },
316
- provideTestLayers,
341
+ Effect.provide(TestLayer),
342
+ TestHelpers.provideTestContext,
343
+ ),
344
+ { timeout: 60_000 },
345
+ );
346
+
347
+ it.effect(
348
+ 'query: includeQueues finds mock email in feed (agent uses Query tool)',
349
+ Effect.fnUntraced(
350
+ function* (_) {
351
+ const feed = Feed.make();
352
+ yield* Database.add(feed);
353
+ yield* Feed.append(feed, [
354
+ Obj.make(Organization.Organization, {
355
+ name: 'Lot Booking Co',
356
+ description: 'Mock email body: your parking reservation is confirmed.',
357
+ }),
358
+ ]);
359
+ yield* Database.flush();
360
+
361
+ const agent = yield* AgentService.createSession({
362
+ blueprints: [DatabaseBlueprint.make()],
363
+ });
364
+ yield* agent.submitPrompt(trim`
365
+ A mock email was stored only on a feed (queue), not as a regular space document: organization "Lot Booking Co"
366
+ mentioning a parking reservation.
367
+
368
+ Use the Query tool once: full-text "reservation", includeQueues true, includeContent false, limit 20.
369
+ Confirm the results include Lot Booking Co.
370
+ `);
371
+ yield* agent.waitForCompletion();
372
+
373
+ const { db } = yield* Database.Service;
374
+ const spaceOnly = yield* Database.runQuery(
375
+ Query.select(Filter.text('reservation', { type: 'full-text' })).limit(20),
376
+ );
377
+ expect(spaceOnly).toHaveLength(0);
378
+
379
+ const withFeeds = yield* Database.runQuery(
380
+ Query.select(Filter.text('reservation', { type: 'full-text' }))
381
+ .from(db, { includeFeeds: true })
382
+ .limit(20),
383
+ );
384
+ expect(withFeeds.length).toBeGreaterThanOrEqual(1);
385
+ expect(
386
+ withFeeds.some(
387
+ (obj) =>
388
+ Obj.getTypename(obj) === 'org.dxos.type.organization' &&
389
+ String(Obj.getLabel(obj) ?? '').includes('Lot Booking'),
390
+ ),
391
+ ).toBe(true);
392
+
393
+ const byTypename = yield* Database.runQuery(
394
+ Query.type(Organization.Organization).from(db, { includeFeeds: true }).limit(20),
395
+ );
396
+ expect(byTypename.length).toBeGreaterThanOrEqual(1);
397
+ },
398
+ Effect.provide(TestLayer),
399
+ TestHelpers.provideTestContext,
400
+ ),
401
+ { timeout: 60_000 },
402
+ );
403
+
404
+ it.effect(
405
+ 'query operation: includeQueues via invokeFunction',
406
+ Effect.fnUntraced(
407
+ function* ({ expect }) {
408
+ const feed = Feed.make();
409
+ yield* Database.add(feed);
410
+ yield* Feed.append(feed, [
411
+ Obj.make(Organization.Organization, {
412
+ name: 'Invoke Op Lot Co',
413
+ description: 'Feed-only mock email op-search-token-7f3a2c91 reservation line.',
414
+ }),
415
+ ]);
416
+ yield* Database.flush();
417
+
418
+ const noQueues = yield* Operation.invoke(DatabaseQueryOperation, {
419
+ text: 'op-search-token-7f3a2c91',
420
+ includeQueues: false,
421
+ limit: 20,
422
+ });
423
+ expect(noQueues).toHaveLength(0);
424
+
425
+ const withQueues = yield* Operation.invoke(DatabaseQueryOperation, {
426
+ text: 'op-search-token-7f3a2c91',
427
+ includeQueues: true,
428
+ limit: 20,
429
+ });
430
+ type QueryRow = { typename?: string; label?: string };
431
+ expect(withQueues.length).toBeGreaterThanOrEqual(1);
432
+ expect(
433
+ (withQueues as QueryRow[]).some(
434
+ (row) => row.typename === 'org.dxos.type.organization' && String(row.label ?? '').includes('Invoke Op Lot'),
435
+ ),
436
+ ).toBe(true);
437
+
438
+ const byTypename = yield* Operation.invoke(DatabaseQueryOperation, {
439
+ typename: 'org.dxos.type.organization',
440
+ includeQueues: true,
441
+ limit: 20,
442
+ });
443
+ expect(byTypename.length).toBeGreaterThanOrEqual(1);
444
+ expect(
445
+ (byTypename as QueryRow[]).some(
446
+ (row) => row.typename === 'org.dxos.type.organization' && String(row.label ?? '').includes('Invoke Op Lot'),
447
+ ),
448
+ ).toBe(true);
449
+ },
450
+ Effect.provide(TestLayer),
451
+ TestHelpers.provideTestContext,
452
+ ),
453
+ );
454
+
455
+ it.effect(
456
+ 'query: in param scopes to feed children (agent uses Query tool)',
457
+ Effect.fnUntraced(
458
+ function* (_) {
459
+ const feed1 = Feed.make({ name: 'inbox-1' });
460
+ yield* Database.add(feed1);
461
+ yield* Feed.append(feed1, [
462
+ Obj.make(Organization.Organization, {
463
+ name: 'Email Corp Alpha',
464
+ description: 'Mock email in-param-token-a1b2c3.',
465
+ }),
466
+ ]);
467
+
468
+ const feed2 = Feed.make({ name: 'inbox-2' });
469
+ yield* Database.add(feed2);
470
+ yield* Feed.append(feed2, [
471
+ Obj.make(Organization.Organization, {
472
+ name: 'Email Corp Beta',
473
+ description: 'Mock email in-param-token-d4e5f6.',
474
+ }),
475
+ ]);
476
+ yield* Database.flush();
477
+
478
+ const agent = yield* AgentService.createSession({
479
+ blueprints: [DatabaseBlueprint.make()],
480
+ });
481
+ yield* agent.submitPrompt('Query for organizations in "inbox-1" feed.');
482
+ yield* agent.waitForCompletion();
483
+ },
484
+ Effect.provide(TestLayer),
485
+ TestHelpers.provideTestContext,
486
+ ),
487
+ { timeout: 60_000 },
488
+ );
489
+
490
+ it.effect(
491
+ 'query operation: in param can be passed as string',
492
+ Effect.fnUntraced(
493
+ function* (_) {
494
+ const feed1 = Feed.make({ name: 'inbox-1' });
495
+ yield* Database.add(feed1);
496
+ yield* Feed.append(feed1, [
497
+ Obj.make(Organization.Organization, {
498
+ name: 'Email Corp Alpha',
499
+ description: 'Mock email in-param-invoke-token-a1b2c3.',
500
+ }),
501
+ ]);
502
+
503
+ const feed2 = Feed.make({ name: 'inbox-2' });
504
+ yield* Database.add(feed2);
505
+ yield* Feed.append(feed2, [
506
+ Obj.make(Organization.Organization, {
507
+ name: 'Email Corp Beta',
508
+ description: 'Mock email in-param-invoke-token-d4e5f6.',
509
+ }),
510
+ ]);
511
+ yield* Database.flush();
512
+
513
+ const agent = yield* AgentService.createSession({
514
+ blueprints: [DatabaseBlueprint.make()],
515
+ });
516
+ yield* agent.submitPrompt(
517
+ `Call query tool with precisely ${JSON.stringify({
518
+ includeContent: false,
519
+ limit: 10,
520
+ typename: Organization.Organization.typename,
521
+ in: [Obj.getDXN(feed1).toString()],
522
+ })}`,
523
+ );
524
+ yield* agent.waitForCompletion();
525
+ },
526
+ Effect.provide(TestLayer),
317
527
  TestHelpers.provideTestContext,
318
528
  ),
319
529
  { timeout: 60_000 },
@@ -2,37 +2,64 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type AppCapabilities } from '@dxos/app-toolkit';
6
- import { Blueprint } from '@dxos/blueprints';
5
+ import { Blueprint } from '@dxos/compute';
7
6
  import { Ref } from '@dxos/echo';
8
7
  import { Text } from '@dxos/schema';
9
8
  import { trim } from '@dxos/util';
10
9
 
11
- import { DatabaseFunctions } from './functions';
10
+ import {
11
+ Query,
12
+ Load,
13
+ ObjectCreate,
14
+ ObjectUpdate,
15
+ ObjectDelete,
16
+ SchemaAdd,
17
+ SchemaList,
18
+ ContextAdd,
19
+ ContextRemove,
20
+ RelationCreate,
21
+ RelationDelete,
22
+ TagAdd,
23
+ TagRemove,
24
+ } from './functions';
12
25
 
13
- const BLUEPRINT_KEY = 'dxos.org/blueprint/database';
26
+ const BLUEPRINT_KEY = 'org.dxos.blueprint.database';
14
27
 
15
28
  const instructions = trim`
16
29
  You can query, create, update, and delete objects in ECHO.
17
30
  You can manage schemas, relations, tags, and add objects to the chat context.
18
31
  `;
19
32
 
20
- const functions = Object.values(DatabaseFunctions);
21
-
22
33
  const make = () =>
23
34
  Blueprint.make({
24
35
  key: BLUEPRINT_KEY,
25
36
  name: 'Database',
26
37
  description: 'Query and manipulate objects in the ECHO database.',
38
+ agentCanEnable: true,
27
39
  instructions: {
28
- source: Ref.make(Text.make(instructions)),
40
+ source: Ref.make(Text.make({ content: instructions })),
29
41
  },
30
- tools: Blueprint.toolDefinitions({ functions }),
42
+ tools: Blueprint.toolDefinitions({
43
+ operations: [
44
+ ContextAdd,
45
+ ContextRemove,
46
+ Load,
47
+ ObjectCreate,
48
+ ObjectDelete,
49
+ ObjectUpdate,
50
+ Query,
51
+ RelationCreate,
52
+ RelationDelete,
53
+ SchemaAdd,
54
+ SchemaList,
55
+ TagAdd,
56
+ TagRemove,
57
+ ],
58
+ }),
31
59
  });
32
60
 
33
- const blueprint: AppCapabilities.BlueprintDefinition = {
61
+ const blueprint: Blueprint.Definition = {
34
62
  key: BLUEPRINT_KEY,
35
- functions,
36
63
  make,
37
64
  };
38
65