@dxos/assistant-toolkit 0.8.4-main.9735255 → 0.8.4-main.abd8ff62ef

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 (594) hide show
  1. package/dist/lib/neutral/add-artifact-BA5WQRDU.mjs +30 -0
  2. package/dist/lib/neutral/add-artifact-BA5WQRDU.mjs.map +7 -0
  3. package/dist/lib/neutral/agent-M2EW5M36.mjs +65 -0
  4. package/dist/lib/neutral/agent-M2EW5M36.mjs.map +7 -0
  5. package/dist/lib/neutral/chunk-CLHVRIYF.mjs +293 -0
  6. package/dist/lib/neutral/chunk-CLHVRIYF.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-D5MG5OKX.mjs +75 -0
  10. package/dist/lib/neutral/chunk-D5MG5OKX.mjs.map +7 -0
  11. package/dist/lib/neutral/chunk-E2XRNXWP.mjs +100 -0
  12. package/dist/lib/neutral/chunk-E2XRNXWP.mjs.map +7 -0
  13. package/dist/lib/neutral/chunk-EJAQUAKM.mjs +73 -0
  14. package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +7 -0
  15. package/dist/lib/neutral/chunk-J37DYY7A.mjs +51 -0
  16. package/dist/lib/neutral/chunk-J37DYY7A.mjs.map +7 -0
  17. package/dist/lib/neutral/chunk-JCYLFOFK.mjs +70 -0
  18. package/dist/lib/neutral/chunk-JCYLFOFK.mjs.map +7 -0
  19. package/dist/lib/neutral/chunk-KGU725LW.mjs +29 -0
  20. package/dist/lib/neutral/chunk-KGU725LW.mjs.map +7 -0
  21. package/dist/lib/neutral/chunk-KY2TIPJ5.mjs +108 -0
  22. package/dist/lib/neutral/chunk-KY2TIPJ5.mjs.map +7 -0
  23. package/dist/lib/neutral/chunk-MMTKJBB5.mjs +140 -0
  24. package/dist/lib/neutral/chunk-MMTKJBB5.mjs.map +7 -0
  25. package/dist/lib/neutral/chunk-NR3GTWRC.mjs +53 -0
  26. package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +7 -0
  27. package/dist/lib/neutral/chunk-TO5IX24K.mjs +67 -0
  28. package/dist/lib/neutral/chunk-TO5IX24K.mjs.map +7 -0
  29. package/dist/lib/neutral/chunk-WLR3BGO4.mjs +25 -0
  30. package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +7 -0
  31. package/dist/lib/neutral/chunk-ZFXLTBZG.mjs +73 -0
  32. package/dist/lib/neutral/chunk-ZFXLTBZG.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-GLDEAWTT.mjs +35 -0
  38. package/dist/lib/neutral/create-project-GLDEAWTT.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-LBDZH2CY.mjs +47 -0
  42. package/dist/lib/neutral/enable-blueprints-LBDZH2CY.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-PWGUG5G3.mjs +139 -0
  46. package/dist/lib/neutral/fetch-messages-PWGUG5G3.mjs.map +7 -0
  47. package/dist/lib/neutral/get-context-B55SX5Y4.mjs +35 -0
  48. package/dist/lib/neutral/get-context-B55SX5Y4.mjs.map +7 -0
  49. package/dist/lib/neutral/index.mjs +904 -0
  50. package/dist/lib/neutral/index.mjs.map +7 -0
  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 -0
  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-2YBPW5N7.mjs +23 -0
  61. package/dist/lib/neutral/project-rules-XUBEPDP6.mjs +78 -0
  62. package/dist/lib/neutral/project-rules-XUBEPDP6.mjs.map +7 -0
  63. package/dist/lib/neutral/prompt-2WZQERT4.mjs +167 -0
  64. package/dist/lib/neutral/prompt-2WZQERT4.mjs.map +7 -0
  65. package/dist/lib/neutral/qualifier-2AC2ICOB.mjs +88 -0
  66. package/dist/lib/neutral/qualifier-2AC2ICOB.mjs.map +7 -0
  67. package/dist/lib/neutral/query-B3NOYFCK.mjs +70 -0
  68. package/dist/lib/neutral/query-B3NOYFCK.mjs.map +7 -0
  69. package/dist/lib/neutral/query-U56GNEV6.mjs +32 -0
  70. package/dist/lib/neutral/query-U56GNEV6.mjs.map +7 -0
  71. package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs +16 -0
  72. package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs.map +7 -0
  73. package/dist/lib/neutral/relation-create-Z3NGW4VU.mjs +34 -0
  74. package/dist/lib/neutral/relation-create-Z3NGW4VU.mjs.map +7 -0
  75. package/dist/lib/neutral/relation-delete-LXY7W2YO.mjs +18 -0
  76. package/dist/lib/neutral/relation-delete-LXY7W2YO.mjs.map +7 -0
  77. package/dist/lib/neutral/save-GWAPLT3Z.mjs +23 -0
  78. package/dist/lib/neutral/save-GWAPLT3Z.mjs.map +7 -0
  79. package/dist/lib/neutral/schema-add-4TXJO2V7.mjs +24 -0
  80. package/dist/lib/neutral/schema-add-4TXJO2V7.mjs.map +7 -0
  81. package/dist/lib/neutral/schema-list-PJS5AFZ3.mjs +38 -0
  82. package/dist/lib/neutral/schema-list-PJS5AFZ3.mjs.map +7 -0
  83. package/dist/lib/neutral/sync-issues-LOLHZNFL.mjs +167 -0
  84. package/dist/lib/neutral/sync-issues-LOLHZNFL.mjs.map +7 -0
  85. package/dist/lib/neutral/sync-triggers-EYJM4QWR.mjs +136 -0
  86. package/dist/lib/neutral/sync-triggers-EYJM4QWR.mjs.map +7 -0
  87. package/dist/lib/neutral/tag-add-5NOHUTIE.mjs +19 -0
  88. package/dist/lib/neutral/tag-add-5NOHUTIE.mjs.map +7 -0
  89. package/dist/lib/neutral/tag-remove-QTKYDJAW.mjs +19 -0
  90. package/dist/lib/neutral/tag-remove-QTKYDJAW.mjs.map +7 -0
  91. package/dist/lib/neutral/testing/index.mjs +76 -0
  92. package/dist/lib/neutral/testing/index.mjs.map +7 -0
  93. package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs +16 -0
  94. package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs.map +7 -0
  95. package/dist/lib/neutral/update-tasks-ML2FCYU5.mjs +46 -0
  96. package/dist/lib/neutral/update-tasks-ML2FCYU5.mjs.map +7 -0
  97. package/dist/types/src/blueprints/automation/blueprint.d.ts +4 -0
  98. package/dist/types/src/blueprints/automation/blueprint.d.ts.map +1 -0
  99. package/dist/types/src/blueprints/automation/index.d.ts +2 -0
  100. package/dist/types/src/blueprints/automation/index.d.ts.map +1 -0
  101. package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts +4 -0
  102. package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts.map +1 -0
  103. package/dist/types/src/blueprints/blueprint-manager/blueprint.test.d.ts +2 -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 +59 -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 +35 -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 +26 -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 +4 -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 +4 -0
  118. package/dist/types/src/blueprints/browser/blueprint.d.ts.map +1 -0
  119. package/dist/types/src/blueprints/browser/blueprint.test.d.ts +2 -0
  120. package/dist/types/src/blueprints/browser/blueprint.test.d.ts.map +1 -0
  121. package/dist/types/src/blueprints/browser/index.d.ts +2 -0
  122. package/dist/types/src/blueprints/browser/index.d.ts.map +1 -0
  123. package/dist/types/src/blueprints/database/blueprint.d.ts +4 -0
  124. package/dist/types/src/blueprints/database/blueprint.d.ts.map +1 -0
  125. package/dist/types/src/blueprints/database/blueprint.test.d.ts +2 -0
  126. package/dist/types/src/blueprints/database/blueprint.test.d.ts.map +1 -0
  127. package/dist/types/src/blueprints/database/functions/context-add.d.ts +7 -0
  128. package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -0
  129. package/dist/types/src/blueprints/database/functions/context-remove.d.ts +7 -0
  130. package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -0
  131. package/dist/types/src/blueprints/database/functions/definitions.d.ts +59 -0
  132. package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -0
  133. package/dist/types/src/blueprints/database/functions/index.d.ts +4 -0
  134. package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -0
  135. package/dist/types/src/blueprints/database/functions/load.d.ts +7 -0
  136. package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -0
  137. package/dist/types/src/blueprints/database/functions/object-create.d.ts +8 -0
  138. package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +1 -0
  139. package/dist/types/src/blueprints/database/functions/object-delete.d.ts +7 -0
  140. package/dist/types/src/blueprints/database/functions/object-delete.d.ts.map +1 -0
  141. package/dist/types/src/blueprints/database/functions/object-update.d.ts +10 -0
  142. package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -0
  143. package/dist/types/src/blueprints/database/functions/query.d.ts +13 -0
  144. package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -0
  145. package/dist/types/src/blueprints/database/functions/relation-create.d.ts +10 -0
  146. package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +1 -0
  147. package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +7 -0
  148. package/dist/types/src/blueprints/database/functions/relation-delete.d.ts.map +1 -0
  149. package/dist/types/src/blueprints/database/functions/schema-add.d.ts +9 -0
  150. package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +1 -0
  151. package/dist/types/src/blueprints/database/functions/schema-list.d.ts +7 -0
  152. package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +1 -0
  153. package/dist/types/src/blueprints/database/functions/tag-add.d.ts +8 -0
  154. package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +1 -0
  155. package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +8 -0
  156. package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -0
  157. package/dist/types/src/blueprints/database/index.d.ts +3 -0
  158. package/dist/types/src/blueprints/database/index.d.ts.map +1 -0
  159. package/dist/types/src/blueprints/discord/blueprint.d.ts +4 -0
  160. package/dist/types/src/blueprints/discord/blueprint.d.ts.map +1 -0
  161. package/dist/types/src/blueprints/discord/functions/definitions.d.ts +15 -0
  162. package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -0
  163. package/dist/types/src/{functions/discord → blueprints/discord/functions}/fetch-messages.d.ts +3 -2
  164. package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -0
  165. package/dist/types/src/blueprints/discord/functions/fetch-messages.test.d.ts.map +1 -0
  166. package/dist/types/src/blueprints/discord/functions/index.d.ts +4 -0
  167. package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -0
  168. package/dist/types/src/blueprints/discord/index.d.ts +2 -2
  169. package/dist/types/src/blueprints/discord/index.d.ts.map +1 -1
  170. package/dist/types/src/blueprints/github/functions/definitions.d.ts +7 -0
  171. package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -0
  172. package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts +8 -0
  173. package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -0
  174. package/dist/types/src/blueprints/github/functions/index.d.ts +4 -0
  175. package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -0
  176. package/dist/types/src/blueprints/github/index.d.ts +2 -0
  177. package/dist/types/src/blueprints/github/index.d.ts.map +1 -0
  178. package/dist/types/src/blueprints/index.d.ts +11 -6
  179. package/dist/types/src/blueprints/index.d.ts.map +1 -1
  180. package/dist/types/src/blueprints/linear/blueprint.d.ts +4 -0
  181. package/dist/types/src/blueprints/linear/blueprint.d.ts.map +1 -0
  182. package/dist/types/src/blueprints/linear/functions/definitions.d.ts +6 -0
  183. package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -0
  184. package/dist/types/src/blueprints/linear/functions/index.d.ts +4 -0
  185. package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -0
  186. package/dist/types/src/blueprints/linear/functions/linear.test.d.ts.map +1 -0
  187. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts +10 -0
  188. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -0
  189. package/dist/types/src/blueprints/linear/index.d.ts +2 -2
  190. package/dist/types/src/blueprints/linear/index.d.ts.map +1 -1
  191. package/dist/types/src/blueprints/memory/blueprint.d.ts +4 -0
  192. package/dist/types/src/blueprints/memory/blueprint.d.ts.map +1 -0
  193. package/dist/types/src/blueprints/memory/blueprint.test.d.ts +2 -0
  194. package/dist/types/src/blueprints/memory/blueprint.test.d.ts.map +1 -0
  195. package/dist/types/src/blueprints/memory/functions/definitions.d.ts +17 -0
  196. package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +1 -0
  197. package/dist/types/src/blueprints/memory/functions/delete.d.ts +10 -0
  198. package/dist/types/src/blueprints/memory/functions/delete.d.ts.map +1 -0
  199. package/dist/types/src/blueprints/memory/functions/index.d.ts +4 -0
  200. package/dist/types/src/blueprints/memory/functions/index.d.ts.map +1 -0
  201. package/dist/types/src/blueprints/memory/functions/query.d.ts +8 -0
  202. package/dist/types/src/blueprints/memory/functions/query.d.ts.map +1 -0
  203. package/dist/types/src/blueprints/memory/functions/save.d.ts +8 -0
  204. package/dist/types/src/blueprints/memory/functions/save.d.ts.map +1 -0
  205. package/dist/types/src/blueprints/memory/index.d.ts +3 -0
  206. package/dist/types/src/blueprints/memory/index.d.ts.map +1 -0
  207. package/dist/types/src/blueprints/planning/blueprint.d.ts +4 -0
  208. package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -0
  209. package/dist/types/src/blueprints/planning/functions/definitions.d.ts +11 -0
  210. package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +1 -0
  211. package/dist/types/src/blueprints/planning/functions/index.d.ts +4 -0
  212. package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -0
  213. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +11 -0
  214. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -0
  215. package/dist/types/src/blueprints/planning/index.d.ts +2 -2
  216. package/dist/types/src/blueprints/planning/index.d.ts.map +1 -1
  217. package/dist/types/src/blueprints/project/blueprint.d.ts +4 -0
  218. package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -0
  219. package/dist/types/src/blueprints/project/blueprint.test.d.ts +2 -0
  220. package/dist/types/src/blueprints/project/blueprint.test.d.ts.map +1 -0
  221. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +8 -0
  222. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -0
  223. package/dist/types/src/blueprints/project/functions/agent.d.ts +4 -0
  224. package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -0
  225. package/dist/types/src/blueprints/project/functions/definitions.d.ts +158 -0
  226. package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -0
  227. package/dist/types/src/blueprints/project/functions/get-context.d.ts +15 -0
  228. package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -0
  229. package/dist/types/src/blueprints/project/functions/index.d.ts +4 -0
  230. package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -0
  231. package/dist/types/src/blueprints/project/functions/qualifier.d.ts +73 -0
  232. package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -0
  233. package/dist/types/src/blueprints/project/index.d.ts +3 -0
  234. package/dist/types/src/blueprints/project/index.d.ts.map +1 -0
  235. package/dist/types/src/blueprints/project-wizard/blueprint.d.ts +4 -0
  236. package/dist/types/src/blueprints/project-wizard/blueprint.d.ts.map +1 -0
  237. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +51 -0
  238. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +1 -0
  239. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +96 -0
  240. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -0
  241. package/dist/types/src/blueprints/project-wizard/functions/index.d.ts +4 -0
  242. package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +1 -0
  243. package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts +4 -0
  244. package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +1 -0
  245. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +48 -0
  246. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -0
  247. package/dist/types/src/blueprints/project-wizard/index.d.ts +3 -0
  248. package/dist/types/src/blueprints/project-wizard/index.d.ts.map +1 -0
  249. package/dist/types/src/blueprints/testing.d.ts +9 -5
  250. package/dist/types/src/blueprints/testing.d.ts.map +1 -1
  251. package/dist/types/src/blueprints/websearch/blueprint.d.ts +4 -0
  252. package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -0
  253. package/dist/types/src/blueprints/websearch/blueprint.test.d.ts +2 -0
  254. package/dist/types/src/blueprints/websearch/blueprint.test.d.ts.map +1 -0
  255. package/dist/types/src/blueprints/websearch/functions/definitions.d.ts +5 -0
  256. package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -0
  257. package/dist/types/src/blueprints/websearch/functions/fetch.d.ts +6 -0
  258. package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +1 -0
  259. package/dist/types/src/blueprints/websearch/functions/index.d.ts +4 -0
  260. package/dist/types/src/blueprints/websearch/functions/index.d.ts.map +1 -0
  261. package/dist/types/src/blueprints/websearch/index.d.ts +3 -3
  262. package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
  263. package/dist/types/src/blueprints/websearch/{websearch-toolkit.d.ts → toolkit.d.ts} +3 -1
  264. package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -0
  265. package/dist/types/src/crud/graph.d.ts +7 -7
  266. package/dist/types/src/crud/graph.d.ts.map +1 -1
  267. package/dist/types/src/errors.d.ts +41 -0
  268. package/dist/types/src/errors.d.ts.map +1 -0
  269. package/dist/types/src/functions/agent/definitions.d.ts +60 -0
  270. package/dist/types/src/functions/agent/definitions.d.ts.map +1 -0
  271. package/dist/types/src/functions/agent/index.d.ts +3 -4
  272. package/dist/types/src/functions/agent/index.d.ts.map +1 -1
  273. package/dist/types/src/functions/agent/prompt.d.ts +2 -74
  274. package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
  275. package/dist/types/src/functions/agent/prompt.test.d.ts +2 -0
  276. package/dist/types/src/functions/agent/prompt.test.d.ts.map +1 -0
  277. package/dist/types/src/functions/index.d.ts +0 -6
  278. package/dist/types/src/functions/index.d.ts.map +1 -1
  279. package/dist/types/src/index.d.ts +2 -1
  280. package/dist/types/src/index.d.ts.map +1 -1
  281. package/dist/types/src/sync/sync.d.ts.map +1 -1
  282. package/dist/types/src/testing/index.d.ts +1 -0
  283. package/dist/types/src/testing/index.d.ts.map +1 -1
  284. package/dist/types/src/testing/plugins.d.ts.map +1 -1
  285. package/dist/types/src/toolkits/WebToolkit.d.ts +38 -0
  286. package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -0
  287. package/dist/types/src/toolkits/index.d.ts +1 -2
  288. package/dist/types/src/toolkits/index.d.ts.map +1 -1
  289. package/dist/types/src/types/Agent.d.ts +77 -0
  290. package/dist/types/src/types/Agent.d.ts.map +1 -0
  291. package/dist/types/src/types/Chat.d.ts +56 -0
  292. package/dist/types/src/types/Chat.d.ts.map +1 -0
  293. package/dist/types/src/types/McpServer.d.ts +18 -0
  294. package/dist/types/src/types/McpServer.d.ts.map +1 -0
  295. package/dist/types/src/types/Memory.d.ts +12 -0
  296. package/dist/types/src/types/Memory.d.ts.map +1 -0
  297. package/dist/types/src/types/Plan.d.ts +89 -0
  298. package/dist/types/src/types/Plan.d.ts.map +1 -0
  299. package/dist/types/src/types/index.d.ts +6 -0
  300. package/dist/types/src/types/index.d.ts.map +1 -0
  301. package/dist/types/src/util/graphql.d.ts.map +1 -1
  302. package/dist/types/tsconfig.tsbuildinfo +1 -1
  303. package/package.json +34 -43
  304. package/src/blueprints/automation/blueprint.ts +105 -0
  305. package/src/blueprints/automation/index.ts +5 -0
  306. package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -0
  307. package/src/blueprints/blueprint-manager/blueprint.test.ts +198 -0
  308. package/src/blueprints/blueprint-manager/blueprint.ts +49 -0
  309. package/src/blueprints/blueprint-manager/functions/definitions.ts +57 -0
  310. package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +43 -0
  311. package/src/blueprints/blueprint-manager/functions/index.ts +13 -0
  312. package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +18 -0
  313. package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +18 -0
  314. package/src/blueprints/blueprint-manager/index.ts +6 -0
  315. package/src/blueprints/browser/blueprint.test.ts +61 -0
  316. package/src/blueprints/browser/blueprint.ts +40 -0
  317. package/src/blueprints/browser/index.ts +5 -0
  318. package/src/blueprints/database/blueprint.conversations.json +1 -0
  319. package/src/blueprints/database/blueprint.test.ts +531 -0
  320. package/src/blueprints/database/blueprint.ts +66 -0
  321. package/src/blueprints/database/functions/context-add.ts +24 -0
  322. package/src/blueprints/database/functions/context-remove.ts +24 -0
  323. package/src/blueprints/database/functions/definitions.ts +318 -0
  324. package/src/blueprints/database/functions/index.ts +23 -0
  325. package/src/blueprints/database/functions/load.ts +19 -0
  326. package/src/blueprints/database/functions/object-create.ts +38 -0
  327. package/src/blueprints/database/functions/object-delete.ts +20 -0
  328. package/src/blueprints/database/functions/object-update.ts +30 -0
  329. package/src/blueprints/database/functions/query.ts +64 -0
  330. package/src/blueprints/database/functions/relation-create.ts +34 -0
  331. package/src/blueprints/database/functions/relation-delete.ts +21 -0
  332. package/src/blueprints/database/functions/schema-add.ts +28 -0
  333. package/src/blueprints/database/functions/schema-list.ts +33 -0
  334. package/src/blueprints/database/functions/tag-add.ts +21 -0
  335. package/src/blueprints/database/functions/tag-remove.ts +21 -0
  336. package/src/blueprints/database/index.ts +21 -0
  337. package/src/blueprints/discord/blueprint.ts +41 -0
  338. package/src/blueprints/discord/functions/definitions.ts +70 -0
  339. package/src/blueprints/discord/functions/fetch-messages.test.ts +45 -0
  340. package/src/blueprints/discord/functions/fetch-messages.ts +198 -0
  341. package/src/blueprints/discord/functions/index.ts +9 -0
  342. package/src/blueprints/discord/index.ts +2 -3
  343. package/src/blueprints/github/functions/definitions.ts +26 -0
  344. package/src/blueprints/github/functions/fetch-prs.ts +24 -0
  345. package/src/blueprints/github/functions/index.ts +9 -0
  346. package/src/blueprints/github/index.ts +5 -0
  347. package/src/blueprints/index.ts +11 -6
  348. package/src/blueprints/linear/blueprint.ts +42 -0
  349. package/src/blueprints/linear/functions/definitions.ts +23 -0
  350. package/src/blueprints/linear/functions/index.ts +9 -0
  351. package/src/blueprints/linear/functions/linear.test.ts +58 -0
  352. package/src/{functions/linear → blueprints/linear/functions}/sync-issues.ts +37 -45
  353. package/src/blueprints/linear/index.ts +2 -3
  354. package/src/blueprints/memory/blueprint.conversations.json +1 -0
  355. package/src/blueprints/memory/blueprint.test.ts +139 -0
  356. package/src/blueprints/memory/blueprint.ts +41 -0
  357. package/src/blueprints/memory/functions/definitions.ts +68 -0
  358. package/src/blueprints/memory/functions/delete.ts +20 -0
  359. package/src/blueprints/memory/functions/index.ts +13 -0
  360. package/src/blueprints/memory/functions/query.ts +32 -0
  361. package/src/blueprints/memory/functions/save.ts +20 -0
  362. package/src/blueprints/memory/index.ts +6 -0
  363. package/src/blueprints/planning/blueprint.ts +24 -0
  364. package/src/blueprints/planning/functions/definitions.ts +137 -0
  365. package/src/blueprints/planning/functions/index.ts +9 -0
  366. package/src/blueprints/planning/functions/update-tasks.ts +45 -0
  367. package/src/blueprints/planning/index.ts +3 -4
  368. package/src/blueprints/project/blueprint.conversations.json +1 -0
  369. package/src/{initiative/initiative.test.ts → blueprints/project/blueprint.test.ts} +279 -50
  370. package/src/blueprints/project/blueprint.ts +64 -0
  371. package/src/blueprints/project/functions/add-artifact.ts +30 -0
  372. package/src/blueprints/project/functions/agent.ts +69 -0
  373. package/src/blueprints/project/functions/definitions.ts +92 -0
  374. package/src/blueprints/project/functions/get-context.ts +46 -0
  375. package/src/blueprints/project/functions/index.ts +14 -0
  376. package/src/blueprints/project/functions/qualifier.ts +90 -0
  377. package/src/blueprints/project/index.ts +6 -0
  378. package/src/blueprints/project-wizard/blueprint.ts +52 -0
  379. package/src/blueprints/project-wizard/functions/create-project.ts +32 -0
  380. package/src/blueprints/project-wizard/functions/definitions.ts +63 -0
  381. package/src/blueprints/project-wizard/functions/index.ts +13 -0
  382. package/src/blueprints/project-wizard/functions/project-rules.ts +77 -0
  383. package/src/blueprints/project-wizard/functions/sync-triggers.ts +158 -0
  384. package/src/blueprints/project-wizard/index.ts +6 -0
  385. package/src/blueprints/testing.ts +23 -8
  386. package/src/blueprints/websearch/blueprint.conversations.json +1 -0
  387. package/src/blueprints/websearch/blueprint.test.ts +39 -0
  388. package/src/blueprints/websearch/blueprint.ts +30 -0
  389. package/src/blueprints/websearch/functions/definitions.ts +25 -0
  390. package/src/blueprints/websearch/functions/fetch.ts +18 -0
  391. package/src/blueprints/websearch/functions/index.ts +9 -0
  392. package/src/blueprints/websearch/index.ts +3 -5
  393. package/src/blueprints/websearch/{websearch-toolkit.ts → toolkit.ts} +6 -1
  394. package/src/crud/graph.test.ts +12 -14
  395. package/src/crud/graph.ts +11 -11
  396. package/src/errors.ts +25 -0
  397. package/src/functions/READ_THIS.md +5 -0
  398. package/src/functions/agent/definitions.ts +51 -0
  399. package/src/functions/agent/index.ts +3 -5
  400. package/src/functions/agent/prompt.conversations.json +1 -0
  401. package/src/functions/agent/prompt.test.ts +81 -0
  402. package/src/functions/agent/prompt.ts +209 -106
  403. package/src/functions/index.ts +0 -6
  404. package/src/index.ts +2 -1
  405. package/src/sync/sync.ts +25 -14
  406. package/src/testing/index.ts +1 -0
  407. package/src/testing/plugins.tsx +30 -19
  408. package/src/toolkits/WebToolkit.ts +33 -0
  409. package/src/toolkits/index.ts +1 -2
  410. package/src/types/Agent.ts +239 -0
  411. package/src/types/Chat.ts +63 -0
  412. package/src/types/McpServer.ts +37 -0
  413. package/src/types/Memory.ts +24 -0
  414. package/src/types/Plan.ts +110 -0
  415. package/src/types/index.ts +9 -0
  416. package/dist/lib/browser/index.mjs +0 -2880
  417. package/dist/lib/browser/index.mjs.map +0 -7
  418. package/dist/lib/browser/meta.json +0 -1
  419. package/dist/lib/browser/testing/index.mjs +0 -43
  420. package/dist/lib/browser/testing/index.mjs.map +0 -7
  421. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  422. package/dist/lib/node-esm/index.mjs +0 -2881
  423. package/dist/lib/node-esm/index.mjs.map +0 -7
  424. package/dist/lib/node-esm/meta.json +0 -1
  425. package/dist/lib/node-esm/testing/index.mjs +0 -44
  426. package/dist/lib/node-esm/testing/index.mjs.map +0 -7
  427. package/dist/types/src/blueprints/design/design-blueprint.d.ts +0 -18
  428. package/dist/types/src/blueprints/design/design-blueprint.d.ts.map +0 -1
  429. package/dist/types/src/blueprints/design/design-blueprint.test.d.ts +0 -2
  430. package/dist/types/src/blueprints/design/design-blueprint.test.d.ts.map +0 -1
  431. package/dist/types/src/blueprints/design/index.d.ts +0 -3
  432. package/dist/types/src/blueprints/design/index.d.ts.map +0 -1
  433. package/dist/types/src/blueprints/discord/discord-blueprint.d.ts +0 -18
  434. package/dist/types/src/blueprints/discord/discord-blueprint.d.ts.map +0 -1
  435. package/dist/types/src/blueprints/linear/linear-blueprint.d.ts +0 -18
  436. package/dist/types/src/blueprints/linear/linear-blueprint.d.ts.map +0 -1
  437. package/dist/types/src/blueprints/planning/planning-blueprint.d.ts +0 -18
  438. package/dist/types/src/blueprints/planning/planning-blueprint.d.ts.map +0 -1
  439. package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts +0 -2
  440. package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts.map +0 -1
  441. package/dist/types/src/blueprints/research/index.d.ts +0 -3
  442. package/dist/types/src/blueprints/research/index.d.ts.map +0 -1
  443. package/dist/types/src/blueprints/research/research-blueprint.d.ts +0 -18
  444. package/dist/types/src/blueprints/research/research-blueprint.d.ts.map +0 -1
  445. package/dist/types/src/blueprints/research/research-blueprint.test.d.ts +0 -2
  446. package/dist/types/src/blueprints/research/research-blueprint.test.d.ts.map +0 -1
  447. package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts +0 -18
  448. package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts.map +0 -1
  449. package/dist/types/src/blueprints/websearch/websearch-toolkit.d.ts.map +0 -1
  450. package/dist/types/src/experimental/feed.test.d.ts +0 -2
  451. package/dist/types/src/experimental/feed.test.d.ts.map +0 -1
  452. package/dist/types/src/functions/discord/fetch-messages.d.ts.map +0 -1
  453. package/dist/types/src/functions/discord/fetch-messages.test.d.ts.map +0 -1
  454. package/dist/types/src/functions/discord/index.d.ts +0 -12
  455. package/dist/types/src/functions/discord/index.d.ts.map +0 -1
  456. package/dist/types/src/functions/document/index.d.ts +0 -13
  457. package/dist/types/src/functions/document/index.d.ts.map +0 -1
  458. package/dist/types/src/functions/document/read.d.ts +0 -7
  459. package/dist/types/src/functions/document/read.d.ts.map +0 -1
  460. package/dist/types/src/functions/document/update.d.ts +0 -6
  461. package/dist/types/src/functions/document/update.d.ts.map +0 -1
  462. package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +0 -174
  463. package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +0 -1
  464. package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts +0 -2
  465. package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts.map +0 -1
  466. package/dist/types/src/functions/entity-extraction/index.d.ts +0 -175
  467. package/dist/types/src/functions/entity-extraction/index.d.ts.map +0 -1
  468. package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts +0 -38
  469. package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts.map +0 -1
  470. package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts +0 -37
  471. package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts.map +0 -1
  472. package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts +0 -58
  473. package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts.map +0 -1
  474. package/dist/types/src/functions/exa/data/index.d.ts +0 -3
  475. package/dist/types/src/functions/exa/data/index.d.ts.map +0 -1
  476. package/dist/types/src/functions/exa/exa.d.ts +0 -5
  477. package/dist/types/src/functions/exa/exa.d.ts.map +0 -1
  478. package/dist/types/src/functions/exa/index.d.ts +0 -3
  479. package/dist/types/src/functions/exa/index.d.ts.map +0 -1
  480. package/dist/types/src/functions/exa/mock.d.ts +0 -5
  481. package/dist/types/src/functions/exa/mock.d.ts.map +0 -1
  482. package/dist/types/src/functions/github/fetch-prs.d.ts +0 -6
  483. package/dist/types/src/functions/github/fetch-prs.d.ts.map +0 -1
  484. package/dist/types/src/functions/linear/index.d.ts +0 -9
  485. package/dist/types/src/functions/linear/index.d.ts.map +0 -1
  486. package/dist/types/src/functions/linear/linear.test.d.ts.map +0 -1
  487. package/dist/types/src/functions/linear/sync-issues.d.ts +0 -12
  488. package/dist/types/src/functions/linear/sync-issues.d.ts.map +0 -1
  489. package/dist/types/src/functions/research/document-create.d.ts +0 -9
  490. package/dist/types/src/functions/research/document-create.d.ts.map +0 -1
  491. package/dist/types/src/functions/research/index.d.ts +0 -21
  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 -19
  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 -14
  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 -6
  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/initiative/Initiative.d.ts +0 -84
  512. package/dist/types/src/initiative/Initiative.d.ts.map +0 -1
  513. package/dist/types/src/initiative/InitiativeSchema.d.ts +0 -19
  514. package/dist/types/src/initiative/InitiativeSchema.d.ts.map +0 -1
  515. package/dist/types/src/initiative/functions/agent.d.ts +0 -37
  516. package/dist/types/src/initiative/functions/agent.d.ts.map +0 -1
  517. package/dist/types/src/initiative/functions/getContext.d.ts +0 -17
  518. package/dist/types/src/initiative/functions/getContext.d.ts.map +0 -1
  519. package/dist/types/src/initiative/functions/index.d.ts +0 -4
  520. package/dist/types/src/initiative/functions/index.d.ts.map +0 -1
  521. package/dist/types/src/initiative/functions/update.d.ts +0 -7
  522. package/dist/types/src/initiative/functions/update.d.ts.map +0 -1
  523. package/dist/types/src/initiative/index.d.ts +0 -1
  524. package/dist/types/src/initiative/index.d.ts.map +0 -1
  525. package/dist/types/src/initiative/initiative.test.d.ts +0 -2
  526. package/dist/types/src/initiative/initiative.test.d.ts.map +0 -1
  527. package/dist/types/src/toolkits/AssistantToolkit.d.ts +0 -43
  528. package/dist/types/src/toolkits/AssistantToolkit.d.ts.map +0 -1
  529. package/dist/types/src/toolkits/AssistantToolkit.test.d.ts +0 -2
  530. package/dist/types/src/toolkits/AssistantToolkit.test.d.ts.map +0 -1
  531. package/dist/types/src/toolkits/SystemToolkit.d.ts +0 -99
  532. package/dist/types/src/toolkits/SystemToolkit.d.ts.map +0 -1
  533. package/src/blueprints/design/design-blueprint.test.ts +0 -105
  534. package/src/blueprints/design/design-blueprint.ts +0 -31
  535. package/src/blueprints/design/index.ts +0 -7
  536. package/src/blueprints/discord/discord-blueprint.ts +0 -32
  537. package/src/blueprints/linear/linear-blueprint.ts +0 -33
  538. package/src/blueprints/planning/planning-blueprint.test.ts +0 -126
  539. package/src/blueprints/planning/planning-blueprint.ts +0 -96
  540. package/src/blueprints/research/index.ts +0 -7
  541. package/src/blueprints/research/research-blueprint.test.ts +0 -7
  542. package/src/blueprints/research/research-blueprint.ts +0 -51
  543. package/src/blueprints/websearch/websearch-blueprint.ts +0 -18
  544. package/src/experimental/feed.test.ts +0 -111
  545. package/src/functions/discord/fetch-messages.test.ts +0 -58
  546. package/src/functions/discord/fetch-messages.ts +0 -252
  547. package/src/functions/discord/index.ts +0 -9
  548. package/src/functions/document/index.ts +0 -12
  549. package/src/functions/document/read.ts +0 -30
  550. package/src/functions/document/update.ts +0 -33
  551. package/src/functions/entity-extraction/entity-extraction.conversations.json +0 -6597
  552. package/src/functions/entity-extraction/entity-extraction.test.ts +0 -93
  553. package/src/functions/entity-extraction/entity-extraction.ts +0 -183
  554. package/src/functions/entity-extraction/index.ts +0 -9
  555. package/src/functions/exa/data/exa-search-1748337321991.ts +0 -131
  556. package/src/functions/exa/data/exa-search-1748337331526.ts +0 -144
  557. package/src/functions/exa/data/exa-search-1748337344119.ts +0 -133
  558. package/src/functions/exa/data/index.ts +0 -11
  559. package/src/functions/exa/exa.ts +0 -37
  560. package/src/functions/exa/index.ts +0 -6
  561. package/src/functions/exa/mock.ts +0 -71
  562. package/src/functions/github/fetch-prs.ts +0 -31
  563. package/src/functions/linear/index.ts +0 -9
  564. package/src/functions/linear/linear.test.ts +0 -84
  565. package/src/functions/research/document-create.ts +0 -76
  566. package/src/functions/research/index.ts +0 -14
  567. package/src/functions/research/research-graph.ts +0 -49
  568. package/src/functions/research/research-instructions.tpl +0 -106
  569. package/src/functions/research/research.conversations.json +0 -1
  570. package/src/functions/research/research.test.ts +0 -171
  571. package/src/functions/research/research.ts +0 -189
  572. package/src/functions/research/types.ts +0 -26
  573. package/src/functions/tasks/index.ts +0 -11
  574. package/src/functions/tasks/read.ts +0 -35
  575. package/src/functions/tasks/task-list.test.ts +0 -99
  576. package/src/functions/tasks/task-list.ts +0 -165
  577. package/src/functions/tasks/update.ts +0 -53
  578. package/src/initiative/Initiative.ts +0 -99
  579. package/src/initiative/InitiativeSchema.ts +0 -37
  580. package/src/initiative/functions/agent.ts +0 -57
  581. package/src/initiative/functions/getContext.ts +0 -74
  582. package/src/initiative/functions/index.ts +0 -7
  583. package/src/initiative/functions/update.ts +0 -63
  584. package/src/initiative/index.ts +0 -3
  585. package/src/initiative/initiative.conversations.json +0 -1
  586. package/src/toolkits/AssistantToolkit.conversations.json +0 -1
  587. package/src/toolkits/AssistantToolkit.test.ts +0 -94
  588. package/src/toolkits/AssistantToolkit.ts +0 -70
  589. package/src/toolkits/SystemToolkit.ts +0 -299
  590. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  591. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
  592. /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/project-2YBPW5N7.mjs.map} +0 -0
  593. /package/dist/types/src/{functions/discord → blueprints/discord/functions}/fetch-messages.test.d.ts +0 -0
  594. /package/dist/types/src/{functions/linear → blueprints/linear/functions}/linear.test.d.ts +0 -0
