@dxos/assistant-toolkit 0.8.4-main.e8ec1fe → 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 (570) 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-J5LGTIGS.mjs +10 -0
  14. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  15. package/dist/lib/neutral/chunk-JN4GARRQ.mjs +53 -0
  16. package/dist/lib/neutral/chunk-JN4GARRQ.mjs.map +7 -0
  17. package/dist/lib/neutral/chunk-KGU725LW.mjs +29 -0
  18. package/dist/lib/neutral/chunk-KGU725LW.mjs.map +7 -0
  19. package/dist/lib/neutral/chunk-NR3GTWRC.mjs +53 -0
  20. package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +7 -0
  21. package/dist/lib/neutral/chunk-P5LAPHCG.mjs +140 -0
  22. package/dist/lib/neutral/chunk-P5LAPHCG.mjs.map +7 -0
  23. package/dist/lib/neutral/chunk-SVI25Z2Y.mjs +293 -0
  24. package/dist/lib/neutral/chunk-SVI25Z2Y.mjs.map +7 -0
  25. package/dist/lib/neutral/chunk-VSDP6SRY.mjs +74 -0
  26. package/dist/lib/neutral/chunk-VSDP6SRY.mjs.map +7 -0
  27. package/dist/lib/neutral/chunk-WIV7ZVRS.mjs +109 -0
  28. package/dist/lib/neutral/chunk-WIV7ZVRS.mjs.map +7 -0
  29. package/dist/lib/neutral/chunk-WLR3BGO4.mjs +25 -0
  30. package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +7 -0
  31. package/dist/lib/neutral/chunk-YSYNXOZA.mjs +68 -0
  32. package/dist/lib/neutral/chunk-YSYNXOZA.mjs.map +7 -0
  33. package/dist/lib/neutral/chunk-YXOVSRFU.mjs +70 -0
  34. package/dist/lib/neutral/chunk-YXOVSRFU.mjs.map +7 -0
  35. package/dist/lib/neutral/context-add-IIDPRRVB.mjs +22 -0
  36. package/dist/lib/neutral/context-add-IIDPRRVB.mjs.map +7 -0
  37. package/dist/lib/neutral/context-remove-RDYV4PD4.mjs +22 -0
  38. package/dist/lib/neutral/context-remove-RDYV4PD4.mjs.map +7 -0
  39. package/dist/lib/neutral/create-project-MPAMKQ3T.mjs +36 -0
  40. package/dist/lib/neutral/create-project-MPAMKQ3T.mjs.map +7 -0
  41. package/dist/lib/neutral/delete-J3PMWP7Z.mjs +19 -0
  42. package/dist/lib/neutral/delete-J3PMWP7Z.mjs.map +7 -0
  43. package/dist/lib/neutral/enable-blueprints-LELPQHY5.mjs +48 -0
  44. package/dist/lib/neutral/enable-blueprints-LELPQHY5.mjs.map +7 -0
  45. package/dist/lib/neutral/fetch-KHMHV7JR.mjs +16 -0
  46. package/dist/lib/neutral/fetch-KHMHV7JR.mjs.map +7 -0
  47. package/dist/lib/neutral/fetch-messages-OS74FP76.mjs +140 -0
  48. package/dist/lib/neutral/fetch-messages-OS74FP76.mjs.map +7 -0
  49. package/dist/lib/neutral/get-context-JRTOOA5O.mjs +35 -0
  50. package/dist/lib/neutral/get-context-JRTOOA5O.mjs.map +7 -0
  51. package/dist/lib/neutral/index.mjs +906 -0
  52. package/dist/lib/neutral/index.mjs.map +7 -0
  53. package/dist/lib/neutral/load-LI7HHVD6.mjs +17 -0
  54. package/dist/lib/neutral/load-LI7HHVD6.mjs.map +7 -0
  55. package/dist/lib/neutral/meta.json +1 -0
  56. package/dist/lib/neutral/object-create-52Z7YKIA.mjs +35 -0
  57. package/dist/lib/neutral/object-create-52Z7YKIA.mjs.map +7 -0
  58. package/dist/lib/neutral/object-delete-I266YAXI.mjs +18 -0
  59. package/dist/lib/neutral/object-delete-I266YAXI.mjs.map +7 -0
  60. package/dist/lib/neutral/object-update-HY4GI7LA.mjs +28 -0
  61. package/dist/lib/neutral/object-update-HY4GI7LA.mjs.map +7 -0
  62. package/dist/lib/neutral/project-JAU3A7AX.mjs +23 -0
  63. package/dist/lib/neutral/project-JAU3A7AX.mjs.map +7 -0
  64. package/dist/lib/neutral/project-rules-FLUQQRPB.mjs +78 -0
  65. package/dist/lib/neutral/project-rules-FLUQQRPB.mjs.map +7 -0
  66. package/dist/lib/neutral/prompt-4UMXX6QU.mjs +169 -0
  67. package/dist/lib/neutral/prompt-4UMXX6QU.mjs.map +7 -0
  68. package/dist/lib/neutral/qualifier-7BUCOEKK.mjs +88 -0
  69. package/dist/lib/neutral/qualifier-7BUCOEKK.mjs.map +7 -0
  70. package/dist/lib/neutral/query-B3NOYFCK.mjs +70 -0
  71. package/dist/lib/neutral/query-B3NOYFCK.mjs.map +7 -0
  72. package/dist/lib/neutral/query-U56GNEV6.mjs +32 -0
  73. package/dist/lib/neutral/query-U56GNEV6.mjs.map +7 -0
  74. package/dist/lib/neutral/query-blueprints-Z576ABT5.mjs +17 -0
  75. package/dist/lib/neutral/query-blueprints-Z576ABT5.mjs.map +7 -0
  76. package/dist/lib/neutral/relation-create-Z3NGW4VU.mjs +34 -0
  77. package/dist/lib/neutral/relation-create-Z3NGW4VU.mjs.map +7 -0
  78. package/dist/lib/neutral/relation-delete-LXY7W2YO.mjs +18 -0
  79. package/dist/lib/neutral/relation-delete-LXY7W2YO.mjs.map +7 -0
  80. package/dist/lib/neutral/save-GWAPLT3Z.mjs +23 -0
  81. package/dist/lib/neutral/save-GWAPLT3Z.mjs.map +7 -0
  82. package/dist/lib/neutral/schema-add-4TXJO2V7.mjs +24 -0
  83. package/dist/lib/neutral/schema-add-4TXJO2V7.mjs.map +7 -0
  84. package/dist/lib/neutral/schema-list-Q7HRRKGR.mjs +39 -0
  85. package/dist/lib/neutral/schema-list-Q7HRRKGR.mjs.map +7 -0
  86. package/dist/lib/neutral/sync-issues-A2RJNPEF.mjs +167 -0
  87. package/dist/lib/neutral/sync-issues-A2RJNPEF.mjs.map +7 -0
  88. package/dist/lib/neutral/sync-triggers-NV4JCRN5.mjs +137 -0
  89. package/dist/lib/neutral/sync-triggers-NV4JCRN5.mjs.map +7 -0
  90. package/dist/lib/neutral/tag-add-5NOHUTIE.mjs +19 -0
  91. package/dist/lib/neutral/tag-add-5NOHUTIE.mjs.map +7 -0
  92. package/dist/lib/neutral/tag-remove-QTKYDJAW.mjs +19 -0
  93. package/dist/lib/neutral/tag-remove-QTKYDJAW.mjs.map +7 -0
  94. package/dist/lib/neutral/testing/index.mjs +76 -0
  95. package/dist/lib/neutral/testing/index.mjs.map +7 -0
  96. package/dist/lib/neutral/update-blueprints-K7A5SHBZ.mjs +17 -0
  97. package/dist/lib/neutral/update-blueprints-K7A5SHBZ.mjs.map +7 -0
  98. package/dist/lib/neutral/update-tasks-UGGHWXT5.mjs +46 -0
  99. package/dist/lib/neutral/update-tasks-UGGHWXT5.mjs.map +7 -0
  100. package/dist/types/src/blueprints/automation/blueprint.d.ts +4 -0
  101. package/dist/types/src/blueprints/automation/blueprint.d.ts.map +1 -0
  102. package/dist/types/src/blueprints/automation/index.d.ts +2 -0
  103. package/dist/types/src/blueprints/automation/index.d.ts.map +1 -0
  104. package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts +4 -0
  105. package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts.map +1 -0
  106. package/dist/types/src/blueprints/blueprint-manager/blueprint.test.d.ts +2 -0
  107. package/dist/types/src/blueprints/blueprint-manager/blueprint.test.d.ts.map +1 -0
  108. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +60 -0
  109. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -0
  110. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +36 -0
  111. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -0
  112. package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts +4 -0
  113. package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts.map +1 -0
  114. package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +27 -0
  115. package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -0
  116. package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +5 -0
  117. package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts.map +1 -0
  118. package/dist/types/src/blueprints/blueprint-manager/index.d.ts +3 -0
  119. package/dist/types/src/blueprints/blueprint-manager/index.d.ts.map +1 -0
  120. package/dist/types/src/blueprints/browser/blueprint.d.ts +4 -0
  121. package/dist/types/src/blueprints/browser/blueprint.d.ts.map +1 -0
  122. package/dist/types/src/blueprints/browser/blueprint.test.d.ts +2 -0
  123. package/dist/types/src/blueprints/browser/blueprint.test.d.ts.map +1 -0
  124. package/dist/types/src/blueprints/browser/index.d.ts +2 -0
  125. package/dist/types/src/blueprints/browser/index.d.ts.map +1 -0
  126. package/dist/types/src/blueprints/database/blueprint.d.ts +4 -0
  127. package/dist/types/src/blueprints/database/blueprint.d.ts.map +1 -0
  128. package/dist/types/src/blueprints/database/blueprint.test.d.ts +2 -0
  129. package/dist/types/src/blueprints/database/blueprint.test.d.ts.map +1 -0
  130. package/dist/types/src/blueprints/database/functions/context-add.d.ts +7 -0
  131. package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -0
  132. package/dist/types/src/blueprints/database/functions/context-remove.d.ts +7 -0
  133. package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -0
  134. package/dist/types/src/blueprints/database/functions/definitions.d.ts +59 -0
  135. package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -0
  136. package/dist/types/src/blueprints/database/functions/index.d.ts +4 -0
  137. package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -0
  138. package/dist/types/src/blueprints/database/functions/load.d.ts +7 -0
  139. package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -0
  140. package/dist/types/src/blueprints/database/functions/object-create.d.ts +8 -0
  141. package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +1 -0
  142. package/dist/types/src/blueprints/database/functions/object-delete.d.ts +7 -0
  143. package/dist/types/src/blueprints/database/functions/object-delete.d.ts.map +1 -0
  144. package/dist/types/src/blueprints/database/functions/object-update.d.ts +10 -0
  145. package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -0
  146. package/dist/types/src/blueprints/database/functions/query.d.ts +13 -0
  147. package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -0
  148. package/dist/types/src/blueprints/database/functions/relation-create.d.ts +10 -0
  149. package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +1 -0
  150. package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +7 -0
  151. package/dist/types/src/blueprints/database/functions/relation-delete.d.ts.map +1 -0
  152. package/dist/types/src/blueprints/database/functions/schema-add.d.ts +9 -0
  153. package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +1 -0
  154. package/dist/types/src/blueprints/database/functions/schema-list.d.ts +7 -0
  155. package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +1 -0
  156. package/dist/types/src/blueprints/database/functions/tag-add.d.ts +8 -0
  157. package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +1 -0
  158. package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +8 -0
  159. package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -0
  160. package/dist/types/src/blueprints/database/index.d.ts +3 -0
  161. package/dist/types/src/blueprints/database/index.d.ts.map +1 -0
  162. package/dist/types/src/blueprints/discord/blueprint.d.ts +4 -0
  163. package/dist/types/src/blueprints/discord/blueprint.d.ts.map +1 -0
  164. package/dist/types/src/blueprints/discord/functions/definitions.d.ts +16 -0
  165. package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -0
  166. package/dist/types/src/{functions/discord → blueprints/discord/functions}/fetch-messages.d.ts +4 -2
  167. package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -0
  168. package/dist/types/src/blueprints/discord/functions/fetch-messages.test.d.ts.map +1 -0
  169. package/dist/types/src/blueprints/discord/functions/index.d.ts +4 -0
  170. package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -0
  171. package/dist/types/src/blueprints/discord/index.d.ts +2 -2
  172. package/dist/types/src/blueprints/discord/index.d.ts.map +1 -1
  173. package/dist/types/src/blueprints/github/functions/definitions.d.ts +8 -0
  174. package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -0
  175. package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts +9 -0
  176. package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -0
  177. package/dist/types/src/blueprints/github/functions/index.d.ts +4 -0
  178. package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -0
  179. package/dist/types/src/blueprints/github/index.d.ts +2 -0
  180. package/dist/types/src/blueprints/github/index.d.ts.map +1 -0
  181. package/dist/types/src/blueprints/index.d.ts +11 -6
  182. package/dist/types/src/blueprints/index.d.ts.map +1 -1
  183. package/dist/types/src/blueprints/linear/blueprint.d.ts +4 -0
  184. package/dist/types/src/blueprints/linear/blueprint.d.ts.map +1 -0
  185. package/dist/types/src/blueprints/linear/functions/definitions.d.ts +7 -0
  186. package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -0
  187. package/dist/types/src/blueprints/linear/functions/index.d.ts +4 -0
  188. package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -0
  189. package/dist/types/src/blueprints/linear/functions/linear.test.d.ts.map +1 -0
  190. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts +11 -0
  191. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -0
  192. package/dist/types/src/blueprints/linear/index.d.ts +2 -2
  193. package/dist/types/src/blueprints/linear/index.d.ts.map +1 -1
  194. package/dist/types/src/blueprints/memory/blueprint.d.ts +4 -0
  195. package/dist/types/src/blueprints/memory/blueprint.d.ts.map +1 -0
  196. package/dist/types/src/blueprints/memory/blueprint.test.d.ts +2 -0
  197. package/dist/types/src/blueprints/memory/blueprint.test.d.ts.map +1 -0
  198. package/dist/types/src/blueprints/memory/functions/definitions.d.ts +17 -0
  199. package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +1 -0
  200. package/dist/types/src/blueprints/memory/functions/delete.d.ts +10 -0
  201. package/dist/types/src/blueprints/memory/functions/delete.d.ts.map +1 -0
  202. package/dist/types/src/blueprints/memory/functions/index.d.ts +4 -0
  203. package/dist/types/src/blueprints/memory/functions/index.d.ts.map +1 -0
  204. package/dist/types/src/blueprints/memory/functions/query.d.ts +8 -0
  205. package/dist/types/src/blueprints/memory/functions/query.d.ts.map +1 -0
  206. package/dist/types/src/blueprints/memory/functions/save.d.ts +8 -0
  207. package/dist/types/src/blueprints/memory/functions/save.d.ts.map +1 -0
  208. package/dist/types/src/blueprints/memory/index.d.ts +3 -0
  209. package/dist/types/src/blueprints/memory/index.d.ts.map +1 -0
  210. package/dist/types/src/blueprints/planning/blueprint.d.ts +4 -0
  211. package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -0
  212. package/dist/types/src/blueprints/planning/functions/definitions.d.ts +11 -0
  213. package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +1 -0
  214. package/dist/types/src/blueprints/planning/functions/index.d.ts +4 -0
  215. package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -0
  216. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +11 -0
  217. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -0
  218. package/dist/types/src/blueprints/planning/index.d.ts +2 -2
  219. package/dist/types/src/blueprints/planning/index.d.ts.map +1 -1
  220. package/dist/types/src/blueprints/project/blueprint.d.ts +4 -0
  221. package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -0
  222. package/dist/types/src/blueprints/project/blueprint.test.d.ts +2 -0
  223. package/dist/types/src/blueprints/project/blueprint.test.d.ts.map +1 -0
  224. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +8 -0
  225. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -0
  226. package/dist/types/src/blueprints/project/functions/agent.d.ts +4 -0
  227. package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -0
  228. package/dist/types/src/blueprints/project/functions/definitions.d.ts +158 -0
  229. package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -0
  230. package/dist/types/src/blueprints/project/functions/get-context.d.ts +15 -0
  231. package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -0
  232. package/dist/types/src/blueprints/project/functions/index.d.ts +4 -0
  233. package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -0
  234. package/dist/types/src/blueprints/project/functions/qualifier.d.ts +73 -0
  235. package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -0
  236. package/dist/types/src/blueprints/project/index.d.ts +3 -0
  237. package/dist/types/src/blueprints/project/index.d.ts.map +1 -0
  238. package/dist/types/src/blueprints/project-wizard/blueprint.d.ts +4 -0
  239. package/dist/types/src/blueprints/project-wizard/blueprint.d.ts.map +1 -0
  240. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +52 -0
  241. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +1 -0
  242. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +97 -0
  243. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -0
  244. package/dist/types/src/blueprints/project-wizard/functions/index.d.ts +4 -0
  245. package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +1 -0
  246. package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts +4 -0
  247. package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +1 -0
  248. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +48 -0
  249. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -0
  250. package/dist/types/src/blueprints/project-wizard/index.d.ts +3 -0
  251. package/dist/types/src/blueprints/project-wizard/index.d.ts.map +1 -0
  252. package/dist/types/src/blueprints/testing.d.ts +9 -5
  253. package/dist/types/src/blueprints/testing.d.ts.map +1 -1
  254. package/dist/types/src/blueprints/websearch/blueprint.d.ts +4 -0
  255. package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -0
  256. package/dist/types/src/blueprints/websearch/blueprint.test.d.ts +2 -0
  257. package/dist/types/src/blueprints/websearch/blueprint.test.d.ts.map +1 -0
  258. package/dist/types/src/blueprints/websearch/functions/definitions.d.ts +5 -0
  259. package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -0
  260. package/dist/types/src/blueprints/websearch/functions/fetch.d.ts +6 -0
  261. package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +1 -0
  262. package/dist/types/src/blueprints/websearch/functions/index.d.ts +4 -0
  263. package/dist/types/src/blueprints/websearch/functions/index.d.ts.map +1 -0
  264. package/dist/types/src/blueprints/websearch/index.d.ts +3 -3
  265. package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
  266. package/dist/types/src/blueprints/websearch/{websearch-toolkit.d.ts → toolkit.d.ts} +3 -1
  267. package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -0
  268. package/dist/types/src/crud/graph.d.ts +14 -11
  269. package/dist/types/src/crud/graph.d.ts.map +1 -1
  270. package/dist/types/src/errors.d.ts +41 -0
  271. package/dist/types/src/errors.d.ts.map +1 -0
  272. package/dist/types/src/functions/agent/definitions.d.ts +61 -0
  273. package/dist/types/src/functions/agent/definitions.d.ts.map +1 -0
  274. package/dist/types/src/functions/agent/index.d.ts +3 -4
  275. package/dist/types/src/functions/agent/index.d.ts.map +1 -1
  276. package/dist/types/src/functions/agent/prompt.d.ts +2 -7
  277. package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
  278. package/dist/types/src/functions/agent/prompt.test.d.ts +2 -0
  279. package/dist/types/src/functions/agent/prompt.test.d.ts.map +1 -0
  280. package/dist/types/src/functions/index.d.ts +0 -6
  281. package/dist/types/src/functions/index.d.ts.map +1 -1
  282. package/dist/types/src/index.d.ts +2 -2
  283. package/dist/types/src/index.d.ts.map +1 -1
  284. package/dist/types/src/sync/sync.d.ts +3 -3
  285. package/dist/types/src/sync/sync.d.ts.map +1 -1
  286. package/dist/types/src/testing/index.d.ts +2 -1
  287. package/dist/types/src/testing/index.d.ts.map +1 -1
  288. package/dist/types/src/testing/plugins.d.ts +19 -0
  289. package/dist/types/src/testing/plugins.d.ts.map +1 -0
  290. package/dist/types/src/toolkits/WebToolkit.d.ts +38 -0
  291. package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -0
  292. package/dist/types/src/toolkits/index.d.ts +1 -2
  293. package/dist/types/src/toolkits/index.d.ts.map +1 -1
  294. package/dist/types/src/types/Agent.d.ts +77 -0
  295. package/dist/types/src/types/Agent.d.ts.map +1 -0
  296. package/dist/types/src/types/Chat.d.ts +56 -0
  297. package/dist/types/src/types/Chat.d.ts.map +1 -0
  298. package/dist/types/src/types/McpServer.d.ts +18 -0
  299. package/dist/types/src/types/McpServer.d.ts.map +1 -0
  300. package/dist/types/src/types/Memory.d.ts +12 -0
  301. package/dist/types/src/types/Memory.d.ts.map +1 -0
  302. package/dist/types/src/types/Plan.d.ts +89 -0
  303. package/dist/types/src/types/Plan.d.ts.map +1 -0
  304. package/dist/types/src/types/index.d.ts +6 -0
  305. package/dist/types/src/types/index.d.ts.map +1 -0
  306. package/dist/types/src/util/graphql.d.ts.map +1 -1
  307. package/dist/types/tsconfig.tsbuildinfo +1 -1
  308. package/package.json +44 -40
  309. package/src/blueprints/automation/blueprint.ts +107 -0
  310. package/src/blueprints/automation/index.ts +5 -0
  311. package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -0
  312. package/src/blueprints/blueprint-manager/blueprint.test.ts +199 -0
  313. package/src/blueprints/blueprint-manager/blueprint.ts +49 -0
  314. package/src/blueprints/blueprint-manager/functions/definitions.ts +58 -0
  315. package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +44 -0
  316. package/src/blueprints/blueprint-manager/functions/index.ts +13 -0
  317. package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +19 -0
  318. package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +19 -0
  319. package/src/blueprints/blueprint-manager/index.ts +6 -0
  320. package/src/blueprints/browser/blueprint.test.ts +62 -0
  321. package/src/blueprints/browser/blueprint.ts +40 -0
  322. package/src/blueprints/browser/index.ts +5 -0
  323. package/src/blueprints/database/blueprint.conversations.json +1 -0
  324. package/src/blueprints/database/blueprint.test.ts +532 -0
  325. package/src/blueprints/database/blueprint.ts +66 -0
  326. package/src/blueprints/database/functions/context-add.ts +24 -0
  327. package/src/blueprints/database/functions/context-remove.ts +24 -0
  328. package/src/blueprints/database/functions/definitions.ts +318 -0
  329. package/src/blueprints/database/functions/index.ts +23 -0
  330. package/src/blueprints/database/functions/load.ts +19 -0
  331. package/src/blueprints/database/functions/object-create.ts +38 -0
  332. package/src/blueprints/database/functions/object-delete.ts +20 -0
  333. package/src/blueprints/database/functions/object-update.ts +30 -0
  334. package/src/blueprints/database/functions/query.ts +64 -0
  335. package/src/blueprints/database/functions/relation-create.ts +34 -0
  336. package/src/blueprints/database/functions/relation-delete.ts +21 -0
  337. package/src/blueprints/database/functions/schema-add.ts +28 -0
  338. package/src/blueprints/database/functions/schema-list.ts +34 -0
  339. package/src/blueprints/database/functions/tag-add.ts +21 -0
  340. package/src/blueprints/database/functions/tag-remove.ts +21 -0
  341. package/src/blueprints/database/index.ts +21 -0
  342. package/src/blueprints/discord/blueprint.ts +41 -0
  343. package/src/blueprints/discord/functions/definitions.ts +71 -0
  344. package/src/blueprints/discord/functions/fetch-messages.test.ts +45 -0
  345. package/src/blueprints/discord/functions/fetch-messages.ts +199 -0
  346. package/src/blueprints/discord/functions/index.ts +9 -0
  347. package/src/blueprints/discord/index.ts +2 -3
  348. package/src/blueprints/github/functions/definitions.ts +27 -0
  349. package/src/blueprints/github/functions/fetch-prs.ts +24 -0
  350. package/src/blueprints/github/functions/index.ts +9 -0
  351. package/src/blueprints/github/index.ts +5 -0
  352. package/src/blueprints/index.ts +11 -6
  353. package/src/blueprints/linear/blueprint.ts +42 -0
  354. package/src/blueprints/linear/functions/definitions.ts +24 -0
  355. package/src/blueprints/linear/functions/index.ts +9 -0
  356. package/src/blueprints/linear/functions/linear.test.ts +59 -0
  357. package/src/{functions/linear → blueprints/linear/functions}/sync-issues.ts +40 -46
  358. package/src/blueprints/linear/index.ts +2 -3
  359. package/src/blueprints/memory/blueprint.conversations.json +1 -0
  360. package/src/blueprints/memory/blueprint.test.ts +139 -0
  361. package/src/blueprints/memory/blueprint.ts +41 -0
  362. package/src/blueprints/memory/functions/definitions.ts +68 -0
  363. package/src/blueprints/memory/functions/delete.ts +20 -0
  364. package/src/blueprints/memory/functions/index.ts +13 -0
  365. package/src/blueprints/memory/functions/query.ts +32 -0
  366. package/src/blueprints/memory/functions/save.ts +20 -0
  367. package/src/blueprints/memory/index.ts +6 -0
  368. package/src/blueprints/planning/blueprint.ts +24 -0
  369. package/src/blueprints/planning/functions/definitions.ts +137 -0
  370. package/src/blueprints/planning/functions/index.ts +9 -0
  371. package/src/blueprints/planning/functions/update-tasks.ts +45 -0
  372. package/src/blueprints/planning/index.ts +3 -4
  373. package/src/blueprints/project/blueprint.conversations.json +1 -0
  374. package/src/blueprints/project/blueprint.test.ts +715 -0
  375. package/src/blueprints/project/blueprint.ts +64 -0
  376. package/src/blueprints/project/functions/add-artifact.ts +30 -0
  377. package/src/blueprints/project/functions/agent.ts +69 -0
  378. package/src/blueprints/project/functions/definitions.ts +92 -0
  379. package/src/blueprints/project/functions/get-context.ts +46 -0
  380. package/src/blueprints/project/functions/index.ts +14 -0
  381. package/src/blueprints/project/functions/qualifier.ts +90 -0
  382. package/src/blueprints/project/index.ts +6 -0
  383. package/src/blueprints/project-wizard/blueprint.ts +52 -0
  384. package/src/blueprints/project-wizard/functions/create-project.ts +33 -0
  385. package/src/blueprints/project-wizard/functions/definitions.ts +64 -0
  386. package/src/blueprints/project-wizard/functions/index.ts +13 -0
  387. package/src/blueprints/project-wizard/functions/project-rules.ts +77 -0
  388. package/src/blueprints/project-wizard/functions/sync-triggers.ts +159 -0
  389. package/src/blueprints/project-wizard/index.ts +6 -0
  390. package/src/blueprints/testing.ts +23 -8
  391. package/src/blueprints/websearch/blueprint.conversations.json +1 -0
  392. package/src/blueprints/websearch/blueprint.test.ts +39 -0
  393. package/src/blueprints/websearch/blueprint.ts +30 -0
  394. package/src/blueprints/websearch/functions/definitions.ts +25 -0
  395. package/src/blueprints/websearch/functions/fetch.ts +18 -0
  396. package/src/blueprints/websearch/functions/index.ts +9 -0
  397. package/src/blueprints/websearch/index.ts +3 -4
  398. package/src/blueprints/websearch/{websearch-toolkit.ts → toolkit.ts} +6 -1
  399. package/src/crud/graph.test.ts +13 -38
  400. package/src/crud/graph.ts +33 -41
  401. package/src/errors.ts +25 -0
  402. package/src/functions/READ_THIS.md +5 -0
  403. package/src/functions/agent/definitions.ts +53 -0
  404. package/src/functions/agent/index.ts +3 -5
  405. package/src/functions/agent/prompt.conversations.json +1 -0
  406. package/src/functions/agent/prompt.test.ts +83 -0
  407. package/src/functions/agent/prompt.ts +211 -102
  408. package/src/functions/index.ts +0 -6
  409. package/src/index.ts +2 -2
  410. package/src/sync/sync.ts +52 -33
  411. package/src/testing/index.ts +2 -1
  412. package/src/testing/plugins.tsx +79 -0
  413. package/src/toolkits/WebToolkit.ts +33 -0
  414. package/src/toolkits/index.ts +1 -2
  415. package/src/types/Agent.ts +239 -0
  416. package/src/types/Chat.ts +63 -0
  417. package/src/types/McpServer.ts +37 -0
  418. package/src/types/Memory.ts +24 -0
  419. package/src/types/Plan.ts +110 -0
  420. package/src/types/index.ts +9 -0
  421. package/dist/lib/browser/index.mjs +0 -2777
  422. package/dist/lib/browser/index.mjs.map +0 -7
  423. package/dist/lib/browser/meta.json +0 -1
  424. package/dist/lib/node-esm/index.mjs +0 -2778
  425. package/dist/lib/node-esm/index.mjs.map +0 -7
  426. package/dist/lib/node-esm/meta.json +0 -1
  427. package/dist/types/src/blueprints/design/design-blueprint.d.ts +0 -4
  428. package/dist/types/src/blueprints/design/design-blueprint.d.ts.map +0 -1
  429. package/dist/types/src/blueprints/design/design-blueprint.test.d.ts +0 -2
  430. package/dist/types/src/blueprints/design/design-blueprint.test.d.ts.map +0 -1
  431. package/dist/types/src/blueprints/design/index.d.ts +0 -3
  432. package/dist/types/src/blueprints/design/index.d.ts.map +0 -1
  433. package/dist/types/src/blueprints/discord/discord-blueprint.d.ts +0 -18
  434. package/dist/types/src/blueprints/discord/discord-blueprint.d.ts.map +0 -1
  435. package/dist/types/src/blueprints/linear/linear-blueprint.d.ts +0 -18
  436. package/dist/types/src/blueprints/linear/linear-blueprint.d.ts.map +0 -1
  437. package/dist/types/src/blueprints/planning/planning-blueprint.d.ts +0 -4
  438. package/dist/types/src/blueprints/planning/planning-blueprint.d.ts.map +0 -1
  439. package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts +0 -2
  440. package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts.map +0 -1
  441. package/dist/types/src/blueprints/research/index.d.ts +0 -3
  442. package/dist/types/src/blueprints/research/index.d.ts.map +0 -1
  443. package/dist/types/src/blueprints/research/research-blueprint.d.ts +0 -4
  444. package/dist/types/src/blueprints/research/research-blueprint.d.ts.map +0 -1
  445. package/dist/types/src/blueprints/research/research-blueprint.test.d.ts +0 -2
  446. package/dist/types/src/blueprints/research/research-blueprint.test.d.ts.map +0 -1
  447. package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts +0 -4
  448. package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts.map +0 -1
  449. package/dist/types/src/blueprints/websearch/websearch-toolkit.d.ts.map +0 -1
  450. package/dist/types/src/experimental/feed.test.d.ts +0 -2
  451. package/dist/types/src/experimental/feed.test.d.ts.map +0 -1
  452. package/dist/types/src/functions/discord/fetch-messages.d.ts.map +0 -1
  453. package/dist/types/src/functions/discord/fetch-messages.test.d.ts.map +0 -1
  454. package/dist/types/src/functions/discord/index.d.ts +0 -12
  455. package/dist/types/src/functions/discord/index.d.ts.map +0 -1
  456. package/dist/types/src/functions/document/index.d.ts +0 -13
  457. package/dist/types/src/functions/document/index.d.ts.map +0 -1
  458. package/dist/types/src/functions/document/read.d.ts +0 -7
  459. package/dist/types/src/functions/document/read.d.ts.map +0 -1
  460. package/dist/types/src/functions/document/update.d.ts +0 -6
  461. package/dist/types/src/functions/document/update.d.ts.map +0 -1
  462. package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +0 -173
  463. package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +0 -1
  464. package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts +0 -2
  465. package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts.map +0 -1
  466. package/dist/types/src/functions/entity-extraction/index.d.ts +0 -174
  467. package/dist/types/src/functions/entity-extraction/index.d.ts.map +0 -1
  468. package/dist/types/src/functions/exa/exa.d.ts +0 -5
  469. package/dist/types/src/functions/exa/exa.d.ts.map +0 -1
  470. package/dist/types/src/functions/exa/index.d.ts +0 -3
  471. package/dist/types/src/functions/exa/index.d.ts.map +0 -1
  472. package/dist/types/src/functions/exa/mock.d.ts +0 -5
  473. package/dist/types/src/functions/exa/mock.d.ts.map +0 -1
  474. package/dist/types/src/functions/github/fetch-prs.d.ts +0 -6
  475. package/dist/types/src/functions/github/fetch-prs.d.ts.map +0 -1
  476. package/dist/types/src/functions/linear/index.d.ts +0 -9
  477. package/dist/types/src/functions/linear/index.d.ts.map +0 -1
  478. package/dist/types/src/functions/linear/linear.test.d.ts.map +0 -1
  479. package/dist/types/src/functions/linear/sync-issues.d.ts +0 -12
  480. package/dist/types/src/functions/linear/sync-issues.d.ts.map +0 -1
  481. package/dist/types/src/functions/research/document-create.d.ts +0 -9
  482. package/dist/types/src/functions/research/document-create.d.ts.map +0 -1
  483. package/dist/types/src/functions/research/index.d.ts +0 -21
  484. package/dist/types/src/functions/research/index.d.ts.map +0 -1
  485. package/dist/types/src/functions/research/research-graph.d.ts +0 -18
  486. package/dist/types/src/functions/research/research-graph.d.ts.map +0 -1
  487. package/dist/types/src/functions/research/research.d.ts +0 -14
  488. package/dist/types/src/functions/research/research.d.ts.map +0 -1
  489. package/dist/types/src/functions/research/research.test.d.ts +0 -2
  490. package/dist/types/src/functions/research/research.test.d.ts.map +0 -1
  491. package/dist/types/src/functions/research/types.d.ts +0 -6
  492. package/dist/types/src/functions/research/types.d.ts.map +0 -1
  493. package/dist/types/src/functions/tasks/index.d.ts +0 -15
  494. package/dist/types/src/functions/tasks/index.d.ts.map +0 -1
  495. package/dist/types/src/functions/tasks/read.d.ts +0 -7
  496. package/dist/types/src/functions/tasks/read.d.ts.map +0 -1
  497. package/dist/types/src/functions/tasks/task-list.d.ts +0 -74
  498. package/dist/types/src/functions/tasks/task-list.d.ts.map +0 -1
  499. package/dist/types/src/functions/tasks/task-list.test.d.ts +0 -2
  500. package/dist/types/src/functions/tasks/task-list.test.d.ts.map +0 -1
  501. package/dist/types/src/functions/tasks/update.d.ts +0 -9
  502. package/dist/types/src/functions/tasks/update.d.ts.map +0 -1
  503. package/dist/types/src/plugins.d.ts +0 -19
  504. package/dist/types/src/plugins.d.ts.map +0 -1
  505. package/dist/types/src/testing/data/exa-search-1748337321991.d.ts +0 -38
  506. package/dist/types/src/testing/data/exa-search-1748337321991.d.ts.map +0 -1
  507. package/dist/types/src/testing/data/exa-search-1748337331526.d.ts +0 -37
  508. package/dist/types/src/testing/data/exa-search-1748337331526.d.ts.map +0 -1
  509. package/dist/types/src/testing/data/exa-search-1748337344119.d.ts +0 -58
  510. package/dist/types/src/testing/data/exa-search-1748337344119.d.ts.map +0 -1
  511. package/dist/types/src/testing/data/index.d.ts +0 -3
  512. package/dist/types/src/testing/data/index.d.ts.map +0 -1
  513. package/dist/types/src/toolkits/AssistantToolkit.d.ts +0 -17
  514. package/dist/types/src/toolkits/AssistantToolkit.d.ts.map +0 -1
  515. package/dist/types/src/toolkits/AssistantToolkit.test.d.ts +0 -2
  516. package/dist/types/src/toolkits/AssistantToolkit.test.d.ts.map +0 -1
  517. package/dist/types/src/toolkits/SystemToolkit.d.ts +0 -67
  518. package/dist/types/src/toolkits/SystemToolkit.d.ts.map +0 -1
  519. package/src/blueprints/design/design-blueprint.test.ts +0 -103
  520. package/src/blueprints/design/design-blueprint.ts +0 -33
  521. package/src/blueprints/design/index.ts +0 -7
  522. package/src/blueprints/discord/discord-blueprint.ts +0 -34
  523. package/src/blueprints/linear/linear-blueprint.ts +0 -35
  524. package/src/blueprints/planning/planning-blueprint.test.ts +0 -124
  525. package/src/blueprints/planning/planning-blueprint.ts +0 -98
  526. package/src/blueprints/research/index.ts +0 -7
  527. package/src/blueprints/research/research-blueprint.test.ts +0 -7
  528. package/src/blueprints/research/research-blueprint.ts +0 -53
  529. package/src/blueprints/websearch/websearch-blueprint.ts +0 -20
  530. package/src/experimental/feed.test.ts +0 -111
  531. package/src/functions/discord/fetch-messages.test.ts +0 -58
  532. package/src/functions/discord/fetch-messages.ts +0 -252
  533. package/src/functions/discord/index.ts +0 -9
  534. package/src/functions/document/index.ts +0 -12
  535. package/src/functions/document/read.ts +0 -29
  536. package/src/functions/document/update.ts +0 -30
  537. package/src/functions/entity-extraction/entity-extraction.conversations.json +0 -1
  538. package/src/functions/entity-extraction/entity-extraction.test.ts +0 -92
  539. package/src/functions/entity-extraction/entity-extraction.ts +0 -165
  540. package/src/functions/entity-extraction/index.ts +0 -9
  541. package/src/functions/exa/exa.ts +0 -37
  542. package/src/functions/exa/index.ts +0 -6
  543. package/src/functions/exa/mock.ts +0 -71
  544. package/src/functions/github/fetch-prs.ts +0 -30
  545. package/src/functions/linear/index.ts +0 -9
  546. package/src/functions/linear/linear.test.ts +0 -83
  547. package/src/functions/research/document-create.ts +0 -75
  548. package/src/functions/research/index.ts +0 -14
  549. package/src/functions/research/research-graph.ts +0 -47
  550. package/src/functions/research/research-instructions.tpl +0 -106
  551. package/src/functions/research/research.conversations.json +0 -1
  552. package/src/functions/research/research.test.ts +0 -179
  553. package/src/functions/research/research.ts +0 -190
  554. package/src/functions/research/types.ts +0 -26
  555. package/src/functions/tasks/index.ts +0 -11
  556. package/src/functions/tasks/read.ts +0 -34
  557. package/src/functions/tasks/task-list.test.ts +0 -99
  558. package/src/functions/tasks/task-list.ts +0 -165
  559. package/src/functions/tasks/update.ts +0 -52
  560. package/src/plugins.tsx +0 -68
  561. package/src/testing/data/exa-search-1748337321991.ts +0 -131
  562. package/src/testing/data/exa-search-1748337331526.ts +0 -144
  563. package/src/testing/data/exa-search-1748337344119.ts +0 -133
  564. package/src/testing/data/index.ts +0 -11
  565. package/src/toolkits/AssistantToolkit.conversations.json +0 -1
  566. package/src/toolkits/AssistantToolkit.test.ts +0 -88
  567. package/src/toolkits/AssistantToolkit.ts +0 -47
  568. package/src/toolkits/SystemToolkit.ts +0 -231
  569. /package/dist/types/src/{functions/discord → blueprints/discord/functions}/fetch-messages.test.d.ts +0 -0
  570. /package/dist/types/src/{functions/linear → blueprints/linear/functions}/linear.test.d.ts +0 -0
