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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (506) hide show
  1. package/dist/lib/neutral/add-artifact-XDFUXRY5.mjs +30 -0
  2. package/dist/lib/neutral/add-artifact-XDFUXRY5.mjs.map +7 -0
  3. package/dist/lib/neutral/agent-6OHUAIA2.mjs +65 -0
  4. package/dist/lib/neutral/agent-6OHUAIA2.mjs.map +7 -0
  5. package/dist/lib/neutral/chunk-4T3LJGXI.mjs +76 -0
  6. package/dist/lib/neutral/chunk-4T3LJGXI.mjs.map +7 -0
  7. package/dist/lib/neutral/chunk-CVUA23QI.mjs +332 -0
  8. package/dist/lib/neutral/chunk-CVUA23QI.mjs.map +7 -0
  9. package/dist/lib/neutral/chunk-EJAQUAKM.mjs +73 -0
  10. package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +7 -0
  11. package/dist/lib/neutral/chunk-GSG4JGIY.mjs +100 -0
  12. package/dist/lib/neutral/chunk-GSG4JGIY.mjs.map +7 -0
  13. package/dist/lib/neutral/chunk-JN4GARRQ.mjs +53 -0
  14. package/dist/lib/neutral/chunk-JN4GARRQ.mjs.map +7 -0
  15. package/dist/lib/neutral/chunk-KGU725LW.mjs +29 -0
  16. package/dist/lib/neutral/chunk-KGU725LW.mjs.map +7 -0
  17. package/dist/lib/neutral/chunk-NR3GTWRC.mjs +53 -0
  18. package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +7 -0
  19. package/dist/lib/neutral/chunk-P5LAPHCG.mjs +140 -0
  20. package/dist/lib/neutral/chunk-P5LAPHCG.mjs.map +7 -0
  21. package/dist/lib/neutral/chunk-SVI25Z2Y.mjs +293 -0
  22. package/dist/lib/neutral/chunk-SVI25Z2Y.mjs.map +7 -0
  23. package/dist/lib/neutral/chunk-VSDP6SRY.mjs +74 -0
  24. package/dist/lib/neutral/chunk-VSDP6SRY.mjs.map +7 -0
  25. package/dist/lib/neutral/chunk-WIV7ZVRS.mjs +109 -0
  26. package/dist/lib/neutral/chunk-WIV7ZVRS.mjs.map +7 -0
  27. package/dist/lib/neutral/chunk-WLR3BGO4.mjs +25 -0
  28. package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +7 -0
  29. package/dist/lib/neutral/chunk-YSYNXOZA.mjs +68 -0
  30. package/dist/lib/neutral/chunk-YSYNXOZA.mjs.map +7 -0
  31. package/dist/lib/neutral/chunk-YXOVSRFU.mjs +70 -0
  32. package/dist/lib/neutral/chunk-YXOVSRFU.mjs.map +7 -0
  33. package/dist/lib/neutral/context-add-IIDPRRVB.mjs +22 -0
  34. package/dist/lib/neutral/context-add-IIDPRRVB.mjs.map +7 -0
  35. package/dist/lib/neutral/context-remove-RDYV4PD4.mjs +22 -0
  36. package/dist/lib/neutral/context-remove-RDYV4PD4.mjs.map +7 -0
  37. package/dist/lib/neutral/create-project-MPAMKQ3T.mjs +36 -0
  38. package/dist/lib/neutral/create-project-MPAMKQ3T.mjs.map +7 -0
  39. package/dist/lib/neutral/delete-J3PMWP7Z.mjs +19 -0
  40. package/dist/lib/neutral/delete-J3PMWP7Z.mjs.map +7 -0
  41. package/dist/lib/neutral/enable-blueprints-LELPQHY5.mjs +48 -0
  42. package/dist/lib/neutral/enable-blueprints-LELPQHY5.mjs.map +7 -0
  43. package/dist/lib/neutral/fetch-KHMHV7JR.mjs +16 -0
  44. package/dist/lib/neutral/fetch-KHMHV7JR.mjs.map +7 -0
  45. package/dist/lib/neutral/fetch-messages-OS74FP76.mjs +140 -0
  46. package/dist/lib/neutral/fetch-messages-OS74FP76.mjs.map +7 -0
  47. package/dist/lib/neutral/get-context-JRTOOA5O.mjs +35 -0
  48. package/dist/lib/neutral/get-context-JRTOOA5O.mjs.map +7 -0
  49. package/dist/lib/neutral/index.mjs +572 -3294
  50. package/dist/lib/neutral/index.mjs.map +4 -4
  51. package/dist/lib/neutral/load-LI7HHVD6.mjs +17 -0
  52. package/dist/lib/neutral/load-LI7HHVD6.mjs.map +7 -0
  53. package/dist/lib/neutral/meta.json +1 -1
  54. package/dist/lib/neutral/object-create-52Z7YKIA.mjs +35 -0
  55. package/dist/lib/neutral/object-create-52Z7YKIA.mjs.map +7 -0
  56. package/dist/lib/neutral/object-delete-I266YAXI.mjs +18 -0
  57. package/dist/lib/neutral/object-delete-I266YAXI.mjs.map +7 -0
  58. package/dist/lib/neutral/object-update-HY4GI7LA.mjs +28 -0
  59. package/dist/lib/neutral/object-update-HY4GI7LA.mjs.map +7 -0
  60. package/dist/lib/neutral/project-JAU3A7AX.mjs +23 -0
  61. package/dist/lib/neutral/project-JAU3A7AX.mjs.map +7 -0
  62. package/dist/lib/neutral/project-rules-FLUQQRPB.mjs +78 -0
  63. package/dist/lib/neutral/project-rules-FLUQQRPB.mjs.map +7 -0
  64. package/dist/lib/neutral/prompt-4UMXX6QU.mjs +169 -0
  65. package/dist/lib/neutral/prompt-4UMXX6QU.mjs.map +7 -0
  66. package/dist/lib/neutral/qualifier-7BUCOEKK.mjs +88 -0
  67. package/dist/lib/neutral/qualifier-7BUCOEKK.mjs.map +7 -0
  68. package/dist/lib/neutral/query-B3NOYFCK.mjs +70 -0
  69. package/dist/lib/neutral/query-B3NOYFCK.mjs.map +7 -0
  70. package/dist/lib/neutral/query-U56GNEV6.mjs +32 -0
  71. package/dist/lib/neutral/query-U56GNEV6.mjs.map +7 -0
  72. package/dist/lib/neutral/query-blueprints-Z576ABT5.mjs +17 -0
  73. package/dist/lib/neutral/query-blueprints-Z576ABT5.mjs.map +7 -0
  74. package/dist/lib/neutral/relation-create-Z3NGW4VU.mjs +34 -0
  75. package/dist/lib/neutral/relation-create-Z3NGW4VU.mjs.map +7 -0
  76. package/dist/lib/neutral/relation-delete-LXY7W2YO.mjs +18 -0
  77. package/dist/lib/neutral/relation-delete-LXY7W2YO.mjs.map +7 -0
  78. package/dist/lib/neutral/save-GWAPLT3Z.mjs +23 -0
  79. package/dist/lib/neutral/save-GWAPLT3Z.mjs.map +7 -0
  80. package/dist/lib/neutral/schema-add-4TXJO2V7.mjs +24 -0
  81. package/dist/lib/neutral/schema-add-4TXJO2V7.mjs.map +7 -0
  82. package/dist/lib/neutral/schema-list-Q7HRRKGR.mjs +39 -0
  83. package/dist/lib/neutral/schema-list-Q7HRRKGR.mjs.map +7 -0
  84. package/dist/lib/neutral/sync-issues-A2RJNPEF.mjs +167 -0
  85. package/dist/lib/neutral/sync-issues-A2RJNPEF.mjs.map +7 -0
  86. package/dist/lib/neutral/sync-triggers-NV4JCRN5.mjs +137 -0
  87. package/dist/lib/neutral/sync-triggers-NV4JCRN5.mjs.map +7 -0
  88. package/dist/lib/neutral/tag-add-5NOHUTIE.mjs +19 -0
  89. package/dist/lib/neutral/tag-add-5NOHUTIE.mjs.map +7 -0
  90. package/dist/lib/neutral/tag-remove-QTKYDJAW.mjs +19 -0
  91. package/dist/lib/neutral/tag-remove-QTKYDJAW.mjs.map +7 -0
  92. package/dist/lib/neutral/testing/index.mjs +8 -13
  93. package/dist/lib/neutral/testing/index.mjs.map +3 -3
  94. package/dist/lib/neutral/update-blueprints-K7A5SHBZ.mjs +17 -0
  95. package/dist/lib/neutral/update-blueprints-K7A5SHBZ.mjs.map +7 -0
  96. package/dist/lib/neutral/update-tasks-UGGHWXT5.mjs +46 -0
  97. package/dist/lib/neutral/update-tasks-UGGHWXT5.mjs.map +7 -0
  98. package/dist/types/src/blueprints/automation/blueprint.d.ts +4 -0
  99. package/dist/types/src/blueprints/automation/blueprint.d.ts.map +1 -0
  100. package/dist/types/src/blueprints/automation/index.d.ts +2 -0
  101. package/dist/types/src/blueprints/automation/index.d.ts.map +1 -0
  102. package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts +4 -0
  103. package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts.map +1 -0
  104. package/dist/types/src/blueprints/blueprint-manager/blueprint.test.d.ts.map +1 -0
  105. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +60 -0
  106. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -0
  107. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +36 -0
  108. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -0
  109. package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts +4 -0
  110. package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts.map +1 -0
  111. package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +27 -0
  112. package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -0
  113. package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +5 -0
  114. package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts.map +1 -0
  115. package/dist/types/src/blueprints/blueprint-manager/index.d.ts +3 -0
  116. package/dist/types/src/blueprints/blueprint-manager/index.d.ts.map +1 -0
  117. package/dist/types/src/blueprints/browser/blueprint.d.ts +2 -2
  118. package/dist/types/src/blueprints/browser/blueprint.d.ts.map +1 -1
  119. package/dist/types/src/blueprints/database/blueprint.d.ts +2 -2
  120. package/dist/types/src/blueprints/database/blueprint.d.ts.map +1 -1
  121. package/dist/types/src/blueprints/database/functions/context-add.d.ts +5 -4
  122. package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -1
  123. package/dist/types/src/blueprints/database/functions/context-remove.d.ts +5 -4
  124. package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -1
  125. package/dist/types/src/blueprints/database/functions/definitions.d.ts +59 -0
  126. package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -0
  127. package/dist/types/src/blueprints/database/functions/index.d.ts +3 -56
  128. package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -1
  129. package/dist/types/src/blueprints/database/functions/load.d.ts +5 -4
  130. package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -1
  131. package/dist/types/src/blueprints/database/functions/object-create.d.ts +5 -3
  132. package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +1 -1
  133. package/dist/types/src/blueprints/database/functions/object-delete.d.ts +5 -4
  134. package/dist/types/src/blueprints/database/functions/object-delete.d.ts.map +1 -1
  135. package/dist/types/src/blueprints/database/functions/object-update.d.ts +5 -4
  136. package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -1
  137. package/dist/types/src/blueprints/database/functions/query.d.ts +7 -3
  138. package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -1
  139. package/dist/types/src/blueprints/database/functions/relation-create.d.ts +6 -5
  140. package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +1 -1
  141. package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +5 -4
  142. package/dist/types/src/blueprints/database/functions/relation-delete.d.ts.map +1 -1
  143. package/dist/types/src/blueprints/database/functions/schema-add.d.ts +4 -2
  144. package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +1 -1
  145. package/dist/types/src/blueprints/database/functions/schema-list.d.ts +4 -2
  146. package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +1 -1
  147. package/dist/types/src/blueprints/database/functions/tag-add.d.ts +4 -3
  148. package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +1 -1
  149. package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +4 -3
  150. package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -1
  151. package/dist/types/src/blueprints/database/index.d.ts +1 -1
  152. package/dist/types/src/blueprints/database/index.d.ts.map +1 -1
  153. package/dist/types/src/blueprints/discord/blueprint.d.ts +2 -2
  154. package/dist/types/src/blueprints/discord/blueprint.d.ts.map +1 -1
  155. package/dist/types/src/blueprints/discord/functions/definitions.d.ts +16 -0
  156. package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -0
  157. package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts +4 -2
  158. package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -1
  159. package/dist/types/src/blueprints/discord/functions/index.d.ts +3 -11
  160. package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -1
  161. package/dist/types/src/blueprints/discord/index.d.ts +1 -0
  162. package/dist/types/src/blueprints/discord/index.d.ts.map +1 -1
  163. package/dist/types/src/blueprints/github/functions/definitions.d.ts +8 -0
  164. package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -0
  165. package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts +5 -2
  166. package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -1
  167. package/dist/types/src/blueprints/github/functions/index.d.ts +3 -6
  168. package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -1
  169. package/dist/types/src/blueprints/github/index.d.ts +1 -0
  170. package/dist/types/src/blueprints/github/index.d.ts.map +1 -1
  171. package/dist/types/src/blueprints/index.d.ts +4 -3
  172. package/dist/types/src/blueprints/index.d.ts.map +1 -1
  173. package/dist/types/src/blueprints/linear/blueprint.d.ts +2 -2
  174. package/dist/types/src/blueprints/linear/blueprint.d.ts.map +1 -1
  175. package/dist/types/src/blueprints/linear/functions/definitions.d.ts +7 -0
  176. package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -0
  177. package/dist/types/src/blueprints/linear/functions/index.d.ts +3 -8
  178. package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -1
  179. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts +5 -6
  180. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -1
  181. package/dist/types/src/blueprints/linear/index.d.ts +1 -0
  182. package/dist/types/src/blueprints/linear/index.d.ts.map +1 -1
  183. package/dist/types/src/blueprints/memory/blueprint.d.ts +4 -0
  184. package/dist/types/src/blueprints/memory/blueprint.d.ts.map +1 -0
  185. package/dist/types/src/blueprints/memory/blueprint.test.d.ts.map +1 -0
  186. package/dist/types/src/blueprints/memory/functions/definitions.d.ts +17 -0
  187. package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +1 -0
  188. package/dist/types/src/blueprints/memory/functions/delete.d.ts +10 -0
  189. package/dist/types/src/blueprints/memory/functions/delete.d.ts.map +1 -0
  190. package/dist/types/src/blueprints/memory/functions/index.d.ts +4 -0
  191. package/dist/types/src/blueprints/memory/functions/index.d.ts.map +1 -0
  192. package/dist/types/src/blueprints/memory/functions/query.d.ts +8 -0
  193. package/dist/types/src/blueprints/memory/functions/query.d.ts.map +1 -0
  194. package/dist/types/src/blueprints/memory/functions/save.d.ts +8 -0
  195. package/dist/types/src/blueprints/memory/functions/save.d.ts.map +1 -0
  196. package/dist/types/src/blueprints/memory/index.d.ts +3 -0
  197. package/dist/types/src/blueprints/memory/index.d.ts.map +1 -0
  198. package/dist/types/src/blueprints/planning/blueprint.d.ts +2 -2
  199. package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -1
  200. package/dist/types/src/blueprints/planning/functions/definitions.d.ts +11 -0
  201. package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +1 -0
  202. package/dist/types/src/blueprints/planning/functions/index.d.ts +3 -9
  203. package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -1
  204. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +5 -3
  205. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -1
  206. package/dist/types/src/blueprints/planning/index.d.ts +1 -0
  207. package/dist/types/src/blueprints/planning/index.d.ts.map +1 -1
  208. package/dist/types/src/blueprints/project/blueprint.d.ts +2 -2
  209. package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -1
  210. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +4 -3
  211. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -1
  212. package/dist/types/src/blueprints/project/functions/agent.d.ts +2 -60
  213. package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -1
  214. package/dist/types/src/blueprints/project/functions/definitions.d.ts +158 -0
  215. package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -0
  216. package/dist/types/src/blueprints/project/functions/get-context.d.ts +6 -4
  217. package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -1
  218. package/dist/types/src/blueprints/project/functions/index.d.ts +3 -132
  219. package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -1
  220. package/dist/types/src/blueprints/project/functions/qualifier.d.ts +30 -17
  221. package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -1
  222. package/dist/types/src/blueprints/project/index.d.ts +2 -2
  223. package/dist/types/src/blueprints/project/index.d.ts.map +1 -1
  224. package/dist/types/src/blueprints/project-wizard/blueprint.d.ts +4 -0
  225. package/dist/types/src/blueprints/project-wizard/blueprint.d.ts.map +1 -0
  226. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +52 -0
  227. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +1 -0
  228. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +97 -0
  229. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -0
  230. package/dist/types/src/blueprints/project-wizard/functions/index.d.ts +4 -0
  231. package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +1 -0
  232. package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts +4 -0
  233. package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +1 -0
  234. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +48 -0
  235. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -0
  236. package/dist/types/src/blueprints/project-wizard/index.d.ts +3 -0
  237. package/dist/types/src/blueprints/project-wizard/index.d.ts.map +1 -0
  238. package/dist/types/src/blueprints/testing.d.ts +5 -15
  239. package/dist/types/src/blueprints/testing.d.ts.map +1 -1
  240. package/dist/types/src/blueprints/websearch/blueprint.d.ts +2 -2
  241. package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -1
  242. package/dist/types/src/blueprints/websearch/blueprint.test.d.ts.map +1 -0
  243. package/dist/types/src/blueprints/websearch/functions/definitions.d.ts +5 -0
  244. package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -0
  245. package/dist/types/src/blueprints/websearch/functions/fetch.d.ts +6 -0
  246. package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +1 -0
  247. package/dist/types/src/blueprints/websearch/functions/index.d.ts +4 -0
  248. package/dist/types/src/blueprints/websearch/functions/index.d.ts.map +1 -0
  249. package/dist/types/src/blueprints/websearch/index.d.ts +2 -1
  250. package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
  251. package/dist/types/src/blueprints/websearch/toolkit.d.ts +2 -0
  252. package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -1
  253. package/dist/types/src/crud/graph.d.ts +2 -2
  254. package/dist/types/src/crud/graph.d.ts.map +1 -1
  255. package/dist/types/src/errors.d.ts +41 -0
  256. package/dist/types/src/errors.d.ts.map +1 -0
  257. package/dist/types/src/functions/agent/definitions.d.ts +61 -0
  258. package/dist/types/src/functions/agent/definitions.d.ts.map +1 -0
  259. package/dist/types/src/functions/agent/index.d.ts +3 -84
  260. package/dist/types/src/functions/agent/index.d.ts.map +1 -1
  261. package/dist/types/src/functions/agent/prompt.d.ts +2 -82
  262. package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
  263. package/dist/types/src/functions/agent/prompt.test.d.ts +2 -0
  264. package/dist/types/src/functions/agent/prompt.test.d.ts.map +1 -0
  265. package/dist/types/src/functions/index.d.ts +0 -2
  266. package/dist/types/src/functions/index.d.ts.map +1 -1
  267. package/dist/types/src/sync/sync.d.ts.map +1 -1
  268. package/dist/types/src/testing/plugins.d.ts.map +1 -1
  269. package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -1
  270. package/dist/types/src/types/Agent.d.ts +77 -0
  271. package/dist/types/src/types/Agent.d.ts.map +1 -0
  272. package/dist/types/src/types/Chat.d.ts +32 -7
  273. package/dist/types/src/types/Chat.d.ts.map +1 -1
  274. package/dist/types/src/types/McpServer.d.ts +18 -0
  275. package/dist/types/src/types/McpServer.d.ts.map +1 -0
  276. package/dist/types/src/types/Memory.d.ts +12 -0
  277. package/dist/types/src/types/Memory.d.ts.map +1 -0
  278. package/dist/types/src/types/Plan.d.ts +23 -11
  279. package/dist/types/src/types/Plan.d.ts.map +1 -1
  280. package/dist/types/src/types/index.d.ts +3 -1
  281. package/dist/types/src/types/index.d.ts.map +1 -1
  282. package/dist/types/src/util/graphql.d.ts.map +1 -1
  283. package/dist/types/tsconfig.tsbuildinfo +1 -1
  284. package/package.json +26 -31
  285. package/src/blueprints/automation/blueprint.ts +107 -0
  286. package/src/blueprints/automation/index.ts +5 -0
  287. package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -0
  288. package/src/blueprints/blueprint-manager/blueprint.test.ts +199 -0
  289. package/src/blueprints/blueprint-manager/blueprint.ts +49 -0
  290. package/src/blueprints/blueprint-manager/functions/definitions.ts +58 -0
  291. package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +44 -0
  292. package/src/blueprints/blueprint-manager/functions/index.ts +13 -0
  293. package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +19 -0
  294. package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +19 -0
  295. package/src/blueprints/blueprint-manager/index.ts +6 -0
  296. package/src/blueprints/browser/blueprint.test.ts +22 -30
  297. package/src/blueprints/browser/blueprint.ts +4 -5
  298. package/src/blueprints/database/blueprint.conversations.json +1 -1
  299. package/src/blueprints/database/blueprint.test.ts +309 -98
  300. package/src/blueprints/database/blueprint.ts +36 -9
  301. package/src/blueprints/database/functions/context-add.ts +15 -26
  302. package/src/blueprints/database/functions/context-remove.ts +16 -27
  303. package/src/blueprints/database/functions/definitions.ts +318 -0
  304. package/src/blueprints/database/functions/index.ts +18 -28
  305. package/src/blueprints/database/functions/load.ts +11 -23
  306. package/src/blueprints/database/functions/object-create.ts +28 -25
  307. package/src/blueprints/database/functions/object-delete.ts +13 -20
  308. package/src/blueprints/database/functions/object-update.ts +23 -25
  309. package/src/blueprints/database/functions/query.ts +48 -110
  310. package/src/blueprints/database/functions/relation-create.ts +25 -38
  311. package/src/blueprints/database/functions/relation-delete.ts +14 -21
  312. package/src/blueprints/database/functions/schema-add.ts +19 -31
  313. package/src/blueprints/database/functions/schema-list.ts +27 -27
  314. package/src/blueprints/database/functions/tag-add.ts +14 -24
  315. package/src/blueprints/database/functions/tag-remove.ts +14 -23
  316. package/src/blueprints/database/index.ts +16 -1
  317. package/src/blueprints/discord/blueprint.ts +5 -10
  318. package/src/blueprints/discord/functions/definitions.ts +71 -0
  319. package/src/blueprints/discord/functions/fetch-messages.test.ts +15 -25
  320. package/src/blueprints/discord/functions/fetch-messages.ts +98 -151
  321. package/src/blueprints/discord/functions/index.ts +4 -4
  322. package/src/blueprints/discord/index.ts +1 -0
  323. package/src/blueprints/github/functions/definitions.ts +27 -0
  324. package/src/blueprints/github/functions/fetch-prs.ts +15 -22
  325. package/src/blueprints/github/functions/index.ts +4 -4
  326. package/src/blueprints/github/index.ts +2 -0
  327. package/src/blueprints/index.ts +4 -3
  328. package/src/blueprints/linear/blueprint.ts +5 -10
  329. package/src/blueprints/linear/functions/definitions.ts +24 -0
  330. package/src/blueprints/linear/functions/index.ts +4 -4
  331. package/src/blueprints/linear/functions/linear.test.ts +8 -7
  332. package/src/blueprints/linear/functions/sync-issues.ts +31 -39
  333. package/src/blueprints/linear/index.ts +1 -0
  334. package/src/blueprints/memory/blueprint.conversations.json +1 -0
  335. package/src/blueprints/memory/blueprint.test.ts +139 -0
  336. package/src/blueprints/memory/blueprint.ts +41 -0
  337. package/src/blueprints/memory/functions/definitions.ts +68 -0
  338. package/src/blueprints/memory/functions/delete.ts +20 -0
  339. package/src/blueprints/memory/functions/index.ts +13 -0
  340. package/src/blueprints/memory/functions/query.ts +32 -0
  341. package/src/blueprints/memory/functions/save.ts +20 -0
  342. package/src/blueprints/memory/index.ts +6 -0
  343. package/src/blueprints/planning/blueprint.ts +5 -9
  344. package/src/blueprints/planning/functions/definitions.ts +137 -0
  345. package/src/blueprints/planning/functions/index.ts +4 -4
  346. package/src/blueprints/planning/functions/update-tasks.ts +35 -158
  347. package/src/blueprints/planning/index.ts +1 -0
  348. package/src/blueprints/project/blueprint.conversations.json +1 -0
  349. package/src/blueprints/project/blueprint.test.ts +245 -109
  350. package/src/blueprints/project/blueprint.ts +20 -24
  351. package/src/blueprints/project/functions/add-artifact.ts +19 -30
  352. package/src/blueprints/project/functions/agent.ts +43 -46
  353. package/src/blueprints/project/functions/definitions.ts +92 -0
  354. package/src/blueprints/project/functions/get-context.ts +36 -53
  355. package/src/blueprints/project/functions/index.ts +9 -10
  356. package/src/blueprints/project/functions/qualifier.ts +66 -72
  357. package/src/blueprints/project/index.ts +2 -2
  358. package/src/blueprints/project-wizard/blueprint.ts +52 -0
  359. package/src/blueprints/project-wizard/functions/create-project.ts +33 -0
  360. package/src/blueprints/project-wizard/functions/definitions.ts +64 -0
  361. package/src/blueprints/project-wizard/functions/index.ts +13 -0
  362. package/src/blueprints/project-wizard/functions/project-rules.ts +77 -0
  363. package/src/blueprints/project-wizard/functions/sync-triggers.ts +159 -0
  364. package/src/blueprints/project-wizard/index.ts +6 -0
  365. package/src/blueprints/testing.ts +7 -23
  366. package/src/blueprints/websearch/blueprint.conversations.json +1 -0
  367. package/src/blueprints/websearch/blueprint.test.ts +39 -0
  368. package/src/blueprints/websearch/blueprint.ts +6 -8
  369. package/src/blueprints/websearch/functions/definitions.ts +25 -0
  370. package/src/blueprints/websearch/functions/fetch.ts +18 -0
  371. package/src/blueprints/websearch/functions/index.ts +9 -0
  372. package/src/blueprints/websearch/index.ts +2 -1
  373. package/src/blueprints/websearch/toolkit.ts +6 -1
  374. package/src/crud/graph.test.ts +10 -12
  375. package/src/crud/graph.ts +3 -3
  376. package/src/errors.ts +25 -0
  377. package/src/functions/agent/definitions.ts +53 -0
  378. package/src/functions/agent/index.ts +4 -4
  379. package/src/functions/agent/prompt.conversations.json +1 -0
  380. package/src/functions/agent/prompt.test.ts +83 -0
  381. package/src/functions/agent/prompt.ts +211 -96
  382. package/src/functions/index.ts +0 -2
  383. package/src/sync/sync.ts +23 -12
  384. package/src/testing/plugins.tsx +10 -3
  385. package/src/toolkits/WebToolkit.ts +1 -1
  386. package/src/types/Agent.ts +239 -0
  387. package/src/types/Chat.ts +24 -10
  388. package/src/types/McpServer.ts +37 -0
  389. package/src/types/Memory.ts +24 -0
  390. package/src/types/Plan.ts +7 -4
  391. package/src/types/index.ts +3 -1
  392. package/dist/types/src/blueprints/design/blueprint.d.ts +0 -4
  393. package/dist/types/src/blueprints/design/blueprint.d.ts.map +0 -1
  394. package/dist/types/src/blueprints/design/blueprint.test.d.ts.map +0 -1
  395. package/dist/types/src/blueprints/design/index.d.ts +0 -2
  396. package/dist/types/src/blueprints/design/index.d.ts.map +0 -1
  397. package/dist/types/src/blueprints/markdown/blueprint.d.ts +0 -4
  398. package/dist/types/src/blueprints/markdown/blueprint.d.ts.map +0 -1
  399. package/dist/types/src/blueprints/markdown/functions/create.d.ts +0 -6
  400. package/dist/types/src/blueprints/markdown/functions/create.d.ts.map +0 -1
  401. package/dist/types/src/blueprints/markdown/functions/index.d.ts +0 -30
  402. package/dist/types/src/blueprints/markdown/functions/index.d.ts.map +0 -1
  403. package/dist/types/src/blueprints/markdown/functions/read.d.ts +0 -14
  404. package/dist/types/src/blueprints/markdown/functions/read.d.ts.map +0 -1
  405. package/dist/types/src/blueprints/markdown/functions/update.d.ts +0 -13
  406. package/dist/types/src/blueprints/markdown/functions/update.d.ts.map +0 -1
  407. package/dist/types/src/blueprints/markdown/index.d.ts +0 -3
  408. package/dist/types/src/blueprints/markdown/index.d.ts.map +0 -1
  409. package/dist/types/src/blueprints/planning-old/blueprint.d.ts +0 -4
  410. package/dist/types/src/blueprints/planning-old/blueprint.d.ts.map +0 -1
  411. package/dist/types/src/blueprints/planning-old/blueprint.test.d.ts.map +0 -1
  412. package/dist/types/src/blueprints/planning-old/functions/index.d.ts +0 -29
  413. package/dist/types/src/blueprints/planning-old/functions/index.d.ts.map +0 -1
  414. package/dist/types/src/blueprints/planning-old/functions/read.d.ts +0 -14
  415. package/dist/types/src/blueprints/planning-old/functions/read.d.ts.map +0 -1
  416. package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts +0 -74
  417. package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts.map +0 -1
  418. package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts +0 -2
  419. package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts.map +0 -1
  420. package/dist/types/src/blueprints/planning-old/functions/update.d.ts +0 -16
  421. package/dist/types/src/blueprints/planning-old/functions/update.d.ts.map +0 -1
  422. package/dist/types/src/blueprints/planning-old/index.d.ts +0 -2
  423. package/dist/types/src/blueprints/planning-old/index.d.ts.map +0 -1
  424. package/dist/types/src/blueprints/research/blueprint.d.ts +0 -4
  425. package/dist/types/src/blueprints/research/blueprint.d.ts.map +0 -1
  426. package/dist/types/src/blueprints/research/blueprint.test.d.ts.map +0 -1
  427. package/dist/types/src/blueprints/research/functions/document-create.d.ts +0 -10
  428. package/dist/types/src/blueprints/research/functions/document-create.d.ts.map +0 -1
  429. package/dist/types/src/blueprints/research/functions/index.d.ts +0 -19
  430. package/dist/types/src/blueprints/research/functions/index.d.ts.map +0 -1
  431. package/dist/types/src/blueprints/research/functions/research.d.ts +0 -14
  432. package/dist/types/src/blueprints/research/functions/research.d.ts.map +0 -1
  433. package/dist/types/src/blueprints/research/functions/research.test.d.ts +0 -2
  434. package/dist/types/src/blueprints/research/functions/research.test.d.ts.map +0 -1
  435. package/dist/types/src/blueprints/research/index.d.ts +0 -3
  436. package/dist/types/src/blueprints/research/index.d.ts.map +0 -1
  437. package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts +0 -18
  438. package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts.map +0 -1
  439. package/dist/types/src/blueprints/research/types/index.d.ts +0 -7
  440. package/dist/types/src/blueprints/research/types/index.d.ts.map +0 -1
  441. package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +0 -179
  442. package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +0 -1
  443. package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts +0 -2
  444. package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts.map +0 -1
  445. package/dist/types/src/functions/entity-extraction/index.d.ts +0 -179
  446. package/dist/types/src/functions/entity-extraction/index.d.ts.map +0 -1
  447. package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts +0 -38
  448. package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts.map +0 -1
  449. package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts +0 -37
  450. package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts.map +0 -1
  451. package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts +0 -58
  452. package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts.map +0 -1
  453. package/dist/types/src/functions/exa/data/index.d.ts +0 -3
  454. package/dist/types/src/functions/exa/data/index.d.ts.map +0 -1
  455. package/dist/types/src/functions/exa/exa.d.ts +0 -5
  456. package/dist/types/src/functions/exa/exa.d.ts.map +0 -1
  457. package/dist/types/src/functions/exa/index.d.ts +0 -9
  458. package/dist/types/src/functions/exa/index.d.ts.map +0 -1
  459. package/dist/types/src/functions/exa/mock.d.ts +0 -5
  460. package/dist/types/src/functions/exa/mock.d.ts.map +0 -1
  461. package/dist/types/src/types/Project.d.ts +0 -67
  462. package/dist/types/src/types/Project.d.ts.map +0 -1
  463. package/src/blueprints/browser/blueprint.conversations.json +0 -1
  464. package/src/blueprints/design/blueprint.test.ts +0 -96
  465. package/src/blueprints/design/blueprint.ts +0 -46
  466. package/src/blueprints/design/index.ts +0 -5
  467. package/src/blueprints/markdown/blueprint.ts +0 -38
  468. package/src/blueprints/markdown/functions/create.ts +0 -29
  469. package/src/blueprints/markdown/functions/index.ts +0 -13
  470. package/src/blueprints/markdown/functions/read.ts +0 -32
  471. package/src/blueprints/markdown/functions/update.ts +0 -32
  472. package/src/blueprints/markdown/index.ts +0 -6
  473. package/src/blueprints/planning-old/blueprint.test.ts +0 -122
  474. package/src/blueprints/planning-old/blueprint.ts +0 -110
  475. package/src/blueprints/planning-old/functions/index.ts +0 -11
  476. package/src/blueprints/planning-old/functions/read.ts +0 -34
  477. package/src/blueprints/planning-old/functions/task-list.test.ts +0 -99
  478. package/src/blueprints/planning-old/functions/task-list.ts +0 -165
  479. package/src/blueprints/planning-old/functions/update.ts +0 -52
  480. package/src/blueprints/planning-old/index.ts +0 -5
  481. package/src/blueprints/research/blueprint.test.ts +0 -7
  482. package/src/blueprints/research/blueprint.ts +0 -65
  483. package/src/blueprints/research/functions/document-create.ts +0 -73
  484. package/src/blueprints/research/functions/index.ts +0 -11
  485. package/src/blueprints/research/functions/research-instructions.tpl +0 -106
  486. package/src/blueprints/research/functions/research.conversations.json +0 -1
  487. package/src/blueprints/research/functions/research.test.ts +0 -149
  488. package/src/blueprints/research/functions/research.ts +0 -175
  489. package/src/blueprints/research/index.ts +0 -6
  490. package/src/blueprints/research/types/ResearchGraph.ts +0 -49
  491. package/src/blueprints/research/types/index.ts +0 -32
  492. package/src/functions/entity-extraction/entity-extraction.conversations.json +0 -1
  493. package/src/functions/entity-extraction/entity-extraction.test.ts +0 -74
  494. package/src/functions/entity-extraction/entity-extraction.ts +0 -181
  495. package/src/functions/entity-extraction/index.ts +0 -9
  496. package/src/functions/exa/data/exa-search-1748337321991.ts +0 -131
  497. package/src/functions/exa/data/exa-search-1748337331526.ts +0 -144
  498. package/src/functions/exa/data/exa-search-1748337344119.ts +0 -133
  499. package/src/functions/exa/data/index.ts +0 -11
  500. package/src/functions/exa/exa.ts +0 -37
  501. package/src/functions/exa/index.ts +0 -11
  502. package/src/functions/exa/mock.ts +0 -71
  503. package/src/types/Project.ts +0 -196
  504. /package/dist/types/src/blueprints/{design → blueprint-manager}/blueprint.test.d.ts +0 -0
  505. /package/dist/types/src/blueprints/{planning-old → memory}/blueprint.test.d.ts +0 -0
  506. /package/dist/types/src/blueprints/{research → websearch}/blueprint.test.d.ts +0 -0
