@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,378 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Tool from '@effect/ai/Tool';
6
+ import * as Toolkit from '@effect/ai/Toolkit';
7
+ import * as Context from 'effect/Context';
8
+ import * as Effect from 'effect/Effect';
9
+ import * as Function from 'effect/Function';
10
+ import * as Option from 'effect/Option';
11
+ import * as Schema from 'effect/Schema';
12
+ import * as SchemaAST from 'effect/SchemaAST';
13
+
14
+ import { Database, Entity, Feed, Filter, Obj, Query, Type } from '@dxos/echo';
15
+ import { isEncodedReference } from '@dxos/echo-protocol';
16
+ import {
17
+ ReferenceAnnotationId,
18
+ RelationSourceDXNId,
19
+ RelationSourceId,
20
+ RelationTargetDXNId,
21
+ RelationTargetId,
22
+ createObject,
23
+ getTypeAnnotation,
24
+ getTypeIdentifierAnnotation,
25
+ } from '@dxos/echo/internal';
26
+ import { mapAst } from '@dxos/effect';
27
+ import { DXN, ObjectId } from '@dxos/keys';
28
+ import { log } from '@dxos/log';
29
+ import { deepMapValues, isNonNullable, trim } from '@dxos/util';
30
+
31
+ // TODO(burdon): Unify with the graph schema.
32
+ export const Subgraph = Schema.Struct({
33
+ /** Objects and relations. */
34
+ objects: Schema.Array(Schema.Any),
35
+ });
36
+
37
+ export interface Subgraph extends Schema.Schema.Type<typeof Subgraph> {}
38
+
39
+ export type RelatedSchema = {
40
+ schema: Type.AnyEntity;
41
+ kind: 'reference' | 'relation';
42
+ };
43
+
44
+ /**
45
+ * Find all schemas that are related to the given schema.
46
+ *
47
+ * @param db
48
+ * @param schema
49
+ * @returns
50
+ */
51
+ export const findRelatedSchema = async (db: Database.Database, anchor: Type.AnyEntity): Promise<RelatedSchema[]> => {
52
+ // TODO(dmaretskyi): Query stored schemas.
53
+ const allSchemas = await db.graph.schemaRegistry.query().run();
54
+
55
+ // TODO(dmaretskyi): Also do references.
56
+ return allSchemas
57
+ .filter((schema) => {
58
+ if (getTypeAnnotation(schema)?.kind !== Entity.Kind.Relation) {
59
+ return false;
60
+ }
61
+
62
+ return (
63
+ isSchemaAddressableByDXN(anchor, DXN.parse(getTypeAnnotation(schema)!.sourceSchema!)) ||
64
+ isSchemaAddressableByDXN(anchor, DXN.parse(getTypeAnnotation(schema)!.targetSchema!))
65
+ );
66
+ })
67
+ .map(
68
+ (schema): RelatedSchema => ({
69
+ kind: 'relation',
70
+ schema,
71
+ }),
72
+ );
73
+ };
74
+
75
+ /**
76
+ * Non-strict DXN comparison.
77
+ * Returns true if the DXN could be resolved to the schema.
78
+ */
79
+ const isSchemaAddressableByDXN = (schema: Type.AnyEntity, dxn: DXN): boolean => {
80
+ if (getTypeIdentifierAnnotation(schema) === dxn.toString()) {
81
+ return true;
82
+ }
83
+
84
+ const t = dxn.asTypeDXN();
85
+ if (t) {
86
+ return t.type === Type.getTypename(schema);
87
+ }
88
+
89
+ return false;
90
+ };
91
+
92
+ /**
93
+ * Perform vector search in the local database.
94
+ */
95
+ // TODO(dmaretskyi): Rename `GraphReadToolkit`.
96
+ export const LocalSearchToolkit = Toolkit.make(
97
+ Tool.make('search_local_search', {
98
+ description: 'Search the local database for information using a vector index',
99
+ parameters: {
100
+ query: Schema.String.annotations({
101
+ description: 'The query to search for. Could be a question or a topic or a set of keywords.',
102
+ }),
103
+ },
104
+ success: Schema.Unknown,
105
+ failure: Schema.Never,
106
+ dependencies: [Database.Service, Feed.FeedService],
107
+ }),
108
+ );
109
+
110
+ export const LocalSearchHandler = LocalSearchToolkit.toLayer({
111
+ search_local_search: Effect.fn(function* ({ query }) {
112
+ const objects = yield* Database.runQuery(Query.select(Filter.text(query, { type: 'vector' })));
113
+ const results = [...objects];
114
+
115
+ const feedOption = yield* Effect.serviceOption(Feed.ContextFeedService);
116
+ if (Option.isSome(feedOption)) {
117
+ const feedObjects = yield* Feed.runQuery(feedOption.value.feed, Filter.everything());
118
+ // TODO(dmaretskyi): Text search on the feed.
119
+ results.push(...feedObjects);
120
+ }
121
+
122
+ return trim`
123
+ <local_context>
124
+ ${JSON.stringify(results, null, 2)}
125
+ </local_context>
126
+ `;
127
+ }),
128
+ });
129
+
130
+ /**
131
+ * Attached as an annotation to the writer tool.
132
+ */
133
+ class GraphWriterSchema extends Context.Tag('@dxos/assistant/GraphWriterSchema')<
134
+ GraphWriterSchema,
135
+ {
136
+ schema: Type.AnyEntity[];
137
+ }
138
+ >() {}
139
+
140
+ /**
141
+ * Forms typed objects that can be written to the graph database.
142
+ */
143
+ export const makeGraphWriterToolkit = ({ schema }: { schema: Type.AnyEntity[] }) => {
144
+ return Toolkit.make(
145
+ Tool.make('graph_writer', {
146
+ description: 'Write to the local graph database',
147
+ parameters: createExtractionSchema(schema).fields,
148
+ success: Schema.Unknown,
149
+ failure: Schema.Never,
150
+ dependencies: [Database.Service, Feed.ContextFeedService, Feed.FeedService],
151
+ }).annotateContext(Context.make(GraphWriterSchema, { schema })),
152
+ );
153
+ };
154
+
155
+ export const makeGraphWriterHandler = (
156
+ toolkit: ReturnType<typeof makeGraphWriterToolkit>,
157
+ {
158
+ onAppend,
159
+ }: {
160
+ onAppend?: (object: DXN[]) => void;
161
+ } = {},
162
+ ) => {
163
+ const { schema } = Context.get(
164
+ toolkit.tools.graph_writer.annotations as Context.Context<GraphWriterSchema>,
165
+ GraphWriterSchema,
166
+ );
167
+
168
+ return toolkit.toLayer({
169
+ graph_writer: Effect.fn(function* (input) {
170
+ const { db } = yield* Database.Service;
171
+ const { feed } = yield* Feed.ContextFeedService;
172
+ const data = yield* sanitizeObjects(schema, input as any, db, feed);
173
+ yield* Feed.append(feed, data as Obj.Unknown[]);
174
+
175
+ const dxns = data.map((obj) => Obj.getDXN(obj));
176
+ onAppend?.(dxns);
177
+ return dxns;
178
+ }),
179
+ });
180
+ };
181
+
182
+ /**
183
+ * Create a schema for structured data extraction.
184
+ */
185
+ export const createExtractionSchema = (types: Type.AnyEntity[]) => {
186
+ return Schema.Struct({
187
+ ...Object.fromEntries(
188
+ types.map(preprocessSchema).map((schema, index) => [
189
+ `objects_${getSanitizedSchemaName(types[index])}`,
190
+ Schema.optional(Schema.Array(schema)).annotations({
191
+ description: `The objects of type: ${Type.getDXN(types[index])?.asTypeDXN()!.type}. ${SchemaAST.getDescriptionAnnotation(types[index].ast).pipe(Option.getOrElse(() => ''))}`,
192
+ }),
193
+ ]),
194
+ ),
195
+ });
196
+ };
197
+
198
+ export const getSanitizedSchemaName = (schema: Type.AnyEntity) => {
199
+ return Type.getDXN(schema)!
200
+ .asTypeDXN()!
201
+ .type.replaceAll(/[^a-zA-Z0-9]+/g, '_');
202
+ };
203
+
204
+ export const sanitizeObjects = (
205
+ types: Type.AnyEntity[],
206
+ data: Record<string, readonly unknown[]>,
207
+ db: Database.Database,
208
+ feed?: Feed.Feed,
209
+ ): Effect.Effect<Obj.Unknown[], never, Feed.FeedService> =>
210
+ Effect.gen(function* () {
211
+ const entries = types
212
+ .map(
213
+ (type) =>
214
+ data[`objects_${getSanitizedSchemaName(type)}`]?.map((object: any) => ({
215
+ data: object,
216
+ schema: type,
217
+ })) ?? [],
218
+ )
219
+ .flat();
220
+
221
+ const idMap = new Map<string, string>();
222
+ const existingIds = new Set<ObjectId>();
223
+ const enitties = new Map<ObjectId, Entity.Unknown>();
224
+
225
+ const resolveId = (id: string): DXN | undefined => {
226
+ if (ObjectId.isValid(id)) {
227
+ existingIds.add(id);
228
+ return DXN.fromLocalObjectId(id);
229
+ }
230
+
231
+ const mappedId = idMap.get(id);
232
+ if (mappedId) {
233
+ return DXN.fromLocalObjectId(mappedId);
234
+ }
235
+
236
+ return undefined;
237
+ };
238
+
239
+ const res = entries
240
+ .map((entry) => {
241
+ // This entry mutates existing object.
242
+ if (ObjectId.isValid(entry.data.id)) {
243
+ return entry;
244
+ }
245
+
246
+ idMap.set(entry.data.id, ObjectId.random());
247
+ entry.data.id = idMap.get(entry.data.id);
248
+ return entry;
249
+ })
250
+ .map((entry) => {
251
+ const data = deepMapValues(entry.data, (value, recurse) => {
252
+ if (isEncodedReference(value)) {
253
+ const ref = value['/'];
254
+ const id = resolveId(ref);
255
+
256
+ if (id) {
257
+ // Link to an existing object.
258
+ return { '/': id.toString() };
259
+ } else {
260
+ // Search URIs?
261
+ return { '/': `search:?q=${encodeURIComponent(ref)}` };
262
+ }
263
+ }
264
+
265
+ return recurse(value);
266
+ });
267
+
268
+ if (Entity.getKind(entry.schema) === 'relation') {
269
+ const sourceDXN = resolveId(data.source);
270
+ if (!sourceDXN) {
271
+ log.warn('source not found', { source: data.source });
272
+ }
273
+ const targetDXN = resolveId(data.target);
274
+ if (!targetDXN) {
275
+ log.warn('target not found', { target: data.target });
276
+ }
277
+ delete data.source;
278
+ delete data.target;
279
+ data[RelationSourceDXNId] = sourceDXN;
280
+ data[RelationTargetDXNId] = targetDXN;
281
+ }
282
+
283
+ return {
284
+ data,
285
+ schema: entry.schema,
286
+ };
287
+ })
288
+ .filter((object) => !existingIds.has(object.data.id)); // TODO(dmaretskyi): This dissallows updating existing objects.
289
+
290
+ // TODO(dmaretskyi): Use ref resolver.
291
+ const dbObjects = yield* Effect.promise(() => db.query(Query.select(Filter.id(...existingIds))).run());
292
+ const feedObjects = feed && existingIds.size > 0 ? yield* Feed.runQuery(feed, Filter.id(...existingIds)) : [];
293
+ const objects = [...dbObjects, ...feedObjects].filter(isNonNullable);
294
+
295
+ // TODO(dmaretskyi): Returns everything if IDs are empty!
296
+ log.info('objects', { dbObjects, feedObjects, existingIds });
297
+ const missing = Array.from(existingIds).filter((id) => !objects.some((object) => object.id === id));
298
+ if (missing.length > 0) {
299
+ throw new Error(`Object IDs do not point to existing objects: ${missing.join(', ')}`);
300
+ }
301
+
302
+ return res.flatMap(({ data, schema }) => {
303
+ let skip = false;
304
+ if (RelationSourceDXNId in data) {
305
+ const id = (data[RelationSourceDXNId] as DXN).asEchoDXN()?.echoId;
306
+ const obj = objects.find((object) => object.id === id) ?? enitties.get(id!);
307
+ if (obj) {
308
+ delete data[RelationSourceDXNId];
309
+ data[RelationSourceId] = obj;
310
+ } else {
311
+ skip = true;
312
+ }
313
+ }
314
+ if (RelationTargetDXNId in data) {
315
+ const id = (data[RelationTargetDXNId] as DXN).asEchoDXN()?.echoId;
316
+ const obj = objects.find((object) => object.id === id) ?? enitties.get(id!);
317
+ if (obj) {
318
+ delete data[RelationTargetDXNId];
319
+ data[RelationTargetId] = obj;
320
+ } else {
321
+ skip = true;
322
+ }
323
+ }
324
+ if (!skip) {
325
+ const obj = createObject(schema, data);
326
+ enitties.set(obj.id, obj);
327
+ return [obj];
328
+ }
329
+ return [];
330
+ });
331
+ });
332
+
333
+ const SoftRef = Schema.Struct({
334
+ '/': Schema.String,
335
+ }).annotations({
336
+ description: 'Reference to another object.',
337
+ });
338
+
339
+ const preprocessSchema = (schema: Schema.Schema.AnyNoContext) => {
340
+ const isRelationSchema = Entity.getKind(schema) === 'relation';
341
+
342
+ const go = (ast: SchemaAST.AST, visited = new Set<SchemaAST.AST>()): SchemaAST.AST => {
343
+ if (visited.has(ast)) {
344
+ // Already visited this node, prevent infinite recursion.
345
+ return ast;
346
+ }
347
+ visited.add(ast);
348
+
349
+ if (SchemaAST.getAnnotation(ast, ReferenceAnnotationId).pipe(Option.isSome)) {
350
+ return SoftRef.ast;
351
+ }
352
+
353
+ return mapAst(ast, (child) => go(child, visited));
354
+ };
355
+
356
+ return Schema.make<any, any, never>(mapAst(schema.ast, (ast) => go(ast))).pipe(
357
+ Schema.omit('id'),
358
+ Schema.extend(
359
+ Schema.Struct({
360
+ id: Schema.String.annotations({
361
+ description: 'The id of this object. Come up with a unique id based on your judgement.',
362
+ }),
363
+ }),
364
+ ),
365
+ isRelationSchema
366
+ ? Schema.extend(
367
+ Schema.Struct({
368
+ source: Schema.String.annotations({
369
+ description: 'The id of the source object for this relation.',
370
+ }),
371
+ target: Schema.String.annotations({
372
+ description: 'The id of the target object for this relation.',
373
+ }),
374
+ }),
375
+ )
376
+ : Function.identity<Schema.Schema.AnyNoContext>,
377
+ );
378
+ };
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export * from './graph';
package/src/errors.ts ADDED
@@ -0,0 +1,25 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { BaseError } from '@dxos/errors';
6
+ import { DXN } from '@dxos/keys';
7
+
8
+ /**
9
+ * Agent could not execute prompt.
10
+ */
11
+ export class PromptError extends BaseError.extend('PromptError') {
12
+ constructor(
13
+ message: string,
14
+ context: {
15
+ description?: string;
16
+ prompt?: DXN.String;
17
+ chat?: DXN.String;
18
+ },
19
+ ) {
20
+ super({
21
+ message,
22
+ context,
23
+ });
24
+ }
25
+ }
@@ -0,0 +1,5 @@
1
+ ###
2
+
3
+ Can we move all functions into the corresponding blueprint folder?
4
+
5
+ ###
@@ -0,0 +1,56 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Schema from 'effect/Schema';
6
+
7
+ import { AiService, OpaqueToolkit, ModelName } from '@dxos/ai';
8
+ import { Routine, Trace, Operation, OperationRegistry } from '@dxos/compute';
9
+ import { Database, Feed, Ref } from '@dxos/echo';
10
+ import { Text } from '@dxos/schema';
11
+
12
+ import * as Chat from '../../types/Chat';
13
+
14
+ // TODO(dmaretskyi): Rename to RunRoutine.
15
+ export const AgentPrompt = Operation.make({
16
+ meta: {
17
+ key: 'org.dxos.function.prompt',
18
+ name: 'Run Routine',
19
+ description: 'Agentic worker that executes a provided prompt using blueprints and tools.',
20
+ },
21
+ input: Schema.Struct({
22
+ prompt: Ref.Ref(Routine.Routine),
23
+
24
+ /**
25
+ * When set, runs in this chat (history, queue, and bound context). Routine blueprints and context objects are merged into the conversation for this request.
26
+ */
27
+ chat: Schema.optional(Ref.Ref(Chat.Chat)),
28
+
29
+ /**
30
+ * @default @anthropic/claude-opus-4-6
31
+ */
32
+ model: Schema.optional(ModelName),
33
+
34
+ /**
35
+ * Input object or data.
36
+ * References get auto-resolved.
37
+ */
38
+ input: Schema.Any.pipe(Schema.annotations({ title: 'Input' })),
39
+
40
+ systemInstructions: Schema.optional(Schema.String).annotations({
41
+ description: 'Additional system instructions to add to the system prompt.',
42
+ }),
43
+ }),
44
+ output: Schema.Any,
45
+ // ECHO types that the handler loads via Database.load(). Declaring them here ensures the
46
+ // runtime registers their schema before remote invocation (e.g. via the EDGE function service).
47
+ types: [Routine.Routine, Text.Text, Feed.Feed, Chat.Chat],
48
+ services: [
49
+ AiService.AiService,
50
+ Database.Service,
51
+ Feed.FeedService,
52
+ OpaqueToolkit.OpaqueToolkitProvider,
53
+ OperationRegistry.Service,
54
+ Trace.TraceService,
55
+ ],
56
+ }).pipe(Operation.intrinsic);
@@ -2,10 +2,8 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type FunctionDefinition } from '@dxos/functions';
5
+ import { OperationHandlerSet } from '@dxos/compute';
6
6
 
