@dxos/assistant-toolkit 0.8.4-main.ae835ea → 0.8.4-main.bc2380dfbc

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 (571) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/add-artifact-4IVGW6CI.mjs +30 -0
  3. package/dist/lib/neutral/add-artifact-4IVGW6CI.mjs.map +7 -0
  4. package/dist/lib/neutral/agent-F4L7UXME.mjs +65 -0
  5. package/dist/lib/neutral/agent-F4L7UXME.mjs.map +7 -0
  6. package/dist/lib/neutral/chunk-5GPL2WXU.mjs +292 -0
  7. package/dist/lib/neutral/chunk-5GPL2WXU.mjs.map +7 -0
  8. package/dist/lib/neutral/chunk-7UCYAP3T.mjs +332 -0
  9. package/dist/lib/neutral/chunk-7UCYAP3T.mjs.map +7 -0
  10. package/dist/lib/neutral/chunk-ANSF2BHN.mjs +67 -0
  11. package/dist/lib/neutral/chunk-ANSF2BHN.mjs.map +7 -0
  12. package/dist/lib/neutral/chunk-BCT55UTL.mjs +75 -0
  13. package/dist/lib/neutral/chunk-BCT55UTL.mjs.map +7 -0
  14. package/dist/lib/neutral/chunk-COL54UJ3.mjs +60 -0
  15. package/dist/lib/neutral/chunk-COL54UJ3.mjs.map +7 -0
  16. package/dist/lib/neutral/chunk-EJAQUAKM.mjs +73 -0
  17. package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  19. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  20. package/dist/lib/neutral/chunk-KGU725LW.mjs +29 -0
  21. package/dist/lib/neutral/chunk-KGU725LW.mjs.map +7 -0
  22. package/dist/lib/neutral/chunk-KS3IA6FQ.mjs +101 -0
  23. package/dist/lib/neutral/chunk-KS3IA6FQ.mjs.map +7 -0
  24. package/dist/lib/neutral/chunk-MMQ7HFL4.mjs +107 -0
  25. package/dist/lib/neutral/chunk-MMQ7HFL4.mjs.map +7 -0
  26. package/dist/lib/neutral/chunk-NR3GTWRC.mjs +53 -0
  27. package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +7 -0
  28. package/dist/lib/neutral/chunk-PLGEBNTO.mjs +65 -0
  29. package/dist/lib/neutral/chunk-PLGEBNTO.mjs.map +7 -0
  30. package/dist/lib/neutral/chunk-W2722TC5.mjs +70 -0
  31. package/dist/lib/neutral/chunk-W2722TC5.mjs.map +7 -0
  32. package/dist/lib/neutral/chunk-WLR3BGO4.mjs +25 -0
  33. package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +7 -0
  34. package/dist/lib/neutral/chunk-ZFXLTBZG.mjs +73 -0
  35. package/dist/lib/neutral/chunk-ZFXLTBZG.mjs.map +7 -0
  36. package/dist/lib/neutral/context-add-S5MBW2NA.mjs +22 -0
  37. package/dist/lib/neutral/context-add-S5MBW2NA.mjs.map +7 -0
  38. package/dist/lib/neutral/context-remove-35O5T5N5.mjs +22 -0
  39. package/dist/lib/neutral/context-remove-35O5T5N5.mjs.map +7 -0
  40. package/dist/lib/neutral/create-project-3AGXJ4TD.mjs +35 -0
  41. package/dist/lib/neutral/create-project-3AGXJ4TD.mjs.map +7 -0
  42. package/dist/lib/neutral/delete-J3PMWP7Z.mjs +19 -0
  43. package/dist/lib/neutral/delete-J3PMWP7Z.mjs.map +7 -0
  44. package/dist/lib/neutral/enable-blueprints-IVKST3WH.mjs +47 -0
  45. package/dist/lib/neutral/enable-blueprints-IVKST3WH.mjs.map +7 -0
  46. package/dist/lib/neutral/fetch-KHMHV7JR.mjs +16 -0
  47. package/dist/lib/neutral/fetch-KHMHV7JR.mjs.map +7 -0
  48. package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs +139 -0
  49. package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs.map +7 -0
  50. package/dist/lib/neutral/get-context-FBYWIP72.mjs +35 -0
  51. package/dist/lib/neutral/get-context-FBYWIP72.mjs.map +7 -0
  52. package/dist/lib/neutral/index.mjs +914 -0
  53. package/dist/lib/neutral/index.mjs.map +7 -0
  54. package/dist/lib/neutral/load-GAT3T2AD.mjs +17 -0
  55. package/dist/lib/neutral/load-GAT3T2AD.mjs.map +7 -0
  56. package/dist/lib/neutral/meta.json +1 -0
  57. package/dist/lib/neutral/object-create-PL3WRP74.mjs +35 -0
  58. package/dist/lib/neutral/object-create-PL3WRP74.mjs.map +7 -0
  59. package/dist/lib/neutral/object-delete-PZJQN5KW.mjs +18 -0
  60. package/dist/lib/neutral/object-delete-PZJQN5KW.mjs.map +7 -0
  61. package/dist/lib/neutral/object-update-R43N3VJX.mjs +28 -0
  62. package/dist/lib/neutral/object-update-R43N3VJX.mjs.map +7 -0
  63. package/dist/lib/neutral/project-VVXXUMAI.mjs +23 -0
  64. package/dist/lib/neutral/project-VVXXUMAI.mjs.map +7 -0
  65. package/dist/lib/neutral/project-rules-KSVSOZJV.mjs +78 -0
  66. package/dist/lib/neutral/project-rules-KSVSOZJV.mjs.map +7 -0
  67. package/dist/lib/neutral/prompt-INL55Q2B.mjs +170 -0
  68. package/dist/lib/neutral/prompt-INL55Q2B.mjs.map +7 -0
  69. package/dist/lib/neutral/qualifier-DAF4H7V3.mjs +88 -0
  70. package/dist/lib/neutral/qualifier-DAF4H7V3.mjs.map +7 -0
  71. package/dist/lib/neutral/query-MP5NSQKO.mjs +69 -0
  72. package/dist/lib/neutral/query-MP5NSQKO.mjs.map +7 -0
  73. package/dist/lib/neutral/query-U56GNEV6.mjs +32 -0
  74. package/dist/lib/neutral/query-U56GNEV6.mjs.map +7 -0
  75. package/dist/lib/neutral/query-blueprints-PLWYVOI3.mjs +16 -0
  76. package/dist/lib/neutral/query-blueprints-PLWYVOI3.mjs.map +7 -0
  77. package/dist/lib/neutral/relation-create-YAAAFTR2.mjs +34 -0
  78. package/dist/lib/neutral/relation-create-YAAAFTR2.mjs.map +7 -0
  79. package/dist/lib/neutral/relation-delete-IEPKERFR.mjs +18 -0
  80. package/dist/lib/neutral/relation-delete-IEPKERFR.mjs.map +7 -0
  81. package/dist/lib/neutral/save-GWAPLT3Z.mjs +23 -0
  82. package/dist/lib/neutral/save-GWAPLT3Z.mjs.map +7 -0
  83. package/dist/lib/neutral/schema-add-5BNIINRS.mjs +24 -0
  84. package/dist/lib/neutral/schema-add-5BNIINRS.mjs.map +7 -0
  85. package/dist/lib/neutral/schema-list-54UK7S4R.mjs +38 -0
  86. package/dist/lib/neutral/schema-list-54UK7S4R.mjs.map +7 -0
  87. package/dist/lib/neutral/sync-issues-DWY76B3M.mjs +166 -0
  88. package/dist/lib/neutral/sync-issues-DWY76B3M.mjs.map +7 -0
  89. package/dist/lib/neutral/sync-triggers-NOIQLELD.mjs +135 -0
  90. package/dist/lib/neutral/sync-triggers-NOIQLELD.mjs.map +7 -0
  91. package/dist/lib/neutral/tag-add-NLVRGTC6.mjs +19 -0
  92. package/dist/lib/neutral/tag-add-NLVRGTC6.mjs.map +7 -0
  93. package/dist/lib/neutral/tag-remove-N4HFBIA2.mjs +19 -0
  94. package/dist/lib/neutral/tag-remove-N4HFBIA2.mjs.map +7 -0
  95. package/dist/lib/neutral/testing/index.mjs +76 -0
  96. package/dist/lib/neutral/testing/index.mjs.map +7 -0
  97. package/dist/lib/neutral/update-blueprints-2SNK6HLG.mjs +16 -0
  98. package/dist/lib/neutral/update-blueprints-2SNK6HLG.mjs.map +7 -0
  99. package/dist/lib/neutral/update-tasks-QQUR53RN.mjs +13 -0
  100. package/dist/lib/neutral/update-tasks-QQUR53RN.mjs.map +7 -0
  101. package/dist/types/src/blueprints/automation/blueprint.d.ts +4 -0
  102. package/dist/types/src/blueprints/automation/blueprint.d.ts.map +1 -0
  103. package/dist/types/src/blueprints/automation/index.d.ts +2 -0
  104. package/dist/types/src/blueprints/automation/index.d.ts.map +1 -0
  105. package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts +4 -0
  106. package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts.map +1 -0
  107. package/dist/types/src/blueprints/blueprint-manager/blueprint.test.d.ts +2 -0
  108. package/dist/types/src/blueprints/blueprint-manager/blueprint.test.d.ts.map +1 -0
  109. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +61 -0
  110. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -0
  111. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +36 -0
  112. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -0
  113. package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts +4 -0
  114. package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts.map +1 -0
  115. package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +27 -0
  116. package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -0
  117. package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +4 -0
  118. package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts.map +1 -0
  119. package/dist/types/src/blueprints/blueprint-manager/index.d.ts +3 -0
  120. package/dist/types/src/blueprints/blueprint-manager/index.d.ts.map +1 -0
  121. package/dist/types/src/blueprints/browser/blueprint.d.ts +4 -0
  122. package/dist/types/src/blueprints/browser/blueprint.d.ts.map +1 -0
  123. package/dist/types/src/blueprints/browser/blueprint.test.d.ts +2 -0
  124. package/dist/types/src/blueprints/browser/blueprint.test.d.ts.map +1 -0
  125. package/dist/types/src/blueprints/browser/index.d.ts +2 -0
  126. package/dist/types/src/blueprints/browser/index.d.ts.map +1 -0
  127. package/dist/types/src/blueprints/database/blueprint.d.ts +4 -0
  128. package/dist/types/src/blueprints/database/blueprint.d.ts.map +1 -0
  129. package/dist/types/src/blueprints/database/blueprint.test.d.ts +2 -0
  130. package/dist/types/src/blueprints/database/blueprint.test.d.ts.map +1 -0
  131. package/dist/types/src/blueprints/database/functions/context-add.d.ts +7 -0
  132. package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -0
  133. package/dist/types/src/blueprints/database/functions/context-remove.d.ts +7 -0
  134. package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -0
  135. package/dist/types/src/blueprints/database/functions/definitions.d.ts +59 -0
  136. package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -0
  137. package/dist/types/src/blueprints/database/functions/index.d.ts +4 -0
  138. package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -0
  139. package/dist/types/src/blueprints/database/functions/load.d.ts +7 -0
  140. package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -0
  141. package/dist/types/src/blueprints/database/functions/object-create.d.ts +8 -0
  142. package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +1 -0
  143. package/dist/types/src/blueprints/database/functions/object-delete.d.ts +7 -0
  144. package/dist/types/src/blueprints/database/functions/object-delete.d.ts.map +1 -0
  145. package/dist/types/src/blueprints/database/functions/object-update.d.ts +10 -0
  146. package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -0
  147. package/dist/types/src/blueprints/database/functions/query.d.ts +12 -0
  148. package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -0
  149. package/dist/types/src/blueprints/database/functions/relation-create.d.ts +10 -0
  150. package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +1 -0
  151. package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +7 -0
  152. package/dist/types/src/blueprints/database/functions/relation-delete.d.ts.map +1 -0
  153. package/dist/types/src/blueprints/database/functions/schema-add.d.ts +9 -0
  154. package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +1 -0
  155. package/dist/types/src/blueprints/database/functions/schema-list.d.ts +7 -0
  156. package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +1 -0
  157. package/dist/types/src/blueprints/database/functions/tag-add.d.ts +8 -0
  158. package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +1 -0
  159. package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +8 -0
  160. package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -0
  161. package/dist/types/src/blueprints/database/index.d.ts +3 -0
  162. package/dist/types/src/blueprints/database/index.d.ts.map +1 -0
  163. package/dist/types/src/blueprints/discord/blueprint.d.ts +4 -0
  164. package/dist/types/src/blueprints/discord/blueprint.d.ts.map +1 -0
  165. package/dist/types/src/blueprints/discord/functions/definitions.d.ts +15 -0
  166. package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -0
  167. package/dist/types/src/{functions/discord → blueprints/discord/functions}/fetch-messages.d.ts +3 -2
  168. package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -0
  169. package/dist/types/src/blueprints/discord/functions/fetch-messages.test.d.ts.map +1 -0
  170. package/dist/types/src/blueprints/discord/functions/index.d.ts +4 -0
  171. package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -0
  172. package/dist/types/src/blueprints/discord/index.d.ts +2 -2
  173. package/dist/types/src/blueprints/discord/index.d.ts.map +1 -1
  174. package/dist/types/src/blueprints/github/functions/definitions.d.ts +7 -0
  175. package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -0
  176. package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts +8 -0
  177. package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -0
  178. package/dist/types/src/blueprints/github/functions/index.d.ts +4 -0
  179. package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -0
  180. package/dist/types/src/blueprints/github/index.d.ts +2 -0
  181. package/dist/types/src/blueprints/github/index.d.ts.map +1 -0
  182. package/dist/types/src/blueprints/index.d.ts +11 -6
  183. package/dist/types/src/blueprints/index.d.ts.map +1 -1
  184. package/dist/types/src/blueprints/linear/blueprint.d.ts +4 -0
  185. package/dist/types/src/blueprints/linear/blueprint.d.ts.map +1 -0
  186. package/dist/types/src/blueprints/linear/functions/definitions.d.ts +6 -0
  187. package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -0
  188. package/dist/types/src/blueprints/linear/functions/index.d.ts +4 -0
  189. package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -0
  190. package/dist/types/src/blueprints/linear/functions/linear.test.d.ts.map +1 -0
  191. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts +10 -0
  192. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -0
  193. package/dist/types/src/blueprints/linear/index.d.ts +2 -2
  194. package/dist/types/src/blueprints/linear/index.d.ts.map +1 -1
  195. package/dist/types/src/blueprints/memory/blueprint.d.ts +4 -0
  196. package/dist/types/src/blueprints/memory/blueprint.d.ts.map +1 -0
  197. package/dist/types/src/blueprints/memory/blueprint.test.d.ts +2 -0
  198. package/dist/types/src/blueprints/memory/blueprint.test.d.ts.map +1 -0
  199. package/dist/types/src/blueprints/memory/functions/definitions.d.ts +17 -0
  200. package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +1 -0
  201. package/dist/types/src/blueprints/memory/functions/delete.d.ts +10 -0
  202. package/dist/types/src/blueprints/memory/functions/delete.d.ts.map +1 -0
  203. package/dist/types/src/blueprints/memory/functions/index.d.ts +4 -0
  204. package/dist/types/src/blueprints/memory/functions/index.d.ts.map +1 -0
  205. package/dist/types/src/blueprints/memory/functions/query.d.ts +8 -0
  206. package/dist/types/src/blueprints/memory/functions/query.d.ts.map +1 -0
  207. package/dist/types/src/blueprints/memory/functions/save.d.ts +8 -0
  208. package/dist/types/src/blueprints/memory/functions/save.d.ts.map +1 -0
  209. package/dist/types/src/blueprints/memory/index.d.ts +3 -0
  210. package/dist/types/src/blueprints/memory/index.d.ts.map +1 -0
  211. package/dist/types/src/blueprints/planning/blueprint.d.ts +4 -0
  212. package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -0
  213. package/dist/types/src/blueprints/planning/functions/index.d.ts +4 -0
  214. package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -0
  215. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +24 -0
  216. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -0
  217. package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts +2 -0
  218. package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts.map +1 -0
  219. package/dist/types/src/blueprints/planning/index.d.ts +2 -2
  220. package/dist/types/src/blueprints/planning/index.d.ts.map +1 -1
  221. package/dist/types/src/blueprints/project/blueprint.d.ts +4 -0
  222. package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -0
  223. package/dist/types/src/blueprints/project/blueprint.test.d.ts +2 -0
  224. package/dist/types/src/blueprints/project/blueprint.test.d.ts.map +1 -0
  225. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +4 -0
  226. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -0
  227. package/dist/types/src/blueprints/project/functions/agent.d.ts +4 -0
  228. package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -0
  229. package/dist/types/src/blueprints/project/functions/definitions.d.ts +166 -0
  230. package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -0
  231. package/dist/types/src/blueprints/project/functions/get-context.d.ts +4 -0
  232. package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -0
  233. package/dist/types/src/blueprints/project/functions/index.d.ts +4 -0
  234. package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -0
  235. package/dist/types/src/blueprints/project/functions/qualifier.d.ts +77 -0
  236. package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -0
  237. package/dist/types/src/blueprints/project/index.d.ts +3 -0
  238. package/dist/types/src/blueprints/project/index.d.ts.map +1 -0
  239. package/dist/types/src/blueprints/project-wizard/blueprint.d.ts +4 -0
  240. package/dist/types/src/blueprints/project-wizard/blueprint.d.ts.map +1 -0
  241. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +55 -0
  242. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +1 -0
  243. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +104 -0
  244. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -0
  245. package/dist/types/src/blueprints/project-wizard/functions/index.d.ts +4 -0
  246. package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +1 -0
  247. package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts +4 -0
  248. package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +1 -0
  249. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +52 -0
  250. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -0
  251. package/dist/types/src/blueprints/project-wizard/index.d.ts +3 -0
  252. package/dist/types/src/blueprints/project-wizard/index.d.ts.map +1 -0
  253. package/dist/types/src/blueprints/testing.d.ts +9 -5
  254. package/dist/types/src/blueprints/testing.d.ts.map +1 -1
  255. package/dist/types/src/blueprints/websearch/blueprint.d.ts +4 -0
  256. package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -0
  257. package/dist/types/src/blueprints/websearch/blueprint.test.d.ts +2 -0
  258. package/dist/types/src/blueprints/websearch/blueprint.test.d.ts.map +1 -0
  259. package/dist/types/src/blueprints/websearch/functions/definitions.d.ts +5 -0
  260. package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -0
  261. package/dist/types/src/blueprints/websearch/functions/fetch.d.ts +6 -0
  262. package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +1 -0
  263. package/dist/types/src/blueprints/websearch/functions/index.d.ts +4 -0
  264. package/dist/types/src/blueprints/websearch/functions/index.d.ts.map +1 -0
  265. package/dist/types/src/blueprints/websearch/index.d.ts +3 -3
  266. package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
  267. package/dist/types/src/blueprints/websearch/{websearch-toolkit.d.ts → toolkit.d.ts} +4 -1
  268. package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -0
  269. package/dist/types/src/{functions/research → crud}/graph.d.ts +12 -11
  270. package/dist/types/src/crud/graph.d.ts.map +1 -0
  271. package/dist/types/src/crud/graph.test.d.ts.map +1 -0
  272. package/dist/types/src/crud/index.d.ts +2 -0
  273. package/dist/types/src/crud/index.d.ts.map +1 -0
  274. package/dist/types/src/errors.d.ts +41 -0
  275. package/dist/types/src/errors.d.ts.map +1 -0
  276. package/dist/types/src/functions/agent/definitions.d.ts +61 -0
  277. package/dist/types/src/functions/agent/definitions.d.ts.map +1 -0
  278. package/dist/types/src/functions/agent/index.d.ts +3 -4
  279. package/dist/types/src/functions/agent/index.d.ts.map +1 -1
  280. package/dist/types/src/functions/agent/prompt.d.ts +2 -9
  281. package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
  282. package/dist/types/src/functions/agent/prompt.test.d.ts +2 -0
  283. package/dist/types/src/functions/agent/prompt.test.d.ts.map +1 -0
  284. package/dist/types/src/functions/index.d.ts +0 -6
  285. package/dist/types/src/functions/index.d.ts.map +1 -1
  286. package/dist/types/src/index.d.ts +3 -1
  287. package/dist/types/src/index.d.ts.map +1 -1
  288. package/dist/types/src/sync/sync.d.ts +3 -4
  289. package/dist/types/src/sync/sync.d.ts.map +1 -1
  290. package/dist/types/src/testing/index.d.ts +2 -1
  291. package/dist/types/src/testing/index.d.ts.map +1 -1
  292. package/dist/types/src/testing/plugins.d.ts +19 -0
  293. package/dist/types/src/testing/plugins.d.ts.map +1 -0
  294. package/dist/types/src/toolkits/WebToolkit.d.ts +38 -0
  295. package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -0
  296. package/dist/types/src/toolkits/index.d.ts +2 -0
  297. package/dist/types/src/toolkits/index.d.ts.map +1 -0
  298. package/dist/types/src/types/Agent.d.ts +79 -0
  299. package/dist/types/src/types/Agent.d.ts.map +1 -0
  300. package/dist/types/src/types/Chat.d.ts +56 -0
  301. package/dist/types/src/types/Chat.d.ts.map +1 -0
  302. package/dist/types/src/types/McpServer.d.ts +21 -0
  303. package/dist/types/src/types/McpServer.d.ts.map +1 -0
  304. package/dist/types/src/types/Memory.d.ts +12 -0
  305. package/dist/types/src/types/Memory.d.ts.map +1 -0
  306. package/dist/types/src/types/Plan.d.ts +89 -0
  307. package/dist/types/src/types/Plan.d.ts.map +1 -0
  308. package/dist/types/src/types/index.d.ts +6 -0
  309. package/dist/types/src/types/index.d.ts.map +1 -0
  310. package/dist/types/src/util/graphql.d.ts.map +1 -1
  311. package/dist/types/tsconfig.tsbuildinfo +1 -1
  312. package/package.json +46 -39
  313. package/src/blueprints/automation/blueprint.ts +105 -0
  314. package/src/blueprints/automation/index.ts +5 -0
  315. package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -0
  316. package/src/blueprints/blueprint-manager/blueprint.test.ts +202 -0
  317. package/src/blueprints/blueprint-manager/blueprint.ts +49 -0
  318. package/src/blueprints/blueprint-manager/functions/definitions.ts +57 -0
  319. package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +43 -0
  320. package/src/blueprints/blueprint-manager/functions/index.ts +13 -0
  321. package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +18 -0
  322. package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +18 -0
  323. package/src/blueprints/blueprint-manager/index.ts +6 -0
  324. package/src/blueprints/browser/blueprint.test.ts +61 -0
  325. package/src/blueprints/browser/blueprint.ts +40 -0
  326. package/src/blueprints/browser/index.ts +5 -0
  327. package/src/blueprints/database/blueprint.conversations.json +1 -0
  328. package/src/blueprints/database/blueprint.test.ts +531 -0
  329. package/src/blueprints/database/blueprint.ts +66 -0
  330. package/src/blueprints/database/functions/context-add.ts +24 -0
  331. package/src/blueprints/database/functions/context-remove.ts +24 -0
  332. package/src/blueprints/database/functions/definitions.ts +318 -0
  333. package/src/blueprints/database/functions/index.ts +23 -0
  334. package/src/blueprints/database/functions/load.ts +19 -0
  335. package/src/blueprints/database/functions/object-create.ts +38 -0
  336. package/src/blueprints/database/functions/object-delete.ts +20 -0
  337. package/src/blueprints/database/functions/object-update.ts +30 -0
  338. package/src/blueprints/database/functions/query.ts +63 -0
  339. package/src/blueprints/database/functions/relation-create.ts +34 -0
  340. package/src/blueprints/database/functions/relation-delete.ts +21 -0
  341. package/src/blueprints/database/functions/schema-add.ts +28 -0
  342. package/src/blueprints/database/functions/schema-list.ts +33 -0
  343. package/src/blueprints/database/functions/tag-add.ts +21 -0
  344. package/src/blueprints/database/functions/tag-remove.ts +21 -0
  345. package/src/blueprints/database/index.ts +21 -0
  346. package/src/blueprints/discord/blueprint.ts +41 -0
  347. package/src/blueprints/discord/functions/definitions.ts +70 -0
  348. package/src/blueprints/discord/functions/fetch-messages.test.ts +50 -0
  349. package/src/blueprints/discord/functions/fetch-messages.ts +198 -0
  350. package/src/blueprints/discord/functions/index.ts +9 -0
  351. package/src/blueprints/discord/index.ts +2 -3
  352. package/src/blueprints/github/functions/definitions.ts +26 -0
  353. package/src/blueprints/github/functions/fetch-prs.ts +24 -0
  354. package/src/blueprints/github/functions/index.ts +9 -0
  355. package/src/blueprints/github/index.ts +5 -0
  356. package/src/blueprints/index.ts +11 -6
  357. package/src/blueprints/linear/blueprint.ts +42 -0
  358. package/src/blueprints/linear/functions/definitions.ts +23 -0
  359. package/src/blueprints/linear/functions/index.ts +9 -0
  360. package/src/blueprints/linear/functions/linear.test.ts +57 -0
  361. package/src/{functions/linear → blueprints/linear/functions}/sync-issues.ts +44 -51
  362. package/src/blueprints/linear/index.ts +2 -3
  363. package/src/blueprints/memory/blueprint.conversations.json +1 -0
  364. package/src/blueprints/memory/blueprint.test.ts +139 -0
  365. package/src/blueprints/memory/blueprint.ts +41 -0
  366. package/src/blueprints/memory/functions/definitions.ts +68 -0
  367. package/src/blueprints/memory/functions/delete.ts +20 -0
  368. package/src/blueprints/memory/functions/index.ts +13 -0
  369. package/src/blueprints/memory/functions/query.ts +32 -0
  370. package/src/blueprints/memory/functions/save.ts +20 -0
  371. package/src/blueprints/memory/index.ts +6 -0
  372. package/src/blueprints/planning/blueprint.ts +24 -0
  373. package/src/blueprints/planning/functions/index.ts +9 -0
  374. package/src/blueprints/planning/functions/update-tasks.md +116 -0
  375. package/src/blueprints/planning/functions/update-tasks.test.ts +55 -0
  376. package/src/blueprints/planning/functions/update-tasks.ts +67 -0
  377. package/src/blueprints/planning/index.ts +3 -4
  378. package/src/blueprints/project/blueprint.conversations.json +1 -0
  379. package/src/blueprints/project/blueprint.test.ts +712 -0
  380. package/src/blueprints/project/blueprint.ts +64 -0
  381. package/src/blueprints/project/functions/add-artifact.ts +31 -0
  382. package/src/blueprints/project/functions/agent.ts +69 -0
  383. package/src/blueprints/project/functions/definitions.ts +92 -0
  384. package/src/blueprints/project/functions/get-context.ts +47 -0
  385. package/src/blueprints/project/functions/index.ts +14 -0
  386. package/src/blueprints/project/functions/qualifier.ts +90 -0
  387. package/src/blueprints/project/index.ts +6 -0
  388. package/src/blueprints/project-wizard/blueprint.ts +52 -0
  389. package/src/blueprints/project-wizard/functions/create-project.ts +32 -0
  390. package/src/blueprints/project-wizard/functions/definitions.ts +63 -0
  391. package/src/blueprints/project-wizard/functions/index.ts +13 -0
  392. package/src/blueprints/project-wizard/functions/project-rules.ts +77 -0
  393. package/src/blueprints/project-wizard/functions/sync-triggers.ts +153 -0
  394. package/src/blueprints/project-wizard/index.ts +6 -0
  395. package/src/blueprints/testing.ts +29 -8
  396. package/src/blueprints/websearch/blueprint.conversations.json +1 -0
  397. package/src/blueprints/websearch/blueprint.test.ts +39 -0
  398. package/src/blueprints/websearch/blueprint.ts +30 -0
  399. package/src/blueprints/websearch/functions/definitions.ts +25 -0
  400. package/src/blueprints/websearch/functions/fetch.ts +18 -0
  401. package/src/blueprints/websearch/functions/index.ts +9 -0
  402. package/src/blueprints/websearch/index.ts +3 -4
  403. package/src/blueprints/websearch/{websearch-toolkit.ts → toolkit.ts} +6 -1
  404. package/src/crud/graph.test.ts +44 -0
  405. package/src/crud/graph.ts +378 -0
  406. package/src/crud/index.ts +5 -0
  407. package/src/errors.ts +25 -0
  408. package/src/functions/READ_THIS.md +5 -0
  409. package/src/functions/agent/definitions.ts +56 -0
  410. package/src/functions/agent/index.ts +3 -5
  411. package/src/functions/agent/prompt.conversations.json +1 -0
  412. package/src/functions/agent/prompt.test.ts +78 -0
  413. package/src/functions/agent/prompt.ts +210 -87
  414. package/src/functions/index.ts +0 -6
  415. package/src/index.ts +3 -1
  416. package/src/sync/sync.ts +52 -34
  417. package/src/testing/index.ts +2 -1
  418. package/src/testing/plugins.tsx +79 -0
  419. package/src/toolkits/WebToolkit.ts +33 -0
  420. package/src/toolkits/index.ts +5 -0
  421. package/src/types/Agent.ts +238 -0
  422. package/src/types/Chat.ts +63 -0
  423. package/src/types/McpServer.ts +37 -0
  424. package/src/types/Memory.ts +24 -0
  425. package/src/types/Plan.ts +111 -0
  426. package/src/types/index.ts +9 -0
  427. package/dist/lib/browser/index.mjs +0 -2481
  428. package/dist/lib/browser/index.mjs.map +0 -7
  429. package/dist/lib/browser/meta.json +0 -1
  430. package/dist/lib/node-esm/index.mjs +0 -2483
  431. package/dist/lib/node-esm/index.mjs.map +0 -7
  432. package/dist/lib/node-esm/meta.json +0 -1
  433. package/dist/types/src/blueprints/design/design-blueprint.d.ts +0 -4
  434. package/dist/types/src/blueprints/design/design-blueprint.d.ts.map +0 -1
  435. package/dist/types/src/blueprints/design/design-blueprint.test.d.ts +0 -2
  436. package/dist/types/src/blueprints/design/design-blueprint.test.d.ts.map +0 -1
  437. package/dist/types/src/blueprints/design/index.d.ts +0 -3
  438. package/dist/types/src/blueprints/design/index.d.ts.map +0 -1
  439. package/dist/types/src/blueprints/discord/discord-blueprint.d.ts +0 -18
  440. package/dist/types/src/blueprints/discord/discord-blueprint.d.ts.map +0 -1
  441. package/dist/types/src/blueprints/linear/linear-blueprint.d.ts +0 -18
  442. package/dist/types/src/blueprints/linear/linear-blueprint.d.ts.map +0 -1
  443. package/dist/types/src/blueprints/planning/planning-blueprint.d.ts +0 -4
  444. package/dist/types/src/blueprints/planning/planning-blueprint.d.ts.map +0 -1
  445. package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts +0 -2
  446. package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts.map +0 -1
  447. package/dist/types/src/blueprints/research/index.d.ts +0 -3
  448. package/dist/types/src/blueprints/research/index.d.ts.map +0 -1
  449. package/dist/types/src/blueprints/research/research-blueprint.d.ts +0 -4
  450. package/dist/types/src/blueprints/research/research-blueprint.d.ts.map +0 -1
  451. package/dist/types/src/blueprints/research/research-blueprint.test.d.ts +0 -2
  452. package/dist/types/src/blueprints/research/research-blueprint.test.d.ts.map +0 -1
  453. package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts +0 -4
  454. package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts.map +0 -1
  455. package/dist/types/src/blueprints/websearch/websearch-toolkit.d.ts.map +0 -1
  456. package/dist/types/src/experimental/feed.test.d.ts +0 -2
  457. package/dist/types/src/experimental/feed.test.d.ts.map +0 -1
  458. package/dist/types/src/functions/discord/fetch-messages.d.ts.map +0 -1
  459. package/dist/types/src/functions/discord/fetch-messages.test.d.ts.map +0 -1
  460. package/dist/types/src/functions/discord/index.d.ts +0 -12
  461. package/dist/types/src/functions/discord/index.d.ts.map +0 -1
  462. package/dist/types/src/functions/document/index.d.ts +0 -12
  463. package/dist/types/src/functions/document/index.d.ts.map +0 -1
  464. package/dist/types/src/functions/document/read.d.ts +0 -7
  465. package/dist/types/src/functions/document/read.d.ts.map +0 -1
  466. package/dist/types/src/functions/document/update.d.ts +0 -6
  467. package/dist/types/src/functions/document/update.d.ts.map +0 -1
  468. package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +0 -173
  469. package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +0 -1
  470. package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts +0 -2
  471. package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts.map +0 -1
  472. package/dist/types/src/functions/entity-extraction/index.d.ts +0 -174
  473. package/dist/types/src/functions/entity-extraction/index.d.ts.map +0 -1
  474. package/dist/types/src/functions/exa/exa.d.ts +0 -5
  475. package/dist/types/src/functions/exa/exa.d.ts.map +0 -1
  476. package/dist/types/src/functions/exa/index.d.ts +0 -3
  477. package/dist/types/src/functions/exa/index.d.ts.map +0 -1
  478. package/dist/types/src/functions/exa/mock.d.ts +0 -5
  479. package/dist/types/src/functions/exa/mock.d.ts.map +0 -1
  480. package/dist/types/src/functions/github/fetch-prs.d.ts +0 -6
  481. package/dist/types/src/functions/github/fetch-prs.d.ts.map +0 -1
  482. package/dist/types/src/functions/linear/index.d.ts +0 -9
  483. package/dist/types/src/functions/linear/index.d.ts.map +0 -1
  484. package/dist/types/src/functions/linear/linear.test.d.ts.map +0 -1
  485. package/dist/types/src/functions/linear/sync-issues.d.ts +0 -12
  486. package/dist/types/src/functions/linear/sync-issues.d.ts.map +0 -1
  487. package/dist/types/src/functions/research/create-document.d.ts +0 -7
  488. package/dist/types/src/functions/research/create-document.d.ts.map +0 -1
  489. package/dist/types/src/functions/research/graph.d.ts.map +0 -1
  490. package/dist/types/src/functions/research/graph.test.d.ts.map +0 -1
  491. package/dist/types/src/functions/research/index.d.ts +0 -19
  492. package/dist/types/src/functions/research/index.d.ts.map +0 -1
  493. package/dist/types/src/functions/research/research-graph.d.ts +0 -18
  494. package/dist/types/src/functions/research/research-graph.d.ts.map +0 -1
  495. package/dist/types/src/functions/research/research.d.ts +0 -13
  496. package/dist/types/src/functions/research/research.d.ts.map +0 -1
  497. package/dist/types/src/functions/research/research.test.d.ts +0 -2
  498. package/dist/types/src/functions/research/research.test.d.ts.map +0 -1
  499. package/dist/types/src/functions/research/types.d.ts +0 -384
  500. package/dist/types/src/functions/research/types.d.ts.map +0 -1
  501. package/dist/types/src/functions/tasks/index.d.ts +0 -15
  502. package/dist/types/src/functions/tasks/index.d.ts.map +0 -1
  503. package/dist/types/src/functions/tasks/read.d.ts +0 -7
  504. package/dist/types/src/functions/tasks/read.d.ts.map +0 -1
  505. package/dist/types/src/functions/tasks/task-list.d.ts +0 -74
  506. package/dist/types/src/functions/tasks/task-list.d.ts.map +0 -1
  507. package/dist/types/src/functions/tasks/task-list.test.d.ts +0 -2
  508. package/dist/types/src/functions/tasks/task-list.test.d.ts.map +0 -1
  509. package/dist/types/src/functions/tasks/update.d.ts +0 -9
  510. package/dist/types/src/functions/tasks/update.d.ts.map +0 -1
  511. package/dist/types/src/plugins.d.ts +0 -19
  512. package/dist/types/src/plugins.d.ts.map +0 -1
  513. package/dist/types/src/testing/data/exa-search-1748337321991.d.ts +0 -38
  514. package/dist/types/src/testing/data/exa-search-1748337321991.d.ts.map +0 -1
  515. package/dist/types/src/testing/data/exa-search-1748337331526.d.ts +0 -37
  516. package/dist/types/src/testing/data/exa-search-1748337331526.d.ts.map +0 -1
  517. package/dist/types/src/testing/data/exa-search-1748337344119.d.ts +0 -58
  518. package/dist/types/src/testing/data/exa-search-1748337344119.d.ts.map +0 -1
  519. package/dist/types/src/testing/data/index.d.ts +0 -3
  520. package/dist/types/src/testing/data/index.d.ts.map +0 -1
  521. package/src/blueprints/design/design-blueprint.test.ts +0 -108
  522. package/src/blueprints/design/design-blueprint.ts +0 -33
  523. package/src/blueprints/design/index.ts +0 -7
  524. package/src/blueprints/discord/discord-blueprint.ts +0 -34
  525. package/src/blueprints/linear/linear-blueprint.ts +0 -35
  526. package/src/blueprints/planning/planning-blueprint.test.ts +0 -129
  527. package/src/blueprints/planning/planning-blueprint.ts +0 -98
  528. package/src/blueprints/research/index.ts +0 -7
  529. package/src/blueprints/research/research-blueprint.test.ts +0 -7
  530. package/src/blueprints/research/research-blueprint.ts +0 -45
  531. package/src/blueprints/websearch/websearch-blueprint.ts +0 -20
  532. package/src/experimental/feed.test.ts +0 -108
  533. package/src/functions/discord/fetch-messages.test.ts +0 -59
  534. package/src/functions/discord/fetch-messages.ts +0 -251
  535. package/src/functions/discord/index.ts +0 -9
  536. package/src/functions/document/index.ts +0 -11
  537. package/src/functions/document/read.ts +0 -29
  538. package/src/functions/document/update.ts +0 -30
  539. package/src/functions/entity-extraction/entity-extraction.conversations.json +0 -1
  540. package/src/functions/entity-extraction/entity-extraction.test.ts +0 -100
  541. package/src/functions/entity-extraction/entity-extraction.ts +0 -163
  542. package/src/functions/entity-extraction/index.ts +0 -9
  543. package/src/functions/exa/exa.ts +0 -37
  544. package/src/functions/exa/index.ts +0 -6
  545. package/src/functions/exa/mock.ts +0 -71
  546. package/src/functions/github/fetch-prs.ts +0 -30
  547. package/src/functions/linear/index.ts +0 -9
  548. package/src/functions/linear/linear.test.ts +0 -86
  549. package/src/functions/research/create-document.ts +0 -69
  550. package/src/functions/research/graph.test.ts +0 -69
  551. package/src/functions/research/graph.ts +0 -388
  552. package/src/functions/research/index.ts +0 -15
  553. package/src/functions/research/instructions-research.tpl +0 -98
  554. package/src/functions/research/research-graph.ts +0 -47
  555. package/src/functions/research/research.conversations.json +0 -10714
  556. package/src/functions/research/research.test.ts +0 -240
  557. package/src/functions/research/research.ts +0 -155
  558. package/src/functions/research/types.ts +0 -24
  559. package/src/functions/tasks/index.ts +0 -11
  560. package/src/functions/tasks/read.ts +0 -34
  561. package/src/functions/tasks/task-list.test.ts +0 -99
  562. package/src/functions/tasks/task-list.ts +0 -165
  563. package/src/functions/tasks/update.ts +0 -52
  564. package/src/plugins.tsx +0 -68
  565. package/src/testing/data/exa-search-1748337321991.ts +0 -131
  566. package/src/testing/data/exa-search-1748337331526.ts +0 -144
  567. package/src/testing/data/exa-search-1748337344119.ts +0 -133
  568. package/src/testing/data/index.ts +0 -11
  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
  571. /package/dist/types/src/{functions/research → crud}/graph.test.d.ts +0 -0