@@ -7,38 +7,45 @@ import * as Effect from 'effect/Effect';
7
7
  import * as Exit from 'effect/Exit';
8
8
 
9
9
  import { MemoizedAiService } from '@dxos/ai/testing';
10
- import { AiConversation } from '@dxos/assistant';
11
- import { AssistantTestLayerWithTriggers } from '@dxos/assistant/testing';
12
- import { Blueprint } from '@dxos/blueprints';
10
+ import { AiSession } from '@dxos/assistant';
13
11
  import { SpaceProperties } from '@dxos/client-protocol';
14
- import { Database, Obj, Ref } from '@dxos/echo';
12
+ import { Blueprint } from '@dxos/compute';
13
+ import { QueueService, Trigger } from '@dxos/compute';
14
+ import { Operation, OperationHandlerSet } from '@dxos/compute';
15
+ import { Database, Feed, Filter, Obj, Query, Ref } from '@dxos/echo';
15
16
  import { Collection } from '@dxos/echo';
16
17
  import { acquireReleaseResource } from '@dxos/effect';
17
18
  import { TestHelpers } from '@dxos/effect/testing';
18
- import { FunctionDefinition, QueueService, Trigger } from '@dxos/functions';
19
19
  import { TriggerDispatcher } from '@dxos/functions-runtime';