@@ -2,117 +2,220 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import * as Tool from '@effect/ai/Tool';
6
+ import * as Toolkit from '@effect/ai/Toolkit';
5
7
  import * as Array from 'effect/Array';
8
+ import * as Deferred from 'effect/Deferred';
6
9
  import * as Effect from 'effect/Effect';
7
10
  import * as Function from 'effect/Function';
8
- import * as Match from 'effect/Match';
11
+ import * as Layer from 'effect/Layer';
9
12
  import * as Option from 'effect/Option';
10
13
  import * as Schema from 'effect/Schema';
11
14
 
12
- import { AiService, ConsolePrinter, ModelName } from '@dxos/ai';
13
- import { AiSession, GenerationObserver, createToolkit } from '@dxos/assistant';
14
- import { Prompt, Template } from '@dxos/blueprints';
15
- import { Obj, Ref, Type } from '@dxos/echo';
16
- import { Database } from '@dxos/echo';
17
- import { TracingService, defineFunction } from '@dxos/functions';
15
+ import { AiService, OpaqueToolkit, ModelName } from '@dxos/ai';
16
+ import {
17
+ AiSession,
18
+ getOperationFromTool,
19
+ makeToolExecutionService,
20
+ makeToolResolverFromOperations,
21
+ } from '@dxos/assistant';
22
+ import { Template, Trace, Operation } from '@dxos/compute';
23
+ import { Database, Feed, Obj, Ref } from '@dxos/echo';
24
+ import { acquireReleaseResource } from '@dxos/effect';
25
+ import { invariant } from '@dxos/invariant';
18
26
  import { log } from '@dxos/log';