@@ -0,0 +1,532 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { describe, expect, it } from '@effect/vitest';
6
+ import * as Effect from 'effect/Effect';
7
+
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';
11
+ import { TestHelpers } from '@dxos/effect/testing';
12
+ import { AgentService } from '@dxos/functions-runtime';
13
+ import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
14
+ import { ObjectId } from '@dxos/keys';
15
+ import { Employer, Organization, Person } from '@dxos/types';
16
+ import { trim } from '@dxos/util';
17
+
18
+ import DatabaseBlueprint from './blueprint';
19
+ import { DatabaseHandlers } from './functions';
20
+ import { Query as DatabaseQueryOperation } from './functions/definitions';
21
+
22
+ ObjectId.dangerouslyDisableRandomness();
23
+
24
+ const TestLayer = AssistantTestLayer({
25
+ operationHandlers: DatabaseHandlers,
26
+ types: [Organization.Organization, Person.Person, Employer.Employer, Tag.Tag, Blueprint.Blueprint, Feed.Feed],
27
+ blueprints: [DatabaseBlueprint.make()],
28
+ tracing: 'pretty',
29
+ aiServicePreset: 'edge-remote',
30
+ });
31
+
32
+ describe('Database Blueprint', () => {
33
+ //
34
+ // Schema
35
+ //
36
+
37
+ it.effect(
38
+ 'schema-list: list available schemas',
39
+ Effect.fnUntraced(
40
+ function* (_) {
41
+ const agent = yield* AgentService.createSession({
42
+ blueprints: [DatabaseBlueprint.make()],
43
+ });
44
+ yield* agent.submitPrompt('List all available schemas. Tell me what typenames are available.');
45
+ yield* agent.waitForCompletion();
46
+ },
47
+ Effect.provide(TestLayer),
48
+ TestHelpers.provideTestContext,
49
+ ),
50
+ { timeout: 60_000 },
51
+ );
52
+
53
+ it.effect(
54
+ 'schema-add: add a new schema',
55
+ Effect.fnUntraced(
56
+ function* (_) {
57
+ const agent = yield* AgentService.createSession({
58
+ blueprints: [DatabaseBlueprint.make()],
59
+ });
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).',
62
+ );
63
+ yield* agent.waitForCompletion();
64
+ const schemas = yield* Database.runSchemaQuery({
65
+ typename: 'com.example.type.project',
66
+ location: ['database', 'runtime'],
67
+ });
68
+ expect(schemas.length).toBeGreaterThanOrEqual(1);
69
+ },
70
+ Effect.provide(TestLayer),
71
+ TestHelpers.provideTestContext,
72
+ ),
73
+ { timeout: 60_000 },
74
+ );
75
+
76
+ //
77
+ // Objects
78
+ //
79
+
80
+ it.effect(
81
+ 'object-create: create an object',
82
+ Effect.fnUntraced(
83
+ function* (_) {
84
+ const agent = yield* AgentService.createSession({
85
+ blueprints: [DatabaseBlueprint.make()],
86
+ });
87
+ yield* agent.submitPrompt('Create a new organization called "Cyberdyne Systems".');
88
+ yield* agent.waitForCompletion();
89
+ const orgs = yield* Database.runQuery(Query.type(Organization.Organization, { name: 'Cyberdyne Systems' }));
90
+ expect(orgs).toHaveLength(1);
91
+ },
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),
116
+ TestHelpers.provideTestContext,
117
+ ),
118
+ { timeout: 60_000 },
119
+ );
120
+
121
+ it.effect(
122
+ 'object-delete: delete an object',
123
+ Effect.fnUntraced(
124
+ function* (_) {
125
+ const agent = yield* AgentService.createSession({
126
+ blueprints: [DatabaseBlueprint.make()],
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();
131
+ expect(Obj.isDeleted(org)).toBe(true);
132
+ },
133
+ Effect.provide(TestLayer),
134
+ TestHelpers.provideTestContext,
135
+ ),
136
+ { timeout: 60_000 },
137
+ );
138
+
139
+ it.effect(
140
+ 'object-update: update an object',
141
+ Effect.fnUntraced(
142
+ function* (_) {
143
+ const agent = yield* AgentService.createSession({
144
+ blueprints: [DatabaseBlueprint.make()],
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();
149
+ expect(org.name).toBe('New Name Corp');
150
+ },
151
+ Effect.provide(TestLayer),
152
+ TestHelpers.provideTestContext,
153
+ ),
154
+ { timeout: 60_000 },
155
+ );
156
+
157
+ //
158
+ // Query & Load
159
+ //
160
+
161
+ it.effect(
162
+ 'query: search for objects',
163
+ Effect.fnUntraced(
164
+ function* (_) {
165
+ const agent = yield* AgentService.createSession({
166
+ blueprints: [DatabaseBlueprint.make()],
167
+ });
168
+ yield* Database.add(Obj.make(Organization.Organization, { name: 'Acme Corp' }));
169
+ yield* Database.add(Obj.make(Organization.Organization, { name: 'Globex Industries' }));
170
+ yield* agent.submitPrompt('Search for all organizations. How many are there?');
171
+ yield* agent.waitForCompletion();
172
+ },
173
+ Effect.provide(TestLayer),
174
+ TestHelpers.provideTestContext,
175
+ ),
176
+ { timeout: 60_000 },
177
+ );
178
+
179
+ it.effect(
180
+ 'load: load object details',
181
+ Effect.fnUntraced(
182
+ function* (_) {
183
+ const agent = yield* AgentService.createSession({
184
+ blueprints: [DatabaseBlueprint.make()],
185
+ });
186
+ const org = yield* Database.add(
187
+ Obj.make(Organization.Organization, { name: 'Detail Corp', description: 'A detailed organization.' }),
188
+ );
189
+ const dxn = Obj.getDXN(org).toString();
190
+ yield* agent.submitPrompt(`Load the full details of object ${dxn}. What is its description?`);
191
+ yield* agent.waitForCompletion();
192
+ },
193
+ Effect.provide(TestLayer),
194
+ TestHelpers.provideTestContext,
195
+ ),
196
+ { timeout: 60_000 },
197
+ );
198
+
199
+ //
200
+ // Relations
201
+ //
202
+
203
+ it.effect(
204
+ 'relation-create: create a relation between objects',
205
+ Effect.fnUntraced(
206
+ function* (_) {
207
+ const agent = yield* AgentService.createSession({
208
+ blueprints: [DatabaseBlueprint.make()],
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();
216
+ const relations = yield* Database.runQuery(Query.type(Employer.Employer));
217
+ expect(relations.length).toBeGreaterThanOrEqual(1);
218
+ },
219
+ Effect.provide(TestLayer),
220
+ TestHelpers.provideTestContext,
221
+ ),
222
+ { timeout: 60_000 },
223
+ );
224
+
225
+ it.effect(
226
+ 'relation-delete: delete a relation',
227
+ Effect.fnUntraced(
228
+ function* (_) {
229
+ const agent = yield* AgentService.createSession({
230
+ blueprints: [DatabaseBlueprint.make()],
231
+ });
232
+ const person = yield* Database.add(Obj.make(Person.Person, { fullName: 'Sarah Connor' }));
233
+ const org = yield* Database.add(Obj.make(Organization.Organization, { name: 'Cyberdyne Systems' }));
234
+ const relation = yield* Database.add(
235
+ Relation.make(Employer.Employer, {
236
+ [Relation.Source]: person,
237
+ [Relation.Target]: org,
238
+ role: 'Director',
239
+ }),
240
+ );
241
+ const relationDxn = Relation.getDXN(relation).toString();
242
+ yield* agent.submitPrompt(`Delete the relation ${relationDxn}.`);
243
+ yield* agent.waitForCompletion();
244
+ expect(Relation.isDeleted(relation)).toBe(true);
245
+ },
246
+ Effect.provide(TestLayer),
247
+ TestHelpers.provideTestContext,
248
+ ),
249
+ { timeout: 60_000 },
250
+ );
251
+
252
+ //
253
+ // Tags
254
+ //
255
+
256
+ it.effect(
257
+ 'tag-add: add a tag to an object',
258
+ Effect.fnUntraced(
259
+ function* (_) {
260
+ const agent = yield* AgentService.createSession({
261
+ blueprints: [DatabaseBlueprint.make()],
262
+ });
263
+ const org = yield* Database.add(Obj.make(Organization.Organization, { name: 'Tagged Corp' }));
264
+ const tag = yield* Database.add(Tag.make({ label: 'important' }));
265
+ yield* agent.submitPrompt(`Add tag "important" to the organization "Tagged Corp".`);
266
+ yield* agent.waitForCompletion();
267
+ const tags = Obj.getMeta(org).tags ?? [];
268
+ // TODO(dmaretskyi): matcher doesnt work with echo proxies.
269
+ expect([...tags]).toContain(Obj.getDXN(tag).toString());
270
+ },
271
+ Effect.provide(TestLayer),
272
+ TestHelpers.provideTestContext,
273
+ ),
274
+ { timeout: 60_000 },
275
+ );
276
+
277
+ it.effect(
278
+ 'tag-remove: remove a tag from an object',
279
+ Effect.fnUntraced(
280
+ function* (_) {
281
+ const agent = yield* AgentService.createSession({
282
+ blueprints: [DatabaseBlueprint.make()],
283
+ });
284
+ const org = yield* Database.add(Obj.make(Organization.Organization, { name: 'Untagged Corp' }));
285
+ const tag = yield* Database.add(Tag.make({ label: 'obsolete' }));
286
+ const tagDxn = Obj.getDXN(tag).toString();
287
+ Entity.update(org, (org) => Entity.addTag(org, tagDxn));
288
+ expect(Obj.getMeta(org).tags ?? []).toContain(tagDxn);
289
+ yield* agent.submitPrompt(`Remove tag "obsolete" from the organization "Untagged Corp".`);
290
+ yield* agent.waitForCompletion();
291
+ const tags = Obj.getMeta(org).tags ?? [];
292
+ // TODO(dmaretskyi): matcher doesnt work with echo proxies.
293
+ expect([...tags]).not.toContain(tagDxn);
294
+ },
295
+ Effect.provide(TestLayer),
296
+ TestHelpers.provideTestContext,
297
+ ),
298
+ { timeout: 60_000 },
299
+ );
300
+
301
+ //
302
+ // Context
303
+ //
304
+
305
+ it.effect(
306
+ 'context-add: add object to chat context',
307
+ Effect.fnUntraced(
308
+ function* (_) {
309
+ const agent = yield* AgentService.createSession({
310
+ blueprints: [DatabaseBlueprint.make()],
311
+ });
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);
317
+ },
318
+ Effect.provide(TestLayer),
319
+ TestHelpers.provideTestContext,
320
+ ),
321
+ { timeout: 60_000 },
322
+ );
323
+
324
+ it.effect(
325
+ 'context-remove: remove object from chat context',
326
+ Effect.fnUntraced(
327
+ function* (_) {
328
+ const agent = yield* AgentService.createSession({
329
+ blueprints: [DatabaseBlueprint.make()],
330
+ });
331
+ const org = yield* Database.add(Obj.make(Organization.Organization, { name: 'Remove Context Corp' }));
332
+ const { db } = yield* Database.Service;
333
+ const ref = db.makeRef(Obj.getDXN(org)) as Ref.Ref<any>;
334
+ yield* agent.addContext([ref]);
335
+ const dxn = Obj.getDXN(org).toString();
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);
340
+ expect(found).toBeUndefined();
341
+ },
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),
528
+ TestHelpers.provideTestContext,
529
+ ),
530
+ { timeout: 60_000 },
531
+ );
532
+ });
@@ -0,0 +1,66 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Blueprint } from '@dxos/compute';
6
+ import { Ref } from '@dxos/echo';
7
+ import { Text } from '@dxos/schema';
8
+ import { trim } from '@dxos/util';
9
+
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';
25
+
26
+ const BLUEPRINT_KEY = 'org.dxos.blueprint.database';
27
+
28
+ const instructions = trim`
29
+ You can query, create, update, and delete objects in ECHO.
30
+ You can manage schemas, relations, tags, and add objects to the chat context.
31
+ `;
32
+
33
+ const make = () =>
34
+ Blueprint.make({
35
+ key: BLUEPRINT_KEY,
36
+ name: 'Database',
37
+ description: 'Query and manipulate objects in the ECHO database.',
38
+ agentCanEnable: true,
39
+ instructions: {
40
+ source: Ref.make(Text.make(instructions)),
41
+ },
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
+ }),
59
+ });
60
+
61
+ const blueprint: Blueprint.Definition = {
62
+ key: BLUEPRINT_KEY,
63
+ make,
64
+ };
65
+
66
+ export default blueprint;
@@ -0,0 +1,24 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { AiContextService } from '@dxos/assistant';
8
+ import { Operation } from '@dxos/compute';
9
+
10
+ import { ContextAdd } from './definitions';
11
+
12
+ export default ContextAdd.pipe(
13
+ Operation.withHandler(
14
+ Effect.fn(function* ({ obj }) {
15
+ const { binder } = yield* AiContextService;
16
+ yield* Effect.promise(() =>
17
+ binder.bind({
18
+ blueprints: [],
19
+ objects: [obj],
20
+ }),
21
+ );
22
+ }),
23
+ ),
24
+ );
@@ -0,0 +1,24 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { AiContextService } from '@dxos/assistant';
8
+ import { Operation } from '@dxos/compute';
9
+
10
+ import { ContextRemove } from './definitions';
11
+
12
+ export default ContextRemove.pipe(
13
+ Operation.withHandler(
14
+ Effect.fn(function* ({ obj }) {
15
+ const { binder } = yield* AiContextService;
16
+ yield* Effect.promise(() =>
17
+ binder.unbind({
18
+ blueprints: [],
19
+ objects: [obj],
20
+ }),
21
+ );
22
+ }) as any,
23
+ ),
24
+ );