@@ -0,0 +1,318 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Schema from 'effect/Schema';
6
+
7
+ import { AiContext } from '@dxos/assistant';
8
+ import { Operation } from '@dxos/compute';
9
+ import { Database, Obj, Ref, Relation, Tag } from '@dxos/echo';
10
+ import { trim } from '@dxos/util';
11
+
12
+ export const Query = Operation.make({
13
+ meta: {
14
+ key: 'org.dxos.function.database.query',
15
+ name: 'Query',
16
+ description: trim`
17
+ Query for objects in ECHO.
18
+ Use this tool when searching for information in the space (both automerge and queues).
19
+ Currently, two types of queries are supported:
20
+ - Full-text search - terms may appear anywhere in the object.
21
+ - Type-based search - objects of a specific type.
22
+ You can use them together, for example, to search for objects of a specific type that match a full-text query.
23
+ Important: Whem querying by typename, make sure to list the schema first, to get the exact typename.
24
+
25
+ Omit both typename and text to search for all objects.
26
+
27
+ <output_format>
28
+ You can choose to either return the full object data, or just the DXN, type and label.
29
+ When expecting a lot of results, run with includeContent=false to not pollute the context, and then load specific objects using the load tool.
30
+
31
+ You can choose to get the content right away, if you don't expect a lot of results.
32
+ To load content right away, run with includeContent=true.
33
+ When loading content, set an appropriate limit on the number of results to avoid overwhelming the context.
34
+ </output_format>
35
+
36
+ <example description="All tasks related to Cyberdyne and Bob">
37
+ {
38
+ "typename": "org.dxos.type.task",
39
+ "text": "cyberdyne bob",
40
+ }
41
+ </example>
42
+
43
+ <example description="Financial report Q1 2026">
44
+ {
45
+ "typename": "org.dxos.type.document",
46
+ "text": "financial report Q1 2026",
47
+ "includeContent": true
48
+ "limit": 3
49
+ }
50
+ </example>
51
+
52
+ <example description="Emails from specific mailboxes">
53
+ {
54
+ "in": [{"/" : "dxn:echo:@:YYYYYY"}, {"/" : "dxn:echo:@:XXXXXXX"}],
55
+ "typename": "org.dxos.type.email",
56
+ "includeContent": true,
57
+ "limit": 20
58
+ }
59
+ </example>
60
+ `,
61
+ },
62
+ input: Schema.Struct({
63
+ in: Schema.optional(
64
+ Schema.Array(Ref.Ref(Obj.Unknown)).annotations({
65
+ description:
66
+ 'Scope the query to children of specific objects (transitively). ' +
67
+ 'Use this to query items within containers such as feeds or folders. ' +
68
+ 'For example, to find emails use `in: [mailbox1.feed, mailbox2.feed]`.',
69
+ }),
70
+ ),
71
+ typename: Schema.optional(
72
+ Schema.String.annotations({
73
+ description: 'The typename of the objects to list.',
74
+ example: 'org.dxos.type.task',
75
+ }),
76
+ ),
77
+ text: Schema.optional(
78
+ Schema.String.annotations({
79
+ description: 'Full text search query.',
80
+ example: 'email cyberdyne bob',
81
+ }),
82
+ ),
83
+ includeContent: Schema.optional(
84
+ Schema.Boolean.annotations({
85
+ description: 'Include the full object data in the response.',
86
+ default: false,
87
+ }),
88
+ ),
89
+ limit: Schema.optional(
90
+ Schema.Number.annotations({
91
+ description: 'The maximum number of results to return.',
92
+ default: 10,
93
+ }),
94
+ ),
95
+ includeQueues: Schema.optional(
96
+ Schema.Boolean.annotations({
97
+ description: 'Search in queues as well as spaces. Only use this if searching for emails.',
98
+ default: false,
99
+ }),
100
+ ),
101
+ }),
102
+ output: Schema.Array(Schema.Unknown),
103
+ services: [Database.Service],
104
+ }).pipe(Operation.intrinsic);
105
+
106
+ export const Load = Operation.make({
107
+ meta: {
108
+ key: 'org.dxos.function.database.load',
109
+ name: 'Load object',
110
+ description: trim`
111
+ Loads the object or relation content.
112
+ Can load multiple objects at at time.
113
+ Use the to read the data when you have a DXN.
114
+ Call this tool with an array of one or more DXNs or object IDs.
115
+ When use see a reference ({ '/': 'dxn:...' }), you can call this function to load the object.
116
+ Note that returned data is only a snapshot in time, and might have changed since the object was last loaded.
117
+ `,
118
+ },
119
+ input: Schema.Struct({
120
+ refs: Schema.Array(Ref.Ref(Obj.Unknown)),
121
+ }),
122
+ output: Schema.Unknown,
123
+ services: [Database.Service],
124
+ }).pipe(Operation.intrinsic);
125
+
126
+ export const ObjectCreate = Operation.make({
127
+ meta: {
128
+ key: 'org.dxos.function.database.object-create',
129
+ name: 'Create object',
130
+ description: trim`
131
+ Creates a new object and adds it to the current space.
132
+ Get the schema from the schema-list tool and ensure that the data matches the corresponding schema.
133
+ References are provided in the following format: { "/": "dxn:..." }.
134
+ Reference examples: { "/": "dxn:echo:@:01KG7R1ZXWFMWQ4DA1Q6TN1DG4" }, { "/": "dxn:queue:data:01KG7R1ZXWFMWQ4DA1Q6TN1DG4:01KG7R1ZXWFMWQ4DA1Q6TN1DG4" }
135
+ `,
136
+ },
137
+ input: Schema.Struct({
138
+ typename: Schema.String,
139
+ data: Schema.Any,
140
+ }),
141
+ output: Schema.Unknown,
142
+ services: [Database.Service],
143
+ }).pipe(Operation.intrinsic);
144
+
145
+ export const ObjectUpdate = Operation.make({
146
+ meta: {
147
+ key: 'org.dxos.function.database.object-update',
148
+ name: 'Update object',
149
+ description: trim`
150
+ Updates the object properties.
151
+ References are provided in the following format: { "/": "dxn:..." }.
152
+ Reference examples: { "/": "dxn:echo:@:01KG7R1ZXWFMWQ4DA1Q6TN1DG4" }, { "/": "dxn:queue:data:01KG7R1ZXWFMWQ4DA1Q6TN1DG4:01KG7R1ZXWFMWQ4DA1Q6TN1DG4" }
153
+ `,
154
+ },
155
+ input: Schema.Struct({
156
+ obj: Ref.Ref(Obj.Unknown),
157
+ properties: Schema.Record({ key: Schema.String, value: Schema.Any }),
158
+ }),
159
+ output: Schema.Unknown,
160
+ services: [Database.Service],
161
+ }).pipe(Operation.intrinsic);
162
+
163
+ export const ObjectDelete = Operation.make({
164
+ meta: {
165
+ key: 'org.dxos.function.database.object-delete',
166
+ name: 'Delete object',
167
+ description: trim`
168
+ Deletes the object.
169
+ `,
170
+ },
171
+ input: Schema.Struct({
172
+ obj: Ref.Ref(Obj.Unknown),
173
+ }),
174
+ output: Schema.Void,
175
+ services: [Database.Service],
176
+ }).pipe(Operation.intrinsic);
177
+
178
+ export const SchemaAdd = Operation.make({
179
+ meta: {
180
+ key: 'org.dxos.function.database.schema-add',
181
+ name: 'Add schema',
182
+ description: trim`
183
+ Adds a schema to the space.
184
+ The name will be used when displayed to the user.
185
+ `,
186
+ },
187
+ input: Schema.Struct({
188
+ name: Schema.String,
189
+ typename: Schema.String.annotations({
190
+ description: 'The typename of the schema in the format of "com.example.type.type".',
191
+ }),
192
+ jsonSchema: Schema.Any,
193
+ }),
194
+ output: Schema.Void,
195
+ services: [Database.Service],
196
+ }).pipe(Operation.intrinsic);
197
+
198
+ export const SchemaList = Operation.make({
199
+ meta: {
200
+ key: 'org.dxos.function.database.schema-list',
201
+ name: 'List schemas',
202
+ description: trim`
203
+ Lists schemas definitions.
204
+ `,
205
+ },
206
+ input: Schema.Struct({
207
+ limit: Schema.optional(Schema.Number),
208
+ }),
209
+ output: Schema.Array(Schema.Unknown),
210
+ services: [Database.Service],
211
+ }).pipe(Operation.intrinsic);
212
+
213
+ export const ContextAdd = Operation.make({
214
+ meta: {
215
+ key: 'org.dxos.function.database.context-add',
216
+ name: 'Add to context',
217
+ description: trim`
218
+ Adds the object to the chat context.
219
+ Use this it for objects that are useful long-term for the conversation.
220
+ `,
221
+ },
222
+ input: Schema.Struct({
223
+ obj: Ref.Ref(Obj.Unknown).annotations({
224
+ description: 'Object to add to the chat context.',
225
+ }),
226
+ }),
227
+ output: Schema.Void,
228
+ services: [AiContext.Service],
229
+ }).pipe(Operation.intrinsic);
230
+
231
+ export const ContextRemove = Operation.make({
232
+ meta: {
233
+ key: 'org.dxos.function.database.context-remove',
234
+ name: 'Remove from context',
235
+ description: trim`
236
+ Removes the object from the chat context.
237
+ Use this it for objects that are no longer useful for the conversation.
238
+ `,
239
+ },
240
+ input: Schema.Struct({
241
+ obj: Ref.Ref(Obj.Unknown).annotations({
242
+ description: 'Object to remove from the chat context.',
243
+ }),
244
+ }),
245
+ output: Schema.Void,
246
+ services: [AiContext.Service],
247
+ }).pipe(Operation.intrinsic);
248
+
249
+ export const RelationCreate = Operation.make({
250
+ meta: {
251
+ key: 'org.dxos.function.database.relation-create',
252
+ name: 'Create relation',
253
+ description: trim`
254
+ Creates a new relation and adds it to the current space.
255
+ Get the schema from the schema-list tool and ensure that the data matches the corresponding schema.
256
+ `,
257
+ },
258
+ input: Schema.Struct({
259
+ typename: Schema.String,
260
+ source: Ref.Ref(Obj.Unknown),
261
+ target: Ref.Ref(Obj.Unknown),
262
+ properties: Schema.Any.annotations({
263
+ description: 'The data to be stored in the relation.',
264
+ }),
265
+ }),
266
+ output: Schema.Unknown,
267
+ services: [Database.Service],
268
+ }).pipe(Operation.intrinsic);
269
+
270
+ export const RelationDelete = Operation.make({
271
+ meta: {
272
+ key: 'org.dxos.function.database.relation-delete',
273
+ name: 'Delete relation',
274
+ description: trim`
275
+ Deletes the relation.
276
+ `,
277
+ },
278
+ input: Schema.Struct({
279
+ rel: Ref.Ref(Relation.Unknown),
280
+ }),
281
+ output: Schema.Void,
282
+ services: [Database.Service],
283
+ }).pipe(Operation.intrinsic);
284
+
285
+ export const TagAdd = Operation.make({
286
+ meta: {
287
+ key: 'org.dxos.function.database.tag-add',
288
+ name: 'Add tag',
289
+ description: trim`
290
+ Adds a tag to an object.
291
+ Tags are objects of type ${Tag.Tag.typename}.
292
+ You must search database for available tags, or create a new one.
293
+ `,
294
+ },
295
+ input: Schema.Struct({
296
+ tag: Ref.Ref(Obj.Unknown),
297
+ obj: Ref.Ref(Obj.Unknown),
298
+ }),
299
+ output: Schema.Unknown,
300
+ services: [Database.Service],
301
+ }).pipe(Operation.intrinsic);
302
+
303
+ export const TagRemove = Operation.make({
304
+ meta: {
305
+ key: 'org.dxos.function.database.tag-remove',
306
+ name: 'Remove tag',
307
+ description: trim`
308
+ Removes a tag from an object.
309
+ Tags are objects of type ${Tag.Tag.typename}.
310
+ `,
311
+ },
312
+ input: Schema.Struct({
313
+ tag: Ref.Ref(Obj.Unknown),
314
+ obj: Ref.Ref(Obj.Unknown),
315
+ }),
316
+ output: Schema.Unknown,
317
+ services: [Database.Service],
318
+ }).pipe(Operation.intrinsic);
@@ -0,0 +1,23 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { OperationHandlerSet } from '@dxos/compute';
6
+
7
+ export * from './definitions';
8
+
9
+ export const DatabaseHandlers = OperationHandlerSet.lazy(
10
+ () => import('./context-add'),
11
+ () => import('./context-remove'),
12
+ () => import('./load'),
13
+ () => import('./object-create'),
14
+ () => import('./object-delete'),
15
+ () => import('./object-update'),
16
+ () => import('./query'),
17
+ () => import('./relation-create'),
18
+ () => import('./relation-delete'),
19
+ () => import('./schema-add'),
20
+ () => import('./schema-list'),
21
+ () => import('./tag-add'),
22
+ () => import('./tag-remove'),
23
+ );
@@ -0,0 +1,19 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Array from 'effect/Array';
6
+ import * as Effect from 'effect/Effect';
7
+
8
+ import { Operation } from '@dxos/compute';
9
+ import { Database, Entity } from '@dxos/echo';
10
+
11
+ import { Load } from './definitions';
12
+
13
+ export default Load.pipe(
14
+ Operation.withHandler(
15
+ Effect.fn(function* ({ refs }) {
16
+ return yield* Effect.forEach(refs, Database.load).pipe(Effect.map(Array.map(Entity.toJSON)));
17
+ }),
18
+ ),
19
+ );
@@ -0,0 +1,38 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Operation } from '@dxos/compute';
8
+ import { Database, Entity, Obj, Type } from '@dxos/echo';
9
+ import { EncodedReference } from '@dxos/echo-protocol';
10
+ import { invariant } from '@dxos/invariant';
11
+ import { deepMapValues } from '@dxos/util';
12
+
13
+ import { ObjectCreate } from './definitions';
14
+
15
+ export default ObjectCreate.pipe(
16
+ Operation.withHandler(
17
+ Effect.fn(function* ({ typename, data }) {
18
+ const { db } = yield* Database.Service;
19
+ const schema = yield* Effect.promise(() =>
20
+ db.schemaRegistry.query({ typename, location: ['database', 'runtime'] }).first(),
21
+ );
22
+ invariant(Type.isObjectSchema(schema), 'Schema is not an object schema');
23
+
24
+ const object = db.add(
25
+ Obj.make(
26
+ schema,
27
+ deepMapValues(data, (value, recurse) => {
28
+ if (EncodedReference.isEncodedReference(value)) {
29
+ return db.makeRef(EncodedReference.toDXN(value));
30
+ }
31
+ return recurse(value);
32
+ }),
33
+ ),
34
+ );
35
+ return Entity.toJSON(object);
36
+ }),
37
+ ),
38
+ );
@@ -0,0 +1,20 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Operation } from '@dxos/compute';
8
+ import { Database } from '@dxos/echo';
9
+
10
+ import { ObjectDelete } from './definitions';
11
+
12
+ export default ObjectDelete.pipe(
13
+ Operation.withHandler(
14
+ Effect.fn(function* ({ obj }) {
15
+ const { db } = yield* Database.Service;
16
+ const object = yield* Database.load(obj);
17
+ db.remove(object);
18
+ }),
19
+ ),
20
+ );
@@ -0,0 +1,30 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Operation } from '@dxos/compute';
8
+ import { Database, Entity } from '@dxos/echo';
9
+ import { EncodedReference } from '@dxos/echo-protocol';
10
+
11
+ import { ObjectUpdate } from './definitions';
12
+
13
+ export default ObjectUpdate.pipe(
14
+ Operation.withHandler(
15
+ Effect.fn(function* ({ obj, properties }) {
16
+ const { db } = yield* Database.Service;
17
+ const object = yield* Database.load(obj);
18
+ Entity.update(object as Entity.Any, (obj) => {
19
+ for (const [key, value] of Object.entries(properties)) {
20
+ if (EncodedReference.isEncodedReference(value)) {
21
+ obj[key] = db.makeRef(EncodedReference.toDXN(value));
22
+ } else {
23
+ obj[key] = value;
24
+ }
25
+ }
26
+ });
27
+ return Entity.toJSON(object);
28
+ }),
29
+ ),
30
+ );
@@ -0,0 +1,63 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Operation } from '@dxos/compute';
8
+ import { Database, Entity, Filter, Obj, Query as EchoQuery } from '@dxos/echo';
9
+
10
+ import { Query } from './definitions';
11
+
12
+ // TODO(burdon): Move to toolkit (i.e., tool not function).
13
+ export default Query.pipe(
14
+ Operation.withHandler(
15
+ Effect.fn(function* ({ in: parents, typename, text, includeContent = false, limit = 10, includeQueues = false }) {
16
+ const { db } = yield* Database.Service;
17
+ let query: EchoQuery.Any;
18
+ if (text) {
19
+ query = EchoQuery.all(
20
+ ...text.split(' ').map((term) => EchoQuery.select(Filter.text(term, { type: 'full-text' }))),
21
+ );
22
+ if (typename !== undefined) {
23
+ const schema = yield* Database.runSchemaQuery({ typename, location: ['database', 'runtime'] });
24
+ if (schema.length === 0) {
25
+ return yield* Effect.fail(new Error(`Schema ${typename} not found`));
26
+ }
27
+ query = query.select(Filter.type(schema[0]));
28
+ }
29
+ } else if (typename) {
30
+ const schema = yield* Database.runSchemaQuery({ typename, location: ['database', 'runtime'] });
31
+ if (schema.length === 0) {
32
+ return yield* Effect.fail(new Error(`Schema ${typename} not found`));
33
+ }
34
+ query = EchoQuery.select(Filter.type(schema[0]));
35
+ } else {
36
+ query = EchoQuery.select(Filter.everything());
37
+ }
38
+
39
+ if (parents && parents.length > 0) {
40
+ query = query.select(Filter.childOf(parents));
41
+ }
42
+
43
+ query = query.limit(limit);
44
+ if (includeQueues) {
45
+ // Must scope to the current space: `from({ allFeedsFromSpaces: true })` alone has no spaceIds, so the SQL
46
+ // index returns nothing (see ObjectMetaIndex.buildSourceCondition / early returns when spaceIds are empty).
47
+ query = query.from(db, { includeFeeds: true });
48
+ }
49
+
50
+ yield* Database.flush();
51
+ const results = yield* Database.runQuery(query);
52
+ if (includeContent) {
53
+ return results.map((obj) => Entity.toJSON(obj));
54
+ } else {
55
+ return results.map((obj) => ({
56
+ dxn: Obj.getDXN(obj).toString(),
57
+ typename: Obj.getTypename(obj),
58
+ label: Obj.getLabel(obj),
59
+ }));
60
+ }
61
+ }),
62
+ ),
63
+ );
@@ -0,0 +1,34 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Operation } from '@dxos/compute';
8
+ import { Database, Entity, Relation, Type } from '@dxos/echo';
9
+ import { invariant } from '@dxos/invariant';
10
+
11
+ import { RelationCreate } from './definitions';
12
+
13
+ export default RelationCreate.pipe(
14
+ Operation.withHandler(
15
+ Effect.fn(function* ({ typename, source, target, properties }) {
16
+ const { db } = yield* Database.Service;
17
+ const schema = yield* Effect.promise(() =>
18
+ db.schemaRegistry.query({ typename, location: ['database', 'runtime'] }).first(),
19
+ );
20
+ invariant(Type.isRelationSchema(schema), 'Schema is not a relation schema');
21
+
22
+ const sourceObj = yield* Database.load(source);
23
+ const targetObj = yield* Database.load(target);
24
+ const relation = db.add(
25
+ Relation.make(schema, {
26
+ [Relation.Source]: sourceObj,
27
+ [Relation.Target]: targetObj,
28
+ ...properties,
29
+ }),
30
+ );
31
+ return Entity.toJSON(relation);
32
+ }),
33
+ ),
34
+ );
@@ -0,0 +1,21 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Operation } from '@dxos/compute';
8
+ import { Database } from '@dxos/echo';
9
+
10
+ import { RelationDelete } from './definitions';
11
+
12
+ export default RelationDelete.pipe(
13
+ Operation.withHandler(
14
+ Effect.fn(function* ({ rel }) {
15
+ const { db } = yield* Database.Service;
16
+ const relation = yield* Database.load(rel);
17
+ // TODO(dmaretskyi): Echo types broken.
18
+ db.remove(relation as any);
19
+ }),
20
+ ),
21
+ );
@@ -0,0 +1,28 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Operation } from '@dxos/compute';
8
+ import { Database } from '@dxos/echo';
9
+
10
+ import { SchemaAdd } from './definitions';
11
+
12
+ export default SchemaAdd.pipe(
13
+ Operation.withHandler(
14
+ Effect.fn(function* ({ name, typename, jsonSchema }) {
15
+ const { db } = yield* Database.Service;
16
+ yield* Effect.promise(() =>
17
+ db.schemaRegistry.register([
18
+ {
19
+ typename,
20
+ version: '0.1.0',
21
+ jsonSchema,
22
+ name,
23
+ },
24
+ ]),
25
+ );
26
+ }),
27
+ ),
28
+ );
@@ -0,0 +1,33 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Routine, Blueprint, Operation } from '@dxos/compute';
8
+ import { Database, Feed, JsonSchema, Type, View } from '@dxos/echo';
9
+
10
+ import { SchemaList } from './definitions';
11
+
12
+ // TODO(dmaretskyi): This is a balance between not filling the agent's context with too many types and not excluding important types.
13
+ const EXCLUDED_TYPES = [Type.PersistentType, View.View, Routine.Routine, Blueprint.Blueprint, Feed.Feed];
14
+ const excludedTypenames = EXCLUDED_TYPES.map((type) => Type.getTypename(type));
15
+
16
+ export default SchemaList.pipe(
17
+ Operation.withHandler(
18
+ Effect.fn(function* () {
19
+ const { db } = yield* Database.Service;
20
+ const schema = yield* Effect.promise(() => db.schemaRegistry.query({ location: ['database', 'runtime'] }).run());
21
+ return schema
22
+ .filter((schema) => !excludedTypenames.includes(Type.getTypename(schema)))
23
+ .map((schema) => {
24
+ const meta = Type.getMeta(schema);
25
+ return {
26
+ typename: Type.getTypename(schema),
27
+ jsonSchema: JsonSchema.toJsonSchema(schema),
28
+ kind: meta?.sourceSchema ? 'relation' : 'record',
29
+ };
30
+ });
31
+ }),
32
+ ),
33
+ );
@@ -0,0 +1,21 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Operation } from '@dxos/compute';
8
+ import { Database, Entity, Obj } from '@dxos/echo';
9
+
10
+ import { TagAdd } from './definitions';
11
+
12
+ export default TagAdd.pipe(
13
+ Operation.withHandler(
14
+ Effect.fn(function* ({ tag, obj }) {
15
+ const object = yield* Database.load(obj);
16
+ const tagObj = yield* Database.load(tag);
17
+ Entity.update(object, (object) => Entity.addTag(object, Obj.getDXN(tagObj).toString()));
18
+ return Entity.toJSON(object);
19
+ }),
20
+ ),
21
+ );
@@ -0,0 +1,21 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Operation } from '@dxos/compute';
8
+ import { Database, Entity, Obj } from '@dxos/echo';
9
+
10
+ import { TagRemove } from './definitions';
11
+
12
+ export default TagRemove.pipe(
13
+ Operation.withHandler(
14
+ Effect.fn(function* ({ tag, obj }) {
15
+ const object = yield* Database.load(obj);
16
+ const tagObj = yield* Database.load(tag);
17
+ Entity.update(object, (object) => Entity.removeTag(object, Obj.getDXN(tagObj).toString()));
18
+ return Entity.toJSON(object);
19
+ }),
20
+ ),
21
+ );