7
- import { default as prompt$ } from './prompt';
7
+ export * from './definitions';
8
8
 
9
- export namespace Agent {
10
- export const prompt: FunctionDefinition.Any = prompt$; // TODO(burdon): Temp fix for TS error.
11
- }
9
+ export const AgentHandlers = OperationHandlerSet.lazy(() => import('./prompt'));
@@ -0,0 +1 @@
1
+ {"conversations":[{"parameters":{"model":"@anthropic/claude-opus-4-6","stream":true,"tools":[{"name":"completeJob","inputSchema":{"type":"object","required":[],"properties":{"success":{"$id":"/schemas/any","title":"any"},"failure":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Short message describing the error."},"description":{"type":"string","description":"Optional longer message describing in detail what went wrong"}},"additionalProperties":false}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"system","content":"You are an agent running in the non-interactive mode.\nThe user is unable to see what you are doing, and cannot answer any questions.\nDo not ask questions.\nComplete the task before you, and at the end call [completeJob] with the output.\nIf you are unable to complete the task, call [completeJob] with the failure reason.\nIf no output is required, call [completeJob] with an empty object: {}\nDo not stop until you call [completeJob].","options":{}},{"role":"user","content":"Reply with a single word: ack.\n<input>{}</input>","options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_014de59sT4sHe36njza5yiBZ","modelId":"claude-opus-4-6","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"reasoning-start","id":"0","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"The","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" user wants me to reply with a single word \"ack\" and complete the job.","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"","metadata":{"anthropic":{"type":"thinking","signature":"EoQCClkIDRgCKkDmvWuElJmvgQqKv/OM8h45Qm9vFiau8OtHTiKeFGzABfFt5k5Oc9XiWXg1jeCrSXFmAcI3XEaKXp6jF8PCj/O0Mg9jbGF1ZGUtb3B1cy00LTY4ABIM63lszYQjMtcgEi3WGgzpeUSSrp9JhxxUoGsiMFJjapYnuh9y/rE9xW660c0B5Av77wj/bAOfx2vMXoXlHzL0C9O7TlzfgR+zqrw6cipZeF169zGXzr1tdCpD4N9lF1/HvBBieF/jOP7lhN5GXbuxFHatNfix4ocm9beWxWqOQ+WcOXQWJB8lQu+B/mW1y1MXgwTiQi1rf9OhDxtxXoBiIKCSp0aZPBMYAQ=="}}},{"type":"reasoning-end","id":"0","metadata":{}},{"type":"tool-params-start","id":"toolu_01Bn2cwnUQYvUCJ4RsL2SSuY","name":"completeJob","providerExecuted":false,"metadata":{}},{"type":"tool-params-delta","id":"toolu_01Bn2cwnUQYvUCJ4RsL2SSuY","delta":"","metadata":{}},{"type":"tool-params-delta","id":"toolu_01Bn2cwnUQYvUCJ4RsL2SSuY","delta":"{\"success\": ","metadata":{}},{"type":"tool-params-delta","id":"toolu_01Bn2cwnUQYvUCJ4RsL2SSuY","delta":"\"a","metadata":{}},{"type":"tool-params-delta","id":"toolu_01Bn2cwnUQYvUCJ4RsL2SSuY","delta":"ck\"}","metadata":{}},{"type":"tool-params-end","id":"toolu_01Bn2cwnUQYvUCJ4RsL2SSuY","metadata":{}},{"type":"finish","reason":"tool-calls","usage":{"inputTokens":757,"outputTokens":89,"totalTokens":846},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":757,"output_tokens":9,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-6","stream":true,"tools":[{"name":"completeJob","inputSchema":{"type":"object","required":[],"properties":{"success":{"$id":"/schemas/any","title":"any"},"failure":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Short message describing the error."},"description":{"type":"string","description":"Optional longer message describing in detail what went wrong"}},"additionalProperties":false}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"system","content":"You are an agent running in the non-interactive mode.\nThe user is unable to see what you are doing, and cannot answer any questions.\nDo not ask questions.\nComplete the task before you, and at the end call [completeJob] with the output.\nIf you are unable to complete the task, call [completeJob] with the failure reason.\nIf no output is required, call [completeJob] with an empty object: {}\nDo not stop until you call [completeJob].","options":{}},{"role":"user","content":"Reply with a single word: ack.\n<input>{}</input>","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user wants me to reply with a single word \"ack\" and complete the job.","options":{}},{"type":"tool-call","id":"toolu_01Bn2cwnUQYvUCJ4RsL2SSuY","name":"completeJob","params":{"success":"ack"},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_01Bn2cwnUQYvUCJ4RsL2SSuY","name":"completeJob","isFailure":false,"result":{},"providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_01R5VQTdGZLcaSFeVhzNYn6K","modelId":"claude-opus-4-6","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":824,"outputTokens":2,"totalTokens":826},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":824,"output_tokens":2,"server_tool_use":null,"service_tier":"standard"}}}}]}]}
@@ -0,0 +1,78 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { describe, expect, it } from '@effect/vitest';
6
+ import * as Effect from 'effect/Effect';
7
+
8
+ import { AiContext } from '@dxos/assistant';
9
+ import { Routine, Operation, OperationHandlerSet } from '@dxos/compute';
10
+ import { Database, Feed, Filter, Obj, Ref } from '@dxos/echo';
11
+ import { TestHelpers } from '@dxos/effect/testing';
12
+ import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
13
+ import { ObjectId } from '@dxos/keys';
14
+ import { Text } from '@dxos/schema';
15
+ import { Message } from '@dxos/types';
16
+
17
+ import * as Chat from '../../types/Chat';
18
+ import { AgentPrompt } from './definitions';
19
+ import defaultAgentPrompt from './prompt';
20
+
21
+ ObjectId.dangerouslyDisableRandomness();
22
+
23
+ const operationHandlerSet = OperationHandlerSet.make(defaultAgentPrompt);
24
+
25
+ const TestLayer = AssistantTestLayer({
26
+ operationHandlers: operationHandlerSet,
27
+ types: [Chat.Chat, Message.Message, AiContext.Binding, Text.Text],
28
+ aiServicePreset: 'edge-remote',
29
+ });
30
+
31
+ const countFeedMessages = (feed: Feed.Feed) =>
32
+ Effect.gen(function* () {
33
+ const items = yield* Feed.runQuery(feed, Filter.everything());
34
+ return items.filter(Obj.instanceOf(Message.Message)).length;
35
+ });
36
+
37
+ describe('Agent prompt', () => {
38
+ it.effect(
39
+ 'chat mode appends assistant messages to the chat queue',
40
+ Effect.fnUntraced(
41
+ function* (_) {
42
+ const feed = yield* Database.add(Feed.make());
43
+ const messageCountBefore = yield* countFeedMessages(feed);
44
+
45
+ const chat = yield* Database.add(
46
+ Chat.make({
47
+ feed: Ref.make(feed),
48
+ }),
49
+ );
50
+
51
+ const prompt = yield* Database.add(
52
+ Routine.make({
53
+ name: 'chat-mode-test',
54
+ instructions: 'Reply with a single word: ack.',
55
+ blueprints: [],
56
+ context: [],
57
+ }),
58
+ );
59
+
60
+ yield* Database.flush();
61
+
62
+ const result = yield* Operation.invoke(AgentPrompt, {
63
+ prompt: Ref.make(prompt),
64
+ input: {},
65
+ chat: Ref.make(chat),
66
+ });
67
+
68
+ const messageCountAfter = yield* countFeedMessages(feed);
69
+
70
+ expect(messageCountAfter).toBeGreaterThan(messageCountBefore);
71
+ expect(result).toBe('ack');
72
+ },
73
+ Effect.provide(TestLayer),
74
+ TestHelpers.provideTestContext,
75
+ ),
76
+ { timeout: 60_000 },
77
+ );
78
+ });