27
+ import { trim } from '@dxos/util';
19
28
 
20
- const DEFAULT_MODEL: ModelName = '@anthropic/claude-opus-4-0';
21
-
22
- export default defineFunction({
23
- key: 'dxos.org/function/prompt',
24
- name: 'Agent',
25
- description: 'Agentic worker that executes a provided prompt using blueprints and tools.',
26
- inputSchema: Schema.Struct({
27
- prompt: Type.Ref(Prompt.Prompt),
28
- systemPrompt: Type.Ref(Prompt.Prompt).pipe(Schema.optional),
29
- /**
30
- * @default @anthropic/claude-opus-4-0
31
- */
32
- model: Schema.optional(ModelName),
33
- /**
34
- * Input object or data.
35
- * References get auto-resolved.
36
- */
37
- input: Schema.Any.pipe(Schema.annotations({ title: 'Input' })),
38
- }),
39
- outputSchema: Schema.Any,
40
- handler: Effect.fnUntraced(function* ({ data }) {
41
- log.info('processing input', { input: data.input });
42
-
43
- // TODO(wittjosiah): Support templated object as input.
44
- // Currently the object templating only supports direct pass-through or strings.
45
- // const input = { ...data.input };
46
- // for (const key of Object.keys(data.input)) {
47
- // const value = data.input[key];
48
- // if (Ref.isRef(value)) {
49
- // const object = yield* Database.Service.load(value);
50
- // input[key] = Obj.toJSON(object);
51
- // } else {
52
- // input[key] = JSON.stringify(value);
53
- // }
54
- // }
55
- const input = yield* Match.value(data.input).pipe(
56
- Match.when(
57
- (value: any) => Ref.isRef(value),
58
- Effect.fnUntraced(function* (ref) {
59
- const object = yield* Database.Service.load(ref);
60
- return Obj.toJSON(object as Obj.Unknown);
61
- }),
62
- ),
63
- Match.orElse(() => Effect.succeed(data.input)),
64
- );
65
-
66
- yield* Database.Service.flush({ indexes: true });
67
- const prompt = yield* Database.Service.load(data.prompt);
68
- const systemPrompt = data.systemPrompt ? yield* Database.Service.load(data.systemPrompt) : undefined;
69
- yield* TracingService.emitStatus({ message: `Running ${prompt.id}` });
70
-
71
- log.info('starting agent', { prompt: prompt.id, input });
72
-
73
- const blueprints = yield* Function.pipe(
74
- prompt.blueprints,
75
- Array.appendAll(systemPrompt?.blueprints ?? []),
76
- Effect.forEach(Database.Service.loadOption),
77
- Effect.map(Array.filter(Option.isSome)),
78
- Effect.map(Array.map((option) => option.value)),
79
- );
80
- const toolkit = yield* createToolkit({ blueprints });
81
-
82
- const objects = yield* Function.pipe(
83
- prompt.context,
84
- Array.appendAll(systemPrompt?.context ?? []),
85
- Effect.forEach(Database.Service.loadOption),
86
- Effect.map(Array.filter(Option.isSome)),
87
- Effect.map(Array.map((option) => option.value)),
88
- );
89
-
90
- const promptInstructions = yield* Database.Service.load(prompt.instructions.source);
91
- const promptText = Template.process(promptInstructions.content, input);
92
-
93
- const systemInstructions = systemPrompt
94
- ? yield* Database.Service.load(systemPrompt.instructions.source)
95
- : undefined;
96
- const systemText = systemInstructions ? Template.process(systemInstructions.content, {}) : undefined;
97
-
98
- const session = new AiSession();
99
- const result = yield* session
100
- .run({
101
- prompt: promptText,
102
- system: systemText,
103
- blueprints,
104
- objects: objects as Obj.Unknown[],
105
- toolkit,
106
- observer: GenerationObserver.fromPrinter(new ConsolePrinter({ tag: 'agent' })),
107
- })
108
- .pipe(Effect.provide(AiService.model(data.model ?? DEFAULT_MODEL)));
109
- const lastBlock = result
110
- .at(-1)
111
- ?.blocks.filter((block) => block._tag === 'text')
112
- .at(-1);
113
-
114
- return {
115
- note: lastBlock?.text,
116
- };
117
- }),
118
- });
29
+ import { PromptError } from '../../errors';
30
+ import * as Chat from '../../types/Chat';
31
+ import { AgentPrompt } from './definitions';
32
+
33
+ const DEFAULT_MODEL: ModelName = '@anthropic/claude-opus-4-6';
34
+
35
+ export default AgentPrompt.pipe(
36
+ Operation.withHandler(
37
+ Effect.fnUntraced(
38
+ function* (data) {
39
+ log.info('processing input', { input: data.input });
40
+
41
+ const input = yield* Ref.isRef(data.input)
42
+ ? Database.load(data.input).pipe(Effect.map(Obj.toJSON))
43
+ : Effect.succeed(data.input);
44
+
45
+ yield* Database.flush();
46
+ const prompt = yield* Database.load(data.prompt);
47
+ yield* Trace.emitStatus(`Running ${prompt.id}`);
48
+
49
+ log.info('starting agent', { prompt: prompt.id, input });
50
+
51
+ const blueprints = yield* Function.pipe(
52
+ prompt.blueprints,
53
+ Effect.forEach(Database.loadOption),
54
+ Effect.map(Array.filter(Option.isSome)),
55
+ Effect.map(Array.map((option) => option.value)),
56
+ );
57
+
58
+ const objects = yield* Function.pipe(
59
+ prompt.context,
60
+ Effect.forEach(Database.loadOption),
61
+ Effect.map(Array.filter(Option.isSome)),
62
+ Effect.map(Array.map((option) => option.value)),
63
+ );
64
+
65
+ const promptInstructions = yield* Database.load(prompt.instructions.source);
66
+ let promptText = Template.process(promptInstructions.content, input);
67
+
68
+ if (input !== undefined) {
69
+ promptText += `\n<input>${JSON.stringify(input)}</input>`;
70
+ }
71
+
72
+ let systemText = trim`
73
+ You are an agent running in the non-interactive mode.
74
+ The user is unable to see what you are doing, and cannot answer any questions.
75
+ Do not ask questions.
76
+ Complete the task before you, and at the end call [completeJob] with the output.
77
+ If you are unable to complete the task, call [completeJob] with the failure reason.
78
+ If no output is required, call [completeJob] with an empty object: {}
79
+ Do not stop until you call [completeJob].
80
+ `;
81
+ if (data.systemInstructions) {
82
+ systemText += `\n\n${data.systemInstructions}`;
83
+ }
84
+
85
+ const modelLayer = AiService.model(data.model ?? DEFAULT_MODEL);
86
+
87
+ let feed: Feed.Feed;
88
+ if (data.chat) {
89
+ const chat = yield* Database.load(data.chat);
90
+ invariant(Obj.instanceOf(Chat.Chat, chat), 'Expected Chat object.');
91
+ feed = yield* Database.load(chat.feed);
92
+ } else {
93
+ feed = yield* Database.add(Feed.make());
94
+ }
95
+
96
+ const resultSink = yield* Deferred.make<unknown, PromptError>();
97
+ const promptToolkit = makePromptAgentToolkit({
98
+ output: Schema.Any, // TODO(dmaretskyi): Use prompt's output schema.
99
+ resultSink,
100
+ });
101
+
102
+ const runtime = yield* Effect.runtime<Feed.FeedService>();
103
+ const session = yield* acquireReleaseResource(() => new AiSession({ feed, runtime }));
104
+
105
+ yield* Effect.promise(() =>
106
+ session.context.bind({
107
+ blueprints: blueprints.map((blueprint) => Ref.make(blueprint)),
108
+ objects: objects.map((object) => Ref.make(object as Obj.Unknown)),
109
+ }),
110
+ );
111
+
112
+ yield* session
113
+ .createRequest({
114
+ prompt: promptText,
115
+ system: systemText,
116
+ toolkit: promptToolkit,
117
+ })
118
+ .pipe(
119
+ Effect.provide(
120
+ Layer.mergeAll(modelLayer, ToolExecutionService({ feed }), makeToolResolverFromOperations()),
121
+ ),
122
+ );
123
+
124
+ return yield* Deferred.poll(resultSink).pipe(
125
+ Effect.flatten,
126
+ Effect.flatten,
127
+ Effect.catchTag('NoSuchElementException', () =>
128
+ Effect.gen(function* () {
129
+ yield* session
130
+ .createRequest({
131
+ prompt: 'You must signal task completion by calling [completeJob] with the output or failure reason.',
132
+ system: systemText,
133
+ toolkit: promptToolkit,
134
+ })
135
+ .pipe(
136
+ Effect.provide(
137
+ Layer.mergeAll(modelLayer, ToolExecutionService({ feed }), makeToolResolverFromOperations()),
138
+ ),
139
+ );
140
+
141
+ return yield* Deferred.poll(resultSink).pipe(
142
+ Effect.flatten,
143
+ Effect.flatten,
144
+ Effect.catchTag('NoSuchElementException', () =>
145
+ Effect.fail(new PromptError('Agent did not signal task completion.', {})),
146
+ ),
147
+ );
148
+ }),
149
+ ),
150
+ );
151
+ },
152
+ Effect.scoped,
153
+ Effect.provide(Trace.writerLayerNoop),
154
+ ),
155
+ ),
156
+ Operation.opaqueHandler,
157
+ );
158
+
159
+ const makePromptAgentToolkit = (options: {
160
+ output: Schema.Schema.Any;
161
+ resultSink: Deferred.Deferred<unknown, PromptError>;
162
+ }) => {
163
+ class PromptAgentToolkit extends Toolkit.make(
164
+ Tool.make('completeJob', {
165
+ parameters: {
166
+ success: Schema.optional(Schema.Any), // TODO(dmaretskyi): Pipe output schema here.
167
+ failure: Schema.optional(
168
+ Schema.Struct({
169
+ message: Schema.String.annotations({
170
+ description: 'Short message describing the error.',
171
+ }),
172
+ description: Schema.optional(Schema.String).annotations({
173
+ description: 'Optional longer message describing in detail what went wrong',
174
+ }),
175
+ }),
176
+ ),
177
+ },
178
+ }),
179
+ ) {}
180
+ const layer = PromptAgentToolkit.toLayer({
181
+ completeJob: Effect.fnUntraced(function* (result) {
182
+ if (result.failure) {
183
+ yield* Deferred.fail(
184
+ options.resultSink,
185
+ new PromptError(result.failure.message, {
186
+ description: result.failure.description,
187
+ }),
188
+ );
189
+ } else {
190
+ yield* Deferred.succeed(options.resultSink, result.success);
191
+ }
192
+ }),
193
+ });
194
+
195
+ return OpaqueToolkit.make(PromptAgentToolkit, layer);
196
+ };
197
+
198
+ interface ToolExecutionServiceOptions {
199
+ feed: Feed.Feed;
200
+ }
201
+
202
+ const ToolExecutionService = ({ feed }: ToolExecutionServiceOptions) =>
203
+ Layer.unwrapEffect(
204
+ Effect.gen(function* () {
205
+ const operationInvoker = yield* Operation.Service;
206
+ return makeToolExecutionService({
207
+ invoke: (tool, input) =>
208
+ Effect.gen(function* () {
209
+ const operationDef = getOperationFromTool(tool).pipe(Option.getOrThrow);
210
+ log('invoking operation', { operationDef, input });
211
+ const result = yield* operationInvoker
212
+ .invoke(operationDef, input, {
213
+ conversation: Obj.getDXN(feed).toString(),
214
+ })
215
+ .pipe(Effect.orDie);
216
+ log('result', { result });
217
+ return result;
218
+ }),
219
+ });
220
+ }),
221
+ );
@@ -3,9 +3,3 @@
3
3
  //