20
+ import { AssistantTestLayerWithTriggers } from '@dxos/functions-runtime/testing';
20
21
  import { invariant } from '@dxos/invariant';
21
22
  import { ObjectId } from '@dxos/keys';
22
23
  import { MarkdownBlueprint } from '@dxos/plugin-markdown/blueprints';
24
+ import { MarkdownOperationHandlerSet } from '@dxos/plugin-markdown/operations';
23
25
  import { WithProperties } from '@dxos/plugin-markdown/testing';
24
26
  import { Markdown } from '@dxos/plugin-markdown/types';
25
27
  import { Text } from '@dxos/schema';
26
28
  import { Message } from '@dxos/types';
27
29
  import { trim } from '@dxos/util';
28
30
 
29
- import { Chat, Plan, Project } from '../../types';
30
- import { PlanningBlueprint } from '../planning';
31
-
32
- import ProjectBlueprintDef from './blueprint';
33
- import { ProjectFunctions } from './functions';
31
+ import { Chat, Plan, Agent } from '../../types';
32
+ import { PlanningBlueprint, PlanningHandlers } from '../planning';
33
+ import { AgentWizardHandlers, SyncTriggers } from '../project-wizard';
34
+ import AgentBlueprintDef from './blueprint';
35
+ import { AgentWorker, AgentBlueprintHandlers } from './functions';
34
36
 
