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

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