4
4
 
5
5
  export * from './agent';
6
- export * from './discord';
7
- export * from './document';
8
- export * from './entity-extraction';
9
- export * from './linear';
10
- export * from './research';
11
- export * from './tasks';
package/src/index.ts CHANGED
@@ -3,7 +3,8 @@
3
3
  //
4
4
 
5
5
  export * from './blueprints';
6
+ export * from './crud';
6
7
  export * from './functions';
7
8
  export * from './sync';
8
- export * from './crud';
9
9
  export * from './toolkits';
10
+ export * from './types';
package/src/sync/sync.ts CHANGED
@@ -29,10 +29,16 @@ export const syncObjects: (
29
29
  Effect.fnUntraced(function* (obj) {
30
30
  // Sync referenced objects.
31
31
  for (const key of Object.keys(obj)) {
32
- if (typeof key !== 'string' || key === 'id') continue;
33
- if (!Ref.isRef((obj as any)[key])) continue;
32
+ if (typeof key !== 'string' || key === 'id') {
33
+ continue;
34
+ }
35
+ if (!Ref.isRef((obj as any)[key])) {
36
+ continue;
37
+ }
34
38
  const ref: Ref.Unknown = (obj as any)[key];
35
- if (!ref.target) continue;
39
+ if (!ref.target) {
40
+ continue;
41
+ }
36
42
  if (Obj.getDXN(ref.target).isLocalObjectId()) {
37
43
  // obj not persisted to db.
38
44
  const [target] = yield* syncObjects([ref.target], { foreignKeyId });
@@ -42,7 +48,7 @@ export const syncObjects: (
42
48
 
43
49
  const schema = Obj.getSchema(obj) ?? failedInvariant('No schema.');
44
50
  const foreignId = Obj.getKeys(obj, foreignKeyId)[0]?.id ?? failedInvariant('No foreign key.');
45
- const [existing] = yield* Database.Service.runQuery(
51
+ const [existing] = yield* Database.runQuery(
46
52
  Query.select(Filter.foreignKeys(schema, [{ source: foreignKeyId, id: foreignId }])),
47
53
  );
48
54
  log('sync object', {
@@ -51,7 +57,7 @@ export const syncObjects: (
51
57
  existing: existing ? Obj.getDXN(existing) : undefined,
52
58
  });
53
59
  if (!existing) {
54
- yield* Database.Service.add(obj);
60
+ yield* Database.add(obj);
55
61
  return obj;
56
62
  } else {
57
63
  copyObjectData(existing, obj);
@@ -63,33 +69,38 @@ export const syncObjects: (
63
69
  });
64
70
 
65
71
  const copyObjectData = (existing: Obj.Unknown, newObj: Obj.Unknown) => {
66
- Obj.change(existing, (obj) => {
72
+ Obj.update(existing, (existing) => {
67
73
  // Copy properties from newObj to existing.
68
74
  for (const key of Object.keys(newObj)) {
69
- if (typeof key !== 'string' || key === 'id') continue;
75
+ if (typeof key !== 'string' || key === 'id') {
76
+ continue;
77
+ }
70
78
  if (
71
79
  typeof (newObj as any)[key] !== 'string' &&
72
80
  typeof (newObj as any)[key] !== 'number' &&
73
81
  typeof (newObj as any)[key] !== 'boolean' &&
74
82
  !Ref.isRef((newObj as any)[key])
75
- )
83
+ ) {
76
84
  continue;
77
- (obj as any)[key] = (newObj as any)[key];
85
+ }
86
+ (existing as any)[key] = (newObj as any)[key];
78
87
  }
79
88
 
80
89
  // Delete properties that don't exist in newObj.
81
- for (const key of Object.keys(obj)) {
82
- if (typeof key !== 'string' || key === 'id') continue;
90
+ for (const key of Object.keys(existing)) {
91
+ if (typeof key !== 'string' || key === 'id') {
92
+ continue;
93
+ }
83
94
  if (!(key in newObj)) {
84
- delete (obj as any)[key];
95
+ delete (existing as any)[key];
85
96
  }
86
97
  }
87
98
 
88
99
  // Update foreign keys.
89
100
  for (const foreignKey of Obj.getMeta(newObj).keys) {
90
- Obj.deleteKeys(obj, foreignKey.source);
101
+ Obj.deleteKeys(existing, foreignKey.source);
91
102
  // TODO(dmaretskyi): Doesn't work: `Obj.getMeta(existing).keys.push(foreignKey);`
92
- Obj.getMeta(obj).keys.push({ ...foreignKey });
103
+ Obj.getMeta(existing).keys.push({ ...foreignKey });
93
104
  }
94
105
  });
95
106
  };
@@ -2,4 +2,5 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ export * from '../blueprints/testing';
5
6
  export * from './plugins';
@@ -5,15 +5,17 @@
5
5
  import * as Schema from 'effect/Schema';
6
6
  import React from 'react';
7
7
 
8
- import { Capability, Common } from '@dxos/app-framework';
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { Surface } from '@dxos/app-framework/ui';
9
10
  import { Format, type Obj, Type } from '@dxos/echo';
10
- import { JsonFilter } from '@dxos/react-ui-syntax-highlighter';
11
+ import { Card } from '@dxos/react-ui';
12
+ import { Syntax } from '@dxos/react-ui-syntax-highlighter';
11
13
 
12
14
  export const MapSchema = Schema.Struct({
13
15
  coordinates: Format.GeoPoint,
14
16
  }).pipe(
15
17
  Type.object({
16
- typename: 'example.com/type/Map',
18
+ typename: 'com.example.type.map',
17
19
  version: '0.1.0',
18
20
  }),
19
21
  );
@@ -38,31 +40,40 @@ const isImage = (data: any): data is any => false;
38
40
 
39
41
  export const capabilities: Capability.Any[] = [
40
42
  Capability.contributes(
41
- Common.Capability.ReactSurface,
42
- Common.createSurface({
43
+ Capabilities.ReactSurface,
44
+ Surface.create({
43
45
  id: 'plugin-image',
44
- role: 'card--extrinsic',
46
+ role: 'card--content',
45
47
  filter: (data: any): data is any => isImage(data.value),
46
48
  component: ({ data }) => (
47
- <img
48
- className='grow object-cover'
49
- src={`data:image/jpeg;base64,${data.value.source.data}`}
50
- alt={data.value.prompt ?? `Generated image [id=${data.value.id}]`}
51
- />
49
+ <Card.Content>
50
+ <img
51
+ className='grow object-cover'
52
+ src={`data:image/jpeg;base64,${data.value.source.data}`}
53
+ alt={data.value.prompt ?? `Generated image [id=${data.value.id}]`}
54
+ />
55
+ </Card.Content>
52
56
  ),
53
57
  }),
54
58
  ),
55
-
56
- //
57
- // Default
58
- //
59
59
  Capability.contributes(
60
- Common.Capability.ReactSurface,
61
- Common.createSurface({
60
+ Capabilities.ReactSurface,
61
+ Surface.create({
62
62
  id: 'plugin-default',
63
- role: 'card--extrinsic',
63
+ role: 'card--content',
64
64
  position: 'fallback',
65
- component: ({ data }) => <JsonFilter data={data} />,
65
+ component: ({ data }) => (
66
+ <Card.Content>
67
+ <Syntax.Root data={data}>
68
+ <Syntax.Content>
69
+ <Syntax.Filter />
70
+ <Syntax.Viewport>
71
+ <Syntax.Code />
72
+ </Syntax.Viewport>
73
+ </Syntax.Content>
74
+ </Syntax.Root>
75
+ </Card.Content>
76
+ ),
66
77
  }),
67
78
  ),
68
79
  ];
@@ -0,0 +1,33 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as AnthropicTool from '@effect/ai-anthropic/AnthropicTool';
6
+ import * as Tool from '@effect/ai/Tool';
7
+ import * as Toolkit from '@effect/ai/Toolkit';
8
+ import * as Effect from 'effect/Effect';
9
+ import * as Schema from 'effect/Schema';
10
+
11
+ // TODO(dmaretskyi): Testing only.
12
+ export const WebToolkit = Toolkit.make(
13
+ AnthropicTool.WebSearch_20250305({}).pipe(
14
+ // TODO(dmaretskyi): Effect bug -- provider-defined tools don't support annotations.
15
+ // ToolFormatter.assign({
16
+ // debugFormatResult: (result) =>
17
+ // Array.isArray(result) ? result.map(Struct.pick('title', 'type', 'url', 'page_age')) : result,
18
+ // }),
19
+ ),
20
+ Tool.make('WebFetch', {
21
+ parameters: {
22
+ url: Schema.String,
23
+ },
24
+ success: Schema.String,
25
+ }),
26
+ );
27
+
28
+ export const layer = WebToolkit.toLayer({
29
+ WebFetch: Effect.fnUntraced(function* ({ url }) {
30
+ const response = yield* Effect.promise(() => fetch(url).then((response) => response.text()));
31
+ return response;
32
+ }),
33
+ });
@@ -2,5 +2,4 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- export * as AssistantToolkit from './AssistantToolkit';
6
- export * as SystemToolkit from './SystemToolkit';
5
+ export * as WebToolkit from './WebToolkit';