35
37
  ObjectId.dangerouslyDisableRandomness();
36
38
 
37
39
  const TestLayer = AssistantTestLayerWithTriggers({
38
40
  aiServicePreset: 'edge-remote',
39
- functions: [...Object.values(ProjectFunctions), ...MarkdownBlueprint.functions],
41
+ operationHandlers: OperationHandlerSet.merge(
42
+ AgentBlueprintHandlers,
43
+ AgentWizardHandlers,
44
+ MarkdownOperationHandlerSet,
45
+ PlanningHandlers,
46
+ ),
40
47
  types: [
41
- Project.Project,
48
+ Agent.Agent,
42
49
  Plan.Plan,
43
50
  Chat.CompanionTo,
44
51
  Chat.Chat,
@@ -59,34 +66,85 @@ const SYSTEM = trim`
59
66
  DO NOT PRETEND TO DO SOMETHING YOU CAN'T DO.
60
67
  `;
61
68
 
62
- describe.runIf(TestHelpers.tagEnabled('flaky'))('Project', () => {
63
- const blueprint = ProjectBlueprintDef.make();
69
+ describe('Agent', () => {
70
+ const blueprint = AgentBlueprintDef.make();
71
+
64
72
  it.scoped(
65
- 'shopping list',
73
+ 'agent adds artifact to agent',
66
74
  Effect.fnUntraced(
67
75
  function* (_) {
68
- const project = yield* Database.add(
69
- yield* Project.makeInitialized(
70
- {
71
- name: 'Shopping list',
72
- spec: 'Keep a shopping list of items to buy.',
73
- blueprints: [Ref.make(MarkdownBlueprint.make())],
74
- },
75
- blueprint,
76
- ),
76
+ const agent = yield* Agent.makeInitialized(
77
+ {
78
+ name: 'Test Project',
79
+ instructions: 'A test project for adding artifacts.',
80
+ blueprints: [Ref.make(MarkdownBlueprint.make())],
81
+ },
82
+ blueprint,
77
83
  );
78
- const chatQueue = project.chat?.target?.queue?.target as any;
79
- invariant(chatQueue, 'Project chat queue not found.');
80
- yield* Database.flush({ indexes: true });
81
- const conversation = yield* acquireReleaseResource(() => new AiConversation({ queue: chatQueue }));
82
- yield* Effect.promise(() => conversation.context.open());
83
-
84
- yield* conversation.createRequest({
85
- system: SYSTEM,
86
- prompt: `List ingredients for a scrambled eggs on a toast breakfast.`,
87
- });
84
+ yield* Database.flush();
85
+
86
+ const document = yield* Database.add(
87
+ Obj.make(Markdown.Document, {
88
+ name: 'Test Document',
89
+ content: Ref.make(Text.make('This is a test document with some content.')),
90
+ }),
91
+ );
92
+ yield* Database.flush();
93
+
94
+ expect(agent.artifacts).toHaveLength(0);
95
+
96
+ const chatFeed = agent.chat?.target?.feed?.target;
97
+ invariant(chatFeed, 'Agent chat feed not found.');
98
+ const runtime = yield* Effect.runtime<Feed.FeedService>();
99
+ const session = yield* acquireReleaseResource(() => new AiSession({ feed: chatFeed, runtime }));
100
+ yield* Effect.promise(() => session.context.open());
101
+
102
+ const documentDxn = Obj.getDXN(document);
103
+ yield* session
104
+ .createRequest({
105
+ system: SYSTEM,
106
+ prompt: `Please add the document ${documentDxn} as an artifact named "My Test Document" to this agent.`,
107
+ })
108
+ .pipe(Effect.provide(session.makeToolExecutionServices()));
109
+
110
+ expect(agent.artifacts).toHaveLength(1);
111
+ expect(agent.artifacts[0].name).toBe('My Test Document');
112
+ const artifactData = yield* agent.artifacts[0].data.pipe(Database.load);
113
+ expect(Obj.instanceOf(Markdown.Document, artifactData)).toBe(true);
114
+ },
115
+ Effect.provide(TestLayer),
116
+ TestHelpers.provideTestContext,
117
+ ),
118
+ MemoizedAiService.isGenerationEnabled() ? 240_000 : 30_000,
119
+ );
88
120
 
89
- console.log(yield* Effect.promise(() => dumpProject(project)));
121
+ it.scoped(
122
+ 'shopping list',
123
+ Effect.fnUntraced(
124
+ function* (_) {
125
+ const agent = yield* Agent.makeInitialized(
126
+ {
127
+ name: 'Shopping list',
128
+ instructions: 'Keep a shopping list of items to buy.',
129
+ blueprints: [Ref.make(MarkdownBlueprint.make())],
130
+ },
131
+ blueprint,
132
+ );
133
+ const chatFeed = agent.chat?.target?.feed?.target;
134
+ invariant(chatFeed, 'Agent chat feed not found.');
135
+ yield* Database.flush();
136
+ const runtime = yield* Effect.runtime<Feed.FeedService>();
137
+ const session = yield* acquireReleaseResource(() => new AiSession({ feed: chatFeed, runtime }));
138
+ yield* Effect.promise(() => session.context.open());
139
+
140
+ yield* session
141
+ .createRequest({
142
+ system: SYSTEM,
143
+ prompt: `List ingredients for a scrambled eggs on a toast breakfast.`,
144
+ })
145
+ .pipe(Effect.provide(session.makeToolExecutionServices()));
146
+
147
+ console.log(yield* Effect.promise(() => dumpAgent(agent)));
90
148
  },
91
149
  Effect.provide(TestLayer),
92
150
  TestHelpers.provideTestContext,
@@ -98,38 +156,33 @@ describe.runIf(TestHelpers.tagEnabled('flaky'))('Project', () => {
98
156
  'expense tracking list',
99
157
  Effect.fnUntraced(
100
158
  function* (_) {
101
- const project = yield* Database.add(
102
- yield* Project.makeInitialized(
103
- {
104
- name: 'Expense tracking',
105
- spec: trim`
106
- Keep a list of expenses in a markdown document (create artifact "Expenses").
107
- Process incoming emails, add the relevant ones to the list.
108
-
109
- Format:
110
-
111
- ## Expenses
112
- - Flight to London (2026-02-01): £100
113
- - Hotel in London (2026-02-01): £100
114
- `,
115
- blueprints: [Ref.make(MarkdownBlueprint.make())],
116
- },
117
- blueprint,
118
- ),
159
+ const agent = yield* Agent.makeInitialized(
160
+ {
161
+ name: 'Expense tracking',
162
+ instructions: trim`
163
+ Keep a list of expenses in a markdown document (create artifact "Expenses").
164
+ Process incoming emails, add the relevant ones to the list.
165
+
166
+ Format:
167
+
168
+ ## Expenses
169
+ - Flight to London (2026-02-01): £100
170
+ - Hotel in London (2026-02-01): £100
171
+ `,
172
+ blueprints: [Ref.make(MarkdownBlueprint.make())],
173
+ },
174
+ blueprint,
119
175
  );
120
- yield* Database.flush({ indexes: true });
176
+ yield* Database.flush();
121
177
 
122
178
  const inboxQueue = yield* QueueService.createQueue();
123
179
  yield* Database.add(
124
180
  Trigger.make({
125
181
  enabled: true,
126
- spec: {
127
- kind: 'queue',
128
- queue: inboxQueue.dxn.toString(),
129
- },
130
- function: Ref.make(FunctionDefinition.serialize(ProjectFunctions.Agent)),
182
+ spec: Trigger.specQueue(inboxQueue.dxn.toString()),
183
+ function: Ref.make(Operation.serialize(AgentWorker)),
131
184
  input: {
132
- project: Ref.make(project),
185
+ agent: Ref.make(agent),
133
186
  event: '{{event}}',
134
187
  },
135
188
  }),
@@ -144,7 +197,7 @@ describe.runIf(TestHelpers.tagEnabled('flaky'))('Project', () => {
144
197
  const invocations = yield* dispatcher.invokeScheduledTriggers({ kinds: ['queue'], untilExhausted: true });
145
198
  expect(invocations.every((invocation) => Exit.isSuccess(invocation.result))).toBe(true);
146
199
 
147
- console.log(yield* Effect.promise(() => dumpProject(project)));
200
+ console.log(yield* Effect.promise(() => dumpAgent(agent)));
148
201
  },
149
202
  WithProperties,
150
203
  Effect.provide(TestLayer),
@@ -153,73 +206,156 @@ describe.runIf(TestHelpers.tagEnabled('flaky'))('Project', () => {
153
206
  MemoizedAiService.isGenerationEnabled() ? 240_000 : 30_000,
154
207
  );
155
208
 
209
+ it.scoped(
210
+ 'cron field creates a timer trigger that invokes the agent worker',
211
+ Effect.fnUntraced(
212
+ function* ({ expect }) {
213
+ const cron = '*/5 * * * *';
214
+ const agent = yield* Agent.makeInitialized(
215
+ {
216
+ name: 'Scheduled agent',
217
+ instructions: 'A scheduled agent that runs on a timer.',
218
+ blueprints: [Ref.make(MarkdownBlueprint.make())],
219
+ cron,
220
+ },
221
+ blueprint,
222
+ );
223
+ yield* Database.flush();
224
+
225
+ yield* Operation.invoke(SyncTriggers, { agent: Ref.make(agent) });
226
+
227
+ const triggers = yield* Database.runQuery(
228
+ Query.select(Filter.type(Trigger.Trigger)).debugLabel('assistant-toolkit.blueprint.test.timer'),
229
+ );
230
+ const timerTriggers = triggers.filter(
231
+ (trigger) => trigger.spec?.kind === 'timer' && trigger.spec.cron === cron,
232
+ );
233
+ expect(timerTriggers).toHaveLength(1);
234
+
235
+ const timerTrigger = timerTriggers[0];
236
+ invariant(timerTrigger.spec?.kind === 'timer');
237
+ expect(timerTrigger.spec.cron).toBe(cron);
238
+ expect(timerTrigger.enabled).toBe(true);
239
+
240
+ // Timer trigger bypasses the qualifier and points to the agent worker.
241
+ invariant(timerTrigger.function);
242
+ const operation = yield* Database.load(timerTrigger.function);
243
+ invariant(Obj.instanceOf(Operation.PersistentOperation, operation));
244
+ expect(operation.key).toBe(AgentWorker.meta.key);
245
+ },
246
+ Effect.provide(TestLayer),
247
+ TestHelpers.provideTestContext,
248
+ ),
249
+ );
250
+
156
251
  it.scoped(
157
252
  'planning',
158
253
  Effect.fnUntraced(
159
254
  function* (_) {
160
- const project = yield* Database.add(
161
- yield* Project.makeInitialized(
162
- {
163
- name: 'Egg making',
164
- spec: trim`
165
- I'm testing how planning (task management) works.
166
- Create tasks to make scrambled eggs.
167
-
168
- Then simulate this plan execution in a markdown document.
169
- The document should reflect the state of all objects involved in the cooking process.
170
- The document should also have the log of actions taken.
171
-
172
- Important: simualte actions one by one, in the order they are listed.
173
- Simlate by updating the local document.
174
-
175
- <example>
176
- # State
177
-
178
- - 2 raw eggs
179
- - 1 frying pan
180
-
181
- # Action log
182
-
183
- - Taken 2 raw eggs out of the fridge.
184
- </example>
185
- `,
186
- blueprints: [Ref.make(MarkdownBlueprint.make()), Ref.make(Obj.clone(PlanningBlueprint.make()))],
187
- },
188
- blueprint,
189
- ),
255
+ const agent = yield* Agent.makeInitialized(
256
+ {
257
+ name: 'Egg making',
258
+ instructions: trim`
259
+ I'm testing how planning (task management) works.
260
+ Create tasks to make scrambled eggs.
261
+
262
+ Then simulate this plan execution in a markdown document.
263
+ The document should reflect the state of all objects involved in the cooking process.
264
+ The document should also have the log of actions taken.
265
+
266
+ Important: simualte actions one by one, in the order they are listed.
267
+ Simlate by updating the local document.
268
+
269
+ <example>
270
+ # State
271
+
272
+ - 2 raw eggs
273
+ - 1 frying pan
274
+
275
+ # Action log
276
+
277
+ - Taken 2 raw eggs out of the fridge.
278
+ </example>
279
+ `,
280
+ blueprints: [Ref.make(MarkdownBlueprint.make()), Ref.make(Obj.clone(PlanningBlueprint.make()))],
281
+ },
282
+ blueprint,
190
283
  );
191
- yield* Database.flush({ indexes: true });
284
+ yield* Database.flush();
285
+
286
+ const chatFeed = agent.chat?.target?.feed?.target;
287
+ invariant(chatFeed, 'Agent chat feed not found.');
288
+ yield* Database.flush();
289
+ const runtime = yield* Effect.runtime<Feed.FeedService>();
290
+ const session = yield* acquireReleaseResource(() => new AiSession({ feed: chatFeed, runtime }));
291
+ yield* Effect.promise(() => session.context.open());
292
+
293
+ yield* session
294
+ .createRequest({
295
+ system: SYSTEM,
296
+ prompt: `Go`,
297
+ })
298
+ .pipe(Effect.provide(session.makeToolExecutionServices()));
299
+
300
+ console.log(yield* Effect.promise(() => dumpAgent(agent)));
301
+ },
302
+ WithProperties,
303
+ Effect.provide(TestLayer),
304
+ TestHelpers.provideTestContext,
305
+ ),
306
+ MemoizedAiService.isGenerationEnabled() ? 240_000 : 30_000,
307
+ );
308
+
309
+ it.scoped(
310
+ 'sync-triggers sets trigger enabled from agent.enabled',
311
+ Effect.fnUntraced(
312
+ function* ({ expect }) {
313
+ const agent = yield* Agent.makeInitialized(
314
+ {
315
+ name: 'Toggle agent',
316
+ instructions: 'Test enabled propagation.',
317
+ blueprints: [Ref.make(MarkdownBlueprint.make())],
318
+ enabled: false,
319
+ cron: '0 9 * * *',
320
+ },
321
+ blueprint,
322
+ );
323
+ yield* Database.flush();
324
+
325
+ yield* Operation.invoke(SyncTriggers, { agent: Ref.make(agent) });
192
326
 
193
- const chatQueue = project.chat?.target?.queue?.target as any;
194
- invariant(chatQueue, 'Project chat queue not found.');
195
- yield* Database.flush({ indexes: true });
196
- const conversation = yield* acquireReleaseResource(() => new AiConversation({ queue: chatQueue }));
197
- yield* Effect.promise(() => conversation.context.open());
327
+ const triggers = yield* Database.runQuery(
328
+ Query.select(Filter.type(Trigger.Trigger)).debugLabel('assistant-toolkit.blueprint.test.toggle-enabled'),
329
+ );
330
+ expect(triggers.every((trigger) => trigger.enabled === false)).toBe(true);
198
331
 
199
- yield* conversation.createRequest({
200
- system: SYSTEM,
201
- prompt: `Go`,
332
+ Obj.update(agent, (agent) => {
333
+ agent.enabled = true;
202
334
  });
335
+ yield* Database.flush();
336
+ yield* Operation.invoke(SyncTriggers, { agent: Ref.make(agent) });
203
337
 
204
- console.log(yield* Effect.promise(() => dumpProject(project)));
338
+ const triggersAfter = yield* Database.runQuery(
339
+ Query.select(Filter.type(Trigger.Trigger)).debugLabel('assistant-toolkit.blueprint.test.after'),
340
+ );
341
+ expect(triggersAfter).toHaveLength(triggers.length);
342
+ expect(triggersAfter.every((trigger) => trigger.enabled === true)).toBe(true);
205
343
  },
206
- WithProperties,
207
344
  Effect.provide(TestLayer),
208
345
  TestHelpers.provideTestContext,
209
346
  ),
210
- MemoizedAiService.isGenerationEnabled() ? 240_000 : 30_000,
211
347
  );
212
348
  });
213
349
 
214
- const dumpProject = async (project: Project.Project) => {
350
+ const dumpAgent = async (agent: Agent.Agent) => {
215
351
  let text = '';
216
- text += `============== Project: ${project.name} ==============\n\n`;
217
- text += `============== Spec ==============\n\n`;
218
- text += `${await project.spec.load().then((_) => _.content)}\n`;
352
+ text += `============== Agent: ${agent.name} ==============\n\n`;
353
+ text += `============== Instructions ==============\n\n`;
354
+ text += `${await agent.instructions.load().then((_) => _.content)}\n`;
219
355
  text += `============== Plan ==============\n\n`;
220
- text += `${await project.plan?.load().then((_) => Plan.formatPlan(_))}\n`;
356
+ text += `${await agent.plan?.load().then((_) => Plan.formatPlan(_))}\n`;
221
357
  text += `============== Artifacts ==============\n\n`;
222
- for (const artifact of project.artifacts) {
358
+ for (const artifact of agent.artifacts) {
223
359
  const data = await artifact.data.load();
224
360
  text += `============== ${artifact.name} (${Obj.getTypename(data)}) ==============\n`;
225
361
  if (Obj.instanceOf(Markdown.Document, data)) {
@@ -2,38 +2,35 @@
2
2
  // Copyright 2026 DXOS.org
3
3
  //
4
4
 
5
- import { type AppCapabilities } from '@dxos/app-toolkit';
6
- import { Blueprint, Template } from '@dxos/blueprints';
5
+ import { Blueprint, Template } from '@dxos/compute';
7
6
  import { trim } from '@dxos/util';
8
7
 
9
- import { ProjectFunctions } from './functions';
8
+ import { AddArtifact } from './functions';
10
9
 
11
- const BLUEPRINT_KEY = 'dxos.org/blueprint/project';
12
-
13
- const functions = [ProjectFunctions.AddArtifact];
10
+ const BLUEPRINT_KEY = 'org.dxos.blueprint.agent';
14
11
 
15
12
  /**
16
- * Creates the Project blueprint. This is a function to avoid circular dependency issues.
13
+ * Creates the Agent blueprint. This is a function to avoid circular dependency issues.
17
14
  */
15
+ // TODO(dmaretskyi): Combine with Agent Wizard.
18
16
  const make = () =>
19
17
  Blueprint.make({
20
18
  key: BLUEPRINT_KEY,
21
- name: 'Project blueprint',
19
+ name: 'Agent blueprint',
22
20
  instructions: Template.make({
23
21
  source: trim`
24
- You work on an project. Each project has a spec - the goal of the project.
25
- The project plan shows the current progress of the project.
26
- Project has an number of associated artifacts you can read/write.
27
- Spec and plan are also artifacts.
22
+ You work on an agent. Each agent has instructions - the goal of the agent.
23
+ The agent plan shows the current progress of the agent.
24
+ Agent has a number of associated artifacts you can read/write.
28
25
  You can edit them if necessary.
29
26
 
30
- IMPORTANT: When create a new artifact, always add it to the project using the add-artifact function.
27
+ IMPORTANT: When creating a new artifact, always add it to the agent using the add-artifact function.
31
28
 
32
- {{#with project}}
33
- <project id="{{id}}" name="{{name}}">
34
- <spec>
35
- {{spec}}
36
- </spec>
29
+ {{#with agent}}
30
+ <agent id="{{id}}" name="{{name}}">
31
+ <instructions>
32
+ {{instructions}}
33
+ </instructions>
37
34
  <plan>
38
35
  {{plan}}
39
36
  </plan>
@@ -45,23 +42,22 @@ const make = () =>
45
42
  </artifact>
46
43
  {{/each}}
47
44
  </artifacts>
48
- </project>
45
+ </agent>
49
46
  {{/with}}
50
47
  `,
51
48
  inputs: [
52
49
  {
53
- name: 'project',
50
+ name: 'agent',
54
51
  kind: 'function',
55
- function: 'dxos.org/function/project/get-context',
52
+ function: 'org.dxos.function.agent.get-context',
56
53
  },
57
54
  ],
58
55
  }),
59
- tools: Blueprint.toolDefinitions({ functions }),
56
+ tools: Blueprint.toolDefinitions({ operations: [AddArtifact] }),
60
57
  });
61
58
 
62
- const blueprint: AppCapabilities.BlueprintDefinition = {
59
+ const blueprint: Blueprint.Definition = {
63
60
  key: BLUEPRINT_KEY,
64
- functions,
65
61
  make,
66
62
  };
67
63
 
@@ -3,39 +3,28 @@
3
3
  //
4
4
 
5
5
  import * as Effect from 'effect/Effect';
6
- import * as Schema from 'effect/Schema';
7
6
 
8
- import { AiContextService } from '@dxos/assistant';
9
- import { Database, Obj, Ref } from '@dxos/echo';
10
- import { defineFunction } from '@dxos/functions';
7
+ import { Operation } from '@dxos/compute';
8
+ import { Database, Obj } from '@dxos/echo';
11
9
 
12
- import { Project } from '../../../types';
10
+ import { Agent } from '../../../types';
11
+ import { AddArtifact } from './definitions';
13
12
 
14
- export default defineFunction({
15
- key: 'dxos.org/function/project/add-artifact',
16
- name: 'Add artifact',
17
- description: 'Adds a new artifact.',
18
- inputSchema: Schema.Struct({
19
- name: Schema.String.annotations({
20
- description: 'The name of the artifact to add.',
21
- }),
22
- artifact: Ref.Ref(Obj.Unknown).annotations({
23
- description: 'The artifact to add. Do NOT guess or try to generate the ID.',
24
- }),
25
- }),
26
- services: [AiContextService],
27
- handler: Effect.fnUntraced(function* ({ data }) {
28
- if (!(yield* Database.load(data.artifact))) {
29
- throw new Error('Artifact not found.');
30
- }
13
+ export default AddArtifact.pipe(
14
+ Operation.withHandler(
15
+ Effect.fnUntraced(function* ({ name, artifact }) {
16
+ if (!(yield* Database.load(artifact))) {
17
+ throw new Error('Artifact not found.');
18
+ }
31
19
 
32
- const project = yield* Project.getFromChatContext;
20
+ const agent = yield* Agent.getFromChatContext;
33
21
 
34
- Obj.change(project, (project) => {
35
- project.artifacts.push({
36
- name: data.name,
37
- data: data.artifact,
22
+ Obj.update(agent, (agent) => {
23
+ agent.artifacts.push({
24
+ name,
25
+ data: artifact,
26
+ });
38
27
  });
39
- });
40
- }, AiContextService.fixFunctionHandlerType),
41
- });
28
+ }) as any,
29
+ ),
30
+ );